WP RSS Aggregator - Version 4.13

Version Description

(2019-04-24) = Added: Introduced feed templates. Added: Introduced a WP RSS Aggregator Gutenberg block. Added: Brand new debug log and logging system that stores logs in the database. Added: Items can now be added to the Blacklist manually. Changed: Refactored a lot of legacy code over to the new modular system. Changed: General display settings have been moved to the "Default" template type. Changed: Reorganized the general plugin settings. Advanced options are now under an advanced settings section. Changed: Removed the "Add New" menu item from the RSS Aggregator menu. Changed: The feed sources page now updates every 1 second. Changed: Updated the TinyMCE dialog options for inserting a shortcode on a page or post (Classic Editor). Changed: Updated administrator and editor role capabilities, fixing various permission bugs. Changed: Updated a lot of setting descriptions and tooltips. Changed: The help support beacon is now enabled by default. Fixed: Import errors no longer "freeze" feed sources in an infinite importing state. Fixed: Some import errors would not be logged due to script timeout or execution errors. Fixed: Feed to Post was not able to show feed items in the shortcode. Fixed: Deprecation notices on PHP 7.3. Fixed: The "Force feed" option was not properly being applied to feed sources. Fixed: A bug that caused perfectly good RSS feeds to trigger gzip errors. Fixed: The "Delete permanently & blacklist" row action was appearing for non-feed-item post types. Removed: The notice that asks users to leave a review was removed due to various bugs.

Browse the full changelog history.

Download this release

Release Info

Developer markzahra
Plugin Icon 128x128 WP RSS Aggregator
Version 4.13
Comparing to
See all releases

Code changes from version 4.12.3 to 4.13

Files changed (147) hide show
  1. CHANGELOG.md +940 -0
  2. css/admin-editor.css +51 -24
  3. css/admin-general-styles.css +10 -0
  4. css/admin-styles.css +155 -0
  5. css/build/common.min.css +1 -0
  6. css/build/gutenberg-block.min.css +1 -0
  7. css/{intro.min.css → build/intro.min.css} +0 -0
  8. css/build/pagination.min.css +1 -0
  9. css/{plugins.min.css → build/plugins.min.css} +0 -0
  10. css/build/templates.min.css +1 -0
  11. css/build/update.min.css +1 -0
  12. css/legacy-styles.css +6 -0
  13. css/src/common/index.scss +3 -0
  14. css/src/common/info-box.scss +16 -0
  15. css/src/common/notice-block.scss +64 -0
  16. css/src/gutenberg-block/index.scss +14 -0
  17. css/src/mixins.scss +32 -0
  18. css/src/pagination/index.scss +10 -0
  19. css/src/templates/bottom-panel.scss +15 -0
  20. css/src/templates/grid.scss +18 -0
  21. css/src/templates/index.scss +216 -0
  22. css/src/templates/loading.scss +220 -0
  23. css/src/templates/notifications.scss +28 -0
  24. css/src/update/index.scss +51 -13
  25. css/styles.css +0 -27
  26. css/templates/list/styles.css +73 -0
  27. css/update.min.css +0 -1
  28. images/wpra-icon-32.png +0 -0
  29. images/wpra-icon-small.png +0 -0
  30. includes/Aventura/Wprss/Core/Component/Logger.php +3 -114
  31. includes/Aventura/Wprss/Core/Licensing/License/Status.php +3 -6
  32. includes/Aventura/Wprss/Core/Model/LoggerAbstract.php +0 -364
  33. includes/Aventura/Wprss/Core/Model/LoggerInterface.php +5 -109
  34. includes/Aventura/Wprss/Core/Model/ModelInterface.php +1 -2
  35. includes/Aventura/Wprss/Core/Plugin/ComponentAbstract.php +2 -2
  36. includes/Aventura/Wprss/Core/Plugin/PluginAbstract.php +0 -14
  37. includes/admin-debugging.php +52 -5
  38. includes/admin-display.php +2 -2
  39. includes/admin-editor.php +127 -38
  40. includes/admin-heartbeat.php +1 -1
  41. includes/admin-help.php +1 -1
  42. includes/admin-intro-page.php +3 -3
  43. includes/admin-log.php +139 -441
  44. includes/admin-options-legacy.php +460 -0
  45. includes/admin-options.php +189 -482
  46. includes/admin-plugins.php +2 -2
  47. includes/admin-statistics.php +0 -152
  48. includes/admin-update-page.php +7 -3
  49. includes/admin.php +32 -18
  50. includes/cron-jobs.php +2 -4
  51. includes/custom-feed.php +0 -164
  52. includes/custom-post-types.php +0 -137
  53. includes/deprecated-functions.php +0 -83
  54. includes/deprecated.php +38 -0
  55. includes/feed-access.php +6 -6
  56. includes/feed-blacklist.php +72 -76
  57. includes/feed-display.php +0 -523
  58. includes/feed-importing.php +134 -105
  59. includes/legacy-feed-display.php +541 -0
  60. includes/libraries/browser.php +2 -2
  61. includes/roles-capabilities.php +29 -96
  62. includes/shortcodes.php +0 -70
  63. includes/system-info.php +33 -0
  64. includes/twig.php +10 -26
  65. includes/update.php +5 -1
  66. js/admin-custom.js +147 -1
  67. js/build/common.min.js +1 -0
  68. js/build/gutenberg-block.min.js +1 -0
  69. js/build/intro.min.js +1 -0
  70. js/build/pagination.min.js +1 -0
  71. js/build/plugins.min.js +1 -0
  72. js/build/settings.min.js +1 -0
  73. js/build/templates.min.js +1 -0
  74. js/build/update.min.js +1 -0
  75. js/build/wpra-manifest.min.js +1 -0
  76. js/build/wpra-vendor.min.js +27 -0
  77. js/editor.js +40 -16
  78. js/heartbeat.js +2 -2
  79. js/intro.min.js +0 -1
  80. js/plugins.min.js +0 -1
  81. js/src/components/BottomPanel.vue +9 -0
  82. js/src/components/Button.js +14 -0
  83. js/src/{intro → components}/Expander.vue +0 -0
  84. js/src/components/Input.js +90 -0
  85. js/src/components/Layout.js +11 -0
  86. js/src/components/Main.js +11 -0
  87. js/src/{plugins → components}/Modal.vue +0 -0
  88. js/src/components/NoticeBlock.js +143 -0
  89. js/src/components/Postbox.vue +43 -0
  90. js/src/components/RouteLink.js +27 -0
  91. js/src/components/RouterApp.js +47 -0
  92. js/src/{plugins → components}/SerializedForm.vue +0 -0
  93. js/src/components/Sidebar.js +11 -0
  94. js/src/{intro → components}/TransitionExpand.vue +0 -0
  95. js/src/intro/Wizard.vue +0 -440
  96. js/src/intro/copy.js +0 -37
  97. js/src/intro/index.js +0 -11
  98. js/src/libs/NotificationCenter.js +45 -0
  99. js/src/libs/Router.js +122 -0
  100. js/src/mixins/DataChangesAware.js +47 -0
  101. js/src/modules/gutenberg-block/components/MultipleSelectControl.js +85 -0
  102. js/src/modules/gutenberg-block/index.js +197 -0
  103. js/src/modules/intro/Wizard.vue +440 -0
  104. js/src/modules/intro/index.js +11 -0
  105. js/src/modules/pagination/index.js +44 -0
  106. js/src/modules/plugins/PluginDisablePoll.vue +112 -0
  107. js/src/modules/plugins/index.js +10 -0
  108. js/src/modules/settings/index.js +11 -0
  109. js/src/modules/templates/Edit.js +463 -0
  110. js/src/modules/templates/List.js +351 -0
  111. js/src/modules/templates/app.js +98 -0
  112. js/src/modules/templates/index.js +39 -0
  113. js/src/modules/templates/store/actions.js +1 -0
  114. js/src/modules/templates/store/getters.js +7 -0
  115. js/src/modules/templates/store/index.js +12 -0
  116. js/src/modules/templates/store/mutations.js +10 -0
  117. js/src/modules/templates/store/state.js +18 -0
  118. js/src/plugins/PluginDisablePoll.vue +0 -112
  119. js/src/plugins/index.js +0 -10
  120. js/src/utils/Collection.js +178 -0
  121. js/src/utils/copy.js +43 -0
  122. js/src/utils/deepmerge.js +72 -0
  123. js/src/{intro → utils}/fetch.js +0 -0
  124. js/src/utils/jsonClone.js +3 -0
  125. js/update.min.js +0 -1
  126. js/wpra-manifest.min.js +0 -1
  127. js/wpra-vendor.min.js +0 -12
  128. readme.txt +141 -717
  129. src/Container/ModuleContainer.php +121 -0
  130. src/Container/WpFilterContainer.php +55 -0
  131. src/Container/WpraContainer.php +21 -0
  132. src/Data/AbstractDataSet.php +139 -0
  133. src/Data/AbstractDelegateDataSet.php +120 -0
  134. src/Data/AliasingDataSet.php +76 -0
  135. src/Data/ArrayDataSet.php +98 -0
  136. src/Data/ChangelogDataSet.php +189 -0
  137. src/Data/Collections/CollectionInterface.php +47 -0
  138. src/Data/Collections/NullCollection.php +126 -0
  139. src/Data/Collections/TwigTemplateCollection.php +113 -0
  140. src/Data/Collections/WpPostCollection.php +464 -0
  141. src/Data/CompositeDataSet.php +117 -0
  142. src/Data/DataSetInterface.php +15 -0
  143. src/Data/DeprefixingDataSet.php +59 -0
  144. src/Data/MaskingDataSet.php +134 -0
  145. src/Data/MergedDataSet.php +237 -0
  146. src/Data/PrefixingDataSet.php +72 -0
  147. src/Data/Wp/WpArrayOptionDataSet.php +12 -0
CHANGELOG.md ADDED
@@ -0,0 +1,940 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Change log
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
+ and this project adheres to [Semantic Versioning](http://semver.org/).
6
+
7
+ ## [4.13] - 2019-04-24
8
+ ### Added
9
+ * Introduced feed templates.
10
+ * Introduced a WP RSS Aggregator Gutenberg block.
11
+ * Brand new debug log and logging system that stores logs in the database.
12
+ * Items can now be added to the Blacklist manually.
13
+
14
+ ### Changed
15
+ * Refactored a lot of legacy code over to the new modular system.
16
+ * General display settings have been moved to the "Default" template type.
17
+ * Reorganized the general plugin settings. Advanced options are now under an advanced settings section.
18
+ * Removed the "Add New" menu item from the RSS Aggregator menu.
19
+ * The feed sources page now updates every 1 second.
20
+ * Updated the TinyMCE dialog options for inserting a shortcode on a page or post (Classic Editor).
21
+ * Updated administrator and editor role capabilities, fixing various permission bugs.
22
+ * Updated a lot of setting descriptions and tooltips.
23
+ * The help support beacon is now enabled by default.
24
+
25
+ ### Fixed
26
+ * Import errors no longer "freeze" feed sources in an infinite importing state.
27
+ * Some import errors would not be logged due to script timeout or execution errors.
28
+ * Feed to Post was not able to show feed items in the shortcode.
29
+ * Deprecation notices on PHP 7.3.
30
+ * The "Force feed" option was not properly being applied to feed sources.
31
+ * A bug that caused perfectly good RSS feeds to trigger gzip errors.
32
+ * The "Delete permanently & blacklist" row action was appearing for non-feed-item post types.
33
+
34
+ ### Removed
35
+ * The notice that asks users to leave a review was removed due to various bugs.
36
+
37
+ ## [4.12.3] - 2019-04-01
38
+ ### Fixed
39
+ * Fixed an issue with Feed to Post not being able to show feed items in the shortcode.
40
+ * Fixed deprecation notices on PHP 7.3.
41
+
42
+ ## [4.12.2] - 2019-03-26
43
+ ### Fixed
44
+ * Fixed an admin capability bug that disallowed admin users from fetching feed items.
45
+
46
+ ## [4.12.1] - 2019-02-27
47
+ ### Added
48
+ * Added a modal with an optional poll when the plugin is deactivated.
49
+
50
+ ### Changed
51
+ * Improved the core plugin's on-boarding process for brand new users.
52
+ * The timeout for the truncating posts hook has been extended.
53
+
54
+ ### Fixed
55
+ * Fixed the "Sorted" error appearing constantly in the debug log.
56
+ * Fixed PHP warnings appearing on WordPress multisite.
57
+ * Fixed PHP notice appearing on Feed Items page.
58
+ * Fixed strict standards notice appearing on settings import.
59
+
60
+ ## [4.12] - 2019-01-29
61
+ ### Added
62
+ * The plugin now checks if its running on PHP 5.3.9, and deactivates itself when not.
63
+ * Added message informing users that v4.13 will drop support for PHP 5.3.
64
+ * Added an introduction page for new plugin users.
65
+
66
+ ### Changed
67
+ * Changed protocol for all links to HTTPS wherever necessary or applicable.
68
+
69
+ ### Removed
70
+ * Disabled the welcome page on activation and updates.
71
+
72
+ ## [4.11.4] - 2018-12-11
73
+ ### Added
74
+ * Added handling of lifetime licenses.
75
+
76
+ ### Changed
77
+ * License renewal link and expiry are not shown if they are not applicable.
78
+
79
+ ## [4.11.3] - 2018-05-23
80
+ ### Changed
81
+ * Updated Help & Support page.
82
+
83
+ ## [4.11.2] - 2017-09-18
84
+ ### Added
85
+ * Added 2 new general settings for item import order and per-import limit.
86
+
87
+ ### Changed
88
+ * Cosmetic and documentation improvements.
89
+
90
+ ## [4.11.1] - 2017-03-07
91
+ ### Fixed
92
+ * Fixed bug that caused minor publishing controls to be hidden on unrelated Edit screens.
93
+
94
+ ## [4.11] - 2017-03-06
95
+ ### Changed
96
+ * Enhanced Licenses page so as to make the [Enter] key toggle license activation.
97
+ * Enhanced architecture by using a DI container.
98
+ * Enhanced admin notifications by refactoring them to use the same mechanism.
99
+ * Enhanced admin notifications by making all of them dismissible.
100
+
101
+ ### Fixed
102
+ * Fixed bug with lifetime licenses showing expiry notices.
103
+ * Fixed bug with being able to submit form on Licenses page.
104
+ * Fixed bug with empty saved license key causing PHP notice, and not triggering reminder notification.
105
+ * Fixed bug with saved but inactive licenses not triggering reminder notification.
106
+ * Fixed bug with minified assets not being served by default.
107
+ * Fixed bug with cached admin assets being served even after update.
108
+ * Fixed bug with admin notifications displayed on unrelated pages not being dismissible.
109
+
110
+ ## [4.10] - 2016-12-29
111
+ ### Added
112
+ * Added a per-feed-source "Link Source" option.
113
+ * Added a per-feed-source "Feed Request User Agent" option.
114
+ * Now using Composer!
115
+ * Now using Phing!
116
+ * Added RegEx HTML Encodifier.
117
+ * Added integration with Diagnostics plugin, and tests.
118
+ * Added "Leave a Review" notification.
119
+
120
+ ### Changed
121
+ * The "Add New" button no longer appears for feed items.
122
+ * Logs are now created in `wp-content/log/wprss`, and are named more descriptively.
123
+
124
+ ### Fixed
125
+ * Fixed bug with feed error output breaking tooltips on "Feed Sources" page.
126
+ * Fixed bug with nonces on the "Feed Sources" page that broke some source actions.
127
+ * Fixed problem with image cache filenames being too long.
128
+ * Fixed problem with permalink URLs sometimes being URL-encoded.
129
+ * Fixed problem with large logs causing OOM errors and breaking Debugging page.
130
+ * Fixed conflict with function `unparse_url()`.
131
+ * Fixed bug with `_getDataOrConst()` not retrieving single value.
132
+ * Fixed future incompatibility with `class-feed.php` for WP 4.7+.
133
+ * Fixed conflicts with many JS scripts by only adding JS on our admin pages.
134
+ * Fixed conflicts with some classes by loading only valid root namespace components.
135
+ * Fixed PHP warning related to retrieving unique titles.
136
+
137
+ ## [4.9.1] - 2016-08-01
138
+ ### Changed
139
+ * Changed copyright and other info in plugin header.
140
+
141
+ ## [4.9] - 2016-06-14
142
+ ### Changed
143
+ * Enhanced: Visual improvements.
144
+
145
+ ### Fixed
146
+ * Fixed bug: Potential security vulnerability related to triggering feed update.
147
+ * Fixed bug: Error output on Feed Sources list is trimmed and cannot break the page layout.
148
+ * Fixed bug: Certain notices could not be dismissed.
149
+ * Fixed bug: Word trimming didn't always trim correctly with HTML.
150
+
151
+ ## [4.8.2] - 2016-02-22
152
+ ### Changed
153
+ * Enhanced: Users can now override useragent sent with feed requests.
154
+ * Enhanced: Improvements to plugin updating system.
155
+ * Enhanced: Readme updated.
156
+ * Enhanced: "Open link behaviour" option's internal handling has been improved.
157
+
158
+ ### Fixed
159
+ * Fixed bug: Interface methods used to conflict, causing fatal error on activation.
160
+ * Fixed bug: Empty feed response used to cause misleading error message in log.
161
+
162
+ ## [4.8.1] - 2016-02-02
163
+ ### Changed
164
+ * Enhanced: Visual improvements.
165
+ * Enhanced: Included new Object Oriented code.
166
+
167
+ ### Fixed
168
+ * Fixed bug: Some exceptions used to cause fatal errors.
169
+ * Fixed bug: Requests made by image caching used to always have an infinite timeout.
170
+ * Fixed bug: Licensing algorithm used to use constants of inactive plugins, causing fatal error.
171
+
172
+ ## [4.8] - 2015-12-30
173
+ ### Changed
174
+ * Enhanced: Major licensing system improvements.
175
+
176
+ ### Fixed
177
+ * Fixed bug: Licensing notices will now be displayed again.
178
+
179
+ ## [4.7.8] - 2015-11-18
180
+ ### Changed
181
+ * Enhanced: Added autoloading and refactored licensing.
182
+ * Enhanced: Added button to download error log.
183
+ * Enhanced: Cosmetic changes and fixes.
184
+
185
+ ### Fixed
186
+ * Fixed bug: Sticky posts no longer get deleted when truncating, unless imported from a feed source.
187
+
188
+ ## [4.7.7] - 2015-10-19
189
+ ### Changed
190
+ * Enhanced: Optimized checking for plugin updates.
191
+
192
+ ## [4.7.6] - 2015-10-07
193
+ ### Changed
194
+ * Enhanced: Feeds that fail to validate due to whitespace at the beginning are now supported by the plugin.
195
+
196
+ ### Fixed
197
+ * Fixed bug: Undefined variables in the System Info section in the Debugging page.
198
+ * Fixed bug: Add-on license expiration notices could not be dismissed.
199
+
200
+ ## [4.7.5] - 2015-09-02
201
+ ### Changed
202
+ * Enhanced: Licensing errors will be output to debug log.
203
+ * Enhanced: Improved compatibility with plugins that allow AJAX searching in the backend.
204
+
205
+ ### Fixed
206
+ * Fixed bug: error related to undefined `ajaxurl` JS variable gone from frontend.
207
+
208
+ ### Removed
209
+ * Usage tracking now disabled.
210
+
211
+ ## [4.7.4] - 2015-08-20
212
+ ### Changed
213
+ * Requirement: WordPress 4.0 or greater now required.
214
+
215
+ ### Fixed
216
+ * Fixed bug in image caching
217
+ * Fixed bug in admin interface due to incorrectly translated IDs
218
+
219
+ ## [4.7.3] - 2015-08-04
220
+ ### Added
221
+ * Core now implements an image cache logic.
222
+ * Russian translation added.
223
+ * Google Alerts permalinks are now normalized.
224
+
225
+ ### Changed
226
+ * Enhanced: Add-ons on the "Add-ons" page now have an installed-but-inactive status.
227
+
228
+ ### Fixed
229
+ * Fixed bug: Inline help (tooltips) translations now work.
230
+ * Fixed bug: Link to the Feed to Post add-on on the welcome page is no longer broken.
231
+
232
+ ## [4.7.2] - 2015-06-30
233
+ ### Changed
234
+ * Enhanced: Copyright updated.
235
+
236
+ ### Fixed
237
+ * Fixed bug: Word trimming no longer adds extra closing tags at the end.
238
+ * Fixed bug: Presence of `idna_convert` class no longer causes infinite redirects on some servers.
239
+ * Fixed bug: Warning of unterminated comment no longer thrown in PHP 5.5.
240
+ * Fixed bug: Added default value for "Unique Titles" option.
241
+ * Fixed bug: Having a the port number specified with the database host no longer causes issues with the `mysqli` adapter in System Info on some servers.
242
+ * Fixed bug: Nested options of inline help controller no longer cause a fatal error.
243
+ * Fixed bug: Notices will no longer be displayed during rendering of feed items due to absence of required default values.
244
+
245
+ ## [4.7.1] - 2015-04-23
246
+ ### Fixed
247
+ * Fixed bug: No warning will be thrown when fetching feeds.
248
+
249
+ ## [4.7] - 2015-04-21
250
+ ### Added
251
+ * Optionally import only items with titles that don't already exist.
252
+ * Added support for multibyte strings in some places.
253
+
254
+ ### Changed
255
+ * Enhanced: Accessing feeds over HTTPS is now possible.
256
+ * Enhanced: Increased JS compatibility with other plugins.
257
+ * Enhanced: Increased UI support for mobile devices.
258
+
259
+ ### Fixed
260
+ * Fixed bug: Having no mysqli extension no longer causes an error to appear in the debug info.
261
+ * Fixed bug: Saving an empty license key no longer results in a warning.
262
+
263
+ ## [4.6.13] - 2015-03-20
264
+ ### Fixed
265
+ * Fixed bug: The "Force feed" option wasn't being correctly used.
266
+
267
+ ## [4.6.12] - 2015-03-09
268
+ ### Fixed
269
+ * Fixed bug: The "Force feed" option was being removed by the Feed to Post add-on.
270
+
271
+ ## [4.6.11] - 2015-03-04
272
+ ### Changed
273
+ * Enhanced: The Help page now includes a support form if a premium add-on is detected.
274
+ * Enhanced: Updated some translations for admin options.
275
+
276
+ ### Fixed
277
+ * Fixed bug: Help tooltips are now optimized for iPad screens.
278
+ * Fixed bug: Errors on the licensing page when a license code has not yet been entered.
279
+
280
+ ## [4.6.10] - 2015-02-10
281
+ ### Added
282
+ * Markdown library added. Changelog now read from readme.
283
+
284
+ ### Changed
285
+ * Enhanced: AJAX license activation.
286
+ * Enhanced: License form more reliable.
287
+ * Enhanced: license-related UI improvements
288
+
289
+ ### Fixed
290
+ * Fixed bug: Saving license keys not longer triggers error in some cases.
291
+
292
+ ## [4.6.9] - 2015-01-21
293
+ ### Changed
294
+ * Enhanced: Admin user will now be warned about invalid or expiring licenses.
295
+ * Enhanced: Admin notices logic centralized in this plugin.
296
+
297
+ ### Fixed
298
+ * Fixed: Multiple small-scale security vulnerabilities.
299
+ * Fixed: Ampersand in feed URL no longer causes the product of generated feeds to be invalidated by W3C Validator.
300
+
301
+ ## [4.6.8] - 2015-01-07
302
+ ### Changed
303
+ * Enhanced: Added more logging during feed importing.
304
+ * Enhanced: Irrelevent metaboxes added by other plugins are now removed from the Add/Edit Feed Source page.
305
+
306
+ ### Fixed
307
+ * Fixed bug: Valid feed URLS were being invalidated.
308
+ * Fixed bug: The Blacklist feature was being hidden when the Feed to Post add-on was enabled.
309
+ * Fixed bug: Patched a vulnerability where any user on the site can issue a feed fetch.
310
+ * Fixed bug: The "Activate" and "Pause" actions are not shown in the bulk actions dropdown in WordPress v4.1.
311
+
312
+ ## [4.6.7] - 2014-12-17
313
+ ### Changed
314
+ * Enhanced: Some minor interface updates.
315
+ * Enhanced: Added filters for use by the premium add-ons.
316
+
317
+ ## [4.6.6] - 2014-12-06
318
+ ### Added
319
+ * Added output layouts for feed sources and feed items.
320
+ * Added time limit extending to prevent script from exhausting its execution time limit while importing.
321
+
322
+ ### Changed
323
+ * Enhanced: Updated EDD updater class to version 1.5.
324
+
325
+ ### Fixed
326
+ * Fixed bug: The "Delete and Re-import" button was deleting items but not re-importing.
327
+ * Fixed bug: Non-object errors when a feed source is deleted while importing.
328
+
329
+ ## [4.6.5] - 2014-11-17
330
+ ### Changed
331
+ * Enhanced: Improved the logging.
332
+ * Enhanced: Improved the licensing fields.
333
+ * Enhanced: Updated the EDD updater class to the latest version.
334
+
335
+ ### Fixed
336
+ * Fixed bug: Small random error when viewing the licenses page.
337
+
338
+ ## [4.6.4] - 2014-11-10
339
+ ### Changed
340
+ * Enhanced: Added filters to the custom feed.
341
+ * Enhanced: Updated some styles to improve the user interface.
342
+
343
+ ### Fixed
344
+ * Fixed bug: The "Remove selected from Blacklist" button had no nonce associated with it.
345
+ * Fixed bug: The Blacklist menu entry was not always being shown.
346
+
347
+ ## [4.6.3] - 2014-11-3
348
+ ### Changed
349
+ * Enhanced: Re-added the "Add New" link in the plugin's menu.
350
+ * Enhanced: Improved error logging.
351
+ * Enhanced: Bulk actions in the Feed Sources page are now also included in the bottom dropdown menu.
352
+
353
+ ### Fixed
354
+ * Fixed bug: Add-on updater was prone to conflicts. Now enclosed in an action.
355
+ * Fixed bug: The Full Text RSS Feeds add-on was not showing as active in the "Add-ons" page.
356
+ * Fixed bug: Broken links in the "Add-ons" page, to add-on pages on our site.
357
+
358
+ ## [4.6.2] - 2014-10-15
359
+ ### Added
360
+ * Added a new filter to modify the text shown before author names.
361
+ * Added better debug logging.
362
+
363
+ ### Changed
364
+ * Enhanced: Improved plugin responsiveness.
365
+ * Enhanced: Updated some help text in tooltips with better explainations and added clarity.
366
+ * Enhanced: Optimized some old SQL queries.
367
+
368
+ ### Changed
369
+ * Fixed bug: Licenses were not showing as active, even though they were activated.
370
+
371
+ ## [4.6.1] - 2014-10-06
372
+ ### Changed
373
+ * Enhanced: Improved internationalization in the plugin, for better translations.
374
+
375
+ ### Fixed
376
+ * Fixed bug: If the feed source age limit was left empty, the global setting was used instead of ignoring the limit.
377
+
378
+ ## [4.6] - 2014-09-22
379
+ ### Changed
380
+ * Enhanced: Improved the user interface, with better responsiveness and tooltips.
381
+ * Enhanced: Removes the ID column. The ID is now shown fixed in row actions.
382
+ * Enhanced: Feed Preview indicates if feed items have no dates.
383
+
384
+ ### Fixed
385
+ * Fixed bug: If a feed item has no date, the date and time it was imported is used.
386
+
387
+ ## [4.5.3] - 2014-09-15
388
+ ### Changed
389
+ * Added filter to allow adding RSS feeds to the head of your site's pages for CPTs.
390
+
391
+ ### Changed
392
+ * Enhanced: Columns in the feed sources table are now sortable.
393
+ * Enhanced: Removed the ID column in the feed sources table. The ID has been moved as a row action.
394
+ * Enhanced: Improved various interface elements.
395
+ * Enhanced: Better responsiveness for smaller screen.
396
+
397
+ ### Fixed
398
+ * Fixed bug: The importing spinning icon would get stuck and spin for a very long time.
399
+ * Fixed bug: Removed an old description meta field.
400
+ * Fixed bug: Plugin was not removing all scheduled cron jobs when deactivated.
401
+
402
+ ## [4.5.2] - 2014-09-09
403
+ ### Changed
404
+ * Enhanced: Optimized plugin for WordPress 4.0.
405
+ * Enhanced: Improved template and added filters for add-on hooking.
406
+
407
+ ### Fixed
408
+ * Fixed bug: Editor toolbar visible over the WP RSS shortcode dialog.
409
+
410
+ ## [4.5.1] - 2014-08-26
411
+ ### Fixed
412
+ * Fixed bug: Last import feed item count stays at zero.
413
+ * Fixed bug: Datetime::setTimestamp error when using PHP 5.2 or earlier.
414
+ * Fixed bug: The display limit was not working.
415
+ * Fixed bug: Minor bug in licensing.
416
+
417
+ ## [4.5] - 2014-08-25
418
+ ### Added
419
+ * New Feature: Bulk importer allows you to create multiple feed sources at once.
420
+
421
+ ### Changed
422
+ * Enhanced: Improved OPML importer with added hooks.
423
+ * Enhanced: Centralized add-on licensing, fixing multiple bugs.
424
+
425
+ ### Fixed
426
+ * Fixed bug: Undefined `feed_limit` errors when using the shortcode.
427
+
428
+ ## [4.4.4] - 2014-08-19
429
+ ### Fixed
430
+ * Fixed bug: Errors when using older PHP versions 5.3 or lower.
431
+
432
+ ## [4.4.3] - 2014-08-19
433
+ ### Fixed
434
+ * Fixed bug: Errors when using older PHP versions 5.3 or lower.
435
+
436
+ ## [4.4.2] - 2014-08-19
437
+ ### Fixed
438
+ * Fixed bug: Errors when using older PHP versions 5.3 or lower.
439
+
440
+ ## [4.4.1] - 2014-08-18
441
+ ### Changed
442
+ * Enhanced: Various improvements to the plugin interface and texts.
443
+ * Enhanced: Moved the restore default settings button farther down the Debugging page, to avoid confusion with the delete button.
444
+
445
+ ### Fixed
446
+ * Fixed bug: Feed item dates were not being adjusted to the timezone when using a GMT offset.
447
+ * Fixed bug: Feed item dates are now adjusted according to daylight savings time.
448
+
449
+ ## [4.4] - 2014-08-11
450
+ ### Added
451
+ * Blacklist - delete items and blacklist them to never import them again.
452
+
453
+ ### Changed
454
+ * Enhanced: Added a button in the Debugging page to reset the plugin settings to default.
455
+ * Enhanced: WordPress Yoast SEO metaboxes and custom columns will no longer appear.
456
+
457
+ ## [4.3.1] - 2014-08-08
458
+ ### Changed
459
+ * Enhanced: Better wording on settings page.
460
+
461
+ ### Fixed
462
+ * Fixed bug: The Links Behaviour option in the settings was not working.
463
+ * Fixed bug: The wrong feed items were being shown for some sources when using the "View Items" row action.
464
+
465
+ ## [4.3] - 2014-08-04
466
+ ### Added
467
+ * New Feature: Feed items now also import authors.
468
+
469
+ ### Changed
470
+ * Enhanced: Custom feed is now in RSS 2.0 format.
471
+ * Enhanced: Improved the display template for feed items.
472
+
473
+ ### Fixed
474
+ * Fixed bug: Custom feed was not working in Firefox.
475
+ * Fixed bug: Some feed items were showing items from another feed source.
476
+ * Fixed bug: The feed limit in the global settings was not working.
477
+
478
+ ## [4.2.3] - 2014-07-29
479
+ ### Changed
480
+ * Enhanced: Added an option to choose between the current pagination type, and numbered pagination.
481
+ * Enhanced: The Feed Preview now also shows the total number of items in the feed.
482
+
483
+ ### Fixed
484
+ * Fixed bug: A PHP warning error was being shown in the System Info.
485
+ * Fixed bug: Language files were not always being referenced correctly.
486
+ * Fixed bug: Manually fetching a feed fails if the feed is scheduled to update in the next 10 minutes.
487
+ * Fixed bug: Bing RSS feeds were importing duplicates on every update.
488
+
489
+ ## [4.2.2] - 2014-07-23
490
+ ### Changed
491
+ * Enhanced: Facebook page feeds are now changed into RSS 2.0 feeds, rather than Atom 1.0 feeds.
492
+ * Enhanced: Improved live updating performace on the Feed Sources page.
493
+
494
+ ## [4.2.1] - 2014-07-17
495
+ ### Changed
496
+ * Enhanced: Feed Sources page is now more responsive.
497
+
498
+ ## [4.2] - 2014-07-17
499
+ ### Added
500
+ * Can now view each feed source's imported feed items separate from other feed sources' feed items.
501
+
502
+ ### Changed
503
+ * Enhanced: Major visual update to the Feed Sources page with new live updates.
504
+ * Enhanced: The custom feed now includes the feed source.
505
+
506
+ ### Fixed
507
+ * Fixed bug: Google News feeds were importing duplicate items on every update.
508
+ * Fixed bug: Multiple minor bug fixes with old filters.
509
+
510
+ ## [4.1.6] - 2014-06-28
511
+ ### Fixed
512
+ * Fixed bug: Results returned by wprss_get_feed_items_for_source() will no longer be affected by filters.
513
+ * Fixed bug: Charset issue in titles
514
+
515
+ ## [4.1.5] - 2014-06-19
516
+ ### Changed
517
+ * Enhanced: The Feed Sources table now indicates which feed sources encountered errors during the last import.
518
+
519
+ ### Fixed
520
+ * Fixed bug: Feed titles were not being decoded for HTML entities.
521
+
522
+ ## [4.1.4] - 2014-05-16
523
+ ### Changed
524
+ * Enhanced: Minor improvements to feed importing and handling.
525
+
526
+ ### Fixed
527
+ * Fixed bug: HTML entities were not being decoded in feed item titles.
528
+
529
+ ## [4.1.3] - 2014-04-28
530
+ ### Changed
531
+ * Enhanced: Added a force feed option, for valid RSS feeds with incorrect header content types.
532
+
533
+ ### Fixed
534
+ * Fixed bug: HTML entities in feed item titles are now being decoded.
535
+
536
+ ## [4.1.2] - 2014-04-22
537
+ ### Changed
538
+ * Enhanced: Improved the custom feed, by allowing a custom title.
539
+ * Enhanced: Improved shortcode, by adding the "pagination" parameter.
540
+ * Enhanced: Modified a filter to fix some bugs in the add-ons.
541
+
542
+ ## [4.1.1] - 2014-04-09
543
+ ### Changed
544
+ * Enhanced: Tracking notices only appear for admin users.
545
+
546
+ ### Fixed
547
+ * Fixed bug: Auto Feed Discovery was not working.
548
+
549
+ ## [4.1] - 2014-04-03
550
+ ### Added
551
+ * New Feature: Feed items can now link to enclosure links in the feed.
552
+
553
+ ### Changed
554
+ * Enhanced: Added a filter to allow add-ons to modify feed item queries.
555
+
556
+ ## [4.0.9] - 2014-03-27
557
+ ### Changed
558
+ * Enhanced: Added a filter to modify the feeds template.
559
+
560
+ ### Fixed
561
+ * Fixed bug: Nested lists in feeds template.
562
+
563
+ ## [4.0.8] - 2014-03-20
564
+ ### Fixed
565
+ * Fixed bug: Using the shortcode makes the comments section always open.
566
+
567
+ ## [4.0.7] - 2014-03-08
568
+ ### Fixed
569
+ * Fixed bug: The plugin prevented uploading of header images.
570
+
571
+ ## [4.0.6] - 2014-03-05
572
+ ### Fixed
573
+ * Fixed bug: Hook change in last version suspected reason for some installations having non-updated feed items.
574
+
575
+ ## [4.0.5] - 2014-03-03
576
+ ### Added
577
+ * New Feature: Time ago added as an option.
578
+
579
+ ### Changed
580
+ * Enhanced: The plugin now allows the use of RSS and Atom feeds that do not specify the correct MIME type.
581
+ * Enhanced: Better performance due to better hook usage.
582
+
583
+ ### Fixed
584
+ * Fixed bug: Facebook page feed URL conversion was not being triggered for new feed sources.
585
+ * Fixed bug: Styles fix for pagination.
586
+ * Fixed bug: Removed empty spaces in logging.
587
+
588
+ ## [4.0.4] - 2014-02-17
589
+ ### Changed
590
+ * Enhanced: Added Activate/Pause bulk actions in the Feed Sources page.
591
+ * Enhanced: Feed Sources page table has been re-designed.
592
+ * Enhanced: Logging is now site dependant on multisite.
593
+
594
+ ### Fixed
595
+ * Fixed bug: Undefined display settings where appearing on the front end.
596
+
597
+ ## [4.0.3] - 2014-02-12
598
+ ### Fixed
599
+ * Fixed bug: The general setting for deleting feed items by age was not working.
600
+
601
+ ## [4.0.2] - 2014-02-10
602
+ ### Changed
603
+ * Enhanced: Added a filter to change the html tags allowed in feed item content.
604
+
605
+ ## [4.0.1] - 2014-02-08
606
+ ### Changed
607
+ * Fixed bug: Empty array of feed items bug caused importing problems.
608
+
609
+ ## [4.0] - 2014-02-04
610
+ ### Changed
611
+ * Enhanced: Improved some internal queries, for better performance.
612
+
613
+ ### Fixed
614
+ * Fixed bug: Feed limits were not working properly.
615
+
616
+ ## [3.9.9] - 2014-02-03
617
+ ### Changed
618
+ * Enhanced: The custom feed can now be extended by add-ons.
619
+
620
+ ## [3.9.8] - 2014-01-20
621
+ ### Fixed
622
+ * Fixed bug: Removed excessive logging from Debugging Error Log.
623
+
624
+ ## [3.9.7] - 2014-01-17
625
+ ### Fixed
626
+ * Fixed bug: Bug in admin-debugging.php causing trouble with admin login
627
+
628
+ ## [3.9.6] - 2014-01-17
629
+ ### Changed
630
+ * Enhanced: Added error logging.
631
+
632
+ ## [3.9.5] - 2014-01-02
633
+ ### Changed
634
+ * Enhanced: Added a feed validator link in the New/Edit Feed Sources page.
635
+ * Enhanced: The Next Update column also shows the time remaining for next update, for feed source on the global update interval.
636
+ * Enhanced: The custom feed has been improved, and is now identical to the feeds displayed with the shortcode.
637
+ * Enhanced: License notifications only appear on the main site when using WordPress multisite.
638
+ * Enhanced: Updated Colorbox script to 1.4.33
639
+
640
+ ### Fixed
641
+ * Fixed bug: The Imported Items column was always showing zero.
642
+ * Fixed bug: Feed items not being imported with limit set to zero. Should be unlimited.
643
+ * Fixed bug: Fat header in Feed Sources page
644
+
645
+ ## [3.9.4] - 2013-12-24
646
+ ### Changed
647
+ * Enhanced: Added a column in the Feed Sources page that shows the number of feed items imported for each feed source.
648
+
649
+ ### Fixed
650
+ * Fixed bug: Leaving the delete old feed items empty did not ignore the delete.
651
+
652
+ ## [3.9.3] - 2013-12-23
653
+ ### Fixed
654
+ * Fixed bug: Fixed tracking pointer appearing on saving settings.
655
+
656
+ ## [3.9.2] - 2013-12-21
657
+ ### Fixed
658
+ * Fixed bug: Incorrect file include call.
659
+
660
+ ## [3.9.1] - 2013-12-12
661
+ ### Changed
662
+ * Enhanced: Improved date and time handling for imported feed items.
663
+
664
+ ### Fixed
665
+ * Fixed bug: Incorrect values being shown in the Feed Processing metabox.
666
+ * Fixed bug: Feed limits set to zero were causing feeds to not be imported.
667
+
668
+ ## [3.9] - 2013-12-12
669
+ ### Added
670
+ * New Feature: Feed sources can have their own update interval.
671
+ * New Feature: The time remaining until the next update has been added to the Feed Source table.
672
+
673
+ ## [3.8] - 2013-12-05
674
+ ### Added
675
+ * New Feature: Feed items can be limited and deleted by their age.
676
+
677
+ ### Changed
678
+ * Enhanced: Added utility functions for shorter filters.
679
+
680
+ ### Fixed
681
+ * Fixed bug: License codes were being erased when add-ons were deactivated.
682
+ * Fixed bug: Some feed sources could not be set to active from the table controls.
683
+ * Fixed bug: str_pos errors appear when custom feed url is left empty.
684
+ * Fixed bug: Some options were producing undefined index errors.
685
+
686
+ ## [3.7] - 2013-11-28
687
+ ### Added
688
+ * New Feature: State system - Feed sources can be activated/paused.
689
+ * New Feature: State system - Feed sources can be set to activate or pause themselves at a specific date and time.
690
+
691
+ ### Changed
692
+ * Enhanced: Added compatibility with nested outline elements in OPML files.
693
+ * Enhanced: Admin menu icon image will change into a Dashicon, when WordPress is updated to 3.8 (Decemeber 2013).
694
+
695
+ ### Fixed
696
+ * Fixed bug: Custom Post types were breaking when the plugin is activated.
697
+
698
+ ## [3.6.1] - 2013-11-17
699
+ ### Fixed
700
+ * Fixed bug: Missing 2nd argument for wprss_shorten_title()
701
+
702
+ ## [3.6] - 2013-11-16
703
+ ### Added
704
+ * New Feature: Can set the maximum length for titles. Long titles get trimmed.
705
+
706
+ ### Fixed
707
+ * Fixed bug: Fixed errors with undefined indexes for unchecked checkboxes in the settings page.
708
+ * Fixed bug: Pagination on front static page was not working.
709
+
710
+ ## [3.5.2] - 2013-11-11
711
+ ### Fixed
712
+ * Fixed bug: Invalid feed source url was producing an Undefined method notice.
713
+ * Fixed bug: Custom feed was producing a 404 page.
714
+ * Fixed bug: Presstrends code firing on admin_init, opt-in implementation coming soon
715
+
716
+ ## [3.5.1] - 2013-11-09
717
+ ### Changed
718
+ * Enhanced: Increased compatibility with RSS sources.
719
+
720
+ ### Fixed
721
+ * Fixed bug: Pagination not working on home page
722
+
723
+ ## [3.5] - 2013-11-6
724
+ ### Added
725
+ * New Feature: Can delete feed items for a particular source
726
+
727
+ ### Changed
728
+ * Enhanced: the 'Fetch feed items' row action for feed sources resets itself after 3.5 seconds.
729
+ * Enhanced: The feed image is saved for each url.
730
+
731
+ ### Fixed
732
+ * Fixed bug: Link to source now links to correct url. Previously linked to site's feed.
733
+
734
+ ## [3.4.6] - 2013-11-1
735
+ ### Changed
736
+ * Enhanced: Added more hooks to debugging page for the Feed to Post add-on.
737
+
738
+ ### Fixed
739
+ * Fixed bug: Uninitialized loop index
740
+
741
+ ## [3.4.5] - 2013-10-30
742
+ ### Fixed
743
+ * Bug Fix: Feed items were not being imported while the WPML plugin was active.
744
+
745
+ ## [3.4.4] - 2013-10-26
746
+ ### Added
747
+ * New feature: Pagination
748
+ * New feature: First implementation of editor button for easy shortcode creation
749
+
750
+ ### Changed
751
+ * Enhanced: Feed items and sources don't show up in link manager
752
+ * Enhanced: Included Presstrends code for plugin usage monitoring
753
+
754
+ ## [3.4.3] - 2013-10-20
755
+ ### Added
756
+ * Added suppress_filters in feed-display.php to prevent a user reported error
757
+
758
+ ### Fixed
759
+ * Removed anonymous functions for backwards PHP compatibility
760
+ * Missing <li> in certain feed displays
761
+
762
+ ## [3.4.2] - 2013-9-19
763
+ ### Changed
764
+ * Enhanced: Added some hooks for Feed to Post compatibility
765
+ * Enhanced: Moved date settings to a more appropriate location
766
+
767
+ ## [3.4.1] - 2013-9-16
768
+ ### Fixed
769
+ * Fixed Bug: Minor issue with options page - PHP notice
770
+
771
+ ## [3.4] - 2013-9-15
772
+ ### Added
773
+ * New Feature: Saving/Updating a feed source triggers an update for that source's feed items.
774
+ * New Feature: Option to change Youtube, Vimeo and Dailymotion feed item URLs to embedded video players URLs
775
+ * New Feature: Facebook Pages URLs are automatically detected and changed into Atom Feed URLs using FB's Graph
776
+
777
+ ### Changed
778
+ * Enhanced: Updated jQuery Colorbox library to 1.4.29
779
+
780
+ ### Fixed
781
+ * Fixed Bug: Some settings did not have a default value set, and were throwing an 'Undefined Index' error
782
+ * Fixed Bug: Admin notices do not disappear immediately when dismissed.
783
+
784
+ ## [3.3.3] - 2013-09-08
785
+ ### Fixed
786
+ * Fixed bug: Better function handling on uninstall, should remove uninstall issues
787
+
788
+ ## [3.3.2] - 2013-09-07
789
+ ### Added
790
+ * New feature: Added exclude parameter to shortcode
791
+
792
+ ### Changed
793
+ * Enhanced: Added metabox links to documentation and add-ons
794
+
795
+ ### Fixed
796
+ * Fixed bug: Custom feed linking to post on user site rather than original source
797
+ * Fixed bug: Custom post types issues when activitating the plugin
798
+
799
+ ## [3.3.1] - 2013-08-09
800
+ ### Fixed
801
+ * Fixed Bug: Roles and Capabilities file had not been included
802
+ * Fixed Bug: Error on install, function not found
803
+
804
+ ## [3.3] - 2013-08-08
805
+ ### Added
806
+ * New feature: OPML importer
807
+ * New feature: Feed item limits for individual Feed Sources
808
+ * New feature: Custom feed URL
809
+ * New feature: Feed limit on custom feed
810
+ * New feature: New 'Fetch feed items' action for each Feed Source in listing display
811
+ * New feature: Option to enable link to source
812
+
813
+ ### Changed
814
+ * Enhanced: Date strings now change according to locale being used (i.e. compatible with WPML)
815
+ * Enhanced: Capabilities implemented
816
+ * Enhanced: Feed Sources row action 'View' removed
817
+
818
+ ### Fixed
819
+ * Fixed Bug: Proxy feed URLs resulting in the permalink: example.com/url
820
+
821
+ ## [3.2] - 2013-07-06
822
+ ### Fixed
823
+ * New feature: Parameter to limit number of feeds displayed
824
+ * New feature: Paramter to limit feeds displayed to particular sources (via ID)
825
+
826
+ ### Changed
827
+ * Enhanced: Better feed import handling to handle large number of feed sources
828
+
829
+ ## [3.1.1] - 2013-06-06
830
+ ### Fixed
831
+ * Fixed bug: Incompatibility with some other plugins due to function missing namespace
832
+
833
+ ## [3.1] - 2013-06-06
834
+ ### Added
835
+ * New feature: Option to set the number of feed items imported from every feed (default 5)
836
+ * New feature: Import and Export aggregator settings and feed sources
837
+ * New feature: Debugging page allowing manual feed refresh and feed reset
838
+
839
+ ### Changed
840
+ * Enhanced: Faster handling of restoring sources from trash when feed limit is 0
841
+
842
+ ### Fixed
843
+ * Fixed bug: Limiter on number of overall feeds stored not working
844
+ * Fixed bug: Incompatibility issue with Foobox plugin fixed
845
+ * Fixed bug: Duplicate feeds sometimes imported
846
+
847
+ ## [3.0] - 2013-03-16
848
+ ### Added
849
+ * New feature: Option to select cron frequency
850
+ * New feature: Code extensibility added to be compatible with add-ons
851
+ * New feature: Option to set a limit to the number of feeds stored (previously 50, hard coded)
852
+ * New feature: Option to define the format of the date shown below each feed item
853
+ * New feature: Option to show or hide source of feed item
854
+ * New feature: Option to show or hide publish date of feed item
855
+ * New feature: Option to set text preceding publish date
856
+ * New feature: Option to set text preceding source of feed item
857
+ * New feature: Option to link title or not
858
+ * New feature: Limit of 5 items imported for each source instead of 10
859
+
860
+ ### Changed
861
+ * Requires: WordPress 3.3
862
+ * Enhanced: Performance improvement when publishing * New feeds in admin
863
+ * Enhanced: Query tuning for better performance
864
+ * Enhanced: Major code rewrite, refactoring and inclusion of hooks
865
+ * Enhanced: Updated Colorbox to v1.4.1
866
+ * Enhanced: Better security implementations
867
+ * Enhanced: Better feed preview display
868
+
869
+ ### Fixed
870
+ * Fixed bug: Deletion of items upon source deletion not working properly
871
+
872
+ ## [2.2.3] - 2012-11-01
873
+ ### Fixed
874
+ * Tab navigation preventing typing in input boxes
875
+ * Feeds showing up in internal linking pop up
876
+
877
+ ## [2.2.2] - 2012-10-30
878
+ ### Changed
879
+ * Feeds showing up in site search results
880
+ * Enhanced: Better tab button navigation when adding a new feed
881
+ * Enhanced: Better guidance when a feed URL is invalid
882
+
883
+ ## [2.2.1] - 2012-10-17
884
+ ### Fixed
885
+ * Fixed bug: wprss_feed_source_order assumes everyone is an admin
886
+
887
+ ## [2.2] - 2012-10-01
888
+ ### Added
889
+ * Italian translation added
890
+
891
+ ### Changed
892
+ * Feed source order changed to alphabetical
893
+
894
+ ### Fixed
895
+ * Fixed bug - repeated entries when having a non-valid feed source
896
+ * Fixed bug - all imported feeds deleted upon trashing a single feed source
897
+
898
+ ## [2.1] - 2012-09-27* Now localised for translations
899
+ * Fixed bug with date string
900
+ * Fixed $link_before and $link_after, now working
901
+ * Added backwards compatibility for wp_rss_aggregator() function
902
+
903
+ ## [2.0] - 2012-09-21
904
+ ### Added
905
+ * Limit of 15 items max imported for each source
906
+ * Added install and upgrade functions
907
+ * Added DB version setting
908
+ * Feeds now fetched via Cron
909
+ * Cron job to delete old feed items, keeps max of 50 items in DB
910
+ * Ability to limit total number of feeds displayed
911
+ * Feed source list sortable ascending or descending by name
912
+
913
+ ### Changed
914
+ * Now requires WordPress 3.2
915
+ * Bulk of code rewritten and refactored
916
+ * Updated colorbox to v1.3.20.1
917
+ * Feed sources now stored as Custom Post Types
918
+
919
+ ### Removed
920
+ * Removed days subsections in feed display
921
+
922
+ ### Fixed
923
+ * Fixed issue of page content displaying incorrectly after feeds
924
+
925
+ ## [1.1] - 2012-08-13
926
+ ### Added
927
+ * Added top level menu
928
+ * Added settings section
929
+ * Ability to open in lightbox, new window or default browser behaviour
930
+ * Ability to set links as follow or no follow
931
+
932
+ ### Changed
933
+ * Now requires WordPress 3.0
934
+ * More flexible fetching of images directory
935
+ * Code refactoring
936
+ * Changes in file and folder structure
937
+ * Using constants for oftenly used locations
938
+
939
+ ## [1.0] - 2012-01-06
940
+ * Initial release.
css/admin-editor.css CHANGED
@@ -6,7 +6,7 @@
6
  left: 0;
7
  right: 0;
8
  bottom: 0;
9
- background: rgba(0,0,0,0.6);
10
  z-index: 1000;
11
  }
12
 
@@ -17,47 +17,51 @@
17
  left: 0;
18
  right: 0;
19
  width: 500px;
20
- height: 450px;
21
  margin: auto;
 
22
  }
23
 
24
  .wprss-dialog-header {
25
- background: #464646;
26
  position: absolute;
27
  top: 0;
28
  left: 0;
29
  right: 0;
30
- height: 30px;
 
 
 
 
 
31
  }
32
 
33
  .wprss-dialog-header h1 {
34
- color: #ddd;
35
- text-shadow: rgb(68, 68, 68) 0px -1px 0px;
36
  font-size: 16px;
37
- font-weight: normal;
38
- margin: 7px 0 15px 6px;
 
39
  }
40
 
41
  .wprss-dialog-header .close-btn {
42
  position: absolute;
43
- top: 4px;
44
- right: 10px;
45
- color: #ccc;
46
- font-size: 18px;
47
- font-weight: bold;
48
- padding: 0px 6px 2px;
49
- border-radius: 20px;
50
  cursor: pointer;
 
 
 
51
  }
52
  .wprss-dialog-header .close-btn:hover {
53
- background: white;
54
- color: black;
55
  }
56
 
57
-
58
  .wprss-dialog-inside {
59
  position: absolute;
60
- top: 30px;
61
  bottom: 0;
62
  left: 0;
63
  right: 0;
@@ -76,19 +80,25 @@
76
  -moz-box-sizing: border-box;
77
  }
78
 
79
- .wprss-dialog-inside table tr td:first-child {
80
- font-weight: bold;
81
  }
82
 
 
 
 
 
83
 
84
- #wprss-dialog-sources-container {
85
- margin-top: 10px;
 
86
  }
87
 
88
  #wprss-dialog-feed-source-list,
89
  #wprss-dialog-exclude-list {
90
  min-width: 100px;
91
  min-height: 100px;
 
92
  }
93
 
94
  #wprss-dialog-exclude-row td p:first-child {
@@ -103,4 +113,21 @@
103
  font-size: 0.85em;
104
  text-decoration: none;
105
  margin-left: 3px;
106
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  left: 0;
7
  right: 0;
8
  bottom: 0;
9
+ background: rgba(120, 120, 120, 0.36);
10
  z-index: 1000;
11
  }
12
 
17
  left: 0;
18
  right: 0;
19
  width: 500px;
20
+ height: 660px;
21
  margin: auto;
22
+ border: 0;
23
  }
24
 
25
  .wprss-dialog-header {
26
+ background: #ff792b;
27
  position: absolute;
28
  top: 0;
29
  left: 0;
30
  right: 0;
31
+ padding: 10px 3px;
32
+ }
33
+
34
+ .wprss-dialog-header,
35
+ .wprss-dialog-header > * {
36
+ line-height: 1.5em;
37
  }
38
 
39
  .wprss-dialog-header h1 {
40
+ color: #fff;
 
41
  font-size: 16px;
42
+ margin: 0 15px 0;
43
+ line-height: 1.5em;
44
+ display: inline-block;
45
  }
46
 
47
  .wprss-dialog-header .close-btn {
48
  position: absolute;
49
+ top: 8px;
50
+ right: 15px;
51
+ color: #fff;
52
+ font-size: 12px;
 
 
 
53
  cursor: pointer;
54
+ line-height: 2em;
55
+ padding: 3px 8px;
56
+ border-radius: 3px;
57
  }
58
  .wprss-dialog-header .close-btn:hover {
59
+ background: rgba(173, 83, 28, 0.49);
 
60
  }
61
 
 
62
  .wprss-dialog-inside {
63
  position: absolute;
64
+ top: 44px;
65
  bottom: 0;
66
  left: 0;
67
  right: 0;
80
  -moz-box-sizing: border-box;
81
  }
82
 
83
+ .wprss-dialog-inside table p {
84
+ margin: 0 0 5px;
85
  }
86
 
87
+ .wprss-dialog-inside table tr td {
88
+ vertical-align: baseline;
89
+ line-height: 1.5em;
90
+ }
91
 
92
+ .wprss-dialog-inside table tr td:first-child {
93
+ min-width: 85px;
94
+ font-weight: bold;
95
  }
96
 
97
  #wprss-dialog-feed-source-list,
98
  #wprss-dialog-exclude-list {
99
  min-width: 100px;
100
  min-height: 100px;
101
+ max-height: 100px;
102
  }
103
 
104
  #wprss-dialog-exclude-row td p:first-child {
113
  font-size: 0.85em;
114
  text-decoration: none;
115
  margin-left: 3px;
116
+ }
117
+
118
+ #wprss-dialog-submit {
119
+ padding: 7px 14px;
120
+ color: #ff792b;
121
+ font-weight: bold;
122
+ background: #fff;
123
+ border: 3px solid #ff792b;
124
+ border-radius: 4px;
125
+ box-shadow: 0 0 transparent;
126
+ outline: 0;
127
+ cursor: pointer;
128
+ transition: 0.15s;
129
+ }
130
+ #wprss-dialog-submit:hover {
131
+ background: #ff792b;
132
+ color: #fff;
133
+ }
css/admin-general-styles.css CHANGED
@@ -12,3 +12,13 @@
12
  margin-left: 5px;
13
  font-size: 12pt;
14
  }
 
 
 
 
 
 
 
 
 
 
12
  margin-left: 5px;
13
  font-size: 12pt;
14
  }
15
+
16
+ table.plugins tbody tr[data-slug="wp-rss-aggregator-excerpts-and-thumbnails"] > td,
17
+ table.plugins tbody tr[data-slug="wp-rss-aggregator-excerpts-and-thumbnails"] > th {
18
+ box-shadow: none !important;
19
+ }
20
+
21
+ table.plugins tbody tr.wprss-et-plugin-row-msg > td > div > p::before {
22
+ content: "\f348";
23
+ color: #00a0d2;
24
+ }
css/admin-styles.css CHANGED
@@ -270,6 +270,148 @@ form.wprss-error-log-action {
270
  form.wprss-error-log-action input[type="submit"]:active {
271
  vertical-align: baseline;
272
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
273
 
274
  @media screen and (min-width: 782px) {
275
  #custom_feed_title {
@@ -728,3 +870,16 @@ body.post-type-wprss_blacklist .alignleft.actions.bulkactions {
728
  .post-type-wprss_feed_item .page-title-action {
729
  display: none
730
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
270
  form.wprss-error-log-action input[type="submit"]:active {
271
  vertical-align: baseline;
272
  }
273
+ /* The debug log root element */
274
+ div.wpra-log {
275
+ display: none;
276
+ }
277
+
278
+ /* The "Filters" label */
279
+ div.wpra-log > p > strong:first-child {
280
+ text-decoration: underline;
281
+ margin-right: 10px;
282
+ }
283
+
284
+ /* The debug log filters separator */
285
+ div.wpra-log .wpra-toggle-logs:not(:last-child)::after {
286
+ content: ' | ';
287
+ color: #3c3c3c;
288
+ pointer-events: none;
289
+ }
290
+ /* The debug log filters */
291
+ div.wpra-log .wpra-toggle-logs a {
292
+ text-decoration: none;
293
+ outline: none;
294
+ box-shadow: 0 0 transparent;
295
+ }
296
+ /* The debug log filters when not selected */
297
+ div.wpra-log .wpra-toggle-logs:not(.wpra-selected):not(.wpra-log-filter-disabled) a {
298
+ color: #626262;
299
+ }
300
+ /* The debug log filters when selected */
301
+ div.wpra-log .wpra-toggle-logs.wpra-selected:not(.wpra-log-filter-disabled) a {
302
+ font-weight: bold;
303
+ }
304
+
305
+ /* The debug log "error" filter text color when there are errors */
306
+ div.wpra-log .wpra-toggle-logs.wpra-selected[data-level="error"]:not(.wpra-log-filter-disabled) a {
307
+ color: #d40000;
308
+ }
309
+ /* The debug log "warning" filter text color when there are warnings */
310
+ div.wpra-log .wpra-toggle-logs.wpra-selected[data-level="warning"]:not(.wpra-log-filter-disabled) a {
311
+ color: #d45500;
312
+ }
313
+ /* The debug log "notice" filter text color when there are notices */
314
+ div.wpra-log .wpra-toggle-logs.wpra-selected[data-level="notice"]:not(.wpra-log-filter-disabled) a {
315
+ color: #d48a00;
316
+ }
317
+ /* The debug log "info" filter text color when there are info logs */
318
+ div.wpra-log .wpra-toggle-logs.wpra-selected[data-level="info"]:not(.wpra-log-filter-disabled) a {
319
+ color: #009cd6;
320
+ }
321
+ /* The debug log "debug" filter text color when there are debug logs */
322
+ div.wpra-log .wpra-toggle-logs.wpra-selected[data-level="debug"]:not(.wpra-log-filter-disabled) a {
323
+ color: #8242d4;
324
+ }
325
+
326
+ /* Disabled debug log filters */
327
+ div.wpra-log .wpra-toggle-logs.wpra-log-filter-disabled a {
328
+ color: #8b8b8b !important;
329
+ font-style: italic;
330
+ text-decoration: none;
331
+ cursor: not-allowed;
332
+ }
333
+
334
+ /* The debug log */
335
+ div.wpra-log-container {
336
+ max-height: 600px;
337
+ border: 1px solid #d1d1d1;
338
+ padding: 5px;
339
+ overflow: auto;
340
+ background: #222833;
341
+ }
342
+
343
+ /* The debug log & empty log notice */
344
+ div.wpra-log-container,
345
+ .notice.wpra-empty-log-notice {
346
+ display: block;
347
+ width: 800px;
348
+ box-sizing: border-box;
349
+ }
350
+
351
+ /* The log table */
352
+ div.wpra-log-container > table {
353
+ font-family: monospace;
354
+ min-width: 100%;
355
+ border: 0;
356
+ border-collapse: collapse;
357
+ }
358
+ /* Log table: row formatting */
359
+ div.wpra-log-container > table > tbody > tr {
360
+ }
361
+ /* Log table: cell formatting */
362
+ div.wpra-log-container > table > tbody > tr > td {
363
+ color: #cbcdda;
364
+ vertical-align: baseline;
365
+ padding: 1px 10px;
366
+ border-bottom: 1px solid transparent;
367
+ }
368
+
369
+ /* Log table: row on hover */
370
+ div.wpra-log-container > table > tbody > tr:hover {
371
+ background: rgba(200, 200, 200, 0.1);
372
+ }
373
+
374
+ /* Log table: date and level cells do not wrap */
375
+ div.wpra-log-container > table > tbody > tr > td.wpra-log-date,
376
+ div.wpra-log-container > table > tbody > tr > td.wpra-log-level {
377
+ white-space: nowrap;
378
+ overflow: hidden;
379
+ }
380
+ div.wpra-log-container > table > tbody > tr > td.wpra-log-date {
381
+ width: 150px;
382
+ }
383
+ div.wpra-log-container > table > tbody > tr > td.wpra-log-level {
384
+ text-align: center;
385
+ width: 60px;
386
+ }
387
+ div.wpra-log-container > table > tbody > tr > td.wpra-log-feed {
388
+ width: 80px;
389
+ }
390
+
391
+ /* Log table: styling for DEBUG log messages */
392
+ div.wpra-log-container > table > tbody > tr.wpra-log-debug > td:not(.wpra-log-date) {
393
+ color: #b695e6;
394
+ }
395
+ /* Log table: styling for INFO log messages */
396
+ div.wpra-log-container > table > tbody > tr.wpra-log-info > td:not(.wpra-log-date) {
397
+ color: #38eaff;
398
+ }
399
+ /* Log table: styling for NOTICE log messages */
400
+ div.wpra-log-container > table > tbody > tr.wpra-log-notice > td:not(.wpra-log-date) {
401
+ color: #ffea00;
402
+ }
403
+ /* Log table: styling for WARNING log messages */
404
+ div.wpra-log-container > table > tbody > tr.wpra-log-warning > td {
405
+ color: #000;
406
+ background-color: #ffea00;
407
+ font-weight: bold;
408
+ }
409
+ /* Log table: styling for ERROR log messages */
410
+ div.wpra-log-container > table > tbody > tr.wpra-log-error > td {
411
+ color: white;
412
+ background-color: #b90000;
413
+ font-weight: bold;
414
+ }
415
 
416
  @media screen and (min-width: 782px) {
417
  #custom_feed_title {
870
  .post-type-wprss_feed_item .page-title-action {
871
  display: none
872
  }
873
+
874
+ /* Changelog styles */
875
+ .wpra-changelog-container h2 {
876
+ font-size: 1.4em;
877
+ }
878
+ .wpra-changelog-container h3 {
879
+ font-weight: normal;
880
+ font-size: 1.2em;
881
+ }
882
+ .wpra-changelog-container ul {
883
+ list-style: disc;
884
+ list-style-position: inside;
885
+ }
css/build/common.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .mobile-collapsed{display:inherit}.mobile-only{display:none!important}@media (max-width:782px){.mobile-only{display:inherit!important}.mobile-collapsed{display:none!important}}.wpra-notice-block{background-color:#fff;box-shadow:0 1px 1px 0 rgba(0,0,0,.1);padding:12px 16px;margin-top:.5rem;margin-bottom:.15rem}.wpra-notice-block.postbox{margin-top:0;margin-bottom:20px;box-shadow:0}.wpra-notice-block.postbox .wpra-notice-block__body{font-size:14px;opacity:.8}.wpra-notice-block__title{font-size:22px;padding:.5rem 0 1rem;max-width:65rem}.wpra-notice-block__body{line-height:1.5;font-size:16px;opacity:.7;max-width:65rem}.wpra-notice-block__buttons{padding:1rem 0 .5rem}.wpra-notice-block__buttons .button{height:34px;line-height:32px;padding:0 16px 2px}.wpra-notice-block__buttons .button .dashicons{font-size:16px;vertical-align:middle;opacity:.75;margin-left:2px}.wpra-notice-block__buttons .button-clear{margin-left:8px;font-weight:500;color:#0085ba}.wpra-notice-block__buttons .button-clear,.wpra-notice-block__buttons .button-clear:active,.wpra-notice-block__buttons .button-clear:focus,.wpra-notice-block__buttons .button-clear:hover{border:none;background:none;box-shadow:none}.wpra-info-box{background:#daf4ff;padding:8px 12px;border-radius:3px;display:flex}.wpra-info-box__icon{opacity:.4;flex-shrink:0}.wpra-info-box__text{flex-grow:1;padding-left:8px}
css/build/gutenberg-block.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .wpra-gutenberg-block .wpra-item a,[data-type="wpra-shortcode/wpra-shortcode"] .wpra-item a{pointer-events:none!important}.nav-links:after{display:block;content:"";clear:both}
css/{intro.min.css → build/intro.min.css} RENAMED
File without changes
css/build/pagination.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .wpra-loading{animation:pulse 1s infinite ease-in-out;pointer-events:none}@keyframes pulse{0%{opacity:.25}50%{opacity:.6}to{opacity:.25}}
css/{plugins.min.css → build/plugins.min.css} RENAMED
File without changes
css/build/templates.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .mobile-collapsed{display:inherit}.mobile-only{display:none!important}@media (max-width:782px){.mobile-only{display:inherit!important}.mobile-collapsed{display:none!important}}.wpra-bottom-panel{position:sticky;bottom:0;z-index:9;background-color:#fffce9;padding:1rem;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04)}.wpra-bottom-panel__title{font-size:1rem;font-weight:500;padding-bottom:8px}a.disabled{color:#9c9c9c;pointer-events:none}[v-cloak] .vcloak--visible{display:block}[v-cloak] .vcloak--hidden{display:none}.vcloak--visible{min-height:60px;display:none}.loading-container{min-height:5rem;position:relative}.loading-container:before{display:block;content:"";position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);box-sizing:border-box;height:40px;width:40px;border:0 solid #d0d0d0;border-radius:50%;box-shadow:inset 0 -12px 0 16px #d0d0d0;animation:rotate 1s infinite linear;z-index:3}.loading-container:after{display:block;content:"";position:absolute;z-index:2;background-color:hsla(0,0%,95%,.5);width:100%;height:100%;left:0;top:0}.loading-container--white:after{background-color:#fff}.loading-button{pointer-events:none;position:relative}.loading-button:before{display:block;content:"";position:absolute;left:calc(50% - 8px);top:calc(50% - 8px);box-sizing:border-box;height:16px;width:16px;border:0 solid #fff;border-radius:50%;box-shadow:inset 0 -4px 0 6px #fff;animation:rotate 1s infinite linear;z-index:3}.loading-button:after{display:block;content:"";position:absolute;z-index:2;background-color:inherit;width:100%;height:100%;left:0;top:0}.button-default.loading-button:before{box-shadow:inset 0 -4px 0 6px #6f6f6f}.loading-inline{display:inline-block;pointer-events:none;position:relative}.loading-inline:before{display:block;content:"";position:absolute;left:calc(50% + 1px);top:calc(50% - 11px);box-sizing:border-box;height:14px;width:14px;border:0 solid #d0d0d0;border-radius:50%;box-shadow:inset 0 -3px 0 5px #d0d0d0;animation:rotate 1s infinite linear;z-index:3}.loading-inline:after{display:block;content:"";position:absolute;z-index:2;background-color:inherit;width:100%;height:100%;left:0;top:0}@keyframes rotate{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.table-loading{position:relative}.table-loading .table-loader-wrap{position:absolute;width:100%;height:100%;z-index:9}.table-loading .table-loader-wrap .table-loader-center{position:absolute;top:50%;transform:translateY(-50%);width:100%}.table-loading .tablenav,.table-loading .wp-list-table{opacity:.4}.table-loader{font-size:10px;margin:50px auto;text-indent:-9999em;width:11em;height:11em;border-radius:50%;background:#fff;background:-moz-linear-gradient(left,#fff 10%,hsla(0,0%,100%,0) 42%);background:-webkit-linear-gradient(left,#fff 10%,hsla(0,0%,100%,0) 42%);background:-o-linear-gradient(left,#fff 10%,hsla(0,0%,100%,0) 42%);background:-ms-linear-gradient(left,#fff 10%,hsla(0,0%,100%,0) 42%);background:linear-gradient(90deg,#fff 10%,hsla(0,0%,100%,0) 42%);position:relative;-webkit-animation:tableLoading 1s infinite linear;animation:tableLoading 1s infinite linear;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0)}.table-loader:before{width:50%;height:50%;background:#fff;border-radius:100% 0 0 0}.table-loader:after,.table-loader:before{position:absolute;top:0;left:0;content:""}.table-loader:after{background:#f4f4f4;width:75%;height:75%;border-radius:50%;margin:auto;bottom:0;right:0}@-webkit-keyframes tableLoading{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes tableLoading{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.toasted-container.top-center{top:44px!important}.toasted{background:#23282d!important;color:#e5e5e5!important;font-size:inherit!important;font-weight:inherit!important;justify-content:start!important;border-left:none!important}.toasted.error .dashicons{color:#ff7781}.toasted .dashicons{margin-right:12px;margin-left:-8px;display:inline-block;opacity:.65}.flex-row{display:flex}.flex-col{box-sizing:border-box;padding:0 10px;flex:1 1 0}.flex-col:first-child{padding-left:0}.flex-col:last-child{padding-right:0}.wpra-postbox .hndle{cursor:unset!important}.wpra-shortcode-copy{font-size:13px;background-color:#fff;margin-left:auto;padding:9px 14px;box-shadow:0 1px 1px 0 rgba(0,0,0,.1);border-left:4px solid #0085ba;display:flex;align-items:center}@media (max-width:782px){.wpra-shortcode-copy{display:block}}.wpra-shortcode-copy__icon{padding-left:16px}@media (max-width:782px){.wpra-shortcode-copy__icon{padding-left:0;margin-top:1rem}}.page-title{display:flex;align-items:center;padding:9px 0 4px}@media (max-width:782px){.page-title{display:block}}.page-title a:focus{text-decoration:none}.page-title h1{margin-left:6px;padding:0}.back-button{opacity:.75;text-decoration:none;font-size:20px;display:flex;align-items:center;padding-right:10px;margin-right:4px;border-right:1px solid #b4b4b4}@media (max-width:782px){.back-button{border-right:none;margin-bottom:.5rem}}.back-button .dashicons{margin-right:8px}.tippy-tooltip.light-theme{font-size:13px!important;font-family:unset!important;text-align:left!important}.tippy-tooltip.light-theme hr{border:none;height:1px;background-color:#efefef}.form-input{display:flex;margin:.75rem 0}.form-input--disabled{pointer-events:none}.form-input--disabled .form-input__label :not(.disable-ignored){opacity:.5;user-select:none}.form-input .disable-ignored{opacity:1}.form-input--vertical{flex-direction:column}.form-input--vertical .form-input__label{padding-right:0;padding-bottom:4px;flex-basis:100%}@media (max-width:782px){.form-input{flex-direction:column}.form-input .form-input__label{padding-right:0;padding-bottom:4px;flex-basis:100%}}.form-input:last-child{margin-bottom:0}.form-input__tip{cursor:pointer;display:inline-block;margin-left:4px;opacity:.25;vertical-align:middle}.form-input__tip:hover{opacity:.85}.form-input__tip .dashicons{font-size:18px}.form-input__label{padding-right:12px;flex-basis:260px}.form-input__label-description{padding-top:2px;padding-right:10px;line-height:1.65;opacity:.6;font-size:12px}.form-input__label-description a{pointer-events:auto!important}.form-input__field{flex-grow:1}.form-input__field input:not([type=checkbox]),.form-input__field select,.form-input__field textarea{width:100%;max-width:325px}.built-in{background:#f1f1f1}.built-in [type=checkbox]{display:none}.wpra-preview-link{vertical-align:middle}.wpra-preview-link span.dashicons{opacity:.75;font-size:16px;vertical-align:middle}.wpra-no-cb .column-cb input[type=checkbox]{display:none}@media (max-width:782px){.column.name small{display:block}}@media (max-width:782px){.inside .wpra-preview-link{float:none}}@media (max-width:782px){.wpra-postbox-container{display:flex;flex-direction:column}.wpra-postbox-container .wpra-postbox-last{order:100}}
css/build/update.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .mobile-collapsed{display:inherit}.mobile-only{display:none!important}@media (max-width:782px){.mobile-only{display:inherit!important}.mobile-collapsed{display:none!important}}.wrap--wpra-update{padding-top:1rem}@media (min-width:782px){.wrap--wpra-update{width:100%;max-width:880px;margin:0 auto}}.wpra-text-center{text-align:center}.wpra-updates ul{list-style:disc;padding:0 1.25rem}.wpra-inline-form{display:flex;align-items:baseline}.wpra-inline-form button{margin-right:12px!important}.wpra-inline-form small{font-size:12px;opacity:.75}.wpra-update-head__title{font-size:24px;font-weight:500;padding:1.5rem 0;line-height:1.4}.wpra-update__logo img{width:56px}.button-icon span{vertical-align:baseline;margin-right:-7px;opacity:.6;font-size:16px;top:4px;position:relative}.wpra-links{padding-top:.5rem}.wpra-update-head__link{font-size:1rem;padding-bottom:1.5rem;line-height:1.5}.wpra-update-feature{display:flex;padding:0 18px 12px!important}@media (max-width:782px){.wpra-update-feature{flex-direction:column-reverse}}@media (min-width:782px){.wpra-update-feature__text{padding-right:12px}}.wpra-update-feature__text h3{margin-top:8px}@media (max-width:782px){.wpra-update-feature__text h3{margin-top:16px}}.wpra-update-feature__text p{font-size:14px}.wpra-update-feature__image{flex-shrink:0;width:20rem;overflow:hidden;min-height:336px;position:relative;margin:-11px -18px -23px 0}@media (max-width:782px){.wpra-update-feature__image{flex-shrink:unset;width:unset;min-height:unset;max-height:15rem;margin:-11px -18px 0}}.wpra-update-feature__image img{max-height:29rem;position:absolute}@media (max-width:782px){.wpra-update-feature__image img{max-height:unset;position:unset;max-width:100%}}
css/legacy-styles.css ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ .wprss-feed-meta > span:not(:last-child):after {
2
+ content: " | ";
3
+ }
4
+ .wprss-feed-meta > span {
5
+ font-size: 85%;
6
+ }
css/src/common/index.scss ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ @import "./../mixins";
2
+ @import "notice-block";
3
+ @import "info-box";
css/src/common/info-box.scss ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wpra-info-box {
2
+ background: #daf4ff;
3
+ padding: 8px 12px;
4
+ border-radius: 3px;
5
+ display: flex;
6
+
7
+ &__icon {
8
+ opacity: .4;
9
+ flex-shrink: 0;
10
+ }
11
+
12
+ &__text {
13
+ flex-grow: 1;
14
+ padding-left: 8px;
15
+ }
16
+ }
css/src/common/notice-block.scss ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wpra-notice-block {
2
+ background-color: white;
3
+ box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
4
+ padding: 12px 16px;
5
+ margin-top: .5rem;
6
+ margin-bottom: .15rem;
7
+ //border-left: 4px solid #ff792b;
8
+
9
+ &.postbox {
10
+ margin-top: 0;
11
+ margin-bottom: 20px;
12
+ box-shadow: 0;
13
+
14
+ .wpra-notice-block__body {
15
+ font-size: 14px;
16
+ opacity: .8;
17
+ }
18
+ }
19
+
20
+ &__title {
21
+ font-size: 22px;
22
+ padding: .5rem 0 1rem;
23
+ max-width: 65rem;
24
+ }
25
+
26
+ &__body {
27
+ line-height: 1.5;
28
+ font-size: 16px;
29
+ opacity: .7;
30
+ max-width: 65rem;
31
+ }
32
+
33
+ &__buttons {
34
+ padding: 1rem 0 .5rem;
35
+
36
+ .button {
37
+ height: 34px;
38
+ line-height: 32px;
39
+ padding: 0 16px 2px;
40
+
41
+ .dashicons {
42
+ font-size: 16px;
43
+ vertical-align: middle;
44
+ opacity: .75;
45
+ margin-left: 2px;
46
+ }
47
+
48
+ &-clear {
49
+ margin-left: 8px;
50
+ font-weight: 500;
51
+ color: #0085ba;
52
+ border: none;
53
+ background: none;
54
+ box-shadow: none;
55
+
56
+ &:hover, &:active, &:focus {
57
+ border: none;
58
+ background: none;
59
+ box-shadow: none;
60
+ }
61
+ }
62
+ }
63
+ }
64
+ }
css/src/gutenberg-block/index.scss ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wpra-gutenberg-block, [data-type="wpra-shortcode/wpra-shortcode"] {
2
+ .wpra-item {
3
+ // Prevent clicking on feed item links.
4
+ a {
5
+ pointer-events: none !important;
6
+ }
7
+ }
8
+ }
9
+
10
+ .nav-links::after {
11
+ display: block;
12
+ content: '';
13
+ clear: both;
14
+ }
css/src/mixins.scss ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // grid
2
+ $breakpoint-small: 782px; // 540px
3
+ $breakpoint-med: 60em; // 720px
4
+ $breakpoint-large: 68em; // 960px
5
+
6
+ @mixin breakpoint($point) {
7
+ @if $point == desktop {
8
+ @media (min-width: $breakpoint-large) { @content ; }
9
+ }
10
+ @else if $point == mobile {
11
+ @media (max-width: $breakpoint-small) { @content ; }
12
+ }
13
+ @else if $point == not-mobile {
14
+ @media (min-width: $breakpoint-small) { @content ; }
15
+ }
16
+ }
17
+
18
+ .mobile-collapsed {
19
+ display: inherit;
20
+ }
21
+ .mobile-only {
22
+ display: none !important;
23
+ }
24
+
25
+ @include breakpoint(mobile) {
26
+ .mobile-only {
27
+ display: inherit !important;
28
+ }
29
+ .mobile-collapsed {
30
+ display: none !important;
31
+ }
32
+ }
css/src/pagination/index.scss ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ .wpra-loading {
2
+ animation: pulse 1s infinite ease-in-out;
3
+ pointer-events: none;
4
+ }
5
+
6
+ @keyframes pulse {
7
+ 0% { opacity: .25; }
8
+ 50% { opacity: .6; }
9
+ 100% { opacity: .25; }
10
+ }
css/src/templates/bottom-panel.scss ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wpra-bottom-panel {
2
+ position: sticky;
3
+ bottom: 0;
4
+ z-index: 9;
5
+ background-color: #fffce9;
6
+ padding: 1rem;
7
+ border: 1px solid #e5e5e5;
8
+ box-shadow: 0 1px 1px rgba(0,0,0,0.04);
9
+
10
+ &__title {
11
+ font-size: 1rem;
12
+ font-weight: 500;
13
+ padding-bottom: 8px;
14
+ }
15
+ }
css/src/templates/grid.scss ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .flex {
2
+ &-row {
3
+ display: flex;
4
+ }
5
+ &-col {
6
+ box-sizing: border-box;
7
+ padding: 0 10px;
8
+ flex: 1 1 0;
9
+
10
+ &:first-child {
11
+ padding-left: 0;
12
+ }
13
+
14
+ &:last-child {
15
+ padding-right: 0;
16
+ }
17
+ }
18
+ }
css/src/templates/index.scss ADDED
@@ -0,0 +1,216 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @import "./../mixins";
2
+ @import "bottom-panel";
3
+ @import "loading";
4
+ @import "notifications";
5
+ @import "grid";
6
+
7
+ .wpra-postbox {
8
+ .hndle {
9
+ cursor: unset !important;
10
+ }
11
+ }
12
+
13
+ .wpra-shortcode-copy {
14
+ font-size: 13px;
15
+ background-color: #fff;
16
+ margin-left: auto;
17
+ padding: 9px 14px;
18
+ box-shadow: 0 1px 1px 0 rgba(0,0,0,0.1);
19
+
20
+ border-left: 4px solid #0085ba;
21
+
22
+ display: flex;
23
+ align-items: center;
24
+
25
+ @include breakpoint (mobile) {
26
+ display: block;
27
+ }
28
+
29
+ &__icon {
30
+ padding-left: 16px;
31
+
32
+ @include breakpoint (mobile) {
33
+ padding-left: 0;
34
+ margin-top: 1rem;
35
+ }
36
+ }
37
+ }
38
+
39
+ .page-title {
40
+ display: flex;
41
+ align-items: center;
42
+ padding: 9px 0 4px 0;
43
+
44
+ @include breakpoint (mobile) {
45
+ display: block;
46
+ }
47
+
48
+ a {
49
+ &:focus {
50
+ text-decoration: none;
51
+ }
52
+ }
53
+
54
+ h1 {
55
+ margin-left: 6px;
56
+ padding: 0;
57
+ }
58
+ }
59
+
60
+ .back-button {
61
+ opacity: .75;
62
+ text-decoration: none;
63
+ font-size: 20px;
64
+ display: flex;
65
+ align-items: center;
66
+ padding-right: 10px;
67
+ margin-right: 4px;
68
+ border-right: 1px solid #b4b4b4;
69
+
70
+ @include breakpoint (mobile) {
71
+ border-right: none;
72
+ margin-bottom: .5rem;
73
+ }
74
+
75
+ .dashicons {
76
+ margin-right: 8px;
77
+ }
78
+ }
79
+
80
+ .tippy-tooltip.light-theme {
81
+ font-size: 13px !important;
82
+ font-family: unset !important;
83
+ text-align: left !important;
84
+
85
+ hr {
86
+ border: none;
87
+ height: 1px;
88
+ background-color: #efefef;
89
+ }
90
+ }
91
+
92
+ .form-input {
93
+ display: flex;
94
+ margin: .75rem 0;
95
+ &--disabled {
96
+ pointer-events: none;
97
+ .form-input__label {
98
+ *:not(.disable-ignored) {
99
+ opacity: .5;
100
+ user-select: none;
101
+ }
102
+ }
103
+ }
104
+ .disable-ignored {
105
+ opacity: 1;
106
+ }
107
+ &--vertical {
108
+ flex-direction: column;
109
+ .form-input__label {
110
+ padding-right: 0;
111
+ padding-bottom: 4px;
112
+ flex-basis: 100%;
113
+ }
114
+ }
115
+
116
+ @include breakpoint(mobile) {
117
+ flex-direction: column;
118
+ .form-input__label {
119
+ padding-right: 0;
120
+ padding-bottom: 4px;
121
+ flex-basis: 100%;
122
+ }
123
+ }
124
+
125
+ &:last-child {
126
+ margin-bottom: 0;
127
+ }
128
+ &__tip {
129
+ cursor: pointer;
130
+ display: inline-block;
131
+ margin-left: 4px;
132
+ opacity: .25;
133
+ vertical-align: middle;
134
+ &:hover {
135
+ opacity: .85;
136
+ }
137
+ .dashicons {
138
+ font-size: 18px;
139
+ }
140
+ }
141
+ &__label {
142
+ padding-right: 12px;
143
+ flex-basis: 260px;
144
+ &-description {
145
+ padding-top: 2px;
146
+ padding-right: 10px;
147
+ line-height: 1.65;
148
+ opacity: .6;
149
+ font-size: 12px;
150
+
151
+ a {
152
+ pointer-events: auto !important;
153
+ }
154
+ }
155
+ }
156
+ &__field {
157
+ flex-grow: 1;
158
+ input:not([type="checkbox"]), textarea, select {
159
+ width: 100%;
160
+ max-width: 325px;
161
+ }
162
+ }
163
+ }
164
+
165
+ .built-in {
166
+ background: #f1f1f1;
167
+
168
+ [type="checkbox"] {
169
+ display: none;
170
+ }
171
+ }
172
+
173
+ .wpra-preview-link {
174
+ vertical-align: middle;
175
+
176
+ span.dashicons {
177
+ opacity: .75;
178
+ font-size: 16px;
179
+ vertical-align: middle;
180
+ }
181
+ }
182
+
183
+ .wpra-no-cb {
184
+ .column-cb {
185
+ input[type="checkbox"] {
186
+ display: none;
187
+ }
188
+ }
189
+ }
190
+
191
+ .column.name {
192
+ small {
193
+ @include breakpoint (mobile) {
194
+ display: block;
195
+ }
196
+ }
197
+ }
198
+
199
+ .inside {
200
+ .wpra-preview-link {
201
+ @include breakpoint (mobile) {
202
+ float: none;
203
+ }
204
+ }
205
+ }
206
+
207
+ .wpra-postbox-container {
208
+ @include breakpoint (mobile) {
209
+ display: flex;
210
+ flex-direction: column;
211
+
212
+ .wpra-postbox-last {
213
+ order: 100;
214
+ }
215
+ }
216
+ }
css/src/templates/loading.scss ADDED
@@ -0,0 +1,220 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ a.disabled {
2
+ color: #9c9c9c;
3
+ pointer-events: none;
4
+ }
5
+
6
+ [v-cloak] {
7
+ .vcloak {
8
+ &--visible {
9
+ display: block;
10
+ }
11
+ &--hidden {
12
+ display: none;
13
+ }
14
+ }
15
+ }
16
+ .vcloak {
17
+ &--visible {
18
+ min-height: 60px;
19
+ display: none;
20
+ }
21
+ }
22
+
23
+ .loading-container {
24
+ min-height: 5rem;
25
+ position: relative;
26
+ &:before {
27
+ display: block;
28
+ content: '';
29
+ position: absolute;
30
+ left: calc(50% - 20px);
31
+ top: calc(50% - 20px);
32
+ box-sizing: border-box;
33
+ height: 40px;
34
+ width: 40px;
35
+ border: 0px solid #d0d0d0;
36
+ border-radius: 50%;
37
+ box-shadow: 0 -12px 0 16px #d0d0d0 inset;
38
+ animation: rotate 1s infinite linear;
39
+ z-index: 3;
40
+ }
41
+ &:after {
42
+ display: block;
43
+ content: '';
44
+ position: absolute;
45
+ z-index: 2;
46
+ background-color: rgba(241, 241, 241, 0.5);
47
+ width: 100%;
48
+ height: 100%;
49
+ left: 0;
50
+ top: 0;
51
+ }
52
+ &--white {
53
+ &:after {
54
+ background-color: white;
55
+ }
56
+ }
57
+ }
58
+
59
+
60
+ .loading-button {
61
+ pointer-events: none;
62
+ position: relative;
63
+ &:before {
64
+ display: block;
65
+ content: '';
66
+ position: absolute;
67
+ left: calc(50% - 8px);
68
+ top: calc(50% - 8px);
69
+ box-sizing: border-box;
70
+ height: 16px;
71
+ width: 16px;
72
+ border: 0px solid #fff;
73
+ border-radius: 50%;
74
+ box-shadow: 0 -4px 0 6px #fff inset;
75
+ animation: rotate 1s infinite linear;
76
+ z-index: 3;
77
+ }
78
+ &:after {
79
+ display: block;
80
+ content: '';
81
+ position: absolute;
82
+ z-index: 2;
83
+ background-color: inherit;
84
+ width: 100%;
85
+ height: 100%;
86
+ left: 0;
87
+ top: 0;
88
+ }
89
+ }
90
+
91
+ .button-default {
92
+ &.loading-button:before {
93
+ box-shadow: inset 0 -4px 0 6px #6f6f6f;
94
+ }
95
+ }
96
+
97
+ .loading-inline {
98
+ display: inline-block;
99
+ pointer-events: none;
100
+ position: relative;
101
+ &:before {
102
+ display: block;
103
+ content: '';
104
+ position: absolute;
105
+ left: calc(50% + 1px);
106
+ top: calc(50% - 11px);
107
+ box-sizing: border-box;
108
+ height: 14px;
109
+ width: 14px;
110
+ border: 0px solid #d0d0d0;
111
+ border-radius: 50%;
112
+ box-shadow: 0 -3px 0 5px #d0d0d0 inset;
113
+ animation: rotate 1s infinite linear;
114
+ z-index: 3;
115
+ }
116
+ &:after {
117
+ display: block;
118
+ content: '';
119
+ position: absolute;
120
+ z-index: 2;
121
+ background-color: inherit;
122
+ width: 100%;
123
+ height: 100%;
124
+ left: 0;
125
+ top: 0;
126
+ }
127
+ }
128
+
129
+
130
+ @keyframes rotate {
131
+ 0% {
132
+ transform: rotate(0deg);
133
+ }
134
+ 100% {
135
+ transform: rotate(360deg);
136
+ }
137
+ }
138
+
139
+ .table-loading {
140
+ position: relative;
141
+ }
142
+ .table-loading .table-loader-wrap {
143
+ position: absolute;
144
+ width: 100%;
145
+ height: 100%;
146
+ z-index: 9;
147
+ }
148
+ .table-loading .table-loader-wrap .table-loader-center {
149
+ position: absolute;
150
+ top: 50%;
151
+ transform: translateY(-50%);
152
+ width: 100%;
153
+ }
154
+ .table-loading .wp-list-table,
155
+ .table-loading .tablenav {
156
+ opacity: 0.4;
157
+ }
158
+ .table-loader {
159
+ font-size: 10px;
160
+ margin: 50px auto;
161
+ text-indent: -9999em;
162
+ width: 11em;
163
+ height: 11em;
164
+ border-radius: 50%;
165
+ background: #ffffff;
166
+ background: -moz-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
167
+ background: -webkit-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
168
+ background: -o-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
169
+ background: -ms-linear-gradient(left, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
170
+ background: linear-gradient(to right, #ffffff 10%, rgba(255, 255, 255, 0) 42%);
171
+ position: relative;
172
+ -webkit-animation: tableLoading 1s infinite linear;
173
+ animation: tableLoading 1s infinite linear;
174
+ -webkit-transform: translateZ(0);
175
+ -ms-transform: translateZ(0);
176
+ transform: translateZ(0);
177
+ }
178
+ .table-loader:before {
179
+ width: 50%;
180
+ height: 50%;
181
+ background: #ffffff;
182
+ border-radius: 100% 0 0 0;
183
+ position: absolute;
184
+ top: 0;
185
+ left: 0;
186
+ content: '';
187
+ }
188
+ .table-loader:after {
189
+ background: #f4f4f4;
190
+ width: 75%;
191
+ height: 75%;
192
+ border-radius: 50%;
193
+ content: '';
194
+ margin: auto;
195
+ position: absolute;
196
+ top: 0;
197
+ left: 0;
198
+ bottom: 0;
199
+ right: 0;
200
+ }
201
+ @-webkit-keyframes tableLoading {
202
+ 0% {
203
+ -webkit-transform: rotate(0deg);
204
+ transform: rotate(0deg);
205
+ }
206
+ 100% {
207
+ -webkit-transform: rotate(360deg);
208
+ transform: rotate(360deg);
209
+ }
210
+ }
211
+ @keyframes tableLoading {
212
+ 0% {
213
+ -webkit-transform: rotate(0deg);
214
+ transform: rotate(0deg);
215
+ }
216
+ 100% {
217
+ -webkit-transform: rotate(360deg);
218
+ transform: rotate(360deg);
219
+ }
220
+ }
css/src/templates/notifications.scss ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .toasted-container.top-center {
2
+ top: 44px !important;
3
+ }
4
+
5
+ .toasted {
6
+ background: #23282d !important;
7
+ color: #e5e5e5 !important;
8
+ font-size: inherit !important;
9
+ font-weight: inherit !important;
10
+
11
+ justify-content: start !important;
12
+ border-left: none !important;
13
+
14
+ &.success {}
15
+
16
+ &.error {
17
+ .dashicons {
18
+ color: #ff7781;
19
+ }
20
+ }
21
+
22
+ .dashicons {
23
+ margin-right: 12px;
24
+ margin-left: -8px;
25
+ display: inline-block;
26
+ opacity: .65;
27
+ }
28
+ }
css/src/update/index.scss CHANGED
@@ -1,18 +1,21 @@
1
-
2
 
3
  .wrap--wpra-update {
4
  padding-top: 1rem;
5
- width: 100%;
6
- max-width: 880px;
7
- margin: 0 auto;
 
 
 
8
  }
9
 
10
  .wpra-text-center {
11
  text-align: center;
12
  }
13
 
14
- .wpra-updates {
15
- list-style: unset;
16
  padding: 0 1.25rem;
17
  }
18
 
@@ -35,6 +38,7 @@
35
  font-size: 24px;
36
  font-weight: 500;
37
  padding: 1.5rem 0 1.5rem;
 
38
  }
39
 
40
  .wpra-update__logo img {
@@ -57,27 +61,61 @@
57
  .wpra-update-head__link {
58
  font-size: 1rem;
59
  padding-bottom: 1.5rem;
 
60
  }
61
 
62
  .wpra-update-feature {
63
  display: flex;
 
 
 
 
 
64
  }
65
 
66
- .wpra-update-feature__text h3 {
67
- margin-top: 8px;
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  }
69
 
70
  .wpra-update-feature__image {
71
- width: 55rem;
 
72
  overflow: hidden;
 
73
  position: relative;
74
- margin: -11px -12px -23px 0;
 
 
 
 
 
 
 
 
 
75
 
76
  img {
77
  max-height: 29rem;
78
  position: absolute;
79
- bottom: 12px;
80
- right: 12px;
81
- filter: drop-shadow(0px 2px 3px rgba(0,0,0,.125));
 
 
 
 
82
  }
83
  }
1
+ @import "./../mixins";
2
 
3
  .wrap--wpra-update {
4
  padding-top: 1rem;
5
+
6
+ @include breakpoint(not-mobile) {
7
+ width: 100%;
8
+ max-width: 880px;
9
+ margin: 0 auto;
10
+ }
11
  }
12
 
13
  .wpra-text-center {
14
  text-align: center;
15
  }
16
 
17
+ .wpra-updates ul {
18
+ list-style: disc;
19
  padding: 0 1.25rem;
20
  }
21
 
38
  font-size: 24px;
39
  font-weight: 500;
40
  padding: 1.5rem 0 1.5rem;
41
+ line-height: 1.4;
42
  }
43
 
44
  .wpra-update__logo img {
61
  .wpra-update-head__link {
62
  font-size: 1rem;
63
  padding-bottom: 1.5rem;
64
+ line-height: 1.5;
65
  }
66
 
67
  .wpra-update-feature {
68
  display: flex;
69
+ padding: 0 18px 12px !important;
70
+
71
+ @include breakpoint(mobile) {
72
+ flex-direction: column-reverse;
73
+ }
74
  }
75
 
76
+ .wpra-update-feature__text {
77
+ @include breakpoint(not-mobile) {
78
+ padding-right: 12px;
79
+ }
80
+
81
+ h3 {
82
+ margin-top: 8px;
83
+ @include breakpoint(mobile) {
84
+ margin-top: 16px;
85
+ }
86
+ }
87
+
88
+ p {
89
+ font-size: 14px;
90
+ }
91
  }
92
 
93
  .wpra-update-feature__image {
94
+ flex-shrink: 0;
95
+ width: 20rem;
96
  overflow: hidden;
97
+ min-height: 336px;
98
  position: relative;
99
+ margin: -11px -18px -23px 0;
100
+
101
+ @include breakpoint(mobile) {
102
+ flex-shrink: unset;
103
+ width: unset;
104
+ min-height: unset;
105
+
106
+ max-height: 15rem;
107
+ margin: -11px -18px 0px;
108
+ }
109
 
110
  img {
111
  max-height: 29rem;
112
  position: absolute;
113
+
114
+ @include breakpoint(mobile) {
115
+ max-height: unset;
116
+ position: unset;
117
+
118
+ max-width: 100%;
119
+ }
120
  }
121
  }
css/styles.css DELETED
@@ -1,27 +0,0 @@
1
- li.feed-item { margin-bottom: 10px; }
2
-
3
- .thumbnail-excerpt {
4
- overflow:hidden;
5
- margin-bottom: 5px;
6
- }
7
-
8
- .thumbnail-excerpt img {
9
- max-width:100%; float:left; margin-top: 0.5em; margin-right:10px;
10
- }
11
-
12
- .green {
13
- color: #0BD600;
14
- }
15
-
16
- .nav-links {
17
- overflow: hidden;
18
- margin-bottom: 20px;
19
- }
20
-
21
- div.wprss-feed-meta > span {
22
- font-size: 90%;
23
- clear: both;
24
- }
25
- div.wprss-feed-meta > span:not(:last-child):after {
26
- content: ' | ';
27
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/templates/list/styles.css ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* The container for the list template output */
2
+ div.wpra-list-template {
3
+ font-size: 100%;
4
+ }
5
+
6
+ /* An item in the list */
7
+ div.wpra-list-template ul.wpra-item-list > li.wpra-item {
8
+ margin-bottom: 8px;
9
+ }
10
+
11
+ /* The item's title and link */
12
+ div.wpra-list-template ul.wpra-item-list > li.wpra-item div.wpra-item-link {
13
+ display: inline-block;
14
+ vertical-align: text-top;
15
+ line-height: 1.4em;
16
+ }
17
+
18
+ /* The container for source, date and author */
19
+ div.wpra-list-template ul.wpra-item-list > li.wpra-item > div.wprss-feed-meta {
20
+ line-height: 1.6em;
21
+ }
22
+
23
+ /* Separators between source, date and author */
24
+ div.wpra-list-template ul.wpra-item-list > li.wpra-item > div.wprss-feed-meta > span {
25
+ font-size: 85%;
26
+ clear: both;
27
+ }
28
+ div.wpra-list-template ul.wpra-item-list > li.wpra-item > div.wprss-feed-meta > span:not(:last-child):after {
29
+ content: ' | ';
30
+ }
31
+
32
+ /* Bullet types */
33
+ ul.wpra-item-list {
34
+ list-style: none;
35
+ }
36
+ ul.wpra-item-list:not(.wpra-item-list--bullets) li {
37
+ margin-left: 0;
38
+ }
39
+ ul.wpra-item-list--bullets.wpra-item-list--default {
40
+ list-style-type: disc;
41
+ }
42
+ ul.wpra-item-list--bullets.wpra-item-list--numbers {
43
+ list-style: decimal;
44
+ }
45
+
46
+ /**
47
+ * Old styles
48
+ */
49
+
50
+ .thumbnail-excerpt {
51
+ overflow:hidden;
52
+ margin-bottom: 5px;
53
+ }
54
+
55
+ .thumbnail-excerpt img {
56
+ max-width:100%; float:left; margin-top: 0.5em; margin-right:10px;
57
+ }
58
+
59
+ .green {
60
+ color: #0BD600;
61
+ }
62
+
63
+ .nav-links {
64
+ overflow: hidden;
65
+ margin-bottom: 20px;
66
+ }
67
+
68
+ .nav-links::after {
69
+ display: block;
70
+ content: '';
71
+ clear: both;
72
+ }
73
+
css/update.min.css DELETED
@@ -1 +0,0 @@
1
- .wrap--wpra-update{padding-top:1rem;width:100%;max-width:880px;margin:0 auto}.wpra-text-center{text-align:center}.wpra-updates{list-style:unset;padding:0 1.25rem}.wpra-inline-form{display:flex;align-items:baseline}.wpra-inline-form button{margin-right:12px!important}.wpra-inline-form small{font-size:12px;opacity:.75}.wpra-update-head__title{font-size:24px;font-weight:500;padding:1.5rem 0}.wpra-update__logo img{width:56px}.button-icon span{vertical-align:baseline;margin-right:-7px;opacity:.6;font-size:16px;top:4px;position:relative}.wpra-links{padding-top:.5rem}.wpra-update-head__link{font-size:1rem;padding-bottom:1.5rem}.wpra-update-feature{display:flex}.wpra-update-feature__text h3{margin-top:8px}.wpra-update-feature__image{width:55rem;overflow:hidden;position:relative;margin:-11px -12px -23px 0}.wpra-update-feature__image img{max-height:29rem;position:absolute;bottom:12px;right:12px;filter:drop-shadow(0 2px 3px rgba(0,0,0,.125))}
 
images/wpra-icon-32.png ADDED
Binary file
images/wpra-icon-small.png ADDED
Binary file
includes/Aventura/Wprss/Core/Component/Logger.php CHANGED
@@ -2,125 +2,14 @@
2
 
3
  namespace Aventura\Wprss\Core\Component;
4
 
5
- use Aventura\Wprss\Core;
 
6
 
7
  /**
8
  * A WPRSS-specific implementation, ready to use.
9
  *
10
  * @since 4.8.1
11
  */
12
- class Logger extends Core\Model\LoggerAbstract
13
  {
14
- const WPRA_LEVEL_PREFIX = 'WPRSS_LOG_LEVEL_';
15
-
16
- /**
17
- * {@inheritdoc}
18
- *
19
- * Adds an aditional 'SYSTEM' > 'DEBUG' level conversion.
20
- *
21
- * @since 4.8.1
22
- * @param string $level
23
- * @return int
24
- */
25
- public static function toMonologLevel($level)
26
- {
27
- // For compatibility with WPRA
28
- if (strtoupper($level) === 'SYSTEM') {
29
- $level = 'DEBUG';
30
- }
31
- return parent::toMonologLevel($level);
32
- }
33
-
34
- /**
35
- * {@inheritdoc}
36
- *
37
- * @since 4.8.1
38
- */
39
- public function shouldAddRecord($level, $message, array $context = array())
40
- {
41
- return $this->shouldLogLevel($level);
42
- }
43
-
44
- /**
45
- * {@inheritdoc}
46
- *
47
- * @since 4.8.1
48
- * @see getLevelThreshold()
49
- * @param int|string $level A Monolog level to check.
50
- * @return boolean True if the level should be logged; false otherwise.
51
- */
52
- public function shouldLogLevel($level)
53
- {
54
- $level = static::monologToWpraLevel($level);
55
- $threshold = $this->getLevelThreshold();
56
- if (is_null($threshold)) {
57
- return true;
58
- }
59
-
60
- $threshold = intval($threshold);
61
- if ($threshold === 0) {
62
- return false;
63
- }
64
-
65
- $thisLevelOnly = $threshold > 0;
66
- $threshold = abs($threshold);
67
-
68
- return $thisLevelOnly
69
- ? $level === $threshold
70
- : $level <= $threshold;
71
- }
72
-
73
- /**
74
- * Converts a WPRA level to a Monolog one.
75
- *
76
- * @since 4.8.1
77
- * @param int"string $level A numeric or string representation of a WPRA level.
78
- * If is WPRA-prefixed, i.e. a full constant name, the prefix will be removed.
79
- * @return int The numeric representation of the corresponding Monolog level.
80
- * @throws \InvalidArgumentException If no such Monolog level defined.
81
- */
82
- public static function wpraToMonologLevel($level)
83
- {
84
- $wpraPrefix = static::WPRA_LEVEL_PREFIX;
85
- if (!is_numeric($level) && stripos($level, $wpraPrefix)) {
86
- $level = substr($level, strlen($wpraPrefix));
87
- }
88
-
89
- if (is_string($level) || $level > 50) {
90
- return static::toMonologLevel($level);
91
- }
92
-
93
- $levels = wprss_log_get_levels();
94
- if (!isset($levels[$level])) {
95
- throw new \InvalidArgumentException(sprintf('Monolog Level "%1$s" is not defined', $level));
96
- }
97
-
98
- $level = $levels[$level];
99
- return static::toMonologLevel($level);
100
- }
101
-
102
- /**
103
- * Converts a Monolog level to a WPRA one.
104
- *
105
- * @since 4.8.1
106
- * @param string|int $level A Monolog level's string or numeric representation.
107
- * @return int The WPRA level's numeric representation that corresponds to the specified Monolog one.
108
- * @throws \InvalidArgumentException If no such WPRA level defined.
109
- */
110
- public static function monologToWpraLevel($level)
111
- {
112
- if (is_numeric($level)) {
113
- $level = static::getLevelName($level);
114
- }
115
- if ($level === 'DEBUG') {
116
- $level = 'SYSTEM';
117
- }
118
-
119
- $constName = static::WPRA_LEVEL_PREFIX . $level;
120
- if (!defined($constName)) {
121
- throw new \InvalidArgumentException(sprintf('WPRA Level "%1$s" is not defined', $level));
122
- }
123
-
124
- return constant($constName);
125
- }
126
  }
2
 
3
  namespace Aventura\Wprss\Core\Component;
4
 
5
+ use Psr\Log\LoggerInterface;
6
+ use Psr\Log\NullLogger;
7
 
8
  /**
9
  * A WPRSS-specific implementation, ready to use.
10
  *
11
  * @since 4.8.1
12
  */
13
+ class Logger extends NullLogger implements LoggerInterface
14
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  }
includes/Aventura/Wprss/Core/Licensing/License/Status.php CHANGED
@@ -2,13 +2,10 @@
2
 
3
  namespace Aventura\Wprss\Core\Licensing\License;
4
 
 
 
5
  /**
6
  * Enum-style abstract class for license statuses.
7
  */
8
- abstract class Status {
9
- const VALID = 'valid';
10
- const INVALID = 'invalid';
11
- const INACTIVE = 'inactive';
12
- const SITE_INACTIVE = 'site_inactive';
13
- const EXPIRED = 'expired';
14
  }
2
 
3
  namespace Aventura\Wprss\Core\Licensing\License;
4
 
5
+ use RebelCode\Wpra\Core\Licensing\LicenseStatus;
6
+
7
  /**
8
  * Enum-style abstract class for license statuses.
9
  */
10
+ abstract class Status extends LicenseStatus {
 
 
 
 
 
11
  }
includes/Aventura/Wprss/Core/Model/LoggerAbstract.php DELETED
@@ -1,364 +0,0 @@
1
- <?php
2
-
3
- namespace Aventura\Wprss\Core\Model;
4
-
5
- use Aventura\Wprss\Core;
6
-
7
- /**
8
- * @since 4.8.1
9
- */
10
- abstract class LoggerAbstract extends Core\Plugin\ComponentAbstract implements LoggerInterface
11
- {
12
- /**
13
- * Detailed debug information
14
- *
15
- * @since 4.8.1
16
- */
17
- const DEBUG = 100;
18
-
19
- /**
20
- * Interesting events
21
- *
22
- * Examples: User logs in, SQL logs.
23
- *
24
- * @since 4.8.1
25
- */
26
- const INFO = 200;
27
-
28
- /**
29
- * Uncommon events
30
- *
31
- * @since 4.8.1
32
- */
33
- const NOTICE = 250;
34
-
35
- /**
36
- * Exceptional occurrences that are not errors
37
- *
38
- * Examples: Use of deprecated APIs, poor use of an API,
39
- * undesirable things that are not necessarily wrong.
40
- *
41
- * @since 4.8.1
42
- */
43
- const WARNING = 300;
44
-
45
- /**
46
- * Runtime errors
47
- *
48
- * @since 4.8.1
49
- */
50
- const ERROR = 400;
51
-
52
- /**
53
- * Critical conditions
54
- *
55
- * Example: Application component unavailable, unexpected exception.
56
- *
57
- * @since 4.8.1
58
- */
59
- const CRITICAL = 500;
60
-
61
- /**
62
- * Action must be taken immediately
63
- *
64
- * Example: Entire website down, database unavailable, etc.
65
- * This should trigger the SMS alerts and wake you up.
66
- *
67
- * @since 4.8.1
68
- */
69
- const ALERT = 550;
70
-
71
- /**
72
- * Urgent alert.
73
- *
74
- * @since 4.8.1
75
- */
76
- const EMERGENCY = 600;
77
-
78
- /**
79
- * Logging levels from syslog protocol defined in RFC 5424
80
- *
81
- * @since 4.8.1
82
- * @var array $levels Logging levels
83
- */
84
- protected static $_levels = array(
85
- self::DEBUG => 'DEBUG',
86
- self::INFO => 'INFO',
87
- self::NOTICE => 'NOTICE',
88
- self::WARNING => 'WARNING',
89
- self::ERROR => 'ERROR',
90
- self::CRITICAL => 'CRITICAL',
91
- self::ALERT => 'ALERT',
92
- self::EMERGENCY => 'EMERGENCY',
93
- );
94
-
95
- /**
96
- * @since 4.8.1
97
- */
98
- protected function _construct()
99
- {
100
- if (!$this->hasName()) {
101
- $this->setName('default');
102
- }
103
-
104
- parent::_construct();
105
- }
106
-
107
- /**
108
- * Add a log entry.
109
- *
110
- * @since 4.8.1
111
- * @param int $level The level of the log entry. See {@link LoggerAbstract::getLevels()}.
112
- * @param string $message The message of the entry. Something that can be converted to string.
113
- * @param array $context The context of the entry. Additional data about the environment.
114
- * @return LoggerAbstract This instance.
115
- */
116
- public function addRecord($level, $message, array $context = array())
117
- {
118
- $this->_addRecord($level, $message, $context);
119
- return $this;
120
- }
121
-
122
- /**
123
- * Add a log entry.
124
- *
125
- * @since 4.8.1
126
- * @param int $level The level of the log entry. See {@link LoggerAbstract::getLevels()}.
127
- * @param string $message The message of the entry. Something that can be converted to string.
128
- * @param array $context The context of the entry. Additional data about the environment.
129
- * @return LoggerAbstract This instance.
130
- */
131
- protected function _addRecord($level, $message, array $context = array())
132
- {
133
- if (!$this->shouldAddRecord($level, $message, $context)) {
134
- return false;
135
- }
136
-
137
- $levelName = static::getLevelName($level);
138
- $date = date('Y-m-d H:i:s');
139
- // $format = '[%datetime%] %channel%.%level_name%: %message% %context% %extra%'; // Default format
140
- $format = '[%1$s] %2$s.%3$s (%5$s): '."\n".'%4$s'."\n";
141
- $str = sprintf($format, $date, // Date
142
- $this->getName(), // Channel
143
- $levelName, // Level Name
144
- $message, // Message
145
- isset($context['source']) ? $context['source'] : '' // Context
146
- );
147
-
148
- if (!($path = $this->getLogFilePath())) {
149
- throw $this->exception('Could not add log record: Log path must be set');
150
- }
151
- file_put_contents($path, $str, FILE_APPEND);
152
- }
153
-
154
- /**
155
- * Gets the name of the logging level.
156
- *
157
- * @since 4.8.1
158
- * @param int $level
159
- * @return string
160
- */
161
- public static function getLevelName($level)
162
- {
163
- if (!isset(static::$_levels[$level])) {
164
- throw new \InvalidArgumentException('Level "'.$level.'" is not defined, use one of: '.implode(', ',
165
- array_keys(static::$levels)));
166
- }
167
- return static::$_levels[$level];
168
- }
169
-
170
- /**
171
- * Get the value of the log level.
172
- *
173
- * @since 4.8.1
174
- * @param string $logLevel The string representation of the log level, case-insensitive.
175
- * @return int The numeric representation of the log level.
176
- */
177
- public static function getLogLevelValue($logLevel)
178
- {
179
- $constName = static::WPRSS_LOG_LEVEL_PREFIX.strtoupper($logLevel);
180
- return defined($constName) ? constant($constName) : null;
181
- }
182
-
183
- /**
184
- * All levels available.
185
- *
186
- * @since 4.8.1
187
- * @return array An array of all levels of this logger, where keys are numeric
188
- * level values, and values are their string representations.
189
- */
190
- public static function getLevels()
191
- {
192
- return array_flip(static::$_levels);
193
- }
194
-
195
- /**
196
- * Converts PSR-3 levels to Monolog ones if necessary
197
- *
198
- * @since 4.8.1
199
- * @param string|int Level number (monolog) or name (PSR-3)
200
- * @return int
201
- */
202
- public static function toMonologLevel($level)
203
- {
204
- if (is_string($level)) {
205
-
206
- if (defined(get_called_class().'::'.strtoupper($level))) {
207
- return constant(get_called_class().'::'.strtoupper($level));
208
- }
209
- throw new \InvalidArgumentException('Level "'.$level.'" is not defined, use one of: '.implode(', ',
210
- array_keys(static::$levels)));
211
- }
212
- return $level;
213
- }
214
-
215
- /**
216
- * Adds a log record at an arbitrary level.
217
- *
218
- * This method allows for compatibility with common interfaces.
219
- *
220
- * @since 4.8.1
221
- * @param mixed $level The log level
222
- * @param string $message The log message
223
- * @param array $context The log context
224
- * @return bool Whether the record has been processed
225
- */
226
- public function log($level, $message, array $context = array())
227
- {
228
- $level = static::toMonologLevel($level);
229
- return $this->addRecord($level, (string) $message, $context);
230
- }
231
-
232
- /**
233
- * Adds a log record at the DEBUG level.
234
- *
235
- * This method allows for compatibility with common interfaces.
236
- *
237
- * @since 4.8.1
238
- * @param string $message The log message
239
- * @param array $context The log context
240
- * @return bool Whether the record has been processed
241
- */
242
- public function debug($message, array $context = array())
243
- {
244
- return $this->addRecord(static::DEBUG, (string) $message, $context);
245
- }
246
-
247
- /**
248
- * Adds a log record at the INFO level.
249
- *
250
- * This method allows for compatibility with common interfaces.
251
- *
252
- * @since 4.8.1
253
- * @param string $message The log message
254
- * @param array $context The log context
255
- * @return bool Whether the record has been processed
256
- */
257
- public function info($message, array $context = array())
258
- {
259
- return $this->addRecord(static::INFO, (string) $message, $context);
260
- }
261
-
262
- /**
263
- * Adds a log record at the NOTICE level.
264
- *
265
- * This method allows for compatibility with common interfaces.
266
- *
267
- * @since 4.8.1
268
- * @param string $message The log message
269
- * @param array $context The log context
270
- * @return bool Whether the record has been processed
271
- */
272
- public function notice($message, array $context = array())
273
- {
274
- return $this->addRecord(static::NOTICE, (string) $message, $context);
275
- }
276
-
277
- /**
278
- * Adds a log record at the WARNING level.
279
- *
280
- * This method allows for compatibility with common interfaces.
281
- *
282
- * @since 4.8.1
283
- * @param string $message The log message
284
- * @param array $context The log context
285
- * @return bool Whether the record has been processed
286
- */
287
- public function warning($message, array $context = array())
288
- {
289
- return $this->addRecord(static::WARNING, (string) $message, $context);
290
- }
291
-
292
- /**
293
- * Adds a log record at the ERROR level.
294
- *
295
- * This method allows for compatibility with common interfaces.
296
- *
297
- * @since 4.8.1
298
- * @param string $message The log message
299
- * @param array $context The log context
300
- * @return bool Whether the record has been processed
301
- */
302
- public function error($message, array $context = array())
303
- {
304
- return $this->addRecord(static::ERROR, (string) $message, $context);
305
- }
306
-
307
- /**
308
- * Adds a log record at the CRITICAL level.
309
- *
310
- * This method allows for compatibility with common interfaces.
311
- *
312
- * @since 4.8.1
313
- * @param string $message The log message
314
- * @param array $context The log context
315
- * @return bool Whether the record has been processed
316
- */
317
- public function critical($message, array $context = array())
318
- {
319
- return $this->addRecord(static::CRITICAL, (string) $message, $context);
320
- }
321
-
322
- /**
323
- * Adds a log record at the ALERT level.
324
- *
325
- * This method allows for compatibility with common interfaces.
326
- *
327
- * @since 4.8.1
328
- * @param string $message The log message
329
- * @param array $context The log context
330
- * @return bool Whether the record has been processed
331
- */
332
- public function alert($message, array $context = array())
333
- {
334
- return $this->addRecord(static::ALERT, (string) $message, $context);
335
- }
336
-
337
- /**
338
- * Adds a log record at the EMERGENCY level.
339
- *
340
- * This method allows for compatibility with common interfaces.
341
- *
342
- * @since 4.8.1
343
- * @param string $message The log message
344
- * @param array $context The log context
345
- * @return bool Whether the record has been processed
346
- */
347
- public function emergency($message, array $context = array())
348
- {
349
- return $this->addRecord(static::EMERGENCY, (string) $message, $context);
350
- }
351
-
352
- /**
353
- * Whether or not to add the record described by specified arguments.
354
- *
355
- * @since 4.8.1
356
- * @param mixed $level The log level
357
- * @param string $message The log message
358
- * @param array $context The log context
359
- */
360
- public function shouldAddRecord($level, $message, array $context = array())
361
- {
362
- return true;
363
- }
364
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Aventura/Wprss/Core/Model/LoggerInterface.php CHANGED
@@ -2,117 +2,13 @@
2
 
3
  namespace Aventura\Wprss\Core\Model;
4
 
 
 
5
  /**
6
- * This is actually taken from here:
7
- * https://github.com/php-fig/log/blob/master/Psr/Log/LoggerInterface.php
8
- *
9
- * This is done for forward-compatibility with monolog/monolog, or any other PSR-compatible logger.
10
  *
11
- * @todo When possible, declare Psr\Log as a dependency. Consider using monolog/monolog.
12
  * @since 4.8.1
13
  */
14
- interface LoggerInterface
15
  {
16
-
17
- /**
18
- * System is unusable.
19
- *
20
- * @param string $message
21
- * @param array $context
22
- *
23
- * @return null
24
- */
25
- public function emergency($message, array $context = array());
26
-
27
- /**
28
- * Action must be taken immediately.
29
- *
30
- * Example: Entire website down, database unavailable, etc. This should
31
- * trigger the SMS alerts and wake you up.
32
- *
33
- * @param string $message
34
- * @param array $context
35
- *
36
- * @return null
37
- */
38
- public function alert($message, array $context = array());
39
-
40
- /**
41
- * Critical conditions.
42
- *
43
- * Example: Application component unavailable, unexpected exception.
44
- *
45
- * @param string $message
46
- * @param array $context
47
- *
48
- * @return null
49
- */
50
- public function critical($message, array $context = array());
51
-
52
- /**
53
- * Runtime errors that do not require immediate action but should typically
54
- * be logged and monitored.
55
- *
56
- * @param string $message
57
- * @param array $context
58
- *
59
- * @return null
60
- */
61
- public function error($message, array $context = array());
62
-
63
- /**
64
- * Exceptional occurrences that are not errors.
65
- *
66
- * Example: Use of deprecated APIs, poor use of an API, undesirable things
67
- * that are not necessarily wrong.
68
- *
69
- * @param string $message
70
- * @param array $context
71
- *
72
- * @return null
73
- */
74
- public function warning($message, array $context = array());
75
-
76
- /**
77
- * Normal but significant events.
78
- *
79
- * @param string $message
80
- * @param array $context
81
- *
82
- * @return null
83
- */
84
- public function notice($message, array $context = array());
85
-
86
- /**
87
- * Interesting events.
88
- *
89
- * Example: User logs in, SQL logs.
90
- *
91
- * @param string $message
92
- * @param array $context
93
- *
94
- * @return null
95
- */
96
- public function info($message, array $context = array());
97
-
98
- /**
99
- * Detailed debug information.
100
- *
101
- * @param string $message
102
- * @param array $context
103
- *
104
- * @return null
105
- */
106
- public function debug($message, array $context = array());
107
-
108
- /**
109
- * Logs with an arbitrary level.
110
- *
111
- * @param mixed $level
112
- * @param string $message
113
- * @param array $context
114
- *
115
- * @return null
116
- */
117
- public function log($level, $message, array $context = array());
118
- }
2
 
3
  namespace Aventura\Wprss\Core\Model;
4
 
5
+ use Psr\Log\LoggerInterface as PsrLoggerInterface;
6
+
7
  /**
8
+ * Alias for PSR-3 logger interface.
 
 
 
9
  *
 
10
  * @since 4.8.1
11
  */
12
+ interface LoggerInterface extends PsrLoggerInterface
13
  {
14
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/Aventura/Wprss/Core/Model/ModelInterface.php CHANGED
@@ -22,7 +22,6 @@ interface ModelInterface
22
  * Logs a message
23
  *
24
  * @since 4.8.1
25
- * @see LoggerAbstract
26
  * @return bool True if log entry was processed; false otherwise.
27
  */
28
  public function log($level, $message, array $context = array());
@@ -69,4 +68,4 @@ interface ModelInterface
69
  * @return string This instance's event prefix, or a prefixed name.
70
  */
71
  public function getEventPrefix($name = null);
72
- }
22
  * Logs a message
23
  *
24
  * @since 4.8.1
 
25
  * @return bool True if log entry was processed; false otherwise.
26
  */
27
  public function log($level, $message, array $context = array());
68
  * @return string This instance's event prefix, or a prefixed name.
69
  */
70
  public function getEventPrefix($name = null);
71
+ }
includes/Aventura/Wprss/Core/Plugin/ComponentAbstract.php CHANGED
@@ -135,7 +135,7 @@ abstract class ComponentAbstract extends Core\Model\ModelAbstract implements Com
135
  */
136
  public function log($level, $message, array $context = array())
137
  {
138
- return $this->getPlugin()->log($level, $message, $context);
139
  }
140
 
141
  /**
@@ -165,4 +165,4 @@ abstract class ComponentAbstract extends Core\Model\ModelAbstract implements Com
165
 
166
  return $this->getPlugin()->event($name, $data);
167
  }
168
- }
135
  */
136
  public function log($level, $message, array $context = array())
137
  {
138
+ return false;
139
  }
140
 
141
  /**
165
 
166
  return $this->getPlugin()->event($name, $data);
167
  }
168
+ }
includes/Aventura/Wprss/Core/Plugin/PluginAbstract.php CHANGED
@@ -384,20 +384,6 @@ class PluginAbstract extends Core\Model\ModelAbstract implements PluginInterface
384
  */
385
  public function log($level, $message, array $context = array())
386
  {
387
- $isFormattable = is_array($message) && isset($message[0]) && is_string($message[0]);
388
- if (is_object($message) || empty($message) || (!is_string($message) && !$isFormattable)) {
389
- return $this->logObject($level, $message, $context);
390
- }
391
-
392
- if ($logger = $this->getLogger()) {
393
- try {
394
- $message = $this->__($message);
395
- } catch (\InvalidArgumentException $e) {
396
- return $this->logObject($level, $message, $context);
397
- }
398
- return $logger->log($level, $message, $context);
399
- }
400
-
401
  return false;
402
  }
403
 
384
  */
385
  public function log($level, $message, array $context = array())
386
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
387
  return false;
388
  }
389
 
includes/admin-debugging.php CHANGED
@@ -2,8 +2,9 @@
2
 
3
  use Interop\Container\Exception\NotFoundException as ServiceNotFoundException;
4
  use Aventura\Wprss\Core\Model\AdminAjaxNotice\NoticeInterface;
 
5
 
6
- /**
7
  * Plugin debugging
8
  *
9
  * @package WPRSSAggregator
@@ -182,14 +183,60 @@ use Aventura\Wprss\Core\Model\AdminAjaxNotice\NoticeInterface;
182
  }
183
 
184
  /**
185
- * Renders the Error Log.
186
  */
187
  function wprss_debug_render_error_log() {
 
 
188
  ?>
189
- <h3><?php _e( 'Error Log', WPRSS_TEXT_DOMAIN ); ?></h3>
190
 
191
- <textarea readonly="readonly" id="wprss-error-log-textarea"><?php echo wprss_get_log(); ?></textarea>
192
- <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193
  }
194
 
195
  /**
2
 
3
  use Interop\Container\Exception\NotFoundException as ServiceNotFoundException;
4
  use Aventura\Wprss\Core\Model\AdminAjaxNotice\NoticeInterface;
5
+ use Psr\Log\LogLevel;
6
 
7
+ /**
8
  * Plugin debugging
9
  *
10
  * @package WPRSSAggregator
183
  }
184
 
185
  /**
186
+ * Renders the debug log.
187
  */
188
  function wprss_debug_render_error_log() {
189
+ $num = 200;
190
+ $logs = wpra_get_logger()->getLogs($num, 1);
191
  ?>
 
192
 
193
+ <h3><?= __( 'Debug Log', 'wprss' ); ?></h3>
194
+ <p><i><?= sprintf(__( 'Showing the most recent %d log messages', 'wprss' ), $num); ?></i></p>
195
+
196
+ <?php if (count($logs) === 0) : ?>
197
+ <section class="notice notice-success notice-inline wpra-empty-log-notice">
198
+ <p><?= __('The log is empty', 'wprss'); ?></p>
199
+ </section>
200
+ <?php else: ?>
201
+ <div class="wpra-log">
202
+ <p>
203
+ <strong><?= __('Filters:', 'wprss') ?></strong>
204
+
205
+ <span class="wpra-toggle-logs" data-level="all">
206
+ <a href="#"><?= __('All', 'wprss') ?></a>
207
+ </span>
208
+ <span class="wpra-toggle-logs wpra-selected" data-level="error">
209
+ <a href="#"><?= __('Errors', 'wprss') ?></a>
210
+ </span>
211
+ <span class="wpra-toggle-logs wpra-selected" data-level="info">
212
+ <a href="#"><?= __('Info', 'wprss') ?></a>
213
+ </span>
214
+ <span class="wpra-toggle-logs" data-level="notice">
215
+ <a href="#"><?= __('Notice', 'wprss') ?></a>
216
+ </span>
217
+ <span class="wpra-toggle-logs" data-level="warning">
218
+ <a href="#"><?= __('Warnings', 'wprss') ?></a>
219
+ </span>
220
+ <span class="wpra-toggle-logs" data-level="debug">
221
+ <a href="#"><?= __('Debug', 'wprss') ?></a>
222
+ </span>
223
+ </p>
224
+ <div class="wpra-log-container">
225
+ <table>
226
+ <tbody>
227
+ <?php foreach ($logs as $log) : ?>
228
+ <tr class="wpra-log-<?= $log['level'] ?>">
229
+ <td class="wpra-log-date"><?= $log['date'] ?></td>
230
+ <td class="wpra-log-level"><?= ucfirst($log['level']) ?></td>
231
+ <td class="wpra-log-feed"><?= get_the_title(ucfirst($log['feed_id'])) ?></td>
232
+ <td class="wpra-log-message"><?= $log['message'] ?></td>
233
+ </tr>
234
+ <?php endforeach; ?>
235
+ </tbody>
236
+ </table>
237
+ </div>
238
+ </div>
239
+ <?php endif;
240
  }
241
 
242
  /**
includes/admin-display.php CHANGED
@@ -373,7 +373,7 @@
373
  * @since 3.5
374
  */
375
  function check_delete_for_feed_source( $source_id = NULL ) {
376
- if ( ! current_user_can( 'delete_feeds' ) ) return;
377
  // then we need to check the GET data for the request
378
  if ( isset( $_GET['purge-feed-items'] ) ) {
379
  $source_id = $_GET['purge-feed-items'];
@@ -468,7 +468,7 @@
468
  $id = $_POST['id'];
469
  $response->setAjaxData($kFeedSourceId, $id);
470
 
471
- if (!current_user_can('edit_feeds')) {
472
  throw new Exception($wprss->__(array('Could not schedule fetch for source #%1$s: user must have sufficient privileges', $id)));
473
  }
474
 
373
  * @since 3.5
374
  */
375
  function check_delete_for_feed_source( $source_id = NULL ) {
376
+ if ( ! current_user_can( 'delete_feed_sources' ) ) return;
377
  // then we need to check the GET data for the request
378
  if ( isset( $_GET['purge-feed-items'] ) ) {
379
  $source_id = $_GET['purge-feed-items'];
468
  $id = $_POST['id'];
469
  $response->setAjaxData($kFeedSourceId, $id);
470
 
471
+ if (!current_user_can('edit_feed_sources')) {
472
  throw new Exception($wprss->__(array('Could not schedule fetch for source #%1$s: user must have sufficient privileges', $id)));
473
  }
474
 
includes/admin-editor.php CHANGED
@@ -68,75 +68,164 @@
68
 
69
  add_action( 'wp_ajax_wprss_editor_dialog', 'wprss_return_dialog_contents' );
70
  /**
71
- *
72
- *
73
  */
74
  function wprss_return_dialog_contents() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  $feed_sources = get_posts( array(
76
  'post_type' => 'wprss_feed',
77
  'post_status' => 'publish',
78
  'posts_per_page' => -1,
79
  'no_found_rows' => true
80
  ));
81
- $feed_sources_select = '<select id="wprss-dialog-feed-source-list" multiple>';
82
- $feed_sources_exclude_select = '<select id="wprss-dialog-exclude-list" multiple>';
83
- $feed_sources_both_select = '';
84
- foreach ( $feed_sources as $source ) {
85
- $feed_sources_both_select .= '<option value="' . $source->ID . '" >' . $source->post_title . '</option>';
86
- }
87
- $feed_sources_both_select .= '</select><p>' . __( 'Hold Ctrl or Mac Command key when clicking to select more than one feed source.' , WPRSS_TEXT_DOMAIN ) . '</p>';
88
-
 
 
 
 
 
 
 
 
 
 
 
 
89
  $feed_sources_select .= $feed_sources_both_select;
90
  $feed_sources_exclude_select .= $feed_sources_both_select;
91
 
92
  ?>
93
  <table cellspacing="20">
94
  <tbody>
95
-
 
 
 
 
 
 
 
 
 
96
  <tr>
97
- <td id="wprss-dialog-all-sources-label"><?php _e( 'Feed Sources', WPRSS_TEXT_DOMAIN ) ?></td>
 
 
98
  <td>
99
- <input id="wprss-dialog-all-sources" type="checkbox" checked> <label for="wprss-dialog-all-sources"><?php _e( 'All feed sources', WPRSS_TEXT_DOMAIN ) ?></label>
100
- <div id="wprss-dialog-sources-container" style="display:none">
101
- <p><?php _e( 'Choose the feed source to display:', WPRSS_TEXT_DOMAIN ) ?></p>
102
- <?php echo $feed_sources_select; ?>
103
- </div>
104
- <script>
105
- jQuery('#wprss-dialog-all-sources').click( function(){
106
- if ( jQuery(this).is(':checked') ) {
107
- jQuery( '#wprss-dialog-sources-container' ).hide();
108
- jQuery( '#wprss-dialog-exclude-row' ).show();
109
- jQuery( '#wprss-dialog-all-sources-label' ).css('vertical-align', 'middle');
110
- } else {
111
- jQuery( '#wprss-dialog-sources-container' ).show();
112
- jQuery( '#wprss-dialog-exclude-row' ).hide();
113
- jQuery( '#wprss-dialog-all-sources-label' ).css('vertical-align', 'top');
114
- }
115
- });
116
- jQuery('#wprss-dialog-submit').click( wprss_dialog_submit );
117
- </script>
118
  </td>
119
  </tr>
120
 
121
  <tr id="wprss-dialog-exclude-row">
122
- <td id="wprss-dialog-exclude-label"><?php _e( 'Exclude:', WPRSS_TEXT_DOMAIN ) ?></td>
 
 
 
 
123
  <td>
124
- <p><?php _e( 'Choose the feed sources to exclude:', WPRSS_TEXT_DOMAIN ) ?></p>
125
- <?php echo $feed_sources_exclude_select; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
  </td>
127
  </tr>
128
 
129
  <tr>
130
- <td><?php _e( 'Feed Limit:', WPRSS_TEXT_DOMAIN ) ?></td>
131
- <td> <input id="wprss-dialog-feed-limit" type="number" class="wprss-number-roller" placeholder="<?php _e( 'Ignore', WPRSS_TEXT_DOMAIN ) ?> " min="0" /> </td>
 
 
 
 
 
 
 
132
  </tr>
133
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  <?php do_action( 'wprss_return_dialog_contents' ); ?>
135
 
136
  <tr>
137
  <td></td>
138
  <td>
139
- <button id="wprss-dialog-submit"><?php _e( 'Add shortcode', WPRSS_TEXT_DOMAIN ) ?></button>
 
 
140
  </td>
141
  </tr>
142
 
@@ -144,4 +233,4 @@
144
  </table>
145
  <?php
146
  die();
147
- }
68
 
69
  add_action( 'wp_ajax_wprss_editor_dialog', 'wprss_return_dialog_contents' );
70
  /**
71
+ * Renders the TinyMCE button dialog contents.
 
72
  */
73
  function wprss_return_dialog_contents() {
74
+ $templates_collection = wpra_get('templates/feeds/collection');
75
+ $templates_options = [];
76
+ foreach ($templates_collection as $template) {
77
+ $template_name = $template['name'];
78
+ $template_slug = ($template['type'] === '__built_in')
79
+ ? ''
80
+ : $template['slug'];
81
+
82
+ $templates_options[$template_slug] = $template_name;
83
+ }
84
+ $templates_select = wprss_settings_render_select(
85
+ 'wprss-dialog-templates',
86
+ '',
87
+ $templates_options,
88
+ '',
89
+ ['class' => 'widefat']
90
+ );
91
+
92
  $feed_sources = get_posts( array(
93
  'post_type' => 'wprss_feed',
94
  'post_status' => 'publish',
95
  'posts_per_page' => -1,
96
  'no_found_rows' => true
97
  ));
98
+ $feed_sources_names = [];
99
+ foreach ( $feed_sources as $source ) {
100
+ $feed_sources_names[$source->ID] = $source->post_title;
101
+ }
102
+ $feed_sources_select = wprss_settings_render_select(
103
+ 'wprss-dialog-feed-source-list',
104
+ '',
105
+ $feed_sources_names,
106
+ '',
107
+ ['multiple' => 'multiple', 'class' => 'widefat']
108
+ );
109
+ $feed_sources_exclude_select = wprss_settings_render_select(
110
+ 'wprss-dialog-exclude-list',
111
+ '',
112
+ $feed_sources_names,
113
+ '',
114
+ ['multiple' => 'multiple', 'class' => 'widefat']
115
+ );
116
+
117
+ $feed_sources_both_select = '<p>' . __( 'To select more than one feed source, click and drag with your mouse pointer or click individual feed sources while holding down the Ctrl (Windows) or Command (Mac) key.' , WPRSS_TEXT_DOMAIN ) . '</p>';
118
  $feed_sources_select .= $feed_sources_both_select;
119
  $feed_sources_exclude_select .= $feed_sources_both_select;
120
 
121
  ?>
122
  <table cellspacing="20">
123
  <tbody>
124
+ <tr>
125
+ <td id="wprss-dialog-templates-label">
126
+ <label for="wprss-dialog-templates">
127
+ <?php _e( 'Template', WPRSS_TEXT_DOMAIN ) ?>
128
+ </label>
129
+ </td>
130
+ <td>
131
+ <?php echo $templates_select; ?>
132
+ </td>
133
+ </tr>
134
  <tr>
135
+ <td id="wprss-dialog-all-sources-label">
136
+ <?php _e( 'Sources', WPRSS_TEXT_DOMAIN ) ?>
137
+ </td>
138
  <td>
139
+ <input id="wprss-dialog-all-sources" type="checkbox" checked>
140
+ <label for="wprss-dialog-all-sources">
141
+ <?php _e( 'All feed sources', WPRSS_TEXT_DOMAIN ) ?>
142
+ </label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  </td>
144
  </tr>
145
 
146
  <tr id="wprss-dialog-exclude-row">
147
+ <td id="wprss-dialog-exclude-label">
148
+ <label id="wprss-dialog-exclude-list-label" for="wprss-dialog-exclude-list">
149
+ <?php _e( 'Exclude', WPRSS_TEXT_DOMAIN ) ?>
150
+ </label>
151
+ </td>
152
  <td>
153
+ <div id="wprss-dialog-excludes-container">
154
+ <p><?php _e( 'You may choose to exclude some feed sources:', WPRSS_TEXT_DOMAIN ) ?></p>
155
+ <?php echo $feed_sources_exclude_select; ?>
156
+ </div>
157
+
158
+ <div id="wprss-dialog-sources-container" style="display:none">
159
+ <p><?php _e( 'Choose which feed sources to show:', WPRSS_TEXT_DOMAIN ) ?></p>
160
+ <?php echo $feed_sources_select; ?>
161
+ </div>
162
+
163
+ <script type="text/javascript">
164
+ jQuery('#wprss-dialog-all-sources').click( function(){
165
+ if ( jQuery(this).is(':checked') ) {
166
+ jQuery( '#wprss-dialog-sources-container' ).hide();
167
+ jQuery( '#wprss-dialog-excludes-container' ).show();
168
+ jQuery( '#wprss-dialog-exclude-list-label' ).show();
169
+ } else {
170
+ jQuery( '#wprss-dialog-sources-container' ).show();
171
+ jQuery( '#wprss-dialog-excludes-container' ).hide();
172
+ jQuery( '#wprss-dialog-exclude-list-label' ).hide();
173
+ }
174
+ });
175
+ jQuery('#wprss-dialog-submit').click( wprss_dialog_submit );
176
+ </script>
177
  </td>
178
  </tr>
179
 
180
  <tr>
181
+ <td><?php _e( 'Number of items', WPRSS_TEXT_DOMAIN ) ?></td>
182
+ <td>
183
+ <input id="wprss-dialog-feed-limit"
184
+ type="number"
185
+ class="wprss-number-roller widefat"
186
+ placeholder="<?php _e( 'Use template setting', WPRSS_TEXT_DOMAIN ) ?>"
187
+ min="0"
188
+ />
189
+ </td>
190
  </tr>
191
 
192
+ <tr>
193
+ <td><?php _e( 'Pagination', WPRSS_TEXT_DOMAIN ) ?></td>
194
+ <td>
195
+ <label>
196
+ <select id="wprss-dialog-pagination">
197
+ <option value=""><?php _e( 'Use template setting', WPRSS_TEXT_DOMAIN ) ?></option>
198
+ <option value="on"><?php _e( 'Enabled', WPRSS_TEXT_DOMAIN ) ?></option>
199
+ <option value="off"><?php _e( 'Disabled', WPRSS_TEXT_DOMAIN ) ?></option>
200
+ </select>
201
+ <br/>
202
+ <span>
203
+ <?php _e( 'Choose whether to show or hide pagination controls', WPRSS_TEXT_DOMAIN ) ?>
204
+ </span>
205
+ </label>
206
+ </td>
207
+ </tr>
208
+
209
+ <tr>
210
+ <td><?php _e( 'Starting page', WPRSS_TEXT_DOMAIN ) ?></td>
211
+ <td>
212
+ <input id="wprss-dialog-start-page"
213
+ type="number"
214
+ class="wprss-number-roller widefat"
215
+ placeholder="<?php _e( 'Use template setting', WPRSS_TEXT_DOMAIN ) ?>"
216
+ min="1"
217
+ />
218
+ </td>
219
+ </tr>
220
+
221
  <?php do_action( 'wprss_return_dialog_contents' ); ?>
222
 
223
  <tr>
224
  <td></td>
225
  <td>
226
+ <button id="wprss-dialog-submit">
227
+ <?php _e( 'Add shortcode', WPRSS_TEXT_DOMAIN ) ?>
228
+ </button>
229
  </td>
230
  </tr>
231
 
233
  </table>
234
  <?php
235
  die();
236
+ }
includes/admin-heartbeat.php CHANGED
@@ -7,7 +7,7 @@ add_action( 'wp_ajax_wprss_feed_source_table_ajax', 'wprss_feed_source_updates')
7
  function wprss_feed_source_updates() {
8
  $response = array();
9
 
10
- if ( ! current_user_can( 'edit_feeds' ) ) return $response;
11
 
12
  if ( empty($_POST['wprss_heartbeat']) ) return $response;
13
 
7
  function wprss_feed_source_updates() {
8
  $response = array();
9
 
10
+ if ( ! current_user_can( 'edit_feed_sources' ) ) return $response;
11
 
12
  if ( empty($_POST['wprss_heartbeat']) ) return $response;
13
 
includes/admin-help.php CHANGED
@@ -10,7 +10,7 @@
10
  * @return bool True if enabled, false if not.
11
  */
12
  function wprss_is_help_beacon_enabled() {
13
- return (int) get_option('wprss_hs_beacon_enabled', 0) === 1;
14
  }
15
 
16
  /**
10
  * @return bool True if enabled, false if not.
11
  */
12
  function wprss_is_help_beacon_enabled() {
13
+ return (int) get_option('wprss_hs_beacon_enabled', 1) === 1;
14
  }
15
 
16
  /**
includes/admin-intro-page.php CHANGED
@@ -46,8 +46,8 @@ function wprss_render_intro_page()
46
  {
47
  wprss_update_previous_update_page_version();
48
 
49
- wprss_plugin_enqueue_app_scripts('intro-wizard', WPRSS_JS . 'intro.min.js', array(), '0.1', true);
50
- wp_enqueue_style('intro-wizard', WPRSS_CSS . 'intro.min.css');
51
 
52
  $nonce = wp_create_nonce(WPRSS_INTRO_NONCE_NAME);
53
  wp_localize_script('intro-wizard', 'wprssWizardConfig', array(
@@ -67,7 +67,7 @@ function wprss_render_intro_page()
67
  ),
68
  ));
69
 
70
- echo wprss_render_template('admin-intro-page.twig', array(
71
  'title' => 'Welcome to WP RSS Aggregator 👋',
72
  'subtitle' => 'Follow these introductory steps to get started with WP RSS Aggregator.',
73
  ));
46
  {
47
  wprss_update_previous_update_page_version();
48
 
49
+ wprss_plugin_enqueue_app_scripts('intro-wizard', WPRSS_APP_JS . 'intro.min.js', array(), '0.1', true);
50
+ wp_enqueue_style('intro-wizard', WPRSS_APP_CSS . 'intro.min.css');
51
 
52
  $nonce = wp_create_nonce(WPRSS_INTRO_NONCE_NAME);
53
  wp_localize_script('intro-wizard', 'wprssWizardConfig', array(
67
  ),
68
  ));
69
 
70
+ echo wprss_render_template('admin/intro-page.twig', array(
71
  'title' => 'Welcome to WP RSS Aggregator 👋',
72
  'subtitle' => 'Follow these introductory steps to get started with WP RSS Aggregator.',
73
  ));
includes/admin-log.php CHANGED
@@ -1,443 +1,141 @@
1
  <?php
2
- define( 'WPRSS_OPTION_CODE_LOG_LEVEL', 'log_level' );
3
- define( 'WPRSS_LOG_LEVEL_NONE', 0 );
4
- define( 'WPRSS_LOG_LEVEL_SYSTEM', 1 );
5
- define( 'WPRSS_LOG_LEVEL_INFO', 2 );
6
- define( 'WPRSS_LOG_LEVEL_NOTICE', 4 );
7
- define( 'WPRSS_LOG_LEVEL_WARNING', 8 );
8
- define( 'WPRSS_LOG_LEVEL_ERROR', 16 );
9
- define( 'WPRSS_LOG_LEVEL_DEFAULT', 'default' );
10
 
11
- if (!defined('WPRSS_LOG_FILENAME_SEPARATOR'))
12
- define('WPRSS_LOG_FILENAME_SEPARATOR', '_');
13
-
14
- if (!defined('WPRSS_LOG_FILENAME_CONCATENATOR'))
15
- define('WPRSS_LOG_FILENAME_CONCATENATOR', '-');
16
-
17
- // Number of chars to display in log
18
- if (!defined('WPRSS_LOG_DISPLAY_LIMIT'))
19
- define( 'WPRSS_LOG_DISPLAY_LIMIT', 100000 ); // 100Kb
20
-
21
-
22
- /**
23
- * Returns the log file path.
24
- *
25
- * @since 4.0.4
26
- */
27
- function wprss_log_file()
28
- {
29
- return WPRSS_LOG_FILE . wprss_log_suffix() . WPRSS_LOG_FILE_EXT;
30
- }
31
-
32
- /**
33
- * Writes a message to the log file.
34
- *
35
- * If directories on the log filepath don't exist, creates them.
36
- *
37
- * @since 4.10
38
- *
39
- * @param string $message The message to write to the log.
40
- * @param int $flags Flags to be used with {@see file_put_contents()} for writing.
41
- * @return bool True if message written successfully; false otherwise.
42
- */
43
- function wprss_log_write($message, $flags = 0)
44
- {
45
- $file = wprss_log_file();
46
- $dir = dirname($file);
47
- if (!file_exists($dir)) {
48
- if (!wp_mkdir_p($dir)) {
49
- return false;
50
- }
51
- }
52
-
53
- return file_put_contents($file, $message, $flags);
54
- }
55
-
56
- /**
57
- * Reads a certain amount of data from the log file.
58
- *
59
- * By default, reads that data from the end of the file.
60
- *
61
- * @since 4.10
62
- *
63
- * @param null|int $length How many characters at most to read from the log.
64
- * Default: {@see WPRSS_LOG_DISPLAY_LIMIT}.
65
- * @param null|int $start Position, at which to start reading.
66
- * If negative, represents that number of chars from the end.
67
- * Default: The amount of characters equal to $length away from the end of the file,
68
- * or the beginning of the file if the size of the file is less than or equal to $length.
69
- *
70
- * @return string|bool The content of the log, or false if the read operation failed.
71
- */
72
- function wprss_log_read($length = null, $start = null)
73
- {
74
- $origStart = $start;
75
-
76
- if (is_null($length)) {
77
- $length = WPRSS_LOG_DISPLAY_LIMIT;
78
- }
79
-
80
- $file = wprss_log_file();
81
-
82
- if (!($fh = fopen($file, 'r'))) {
83
- return false;
84
- }
85
-
86
- $info = fstat($fh);
87
- $size = $info['size'];
88
-
89
- if ($size === 0 || $length === 0) {
90
- return '';
91
- }
92
-
93
- // Can't read more than the length of the file
94
- if ($length > $size) {
95
- $length = $size;
96
- }
97
-
98
- // Default start is length before end
99
- if (is_null($start)) {
100
- $start = -$length;
101
- }
102
-
103
- // Allowing negative
104
- if ($start < 0) {
105
- $start = $size - abs($start);
106
- }
107
-
108
- // Can't start before start of file
109
- if ($start < 0) {
110
- $start = 0;
111
- }
112
-
113
- // If reading over EOF,
114
- $end = $start + $length;
115
- if ($end > $size) {
116
- $over = $end - $size;
117
- // If start is not fixed, shift start to allow reading as much length as possible
118
- if (is_null($origStart)) {
119
- $start = $start - $over;
120
- }
121
- // If start is fixed, shift length to allow reading from start until end
122
- else {
123
- $length = $length - $over;
124
- }
125
- }
126
-
127
- // Can't start before start of file
128
- if ($start < 0) {
129
- $start = 0;
130
- }
131
-
132
- // Returns 0 when failed
133
- if (fseek($fh, $start)) {
134
- return false;
135
- }
136
-
137
- $str = fread($fh, $length);
138
- fclose($fh);
139
-
140
- return $str;
141
- }
142
-
143
- /**
144
- * Determines a suffix for a log file based on context and some globally accessible variables.
145
- *
146
- * @since 4.10
147
- *
148
- * @param array $context Options for the suffix.
149
- * Default: ['blog_id' => {{current blog id}}]
150
- *
151
- * @return string The log file suffix. Prefixed with separator.
152
- */
153
- function wprss_log_suffix(array $context = null)
154
- {
155
- if (is_null($context)) {
156
- $context = array('blog_id' => get_current_blog_id());
157
- }
158
-
159
- $s = WPRSS_LOG_FILENAME_SEPARATOR;
160
- $c = WPRSS_LOG_FILENAME_CONCATENATOR;
161
- $parts = array();
162
-
163
- if (isset($context['blog_id'])) {
164
- $parts[] = 'blg' . $c . $context['blog_id'];
165
- }
166
-
167
- $suffix = $s . implode($s, $parts);
168
- $suffix = apply_filters('wprss_log_suffix', $suffix, $context);
169
-
170
- return $suffix;
171
- }
172
-
173
- /**
174
- * Clears the log file.
175
- *
176
- * @since 3.9.6
177
- */
178
- function wprss_clear_log()
179
- {
180
- wprss_log_write( '' );
181
- }
182
-
183
- /**
184
- * Alias for wprss_clear_log().
185
- *
186
- * Used for code readability.
187
- *
188
- * @since 3.9.6
189
- */
190
- function wprss_reset_log()
191
- {
192
- wprss_clear_log();
193
- }
194
-
195
- /**
196
- * Gets log level from the database.
197
- * @return string The string representing the log level threshold or type.
198
- */
199
- function wprss_log_get_level_db()
200
- {
201
- return wprss_get_general_setting( WPRSS_OPTION_CODE_LOG_LEVEL );
202
- }
203
-
204
- /**
205
- * Gets log level used.
206
- * @return string The string representing the log level threshold.
207
- */
208
- function wprss_log_get_level()
209
- {
210
- $log_level = wprss_log_get_level_db();
211
- if ( $log_level === WPRSS_LOG_LEVEL_DEFAULT ) {
212
- $log_level = WPRSS_LOG_LEVEL;
213
- }
214
-
215
- return apply_filters( 'wprss_log_level', $log_level );
216
- }
217
-
218
- /**
219
- * Check whether or not the specified logging level is the same as, or one of (only for positive),
220
- * the currently used logging level.
221
- *
222
- * @param int $log_level The log level to check. Must be an unsigned whole number.
223
- */
224
- function wprss_log_is_level( $log_level, $used_log_level = null )
225
- {
226
- $used_log_level = is_null( $used_log_level ) ? wprss_log_get_level() : $used_log_level;
227
-
228
- if( is_numeric( $log_level ) ) {
229
- $log_level = intval( $log_level );
230
- $used_log_level = intval( $used_log_level );
231
-
232
- return ($log_level > 0 && $used_log_level > 0)
233
- // Mostly for the case of 0
234
- ? intval( $log_level ) & intval( $used_log_level )
235
- : $log_level === $used_log_level;
236
- }
237
-
238
- return trim( $log_level ) === trim( $used_log_level );
239
- }
240
-
241
- /**
242
- * Check whether or not messages with the specified logging level should be logged.
243
- *
244
- * @param int $log_level The log level to check. Must be an unsigned whole number
245
- * @return bool True if messages with the specified logging level should be logged; false otherwise.
246
- */
247
- function wprss_log_is_logging_level( $log_level )
248
- {
249
- $original_used_level = $used_log_level = wprss_log_get_level();
250
-
251
- // Whether to use the indicated level and below
252
- $is_below = ( substr( $used_log_level, 0, 1 ) === '-' );
253
- if ( $is_below ) {
254
- $used_log_level = substr( $used_log_level, 1 );
255
- }
256
-
257
- if( (int)$used_log_level === WPRSS_LOG_LEVEL_NONE ) {
258
- $is_log_level = WPRSS_LOG_LEVEL_NONE;
259
- }
260
- else {
261
- $is_log_level = $is_below
262
- ? ((int)$log_level <= (int)$used_log_level && (int)$log_level !== WPRSS_LOG_LEVEL_NONE)
263
- : wprss_log_is_level( (int)$log_level, $used_log_level );
264
- }
265
-
266
- return apply_filters( 'wprss_is_logging_level', $is_log_level, $log_level, $used_log_level, $is_below );
267
- }
268
-
269
- /**
270
- * Get the available log levels.
271
- *
272
- * @param bool $levels_only Whether or not only numeric actual levels are to be returned.
273
- * If false, returns other types as well.
274
- * @return array An array, where key is level, and value is level's human-readable name.
275
- */
276
- function wprss_log_get_levels( $levels_only = true )
277
- {
278
- $log_levels = array(
279
- WPRSS_LOG_LEVEL_NONE => 'None',
280
- WPRSS_LOG_LEVEL_SYSTEM => 'System',
281
- WPRSS_LOG_LEVEL_INFO => 'Info',
282
- WPRSS_LOG_LEVEL_NOTICE => 'Notice',
283
- WPRSS_LOG_LEVEL_WARNING => 'Warning',
284
- WPRSS_LOG_LEVEL_ERROR => 'Error'
285
- );
286
-
287
- if( !$levels_only ) {
288
- $log_levels[ WPRSS_LOG_LEVEL_DEFAULT ] = 'Default';
289
- }
290
-
291
- return apply_filters( 'wprss_log_levels', $log_levels, $levels_only );
292
- }
293
-
294
- /**
295
- *
296
- * @param string|int $level Any valid level value.
297
- * @return string The untranslated label of the specified level, or $default if no such level exists.
298
- */
299
- function wprss_log_get_level_label( $level, $default = 'N/A' )
300
- {
301
- $levels = wprss_log_get_levels( false );
302
- return isset( $levels[$level] ) ? $levels[ $level ] : $default;
303
- }
304
-
305
- /**
306
- * Adds a log entry to the log file.
307
- *
308
- * @since 3.9.6
309
- */
310
- function wprss_log( $message, $src = NULL, $log_level = WPRSS_LOG_LEVEL_ERROR )
311
- {
312
- if( !wprss_log_is_logging_level( $log_level ) ) return;
313
-
314
- if ( $src === NULL ) {
315
- $callers = debug_backtrace();
316
- $src = $callers[1]['function'];
317
- if ( $src === 'wprss_log_obj' ) {
318
- $src = $callers[2]['function'];
319
- }
320
- }
321
-
322
- $log_level_label = wprss_log_get_level_label( $log_level );
323
- $date = date( 'd-m-Y H:i:s' );
324
- $source = 'WPRSS' . ( ( strlen( $src ) > 0 )? " > $src" : '' ) ;
325
- $str = "[$date] [$log_level_label] $source:\n";
326
- $str .= "$message\n\n";
327
- wprss_log_write( $str, FILE_APPEND );
328
-
329
- add_action( 'shutdown', 'wprss_log_separator' );
330
- }
331
-
332
- /**
333
- * Dumps an object to the log file.
334
- *
335
- * @since 3.9.6
336
- */
337
- function wprss_log_obj( $message, $obj, $src = '', $log_level = WPRSS_LOG_LEVEL_ERROR )
338
- {
339
- wprss_log( "$message: " . print_r( $obj, TRUE ), $src, $log_level );
340
- }
341
-
342
- /**
343
- * Returns the contents of the log file.
344
- *
345
- * @since 3.9.6
346
- */
347
- function wprss_get_log() {
348
- if ( !file_exists( wprss_log_file() ) ) {
349
- wprss_clear_log();
350
- }
351
-
352
- $log = wprss_log_read();
353
-
354
- return $log;
355
- }
356
-
357
- /**
358
- * Downloads the log file.
359
- *
360
- * @since 4.7.8
361
- */
362
- function wprss_download_log()
363
- {
364
- if ( !file_exists( wprss_log_file() ) ) {
365
- wprss_clear_log();
366
- }
367
- else {
368
- $file = wprss_log_file();
369
- header( 'Content-Description: File Transfer' );
370
- header( 'Content-type: text/plain' );
371
- header( 'Content-Disposition: attachment; filename="error-log.txt"' );
372
- header( 'Expires: 0' );
373
- header( 'Cache-Control: must-revalidate' );
374
- header( 'Pragma: public' );
375
- header( 'Content-Length: ' . filesize( $file ) );
376
- readfile( $file );
377
- exit;
378
- }
379
- }
380
-
381
- /**
382
- * Adds an empty line at the end of the log file.
383
- *
384
- * This function is called on WordPress shutdown, if at least one new line
385
- * is logged in the log file, to separate logs from different page loads.
386
- *
387
- * @since 3.9.6
388
- */
389
- function wprss_log_separator()
390
- {
391
- wprss_log_write( "\n", FILE_APPEND );
392
- }
393
-
394
- /**
395
- * Adding the default setting value.
396
- */
397
- add_filter( 'wprss_default_settings_general', 'wprss_log_default_settings_general' );
398
- function wprss_log_default_settings_general( $settings )
399
- {
400
- /* @todo Add version info */
401
- $settings[ WPRSS_OPTION_CODE_LOG_LEVEL ] = WPRSS_LOG_LEVEL_DEFAULT;
402
- return $settings;
403
- }
404
-
405
- /**
406
- * Adding the setting field
407
- */
408
- add_filter( 'wprss_settings_array', 'wprss_log_settings_array' );
409
- function wprss_log_settings_array( $sections )
410
- {
411
- $sections['general'][ WPRSS_OPTION_CODE_LOG_LEVEL ] = array(
412
- 'label' => __( 'Log level threshold', WPRSS_TEXT_DOMAIN ),
413
- 'callback' => 'wprss_setting_' . WPRSS_OPTION_CODE_LOG_LEVEL . '_callback'
414
- );
415
- return $sections;
416
- }
417
-
418
- /**
419
- * Renders the 'log_level' setting field.
420
- *
421
- * @param array $field Info about the field
422
- */
423
- function wprss_setting_log_level_callback( $field )
424
- {
425
- $log_level = wprss_get_general_setting( $field['field_id'] );
426
-
427
- foreach( wprss_log_get_levels( false ) as $_level => $_label ) {
428
- $options[ $_level ] = $_label;
429
- if( is_numeric( $_level ) && ($_level/2 >= 1) ) $options[ (int)$_level * -1 ] = $_label . ' and below';
430
- }
431
-
432
- krsort( $options, defined( 'SORT_NATURAL' ) ? SORT_NATURAL : SORT_STRING );
433
- ?>
434
- <select id="<?php echo $field['field_id'] ?>" name="wprss_settings_general[<?php echo $field['field_id'] ?>]">
435
- <?php
436
- foreach( $options as $value => $text ) {
437
- $selected = ( (string)$value === (string)$log_level )? 'selected="selected"' : '';
438
- ?><option value="<?php echo $value ?>" <?php echo $selected ?>><?php echo __( $text, WPRSS_TEXT_DOMAIN ) ?></option><?php
439
- }
440
- ?>
441
- </select>
442
- <?php echo wprss_settings_inline_help( $field['field_id'], $field['tooltip'] );
443
- }
1
  <?php
 
 
 
 
 
 
 
 
2
 
3
+ use Psr\Log\LoggerInterface;
4
+ use Psr\Log\LogLevel;
5
+ use RebelCode\Wpra\Core\Logger\ClearableLoggerInterface;
6
+ use RebelCode\Wpra\Core\Logger\LogReaderInterface;
7
+
8
+ define('WPRSS_OPTION_CODE_LOG_LEVEL', 'log_level');
9
+ define('WPRSS_LOG_LEVEL_SYSTEM', LogLevel::DEBUG);
10
+ define('WPRSS_LOG_LEVEL_INFO', LogLevel::INFO);
11
+ define('WPRSS_LOG_LEVEL_NOTICE', LogLevel::NOTICE);
12
+ define('WPRSS_LOG_LEVEL_WARNING', LogLevel::WARNING);
13
+ define('WPRSS_LOG_LEVEL_ERROR', LogLevel::ERROR);
14
+
15
+ define('WPRSS_LOG_LEVEL_NONE', WPRSS_LOG_LEVEL_INFO);
16
+ define('WPRSS_LOG_LEVEL_DEFAULT', WPRSS_LOG_LEVEL_NONE);
17
+
18
+ /**
19
+ * Returns the logger.
20
+ *
21
+ * @since 4.13
22
+ *
23
+ * @param int|string|null $feed_id Optional feed ID to retrieve the logger for that feed source.
24
+ *
25
+ * @return LoggerInterface|ClearableLoggerInterface|LogReaderInterface
26
+ */
27
+ function wpra_get_logger($feed_id = null)
28
+ {
29
+ if ($feed_id === null) {
30
+ return wpra_container()->get('wpra/logging/logger');
31
+ }
32
+
33
+ $dataset = wpra_container()->get('wpra/logging/feed_logger_dataset');
34
+ $logger = $dataset[$feed_id];
35
+
36
+ return $logger;
37
+ }
38
+
39
+ /**
40
+ * Reads a certain amount of data from the log file.
41
+ *
42
+ * By default, reads that data from the end of the file.
43
+ *
44
+ * @since 4.10
45
+ *
46
+ * @param null|int $length How many characters at most to read from the log.
47
+ * Default: {@see WPRSS_LOG_DISPLAY_LIMIT}.
48
+ * @param null|int $start Position, at which to start reading.
49
+ * If negative, represents that number of chars from the end.
50
+ * Default: The amount of characters equal to $length away from the end of the file,
51
+ * or the beginning of the file if the size of the file is less than or equal to $length.
52
+ *
53
+ * @return string|bool The content of the log, or false if the read operation failed.
54
+ */
55
+ function wprss_log_read($length = null, $start = null)
56
+ {
57
+ $logs = wpra_get_logger()->getLogs($length, $start);
58
+
59
+ $output = '';
60
+ foreach ($logs as $log) {
61
+ $output .= sprintf('[%s] %s: %s', $log['date'], $log['level'], $log['message']) . PHP_EOL;
62
+ }
63
+
64
+ return $output;
65
+ }
66
+
67
+ /**
68
+ * Returns the contents of the log file.
69
+ *
70
+ * @since 3.9.6
71
+ */
72
+ function wprss_get_log()
73
+ {
74
+ return wprss_log_read();
75
+ }
76
+
77
+ /**
78
+ * Clears the log file.
79
+ *
80
+ * @since 3.9.6
81
+ */
82
+ function wprss_clear_log()
83
+ {
84
+ wpra_get_logger()->clearLogs();
85
+ }
86
+
87
+ /**
88
+ * Alias for wprss_clear_log().
89
+ *
90
+ * Used for code readability.
91
+ *
92
+ * @since 3.9.6
93
+ */
94
+ function wprss_reset_log()
95
+ {
96
+ wprss_clear_log();
97
+ }
98
+
99
+ /**
100
+ * Adds a log entry to the log file.
101
+ *
102
+ * @since 3.9.6
103
+ */
104
+ function wprss_log($message, $src = null, $log_level = LogLevel::ERROR)
105
+ {
106
+ wpra_get_logger()->log($log_level, $message);
107
+
108
+ return;
109
+ }
110
+
111
+ /**
112
+ * Dumps an object to the log file.
113
+ *
114
+ * @since 3.9.6
115
+ */
116
+ function wprss_log_obj($message, $obj, $src = '', $log_level = LogLevel::ERROR)
117
+ {
118
+ $message = sprintf('%s: %s', $message, print_r($obj, true));
119
+
120
+ wprss_log($message, $src, $log_level);
121
+ }
122
+
123
+ /**
124
+ * Downloads the log file.
125
+ *
126
+ * @since 4.7.8
127
+ */
128
+ function wprss_download_log()
129
+ {
130
+ $log = wprss_log_read();
131
+
132
+ header('Content-Description: File Transfer');
133
+ header('Content-type: text/plain');
134
+ header('Content-Disposition: attachment; filename="error-log.txt"');
135
+ header('Expires: 0');
136
+ header('Cache-Control: must-revalidate');
137
+ header('Pragma: public');
138
+ header('Content-Length: ' . strlen($log));
139
+ echo $log;
140
+ exit;
141
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/admin-options-legacy.php ADDED
@@ -0,0 +1,460 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ add_action('plugins_loaded', function () {
4
+ if (defined('WPRSS_ET_VERSION')) {
5
+ add_filter('wprss_settings_sections_array', 'wpra_add_legacy_display_settings_sections');
6
+ add_filter('wprss_settings_array', 'wpra_add_legacy_display_settings_fields');
7
+ }
8
+ });
9
+
10
+ /**
11
+ * Adds the sections for the legacy display settings.
12
+ *
13
+ * @since 4.13
14
+ *
15
+ * @param array $sections The settings section.
16
+ *
17
+ * @return array
18
+ */
19
+ function wpra_add_legacy_display_settings_sections($sections)
20
+ {
21
+ $sections['display'] = __('Display settings', 'wprss');
22
+ $sections['source'] = __('Source Display settings', 'wprss');
23
+ $sections['date'] = __('Date Display settings', 'wprss');
24
+
25
+ return $sections;
26
+ }
27
+
28
+ /**
29
+ * Adds the legacy display settings.
30
+ *
31
+ * @since 4.13
32
+ *
33
+ * @param array $settings The settings fields.
34
+ *
35
+ * @return array
36
+ */
37
+ function wpra_add_legacy_display_settings_fields($settings)
38
+ {
39
+ $settings['display'] = [
40
+ 'link-enable' => [
41
+ 'label' => __('Link title', 'wprss'),
42
+ 'callback' => 'wprss_setting_title_link_callback',
43
+ ],
44
+ 'title-limit' => [
45
+ 'label' => __('Title maximum length', 'wprss'),
46
+ 'callback' => 'wprss_setting_title_length_callback',
47
+ ],
48
+ 'authors-enable' => [
49
+ 'label' => __('Show authors', 'wprss'),
50
+ 'callback' => 'wprss_setting_authors_enable_callback',
51
+ ],
52
+ 'video-links' => [
53
+ 'label' => __('For video feed items use', 'wprss'),
54
+ 'callback' => 'wprss_setting_video_links_callback',
55
+ ],
56
+ 'pagination' => [
57
+ 'label' => __('Pagination type', 'wprss'),
58
+ 'callback' => 'wprss_setting_pagination_type_callback',
59
+ ],
60
+ 'feed-limit' => [
61
+ 'label' => __('Feed display limit', 'wprss'),
62
+ 'callback' => 'wprss_setting_feed_limit_callback',
63
+ ],
64
+ 'open-dd' => [
65
+ 'label' => __('Open links behaviour', 'wprss'),
66
+ 'callback' => 'wprss_setting_open_dd_callback',
67
+ ],
68
+ 'follow-dd' => [
69
+ 'label' => __('Set links as nofollow', 'wprss'),
70
+ 'callback' => 'wprss_setting_follow_dd_callback',
71
+ ],
72
+ ];
73
+
74
+ $settings['source'] = [
75
+ 'source-enable' => [
76
+ 'label' => __('Show source', 'wprss'),
77
+ 'callback' => 'wprss_setting_source_enable_callback',
78
+ ],
79
+ 'text-preceding-source' => [
80
+ 'label' => __('Text preceding source', 'wprss'),
81
+ 'callback' => 'wprss_setting_text_preceding_source_callback',
82
+ ],
83
+ 'source-link' => [
84
+ 'label' => __('Link source', 'wprss'),
85
+ 'callback' => 'wprss_setting_source_link_callback',
86
+ ],
87
+ ];
88
+
89
+ $settings['date'] = [
90
+ 'date-enable' => [
91
+ 'label' => __('Show date', 'wprss'),
92
+ 'callback' => 'wprss_setting_date_enable_callback',
93
+ ],
94
+ 'text-preceding-date' => [
95
+ 'label' => __('Text preceding date', 'wprss'),
96
+ 'callback' => 'wprss_setting_text_preceding_date_callback',
97
+ ],
98
+ 'date-format' => [
99
+ 'label' => __('Date format', 'wprss'),
100
+ 'callback' => 'wprss_setting_date_format_callback',
101
+ ],
102
+ 'time-ago-format-enable' => [
103
+ 'label' => __('Time ago format', 'wprss'),
104
+ 'callback' => 'wprss_setting_time_ago_format_enable_callback',
105
+ ],
106
+ ];
107
+
108
+ return $settings;
109
+ }
110
+
111
+ /**
112
+ * General settings display section header
113
+ *
114
+ * @since 3.5
115
+ */
116
+ function wprss_settings_display_callback()
117
+ {
118
+ printf(
119
+ '<p>%s</p>',
120
+ __('In this section you can find some general options that control how the feed items are displayed.', 'wprss')
121
+ );
122
+ }
123
+
124
+ /**
125
+ * Display settings for source section header
126
+ *
127
+ * @since 4.2.4
128
+ */
129
+ function wprss_settings_source_callback()
130
+ {
131
+ printf(
132
+ '<p>%s</p>',
133
+ __("Options that control how the feed item's source is displayed.", 'wprss')
134
+ );
135
+ }
136
+
137
+ /**
138
+ * Display settings for date section header
139
+ *
140
+ * @since 4.2.4
141
+ */
142
+ function wprss_settings_date_callback()
143
+ {
144
+ printf(
145
+ '<p>%s</p>',
146
+ __("Options that control how the feed item's date is displayed.", 'wprss')
147
+ );
148
+ }
149
+
150
+ /**
151
+ * Enable linked title options.
152
+ *
153
+ * @since 3.0
154
+ *
155
+ * @param array $field The field information.
156
+ */
157
+ function wprss_setting_title_link_callback($field)
158
+ {
159
+ $title_link = wprss_get_general_setting('title_link');
160
+ $checked = ($title_link == '1');
161
+
162
+ echo wprss_settings_render_checkbox(
163
+ $field['field_id'],
164
+ 'wprss_settings_general[title_link]',
165
+ '1',
166
+ $checked
167
+ );
168
+ echo wprss_settings_inline_help($field['field_id'], $field['tooltip']);
169
+ }
170
+
171
+ /**
172
+ * Title length limit option.
173
+ *
174
+ * @since 3.0
175
+ *
176
+ * @param array $field The field information.
177
+ */
178
+ function wprss_setting_title_length_callback($field)
179
+ {
180
+ $title_limit = wprss_get_general_setting('title_limit');
181
+
182
+ echo wprss_settings_render_input(
183
+ $field['field_id'],
184
+ 'wprss_settings_general[title_limit]',
185
+ $title_limit,
186
+ 'number',
187
+ [
188
+ 'placeholder' => __('No limit', 'wprss'),
189
+ 'class' => 'wprss-number-roller',
190
+ ]
191
+ );
192
+ echo wprss_settings_inline_help($field['field_id'], $field['tooltip']);
193
+ }
194
+
195
+ /**
196
+ * Shows the feed item authors option
197
+ *
198
+ * @since 4.2.4
199
+ *
200
+ * @param array $field The field information.
201
+ */
202
+ function wprss_setting_authors_enable_callback($field)
203
+ {
204
+ $authors_enable = wprss_get_general_setting('authors_enable');
205
+ $checked = ($authors_enable == '1');
206
+
207
+ echo wprss_settings_render_checkbox(
208
+ $field['field_id'],
209
+ 'wprss_settings_general[authors_enable]',
210
+ '1',
211
+ $checked
212
+ );
213
+ echo wprss_settings_inline_help($field['field_id'], $field['tooltip']);
214
+ }
215
+
216
+ /**
217
+ * Use original video link, or embedded video links dropdown.
218
+ *
219
+ * @since 3.4
220
+ *
221
+ * @param array $field The field information.
222
+ */
223
+ function wprss_setting_video_links_callback($field)
224
+ {
225
+ $video_link = wprss_get_general_setting('video_link');
226
+ $items = [
227
+ 'false' => __('Original page link', 'wprss'),
228
+ 'true' => __('Embedded video player link', 'wprss'),
229
+ ];
230
+
231
+ echo wprss_settings_render_select($field['field_id'], 'wprss_settings_general[video_link]', $items, $video_link);
232
+ echo wprss_settings_inline_help($field['field_id'], $field['tooltip']);
233
+
234
+ printf(
235
+ '<p><span class="description">%s</span></p>',
236
+ __('This will not affect already imported feed items.', 'wprss')
237
+ );
238
+ }
239
+
240
+ /**
241
+ * Pagination Type
242
+ *
243
+ * @since 4.2.3
244
+ *
245
+ * @param array $field The field information.
246
+ */
247
+ function wprss_setting_pagination_type_callback($field)
248
+ {
249
+ $pagination = wprss_get_general_setting('pagination');
250
+ $items = [
251
+ 'default' => __('"Older posts" and "Newer posts" links', 'wprss'),
252
+ 'numbered' => __('Page numbers with "Next" and "Previous" page links', 'wprss'),
253
+ ];
254
+
255
+ echo wprss_settings_render_select($field['field_id'], 'wprss_settings_general[pagination]', $items, $pagination);
256
+ echo wprss_settings_inline_help($field['field_id'], $field['tooltip']);
257
+ }
258
+
259
+ /**
260
+ * Set limit for feeds on frontend
261
+ *
262
+ * @since 2.0
263
+ *
264
+ * @param array $field The field information.
265
+ */
266
+ function wprss_setting_feed_limit_callback($field)
267
+ {
268
+ $feed_limit = wprss_get_general_setting('feed_limit');
269
+
270
+ echo wprss_settings_render_input($field['field_id'], 'wprss_settings_general[feed_limit]', $feed_limit);
271
+ echo wprss_settings_inline_help($field['field_id'], $field['tooltip']);
272
+ }
273
+
274
+ /**
275
+ * Link open setting dropdown
276
+ *
277
+ * @since 1.1
278
+ *
279
+ * @param array $field The field information.
280
+ */
281
+ function wprss_setting_open_dd_callback($field)
282
+ {
283
+ $open_dd = wprss_get_general_setting('open_dd');
284
+ $items = [
285
+ 'lightbox' => __('Lightbox', 'wprss'),
286
+ 'blank' => __('New window', 'wprss'),
287
+ 'self' => __('Self', 'wprss'),
288
+ ];
289
+
290
+ echo wprss_settings_render_select($field['field_id'], 'wprss_settings_general[open_dd]', $items, $open_dd);
291
+ echo wprss_settings_inline_help($field['field_id'], $field['tooltip']);
292
+ }
293
+
294
+ /**
295
+ * Follow or No Follow dropdown
296
+ *
297
+ * @since 1.1
298
+ *
299
+ * @param array $field The field information.
300
+ */
301
+ function wprss_setting_follow_dd_callback($field)
302
+ {
303
+ $follow_dd = wprss_get_general_setting('follow_dd');
304
+ $checked = ($follow_dd === 'no_follow');
305
+
306
+ echo wprss_settings_render_checkbox(
307
+ $field['field_id'],
308
+ 'wprss_settings_general[follow_dd]',
309
+ 'no_follow',
310
+ $checked
311
+ );
312
+ echo wprss_settings_inline_help($field['field_id'], $field['tooltip']);
313
+ }
314
+
315
+ /**
316
+ * Enable source
317
+ *
318
+ * @since 3.0
319
+ *
320
+ * @param array $field The field information.
321
+ */
322
+ function wprss_setting_source_enable_callback($field)
323
+ {
324
+ $source_enable = wprss_get_general_setting('source_enable');
325
+ $checked = ($source_enable == '1');
326
+
327
+ echo wprss_settings_render_checkbox(
328
+ $field['field_id'],
329
+ 'wprss_settings_general[source_enable]',
330
+ '1',
331
+ $checked
332
+ );
333
+ echo wprss_settings_inline_help($field['field_id'], $field['tooltip']);
334
+ }
335
+
336
+ /**
337
+ * Set text preceding source
338
+ *
339
+ * @since 3.0
340
+ *
341
+ * @param array $field The field information.
342
+ */
343
+ function wprss_setting_text_preceding_source_callback($field)
344
+ {
345
+ $text_preceding_source = wprss_get_general_setting('text_preceding_source');
346
+
347
+ echo wprss_settings_render_input(
348
+ $field['field_id'],
349
+ 'wprss_settings_general[text_preceding_source]',
350
+ $text_preceding_source
351
+ );
352
+ echo wprss_settings_inline_help($field['field_id'], $field['tooltip']);
353
+ }
354
+
355
+ /**
356
+ * Enable linked title
357
+ *
358
+ * @since 3.0
359
+ *
360
+ * @param array $field The field information.
361
+ */
362
+ function wprss_setting_source_link_callback($field)
363
+ {
364
+ $source_link = wprss_get_general_setting('source_link');
365
+ $checked = ($source_link == '1');
366
+
367
+ echo wprss_settings_render_checkbox(
368
+ $field['field_id'],
369
+ 'wprss_settings_general[source_link]',
370
+ '1',
371
+ $checked
372
+ );
373
+ echo wprss_settings_inline_help($field['field_id'], $field['tooltip']);
374
+ }
375
+
376
+ /**
377
+ * Enable date
378
+ *
379
+ * @since 3.0
380
+ *
381
+ * @param array $field The field information.
382
+ */
383
+ function wprss_setting_date_enable_callback($field)
384
+ {
385
+ $date_enable = wprss_get_general_setting('date_enable');
386
+ $checked = ($date_enable == '1');
387
+
388
+ echo wprss_settings_render_checkbox(
389
+ $field['field_id'],
390
+ 'wprss_settings_general[date_enable]',
391
+ '1',
392
+ $checked
393
+ );
394
+ echo wprss_settings_inline_help($field['field_id'], $field['tooltip']);
395
+ }
396
+
397
+ /**
398
+ * Set text preceding date
399
+ *
400
+ * @since 3.0
401
+ *
402
+ * @param array $field The field information.
403
+ */
404
+ function wprss_setting_text_preceding_date_callback($field)
405
+ {
406
+ $text_preceding_date = wprss_get_general_setting('text_preceding_date');
407
+
408
+ echo wprss_settings_render_input(
409
+ $field['field_id'],
410
+ 'wprss_settings_general[text_preceding_date]',
411
+ $text_preceding_date
412
+ );
413
+ echo wprss_settings_inline_help($field['field_id'], $field['tooltip']);
414
+ }
415
+
416
+ /**
417
+ * Set date format
418
+ *
419
+ * @since 3.0
420
+ *
421
+ * @param array $field The field information.
422
+ */
423
+ function wprss_setting_date_format_callback($field)
424
+ {
425
+ $date_format = wprss_get_general_setting('date_format');
426
+
427
+ echo wprss_settings_render_input(
428
+ $field['field_id'],
429
+ 'wprss_settings_general[date_format]',
430
+ $date_format
431
+ );
432
+ echo wprss_settings_inline_help($field['field_id'], $field['tooltip']);
433
+
434
+ printf(
435
+ '<p><a href="%s">%s</a></p>',
436
+ 'https://codex.wordpress.org/Formatting_Date_and_Time',
437
+ __('PHP Date Format Reference', 'wprss')
438
+ );
439
+ }
440
+
441
+ /**
442
+ * Time ago format checkbox
443
+ *
444
+ * @since 4.2
445
+ *
446
+ * @param array $field The field information.
447
+ */
448
+ function wprss_setting_time_ago_format_enable_callback($field)
449
+ {
450
+ $time_ago_format = wprss_get_general_setting('time_ago_format_enable');
451
+ $checked = ($time_ago_format == '1');
452
+
453
+ echo wprss_settings_render_checkbox(
454
+ $field['field_id'],
455
+ 'wprss_settings_general[time_ago_format_enable]',
456
+ '1',
457
+ $checked
458
+ );
459
+ echo wprss_settings_inline_help($field['field_id'], $field['tooltip']);
460
+ }
includes/admin-options.php CHANGED
@@ -48,15 +48,13 @@
48
  'wprss_settings_license_keys',
49
  'wprss_settings_license_keys_validate'
50
  );
51
-
52
 
53
  $sections = apply_filters(
54
  'wprss_settings_sections_array',
55
  array(
56
- 'general' => __( 'General plugin settings', WPRSS_TEXT_DOMAIN ),
57
- 'display' => __( 'General display settings', WPRSS_TEXT_DOMAIN ),
58
- 'source' => __( 'Source display settings', WPRSS_TEXT_DOMAIN ),
59
- 'date' => __( 'Date display settings', WPRSS_TEXT_DOMAIN ),
60
  'styles' => __( 'Styles', WPRSS_TEXT_DOMAIN ),
61
  )
62
  );
@@ -94,183 +92,79 @@
94
  'label' => __( 'Unique titles only', WPRSS_TEXT_DOMAIN),
95
  'callback' => 'wprss_setting_unique_titles'
96
  ),
 
 
 
97
  'custom-feed-url' => array(
98
  'label' => __( 'Custom feed URL', WPRSS_TEXT_DOMAIN ),
99
  'callback' => 'wprss_settings_custom_feed_url_callback'
100
  ),
101
  'custom-feed-title' => array(
102
- 'label' => __( 'Custom feed Title', WPRSS_TEXT_DOMAIN ),
103
  'callback' => 'wprss_settings_custom_feed_title_callback'
104
  ),
105
  'custom-feed-limit' => array(
106
  'label' => __( 'Custom feed limit', WPRSS_TEXT_DOMAIN ),
107
- 'callback' => 'wprss_setings_custom_feed_limit_callback'
108
- ),
109
- // 'tracking' => array(
110
- // 'label' => __( 'Anonymous tracking', WPRSS_TEXT_DOMAIN ),
111
- // 'callback' => 'wprss_tracking_callback',
112
- // )
113
- ),
114
-
115
- 'display' => array(
116
- // Title options
117
- 'link-enable' => array(
118
- 'label' => __( 'Link title', WPRSS_TEXT_DOMAIN ),
119
- 'callback' => 'wprss_setting_title_link_callback'
120
- ),
121
- 'title-limit' => array(
122
- 'label' => __( 'Title maximum length', WPRSS_TEXT_DOMAIN ),
123
- 'callback' => 'wprss_setting_title_length_callback'
124
- ),
125
-
126
-
127
-
128
- // Misc Options
129
- 'authors-enable' => array(
130
- 'label' => __( 'Show authors', WPRSS_TEXT_DOMAIN ),
131
- 'callback' => 'wprss_setting_authors_enable_callback',
132
- ),
133
- 'video-links' => array(
134
- 'label' => __( 'For video feed items use', WPRSS_TEXT_DOMAIN ),
135
- 'callback' => 'wprss_setting_video_links_callback'
136
- ),
137
- 'pagination' => array(
138
- 'label' => __( 'Pagination type', WPRSS_TEXT_DOMAIN ),
139
- 'callback' => 'wprss_setting_pagination_type_callback',
140
- ),
141
- 'feed-limit' => array(
142
- 'label' => __( 'Feed display limit', WPRSS_TEXT_DOMAIN ),
143
- 'callback' => 'wprss_setting_feed_limit_callback'
144
- ),
145
- 'open-dd' => array(
146
- 'label' => __( 'Open links behaviour', WPRSS_TEXT_DOMAIN ),
147
- 'callback' => 'wprss_setting_open_dd_callback'
148
- ),
149
- 'follow-dd' => array(
150
- 'label' => __( 'Set links as nofollow', WPRSS_TEXT_DOMAIN ),
151
- 'callback' => 'wprss_setting_follow_dd_callback'
152
- ),
153
- ),
154
-
155
- // Source Options
156
- 'source' => array(
157
- 'source-enable' => array(
158
- 'label' => __( 'Show source', WPRSS_TEXT_DOMAIN ),
159
- 'callback' => 'wprss_setting_source_enable_callback'
160
- ),
161
- 'text-preceding-source' => array(
162
- 'label' => __( 'Text preceding source', WPRSS_TEXT_DOMAIN ),
163
- 'callback' => 'wprss_setting_text_preceding_source_callback'
164
- ),
165
- 'source-link' => array(
166
- 'label' => __( 'Link source', WPRSS_TEXT_DOMAIN ),
167
- 'callback' => 'wprss_setting_source_link_callback'
168
- ),
169
- ),
170
-
171
- // Date options
172
- 'date' => array(
173
- 'date-enable' => array(
174
- 'label' => __( 'Show date', WPRSS_TEXT_DOMAIN ),
175
- 'callback' => 'wprss_setting_date_enable_callback'
176
- ),
177
- 'text-preceding-date' => array(
178
- 'label' => __( 'Text preceding date', WPRSS_TEXT_DOMAIN ),
179
- 'callback' => 'wprss_setting_text_preceding_date_callback'
180
- ),
181
- 'date-format' => array(
182
- 'label' => __( 'Date format', WPRSS_TEXT_DOMAIN ),
183
- 'callback' => 'wprss_setting_date_format_callback'
184
- ),
185
- 'time-ago-format-enable' => array(
186
- 'label' => __( 'Time ago format', WPRSS_TEXT_DOMAIN ),
187
- 'callback' => 'wprss_setting_time_ago_format_enable_callback'
188
  ),
189
  ),
 
 
190
 
191
- 'styles' => array(
192
- 'styles-disable' => array(
193
- 'label' => __( 'Disable Styles', WPRSS_TEXT_DOMAIN ),
194
- 'callback' => 'wprss_setting_styles_disable_callback'
195
- )
196
- )
197
  )
198
  );
199
-
200
  if ( apply_filters( 'wprss_use_fixed_feed_limit', FALSE ) === FALSE ) {
201
  unset( $settings['general']['limit-feed-items-db'] );
202
  }
203
-
204
  $setting_field_id_prefix = 'wprss-settings-';
205
 
206
 
207
  // Loop through each setting field and register it
208
  foreach( $settings as $section => $fields ) {
209
- if ( count( $fields ) > 0 ) {
210
- $section_desc = $sections[ $section ];
211
- add_settings_section(
212
- "wprss_settings_${section}_section",
213
- $section_desc,
214
- "wprss_settings_${section}_callback",
215
- 'wprss_settings_general'
216
- );
217
 
218
- foreach ( $fields as $id => $data ) {
219
-
220
- /**
221
- * @var This will be passed to the field callback as the only argument
222
- * @see http://codex.wordpress.org/Function_Reference/add_settings_field#Parameters
223
- */
224
- $callback_args = array(
225
- 'field_id' => $id,
226
- 'field_id_prefix' => $setting_field_id_prefix,
227
- 'section_id' => $section,
228
- 'field_label' => isset( $data['label'] ) ? $data['label'] : null,
229
- 'tooltip' => isset( $data['tooltip'] ) ? $data['tooltip'] : null
230
- );
231
-
232
-
233
- add_settings_field(
234
- $setting_field_id_prefix . $id,
235
- $data['label'],
236
- $data['callback'],
237
- 'wprss_settings_general',
238
- "wprss_settings_${section}_section",
239
- $callback_args
240
- );
241
 
242
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
243
  }
244
  }
245
 
246
-
247
- /*
248
- // SECURE RESET OPTION
249
- register_setting(
250
- 'wprss_secure_reset', // A settings group name.
251
- 'wprss_secure_reset_code', // The name of an option to sanitize and save.
252
- '' // A callback function that sanitizes the option's value.
253
- );
254
- add_settings_section(
255
- 'wprss_secure_reset_section', // ID of section
256
- __( 'Secure Reset', WPRSS_TEXT_DOMAIN ), // Title of section
257
- 'wprss_secure_reset_section_callback', // Callback that renders the section header
258
- 'wprss_settings_general' // The page on which to display the section
259
- );
260
- add_settings_field(
261
- 'wprss-settings-secure-reset', // ID of setting
262
- __( 'Secure Reset', WPRSS_TEXT_DOMAIN ), // The title of the setting
263
- 'wprss_settings_secure_reset_code_callback', // The callback that renders the setting
264
- 'wprss_settings_general', // The page on which to display the setting
265
- "wprss_secure_reset_section" // The section in which to display the setting
266
- );
267
- */
268
-
269
- //If user requested to download system info, generate the download.
270
- if ( isset( $_POST['wprss-sysinfo'] ) )
271
- do_action( 'wprss_download_sysinfo' );
272
  if ( isset( $_POST['wprss-sysinfo'] ) ) {
273
- // do_action( 'wprss_download_log' );
274
  }
275
 
276
  do_action( 'wprss_admin_init' );
@@ -353,9 +247,31 @@
353
  * @since 1.1
354
  */
355
  function wprss_settings_page_display() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
356
  ?>
357
  <div class="wrap">
358
- <h2><?php _e( 'WP RSS Aggregator Settings', WPRSS_TEXT_DOMAIN ); ?></h2>
 
 
359
 
360
  <?php settings_errors(); ?>
361
 
@@ -363,22 +279,23 @@
363
 
364
  <?php
365
 
366
- $default_tabs = array(
367
- 'general' => array(
368
  'label' => __( 'General', WPRSS_TEXT_DOMAIN ),
369
  'slug' => 'general_settings',
370
  ),
371
- 'licenses' => array(
372
- 'label' => __( 'Licenses', WPRSS_TEXT_DOMAIN ),
373
- 'slug' => 'licenses_settings'
374
- )
375
  );
376
 
377
- $addon_tabs = apply_filters( 'wprss_options_tabs', array() );
378
 
379
- $tabs = array_merge( array( $default_tabs['general'] ), $addon_tabs , array( $default_tabs['licenses'] ) );
 
 
 
 
 
380
 
381
- $show_tabs = ( count( $addon_tabs ) > 0 ) || apply_filters( 'wprss_show_settings_tabs_condition', FALSE );
382
 
383
  if ( $show_tabs ) { ?>
384
  <h2 class="nav-tab-wrapper">
@@ -405,7 +322,7 @@
405
  settings_fields( 'wprss_settings_license_keys' );
406
  do_settings_sections( 'wprss_settings_license_keys' );
407
  }
408
-
409
  do_action( 'wprss_add_settings_fields_sections', $active_tab );
410
  }
411
 
@@ -420,6 +337,7 @@
420
 
421
  /**
422
  * General settings section header
 
423
  * @since 3.0
424
  */
425
  function wprss_settings_general_callback() {
@@ -428,35 +346,26 @@
428
 
429
 
430
  /**
431
- * General settings display section header
432
- * @since 3.5
433
- */
434
- function wprss_settings_display_callback() {
435
- echo wpautop( __( 'In this section you can find some general options that control how the feed items are displayed.', WPRSS_TEXT_DOMAIN ) );
436
- }
437
-
438
-
439
- /**
440
- * Display settings for source section header
441
  *
442
- * @since 4.2.4
443
  */
444
- function wprss_settings_source_callback() {
445
- echo wpautop( __( "Options that control how the feed item's source is displayed.", WPRSS_TEXT_DOMAIN ) );
446
  }
447
 
448
  /**
449
- * Display settings for date section header
450
  *
451
- * @since 4.2.4
452
  */
453
- function wprss_settings_date_callback() {
454
- echo wpautop( __( "Options that control how the feed item's date is displayed.", WPRSS_TEXT_DOMAIN ) );
455
  }
456
 
457
-
458
  /**
459
  * General settings styles section header
 
460
  * @since 3.0
461
  */
462
  function wprss_settings_styles_callback() {
@@ -464,292 +373,6 @@
464
  }
465
 
466
 
467
- /**
468
- * General settings scure reset section header
469
- * @since 3.0
470
- */
471
- function wprss_secure_reset_section_callback() {
472
- echo wpautop( __( 'Set your security reset code, in case of any errors.', WPRSS_TEXT_DOMAIN ) );
473
- }
474
-
475
-
476
- /**
477
- * Tracking settings section header
478
- * @since 3.0
479
- */
480
- function wprss_tracking_section_callback() {
481
- echo wpautop( __( 'Participate in helping us make the plugin better.', WPRSS_TEXT_DOMAIN ) );
482
- }
483
-
484
-
485
- /**
486
- * Follow or No Follow dropdown
487
- * @since 1.1
488
- */
489
- function wprss_setting_follow_dd_callback( $field ) {
490
- $follow_dd = wprss_get_general_setting( 'follow_dd' );
491
-
492
- $checked = ( $follow_dd === 'no_follow' );
493
- $checked_attr = ( $checked )? 'checked="checked"' : '';
494
- ?>
495
- <input type="hidden" name="wprss_settings_general[follow_dd]" value="follow" />
496
- <input type="checkbox" id="<?php echo $field['field_id'] ?>" name="wprss_settings_general[follow_dd]" value="no_follow" <?php echo $checked_attr ?> />
497
- <?php echo wprss_settings_inline_help( $field['field_id'], $field['tooltip'] );
498
- }
499
-
500
-
501
- /**
502
- * Use original video link, or embedded video links dropwdown
503
- * @since 3.4
504
- */
505
- function wprss_setting_video_links_callback( $field ) {
506
- $video_link = wprss_get_general_setting('video_link');
507
- $items = array(
508
- 'false' => __( 'Original page link', WPRSS_TEXT_DOMAIN ),
509
- 'true' => __( 'Embedded video player link', WPRSS_TEXT_DOMAIN )
510
- );
511
- ?>
512
- <select id="<?php echo $field['field_id'] ?>" name="wprss_settings_general[video_link]">
513
- <?php
514
- foreach ( $items as $boolean => $text ) {
515
- $selected = ( $video_link === $boolean )? 'selected="selected"' : '';
516
- ?><option value="<?php echo $boolean ?>" <?php echo $selected ?>><?php echo $text ?></option><?php
517
- }
518
- ?>
519
- </select>
520
- <?php echo wprss_settings_inline_help( $field['field_id'], $field['tooltip'] ) ?>
521
- <p>
522
- <span class="description">
523
- <?php _e( 'This will not affect already imported feed items.', WPRSS_TEXT_DOMAIN ) ?>
524
- </span>
525
- </p>
526
- <?php
527
- }
528
-
529
-
530
- /**
531
- * Link open setting dropdown
532
- * @since 1.1
533
- */
534
- function wprss_setting_open_dd_callback( $field ) {
535
- $open_dd = wprss_get_general_setting('open_dd');
536
-
537
- $items = array(
538
- 'lightbox' => __( 'Lightbox', WPRSS_TEXT_DOMAIN ),
539
- 'blank' => __( 'New window', WPRSS_TEXT_DOMAIN ),
540
- 'self' => __( 'Self', WPRSS_TEXT_DOMAIN )
541
- );
542
- ?>
543
- <select id="<?php echo $field['field_id'] ?>" name="wprss_settings_general[open_dd]">
544
- <?php
545
- foreach( $items as $key => $item ) {
546
- $selected = ( $open_dd == $key ) ? 'selected="selected"' : '';
547
- ?><option value="<?php echo $key ?>" <?php echo $selected ?>><?php echo $item ?></option><?php
548
- }
549
- ?>
550
- </select>
551
- <?php echo wprss_settings_inline_help( $field['field_id'], $field['tooltip'] );
552
- }
553
-
554
-
555
- /**
556
- * Set limit for feeds on frontend
557
- * @since 2.0
558
- */
559
- function wprss_setting_feed_limit_callback( $field ) {
560
- $feed_limit = wprss_get_general_setting( 'feed_limit' );
561
- ?>
562
- <input id="<?php echo $field['field_id'] ?>" name="wprss_settings_general[feed_limit]" type="text" value="<?php echo $feed_limit ?>" />
563
- <?php echo wprss_settings_inline_help( $field['field_id'], $field['tooltip'] );
564
- }
565
-
566
-
567
- /**
568
- * Set date format
569
- * @since 3.0
570
- */
571
- function wprss_setting_date_format_callback( $field ) {
572
- $date_format = wprss_get_general_setting( 'date_format' );
573
- ?>
574
- <input id="<?php echo $field['field_id'] ?>" name="wprss_settings_general[date_format]" type="text" value="<?php echo $date_format ?>" />
575
- <?php echo wprss_settings_inline_help( $field['field_id'], $field['tooltip'] ) ?>
576
- <p>
577
- <a href="https://codex.wordpress.org/Formatting_Date_and_Time">
578
- <?php _e( 'PHP Date Format Reference', WPRSS_TEXT_DOMAIN ); ?>
579
- </a>
580
- </p>
581
- <?php
582
- }
583
-
584
-
585
-
586
- /**
587
- * Enable linked title
588
- * @since 3.0
589
- */
590
- function wprss_setting_title_link_callback( $field ) {
591
- $title_link = wprss_get_general_setting( 'title_link' );
592
- ?>
593
- <input id="<?php echo $field['field_id'] ?>" name="wprss_settings_general[title_link]" type="checkbox" value="1" <?php echo checked( 1, $title_link, false ) ?> />
594
- <?php echo wprss_settings_inline_help( $field['field_id'], $field['tooltip'] );
595
- }
596
-
597
-
598
-
599
- /**
600
- * Set the title length limit
601
- * @since 3.0
602
- */
603
- function wprss_setting_title_length_callback( $field ) {
604
- $title_limit = wprss_get_general_setting( 'title_limit' );
605
- ?>
606
- <input id="<?php echo $field['field_id'] ?>" name="wprss_settings_general[title_limit]" type="number" class="wprss-number-roller" min="0" value="<?php echo $title_limit ?>" placeholder="<?php _e( 'No limit', WPRSS_TEXT_DOMAIN ) ?>" />
607
- <?php echo wprss_settings_inline_help( $field['field_id'], $field['tooltip'] );
608
- }
609
-
610
-
611
- /**
612
- * Enable source
613
- * @since 3.0
614
- */
615
- function wprss_setting_source_enable_callback( $field ) {
616
- $source_enable = wprss_get_general_setting( 'source_enable' );
617
- ?>
618
- <input id="<?php echo $field['field_id'] ?>" name="wprss_settings_general[source_enable]" type="checkbox" value="1" <?php echo checked( 1, $source_enable, false ) ?> />
619
- <?php echo wprss_settings_inline_help( $field['field_id'], $field['tooltip'] );
620
- }
621
-
622
- /**
623
- * Enable linked title
624
- * @since 3.0
625
- */
626
- function wprss_setting_source_link_callback( $field ) {
627
- $source_link = wprss_get_general_setting( 'source_link' );
628
- ?>
629
- <input id="<?php echo $field['field_id'] ?>" name="wprss_settings_general[source_link]" type="checkbox" value="1" <?php echo checked( 1, $source_link, false ) ?> />
630
- <?php echo wprss_settings_inline_help( $field['field_id'], $field['tooltip'] );
631
- }
632
-
633
- /**
634
- * Renders a <select> HTML tag from its parameters.
635
- *
636
- * @since 4.10
637
- * @return string The HTML of a <select> tag.
638
- */
639
- function wprss_settings_render_select($id, $name, $items, $selected = null, $attributes = array())
640
- {
641
- ob_start();
642
- $attributes = array_merge($attributes, array(
643
- 'id' => $id,
644
- 'name' => $name,
645
- ));
646
-
647
- $attributePairs = $attributes;
648
- array_walk($attributePairs, function(&$v, $k) { $v = sprintf('%1$s="%2$s"', $k, $v); });
649
- $attributesString = implode(' ', $attributePairs);
650
- ?>
651
- <select <?php echo $attributesString ?>>
652
- <?php
653
- foreach( $items as $_key => $_item ) {
654
- $_key = (string) $_key;
655
- $_item = (string) $_item;
656
- $isSelected = $selected == $_key;
657
- ?><option value="<?php echo $_key ?>"<?php if ($isSelected): ?> selected="selected"<?php endif ?>><?php echo htmlspecialchars($_item) ?></option><?php
658
- }
659
- ?>
660
- </select>
661
- <?php
662
- $html = ob_get_clean();
663
- return $html;
664
- }
665
-
666
- /**
667
- * Gets options that should go in a dropdown which represents a
668
- * feed-source-specific boolean setting.
669
- *
670
- * @since 4.10
671
- * @return array An array with options.
672
- */
673
- function wprss_settings_get_feed_source_boolean_options()
674
- {
675
- return array(
676
- 1 => __('On', WPRSS_TEXT_DOMAIN),
677
- 0 => __('Off', WPRSS_TEXT_DOMAIN),
678
- -1 => __('Default', WPRSS_TEXT_DOMAIN),
679
- );
680
- }
681
-
682
-
683
- /**
684
- * Set text preceding source
685
- * @since 3.0
686
- */
687
- function wprss_setting_text_preceding_source_callback( $field ) {
688
- $text_preceding_source = wprss_get_general_setting( 'text_preceding_source' );
689
- ?>
690
- <input id="<?php echo $field['field_id'] ?>" name="wprss_settings_general[text_preceding_source]" type="text" value="<?php echo $text_preceding_source ?>" />
691
- <?php echo wprss_settings_inline_help( $field['field_id'], $field['tooltip'] );
692
- }
693
- /**
694
- * Enable date
695
- * @since 3.0
696
- */
697
- function wprss_setting_date_enable_callback( $field ) {
698
- $date_enable = wprss_get_general_setting( 'date_enable' );
699
- ?>
700
- <input id="<?php echo $field['field_id'] ?>" name="wprss_settings_general[date_enable]" type="checkbox" value="1" <?php echo checked( 1, $date_enable, false ) ?> />
701
- <?php echo wprss_settings_inline_help( $field['field_id'], $field['tooltip'] );
702
- }
703
-
704
- /**
705
- * Set text preceding date
706
- * @since 3.0
707
- */
708
- function wprss_setting_text_preceding_date_callback( $field ) {
709
- $text_preceding_date = wprss_get_general_setting( 'text_preceding_date' );
710
- ?>
711
- <input id="<?php echo $field['field_id'] ?>" name="wprss_settings_general[text_preceding_date]" type="text" value="<?php echo $text_preceding_date ?>" />
712
- <?php echo wprss_settings_inline_help( $field['field_id'], $field['tooltip'] );
713
- }
714
-
715
-
716
- /**
717
- * Shows the feed item authors option
718
- *
719
- * @since 4.2.4
720
- */
721
- function wprss_setting_authors_enable_callback( $field ) {
722
- $authors_enable = wprss_get_general_setting( 'authors_enable' );
723
- ?>
724
- <input id="<?php echo $field['field_id'] ?>" name="wprss_settings_general[authors_enable]" type="checkbox" value="1" <?php echo checked( 1, $authors_enable, false ) ?> />
725
- <?php echo wprss_settings_inline_help( $field['field_id'], $field['tooltip'] );
726
- }
727
-
728
-
729
- /**
730
- * Pagination Type
731
- *
732
- * @since 4.2.3
733
- */
734
- function wprss_setting_pagination_type_callback( $field ) {
735
- $pagination = wprss_get_general_setting( 'pagination' );
736
- $options = array(
737
- 'default' => __( '"Older posts" and "Newer posts" links', WPRSS_TEXT_DOMAIN ),
738
- 'numbered' => __( 'Page numbers with "Next" and "Previous" page links', WPRSS_TEXT_DOMAIN ),
739
- );
740
- ?>
741
- <select id="<?php echo $field['field_id'] ?>" name="wprss_settings_general[pagination]">
742
- <?php
743
- foreach( $options as $value => $text ) {
744
- $selected = ( $value === $pagination )? 'selected="selected"' : '';
745
- ?><option value="<?php echo $value ?>" <?php echo $selected ?>><?php echo $text ?></option><?php
746
- }
747
- ?>
748
- </select>
749
- <?php echo wprss_settings_inline_help( $field['field_id'], $field['tooltip'] );
750
- }
751
-
752
-
753
 
754
  /**
755
  * Limit number of feed items stored by their age
@@ -808,7 +431,9 @@
808
  */
809
  function wprss_get_schedules() {
810
  $schedules = wp_get_schedules();
811
- uasort( $schedules, create_function( '$a,$b', 'return $a["interval"]-$b["interval"];' ) );
 
 
812
  return $schedules;
813
  }
814
 
@@ -818,8 +443,7 @@
818
  * @since 3.0
819
  */
820
  function wprss_setting_cron_interval_callback( $field ) {
821
- $options = get_option( 'wprss_settings_general' );
822
- $current = $options['cron_interval'];
823
 
824
  $schedules = wprss_get_schedules();
825
  // Set the allowed Cron schedules, we don't want any intervals that can lead to issues with server load
@@ -880,7 +504,7 @@
880
  * Sets the custom feed limit
881
  * @since 3.3
882
  */
883
- function wprss_setings_custom_feed_limit_callback( $field ) {
884
  $custom_feed_limit = wprss_get_general_setting( 'custom_feed_limit' );
885
  ?>
886
  <input id="<?php echo $field['field_id'] ?>" name="wprss_settings_general[custom_feed_limit]" placeholder="<?php _e( 'Default', WPRSS_TEXT_DOMAIN ) ?>" min="0" class="wprss-number-roller" type="number" value="<?php echo $custom_feed_limit ?>" />
@@ -1001,16 +625,100 @@
1001
  }
1002
 
1003
  /**
1004
- * Time ago format checkbox
1005
- * @since 4.2
 
 
 
1006
  */
1007
- function wprss_setting_time_ago_format_enable_callback( $field ) {
1008
- $time_ago_format = wprss_get_general_setting( 'time_ago_format_enable' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1009
  ?>
1010
- <input type="checkbox" id="<?php echo $field['field_id'] ?>" name="wprss_settings_general[time_ago_format_enable]" value="1" <?php echo checked( 1, $time_ago_format, false ) ?> />
1011
- <?php echo wprss_settings_inline_help( $field['field_id'], $field['tooltip'] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1012
  }
1013
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1014
 
1015
  /**
1016
  * Pretty-prints the difference in two times.
@@ -1096,8 +804,7 @@
1096
  * @since 3.0
1097
  */
1098
  function wprss_settings_general_validate( $input ) {
1099
- $options = get_option( 'wprss_settings_general' );
1100
- $current_cron_interval = $options['cron_interval'];
1101
 
1102
  // Create our array for storing the validated options
1103
  $output = array();
@@ -1145,7 +852,7 @@
1145
  else
1146
  $output['video_link'] = 'true';
1147
 
1148
- if ( $input['cron_interval'] != $current_cron_interval ) {
1149
  wp_clear_scheduled_hook( 'wprss_fetch_all_feeds_hook' );
1150
  wp_schedule_event( time(), $input['cron_interval'], 'wprss_fetch_all_feeds_hook' );
1151
  }
48
  'wprss_settings_license_keys',
49
  'wprss_settings_license_keys_validate'
50
  );
 
51
 
52
  $sections = apply_filters(
53
  'wprss_settings_sections_array',
54
  array(
55
+ 'general' => __( 'General Plugin Settings', WPRSS_TEXT_DOMAIN ),
56
+ 'custom_feed' => __( 'Create a Custom RSS Feed', WPRSS_TEXT_DOMAIN ),
57
+ 'advanced' => __( 'Advanced Settings', WPRSS_TEXT_DOMAIN ),
 
58
  'styles' => __( 'Styles', WPRSS_TEXT_DOMAIN ),
59
  )
60
  );
92
  'label' => __( 'Unique titles only', WPRSS_TEXT_DOMAIN),
93
  'callback' => 'wprss_setting_unique_titles'
94
  ),
95
+ ),
96
+
97
+ 'custom_feed' => array(
98
  'custom-feed-url' => array(
99
  'label' => __( 'Custom feed URL', WPRSS_TEXT_DOMAIN ),
100
  'callback' => 'wprss_settings_custom_feed_url_callback'
101
  ),
102
  'custom-feed-title' => array(
103
+ 'label' => __( 'Custom feed title', WPRSS_TEXT_DOMAIN ),
104
  'callback' => 'wprss_settings_custom_feed_title_callback'
105
  ),
106
  'custom-feed-limit' => array(
107
  'label' => __( 'Custom feed limit', WPRSS_TEXT_DOMAIN ),
108
+ 'callback' => 'wprss_settings_custom_feed_limit_callback'
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  ),
110
  ),
111
+ )
112
+ );
113
 
114
+ $settings['styles'] = array(
115
+ 'styles-disable' => array(
116
+ 'label' => __( 'Disable Styles', WPRSS_TEXT_DOMAIN ),
117
+ 'callback' => 'wprss_setting_styles_disable_callback'
 
 
118
  )
119
  );
120
+
121
  if ( apply_filters( 'wprss_use_fixed_feed_limit', FALSE ) === FALSE ) {
122
  unset( $settings['general']['limit-feed-items-db'] );
123
  }
124
+
125
  $setting_field_id_prefix = 'wprss-settings-';
126
 
127
 
128
  // Loop through each setting field and register it
129
  foreach( $settings as $section => $fields ) {
130
+ if ( count( $fields ) === 0 ) {
131
+ continue;
132
+ }
 
 
 
 
 
133
 
134
+ add_settings_section(
135
+ "wprss_settings_${section}_section",
136
+ $sections[ $section ],
137
+ "wprss_settings_${section}_callback",
138
+ 'wprss_settings_general'
139
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
 
141
+ foreach ( $fields as $id => $data ) {
142
+ /**
143
+ * This will be passed to the field callback as the only argument
144
+ * @see http://codex.wordpress.org/Function_Reference/add_settings_field#Parameters
145
+ */
146
+ $callback_args = array(
147
+ 'field_id' => $id,
148
+ 'field_id_prefix' => $setting_field_id_prefix,
149
+ 'section_id' => $section,
150
+ 'field_label' => isset( $data['label'] ) ? $data['label'] : null,
151
+ 'tooltip' => isset( $data['tooltip'] ) ? $data['tooltip'] : null
152
+ );
153
+
154
+ add_settings_field(
155
+ $setting_field_id_prefix . $id,
156
+ $data['label'],
157
+ $data['callback'],
158
+ 'wprss_settings_general',
159
+ "wprss_settings_${section}_section",
160
+ $callback_args
161
+ );
162
  }
163
  }
164
 
165
+ // If user requested to download system info, generate the download.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
166
  if ( isset( $_POST['wprss-sysinfo'] ) ) {
167
+ do_action('wprss_download_sysinfo');
168
  }
169
 
170
  do_action( 'wprss_admin_init' );
247
  * @since 1.1
248
  */
249
  function wprss_settings_page_display() {
250
+ $etText = wprss_is_et_active() ? '<br/><br/>' . sprintf(__('Wondering how Templates work with Excerpts & Thumbnails? <a href="%s" target="_blank">Click here to learn more.</a>', WPRSS_TEXT_DOMAIN), 'https://kb.wprssaggregator.com/article/459-using-excerpts-thumbnails-with-templates') : '';
251
+
252
+ wprss_plugin_enqueue_app_scripts('wpra-settings', WPRSS_APP_JS . 'settings.min.js');
253
+ wp_enqueue_style('wpra-settings', WPRSS_APP_CSS . 'common.min.css');
254
+ wp_localize_script('wpra-settings', 'WpraSettings', [
255
+ 'notice' => [
256
+ 'id' => 'settings-notice',
257
+ 'visible' => !wprss_is_new_user(),
258
+ 'title' => __('The display options for WP RSS Aggregator have now become Templates.', WPRSS_TEXT_DOMAIN),
259
+ 'body' => __('As of Core version 4.13, we have introduced the concept of templates to replace the'
260
+ . ' display settings that were previously available on this page. These templates provide you'
261
+ . ' with more flexibility and new designs. They also come with a revamped <a target="_blank" href="https://kb.wprssaggregator.com/article/54-displaying-imported-items-shortcode">TinyMCE shortcode button</a>'
262
+ . ' for the Classic Editor and a <em><a href="https://kb.wprssaggregator.com/article/454-displaying-imported-items-block-gutenberg" target="_blank">brand new block</a></em> for those using WP 5.0+ with the Gutenberg block editor.'
263
+ . '<br/><br/>'
264
+ . 'Go to <em>Templates</em> under <em>RSS Aggregator</em> to set up your templates. Please note that the default '
265
+ . 'template you will see there is set up using your pre-existing display options, nothing is lost or changed.', WPRSS_TEXT_DOMAIN) . $etText,
266
+ 'learnMore' => 'https://www.wprssaggregator.com/core-version-4-13-celebrating-one-million-downloads/'
267
+ ]
268
+ ])
269
+
270
  ?>
271
  <div class="wrap">
272
+ <div id="wpra-settings-app"></div>
273
+
274
+ <h2><?php _e( 'WP RSS Aggregator Settings', WPRSS_TEXT_DOMAIN ); ?></h2>
275
 
276
  <?php settings_errors(); ?>
277
 
279
 
280
  <?php
281
 
282
+ $tabs = array(
283
+ array(
284
  'label' => __( 'General', WPRSS_TEXT_DOMAIN ),
285
  'slug' => 'general_settings',
286
  ),
 
 
 
 
287
  );
288
 
289
+ $tabs = apply_filters( 'wprss_options_tabs', $tabs );
290
 
291
+ if (count(wprss_get_addons()) > 0) {
292
+ $tabs[] = array(
293
+ 'label' => __( 'Licenses', WPRSS_TEXT_DOMAIN ),
294
+ 'slug' => 'licenses_settings'
295
+ );
296
+ }
297
 
298
+ $show_tabs = ( count( $tabs ) > 1 ) || apply_filters( 'wprss_show_settings_tabs_condition', FALSE );
299
 
300
  if ( $show_tabs ) { ?>
301
  <h2 class="nav-tab-wrapper">
322
  settings_fields( 'wprss_settings_license_keys' );
323
  do_settings_sections( 'wprss_settings_license_keys' );
324
  }
325
+
326
  do_action( 'wprss_add_settings_fields_sections', $active_tab );
327
  }
328
 
337
 
338
  /**
339
  * General settings section header
340
+ *
341
  * @since 3.0
342
  */
343
  function wprss_settings_general_callback() {
346
 
347
 
348
  /**
349
+ * Custom feed settings section header
 
 
 
 
 
 
 
 
 
350
  *
351
+ * @since 4.13
352
  */
353
+ function wprss_settings_custom_feed_callback() {
354
+ echo wpautop( __( 'WP RSS Aggregator creates a custom RSS feed for you that includes any items imported by the plugin. Use the below options to set it up.', WPRSS_TEXT_DOMAIN ) );
355
  }
356
 
357
  /**
358
+ * Advanced settings section header
359
  *
360
+ * @since 4.13
361
  */
362
+ function wprss_settings_advanced_callback() {
363
+ echo wpautop( __( 'Only change these options if you know what you are doing!', WPRSS_TEXT_DOMAIN ) );
364
  }
365
 
 
366
  /**
367
  * General settings styles section header
368
+ *
369
  * @since 3.0
370
  */
371
  function wprss_settings_styles_callback() {
373
  }
374
 
375
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
376
 
377
  /**
378
  * Limit number of feed items stored by their age
431
  */
432
  function wprss_get_schedules() {
433
  $schedules = wp_get_schedules();
434
+ uasort( $schedules, function($a, $b) {
435
+ return $a['interval'] - $b['interval'];
436
+ } );
437
  return $schedules;
438
  }
439
 
443
  * @since 3.0
444
  */
445
  function wprss_setting_cron_interval_callback( $field ) {
446
+ $current = wprss_get_general_setting('cron_interval');
 
447
 
448
  $schedules = wprss_get_schedules();
449
  // Set the allowed Cron schedules, we don't want any intervals that can lead to issues with server load
504
  * Sets the custom feed limit
505
  * @since 3.3
506
  */
507
+ function wprss_settings_custom_feed_limit_callback( $field ) {
508
  $custom_feed_limit = wprss_get_general_setting( 'custom_feed_limit' );
509
  ?>
510
  <input id="<?php echo $field['field_id'] ?>" name="wprss_settings_general[custom_feed_limit]" placeholder="<?php _e( 'Default', WPRSS_TEXT_DOMAIN ) ?>" min="0" class="wprss-number-roller" type="number" value="<?php echo $custom_feed_limit ?>" />
625
  }
626
 
627
  /**
628
+ * Gets options that should go in a dropdown which represents a
629
+ * feed-source-specific boolean setting.
630
+ *
631
+ * @since 4.10
632
+ * @return array An array with options.
633
  */
634
+ function wprss_settings_get_feed_source_boolean_options()
635
+ {
636
+ return array(
637
+ 1 => __('On', WPRSS_TEXT_DOMAIN),
638
+ 0 => __('Off', WPRSS_TEXT_DOMAIN),
639
+ -1 => __('Default', WPRSS_TEXT_DOMAIN),
640
+ );
641
+ }
642
+
643
+ /**
644
+ * Renders a <select> HTML tag from its parameters.
645
+ *
646
+ * @since 4.10
647
+ * @return string The HTML of a <select> tag.
648
+ */
649
+ function wprss_settings_render_select($id, $name, $items, $selected = null, $attributes = [])
650
+ {
651
+ ob_start();
652
+ $attributes = array_merge($attributes, [
653
+ 'id' => $id,
654
+ 'name' => $name,
655
+ ]);
656
+
657
+ $attributePairs = $attributes;
658
+ array_walk($attributePairs, function (&$v, $k) {
659
+ $v = sprintf('%1$s="%2$s"', $k, $v);
660
+ });
661
+ $attributesString = implode(' ', $attributePairs);
662
  ?>
663
+ <select <?php echo $attributesString ?>>
664
+ <?php
665
+ foreach ($items as $_key => $_item) {
666
+ $_key = (string) $_key;
667
+ $_item = (string) $_item;
668
+ $isSelected = $selected == $_key;
669
+ ?>
670
+ <option value="<?php echo $_key ?>"<?php if ($isSelected): ?> selected="selected"<?php endif ?>><?php echo htmlspecialchars($_item) ?></option><?php
671
+ }
672
+ ?>
673
+ </select>
674
+ <?php
675
+ $html = ob_get_clean();
676
+
677
+ return $html;
678
+ }
679
+
680
+ /**
681
+ * Renders an <input> HTML tag from its parameters.
682
+ *
683
+ * @since 4.13
684
+ * @return string The HTML of an <input> tag.
685
+ */
686
+ function wprss_settings_render_input($id, $name, $value, $type ='text', $attributes = [])
687
+ {
688
+ $attributes = array_merge($attributes, [
689
+ 'id' => $id,
690
+ 'name' => $name,
691
+ 'type' => $type,
692
+ 'value' => esc_attr($value)
693
+ ]);
694
+
695
+ $attributePairs = $attributes;
696
+
697
+ array_walk($attributePairs, function (&$v, $k) {
698
+ $v = sprintf('%1$s="%2$s"', $k, $v);
699
+ });
700
+
701
+ $attributesString = implode(' ', $attributePairs);
702
+
703
+ return sprintf('<input %s />', $attributesString);
704
  }
705
 
706
+ /**
707
+ * Renders an <input> checkbox HTML tag from its parameters.
708
+ *
709
+ * @since 4.13
710
+ * @return string The HTML of an <input> checkbox tag.
711
+ */
712
+ function wprss_settings_render_checkbox($id, $name, $value, $checked = false)
713
+ {
714
+ $attributes = [];
715
+
716
+ if ($checked) {
717
+ $attributes['checked'] = 'checked';
718
+ }
719
+
720
+ return wprss_settings_render_input($id, $name, $value, 'checkbox', $attributes);
721
+ }
722
 
723
  /**
724
  * Pretty-prints the difference in two times.
804
  * @since 3.0
805
  */
806
  function wprss_settings_general_validate( $input ) {
807
+ $current_cron_interval = wprss_get_general_setting( 'cron_interval');
 
808
 
809
  // Create our array for storing the validated options
810
  $output = array();
852
  else
853
  $output['video_link'] = 'true';
854
 
855
+ if ( isset($input['cron_interval']) && $input['cron_interval'] != $current_cron_interval ) {
856
  wp_clear_scheduled_hook( 'wprss_fetch_all_feeds_hook' );
857
  wp_schedule_event( time(), $input['cron_interval'], 'wprss_fetch_all_feeds_hook' );
858
  }
includes/admin-plugins.php CHANGED
@@ -18,8 +18,8 @@ add_action('admin_init', function () {
18
  }
19
 
20
  add_action('admin_footer', function () {
21
- wprss_plugin_enqueue_app_scripts('wpra-plugins', WPRSS_JS . 'plugins.min.js', array(), '0.1', true);
22
- wp_enqueue_style('wpra-plugins', WPRSS_CSS . 'plugins.min.css');
23
 
24
  $addons = wprss_find_installed_addon_names();
25
  $addons = array_fill_keys($addons, 1);
18
  }
19
 
20
  add_action('admin_footer', function () {
21
+ wprss_plugin_enqueue_app_scripts('wpra-plugins', WPRSS_APP_JS . 'plugins.min.js', array(), '0.1', true);
22
+ wp_enqueue_style('wpra-plugins', WPRSS_APP_CSS . 'plugins.min.css');
23
 
24
  $addons = wprss_find_installed_addon_names();
25
  $addons = array_fill_keys($addons, 1);
includes/admin-statistics.php DELETED
@@ -1,152 +0,0 @@
1
- <?php
2
-
3
- if ( !defined( 'WPRSS_TRACKING_SERVER_URL' ) )
4
- define( 'WPRSS_TRACKING_SERVER_URL', 'https://www.wprssaggregator.com/', TRUE );
5
-
6
- if ( !defined( 'WPRSS_TRACKING_INTEVAL' ) )
7
- define( 'WPRSS_TRACKING_INTEVAL', 'daily', TRUE );
8
-
9
-
10
- // add_action( 'admin_init', 'wprss_send_tracking_data' );
11
- function wprss_send_tracking_data() {
12
-
13
- // Check the tracking option - if turned off, exit out of function
14
- $tracking_option = wprss_get_general_setting('tracking');
15
- if ( $tracking_option == 0 || $tracking_option == FALSE ) return;
16
-
17
- // Get the tracking transient.
18
- $transient = get_transient( 'wprss_tracking_transient' );
19
- // If the transient did not expire, exit out of function
20
- if ( $transient !== FALSE && !isset( $_GET['wprss_send_report'] ) ) return;
21
- // If the GET parameter is set, show an admin notice
22
- if ( isset( $_GET['wprss_send_report'] ) ) {
23
- add_action( 'admin_notices', 'wprss_tracking_notice' );
24
- }
25
-
26
- // Check if running on localhost
27
- $site_url = site_url();
28
- $running_on_local = preg_match_all( "/(localhost|127\.0\.0\.1)/", $site_url, $matches ) > 0;
29
- if( $running_on_local ) {
30
- return;
31
- }
32
-
33
- // Get data about the plugin
34
- $plugin_data = get_plugin_data( WPRSS_FILE_CONSTANT );
35
-
36
- // Get the theme name
37
- if ( function_exists( 'wp_get_theme' ) ) {
38
- $theme_data = wp_get_theme();
39
- $theme_name = $theme_data->Name;
40
- } else {
41
- $theme_data = get_theme_data( get_stylesheet_directory() . '/style.css' );
42
- $theme_name = $theme_data['Name'];
43
- }
44
-
45
- // Get plugins
46
- $plugins = get_plugins();
47
- $active_plugins_option = get_option( 'active_plugins', array() );
48
- // Prepare plugin arrays
49
- $active_plugins = array();
50
- $inactive_plugins = array();
51
- // Loop through plugins
52
- foreach ( $plugins as $plugins_path => $plugin_info ) {
53
- // If plugin found in active plugins list, then add to the active_plugins array
54
- if ( in_array( $plugins_path, $active_plugins_option ) ) {
55
- $add_to = &$active_plugins;
56
- }
57
- // Otherwise add to inactive_plugins array
58
- else {
59
- $add_to = &$inactive_plugins;
60
- }
61
- // Add the plugin info to the chosen array
62
- $add_to[] = $plugin_info['Name'] . ' v' . $plugin_info['Version'];
63
- }
64
-
65
- // If multisite
66
- if ( is_multisite() ) {
67
- // Get network plugins
68
- $network_plugins = wp_get_active_network_plugins();
69
- $network_active_plugins_option = get_site_option( 'active_sitewide_plugins', array() );
70
- // Prepare plugin array
71
- $network_active_plugins = array();
72
- // Loop through plugins
73
- foreach ( $network_plugins as $plugin_path ) {
74
- // Get plugin basename
75
- $plugin_base = plugin_basename( $plugin_path );
76
- // If the plugin basename is found in the active network plugin list
77
- if ( array_key_exists( $plugin_base, $network_active_plugins_option ) ) {
78
- // Get the plugin info and add it to the plugin list
79
- $plugin_info = get_plugin_data( $plugin_path );
80
- $network_active_plugins[] = $plugin_info['Name'] . ' v' . $plugin_info['Version'];
81
- }
82
- }
83
- } else {
84
- // Otherwise, indicate that the site is not a multisite installation
85
- $network_active_plugins = 'Not multisite';
86
- }
87
-
88
-
89
- // Detect add-ons
90
- $addons = array();
91
- if ( defined( 'WPRSS_C_VERSION' ) ) {
92
- $addons[] = 'Categories';
93
- }
94
- if ( defined( 'WPRSS_ET_VERSION' ) ) {
95
- $addons[] = 'Excerpts & Thumbnails';
96
- }
97
- if ( defined( 'WPRSS_KF_VERSION' ) ) {
98
- $addons[] = 'Keyword Filtering';
99
- }
100
- if ( defined( 'WPRSS_FTP_VERSION' ) ) {
101
- $addons[] = 'Feed to Post';
102
- }
103
-
104
- // Compile the data
105
- $data = array(
106
- 'Site URL' => base64_encode( $site_url ),
107
- 'Plugin Version' => $plugin_data['Version'],
108
- 'Active Add-ons' => $addons,
109
- 'Theme Name' => $theme_name,
110
- 'Site Name' => str_replace( ' ', '', get_bloginfo( 'name' ) ),
111
- 'Plugin Count' => count( get_option( 'active_plugins' ) ),
112
- 'Active Plugins' => $active_plugins,
113
- 'Network Active Plugins' => $network_active_plugins,
114
- 'Inactive Plugins' => $inactive_plugins,
115
- 'WordPress Version' => get_bloginfo( 'version' ),
116
- );
117
-
118
- // Send the data
119
- wp_remote_post(
120
- WPRSS_TRACKING_SERVER_URL,
121
- array(
122
- 'method' => 'POST',
123
- 'timeout' => 45,
124
- 'redirection' => 5,
125
- 'httpversion' => '1.0',
126
- 'blocking' => true,
127
- 'headers' => array(),
128
- 'body' => array(
129
- 'wprss_tracking_data' => $data,
130
- ),
131
- 'cookies' => array()
132
- )
133
- );
134
-
135
- // Set a transient that expires in 1 week. When it expires, this function will run again
136
- // Expiration: 60secs * 60mins * 24hrs * 7days = 1 week
137
- set_transient( 'wprss_tracking_transient', '-', 60 * 60 * 24 * 7 );
138
- }
139
-
140
-
141
- /**
142
- * Shows a notice that notifies the user that the data report has been sent.
143
- *
144
- * @since 1.0
145
- */
146
- function wprss_tracking_notice() {
147
- ?>
148
- <div class="updated">
149
- <?php echo wpautop( __( '<b>WP RSS Aggregator:</b> Data report sent!', WPRSS_TEXT_DOMAIN ) ) ?>
150
- </div>
151
- <?php
152
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/admin-update-page.php CHANGED
@@ -32,10 +32,13 @@ function wprss_render_update_page()
32
  {
33
  wprss_update_previous_update_page_version();
34
 
35
- wp_enqueue_style('update-page', WPRSS_CSS . 'update.min.css');
36
 
37
- echo wprss_render_template('admin-update-page.twig', array(
38
- 'title' => __('What\'s new in WP RSS Aggregator?', WPRSS_TEXT_DOMAIN),
 
 
 
39
  'version' => WPRSS_VERSION,
40
  'beacon_nonce_field' => wp_nonce_field('wprss_hs_beacon_enabled'),
41
  'beacon_enabled' => wprss_is_help_beacon_enabled(),
@@ -48,6 +51,7 @@ function wprss_render_update_page()
48
  'path' => array(
49
  'images' => WPRSS_IMG,
50
  ),
 
51
  ));
52
  }
53
 
32
  {
33
  wprss_update_previous_update_page_version();
34
 
35
+ wp_enqueue_style('update-page', WPRSS_APP_CSS . 'update.min.css');
36
 
37
+ $changelog = wpra_get('core/changelog_dataset');
38
+ $parsedown = wpra_get('parsedown');
39
+
40
+ echo wprss_render_template('admin/update-page.twig', array(
41
+ 'title' => __('What\'s new in WP RSS Aggregator 4.13', WPRSS_TEXT_DOMAIN),
42
  'version' => WPRSS_VERSION,
43
  'beacon_nonce_field' => wp_nonce_field('wprss_hs_beacon_enabled'),
44
  'beacon_enabled' => wprss_is_help_beacon_enabled(),
51
  'path' => array(
52
  'images' => WPRSS_IMG,
53
  ),
54
+ 'changelog' => $parsedown->text($changelog['4.13']['raw'])
55
  ));
56
  }
57
 
includes/admin.php CHANGED
@@ -25,24 +25,31 @@
25
  <?php }
26
 
27
 
28
- add_action( 'admin_menu', 'wprss_register_menu_pages' );
29
- /**
30
- * Register menu and submenus
31
- * @since 2.0
32
- */
33
-
34
- // Add the admin options pages as submenus to the Feed CPT
35
- function wprss_register_menu_pages() {
36
- global $submenu;
37
- // Uncomment line below to hide "Add New" link from menu
38
- // unset( $submenu['edit.php?post_type=wprss_feed'][10] );
39
- // create submenu items
40
  add_submenu_page( 'edit.php?post_type=wprss_feed', __( 'Export & Import Settings', WPRSS_TEXT_DOMAIN ), __( 'Import & Export', WPRSS_TEXT_DOMAIN ), apply_filters( 'wprss_capability', 'manage_feed_settings' ), 'wprss-import-export-settings', 'wprss_import_export_settings_page_display' );
 
 
 
41
  add_submenu_page( 'edit.php?post_type=wprss_feed', __( 'WP RSS Aggregator Settings', WPRSS_TEXT_DOMAIN ), __( 'Settings', WPRSS_TEXT_DOMAIN ), apply_filters( 'wprss_capability', 'manage_feed_settings' ), 'wprss-aggregator-settings', 'wprss_settings_page_display' );
 
 
 
42
  add_submenu_page( 'edit.php?post_type=wprss_feed', __( 'Debugging', WPRSS_TEXT_DOMAIN ), __( 'Debugging', WPRSS_TEXT_DOMAIN ), apply_filters( 'wprss_capability', 'manage_feed_settings'), 'wprss-debugging', 'wprss_debugging_page_display' );
 
 
 
43
  add_submenu_page( 'edit.php?post_type=wprss_feed', __( 'More Features', WPRSS_TEXT_DOMAIN ), __( 'More Features', WPRSS_TEXT_DOMAIN ) . '<span class="dashicons dashicons-star-filled wprss-more-features-glyph"></span>', apply_filters( 'wprss_capability', 'manage_feed_settings'), 'wprss-addons', 'wprss_addons_page_display' );
 
 
 
44
  add_submenu_page( 'edit.php?post_type=wprss_feed', __( 'Help & Support', WPRSS_TEXT_DOMAIN ), __( 'Help & Support', WPRSS_TEXT_DOMAIN ), apply_filters( 'wprss_capability', 'manage_feed_settings'), 'wprss-help', 'wprss_help_page_display' );
45
- }
 
 
 
 
 
 
46
 
47
  add_filter('admin_body_class', 'wprss_base_admin_body_class');
48
  /**
@@ -88,10 +95,17 @@
88
  * Change title on wprss_feed post type screen
89
  *
90
  * @since 2.0
91
- * @return void
 
 
 
92
  */
93
- function wprss_change_title_text() {
94
- return __( 'Name this feed (e.g. WP Mayor)', WPRSS_TEXT_DOMAIN );
 
 
 
 
95
  }
96
 
97
 
@@ -136,7 +150,7 @@
136
  * Manifest file holds function used for bootstrapping and ordered
137
  * loading of dependencies and application.
138
  */
139
- wp_enqueue_script('wpra-manifest', WPRSS_JS . 'wpra-manifest.min.js', array(), '0.1', true);
140
 
141
  /*
142
  * Vendor file holds all common dependencies for "compilable" applications.
@@ -145,7 +159,7 @@
145
  * holds only logic for that particular application. Common dependencies like Vue
146
  * live in this file and loaded before that application.
147
  */
148
- wp_enqueue_script('wpra-vendor', WPRSS_JS . 'wpra-vendor.min.js', array(
149
  'wpra-manifest'
150
  ), '0.1', true);
151
 
25
  <?php }
26
 
27
 
28
+ add_action('admin_menu', function () {
 
 
 
 
 
 
 
 
 
 
 
29
  add_submenu_page( 'edit.php?post_type=wprss_feed', __( 'Export & Import Settings', WPRSS_TEXT_DOMAIN ), __( 'Import & Export', WPRSS_TEXT_DOMAIN ), apply_filters( 'wprss_capability', 'manage_feed_settings' ), 'wprss-import-export-settings', 'wprss_import_export_settings_page_display' );
30
+ }, 20);
31
+
32
+ add_action('admin_menu', function () {
33
  add_submenu_page( 'edit.php?post_type=wprss_feed', __( 'WP RSS Aggregator Settings', WPRSS_TEXT_DOMAIN ), __( 'Settings', WPRSS_TEXT_DOMAIN ), apply_filters( 'wprss_capability', 'manage_feed_settings' ), 'wprss-aggregator-settings', 'wprss_settings_page_display' );
34
+ }, 30);
35
+
36
+ add_action('admin_menu', function () {
37
  add_submenu_page( 'edit.php?post_type=wprss_feed', __( 'Debugging', WPRSS_TEXT_DOMAIN ), __( 'Debugging', WPRSS_TEXT_DOMAIN ), apply_filters( 'wprss_capability', 'manage_feed_settings'), 'wprss-debugging', 'wprss_debugging_page_display' );
38
+ }, 40);
39
+
40
+ add_action('admin_menu', function () {
41
  add_submenu_page( 'edit.php?post_type=wprss_feed', __( 'More Features', WPRSS_TEXT_DOMAIN ), __( 'More Features', WPRSS_TEXT_DOMAIN ) . '<span class="dashicons dashicons-star-filled wprss-more-features-glyph"></span>', apply_filters( 'wprss_capability', 'manage_feed_settings'), 'wprss-addons', 'wprss_addons_page_display' );
42
+ }, 50);
43
+
44
+ add_action('admin_menu', function () {
45
  add_submenu_page( 'edit.php?post_type=wprss_feed', __( 'Help & Support', WPRSS_TEXT_DOMAIN ), __( 'Help & Support', WPRSS_TEXT_DOMAIN ), apply_filters( 'wprss_capability', 'manage_feed_settings'), 'wprss-help', 'wprss_help_page_display' );
46
+ }, 60);
47
+
48
+ // Hides the "Add New" submenu
49
+ add_action('admin_menu', function () {
50
+ global $submenu;
51
+ unset( $submenu['edit.php?post_type=wprss_feed'][10] );
52
+ });
53
 
54
  add_filter('admin_body_class', 'wprss_base_admin_body_class');
55
  /**
95
  * Change title on wprss_feed post type screen
96
  *
97
  * @since 2.0
98
+ *
99
+ * @param string $original The original title placeholder.
100
+ *
101
+ * @return string
102
  */
103
+ function wprss_change_title_text($original) {
104
+ if (get_post_type() === 'wprss_feed') {
105
+ return __('Name this feed (e.g. WP Mayor)', WPRSS_TEXT_DOMAIN);
106
+ }
107
+
108
+ return $original;
109
  }
110
 
111
 
150
  * Manifest file holds function used for bootstrapping and ordered
151
  * loading of dependencies and application.
152
  */
153
+ wp_enqueue_script('wpra-manifest', WPRSS_APP_JS . 'wpra-manifest.min.js', array(), '0.1', true);
154
 
155
  /*
156
  * Vendor file holds all common dependencies for "compilable" applications.
159
  * holds only logic for that particular application. Common dependencies like Vue
160
  * live in this file and loaded before that application.
161
  */
162
+ wp_enqueue_script('wpra-vendor', WPRSS_APP_JS . 'wpra-vendor.min.js', array(
163
  'wpra-manifest'
164
  ), '0.1', true);
165
 
includes/cron-jobs.php CHANGED
@@ -19,9 +19,7 @@
19
  */
20
  function wprss_schedule_fetch_all_feeds_cron() {
21
 
22
- $options = get_option( 'wprss_settings_general' );
23
-
24
- $cron_interval = $options['cron_interval'];
25
 
26
  // verify event has not been scheduled
27
  if ( ! wp_next_scheduled( 'wprss_fetch_all_feeds_hook' ) ) {
@@ -221,4 +219,4 @@
221
  */
222
  function wprss_get_default_feed_source_update_interval() {
223
  return 'global';
224
- }
19
  */
20
  function wprss_schedule_fetch_all_feeds_cron() {
21
 
22
+ $cron_interval = wprss_get_general_setting('cron_interval');
 
 
23
 
24
  // verify event has not been scheduled
25
  if ( ! wp_next_scheduled( 'wprss_fetch_all_feeds_hook' ) ) {
219
  */
220
  function wprss_get_default_feed_source_update_interval() {
221
  return 'global';
222
+ }
includes/custom-feed.php DELETED
@@ -1,164 +0,0 @@
1
- <?php
2
- /**
3
- * Function to create a custom feed with the latest imported feed items
4
- *
5
- * @package WP RSS Aggregator
6
- */
7
-
8
-
9
- add_action( 'init', 'wprss_addfeed_add_feed' );
10
- /**
11
- * Adds the custom feed, as specified by the user in the general settings.
12
- *
13
- * @since 3.3
14
- */
15
- function wprss_addfeed_add_feed() {
16
- $url = wprss_get_general_setting('custom_feed_url');
17
- if (empty($url)) {
18
- $url = 'wprss';
19
- }
20
-
21
- // Add the feed
22
- add_feed( $url, 'wprss_addfeed_do_feed' );
23
-
24
- // Whether or not the feed is already registered or not
25
- $registered = FALSE;
26
-
27
- // Get all registered rewrite rules
28
- $rules = get_option( 'rewrite_rules' );
29
-
30
- // If no rules exist, then it is not registered
31
- if ( !is_array( $rules ) ) {
32
- $registered = FALSE;
33
- }
34
- // If there are exisiting rules
35
- else {
36
- // Get all the array keys that match the given pattern
37
- // The resulting array will only contain the second part of each matching key ( $matches[1] )
38
- $feeds = array_keys( $rules, 'index.php?&feed=$matches[1]' );
39
- // Check if the rewrite rule for the custom feed is already registered
40
- foreach( $feeds as $feed ) {
41
- if ( strpos( $feed, $url ) !== FALSE ) {
42
- $registered = TRUE;
43
- }
44
- }
45
- }
46
-
47
- // If not registered, flush the rewrite rules
48
- if ( ! $registered ) {
49
- flush_rewrite_rules();
50
- }
51
-
52
- }
53
-
54
-
55
- /**
56
- * Generate the feed
57
- *
58
- * @since 3.3
59
- */
60
- function wprss_addfeed_do_feed( $in ) {
61
-
62
- // Prepare the post query
63
- /*
64
- $wprss_custom_feed_query = apply_filters(
65
- 'wprss_custom_feed_query',
66
- array(
67
- 'post_type' => 'wprss_feed_item',
68
- 'post_status' => 'publish',
69
- 'cache_results' => false, // disable caching
70
- )
71
-
72
- );*/
73
- $wprss_custom_feed_query = wprss_get_feed_items_query(
74
- apply_filters(
75
- 'wprss_custom_feed_query',
76
- array(
77
- 'get-args' => TRUE, // Get the query args instead of the query object
78
- 'no-paged' => TRUE, // ignore pagination
79
- 'feed_limit' => 0, // ignore limit
80
- )
81
- )
82
- );
83
-
84
- // Suppress caching
85
- $wprss_custom_feed_query['cache_results'] = FALSE;
86
-
87
- // Get options
88
- $options = get_option( 'wprss_settings_general' );
89
- if ( $options !== FALSE ) {
90
- // If options exist, get the limit
91
- $limit = $options['custom_feed_limit'];
92
- if ( $limit !== FALSE ) {
93
- // if limit exists, set the query limit
94
- $wprss_custom_feed_query['posts_per_page'] = $limit;
95
- }
96
- }
97
-
98
- // Submit the query to get latest feed items
99
- query_posts( $wprss_custom_feed_query );
100
-
101
- $custom_feed_title = wprss_get_general_setting( 'custom_feed_title' );
102
-
103
- $protocol = (isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0');
104
- header( "$protocol 200 OK" );
105
- // Send content header and start ATOM output
106
- header('Content-Type: application/rss+xml');
107
- // Disabling caching
108
- header('Cache-Control: no-cache, no-store, must-revalidate'); // HTTP 1.1.
109
- header('Pragma: no-cache'); // HTTP 1.0.
110
- header('Expires: 0'); // Proxies.
111
- echo '<?xml version="1.0" encoding="' . get_option('blog_charset') . '"?>';
112
- ?>
113
-
114
- <rss version="2.0"
115
- xmlns:content="http://purl.org/rss/1.0/modules/content/"
116
- xmlns:wfw="http://wellformedweb.org/CommentAPI/"
117
- xmlns:dc="http://purl.org/dc/elements/1.1/"
118
- xmlns:atom="https://www.w3.org/2005/Atom"
119
- xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
120
- xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
121
- xmlns:media="https://search.yahoo.com/mrss/" >
122
- <channel>
123
- <title><?php echo $custom_feed_title; ?></title>
124
- <description></description>
125
- <link><?php echo get_site_url(); ?></link>
126
- <atom:link href="<?php echo $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] ?>" rel="self" type="application/rss+xml" />
127
- <?php // Start the Loop
128
- while ( have_posts() ) : the_post();
129
- $source = get_post_meta( get_the_ID(), 'wprss_feed_id', TRUE );
130
- $permalink = get_post_meta( get_the_ID(), 'wprss_item_permalink', true );
131
- $content = apply_filters( 'wprss_custom_feed_item_content', get_the_content() );
132
- ?>
133
- <item>
134
- <title><![CDATA[<?php the_title_rss(); ?>]]></title>
135
- <link><?php echo $permalink; ?></link>
136
- <guid isPermaLink="true"><?php echo $permalink; ?></guid>
137
- <pubDate><?php echo get_post_time( DATE_RSS ); ?></pubDate>
138
- <description><![CDATA[<?php echo $content; ?>]]></description>
139
- <content:encoded><![CDATA[<?php echo $content; ?>]]></content:encoded>
140
- <source url="<?php echo esc_attr(get_post_meta( $source, 'wprss_url', TRUE )); ?>"><?php echo get_the_title( $source ); ?></source>
141
- <?php do_action( 'wprss_custom_feed_entry', get_the_ID() ); ?>
142
- </item>
143
- <?php
144
- endwhile; // END OF LOOP
145
- ?>
146
- </channel>
147
- </rss>
148
- <?php
149
- }
150
-
151
-
152
- add_filter( 'post_limits', 'wprss_custom_feed_limits' );
153
- /**
154
- * Set a different limit to our custom feeds
155
- *
156
- * @since 3.3
157
- */
158
- function wprss_custom_feed_limits( $limit ) {
159
- if ( is_feed( ) ) {
160
- // return 'LIMIT 0, 3';
161
- return $limit;
162
- }
163
- return $limit;
164
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/custom-post-types.php DELETED
@@ -1,137 +0,0 @@
1
- <?php
2
- /**
3
- * Contains all custom post type related functions
4
- *
5
- * @package WPRSSAggregator
6
- */
7
-
8
- define('WPRSS_POST_TYPE_FEED_SOURCE', 'wprss_feed');
9
-
10
-
11
- add_action( 'init', 'wprss_register_post_types' );
12
- /**
13
- * Create Custom Post Types wprss_feed and wprss_feed_item
14
- *
15
- * @since 2.0
16
- */
17
- function wprss_register_post_types() {
18
-
19
- // Set up labels for the 'wprss_feed' post type
20
- $labels = apply_filters(
21
- 'wprss_feed_post_type_labels',
22
- array(
23
- 'name' => __( 'Feed Sources', WPRSS_TEXT_DOMAIN ),
24
- 'singular_name' => __( 'Feed Source', WPRSS_TEXT_DOMAIN ),
25
- 'add_new' => __( 'Add New', WPRSS_TEXT_DOMAIN ),
26
- 'all_items' => __( 'Feed Sources', WPRSS_TEXT_DOMAIN ),
27
- 'add_new_item' => __( 'Add New Feed Source', WPRSS_TEXT_DOMAIN ),
28
- 'edit_item' => __( 'Edit Feed Source', WPRSS_TEXT_DOMAIN ),
29
- 'new_item' => __( 'New Feed Source', WPRSS_TEXT_DOMAIN ),
30
- 'view_item' => __( 'View Feed Source', WPRSS_TEXT_DOMAIN ),
31
- 'search_items' => __( 'Search Feeds', WPRSS_TEXT_DOMAIN ),
32
- 'not_found' => __( 'No Feed Sources Found', WPRSS_TEXT_DOMAIN ),
33
- 'not_found_in_trash' => __( 'No Feed Sources Found In Trash', WPRSS_TEXT_DOMAIN ),
34
- 'menu_name' => __( 'RSS Aggregator', WPRSS_TEXT_DOMAIN )
35
- )
36
- );
37
-
38
- // Set up the arguments for the 'wprss_feed' post type
39
- $feed_args = apply_filters(
40
- 'wprss_feed_post_type_args',
41
- array(
42
- 'exclude_from_search' => true,
43
- 'publicly_querable' => false,
44
- 'show_in_nav_menus' => false,
45
- 'show_in_admin_bar' => true,
46
- 'public' => true,
47
- 'show_ui' => true,
48
- 'query_var' => 'feed_source',
49
- 'menu_position' => 100,
50
- 'show_in_menu' => true,
51
- 'show_in_admin_bar' => true,
52
- 'rewrite' => array(
53
- 'slug' => 'feeds',
54
- 'with_front' => false
55
- ),
56
- 'capability_type' => 'feed',
57
- 'map_meta_cap' => true,
58
- 'supports' => array( 'title' ),
59
- 'labels' => $labels,
60
- 'menu_icon' => 'dashicons-rss'
61
- )
62
- );
63
-
64
- if ( version_compare( get_bloginfo( 'version' ), '3.8', '<' ) ) {
65
- $feed_args['menu_icon'] = WPRSS_IMG . 'icon-adminmenu16-sprite.png';
66
- }
67
-
68
- // Register the 'wprss_feed' post type
69
- register_post_type( 'wprss_feed', $feed_args );
70
-
71
- // Set up labels for the 'wprss_feed_item' post type
72
- $labels = apply_filters(
73
- 'wprss_feed_item_post_type_labels',
74
- array(
75
- 'name' => __( 'Feed Items', WPRSS_TEXT_DOMAIN ),
76
- 'singular_name' => __( 'Feed Item', WPRSS_TEXT_DOMAIN ),
77
- 'all_items' => __( 'Feed Items', WPRSS_TEXT_DOMAIN ),
78
- 'view_item' => __( 'View Feed Items', WPRSS_TEXT_DOMAIN ),
79
- 'search_items' => __( 'Search Feed Items', WPRSS_TEXT_DOMAIN ),
80
- 'not_found' => __( 'No Feed Items Found', WPRSS_TEXT_DOMAIN ),
81
- 'not_found_in_trash' => __( 'No Feed Items Found In Trash', WPRSS_TEXT_DOMAIN )
82
- )
83
- );
84
-
85
- // Set up the arguments for the 'wprss_feed_item' post type
86
- $feed_item_args = apply_filters(
87
- 'wprss_feed_item_post_type_args',
88
- array(
89
- 'exclude_from_search' => true,
90
- 'publicly_querable' => false,
91
- 'show_in_nav_menus' => false,
92
- 'show_in_admin_bar' => true,
93
- 'public' => true,
94
- 'show_ui' => true,
95
- 'query_var' => 'feed_item',
96
- 'show_in_menu' => 'edit.php?post_type=wprss_feed',
97
- 'show_in_admin_bar' => false,
98
- 'rewrite' => array(
99
- 'slug' => 'feed-items',
100
- 'with_front' => false,
101
- ),
102
- 'capability_type' => 'feed_item',
103
- 'map_meta_cap' => true,
104
- 'labels' => $labels
105
- )
106
- );
107
-
108
- // Register the 'feed_item' post type
109
- register_post_type( 'wprss_feed_item', $feed_item_args );
110
- // Trigger action
111
- do_action( 'wprss_registered_post_types' );
112
- }
113
-
114
-
115
- /**
116
- * Filter the link query arguments to exclude the feed and feed item post types.
117
- * This filter will only work for WordPress versions 3.7 or higher.
118
- *
119
- * @since 3.4.3
120
- * @param array $query An array of WP_Query arguments.
121
- * @return array $query
122
- */
123
- function wprss_modify_link_builder_query( $query ){
124
-
125
- // custom post type slug to be removed
126
- $to_remove = array( 'wprss_feed', 'wprss_feed_item' );
127
-
128
- // find and remove the array keys
129
- foreach( $to_remove as $post_type ) {
130
- $key = array_search( $post_type, $query['post_type'] );
131
- // remove the array item
132
- if( $key ) unset( $query['post_type'][$key] );
133
- }
134
-
135
- return $query;
136
- }
137
- add_filter( 'wp_link_query_args', 'wprss_modify_link_builder_query' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/deprecated-functions.php DELETED
@@ -1,83 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Fetches feed items from sources provided
5
- * DEPRECATED - JUST FOR REFERENCE
6
- *
7
- * @since 2.0
8
- * @deprecated 3.0
9
- */
10
- /*function wprss_fetch_all_feed_items( ) {
11
-
12
- // Get all feed sources
13
- $feed_sources = new WP_Query( array(
14
- 'post_type' => 'wprss_feed',
15
- 'post_status' => 'publish',
16
- 'posts_per_page' => -1,
17
- ) );
18
-
19
- if( $feed_sources->have_posts() ) {
20
- /* Start by getting one feed source, we will cycle through them one by one,
21
- fetching feed items and adding them to the database in each pass */
22
- /* while ( $feed_sources->have_posts() ) {
23
- $feed_sources->the_post();
24
-
25
- $feed_ID = get_the_ID();
26
- $feed_url = get_post_meta( get_the_ID(), 'wprss_url', true );
27
-
28
- // Use the URL custom field to fetch the feed items for this source
29
- if( !empty( $feed_url ) ) {
30
-
31
- add_filter( 'wp_feed_cache_transient_lifetime' , 'wprss_return_7200' );
32
- //$feed = fetch_feed( $feed_url );
33
- $feed = wprss_fetch_feed( $feed_url, $feed_ID );
34
- remove_filter( 'wp_feed_cache_transient_lifetime' , 'wprss_return_7200' );
35
-
36
- // $feed->strip_htmltags( array_merge( $feed->strip_htmltags, array('h1', 'a', 'img') ) );
37
-
38
- if ( !is_wp_error( $feed ) ) {
39
- // Figure out how many total items there are, but limit it to 10.
40
- $maxitems = $feed->get_item_quantity(10);
41
-
42
- // Build an array of all the items, starting with element 0 (first element).
43
- $items = $feed->get_items( 0, $maxitems );
44
- }
45
- else { return; }
46
- }
47
-
48
- if ( ! empty( $items ) ) {
49
- // Gather the permalinks of existing feed item's related to this feed source
50
- global $wpdb;
51
- $existing_permalinks = $wpdb->get_col(
52
- "SELECT meta_value
53
- FROM $wpdb->postmeta
54
- WHERE meta_key = 'wprss_item_permalink'
55
- AND post_id IN ( SELECT post_id FROM $wpdb->postmeta WHERE meta_value = $feed_ID)
56
- ");
57
-
58
- foreach ( $items as $item ) {
59
- // Check if newly fetched item already present in existing feed item item,
60
- // if not insert it into wp_posts and insert post meta.
61
- if ( ! ( in_array( $item->get_permalink(), $existing_permalinks ) ) ) {
62
- // Create post object
63
- $feed_item = array(
64
- 'post_title' => $item->get_title(),
65
- 'post_content' => '',
66
- 'post_status' => 'publish',
67
- 'post_type' => 'wprss_feed_item'
68
- );
69
- $inserted_ID = wp_insert_post( $feed_item );
70
- wprss_items_create_post_meta( $inserted_ID, $item, $feed_ID );
71
- } //end if
72
- } //end foreach
73
- } // end if
74
- } // end $feed_sources while loop
75
- wp_reset_postdata(); // Restore the $post global to the current post in the main query
76
- // } // end if
77
- } // end if
78
- }
79
-
80
- // For testing query speed
81
- // $time_start = microtime( true );
82
- // wp_die(number_format( microtime( true ) - $time_start, 10 ));
83
- */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/deprecated.php ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * This file contains all legacy deprecated constants and functionality for WP RSS Aggregator.
5
+ *
6
+ * @since 4.13
7
+ */
8
+
9
+ // The feed source CPT name
10
+ define('WPRSS_POST_TYPE_FEED_SOURCE', 'wprss_feed');
11
+
12
+ add_filter('wp_link_query_args', 'wprss_modify_link_builder_query');
13
+ /**
14
+ * Filter the link query arguments to exclude the feed and feed item post types.
15
+ * This filter will only work for WordPress versions 3.7 or higher.
16
+ *
17
+ * @since 3.4.3
18
+ *
19
+ * @deprecated Needs to be refactored/moved into an appropriate module
20
+ *
21
+ * @param array $query An array of WP_Query arguments.
22
+ *
23
+ * @return array $query
24
+ */
25
+ function wprss_modify_link_builder_query($query)
26
+ {
27
+ // custom post type slugs to be removed
28
+ $toRemove = ['wprss_feed', 'wprss_feed_item', 'wprss_feed_template'];
29
+
30
+ // find and remove the array keys
31
+ foreach ($toRemove as $postType) {
32
+ if ($key = array_search($postType, $query['post_type'])) {
33
+ unset($query['post_type'][$key]);
34
+ }
35
+ }
36
+
37
+ return $query;
38
+ }
includes/feed-access.php CHANGED
@@ -197,13 +197,13 @@ class WPRSS_Feed_Access
197
  * @return array The new settings array.
198
  */
199
  public function add_settings( $settings ) {
200
- $settings['general'][ self::SETTING_KEY_CERTIFICATE_PATH ] = array(
201
- 'label' => __( 'Certificate Path', WPRSS_TEXT_DOMAIN ),
202
  'callback' => array( $this, 'render_certificate_path_setting' )
203
  );
204
  /** @since 4.8.2 */
205
- $settings['general'][ self::SETTING_KEY_FEED_REQUEST_USERAGENT ] = array(
206
- 'label' => __( 'Feed Request Useragent', WPRSS_TEXT_DOMAIN ),
207
  'callback' => array( $this, 'render_feed_request_useragent_setting' )
208
  );
209
 
@@ -431,7 +431,7 @@ class WPRSS_SimplePie_File extends SimplePie_File {
431
  $parser = new SimplePie_HTTP_Parser( $this->headers );
432
  if ( $parser->parse() ) {
433
  $this->headers = $parser->headers;
434
- $this->body = trim( $parser->body );
435
  $this->status_code = $parser->status_code;
436
  if ( (in_array( $this->status_code, array( 300, 301, 302, 303, 307 ) ) || $this->status_code > 307 && $this->status_code < 400) && isset( $this->headers['location'] ) && $this->redirects < $redirects ) {
437
  $this->redirects++;
@@ -495,7 +495,7 @@ class WPRSS_SimplePie_File extends SimplePie_File {
495
  $parser = new SimplePie_HTTP_Parser( $this->headers );
496
  if ( $parser->parse() ) {
497
  $this->headers = $parser->headers;
498
- $this->body = trim( $parser->body );
499
  $this->status_code = $parser->status_code;
500
  if ( (in_array( $this->status_code, array( 300, 301, 302, 303, 307 ) ) || $this->status_code > 307 && $this->status_code < 400) && isset( $this->headers['location'] ) && $this->redirects < $redirects ) {
501
  $this->redirects++;
197
  * @return array The new settings array.
198
  */
199
  public function add_settings( $settings ) {
200
+ $settings['advanced'][ self::SETTING_KEY_CERTIFICATE_PATH ] = array(
201
+ 'label' => __( 'Certificate path', WPRSS_TEXT_DOMAIN ),
202
  'callback' => array( $this, 'render_certificate_path_setting' )
203
  );
204
  /** @since 4.8.2 */
205
+ $settings['advanced'][ self::SETTING_KEY_FEED_REQUEST_USERAGENT ] = array(
206
+ 'label' => __( 'Feed request useragent', WPRSS_TEXT_DOMAIN ),
207
  'callback' => array( $this, 'render_feed_request_useragent_setting' )
208
  );
209
 
431
  $parser = new SimplePie_HTTP_Parser( $this->headers );
432
  if ( $parser->parse() ) {
433
  $this->headers = $parser->headers;
434
+ $this->body = $parser->body;
435
  $this->status_code = $parser->status_code;
436
  if ( (in_array( $this->status_code, array( 300, 301, 302, 303, 307 ) ) || $this->status_code > 307 && $this->status_code < 400) && isset( $this->headers['location'] ) && $this->redirects < $redirects ) {
437
  $this->redirects++;
495
  $parser = new SimplePie_HTTP_Parser( $this->headers );
496
  if ( $parser->parse() ) {
497
  $this->headers = $parser->headers;
498
+ $this->body = $parser->body;
499
  $this->status_code = $parser->status_code;
500
  if ( (in_array( $this->status_code, array( 300, 301, 302, 303, 307 ) ) || $this->status_code > 307 && $this->status_code < 400) && isset( $this->headers['location'] ) && $this->redirects < $redirects ) {
501
  $this->redirects++;
includes/feed-blacklist.php CHANGED
@@ -3,24 +3,22 @@
3
  /**
4
  * This file contains all functions relating to the blacklisting of
5
  * imported feeds items.
6
- *
7
  * Blacklisting a feed item is in essence nothing more than a saved list
8
  * of feed items. When a feed item is imported, its normalized permalink
9
  * is tested against this list, and if found, the feed item is not
10
  * imported. Admins can add items to the blacklist, to prevent them
11
  * from being imported again.
12
- *
13
  * @package WP RSS Aggregator
14
  * @since 4.4
15
  */
16
 
17
-
18
  // Check if the 'blacklist' GET param is set
19
  add_action( 'admin_init', 'wprss_check_if_blacklist_item' );
20
  // Checks if the transient is set to show the notice
21
  add_action( 'admin_init', 'wprss_check_notice_transient' );
22
  // Register custom post type
23
- add_action( 'init', 'wprss_blacklist_cpt' );
24
  // Add the row actions to the targetted post type
25
  add_filter( 'post_row_actions', 'wprss_blacklist_row_actions', 10, 1 );
26
  // Check if deleting a blacklist item, from the GET parameter
@@ -31,14 +29,22 @@ add_filter( 'manage_wprss_blacklist_posts_columns', 'wprss_blacklist_columns');
31
  add_action( 'manage_wprss_blacklist_posts_custom_column' , 'wprss_blacklist_table_contents', 10, 2 );
32
  // Changes the wprss_blacklist bulk actions
33
  add_filter('bulk_actions-edit-wprss_blacklist','wprss_blacklist_bulk_actions', 5, 1 );
 
 
34
 
 
 
 
 
 
 
35
 
36
  /**
37
  * Retrieves the blacklisted items.
38
- *
39
  * @since 4.4
40
  * @return array An associative array of blacklisted item, each entry
41
- * having the key as the permalink, and the value as the title.
42
  */
43
  function wprss_get_blacklist() {
44
  // Get the option
@@ -52,37 +58,36 @@ function wprss_get_blacklist() {
52
  return $blacklist_option;
53
  }
54
 
55
-
56
  /**
57
  * Creates a blacklist entry for the given feed item.
58
- *
59
  * @since 4.4
60
  * @param int|string The ID of the feed item to add to the blacklist
61
  */
62
  function wprss_blacklist_item( $ID ) {
63
  // Return if feed item is null
64
  if ( is_null( $ID ) ) return;
65
-
66
  // Get the feed item data
67
  $item_title = get_the_title( $ID );
68
  $item_permalink = get_post_meta( $ID, 'wprss_item_permalink', TRUE );
69
  // If not an imported item, stop
70
  if ( $item_permalink === '' ) {
71
- wprss_log_obj( 'An item being blacklisted was ignored for not being an imported item', $ID, null, WPRSS_LOG_LEVEL_INFO );
72
  return;
73
  }
74
  // Prepare the data for blacklisting
75
  $title = apply_filters( 'wprss_blacklist_title', trim( $item_title ) );
76
  $permalink = apply_filters( 'wprss_blacklist_permalink', trim( $item_permalink ) );
77
-
78
  // Get the blacklisted items
79
  $blacklist = wprss_get_blacklist();
80
  // Add the item to the blacklist
81
  $blacklist[ $permalink ] = $title;
82
-
83
  // Delete the item
84
  wp_delete_post( $ID, TRUE );
85
-
86
  // Add the blacklisted item
87
  $id = wp_insert_post(array(
88
  'post_title' => $title,
@@ -92,51 +97,53 @@ function wprss_blacklist_item( $ID ) {
92
  update_post_meta( $id, 'wprss_permalink', $permalink );
93
  }
94
 
95
-
96
  /**
97
  * Determines whether the given item is blacklist.
98
- *
99
  * @since 4.4
100
  * @param string $permalink The permalink to look for in the saved option
101
  * @return bool TRUE if the permalink is found, FALSE otherwise.
102
  */
103
  function wprss_is_blacklisted( $permalink ) {
 
 
 
 
104
  // Query the blacklist entries, for an item with the given permalink
105
  $query = new WP_Query(array(
106
  'post_type' => 'wprss_blacklist',
107
  'meta_key' => 'wprss_permalink',
108
  'meta_value' => $permalink
109
  ));
 
110
  // Return TRUE if the query returned a result, FALSE otherwise
111
  return $query->have_posts();
112
  }
113
 
114
-
115
  /**
116
- * Check if the 'blacklist' GET param is set, and prepare to blacklist
117
- * the item.
118
- *
119
  * @since 4.4
120
  */
121
  function wprss_check_if_blacklist_item() {
122
  // If the GET param is not set, do nothing. Return.
123
  if ( empty( $_GET['wprss_blacklist'] ) ) return;
124
-
125
  // Get the ID from the GET param
126
  $ID = $_GET['wprss_blacklist'];
127
  // If the post does not exist, stop. Show a message
128
  if ( get_post($ID) === NULL ) {
129
  wp_die( __( 'The item you are trying to blacklist does not exist', WPRSS_TEXT_DOMAIN ) );
130
  }
131
-
132
- // If the post type is not correct,
133
  if ( get_post_meta( $ID, 'wprss_item_permalink', TRUE ) === '' || get_post_status( $ID ) !== 'trash' ) {
134
  wp_die( __( 'The item you are trying to blacklist is not valid!', WPRSS_TEXT_DOMAIN ) );
135
  }
136
-
137
  check_admin_referer( 'blacklist-item-' . $ID, 'wprss_blacklist_item' );
138
  wprss_blacklist_item( $ID );
139
-
140
  // Get the current post type for the current page
141
  $post_type = isset( $_GET['post_type'] )? $_GET['post_type'] : 'post';
142
  // Check the current page, and generate the URL query string for the page
@@ -148,7 +155,6 @@ function wprss_check_if_blacklist_item() {
148
  exit();
149
  }
150
 
151
-
152
  /**
153
  * Checks if the transient for the blacklist notice is set, and shows the notice
154
  * if it is set.
@@ -165,36 +171,10 @@ function wprss_check_notice_transient() {
165
  }
166
  }
167
 
168
-
169
- /**
170
- * Registers the Blacklist Custom Post Type.
171
- *
172
- * @since 4.4
173
- */
174
- function wprss_blacklist_cpt() {
175
- register_post_type( 'wprss_blacklist', array(
176
- 'label' => 'Blacklist',
177
- 'public' => false,
178
- 'exclude_from_search' => true,
179
- 'show_ui' => true,
180
- 'show_in_menu' => 'edit.php?post_type=wprss_feed',
181
- 'capability_type' => 'feed_source',
182
- 'supports' => array( 'title' ),
183
- 'labels' => array(
184
- 'name' => __( 'Blacklist', WPRSS_TEXT_DOMAIN ),
185
- 'singular_name' => __( 'Blacklist', WPRSS_TEXT_DOMAIN ),
186
- 'all_items' => __( 'Blacklist', WPRSS_TEXT_DOMAIN ),
187
- 'search_items' => __( 'Search Blacklist', WPRSS_TEXT_DOMAIN ),
188
- 'not_found' => __( 'You do not have any items blacklisted yet!', WPRSS_TEXT_DOMAIN ),
189
- )
190
- ));
191
- }
192
-
193
-
194
  /**
195
  * Adds the row actions to the targetted post type.
196
  * Default post type = wprss_feed_item
197
- *
198
  * @since 4.4
199
  * @param array $actions The row actions to be filtered
200
  * @return array The new filtered row actions
@@ -202,8 +182,8 @@ function wprss_blacklist_cpt() {
202
  function wprss_blacklist_row_actions( $actions ) {
203
  // Check the current page, and generate the URL query string for the page
204
  $paged = isset( $_GET['paged'] )? '&paged=' . $_GET['paged'] : '';
205
-
206
-
207
  // Check the post type
208
  if ( get_post_status() == 'trash' ) {
209
  // Get the Post ID
@@ -212,7 +192,7 @@ function wprss_blacklist_row_actions( $actions ) {
212
  // Get the permalink. If does not exist, then it is not an imported item.
213
  $permalink = get_post_meta( $ID, 'wprss_item_permalink', TRUE );
214
  if ( $permalink === '' ) {
215
- $actions;
216
  }
217
 
218
  // The post type on the current screen
@@ -225,52 +205,52 @@ function wprss_blacklist_row_actions( $actions ) {
225
  ) . $paged;
226
  // Add a nonce to the URL
227
  $nonced_url = wp_nonce_url( $plain_url, 'blacklist-item-' . $ID, 'wprss_blacklist_item' );
228
-
229
  // Prepare the text
230
  $text = apply_filters( 'wprss_blacklist_row_action_text', htmlentities( __( 'Delete Permanently & Blacklist', WPRSS_TEXT_DOMAIN ) ) );
231
  $text = __( $text, WPRSS_TEXT_DOMAIN );
232
-
233
  // Prepare the hint
234
  $hint = apply_filters(
235
  'wprss_blacklist_row_action_hint',
236
  __( 'The item will be deleted permanently, and its permalink will be recorded in the blacklist', WPRSS_TEXT_DOMAIN )
237
  );
238
  $hint = esc_attr( __( $hint, WPRSS_TEXT_DOMAIN ) );
239
-
240
  // Add the blacklist action
241
  $actions['blacklist-item'] = "<span class='delete'><a title='$hint' href='$nonced_url'>$text</a></span>";
242
  }
243
-
244
  // For the blacklisted item
245
  elseif ( get_post_type() === 'wprss_blacklist' ) {
246
  $paged = isset( $_GET['paged'] )? '&paged=' . $_GET['paged'] : '';
247
  $remove_url = wp_nonce_url( 'post.php?wprss-blacklist-remove='.get_the_ID(), 'blacklist-remove-' . get_the_ID(), 'wprss_blacklist_trash' );
248
  $actions = array(
249
- 'trash' => '<a href="'.$remove_url.'">' . __( 'Remove from blacklist', WPRSS_TEXT_DOMAIN ) . '</a>'
 
250
  );
251
  }
252
-
253
  // Return the actions
254
  return $actions;
255
  }
256
 
257
-
258
  /**
259
  * Checks for the GET parameter wprss-blacklist-remove, and if present,
260
  * deletes the appropriate blacklist entry. Uses nonce 'wprss_blacklist_trash'
261
  * with action 'blacklist-remove-$ID'
262
- *
263
  * @since 4.4
264
  */
265
  function wprss_check_if_blacklist_delete() {
266
  // If the GET param is not set, do nothing. Return.
267
- if ( empty( $_GET['wprss-blacklist-remove'] ) ) return;
268
-
269
  // The array of blacklist entries to delete
270
  $to_delete = array();
271
  // The ID of the blacklist entry - if only deleting a single entry
272
  $ID = $_GET['wprss-blacklist-remove'];
273
-
274
  // check if deleting in bulk
275
  if ( isset( $_GET['wprss-bulk'] ) && $_GET['wprss-bulk'] == '1' ) {
276
  $to_delete = explode( ',', $ID );
@@ -281,24 +261,23 @@ function wprss_check_if_blacklist_delete() {
281
  // Verify the nonce
282
  check_admin_referer( 'blacklist-remove-' . $ID, 'wprss_blacklist_trash' );
283
  }
284
-
285
  // Delete the posts marked for delete
286
  foreach( $to_delete as $delete_id ) {
287
  $post = get_post( $delete_id );
288
  if ( $post === NULL || get_post_type( $post ) !== 'wprss_blacklist' ) continue;
289
  wp_delete_post( $delete_id, TRUE );
290
  }
291
-
292
  // Redirect back to blacklists page
293
  $paged = isset( $_GET['paged'] )? '&paged=' . $_GET['paged'] : '';
294
  header('Location: ' . admin_url('edit.php?post_type=wprss_blacklist' . $paged ) );
295
  exit;
296
  }
297
 
298
-
299
  /**
300
  * Returns the custom columns for the blacklist post type
301
- *
302
  * @since 4.4
303
  * @params array $cols The columns to filter
304
  * @return array The new columns
@@ -307,14 +286,13 @@ function wprss_blacklist_columns( $cols ) {
307
  return array(
308
  'cb' => $cols['cb'],
309
  'title' => __( 'Title' ),
310
- 'permalink' => __( 'Permalink' )
311
  );
312
  }
313
 
314
-
315
  /**
316
  * Prints the cell data in the table for each blacklist entry
317
- *
318
  * @since 4.4
319
  * @param string $column The column slug
320
  * @param string|int $ID The ID of the post currently being printed
@@ -328,14 +306,32 @@ function wprss_blacklist_table_contents( $column, $ID ) {
328
  }
329
  }
330
 
331
-
332
  /**
333
  * Removes the bulk actions for the Blacklist post type
334
- *
335
  * @since 4.4
336
  * @param array $actions The array of actions to be filtered
337
  * @return array An empty array
338
  */
339
  function wprss_blacklist_bulk_actions( $actions ) {
340
  return array();
341
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  /**
4
  * This file contains all functions relating to the blacklisting of
5
  * imported feeds items.
6
+ *
7
  * Blacklisting a feed item is in essence nothing more than a saved list
8
  * of feed items. When a feed item is imported, its normalized permalink
9
  * is tested against this list, and if found, the feed item is not
10
  * imported. Admins can add items to the blacklist, to prevent them
11
  * from being imported again.
12
+ *
13
  * @package WP RSS Aggregator
14
  * @since 4.4
15
  */
16
 
 
17
  // Check if the 'blacklist' GET param is set
18
  add_action( 'admin_init', 'wprss_check_if_blacklist_item' );
19
  // Checks if the transient is set to show the notice
20
  add_action( 'admin_init', 'wprss_check_notice_transient' );
21
  // Register custom post type
 
22
  // Add the row actions to the targetted post type
23
  add_filter( 'post_row_actions', 'wprss_blacklist_row_actions', 10, 1 );
24
  // Check if deleting a blacklist item, from the GET parameter
29
  add_action( 'manage_wprss_blacklist_posts_custom_column' , 'wprss_blacklist_table_contents', 10, 2 );
30
  // Changes the wprss_blacklist bulk actions
31
  add_filter('bulk_actions-edit-wprss_blacklist','wprss_blacklist_bulk_actions', 5, 1 );
32
+ // Adds the metabox to the blacklist new/edit page
33
+ add_action('add_meta_boxes_wprss_blacklist', 'wprss_blacklist_add_meta_boxes');
34
 
35
+ // Disables auto saving
36
+ add_action( 'admin_enqueue_scripts', function () {
37
+ if (get_post_type() === 'wprss_blacklist') {
38
+ wp_dequeue_script('autosave');
39
+ }
40
+ });
41
 
42
  /**
43
  * Retrieves the blacklisted items.
44
+ *
45
  * @since 4.4
46
  * @return array An associative array of blacklisted item, each entry
47
+ * having the key as the permalink, and the value as the title.
48
  */
49
  function wprss_get_blacklist() {
50
  // Get the option
58
  return $blacklist_option;
59
  }
60
 
 
61
  /**
62
  * Creates a blacklist entry for the given feed item.
63
+ *
64
  * @since 4.4
65
  * @param int|string The ID of the feed item to add to the blacklist
66
  */
67
  function wprss_blacklist_item( $ID ) {
68
  // Return if feed item is null
69
  if ( is_null( $ID ) ) return;
70
+
71
  // Get the feed item data
72
  $item_title = get_the_title( $ID );
73
  $item_permalink = get_post_meta( $ID, 'wprss_item_permalink', TRUE );
74
  // If not an imported item, stop
75
  if ( $item_permalink === '' ) {
76
+ wpra_get_logger()->warning('Feed item with ID {0} was not blacklisted because its URL was empty', [$ID]);
77
  return;
78
  }
79
  // Prepare the data for blacklisting
80
  $title = apply_filters( 'wprss_blacklist_title', trim( $item_title ) );
81
  $permalink = apply_filters( 'wprss_blacklist_permalink', trim( $item_permalink ) );
82
+
83
  // Get the blacklisted items
84
  $blacklist = wprss_get_blacklist();
85
  // Add the item to the blacklist
86
  $blacklist[ $permalink ] = $title;
87
+
88
  // Delete the item
89
  wp_delete_post( $ID, TRUE );
90
+
91
  // Add the blacklisted item
92
  $id = wp_insert_post(array(
93
  'post_title' => $title,
97
  update_post_meta( $id, 'wprss_permalink', $permalink );
98
  }
99
 
 
100
  /**
101
  * Determines whether the given item is blacklist.
102
+ *
103
  * @since 4.4
104
  * @param string $permalink The permalink to look for in the saved option
105
  * @return bool TRUE if the permalink is found, FALSE otherwise.
106
  */
107
  function wprss_is_blacklisted( $permalink ) {
108
+ if (empty($permalink)) {
109
+ return false;
110
+ }
111
+
112
  // Query the blacklist entries, for an item with the given permalink
113
  $query = new WP_Query(array(
114
  'post_type' => 'wprss_blacklist',
115
  'meta_key' => 'wprss_permalink',
116
  'meta_value' => $permalink
117
  ));
118
+
119
  // Return TRUE if the query returned a result, FALSE otherwise
120
  return $query->have_posts();
121
  }
122
 
 
123
  /**
124
+ * Check if the 'blacklist' GET param is set, and prepare to blacklist the item.
125
+ *
 
126
  * @since 4.4
127
  */
128
  function wprss_check_if_blacklist_item() {
129
  // If the GET param is not set, do nothing. Return.
130
  if ( empty( $_GET['wprss_blacklist'] ) ) return;
131
+
132
  // Get the ID from the GET param
133
  $ID = $_GET['wprss_blacklist'];
134
  // If the post does not exist, stop. Show a message
135
  if ( get_post($ID) === NULL ) {
136
  wp_die( __( 'The item you are trying to blacklist does not exist', WPRSS_TEXT_DOMAIN ) );
137
  }
138
+
139
+ // If the post type is not correct,
140
  if ( get_post_meta( $ID, 'wprss_item_permalink', TRUE ) === '' || get_post_status( $ID ) !== 'trash' ) {
141
  wp_die( __( 'The item you are trying to blacklist is not valid!', WPRSS_TEXT_DOMAIN ) );
142
  }
143
+
144
  check_admin_referer( 'blacklist-item-' . $ID, 'wprss_blacklist_item' );
145
  wprss_blacklist_item( $ID );
146
+
147
  // Get the current post type for the current page
148
  $post_type = isset( $_GET['post_type'] )? $_GET['post_type'] : 'post';
149
  // Check the current page, and generate the URL query string for the page
155
  exit();
156
  }
157
 
 
158
  /**
159
  * Checks if the transient for the blacklist notice is set, and shows the notice
160
  * if it is set.
171
  }
172
  }
173
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  /**
175
  * Adds the row actions to the targetted post type.
176
  * Default post type = wprss_feed_item
177
+ *
178
  * @since 4.4
179
  * @param array $actions The row actions to be filtered
180
  * @return array The new filtered row actions
182
  function wprss_blacklist_row_actions( $actions ) {
183
  // Check the current page, and generate the URL query string for the page
184
  $paged = isset( $_GET['paged'] )? '&paged=' . $_GET['paged'] : '';
185
+
186
+
187
  // Check the post type
188
  if ( get_post_status() == 'trash' ) {
189
  // Get the Post ID
192
  // Get the permalink. If does not exist, then it is not an imported item.
193
  $permalink = get_post_meta( $ID, 'wprss_item_permalink', TRUE );
194
  if ( $permalink === '' ) {
195
+ return $actions;
196
  }
197
 
198
  // The post type on the current screen
205
  ) . $paged;
206
  // Add a nonce to the URL
207
  $nonced_url = wp_nonce_url( $plain_url, 'blacklist-item-' . $ID, 'wprss_blacklist_item' );
208
+
209
  // Prepare the text
210
  $text = apply_filters( 'wprss_blacklist_row_action_text', htmlentities( __( 'Delete Permanently & Blacklist', WPRSS_TEXT_DOMAIN ) ) );
211
  $text = __( $text, WPRSS_TEXT_DOMAIN );
212
+
213
  // Prepare the hint
214
  $hint = apply_filters(
215
  'wprss_blacklist_row_action_hint',
216
  __( 'The item will be deleted permanently, and its permalink will be recorded in the blacklist', WPRSS_TEXT_DOMAIN )
217
  );
218
  $hint = esc_attr( __( $hint, WPRSS_TEXT_DOMAIN ) );
219
+
220
  // Add the blacklist action
221
  $actions['blacklist-item'] = "<span class='delete'><a title='$hint' href='$nonced_url'>$text</a></span>";
222
  }
223
+
224
  // For the blacklisted item
225
  elseif ( get_post_type() === 'wprss_blacklist' ) {
226
  $paged = isset( $_GET['paged'] )? '&paged=' . $_GET['paged'] : '';
227
  $remove_url = wp_nonce_url( 'post.php?wprss-blacklist-remove='.get_the_ID(), 'blacklist-remove-' . get_the_ID(), 'wprss_blacklist_trash' );
228
  $actions = array(
229
+ 'edit' => $actions['edit'],
230
+ 'trash' => '<a href="'.$remove_url.'">' . __( 'Remove From Blacklist', WPRSS_TEXT_DOMAIN ) . '</a>'
231
  );
232
  }
233
+
234
  // Return the actions
235
  return $actions;
236
  }
237
 
 
238
  /**
239
  * Checks for the GET parameter wprss-blacklist-remove, and if present,
240
  * deletes the appropriate blacklist entry. Uses nonce 'wprss_blacklist_trash'
241
  * with action 'blacklist-remove-$ID'
242
+ *
243
  * @since 4.4
244
  */
245
  function wprss_check_if_blacklist_delete() {
246
  // If the GET param is not set, do nothing. Return.
247
+ if ( !array_key_exists('wprss-blacklist-remove', $_GET) ) return;
248
+
249
  // The array of blacklist entries to delete
250
  $to_delete = array();
251
  // The ID of the blacklist entry - if only deleting a single entry
252
  $ID = $_GET['wprss-blacklist-remove'];
253
+
254
  // check if deleting in bulk
255
  if ( isset( $_GET['wprss-bulk'] ) && $_GET['wprss-bulk'] == '1' ) {
256
  $to_delete = explode( ',', $ID );
261
  // Verify the nonce
262
  check_admin_referer( 'blacklist-remove-' . $ID, 'wprss_blacklist_trash' );
263
  }
264
+
265
  // Delete the posts marked for delete
266
  foreach( $to_delete as $delete_id ) {
267
  $post = get_post( $delete_id );
268
  if ( $post === NULL || get_post_type( $post ) !== 'wprss_blacklist' ) continue;
269
  wp_delete_post( $delete_id, TRUE );
270
  }
271
+
272
  // Redirect back to blacklists page
273
  $paged = isset( $_GET['paged'] )? '&paged=' . $_GET['paged'] : '';
274
  header('Location: ' . admin_url('edit.php?post_type=wprss_blacklist' . $paged ) );
275
  exit;
276
  }
277
 
 
278
  /**
279
  * Returns the custom columns for the blacklist post type
280
+ *
281
  * @since 4.4
282
  * @params array $cols The columns to filter
283
  * @return array The new columns
286
  return array(
287
  'cb' => $cols['cb'],
288
  'title' => __( 'Title' ),
289
+ 'permalink' => __( 'URL' )
290
  );
291
  }
292
 
 
293
  /**
294
  * Prints the cell data in the table for each blacklist entry
295
+ *
296
  * @since 4.4
297
  * @param string $column The column slug
298
  * @param string|int $ID The ID of the post currently being printed
306
  }
307
  }
308
 
 
309
  /**
310
  * Removes the bulk actions for the Blacklist post type
311
+ *
312
  * @since 4.4
313
  * @param array $actions The array of actions to be filtered
314
  * @return array An empty array
315
  */
316
  function wprss_blacklist_bulk_actions( $actions ) {
317
  return array();
318
+ }
319
+
320
+ /**
321
+ * Adds the permalink meta box for the Blacklist post type.
322
+ *
323
+ * @since 4.13
324
+ */
325
+ function wprss_blacklist_add_meta_boxes()
326
+ {
327
+ add_meta_box(
328
+ 'wprss-blacklist-permalink',
329
+ __('Details', 'wprss'),
330
+ function ($post) {
331
+ echo wpra_get('twig')->load('admin/blacklist-metabox.twig')->render([
332
+ 'value' => $post->wprss_permalink
333
+ ]);
334
+ },
335
+ 'wprss_blacklist'
336
+ );
337
+ }
includes/feed-display.php DELETED
@@ -1,523 +0,0 @@
1
- <?php
2
- /**
3
- * Feed display related functions
4
- *
5
- * @package WPRSSAggregator
6
- */
7
-
8
-
9
- add_filter( 'the_content', 'wprss_render_feed_view' );
10
- /**
11
- * Display template for a feed source. Simulates a shortcode call.
12
- *
13
- * @since 4.6.6
14
- */
15
- function wprss_render_feed_view( $content ) {
16
- if ( get_post_type() === 'wprss_feed' && ! is_feed() ) {
17
- $content = wprss_shortcode( array(
18
- 'source' => get_the_ID()
19
- ) );
20
- }
21
- return $content;
22
- }
23
-
24
-
25
- add_filter( 'the_content', 'wprss_render_feed_item_view' );
26
- /**
27
- * Display template for a feed source. Simulates a shortcode call.
28
- *
29
- * @since 4.6.6
30
- */
31
- function wprss_render_feed_item_view( $content ) {
32
- if ( get_post_type() === 'wprss_feed_item' && ! is_feed() ) {
33
- $content = wprss_shortcode_single( array(
34
- 'id' => get_the_ID()
35
- ) );
36
- }
37
- return $content;
38
- }
39
-
40
-
41
- /**
42
- * Renders a single feed item.
43
- *
44
- * @param int $ID The ID of the feed item to render
45
- * @param string $default The default text to return if something fails.
46
- * @return string The output
47
- * @since 4.6.6
48
- */
49
- function wprss_render_feed_item( $ID = NULL, $default = '', $args = array() ) {
50
- $ID = ( $ID === NULL )? get_the_ID() : $ID;
51
- if ( is_feed() ) return $default;
52
-
53
- // Prepare the options
54
- $general_settings = get_option( 'wprss_settings_general' );
55
- $display_settings = wprss_get_display_settings( $general_settings );
56
- $excerpts_settings = get_option( 'wprss_settings_excerpts' );
57
- $thumbnails_settings = get_option( 'wprss_settings_thumbnails' );
58
-
59
- $args = wp_parse_args($args, array(
60
- 'link_before' => '',
61
- 'link_after' => ''
62
- ));
63
- $extra_options = apply_filters( 'wprss_template_extra_options', array(), $args);
64
-
65
- // Declare each item in $args as its own variable
66
- extract( $args, EXTR_SKIP );
67
-
68
- // Get the item meta
69
- $permalink = get_post_meta( $ID, 'wprss_item_permalink', true );
70
- $enclosure = get_post_meta( $ID, 'wprss_item_enclosure', true );
71
- $feed_source_id = get_post_meta( $ID, 'wprss_feed_id', true );
72
- $link_enclosure = get_post_meta( $feed_source_id, 'wprss_enclosure', true );
73
- $source_name = get_the_title( $feed_source_id );
74
- $source_url = get_post_meta( $feed_source_id, 'wprss_site_url', true );
75
- $timestamp = get_the_time( 'U', $ID );
76
-
77
- $general_source_link = isset( $general_settings['source_link'] ) ? $general_settings['source_link'] : 0;
78
- $feed_source_link = get_post_meta( $feed_source_id, 'wprss_source_link', true );
79
- $source_link = ( $feed_source_link === '' || intval($feed_source_link) < 0 ) // If not explicit value
80
- ? $general_source_link // Fall back to general setting
81
- : $feed_source_link; // Otherwise, use value
82
- $source_link = intval(trim($source_link));
83
-
84
- // Fallback for feeds created with older versions of the plugin
85
- if ( $source_url === '' ) $source_url = get_post_meta( $feed_source_id, 'wprss_url', true );
86
- // convert from Unix timestamp
87
- $date = wprss_date_i18n( $timestamp );
88
-
89
- // Prepare the title
90
- $feed_item_title = get_the_title();
91
- $feed_item_title_link = ( $link_enclosure === 'true' && $enclosure !== '' )? $enclosure : $permalink;
92
-
93
- // Prepare the text that precedes the source
94
- $text_preceding_source = wprss_get_general_setting('text_preceding_source');
95
- $text_preceding_source = ltrim( __( $text_preceding_source, WPRSS_TEXT_DOMAIN ) . ' ' );
96
-
97
- $text_preceding_date = wprss_get_general_setting('text_preceding_date');
98
- $text_preceding_date = ltrim( __( $text_preceding_date, WPRSS_TEXT_DOMAIN ) . ' ' );
99
-
100
- do_action( 'wprss_get_post_data' );
101
-
102
- $meta = $extra_options;
103
- $extra_meta = apply_filters( 'wprss_template_extra_meta', $meta, $args, $ID );
104
-
105
- ///////////////////////////////////////////////////////////////
106
- // BEGIN TEMPLATE
107
-
108
- // Prepare the output
109
- $output = '';
110
- // Begin output buffering
111
- ob_start();
112
- // Print the links before
113
- echo $link_before;
114
-
115
- // The Title
116
- $item_title = wprss_link_display( $feed_item_title_link, $feed_item_title, wprss_get_general_setting('title_link') );
117
- $item_title = apply_filters('wprss_item_title', $item_title, $feed_item_title_link, $feed_item_title, wprss_get_general_setting('title_link'));
118
- echo $item_title;
119
-
120
- do_action( 'wprss_after_feed_item_title', $extra_meta, $display_settings, $ID );
121
-
122
- // FEED ITEM META
123
- echo '<div class="wprss-feed-meta">';
124
-
125
- // SOURCE
126
- if ( wprss_get_general_setting('source_enable') == 1 ) {
127
- echo '<span class="feed-source">';
128
- $source_link_text = apply_filters('wprss_item_source_link', wprss_link_display( $source_url, $source_name, $source_link ) );
129
- $source_link_text = $text_preceding_source . $source_link_text;
130
- echo $source_link_text;
131
- echo '</span>';
132
- }
133
-
134
- // DATE
135
- if ( wprss_get_general_setting('date_enable') == 1 ) {
136
- echo '<span class="feed-date">';
137
- $date_text = apply_filters( 'wprss_item_date', $date );
138
- $date_text = $text_preceding_date . $date_text;
139
- echo $date_text;
140
- echo '</span>';
141
- }
142
-
143
- // AUTHOR
144
- $author = get_post_meta( $ID, 'wprss_item_author', TRUE );
145
- if ( wprss_get_general_setting('authors_enable') == 1 && $author !== NULL && is_string( $author ) && $author !== '' ) {
146
- echo '<span class="feed-author">';
147
- $author_text = apply_filters( 'wprss_item_author', $author );
148
- $author_prefix_text = apply_filters( 'wprss_author_prefix_text', 'By' );
149
- _e( $author_prefix_text, WPRSS_TEXT_DOMAIN );
150
- echo ' ' . $author_text;
151
- echo '</span>';
152
- }
153
-
154
- echo '</div>';
155
-
156
- // TIME AGO
157
- if ( wprss_get_general_setting('date_enable') == 1 && wprss_get_general_setting('time_ago_format_enable') == 1 ) {
158
- $time_ago = human_time_diff( $timestamp, time() );
159
- echo '<div class="wprss-time-ago">';
160
- $time_ago_text = apply_filters( 'wprss_item_time_ago', $time_ago );
161
- printf( __( '%1$s ago', WPRSS_TEXT_DOMAIN ), $time_ago_text );
162
- echo '</div>';
163
- }
164
-
165
- // END TEMPLATE - Retrieve buffered output
166
- $output .= ob_get_clean();
167
- $output = apply_filters( 'wprss_single_feed_output', $output, $permalink );
168
- $output .= "$link_after";
169
-
170
- // Print the output
171
- return $output;
172
- }
173
-
174
-
175
- /**
176
- * Retrieve settings and prepare them for use in the display function
177
- *
178
- * @since 3.0
179
- */
180
- function wprss_get_display_settings( $settings = NULL ) {
181
- if ( $settings === NULL ) {
182
- $settings = get_option( 'wprss_settings_general' );
183
- }
184
- // Parse the arguments together with their default values
185
- $args = wp_parse_args(
186
- $settings,
187
- array(
188
- 'open_dd' => 'blank',
189
- 'follow_dd' => '',
190
- )
191
- );
192
-
193
- // Prepare the 'open' setting - how to open links for feed items
194
- $open = '';
195
- switch ( $args['open_dd'] ) {
196
- case 'lightbox' :
197
- $open = 'class="colorbox"';
198
- break;
199
- case 'blank' :
200
- $open = 'target="_blank"';
201
- break;
202
- }
203
-
204
- // Prepare the 'follow' setting - whether links marked as nofollow or not
205
- $follow = ( $args['follow_dd'] == 'no_follow' )? 'rel="nofollow"' : '';
206
-
207
- // Prepare the final settings array
208
- $display_settings = array(
209
- 'open' => $open,
210
- 'follow' => $follow
211
- );
212
-
213
- do_action( 'wprss_get_settings' );
214
-
215
- return $display_settings;
216
- }
217
-
218
-
219
- /**
220
- * Merges the default arguments with the user set arguments
221
- *
222
- * @since 3.0
223
- */
224
- function wprss_get_shortcode_default_args( $args ) {
225
- // Default shortcode/function arguments for displaying feed items
226
- $shortcode_args = apply_filters(
227
- 'wprss_shortcode_args',
228
- array(
229
- 'links_before' => '<ul class="rss-aggregator">',
230
- 'links_after' => '</ul>',
231
- 'link_before' => '<li class="feed-item">',
232
- 'link_after' => '</li>'
233
- )
234
- );
235
-
236
- // Parse incoming $args into an array and merge it with $shortcode_args
237
- $args = wp_parse_args( $args, $shortcode_args );
238
-
239
- return $args;
240
- }
241
-
242
-
243
- /**
244
- * Prepares and builds the query for fetching the feed items
245
- *
246
- * @since 3.0
247
- */
248
- function wprss_get_feed_items_query( $settings ) {
249
- if( isset( $settings['feed_limit'] ) ) {
250
- $posts_per_page = $settings['feed_limit'];
251
- } else {
252
- $posts_per_page = wprss_get_general_setting('feed_limit');
253
- }
254
- global $paged;
255
- if ( get_query_var('paged') ) {
256
- $paged = get_query_var('paged');
257
- } elseif ( get_query_var('page') ) {
258
- $paged = get_query_var('page');
259
- } else {
260
- $paged = 1;
261
- }
262
-
263
- $feed_items_args = array(
264
- 'post_type' => get_post_types(),
265
- 'posts_per_page' => $posts_per_page,
266
- 'orderby' => 'date',
267
- 'order' => 'DESC',
268
- 'paged' => $paged,
269
- 'suppress_filters' => true,
270
- 'meta_query' => array(
271
- array(
272
- 'key' => 'wprss_feed_id',
273
- 'compare' => 'EXISTS',
274
- )
275
- )
276
- );
277
-
278
- if ( isset($settings['pagination']) ) {
279
- $pagination = strtolower( $settings['pagination'] );
280
- if ( in_array( $pagination, array('false','off','0') ) ) {
281
- unset( $feed_items_args['paged'] );
282
- }
283
- }
284
-
285
- if ( isset( $settings['no-paged'] ) && $settings['no-paged'] === TRUE ) {
286
- unset( $feed_items_args['no-paged'] );
287
- }
288
-
289
- // If either the source or exclude arguments are set (but not both), prepare a meta query
290
- if ( isset( $settings['source'] ) xor isset( $settings['exclude'] ) ) {
291
- // Set the appropriate setting and operator
292
- $setting = 'source';
293
- $operator = 'IN';
294
- if ( isset( $settings['exclude'] ) ) {
295
- $setting = 'exclude';
296
- $operator = 'NOT IN';
297
- }
298
- $feeds = array_filter( array_map( 'intval', explode( ',', $settings[$setting] ) ) );
299
- foreach ( $feeds as $feed )
300
- trim( $feed );
301
- if ( !empty( $feeds ) ) {
302
- $feed_items_args['meta_query'] = array(
303
- array(
304
- 'key' => 'wprss_feed_id',
305
- 'value' => $feeds,
306
- 'type' => 'numeric',
307
- 'compare' => $operator,
308
- ),
309
- );
310
- }
311
- }
312
-
313
- // Arguments for the next query to fetch all feed items
314
- $feed_items_args = apply_filters( 'wprss_display_feed_items_query', $feed_items_args, $settings );
315
-
316
- // Query to get all feed items for display
317
- $feed_items = new WP_Query( $feed_items_args );
318
-
319
- if ( isset( $settings['get-args'] ) && $settings['get-args'] === TRUE ) {
320
- return $feed_items_args;
321
- } else return $feed_items;
322
- }
323
-
324
-
325
- add_action( 'wprss_display_template', 'wprss_default_display_template', 10, 3 );
326
- /**
327
- * Default template for feed items display
328
- *
329
- * @since 3.0
330
- * @param $args array The shortcode arguments
331
- * @param $feed_items WP_Query The feed items to display
332
- */
333
- function wprss_default_display_template( $args, $feed_items ) {
334
- global $wp_query;
335
- global $paged;
336
-
337
- // Swap the current WordPress Query with our own
338
- $old_wp_query = $wp_query;
339
- $wp_query = $feed_items;
340
-
341
- // Prepare the output
342
- $output = '';
343
-
344
- // Check if our current query returned any feed items
345
- if ( $feed_items->have_posts() ) {
346
- // PRINT LINKS BEFORE LIST OF FEED ITEMS
347
- $output .= $args['links_before'];
348
-
349
- // FOR EACH ITEM
350
- while ( $feed_items->have_posts() ) {
351
- // Get the item
352
- $feed_items->the_post();
353
- // Add the output
354
- $output .= wprss_render_feed_item( NULL, '', $args );
355
- }
356
-
357
- // OUTPUT LINKS AFTER LIST OF FEED ITEMS
358
- $output .= $args['links_after'];
359
-
360
- // Add pagination if needed
361
- if ( !isset( $args['pagination'] ) || !in_array( $args['pagination'], array('off','false','0',0) ) ) {
362
- $output = apply_filters( 'wprss_pagination', $output );
363
- }
364
-
365
- // Filter the final output, and print it
366
- echo apply_filters( 'feed_output', $output );
367
- } else {
368
- // No items found message
369
- echo apply_filters( 'no_feed_items_found', __( 'No feed items found.', WPRSS_TEXT_DOMAIN ) );
370
- }
371
-
372
- // Reset the WordPress query
373
- $wp_query = $old_wp_query;
374
- wp_reset_postdata();
375
- }
376
-
377
-
378
- /**
379
- * Generates an HTML link, using the saved display settings.
380
- *
381
- * @param string $link The link URL
382
- * @param string $text The link text to display
383
- * @param string $bool Optional boolean. If FALSE, the text is returned unlinked. Default: TRUE.
384
- * @return string The generated link
385
- * @since 4.2.4
386
- */
387
- function wprss_link_display( $link, $text, $bool = TRUE ) {
388
- $display_settings = wprss_get_display_settings( get_option( 'wprss_settings_general' ) );
389
- $a = $bool ? "<a {$display_settings['open']} {$display_settings['follow']} href='$link'>$text</a>" : $text;
390
- return $a;
391
- }
392
-
393
-
394
- add_filter( 'wprss_pagination', 'wprss_pagination_links' );
395
- /**
396
- * Display pagination links
397
- *
398
- * @since 3.5
399
- */
400
- function wprss_pagination_links( $output ) {
401
- // Get the general setting
402
- $pagination = wprss_get_general_setting( 'pagination' );;
403
-
404
- // Check the pagination setting, if using page numbers
405
- if ( $pagination === 'numbered' ) {
406
- global $wp_query;
407
- $big = 999999999; // need an unlikely integer
408
- $output .= paginate_links( array(
409
- 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
410
- 'format' => '?paged=%#%',
411
- 'current' => max( 1, get_query_var('paged') ),
412
- 'total' => $wp_query->max_num_pages
413
- ) );
414
- return $output;
415
- }
416
- // Otherwise, using default paginations
417
- else {
418
- $output .= '<div class="nav-links">';
419
- $output .= ' <div class="nav-previous alignleft">' . get_next_posts_link( __( 'Older posts', WPRSS_TEXT_DOMAIN ) ) . '</div>';
420
- $output .= ' <div class="nav-next alignright">' . get_previous_posts_link( __( 'Newer posts', WPRSS_TEXT_DOMAIN ) ) . '</div>';
421
- $output .= '</div>';
422
- return $output;
423
- }
424
- }
425
-
426
-
427
- add_filter( 'the_title', 'wprss_shorten_title', 10, 2 );
428
- /**
429
- * Checks the title limit option and shortens the title when necassary.
430
- *
431
- * @since 1.0
432
- */
433
- function wprss_shorten_title( $title, $id = null ) {
434
- if ( $id === null ) return $title;
435
- // Get the option. If does not exist, use 0, which is ignored.
436
- $general_settings = get_option( 'wprss_settings_general' );
437
- $title_limit = isset( $general_settings['title_limit'] )? intval( $general_settings['title_limit'] ) : 0;
438
- // Check if the title is for a wprss_feed_item, and check if trimming is needed
439
- if ( isset( $id ) && get_post_type( $id ) === 'wprss_feed_item' && $title_limit > 0 && strlen( $title ) > $title_limit ) {
440
- // Return the trimmed version of the title
441
- return substr( $title, 0, $title_limit ) . apply_filters( 'wprss_shortened_title_ending', '...' );
442
- }
443
- // Otherwise, return the same title
444
- return $title;
445
- }
446
-
447
-
448
- /**
449
- * Display feed items on the front end (via shortcode or function)
450
- *
451
- * @since 2.0
452
- */
453
- function wprss_display_feed_items( $args = array() ) {
454
- $settings = get_option( 'wprss_settings_general' );
455
- $args = wprss_get_shortcode_default_args( $args );
456
-
457
- $args = apply_filters( 'wprss_shortcode_args', $args );
458
-
459
- $query_args = $settings;
460
- if ( isset( $args['limit'] ) ) {
461
- $query_args['feed_limit'] = filter_var( $args['limit'], FILTER_VALIDATE_INT, array(
462
- 'options' => array(
463
- 'min_range' => 1,
464
- 'default' => $query_args['feed_limit'],
465
- ),
466
- ) );
467
- }
468
-
469
- if ( isset( $args['pagination'] ) ) {
470
- $query_args['pagination'] = $args['pagination'];
471
- }
472
-
473
- if ( isset( $args['source'] ) ) {
474
- $query_args['source'] = $args['source'];
475
- }
476
- elseif ( isset( $args['exclude'] ) ) {
477
- $query_args['exclude'] = $args['exclude'];
478
- }
479
-
480
- $query_args = apply_filters( 'wprss_process_shortcode_args', $query_args, $args );
481
-
482
- $feed_items = wprss_get_feed_items_query( $query_args );
483
-
484
- do_action( 'wprss_display_template', $args, $feed_items );
485
- }
486
-
487
-
488
- /**
489
- * Redirects to wprss_display_feed_items
490
- * It is used for backwards compatibility to versions < 2.0
491
- *
492
- * @since 2.1
493
- */
494
- function wp_rss_aggregator( $args = array() ) {
495
- wprss_display_feed_items( $args );
496
- }
497
-
498
-
499
- /**
500
- * Limits a phrase/content to a defined number of words
501
- *
502
- * NOT BEING USED as we're using the native WP function, although the native one strips tags, so I'll
503
- * probably revisit this one again soon.
504
- *
505
- * @since 3.0
506
- * @param string $words
507
- * @param integer $limit
508
- * @param string $append
509
- * @return string
510
- */
511
- function wprss_limit_words( $words, $limit, $append = '' ) {
512
- /* Add 1 to the specified limit becuase arrays start at 0 */
513
- $limit = $limit + 1;
514
- /* Store each individual word as an array element
515
- up to the limit */
516
- $words = explode( ' ', $words, $limit );
517
- /* Shorten the array by 1 because that final element will be the sum of all the words after the limit */
518
- array_pop( $words );
519
- /* Implode the array for output, and append an ellipse */
520
- $words = implode( ' ', $words ) . $append;
521
- /* Return the result */
522
- return rtrim( $words );
523
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/feed-importing.php CHANGED
@@ -1,13 +1,15 @@
1
  <?php
2
- /**
3
- * Functions relating to feed importing
4
- *
5
- * @package WPRSSAggregator
6
- */
7
 
 
 
 
 
 
 
 
8
 
9
  // Warning: Order may be important
10
- add_filter('wprss_normalize_permalink', 'wprss_google_news_url_fix', 8);
11
  add_filter('wprss_normalize_permalink', 'wprss_bing_news_url_fix', 9);
12
  add_filter('wprss_normalize_permalink', 'wprss_google_alerts_url_fix', 10);
13
  add_filter('wprss_normalize_permalink', 'wprss_convert_video_permalink', 100);
@@ -25,7 +27,9 @@
25
  * @since 3.2
26
  */
27
  function wprss_fetch_insert_single_feed_items( $feed_ID ) {
28
- wprss_log_obj( 'Starting import of feed', $feed_ID, null, WPRSS_LOG_LEVEL_INFO );
 
 
29
 
30
  global $wprss_importing_feed;
31
  $wprss_importing_feed = $feed_ID;
@@ -33,32 +37,25 @@
33
 
34
  // Check if the feed source is active.
35
  if ( wprss_is_feed_source_active( $feed_ID ) === FALSE && wprss_feed_source_force_next_fetch( $feed_ID ) === FALSE ) {
36
- // If it is not active ( paused ), return without fetching the feed items.
37
- wprss_log( 'Feed is not active and not forced. Import cancelled.', null, WPRSS_LOG_LEVEL_INFO );
38
  return;
39
  }
 
40
  // If the feed source is forced for next fetch, remove the force next fetch data
41
  if ( wprss_feed_source_force_next_fetch( $feed_ID ) ) {
42
  delete_post_meta( $feed_ID, 'wprss_force_next_fetch' );
43
- wprss_log( 'Force feed flag removed', null, WPRSS_LOG_LEVEL_SYSTEM );
44
  }
45
 
46
- $start_of_update = wprss_flag_feed_as_updating( $feed_ID );
47
- wprss_log_obj( 'Start of import time updated', date( 'Y-m-d H:i:s', $start_of_update), null, WPRSS_LOG_LEVEL_SYSTEM );
48
-
49
  // Get the feed source URL from post meta, and filter it
50
  $feed_url = get_post_meta( $feed_ID, 'wprss_url', true );
51
- wprss_log_obj( 'Original feed source URL', $feed_url, null, WPRSS_LOG_LEVEL_SYSTEM );
52
  $feed_url = apply_filters( 'wprss_feed_source_url', $feed_url, $feed_ID );
53
- wprss_log_obj( 'Actual feed source URL', $feed_url, null, WPRSS_LOG_LEVEL_INFO );
54
 
55
  // Get the feed limit from post meta
56
  $feed_limit = get_post_meta( $feed_ID, 'wprss_limit', true );
57
- wprss_log_obj( 'Feed limit value is', $feed_limit, null, WPRSS_LOG_LEVEL_SYSTEM );
58
 
59
  // If the feed has no individual limit
60
  if ( $feed_limit === '' || intval( $feed_limit ) <= 0 ) {
61
- wprss_log_obj( 'Using global limit', $feed_limit, null, WPRSS_LOG_LEVEL_NOTICE );
62
  // Get the global limit
63
  $global_limit = wprss_get_general_setting('limit_feed_items_imported');
64
  // If no global limit is set, mark as NULL
@@ -67,34 +64,37 @@
67
  }
68
  else $feed_limit = $global_limit;
69
  }
70
- wprss_log_obj( 'Feed import limit', $feed_limit, null, WPRSS_LOG_LEVEL_INFO );
 
71
 
72
  // Filter the URL for validaty
73
- if ( wprss_validate_url( $feed_url ) ) {
74
- wprss_log_obj( 'Feed URL is valid', $feed_url, null, WPRSS_LOG_LEVEL_INFO );
 
75
  // Get the feed items from the source
76
  $items = wprss_get_feed_items( $feed_url, $feed_ID );
77
 
78
  // If got NULL, convert to an empty array
79
  if ( $items === NULL ) {
80
- $items = array();
81
- wprss_log( 'Items were NULL. Using empty array', null, WPRSS_LOG_LEVEL_WARNING );
82
- }
83
-
84
- // See `wprss_item_comparators` filter
85
- wprss_sort_items($items);
86
-
87
- // If using a limit ...
88
- if ( $feed_limit === NULL ) {
89
- $items_to_insert = $items;
90
  } else {
91
- $items_to_insert = array_slice( $items, 0, $feed_limit );
92
- wprss_log_obj( 'Sliced a segment of items', count($items_to_insert), null, WPRSS_LOG_LEVEL_SYSTEM );
93
- }
 
 
 
 
 
 
 
 
 
 
 
94
 
95
  // Gather the permalinks of existing feed item's related to this feed source
96
  $existing_permalinks = wprss_get_existing_permalinks( $feed_ID );
97
- wprss_log_obj( 'Retrieved existing permalinks', count( $existing_permalinks ), null, WPRSS_LOG_LEVEL_SYSTEM );
98
 
99
  // Check if we should only import uniquely-titled feed items.
100
  $existing_titles = array();
@@ -102,19 +102,18 @@
102
  if ( wprss_get_general_setting( 'unique_titles' ) ) {
103
  $unique_titles = TRUE;
104
  $existing_titles = wprss_get_existing_titles( );
105
- wprss_log_obj( 'Retrieved existing titles from global', count( $existing_titles ), null, WPRSS_LOG_LEVEL_SYSTEM );
106
  } else if ( get_post_meta( $feed_ID, 'wprss_unique_titles', true ) === 'true' ) {
107
  $unique_titles = TRUE;
108
  $existing_titles = wprss_get_existing_titles( $feed_ID );
109
- wprss_log_obj( 'Retrieved existing titles from feed source', count( $existing_titles ), null, WPRSS_LOG_LEVEL_SYSTEM );
110
  }
111
 
112
  // Generate a list of items fetched, that are not already in the DB
113
  $new_items = array();
114
  foreach ( $items_to_insert as $item ) {
 
115
 
116
  $permalink = wprss_normalize_permalink( $item->get_permalink(), $item, $feed_ID );
117
- wprss_log_obj( 'Normalized permalink', sprintf('%1$s -> %2$s', $item->get_permalink(), $permalink), null, WPRSS_LOG_LEVEL_SYSTEM );
118
 
119
  // Check if not blacklisted and not already imported
120
  $is_blacklisted = wprss_is_blacklisted( $permalink );
@@ -123,43 +122,39 @@
123
 
124
  if ( $is_blacklisted === FALSE && $permalink_exists === FALSE && $title_exists === FALSE) {
125
  $new_items[] = $item;
126
- wprss_log_obj( 'Permalink OK', $permalink, null, WPRSS_LOG_LEVEL_SYSTEM );
127
 
128
  if ( $unique_titles ) {
129
  $existing_titles[$item->get_title()] = 1;
130
  }
131
  } else {
132
  if ( $is_blacklisted ) {
133
- wprss_log( 'Permalink blacklisted', null, WPRSS_LOG_LEVEL_SYSTEM );
134
  }
135
  if ( $permalink_exists ) {
136
- wprss_log( 'Permalink already exists', null, WPRSS_LOG_LEVEL_SYSTEM );
137
  }
138
  if ( $title_exists ) {
139
- wprss_log( 'Title already exists', null, WPRSS_LOG_LEVEL_SYSTEM );
140
  }
141
  }
142
  }
143
 
144
  $original_count = count( $items_to_insert );
145
  $new_count = count( $new_items );
 
146
  if ( $new_count !== $original_count ) {
147
- wprss_log_obj( 'Items filtered out', $original_count - $new_count, null, WPRSS_LOG_LEVEL_SYSTEM );
148
- } else {
149
- wprss_log( 'Items to import remained untouched. Not items already exist or are blacklisted.', null, WPRSS_LOG_LEVEL_SYSTEM );
150
  }
151
 
152
  $items_to_insert = $new_items;
153
  $per_import = wprss_get_general_setting('limit_feed_items_per_import');
154
  if (!empty($per_import)) {
155
- wprss_log_obj( 'Per-import limit', $per_import, null, WPRSS_LOG_LEVEL_SYSTEM );
156
  $items_to_insert = array_slice( $items_to_insert, 0, $per_import );
157
  }
158
 
159
  // If using a limit - delete any excess items to make room for the new items
160
  if ( $feed_limit !== NULL ) {
161
- wprss_log_obj( 'Some items may be deleted due to limit', $feed_limit, null, WPRSS_LOG_LEVEL_SYSTEM );
162
-
163
  // Get the number of feed items in DB, and their count
164
  $db_feed_items = wprss_get_feed_items_for_source( $feed_ID );
165
  $num_db_feed_items = $db_feed_items->post_count;
@@ -176,28 +171,26 @@
176
  $db_feed_items_reversed = array_reverse( $db_feed_items->posts );
177
  // Cut the array to get only the first few that are to be deleted ( equal to $num_feed_items_to_delete )
178
  $feed_items_to_delete = array_slice( $db_feed_items_reversed, 0, $num_feed_items_to_delete );
179
- wprss_log( sprintf( 'There already are %1$d items in the database. %2$d items can be inserted. %3$d items will be deleted', $num_db_feed_items, $num_can_insert, $num_feed_items_to_delete ), null, WPRSS_LOG_LEVEL_SYSTEM );
180
 
181
  // Iterate the feed items and delete them
 
182
  foreach ( $feed_items_to_delete as $key => $post ) {
183
  wp_delete_post( $post->ID, TRUE );
 
184
  }
185
 
186
- if ( $deleted_items_count = count( $feed_items_to_delete ) )
187
- wprss_log_obj( 'Items deleted due to limit', $deleted_items_count, null, WPRSS_LOG_LEVEL_NOTICE );
 
188
  }
189
 
190
  update_post_meta( $feed_ID, 'wprss_last_update', $last_update_time = time() );
191
  update_post_meta( $feed_ID, 'wprss_last_update_items', 0 );
192
- wprss_log_obj( 'Last import time updated', $last_update_time, null, WPRSS_LOG_LEVEL_SYSTEM );
193
 
194
  // Insert the items into the db
195
  if ( !empty( $items_to_insert ) ) {
196
- wprss_log_obj( 'There are items to insert', count($items_to_insert), null, WPRSS_LOG_LEVEL_INFO );
197
  wprss_items_insert_post( $items_to_insert, $feed_ID );
198
  }
199
- } else {
200
- wprss_log_obj('The feed URL is not valid! Please recheck', $feed_url);
201
  }
202
 
203
  $next_scheduled = get_post_meta( $feed_ID, 'wprss_reschedule_event', TRUE );
@@ -205,11 +198,14 @@
205
  if ( $next_scheduled !== '' ) {
206
  wprss_feed_source_update_start_schedule( $feed_ID );
207
  delete_post_meta( $feed_ID, 'wprss_reschedule_event' );
208
- wprss_log( 'Next update rescheduled', null, WPRSS_LOG_LEVEL_SYSTEM );
209
  }
210
 
211
  wprss_flag_feed_as_idle( $feed_ID );
212
- wprss_log_obj( 'Import complete', $feed_ID, __FUNCTION__, WPRSS_LOG_LEVEL_INFO );
 
 
 
213
  }
214
 
215
 
@@ -236,12 +232,39 @@
236
  // Return the items in the feed.
237
  return $feed->get_items();
238
  }
239
- else {
240
- wprss_log( 'Failed to fetch feed "' . $feed_url . '". ' . $feed->get_error_message() );
241
- return NULL;
242
- }
 
 
 
243
  }
244
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
245
  /**
246
  * A clone of the function 'fetch_feed' in wp-includes/feed.php [line #529]
247
  *
@@ -262,10 +285,10 @@
262
  // If a feed source was passed
263
  if ($source !== null || $param_force_feed) {
264
  // Get the force feed option for the feed source
265
- $force_feed = get_post_meta($source, 'wprss_force_feed', null);
266
  // If turned on, force the feed
267
  if ($force_feed == 'true' || $param_force_feed) {
268
- $feed->force_feed(null);
269
  }
270
  }
271
 
@@ -460,7 +483,7 @@
460
  */
461
  function wprss_items_insert_post( $items, $feed_ID ) {
462
  update_post_meta( $feed_ID, 'wprss_feed_is_updating', $update_started_at = time() );
463
- wprss_log_obj( 'Starting import of items for feed ' . $feed_ID, $update_started_at, null, WPRSS_LOG_LEVEL_INFO );
464
 
465
  // Gather the permalinks of existing feed item's related to this feed source
466
  $existing_permalinks = wprss_get_existing_permalinks( $feed_ID );
@@ -471,20 +494,24 @@
471
  foreach ( $items as $item ) {
472
 
473
  // Normalize the URL
474
- $permalink = $item->get_permalink(); // Link or enclosure URL
475
- $permalink = htmlspecialchars_decode( $permalink ); // SimplePie encodes HTML special chars
 
 
476
 
477
  $permalink = wprss_normalize_permalink( $permalink, $item, $feed_ID );
478
- wprss_log_obj( 'Importing item', $permalink, null, WPRSS_LOG_LEVEL_INFO );
479
- wprss_log_obj( 'Original permalink', $item->get_permalink(), null, WPRSS_LOG_LEVEL_SYSTEM );
480
 
481
  // Save the enclosure URL
482
  $enclosure_url = '';
483
  if ( $enclosure = $item->get_enclosure(0) ) {
484
- wprss_log( 'Item has an enclosure', null, WPRSS_LOG_LEVEL_SYSTEM );
485
  if ( $enclosure->get_link() ) {
486
  $enclosure_url = $enclosure->get_link();
487
- wprss_log_obj( 'Enclosure has link', $enclosure_url, null, WPRSS_LOG_LEVEL_SYSTEM );
 
 
 
 
488
  }
489
  }
490
 
@@ -497,13 +524,8 @@
497
  // Check if newly fetched item already present in existing feed items,
498
  // if not insert it into wp_posts and insert post meta.
499
  if ( ! ( array_key_exists( $permalink, $existing_permalinks ) ) ) {
500
- wprss_log( "Importing (unique) feed item (Source: $feed_ID)", null, WPRSS_LOG_LEVEL_INFO );
501
-
502
  // Extend the importing time and refresh the feed's updating flag to reflect that it is active
503
- $extend_time = wprss_flag_feed_as_updating( $feed_ID );
504
- $extend_time_f = date( 'Y-m-d H:i:s', $extend_time );
505
  $time_limit = wprss_get_item_import_time_limit();
506
- wprss_log( "Extended execution time limit by {$time_limit}. (Current Time: {$extend_time_f})", null, WPRSS_LOG_LEVEL_INFO );
507
  set_time_limit( $time_limit );
508
 
509
  // Apply filters that determine if the feed item should be inserted into the DB or not.
@@ -514,8 +536,6 @@
514
 
515
  // If the item is not NULL, continue to inserting the feed item post into the DB
516
  if ( $item !== NULL && !is_bool($item) ) {
517
- wprss_log( 'Using core logic', null, WPRSS_LOG_LEVEL_SYSTEM );
518
-
519
  // Get the date and GTM date and normalize if not valid dor not present
520
  $format = 'Y-m-d H:i:s';
521
  $has_date = $item->get_date( 'U' ) ? TRUE : FALSE;
@@ -535,13 +555,13 @@
535
  ),
536
  $item
537
  );
538
- wprss_log( 'Post data filters applied', null, WPRSS_LOG_LEVEL_SYSTEM );
539
 
540
  if ( defined('ICL_SITEPRESS_VERSION') )
541
  @include_once( WP_PLUGIN_DIR . '/sitepress-multilingual-cms/inc/wpml-api.php' );
542
  if ( defined('ICL_LANGUAGE_CODE') ) {
543
  $_POST['icl_post_language'] = $language_code = ICL_LANGUAGE_CODE;
544
- wprss_log_obj( 'WPML detected. Language code determined', $language_code, null, WPRSS_LOG_LEVEL_SYSTEM );
 
545
  }
546
 
547
  // Create and insert post object into the DB
@@ -566,11 +586,11 @@
566
 
567
  // Remember newly added permalink
568
  $existing_permalinks[$permalink] = 1;
569
- wprss_log_obj( 'Item imported', $inserted_ID, null, WPRSS_LOG_LEVEL_INFO );
570
  }
571
  else {
572
- update_post_meta( $source, 'wprss_error_last_import', 'An error occurred while inserting a feed item into the database.' );
573
- wprss_log_obj( 'Failed to insert post', $feed_item, 'wprss_items_insert_post > wp_insert_post' );
 
574
  }
575
  }
576
  // If the item is TRUE, then a hook function in the filter inserted the item.
@@ -579,15 +599,13 @@
579
  $items_inserted++;
580
  }
581
  }
582
- else {
583
- wprss_log( 'Item already exists and will be skipped', null, WPRSS_LOG_LEVEL_NOTICE );
584
- }
585
 
586
- wprss_log_obj( 'Finished importing item', $permalink, null, WPRSS_LOG_LEVEL_INFO );
 
 
587
  }
588
 
589
  update_post_meta( $feed_ID, 'wprss_last_update_items', $items_inserted );
590
- wprss_log_obj( sprintf( 'Finished importing %1$d items for feed source', $items_inserted ), $feed_ID, null, WPRSS_LOG_LEVEL_INFO );
591
  }
592
 
593
 
@@ -647,7 +665,7 @@
647
  * @since 3.0
648
  */
649
  function wprss_fetch_insert_all_feed_items( $all = TRUE ) {
650
- wprss_log( 'Importing from all sources...', __FUNCTION__, WPRSS_LOG_LEVEL_SYSTEM );
651
  // Get all feed sources
652
  $feed_sources = wprss_get_all_feed_sources();
653
 
@@ -687,23 +705,32 @@
687
  * @since 4.6.6
688
  */
689
  function wprss_detect_exec_timeout() {
690
- // Get last error
691
- if ( $error = error_get_last() ){
692
- // Check if it is an E_ERROR and if it is a max exec time limit error
693
- if ( $error['type'] === E_ERROR && stripos( $error['message'], 'maximum execution' ) === 0 ) {
694
- // If the importing process was running
695
- if ( array_key_exists( 'wprss_importing_feed', $GLOBALS ) && $GLOBALS['wprss_importing_feed'] !== NULL ) {
696
- // Get the ID of the feed that was importing
697
- $feed_ID = $GLOBALS['wprss_importing_feed'];
698
- // Perform clean up
699
- wprss_flag_feed_as_idle( $feed_ID );
700
- $msg = sprintf( __( 'The PHP script timed out while importing an item from this feed, after %d seconds.', WPRSS_TEXT_DOMAIN ), wprss_get_item_import_time_limit() );
701
- update_post_meta( $feed_ID, 'wprss_error_last_import', $msg );
702
- // Log the error
703
- wprss_log( 'The PHP script timed out while importing feed #' . $feed_ID, NULL, WPRSS_LOG_LEVEL_ERROR );
704
- }
705
- }
706
- }
 
 
 
 
 
 
 
 
 
707
  }
708
 
709
  /**
@@ -746,7 +773,9 @@
746
  return wprss_items_sort_compare_items($itemA, $itemB, $comparators, $feedSource);
747
  });
748
  } catch (\InvalidArgumentException $e) {
749
- wprss_log( 'Error was encountered while sorting items; list remains unsorted', NULL, WPRSS_LOG_LEVEL_WARNING );
 
 
750
  }
751
  }
752
 
1
  <?php
 
 
 
 
 
2
 
3
+ /**
4
+ * Functions relating to feed importing
5
+ *
6
+ * @package WPRSSAggregator
7
+ */
8
+
9
+ use Psr\Log\LogLevel;
10
 
11
  // Warning: Order may be important
12
+ add_filter('wprss_normalize_permalink', 'wprss_google_news_url_fix', 8);
13
  add_filter('wprss_normalize_permalink', 'wprss_bing_news_url_fix', 9);
14
  add_filter('wprss_normalize_permalink', 'wprss_google_alerts_url_fix', 10);
15
  add_filter('wprss_normalize_permalink', 'wprss_convert_video_permalink', 100);
27
  * @since 3.2
28
  */
29
  function wprss_fetch_insert_single_feed_items( $feed_ID ) {
30
+ $logger = wpra_get_logger($feed_ID);
31
+
32
+ $logger->info('Starting import');
33
 
34
  global $wprss_importing_feed;
35
  $wprss_importing_feed = $feed_ID;
37
 
38
  // Check if the feed source is active.
39
  if ( wprss_is_feed_source_active( $feed_ID ) === FALSE && wprss_feed_source_force_next_fetch( $feed_ID ) === FALSE ) {
40
+ $logger->info('Feed is not active. Finished');
 
41
  return;
42
  }
43
+
44
  // If the feed source is forced for next fetch, remove the force next fetch data
45
  if ( wprss_feed_source_force_next_fetch( $feed_ID ) ) {
46
  delete_post_meta( $feed_ID, 'wprss_force_next_fetch' );
 
47
  }
48
 
 
 
 
49
  // Get the feed source URL from post meta, and filter it
50
  $feed_url = get_post_meta( $feed_ID, 'wprss_url', true );
 
51
  $feed_url = apply_filters( 'wprss_feed_source_url', $feed_url, $feed_ID );
52
+ $logger->debug('Feed source URL: {0}', [$feed_url]);
53
 
54
  // Get the feed limit from post meta
55
  $feed_limit = get_post_meta( $feed_ID, 'wprss_limit', true );
 
56
 
57
  // If the feed has no individual limit
58
  if ( $feed_limit === '' || intval( $feed_limit ) <= 0 ) {
 
59
  // Get the global limit
60
  $global_limit = wprss_get_general_setting('limit_feed_items_imported');
61
  // If no global limit is set, mark as NULL
64
  }
65
  else $feed_limit = $global_limit;
66
  }
67
+
68
+ $logger->debug('Feed item import limit: {0}', [$feed_limit]);
69
 
70
  // Filter the URL for validaty
71
+ if ( ! wprss_validate_url( $feed_url ) ) {
72
+ $logger->error('Feed URL is not valid!');
73
+ } else {
74
  // Get the feed items from the source
75
  $items = wprss_get_feed_items( $feed_url, $feed_ID );
76
 
77
  // If got NULL, convert to an empty array
78
  if ( $items === NULL ) {
79
+ $items_to_insert = array();
 
 
 
 
 
 
 
 
 
80
  } else {
81
+ // See `wprss_item_comparators` filter
82
+ wprss_sort_items($items);
83
+
84
+ // If using a limit ...
85
+ if ( $feed_limit === NULL ) {
86
+ $items_to_insert = $items;
87
+ } else {
88
+ $items_to_insert = array_slice( $items, 0, $feed_limit );
89
+ $logger->info('Fetched {0} items. Got {1} items after applying limit', [
90
+ count($items),
91
+ count($items_to_insert)
92
+ ]);
93
+ }
94
+ }
95
 
96
  // Gather the permalinks of existing feed item's related to this feed source
97
  $existing_permalinks = wprss_get_existing_permalinks( $feed_ID );
 
98
 
99
  // Check if we should only import uniquely-titled feed items.
100
  $existing_titles = array();
102
  if ( wprss_get_general_setting( 'unique_titles' ) ) {
103
  $unique_titles = TRUE;
104
  $existing_titles = wprss_get_existing_titles( );
 
105
  } else if ( get_post_meta( $feed_ID, 'wprss_unique_titles', true ) === 'true' ) {
106
  $unique_titles = TRUE;
107
  $existing_titles = wprss_get_existing_titles( $feed_ID );
 
108
  }
109
 
110
  // Generate a list of items fetched, that are not already in the DB
111
  $new_items = array();
112
  foreach ( $items_to_insert as $item ) {
113
+ $item_title = $item->get_title();
114
 
115
  $permalink = wprss_normalize_permalink( $item->get_permalink(), $item, $feed_ID );
116
+ $logger->debug('Checking item "{0}"', [$item_title]);
117
 
118
  // Check if not blacklisted and not already imported
119
  $is_blacklisted = wprss_is_blacklisted( $permalink );
122
 
123
  if ( $is_blacklisted === FALSE && $permalink_exists === FALSE && $title_exists === FALSE) {
124
  $new_items[] = $item;
 
125
 
126
  if ( $unique_titles ) {
127
  $existing_titles[$item->get_title()] = 1;
128
  }
129
  } else {
130
  if ( $is_blacklisted ) {
131
+ $logger->debug('Item "{0}" is blacklisted', [$item_title]);
132
  }
133
  if ( $permalink_exists ) {
134
+ $logger->debug('Item "{0}" already exists in the database', [$item_title]);
135
  }
136
  if ( $title_exists ) {
137
+ $logger->debug('An item with the title "{0}" already exists', [$item_title]);
138
  }
139
  }
140
  }
141
 
142
  $original_count = count( $items_to_insert );
143
  $new_count = count( $new_items );
144
+
145
  if ( $new_count !== $original_count ) {
146
+ $logger->debug('{0} will be skipped', [$original_count - $new_count]);
 
 
147
  }
148
 
149
  $items_to_insert = $new_items;
150
  $per_import = wprss_get_general_setting('limit_feed_items_per_import');
151
  if (!empty($per_import)) {
152
+ $logger->debug('Applying per-import item limit of {0} items', [$per_import]);
153
  $items_to_insert = array_slice( $items_to_insert, 0, $per_import );
154
  }
155
 
156
  // If using a limit - delete any excess items to make room for the new items
157
  if ( $feed_limit !== NULL ) {
 
 
158
  // Get the number of feed items in DB, and their count
159
  $db_feed_items = wprss_get_feed_items_for_source( $feed_ID );
160
  $num_db_feed_items = $db_feed_items->post_count;
171
  $db_feed_items_reversed = array_reverse( $db_feed_items->posts );
172
  // Cut the array to get only the first few that are to be deleted ( equal to $num_feed_items_to_delete )
173
  $feed_items_to_delete = array_slice( $db_feed_items_reversed, 0, $num_feed_items_to_delete );
 
174
 
175
  // Iterate the feed items and delete them
176
+ $num_items_deleted = 0;
177
  foreach ( $feed_items_to_delete as $key => $post ) {
178
  wp_delete_post( $post->ID, TRUE );
179
+ $num_items_deleted++;
180
  }
181
 
182
+ if ($num_items_deleted > 0) {
183
+ $logger->info('Deleted the oldest {0} items from the database', [$num_items_deleted]);
184
+ }
185
  }
186
 
187
  update_post_meta( $feed_ID, 'wprss_last_update', $last_update_time = time() );
188
  update_post_meta( $feed_ID, 'wprss_last_update_items', 0 );
 
189
 
190
  // Insert the items into the db
191
  if ( !empty( $items_to_insert ) ) {
 
192
  wprss_items_insert_post( $items_to_insert, $feed_ID );
193
  }
 
 
194
  }
195
 
196
  $next_scheduled = get_post_meta( $feed_ID, 'wprss_reschedule_event', TRUE );
198
  if ( $next_scheduled !== '' ) {
199
  wprss_feed_source_update_start_schedule( $feed_ID );
200
  delete_post_meta( $feed_ID, 'wprss_reschedule_event' );
201
+ $logger->info('Scheduled next update');
202
  }
203
 
204
  wprss_flag_feed_as_idle( $feed_ID );
205
+
206
+ $logger->info('Imported completed!');
207
+
208
+ $wprss_importing_feed = null;
209
  }
210
 
211
 
232
  // Return the items in the feed.
233
  return $feed->get_items();
234
  }
235
+
236
+ wpra_get_logger($source)->error('Failed to fetch the feed from {0}. Error: {1}', [
237
+ $feed_url,
238
+ $feed->get_error_message()
239
+ ]);
240
+
241
+ return NULL;
242
  }
243
 
244
+ //add_action ('cron_request', 'wpse_cron_add_xdebug_cookie', 10, 2) ;
245
+
246
+ /**
247
+ * Allow debugging of wp_cron jobs
248
+ *
249
+ * @param array $cron_request_array
250
+ * @param string $doing_wp_cron
251
+ *
252
+ * @return array $cron_request_array with the current XDEBUG_SESSION cookie added if set
253
+ */
254
+ function wpse_cron_add_xdebug_cookie ($cron_request_array, $doing_wp_cron)
255
+ {
256
+ if (empty ($_COOKIE['XDEBUG_SESSION'])) {
257
+ return ($cron_request_array) ;
258
+ }
259
+
260
+ if (empty ($cron_request_array['args']['cookies'])) {
261
+ $cron_request_array['args']['cookies'] = array () ;
262
+ }
263
+ $cron_request_array['args']['cookies']['XDEBUG_SESSION'] = $_COOKIE['XDEBUG_SESSION'] ;
264
+
265
+ return ($cron_request_array) ;
266
+ }
267
+
268
  /**
269
  * A clone of the function 'fetch_feed' in wp-includes/feed.php [line #529]
270
  *
285
  // If a feed source was passed
286
  if ($source !== null || $param_force_feed) {
287
  // Get the force feed option for the feed source
288
+ $force_feed = get_post_meta($source, 'wprss_force_feed', true);
289
  // If turned on, force the feed
290
  if ($force_feed == 'true' || $param_force_feed) {
291
+ $feed->force_feed(true);
292
  }
293
  }
294
 
483
  */
484
  function wprss_items_insert_post( $items, $feed_ID ) {
485
  update_post_meta( $feed_ID, 'wprss_feed_is_updating', $update_started_at = time() );
486
+ $logger = wpra_get_logger($feed_ID);
487
 
488
  // Gather the permalinks of existing feed item's related to this feed source
489
  $existing_permalinks = wprss_get_existing_permalinks( $feed_ID );
494
  foreach ( $items as $item ) {
495
 
496
  // Normalize the URL
497
+ $permalink = $item->get_permalink(); // Link or enclosure URL
498
+ $permalink = htmlspecialchars_decode( $permalink ); // SimplePie encodes HTML special chars
499
+
500
+ $logger->debug('Beginning import for "{0}"', [$item->get_title()]);
501
 
502
  $permalink = wprss_normalize_permalink( $permalink, $item, $feed_ID );
 
 
503
 
504
  // Save the enclosure URL
505
  $enclosure_url = '';
506
  if ( $enclosure = $item->get_enclosure(0) ) {
507
+
508
  if ( $enclosure->get_link() ) {
509
  $enclosure_url = $enclosure->get_link();
510
+
511
+ $logger->debug('Item "{0}" has an enclosure link: {1}', [
512
+ $item->get_title(),
513
+ $enclosure_url
514
+ ]);
515
  }
516
  }
517
 
524
  // Check if newly fetched item already present in existing feed items,
525
  // if not insert it into wp_posts and insert post meta.
526
  if ( ! ( array_key_exists( $permalink, $existing_permalinks ) ) ) {
 
 
527
  // Extend the importing time and refresh the feed's updating flag to reflect that it is active
 
 
528
  $time_limit = wprss_get_item_import_time_limit();
 
529
  set_time_limit( $time_limit );
530
 
531
  // Apply filters that determine if the feed item should be inserted into the DB or not.
536
 
537
  // If the item is not NULL, continue to inserting the feed item post into the DB
538
  if ( $item !== NULL && !is_bool($item) ) {
 
 
539
  // Get the date and GTM date and normalize if not valid dor not present
540
  $format = 'Y-m-d H:i:s';
541
  $has_date = $item->get_date( 'U' ) ? TRUE : FALSE;
555
  ),
556
  $item
557
  );
 
558
 
559
  if ( defined('ICL_SITEPRESS_VERSION') )
560
  @include_once( WP_PLUGIN_DIR . '/sitepress-multilingual-cms/inc/wpml-api.php' );
561
  if ( defined('ICL_LANGUAGE_CODE') ) {
562
  $_POST['icl_post_language'] = $language_code = ICL_LANGUAGE_CODE;
563
+
564
+ $logger->debug('Detected WPML with language code {0]', [$language_code]);
565
  }
566
 
567
  // Create and insert post object into the DB
586
 
587
  // Remember newly added permalink
588
  $existing_permalinks[$permalink] = 1;
 
589
  }
590
  else {
591
+ update_post_meta( $feed_ID, 'wprss_error_last_import', 'An error occurred while inserting a feed item into the database.' );
592
+
593
+ $logger->error('Failed to save item "{0}" into the database', [$item->get_title()]);
594
  }
595
  }
596
  // If the item is TRUE, then a hook function in the filter inserted the item.
599
  $items_inserted++;
600
  }
601
  }
 
 
 
602
 
603
+ if (is_object($item) && !is_wp_error($item)) {
604
+ $logger->info('Imported "{0}"', [$item->get_title()]);
605
+ }
606
  }
607
 
608
  update_post_meta( $feed_ID, 'wprss_last_update_items', $items_inserted );
 
609
  }
610
 
611
 
665
  * @since 3.0
666
  */
667
  function wprss_fetch_insert_all_feed_items( $all = TRUE ) {
668
+ wpra_get_logger()->info('Beginning import for all feed sources');
669
  // Get all feed sources
670
  $feed_sources = wprss_get_all_feed_sources();
671
 
705
  * @since 4.6.6
706
  */
707
  function wprss_detect_exec_timeout() {
708
+ global $wprss_importing_feed;
709
+ $feed_ID = (isset($wprss_importing_feed) && !empty($wprss_importing_feed))
710
+ ? $wprss_importing_feed
711
+ : null;
712
+
713
+ if ($feed_ID === null) {
714
+ return;
715
+ }
716
+
717
+ // Remove the "importing" flag from the feed source
718
+ wprss_flag_feed_as_idle($feed_ID);
719
+
720
+ // If no error, stop
721
+ $error = error_get_last();
722
+ if (empty($error)) {
723
+ return;
724
+ }
725
+
726
+ $msg = sprintf(
727
+ __('The importing process failed after %d seconds with the message: "%s"', 'wprss'),
728
+ wprss_get_item_import_time_limit(),
729
+ $error['message']
730
+ );
731
+ // Save the error in the feed source's meta and the plugin log
732
+ update_post_meta($feed_ID, 'wprss_error_last_import', $msg);
733
+ wpra_get_logger($feed_ID)->error($msg);
734
  }
735
 
736
  /**
773
  return wprss_items_sort_compare_items($itemA, $itemB, $comparators, $feedSource);
774
  });
775
  } catch (\InvalidArgumentException $e) {
776
+ wpra_get_logger($feedSource)->warning('Encountered an error while sorting the database items: {0}', [
777
+ $e->getMessage()
778
+ ]);
779
  }
780
  }
781
 
includes/legacy-feed-display.php ADDED
@@ -0,0 +1,541 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Feed display related functions
4
+ *
5
+ * @package WPRSSAggregator
6
+ */
7
+
8
+ /**
9
+ * Display template for a feed source. Simulates a shortcode call.
10
+ *
11
+ * @since 4.6.6
12
+ * @deprecated 4.13 This function was left here because the ET addon references it.
13
+ */
14
+ function wprss_render_feed_view( $content ) {
15
+ return $content;
16
+ }
17
+
18
+ /**
19
+ * Display template for a feed source. Simulates a shortcode call.
20
+ *
21
+ * @since 4.6.6
22
+ * @deprecated 4.13 This function was left here because the ET addon references it.
23
+ */
24
+ function wprss_render_feed_item_view( $content ) {
25
+ return $content;
26
+ }
27
+
28
+ /**
29
+ * Redirects to wprss_display_feed_items
30
+ * It is used for backwards compatibility to versions < 2.0
31
+ *
32
+ * @since 2.1
33
+ */
34
+ function wp_rss_aggregator( $args = array() ) {
35
+ $template = wpra_get('templates/feeds/master_template');
36
+ $fullArgs = $args;
37
+
38
+ // Use legacy mode if arg was not explicitly given
39
+ if (!isset($fullArgs['legacy'])) {
40
+ $fullArgs['legacy'] = true;
41
+ }
42
+
43
+ return $template->render($args);
44
+ }
45
+
46
+ /**
47
+ * Handles the display for a single feed item.
48
+ *
49
+ * @since 4.6.6
50
+ */
51
+ function wprss_display_single_feed_item( $atts = array() ) {
52
+ if ( empty( $atts ) ) return;
53
+ $id = empty( $atts['id'] ) ? FALSE : $atts['id'];
54
+ if ( $id === FALSE || get_post_type( $id ) !== 'wprss_feed_item' || ( $item = get_post( $id ) ) === FALSE ) {
55
+ return '';
56
+ }
57
+ //Enqueue scripts / styles
58
+ wp_enqueue_script( 'jquery.colorbox-min', WPRSS_JS . 'jquery.colorbox-min.js', array( 'jquery' ) );
59
+ wp_enqueue_script( 'wprss_custom', WPRSS_JS . 'custom.js', array( 'jquery', 'jquery.colorbox-min' ) );
60
+
61
+ setup_postdata( $item );
62
+ $output = wprss_render_feed_item( $id );
63
+ $output = apply_filters( 'wprss_shortcode_single_output', $output );
64
+ wp_reset_postdata();
65
+ return $output;
66
+ }
67
+
68
+ /**
69
+ * Renders a single feed item.
70
+ *
71
+ * @param int $ID The ID of the feed item to render
72
+ * @param string $default The default text to return if something fails.
73
+ * @return string The output
74
+ * @since 4.6.6
75
+ */
76
+ function wprss_render_feed_item( $ID = NULL, $default = '', $args = array() ) {
77
+ $ID = ( $ID === NULL )? get_the_ID() : $ID;
78
+ if ( is_feed() ) return $default;
79
+
80
+ // Prepare the options
81
+ $general_settings = get_option( 'wprss_settings_general' );
82
+ $display_settings = wprss_get_display_settings( $general_settings );
83
+ $excerpts_settings = get_option( 'wprss_settings_excerpts' );
84
+ $thumbnails_settings = get_option( 'wprss_settings_thumbnails' );
85
+
86
+ $args = wp_parse_args($args, array(
87
+ 'link_before' => '',
88
+ 'link_after' => ''
89
+ ));
90
+ $extra_options = apply_filters( 'wprss_template_extra_options', array(), $args);
91
+
92
+ // Declare each item in $args as its own variable
93
+ extract( $args, EXTR_SKIP );
94
+
95
+ // Get the item meta
96
+ $permalink = get_post_meta( $ID, 'wprss_item_permalink', true );
97
+ $enclosure = get_post_meta( $ID, 'wprss_item_enclosure', true );
98
+ $feed_source_id = get_post_meta( $ID, 'wprss_feed_id', true );
99
+ $link_enclosure = get_post_meta( $feed_source_id, 'wprss_enclosure', true );
100
+ $source_name = get_the_title( $feed_source_id );
101
+ $source_url = get_post_meta( $feed_source_id, 'wprss_site_url', true );
102
+ $timestamp = get_the_time( 'U', $ID );
103
+
104
+ $general_source_link = isset( $general_settings['source_link'] ) ? $general_settings['source_link'] : 0;
105
+ $feed_source_link = get_post_meta( $feed_source_id, 'wprss_source_link', true );
106
+ $source_link = ( $feed_source_link === '' || intval($feed_source_link) < 0 ) // If not explicit value
107
+ ? $general_source_link // Fall back to general setting
108
+ : $feed_source_link; // Otherwise, use value
109
+ $source_link = intval(trim($source_link));
110
+
111
+ // Fallback for feeds created with older versions of the plugin
112
+ if ( $source_url === '' ) $source_url = get_post_meta( $feed_source_id, 'wprss_url', true );
113
+ // convert from Unix timestamp
114
+ $date = wprss_date_i18n( $timestamp );
115
+
116
+ // Prepare the title
117
+ $feed_item_title = get_the_title();
118
+ $feed_item_title_link = ( $link_enclosure === 'true' && $enclosure !== '' )? $enclosure : $permalink;
119
+
120
+ // Prepare the text that precedes the source
121
+ $text_preceding_source = wprss_get_general_setting('text_preceding_source');
122
+ $text_preceding_source = ltrim( __( $text_preceding_source, WPRSS_TEXT_DOMAIN ) . ' ' );
123
+
124
+ $text_preceding_date = wprss_get_general_setting('text_preceding_date');
125
+ $text_preceding_date = ltrim( __( $text_preceding_date, WPRSS_TEXT_DOMAIN ) . ' ' );
126
+
127
+ do_action( 'wprss_get_post_data' );
128
+
129
+ $meta = $extra_options;
130
+ $extra_meta = apply_filters( 'wprss_template_extra_meta', $meta, $args, $ID );
131
+
132
+ ///////////////////////////////////////////////////////////////
133
+ // BEGIN TEMPLATE
134
+
135
+ // Prepare the output
136
+ $output = '';
137
+ // Begin output buffering
138
+ ob_start();
139
+ // Print the links before
140
+ echo $link_before;
141
+
142
+ // The Title
143
+ $item_title = wprss_link_display( $feed_item_title_link, $feed_item_title, wprss_get_general_setting('title_link') );
144
+ $item_title = apply_filters('wprss_item_title', $item_title, $feed_item_title_link, $feed_item_title, wprss_get_general_setting('title_link'));
145
+ echo $item_title;
146
+
147
+ do_action( 'wprss_after_feed_item_title', $extra_meta, $display_settings, $ID );
148
+
149
+ // FEED ITEM META
150
+ echo '<div class="wprss-feed-meta">';
151
+
152
+ // SOURCE
153
+ if ( wprss_get_general_setting('source_enable') == 1 ) {
154
+ echo '<span class="feed-source">';
155
+ $source_link_text = apply_filters('wprss_item_source_link', wprss_link_display( $source_url, $source_name, $source_link ) );
156
+ $source_link_text = $text_preceding_source . $source_link_text;
157
+ echo $source_link_text;
158
+ echo '</span>';
159
+ }
160
+
161
+ // DATE
162
+ if ( wprss_get_general_setting('date_enable') == 1 ) {
163
+ echo '<span class="feed-date">';
164
+ $date_text = apply_filters( 'wprss_item_date', $date );
165
+ $date_text = $text_preceding_date . $date_text;
166
+ echo $date_text;
167
+ echo '</span>';
168
+ }
169
+
170
+ // AUTHOR
171
+ $author = get_post_meta( $ID, 'wprss_item_author', TRUE );
172
+ if ( wprss_get_general_setting('authors_enable') == 1 && $author !== NULL && is_string( $author ) && $author !== '' ) {
173
+ echo '<span class="feed-author">';
174
+ $author_text = apply_filters( 'wprss_item_author', $author );
175
+ $author_prefix_text = apply_filters( 'wprss_author_prefix_text', 'By' );
176
+ _e( $author_prefix_text, WPRSS_TEXT_DOMAIN );
177
+ echo ' ' . $author_text;
178
+ echo '</span>';
179
+ }
180
+
181
+ echo '</div>';
182
+
183
+ // TIME AGO
184
+ if ( wprss_get_general_setting('date_enable') == 1 && wprss_get_general_setting('time_ago_format_enable') == 1 ) {
185
+ $time_ago = human_time_diff( $timestamp, time() );
186
+ echo '<div class="wprss-time-ago">';
187
+ $time_ago_text = apply_filters( 'wprss_item_time_ago', $time_ago );
188
+ printf( __( '%1$s ago', WPRSS_TEXT_DOMAIN ), $time_ago_text );
189
+ echo '</div>';
190
+ }
191
+
192
+ // END TEMPLATE - Retrieve buffered output
193
+ $output .= ob_get_clean();
194
+ $output = apply_filters( 'wprss_single_feed_output', $output, $permalink );
195
+ $output .= "$link_after";
196
+
197
+ // Print the output
198
+ return $output;
199
+ }
200
+
201
+
202
+ /**
203
+ * Retrieve settings and prepare them for use in the display function
204
+ *
205
+ * @since 3.0
206
+ */
207
+ function wprss_get_display_settings( $settings = NULL ) {
208
+ if ( $settings === NULL ) {
209
+ $settings = get_option( 'wprss_settings_general' );
210
+ }
211
+ // Parse the arguments together with their default values
212
+ $args = wp_parse_args(
213
+ $settings,
214
+ array(
215
+ 'open_dd' => 'blank',
216
+ 'follow_dd' => '',
217
+ )
218
+ );
219
+
220
+ // Prepare the 'open' setting - how to open links for feed items
221
+ $open = '';
222
+ switch ( $args['open_dd'] ) {
223
+ case 'lightbox' :
224
+ $open = 'class="colorbox"';
225
+ break;
226
+ case 'blank' :
227
+ $open = 'target="_blank"';
228
+ break;
229
+ }
230
+
231
+ // Prepare the 'follow' setting - whether links marked as nofollow or not
232
+ $follow = ( $args['follow_dd'] == 'no_follow' )? 'rel="nofollow"' : '';
233
+
234
+ // Prepare the final settings array
235
+ $display_settings = array(
236
+ 'open' => $open,
237
+ 'follow' => $follow
238
+ );
239
+
240
+ do_action( 'wprss_get_settings' );
241
+
242
+ return $display_settings;
243
+ }
244
+
245
+
246
+ /**
247
+ * Merges the default arguments with the user set arguments
248
+ *
249
+ * @since 3.0
250
+ */
251
+ function wprss_get_shortcode_default_args( $args ) {
252
+ // Default shortcode/function arguments for displaying feed items
253
+ $shortcode_args = apply_filters(
254
+ 'wprss_shortcode_args',
255
+ array(
256
+ 'links_before' => '<ul class="rss-aggregator">',
257
+ 'links_after' => '</ul>',
258
+ 'link_before' => '<li class="feed-item">',
259
+ 'link_after' => '</li>'
260
+ )
261
+ );
262
+
263
+ // Parse incoming $args into an array and merge it with $shortcode_args
264
+ $args = wp_parse_args( $args, $shortcode_args );
265
+
266
+ return $args;
267
+ }
268
+
269
+
270
+ /**
271
+ * Prepares and builds the query for fetching the feed items
272
+ *
273
+ * @since 3.0
274
+ */
275
+ function wprss_get_feed_items_query( $settings ) {
276
+ if( isset( $settings['feed_limit'] ) ) {
277
+ $posts_per_page = $settings['feed_limit'];
278
+ } else {
279
+ $posts_per_page = wprss_get_general_setting('feed_limit');
280
+ }
281
+ global $paged;
282
+ if ( get_query_var('paged') ) {
283
+ $paged = get_query_var('paged');
284
+ } elseif ( get_query_var('page') ) {
285
+ $paged = get_query_var('page');
286
+ } else {
287
+ $paged = 1;
288
+ }
289
+
290
+ $feed_items_args = array(
291
+ 'post_type' => get_post_types(),
292
+ 'posts_per_page' => $posts_per_page,
293
+ 'orderby' => 'date',
294
+ 'order' => 'DESC',
295
+ 'paged' => $paged,
296
+ 'suppress_filters' => true,
297
+ 'ignore_sticky_posts' => true,
298
+ 'meta_query' => array(
299
+ 'relation' => 'AND',
300
+ array(
301
+ 'key' => 'wprss_feed_id',
302
+ 'compare' => 'EXISTS',
303
+ )
304
+ )
305
+ );
306
+
307
+ if ( isset($settings['pagination']) ) {
308
+ $pagination = strtolower( $settings['pagination'] );
309
+ if ( in_array( $pagination, array('false','off','0') ) ) {
310
+ unset( $feed_items_args['paged'] );
311
+ }
312
+ }
313
+
314
+ if ( isset( $settings['no-paged'] ) && $settings['no-paged'] === TRUE ) {
315
+ unset( $feed_items_args['no-paged'] );
316
+ }
317
+
318
+ // If either the source or exclude arguments are set (but not both), prepare a meta query
319
+ if ( isset( $settings['source'] ) xor isset( $settings['exclude'] ) ) {
320
+ // Set the appropriate setting and operator
321
+ $setting = 'source';
322
+ $operator = 'IN';
323
+ if ( isset( $settings['exclude'] ) ) {
324
+ $setting = 'exclude';
325
+ $operator = 'NOT IN';
326
+ }
327
+ $feeds = array_filter( array_map( 'intval', explode( ',', $settings[$setting] ) ) );
328
+ foreach ( $feeds as $feed )
329
+ trim( $feed );
330
+ if ( !empty( $feeds ) ) {
331
+ $feed_items_args['meta_query'] = array(
332
+ array(
333
+ 'key' => 'wprss_feed_id',
334
+ 'value' => $feeds,
335
+ 'type' => 'numeric',
336
+ 'compare' => $operator,
337
+ ),
338
+ );
339
+ }
340
+ }
341
+
342
+ // Arguments for the next query to fetch all feed items
343
+ $feed_items_args = apply_filters( 'wprss_display_feed_items_query', $feed_items_args, $settings );
344
+
345
+ // Query to get all feed items for display
346
+ $feed_items = new WP_Query( $feed_items_args );
347
+
348
+ if ( isset( $settings['get-args'] ) && $settings['get-args'] === TRUE ) {
349
+ return $feed_items_args;
350
+ } else return $feed_items;
351
+ }
352
+
353
+
354
+ add_action( 'wprss_display_template', 'wprss_default_display_template', 10, 3 );
355
+ /**
356
+ * Default template for feed items display
357
+ *
358
+ * @since 3.0
359
+ * @param $args array The shortcode arguments
360
+ * @param $feed_items WP_Query The feed items to display
361
+ */
362
+ function wprss_default_display_template( $args, $feed_items ) {
363
+ global $wp_query;
364
+ global $paged;
365
+
366
+ // Swap the current WordPress Query with our own
367
+ $old_wp_query = $wp_query;
368
+ $wp_query = $feed_items;
369
+
370
+ // Prepare the output
371
+ $output = '';
372
+
373
+ // Check if our current query returned any feed items
374
+ if ( $feed_items->have_posts() ) {
375
+ // PRINT LINKS BEFORE LIST OF FEED ITEMS
376
+ $output .= $args['links_before'];
377
+
378
+ // FOR EACH ITEM
379
+ while ( $feed_items->have_posts() ) {
380
+ // Get the item
381
+ $feed_items->the_post();
382
+ // Add the output
383
+ $output .= wprss_render_feed_item( NULL, '', $args );
384
+ }
385
+
386
+ // OUTPUT LINKS AFTER LIST OF FEED ITEMS
387
+ $output .= $args['links_after'];
388
+
389
+ // Add pagination if needed
390
+ if ( !isset( $args['pagination'] ) || !in_array( $args['pagination'], array('off','false','0',0) ) ) {
391
+ $output = apply_filters( 'wprss_pagination', $output );
392
+ }
393
+
394
+ // Filter the final output, and print it
395
+ echo apply_filters( 'feed_output', $output );
396
+ } else {
397
+ // No items found message
398
+ echo apply_filters( 'no_feed_items_found', __( 'No feed items found.', WPRSS_TEXT_DOMAIN ) );
399
+ }
400
+
401
+ // Reset the WordPress query
402
+ $wp_query = $old_wp_query;
403
+ wp_reset_postdata();
404
+ }
405
+
406
+
407
+ /**
408
+ * Generates an HTML link, using the saved display settings.
409
+ *
410
+ * @param string $link The link URL
411
+ * @param string $text The link text to display
412
+ * @param string $bool Optional boolean. If FALSE, the text is returned unlinked. Default: TRUE.
413
+ * @return string The generated link
414
+ * @since 4.2.4
415
+ */
416
+ function wprss_link_display( $link, $text, $bool = TRUE ) {
417
+ $display_settings = wprss_get_display_settings( get_option( 'wprss_settings_general' ) );
418
+ $a = $bool ? "<a {$display_settings['open']} {$display_settings['follow']} href='$link'>$text</a>" : $text;
419
+ return $a;
420
+ }
421
+
422
+
423
+ add_filter( 'wprss_pagination', 'wprss_pagination_links' );
424
+ /**
425
+ * Display pagination links
426
+ *
427
+ * @since 3.5
428
+ */
429
+ function wprss_pagination_links( $output ) {
430
+ // Get the general setting
431
+ $pagination = wprss_get_general_setting( 'pagination' );;
432
+
433
+ // Check the pagination setting, if using page numbers
434
+ if ( $pagination === 'numbered' ) {
435
+ global $wp_query;
436
+ $big = 999999999; // need an unlikely integer
437
+ $output .= paginate_links( array(
438
+ 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
439
+ 'format' => '?paged=%#%',
440
+ 'current' => max( 1, get_query_var('paged') ),
441
+ 'total' => $wp_query->max_num_pages
442
+ ) );
443
+ return $output;
444
+ }
445
+ // Otherwise, using default paginations
446
+ else {
447
+ $output .= '<div class="nav-links">';
448
+ $output .= ' <div class="nav-previous alignleft">' . get_next_posts_link( __( 'Older posts', WPRSS_TEXT_DOMAIN ) ) . '</div>';
449
+ $output .= ' <div class="nav-next alignright">' . get_previous_posts_link( __( 'Newer posts', WPRSS_TEXT_DOMAIN ) ) . '</div>';
450
+ $output .= '</div>';
451
+ return $output;
452
+ }
453
+ }
454
+
455
+
456
+ add_filter( 'the_title', 'wprss_shorten_title', 10, 2 );
457
+ /**
458
+ * Checks the title limit option and shortens the title when necassary.
459
+ *
460
+ * @since 1.0
461
+ */
462
+ function wprss_shorten_title( $title, $id = null ) {
463
+ if ( $id === null ) return $title;
464
+ // Get the option. If does not exist, use 0, which is ignored.
465
+ $general_settings = get_option( 'wprss_settings_general' );
466
+ $title_limit = isset( $general_settings['title_limit'] )? intval( $general_settings['title_limit'] ) : 0;
467
+ // Check if the title is for a wprss_feed_item, and check if trimming is needed
468
+ if ( isset( $id ) && get_post_type( $id ) === 'wprss_feed_item' && $title_limit > 0 && strlen( $title ) > $title_limit ) {
469
+ // Return the trimmed version of the title
470
+ return substr( $title, 0, $title_limit ) . apply_filters( 'wprss_shortened_title_ending', '...' );
471
+ }
472
+ // Otherwise, return the same title
473
+ return $title;
474
+ }
475
+
476
+
477
+ /**
478
+ * Display feed items on the front end (via shortcode or function)
479
+ *
480
+ * @since 2.0
481
+ */
482
+ function wprss_display_feed_items( $args = array() ) {
483
+ $settings = get_option( 'wprss_settings_general' );
484
+ $args = wprss_get_shortcode_default_args( $args );
485
+
486
+ $args = apply_filters( 'wprss_shortcode_args', $args );
487
+
488
+ $query_args = $settings;
489
+ if ( isset( $args['limit'] ) ) {
490
+ $query_args['feed_limit'] = filter_var( $args['limit'], FILTER_VALIDATE_INT, array(
491
+ 'options' => array(
492
+ 'min_range' => 1,
493
+ 'default' => $query_args['feed_limit'],
494
+ ),
495
+ ) );
496
+ }
497
+
498
+ if ( isset( $args['pagination'] ) ) {
499
+ $query_args['pagination'] = $args['pagination'];
500
+ }
501
+
502
+ if ( isset( $args['source'] ) ) {
503
+ $query_args['source'] = $args['source'];
504
+ }
505
+ elseif ( isset( $args['exclude'] ) ) {
506
+ $query_args['exclude'] = $args['exclude'];
507
+ }
508
+
509
+ $query_args = apply_filters( 'wprss_process_shortcode_args', $query_args, $args );
510
+
511
+ $feed_items = wprss_get_feed_items_query( $query_args );
512
+
513
+ do_action( 'wprss_display_template', $args, $feed_items );
514
+ }
515
+
516
+
517
+ /**
518
+ * Limits a phrase/content to a defined number of words
519
+ *
520
+ * NOT BEING USED as we're using the native WP function, although the native one strips tags, so I'll
521
+ * probably revisit this one again soon.
522
+ *
523
+ * @since 3.0
524
+ * @param string $words
525
+ * @param integer $limit
526
+ * @param string $append
527
+ * @return string
528
+ */
529
+ function wprss_limit_words( $words, $limit, $append = '' ) {
530
+ /* Add 1 to the specified limit becuase arrays start at 0 */
531
+ $limit = $limit + 1;
532
+ /* Store each individual word as an array element
533
+ up to the limit */
534
+ $words = explode( ' ', $words, $limit );
535
+ /* Shorten the array by 1 because that final element will be the sum of all the words after the limit */
536
+ array_pop( $words );
537
+ /* Implode the array for output, and append an ellipse */
538
+ $words = implode( ' ', $words ) . $append;
539
+ /* Return the result */
540
+ return rtrim( $words );
541
+ }
includes/libraries/browser.php CHANGED
@@ -222,7 +222,7 @@ class Browser {
222
 
223
  public $OPERATING_SYSTEM_UNKNOWN = 'unknown';
224
 
225
- function Browser( $useragent="" ) {
226
  $this->reset();
227
  if ( $useragent != "" ) {
228
  $this->setUserAgent( $useragent );
@@ -1100,4 +1100,4 @@ class Browser {
1100
  }
1101
 
1102
  }
1103
- }
222
 
223
  public $OPERATING_SYSTEM_UNKNOWN = 'unknown';
224
 
225
+ function __construct( $useragent="" ) {
226
  $this->reset();
227
  if ( $useragent != "" ) {
228
  $this->setUserAgent( $useragent );
1100
  }
1101
 
1102
  }
1103
+ }
includes/roles-capabilities.php CHANGED
@@ -1,107 +1,40 @@
1
  <?php
2
-
3
- /**
4
- * Contains all roles and capabilities functions
5
- *
6
- * @package WPRSSAggregator
7
- */
8
 
9
-
10
- add_action( 'admin_init', 'wprss_add_caps' );
11
- /**
12
- * Add feed aggregator-specific capabilities
13
- *
14
- * @since 3.3
15
- */
16
- function wprss_add_caps() {
17
- global $wp_roles;
18
-
19
- if ( class_exists('WP_Roles') )
20
- if ( ! isset( $wp_roles ) )
21
- $wp_roles = new WP_Roles();
22
-
23
- if ( is_object( $wp_roles ) ) {
24
-
25
- $wp_roles->add_cap( 'administrator', 'manage_feed_settings' );
26
- $wp_roles->add_cap( 'editor', 'manage_feed_settings' );
27
-
28
- // Add the main post type capabilities
29
- $capabilities = wprss_get_core_caps();
30
- foreach ( $capabilities as $cap_group ) {
31
- foreach ( $cap_group as $cap ) {
32
- $wp_roles->add_cap( 'administrator', $cap );
33
- $wp_roles->add_cap( 'editor', $cap );
34
- }
35
- }
36
  }
37
- }
38
-
39
-
40
- /**
41
- * Gets the core post type capabilties
42
- *
43
- * @since 3.3
44
- */
45
- function wprss_get_core_caps() {
46
- $capabilities = array();
47
-
48
- $capability_types = array( 'feed', 'feed_item' );
49
-
50
- foreach ( $capability_types as $capability_type ) {
51
- $capabilities[ $capability_type ] = array(
52
- // Post type
53
- "edit_{$capability_type}",
54
- "read_{$capability_type}",
55
- "delete_{$capability_type}",
56
- "edit_{$capability_type}s",
57
- "edit_others_{$capability_type}s",
58
- "publish_{$capability_type}s",
59
- "read_private_{$capability_type}s",
60
- "delete_{$capability_type}s",
61
- "delete_private_{$capability_type}s",
62
- "delete_published_{$capability_type}s",
63
- "delete_others_{$capability_type}s",
64
- "edit_private_{$capability_type}s",
65
- "edit_published_{$capability_type}s",
66
-
67
- // Terms
68
- "manage_{$capability_type}_terms",
69
- "edit_{$capability_type}_terms",
70
- "delete_{$capability_type}_terms",
71
- "assign_{$capability_type}_terms"
72
- );
73
- }
74
-
75
- return $capabilities;
76
  }
77
 
 
78
 
79
- /**
80
- * Remove core post type capabilities (called on uninstall)
81
- *
82
- * @since 3.3
83
- * @return void
84
- */
85
- function wprss_remove_caps() {
86
- if ( class_exists( 'WP_Roles' ) )
87
- if ( ! isset( $wp_roles ) )
88
- $wp_roles = new WP_Roles();
89
-
90
- if ( is_object( $wp_roles ) ) {
91
-
92
- /** Site Administrator Capabilities */
93
- $wp_roles->remove_cap( 'administrator', 'manage_feed_settings' );
94
- /** Editor Capabilities */
95
- $wp_roles->remove_cap( 'editor', 'manage_feed_settings' );
96
 
97
- /** Remove the Main Post Type Capabilities */
98
- $capabilities = $this->get_core_caps();
99
 
100
- foreach ( $capabilities as $cap_group ) {
101
- foreach ( $cap_group as $cap ) {
102
- $wp_roles->remove_cap( 'administrator', $cap );
103
- $wp_roles->remove_cap( 'editor', $cap );
104
- }
105
  }
106
  }
107
  }
 
1
  <?php
 
 
 
 
 
 
2
 
3
+ /**
4
+ * Contains all roles and capabilities functions
5
+ *
6
+ * @package WPRSSAggregator
7
+ */
8
+
9
+ /**
10
+ * Remove core post type capabilities (called on uninstall)
11
+ *
12
+ * @since 3.3
13
+ * @return void
14
+ */
15
+ function wprss_remove_caps()
16
+ {
17
+ if (class_exists('WP_Roles')) {
18
+ if (!isset($wp_roles)) {
19
+ $wp_roles = new WP_Roles();
 
 
 
 
 
 
 
 
 
 
20
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  }
22
 
23
+ if (is_object($wp_roles)) {
24
 
25
+ /** Site Administrator Capabilities */
26
+ $wp_roles->remove_cap('administrator', 'manage_feed_settings');
27
+ /** Editor Capabilities */
28
+ $wp_roles->remove_cap('editor', 'manage_feed_settings');
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
+ /** Remove the Main Post Type Capabilities */
31
+ $capabilities = $this->get_core_caps();
32
 
33
+ foreach ($capabilities as $cap_group) {
34
+ foreach ($cap_group as $cap) {
35
+ $wp_roles->remove_cap('administrator', $cap);
36
+ $wp_roles->remove_cap('editor', $cap);
 
37
  }
38
  }
39
  }
40
+ }
includes/shortcodes.php DELETED
@@ -1,70 +0,0 @@
1
- <?php
2
- /**
3
- * Set up shortcodes and call the main function for output
4
- *
5
- * @since 1.0
6
- */
7
- function wprss_shortcode( $atts = array() ) {
8
-
9
- //Enqueue scripts / styles
10
- wp_enqueue_script( 'jquery.colorbox-min', WPRSS_JS . 'jquery.colorbox-min.js', array( 'jquery' ) );
11
- wp_enqueue_script( 'wprss_custom', WPRSS_JS . 'custom.js', array( 'jquery', 'jquery.colorbox-min' ) );
12
-
13
- $general_settings = get_option( 'wprss_settings_general' );
14
-
15
- if( ! $general_settings['styles_disable'] == 1 ) {
16
- wp_enqueue_style( 'colorbox', WPRSS_CSS . 'colorbox.css', array(), '1.4.33' );
17
- wp_enqueue_style( 'styles', WPRSS_CSS . 'styles.css', array(), '' );
18
- }
19
-
20
- if ( !empty ( $atts ) ) {
21
- foreach ( $atts as $key => &$val ) {
22
- $val = html_entity_decode( $val );
23
- }
24
- }
25
- ob_start(); // start an output buffer to output of the following function
26
- wprss_display_feed_items( $atts );
27
- $feed_items = ob_get_clean(); // save the current buffer and clear it
28
-
29
- // Remove Feed to Post's shortcode override. This is a temporary solution and will be replaced as on 4.13
30
- if (class_exists('WPRSS_FTP')) {
31
- remove_filter('wprss_shortcode_output', array(WPRSS_FTP::get_instance(), 'override_shortcode'));
32
- }
33
-
34
- return apply_filters( 'wprss_shortcode_output', $feed_items );
35
- }
36
-
37
- // Register shortcodes
38
- add_shortcode( 'wp_rss_aggregator', 'wprss_shortcode');
39
- add_shortcode( 'wp-rss-aggregator', 'wprss_shortcode');
40
-
41
-
42
- /**
43
- * Handles the shortcode used for single feed items.
44
- *
45
- * @since 4.6.6
46
- */
47
- function wprss_shortcode_single( $atts = array() ) {
48
- if ( empty( $atts ) ) return;
49
- $id = empty( $atts['id'] ) ? FALSE : $atts['id'];
50
- if ( $id === FALSE || get_post_type( $id ) !== 'wprss_feed_item' || ( $item = get_post( $id ) ) === FALSE ) {
51
- return '';
52
- }
53
- //Enqueue scripts / styles
54
- wp_enqueue_script( 'jquery.colorbox-min', WPRSS_JS . 'jquery.colorbox-min.js', array( 'jquery' ) );
55
- wp_enqueue_script( 'wprss_custom', WPRSS_JS . 'custom.js', array( 'jquery', 'jquery.colorbox-min' ) );
56
-
57
- $general_settings = get_option( 'wprss_settings_general' );
58
-
59
- if( ! $general_settings['styles_disable'] == 1 ) {
60
- wp_enqueue_style( 'colorbox', WPRSS_CSS . 'colorbox.css', array(), '1.4.33' );
61
- wp_enqueue_style( 'styles', WPRSS_CSS . 'styles.css', array(), '' );
62
- }
63
- setup_postdata( $item );
64
- $output = wprss_render_feed_item( $id );
65
- $output = apply_filters( 'wprss_shortcode_single_output', $output );
66
- wp_reset_postdata();
67
- return $output;
68
- }
69
- // Register the single feed item shortcode
70
- add_shortcode( 'wp-rss-aggregator-feed-item', 'wprss_shortcode_single');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/system-info.php CHANGED
@@ -104,6 +104,14 @@ WordPress Memory Limit: <?php echo ( wprss_let_to_num( WP_MEMORY_LIMIT )/( 102
104
  DISPLAY ERRORS: <?php echo ( ini_get( 'display_errors' ) ) ? 'On (' . ini_get( 'display_errors' ) . ')' : 'N/A'; ?><?php echo "\n"; ?>
105
  FSOCKOPEN: <?php echo ( function_exists( 'fsockopen' ) ) ? __( 'Your server supports fsockopen.', WPRSS_TEXT_DOMAIN ) : __( 'Your server does not support fsockopen.', WPRSS_TEXT_DOMAIN ); ?><?php echo "\n"; ?>
106
 
 
 
 
 
 
 
 
 
107
  ACTIVE PLUGINS:
108
 
109
  <?php
@@ -171,6 +179,31 @@ if ( get_bloginfo( 'version' ) < '3.4' ) {
171
  ?>
172
 
173
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  ### End System Info ###
175
  <?php
176
  }
104
  DISPLAY ERRORS: <?php echo ( ini_get( 'display_errors' ) ) ? 'On (' . ini_get( 'display_errors' ) . ')' : 'N/A'; ?><?php echo "\n"; ?>
105
  FSOCKOPEN: <?php echo ( function_exists( 'fsockopen' ) ) ? __( 'Your server supports fsockopen.', WPRSS_TEXT_DOMAIN ) : __( 'Your server does not support fsockopen.', WPRSS_TEXT_DOMAIN ); ?><?php echo "\n"; ?>
106
 
107
+ PLUGIN MODULES:
108
+
109
+ <?php
110
+ foreach (wpra_modules() as $key => $module) {
111
+ echo ' - ' . $key . PHP_EOL;
112
+ }
113
+ ?>
114
+
115
  ACTIVE PLUGINS:
116
 
117
  <?php
179
  ?>
180
 
181
 
182
+ SETTINGS:
183
+
184
+ <?php
185
+ $options_table = $wpdb->prefix . 'options';
186
+ $options_query = sprintf('SELECT * FROM %s WHERE `option_name` LIKE "wprss%%"', $options_table);
187
+ $options = $wpdb->get_results($options_query, OBJECT_K);
188
+
189
+ foreach ($options as $option) {
190
+ $unserialized = @unserialize($option->option_value);
191
+
192
+ if (!$unserialized || is_scalar($unserialized)) {
193
+ printf(
194
+ '%s %s',
195
+ str_pad($option->option_name, 30),
196
+ $option->option_value
197
+ );
198
+ echo PHP_EOL;
199
+ continue;
200
+ }
201
+
202
+ printf('[%s]: ', $option->option_name);
203
+ print_r($unserialized);
204
+ }
205
+ ?>
206
+
207
  ### End System Info ###
208
  <?php
209
  }
includes/twig.php CHANGED
@@ -1,5 +1,8 @@
1
  <?php
2
 
 
 
 
3
  if (defined('WPRSS_TWIG_MIN_PHP_VERSION')) {
4
  return;
5
  }
@@ -24,24 +27,11 @@ function wprss_can_use_twig()
24
  *
25
  * @since 4.12
26
  *
27
- * @return Twig_Environment The twig instance.
28
  */
29
  function wprss_twig()
30
  {
31
- static $twig = null;
32
-
33
- if ($twig === null) {
34
- $options = array();
35
-
36
- if (!defined('WP_DEBUG') || !WP_DEBUG) {
37
- $options['cache'] = get_temp_dir() . 'wprss/twig-cache';
38
- }
39
-
40
- $loader = new Twig_Loader_Filesystem(WPRSS_TEMPLATES);
41
- $twig = new Twig_Environment($loader, $options);
42
- }
43
-
44
- return $twig;
45
  }
46
 
47
  /**
@@ -49,16 +39,13 @@ function wprss_twig()
49
  *
50
  * @since 4.12
51
  *
52
- * @param string $template The tmeplate name.
53
  *
54
- * @return Twig_TemplateWrapper
55
- * @throws Twig_Error_Loader
56
- * @throws Twig_Error_Runtime
57
- * @throws Twig_Error_Syntax
58
  */
59
  function wprss_load_template($template)
60
  {
61
- return wprss_twig()->load($template);
62
  }
63
 
64
  /**
@@ -70,11 +57,8 @@ function wprss_load_template($template)
70
  * @param array $context The template context.
71
  *
72
  * @return string
73
- * @throws Twig_Error_Loader
74
- * @throws Twig_Error_Runtime
75
- * @throws Twig_Error_Syntax
76
  */
77
- function wprss_render_template($template, $context = array())
78
  {
79
- return wprss_twig()->load($template)->render($context);
80
  }
1
  <?php
2
 
3
+ use RebelCode\Wpra\Core\Templates\TwigTemplate;
4
+ use Twig\Environment;
5
+
6
  if (defined('WPRSS_TWIG_MIN_PHP_VERSION')) {
7
  return;
8
  }
27
  *
28
  * @since 4.12
29
  *
30
+ * @return Environment The twig instance.
31
  */
32
  function wprss_twig()
33
  {
34
+ return wpra_get('twig');
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  }
36
 
37
  /**
39
  *
40
  * @since 4.12
41
  *
42
+ * @param string $template The template name.
43
  *
44
+ * @return TwigTemplate
 
 
 
45
  */
46
  function wprss_load_template($template)
47
  {
48
+ return wpra_get('twig/collection')[$template];
49
  }
50
 
51
  /**
57
  * @param array $context The template context.
58
  *
59
  * @return string
 
 
 
60
  */
61
+ function wprss_render_template($template, $context = [])
62
  {
63
+ return wprss_load_template($template)->render($context);
64
  }
includes/update.php CHANGED
@@ -267,6 +267,10 @@
267
  'limit_feed_items_per_import' => null,
268
  'feed_items_import_order' => '',
269
  'feed_items_import_order' => '',
 
 
 
 
270
  )
271
  );
272
 
@@ -289,4 +293,4 @@
289
  'tracking_notice' => ''
290
  )
291
  );
292
- }
267
  'limit_feed_items_per_import' => null,
268
  'feed_items_import_order' => '',
269
  'feed_items_import_order' => '',
270
+
271
+ // From 4.13
272
+ 'custom_css' => '',
273
+ 'html_classes' => '',
274
  )
275
  );
276
 
293
  'tracking_notice' => ''
294
  )
295
  );
296
+ }
js/admin-custom.js CHANGED
@@ -360,4 +360,150 @@ if ( !String.prototype.trim ) {
360
  $el.find('.add-on').height( h );
361
  });
362
  });
363
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
360
  $el.find('.add-on').height( h );
361
  });
362
  });
363
+ })(jQuery);
364
+
365
+ // The WPRA debug log
366
+ (function($, undefined) {
367
+ /**
368
+ * Creates a new WPRA log instance.
369
+ *
370
+ * @param el The jQuery element.
371
+ */
372
+ function WpraLogViewer(el)
373
+ {
374
+ this.el = el;
375
+ this.filterEls = el.find('.wpra-toggle-logs');
376
+ this.logEls = el.find('table tbody tr');
377
+ this.filters = {};
378
+
379
+ this.resetFilters();
380
+ this.init();
381
+ this.update();
382
+ this.el.show();
383
+ }
384
+
385
+ /**
386
+ * Initializes the instance.
387
+ */
388
+ WpraLogViewer.prototype.init = function () {
389
+ var self = this;
390
+ // Init and bind events to the filter elements
391
+ this.filterEls.each(function () {
392
+ var filterEl = $(this);
393
+ var linkEl = filterEl.find('> a');
394
+ var level = filterEl.data('level');
395
+ var selected = filterEl.hasClass('wpra-selected');
396
+ var count = self.getLogCount(level);
397
+
398
+ // Add the number of logs to the text of the filter element
399
+ linkEl.text(linkEl.text() + ' (' + count + ')')
400
+
401
+ // If there are no logs for this filter, disable it
402
+ if (count == 0) {
403
+ filterEl.addClass('wpra-log-filter-disabled');
404
+ return;
405
+ }
406
+
407
+ // Bind the click event
408
+ linkEl.click(function () {
409
+ self.filters[level] = !self.filters[level];
410
+ self.update();
411
+ });
412
+ });
413
+ }
414
+
415
+ /**
416
+ * Updates the entire element.
417
+ */
418
+ WpraLogViewer.prototype.update = function () {
419
+ this.updateFilters();
420
+ this.updateLogs();
421
+ };
422
+
423
+ /**
424
+ * Updates the logs.
425
+ */
426
+ WpraLogViewer.prototype.updateLogs = function () {
427
+ // Show all logs
428
+ this.logEls.show();
429
+
430
+ // If the "all" filter is enabled, do nothing else
431
+ if (this.filters.all) {
432
+ return;
433
+ }
434
+
435
+ // Hide logs whose filter is disabled
436
+ for (var level in this.filters) {
437
+ if (!this.filters[level]) {
438
+ this.el.find('table tbody tr.wpra-log-' + level).hide();
439
+ }
440
+ }
441
+ };
442
+
443
+ /**
444
+ * Updates the filters.
445
+ */
446
+ WpraLogViewer.prototype.updateFilters = function () {
447
+ // Whether or not the filters are all selected (except for the "all" filter)
448
+ var allFiltersSelected = true;
449
+
450
+ var self = this;
451
+ this.filterEls.each(function () {
452
+ var filterEl = $(this);
453
+ var level = filterEl.data('level');
454
+
455
+ // Ignore the "all" filter and disabled filters
456
+ if (level === 'all' || filterEl.hasClass('wpra-log-filter-disabled')) {
457
+ return;
458
+ }
459
+
460
+ // The filter is marked selected if: its explicitly true in the `filters` map
461
+ // or the "all" filter is selected
462
+ var selected = self.filters[level] || self.filters.all;
463
+ // Update the elements "selected" class
464
+ filterEl.toggleClass('wpra-selected', selected);
465
+ // AND the flag so that if at least one filter is not selected, "allFiltersSelected" is false
466
+ allFiltersSelected = allFiltersSelected && selected;
467
+ });
468
+
469
+ // Toggle the "all" filter link's class based on whether all filters are selected
470
+ this.filterEls.filter('[data-level="all"]').toggleClass('wpra-selected', allFiltersSelected);
471
+ },
472
+
473
+ /**
474
+ * Counts the logs for a given log level.
475
+ *
476
+ * @param level The log level to count.
477
+ */
478
+ WpraLogViewer.prototype.getLogCount = function (level) {
479
+ var countEls = this.logEls;
480
+
481
+ if (level !== 'all') {
482
+ countEls = countEls.filter('.wpra-log-' + level);
483
+ }
484
+
485
+ return countEls.length;
486
+ };
487
+
488
+ /**
489
+ * Resets the filters.
490
+ */
491
+ WpraLogViewer.prototype.resetFilters = function () {
492
+ this.filters = {
493
+ all: false,
494
+ info: true,
495
+ error: true,
496
+ warning: false,
497
+ notice: false,
498
+ debug: false,
499
+ };
500
+ };
501
+
502
+ $(document).ready(function() {
503
+ window.WpraLogViewers = [];
504
+ // Init each WPRA log on the page
505
+ $('.wpra-log').each(function () {
506
+ WpraLogViewers.push(new WpraLogViewer($(this)));
507
+ });
508
+ });
509
+ })(jQuery);
js/build/common.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.WPRA=o():e.WPRA=o()}("undefined"!=typeof self?self:this,function(){return webpackJsonpWPRA([7],{55:function(e,o){}},[55])});
js/build/gutenberg-block.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(e,t){!function(){e.exports=this.wp.components}()},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 i(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)}Object.defineProperty(t,"__esModule",{value:!0});var l=n(3),a=n(4),s=n(5),u=n(0),c=n(6),p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=function(e){function t(n){r(this,t);var o=i(this,e.apply(this,arguments));return o.props=n,o.state={tokens:[],loading:!1,items:[]},o}return o(t,e),t.prototype.componentDidMount=function(){var e=this;this.setState({loading:!0}),jQuery.post(WPRA_BLOCK.ajax_url,{action:"wprss_fetch_items"},function(t){t=JSON.parse(t),e.setState({loading:!1,items:t.items})})},t.prototype.render=function(){var e=this.setState.bind(this),t=this.props.onChange,n=this.state.items;return this.state.loading?wp.element.createElement(u.Placeholder,null,wp.element.createElement(u.Spinner,null)):wp.element.createElement(u.BaseControl,{help:this.props.help||""},wp.element.createElement(u.FormTokenField,{label:this.props.label||"",placeholder:this.props.placeholder||"",value:this.props.value.map(function(e){return n.find(function(t){return t.value===e})}).filter(function(e){return!!e}),suggestions:this.state.items.map(function(e){return e.toLocaleLowerCase=function(){return e.title.toLocaleLowerCase()},e.toString=function(){return e.title},e}),displayTransform:function(e){return"number"==typeof e&&(e=n.find(function(t){return t.value===e})),"object"===(void 0===e?"undefined":p(e))?e.title:e},saveTransform:function(e){return e},onChange:function(n){e({tokens:n}),t(n.map(function(e){return e.value}))}}))},t}(c.Component),m=f;n(2);var b=WPRA_BLOCK.templates[0],d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return b[e]?t(b[e]):n},h={},g=!1;Object(a.registerBlockType)("wpra-shortcode/wpra-shortcode",{title:Object(l.__)("WP RSS Aggregator Feeds"),description:Object(l.__)("Display feed items imported using WP RSS Aggregator."),icon:"rss",category:"widgets",supportHTML:!1,attributes:{isAll:{type:"boolean",default:!0},template:{type:"string",default:"default"},pagination:{type:"boolean",default:!0},limit:{type:"number"},page:{type:"number"},exclude:{type:"string"},source:{type:"string"}},state:{foo:"bar"},edit:function(e){!g&&e.attributes.template&&(b=WPRA_BLOCK.templates.find(function(t){return t.value===(e.attributes.template||"default")}),parseInt(e.attributes.limit)!==d("limit",parseInt)&&(h.limit=!0),!!e.attributes.pagination!==d("pagination",function(e){return!!e},!1)&&(h.pagination=!0),g=!0);var t=WPRA_BLOCK.is_et_active?wp.element.createElement("p",{style:{fontStyle:"italic"}},"Excerpts & Thumbnails is incompatible with the WP RSS Aggregator Feeds block. ",wp.element.createElement("a",{href:"https://kb.wprssaggregator.com/article/459-using-excerpts-thumbnails-with-templates",target:"_blank"},"Learn more"),"."):null;return wp.element.createElement("div",null,wp.element.createElement(u.ServerSideRender,{block:"wpra-shortcode/wpra-shortcode",attributes:e.attributes,className:"wpra-gutenberg-block"}),wp.element.createElement(s.InspectorControls,null,wp.element.createElement(u.PanelBody,{title:Object(l.__)("Feed Sources"),initialOpen:!0},wp.element.createElement(u.ToggleControl,{label:Object(l.__)("Show all Feed Sources "),checked:e.attributes.isAll,onChange:function(t){e.setAttributes({isAll:t}),e.setAttributes({exclude:""}),e.setAttributes({source:""})}}),wp.element.createElement(m,{label:e.attributes.isAll?Object(l.__)("Feed Sources to Exclude"):Object(l.__)("Feed Sources to Show"),key:"select",help:Object(l.__)("Start typing to search feed sources by name"),value:((e.attributes.isAll?e.attributes.exclude:e.attributes.source)||"").split(",").map(function(e){return parseInt(e)}),onChange:function(t){if(t=t.join(","),e.attributes.isAll)return e.setAttributes({exclude:t}),void e.setAttributes({source:""});e.setAttributes({exclude:""}),e.setAttributes({source:t})}})),wp.element.createElement(u.PanelBody,{title:Object(l.__)("Display Options"),initialOpen:!1},t,wp.element.createElement(u.SelectControl,{label:Object(l.__)("Select Template"),value:e.attributes.template,onChange:function(t){b=WPRA_BLOCK.templates.find(function(e){return e.value===t}),e.setAttributes({template:t||""}),h.limit||e.setAttributes({limit:d("limit",parseInt,15)}),h.pagination||e.setAttributes({pagination:d("pagination",function(e){return!!e},!1)})},options:WPRA_BLOCK.templates}),wp.element.createElement(u.TextControl,{label:Object(l.__)("Feed Limit"),help:Object(l.__)("Number of feed items to display"),placeholder:d("limit",parseInt),type:"number",min:1,value:e.attributes.limit||d("limit",parseInt),onChange:function(t){h.limit=!0,e.setAttributes({limit:parseInt(t)||d("limit",parseInt)})}}),wp.element.createElement(u.ToggleControl,{label:Object(l.__)("Show Pagination "),checked:e.attributes.pagination,onChange:function(t){h.pagination=!0,e.setAttributes({pagination:t})}}),wp.element.createElement(u.TextControl,{label:Object(l.__)("Page"),placeholder:Object(l.__)("1"),type:"number",min:1,value:e.attributes.page||1,onChange:function(t){e.setAttributes({page:parseInt(t)||1})}}))))},save:function(e){return null}})},function(e,t){},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){!function(){e.exports=this.wp.editor}()},function(e,t){!function(){e.exports=this.wp.element}()}]);
js/build/intro.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.WPRA=t():e.WPRA=t()}("undefined"!=typeof self?self:this,function(){return webpackJsonpWPRA([2],{17:function(e,t,i){"use strict";function s(e,t){for(var i=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],new FormData),s=Object.keys(t),n=Array.isArray(s),r=0,s=n?s:s[Symbol.iterator]();;){var a;if(n){if(r>=s.length)break;a=s[r++]}else{if(r=s.next(),r.done)break;a=r.value}var o=a;i.set(o,t[o])}return fetch(e,{method:"post",body:i}).then(function(e){return e.json()}).then(function(e){if(200!==e.status)throw e;return e})}Object.defineProperty(t,"__esModule",{value:!0});var n=i(4),r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"wizard-holder animated fadeIn"},[i("div",{staticClass:"connect-steps"},[i("div",{staticClass:"step-items"},[i("div",{staticClass:"step-progress",class:"step-progress--"+e.activeScreenIndex}),e._v(" "),e._l(e.screens,function(t,s){return i("div",{staticClass:"step-item",class:{"step-item_active":e.active(t.id),"step-item_completed":t.completed()&&s<e.activeScreenIndex}},[i("div",{staticClass:"step-item__status"},[t.completed()&&s<e.activeScreenIndex?i("span",{staticClass:"dashicons dashicons-yes"}):e._e()]),e._v(" "),i("div",{staticClass:"step-item__info"},[i("div",{staticClass:"step-item__title"},[e._v(e._s(t.title))]),e._v(" "),t.description?i("div",{staticClass:"step-item__description"},[e._v(e._s(t.description))]):e._e()])])})],2)]),e._v(" "),i("div",{staticClass:"wizard"},[i("transition",{attrs:{name:e.transition,mode:"out-in"}},[e.active("feed")?i("div",{key:e.activeScreen,staticClass:"wizard_content"},[i("div",{staticClass:"wizard_hello"},[e._v("\n Enter your first RSS Feed URL\n ")]),e._v(" "),i("form",{staticClass:"wizard_info",attrs:{id:"feedForm"},on:{submit:function(t){return t.preventDefault(),e.next(t)}}},[i("div",{staticClass:"form-group"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.form.feedSourceUrl,expression:"form.feedSourceUrl"}],staticClass:"wpra-feed-input",attrs:{type:"text",placeholder:"https://www.sourcedomain.com/feed/"},domProps:{value:e.form.feedSourceUrl},on:{input:function(t){t.target.composing||e.$set(e.form,"feedSourceUrl",t.target.value)}}}),e._v(" "),e.isFeedError?i("span",{staticClass:"dashicons dashicons-warning warning-icon"}):e._e(),e._v(" "),e.isFeedError?i("a",{attrs:{href:e.validateLink,target:"_blank"}},[e._v("Validate feed")]):e._e()])]),e._v(" "),e.isFeedError?i("div",{staticClass:"wizard_error"},[i("p",[e._v("This RSS feed URL appears to be invalid. Here are a couple of things you can try:")]),e._v(" "),i("ol",[i("li",[e._v('Check whether the URL you entered is the correct one by trying one of the options when clicking on "How do I find an RSS feed URL?" below.')]),e._v(" "),i("li",[e._v("\n Test out this other RSS feed URL to make sure the plugin is working correctly - https://www.wpmayor.com/feed/ - If it works, you may "),i("a",{attrs:{href:e.supportUrl,target:"_blank"}},[e._v("contact us here")]),e._v(" to help you with your source.\n ")]),e._v(" "),i("li",[e._v("Test the URL's validity by W3C standards, the standards we use in our plugins, using the “Validate feed” link above.")])])]):e._e(),e._v(" "),i("expander",{attrs:{title:"How do I find an RSS feed URL?"}},[i("p",[e._v("WP RSS Aggregator fetches feed items through RSS feeds. Almost every website in the world provides an RSS feed. Here's how to find it:")]),e._v(" "),i("p",[e._v("Option 1: Add /feed to the website's homepage URL ")]),e._v(" "),i("p",[e._v("Many sites have their RSS feed at the same URL. For instance, if the website's URL is www.thiswebsite.com, then the RSS feed could be at www.thiswebsite.com/feed.")]),e._v(" "),i("p",[e._v("Option 2: Look for the RSS share icon")]),e._v(" "),i("p",[e._v("Many websites have share icons on their pages for Facebook, Twitter and more. Many times, there will also be an orange RSS icon. Click on that to access the RSS feed URL.")]),e._v(" "),i("p",[e._v("Option 3: Browser RSS Auto-Discovery")]),e._v(" "),i("p",[e._v("Most browsers either include an RSS auto-discovery tool by default or they allow you to add extensions for it. Firefox shows an RSS icon above the website, in the address bar, which you can click on directly. Chrome offers extensions such as this one.")]),e._v(" "),i("p",[e._v("Option 4: Look at the Page Source")]),e._v(" "),i("p",[e._v('When on any page of the website you\'re looking to import feed items from, right click and press "View Page Source". Once the new window opens, use the “Find” feature (Ctrl-F on PC, Command-F on Mac) and search for " RSS". This should take you to a line that reads like this (or similar):')]),e._v(" "),i("p",[i("code",[e._v('\n <link rel="alternate" type="application/rss+xml" title="RSS Feed" href="https://www.sourcedomain.com/feed/" />\n ')])]),e._v(" "),i("p",[e._v("The RSS feed’s URL is found between the quotes after href=. In the above case, it would be https://www.sourcedomain.com/feed/.")]),e._v(" "),i("p",[i("a",{attrs:{href:e.knowledgeBaseUrl,target:"_blank"}},[e._v("Browse our Knowledge Base for more information.")])])])],1):e._e(),e._v(" "),e.active("feedItems")?i("div",{key:e.activeScreen,staticClass:"wizard_content"},[i("div",{staticClass:"wizard_hello"},[e._v("\n Latest feed items from your selected feed source:\n ")]),e._v(" "),i("div",{staticClass:"wpra-feed-items"},e._l(e.feed.items,function(t){return i("div",{staticClass:"wpra-feed-item"},[i("div",{staticClass:"wpra-feed-item__link"},[i("a",{attrs:{href:t.permalink,target:"_blank"}},[e._v(e._s(t.title))])]),e._v(" "),i("div",{staticClass:"wpra-feed-item__info"},[t.date||t.author?[t.date?[e._v("\n Published on "+e._s(t.date)+"\n ")]:e._e(),e._v(" "),t.date&&t.author?[e._v("|")]:e._e(),e._v(" "),t.author?[e._v("\n By "+e._s(t.author)+"\n ")]:e._e()]:e._e()],2)])}),0),e._v(" "),i("div",{staticClass:"wrpa-shortcode"},[i("div",{staticClass:"wrpa-shortcode-preview"},[i("div",{staticClass:"wrpa-shortcode-label"},[e._v("\n Create a draft page to preview these feed items on your site:\n ")]),e._v(" "),i("a",{staticClass:"button",class:{"button-primary":e.isPrepared,"loading-button":e.isPreparing},attrs:{href:e.previewUrl,target:"_blank"},on:{click:e.preparePreview}},[e._v("\n "+e._s(e.isPrepared?"Preview the Page":"Create Draft Page")+"\n ")])]),e._v(" "),i("div",{staticClass:"wrpa-shortcode-form",on:{click:function(t){e.copyToClipboard()}}},[i("div",{staticClass:"wrpa-shortcode-label"},[e._v("\n Copy the shortcode to any page or post on your site:\n ")]),e._v(" "),i("input",{ref:"selected",staticClass:"wrpa-shortcode-form__shortcode",attrs:{type:"text",readonly:"",value:"[wp-rss-aggregator]"}}),e._v(" "),i("div",{staticClass:"wrpa-shortcode-form__button"},[e._v("\n "+e._s(e.isCopied?"Copied!":"Click to copy")+"\n ")])])])]):e._e(),e._v(" "),e.active("finish")?i("div",{key:e.activeScreen,staticClass:"wizard_content"},[i("div",{staticClass:"wizard_hello"},[e._v("\n You’ve successfully set up your first feed source 😄\n ")]),e._v(" "),i("div",{staticClass:"wpra-cols-title"},[e._v("\n Do more with WP RSS Aggregator - here is what we did at CryptoHeadlines.com.\n ")]),e._v(" "),i("div",{staticClass:"wpra-cols"},[i("div",{staticClass:"col"},[i("p",[e._v("CryptoHeadlines.com displays latest news, Youtube videos, podcasts, jobs and more from the Cryptocurrency industry.")]),e._v(" "),i("p",[e._v("It uses Feed to Post to import articles, Youtube videos, and podcast links.")]),e._v(" "),i("p",[e._v("Full Text RSS Feeds is used to fetch the full content of the job listings to present more information to the potential applicant.")]),e._v(" "),i("p",[e._v("Keyword Filtering is used to filter out content that contains profanity and keywords or phrases deemed as inappropriate.")]),e._v(" "),i("div",{staticStyle:{"margin-bottom":".5rem"}},[i("a",{staticClass:"button",attrs:{href:e.addOnsUrl,target:"_blank"}},[e._v("\n Browse Add-ons ⭐️\n ")])]),e._v(" "),i("div",[i("a",{staticStyle:{"font-size":".9em"},attrs:{href:e.supportUrl,target:"_blank"}},[e._v("Contact support for more information.")])])]),e._v(" "),i("div",{staticClass:"col"},[i("img",{staticClass:"img wpra-demo-photo",attrs:{src:e.demoImageUrl}}),e._v(" "),i("div",{staticClass:"wpra-feedback"},[i("div",{staticClass:"wpra-feedback__copy"},[i("div",{staticClass:"wpra-feedback__text"},[e._v("\n This plugin has made my life a lot easier, and the support has been great as well.\n ")]),e._v(" "),i("div",{staticClass:"wpra-feedback__rating"},[i("span",{staticClass:"dashicons dashicons-star-filled"}),e._v(" "),i("span",{staticClass:"dashicons dashicons-star-filled"}),e._v(" "),i("span",{staticClass:"dashicons dashicons-star-filled"}),e._v(" "),i("span",{staticClass:"dashicons dashicons-star-filled"}),e._v(" "),i("span",{staticClass:"dashicons dashicons-star-filled"})]),e._v(" "),i("div",{staticClass:"wpra-feedback__by"},[i("a",{attrs:{href:e.feedbackUrl,target:"_blank"}},[e._v("\n Review by officeinnovator\n ")])])])])])])]):e._e()]),e._v(" "),i("div",{staticClass:"connect-actions pad"},[i("div",{staticClass:"pad-item--grow"},[e.active("finish")?e._e():i("button",{staticClass:"button-clear",on:{click:e.finish}},[e._v("\n Skip the introduction\n ")])]),e._v(" "),i("div",{staticClass:"pad-item--no-shrink"},[e.isBackAvailable?i("button",{staticClass:"button-clear",on:{click:e.back}},[e._v("\n Back\n ")]):e._e(),e._v(" "),i("button",{staticClass:"button button-primary button-large",class:{"loading-button":e.isLoading},on:{click:e.next}},[e._v("\n "+e._s(e.active("finish")?"Continue to Plugin":"Next")+"\n ")])])])],1)])},a=[],o=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"wpra-expander",class:{"wpra-expander--expanded":e.isExpanded}},[i("div",{staticClass:"wpra-expander__title",on:{click:function(t){e.isExpanded=!e.isExpanded}}},[e._v("\n "+e._s(e.title)+"\n "),i("span",{staticClass:"dashicons dashicons-arrow-down-alt2"})]),e._v(" "),i("transition-expand",[e.isExpanded?i("div",[i("div",{staticClass:"wpra-expander__content"},[e._t("default")],2)]):e._e()])],1)},d=[],c={name:"TransitionExpand",functional:!0,render:function(e,t){return e("transition",{props:{name:"expand"},on:{afterEnter:function(e){e.style.height="auto"},enter:function(e){var t=getComputedStyle(e),i=t.width;e.style.width=i,e.style.position="absolute",e.style.visibility="hidden",e.style.height="auto";var s=getComputedStyle(e),n=s.height;e.style.width=null,e.style.position=null,e.style.visibility=null,e.style.height=0,getComputedStyle(e).height,setTimeout(function(){e.style.height=n})},leave:function(e){var t=getComputedStyle(e),i=t.height;e.style.height=i,getComputedStyle(e).height,setTimeout(function(){e.style.height=0})}}},t.children)}},l=c,u=i(1),p=Object(u.a)(l,void 0,void 0,!1,null,null,null);p.options.__file="TransitionExpand.vue";var v=p.exports,f={data:function(){return{isExpanded:this.defaultExpanded}},props:{title:{},defaultExpanded:{value:!1}},components:{TransitionExpand:v}},h=f,_=Object(u.a)(h,o,d,!1,null,null,null);_.options.__file="Expander.vue";var m=_.exports,w=i(7),g=function(e){return e},y=window.wprssWizardConfig,b={data:function(){var e=this;return{prevHeight:0,screens:[{id:"feed",title:g("Add feed source URL"),description:!1,next:this.submitFeed,completed:function(){return e.feed.items.length},entered:function(){e.focusOnInput("feed")}},{id:"feedItems",title:g("Display feed items"),description:!1,next:this.continueItems,completed:function(){return e.feed.items.length&&e.itemsPassed}},{id:"finish",title:g("Complete introduction"),description:!1,next:this.completeIntroduction,completed:function(){return e.feed.items.length&&e.itemsPassed}}],isCopied:!1,isPreparing:!1,isPrepared:!1,transition:"slide-up",activeScreen:"feed",form:{feedSourceUrl:null},itemsPassed:!1,stepLoading:!1,isLoading:!1,isFeedError:!1,feed:{items:[]},previewUrl:y.previewUrl,addOnsUrl:y.addOnsUrl,supportUrl:y.supportUrl,demoImageUrl:y.demoImageUrl,feedbackUrl:y.feedbackUrl,knowledgeBaseUrl:y.knowledgeBaseUrl}},computed:{validateLink:function(){return"https://validator.w3.org/feed/check.cgi?url="+encodeURI(this.form.feedSourceUrl)},activeScreenIndex:function(){var e=this;return this.screens.findIndex(function(t){return t.id===e.activeScreen})},currentScreen:function(){var e=this;return this.screens.find(function(t){return t.id===e.activeScreen})},actionCompleted:function(){return this.currentScreen.completed()},isBackAvailable:function(){return this.activeScreenIndex>0&&this.activeScreenIndex<this.screens.length}},mounted:function(){this.onScreenEnter()},methods:{preparePreview:function(e){var t=this;if(this.isPreparing)return void e.preventDefault();this.isPrepared||(e.preventDefault(),this.isPreparing=!0,fetch(this.previewUrl).then(function(){t.isPreparing=!1,t.isPrepared=!0}))},submitFeed:function(){var e=this,t=Object.assign(y.feedEndpoint.defaultPayload,{wprss_intro_feed_url:this.form.feedSourceUrl});return this.isLoading=!0,this.isFeedError=!1,s(y.feedEndpoint.url,t).then(function(t){return e.feed.items=t.data.feed_items.slice(0,3),e.isLoading=!1,{}}).catch(function(t){throw e.isLoading=!1,e.isFeedError=!0,t})},continueItems:function(){return this.itemsPassed=!0,Promise.resolve({})},completeIntroduction:function(){return Promise.resolve({})},next:function(){var e=this;this.transition="slide-up";var t=this.currentScreen.next?this.currentScreen.next:function(){return Promise.resolve(!1)};this.stepLoading=!0,t().then(function(t){e.stepLoading=!1},function(e){throw e}).then(function(){var t=e.activeScreenIndex+1;t>=e.screens.length?e.finish():(e.activeScreen=e.screens[t].id,e.onScreenEnter())}).catch(function(e){console.error(e)})},onScreenEnter:function(){var e=this;this.$nextTick(function(){e.currentScreen.entered&&e.currentScreen.entered()})},focusOnInput:function(e){if(!this.$refs[e]||!this.$refs[e].focus)return!1;this.$refs[e].focus()},back:function(){this.transition="slide-down",this.activeScreen=this.screens[this.activeScreenIndex-1].id},finish:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=function(){return window.location.href=y.feedListUrl};if(e)return void(confirm("Are you sure you want to skip the introduction?")&&t());t()},active:function(e){return this.activeScreen===e},copyToClipboard:function(){var e=this;this.isCopied||(Object(w.a)("[wp-rss-aggregator]"),this.isCopied=!0,setTimeout(function(){e.isCopied=!1},1e3))}},components:{Expander:m}},C=b,S=Object(u.a)(C,r,a,!1,null,null,null);S.options.__file="Wizard.vue";var k=S.exports;i(21),i(18),new n.a({el:"#wpra-wizard-app",template:"<Wizard/>",components:{Wizard:k}})},18:function(e,t){},7:function(e,t,i){"use strict";function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!navigator.clipboard)return void n(e,t);navigator.clipboard.writeText(e).then(function(){},function(e){console.error("Async: Could not copy text: ",e)})}t.a=s;var n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t=t||document.body.parentElement;var i=document.createElement("textarea");i.value=e;var s=t.scrollTop;document.body.appendChild(i),i.focus(),i.select();try{document.execCommand("copy")}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(i),t.scrollTop=s}}},[17])});
js/build/pagination.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.WPRA=t():e.WPRA=t()}("undefined"!=typeof self?self:this,function(){return webpackJsonpWPRA([5],{53:function(e,t,a){a(54),jQuery(document).ready(function(e){var t=function(t,a){t.addClass("wpra-loading"),e([document.documentElement,document.body]).animate({scrollTop:t.offset().top-50},500);var n=a.template;delete a.template;var o=WpraPagination.baseUri.replace("%s",n);e.ajax({type:"POST",url:o,data:JSON.stringify(a),contentType:"application/json"}).done(function(e){t.replaceWith(e.html)})},a=function(e){var a=e.closest("[data-template-ctx]"),n=a.data("wpra-template"),o=a.data("template-ctx"),p=Object.assign({},{template:n},JSON.parse(atob(o)));p.page=e.data("wpra-page"),t(a,p)};e("body").on("click","a[data-wpra-page]",function(t){t.preventDefault(),a(e(this))})})},54:function(e,t){}},[53])});
js/build/plugins.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.WPRA=t():e.WPRA=t()}("undefined"!=typeof self?self:this,function(){return webpackJsonpWPRA([4],{22:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=o(4),i=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"wpra-plugin-disable-poll"},[o("modal",{attrs:{active:e.isModalVisible,"header-class":"invisible-header"},on:{close:e.closeModal}},[o("div",{attrs:{slot:"header"},slot:"header"},[o("div",{staticClass:"wpra-plugin-disable-poll__logo"},[o("img",{attrs:{src:e.image("light-line-logo.png"),alt:""}})]),e._v(" "),o("h3",[e._v("\n Do you have a moment to share why you are deactivating WP RSS Aggregator?\n ")]),e._v(" "),o("p",[e._v("\n Your feedback will help us to improve our plugins and service.\n ")])]),e._v(" "),o("div",{attrs:{slot:"body"},slot:"body"},[o("SerializedForm",{attrs:{form:e.form},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})],1),e._v(" "),o("div",{attrs:{slot:"footer"},slot:"footer"},[o("div",{staticClass:"footer-confirm__buttons"},[o("button",{staticClass:"button button-clear",on:{click:e.deactivate}},[e._v("\n Skip & Deactivate\n ")]),e._v(" "),o("button",{staticClass:"button button-primary",class:{"loading-button":e.isDeactivating},on:{click:e.submit}},[e._v("\n Submit & Deactivate\n ")])])])])],1)},n=[],l=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("transition",{attrs:{name:"modal-transition"}},[e.active?o("div",{staticClass:"modal",on:{click:function(t){if(t.target!==t.currentTarget)return null;e.$emit("close")}}},[o("div",{class:["modal__body",this.modalBodyClass]},[o("div",{staticClass:"modal__header",class:e.headerClass},[e._t("header")],2),e._v(" "),o("div",{staticClass:"modal__content"},[e._t("body")],2),e._v(" "),o("div",{staticClass:"modal__footer"},[e._t("footer")],2)])]):e._e()])},s=[],r={props:{active:{type:Boolean},title:{type:String},modalBodyClass:{type:String,default:""},headerClass:{default:function(){return{}}},dialogOpenedClass:{type:String,default:"modal-opened"}},watch:{active:function(e){this.$emit(e?"open":"close")}},mounted:function(){var e=this;this.$on("open",function(){document.querySelector("body").classList.add(e.dialogOpenedClass)}),this.$on("close",function(){document.querySelector("body").classList.remove(e.dialogOpenedClass)})}},d=r,c=o(1),u=Object(c.a)(d,l,s,!1,null,null,null);u.options.__file="Modal.vue";var m=u.exports,v=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"form"},e._l(e.form,function(t){return e.satisfiesCondition(t)?o("div",{staticClass:"form-group"},["radio"===t.type?[t.label?o("label",{attrs:{for:t.name},domProps:{innerHTML:e._s(t.label)}}):e._e(),e._v(" "),e._l(t.options,function(a,i){return o("div",{staticClass:"form-check"},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.model[t.name],expression:"model[datum.name]"}],attrs:{type:"radio",name:t.name,id:t.name+"_"+i},domProps:{value:a.value,checked:e._q(e.model[t.name],a.value)},on:{change:function(o){e.$set(e.model,t.name,a.value)}}}),e._v(" "),o("label",{attrs:{for:t.name+"_"+i}},[e._v("\n "+e._s(a.label||a.value)+"\n ")])])})]:e._e(),e._v(" "),"textarea"===t.type?[t.label?o("label",{attrs:{for:t.name},domProps:{innerHTML:e._s(t.label)}}):e._e(),e._v(" "),o("textarea",{directives:[{name:"model",rawName:"v-model",value:e.model[t.name],expression:"model[datum.name]"}],attrs:{id:t.name},domProps:{value:e.model[t.name]},on:{input:function(o){o.target.composing||e.$set(e.model,t.name,o.target.value)}}})]:e._e(),e._v(" "),"content"===t.type?[o("div",{class:t.className},[o("p",{domProps:{innerHTML:e._s(t.label)}})])]:e._e()],2):e._e()}),0)},p=[],f={props:{form:{type:Array},value:{type:Object}},computed:{model:{get:function(){return this.value},set:function(e){this.$emit("input",e)}}},methods:{satisfiesCondition:function(e){if(!e.condition)return!0;var t=this.getConditionFunction(e.condition.operator);return!!t&&t(e.condition.field,e.condition.value)},getConditionFunction:function(e){var t=this,o={"=":function(e,o){return t.model[e]===o}};return o[e]?o[e]:null}}},_=f,b=Object(c.a)(_,v,p,!1,null,null,null);b.options.__file="SerializedForm.vue";var h=b.exports,g=o(10),y=o.n(g),C=document.querySelector('[data-slug="wp-rss-aggregator"] .deactivate a'),P={components:{Modal:m,SerializedForm:h},data:function(){return{isDeactivating:!1,deactivateUrl:null,submitUrl:WrpaDisablePoll.url,model:WrpaDisablePoll.model,form:WrpaDisablePoll.form,isModalVisible:!1}},watch:{"model.reason":function(){this.model.follow_up=null}},mounted:function(){C.addEventListener("click",this.handleDeactivateClick)},methods:{image:function(e){return WrpaDisablePoll.image+e},handleDeactivateClick:function(e){this.isModalVisible||(e.preventDefault(),this.isModalVisible=!0)},closeModal:function(){this.isModalVisible=!1,this.deactivateUrl=null},submit:function(){var e=this;this.isDeactivating=!0,y.a.post(this.submitUrl,this.model,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(){e.deactivate()}).finally(function(){e.isDeactivating=!1})},deactivate:function(){C.click()}}},D=P,w=Object(c.a)(D,i,n,!1,null,null,null);w.options.__file="PluginDisablePoll.vue";var k=w.exports;o(23),new a.a({el:"#wpra-plugins-app",template:"<PluginDisablePoll/>",components:{PluginDisablePoll:k}})},23:function(e,t){}},[22])});
js/build/settings.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.WPRA=t():e.WPRA=t()}("undefined"!=typeof self?self:this,function(){return webpackJsonpWPRA([3],{42:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(4),o=i(5);new n.a({el:"#wpra-settings-app",render:function(e){return e(o.a,{props:WpraSettings.notice})}})},5:function(e,t,i){"use strict";var n=i(2),o=i.n(n),s=i(6);t.a={data:function(){return{shouldBeVisible:!0}},props:{id:{type:String,required:!0},title:{type:String},body:{type:String},learnMore:{default:!1},okayText:{type:String,default:"Got it"},learnMoreText:{type:String,default:"Learn more"},visible:{type:Boolean,default:!0}},computed:{isVisible:function(){return this.visible&&this.shouldBeVisible&&JSON.parse(localStorage.getItem(this.getBlockKey())||"true")}},methods:{onOkayClick:function(){this.shouldBeVisible=!1,localStorage.setItem(this.getBlockKey(),JSON.stringify(!1))},onLearnMoreClick:function(){window.open(this.learnMore,"_blank").focus()},getBlockKey:function(){return"wpra-"+this.id+"-visible"}},render:function(){var e=arguments[0];if(!this.isVisible)return null;var t=this.learnMore?e(s.a,{class:"button-clear",nativeOn:{click:this.onLearnMoreClick}},[this.learnMoreText," ",e("span",{class:"dashicons dashicons-external"})]):null;return e("div",{class:"wpra-notice-block"},[e("div",{class:"wpra-notice-block__title"},[this.title]),e("div",o()([{class:"wpra-notice-block__body"},{domProps:{innerHTML:this.body}}])),e("div",{class:"wpra-notice-block__buttons"},[e(s.a,{class:"brand button-primary",nativeOn:{click:this.onOkayClick}},[this.okayText]),t])])}}},6:function(e,t,i){"use strict";t.a={props:{loading:{type:Boolean,default:!1}},render:function(){return(0,arguments[0])("button",{attrs:{disabled:this.loading},class:{button:!0,"loading-button":this.loading}},[this.$slots.default])}}}},[42])});
js/build/templates.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.WPRA=e():t.WPRA=e()}("undefined"!=typeof self?self:this,function(){return webpackJsonpWPRA([1],{43:function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t){return new U(t)}function a(t){return t&&"object"===(void 0===t?"undefined":X(t))&&"[object RegExp]"!==Object.prototype.toString.call(t)&&"[object Date]"!==Object.prototype.toString.call(t)}function r(t){return Array.isArray(t)?[]:{}}function s(t,e){return e&&!0===e.clone&&a(t)?c(r(t),t,e):t}function l(t,e,i){var n=t.slice();return e.forEach(function(e,o){void 0===n[o]?n[o]=s(e,i):a(e)?n[o]=c(t[o],e,i):-1===t.indexOf(e)&&n.push(s(e,i))}),n}function p(t,e,i){var n={};return a(t)&&Object.keys(t).forEach(function(e){n[e]=s(t[e],i)}),Object.keys(e).forEach(function(o){a(e[o])&&t[o]?n[o]=c(t[o],e[o],i):n[o]=s(e[o],i)}),n}function c(t,e,i){var n=Array.isArray(e),o=i||{arrayMerge:l},a=o.arrayMerge||l;return n?Array.isArray(t)?a(t,e,i):s(e,i):p(t,e,i)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var h=i(45),f=i(46),m=i.n(f),b=i(10),y=i.n(b),v=i(48),g=i.n(v),_=i(49),w=i.n(_),k=i(50),x=i(2),T=i.n(x),A=i(51),S=i.n(A),P={props:{path:{},gate:{}},inject:["router"],methods:{getPath:function(){return this.router.buildRoute(this.path)},navigate:function(t){var e=!this.gate||this.gate();t.preventDefault(),e&&this.router.navigate(this.path)}},render:function(){var t=this,e=arguments[0],i=this.getPath();return e("a",T()([{attrs:{href:i}},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];t.navigate.apply(t,[e].concat(n))}}}]),[this.$slots.default])}},O={props:{id:{type:String,default:function(){return Math.random().toString(36).substr(0,12)}},label:{},description:{},type:{},value:{},placeholder:{},title:{},inputDisabled:{},options:{default:function(){return{}}}},methods:{inputNode:function(){var t=this,e=this.$createElement;return"checkbox"===this.type?e("input",T()([{attrs:{type:"checkbox",id:this.id,placeholder:this.placeholder,disabled:this.$attrs.disabled||this.inputDisabled},domProps:{checked:!!this.value}},{attrs:this.$attrs},{on:{change:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(){return t.$emit("input",!t.value)}).apply(void 0,[e].concat(n))}}}])):"select"!==this.type?e("input",T()([{attrs:{type:this.type,id:this.id,placeholder:this.placeholder,disabled:this.$attrs.disabled||this.inputDisabled},domProps:{value:this.value}},{attrs:this.$attrs},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.$emit("input",e.target.value)}).apply(void 0,[e].concat(n))}}}])):this.selectNode()},selectNode:function(){var t=this,e=this.$createElement,i=Object.keys(this.options).map(function(i){return e("option",{domProps:{value:i,selected:t.value===i}},[t.options[i]])});return e("select",T()([{attrs:this.$attrs},{attrs:{id:this.id,disabled:this.$attrs.disabled||this.inputDisabled}},{on:{change:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.$emit("input",e.target.value)}).apply(void 0,[e].concat(n))}}}]),[i])}},render:function(){var t=arguments[0],e=[];return this.title&&e.push({name:"tippy"}),t("div",{class:{"form-input":!0,"form-input--disabled":this.$attrs.disabled||!1}},[this.label?t("label",{class:"form-input__label",attrs:{for:this.id}},[t("div",[this.label,this.title?t("div",T()([{class:"form-input__tip"},{directives:e},{attrs:{title:this.title}}]),[t("span",{class:"dashicons dashicons-editor-help"})]):null]),this.description?t("div",T()([{class:"form-input__label-description"},{domProps:{innerHTML:this.description}}])):""]):null,t("div",{class:"form-input__field"},[this.inputNode()])])}},C=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"wpra-bottom-panel"},[t._t("default")],2)},j=[],W={},M=W,L=i(1),$=Object(L.a)(M,C,j,!1,null,null,null);$.options.__file="BottomPanel.vue";var R=$.exports,D=function(t){return JSON.parse(JSON.stringify(t))},N=i(5),E="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},U=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id";return n(this,t),this.data=e,this.primaryField=i,this}return t.prototype.find=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("object"!==(void 0===t?"undefined":E(t))&&null!==t){var i;i={},i[this.primaryField]=t,t=i}for(var n in this.data)if(this._isMatching(this.data[n],t))return this.data[n];return e},t.prototype.pluck=function(t){return this.data.map(function(e){return e[t]})},t.prototype.remove=function(t){for(var e in this.data)this._isMatching(this.data[e],t)&&this.data.splice(e,1);return this},t.prototype.appendDiff=function(t){for(var e=t,i=Array.isArray(e),n=0,e=i?e:e[Symbol.iterator]();;){var o;if(i){if(n>=e.length)break;o=e[n++]}else{if(n=e.next(),n.done)break;o=n.value}var a=o;this.contains(a)||this.data.push(a)}},t.prototype.prependDiff=function(t){for(var e=t.slice().reverse(),i=Array.isArray(e),n=0,e=i?e:e[Symbol.iterator]();;){var o;if(i){if(n>=e.length)break;o=e[n++]}else{if(n=e.next(),n.done)break;o=n.value}var a=o;this.contains(a)||this.data.unshift(a)}},t.prototype.contains=function(t){for(var e=this.data,i=Array.isArray(e),n=0,e=i?e:e[Symbol.iterator]();;){var o;if(i){if(n>=e.length)break;o=e[n++]}else{if(n=e.next(),n.done)break;o=n.value}if(o.id==t.id)return!0}return!1},t.prototype.filterValues=function(t){var e=this;return Object.keys(this.data).filter(function(i){return t(e.data[i],i)}).reduce(function(t,i){return t[i]=e.data[i],t},{})},t.prototype.filter=function(t){var e=this;return this.data.filter(function(i){return e._isMatching(i,t)})},t.prototype.whereIn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"id",i=[],n={};n[e]=null;for(var o=t,a=Array.isArray(o),r=0,o=a?o:o[Symbol.iterator]();;){var s;if(a){if(r>=o.length)break;s=o[r++]}else{if(r=o.next(),r.done)break;s=r.value}var l=s;n[e]=l;var p=this.find(n);p&&i.push(p)}return i},t.prototype.key=function(e){return new t(this.data.slice().reduce(function(t,i){return t[i[e]]=i,t},{}))},t.prototype.mapValues=function(t){var e=this;return Object.keys(this.data).map(function(i){e.data[i]=t(e.data[i],i)}),this},t.prototype.values=function(){return this.data},t.prototype._isMatching=function(t,e){if(!(t instanceof Object||e instanceof Object))return t==e;for(var i=!0,n=Object.keys(e),o=Array.isArray(n),a=0,n=o?n:n[Symbol.iterator]();;){var r;if(o){if(a>=n.length)break;r=n[a++]}else{if(a=n.next(),a.done)break;r=a.value}var s=r,l=t.hasOwnProperty(s)&&t[s]==e[s];i=i&&l}return i},t}(),F=o,I={data:function(){return{loading:!1,columns:{name:{label:"Template Name",class:"column-primary"},style:{label:"Template Type"},previewTemplate:{label:"Preview"}},filters:WpraTemplates.options.type,checked:[],filter:{paged:parseInt(this.router.params.paged||1),type:this.router.params.type||"",s:this.router.params.s||""},baseUrl:WpraTemplates.base_url,total:0}},inject:["hooks","http","router"],computed:{totalPages:function(){return Math.ceil(this.total/20)},list:{get:function(){return this.$store.state.templates.items},set:function(t){this.$store.commit("templates/set",t)}}},methods:{navigated:function(){var t=this;Object.keys(this.filter).forEach(function(e){t.filter[e]=t.router.params[e]||""}),this.filter.paged=parseInt(this.filter.paged||1),this.fetchList()},fetchList:function(){var t=this;this.loading=!0;var e=this.getParams(),i=parseInt(e.paged);return delete e.paged,i&&1!==i&&(e.page=i),this.http.get(this.baseUrl,{params:e}).then(function(e){t.list=e.data.items,t.total=e.data.count}).finally(function(){t.loading=!1})},deleteTemplate:function(t){var e=this;if(confirm("Are you sure you want to delete this template? If this template is being used in a shortcode or Gutenberg block anywhere on your site, the default template will be used instead."))return this.loading=!0,this.http.delete(this.baseUrl+"/"+t).then(function(){return e.fetchList()}).then(function(){e.loading=!1})},bulkDelete:function(){var t=this;if(confirm("Are you sure you want to delete these templates? If a template is being used in a shortcode or Gutenberg block anywhere on your site, the default template will be used instead."))return this.loading=!0,this.http.delete(this.baseUrl,{params:{ids:this.checked}}).then(function(){return t.checked=[],t.$refs.table.checkedItems=[],t.fetchList()}).then(function(){t.loading=!1})},duplicateTemplate:function(t){var e=D(t);delete e.id,"__built_in"===e.type&&delete e.type,e.name=e.name+" (Copy)",this.$store.commit("templates/updatePreset",e),this.router.navigate({name:"templates",params:{action:"new"}})},getPreviewLink:function(t){return WpraGlobal.admin_base_url+"?wpra_preview_template="+t.id},createTemplate:function(){this.$store.commit("templates/updatePreset",{}),this.router.navigate({name:"templates",params:{action:"new"}})},setChecked:function(t){var e=this;this.checked=t.filter(function(t){return"__built_in"!==F(e.list).find(t,{}).type})},getParams:function(){var t=this;return Object.keys(this.filter).filter(function(e){return!!t.filter[e]&&"all"!==t.filter[e]}).reduce(function(e,i){return e[i]=t.filter[i],e},{})},setFilter:function(t,e){this.filter[t]=e},submitFilter:function(){this.router.mergeParams(this.getParams())},getRowClass:function(t){return"__built_in"===t.type?"built-in":""}},render:function(){var t=this,e=arguments[0],i=function(t){return{name:"templates",params:{action:"edit",id:t}}},n=this.hooks.apply("wpra-templates-list-cells",this,{name:function(n){var o=n.row;return[e("div",[e("strong",[e(P,{attrs:{path:i(o.id)}},[o.name])]),e("small",{style:{paddingLeft:"4px",opacity:"0.6"}},[o.slug]),"__built_in"===o.type?e("span",{style:{opacity:"0.6",display:"block"}},['This is the default feed template. To create your own, either duplicate it or click "Add New" above.']):null]),e("div",{class:"row-actions"},[e("span",{attrs:{className:"edit"}},[e(P,{attrs:{path:i(o.id)}},["Edit"])," |"]),e("span",{class:"inline",style:{paddingLeft:"4px"}},[e("a",T()([{attrs:{href:"#"}},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];(function(e){e.preventDefault(),t.duplicateTemplate(o)}).apply(void 0,[e].concat(n))}}}]),["Duplicate"])," ","__built_in"!==o.type?"|":""]),"__built_in"!==o.type?e("span",T()([{class:"trash",style:{paddingLeft:"4px"}},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];(function(e){e.preventDefault(),t.deleteTemplate(o.id)}).apply(void 0,[e].concat(n))}}}]),[e("a",{attrs:{href:"#","aria-label":"Delete Item"},class:"submitdelete"},["Delete"])]):null])]},style:function(i){var n=i.row;return[e("div",[t.filters[n.type]])]},previewTemplate:function(i){var n=i.row;return[e("div",[e("a",{attrs:{href:t.getPreviewLink(n),target:"wpra-preview-template"},class:"wpra-preview-link"},["Open preview ",e("span",{class:"dashicons dashicons-external"})])])]},filters:function(){var i={all:"Select Template Type",list:"List"};return[e(O,T()([{attrs:{type:"select",options:i,value:t.filter.type},style:{margin:0}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){t.filter.type=e,t.submitFilter()}).apply(void 0,[e].concat(n))}}}]))]}}),o=e("div",[e("h1",{class:"wp-heading-inline"},["Templates"]),e("a",T()([{class:"page-title-action",attrs:{href:"#"}},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){e.preventDefault(),t.createTemplate()}).apply(void 0,[e].concat(n))}}}]),["Add New"]),e("p",{class:"search-box",style:{padding:"10px 0"}},[e("label",{class:"screen-reader-text",attrs:{for:"post-search-input"}},["Search Templates:"]),e("input",T()([{attrs:{type:"search",id:"post-search-input",name:"s"},domProps:{value:this.filter.s}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.filter.s=e.target.value}).apply(void 0,[e].concat(n))},keyup:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];if(!("button"in e)&&t._k(e.keyCode,"enter",13))return null;t.submitFilter.apply(t,[e].concat(n))}}}])),e("input",T()([{attrs:{type:"submit",id:"search-submit",value:"Search Templates"},class:"button"},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];t.submitFilter.apply(t,[e].concat(n))}}}]))]),e(N.a,{attrs:{id:"templates-introduction",title:"🎉 Welcome to Templates for WP RSS Aggregator!",body:'As of version 4.13, we have introduced the concept of templates to replace the display settings that were previously available in the WP RSS Aggregator settings. These templates provide you with much more flexibility and new designs. They also come with a revamped <a target="_blank" href="https://kb.wprssaggregator.com/article/54-displaying-imported-items-shortcode">TinyMCE shortcode button</a> for the Classic Editor and a <em><a href="https://kb.wprssaggregator.com/article/454-displaying-imported-items-block-gutenberg" target="_blank">brand new block</a></em> for those using WP 5.0+ with the Gutenberg block editor!<br/><br/>There are new template types coming your way in the coming weeks, but for now, the <em>list template type</em> replicates the previous options. Please note that the <em>Default</em> template below is set up using your pre-existing display options, nothing is lost or changed.',learnMore:"https://www.wprssaggregator.com/core-version-4-13-celebrating-one-million-downloads/",visible:!!WpraGlobal.is_existing_user}}),e("hr",{class:"wp-header-end"}),e(S.a,T()([{attrs:{columns:this.columns,rows:this.list,loading:this.loading,totalItems:this.total,perPage:20,totalPages:this.totalPages,currentPage:this.filter.paged,notFound:"No templates found.",rowClass:this.getRowClass},ref:"table",class:{"wpra-no-cb":0===this.list.length||1===this.list.length&&"__built_in"===this.list[0].type},scopedSlots:n},{on:{checked:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];t.setChecked.apply(t,[e].concat(n))},pagination:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){t.filter.paged=e,t.submitFilter()}).apply(void 0,[e].concat(n))}}}])),this.checked.length?e(R,[e("div",{class:"flex-row"},[e("div",{class:"flex-col"},[e("div",{class:"wpra-bottom-panel__title"},["Bulk Actions"]),e("a",T()([{attrs:{href:"#"}},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){e.preventDefault(),t.bulkDelete()}).apply(void 0,[e].concat(n))}}}]),["Delete"])])])]):null]);return this.hooks.apply("wpra-templates-list",this,o)}},B={inject:["hooks"],data:function(){return{expanded:!0}},props:{title:{},id:{},submit:{type:Boolean,default:!1}},methods:{toggle:function(){this.expanded=!this.expanded}},render:function(){var t=this,e=arguments[0];return this.hooks.apply("postbox-"+this.id,this,e("div",{class:"postbox wpra-postbox",attrs:{id:this.submit?"submitdiv":""}},[e("button",T()([{attrs:{type:"button","aria-expanded":"true"},class:"handlediv"},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];t.toggle.apply(t,[e].concat(n))}}}]),[e("span",{class:"screen-reader-text"},["Toggle panel: ",this.title]),e("span",{class:"toggle-indicator",attrs:{"aria-hidden":"true"}})]),e("h2",T()([{class:"hndle ui-sortable-handle"},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];t.toggle.apply(t,[e].concat(n))}}}]),[e("span",[this.title])]),e("div",{class:"inside"},[this.hooks.apply("postbox-content-"+this.id,this,[this.$slots.default])])]))}},G=B,V=Object(L.a)(G,void 0,void 0,!1,null,null,null);V.options.__file="Postbox.vue";var q=V.exports,H={render:function(){return(0,arguments[0])("div",{attrs:{id:"postbox-container-2"},class:"postbox-container"},[this.$slots.default])}},J={render:function(){return(0,arguments[0])("div",{attrs:{id:"postbox-container-1"},class:"wpra-postbox-container postbox-container"},[this.$slots.default])}},K={render:function(){return(0,arguments[0])("div",{attrs:{id:"post-body"}},[this.$slots.default])}},z=i(6),X="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};c.all=function(t,e){if(!Array.isArray(t)||t.length<2)throw new Error("first argument should be an array with at least two elements");return t.reduce(function(t,i){return c(t,i,e)})};var Y=c,Q=i(52),Z=i.n(Q),tt={data:function(){return{changes:{model:{}}}},methods:{isChanged:function(){return!Z()(this.model,this.changes.model)},rememberModel:function(){this.$set(this.changes,"model",D(this.model))},cancelChanges:function(){confirm("Are you sure you want to cancel your changes for this template? This action cannot be reverted and all changes made since your last save will be lost.")&&this.$set(this,"model",D(this.changes.model))}}},et=i(7),it={mixins:[tt],data:function(){return{typeOptions:Object.keys(WpraTemplates.options.type).filter(function(t){return"_"!==t[0]}).reduce(function(t,e){return t[e]=WpraTemplates.options.type[e],t},{}),model:D(WpraTemplates.model_schema),validation:D(WpraTemplates.model_schema),tooltips:D(WpraTemplates.model_tooltips),baseUrl:WpraTemplates.base_url,isSaving:!1,isLoading:!1}},inject:["hooks","http","router","notification"],mounted:function(){this.resolveEditingItem()},computed:{previewUrl:function(){return WpraGlobal.admin_base_url+"?wpra_preview_template="+this.router.params.id}},methods:{resolveEditingItem:function(){var t=this,e=Y(D(WpraTemplates.model_schema),this.$store.state.templates.preset);this.isLoading=!0,function(){var e=t.router.params.id;if(!e)return Promise.resolve(null);var i=t.$store.getters["templates/item"](e);return i?Promise.resolve(i):t.http.get(t.baseUrl+"/"+e).then(function(t){return t.data})}().then(function(i){if(t.isLoading=!1,!i)return t.$set(t,"model",e),void t.rememberModel();i=Object.assign({},i),t.model=Y(t.model,i),t.rememberModel()})},save:function(){var t=this,e=!this.model.id;this.isSaving=!0,this.runRequest().then(function(i){t.model=Y(t.model,i.data),t.rememberModel(),t.notification.show("Template saved!",{type:"success",icon:function(t){return t.classList.add("dashicons","dashicons-yes"),t}}),e&&t.router.navigate({name:"templates",params:{action:"edit",id:i.data.id}})},function(e){t.notification.show("Something went wrong. Template is not saved!",{type:"error",icon:function(t){return t.classList.add("dashicons","dashicons-warning"),t}})}).finally(function(){t.isSaving=!1})},runRequest:function(){var t=this.model.id?"put":"post",e=this.model.id?this.baseUrl+"/"+this.model.id:this.baseUrl;return this.http[t](e,this.prepareModel())},prepareModel:function(){var t=this,e=Object.keys(WpraTemplates.model_schema);return Object.keys(this.model).filter(function(i){return!(!e.includes(i)||"__built_in"===t.model.type&&["name","type"].includes(i)||["slug","id"].includes(i))}).reduce(function(e,i){return e[i]=t.model[i],e},{})},getShortcode:function(){return'[wp-rss-aggregator template="'+this.model.slug+'"]'},preventLoosingNotSavedData:function(){return!this.isChanged()||confirm("You have unsaved changes. All changes will be lost if you go back to the Template list before updating. Are you sure you want to continue?")},copyShortcode:function(t){Object(et.a)(this.getShortcode());var e=t.target.innerText;t.target.style.width=t.target.getBoundingClientRect().width+"px",t.target.disabled=!0,t.target.innerText="Copied!",setTimeout(function(){t.target.style.width=null,t.target.innerText=e,t.target.disabled=!1},5e3)}},render:function(){var t=this,e=arguments[0],i={name:"templates"},n=null,o=null,a=e(N.a,{class:"postbox",attrs:{id:"templates-usage",title:"Setting up your Templates",body:'Templates are used to display the items imported using WP RSS Aggregator. Choose the preferred options below and use them anywhere on your site via our <a href="https://kb.wprssaggregator.com/article/54-displaying-imported-items-shortcode#tinymce" target="_blank">shortcode</a> or our <a href="https://kb.wprssaggregator.com/article/454-displaying-imported-items-block-gutenberg" target="_blank">block</a>. <br/><br/>More template types and options will be made available soon. Have you got a template idea in mind? <a href="https://www.wprssaggregator.com/request-a-template/" target="_blank">Share it with us.</a>',learnMore:"https://kb.wprssaggregator.com/article/457-templates"}});this.router.params.id&&(n=e("div",{attrs:{id:""},style:{padding:"6px 0"}},[e("div",{class:"misc-pub-section misc-pub-visibility"},[e("a",{attrs:{href:this.previewUrl,role:"button",target:"wpra-preview-template"},class:"wpra-preview-link",style:{marginLeft:"4px",textDecoration:"none"}},["Open preview",e("span",{class:"dashicons dashicons-external"})])])])),this.model.id&&(o=e("div",{class:"wpra-shortcode-copy",attrs:{title:"Copy chortcode"}},[e("div",{class:"wpra-shortcode-copy__content"},[e("strong",["Shortcode: "]),e("code",[this.getShortcode()])]),e("div",{class:"wpra-shortcode-copy__icon"},[e("button",T()([{class:"button"},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];t.copyShortcode.apply(t,[e].concat(n))}}}]),["Copy Shortcode"])])]));var r=e("div",[e("div",{class:"page-title"},[e(P,{class:"back-button",attrs:{path:i,gate:this.preventLoosingNotSavedData}},[e("span",{class:"dashicons dashicons-arrow-left-alt"}),"Templates"]),e("h1",{class:"wp-heading-inline"},[this.router.params.id?this.changes.model.name||this.changes.model.slug:"Create a New Template"]),o]),e("div",{attrs:{id:"poststuff"}},[this.isLoading?e("div",{class:"loading-container"}):e(K,{class:"metabox-holder columns-2"},[e(H,[a,e(q,{attrs:{id:"template-details",title:"Template Details"}},[e(O,T()([{attrs:{type:"text",label:"Template name",value:this.model.name,disabled:"__built_in"===this.model.type}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.name=e}).apply(void 0,[e].concat(n))}}}])),e(O,T()([{attrs:{type:"select",label:"Template type",value:this.model.type,options:this.typeOptions,disabled:"__built_in"===this.model.type,inputDisabled:!0,description:'<div class="disable-ignored"><strong class="disable-ignored">🎉 More template types coming soon!</strong> Have you got a template idea in mind? <a target="_blank" href="https://www.wprssaggregator.com/request-a-template/" class="disable-ignored">Share it with us.</a></div>'}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.type=e}).apply(void 0,[e].concat(n))}}}])),"__built_in"===this.model.type?e("div",{class:"wpra-info-box"},[e("div",{class:"wpra-info-box__icon"},[e("span",{class:"dashicons dashicons-info"})]),e("div",{class:"wpra-info-box__text"},["This is the default template for WP RSS Aggregator. It is used as the fallback template when one is not selected via the shortcode or block. To create a new one, please go back to the Templates List."])]):null]),e(q,{attrs:{id:"template-options",title:"Template Options"}},[e(O,T()([{attrs:{type:"checkbox",label:"Link title to original article",value:this.model.options.title_is_link,title:this.tooltips.options.title_is_link}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.title_is_link=e}).apply(void 0,[e].concat(n))}}}])),e(O,T()([{attrs:{type:"number",label:"Title maximum length",value:this.model.options.title_max_length||"",placeholder:"No limit",title:this.tooltips.options.title_max_length}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.title_max_length=e}).apply(void 0,[e].concat(n))}}}])),e(O,T()([{attrs:{type:"number",label:"Number of items to show",value:this.model.options.limit||"",title:this.tooltips.options.limit}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.limit=e}).apply(void 0,[e].concat(n))}}}])),e(O,T()([{attrs:{type:"checkbox",label:"Show publish date",value:this.model.options.date_enabled,title:this.tooltips.options.date_enabled},style:{paddingTop:"20px",fontWeight:"bold"}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.date_enabled=e}).apply(void 0,[e].concat(n))}}}])),e(O,T()([{attrs:{type:"text",label:"Date prefix",value:this.model.options.date_prefix,disabled:!this.model.options.date_enabled,title:this.tooltips.options.date_prefix}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.date_prefix=e}).apply(void 0,[e].concat(n))}}}])),e(O,T()([{attrs:{type:"text",label:"Date format",value:this.model.options.date_format,disabled:this.model.options.date_use_time_ago||!this.model.options.date_enabled,title:this.tooltips.options.date_format}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.date_format=e}).apply(void 0,[e].concat(n))}}}])),e(O,T()([{attrs:{type:"checkbox",label:'Use "time ago" format',description:"Example: 20 minutes ago",value:this.model.options.date_use_time_ago,disabled:!this.model.options.date_enabled,title:this.tooltips.options.date_use_time_ago}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.date_use_time_ago=e}).apply(void 0,[e].concat(n))}}}])),e(O,T()([{attrs:{type:"checkbox",label:"Show source name",value:this.model.options.source_enabled,title:this.tooltips.options.source_enabled},style:{paddingTop:"20px",fontWeight:"bold"}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.source_enabled=e}).apply(void 0,[e].concat(n))}}}])),e(O,T()([{attrs:{type:"text",label:"Source prefix",value:this.model.options.source_prefix,disabled:!this.model.options.source_enabled,title:this.tooltips.options.source_prefix}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.source_prefix=e}).apply(void 0,[e].concat(n))}}}])),e(O,T()([{attrs:{type:"checkbox",label:"Link source name",value:this.model.options.source_is_link,disabled:!this.model.options.source_enabled,title:this.tooltips.options.source_is_link}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.source_is_link=e}).apply(void 0,[e].concat(n))}}}])),e(O,T()([{attrs:{type:"checkbox",label:"Show author name",value:this.model.options.author_enabled,title:this.tooltips.options.author_enabled},style:{paddingTop:"20px",fontWeight:"bold"}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.author_enabled=e}).apply(void 0,[e].concat(n))}}}])),e(O,T()([{attrs:{type:"text",label:"Author prefix",value:this.model.options.author_prefix,disabled:!this.model.options.author_enabled,title:this.tooltips.options.author_prefix}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.author_prefix=e}).apply(void 0,[e].concat(n))}}}])),e(O,T()([{attrs:{type:"checkbox",label:"Pagination",value:this.model.options.pagination,title:this.tooltips.options.pagination},style:{paddingTop:"20px",fontWeight:"bold"}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.pagination=e}).apply(void 0,[e].concat(n))}}}])),e(O,T()([{attrs:{type:"select",label:"Pagination style",options:WpraTemplates.options.pagination_type,value:this.model.options.pagination_type,disabled:!this.model.options.pagination,title:this.tooltips.options.pagination_type}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.pagination_type=e}).apply(void 0,[e].concat(n))}}}])),e(O,T()([{attrs:{type:"checkbox",label:"Show bullets",value:this.model.options.bullets_enabled,title:this.tooltips.options.bullets_enabled},style:{paddingTop:"20px",fontWeight:"bold"}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.bullets_enabled=e}).apply(void 0,[e].concat(n))}}}])),e(O,T()([{attrs:{type:"select",label:"Bullet style",options:WpraTemplates.options.bullet_type,value:this.model.options.bullet_type,disabled:!this.model.options.bullets_enabled,title:this.tooltips.options.bullet_type}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.bullet_type=e}).apply(void 0,[e].concat(n))}}}]))])]),e(J,[e(q,{attrs:{id:"template-create",title:this.model.id?"Update Template":"Create Template",submit:!0},class:"wpra-postbox-last"},[e("div",{class:"submitbox",attrs:{id:"submitpost"}},[n,e("div",{attrs:{id:"major-publishing-actions"}},[e("div",{attrs:{id:"delete-action"}},[this.isChanged()?e("a",T()([{attrs:{href:"#"},class:"submitdelete"},{on:{click:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){e.preventDefault(),t.cancelChanges()}).apply(void 0,[e].concat(n))}}}]),["Cancel Changes"]):null]),e("div",{attrs:{id:"publishing-action"}},[e(z.a,{class:"button-primary button-large",attrs:{loading:this.isSaving},nativeOn:{click:this.save}},[this.model.id?"Save":"Publish"])]),e("div",{class:"clear"})])])]),e(q,{attrs:{id:"template-link-preferences",title:"Link Preferences"}},[e("p",{style:{opacity:.65}},["These options apply to all links within this template."]),e(O,T()([{attrs:{type:"checkbox",label:"Set links as nofollow",value:this.model.options.links_nofollow,title:this.tooltips.options.links_nofollow}},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.links_nofollow=e}).apply(void 0,[e].concat(n))}}}])),e(O,T()([{attrs:{type:"select",label:"Open links behaviour",value:this.model.options.links_behavior,options:WpraTemplates.options.links_behavior,title:this.tooltips.options.links_behavior},class:"form-input--vertical"},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.links_behavior=e}).apply(void 0,[e].concat(n))}}}])),e(O,T()([{attrs:{type:"select",label:"Video embed link type",description:"This will not affect already imported feed items.",value:this.model.options.links_video_embed_page,options:WpraTemplates.options.links_video_embed_page,title:this.tooltips.options.links_video_embed_page},class:"form-input--vertical"},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.links_video_embed_page=e}).apply(void 0,[e].concat(n))}}}]))]),e(q,{attrs:{id:"template-custom-css",title:"Custom Style"}},[e(O,T()([{attrs:{type:"text",label:"Custom CSS class name",value:this.model.options.custom_css_classname,title:this.tooltips.options.custom_css_classname},class:"form-input--vertical"},{on:{input:function(e){for(var i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];(function(e){return t.model.options.custom_css_classname=e}).apply(void 0,[e].concat(n))}}}]))])])])])]);return this.hooks.apply("wpra-templates-form",this,r)}},nt=function(t){var e=t.store,i=t.router;return{store:e,data:function(){return{afterNavigate:function(){},params:{},currentRoute:null}},created:function(){i.setApp(this),this.currentRoute=i.parseLocation(window.location),this.navigated()},mounted:function(){var t=this;window.addEventListener("popstate",function(){t.currentRoute=i.parseLocation(window.location),t.navigated()})},methods:{ViewComponent:function(){return i.findRoute(this.currentRoute).component},navigated:function(){var t=this;this.$nextTick(function(){var e=t.$refs.main;e&&e.navigated&&e.navigated({route:i.findRoute(t.currentRoute)})})}},render:function(t){var e=t(this.ViewComponent(),{ref:"main"});return this.afterNavigate(),e}}},ot=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),at=function(t){t||(t=location.href);var e=t.indexOf("?"),i=t.indexOf("#");if(-1==i&&-1==e)return{};-1==i&&(i=t.length);var n=-1==e||i==e+1?t.substring(i):t.substring(e+1,i),o={};return n.split("&").forEach(function(t){if(t){t=t.split("+").join(" ");var e=t.indexOf("="),i=e>-1?t.substr(0,e):t,n=e>-1?decodeURIComponent(t.substr(e+1)):"",a=i.indexOf("[");if(-1==a)o[decodeURIComponent(i)]=n;else{var r=i.indexOf("]",a),s=decodeURIComponent(i.substring(a+1,r));i=decodeURIComponent(i.substring(0,a)),o[i]||(o[i]=[]),s?o[i][s]=n:o[i].push(n)}}}),o},rt=function(){function t(e,i){u(this,t),this.routes=e,this.options=i,this.baseParams=i.baseParams||["post_type","page","action","id"]}return t.prototype.setApp=function(t){this.app=t,this.app.afterNavigate=this.options.afterNavigating||function(){}},t.prototype.findRoute=function(t){return this.routes.find(function(e){var i=e.route;return-1!==t.indexOf(i)})},t.prototype.updateParams=function(t){this.app.$set(this.app,"params",t)},t.prototype.mergeParams=function(t){var e=this,i=Object.keys(this.params).filter(function(i){return-1!==e.baseParams.indexOf(i)||t.hasOwnProperty(i)}).reduce(function(t,i){return t[i]=e.params[i],t},{}),n=Object.assign({},i,t);this.updateParams(n),window.history.pushState(null,null,this.routeFromParams()),this.app.navigated()},t.prototype.routeFromParams=function(){var t=!!Object.keys(this.params).length;return location.pathname+(t?"?"+this.buildParams(this.params):"")},t.prototype.buildRoute=function(t){if(t.name){var e=this.routes.find(function(e){return e.name===t.name});if(!e)return null;var i=e.route,n=-1!==i.indexOf("?")?"&":"?";return i+(t.params?n+this.buildParams(t.params?t.params:{}):"")}},t.prototype.buildParams=function(t){return Object.keys(t).map(function(e){return e+"="+t[e]}).join("&")},t.prototype.parseLocation=function(t){return this.updateParams(at(t.search)),at(t.search),t.pathname+t.search},t.prototype.navigate=function(t){this.app&&(this.app.currentRoute=this.buildRoute(t)),this.updateParams(Object.assign({},t.params||{},at(this.buildRoute(t)))),window.history.pushState(null,null,this.buildRoute(t)),this.app.navigated()},ot(t,[{key:"params",get:function(){return this.app?this.app.params:{}}}]),t}(),st=rt,lt={set:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t.isInitialized=!0,t.items=e},updatePreset:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t.preset=e}},pt={},ct={isInitialized:!1,items:[],preset:{}},ut={item:function(t){return function(e){return F(t.items).find(e)}}},dt={namespaced:!0,mutations:lt,actions:pt,state:ct,getters:ut},ht=function(){function t(e,i){d(this,t),this.showMethod=e,this.errorMethod=i}return t.prototype.show=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.showMethod(t,e)},t.prototype.error=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.errorMethod(t,e)},t}(),ft=ht,mt={register:function(t){return t.router=function(t){var e=t.document;return new st([{route:WpraGlobal.templates_url_base+"&action",name:"templates-form",component:it},{route:WpraGlobal.templates_url_base,name:"templates",component:I}],{afterNavigating:function(){e.querySelector("html").scrollTop=0}})},t.App=function(t){return nt(t)},t.vuex=function(t){return t.vue.use(k.a),k.a},t.notification=function(t){var e=t.vue;return e.use(g.a,{position:"top-center",duration:4e3,iconPack:"callback"}),new ft(e.toasted.show,e.toasted.error)},t.store=function(t){return new t.vuex.Store({modules:{templates:dt},state:{}})},t.http=function(){var t=WpraGlobal&&WpraGlobal.nonce?{headers:{"X-WP-Nonce":WpraGlobal.nonce}}:{};return y.a.create(t)},t},run:function(t){t.container.vue.use(w.a,{theme:"light",animation:"fade",arrow:!0,arrowTransform:"scale(0)",placement:"right"})}},bt=i(4);i(44);var yt=h.Container,vt=h.Core,gt=h.Services;window.UiFramework&&(window.UiFramework=Object.assign({},window.UiFramework,vt.UiFramework));var _t={uiFramework:h,hooks:new gt.HookService,document:document,vue:function(t){return bt.a.use(t.uiFramework.Core.InjectedComponents,{container:t}),bt.a}},wt=new yt.ContainerFactory(m.a),kt=new vt.UiFramework.App(wt,_t);window.UiFramework.registerPlugin("templates-app",mt),kt.use(["templates-app"]),kt.init({"#wpra-templates-app":"App"})},44:function(t,e){},5:function(t,e,i){"use strict";var n=i(2),o=i.n(n),a=i(6);e.a={data:function(){return{shouldBeVisible:!0}},props:{id:{type:String,required:!0},title:{type:String},body:{type:String},learnMore:{default:!1},okayText:{type:String,default:"Got it"},learnMoreText:{type:String,default:"Learn more"},visible:{type:Boolean,default:!0}},computed:{isVisible:function(){return this.visible&&this.shouldBeVisible&&JSON.parse(localStorage.getItem(this.getBlockKey())||"true")}},methods:{onOkayClick:function(){this.shouldBeVisible=!1,localStorage.setItem(this.getBlockKey(),JSON.stringify(!1))},onLearnMoreClick:function(){window.open(this.learnMore,"_blank").focus()},getBlockKey:function(){return"wpra-"+this.id+"-visible"}},render:function(){var t=arguments[0];if(!this.isVisible)return null;var e=this.learnMore?t(a.a,{class:"button-clear",nativeOn:{click:this.onLearnMoreClick}},[this.learnMoreText," ",t("span",{class:"dashicons dashicons-external"})]):null;return t("div",{class:"wpra-notice-block"},[t("div",{class:"wpra-notice-block__title"},[this.title]),t("div",o()([{class:"wpra-notice-block__body"},{domProps:{innerHTML:this.body}}])),t("div",{class:"wpra-notice-block__buttons"},[t(a.a,{class:"brand button-primary",nativeOn:{click:this.onOkayClick}},[this.okayText]),e])])}}},6:function(t,e,i){"use strict";e.a={props:{loading:{type:Boolean,default:!1}},render:function(){return(0,arguments[0])("button",{attrs:{disabled:this.loading},class:{button:!0,"loading-button":this.loading}},[this.$slots.default])}}},7:function(t,e,i){"use strict";function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!navigator.clipboard)return void o(t,e);navigator.clipboard.writeText(t).then(function(){},function(t){console.error("Async: Could not copy text: ",t)})}e.a=n;var o=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e=e||document.body.parentElement;var i=document.createElement("textarea");i.value=t;var n=e.scrollTop;document.body.appendChild(i),i.focus(),i.select();try{document.execCommand("copy")}catch(t){console.error("Fallback: Oops, unable to copy",t)}document.body.removeChild(i),e.scrollTop=n}}},[43])});
js/build/update.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.WPRA=o():e.WPRA=o()}("undefined"!=typeof self?self:this,function(){return webpackJsonpWPRA([6],{56:function(e,o){}},[56])});
js/build/wpra-manifest.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(r){function n(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return r[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}var e=window.webpackJsonpWPRA;window.webpackJsonpWPRA=function(o,u,c){for(var f,i,p,a=0,l=[];a<o.length;a++)i=o[a],t[i]&&l.push(t[i][0]),t[i]=0;for(f in u)Object.prototype.hasOwnProperty.call(u,f)&&(r[f]=u[f]);for(e&&e(o,u,c);l.length;)l.shift()();if(c)for(a=0;a<c.length;a++)p=n(n.s=c[a]);return p};var o={},t={8:0};n.m=r,n.c=o,n.d=function(r,e,o){n.o(r,e)||Object.defineProperty(r,e,{configurable:!1,enumerable:!0,get:o})},n.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(e,"a",e),e},n.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},n.p="",n.oe=function(r){throw console.error(r),r}}([]);
js/build/wpra-vendor.min.js ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ webpackJsonpWPRA([0],[function(t,e,n){"use strict";function r(t){return"[object Array]"===T.call(t)}function i(t){return"[object ArrayBuffer]"===T.call(t)}function o(t){return"undefined"!=typeof FormData&&t instanceof FormData}function a(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer}function s(t){return"string"==typeof t}function c(t){return"number"==typeof t}function u(t){return void 0===t}function l(t){return null!==t&&"object"==typeof t}function p(t){return"[object Date]"===T.call(t)}function f(t){return"[object File]"===T.call(t)}function d(t){return"[object Blob]"===T.call(t)}function h(t){return"[object Function]"===T.call(t)}function v(t){return l(t)&&h(t.pipe)}function m(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams}function y(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")}function g(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document}function b(t,e){if(null!==t&&void 0!==t)if("object"!=typeof t&&(t=[t]),r(t))for(var n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.call(null,t[o],o,t)}function w(){function t(t,n){"object"==typeof e[n]&&"object"==typeof t?e[n]=w(e[n],t):e[n]=t}for(var e={},n=0,r=arguments.length;n<r;n++)b(arguments[n],t);return e}function x(t,e,n){return b(e,function(e,r){t[r]=n&&"function"==typeof e?_(e,n):e}),t}var _=n(11),k=n(25),T=Object.prototype.toString;t.exports={isArray:r,isArrayBuffer:i,isBuffer:k,isFormData:o,isArrayBufferView:a,isString:s,isNumber:c,isObject:l,isUndefined:u,isDate:p,isFile:f,isBlob:d,isFunction:h,isStream:v,isURLSearchParams:m,isStandardBrowserEnv:g,forEach:b,merge:w,extend:x,trim:y}},function(t,e,n){"use strict";function r(t,e,n,r,i,o,a,s){var c="function"==typeof t?t.options:t;e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),o&&(c._scopeId="data-v-"+o);var u;if(a?(u=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},c._ssrRegister=u):i&&(u=s?function(){i.call(this,this.$root.$options.shadowRoot)}:i),u)if(c.functional){c._injectStyles=u;var l=c.render;c.render=function(t,e){return u.call(e),l(t,e)}}else{var p=c.beforeCreate;c.beforeCreate=p?[].concat(p,u):[u]}return{exports:t,options:c}}e.a=r},function(t,e){function n(t,e){return function(){t&&t.apply(this,arguments),e&&e.apply(this,arguments)}}var r=/^(attrs|props|on|nativeOn|class|style|hook)$/;t.exports=function(t){return t.reduce(function(t,e){var i,o,a,s,c;for(a in e)if(i=t[a],o=e[a],i&&r.test(a))if("class"===a&&("string"==typeof i&&(c=i,t[a]=i={},i[c]=!0),"string"==typeof o&&(c=o,e[a]=o={},o[c]=!0)),"on"===a||"nativeOn"===a||"hook"===a)for(s in o)i[s]=n(i[s],o[s]);else if(Array.isArray(i))t[a]=i.concat(o);else if(Array.isArray(o))t[a]=[i].concat(o);else for(s in o)i[s]=o[s];else t[a]=e[a];return t},{})}},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";(function(t,n){function r(t){return void 0===t||null===t}function i(t){return void 0!==t&&null!==t}function o(t){return!0===t}function a(t){return!1===t}function s(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t||"boolean"==typeof t}function c(t){return null!==t&&"object"==typeof t}function u(t){return"[object Object]"===po.call(t)}function l(t){return"[object RegExp]"===po.call(t)}function p(t){var e=parseFloat(String(t));return e>=0&&Math.floor(e)===e&&isFinite(t)}function f(t){return null==t?"":"object"==typeof t?JSON.stringify(t,null,2):String(t)}function d(t){var e=parseFloat(t);return isNaN(e)?t:e}function h(t,e){for(var n=Object.create(null),r=t.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return e?function(t){return n[t.toLowerCase()]}:function(t){return n[t]}}function v(t,e){if(t.length){var n=t.indexOf(e);if(n>-1)return t.splice(n,1)}}function m(t,e){return vo.call(t,e)}function y(t){var e=Object.create(null);return function(n){return e[n]||(e[n]=t(n))}}function g(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function b(t,e){return t.bind(e)}function w(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function x(t,e){for(var n in e)t[n]=e[n];return t}function _(t){for(var e={},n=0;n<t.length;n++)t[n]&&x(e,t[n]);return e}function k(t,e,n){}function T(t,e){if(t===e)return!0;var n=c(t),r=c(e);if(!n||!r)return!n&&!r&&String(t)===String(e);try{var i=Array.isArray(t),o=Array.isArray(e);if(i&&o)return t.length===e.length&&t.every(function(t,n){return T(t,e[n])});if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(i||o)return!1;var a=Object.keys(t),s=Object.keys(e);return a.length===s.length&&a.every(function(n){return T(t[n],e[n])})}catch(t){return!1}}function O(t,e){for(var n=0;n<t.length;n++)if(T(t[n],e))return n;return-1}function E(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}}function C(t){var e=(t+"").charCodeAt(0);return 36===e||95===e}function A(t,e,n,r){Object.defineProperty(t,e,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function S(t){if(!Ao.test(t)){var e=t.split(".");return function(t){for(var n=0;n<e.length;n++){if(!t)return;t=t[e[n]]}return t}}}function P(t){return"function"==typeof t&&/native code/.test(t.toString())}function j(t){Go.push(t),Wo.target=t}function L(){Go.pop(),Wo.target=Go[Go.length-1]}function M(t){return new Ko(void 0,void 0,void 0,String(t))}function $(t){var e=new Ko(t.tag,t.data,t.children&&t.children.slice(),t.text,t.elm,t.context,t.componentOptions,t.asyncFactory);return e.ns=t.ns,e.isStatic=t.isStatic,e.key=t.key,e.isComment=t.isComment,e.fnContext=t.fnContext,e.fnOptions=t.fnOptions,e.fnScopeId=t.fnScopeId,e.asyncMeta=t.asyncMeta,e.isCloned=!0,e}function I(t){na=t}function N(t,e){t.__proto__=e}function D(t,e,n){for(var r=0,i=n.length;r<i;r++){var o=n[r];A(t,o,e[o])}}function R(t,e){if(c(t)&&!(t instanceof Ko)){var n;return m(t,"__ob__")&&t.__ob__ instanceof ra?n=t.__ob__:na&&!Xo()&&(Array.isArray(t)||u(t))&&Object.isExtensible(t)&&!t._isVue&&(n=new ra(t)),e&&n&&n.vmCount++,n}}function F(t,e,n,r,i){var o=new Wo,a=Object.getOwnPropertyDescriptor(t,e);if(!a||!1!==a.configurable){var s=a&&a.get,c=a&&a.set;s&&!c||2!==arguments.length||(n=t[e]);var u=!i&&R(n);Object.defineProperty(t,e,{enumerable:!0,configurable:!0,get:function(){var e=s?s.call(t):n;return Wo.target&&(o.depend(),u&&(u.dep.depend(),Array.isArray(e)&&H(e))),e},set:function(e){var r=s?s.call(t):n;e===r||e!==e&&r!==r||s&&!c||(c?c.call(t,e):n=e,u=!i&&R(e),o.notify())}})}}function B(t,e,n){if(Array.isArray(t)&&p(e))return t.length=Math.max(t.length,e),t.splice(e,1,n),n;if(e in t&&!(e in Object.prototype))return t[e]=n,n;var r=t.__ob__;return t._isVue||r&&r.vmCount?n:r?(F(r.value,e,n),r.dep.notify(),n):(t[e]=n,n)}function U(t,e){if(Array.isArray(t)&&p(e))return void t.splice(e,1);var n=t.__ob__;t._isVue||n&&n.vmCount||m(t,e)&&(delete t[e],n&&n.dep.notify())}function H(t){for(var e=void 0,n=0,r=t.length;n<r;n++)e=t[n],e&&e.__ob__&&e.__ob__.dep.depend(),Array.isArray(e)&&H(e)}function X(t,e){if(!e)return t;for(var n,r,i,o=Object.keys(e),a=0;a<o.length;a++)n=o[a],r=t[n],i=e[n],m(t,n)?r!==i&&u(r)&&u(i)&&X(r,i):B(t,n,i);return t}function z(t,e,n){return n?function(){var r="function"==typeof e?e.call(n,n):e,i="function"==typeof t?t.call(n,n):t;return r?X(r,i):i}:e?t?function(){return X("function"==typeof e?e.call(this,this):e,"function"==typeof t?t.call(this,this):t)}:e:t}function Y(t,e){var n=e?t?t.concat(e):Array.isArray(e)?e:[e]:t;return n?q(n):n}function q(t){for(var e=[],n=0;n<t.length;n++)-1===e.indexOf(t[n])&&e.push(t[n]);return e}function V(t,e,n,r){var i=Object.create(t||null);return e?x(i,e):i}function W(t,e){var n=t.props;if(n){var r,i,o,a={};if(Array.isArray(n))for(r=n.length;r--;)"string"==typeof(i=n[r])&&(o=yo(i),a[o]={type:null});else if(u(n))for(var s in n)i=n[s],o=yo(s),a[o]=u(i)?i:{type:i};t.props=a}}function G(t,e){var n=t.inject;if(n){var r=t.inject={};if(Array.isArray(n))for(var i=0;i<n.length;i++)r[n[i]]={from:n[i]};else if(u(n))for(var o in n){var a=n[o];r[o]=u(a)?x({from:o},a):{from:a}}}}function K(t){var e=t.directives;if(e)for(var n in e){var r=e[n];"function"==typeof r&&(e[n]={bind:r,update:r})}}function J(t,e,n){function r(r){var i=ia[r]||sa;s[r]=i(t[r],e[r],n,r)}if("function"==typeof e&&(e=e.options),W(e,n),G(e,n),K(e),!e._base&&(e.extends&&(t=J(t,e.extends,n)),e.mixins))for(var i=0,o=e.mixins.length;i<o;i++)t=J(t,e.mixins[i],n);var a,s={};for(a in t)r(a);for(a in e)m(t,a)||r(a);return s}function Q(t,e,n,r){if("string"==typeof n){var i=t[e];if(m(i,n))return i[n];var o=yo(n);if(m(i,o))return i[o];var a=go(o);return m(i,a)?i[a]:i[n]||i[o]||i[a]}}function Z(t,e,n,r){var i=e[t],o=!m(n,t),a=n[t],s=rt(Boolean,i.type);if(s>-1)if(o&&!m(i,"default"))a=!1;else if(""===a||a===wo(t)){var c=rt(String,i.type);(c<0||s<c)&&(a=!0)}if(void 0===a){a=tt(r,i,t);var u=na;I(!0),R(a),I(u)}return a}function tt(t,e,n){if(m(e,"default")){var r=e.default;return t&&t.$options.propsData&&void 0===t.$options.propsData[n]&&void 0!==t._props[n]?t._props[n]:"function"==typeof r&&"Function"!==et(e.type)?r.call(t):r}}function et(t){var e=t&&t.toString().match(/^\s*function (\w+)/);return e?e[1]:""}function nt(t,e){return et(t)===et(e)}function rt(t,e){if(!Array.isArray(e))return nt(e,t)?0:-1;for(var n=0,r=e.length;n<r;n++)if(nt(e[n],t))return n;return-1}function it(t,e,n){if(e)for(var r=e;r=r.$parent;){var i=r.$options.errorCaptured;if(i)for(var o=0;o<i.length;o++)try{var a=!1===i[o].call(r,t,e,n);if(a)return}catch(t){ot(t,r,"errorCaptured hook")}}ot(t,e,n)}function ot(t,e,n){if(Co.errorHandler)try{return Co.errorHandler.call(null,t,e,n)}catch(t){at(t,null,"config.errorHandler")}at(t,e,n)}function at(t,e,n){if(!Po&&!jo||"undefined"==typeof console)throw t;console.error(t)}function st(){ua=!1;var t=ca.slice(0);ca.length=0;for(var e=0;e<t.length;e++)t[e]()}function ct(t){return t._withTask||(t._withTask=function(){la=!0;try{return t.apply(null,arguments)}finally{la=!1}})}function ut(t,e){var n;if(ca.push(function(){if(t)try{t.call(e)}catch(t){it(t,e,"nextTick")}else n&&n(e)}),ua||(ua=!0,la?aa():oa()),!t&&"undefined"!=typeof Promise)return new Promise(function(t){n=t})}function lt(t){pt(t,va),va.clear()}function pt(t,e){var n,r,i=Array.isArray(t);if(!(!i&&!c(t)||Object.isFrozen(t)||t instanceof Ko)){if(t.__ob__){var o=t.__ob__.dep.id;if(e.has(o))return;e.add(o)}if(i)for(n=t.length;n--;)pt(t[n],e);else for(r=Object.keys(t),n=r.length;n--;)pt(t[r[n]],e)}}function ft(t){function e(){var t=arguments,n=e.fns;if(!Array.isArray(n))return n.apply(null,arguments);for(var r=n.slice(),i=0;i<r.length;i++)r[i].apply(null,t)}return e.fns=t,e}function dt(t,e,n,i,a,s){var c,u,l,p;for(c in t)u=t[c],l=e[c],p=ma(c),r(u)||(r(l)?(r(u.fns)&&(u=t[c]=ft(u)),o(p.once)&&(u=t[c]=a(p.name,u,p.capture)),n(p.name,u,p.capture,p.passive,p.params)):u!==l&&(l.fns=u,t[c]=l));for(c in e)r(t[c])&&(p=ma(c),i(p.name,e[c],p.capture))}function ht(t,e,n){function a(){n.apply(this,arguments),v(s.fns,a)}t instanceof Ko&&(t=t.data.hook||(t.data.hook={}));var s,c=t[e];r(c)?s=ft([a]):i(c.fns)&&o(c.merged)?(s=c,s.fns.push(a)):s=ft([c,a]),s.merged=!0,t[e]=s}function vt(t,e,n){var o=e.options.props;if(!r(o)){var a={},s=t.attrs,c=t.props;if(i(s)||i(c))for(var u in o){var l=wo(u);mt(a,c,u,l,!0)||mt(a,s,u,l,!1)}return a}}function mt(t,e,n,r,o){if(i(e)){if(m(e,n))return t[n]=e[n],o||delete e[n],!0;if(m(e,r))return t[n]=e[r],o||delete e[r],!0}return!1}function yt(t){for(var e=0;e<t.length;e++)if(Array.isArray(t[e]))return Array.prototype.concat.apply([],t);return t}function gt(t){return s(t)?[M(t)]:Array.isArray(t)?wt(t):void 0}function bt(t){return i(t)&&i(t.text)&&a(t.isComment)}function wt(t,e){var n,a,c,u,l=[];for(n=0;n<t.length;n++)a=t[n],r(a)||"boolean"==typeof a||(c=l.length-1,u=l[c],Array.isArray(a)?a.length>0&&(a=wt(a,(e||"")+"_"+n),bt(a[0])&&bt(u)&&(l[c]=M(u.text+a[0].text),a.shift()),l.push.apply(l,a)):s(a)?bt(u)?l[c]=M(u.text+a):""!==a&&l.push(M(a)):bt(a)&&bt(u)?l[c]=M(u.text+a.text):(o(t._isVList)&&i(a.tag)&&r(a.key)&&i(e)&&(a.key="__vlist"+e+"_"+n+"__"),l.push(a)));return l}function xt(t,e){return(t.__esModule||Yo&&"Module"===t[Symbol.toStringTag])&&(t=t.default),c(t)?e.extend(t):t}function _t(t,e,n,r,i){var o=Qo();return o.asyncFactory=t,o.asyncMeta={data:e,context:n,children:r,tag:i},o}function kt(t,e,n){if(o(t.error)&&i(t.errorComp))return t.errorComp;if(i(t.resolved))return t.resolved;if(o(t.loading)&&i(t.loadingComp))return t.loadingComp;if(!i(t.contexts)){var a=t.contexts=[n],s=!0,u=function(t){for(var e=0,n=a.length;e<n;e++)a[e].$forceUpdate();t&&(a.length=0)},l=E(function(n){t.resolved=xt(n,e),s?a.length=0:u(!0)}),p=E(function(e){i(t.errorComp)&&(t.error=!0,u(!0))}),f=t(l,p);return c(f)&&("function"==typeof f.then?r(t.resolved)&&f.then(l,p):i(f.component)&&"function"==typeof f.component.then&&(f.component.then(l,p),i(f.error)&&(t.errorComp=xt(f.error,e)),i(f.loading)&&(t.loadingComp=xt(f.loading,e),0===f.delay?t.loading=!0:setTimeout(function(){r(t.resolved)&&r(t.error)&&(t.loading=!0,u(!1))},f.delay||200)),i(f.timeout)&&setTimeout(function(){r(t.resolved)&&p(null)},f.timeout))),s=!1,t.loading?t.loadingComp:t.resolved}t.contexts.push(n)}function Tt(t){return t.isComment&&t.asyncFactory}function Ot(t){if(Array.isArray(t))for(var e=0;e<t.length;e++){var n=t[e];if(i(n)&&(i(n.componentOptions)||Tt(n)))return n}}function Et(t){t._events=Object.create(null),t._hasHookEvent=!1;var e=t.$options._parentListeners;e&&Pt(t,e)}function Ct(t,e){ha.$on(t,e)}function At(t,e){ha.$off(t,e)}function St(t,e){var n=ha;return function r(){null!==e.apply(null,arguments)&&n.$off(t,r)}}function Pt(t,e,n){ha=t,dt(e,n||{},Ct,At,St,t),ha=void 0}function jt(t,e){var n={};if(!t)return n;for(var r=0,i=t.length;r<i;r++){var o=t[r],a=o.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,o.context!==e&&o.fnContext!==e||!a||null==a.slot)(n.default||(n.default=[])).push(o);else{var s=a.slot,c=n[s]||(n[s]=[]);"template"===o.tag?c.push.apply(c,o.children||[]):c.push(o)}}for(var u in n)n[u].every(Lt)&&delete n[u];return n}function Lt(t){return t.isComment&&!t.asyncFactory||" "===t.text}function Mt(t,e){e=e||{};for(var n=0;n<t.length;n++)Array.isArray(t[n])?Mt(t[n],e):e[t[n].key]=t[n].fn;return e}function $t(t){var e=ya;return ya=t,function(){ya=e}}function It(t){var e=t.$options,n=e.parent;if(n&&!e.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(t)}t.$parent=n,t.$root=n?n.$root:t,t.$children=[],t.$refs={},t._watcher=null,t._inactive=null,t._directInactive=!1,t._isMounted=!1,t._isDestroyed=!1,t._isBeingDestroyed=!1}function Nt(t,e,n){t.$el=e,t.$options.render||(t.$options.render=Qo),Ut(t,"beforeMount");var r;return r=function(){t._update(t._render(),n)},new Oa(t,r,k,{before:function(){t._isMounted&&!t._isDestroyed&&Ut(t,"beforeUpdate")}},!0),n=!1,null==t.$vnode&&(t._isMounted=!0,Ut(t,"mounted")),t}function Dt(t,e,n,r,i){var o=!!(i||t.$options._renderChildren||r.data.scopedSlots||t.$scopedSlots!==lo);if(t.$options._parentVnode=r,t.$vnode=r,t._vnode&&(t._vnode.parent=r),t.$options._renderChildren=i,t.$attrs=r.data.attrs||lo,t.$listeners=n||lo,e&&t.$options.props){I(!1);for(var a=t._props,s=t.$options._propKeys||[],c=0;c<s.length;c++){var u=s[c],l=t.$options.props;a[u]=Z(u,l,e,t)}I(!0),t.$options.propsData=e}n=n||lo;var p=t.$options._parentListeners;t.$options._parentListeners=n,Pt(t,n,p),o&&(t.$slots=jt(i,r.context),t.$forceUpdate())}function Rt(t){for(;t&&(t=t.$parent);)if(t._inactive)return!0;return!1}function Ft(t,e){if(e){if(t._directInactive=!1,Rt(t))return}else if(t._directInactive)return;if(t._inactive||null===t._inactive){t._inactive=!1;for(var n=0;n<t.$children.length;n++)Ft(t.$children[n]);Ut(t,"activated")}}function Bt(t,e){if(!(e&&(t._directInactive=!0,Rt(t))||t._inactive)){t._inactive=!0;for(var n=0;n<t.$children.length;n++)Bt(t.$children[n]);Ut(t,"deactivated")}}function Ut(t,e){j();var n=t.$options[e];if(n)for(var r=0,i=n.length;r<i;r++)try{n[r].call(t)}catch(n){it(n,t,e+" hook")}t._hasHookEvent&&t.$emit("hook:"+e),L()}function Ht(){ka=ga.length=ba.length=0,wa={},xa=_a=!1}function Xt(){_a=!0;var t,e;for(ga.sort(function(t,e){return t.id-e.id}),ka=0;ka<ga.length;ka++)t=ga[ka],t.before&&t.before(),e=t.id,wa[e]=null,t.run();var n=ba.slice(),r=ga.slice();Ht(),qt(n),zt(r),zo&&Co.devtools&&zo.emit("flush")}function zt(t){for(var e=t.length;e--;){var n=t[e],r=n.vm;r._watcher===n&&r._isMounted&&!r._isDestroyed&&Ut(r,"updated")}}function Yt(t){t._inactive=!1,ba.push(t)}function qt(t){for(var e=0;e<t.length;e++)t[e]._inactive=!0,Ft(t[e],!0)}function Vt(t){var e=t.id;if(null==wa[e]){if(wa[e]=!0,_a){for(var n=ga.length-1;n>ka&&ga[n].id>t.id;)n--;ga.splice(n+1,0,t)}else ga.push(t);xa||(xa=!0,ut(Xt))}}function Wt(t,e,n){Ea.get=function(){return this[e][n]},Ea.set=function(t){this[e][n]=t},Object.defineProperty(t,n,Ea)}function Gt(t){t._watchers=[];var e=t.$options;e.props&&Kt(t,e.props),e.methods&&re(t,e.methods),e.data?Jt(t):R(t._data={},!0),e.computed&&Zt(t,e.computed),e.watch&&e.watch!==Ro&&ie(t,e.watch)}function Kt(t,e){var n=t.$options.propsData||{},r=t._props={},i=t.$options._propKeys=[];!t.$parent||I(!1);for(var o in e)!function(o){i.push(o);var a=Z(o,e,n,t);F(r,o,a),o in t||Wt(t,"_props",o)}(o);I(!0)}function Jt(t){var e=t.$options.data;e=t._data="function"==typeof e?Qt(e,t):e||{},u(e)||(e={});for(var n=Object.keys(e),r=t.$options.props,i=(t.$options.methods,n.length);i--;){var o=n[i];r&&m(r,o)||C(o)||Wt(t,"_data",o)}R(e,!0)}function Qt(t,e){j();try{return t.call(e,e)}catch(t){return it(t,e,"data()"),{}}finally{L()}}function Zt(t,e){var n=t._computedWatchers=Object.create(null),r=Xo();for(var i in e){var o=e[i],a="function"==typeof o?o:o.get;r||(n[i]=new Oa(t,a||k,k,Ca)),i in t||te(t,i,o)}}function te(t,e,n){var r=!Xo();"function"==typeof n?(Ea.get=r?ee(e):ne(n),Ea.set=k):(Ea.get=n.get?r&&!1!==n.cache?ee(e):ne(n.get):k,Ea.set=n.set||k),Object.defineProperty(t,e,Ea)}function ee(t){return function(){var e=this._computedWatchers&&this._computedWatchers[t];if(e)return e.dirty&&e.evaluate(),Wo.target&&e.depend(),e.value}}function ne(t){return function(){return t.call(this,this)}}function re(t,e){t.$options.props;for(var n in e)t[n]="function"!=typeof e[n]?k:xo(e[n],t)}function ie(t,e){for(var n in e){var r=e[n];if(Array.isArray(r))for(var i=0;i<r.length;i++)oe(t,n,r[i]);else oe(t,n,r)}}function oe(t,e,n,r){return u(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=t[n]),t.$watch(e,n,r)}function ae(t){var e=t.$options.provide;e&&(t._provided="function"==typeof e?e.call(t):e)}function se(t){var e=ce(t.$options.inject,t);e&&(I(!1),Object.keys(e).forEach(function(n){F(t,n,e[n])}),I(!0))}function ce(t,e){if(t){for(var n=Object.create(null),r=Yo?Reflect.ownKeys(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}):Object.keys(t),i=0;i<r.length;i++){for(var o=r[i],a=t[o].from,s=e;s;){if(s._provided&&m(s._provided,a)){n[o]=s._provided[a];break}s=s.$parent}if(!s&&"default"in t[o]){var c=t[o].default;n[o]="function"==typeof c?c.call(e):c}}return n}}function ue(t,e){var n,r,o,a,s;if(Array.isArray(t)||"string"==typeof t)for(n=new Array(t.length),r=0,o=t.length;r<o;r++)n[r]=e(t[r],r);else if("number"==typeof t)for(n=new Array(t),r=0;r<t;r++)n[r]=e(r+1,r);else if(c(t))for(a=Object.keys(t),n=new Array(a.length),r=0,o=a.length;r<o;r++)s=a[r],n[r]=e(t[s],s,r);return i(n)||(n=[]),n._isVList=!0,n}function le(t,e,n,r){var i,o=this.$scopedSlots[t];o?(n=n||{},r&&(n=x(x({},r),n)),i=o(n)||e):i=this.$slots[t]||e;var a=n&&n.slot;return a?this.$createElement("template",{slot:a},i):i}function pe(t){return Q(this.$options,"filters",t,!0)||ko}function fe(t,e){return Array.isArray(t)?-1===t.indexOf(e):t!==e}function de(t,e,n,r,i){var o=Co.keyCodes[e]||n;return i&&r&&!Co.keyCodes[e]?fe(i,r):o?fe(o,t):r?wo(r)!==e:void 0}function he(t,e,n,r,i){if(n&&c(n)){Array.isArray(n)&&(n=_(n));var o;for(var a in n)!function(a){if("class"===a||"style"===a||ho(a))o=t;else{var s=t.attrs&&t.attrs.type;o=r||Co.mustUseProp(e,s,a)?t.domProps||(t.domProps={}):t.attrs||(t.attrs={})}var c=yo(a);a in o||c in o||(o[a]=n[a],!i)||((t.on||(t.on={}))["update:"+c]=function(t){n[a]=t})}(a)}return t}function ve(t,e){var n=this._staticTrees||(this._staticTrees=[]),r=n[t];return r&&!e?r:(r=n[t]=this.$options.staticRenderFns[t].call(this._renderProxy,null,this),ye(r,"__static__"+t,!1),r)}function me(t,e,n){return ye(t,"__once__"+e+(n?"_"+n:""),!0),t}function ye(t,e,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)t[r]&&"string"!=typeof t[r]&&ge(t[r],e+"_"+r,n);else ge(t,e,n)}function ge(t,e,n){t.isStatic=!0,t.key=e,t.isOnce=n}function be(t,e){if(e&&u(e)){var n=t.on=t.on?x({},t.on):{};for(var r in e){var i=n[r],o=e[r];n[r]=i?[].concat(i,o):o}}return t}function we(t){t._o=me,t._n=d,t._s=f,t._l=ue,t._t=le,t._q=T,t._i=O,t._m=ve,t._f=pe,t._k=de,t._b=he,t._v=M,t._e=Qo,t._u=Mt,t._g=be}function xe(t,e,n,r,i){var a,s=i.options;m(r,"_uid")?(a=Object.create(r),a._original=r):(a=r,r=r._original);var c=o(s._compiled),u=!c;this.data=t,this.props=e,this.children=n,this.parent=r,this.listeners=t.on||lo,this.injections=ce(s.inject,r),this.slots=function(){return jt(n,r)},c&&(this.$options=s,this.$slots=this.slots(),this.$scopedSlots=t.scopedSlots||lo),s._scopeId?this._c=function(t,e,n,i){var o=Pe(a,t,e,n,i,u);return o&&!Array.isArray(o)&&(o.fnScopeId=s._scopeId,o.fnContext=r),o}:this._c=function(t,e,n,r){return Pe(a,t,e,n,r,u)}}function _e(t,e,n,r,o){var a=t.options,s={},c=a.props;if(i(c))for(var u in c)s[u]=Z(u,c,e||lo);else i(n.attrs)&&Te(s,n.attrs),i(n.props)&&Te(s,n.props);var l=new xe(n,s,o,r,t),p=a.render.call(null,l._c,l);if(p instanceof Ko)return ke(p,n,l.parent,a,l);if(Array.isArray(p)){for(var f=gt(p)||[],d=new Array(f.length),h=0;h<f.length;h++)d[h]=ke(f[h],n,l.parent,a,l);return d}}function ke(t,e,n,r,i){var o=$(t);return o.fnContext=n,o.fnOptions=r,e.slot&&((o.data||(o.data={})).slot=e.slot),o}function Te(t,e){for(var n in e)t[yo(n)]=e[n]}function Oe(t,e,n,a,s){if(!r(t)){var u=n.$options._base;if(c(t)&&(t=u.extend(t)),"function"==typeof t){var l;if(r(t.cid)&&(l=t,void 0===(t=kt(l,u,n))))return _t(l,e,n,a,s);e=e||{},Ne(t),i(e.model)&&Se(t.options,e);var p=vt(e,t,s);if(o(t.options.functional))return _e(t,p,e,n,a);var f=e.on;if(e.on=e.nativeOn,o(t.options.abstract)){var d=e.slot;e={},d&&(e.slot=d)}Ce(e);var h=t.options.name||s;return new Ko("vue-component-"+t.cid+(h?"-"+h:""),e,void 0,void 0,void 0,n,{Ctor:t,propsData:p,listeners:f,tag:s,children:a},l)}}}function Ee(t,e){var n={_isComponent:!0,_parentVnode:t,parent:e},r=t.data.inlineTemplate;return i(r)&&(n.render=r.render,n.staticRenderFns=r.staticRenderFns),new t.componentOptions.Ctor(n)}function Ce(t){for(var e=t.hook||(t.hook={}),n=0;n<Sa.length;n++){var r=Sa[n],i=e[r],o=Aa[r];i===o||i&&i._merged||(e[r]=i?Ae(o,i):o)}}function Ae(t,e){var n=function(n,r){t(n,r),e(n,r)};return n._merged=!0,n}function Se(t,e){var n=t.model&&t.model.prop||"value",r=t.model&&t.model.event||"input";(e.props||(e.props={}))[n]=e.model.value;var o=e.on||(e.on={}),a=o[r],s=e.model.callback;i(a)?(Array.isArray(a)?-1===a.indexOf(s):a!==s)&&(o[r]=[s].concat(a)):o[r]=s}function Pe(t,e,n,r,i,a){return(Array.isArray(n)||s(n))&&(i=r,r=n,n=void 0),o(a)&&(i=ja),je(t,e,n,r,i)}function je(t,e,n,r,o){if(i(n)&&i(n.__ob__))return Qo();if(i(n)&&i(n.is)&&(e=n.is),!e)return Qo();Array.isArray(r)&&"function"==typeof r[0]&&(n=n||{},n.scopedSlots={default:r[0]},r.length=0),o===ja?r=gt(r):o===Pa&&(r=yt(r));var a,s;if("string"==typeof e){var c;s=t.$vnode&&t.$vnode.ns||Co.getTagNamespace(e),a=Co.isReservedTag(e)?new Ko(Co.parsePlatformTagName(e),n,r,void 0,void 0,t):n&&n.pre||!i(c=Q(t.$options,"components",e))?new Ko(e,n,r,void 0,void 0,t):Oe(c,n,t,r,e)}else a=Oe(e,n,t,r);return Array.isArray(a)?a:i(a)?(i(s)&&Le(a,s),i(n)&&Me(n),a):Qo()}function Le(t,e,n){if(t.ns=e,"foreignObject"===t.tag&&(e=void 0,n=!0),i(t.children))for(var a=0,s=t.children.length;a<s;a++){var c=t.children[a];i(c.tag)&&(r(c.ns)||o(n)&&"svg"!==c.tag)&&Le(c,e,n)}}function Me(t){c(t.style)&&lt(t.style),c(t.class)&&lt(t.class)}function $e(t){t._vnode=null,t._staticTrees=null;var e=t.$options,n=t.$vnode=e._parentVnode,r=n&&n.context;t.$slots=jt(e._renderChildren,r),t.$scopedSlots=lo,t._c=function(e,n,r,i){return Pe(t,e,n,r,i,!1)},t.$createElement=function(e,n,r,i){return Pe(t,e,n,r,i,!0)};var i=n&&n.data;F(t,"$attrs",i&&i.attrs||lo,null,!0),F(t,"$listeners",e._parentListeners||lo,null,!0)}function Ie(t,e){var n=t.$options=Object.create(t.constructor.options),r=e._parentVnode;n.parent=e.parent,n._parentVnode=r;var i=r.componentOptions;n.propsData=i.propsData,n._parentListeners=i.listeners,n._renderChildren=i.children,n._componentTag=i.tag,e.render&&(n.render=e.render,n.staticRenderFns=e.staticRenderFns)}function Ne(t){var e=t.options;if(t.super){var n=Ne(t.super);if(n!==t.superOptions){t.superOptions=n;var r=De(t);r&&x(t.extendOptions,r),e=t.options=J(n,t.extendOptions),e.name&&(e.components[e.name]=t)}}return e}function De(t){var e,n=t.options,r=t.sealedOptions;for(var i in n)n[i]!==r[i]&&(e||(e={}),e[i]=n[i]);return e}function Re(t){this._init(t)}function Fe(t){t.use=function(t){var e=this._installedPlugins||(this._installedPlugins=[]);if(e.indexOf(t)>-1)return this;var n=w(arguments,1);return n.unshift(this),"function"==typeof t.install?t.install.apply(t,n):"function"==typeof t&&t.apply(null,n),e.push(t),this}}function Be(t){t.mixin=function(t){return this.options=J(this.options,t),this}}function Ue(t){t.cid=0;var e=1;t.extend=function(t){t=t||{};var n=this,r=n.cid,i=t._Ctor||(t._Ctor={});if(i[r])return i[r];var o=t.name||n.options.name,a=function(t){this._init(t)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=e++,a.options=J(n.options,t),a.super=n,a.options.props&&He(a),a.options.computed&&Xe(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,Oo.forEach(function(t){a[t]=n[t]}),o&&(a.options.components[o]=a),a.superOptions=n.options,a.extendOptions=t,a.sealedOptions=x({},a.options),i[r]=a,a}}function He(t){var e=t.options.props;for(var n in e)Wt(t.prototype,"_props",n)}function Xe(t){var e=t.options.computed;for(var n in e)te(t.prototype,n,e[n])}function ze(t){Oo.forEach(function(e){t[e]=function(t,n){return n?("component"===e&&u(n)&&(n.name=n.name||t,n=this.options._base.extend(n)),"directive"===e&&"function"==typeof n&&(n={bind:n,update:n}),this.options[e+"s"][t]=n,n):this.options[e+"s"][t]}})}function Ye(t){return t&&(t.Ctor.options.name||t.tag)}function qe(t,e){return Array.isArray(t)?t.indexOf(e)>-1:"string"==typeof t?t.split(",").indexOf(e)>-1:!!l(t)&&t.test(e)}function Ve(t,e){var n=t.cache,r=t.keys,i=t._vnode;for(var o in n){var a=n[o];if(a){var s=Ye(a.componentOptions);s&&!e(s)&&We(n,o,r,i)}}}function We(t,e,n,r){var i=t[e];!i||r&&i.tag===r.tag||i.componentInstance.$destroy(),t[e]=null,v(n,e)}function Ge(t){for(var e=t.data,n=t,r=t;i(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(e=Ke(r.data,e));for(;i(n=n.parent);)n&&n.data&&(e=Ke(e,n.data));return Je(e.staticClass,e.class)}function Ke(t,e){return{staticClass:Qe(t.staticClass,e.staticClass),class:i(t.class)?[t.class,e.class]:e.class}}function Je(t,e){return i(t)||i(e)?Qe(t,Ze(e)):""}function Qe(t,e){return t?e?t+" "+e:t:e||""}function Ze(t){return Array.isArray(t)?tn(t):c(t)?en(t):"string"==typeof t?t:""}function tn(t){for(var e,n="",r=0,o=t.length;r<o;r++)i(e=Ze(t[r]))&&""!==e&&(n&&(n+=" "),n+=e);return n}function en(t){var e="";for(var n in t)t[n]&&(e&&(e+=" "),e+=n);return e}function nn(t){return ns(t)?"svg":"math"===t?"math":void 0}function rn(t){if(!Po)return!0;if(is(t))return!1;if(t=t.toLowerCase(),null!=os[t])return os[t];var e=document.createElement(t);return t.indexOf("-")>-1?os[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:os[t]=/HTMLUnknownElement/.test(e.toString())}function on(t){if("string"==typeof t){return document.querySelector(t)||document.createElement("div")}return t}function an(t,e){var n=document.createElement(t);return"select"!==t?n:(e.data&&e.data.attrs&&void 0!==e.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function sn(t,e){return document.createElementNS(ts[t],e)}function cn(t){return document.createTextNode(t)}function un(t){return document.createComment(t)}function ln(t,e,n){t.insertBefore(e,n)}function pn(t,e){t.removeChild(e)}function fn(t,e){t.appendChild(e)}function dn(t){return t.parentNode}function hn(t){return t.nextSibling}function vn(t){return t.tagName}function mn(t,e){t.textContent=e}function yn(t,e){t.setAttribute(e,"")}function gn(t,e){var n=t.data.ref;if(i(n)){var r=t.context,o=t.componentInstance||t.elm,a=r.$refs;e?Array.isArray(a[n])?v(a[n],o):a[n]===o&&(a[n]=void 0):t.data.refInFor?Array.isArray(a[n])?a[n].indexOf(o)<0&&a[n].push(o):a[n]=[o]:a[n]=o}}function bn(t,e){return t.key===e.key&&(t.tag===e.tag&&t.isComment===e.isComment&&i(t.data)===i(e.data)&&wn(t,e)||o(t.isAsyncPlaceholder)&&t.asyncFactory===e.asyncFactory&&r(e.asyncFactory.error))}function wn(t,e){if("input"!==t.tag)return!0;var n,r=i(n=t.data)&&i(n=n.attrs)&&n.type,o=i(n=e.data)&&i(n=n.attrs)&&n.type;return r===o||as(r)&&as(o)}function xn(t,e,n){var r,o,a={};for(r=e;r<=n;++r)o=t[r].key,i(o)&&(a[o]=r);return a}function _n(t,e){(t.data.directives||e.data.directives)&&kn(t,e)}function kn(t,e){var n,r,i,o=t===us,a=e===us,s=Tn(t.data.directives,t.context),c=Tn(e.data.directives,e.context),u=[],l=[];for(n in c)r=s[n],i=c[n],r?(i.oldValue=r.value,En(i,"update",e,t),i.def&&i.def.componentUpdated&&l.push(i)):(En(i,"bind",e,t),i.def&&i.def.inserted&&u.push(i));if(u.length){var p=function(){for(var n=0;n<u.length;n++)En(u[n],"inserted",e,t)};o?ht(e,"insert",p):p()}if(l.length&&ht(e,"postpatch",function(){for(var n=0;n<l.length;n++)En(l[n],"componentUpdated",e,t)}),!o)for(n in s)c[n]||En(s[n],"unbind",t,t,a)}function Tn(t,e){var n=Object.create(null);if(!t)return n;var r,i;for(r=0;r<t.length;r++)i=t[r],i.modifiers||(i.modifiers=fs),n[On(i)]=i,i.def=Q(e.$options,"directives",i.name,!0);return n}function On(t){return t.rawName||t.name+"."+Object.keys(t.modifiers||{}).join(".")}function En(t,e,n,r,i){var o=t.def&&t.def[e];if(o)try{o(n.elm,t,n,r,i)}catch(r){it(r,n.context,"directive "+t.name+" "+e+" hook")}}function Cn(t,e){var n=e.componentOptions;if(!(i(n)&&!1===n.Ctor.options.inheritAttrs||r(t.data.attrs)&&r(e.data.attrs))){var o,a,s=e.elm,c=t.data.attrs||{},u=e.data.attrs||{};i(u.__ob__)&&(u=e.data.attrs=x({},u));for(o in u)a=u[o],c[o]!==a&&An(s,o,a);($o||No)&&u.value!==c.value&&An(s,"value",u.value);for(o in c)r(u[o])&&(Ja(o)?s.removeAttributeNS(Ka,Qa(o)):Wa(o)||s.removeAttribute(o))}}function An(t,e,n){t.tagName.indexOf("-")>-1?Sn(t,e,n):Ga(e)?Za(n)?t.removeAttribute(e):(n="allowfullscreen"===e&&"EMBED"===t.tagName?"true":e,t.setAttribute(e,n)):Wa(e)?t.setAttribute(e,Za(n)||"false"===n?"false":"true"):Ja(e)?Za(n)?t.removeAttributeNS(Ka,Qa(e)):t.setAttributeNS(Ka,e,n):Sn(t,e,n)}function Sn(t,e,n){if(Za(n))t.removeAttribute(e);else{if($o&&!Io&&("TEXTAREA"===t.tagName||"INPUT"===t.tagName)&&"placeholder"===e&&!t.__ieph){var r=function(e){e.stopImmediatePropagation(),t.removeEventListener("input",r)};t.addEventListener("input",r),t.__ieph=!0}t.setAttribute(e,n)}}function Pn(t,e){var n=e.elm,o=e.data,a=t.data;if(!(r(o.staticClass)&&r(o.class)&&(r(a)||r(a.staticClass)&&r(a.class)))){var s=Ge(e),c=n._transitionClasses;i(c)&&(s=Qe(s,Ze(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}function jn(t){function e(){(a||(a=[])).push(t.slice(h,i).trim()),h=i+1}var n,r,i,o,a,s=!1,c=!1,u=!1,l=!1,p=0,f=0,d=0,h=0;for(i=0;i<t.length;i++)if(r=n,n=t.charCodeAt(i),s)39===n&&92!==r&&(s=!1);else if(c)34===n&&92!==r&&(c=!1);else if(u)96===n&&92!==r&&(u=!1);else if(l)47===n&&92!==r&&(l=!1);else if(124!==n||124===t.charCodeAt(i+1)||124===t.charCodeAt(i-1)||p||f||d){switch(n){case 34:c=!0;break;case 39:s=!0;break;case 96:u=!0;break;case 40:d++;break;case 41:d--;break;case 91:f++;break;case 93:f--;break;case 123:p++;break;case 125:p--}if(47===n){for(var v=i-1,m=void 0;v>=0&&" "===(m=t.charAt(v));v--);m&&ms.test(m)||(l=!0)}}else void 0===o?(h=i+1,o=t.slice(0,i).trim()):e();if(void 0===o?o=t.slice(0,i).trim():0!==h&&e(),a)for(i=0;i<a.length;i++)o=Ln(o,a[i]);return o}function Ln(t,e){var n=e.indexOf("(");if(n<0)return'_f("'+e+'")('+t+")";var r=e.slice(0,n),i=e.slice(n+1);return'_f("'+r+'")('+t+(")"!==i?","+i:i)}function Mn(t){console.error("[Vue compiler]: "+t)}function $n(t,e){return t?t.map(function(t){return t[e]}).filter(function(t){return t}):[]}function In(t,e,n){(t.props||(t.props=[])).push({name:e,value:n}),t.plain=!1}function Nn(t,e,n){(t.attrs||(t.attrs=[])).push({name:e,value:n}),t.plain=!1}function Dn(t,e,n){t.attrsMap[e]=n,t.attrsList.push({name:e,value:n})}function Rn(t,e,n,r,i,o){(t.directives||(t.directives=[])).push({name:e,rawName:n,value:r,arg:i,modifiers:o}),t.plain=!1}function Fn(t,e,n,r,i,o){r=r||lo,"click"===e&&(r.right?(e="contextmenu",delete r.right):r.middle&&(e="mouseup")),r.capture&&(delete r.capture,e="!"+e),r.once&&(delete r.once,e="~"+e),r.passive&&(delete r.passive,e="&"+e);var a;r.native?(delete r.native,a=t.nativeEvents||(t.nativeEvents={})):a=t.events||(t.events={});var s={value:n.trim()};r!==lo&&(s.modifiers=r);var c=a[e];Array.isArray(c)?i?c.unshift(s):c.push(s):a[e]=c?i?[s,c]:[c,s]:s,t.plain=!1}function Bn(t,e,n){var r=Un(t,":"+e)||Un(t,"v-bind:"+e);if(null!=r)return jn(r);if(!1!==n){var i=Un(t,e);if(null!=i)return JSON.stringify(i)}}function Un(t,e,n){var r;if(null!=(r=t.attrsMap[e]))for(var i=t.attrsList,o=0,a=i.length;o<a;o++)if(i[o].name===e){i.splice(o,1);break}return n&&delete t.attrsMap[e],r}function Hn(t,e,n){var r=n||{},i=r.number,o=r.trim,a="$$v";o&&(a="(typeof $$v === 'string'? $$v.trim(): $$v)"),i&&(a="_n("+a+")");var s=Xn(e,a);t.model={value:"("+e+")",expression:JSON.stringify(e),callback:"function ($$v) {"+s+"}"}}function Xn(t,e){var n=zn(t);return null===n.key?t+"="+e:"$set("+n.exp+", "+n.key+", "+e+")"}function zn(t){if(t=t.trim(),Na=t.length,t.indexOf("[")<0||t.lastIndexOf("]")<Na-1)return Fa=t.lastIndexOf("."),Fa>-1?{exp:t.slice(0,Fa),key:'"'+t.slice(Fa+1)+'"'}:{exp:t,key:null};for(Da=t,Fa=Ba=Ua=0;!qn();)Ra=Yn(),Vn(Ra)?Gn(Ra):91===Ra&&Wn(Ra);return{exp:t.slice(0,Ba),key:t.slice(Ba+1,Ua)}}function Yn(){return Da.charCodeAt(++Fa)}function qn(){return Fa>=Na}function Vn(t){return 34===t||39===t}function Wn(t){var e=1;for(Ba=Fa;!qn();)if(t=Yn(),Vn(t))Gn(t);else if(91===t&&e++,93===t&&e--,0===e){Ua=Fa;break}}function Gn(t){for(var e=t;!qn()&&(t=Yn())!==e;);}function Kn(t,e,n){Ha=n;var r=e.value,i=e.modifiers,o=t.tag,a=t.attrsMap.type;if(t.component)return Hn(t,r,i),!1;if("select"===o)Zn(t,r,i);else if("input"===o&&"checkbox"===a)Jn(t,r,i);else if("input"===o&&"radio"===a)Qn(t,r,i);else if("input"===o||"textarea"===o)tr(t,r,i);else if(!Co.isReservedTag(o))return Hn(t,r,i),!1;return!0}function Jn(t,e,n){var r=n&&n.number,i=Bn(t,"value")||"null",o=Bn(t,"true-value")||"true",a=Bn(t,"false-value")||"false";In(t,"checked","Array.isArray("+e+")?_i("+e+","+i+")>-1"+("true"===o?":("+e+")":":_q("+e+","+o+")")),Fn(t,"change","var $$a="+e+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Xn(e,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Xn(e,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Xn(e,"$$c")+"}",null,!0)}function Qn(t,e,n){var r=n&&n.number,i=Bn(t,"value")||"null";i=r?"_n("+i+")":i,In(t,"checked","_q("+e+","+i+")"),Fn(t,"change",Xn(e,i),null,!0)}function Zn(t,e,n){var r=n&&n.number,i='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(r?"_n(val)":"val")+"})",o="var $$selectedVal = "+i+";";o=o+" "+Xn(e,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),Fn(t,"change",o,null,!0)}function tr(t,e,n){var r=t.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=!o&&"range"!==r,u=o?"change":"range"===r?ys:"input",l="$event.target.value";s&&(l="$event.target.value.trim()"),a&&(l="_n("+l+")");var p=Xn(e,l);c&&(p="if($event.target.composing)return;"+p),In(t,"value","("+e+")"),Fn(t,u,p,null,!0),(s||a)&&Fn(t,"blur","$forceUpdate()")}function er(t){if(i(t[ys])){var e=$o?"change":"input";t[e]=[].concat(t[ys],t[e]||[]),delete t[ys]}i(t[gs])&&(t.change=[].concat(t[gs],t.change||[]),delete t[gs])}function nr(t,e,n){var r=Xa;return function i(){null!==e.apply(null,arguments)&&ir(t,i,n,r)}}function rr(t,e,n,r){e=ct(e),Xa.addEventListener(t,e,Fo?{capture:n,passive:r}:n)}function ir(t,e,n,r){(r||Xa).removeEventListener(t,e._withTask||e,n)}function or(t,e){if(!r(t.data.on)||!r(e.data.on)){var n=e.data.on||{},i=t.data.on||{};Xa=e.elm,er(n),dt(n,i,rr,ir,nr,e.context),Xa=void 0}}function ar(t,e){if(!r(t.data.domProps)||!r(e.data.domProps)){var n,o,a=e.elm,s=t.data.domProps||{},c=e.data.domProps||{};i(c.__ob__)&&(c=e.data.domProps=x({},c));for(n in s)r(c[n])&&(a[n]="");for(n in c){if(o=c[n],"textContent"===n||"innerHTML"===n){if(e.children&&(e.children.length=0),o===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n){a._value=o;var u=r(o)?"":String(o);sr(a,u)&&(a.value=u)}else a[n]=o}}}function sr(t,e){return!t.composing&&("OPTION"===t.tagName||cr(t,e)||ur(t,e))}function cr(t,e){var n=!0;try{n=document.activeElement!==t}catch(t){}return n&&t.value!==e}function ur(t,e){var n=t.value,r=t._vModifiers;if(i(r)){if(r.lazy)return!1;if(r.number)return d(n)!==d(e);if(r.trim)return n.trim()!==e.trim()}return n!==e}function lr(t){var e=pr(t.style);return t.staticStyle?x(t.staticStyle,e):e}function pr(t){return Array.isArray(t)?_(t):"string"==typeof t?xs(t):t}function fr(t,e){var n,r={};if(e)for(var i=t;i.componentInstance;)(i=i.componentInstance._vnode)&&i.data&&(n=lr(i.data))&&x(r,n);(n=lr(t.data))&&x(r,n);for(var o=t;o=o.parent;)o.data&&(n=lr(o.data))&&x(r,n);return r}function dr(t,e){var n=e.data,o=t.data;if(!(r(n.staticStyle)&&r(n.style)&&r(o.staticStyle)&&r(o.style))){var a,s,c=e.elm,u=o.staticStyle,l=o.normalizedStyle||o.style||{},p=u||l,f=pr(e.data.style)||{};e.data.normalizedStyle=i(f.__ob__)?x({},f):f;var d=fr(e,!0);for(s in p)r(d[s])&&Ts(c,s,"");for(s in d)(a=d[s])!==p[s]&&Ts(c,s,null==a?"":a)}}function hr(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(As).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var n=" "+(t.getAttribute("class")||"")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function vr(t,e){if(e&&(e=e.trim()))if(t.classList)e.indexOf(" ")>-1?e.split(As).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e),t.classList.length||t.removeAttribute("class");else{for(var n=" "+(t.getAttribute("class")||"")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");n=n.trim(),n?t.setAttribute("class",n):t.removeAttribute("class")}}function mr(t){if(t){if("object"==typeof t){var e={};return!1!==t.css&&x(e,Ss(t.name||"v")),x(e,t),e}return"string"==typeof t?Ss(t):void 0}}function yr(t){Ds(function(){Ds(t)})}function gr(t,e){var n=t._transitionClasses||(t._transitionClasses=[]);n.indexOf(e)<0&&(n.push(e),hr(t,e))}function br(t,e){t._transitionClasses&&v(t._transitionClasses,e),vr(t,e)}function wr(t,e,n){var r=xr(t,e),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===js?$s:Ns,c=0,u=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++c>=a&&u()};setTimeout(function(){c<a&&u()},o+1),t.addEventListener(s,l)}function xr(t,e){var n,r=window.getComputedStyle(t),i=(r[Ms+"Delay"]||"").split(", "),o=(r[Ms+"Duration"]||"").split(", "),a=_r(i,o),s=(r[Is+"Delay"]||"").split(", "),c=(r[Is+"Duration"]||"").split(", "),u=_r(s,c),l=0,p=0;return e===js?a>0&&(n=js,l=a,p=o.length):e===Ls?u>0&&(n=Ls,l=u,p=c.length):(l=Math.max(a,u),n=l>0?a>u?js:Ls:null,p=n?n===js?o.length:c.length:0),{type:n,timeout:l,propCount:p,hasTransform:n===js&&Rs.test(r[Ms+"Property"])}}function _r(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max.apply(null,e.map(function(e,n){return kr(e)+kr(t[n])}))}function kr(t){return 1e3*Number(t.slice(0,-1).replace(",","."))}function Tr(t,e){var n=t.elm;i(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var o=mr(t.data.transition);if(!r(o)&&!i(n._enterCb)&&1===n.nodeType){for(var a=o.css,s=o.type,u=o.enterClass,l=o.enterToClass,p=o.enterActiveClass,f=o.appearClass,h=o.appearToClass,v=o.appearActiveClass,m=o.beforeEnter,y=o.enter,g=o.afterEnter,b=o.enterCancelled,w=o.beforeAppear,x=o.appear,_=o.afterAppear,k=o.appearCancelled,T=o.duration,O=ya,C=ya.$vnode;C&&C.parent;)C=C.parent,O=C.context;var A=!O._isMounted||!t.isRootInsert;if(!A||x||""===x){var S=A&&f?f:u,P=A&&v?v:p,j=A&&h?h:l,L=A?w||m:m,M=A&&"function"==typeof x?x:y,$=A?_||g:g,I=A?k||b:b,N=d(c(T)?T.enter:T),D=!1!==a&&!Io,R=Cr(M),F=n._enterCb=E(function(){D&&(br(n,j),br(n,P)),F.cancelled?(D&&br(n,S),I&&I(n)):$&&$(n),n._enterCb=null});t.data.show||ht(t,"insert",function(){var e=n.parentNode,r=e&&e._pending&&e._pending[t.key];r&&r.tag===t.tag&&r.elm._leaveCb&&r.elm._leaveCb(),M&&M(n,F)}),L&&L(n),D&&(gr(n,S),gr(n,P),yr(function(){br(n,S),F.cancelled||(gr(n,j),R||(Er(N)?setTimeout(F,N):wr(n,s,F)))})),t.data.show&&(e&&e(),M&&M(n,F)),D||R||F()}}}function Or(t,e){function n(){k.cancelled||(!t.data.show&&o.parentNode&&((o.parentNode._pending||(o.parentNode._pending={}))[t.key]=t),h&&h(o),w&&(gr(o,l),gr(o,f),yr(function(){br(o,l),k.cancelled||(gr(o,p),x||(Er(_)?setTimeout(k,_):wr(o,u,k)))})),v&&v(o,k),w||x||k())}var o=t.elm;i(o._enterCb)&&(o._enterCb.cancelled=!0,o._enterCb());var a=mr(t.data.transition);if(r(a)||1!==o.nodeType)return e();if(!i(o._leaveCb)){var s=a.css,u=a.type,l=a.leaveClass,p=a.leaveToClass,f=a.leaveActiveClass,h=a.beforeLeave,v=a.leave,m=a.afterLeave,y=a.leaveCancelled,g=a.delayLeave,b=a.duration,w=!1!==s&&!Io,x=Cr(v),_=d(c(b)?b.leave:b),k=o._leaveCb=E(function(){o.parentNode&&o.parentNode._pending&&(o.parentNode._pending[t.key]=null),w&&(br(o,p),br(o,f)),k.cancelled?(w&&br(o,l),y&&y(o)):(e(),m&&m(o)),o._leaveCb=null});g?g(n):n()}}function Er(t){return"number"==typeof t&&!isNaN(t)}function Cr(t){if(r(t))return!1;var e=t.fns;return i(e)?Cr(Array.isArray(e)?e[0]:e):(t._length||t.length)>1}function Ar(t,e){!0!==e.data.show&&Tr(e)}function Sr(t,e,n){Pr(t,e,n),($o||No)&&setTimeout(function(){Pr(t,e,n)},0)}function Pr(t,e,n){var r=e.value,i=t.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,c=t.options.length;s<c;s++)if(a=t.options[s],i)o=O(r,Lr(a))>-1,a.selected!==o&&(a.selected=o);else if(T(Lr(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));i||(t.selectedIndex=-1)}}function jr(t,e){return e.every(function(e){return!T(e,t)})}function Lr(t){return"_value"in t?t._value:t.value}function Mr(t){t.target.composing=!0}function $r(t){t.target.composing&&(t.target.composing=!1,Ir(t.target,"input"))}function Ir(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function Nr(t){return!t.componentInstance||t.data&&t.data.transition?t:Nr(t.componentInstance._vnode)}function Dr(t){var e=t&&t.componentOptions;return e&&e.Ctor.options.abstract?Dr(Ot(e.children)):t}function Rr(t){var e={},n=t.$options;for(var r in n.propsData)e[r]=t[r];var i=n._parentListeners;for(var o in i)e[yo(o)]=i[o];return e}function Fr(t,e){if(/\d-keep-alive$/.test(e.tag))return t("keep-alive",{props:e.componentOptions.propsData})}function Br(t){for(;t=t.parent;)if(t.data.transition)return!0}function Ur(t,e){return e.key===t.key&&e.tag===t.tag}function Hr(t){t.elm._moveCb&&t.elm._moveCb(),t.elm._enterCb&&t.elm._enterCb()}function Xr(t){t.data.newPos=t.elm.getBoundingClientRect()}function zr(t){var e=t.data.pos,n=t.data.newPos,r=e.left-n.left,i=e.top-n.top;if(r||i){t.data.moved=!0;var o=t.elm.style;o.transform=o.WebkitTransform="translate("+r+"px,"+i+"px)",o.transitionDuration="0s"}}function Yr(t,e){var n=e?dc(e):pc;if(n.test(t)){for(var r,i,o,a=[],s=[],c=n.lastIndex=0;r=n.exec(t);){(i=r.index)>c&&(s.push(o=t.slice(c,i)),a.push(JSON.stringify(o)));var u=jn(r[1].trim());a.push("_s("+u+")"),s.push({"@binding":u}),c=i+r[0].length}return c<t.length&&(s.push(o=t.slice(c)),a.push(JSON.stringify(o))),{expression:a.join("+"),tokens:s}}}function qr(t,e){var n=(e.warn,Un(t,"class"));n&&(t.staticClass=JSON.stringify(n));var r=Bn(t,"class",!1);r&&(t.classBinding=r)}function Vr(t){var e="";return t.staticClass&&(e+="staticClass:"+t.staticClass+","),t.classBinding&&(e+="class:"+t.classBinding+","),e}function Wr(t,e){var n=(e.warn,Un(t,"style"));n&&(t.staticStyle=JSON.stringify(xs(n)));var r=Bn(t,"style",!1);r&&(t.styleBinding=r)}function Gr(t){var e="";return t.staticStyle&&(e+="staticStyle:"+t.staticStyle+","),t.styleBinding&&(e+="style:("+t.styleBinding+"),"),e}function Kr(t,e){var n=e?Mc:Lc;return t.replace(n,function(t){return jc[t]})}function Jr(t,e){function n(e){l+=e,t=t.substring(e)}function r(t,n,r){var i,s;if(null==n&&(n=l),null==r&&(r=l),t)for(s=t.toLowerCase(),i=a.length-1;i>=0&&a[i].lowerCasedTag!==s;i--);else i=0;if(i>=0){for(var c=a.length-1;c>=i;c--)e.end&&e.end(a[c].tag,n,r);a.length=i,o=i&&a[i-1].tag}else"br"===s?e.start&&e.start(t,[],!0,n,r):"p"===s&&(e.start&&e.start(t,[],!1,n,r),e.end&&e.end(t,n,r))}for(var i,o,a=[],s=e.expectHTML,c=e.isUnaryTag||_o,u=e.canBeLeftOpenTag||_o,l=0;t;){if(i=t,o&&Sc(o)){var p=0,f=o.toLowerCase(),d=Pc[f]||(Pc[f]=new RegExp("([\\s\\S]*?)(</"+f+"[^>]*>)","i")),h=t.replace(d,function(t,n,r){return p=r.length,Sc(f)||"noscript"===f||(n=n.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),Ic(f,n)&&(n=n.slice(1)),e.chars&&e.chars(n),""});l+=t.length-h.length,t=h,r(f,l-p,l)}else{var v=t.indexOf("<");if(0===v){if(Cc.test(t)){var m=t.indexOf("--\x3e");if(m>=0){e.shouldKeepComment&&e.comment(t.substring(4,m)),n(m+3);continue}}if(Ac.test(t)){var y=t.indexOf("]>");if(y>=0){n(y+2);continue}}var g=t.match(Ec);if(g){n(g[0].length);continue}var b=t.match(Oc);if(b){var w=l;n(b[0].length),r(b[1],w,l);continue}var x=function(){var e=t.match(kc);if(e){var r={tagName:e[1],attrs:[],start:l};n(e[0].length);for(var i,o;!(i=t.match(Tc))&&(o=t.match(wc));)n(o[0].length),r.attrs.push(o);if(i)return r.unarySlash=i[1],n(i[0].length),r.end=l,r}}();if(x){!function(t){var n=t.tagName,i=t.unarySlash;s&&("p"===o&&bc(n)&&r(o),u(n)&&o===n&&r(n));for(var l=c(n)||!!i,p=t.attrs.length,f=new Array(p),d=0;d<p;d++){var h=t.attrs[d],v=h[3]||h[4]||h[5]||"",m="a"===n&&"href"===h[1]?e.shouldDecodeNewlinesForHref:e.shouldDecodeNewlines;f[d]={name:h[1],value:Kr(v,m)}}l||(a.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:f}),o=n),e.start&&e.start(n,f,l,t.start,t.end)}(x),Ic(x.tagName,t)&&n(1);continue}}var _=void 0,k=void 0,T=void 0;if(v>=0){for(k=t.slice(v);!(Oc.test(k)||kc.test(k)||Cc.test(k)||Ac.test(k)||(T=k.indexOf("<",1))<0);)v+=T,k=t.slice(v);_=t.substring(0,v),n(v)}v<0&&(_=t,t=""),e.chars&&_&&e.chars(_)}if(t===i){e.chars&&e.chars(t);break}}r()}function Qr(t,e,n){return{type:1,tag:t,attrsList:e,attrsMap:yi(e),parent:n,children:[]}}function Zr(t,e){function n(t){t.pre&&(s=!1),oc(t.tag)&&(c=!1);for(var n=0;n<ic.length;n++)ic[n](t,e)}tc=e.warn||Mn,oc=e.isPreTag||_o,ac=e.mustUseProp||_o,sc=e.getTagNamespace||_o,nc=$n(e.modules,"transformNode"),rc=$n(e.modules,"preTransformNode"),ic=$n(e.modules,"postTransformNode"),ec=e.delimiters;var r,i,o=[],a=!1!==e.preserveWhitespace,s=!1,c=!1;return Jr(t,{warn:tc,expectHTML:e.expectHTML,isUnaryTag:e.isUnaryTag,canBeLeftOpenTag:e.canBeLeftOpenTag,shouldDecodeNewlines:e.shouldDecodeNewlines,shouldDecodeNewlinesForHref:e.shouldDecodeNewlinesForHref,shouldKeepComment:e.comments,start:function(t,a,u){var l=i&&i.ns||sc(t);$o&&"svg"===l&&(a=wi(a));var p=Qr(t,a,i);l&&(p.ns=l),bi(p)&&!Xo()&&(p.forbidden=!0);for(var f=0;f<rc.length;f++)p=rc[f](p,e)||p;if(s||(ti(p),p.pre&&(s=!0)),oc(p.tag)&&(c=!0),s?ei(p):p.processed||(oi(p),si(p),pi(p),ni(p,e)),r?o.length||r.if&&(p.elseif||p.else)&&li(r,{exp:p.elseif,block:p}):r=p,i&&!p.forbidden)if(p.elseif||p.else)ci(p,i);else if(p.slotScope){i.plain=!1;var d=p.slotTarget||'"default"';(i.scopedSlots||(i.scopedSlots={}))[d]=p}else i.children.push(p),p.parent=i;u?n(p):(i=p,o.push(p))},end:function(){var t=o[o.length-1],e=t.children[t.children.length-1];e&&3===e.type&&" "===e.text&&!c&&t.children.pop(),o.length-=1,i=o[o.length-1],n(t)},chars:function(t){if(i&&(!$o||"textarea"!==i.tag||i.attrsMap.placeholder!==t)){var e=i.children;if(t=c||t.trim()?gi(i)?t:zc(t):a&&e.length?" ":""){var n;!s&&" "!==t&&(n=Yr(t,ec))?e.push({type:2,expression:n.expression,tokens:n.tokens,text:t}):" "===t&&e.length&&" "===e[e.length-1].text||e.push({type:3,text:t})}}},comment:function(t){i.children.push({type:3,text:t,isComment:!0})}}),r}function ti(t){null!=Un(t,"v-pre")&&(t.pre=!0)}function ei(t){var e=t.attrsList.length;if(e)for(var n=t.attrs=new Array(e),r=0;r<e;r++)n[r]={name:t.attrsList[r].name,value:JSON.stringify(t.attrsList[r].value)};else t.pre||(t.plain=!0)}function ni(t,e){ri(t),t.plain=!t.key&&!t.attrsList.length,ii(t),fi(t),di(t);for(var n=0;n<nc.length;n++)t=nc[n](t,e)||t;hi(t)}function ri(t){var e=Bn(t,"key");e&&(t.key=e)}function ii(t){var e=Bn(t,"ref");e&&(t.ref=e,t.refInFor=vi(t))}function oi(t){var e;if(e=Un(t,"v-for")){var n=ai(e);n&&x(t,n)}}function ai(t){var e=t.match(Rc);if(e){var n={};n.for=e[2].trim();var r=e[1].trim().replace(Bc,""),i=r.match(Fc);return i?(n.alias=r.replace(Fc,"").trim(),n.iterator1=i[1].trim(),i[2]&&(n.iterator2=i[2].trim())):n.alias=r,n}}function si(t){var e=Un(t,"v-if");if(e)t.if=e,li(t,{exp:e,block:t});else{null!=Un(t,"v-else")&&(t.else=!0);var n=Un(t,"v-else-if");n&&(t.elseif=n)}}function ci(t,e){var n=ui(e.children);n&&n.if&&li(n,{exp:t.elseif,block:t})}function ui(t){for(var e=t.length;e--;){if(1===t[e].type)return t[e];t.pop()}}function li(t,e){t.ifConditions||(t.ifConditions=[]),t.ifConditions.push(e)}function pi(t){null!=Un(t,"v-once")&&(t.once=!0)}function fi(t){if("slot"===t.tag)t.slotName=Bn(t,"name");else{var e;"template"===t.tag?(e=Un(t,"scope"),t.slotScope=e||Un(t,"slot-scope")):(e=Un(t,"slot-scope"))&&(t.slotScope=e);var n=Bn(t,"slot");n&&(t.slotTarget='""'===n?'"default"':n,"template"===t.tag||t.slotScope||Nn(t,"slot",n))}}function di(t){var e;(e=Bn(t,"is"))&&(t.component=e),null!=Un(t,"inline-template")&&(t.inlineTemplate=!0)}function hi(t){var e,n,r,i,o,a,s,c=t.attrsList;for(e=0,n=c.length;e<n;e++)if(r=i=c[e].name,o=c[e].value,Dc.test(r))if(t.hasBindings=!0,a=mi(r),a&&(r=r.replace(Xc,"")),Hc.test(r))r=r.replace(Hc,""),o=jn(o),s=!1,a&&(a.prop&&(s=!0,"innerHtml"===(r=yo(r))&&(r="innerHTML")),a.camel&&(r=yo(r)),a.sync&&Fn(t,"update:"+yo(r),Xn(o,"$event"))),s||!t.component&&ac(t.tag,t.attrsMap.type,r)?In(t,r,o):Nn(t,r,o);else if(Nc.test(r))r=r.replace(Nc,""),Fn(t,r,o,a,!1,tc);else{r=r.replace(Dc,"");var u=r.match(Uc),l=u&&u[1];l&&(r=r.slice(0,-(l.length+1))),Rn(t,r,i,o,l,a)}else Nn(t,r,JSON.stringify(o)),!t.component&&"muted"===r&&ac(t.tag,t.attrsMap.type,r)&&In(t,r,"true")}function vi(t){for(var e=t;e;){if(void 0!==e.for)return!0;e=e.parent}return!1}function mi(t){var e=t.match(Xc);if(e){var n={};return e.forEach(function(t){n[t.slice(1)]=!0}),n}}function yi(t){for(var e={},n=0,r=t.length;n<r;n++)e[t[n].name]=t[n].value;return e}function gi(t){return"script"===t.tag||"style"===t.tag}function bi(t){return"style"===t.tag||"script"===t.tag&&(!t.attrsMap.type||"text/javascript"===t.attrsMap.type)}function wi(t){for(var e=[],n=0;n<t.length;n++){var r=t[n];Yc.test(r.name)||(r.name=r.name.replace(qc,""),e.push(r))}return e}function xi(t,e){if("input"===t.tag){var n=t.attrsMap;if(!n["v-model"])return;var r;if((n[":type"]||n["v-bind:type"])&&(r=Bn(t,"type")),n.type||r||!n["v-bind"]||(r="("+n["v-bind"]+").type"),r){var i=Un(t,"v-if",!0),o=i?"&&("+i+")":"",a=null!=Un(t,"v-else",!0),s=Un(t,"v-else-if",!0),c=_i(t);oi(c),Dn(c,"type","checkbox"),ni(c,e),c.processed=!0,c.if="("+r+")==='checkbox'"+o,li(c,{exp:c.if,block:c});var u=_i(t);Un(u,"v-for",!0),Dn(u,"type","radio"),ni(u,e),li(c,{exp:"("+r+")==='radio'"+o,block:u});var l=_i(t);return Un(l,"v-for",!0),Dn(l,":type",r),ni(l,e),li(c,{exp:i,block:l}),a?c.else=!0:s&&(c.elseif=s),c}}}function _i(t){return Qr(t.tag,t.attrsList.slice(),t.parent)}function ki(t,e){e.value&&In(t,"textContent","_s("+e.value+")")}function Ti(t,e){e.value&&In(t,"innerHTML","_s("+e.value+")")}function Oi(t,e){t&&(cc=Jc(e.staticKeys||""),uc=e.isReservedTag||_o,Ci(t),Ai(t,!1))}function Ei(t){return h("type,tag,attrsList,attrsMap,plain,parent,children,attrs"+(t?","+t:""))}function Ci(t){if(t.static=Si(t),1===t.type){if(!uc(t.tag)&&"slot"!==t.tag&&null==t.attrsMap["inline-template"])return;for(var e=0,n=t.children.length;e<n;e++){var r=t.children[e];Ci(r),r.static||(t.static=!1)}if(t.ifConditions)for(var i=1,o=t.ifConditions.length;i<o;i++){var a=t.ifConditions[i].block;Ci(a),a.static||(t.static=!1)}}}function Ai(t,e){if(1===t.type){if((t.static||t.once)&&(t.staticInFor=e),t.static&&t.children.length&&(1!==t.children.length||3!==t.children[0].type))return void(t.staticRoot=!0);if(t.staticRoot=!1,t.children)for(var n=0,r=t.children.length;n<r;n++)Ai(t.children[n],e||!!t.for);if(t.ifConditions)for(var i=1,o=t.ifConditions.length;i<o;i++)Ai(t.ifConditions[i].block,e)}}function Si(t){return 2!==t.type&&(3===t.type||!(!t.pre&&(t.hasBindings||t.if||t.for||fo(t.tag)||!uc(t.tag)||Pi(t)||!Object.keys(t).every(cc))))}function Pi(t){for(;t.parent;){if(t=t.parent,"template"!==t.tag)return!1;if(t.for)return!0}return!1}function ji(t,e){var n=e?"nativeOn:{":"on:{";for(var r in t)n+='"'+r+'":'+Li(r,t[r])+",";return n.slice(0,-1)+"}"}function Li(t,e){if(!e)return"function(){}";if(Array.isArray(e))return"["+e.map(function(e){return Li(t,e)}).join(",")+"]";var n=Zc.test(e.value),r=Qc.test(e.value);if(e.modifiers){var i="",o="",a=[];for(var s in e.modifiers)if(ru[s])o+=ru[s],tu[s]&&a.push(s);else if("exact"===s){var c=e.modifiers;o+=nu(["ctrl","shift","alt","meta"].filter(function(t){return!c[t]}).map(function(t){return"$event."+t+"Key"}).join("||"))}else a.push(s);return a.length&&(i+=Mi(a)),o&&(i+=o),"function($event){"+i+(n?"return "+e.value+"($event)":r?"return ("+e.value+")($event)":e.value)+"}"}return n||r?e.value:"function($event){"+e.value+"}"}function Mi(t){return"if(!('button' in $event)&&"+t.map($i).join("&&")+")return null;"}function $i(t){var e=parseInt(t,10);if(e)return"$event.keyCode!=="+e;var n=tu[t],r=eu[t];return"_k($event.keyCode,"+JSON.stringify(t)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}function Ii(t,e){t.wrapListeners=function(t){return"_g("+t+","+e.value+")"}}function Ni(t,e){t.wrapData=function(n){return"_b("+n+",'"+t.tag+"',"+e.value+","+(e.modifiers&&e.modifiers.prop?"true":"false")+(e.modifiers&&e.modifiers.sync?",true":"")+")"}}function Di(t,e){var n=new ou(e);return{render:"with(this){return "+(t?Ri(t,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Ri(t,e){if(t.parent&&(t.pre=t.pre||t.parent.pre),t.staticRoot&&!t.staticProcessed)return Fi(t,e);if(t.once&&!t.onceProcessed)return Bi(t,e);if(t.for&&!t.forProcessed)return Xi(t,e);if(t.if&&!t.ifProcessed)return Ui(t,e);if("template"!==t.tag||t.slotTarget||e.pre){if("slot"===t.tag)return no(t,e);var n;if(t.component)n=ro(t.component,t,e);else{var r;(!t.plain||t.pre&&e.maybeComponent(t))&&(r=zi(t,e));var i=t.inlineTemplate?null:Ki(t,e,!0);n="_c('"+t.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o<e.transforms.length;o++)n=e.transforms[o](t,n);return n}return Ki(t,e)||"void 0"}function Fi(t,e){t.staticProcessed=!0;var n=e.pre;return t.pre&&(e.pre=t.pre),e.staticRenderFns.push("with(this){return "+Ri(t,e)+"}"),e.pre=n,"_m("+(e.staticRenderFns.length-1)+(t.staticInFor?",true":"")+")"}function Bi(t,e){if(t.onceProcessed=!0,t.if&&!t.ifProcessed)return Ui(t,e);if(t.staticInFor){for(var n="",r=t.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o("+Ri(t,e)+","+e.onceId+++","+n+")":Ri(t,e)}return Fi(t,e)}function Ui(t,e,n,r){return t.ifProcessed=!0,Hi(t.ifConditions.slice(),e,n,r)}function Hi(t,e,n,r){function i(t){return n?n(t,e):t.once?Bi(t,e):Ri(t,e)}if(!t.length)return r||"_e()";var o=t.shift();return o.exp?"("+o.exp+")?"+i(o.block)+":"+Hi(t,e,n,r):""+i(o.block)}function Xi(t,e,n,r){var i=t.for,o=t.alias,a=t.iterator1?","+t.iterator1:"",s=t.iterator2?","+t.iterator2:"";return t.forProcessed=!0,(r||"_l")+"(("+i+"),function("+o+a+s+"){return "+(n||Ri)(t,e)+"})"}function zi(t,e){var n="{",r=Yi(t,e);r&&(n+=r+","),t.key&&(n+="key:"+t.key+","),t.ref&&(n+="ref:"+t.ref+","),t.refInFor&&(n+="refInFor:true,"),t.pre&&(n+="pre:true,"),t.component&&(n+='tag:"'+t.tag+'",');for(var i=0;i<e.dataGenFns.length;i++)n+=e.dataGenFns[i](t);if(t.attrs&&(n+="attrs:{"+io(t.attrs)+"},"),t.props&&(n+="domProps:{"+io(t.props)+"},"),t.events&&(n+=ji(t.events,!1)+","),t.nativeEvents&&(n+=ji(t.nativeEvents,!0)+","),t.slotTarget&&!t.slotScope&&(n+="slot:"+t.slotTarget+","),t.scopedSlots&&(n+=Vi(t.scopedSlots,e)+","),t.model&&(n+="model:{value:"+t.model.value+",callback:"+t.model.callback+",expression:"+t.model.expression+"},"),t.inlineTemplate){var o=qi(t,e);o&&(n+=o+",")}return n=n.replace(/,$/,"")+"}",t.wrapData&&(n=t.wrapData(n)),t.wrapListeners&&(n=t.wrapListeners(n)),n}function Yi(t,e){var n=t.directives;if(n){var r,i,o,a,s="directives:[",c=!1;for(r=0,i=n.length;r<i;r++){o=n[r],a=!0;var u=e.directives[o.name];u&&(a=!!u(t,o,e.warn)),a&&(c=!0,s+='{name:"'+o.name+'",rawName:"'+o.rawName+'"'+(o.value?",value:("+o.value+"),expression:"+JSON.stringify(o.value):"")+(o.arg?',arg:"'+o.arg+'"':"")+(o.modifiers?",modifiers:"+JSON.stringify(o.modifiers):"")+"},")}return c?s.slice(0,-1)+"]":void 0}}function qi(t,e){var n=t.children[0];if(1===n.type){var r=Di(n,e.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map(function(t){return"function(){"+t+"}"}).join(",")+"]}"}}function Vi(t,e){return"scopedSlots:_u(["+Object.keys(t).map(function(n){return Wi(n,t[n],e)}).join(",")+"])"}function Wi(t,e,n){return e.for&&!e.forProcessed?Gi(t,e,n):"{key:"+t+",fn:function("+String(e.slotScope)+"){return "+("template"===e.tag?e.if?"("+e.if+")?"+(Ki(e,n)||"undefined")+":undefined":Ki(e,n)||"undefined":Ri(e,n))+"}}"}function Gi(t,e,n){var r=e.for,i=e.alias,o=e.iterator1?","+e.iterator1:"",a=e.iterator2?","+e.iterator2:"";return e.forProcessed=!0,"_l(("+r+"),function("+i+o+a+"){return "+Wi(t,e,n)+"})"}function Ki(t,e,n,r,i){var o=t.children;if(o.length){var a=o[0];if(1===o.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?e.maybeComponent(a)?",1":",0":"";return""+(r||Ri)(a,e)+s}var c=n?Ji(o,e.maybeComponent):0,u=i||Zi;return"["+o.map(function(t){return u(t,e)}).join(",")+"]"+(c?","+c:"")}}function Ji(t,e){for(var n=0,r=0;r<t.length;r++){var i=t[r];if(1===i.type){if(Qi(i)||i.ifConditions&&i.ifConditions.some(function(t){return Qi(t.block)})){n=2;break}(e(i)||i.ifConditions&&i.ifConditions.some(function(t){return e(t.block)}))&&(n=1)}}return n}function Qi(t){return void 0!==t.for||"template"===t.tag||"slot"===t.tag}function Zi(t,e){return 1===t.type?Ri(t,e):3===t.type&&t.isComment?eo(t):to(t)}function to(t){return"_v("+(2===t.type?t.expression:oo(JSON.stringify(t.text)))+")"}function eo(t){return"_e("+JSON.stringify(t.text)+")"}function no(t,e){var n=t.slotName||'"default"',r=Ki(t,e),i="_t("+n+(r?","+r:""),o=t.attrs&&"{"+t.attrs.map(function(t){return yo(t.name)+":"+t.value}).join(",")+"}",a=t.attrsMap["v-bind"];return!o&&!a||r||(i+=",null"),o&&(i+=","+o),a&&(i+=(o?"":",null")+","+a),i+")"}function ro(t,e,n){var r=e.inlineTemplate?null:Ki(e,n,!0);return"_c("+t+","+zi(e,n)+(r?","+r:"")+")"}function io(t){for(var e="",n=0;n<t.length;n++){var r=t[n];e+='"'+r.name+'":'+oo(r.value)+","}return e.slice(0,-1)}function oo(t){return t.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function ao(t,e){try{return new Function(t)}catch(n){return e.push({err:n,code:t}),k}}function so(t){var e=Object.create(null);return function(n,r,i){r=x({},r),r.warn,delete r.warn;var o=r.delimiters?String(r.delimiters)+n:n;if(e[o])return e[o];var a=t(n,r),s={},c=[];return s.render=ao(a.render,c),s.staticRenderFns=a.staticRenderFns.map(function(t){return ao(t,c)}),e[o]=s}}function co(t){return lc=lc||document.createElement("div"),lc.innerHTML=t?'<a href="\n"/>':'<div a="\n"/>',lc.innerHTML.indexOf("&#10;")>0}function uo(t){if(t.outerHTML)return t.outerHTML;var e=document.createElement("div");return e.appendChild(t.cloneNode(!0)),e.innerHTML}/*!
2
+ * Vue.js v2.5.22
3
+ * (c) 2014-2019 Evan You
4
+ * Released under the MIT License.
5
+ */
6
+ var lo=Object.freeze({}),po=Object.prototype.toString,fo=h("slot,component",!0),ho=h("key,ref,slot,slot-scope,is"),vo=Object.prototype.hasOwnProperty,mo=/-(\w)/g,yo=y(function(t){return t.replace(mo,function(t,e){return e?e.toUpperCase():""})}),go=y(function(t){return t.charAt(0).toUpperCase()+t.slice(1)}),bo=/\B([A-Z])/g,wo=y(function(t){return t.replace(bo,"-$1").toLowerCase()}),xo=Function.prototype.bind?b:g,_o=function(t,e,n){return!1},ko=function(t){return t},To="data-server-rendered",Oo=["component","directive","filter"],Eo=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured"],Co={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:_o,isReservedAttr:_o,isUnknownElement:_o,getTagNamespace:k,parsePlatformTagName:ko,mustUseProp:_o,async:!0,_lifecycleHooks:Eo},Ao=/[^\w.$]/,So="__proto__"in{},Po="undefined"!=typeof window,jo="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,Lo=jo&&WXEnvironment.platform.toLowerCase(),Mo=Po&&window.navigator.userAgent.toLowerCase(),$o=Mo&&/msie|trident/.test(Mo),Io=Mo&&Mo.indexOf("msie 9.0")>0,No=Mo&&Mo.indexOf("edge/")>0,Do=(Mo&&Mo.indexOf("android"),Mo&&/iphone|ipad|ipod|ios/.test(Mo)||"ios"===Lo),Ro=(Mo&&/chrome\/\d+/.test(Mo),{}.watch),Fo=!1;if(Po)try{var Bo={};Object.defineProperty(Bo,"passive",{get:function(){Fo=!0}}),window.addEventListener("test-passive",null,Bo)}catch(t){}var Uo,Ho,Xo=function(){return void 0===Uo&&(Uo=!Po&&!jo&&void 0!==t&&t.process&&"server"===t.process.env.VUE_ENV),Uo},zo=Po&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,Yo="undefined"!=typeof Symbol&&P(Symbol)&&"undefined"!=typeof Reflect&&P(Reflect.ownKeys);Ho="undefined"!=typeof Set&&P(Set)?Set:function(){function t(){this.set=Object.create(null)}return t.prototype.has=function(t){return!0===this.set[t]},t.prototype.add=function(t){this.set[t]=!0},t.prototype.clear=function(){this.set=Object.create(null)},t}();var qo=k,Vo=0,Wo=function(){this.id=Vo++,this.subs=[]};Wo.prototype.addSub=function(t){this.subs.push(t)},Wo.prototype.removeSub=function(t){v(this.subs,t)},Wo.prototype.depend=function(){Wo.target&&Wo.target.addDep(this)},Wo.prototype.notify=function(){for(var t=this.subs.slice(),e=0,n=t.length;e<n;e++)t[e].update()},Wo.target=null;var Go=[],Ko=function(t,e,n,r,i,o,a,s){this.tag=t,this.data=e,this.children=n,this.text=r,this.elm=i,this.ns=void 0,this.context=o,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=e&&e.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},Jo={child:{configurable:!0}};Jo.child.get=function(){return this.componentInstance},Object.defineProperties(Ko.prototype,Jo);var Qo=function(t){void 0===t&&(t="");var e=new Ko;return e.text=t,e.isComment=!0,e},Zo=Array.prototype,ta=Object.create(Zo);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(t){var e=Zo[t];A(ta,t,function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];var i,o=e.apply(this,n),a=this.__ob__;switch(t){case"push":case"unshift":i=n;break;case"splice":i=n.slice(2)}return i&&a.observeArray(i),a.dep.notify(),o})});var ea=Object.getOwnPropertyNames(ta),na=!0,ra=function(t){this.value=t,this.dep=new Wo,this.vmCount=0,A(t,"__ob__",this),Array.isArray(t)?(So?N(t,ta):D(t,ta,ea),this.observeArray(t)):this.walk(t)};ra.prototype.walk=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)F(t,e[n])},ra.prototype.observeArray=function(t){for(var e=0,n=t.length;e<n;e++)R(t[e])};var ia=Co.optionMergeStrategies;ia.data=function(t,e,n){return n?z(t,e,n):e&&"function"!=typeof e?t:z(t,e)},Eo.forEach(function(t){ia[t]=Y}),Oo.forEach(function(t){ia[t+"s"]=V}),ia.watch=function(t,e,n,r){if(t===Ro&&(t=void 0),e===Ro&&(e=void 0),!e)return Object.create(t||null);if(!t)return e;var i={};x(i,t);for(var o in e){var a=i[o],s=e[o];a&&!Array.isArray(a)&&(a=[a]),i[o]=a?a.concat(s):Array.isArray(s)?s:[s]}return i},ia.props=ia.methods=ia.inject=ia.computed=function(t,e,n,r){if(!t)return e;var i=Object.create(null);return x(i,t),e&&x(i,e),i},ia.provide=z;var oa,aa,sa=function(t,e){return void 0===e?t:e},ca=[],ua=!1,la=!1;if(void 0!==n&&P(n))aa=function(){n(st)};else if("undefined"==typeof MessageChannel||!P(MessageChannel)&&"[object MessageChannelConstructor]"!==MessageChannel.toString())aa=function(){setTimeout(st,0)};else{var pa=new MessageChannel,fa=pa.port2;pa.port1.onmessage=st,aa=function(){fa.postMessage(1)}}if("undefined"!=typeof Promise&&P(Promise)){var da=Promise.resolve();oa=function(){da.then(st),Do&&setTimeout(k)}}else oa=aa;var ha,va=new Ho,ma=y(function(t){var e="&"===t.charAt(0);t=e?t.slice(1):t;var n="~"===t.charAt(0);t=n?t.slice(1):t;var r="!"===t.charAt(0);return t=r?t.slice(1):t,{name:t,once:n,capture:r,passive:e}}),ya=null,ga=[],ba=[],wa={},xa=!1,_a=!1,ka=0,Ta=0,Oa=function(t,e,n,r,i){this.vm=t,i&&(t._watcher=this),t._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Ta,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new Ho,this.newDepIds=new Ho,this.expression="","function"==typeof e?this.getter=e:(this.getter=S(e),this.getter||(this.getter=k)),this.value=this.lazy?void 0:this.get()};Oa.prototype.get=function(){j(this);var t,e=this.vm;try{t=this.getter.call(e,e)}catch(t){if(!this.user)throw t;it(t,e,'getter for watcher "'+this.expression+'"')}finally{this.deep&&lt(t),L(),this.cleanupDeps()}return t},Oa.prototype.addDep=function(t){var e=t.id;this.newDepIds.has(e)||(this.newDepIds.add(e),this.newDeps.push(t),this.depIds.has(e)||t.addSub(this))},Oa.prototype.cleanupDeps=function(){for(var t=this.deps.length;t--;){var e=this.deps[t];this.newDepIds.has(e.id)||e.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},Oa.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():Vt(this)},Oa.prototype.run=function(){if(this.active){var t=this.get();if(t!==this.value||c(t)||this.deep){var e=this.value;if(this.value=t,this.user)try{this.cb.call(this.vm,t,e)}catch(t){it(t,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,t,e)}}},Oa.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},Oa.prototype.depend=function(){for(var t=this.deps.length;t--;)this.deps[t].depend()},Oa.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||v(this.vm._watchers,this);for(var t=this.deps.length;t--;)this.deps[t].removeSub(this);this.active=!1}};var Ea={enumerable:!0,configurable:!0,get:k,set:k},Ca={lazy:!0};we(xe.prototype);var Aa={init:function(t,e){if(t.componentInstance&&!t.componentInstance._isDestroyed&&t.data.keepAlive){var n=t;Aa.prepatch(n,n)}else(t.componentInstance=Ee(t,ya)).$mount(e?t.elm:void 0,e)},prepatch:function(t,e){var n=e.componentOptions;Dt(e.componentInstance=t.componentInstance,n.propsData,n.listeners,e,n.children)},insert:function(t){var e=t.context,n=t.componentInstance;n._isMounted||(n._isMounted=!0,Ut(n,"mounted")),t.data.keepAlive&&(e._isMounted?Yt(n):Ft(n,!0))},destroy:function(t){var e=t.componentInstance;e._isDestroyed||(t.data.keepAlive?Bt(e,!0):e.$destroy())}},Sa=Object.keys(Aa),Pa=1,ja=2,La=0;!function(t){t.prototype._init=function(t){var e=this;e._uid=La++,e._isVue=!0,t&&t._isComponent?Ie(e,t):e.$options=J(Ne(e.constructor),t||{},e),e._renderProxy=e,e._self=e,It(e),Et(e),$e(e),Ut(e,"beforeCreate"),se(e),Gt(e),ae(e),Ut(e,"created"),e.$options.el&&e.$mount(e.$options.el)}}(Re),function(t){var e={};e.get=function(){return this._data};var n={};n.get=function(){return this._props},Object.defineProperty(t.prototype,"$data",e),Object.defineProperty(t.prototype,"$props",n),t.prototype.$set=B,t.prototype.$delete=U,t.prototype.$watch=function(t,e,n){var r=this;if(u(e))return oe(r,t,e,n);n=n||{},n.user=!0;var i=new Oa(r,t,e,n);if(n.immediate)try{e.call(r,i.value)}catch(t){it(t,r,'callback for immediate watcher "'+i.expression+'"')}return function(){i.teardown()}}}(Re),function(t){var e=/^hook:/;t.prototype.$on=function(t,n){var r=this;if(Array.isArray(t))for(var i=0,o=t.length;i<o;i++)r.$on(t[i],n);else(r._events[t]||(r._events[t]=[])).push(n),e.test(t)&&(r._hasHookEvent=!0);return r},t.prototype.$once=function(t,e){function n(){r.$off(t,n),e.apply(r,arguments)}var r=this;return n.fn=e,r.$on(t,n),r},t.prototype.$off=function(t,e){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(t)){for(var r=0,i=t.length;r<i;r++)n.$off(t[r],e);return n}var o=n._events[t];if(!o)return n;if(!e)return n._events[t]=null,n;for(var a,s=o.length;s--;)if((a=o[s])===e||a.fn===e){o.splice(s,1);break}return n},t.prototype.$emit=function(t){var e=this,n=e._events[t];if(n){n=n.length>1?w(n):n;for(var r=w(arguments,1),i=0,o=n.length;i<o;i++)try{n[i].apply(e,r)}catch(n){it(n,e,'event handler for "'+t+'"')}}return e}}(Re),function(t){t.prototype._update=function(t,e){var n=this,r=n.$el,i=n._vnode,o=$t(n);n._vnode=t,n.$el=i?n.__patch__(i,t):n.__patch__(n.$el,t,e,!1),o(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},t.prototype.$forceUpdate=function(){var t=this;t._watcher&&t._watcher.update()},t.prototype.$destroy=function(){var t=this;if(!t._isBeingDestroyed){Ut(t,"beforeDestroy"),t._isBeingDestroyed=!0;var e=t.$parent;!e||e._isBeingDestroyed||t.$options.abstract||v(e.$children,t),t._watcher&&t._watcher.teardown();for(var n=t._watchers.length;n--;)t._watchers[n].teardown();t._data.__ob__&&t._data.__ob__.vmCount--,t._isDestroyed=!0,t.__patch__(t._vnode,null),Ut(t,"destroyed"),t.$off(),t.$el&&(t.$el.__vue__=null),t.$vnode&&(t.$vnode.parent=null)}}}(Re),function(t){we(t.prototype),t.prototype.$nextTick=function(t){return ut(t,this)},t.prototype._render=function(){var t=this,e=t.$options,n=e.render,r=e._parentVnode;r&&(t.$scopedSlots=r.data.scopedSlots||lo),t.$vnode=r;var i;try{i=n.call(t._renderProxy,t.$createElement)}catch(e){it(e,t,"render"),i=t._vnode}return i instanceof Ko||(i=Qo()),i.parent=r,i}}(Re);var Ma=[String,RegExp,Array],$a={name:"keep-alive",abstract:!0,props:{include:Ma,exclude:Ma,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var t in this.cache)We(this.cache,t,this.keys)},mounted:function(){var t=this;this.$watch("include",function(e){Ve(t,function(t){return qe(e,t)})}),this.$watch("exclude",function(e){Ve(t,function(t){return!qe(e,t)})})},render:function(){var t=this.$slots.default,e=Ot(t),n=e&&e.componentOptions;if(n){var r=Ye(n),i=this,o=i.include,a=i.exclude;if(o&&(!r||!qe(o,r))||a&&r&&qe(a,r))return e;var s=this,c=s.cache,u=s.keys,l=null==e.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):e.key;c[l]?(e.componentInstance=c[l].componentInstance,v(u,l),u.push(l)):(c[l]=e,u.push(l),this.max&&u.length>parseInt(this.max)&&We(c,u[0],u,this._vnode)),e.data.keepAlive=!0}return e||t&&t[0]}},Ia={KeepAlive:$a};!function(t){var e={};e.get=function(){return Co},Object.defineProperty(t,"config",e),t.util={warn:qo,extend:x,mergeOptions:J,defineReactive:F},t.set=B,t.delete=U,t.nextTick=ut,t.options=Object.create(null),Oo.forEach(function(e){t.options[e+"s"]=Object.create(null)}),t.options._base=t,x(t.options.components,Ia),Fe(t),Be(t),Ue(t),ze(t)}(Re),Object.defineProperty(Re.prototype,"$isServer",{get:Xo}),Object.defineProperty(Re.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Re,"FunctionalRenderContext",{value:xe}),Re.version="2.5.22";var Na,Da,Ra,Fa,Ba,Ua,Ha,Xa,za,Ya=h("style,class"),qa=h("input,textarea,option,select,progress"),Va=function(t,e,n){return"value"===n&&qa(t)&&"button"!==e||"selected"===n&&"option"===t||"checked"===n&&"input"===t||"muted"===n&&"video"===t},Wa=h("contenteditable,draggable,spellcheck"),Ga=h("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Ka="http://www.w3.org/1999/xlink",Ja=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},Qa=function(t){return Ja(t)?t.slice(6,t.length):""},Za=function(t){return null==t||!1===t},ts={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},es=h("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),ns=h("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),rs=function(t){return"pre"===t},is=function(t){return es(t)||ns(t)},os=Object.create(null),as=h("text,number,password,search,email,tel,url"),ss=Object.freeze({createElement:an,createElementNS:sn,createTextNode:cn,createComment:un,insertBefore:ln,removeChild:pn,appendChild:fn,parentNode:dn,nextSibling:hn,tagName:vn,setTextContent:mn,setStyleScope:yn}),cs={create:function(t,e){gn(e)},update:function(t,e){t.data.ref!==e.data.ref&&(gn(t,!0),gn(e))},destroy:function(t){gn(t,!0)}},us=new Ko("",{},[]),ls=["create","activate","update","remove","destroy"],ps={create:_n,update:_n,destroy:function(t){_n(t,us)}},fs=Object.create(null),ds=[cs,ps],hs={create:Cn,update:Cn},vs={create:Pn,update:Pn},ms=/[\w).+\-_$\]]/,ys="__r",gs="__c",bs={create:or,update:or},ws={create:ar,update:ar},xs=y(function(t){var e={},n=/;(?![^(]*\))/g,r=/:(.+)/;return t.split(n).forEach(function(t){if(t){var n=t.split(r);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}),_s=/^--/,ks=/\s*!important$/,Ts=function(t,e,n){if(_s.test(e))t.style.setProperty(e,n);else if(ks.test(n))t.style.setProperty(e,n.replace(ks,""),"important");else{var r=Es(e);if(Array.isArray(n))for(var i=0,o=n.length;i<o;i++)t.style[r]=n[i];else t.style[r]=n}},Os=["Webkit","Moz","ms"],Es=y(function(t){if(za=za||document.createElement("div").style,"filter"!==(t=yo(t))&&t in za)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<Os.length;n++){var r=Os[n]+e;if(r in za)return r}}),Cs={create:dr,update:dr},As=/\s+/,Ss=y(function(t){return{enterClass:t+"-enter",enterToClass:t+"-enter-to",enterActiveClass:t+"-enter-active",leaveClass:t+"-leave",leaveToClass:t+"-leave-to",leaveActiveClass:t+"-leave-active"}}),Ps=Po&&!Io,js="transition",Ls="animation",Ms="transition",$s="transitionend",Is="animation",Ns="animationend";Ps&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Ms="WebkitTransition",$s="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Is="WebkitAnimation",Ns="webkitAnimationEnd"));var Ds=Po?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(t){return t()},Rs=/\b(transform|all)(,|$)/,Fs=Po?{create:Ar,activate:Ar,remove:function(t,e){!0!==t.data.show?Or(t,e):e()}}:{},Bs=[hs,vs,bs,ws,Cs,Fs],Us=Bs.concat(ds),Hs=function(t){function e(t){return new Ko(j.tagName(t).toLowerCase(),{},[],void 0,t)}function n(t,e){function n(){0==--n.listeners&&a(t)}return n.listeners=e,n}function a(t){var e=j.parentNode(t);i(e)&&j.removeChild(e,t)}function c(t,e,n,r,a,s,c){if(i(t.elm)&&i(s)&&(t=s[c]=$(t)),t.isRootInsert=!a,!u(t,e,n,r)){var l=t.data,p=t.children,h=t.tag;i(h)?(t.elm=t.ns?j.createElementNS(t.ns,h):j.createElement(h,t),y(t),d(t,p,e),i(l)&&m(t,e),f(n,t.elm,r)):o(t.isComment)?(t.elm=j.createComment(t.text),f(n,t.elm,r)):(t.elm=j.createTextNode(t.text),f(n,t.elm,r))}}function u(t,e,n,r){var a=t.data;if(i(a)){var s=i(t.componentInstance)&&a.keepAlive;if(i(a=a.hook)&&i(a=a.init)&&a(t,!1),i(t.componentInstance))return l(t,e),f(n,t.elm,r),o(s)&&p(t,e,n,r),!0}}function l(t,e){i(t.data.pendingInsert)&&(e.push.apply(e,t.data.pendingInsert),t.data.pendingInsert=null),t.elm=t.componentInstance.$el,v(t)?(m(t,e),y(t)):(gn(t),e.push(t))}function p(t,e,n,r){for(var o,a=t;a.componentInstance;)if(a=a.componentInstance._vnode,i(o=a.data)&&i(o=o.transition)){for(o=0;o<S.activate.length;++o)S.activate[o](us,a);e.push(a);break}f(n,t.elm,r)}function f(t,e,n){i(t)&&(i(n)?j.parentNode(n)===t&&j.insertBefore(t,e,n):j.appendChild(t,e))}function d(t,e,n){if(Array.isArray(e))for(var r=0;r<e.length;++r)c(e[r],n,t.elm,null,!0,e,r);else s(t.text)&&j.appendChild(t.elm,j.createTextNode(String(t.text)))}function v(t){for(;t.componentInstance;)t=t.componentInstance._vnode;return i(t.tag)}function m(t,e){for(var n=0;n<S.create.length;++n)S.create[n](us,t);C=t.data.hook,i(C)&&(i(C.create)&&C.create(us,t),i(C.insert)&&e.push(t))}function y(t){var e;if(i(e=t.fnScopeId))j.setStyleScope(t.elm,e);else for(var n=t;n;)i(e=n.context)&&i(e=e.$options._scopeId)&&j.setStyleScope(t.elm,e),n=n.parent;i(e=ya)&&e!==t.context&&e!==t.fnContext&&i(e=e.$options._scopeId)&&j.setStyleScope(t.elm,e)}function g(t,e,n,r,i,o){for(;r<=i;++r)c(n[r],o,t,e,!1,n,r)}function b(t){var e,n,r=t.data;if(i(r))for(i(e=r.hook)&&i(e=e.destroy)&&e(t),e=0;e<S.destroy.length;++e)S.destroy[e](t);if(i(e=t.children))for(n=0;n<t.children.length;++n)b(t.children[n])}function w(t,e,n,r){for(;n<=r;++n){var o=e[n];i(o)&&(i(o.tag)?(x(o),b(o)):a(o.elm))}}function x(t,e){if(i(e)||i(t.data)){var r,o=S.remove.length+1;for(i(e)?e.listeners+=o:e=n(t.elm,o),i(r=t.componentInstance)&&i(r=r._vnode)&&i(r.data)&&x(r,e),r=0;r<S.remove.length;++r)S.remove[r](t,e);i(r=t.data.hook)&&i(r=r.remove)?r(t,e):e()}else a(t.elm)}function _(t,e,n,o,a){for(var s,u,l,p,f=0,d=0,h=e.length-1,v=e[0],m=e[h],y=n.length-1,b=n[0],x=n[y],_=!a;f<=h&&d<=y;)r(v)?v=e[++f]:r(m)?m=e[--h]:bn(v,b)?(T(v,b,o,n,d),v=e[++f],b=n[++d]):bn(m,x)?(T(m,x,o,n,y),m=e[--h],x=n[--y]):bn(v,x)?(T(v,x,o,n,y),_&&j.insertBefore(t,v.elm,j.nextSibling(m.elm)),v=e[++f],x=n[--y]):bn(m,b)?(T(m,b,o,n,d),_&&j.insertBefore(t,m.elm,v.elm),m=e[--h],b=n[++d]):(r(s)&&(s=xn(e,f,h)),u=i(b.key)?s[b.key]:k(b,e,f,h),r(u)?c(b,o,t,v.elm,!1,n,d):(l=e[u],bn(l,b)?(T(l,b,o,n,d),e[u]=void 0,_&&j.insertBefore(t,l.elm,v.elm)):c(b,o,t,v.elm,!1,n,d)),b=n[++d]);f>h?(p=r(n[y+1])?null:n[y+1].elm,g(t,p,n,d,y,o)):d>y&&w(t,e,f,h)}function k(t,e,n,r){for(var o=n;o<r;o++){var a=e[o];if(i(a)&&bn(t,a))return o}}function T(t,e,n,a,s,c){if(t!==e){i(e.elm)&&i(a)&&(e=a[s]=$(e));var u=e.elm=t.elm;if(o(t.isAsyncPlaceholder))return void(i(e.asyncFactory.resolved)?E(t.elm,e,n):e.isAsyncPlaceholder=!0);if(o(e.isStatic)&&o(t.isStatic)&&e.key===t.key&&(o(e.isCloned)||o(e.isOnce)))return void(e.componentInstance=t.componentInstance);var l,p=e.data;i(p)&&i(l=p.hook)&&i(l=l.prepatch)&&l(t,e);var f=t.children,d=e.children;if(i(p)&&v(e)){for(l=0;l<S.update.length;++l)S.update[l](t,e);i(l=p.hook)&&i(l=l.update)&&l(t,e)}r(e.text)?i(f)&&i(d)?f!==d&&_(u,f,d,n,c):i(d)?(i(t.text)&&j.setTextContent(u,""),g(u,null,d,0,d.length-1,n)):i(f)?w(u,f,0,f.length-1):i(t.text)&&j.setTextContent(u,""):t.text!==e.text&&j.setTextContent(u,e.text),i(p)&&i(l=p.hook)&&i(l=l.postpatch)&&l(t,e)}}function O(t,e,n){if(o(n)&&i(t.parent))t.parent.data.pendingInsert=e;else for(var r=0;r<e.length;++r)e[r].data.hook.insert(e[r])}function E(t,e,n,r){var a,s=e.tag,c=e.data,u=e.children;if(r=r||c&&c.pre,e.elm=t,o(e.isComment)&&i(e.asyncFactory))return e.isAsyncPlaceholder=!0,!0;if(i(c)&&(i(a=c.hook)&&i(a=a.init)&&a(e,!0),i(a=e.componentInstance)))return l(e,n),!0;if(i(s)){if(i(u))if(t.hasChildNodes())if(i(a=c)&&i(a=a.domProps)&&i(a=a.innerHTML)){if(a!==t.innerHTML)return!1}else{for(var p=!0,f=t.firstChild,h=0;h<u.length;h++){if(!f||!E(f,u[h],n,r)){p=!1;break}f=f.nextSibling}if(!p||f)return!1}else d(e,u,n);if(i(c)){var v=!1;for(var y in c)if(!L(y)){v=!0,m(e,n);break}!v&&c.class&&lt(c.class)}}else t.data!==e.text&&(t.data=e.text);return!0}var C,A,S={},P=t.modules,j=t.nodeOps;for(C=0;C<ls.length;++C)for(S[ls[C]]=[],A=0;A<P.length;++A)i(P[A][ls[C]])&&S[ls[C]].push(P[A][ls[C]]);var L=h("attrs,class,staticClass,staticStyle,key");return function(t,n,a,s){if(r(n))return void(i(t)&&b(t));var u=!1,l=[];if(r(t))u=!0,c(n,l);else{var p=i(t.nodeType);if(!p&&bn(t,n))T(t,n,l,null,null,s);else{if(p){if(1===t.nodeType&&t.hasAttribute(To)&&(t.removeAttribute(To),a=!0),o(a)&&E(t,n,l))return O(n,l,!0),t;t=e(t)}var f=t.elm,d=j.parentNode(f);if(c(n,l,f._leaveCb?null:d,j.nextSibling(f)),i(n.parent))for(var h=n.parent,m=v(n);h;){for(var y=0;y<S.destroy.length;++y)S.destroy[y](h);if(h.elm=n.elm,m){for(var g=0;g<S.create.length;++g)S.create[g](us,h);var x=h.data.hook.insert;if(x.merged)for(var _=1;_<x.fns.length;_++)x.fns[_]()}else gn(h);h=h.parent}i(d)?w(d,[t],0,0):i(t.tag)&&b(t)}}return O(n,l,u),n.elm}}({nodeOps:ss,modules:Us});Io&&document.addEventListener("selectionchange",function(){var t=document.activeElement;t&&t.vmodel&&Ir(t,"input")});var Xs={inserted:function(t,e,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?ht(n,"postpatch",function(){Xs.componentUpdated(t,e,n)}):Sr(t,e,n.context),t._vOptions=[].map.call(t.options,Lr)):("textarea"===n.tag||as(t.type))&&(t._vModifiers=e.modifiers,e.modifiers.lazy||(t.addEventListener("compositionstart",Mr),t.addEventListener("compositionend",$r),t.addEventListener("change",$r),Io&&(t.vmodel=!0)))},componentUpdated:function(t,e,n){if("select"===n.tag){Sr(t,e,n.context);var r=t._vOptions,i=t._vOptions=[].map.call(t.options,Lr);i.some(function(t,e){return!T(t,r[e])})&&(t.multiple?e.value.some(function(t){return jr(t,i)}):e.value!==e.oldValue&&jr(e.value,i))&&Ir(t,"change")}}},zs={bind:function(t,e,n){var r=e.value;n=Nr(n);var i=n.data&&n.data.transition,o=t.__vOriginalDisplay="none"===t.style.display?"":t.style.display;r&&i?(n.data.show=!0,Tr(n,function(){t.style.display=o})):t.style.display=r?o:"none"},update:function(t,e,n){var r=e.value;!r!=!e.oldValue&&(n=Nr(n),n.data&&n.data.transition?(n.data.show=!0,r?Tr(n,function(){t.style.display=t.__vOriginalDisplay}):Or(n,function(){t.style.display="none"})):t.style.display=r?t.__vOriginalDisplay:"none")},unbind:function(t,e,n,r,i){i||(t.style.display=t.__vOriginalDisplay)}},Ys={model:Xs,show:zs},qs={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]},Vs=function(t){return t.tag||Tt(t)},Ws=function(t){return"show"===t.name},Gs={name:"transition",props:qs,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(Vs),n.length)){var r=this.mode,i=n[0];if(Br(this.$vnode))return i;var o=Dr(i);if(!o)return i;if(this._leaving)return Fr(t,i);var a="__transition-"+this._uid+"-";o.key=null==o.key?o.isComment?a+"comment":a+o.tag:s(o.key)?0===String(o.key).indexOf(a)?o.key:a+o.key:o.key;var c=(o.data||(o.data={})).transition=Rr(this),u=this._vnode,l=Dr(u);if(o.data.directives&&o.data.directives.some(Ws)&&(o.data.show=!0),l&&l.data&&!Ur(o,l)&&!Tt(l)&&(!l.componentInstance||!l.componentInstance._vnode.isComment)){var p=l.data.transition=x({},c);if("out-in"===r)return this._leaving=!0,ht(p,"afterLeave",function(){e._leaving=!1,e.$forceUpdate()}),Fr(t,i);if("in-out"===r){if(Tt(o))return u;var f,d=function(){f()};ht(c,"afterEnter",d),ht(c,"enterCancelled",d),ht(p,"delayLeave",function(t){f=t})}}return i}}},Ks=x({tag:String,moveClass:String},qs);delete Ks.mode;var Js={props:Ks,beforeMount:function(){var t=this,e=this._update;this._update=function(n,r){var i=$t(t);t.__patch__(t._vnode,t.kept,!1,!0),t._vnode=t.kept,i(),e.call(t,n,r)}},render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,i=this.$slots.default||[],o=this.children=[],a=Rr(this),s=0;s<i.length;s++){var c=i[s];c.tag&&null!=c.key&&0!==String(c.key).indexOf("__vlist")&&(o.push(c),n[c.key]=c,(c.data||(c.data={})).transition=a)}if(r){for(var u=[],l=[],p=0;p<r.length;p++){var f=r[p];f.data.transition=a,f.data.pos=f.elm.getBoundingClientRect(),n[f.key]?u.push(f):l.push(f)}this.kept=t(e,null,u),this.removed=l}return t(e,null,o)},updated:function(){var t=this.prevChildren,e=this.moveClass||(this.name||"v")+"-move";t.length&&this.hasMove(t[0].elm,e)&&(t.forEach(Hr),t.forEach(Xr),t.forEach(zr),this._reflow=document.body.offsetHeight,t.forEach(function(t){if(t.data.moved){var n=t.elm,r=n.style;gr(n,e),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener($s,n._moveCb=function t(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener($s,t),n._moveCb=null,br(n,e))})}}))},methods:{hasMove:function(t,e){if(!Ps)return!1;if(this._hasMove)return this._hasMove;var n=t.cloneNode();t._transitionClasses&&t._transitionClasses.forEach(function(t){vr(n,t)}),hr(n,e),n.style.display="none",this.$el.appendChild(n);var r=xr(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}},Qs={Transition:Gs,TransitionGroup:Js};Re.config.mustUseProp=Va,Re.config.isReservedTag=is,Re.config.isReservedAttr=Ya,Re.config.getTagNamespace=nn,Re.config.isUnknownElement=rn,x(Re.options.directives,Ys),x(Re.options.components,Qs),Re.prototype.__patch__=Po?Hs:k,Re.prototype.$mount=function(t,e){return t=t&&Po?on(t):void 0,Nt(this,t,e)},Po&&setTimeout(function(){Co.devtools&&zo&&zo.emit("init",Re)},0);var Zs,tc,ec,nc,rc,ic,oc,ac,sc,cc,uc,lc,pc=/\{\{((?:.|\r?\n)+?)\}\}/g,fc=/[-.*+?^${}()|[\]\/\\]/g,dc=y(function(t){var e=t[0].replace(fc,"\\$&"),n=t[1].replace(fc,"\\$&");return new RegExp(e+"((?:.|\\n)+?)"+n,"g")}),hc={staticKeys:["staticClass"],transformNode:qr,genData:Vr},vc={staticKeys:["staticStyle"],transformNode:Wr,genData:Gr},mc={decode:function(t){return Zs=Zs||document.createElement("div"),Zs.innerHTML=t,Zs.textContent}},yc=h("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),gc=h("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),bc=h("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),wc=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,xc="[a-zA-Z_][\\w\\-\\.]*",_c="((?:"+xc+"\\:)?"+xc+")",kc=new RegExp("^<"+_c),Tc=/^\s*(\/?)>/,Oc=new RegExp("^<\\/"+_c+"[^>]*>"),Ec=/^<!DOCTYPE [^>]+>/i,Cc=/^<!\--/,Ac=/^<!\[/,Sc=h("script,style,textarea",!0),Pc={},jc={"&lt;":"<","&gt;":">","&quot;":'"',"&amp;":"&","&#10;":"\n","&#9;":"\t"},Lc=/&(?:lt|gt|quot|amp);/g,Mc=/&(?:lt|gt|quot|amp|#10|#9);/g,$c=h("pre,textarea",!0),Ic=function(t,e){return t&&$c(t)&&"\n"===e[0]},Nc=/^@|^v-on:/,Dc=/^v-|^@|^:/,Rc=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Fc=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Bc=/^\(|\)$/g,Uc=/:(.*)$/,Hc=/^:|^v-bind:/,Xc=/\.[^.]+/g,zc=y(mc.decode),Yc=/^xmlns:NS\d+/,qc=/^NS\d+:/,Vc={preTransformNode:xi},Wc=[hc,vc,Vc],Gc={model:Kn,text:ki,html:Ti},Kc={expectHTML:!0,modules:Wc,directives:Gc,isPreTag:rs,isUnaryTag:yc,mustUseProp:Va,canBeLeftOpenTag:gc,isReservedTag:is,getTagNamespace:nn,staticKeys:function(t){return t.reduce(function(t,e){return t.concat(e.staticKeys||[])},[]).join(",")}(Wc)},Jc=y(Ei),Qc=/^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/,Zc=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,tu={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},eu={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},nu=function(t){return"if("+t+")return null;"},ru={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:nu("$event.target !== $event.currentTarget"),ctrl:nu("!$event.ctrlKey"),shift:nu("!$event.shiftKey"),alt:nu("!$event.altKey"),meta:nu("!$event.metaKey"),left:nu("'button' in $event && $event.button !== 0"),middle:nu("'button' in $event && $event.button !== 1"),right:nu("'button' in $event && $event.button !== 2")},iu={on:Ii,bind:Ni,cloak:k},ou=function(t){this.options=t,this.warn=t.warn||Mn,this.transforms=$n(t.modules,"transformCode"),this.dataGenFns=$n(t.modules,"genData"),this.directives=x(x({},iu),t.directives);var e=t.isReservedTag||_o;this.maybeComponent=function(t){return!(e(t.tag)&&!t.component)},this.onceId=0,this.staticRenderFns=[],this.pre=!1},au=(new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)"),function(t){return function(e){function n(n,r){var i=Object.create(e),o=[],a=[];if(i.warn=function(t,e){(e?a:o).push(t)},r){r.modules&&(i.modules=(e.modules||[]).concat(r.modules)),r.directives&&(i.directives=x(Object.create(e.directives||null),r.directives));for(var s in r)"modules"!==s&&"directives"!==s&&(i[s]=r[s])}var c=t(n,i);return c.errors=o,c.tips=a,c}return{compile:n,compileToFunctions:so(n)}}}(function(t,e){var n=Zr(t.trim(),e);!1!==e.optimize&&Oi(n,e);var r=Di(n,e);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}})),su=au(Kc),cu=(su.compile,su.compileToFunctions),uu=!!Po&&co(!1),lu=!!Po&&co(!0),pu=y(function(t){var e=on(t);return e&&e.innerHTML}),fu=Re.prototype.$mount;Re.prototype.$mount=function(t,e){if((t=t&&on(t))===document.body||t===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=pu(r));else{if(!r.nodeType)return this;r=r.innerHTML}else t&&(r=uo(t));if(r){var i=cu(r,{shouldDecodeNewlines:uu,shouldDecodeNewlinesForHref:lu,delimiters:n.delimiters,comments:n.comments},this),o=i.render,a=i.staticRenderFns;n.render=o,n.staticRenderFns=a}}return fu.call(this,t,e)},Re.compile=cu,e.a=Re}).call(e,n(3),n(19).setImmediate)},,,,function(t,e,n){"use strict";(function(e){function r(t,e){!i.isUndefined(t)&&i.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var i=n(0),o=n(27),a={"Content-Type":"application/x-www-form-urlencoded"},s={adapter:function(){var t;return"undefined"!=typeof XMLHttpRequest?t=n(12):void 0!==e&&(t=n(12)),t}(),transformRequest:[function(t,e){return o(e,"Content-Type"),i.isFormData(t)||i.isArrayBuffer(t)||i.isBuffer(t)||i.isStream(t)||i.isFile(t)||i.isBlob(t)?t:i.isArrayBufferView(t)?t.buffer:i.isURLSearchParams(t)?(r(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):i.isObject(t)?(r(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},i.forEach(["delete","get","head"],function(t){s.headers[t]={}}),i.forEach(["post","put","patch"],function(t){s.headers[t]=i.merge(a)}),t.exports=s}).call(e,n(9))},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(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 o(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&&d&&(v=!1,d.length?h=d.concat(h):m=-1,h.length&&s())}function s(){if(!v){var t=i(a);v=!0;for(var e=h.length;e;){for(d=h,h=[];++m<e;)d&&d[m].run();m=-1,e=h.length}d=null,v=!1,o(t)}}function c(t,e){this.fun=t,this.array=e}function u(){}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 d,h=[],v=!1,m=-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];h.push(new c(t,e)),1!==h.length||v||i(s)},c.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=u,f.addListener=u,f.once=u,f.off=u,f.removeListener=u,f.removeAllListeners=u,f.emit=u,f.prependListener=u,f.prependOnceListener=u,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){t.exports=n(24)},function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},function(t,e,n){"use strict";var r=n(0),i=n(28),o=n(30),a=n(31),s=n(32),c=n(13),u="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(33);t.exports=function(t){return new Promise(function(e,l){var p=t.data,f=t.headers;r.isFormData(p)&&delete f["Content-Type"];var d=new XMLHttpRequest,h="onreadystatechange",v=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in d||s(t.url)||(d=new window.XDomainRequest,h="onload",v=!0,d.onprogress=function(){},d.ontimeout=function(){}),t.auth){var m=t.auth.username||"",y=t.auth.password||"";f.Authorization="Basic "+u(m+":"+y)}if(d.open(t.method.toUpperCase(),o(t.url,t.params,t.paramsSerializer),!0),d.timeout=t.timeout,d[h]=function(){if(d&&(4===d.readyState||v)&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?a(d.getAllResponseHeaders()):null,r=t.responseType&&"text"!==t.responseType?d.response:d.responseText,o={data:r,status:1223===d.status?204:d.status,statusText:1223===d.status?"No Content":d.statusText,headers:n,config:t,request:d};i(e,l,o),d=null}},d.onerror=function(){l(c("Network Error",t,null,d)),d=null},d.ontimeout=function(){l(c("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var g=n(34),b=(t.withCredentials||s(t.url))&&t.xsrfCookieName?g.read(t.xsrfCookieName):void 0;b&&(f[t.xsrfHeaderName]=b)}if("setRequestHeader"in d&&r.forEach(f,function(t,e){void 0===p&&"content-type"===e.toLowerCase()?delete f[e]:d.setRequestHeader(e,t)}),t.withCredentials&&(d.withCredentials=!0),t.responseType)try{d.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&d.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){d&&(d.abort(),l(t),d=null)}),void 0===p&&(p=null),d.send(p)})}},function(t,e,n){"use strict";var r=n(29);t.exports=function(t,e,n,i,o){var a=new Error(t);return r(a,e,n,i,o)}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e){(function(e){t.exports=e}).call(e,{})},,,function(t,e,n){(function(t){function r(t,e){this._id=t,this._clearFn=e}var i=void 0!==t&&t||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;e.setTimeout=function(){return new r(o.call(setTimeout,i,arguments),clearTimeout)},e.setInterval=function(){return new r(o.call(setInterval,i,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(i,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(20),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(e,n(3))},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 u[c]=r,s(c),c++}function i(t){delete u[t]}function o(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=u[t];if(e){l=!0;try{o(e)}finally{i(t),l=!1}}}}if(!t.setImmediate){var s,c=1,u={},l=!1,p=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?function(){s=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),s=function(n){t.postMessage(e+n,"*")}}():t.MessageChannel?function(){var t=new MessageChannel;t.port1.onmessage=function(t){a(t.data)},s=function(e){t.port2.postMessage(e)}}():p&&"onreadystatechange"in p.createElement("script")?function(){var t=p.documentElement;s=function(e){var n=p.createElement("script");n.onreadystatechange=function(){a(e),n.onreadystatechange=null,t.removeChild(n),n=null},t.appendChild(n)}}():function(){s=function(t){setTimeout(a,0,t)}}(),f.setImmediate=r,f.clearImmediate=i}}("undefined"==typeof self?void 0===t?this:t:self)}).call(e,n(3),n(9))},function(t,e,n){"use strict";function r(t){return t&&DataView.prototype.isPrototypeOf(t)}function i(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function o(t){return"string"!=typeof t&&(t=String(t)),t}function a(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return x.iterable&&(e[Symbol.iterator]=function(){return e}),e}function s(t){this.map={},t instanceof s?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function c(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function u(t){return new Promise(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function l(t){var e=new FileReader,n=u(e);return e.readAsArrayBuffer(t),n}function p(t){var e=new FileReader,n=u(e);return e.readAsText(t),n}function f(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}function d(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(t){this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:x.blob&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:x.formData&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:x.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():x.arrayBuffer&&x.blob&&r(t)?(this._bodyArrayBuffer=d(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):x.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(t)||k(t))?this._bodyArrayBuffer=d(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):x.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},x.blob&&(this.blob=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(l)}),this.text=function(){var t=c(this);if(t)return t;if(this._bodyBlob)return p(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(f(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},x.formData&&(this.formData=function(){return this.text().then(y)}),this.json=function(){return this.text().then(JSON.parse)},this}function v(t){var e=t.toUpperCase();return T.indexOf(e)>-1?e:t}function m(t,e){e=e||{};var n=e.body;if(t instanceof m){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new s(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new s(e.headers)),this.method=v(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function y(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}}),e}function g(t){var e=new s;return t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}}),e}function b(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new s(e.headers),this.url=e.url||"",this._initBody(t)}function w(t,e){return new Promise(function(n,r){function i(){a.abort()}var o=new m(t,e);if(o.signal&&o.signal.aborted)return r(new E("Aborted","AbortError"));var a=new XMLHttpRequest;a.onload=function(){var t={status:a.status,statusText:a.statusText,headers:g(a.getAllResponseHeaders()||"")};t.url="responseURL"in a?a.responseURL:t.headers.get("X-Request-URL");var e="response"in a?a.response:a.responseText;n(new b(e,t))},a.onerror=function(){r(new TypeError("Network request failed"))},a.ontimeout=function(){r(new TypeError("Network request failed"))},a.onabort=function(){r(new E("Aborted","AbortError"))},a.open(o.method,o.url,!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&x.blob&&(a.responseType="blob"),o.headers.forEach(function(t,e){a.setRequestHeader(e,t)}),o.signal&&(o.signal.addEventListener("abort",i),a.onreadystatechange=function(){4===a.readyState&&o.signal.removeEventListener("abort",i)}),a.send(void 0===o._bodyInit?null:o._bodyInit)})}var x={searchParams:"URLSearchParams"in self,iterable:"Symbol"in self&&"iterator"in Symbol,blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in self,arrayBuffer:"ArrayBuffer"in self};if(x.arrayBuffer)var _=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],k=ArrayBuffer.isView||function(t){return t&&_.indexOf(Object.prototype.toString.call(t))>-1};s.prototype.append=function(t,e){t=i(t),e=o(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},s.prototype.delete=function(t){delete this.map[i(t)]},s.prototype.get=function(t){return t=i(t),this.has(t)?this.map[t]:null},s.prototype.has=function(t){return this.map.hasOwnProperty(i(t))},s.prototype.set=function(t,e){this.map[i(t)]=o(e)},s.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},s.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),a(t)},s.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),a(t)},s.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),a(t)},x.iterable&&(s.prototype[Symbol.iterator]=s.prototype.entries);var T=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},h.call(m.prototype),h.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new s(this.headers),url:this.url})},b.error=function(){var t=new b(null,{status:0,statusText:""});return t.type="error",t};var O=[301,302,303,307,308];b.redirect=function(t,e){if(-1===O.indexOf(e))throw new RangeError("Invalid status code");return new b(null,{status:e,headers:{location:t}})};var E=self.DOMException;try{new E}catch(t){E=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},E.prototype=Object.create(Error.prototype),E.prototype.constructor=E}w.polyfill=!0,self.fetch||(self.fetch=w,self.Headers=s,self.Request=m,self.Response=b)},,,function(t,e,n){"use strict";function r(t){var e=new a(t),n=o(a.prototype.request,e);return i.extend(n,a.prototype,e),i.extend(n,e),n}var i=n(0),o=n(11),a=n(26),s=n(8),c=r(s);c.Axios=a,c.create=function(t){return r(i.merge(s,t))},c.Cancel=n(15),c.CancelToken=n(40),c.isCancel=n(14),c.all=function(t){return Promise.all(t)},c.spread=n(41),t.exports=c,t.exports.default=c},function(t,e){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function r(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}/*!
7
+ * Determine if an object is a Buffer
8
+ *
9
+ * @author Feross Aboukhadijeh <https://feross.org>
10
+ * @license MIT
11
+ */
12
+ t.exports=function(t){return null!=t&&(n(t)||r(t)||!!t._isBuffer)}},function(t,e,n){"use strict";function r(t){this.defaults=t,this.interceptors={request:new a,response:new a}}var i=n(8),o=n(0),a=n(35),s=n(36);r.prototype.request=function(t){"string"==typeof t&&(t=o.merge({url:arguments[0]},arguments[1])),t=o.merge(i,{method:"get"},this.defaults,t),t.method=t.method.toLowerCase();var e=[s,void 0],n=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){e.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){e.push(t.fulfilled,t.rejected)});e.length;)n=n.then(e.shift(),e.shift());return n},o.forEach(["delete","get","head","options"],function(t){r.prototype[t]=function(e,n){return this.request(o.merge(n||{},{method:t,url:e}))}}),o.forEach(["post","put","patch"],function(t){r.prototype[t]=function(e,n,r){return this.request(o.merge(r||{},{method:t,url:e,data:n}))}}),t.exports=r},function(t,e,n){"use strict";var r=n(0);t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},function(t,e,n){"use strict";var r=n(13);t.exports=function(t,e,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t}},function(t,e,n){"use strict";function r(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var i=n(0);t.exports=function(t,e,n){if(!e)return t;var o;if(n)o=n(e);else if(i.isURLSearchParams(e))o=e.toString();else{var a=[];i.forEach(e,function(t,e){null!==t&&void 0!==t&&(i.isArray(t)?e+="[]":t=[t],i.forEach(t,function(t){i.isDate(t)?t=t.toISOString():i.isObject(t)&&(t=JSON.stringify(t)),a.push(r(e)+"="+r(t))}))}),o=a.join("&")}return o&&(t+=(-1===t.indexOf("?")?"?":"&")+o),t}},function(t,e,n){"use strict";var r=n(0),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,o,a={};return t?(r.forEach(t.split("\n"),function(t){if(o=t.indexOf(":"),e=r.trim(t.substr(0,o)).toLowerCase(),n=r.trim(t.substr(o+1)),e){if(a[e]&&i.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([n]):a[e]?a[e]+", "+n:n}}),a):a}},function(t,e,n){"use strict";var r=n(0);t.exports=r.isStandardBrowserEnv()?function(){function t(t){var e=t;return n&&(i.setAttribute("href",e),e=i.href),i.setAttribute("href",e),{href:i.href,protocol:i.protocol?i.protocol.replace(/:$/,""):"",host:i.host,search:i.search?i.search.replace(/^\?/,""):"",hash:i.hash?i.hash.replace(/^#/,""):"",hostname:i.hostname,port:i.port,pathname:"/"===i.pathname.charAt(0)?i.pathname:"/"+i.pathname}}var e,n=/(msie|trident)/i.test(navigator.userAgent),i=document.createElement("a");return e=t(window.location.href),function(n){var i=r.isString(n)?t(n):n;return i.protocol===e.protocol&&i.host===e.host}}():function(){return function(){return!0}}()},function(t,e,n){"use strict";function r(){this.message="String contains an invalid character"}function i(t){for(var e,n,i=String(t),a="",s=0,c=o;i.charAt(0|s)||(c="=",s%1);a+=c.charAt(63&e>>8-s%1*8)){if((n=i.charCodeAt(s+=.75))>255)throw new r;e=e<<8|n}return a}var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.prototype=new Error,r.prototype.code=5,r.prototype.name="InvalidCharacterError",t.exports=i},function(t,e,n){"use strict";var r=n(0);t.exports=r.isStandardBrowserEnv()?function(){return{write:function(t,e,n,i,o,a){var s=[];s.push(t+"="+encodeURIComponent(e)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(o)&&s.push("domain="+o),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(t,e,n){"use strict";function r(){this.handlers=[]}var i=n(0);r.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},r.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},r.prototype.forEach=function(t){i.forEach(this.handlers,function(e){null!==e&&t(e)})},t.exports=r},function(t,e,n){"use strict";function r(t){t.cancelToken&&t.cancelToken.throwIfRequested()}var i=n(0),o=n(37),a=n(14),s=n(8),c=n(38),u=n(39);t.exports=function(t){return r(t),t.baseURL&&!c(t.url)&&(t.url=u(t.baseURL,t.url)),t.headers=t.headers||{},t.data=o(t.data,t.headers,t.transformRequest),t.headers=i.merge(t.headers.common||{},t.headers[t.method]||{},t.headers||{}),i.forEach(["delete","get","head","post","put","patch","common"],function(e){delete t.headers[e]}),(t.adapter||s.adapter)(t).then(function(e){return r(t),e.data=o(e.data,e.headers,t.transformResponse),e},function(e){return a(e)||(r(t),e&&e.response&&(e.response.data=o(e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)})}},function(t,e,n){"use strict";var r=n(0);t.exports=function(t,e,n){return r.forEach(n,function(n){t=n(t,e)}),t}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";function r(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new i(t),e(n.reason))})}var i=n(15);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var t;return{token:new r(function(e){t=e}),cancel:t}},t.exports=r},function(t,e,n){"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},,,,function(t,e,n){!function(e,n){t.exports=function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,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(e.s="NHnr")}({"+E39":function(t,e,n){t.exports=!n("S82l")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"+ZMJ":function(t,e,n){var r=n("lOnJ");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,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},"+tPU":function(t,e,n){n("xGkn");for(var r=n("7KvD"),i=n("hJx8"),o=n("/bQp"),a=n("dSzd")("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c<s.length;c++){var u=s[c],l=r[u],p=l&&l.prototype;p&&!p[a]&&i(p,a,u),o[u]=o.Array}},"//Fk":function(t,e,n){t.exports={default:n("U5ju"),__esModule:!0}},"/bQp":function(t,e){t.exports={}},"/n6Q":function(t,e,n){n("zQR9"),n("+tPU"),t.exports=n("Kh4W").f("iterator")},"06OY":function(t,e,n){var r=n("3Eo+")("meta"),i=n("EqjI"),o=n("D2L2"),a=n("evD5").f,s=0,c=Object.isExtensible||function(){return!0},u=!n("S82l")(function(){return c(Object.preventExtensions({}))}),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},p=function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!c(t))return"F";if(!e)return"E";l(t)}return t[r].i},f=function(t,e){if(!o(t,r)){if(!c(t))return!0;if(!e)return!1;l(t)}return t[r].w},d=function(t){return u&&h.NEED&&c(t)&&!o(t,r)&&l(t),t},h=t.exports={KEY:r,NEED:!1,fastKey:p,getWeak:f,onFreeze:d}},"1kS7":function(t,e){e.f=Object.getOwnPropertySymbols},"2KxR":function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},"3Eo+":function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},"3fs2":function(t,e,n){var r=n("RY/4"),i=n("dSzd")("iterator"),o=n("/bQp");t.exports=n("FeBl").getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},"4mcu":function(t,e){t.exports=function(){}},"52gC":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"5QVw":function(t,e,n){t.exports={default:n("BwfY"),__esModule:!0}},"5zde":function(t,e,n){n("zQR9"),n("qyJz"),t.exports=n("FeBl").Array.from},"6cjq":function(t,e){},"77Pl":function(t,e,n){var r=n("EqjI");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},"7KvD":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)},"7UMu":function(t,e,n){var r=n("R9M2");t.exports=Array.isArray||function(t){return"Array"==r(t)}},"82Mu":function(t,e,n){var r=n("7KvD"),i=n("L42u").set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,c="process"==n("R9M2")(a);t.exports=function(){var t,e,n,u=function(){var r,i;for(c&&(r=a.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(u)};else if(!o||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var l=s.resolve();n=function(){l.then(u)}}else n=function(){i.call(r,u)};else{var p=!0,f=document.createTextNode("");new o(u).observe(f,{characterData:!0}),n=function(){f.data=p=!p}}return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},"880/":function(t,e,n){t.exports=n("hJx8")},"94VQ":function(t,e,n){"use strict";var r=n("Yobk"),i=n("X8DO"),o=n("e6n0"),a={};n("hJx8")(a,n("dSzd")("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},"9bBU":function(t,e,n){n("mClu");var r=n("FeBl").Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},"A/PA":function(t,e){},BO1k:function(t,e,n){t.exports={default:n("fxRn"),__esModule:!0}},BwfY:function(t,e,n){n("fWfb"),n("M6a0"),n("OYls"),n("QWe/"),t.exports=n("FeBl").Symbol},C4MV:function(t,e,n){t.exports={default:n("9bBU"),__esModule:!0}},CXw9:function(t,e,n){"use strict";var r,i,o,a,s=n("O4g8"),c=n("7KvD"),u=n("+ZMJ"),l=n("RY/4"),p=n("kM2E"),f=n("EqjI"),d=n("lOnJ"),h=n("2KxR"),v=n("NWt+"),m=n("t8x9"),y=n("L42u").set,g=n("82Mu")(),b=n("qARP"),w=n("dNDb"),x=n("fJUb"),_=c.TypeError,k=c.process,T=c.Promise,O="process"==l(k),E=function(){},C=i=b.f,A=!!function(){try{var t=T.resolve(1),e=(t.constructor={})[n("dSzd")("species")]=function(t){t(E,E)};return(O||"function"==typeof PromiseRejectionEvent)&&t.then(E)instanceof e}catch(t){}}(),S=function(t){var e;return!(!f(t)||"function"!=typeof(e=t.then))&&e},P=function(t,e){if(!t._n){t._n=!0;var n=t._c;g(function(){for(var r=t._v,i=1==t._s,o=0;n.length>o;)!function(e){var n,o,a=i?e.ok:e.fail,s=e.resolve,c=e.reject,u=e.domain;try{a?(i||(2==t._h&&M(t),t._h=1),!0===a?n=r:(u&&u.enter(),n=a(r),u&&u.exit()),n===e.promise?c(_("Promise-chain cycle")):(o=S(n))?o.call(n,s,c):s(n)):c(r)}catch(t){c(t)}}(n[o++]);t._c=[],t._n=!1,e&&!t._h&&j(t)})}},j=function(t){y.call(c,function(){var e,n,r,i=t._v,o=L(t);if(o&&(e=w(function(){O?k.emit("unhandledRejection",i,t):(n=c.onunhandledrejection)?n({promise:t,reason:i}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=O||L(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},L=function(t){return 1!==t._h&&0===(t._a||t._c).length},M=function(t){y.call(c,function(){var e;O?k.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})})},$=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),P(e,!0))},I=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw _("Promise can't be resolved itself");(e=S(t))?g(function(){var r={_w:n,_d:!1};try{e.call(t,u(I,r,1),u($,r,1))}catch(t){$.call(r,t)}}):(n._v=t,n._s=1,P(n,!1))}catch(t){$.call({_w:n,_d:!1},t)}}};A||(T=function(t){h(this,T,"Promise","_h"),d(t),r.call(this);try{t(u(I,this,1),u($,this,1))}catch(t){$.call(this,t)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n("xH/j")(T.prototype,{then:function(t,e){var n=C(m(this,T));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=O?k.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&P(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=u(I,t,1),this.reject=u($,t,1)},b.f=C=function(t){return t===T||t===a?new o(t):i(t)}),p(p.G+p.W+p.F*!A,{Promise:T}),n("e6n0")(T,"Promise"),n("bRrM")("Promise"),a=n("FeBl").Promise,p(p.S+p.F*!A,"Promise",{reject:function(t){var e=C(this);return(0,e.reject)(t),e.promise}}),p(p.S+p.F*(s||!A),"Promise",{resolve:function(t){return x(s&&this===a?T:this,t)}}),p(p.S+p.F*!(A&&n("dY0y")(function(t){T.all(t).catch(E)})),"Promise",{all:function(t){var e=this,n=C(e),r=n.resolve,i=n.reject,o=w(function(){var n=[],o=0,a=1;v(t,!1,function(t){var s=o++,c=!1;n.push(void 0),a++,e.resolve(t).then(function(t){c||(c=!0,n[s]=t,--a||r(n))},i)}),--a||r(n)});return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=C(e),r=n.reject,i=w(function(){v(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},Cdx3:function(t,e,n){var r=n("sB3e"),i=n("lktj");n("uqUo")("keys",function(){return function(t){return i(r(t))}})},D2L2:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},EGZi:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},EqBC:function(t,e,n){"use strict";var r=n("kM2E"),i=n("FeBl"),o=n("7KvD"),a=n("t8x9"),s=n("fJUb");r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,i.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then(function(){return n})}:t,n?function(n){return s(e,t()).then(function(){throw n})}:t)}})},EqjI:function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},FeBl:function(t,e){var n=t.exports={version:"2.5.3"};"number"==typeof __e&&(__e=n)},Gu7T:function(t,e,n){"use strict";e.__esModule=!0;var r=n("c/Tr"),i=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return(0,i.default)(t)}},Ibhu:function(t,e,n){var r=n("D2L2"),i=n("TcQ7"),o=n("vFc/")(!1),a=n("ax3d")("IE_PROTO");t.exports=function(t,e){var n,s=i(t),c=0,u=[];for(n in s)n!=a&&r(s,n)&&u.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~o(u,n)||u.push(n));return u}},Kh4W:function(t,e,n){e.f=n("dSzd")},L42u:function(t,e,n){var r,i,o,a=n("+ZMJ"),s=n("knuC"),c=n("RPLV"),u=n("ON07"),l=n("7KvD"),p=l.process,f=l.setImmediate,d=l.clearImmediate,h=l.MessageChannel,v=l.Dispatch,m=0,y={},g=function(){var t=+this;if(y.hasOwnProperty(t)){var e=y[t];delete y[t],e()}},b=function(t){g.call(t.data)};f&&d||(f=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return y[++m]=function(){s("function"==typeof t?t:Function(t),e)},r(m),m},d=function(t){delete y[t]},"process"==n("R9M2")(p)?r=function(t){p.nextTick(a(g,t,1))}:v&&v.now?r=function(t){v.now(a(g,t,1))}:h?(i=new h,o=i.port2,i.port1.onmessage=b,r=a(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",b,!1)):r="onreadystatechange"in u("script")?function(t){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),g.call(t)}}:function(t){setTimeout(a(g,t,1),0)}),t.exports={set:f,clear:d}},LKZe:function(t,e,n){var r=n("NpIQ"),i=n("X8DO"),o=n("TcQ7"),a=n("MmMw"),s=n("D2L2"),c=n("SfB7"),u=Object.getOwnPropertyDescriptor;e.f=n("+E39")?u:function(t,e){if(t=o(t),e=a(e,!0),c)try{return u(t,e)}catch(t){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},M6a0:function(t,e){},MU5D:function(t,e,n){var r=n("R9M2");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},Mhyx:function(t,e,n){var r=n("/bQp"),i=n("dSzd")("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},MmMw:function(t,e,n){var r=n("EqjI");t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},NHnr:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("woOf"),i=n.n(r),o=n("bOdI"),a=n.n(o),s=n("fZjL"),c=n.n(s),u=n("//Fk"),l=n.n(u),p=n("Zrlr"),f=n.n(p),d=n("wxAW"),h=n.n(d),v=(n("Yo6p"),function(){function t(e){if(f()(this,t),this.document={},void 0===e)throw new Error("The document object does not exist!");this.document=e}return h()(t,[{key:"getElements",value:function(t){var e=this.document.querySelectorAll(t);return e&&e.length>0?[].slice.call(e):[]}},{key:"getElement",value:function(t){return this.document.querySelector(t)}}]),t}()),m=v,y={Dom:m},g=(n("A/PA"),n("Gu7T")),b=n.n(g),w=n("BO1k"),x=n.n(w),_=(n("h1D1"),n("siA7"),function(){function t(e){f()(this,t),this.bottle={},this.container={},this.bottle=e,this.container=e.container}return h()(t,[{key:"get",value:function(t){var e=this.container[t];if(!e)throw new Error(t+" service does not exists!");return e}},{key:"export",value:function(){return this.container}}]),t}()),k=_,T=n("pFYg"),O=n.n(T),E=function(){function t(){f()(this,t)}return h()(t,null,[{key:"getArguments",value:function(t){if(!this.isFunction(t))return!1;var e=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,n=/([^\s,]+)/g,r=t.toString().replace(e,""),i=r.slice(r.indexOf("(")+1,r.indexOf(")")).match(n);return null===i&&(i=[]),i}},{key:"isFunction",value:function(t){return t&&"[object Function]"==={}.toString.call(t)}},{key:"isClass",value:function(t){if("function"!=typeof t)return!1;try{return t(),!1}catch(t){return t.message,/constructor/.test(t.message)||/class as/.test(t.message)}}},{key:"log",value:function(e){t.getArguments(e),void 0===e||O()(e),e.toString(),t.isClass(e)}},{key:"isAnonymous",value:function(t){var e=t.toString().match(/^function ([^\s]+) \(\)/);return!e||!e[1]}}]),t}(),C=E,A=function(){function t(e){f()(this,t),this.Bottle=e}return h()(t,[{key:"make",value:function(t){var e=new this.Bottle,n=function(t,e,n){var r=e.split("."),i=n,o=!0,a=!1,s=void 0;try{for(var c,u=x()(r);!(o=(c=u.next()).done);o=!0){var l=c.value;if(!t.hasOwnProperty(l))return n;if(!(i=t[l]))return n}}catch(t){a=!0,s=t}finally{try{!o&&u.return&&u.return()}finally{if(a)throw s}}return i},r=!0,i=!1,o=void 0;try{for(var a,s=x()(c()(t));!(r=(a=s.next()).done);r=!0){var u=a.value;!function(r){if(e.provider(r,function(){if(!C.isFunction(t[r]))return void(this.$get=function(){return t[r]});if(!t[r].$injectable)return void(this.$get=t[r]);var e=c()(t[r].$injectParams);this.$get=function(i){var o=e.reduce(function(e,o){var a=t[r].$injectParams[o].from,s=t[r].$injectParams[o].default;return e.push(n(i,a,s)),e},[]);return t[r].apply(t,b()(o))}}),t[r].$injectNewInstance){var i=c()(t[r].$injectParams),o=t[r].$injectAs||function(t){return t.charAt(0).toLowerCase()+t.slice(1)}(r);e.provider(o,function(){this.$get=function(e){var o=i.reduce(function(i,o){var a=t[r].$injectParams[o].from,s=t[r].$injectParams[o].default;return i.push(n(e,a,s)),i},[]);return new(Function.prototype.bind.apply(t[r],[null].concat(b()(o))))}})}}(u)}}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return new k(e)}}]),t}(),S=A,P=function(){function t(e,n){f()(this,t),this.containerFactory=e,this.services=n,this.plugins=[]}return h()(t,[{key:"use",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.plugins=t}},{key:"init",value:function(t){var e=this;return this._loadPlugins().then(function(n){e._runApplication(t,n)})}},{key:"_loadPlugins",value:function(){var t=this;return new l.a(function(e){t._allPluginsLoaded(t.plugins)?e(t._getLoadedPlugins(t.plugins)):window.UiFramework.subscribe("plugin-loaded",function(){t._allPluginsLoaded(t.plugins)&&e(t._getLoadedPlugins(t.plugins))})})}},{key:"_runApplication",value:function(t,e){var n=this;return this.services=e.reduce(function(t,e){return t=e.register(t)},this.services),this.container=this.containerFactory.make(this.services),e.forEach(function(t){return t.run(n.container)}),this._registerVues(t)}},{key:"_allPluginsLoaded",value:function(t){return t.reduce(function(t,e){return t&&!!window.UiFramework.plugins[e]},!0)}},{key:"_getLoadedPlugins",value:function(t){return t.map(function(t){return window.UiFramework.plugins[t]}).filter(function(t){return!!t}).sort(function(t,e){return t.priority-e.piority}).map(function(t){return t.plugin})}},{key:"_registerVues",value:function(t){var e=this,n=this.container.get("vue");if(!n.isInjectedComponentsInstalled)throw new Error("Injected Components plugin must be installed for UI Framework application");var r={},i=this.container.get("document"),o=new y.Dom(i),a=n.extend();return c()(t).map(function(n){r[n]=o.getElements(n).map(e._handleElement.bind(e,a,t[n]))}),r}},{key:"_handleElement",value:function(t,e,n){var r=new t({components:a()({},e,this.container.get(e)),provide:this.container.export()});return r.$mount(n),r}}]),t}(),j=P,L={install:function(t,e){var n=e.container;t.isInjectedComponentsInstalled=!0,t.mixin({created:function(){var t=this.$options.components;for(var e in t)if(t[e]&&"string"==typeof t[e]){var r=n[e];if(!r)throw new Error(e+" service is not defined!");t[e]=r}}})}},M={App:j,events:{},emit:function(t,e){if(this.events[t]){var n=!0,r=!1,i=void 0;try{for(var o,a=x()(this.events[t]);!(n=(o=a.next()).done);n=!0)(0,o.value)(e)}catch(t){r=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}}},subscribe:function(t,e){this.events[t]||(this.events[t]=[]),this.events[t].push(e)}},$={App:j,InjectedComponents:L,UiFramework:M},I=(n("6cjq"),function(){function t(e){f()(this,t),this.formatter=e}return h()(t,[{key:"translate",value:function(t,e,n){return this.formatter(t,e)}}]),t}()),N=I,D={FormatTranslator:N},R={Container:k,ContainerFactory:S},F=function(){function t(){f()(this,t),this.hooks={}}return h()(t,[{key:"register",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;this.hooks[t]=this.hooks[t]?this.hooks[t]:[],this.hooks[t].push({callback:e,priority:n})}},{key:"apply",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=this.hooks[t]?this.hooks[t]:[];return i=i.sort(function(t,e){return t.priority-e.priority}),i.reduce(function(t,n){return n.callback.call(e,t,r)},n)}}]),t}(),B=F,U={HookService:B};n.d(e,"Core",function(){return $}),n.d(e,"I18n",function(){return D}),n.d(e,"Container",function(){return R}),n.d(e,"Dom",function(){return y}),n.d(e,"Services",function(){return U}),window.UiFramework&&(window.UiFramework=i()({},window.UiFramework,$.UiFramework))},"NWt+":function(t,e,n){var r=n("+ZMJ"),i=n("msXi"),o=n("Mhyx"),a=n("77Pl"),s=n("QRG4"),c=n("3fs2"),u={},l={},e=t.exports=function(t,e,n,p,f){var d,h,v,m,y=f?function(){return t}:c(t),g=r(n,p,e?2:1),b=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(o(y)){for(d=s(t.length);d>b;b++)if((m=e?g(a(h=t[b])[0],h[1]):g(t[b]))===u||m===l)return m}else for(v=y.call(t);!(h=v.next()).done;)if((m=i(v,g,h.value,e))===u||m===l)return m};e.BREAK=u,e.RETURN=l},NpIQ:function(t,e){e.f={}.propertyIsEnumerable},O4g8:function(t,e){t.exports=!0},ON07:function(t,e,n){var r=n("EqjI"),i=n("7KvD").document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},OYls:function(t,e,n){n("crlp")("asyncIterator")},PzxK:function(t,e,n){var r=n("D2L2"),i=n("sB3e"),o=n("ax3d")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},QRG4:function(t,e,n){var r=n("UuGF"),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},"QWe/":function(t,e,n){n("crlp")("observable")},R4wc:function(t,e,n){var r=n("kM2E");r(r.S+r.F,"Object",{assign:n("To3L")})},R9M2:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},RPLV:function(t,e,n){var r=n("7KvD").document;t.exports=r&&r.documentElement},"RY/4":function(t,e,n){var r=n("R9M2"),i=n("dSzd")("toStringTag"),o="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),i))?n:o?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},Rrel:function(t,e,n){var r=n("TcQ7"),i=n("n0T6").f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return i(t)}catch(t){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?s(t):i(r(t))}},S82l:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},SfB7:function(t,e,n){t.exports=!n("+E39")&&!n("S82l")(function(){return 7!=Object.defineProperty(n("ON07")("div"),"a",{get:function(){return 7}}).a})},TcQ7:function(t,e,n){var r=n("MU5D"),i=n("52gC");t.exports=function(t){return r(i(t))}},To3L:function(t,e,n){"use strict";var r=n("lktj"),i=n("1kS7"),o=n("NpIQ"),a=n("sB3e"),s=n("MU5D"),c=Object.assign;t.exports=!c||n("S82l")(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r})?function(t,e){for(var n=a(t),c=arguments.length,u=1,l=i.f,p=o.f;c>u;)for(var f,d=s(arguments[u++]),h=l?r(d).concat(l(d)):r(d),v=h.length,m=0;v>m;)p.call(d,f=h[m++])&&(n[f]=d[f]);return n}:c},U5ju:function(t,e,n){n("M6a0"),n("zQR9"),n("+tPU"),n("CXw9"),n("EqBC"),n("jKW+"),t.exports=n("FeBl").Promise},UuGF:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},V3tA:function(t,e,n){n("R4wc"),t.exports=n("FeBl").Object.assign},X8DO:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},Xc4G:function(t,e,n){var r=n("lktj"),i=n("1kS7"),o=n("NpIQ");t.exports=function(t){var e=r(t),n=i.f;if(n)for(var a,s=n(t),c=o.f,u=0;s.length>u;)c.call(t,a=s[u++])&&e.push(a);return e}},Yo6p:function(t,e){},Yobk:function(t,e,n){var r=n("77Pl"),i=n("qio6"),o=n("xnc9"),a=n("ax3d")("IE_PROTO"),s=function(){},c=function(){var t,e=n("ON07")("iframe"),r=o.length;for(e.style.display="none",n("RPLV").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object<\/script>"),t.close(),c=t.F;r--;)delete c.prototype[o[r]];return c()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=r(t),n=new s,s.prototype=null,n[a]=t):n=c(),void 0===e?n:i(n,e)}},Zrlr:function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},Zzip:function(t,e,n){t.exports={default:n("/n6Q"),__esModule:!0}},ax3d:function(t,e,n){var r=n("e8AB")("keys"),i=n("3Eo+");t.exports=function(t){return r[t]||(r[t]=i(t))}},bOdI:function(t,e,n){"use strict";e.__esModule=!0;var r=n("C4MV"),i=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=function(t,e,n){return e in t?(0,i.default)(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},bRrM:function(t,e,n){"use strict";var r=n("7KvD"),i=n("FeBl"),o=n("evD5"),a=n("+E39"),s=n("dSzd")("species");t.exports=function(t){var e="function"==typeof i[t]?i[t]:r[t];a&&e&&!e[s]&&o.f(e,s,{configurable:!0,get:function(){return this}})}},"c/Tr":function(t,e,n){t.exports={default:n("5zde"),__esModule:!0}},crlp:function(t,e,n){var r=n("7KvD"),i=n("FeBl"),o=n("O4g8"),a=n("Kh4W"),s=n("evD5").f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},dNDb:function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},dSzd:function(t,e,n){var r=n("e8AB")("wks"),i=n("3Eo+"),o=n("7KvD").Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},dY0y:function(t,e,n){var r=n("dSzd")("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(t){}return n}},e6n0:function(t,e,n){var r=n("evD5").f,i=n("D2L2"),o=n("dSzd")("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},e8AB:function(t,e,n){var r=n("7KvD"),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return i[t]||(i[t]={})}},evD5:function(t,e,n){var r=n("77Pl"),i=n("SfB7"),o=n("MmMw"),a=Object.defineProperty;e.f=n("+E39")?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},fBQ2:function(t,e,n){"use strict";var r=n("evD5"),i=n("X8DO");t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},fJUb:function(t,e,n){var r=n("77Pl"),i=n("EqjI"),o=n("qARP");t.exports=function(t,e){if(r(t),i(e)&&e.constructor===t)return e;var n=o.f(t);return(0,n.resolve)(e),n.promise}},fWfb:function(t,e,n){"use strict";var r=n("7KvD"),i=n("D2L2"),o=n("+E39"),a=n("kM2E"),s=n("880/"),c=n("06OY").KEY,u=n("S82l"),l=n("e8AB"),p=n("e6n0"),f=n("3Eo+"),d=n("dSzd"),h=n("Kh4W"),v=n("crlp"),m=n("Xc4G"),y=n("7UMu"),g=n("77Pl"),b=n("EqjI"),w=n("TcQ7"),x=n("MmMw"),_=n("X8DO"),k=n("Yobk"),T=n("Rrel"),O=n("LKZe"),E=n("evD5"),C=n("lktj"),A=O.f,S=E.f,P=T.f,j=r.Symbol,L=r.JSON,M=L&&L.stringify,$=d("_hidden"),I=d("toPrimitive"),N={}.propertyIsEnumerable,D=l("symbol-registry"),R=l("symbols"),F=l("op-symbols"),B=Object.prototype,U="function"==typeof j,H=r.QObject,X=!H||!H.prototype||!H.prototype.findChild,z=o&&u(function(){return 7!=k(S({},"a",{get:function(){return S(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=A(B,e);r&&delete B[e],S(t,e,n),r&&t!==B&&S(B,e,r)}:S,Y=function(t){var e=R[t]=k(j.prototype);return e._k=t,e},q=U&&"symbol"==typeof j.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof j},V=function(t,e,n){return t===B&&V(F,e,n),g(t),e=x(e,!0),g(n),i(R,e)?(n.enumerable?(i(t,$)&&t[$][e]&&(t[$][e]=!1),n=k(n,{enumerable:_(0,!1)})):(i(t,$)||S(t,$,_(1,{})),t[$][e]=!0),z(t,e,n)):S(t,e,n)},W=function(t,e){g(t);for(var n,r=m(e=w(e)),i=0,o=r.length;o>i;)V(t,n=r[i++],e[n]);return t},G=function(t,e){return void 0===e?k(t):W(k(t),e)},K=function(t){var e=N.call(this,t=x(t,!0));return!(this===B&&i(R,t)&&!i(F,t))&&(!(e||!i(this,t)||!i(R,t)||i(this,$)&&this[$][t])||e)},J=function(t,e){if(t=w(t),e=x(e,!0),t!==B||!i(R,e)||i(F,e)){var n=A(t,e);return!n||!i(R,e)||i(t,$)&&t[$][e]||(n.enumerable=!0),n}},Q=function(t){for(var e,n=P(w(t)),r=[],o=0;n.length>o;)i(R,e=n[o++])||e==$||e==c||r.push(e);return r},Z=function(t){for(var e,n=t===B,r=P(n?F:w(t)),o=[],a=0;r.length>a;)!i(R,e=r[a++])||n&&!i(B,e)||o.push(R[e]);return o};U||(j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(n){this===B&&e.call(F,n),i(this,$)&&i(this[$],t)&&(this[$][t]=!1),z(this,t,_(1,n))};return o&&X&&z(B,t,{configurable:!0,set:e}),Y(t)},s(j.prototype,"toString",function(){return this._k}),O.f=J,E.f=V,n("n0T6").f=T.f=Q,n("NpIQ").f=K,n("1kS7").f=Z,o&&!n("O4g8")&&s(B,"propertyIsEnumerable",K,!0),h.f=function(t){return Y(d(t))}),a(a.G+a.W+a.F*!U,{Symbol:j});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;tt.length>et;)d(tt[et++]);for(var nt=C(d.store),rt=0;nt.length>rt;)v(nt[rt++]);a(a.S+a.F*!U,"Symbol",{for:function(t){return i(D,t+="")?D[t]:D[t]=j(t)},keyFor:function(t){if(!q(t))throw TypeError(t+" is not a symbol!");for(var e in D)if(D[e]===t)return e},useSetter:function(){X=!0},useSimple:function(){X=!1}}),a(a.S+a.F*!U,"Object",{create:G,defineProperty:V,defineProperties:W,getOwnPropertyDescriptor:J,getOwnPropertyNames:Q,getOwnPropertySymbols:Z}),L&&a(a.S+a.F*(!U||u(function(){var t=j();return"[null]"!=M([t])||"{}"!=M({a:t})||"{}"!=M(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(b(e)||void 0!==t)&&!q(t))return y(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!q(e))return e}),r[1]=e,M.apply(L,r)}}),j.prototype[I]||n("hJx8")(j.prototype,I,j.prototype.valueOf),p(j,"Symbol"),p(Math,"Math",!0),p(r.JSON,"JSON",!0)},fZjL:function(t,e,n){t.exports={default:n("jFbC"),__esModule:!0}},fkB2:function(t,e,n){var r=n("UuGF"),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},fxRn:function(t,e,n){n("+tPU"),n("zQR9"),t.exports=n("g8Ux")},g8Ux:function(t,e,n){var r=n("77Pl"),i=n("3fs2");t.exports=n("FeBl").getIterator=function(t){var e=i(t);if("function"!=typeof e)throw TypeError(t+" is not iterable!");return r(e.call(t))}},h1D1:function(t,e){},h65t:function(t,e,n){var r=n("UuGF"),i=n("52gC");t.exports=function(t){return function(e,n){var o,a,s=String(i(e)),c=r(n),u=s.length;return c<0||c>=u?t?"":void 0:(o=s.charCodeAt(c),o<55296||o>56319||c+1===u||(a=s.charCodeAt(c+1))<56320||a>57343?t?s.charAt(c):o:t?s.slice(c,c+2):a-56320+(o-55296<<10)+65536)}}},hJx8:function(t,e,n){var r=n("evD5"),i=n("X8DO");t.exports=n("+E39")?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},jFbC:function(t,e,n){n("Cdx3"),t.exports=n("FeBl").Object.keys},"jKW+":function(t,e,n){"use strict";var r=n("kM2E"),i=n("qARP"),o=n("dNDb");r(r.S,"Promise",{try:function(t){var e=i.f(this),n=o(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},kM2E:function(t,e,n){var r=n("7KvD"),i=n("FeBl"),o=n("+ZMJ"),a=n("hJx8"),s=function(t,e,n){var c,u,l,p=t&s.F,f=t&s.G,d=t&s.S,h=t&s.P,v=t&s.B,m=t&s.W,y=f?i:i[e]||(i[e]={}),g=y.prototype,b=f?r:d?r[e]:(r[e]||{}).prototype;f&&(n=e);for(c in n)(u=!p&&b&&void 0!==b[c])&&c in y||(l=u?b[c]:n[c],y[c]=f&&"function"!=typeof b[c]?n[c]:v&&u?o(l,r):m&&b[c]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):h&&"function"==typeof l?o(Function.call,l):l,h&&((y.virtual||(y.virtual={}))[c]=l,t&s.R&&g&&!g[c]&&a(g,c,l)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},knuC:function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},lOnJ:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},lktj:function(t,e,n){var r=n("Ibhu"),i=n("xnc9");t.exports=Object.keys||function(t){return r(t,i)}},mClu:function(t,e,n){var r=n("kM2E");r(r.S+r.F*!n("+E39"),"Object",{defineProperty:n("evD5").f})},msXi:function(t,e,n){var r=n("77Pl");t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},n0T6:function(t,e,n){var r=n("Ibhu"),i=n("xnc9").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},pFYg:function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n("Zzip"),o=r(i),a=n("5QVw"),s=r(a),c="function"==typeof s.default&&"symbol"==typeof o.default?function(t){return typeof t}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":typeof t};e.default="function"==typeof s.default&&"symbol"===c(o.default)?function(t){return void 0===t?"undefined":c(t)}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":void 0===t?"undefined":c(t)}},qARP:function(t,e,n){"use strict";function r(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=i(e),this.reject=i(n)}var i=n("lOnJ");t.exports.f=function(t){return new r(t)}},qio6:function(t,e,n){var r=n("evD5"),i=n("77Pl"),o=n("lktj");t.exports=n("+E39")?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,c=0;s>c;)r.f(t,n=a[c++],e[n]);return t}},qyJz:function(t,e,n){"use strict";var r=n("+ZMJ"),i=n("kM2E"),o=n("sB3e"),a=n("msXi"),s=n("Mhyx"),c=n("QRG4"),u=n("fBQ2"),l=n("3fs2");i(i.S+i.F*!n("dY0y")(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,i,p,f=o(t),d="function"==typeof this?this:Array,h=arguments.length,v=h>1?arguments[1]:void 0,m=void 0!==v,y=0,g=l(f);if(m&&(v=r(v,h>2?arguments[2]:void 0,2)),void 0==g||d==Array&&s(g))for(e=c(f.length),n=new d(e);e>y;y++)u(n,y,m?v(f[y],y):f[y]);else for(p=g.call(f),n=new d;!(i=p.next()).done;y++)u(n,y,m?a(p,v,[i.value,y],!0):i.value);return n.length=y,n}})},sB3e:function(t,e,n){var r=n("52gC");t.exports=function(t){return Object(r(t))}},siA7:function(t,e){},t8x9:function(t,e,n){var r=n("77Pl"),i=n("lOnJ"),o=n("dSzd")("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[o])?e:i(n)}},uqUo:function(t,e,n){var r=n("kM2E"),i=n("FeBl"),o=n("S82l");t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},"vFc/":function(t,e,n){var r=n("TcQ7"),i=n("QRG4"),o=n("fkB2");t.exports=function(t){return function(e,n,a){var s,c=r(e),u=i(c.length),l=o(a,u);if(t&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},"vIB/":function(t,e,n){"use strict";var r=n("O4g8"),i=n("kM2E"),o=n("880/"),a=n("hJx8"),s=n("D2L2"),c=n("/bQp"),u=n("94VQ"),l=n("e6n0"),p=n("PzxK"),f=n("dSzd")("iterator"),d=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,v,m,y,g){u(n,e,v);var b,w,x,_=function(t){if(!d&&t in E)return E[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},k=e+" Iterator",T="values"==m,O=!1,E=t.prototype,C=E[f]||E["@@iterator"]||m&&E[m],A=!d&&C||_(m),S=m?T?_("entries"):A:void 0,P="Array"==e?E.entries||C:C;if(P&&(x=p(P.call(new t)))!==Object.prototype&&x.next&&(l(x,k,!0),r||s(x,f)||a(x,f,h)),T&&C&&"values"!==C.name&&(O=!0,A=function(){return C.call(this)}),r&&!g||!d&&!O&&E[f]||a(E,f,A),c[e]=A,c[k]=h,m)if(b={values:T?A:_("values"),keys:y?A:_("keys"),entries:S},g)for(w in b)w in E||o(E,w,b[w]);else i(i.P+i.F*(d||O),e,b);return b}},woOf:function(t,e,n){t.exports={default:n("V3tA"),__esModule:!0}},wxAW:function(t,e,n){"use strict";e.__esModule=!0;var r=n("C4MV"),i=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=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),(0,i.default)(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}()},xGkn:function(t,e,n){"use strict";var r=n("4mcu"),i=n("EGZi"),o=n("/bQp"),a=n("TcQ7");t.exports=n("vIB/")(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):"keys"==e?i(0,n):"values"==e?i(0,t[n]):i(0,[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},"xH/j":function(t,e,n){var r=n("hJx8");t.exports=function(t,e,n){for(var i in e)n&&t[i]?t[i]=e[i]:r(t,i,e[i]);return t}},xnc9:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},zQR9:function(t,e,n){"use strict";var r=n("h65t")(!0);n("vIB/")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})}})}()}("undefined"!=typeof self&&self)},function(t,e,n){(function(t,r){var i;(function(o){"use strict";var a,s=0,c=Array.prototype.slice,u=function(t,e){var n=t[e];if(n===o&&a.config.strict)throw new Error("Bottle was unable to resolve a service. `"+e+"` is undefined.");return n},l=function(t){var e;return this.nested[t]||(e=a.pop(),this.nested[t]=e,this.factory(t,function(){return e.container})),this.nested[t]},p=function(t){return t.split(".").reduce(u,this)},f=function(t,e,n,r){var i={configurable:!0,enumerable:!0};return t.length?i.get=function(){var e=0,r=function(i){if(i)throw i;t[e]&&t[e++](n,r)};return r(),n}:(i.value=n,i.writable=!0),Object.defineProperty(r,e,i),r[e]},d=function(t,e){var n,r;return"function"==typeof t&&(e=t,t="__global__"),n=t.split("."),r=n.shift(),n.length?l.call(this,r).middleware(n.join("."),e):(this.middlewares[r]||(this.middlewares[r]=[]),this.middlewares[r].push(e)),this},h=function(t,e){return e(t)},v=function(t,e){return(t[e]||[]).concat(t.__global__||[])},m=function(t,e){var n,r,i,a,s;return this.id,i=this.container,a=this.decorators,s=this.middlewares,n=t+"Provider",r=Object.create(null),r[n]={configurable:!0,enumerable:!0,get:function(){var t=new e;return delete i[n],i[n]=t,t}},r[t]={configurable:!0,enumerable:!0,get:function(){var e,r=i[n];return r&&(e=v(a,t).reduce(h,r.$get(i)),delete i[n],delete i[t]),e===o?e:f(v(s,t),t,e,i)}},Object.defineProperties(i,r),this},y=function(t,e){var n,r;return n=t.split("."),this.providerMap[t]&&1===n.length&&!this.container[t+"Provider"]?console.error(t+" provider already instantiated."):(this.originalProviders[t]=e,this.providerMap[t]=!0,r=n.shift(),n.length?(l.call(this,r).provider(n.join("."),e),this):m.call(this,r,e))},g=function(t,e){return y.call(this,t,function(){this.$get=e})},b=function(t,e,n){var r=arguments.length>3?c.call(arguments,3):[],i=this;return g.call(this,t,function(){var t=e,o=r.map(p,i.container);return n?new(e.bind.apply(e,[null].concat(o))):t.apply(null,o)})},w=function(t,e){return b.apply(this,[t,e,!0].concat(c.call(arguments,2)))},x=function(t,e){return b.apply(this,[t,e,!1].concat(c.call(arguments,2)))},_=function(t,e){Object.defineProperty(this,t,{configurable:!0,enumerable:!0,value:e,writable:!0})},k=function(t,e){var n=t[e];return n||(n={},_.call(t,e,n)),n},T=function(t,e){var n;return n=t.split("."),t=n.pop(),_.call(n.reduce(k,this.container),t,e),this},O=function(t,e){Object.defineProperty(this,t,{configurable:!1,enumerable:!0,value:e,writable:!1})},E=function(t,e){var n=t.split(".");return t=n.pop(),O.call(n.reduce(k,this.container),t,e),this},C=function(t,e){var n,r;return"function"==typeof t&&(e=t,t="__global__"),n=t.split("."),r=n.shift(),n.length?l.call(this,r).decorator(n.join("."),e):(this.decorators[r]||(this.decorators[r]=[]),this.decorators[r].push(e)),this},A=function(t){return this.deferred.push(t),this},S=function(t){return(t||[]).map(p,this.container)},P=function(t,e){return g.call(this,t,function(t){return{instance:e.bind(e,t)}})},j=function(t){return!/^\$(?:decorator|register|list)$|Provider$/.test(t)},L=function(t){return Object.keys(t||this.container||{}).filter(j)},M={},$=function(t){var e;return"string"==typeof t?(e=M[t],e||(M[t]=e=new a,e.constant("BOTTLE_NAME",t)),e):new a},I=function(t){"string"==typeof t?delete M[t]:M={}},N=function(t){var e=t.$value===o?t:t.$value;return this[t.$type||"service"].apply(this,[t.$name,e].concat(t.$inject||[]))},D=function(t){delete this.providerMap[t],delete this.container[t],delete this.container[t+"Provider"]},R=function(t){var e=this.originalProviders,n=Array.isArray(t);Object.keys(this.originalProviders).forEach(function(r){if(!n||-1!==t.indexOf(r)){var i=r.split(".");i.length>1&&i.forEach(D,l.call(this,i[0])),D.call(this,r),this.provider(r,e[r])}},this)},F=function(t){return this.deferred.forEach(function(e){e(t)}),this};a=function t(e){if(!(this instanceof t))return t.pop(e);this.id=s++,this.decorators={},this.middlewares={},this.nested={},this.providerMap={},this.originalProviders={},this.deferred=[],this.container={$decorator:C.bind(this),$register:N.bind(this),$list:L.bind(this)}},a.prototype={constant:E,decorator:C,defer:A,digest:S,factory:g,instanceFactory:P,list:L,middleware:d,provider:y,resetProviders:R,register:N,resolve:F,service:w,serviceFactory:x,value:T},a.pop=$,a.clear=I,a.list=L,a.config={strict:!1};var B={function:!0,object:!0};!function(s){var c=B[typeof e]&&e&&!e.nodeType&&e,u=B[typeof t]&&t&&!t.nodeType&&t,l=u&&u.exports===c&&c,p=B[typeof r]&&r;!p||p.global!==p&&p.window!==p||(s=p),"object"==typeof n(16)&&n(16)?(s.Bottle=a,(i=function(){return a}.call(e,n,e,t))!==o&&(t.exports=i)):c&&u?l?(u.exports=a).Bottle=a:c.Bottle=a:s.Bottle=a}(B[typeof window]&&window||this)}).call(this)}).call(e,n(47)(t),n(3))},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){!function(e,n){t.exports=function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,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="/dist/",e(e.s=6)}([function(t,e,n){"use strict";function r(){d=!1}function i(t){if(!t)return void(p!==v&&(p=v,r()));if(t!==p){if(t.length!==v.length)throw new Error("Custom alphabet for shortid must be "+v.length+" unique characters. You submitted "+t.length+" characters: "+t);var e=t.split("").filter(function(t,e,n){return e!==n.lastIndexOf(t)});if(e.length)throw new Error("Custom alphabet for shortid must be "+v.length+" unique characters. These characters were not unique: "+e.join(", "));p=t,r()}}function o(t){return i(t),p}function a(t){h.seed(t),f!==t&&(r(),f=t)}function s(){p||i(v);for(var t,e=p.split(""),n=[],r=h.nextValue();e.length>0;)r=h.nextValue(),t=Math.floor(r*e.length),n.push(e.splice(t,1)[0]);return n.join("")}function c(){return d||(d=s())}function u(t){return c()[t]}function l(){return p||v}var p,f,d,h=n(19),v="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-";t.exports={get:l,characters:o,seed:a,lookup:u,shuffled:c}},function(t,e,n){"use strict";var r=n(5),i=n.n(r);e.a={animateIn:function(t){i()({targets:t,translateY:"-35px",opacity:1,duration:300,easing:"easeOutCubic"})},animateOut:function(t,e){i()({targets:t,opacity:0,marginTop:"-40px",duration:300,easing:"easeOutExpo",complete:e})},animateOutBottom:function(t,e){i()({targets:t,opacity:0,marginBottom:"-40px",duration:300,easing:"easeOutExpo",complete:e})},animateReset:function(t){i()({targets:t,left:0,opacity:1,duration:300,easing:"easeOutExpo"})},animatePanning:function(t,e,n){i()({targets:t,duration:10,easing:"easeOutQuad",left:e,opacity:n})},animatePanEnd:function(t,e){i()({targets:t,opacity:0,duration:300,easing:"easeOutExpo",complete:e})},clearAnimation:function(t){var e=i.a.timeline();t.forEach(function(t){e.add({targets:t.el,opacity:0,right:"-40px",duration:300,offset:"-=150",easing:"easeOutExpo",complete:function(){t.remove()}})})}}},function(t,e,n){"use strict";t.exports=n(16)},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n(8),i=n(1),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},a=n(2);n(11).polyfill();var s=function t(e){var n=this;return this.id=a.generate(),this.options=e,this.cached_options={},this.global={},this.groups=[],this.toasts=[],u(this),this.group=function(e){e||(e={}),e.globalToasts||(e.globalToasts={}),Object.assign(e.globalToasts,n.global);var r=new t(e);return n.groups.push(r),r},this.register=function(t,e,r){return r=r||{},l(n,t,e,r)},this.show=function(t,e){return c(n,t,e)},this.success=function(t,e){return e=e||{},e.type="success",c(n,t,e)},this.info=function(t,e){return e=e||{},e.type="info",c(n,t,e)},this.error=function(t,e){return e=e||{},e.type="error",c(n,t,e)},this.remove=function(t){n.toasts=n.toasts.filter(function(e){return e.el.hash!==t.hash}),t.parentNode&&t.parentNode.removeChild(t)},this.clear=function(t){return i.a.clearAnimation(n.toasts,function(){t&&t()}),n.toasts=[],!0},this},c=function(t,e,i){i=i||{};var a=null;if("object"!==(void 0===i?"undefined":o(i)))return console.error("Options should be a type of object. given : "+i),null;t.options.singleton&&t.toasts.length>0&&(t.cached_options=i,t.toasts[t.toasts.length-1].goAway(0));var s=Object.assign({},t.options);return Object.assign(s,i),a=n.i(r.a)(t,e,s),t.toasts.push(a),a},u=function(t){var e=t.options.globalToasts,n=function(e,n){return"string"==typeof n&&t[n]?t[n].apply(t,[e,{}]):c(t,e,n)};e&&(t.global={},Object.keys(e).forEach(function(r){t.global[r]=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e[r].apply(null,[t,n])}}))},l=function(t,e,n,r){t.options.globalToasts||(t.options.globalToasts={}),t.options.globalToasts[e]=function(t,e){var i=null;return"string"==typeof n&&(i=n),"function"==typeof n&&(i=n(t)),e(i,r)},u(t)}},function(t,e,n){n(22);var r=n(21)(null,null,null,null);t.exports=r.exports},function(t,e,n){(function(n){var r,i,o,a={scope:{}};a.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(t,e,n){if(n.get||n.set)throw new TypeError("ES3 does not support getters and setters.");t!=Array.prototype&&t!=Object.prototype&&(t[e]=n.value)},a.getGlobal=function(t){return"undefined"!=typeof window&&window===t?t:void 0!==n&&null!=n?n:t},a.global=a.getGlobal(this),a.SYMBOL_PREFIX="jscomp_symbol_",a.initSymbol=function(){a.initSymbol=function(){},a.global.Symbol||(a.global.Symbol=a.Symbol)},a.symbolCounter_=0,a.Symbol=function(t){return a.SYMBOL_PREFIX+(t||"")+a.symbolCounter_++},a.initSymbolIterator=function(){a.initSymbol();var t=a.global.Symbol.iterator;t||(t=a.global.Symbol.iterator=a.global.Symbol("iterator")),"function"!=typeof Array.prototype[t]&&a.defineProperty(Array.prototype,t,{configurable:!0,writable:!0,value:function(){return a.arrayIterator(this)}}),a.initSymbolIterator=function(){}},a.arrayIterator=function(t){var e=0;return a.iteratorPrototype(function(){return e<t.length?{done:!1,value:t[e++]}:{done:!0}})},a.iteratorPrototype=function(t){return a.initSymbolIterator(),t={next:t},t[a.global.Symbol.iterator]=function(){return this},t},a.array=a.array||{},a.iteratorFromArray=function(t,e){a.initSymbolIterator(),t instanceof String&&(t+="");var n=0,r={next:function(){if(n<t.length){var i=n++;return{value:e(i,t[i]),done:!1}}return r.next=function(){return{done:!0,value:void 0}},r.next()}};return r[Symbol.iterator]=function(){return r},r},a.polyfill=function(t,e,n,r){if(e){for(n=a.global,t=t.split("."),r=0;r<t.length-1;r++){var i=t[r];i in n||(n[i]={}),n=n[i]}t=t[t.length-1],r=n[t],(e=e(r))!=r&&null!=e&&a.defineProperty(n,t,{configurable:!0,writable:!0,value:e})}},a.polyfill("Array.prototype.keys",function(t){return t||function(){return a.iteratorFromArray(this,function(t){return t})}},"es6-impl","es3");var s=this;!function(n,a){i=[],r=a,void 0!==(o="function"==typeof r?r.apply(e,i):r)&&(t.exports=o)}(0,function(){function t(t){if(!R.col(t))try{return document.querySelectorAll(t)}catch(t){}}function e(t,e){for(var n=t.length,r=2<=arguments.length?arguments[1]:void 0,i=[],o=0;o<n;o++)if(o in t){var a=t[o];e.call(r,a,o,t)&&i.push(a)}return i}function n(t){return t.reduce(function(t,e){return t.concat(R.arr(e)?n(e):e)},[])}function r(e){return R.arr(e)?e:(R.str(e)&&(e=t(e)||e),e instanceof NodeList||e instanceof HTMLCollection?[].slice.call(e):[e])}function i(t,e){return t.some(function(t){return t===e})}function o(t){var e,n={};for(e in t)n[e]=t[e];return n}function a(t,e){var n,r=o(t);for(n in t)r[n]=e.hasOwnProperty(n)?e[n]:t[n];return r}function c(t,e){var n,r=o(t);for(n in e)r[n]=R.und(t[n])?e[n]:t[n];return r}function u(t){t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(t,e,n,r){return e+e+n+n+r+r});var e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);t=parseInt(e[1],16);var n=parseInt(e[2],16),e=parseInt(e[3],16);return"rgba("+t+","+n+","+e+",1)"}function l(t){function e(t,e,n){return 0>n&&(n+=1),1<n&&--n,n<1/6?t+6*(e-t)*n:.5>n?e:n<2/3?t+(e-t)*(2/3-n)*6:t}var n=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(t);t=parseInt(n[1])/360;var r=parseInt(n[2])/100,i=parseInt(n[3])/100,n=n[4]||1;if(0==r)i=r=t=i;else{var o=.5>i?i*(1+r):i+r-i*r,a=2*i-o,i=e(a,o,t+1/3),r=e(a,o,t);t=e(a,o,t-1/3)}return"rgba("+255*i+","+255*r+","+255*t+","+n+")"}function p(t){if(t=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(t))return t[2]}function f(t){return-1<t.indexOf("translate")||"perspective"===t?"px":-1<t.indexOf("rotate")||-1<t.indexOf("skew")?"deg":void 0}function d(t,e){return R.fnc(t)?t(e.target,e.id,e.total):t}function h(t,e){if(e in t.style)return getComputedStyle(t).getPropertyValue(e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())||"0"}function v(t,e){return R.dom(t)&&i(D,e)?"transform":R.dom(t)&&(t.getAttribute(e)||R.svg(t)&&t[e])?"attribute":R.dom(t)&&"transform"!==e&&h(t,e)?"css":null!=t[e]?"object":void 0}function m(t,n){var r=f(n),r=-1<n.indexOf("scale")?1:0+r;if(!(t=t.style.transform))return r;for(var i=[],o=[],a=[],s=/(\w+)\((.+?)\)/g;i=s.exec(t);)o.push(i[1]),a.push(i[2]);return t=e(a,function(t,e){return o[e]===n}),t.length?t[0]:r}function y(t,e){switch(v(t,e)){case"transform":return m(t,e);case"css":return h(t,e);case"attribute":return t.getAttribute(e)}return t[e]||0}function g(t,e){var n=/^(\*=|\+=|-=)/.exec(t);if(!n)return t;var r=p(t)||0;switch(e=parseFloat(e),t=parseFloat(t.replace(n[0],"")),n[0][0]){case"+":return e+t+r;case"-":return e-t+r;case"*":return e*t+r}}function b(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function w(t){t=t.points;for(var e,n=0,r=0;r<t.numberOfItems;r++){var i=t.getItem(r);0<r&&(n+=b(e,i)),e=i}return n}function x(t){if(t.getTotalLength)return t.getTotalLength();switch(t.tagName.toLowerCase()){case"circle":return 2*Math.PI*t.getAttribute("r");case"rect":return 2*t.getAttribute("width")+2*t.getAttribute("height");case"line":return b({x:t.getAttribute("x1"),y:t.getAttribute("y1")},{x:t.getAttribute("x2"),y:t.getAttribute("y2")});case"polyline":return w(t);case"polygon":var e=t.points;return w(t)+b(e.getItem(e.numberOfItems-1),e.getItem(0))}}function _(t,e){function n(n){return n=void 0===n?0:n,t.el.getPointAtLength(1<=e+n?e+n:0)}var r=n(),i=n(-1),o=n(1);switch(t.property){case"x":return r.x;case"y":return r.y;case"angle":return 180*Math.atan2(o.y-i.y,o.x-i.x)/Math.PI}}function k(t,e){var n,r=/-?\d*\.?\d+/g;if(n=R.pth(t)?t.totalLength:t,R.col(n))if(R.rgb(n)){var i=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(n);n=i?"rgba("+i[1]+",1)":n}else n=R.hex(n)?u(n):R.hsl(n)?l(n):void 0;else i=(i=p(n))?n.substr(0,n.length-i.length):n,n=e&&!/\s/g.test(n)?i+e:i;return n+="",{original:n,numbers:n.match(r)?n.match(r).map(Number):[0],strings:R.str(t)||e?n.split(r):[]}}function T(t){return t=t?n(R.arr(t)?t.map(r):r(t)):[],e(t,function(t,e,n){return n.indexOf(t)===e})}function O(t){var e=T(t);return e.map(function(t,n){return{target:t,id:n,total:e.length}})}function E(t,e){var n=o(e);if(R.arr(t)){var i=t.length;2!==i||R.obj(t[0])?R.fnc(e.duration)||(n.duration=e.duration/i):t={value:t}}return r(t).map(function(t,n){return n=n?0:e.delay,t=R.obj(t)&&!R.pth(t)?t:{value:t},R.und(t.delay)&&(t.delay=n),t}).map(function(t){return c(t,n)})}function C(t,e){var n,r={};for(n in t){var i=d(t[n],e);R.arr(i)&&(i=i.map(function(t){return d(t,e)}),1===i.length&&(i=i[0])),r[n]=i}return r.duration=parseFloat(r.duration),r.delay=parseFloat(r.delay),r}function A(t){return R.arr(t)?F.apply(this,t):B[t]}function S(t,e){var n;return t.tweens.map(function(r){r=C(r,e);var i=r.value,o=y(e.target,t.name),a=n?n.to.original:o,a=R.arr(i)?i[0]:a,s=g(R.arr(i)?i[1]:i,a),o=p(s)||p(a)||p(o);return r.from=k(a,o),r.to=k(s,o),r.start=n?n.end:t.offset,r.end=r.start+r.delay+r.duration,r.easing=A(r.easing),r.elasticity=(1e3-Math.min(Math.max(r.elasticity,1),999))/1e3,r.isPath=R.pth(i),r.isColor=R.col(r.from.original),r.isColor&&(r.round=1),n=r})}function P(t,r){return e(n(t.map(function(t){return r.map(function(e){var n=v(t.target,e.name);if(n){var r=S(e,t);e={type:n,property:e.name,animatable:t,tweens:r,duration:r[r.length-1].end,delay:r[0].delay}}else e=void 0;return e})})),function(t){return!R.und(t)})}function j(t,e,n,r){var i="delay"===t;return e.length?(i?Math.min:Math.max).apply(Math,e.map(function(e){return e[t]})):i?r.delay:n.offset+r.delay+r.duration}function L(t){var e,n=a(I,t),r=a(N,t),i=O(t.targets),o=[],s=c(n,r);for(e in t)s.hasOwnProperty(e)||"targets"===e||o.push({name:e,offset:s.offset,tweens:E(t[e],r)});return t=P(i,o),c(n,{children:[],animatables:i,animations:t,duration:j("duration",t,n,r),delay:j("delay",t,n,r)})}function M(t){function n(){return window.Promise&&new Promise(function(t){return p=t})}function r(t){return d.reversed?d.duration-t:t}function i(t){for(var n=0,r={},i=d.animations,o=i.length;n<o;){var a=i[n],s=a.animatable,c=a.tweens,u=c.length-1,l=c[u];u&&(l=e(c,function(e){return t<e.end})[0]||l);for(var c=Math.min(Math.max(t-l.start-l.delay,0),l.duration)/l.duration,p=isNaN(c)?1:l.easing(c,l.elasticity),c=l.to.strings,f=l.round,u=[],v=void 0,v=l.to.numbers.length,m=0;m<v;m++){var y=void 0,y=l.to.numbers[m],g=l.from.numbers[m],y=l.isPath?_(l.value,p*y):g+p*(y-g);f&&(l.isColor&&2<m||(y=Math.round(y*f)/f)),u.push(y)}if(l=c.length)for(v=c[0],p=0;p<l;p++)f=c[p+1],m=u[p],isNaN(m)||(v=f?v+(m+f):v+(m+" "));else v=u[0];U[a.type](s.target,a.property,v,r,s.id),a.currentValue=v,n++}if(n=Object.keys(r).length)for(i=0;i<n;i++)$||($=h(document.body,"transform")?"transform":"-webkit-transform"),d.animatables[i].target.style[$]=r[i].join(" ");d.currentTime=t,d.progress=t/d.duration*100}function o(t){d[t]&&d[t](d)}function a(){d.remaining&&!0!==d.remaining&&d.remaining--}function s(t){var e=d.duration,s=d.offset,h=s+d.delay,v=d.currentTime,m=d.reversed,y=r(t);if(d.children.length){var g=d.children,b=g.length;if(y>=d.currentTime)for(var w=0;w<b;w++)g[w].seek(y);else for(;b--;)g[b].seek(y)}(y>=h||!e)&&(d.began||(d.began=!0,o("begin")),o("run")),y>s&&y<e?i(y):(y<=s&&0!==v&&(i(0),m&&a()),(y>=e&&v!==e||!e)&&(i(e),m||a())),o("update"),t>=e&&(d.remaining?(u=c,"alternate"===d.direction&&(d.reversed=!d.reversed)):(d.pause(),d.completed||(d.completed=!0,o("complete"),"Promise"in window&&(p(),f=n()))),l=0)}t=void 0===t?{}:t;var c,u,l=0,p=null,f=n(),d=L(t);return d.reset=function(){var t=d.direction,e=d.loop;for(d.currentTime=0,d.progress=0,d.paused=!0,d.began=!1,d.completed=!1,d.reversed="reverse"===t,d.remaining="alternate"===t&&1===e?2:e,i(0),t=d.children.length;t--;)d.children[t].reset()},d.tick=function(t){c=t,u||(u=c),s((l+c-u)*M.speed)},d.seek=function(t){s(r(t))},d.pause=function(){var t=H.indexOf(d);-1<t&&H.splice(t,1),d.paused=!0},d.play=function(){d.paused&&(d.paused=!1,u=0,l=r(d.currentTime),H.push(d),X||z())},d.reverse=function(){d.reversed=!d.reversed,u=0,l=r(d.currentTime)},d.restart=function(){d.pause(),d.reset(),d.play()},d.finished=f,d.reset(),d.autoplay&&d.play(),d}var $,I={update:void 0,begin:void 0,run:void 0,complete:void 0,loop:1,direction:"normal",autoplay:!0,offset:0},N={duration:1e3,delay:0,easing:"easeOutElastic",elasticity:500,round:0},D="translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "),R={arr:function(t){return Array.isArray(t)},obj:function(t){return-1<Object.prototype.toString.call(t).indexOf("Object")},pth:function(t){return R.obj(t)&&t.hasOwnProperty("totalLength")},svg:function(t){return t instanceof SVGElement},dom:function(t){return t.nodeType||R.svg(t)},str:function(t){return"string"==typeof t},fnc:function(t){return"function"==typeof t},und:function(t){return void 0===t},hex:function(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)},rgb:function(t){return/^rgb/.test(t)},hsl:function(t){return/^hsl/.test(t)},col:function(t){return R.hex(t)||R.rgb(t)||R.hsl(t)}},F=function(){function t(t,e,n){return(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t}return function(e,n,r,i){if(0<=e&&1>=e&&0<=r&&1>=r){var o=new Float32Array(11);if(e!==n||r!==i)for(var a=0;11>a;++a)o[a]=t(.1*a,e,r);return function(a){if(e===n&&r===i)return a;if(0===a)return 0;if(1===a)return 1;for(var s=0,c=1;10!==c&&o[c]<=a;++c)s+=.1;--c;var c=s+(a-o[c])/(o[c+1]-o[c])*.1,u=3*(1-3*r+3*e)*c*c+2*(3*r-6*e)*c+3*e;if(.001<=u){for(s=0;4>s&&0!=(u=3*(1-3*r+3*e)*c*c+2*(3*r-6*e)*c+3*e);++s)var l=t(c,e,r)-a,c=c-l/u;a=c}else if(0===u)a=c;else{var c=s,s=s+.1,p=0;do{l=c+(s-c)/2,u=t(l,e,r)-a,0<u?s=l:c=l}while(1e-7<Math.abs(u)&&10>++p);a=l}return t(a,n,i)}}}}(),B=function(){function t(t,e){return 0===t||1===t?t:-Math.pow(2,10*(t-1))*Math.sin(2*(t-1-e/(2*Math.PI)*Math.asin(1))*Math.PI/e)}var e,n="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),r={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],t],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(e,n){return 1-t(1-e,n)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(e,n){return.5>e?t(2*e,n)/2:1-t(-2*e+2,n)/2}]},i={linear:F(.25,.25,.75,.75)},o={};for(e in r)o.type=e,r[o.type].forEach(function(t){return function(e,r){i["ease"+t.type+n[r]]=R.fnc(e)?e:F.apply(s,e)}}(o)),o={type:o.type};return i}(),U={css:function(t,e,n){return t.style[e]=n},attribute:function(t,e,n){return t.setAttribute(e,n)},object:function(t,e,n){return t[e]=n},transform:function(t,e,n,r,i){r[i]||(r[i]=[]),r[i].push(e+"("+n+")")}},H=[],X=0,z=function(){function t(){X=requestAnimationFrame(e)}function e(e){var n=H.length;if(n){for(var r=0;r<n;)H[r]&&H[r].tick(e),r++;t()}else cancelAnimationFrame(X),X=0}return t}();return M.version="2.2.0",M.speed=1,M.running=H,M.remove=function(t){t=T(t);for(var e=H.length;e--;)for(var n=H[e],r=n.animations,o=r.length;o--;)i(t,r[o].animatable.target)&&(r.splice(o,1),r.length||n.pause())},M.getValue=y,M.path=function(e,n){var r=R.str(e)?t(e)[0]:e,i=n||100;return function(t){return{el:r,property:t,totalLength:x(r)*(i/100)}}},M.setDashoffset=function(t){var e=x(t);return t.setAttribute("stroke-dasharray",e),e},M.bezier=F,M.easings=B,M.timeline=function(t){var e=M(t);return e.pause(),e.duration=0,e.add=function(n){return e.children.forEach(function(t){t.began=!0,t.completed=!0}),r(n).forEach(function(n){var r=c(n,a(N,t||{}));r.targets=r.targets||t.targets,n=e.duration;var i=r.offset;r.autoplay=!1,r.direction=e.direction,r.offset=R.und(i)?n:g(i,n),e.began=!0,e.completed=!0,e.seek(r.offset),r=M(r),r.began=!0,r.completed=!0,r.duration>n&&(e.duration=r.duration),e.children.push(r)}),e.seek(0),e.reset(),e.autoplay&&e.restart(),e},e},M.random=function(t,e){return Math.floor(Math.random()*(e-t+1))+t},M})}).call(e,n(25))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),i=n(4),o=n.n(i),a={install:function(t,e){e||(e={});var n=new r.a(e);t.component("toasted",o.a),t.toasted=t.prototype.$toasted=n}};"undefined"!=typeof window&&window.Vue&&(window.Toasted=a),e.default=a},function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n(1),i=this,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},a=function(t,e,n){return setTimeout(function(){if(n.cached_options.position&&n.cached_options.position.includes("bottom"))return void r.a.animateOutBottom(t,function(){n.remove(t)});r.a.animateOut(t,function(){n.remove(t)})},e),!0},s=function(t,e){return("object"===("undefined"==typeof HTMLElement?"undefined":o(HTMLElement))?e instanceof HTMLElement:e&&"object"===(void 0===e?"undefined":o(e))&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)?t.appendChild(e):t.innerHTML=e,i},c=function(t,e){var n=!1;return{el:t,text:function(e){return s(t,e),this},goAway:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:800;return n=!0,a(t,r,e)},remove:function(){e.remove(t)},disposed:function(){return n}}}},function(t,e,n){"use strict";var r=n(12),i=n.n(r),o=n(1),a=n(7),s="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},c=n(2);String.prototype.includes||Object.defineProperty(String.prototype,"includes",{value:function(t,e){return"number"!=typeof e&&(e=0),!(e+t.length>this.length)&&-1!==this.indexOf(t,e)}});var u={},l=null,p=function(t){return t.className=t.className||null,t.onComplete=t.onComplete||null,t.position=t.position||"top-right",t.duration=t.duration||null,t.theme=t.theme||"toasted-primary",t.type=t.type||"default",t.containerClass=t.containerClass||null,t.fullWidth=t.fullWidth||!1,t.icon=t.icon||null,t.action=t.action||null,t.fitToScreen=t.fitToScreen||null,t.closeOnSwipe=void 0===t.closeOnSwipe||t.closeOnSwipe,t.iconPack=t.iconPack||"material",t.className&&"string"==typeof t.className&&(t.className=t.className.split(" ")),t.className||(t.className=[]),t.theme&&t.className.push(t.theme.trim()),t.type&&t.className.push(t.type),t.containerClass&&"string"==typeof t.containerClass&&(t.containerClass=t.containerClass.split(" ")),t.containerClass||(t.containerClass=[]),t.position&&t.containerClass.push(t.position.trim()),t.fullWidth&&t.containerClass.push("full-width"),t.fitToScreen&&t.containerClass.push("fit-to-screen"),u=t,t},f=function(t,e){var r=document.createElement("div");if(r.classList.add("toasted"),r.hash=c.generate(),e.className&&e.className.forEach(function(t){r.classList.add(t)}),("object"===("undefined"==typeof HTMLElement?"undefined":s(HTMLElement))?t instanceof HTMLElement:t&&"object"===(void 0===t?"undefined":s(t))&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName)?r.appendChild(t):r.innerHTML=t,d(e,r),e.closeOnSwipe){var u=new i.a(r,{prevent_default:!1});u.on("pan",function(t){var e=t.deltaX;r.classList.contains("panning")||r.classList.add("panning");var n=1-Math.abs(e/80);n<0&&(n=0),o.a.animatePanning(r,e,n)}),u.on("panend",function(t){var n=t.deltaX;Math.abs(n)>80?o.a.animatePanEnd(r,function(){"function"==typeof e.onComplete&&e.onComplete(),r.parentNode&&l.remove(r)}):(r.classList.remove("panning"),o.a.animateReset(r))})}if(Array.isArray(e.action))e.action.forEach(function(t){var e=v(t,n.i(a.a)(r,l));e&&r.appendChild(e)});else if("object"===s(e.action)){var p=v(e.action,n.i(a.a)(r,l));p&&r.appendChild(p)}return r},d=function(t,e){if(t.icon){var n=document.createElement("i");switch(t.iconPack){case"fontawesome":n.classList.add("fa");var r=t.icon.name?t.icon.name:t.icon;r.includes("fa-")?n.classList.add(r.trim()):n.classList.add("fa-"+r.trim());break;case"mdi":n.classList.add("mdi");var i=t.icon.name?t.icon.name:t.icon;i.includes("mdi-")?n.classList.add(i.trim()):n.classList.add("mdi-"+i.trim());break;case"custom-class":var o=t.icon.name?t.icon.name:t.icon;"string"==typeof o?o.split(" ").forEach(function(t){n.classList.add(t)}):Array.isArray(o)&&o.forEach(function(t){n.classList.add(t.trim())});break;case"callback":var a=t.icon&&t.icon instanceof Function?t.icon:null;a&&(n=a(n));break;default:n.classList.add("material-icons"),n.textContent=t.icon.name?t.icon.name:t.icon}t.icon.after&&n.classList.add("after"),h(t,n,e)}},h=function(t,e,n){t.icon&&(t.icon.after&&t.icon.name?n.appendChild(e):(t.icon.name,n.insertBefore(e,n.firstChild)))},v=function(t,e){if(!t)return null;var n=document.createElement("a");if(n.classList.add("action"),n.classList.add("ripple"),t.text&&(n.text=t.text),t.href&&(n.href=t.href),t.target&&(n.target=t.target),t.icon){n.classList.add("icon");var r=document.createElement("i");switch(u.iconPack){case"fontawesome":r.classList.add("fa"),t.icon.includes("fa-")?r.classList.add(t.icon.trim()):r.classList.add("fa-"+t.icon.trim());break;case"mdi":r.classList.add("mdi"),t.icon.includes("mdi-")?r.classList.add(t.icon.trim()):r.classList.add("mdi-"+t.icon.trim());break;case"custom-class":"string"==typeof t.icon?t.icon.split(" ").forEach(function(t){n.classList.add(t)}):Array.isArray(t.icon)&&t.icon.forEach(function(t){n.classList.add(t.trim())});break;default:r.classList.add("material-icons"),r.textContent=t.icon}n.appendChild(r)}return t.class&&("string"==typeof t.class?t.class.split(" ").forEach(function(t){n.classList.add(t)}):Array.isArray(t.class)&&t.class.forEach(function(t){n.classList.add(t.trim())})),t.push&&n.addEventListener("click",function(n){n.preventDefault(),u.router&&(u.router.push(t.push),t.push.dontClose||e.goAway(0))}),t.onClick&&"function"==typeof t.onClick&&n.addEventListener("click",function(n){t.onClick&&(n.preventDefault(),t.onClick(n,e))}),n};e.a=function(t,e,r){l=t,r=p(r);var i=document.getElementById(l.id);null===i&&(i=document.createElement("div"),i.id=l.id,document.body.appendChild(i)),r.containerClass.unshift("toasted-container"),i.className!==r.containerClass.join(" ")&&(i.className="",r.containerClass.forEach(function(t){i.classList.add(t)}));var s=f(e,r);e&&i.appendChild(s),s.style.opacity=0,o.a.animateIn(s);var c=r.duration,u=void 0;return null!==c&&(u=setInterval(function(){null===s.parentNode&&window.clearInterval(u),s.classList.contains("panning")||(c-=20),c<=0&&(o.a.animateOut(s,function(){"function"==typeof r.onComplete&&r.onComplete(),s.parentNode&&l.remove(s)}),window.clearInterval(u))},20)),n.i(a.a)(s,l)}},function(t,e,n){e=t.exports=n(10)(),e.push([t.i,".toasted{padding:0 20px}.toasted.rounded{border-radius:24px}.toasted .primary,.toasted.toasted-primary{border-radius:2px;min-height:38px;line-height:1.1em;background-color:#353535;padding:0 20px;font-size:15px;font-weight:300;color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24)}.toasted .primary.success,.toasted.toasted-primary.success{background:#4caf50}.toasted .primary.error,.toasted.toasted-primary.error{background:#f44336}.toasted .primary.info,.toasted.toasted-primary.info{background:#3f51b5}.toasted .primary .action,.toasted.toasted-primary .action{color:#a1c2fa}.toasted.bubble{border-radius:30px;min-height:38px;line-height:1.1em;background-color:#ff7043;padding:0 20px;font-size:15px;font-weight:300;color:#fff;box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24)}.toasted.bubble.success{background:#4caf50}.toasted.bubble.error{background:#f44336}.toasted.bubble.info{background:#3f51b5}.toasted.bubble .action{color:#8e2b0c}.toasted.outline{border-radius:30px;min-height:38px;line-height:1.1em;background-color:#fff;border:1px solid #676767;padding:0 20px;font-size:15px;color:#676767;box-shadow:0 1px 3px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.24);font-weight:700}.toasted.outline.success{color:#4caf50;border-color:#4caf50}.toasted.outline.error{color:#f44336;border-color:#f44336}.toasted.outline.info{color:#3f51b5;border-color:#3f51b5}.toasted.outline .action{color:#607d8b}.toasted-container{position:fixed;z-index:10000}.toasted-container,.toasted-container.full-width{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.toasted-container.full-width{max-width:86%;width:100%}.toasted-container.full-width.fit-to-screen{min-width:100%}.toasted-container.full-width.fit-to-screen .toasted:first-child{margin-top:0}.toasted-container.full-width.fit-to-screen.top-right{top:0;right:0}.toasted-container.full-width.fit-to-screen.top-left{top:0;left:0}.toasted-container.full-width.fit-to-screen.top-center{top:0;left:0;-webkit-transform:translateX(0);transform:translateX(0)}.toasted-container.full-width.fit-to-screen.bottom-right{right:0;bottom:0}.toasted-container.full-width.fit-to-screen.bottom-left{left:0;bottom:0}.toasted-container.full-width.fit-to-screen.bottom-center{left:0;bottom:0;-webkit-transform:translateX(0);transform:translateX(0)}.toasted-container.top-right{top:10%;right:7%}.toasted-container.top-left{top:10%;left:7%}.toasted-container.top-center{top:10%;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.toasted-container.bottom-right{right:5%;bottom:7%}.toasted-container.bottom-left{left:5%;bottom:7%}.toasted-container.bottom-center{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);bottom:7%}.toasted-container.bottom-left .toasted,.toasted-container.top-left .toasted{float:left}.toasted-container.bottom-right .toasted,.toasted-container.top-right .toasted{float:right}.toasted-container .toasted{top:35px;width:auto;clear:both;margin-top:10px;position:relative;max-width:100%;height:auto;word-break:normal;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;box-sizing:inherit}.toasted-container .toasted .fa,.toasted-container .toasted .fab,.toasted-container .toasted .far,.toasted-container .toasted .fas,.toasted-container .toasted .material-icons,.toasted-container .toasted .mdi{margin-right:.5rem;margin-left:-.4rem}.toasted-container .toasted .fa.after,.toasted-container .toasted .fab.after,.toasted-container .toasted .far.after,.toasted-container .toasted .fas.after,.toasted-container .toasted .material-icons.after,.toasted-container .toasted .mdi.after{margin-left:.5rem;margin-right:-.4rem}.toasted-container .toasted .action{text-decoration:none;font-size:.8rem;padding:8px;margin:5px -7px 5px 7px;border-radius:3px;text-transform:uppercase;letter-spacing:.03em;font-weight:600;cursor:pointer}.toasted-container .toasted .action.icon{padding:4px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.toasted-container .toasted .action.icon .fa,.toasted-container .toasted .action.icon .material-icons,.toasted-container .toasted .action.icon .mdi{margin-right:0;margin-left:4px}.toasted-container .toasted .action.icon:hover{text-decoration:none}.toasted-container .toasted .action:hover{text-decoration:underline}@media only screen and (max-width:600px){#toasted-container{min-width:100%}#toasted-container .toasted:first-child{margin-top:0}#toasted-container.top-right{top:0;right:0}#toasted-container.top-left{top:0;left:0}#toasted-container.top-center{top:0;left:0;-webkit-transform:translateX(0);transform:translateX(0)}#toasted-container.bottom-right{right:0;bottom:0}#toasted-container.bottom-left{left:0;bottom:0}#toasted-container.bottom-center{left:0;bottom:0;-webkit-transform:translateX(0);transform:translateX(0)}#toasted-container.bottom-center,#toasted-container.top-center{-ms-flex-align:stretch!important;align-items:stretch!important}#toasted-container.bottom-left .toasted,#toasted-container.bottom-right .toasted,#toasted-container.top-left .toasted,#toasted-container.top-right .toasted{float:none}#toasted-container .toasted{border-radius:0}}",""])},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e<this.length;e++){var n=this[e];n[2]?t.push("@media "+n[2]+"{"+n[1]+"}"):t.push(n[1])}return t.join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(t,e,n){"use strict";function r(t,e){if(void 0===t||null===t)throw new TypeError("Cannot convert first argument to object");for(var n=Object(t),r=1;r<arguments.length;r++){var i=arguments[r];if(void 0!==i&&null!==i)for(var o=Object.keys(Object(i)),a=0,s=o.length;a<s;a++){var c=o[a],u=Object.getOwnPropertyDescriptor(i,c);void 0!==u&&u.enumerable&&(n[c]=i[c])}}return n}function i(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:r})}t.exports={assign:r,polyfill:i}},function(t,e,n){var r;!function(i,o,a,s){"use strict";function c(t,e,n){return setTimeout(d(t,n),e)}function u(t,e,n){return!!Array.isArray(t)&&(l(t,n[e],n),!0)}function l(t,e,n){var r;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==s)for(r=0;r<t.length;)e.call(n,t[r],r,t),r++;else for(r in t)t.hasOwnProperty(r)&&e.call(n,t[r],r,t)}function p(t,e,n){var r="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=new Error("get-stack-trace"),n=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=i.console&&(i.console.warn||i.console.log);return o&&o.call(i.console,r,n),t.apply(this,arguments)}}function f(t,e,n){var r,i=e.prototype;r=t.prototype=Object.create(i),r.constructor=t,r._super=i,n&&ht(r,n)}function d(t,e){return function(){return t.apply(e,arguments)}}function h(t,e){return typeof t==yt?t.apply(e?e[0]||s:s,e):t}function v(t,e){return t===s?e:t}function m(t,e,n){l(w(e),function(e){t.addEventListener(e,n,!1)})}function y(t,e,n){l(w(e),function(e){t.removeEventListener(e,n,!1)})}function g(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function b(t,e){return t.indexOf(e)>-1}function w(t){return t.trim().split(/\s+/g)}function x(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var r=0;r<t.length;){if(n&&t[r][n]==e||!n&&t[r]===e)return r;r++}return-1}function _(t){return Array.prototype.slice.call(t,0)}function k(t,e,n){for(var r=[],i=[],o=0;o<t.length;){var a=e?t[o][e]:t[o];x(i,a)<0&&r.push(t[o]),i[o]=a,o++}return n&&(r=e?r.sort(function(t,n){return t[e]>n[e]}):r.sort()),r}function T(t,e){for(var n,r,i=e[0].toUpperCase()+e.slice(1),o=0;o<vt.length;){if(n=vt[o],(r=n?n+i:e)in t)return r;o++}return s}function O(){return kt++}function E(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||i}function C(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){h(t.options.enable,[t])&&n.handler(e)},this.init()}function A(t){return new(t.options.inputClass||(Et?H:Ct?Y:Ot?V:U))(t,S)}function S(t,e,n){var r=n.pointers.length,i=n.changedPointers.length,o=e&St&&r-i==0,a=e&(jt|Lt)&&r-i==0;n.isFirst=!!o,n.isFinal=!!a,o&&(t.session={}),n.eventType=e,P(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function P(t,e){var n=t.session,r=e.pointers,i=r.length;n.firstInput||(n.firstInput=M(e)),i>1&&!n.firstMultiple?n.firstMultiple=M(e):1===i&&(n.firstMultiple=!1);var o=n.firstInput,a=n.firstMultiple,s=a?a.center:o.center,c=e.center=$(r);e.timeStamp=wt(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=R(s,c),e.distance=D(s,c),j(n,e),e.offsetDirection=N(e.deltaX,e.deltaY);var u=I(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=u.x,e.overallVelocityY=u.y,e.overallVelocity=bt(u.x)>bt(u.y)?u.x:u.y,e.scale=a?B(a.pointers,r):1,e.rotation=a?F(a.pointers,r):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,L(n,e);var l=t.element;g(e.srcEvent.target,l)&&(l=e.srcEvent.target),e.target=l}function j(t,e){var n=e.center,r=t.offsetDelta||{},i=t.prevDelta||{},o=t.prevInput||{};e.eventType!==St&&o.eventType!==jt||(i=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=i.x+(n.x-r.x),e.deltaY=i.y+(n.y-r.y)}function L(t,e){var n,r,i,o,a=t.lastInterval||e,c=e.timeStamp-a.timeStamp;if(e.eventType!=Lt&&(c>At||a.velocity===s)){var u=e.deltaX-a.deltaX,l=e.deltaY-a.deltaY,p=I(c,u,l);r=p.x,i=p.y,n=bt(p.x)>bt(p.y)?p.x:p.y,o=N(u,l),t.lastInterval=e}else n=a.velocity,r=a.velocityX,i=a.velocityY,o=a.direction;e.velocity=n,e.velocityX=r,e.velocityY=i,e.direction=o}function M(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:gt(t.pointers[n].clientX),clientY:gt(t.pointers[n].clientY)},n++;return{timeStamp:wt(),pointers:e,center:$(e),deltaX:t.deltaX,deltaY:t.deltaY}}function $(t){var e=t.length;if(1===e)return{x:gt(t[0].clientX),y:gt(t[0].clientY)};for(var n=0,r=0,i=0;i<e;)n+=t[i].clientX,r+=t[i].clientY,i++;return{x:gt(n/e),y:gt(r/e)}}function I(t,e,n){return{x:e/t||0,y:n/t||0}}function N(t,e){return t===e?Mt:bt(t)>=bt(e)?t<0?$t:It:e<0?Nt:Dt}function D(t,e,n){n||(n=Ut);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return Math.sqrt(r*r+i*i)}function R(t,e,n){n||(n=Ut);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return 180*Math.atan2(i,r)/Math.PI}function F(t,e){return R(e[1],e[0],Ht)+R(t[1],t[0],Ht)}function B(t,e){return D(e[0],e[1],Ht)/D(t[0],t[1],Ht)}function U(){this.evEl=zt,this.evWin=Yt,this.pressed=!1,C.apply(this,arguments)}function H(){this.evEl=Wt,this.evWin=Gt,C.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function X(){this.evTarget=Jt,this.evWin=Qt,this.started=!1,C.apply(this,arguments)}function z(t,e){var n=_(t.touches),r=_(t.changedTouches);return e&(jt|Lt)&&(n=k(n.concat(r),"identifier",!0)),[n,r]}function Y(){this.evTarget=te,this.targetIds={},C.apply(this,arguments)}function q(t,e){var n=_(t.touches),r=this.targetIds;if(e&(St|Pt)&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,a=_(t.changedTouches),s=[],c=this.target;if(o=n.filter(function(t){return g(t.target,c)}),e===St)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<a.length;)r[a[i].identifier]&&s.push(a[i]),e&(jt|Lt)&&delete r[a[i].identifier],i++;return s.length?[k(o.concat(s),"identifier",!0),s]:void 0}function V(){C.apply(this,arguments);var t=d(this.handler,this);this.touch=new Y(this.manager,t),this.mouse=new U(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function W(t,e){t&St?(this.primaryTouch=e.changedPointers[0].identifier,G.call(this,e)):t&(jt|Lt)&&G.call(this,e)}function G(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var r=this.lastTouches,i=function(){var t=r.indexOf(n);t>-1&&r.splice(t,1)};setTimeout(i,ee)}}function K(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(e-i.x),a=Math.abs(n-i.y);if(o<=ne&&a<=ne)return!0}return!1}function J(t,e){this.manager=t,this.set(e)}function Q(t){if(b(t,se))return se;var e=b(t,ce),n=b(t,ue);return e&&n?se:e||n?e?ce:ue:b(t,ae)?ae:oe}function Z(t){this.options=ht({},this.defaults,t||{}),this.id=O(),this.manager=null,this.options.enable=v(this.options.enable,!0),this.state=pe,this.simultaneous={},this.requireFail=[]}function tt(t){return t&me?"cancel":t&he?"end":t&de?"move":t&fe?"start":""}function et(t){return t==Dt?"down":t==Nt?"up":t==$t?"left":t==It?"right":""}function nt(t,e){var n=e.manager;return n?n.get(t):t}function rt(){Z.apply(this,arguments)}function it(){rt.apply(this,arguments),this.pX=null,this.pY=null}function ot(){rt.apply(this,arguments)}function at(){Z.apply(this,arguments),this._timer=null,this._input=null}function st(){rt.apply(this,arguments)}function ct(){rt.apply(this,arguments)}function ut(){Z.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function lt(t,e){return e=e||{},e.recognizers=v(e.recognizers,lt.defaults.preset),new pt(t,e)}function pt(t,e){this.options=ht({},lt.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=A(this),this.touchAction=new J(this,this.options.touchAction),ft(this,!0),l(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function ft(t,e){var n=t.element;if(n.style){var r;l(t.options.cssProps,function(i,o){r=T(n.style,o),e?(t.oldCssProps[r]=n.style[r],n.style[r]=i):n.style[r]=t.oldCssProps[r]||""}),e||(t.oldCssProps={})}}function dt(t,e){var n=o.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}var ht,vt=["","webkit","Moz","MS","ms","o"],mt=o.createElement("div"),yt="function",gt=Math.round,bt=Math.abs,wt=Date.now;ht="function"!=typeof Object.assign?function(t){if(t===s||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(r!==s&&null!==r)for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])}return e}:Object.assign;var xt=p(function(t,e,n){for(var r=Object.keys(e),i=0;i<r.length;)(!n||n&&t[r[i]]===s)&&(t[r[i]]=e[r[i]]),i++;return t},"extend","Use `assign`."),_t=p(function(t,e){return xt(t,e,!0)},"merge","Use `assign`."),kt=1,Tt=/mobile|tablet|ip(ad|hone|od)|android/i,Ot="ontouchstart"in i,Et=T(i,"PointerEvent")!==s,Ct=Ot&&Tt.test(navigator.userAgent),At=25,St=1,Pt=2,jt=4,Lt=8,Mt=1,$t=2,It=4,Nt=8,Dt=16,Rt=$t|It,Ft=Nt|Dt,Bt=Rt|Ft,Ut=["x","y"],Ht=["clientX","clientY"];C.prototype={handler:function(){},init:function(){this.evEl&&m(this.element,this.evEl,this.domHandler),this.evTarget&&m(this.target,this.evTarget,this.domHandler),this.evWin&&m(E(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&y(this.element,this.evEl,this.domHandler),this.evTarget&&y(this.target,this.evTarget,this.domHandler),this.evWin&&y(E(this.element),this.evWin,this.domHandler)}};var Xt={mousedown:St,mousemove:Pt,mouseup:jt},zt="mousedown",Yt="mousemove mouseup";f(U,C,{handler:function(t){var e=Xt[t.type];e&St&&0===t.button&&(this.pressed=!0),e&Pt&&1!==t.which&&(e=jt),this.pressed&&(e&jt&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))}});var qt={pointerdown:St,pointermove:Pt,pointerup:jt,pointercancel:Lt,pointerout:Lt},Vt={2:"touch",3:"pen",4:"mouse",5:"kinect"},Wt="pointerdown",Gt="pointermove pointerup pointercancel";i.MSPointerEvent&&!i.PointerEvent&&(Wt="MSPointerDown",Gt="MSPointerMove MSPointerUp MSPointerCancel"),f(H,C,{handler:function(t){var e=this.store,n=!1,r=t.type.toLowerCase().replace("ms",""),i=qt[r],o=Vt[t.pointerType]||t.pointerType,a="touch"==o,s=x(e,t.pointerId,"pointerId");i&St&&(0===t.button||a)?s<0&&(e.push(t),s=e.length-1):i&(jt|Lt)&&(n=!0),s<0||(e[s]=t,this.callback(this.manager,i,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(s,1))}});var Kt={touchstart:St,touchmove:Pt,touchend:jt,touchcancel:Lt},Jt="touchstart",Qt="touchstart touchmove touchend touchcancel";f(X,C,{handler:function(t){var e=Kt[t.type];if(e===St&&(this.started=!0),this.started){var n=z.call(this,t,e);e&(jt|Lt)&&n[0].length-n[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}}});var Zt={touchstart:St,touchmove:Pt,touchend:jt,touchcancel:Lt},te="touchstart touchmove touchend touchcancel";f(Y,C,{handler:function(t){var e=Zt[t.type],n=q.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:"touch",srcEvent:t})}});var ee=2500,ne=25;f(V,C,{handler:function(t,e,n){var r="touch"==n.pointerType,i="mouse"==n.pointerType;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)W.call(this,e,n);else if(i&&K.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var re=T(mt.style,"touchAction"),ie=re!==s,oe="auto",ae="manipulation",se="none",ce="pan-x",ue="pan-y",le=function(){if(!ie)return!1;var t={},e=i.CSS&&i.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){t[n]=!e||i.CSS.supports("touch-action",n)}),t}();J.prototype={set:function(t){"compute"==t&&(t=this.compute()),ie&&this.manager.element.style&&le[t]&&(this.manager.element.style[re]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return l(this.manager.recognizers,function(e){h(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),Q(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)return void e.preventDefault();var r=this.actions,i=b(r,se)&&!le[se],o=b(r,ue)&&!le[ue],a=b(r,ce)&&!le[ce];if(i){var s=1===t.pointers.length,c=t.distance<2,u=t.deltaTime<250;if(s&&c&&u)return}return a&&o?void 0:i||o&&n&Rt||a&&n&Ft?this.preventSrc(e):void 0},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var pe=1,fe=2,de=4,he=8,ve=he,me=16;Z.prototype={defaults:{},set:function(t){return ht(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(u(t,"recognizeWith",this))return this;var e=this.simultaneous;return t=nt(t,this),e[t.id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return u(t,"dropRecognizeWith",this)?this:(t=nt(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(u(t,"requireFailure",this))return this;var e=this.requireFail;return t=nt(t,this),-1===x(e,t)&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(u(t,"dropRequireFailure",this))return this;t=nt(t,this);var e=x(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){n.manager.emit(e,t)}var n=this,r=this.state;r<he&&e(n.options.event+tt(r)),e(n.options.event),t.additionalEvent&&e(t.additionalEvent),r>=he&&e(n.options.event+tt(r))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(32|pe)))return!1;t++}return!0},recognize:function(t){var e=ht({},t);if(!h(this.options.enable,[this,e]))return this.reset(),void(this.state=32);this.state&(ve|me|32)&&(this.state=pe),this.state=this.process(e),this.state&(fe|de|he|me)&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},f(rt,Z,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,r=e&(fe|de),i=this.attrTest(t);return r&&(n&Lt||!i)?e|me:r||i?n&jt?e|he:e&fe?e|de:fe:32}}),f(it,rt,{defaults:{event:"pan",threshold:10,pointers:1,direction:Bt},getTouchAction:function(){var t=this.options.direction,e=[];return t&Rt&&e.push(ue),t&Ft&&e.push(ce),e},directionTest:function(t){var e=this.options,n=!0,r=t.distance,i=t.direction,o=t.deltaX,a=t.deltaY;return i&e.direction||(e.direction&Rt?(i=0===o?Mt:o<0?$t:It,n=o!=this.pX,r=Math.abs(t.deltaX)):(i=0===a?Mt:a<0?Nt:Dt,n=a!=this.pY,r=Math.abs(t.deltaY))),t.direction=i,n&&r>e.threshold&&i&e.direction},attrTest:function(t){return rt.prototype.attrTest.call(this,t)&&(this.state&fe||!(this.state&fe)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=et(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),f(ot,rt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[se]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&fe)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),f(at,Z,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[oe]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,i=t.deltaTime>e.time;if(this._input=t,!r||!n||t.eventType&(jt|Lt)&&!i)this.reset();else if(t.eventType&St)this.reset(),this._timer=c(function(){this.state=ve,this.tryEmit()},e.time,this);else if(t.eventType&jt)return ve;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===ve&&(t&&t.eventType&jt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=wt(),this.manager.emit(this.options.event,this._input)))}}),f(st,rt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[se]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&fe)}}),f(ct,rt,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Rt|Ft,pointers:1},getTouchAction:function(){return it.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(Rt|Ft)?e=t.overallVelocity:n&Rt?e=t.overallVelocityX:n&Ft&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&bt(e)>this.options.velocity&&t.eventType&jt},emit:function(t){var e=et(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),f(ut,Z,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ae]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,i=t.deltaTime<e.time;if(this.reset(),t.eventType&St&&0===this.count)return this.failTimeout();if(r&&i&&n){if(t.eventType!=jt)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,a=!this.pCenter||D(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,a&&o?this.count+=1:this.count=1,this._input=t,0==this.count%e.taps)return this.hasRequireFailures()?(this._timer=c(function(){this.state=ve,this.tryEmit()},e.interval,this),fe):ve}return 32},failTimeout:function(){return this._timer=c(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ve&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),lt.VERSION="2.0.7",lt.defaults={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,preset:[[st,{enable:!1}],[ot,{enable:!1},["rotate"]],[ct,{direction:Rt}],[it,{direction:Rt},["swipe"]],[ut],[ut,{event:"doubletap",taps:2},["tap"]],[at]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},pt.prototype={set:function(t){return ht(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){this.touchAction.preventDefaults(t);var n,r=this.recognizers,i=e.curRecognizer;(!i||i&&i.state&ve)&&(i=e.curRecognizer=null);for(var o=0;o<r.length;)n=r[o],2===e.stopped||i&&n!=i&&!n.canRecognizeWith(i)?n.reset():n.recognize(t),!i&&n.state&(fe|de|he)&&(i=e.curRecognizer=n),o++}},get:function(t){if(t instanceof Z)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(u(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(u(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=x(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(t!==s&&e!==s){var n=this.handlers;return l(w(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this}},off:function(t,e){if(t!==s){var n=this.handlers;return l(w(t),function(t){e?n[t]&&n[t].splice(x(n[t],e),1):delete n[t]}),this}},emit:function(t,e){this.options.domEvents&&dt(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](e),r++}},destroy:function(){this.element&&ft(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},ht(lt,{INPUT_START:St,INPUT_MOVE:Pt,INPUT_END:jt,INPUT_CANCEL:Lt,STATE_POSSIBLE:pe,STATE_BEGAN:fe,STATE_CHANGED:de,STATE_ENDED:he,STATE_RECOGNIZED:ve,STATE_CANCELLED:me,STATE_FAILED:32,DIRECTION_NONE:Mt,DIRECTION_LEFT:$t,DIRECTION_RIGHT:It,DIRECTION_UP:Nt,DIRECTION_DOWN:Dt,DIRECTION_HORIZONTAL:Rt,DIRECTION_VERTICAL:Ft,DIRECTION_ALL:Bt,Manager:pt,Input:C,TouchAction:J,TouchInput:Y,MouseInput:U,PointerEventInput:H,TouchMouseInput:V,SingleTouchInput:X,Recognizer:Z,AttrRecognizer:rt,Tap:ut,Pan:it,Swipe:ct,Pinch:ot,Rotate:st,Press:at,on:m,off:y,each:l,merge:_t,extend:xt,assign:ht,inherit:f,bindFn:d,prefixed:T}),(void 0!==i?i:"undefined"!=typeof self?self:{}).Hammer=lt,(r=function(){return lt}.call(e,n,e,t))!==s&&(t.exports=r)}(window,document)},function(t,e){t.exports=function(t,e,n){for(var r=(2<<Math.log(e.length-1)/Math.LN2)-1,i=Math.ceil(1.6*r*n/e.length),o="";;)for(var a=t(i),s=0;s<i;s++){var c=a[s]&r;if(e[c]&&(o+=e[c],o.length===n))return o}}},function(t,e,n){"use strict";function r(t){var e="",n=Math.floor(.001*(Date.now()-s));return n===o?i++:(i=0,o=n),e+=a(c),e+=a(t),i>0&&(e+=a(i)),e+=a(n)}var i,o,a=n(15),s=(n(0),1459707606518),c=6;t.exports=r},function(t,e,n){"use strict";function r(t){for(var e,n=0,r="";!e;)r+=a(o,i.get(),1),e=t<Math.pow(16,n+1),n++;return r}var i=n(0),o=n(18),a=n(13);t.exports=r},function(t,e,n){"use strict";function r(e){return s.seed(e),t.exports}function i(e){return l=e,t.exports}function o(t){return void 0!==t&&s.characters(t),s.shuffled()}function a(){return c(l)}var s=n(0),c=n(14),u=n(17),l=n(20)||0;t.exports=a,t.exports.generate=a,t.exports.seed=r,t.exports.worker=i,t.exports.characters=o,t.exports.isValid=u},function(t,e,n){"use strict";function r(t){return!(!t||"string"!=typeof t||t.length<6||new RegExp("[^"+i.get().replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")+"]").test(t))}var i=n(0);t.exports=r},function(t,e,n){"use strict";var r,i="object"==typeof window&&(window.crypto||window.msCrypto);r=i&&i.getRandomValues?function(t){return i.getRandomValues(new Uint8Array(t))}:function(t){for(var e=[],n=0;n<t;n++)e.push(Math.floor(256*Math.random()));return e},t.exports=r},function(t,e,n){"use strict";function r(){return(o=(9301*o+49297)%233280)/233280}function i(t){o=t}var o=1;t.exports={nextValue:r,seed:i}},function(t,e,n){"use strict";t.exports=0},function(t,e){t.exports=function(t,e,n,r){var i,o=t=t||{},a=typeof t.default;"object"!==a&&"function"!==a||(i=t,o=t.default);var s="function"==typeof o?o.options:o;if(e&&(s.render=e.render,s.staticRenderFns=e.staticRenderFns),n&&(s._scopeId=n),r){var c=Object.create(s.computed||null);Object.keys(r).forEach(function(t){var e=r[t];c[t]=function(){return e}}),s.computed=c}return{esModule:i,exports:o,options:s}}},function(t,e,n){var r=n(9);"string"==typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals),n(23)("02af2e15",r,!0,{})},function(t,e,n){function r(t){for(var e=0;e<t.length;e++){var n=t[e],r=l[n.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](n.parts[i]);for(;i<n.parts.length;i++)r.parts.push(o(n.parts[i]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{for(var a=[],i=0;i<n.parts.length;i++)a.push(o(n.parts[i]));l[n.id]={id:n.id,refs:1,parts:a}}}}function i(){var t=document.createElement("style");return t.type="text/css",p.appendChild(t),t}function o(t){var e,n,r=document.querySelector("style["+y+'~="'+t.id+'"]');if(r){if(h)return v;r.parentNode.removeChild(r)}if(g){var o=d++;r=f||(f=i()),e=a.bind(null,r,o,!1),n=a.bind(null,r,o,!0)}else r=i(),e=s.bind(null,r),n=function(){r.parentNode.removeChild(r)};return e(t),function(r){if(r){if(r.css===t.css&&r.media===t.media&&r.sourceMap===t.sourceMap)return;e(t=r)}else n()}}function a(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=b(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function s(t,e){var n=e.css,r=e.media,i=e.sourceMap;if(r&&t.setAttribute("media",r),m.ssrId&&t.setAttribute(y,e.id),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var c="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!c)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var u=n(24),l={},p=c&&(document.head||document.getElementsByTagName("head")[0]),f=null,d=0,h=!1,v=function(){},m=null,y="data-vue-ssr-id",g="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());t.exports=function(t,e,n,i){h=n,m=i||{};var o=u(t,e);return r(o),function(e){for(var n=[],i=0;i<o.length;i++){var a=o[i],s=l[a.id];s.refs--,n.push(s)}e?(o=u(t,e),r(o)):o=[];for(var i=0;i<n.length;i++){var s=n[i];if(0===s.refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete l[s.id]}}}};var b=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},function(t,e){t.exports=function(t,e){for(var n=[],r={},i=0;i<e.length;i++){var o=e[i],a=o[0],s=o[1],c=o[2],u=o[3],l={id:t+":"+i,css:s,media:c,sourceMap:u};r[a]?r[a].parts.push(l):n.push(r[a]={id:a,parts:[l]})}return n}},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){/*!
13
+ * vue-tippy v2.1.2
14
+ * (c) 2019 Georges KABBOUCHI
15
+ * Released under the MIT License.
16
+ */
17
+ !function(e,n){t.exports=function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,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(e.s=3)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n(4);var r={install:function(t,e){function n(n,r,i){var o=i.data&&i.data.on||i.componentOptions&&i.componentOptions.listeners,a=r.value||{};if(a=Object.assign({dynamicTitle:!0,reactive:!1,showOnLoad:!1},e,a),o&&o.show&&(a.onShow=function(){o.show.fns(n,i)}),o&&o.shown&&(a.onShown=function(){o.shown.fns(n,i)}),o&&o.hidden&&(a.onHidden=function(){o.hidden.fns(n,i)}),o&&o.hide&&(a.onHide=function(){o.hide.fns(n,i)}),a.html){var s=a.html;if(a.reactive||"string"!=typeof s)a.html=s instanceof Element?s:s instanceof t?s.$el:document.querySelector(s);else{var c=document.querySelector(a.html);if(!c)return void console.error("[VueTippy] Selector "+a.html+" not found");c._tipppyReferences?c._tipppyReferences.push(n):c._tipppyReferences=[n]}}if((a.html||n.getAttribute("data-tippy-html"))&&(a.dynamicTitle=!1),n.getAttribute("data-tippy-html")){var u=document.querySelector(n.getAttribute("data-tippy-html"));if(!u)return void console.error("[VueTippy] Selector '"+n.getAttribute("data-tippy-html")+"' not found",n);u._tipppyReferences?u._tipppyReferences.push(n):u._tipppyReferences=[n]}new Tippy(n,a),a.showOnLoad&&n._tippy.show(),t.nextTick(function(){o&&o.init&&o.init.fns(n._tippy,n)})}t.directive("tippy-html",{componentUpdated:function(e){var n=e._tipppyReferences;n&&n.length>0&&t.nextTick(function(){n.forEach(function(t){t._tippy&&(t._tippy.popper.querySelector(".tippy-content").innerHTML=e.innerHTML)})})},unbind:function(t){delete t._tipppyReference}}),t.directive("tippy",{inserted:function(e,r,i){t.nextTick(function(){n(e,r,i)})},unbind:function(t){t._tippy&&t._tippy.destroy()},componentUpdated:function(e,r,i){var o=r.value||{},a=r.oldValue||{};e._tippy&&JSON.stringify(o)!==JSON.stringify(a)&&t.nextTick(function(){n(e,r,i)}),e._tippy&&e._tippy.popperInstance&&o.show?e._tippy.show():e._tippy&&e._tippy.popperInstance&&!o.show&&"manual"===o.trigger&&e._tippy.hide()}}),t.component("tippy",{template:"<div><slot></slot></div>",props:{to:{type:String,required:!0},placement:{type:String,default:"top"},theme:{type:String,default:"light"},interactive:{type:[Boolean,String],default:!1},arrow:{type:[Boolean,String],default:!1},arrowType:{type:String,default:"sharp"},arrowTransform:{type:String,default:""},trigger:{type:String,default:"mouseenter focus"},interactiveBorder:{type:Number,default:2},animation:{type:String,default:"shift-away"},animationFill:{type:[Boolean,String],default:!0},distance:{type:Number,default:10},delay:{type:[Number,Array],default:function(){return[0,20]}},duration:{type:[Number,Array],default:function(){return[325,275]}},offset:{type:Number,default:0},followCursor:{type:[Boolean,String],default:!1},sticky:{type:[Boolean,String],default:!1},size:{type:String,default:"regular"},watchProps:{type:[Boolean,String],default:!1}},watch:{$props:{deep:!0,handler:function(t,e){var r=this;document.querySelectorAll("[name="+this.to+"]").forEach(function(t){r.watchProps&&(t._tippy&&t._tippy.destroy(),n(t,{value:Object.assign({reactive:!0,html:r.$el},r.$props)},r.$vnode))})}}},mounted:function(){var t=this;document.querySelectorAll("[name="+this.to+"]").forEach(function(e){n(e,{value:Object.assign({reactive:!0,html:t.$el},t.$props)},t.$vnode)})}})}};"undefined"!=typeof window&&window.Vue&&window.Vue.use(r),e.default=r},function(t,e,n){var r=n(5);"string"==typeof r&&(r=[[t.i,r,""]]);var i={};i.transform=void 0,n(7)(r,i),r.locals&&(t.exports=r.locals)},function(t,e,n){(function(e){/*!
18
+ * Tippy.js v2.6.0
19
+ * (c) 2017-2018 atomiks
20
+ * MIT
21
+ */
22
+ !function(e,n){t.exports=function(){"use strict";function t(t){return"[object Object]"==={}.toString.call(t)}function n(t){return[].slice.call(t)}function r(e){if(e instanceof Element||t(e))return[e];if(e instanceof NodeList)return n(e);if(Array.isArray(e))return e;try{return n(document.querySelectorAll(e))}catch(t){return[]}}function i(t){t.refObj=!0,t.attributes=t.attributes||{},t.setAttribute=function(e,n){t.attributes[e]=n},t.getAttribute=function(e){return t.attributes[e]},t.removeAttribute=function(e){delete t.attributes[e]},t.hasAttribute=function(e){return e in t.attributes},t.addEventListener=function(){},t.removeEventListener=function(){},t.classList={classNames:{},add:function(e){return t.classList.classNames[e]=!0},remove:function(e){return delete t.classList.classNames[e],!0},contains:function(e){return e in t.classList.classNames}}}function o(t){for(var e=["","webkit"],n=t.charAt(0).toUpperCase()+t.slice(1),r=0;r<e.length;r++){var i=e[r],o=i?i+n:t;if(void 0!==document.body.style[o])return o}return null}function a(){return document.createElement("div")}function s(t,e,n){var r=a();r.setAttribute("class","tippy-popper"),r.setAttribute("role","tooltip"),r.setAttribute("id","tippy-"+t),r.style.zIndex=n.zIndex,r.style.maxWidth=n.maxWidth;var i=a();i.setAttribute("class","tippy-tooltip"),i.setAttribute("data-size",n.size),i.setAttribute("data-animation",n.animation),i.setAttribute("data-state","hidden"),n.theme.split(" ").forEach(function(t){i.classList.add(t+"-theme")});var s=a();if(s.setAttribute("class","tippy-content"),n.arrow){var c=a();c.style[o("transform")]=n.arrowTransform,"round"===n.arrowType?(c.classList.add("tippy-roundarrow"),c.innerHTML='<svg viewBox="0 0 24 8" xmlns="http://www.w3.org/2000/svg"><path d="M3 8s2.021-.015 5.253-4.218C9.584 2.051 10.797 1.007 12 1c1.203-.007 2.416 1.035 3.761 2.782C19.012 8.005 21 8 21 8H3z"/></svg>'):c.classList.add("tippy-arrow"),i.appendChild(c)}if(n.animateFill){i.setAttribute("data-animatefill","");var u=a();u.classList.add("tippy-backdrop"),u.setAttribute("data-state","hidden"),i.appendChild(u)}n.inertia&&i.setAttribute("data-inertia",""),n.interactive&&i.setAttribute("data-interactive","");var l=n.html;if(l){var p=void 0;l instanceof Element?(s.appendChild(l),p="#"+(l.id||"tippy-html-template")):(s.innerHTML=document.querySelector(l).innerHTML,p=l),r.setAttribute("data-html",""),i.setAttribute("data-template-id",p),n.interactive&&r.setAttribute("tabindex","-1")}else s[n.allowTitleHTML?"innerHTML":"textContent"]=e;return i.appendChild(s),r.appendChild(i),r}function c(t,e,n,r){var i=n.onTrigger,o=n.onMouseLeave,a=n.onBlur,s=n.onDelegateShow,c=n.onDelegateHide,u=[];if("manual"===t)return u;var l=function(t,n){e.addEventListener(t,n),u.push({event:t,handler:n})};return r.target?(Jt.supportsTouch&&r.touchHold&&(l("touchstart",s),l("touchend",c)),"mouseenter"===t&&(l("mouseover",s),l("mouseout",c)),"focus"===t&&(l("focusin",s),l("focusout",c)),"click"===t&&l("click",s)):(l(t,i),Jt.supportsTouch&&r.touchHold&&(l("touchstart",i),l("touchend",o)),"mouseenter"===t&&l("mouseleave",o),"focus"===t&&l(Kt?"focusout":"blur",a)),u}function u(t,e){var n=te.reduce(function(n,r){var i=t.getAttribute("data-tippy-"+r.toLowerCase())||e[r];return"false"===i&&(i=!1),"true"===i&&(i=!0),isFinite(i)&&!isNaN(parseFloat(i))&&(i=parseFloat(i)),"target"!==r&&"string"==typeof i&&"["===i.trim().charAt(0)&&(i=JSON.parse(i)),n[r]=i,n},{});return re({},e,n)}function l(t,e){return e.arrow&&(e.animateFill=!1),e.appendTo&&"function"==typeof e.appendTo&&(e.appendTo=e.appendTo()),"function"==typeof e.html&&(e.html=e.html(t)),e}function p(t){var e=function(e){return t.querySelector(e)};return{tooltip:e(Qt.TOOLTIP),backdrop:e(Qt.BACKDROP),content:e(Qt.CONTENT),arrow:e(Qt.ARROW)||e(Qt.ROUND_ARROW)}}function f(t){var e=t.getAttribute("title");e&&t.setAttribute("data-original-title",e),t.removeAttribute("title")}function d(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then(function(){e=!1,t()}))}}function h(t){var e=!1;return function(){e||(e=!0,setTimeout(function(){e=!1,t()},ae))}}function v(t){var e={};return t&&"[object Function]"===e.toString.call(t)}function m(t,e){if(1!==t.nodeType)return[];var n=getComputedStyle(t,null);return e?n[e]:n}function y(t){return"HTML"===t.nodeName?t:t.parentNode||t.host}function g(t){if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body}var e=m(t),n=e.overflow,r=e.overflowX;return/(auto|scroll|overlay)/.test(n+e.overflowY+r)?t:g(y(t))}function b(t){return 11===t?le:10===t?pe:le||pe}function w(t){if(!t)return document.documentElement;for(var e=b(10)?document.body:null,n=t.offsetParent;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TD","TABLE"].indexOf(n.nodeName)&&"static"===m(n,"position")?w(n):n:t?t.ownerDocument.documentElement:document.documentElement}function x(t){var e=t.nodeName;return"BODY"!==e&&("HTML"===e||w(t.firstElementChild)===t)}function _(t){return null!==t.parentNode?_(t.parentNode):t}function k(t,e){if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement;var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?t:e,i=n?e:t,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a=o.commonAncestorContainer;if(t!==a&&e!==a||r.contains(i))return x(a)?a:w(a);var s=_(t);return s.host?k(s.host,e):k(t,_(e).host)}function T(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===e?"scrollTop":"scrollLeft",r=t.nodeName;if("BODY"===r||"HTML"===r){var i=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||i)[n]}return t[n]}function O(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=T(e,"top"),i=T(e,"left"),o=n?-1:1;return t.top+=r*o,t.bottom+=r*o,t.left+=i*o,t.right+=i*o,t}function E(t,e){var n="x"===e?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"],10)+parseFloat(t["border"+r+"Width"],10)}function C(t,e,n,r){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],b(10)?parseInt(n["offset"+t])+parseInt(r["margin"+("Height"===t?"Top":"Left")])+parseInt(r["margin"+("Height"===t?"Bottom":"Right")]):0)}function A(t){var e=t.body,n=t.documentElement,r=b(10)&&getComputedStyle(n);return{height:C("Height",e,n,r),width:C("Width",e,n,r)}}function S(t){return ve({},t,{right:t.left+t.width,bottom:t.top+t.height})}function P(t){var e={};try{if(b(10)){e=t.getBoundingClientRect();var n=T(t,"top"),r=T(t,"left");e.top+=n,e.left+=r,e.bottom+=n,e.right+=r}else e=t.getBoundingClientRect()}catch(t){}var i={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},o="HTML"===t.nodeName?A(t.ownerDocument):{},a=o.width||t.clientWidth||i.right-i.left,s=o.height||t.clientHeight||i.bottom-i.top,c=t.offsetWidth-a,u=t.offsetHeight-s;if(c||u){var l=m(t);c-=E(l,"x"),u-=E(l,"y"),i.width-=c,i.height-=u}return S(i)}function j(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=b(10),i="HTML"===e.nodeName,o=P(t),a=P(e),s=g(t),c=m(e),u=parseFloat(c.borderTopWidth,10),l=parseFloat(c.borderLeftWidth,10);n&&i&&(a.top=Math.max(a.top,0),a.left=Math.max(a.left,0));var p=S({top:o.top-a.top-u,left:o.left-a.left-l,width:o.width,height:o.height});if(p.marginTop=0,p.marginLeft=0,!r&&i){var f=parseFloat(c.marginTop,10),d=parseFloat(c.marginLeft,10);p.top-=u-f,p.bottom-=u-f,p.left-=l-d,p.right-=l-d,p.marginTop=f,p.marginLeft=d}return(r&&!n?e.contains(s):e===s&&"BODY"!==s.nodeName)&&(p=O(p,e)),p}function L(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.ownerDocument.documentElement,r=j(t,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=e?0:T(n),s=e?0:T(n,"left");return S({top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:o})}function M(t){var e=t.nodeName;return"BODY"!==e&&"HTML"!==e&&("fixed"===m(t,"position")||M(y(t)))}function $(t){if(!t||!t.parentElement||b())return document.documentElement;for(var e=t.parentElement;e&&"none"===m(e,"transform");)e=e.parentElement;return e||document.documentElement}function I(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},a=i?$(t):k(t,e);if("viewport"===r)o=L(a,i);else{var s=void 0;"scrollParent"===r?(s=g(y(e)),"BODY"===s.nodeName&&(s=t.ownerDocument.documentElement)):s="window"===r?t.ownerDocument.documentElement:r;var c=j(s,a,i);if("HTML"!==s.nodeName||M(a))o=c;else{var u=A(t.ownerDocument),l=u.height,p=u.width;o.top+=c.top-c.marginTop,o.bottom=l+c.top,o.left+=c.left-c.marginLeft,o.right=p+c.left}}n=n||0;var f="number"==typeof n;return o.left+=f?n:n.left||0,o.top+=f?n:n.top||0,o.right-=f?n:n.right||0,o.bottom-=f?n:n.bottom||0,o}function N(t){return t.width*t.height}function D(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===t.indexOf("auto"))return t;var a=I(n,r,o,i),s={top:{width:a.width,height:e.top-a.top},right:{width:a.right-e.right,height:a.height},bottom:{width:a.width,height:a.bottom-e.bottom},left:{width:e.left-a.left,height:a.height}},c=Object.keys(s).map(function(t){return ve({key:t},s[t],{area:N(s[t])})}).sort(function(t,e){return e.area-t.area}),u=c.filter(function(t){var e=t.width,r=t.height;return e>=n.clientWidth&&r>=n.clientHeight}),l=u.length>0?u[0].key:c[0].key,p=t.split("-")[1];return l+(p?"-"+p:"")}function R(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return j(n,r?$(e):k(e,n),r)}function F(t){var e=getComputedStyle(t),n=parseFloat(e.marginTop)+parseFloat(e.marginBottom),r=parseFloat(e.marginLeft)+parseFloat(e.marginRight);return{width:t.offsetWidth+r,height:t.offsetHeight+n}}function B(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,function(t){return e[t]})}function U(t,e,n){n=n.split("-")[0];var r=F(t),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",c=o?"height":"width",u=o?"width":"height";return i[a]=e[a]+e[c]/2-r[c]/2,i[s]=n===s?e[s]-r[u]:e[B(s)],i}function H(t,e){return Array.prototype.find?t.find(e):t.filter(e)[0]}function X(t,e,n){if(Array.prototype.findIndex)return t.findIndex(function(t){return t[e]===n});var r=H(t,function(t){return t[e]===n});return t.indexOf(r)}function z(t,e,n){return(void 0===n?t:t.slice(0,X(t,"name",n))).forEach(function(t){t.function;var n=t.function||t.fn;t.enabled&&v(n)&&(e.offsets.popper=S(e.offsets.popper),e.offsets.reference=S(e.offsets.reference),e=n(e,t))}),e}function Y(){if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};t.offsets.reference=R(this.state,this.popper,this.reference,this.options.positionFixed),t.placement=D(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed,t.offsets.popper=U(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",t=z(this.modifiers,t),this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}}function q(t,e){return t.some(function(t){var n=t.name;return t.enabled&&n===e})}function V(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),r=0;r<e.length;r++){var i=e[r],o=i?""+i+n:t;if(void 0!==document.body.style[o])return o}return null}function W(){return this.state.isDestroyed=!0,q(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[V("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function G(t){var e=t.ownerDocument;return e?e.defaultView:window}function K(t,e,n,r){var i="BODY"===t.nodeName,o=i?t.ownerDocument.defaultView:t;o.addEventListener(e,n,{passive:!0}),i||K(g(o.parentNode),e,n,r),r.push(o)}function J(t,e,n,r){n.updateBound=r,G(t).addEventListener("resize",n.updateBound,{passive:!0});var i=g(t);return K(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function Q(){this.state.eventsEnabled||(this.state=J(this.reference,this.options,this.state,this.scheduleUpdate))}function Z(t,e){return G(t).removeEventListener("resize",e.updateBound),e.scrollParents.forEach(function(t){t.removeEventListener("scroll",e.updateBound)}),e.updateBound=null,e.scrollParents=[],e.scrollElement=null,e.eventsEnabled=!1,e}function tt(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=Z(this.reference,this.state))}function et(t){return""!==t&&!isNaN(parseFloat(t))&&isFinite(t)}function nt(t,e){Object.keys(e).forEach(function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&et(e[n])&&(r="px"),t.style[n]=e[n]+r})}function rt(t,e){Object.keys(e).forEach(function(n){!1!==e[n]?t.setAttribute(n,e[n]):t.removeAttribute(n)})}function it(t){return nt(t.instance.popper,t.styles),rt(t.instance.popper,t.attributes),t.arrowElement&&Object.keys(t.arrowStyles).length&&nt(t.arrowElement,t.arrowStyles),t}function ot(t,e,n,r,i){var o=R(i,e,t,n.positionFixed),a=D(n.placement,o,e,t,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return e.setAttribute("x-placement",a),nt(e,{position:n.positionFixed?"fixed":"absolute"}),n}function at(t,e){var n=e.x,r=e.y,i=t.offsets.popper,o=H(t.instance.modifiers,function(t){return"applyStyle"===t.name}).gpuAcceleration,a=void 0!==o?o:e.gpuAcceleration,s=w(t.instance.popper),c=P(s),u={position:i.position},l={left:Math.floor(i.left),top:Math.round(i.top),bottom:Math.round(i.bottom),right:Math.floor(i.right)},p="bottom"===n?"top":"bottom",f="right"===r?"left":"right",d=V("transform"),h=void 0,v=void 0;if(v="bottom"===p?"HTML"===s.nodeName?-s.clientHeight+l.bottom:-c.height+l.bottom:l.top,h="right"===f?"HTML"===s.nodeName?-s.clientWidth+l.right:-c.width+l.right:l.left,a&&d)u[d]="translate3d("+h+"px, "+v+"px, 0)",u[p]=0,u[f]=0,u.willChange="transform";else{var m="bottom"===p?-1:1,y="right"===f?-1:1;u[p]=v*m,u[f]=h*y,u.willChange=p+", "+f}var g={"x-placement":t.placement};return t.attributes=ve({},g,t.attributes),t.styles=ve({},u,t.styles),t.arrowStyles=ve({},t.offsets.arrow,t.arrowStyles),t}function st(t,e,n){var r=H(t,function(t){return t.name===e}),i=!!r&&t.some(function(t){return t.name===n&&t.enabled&&t.order<r.order});return i}function ct(t,e){var n;if(!st(t.instance.modifiers,"arrow","keepTogether"))return t;var r=e.element;if("string"==typeof r){if(!(r=t.instance.popper.querySelector(r)))return t}else if(!t.instance.popper.contains(r))return t;var i=t.placement.split("-")[0],o=t.offsets,a=o.popper,s=o.reference,c=-1!==["left","right"].indexOf(i),u=c?"height":"width",l=c?"Top":"Left",p=l.toLowerCase(),f=c?"left":"top",d=c?"bottom":"right",h=F(r)[u];s[d]-h<a[p]&&(t.offsets.popper[p]-=a[p]-(s[d]-h)),s[p]+h>a[d]&&(t.offsets.popper[p]+=s[p]+h-a[d]),t.offsets.popper=S(t.offsets.popper);var v=s[p]+s[u]/2-h/2,y=m(t.instance.popper),g=parseFloat(y["margin"+l],10),b=parseFloat(y["border"+l+"Width"],10),w=v-t.offsets.popper[p]-g-b;return w=Math.max(Math.min(a[u]-h,w),0),t.arrowElement=r,t.offsets.arrow=(n={},he(n,p,Math.round(w)),he(n,f,""),n),t}function ut(t){return"end"===t?"start":"start"===t?"end":t}function lt(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=ye.indexOf(t),r=ye.slice(n+1).concat(ye.slice(0,n));return e?r.reverse():r}function pt(t,e){if(q(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement)return t;var n=I(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),r=t.placement.split("-")[0],i=B(r),o=t.placement.split("-")[1]||"",a=[];switch(e.behavior){case ge.FLIP:a=[r,i];break;case ge.CLOCKWISE:a=lt(r);break;case ge.COUNTERCLOCKWISE:a=lt(r,!0);break;default:a=e.behavior}return a.forEach(function(s,c){if(r!==s||a.length===c+1)return t;r=t.placement.split("-")[0],i=B(r);var u=t.offsets.popper,l=t.offsets.reference,p=Math.floor,f="left"===r&&p(u.right)>p(l.left)||"right"===r&&p(u.left)<p(l.right)||"top"===r&&p(u.bottom)>p(l.top)||"bottom"===r&&p(u.top)<p(l.bottom),d=p(u.left)<p(n.left),h=p(u.right)>p(n.right),v=p(u.top)<p(n.top),m=p(u.bottom)>p(n.bottom),y="left"===r&&d||"right"===r&&h||"top"===r&&v||"bottom"===r&&m,g=-1!==["top","bottom"].indexOf(r),b=!!e.flipVariations&&(g&&"start"===o&&d||g&&"end"===o&&h||!g&&"start"===o&&v||!g&&"end"===o&&m);(f||y||b)&&(t.flipped=!0,(f||y)&&(r=a[c+1]),b&&(o=ut(o)),t.placement=r+(o?"-"+o:""),t.offsets.popper=ve({},t.offsets.popper,U(t.instance.popper,t.offsets.reference,t.placement)),t=z(t.instance.modifiers,t,"flip"))}),t}function ft(t){var e=t.offsets,n=e.popper,r=e.reference,i=t.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",c=a?"left":"top",u=a?"width":"height";return n[s]<o(r[c])&&(t.offsets.popper[c]=o(r[c])-n[u]),n[c]>o(r[s])&&(t.offsets.popper[c]=o(r[s])),t}function dt(t,e,n,r){var i=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return t;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return S(s)[e]/100*o}return"vh"===a||"vw"===a?("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o:o}function ht(t,e,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),a=t.split(/(\+|\-)/).map(function(t){return t.trim()}),s=a.indexOf(H(a,function(t){return-1!==t.search(/,|\s/)}));a[s]&&a[s].indexOf(",");var c=/\s*,\s*|\s+/,u=-1!==s?[a.slice(0,s).concat([a[s].split(c)[0]]),[a[s].split(c)[1]].concat(a.slice(s+1))]:[a];return u=u.map(function(t,r){var i=(1===r?!o:o)?"height":"width",a=!1;return t.reduce(function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,a=!0,t):a?(t[t.length-1]+=e,a=!1,t):t.concat(e)},[]).map(function(t){return dt(t,i,e,n)})}),u.forEach(function(t,e){t.forEach(function(n,r){et(n)&&(i[e]+=n*("-"===t[r-1]?-1:1))})}),i}function vt(t,e){var n=e.offset,r=t.placement,i=t.offsets,o=i.popper,a=i.reference,s=r.split("-")[0],c=void 0;return c=et(+n)?[+n,0]:ht(n,o,a,s),"left"===s?(o.top+=c[0],o.left-=c[1]):"right"===s?(o.top+=c[0],o.left+=c[1]):"top"===s?(o.left+=c[0],o.top-=c[1]):"bottom"===s&&(o.left+=c[0],o.top+=c[1]),t.popper=o,t}function mt(t,e){var n=e.boundariesElement||w(t.instance.popper);t.instance.reference===n&&(n=w(n));var r=V("transform"),i=t.instance.popper.style,o=i.top,a=i.left,s=i[r];i.top="",i.left="",i[r]="";var c=I(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed);i.top=o,i.left=a,i[r]=s,e.boundaries=c;var u=e.priority,l=t.offsets.popper,p={primary:function(t){var n=l[t];return l[t]<c[t]&&!e.escapeWithReference&&(n=Math.max(l[t],c[t])),he({},t,n)},secondary:function(t){var n="right"===t?"left":"top",r=l[n];return l[t]>c[t]&&!e.escapeWithReference&&(r=Math.min(l[n],c[t]-("right"===t?l.width:l.height))),he({},n,r)}};return u.forEach(function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";l=ve({},l,p[e](t))}),t.offsets.popper=l,t}function yt(t){var e=t.placement,n=e.split("-")[0],r=e.split("-")[1];if(r){var i=t.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),c=s?"left":"top",u=s?"width":"height",l={start:he({},c,o[c]),end:he({},c,o[c]+o[u]-a[u])};t.offsets.popper=ve({},a,l[r])}return t}function gt(t){if(!st(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=H(t.instance.modifiers,function(t){return"preventOverflow"===t.name}).boundaries;if(e.bottom<n.top||e.left>n.right||e.top>n.bottom||e.right<n.left){if(!0===t.hide)return t;t.hide=!0,t.attributes["x-out-of-boundaries"]=""}else{if(!1===t.hide)return t;t.hide=!1,t.attributes["x-out-of-boundaries"]=!1}return t}function bt(t){var e=t.placement,n=e.split("-")[0],r=t.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),t.placement=B(e),t.offsets.popper=S(i),t}function wt(t){t.offsetHeight}function xt(t,e,n){var r=t.popper,i=t.options,o=i.onCreate,a=i.onUpdate;i.onCreate=i.onUpdate=function(){wt(r),e&&e(),a(),i.onCreate=o,i.onUpdate=a},n||t.scheduleUpdate()}function _t(t){return t.getAttribute("x-placement").replace(/-.+/,"")}function kt(t,e,n){if(!e.getAttribute("x-placement"))return!0;var r=t.clientX,i=t.clientY,o=n.interactiveBorder,a=n.distance,s=e.getBoundingClientRect(),c=_t(e),u=o+a,l={top:s.top-i>o,bottom:i-s.bottom>o,left:s.left-r>o,right:r-s.right>o};switch(c){case"top":l.top=s.top-i>u;break;case"bottom":l.bottom=i-s.bottom>u;break;case"left":l.left=s.left-r>u;break;case"right":l.right=r-s.right>u}return l.top||l.bottom||l.left||l.right}function Tt(t,e,n,r){return e.length?{scale:function(){return 1===e.length?""+e[0]:n?e[0]+", "+e[1]:e[1]+", "+e[0]}(),translate:function(){return 1===e.length?r?-e[0]+"px":e[0]+"px":n?r?e[0]+"px, "+-e[1]+"px":e[0]+"px, "+e[1]+"px":r?-e[1]+"px, "+e[0]+"px":e[1]+"px, "+e[0]+"px"}()}[t]:""}function Ot(t,e){if(!t)return"";var n={X:"Y",Y:"X"};return e?t:n[t]}function Et(t,e,n){var r=_t(t),i="top"===r||"bottom"===r,a="right"===r||"bottom"===r,s=function(t){var e=n.match(t);return e?e[1]:""},c=function(t){var e=n.match(t);return e?e[1].split(",").map(parseFloat):[]},u={translate:/translateX?Y?\(([^)]+)\)/,scale:/scaleX?Y?\(([^)]+)\)/},l={translate:{axis:s(/translate([XY])/),numbers:c(u.translate)},scale:{axis:s(/scale([XY])/),numbers:c(u.scale)}},p=n.replace(u.translate,"translate"+Ot(l.translate.axis,i)+"("+Tt("translate",l.translate.numbers,i,a)+")").replace(u.scale,"scale"+Ot(l.scale.axis,i)+"("+Tt("scale",l.scale.numbers,i,a)+")");e.style[o("transform")]=p}function Ct(t){return-(t-Zt.distance)+"px"}function At(t,e){return(Element.prototype.closest||function(t){for(var e=this;e;){if(Te.call(e,t))return e;e=e.parentElement}}).call(t,e)}function St(t,e){return Array.isArray(t)?t[e]:t}function Pt(t,e){t.forEach(function(t){t&&t.setAttribute("data-state",e)})}function jt(t,e){t.filter(Boolean).forEach(function(t){t.style[o("transitionDuration")]=e+"ms"})}function Lt(t){var e=window.scrollX||window.pageXOffset,n=window.scrollY||window.pageYOffset;t.focus(),scroll(e,n)}function Mt(){var t=this._(Oe).lastTriggerEvent;return this.options.followCursor&&!Jt.usingTouch&&t&&"focus"!==t.type}function $t(t){var e=At(t.target,this.options.target);if(e&&!e._tippy){var n=e.getAttribute("title")||this.title;n&&(e.setAttribute("title",n),Wt(e,re({},this.options,{target:null})),It.call(e._tippy,t))}}function It(t){var e=this,n=this.options;if(Bt.call(this),!this.state.visible){if(n.target)return void $t.call(this,t);if(this._(Oe).isPreparingToShow=!0,n.wait)return void n.wait.call(this.popper,this.show.bind(this),t);if(Mt.call(this)){this._(Oe).followCursorListener||Ut.call(this);var r=p(this.popper),i=r.arrow;i&&(i.style.margin="0"),document.addEventListener("mousemove",this._(Oe).followCursorListener)}var o=St(n.delay,0);o?this._(Oe).showTimeout=setTimeout(function(){e.show()},o):this.show()}}function Nt(){var t=this;if(Bt.call(this),this.state.visible){this._(Oe).isPreparingToShow=!1;var e=St(this.options.delay,1);e?this._(Oe).hideTimeout=setTimeout(function(){t.state.visible&&t.hide()},e):this.hide()}}function Dt(){var t=this;return{onTrigger:function(e){t.state.enabled&&(Jt.supportsTouch&&Jt.usingTouch&&["mouseenter","mouseover","focus"].indexOf(e.type)>-1&&t.options.touchHold||(t._(Oe).lastTriggerEvent=e,"click"===e.type&&"persistent"!==t.options.hideOnClick&&t.state.visible?Nt.call(t):It.call(t,e)))},onMouseLeave:function(e){if(!(["mouseleave","mouseout"].indexOf(e.type)>-1&&Jt.supportsTouch&&Jt.usingTouch&&t.options.touchHold)){if(t.options.interactive){var n=Nt.bind(t),r=function e(r){var i=At(r.target,Qt.REFERENCE),o=At(r.target,Qt.POPPER)===t.popper,a=i===t.reference;o||a||kt(r,t.popper,t.options)&&(document.body.removeEventListener("mouseleave",n),document.removeEventListener("mousemove",e),Nt.call(t,e))};return document.body.addEventListener("mouseleave",n),void document.addEventListener("mousemove",r)}Nt.call(t)}},onBlur:function(e){if(e.target===t.reference&&!Jt.usingTouch){if(t.options.interactive){if(!e.relatedTarget)return;if(At(e.relatedTarget,Qt.POPPER))return}Nt.call(t)}},onDelegateShow:function(e){At(e.target,t.options.target)&&It.call(t,e)},onDelegateHide:function(e){At(e.target,t.options.target)&&Nt.call(t)}}}function Rt(){var t=this,e=this.popper,n=this.reference,r=this.options,i=p(e),o=i.tooltip,a=r.popperOptions,s="round"===r.arrowType?Qt.ROUND_ARROW:Qt.ARROW,c=o.querySelector(s),u=re({placement:r.placement},a||{},{modifiers:re({},a?a.modifiers:{},{arrow:re({element:s},a&&a.modifiers?a.modifiers.arrow:{}),flip:re({enabled:r.flip,padding:r.distance+5,behavior:r.flipBehavior},a&&a.modifiers?a.modifiers.flip:{}),offset:re({offset:r.offset},a&&a.modifiers?a.modifiers.offset:{})}),onCreate:function(){o.style[_t(e)]=Ct(r.distance),c&&r.arrowTransform&&Et(e,c,r.arrowTransform)},onUpdate:function(){var t=o.style;t.top="",t.bottom="",t.left="",t.right="",t[_t(e)]=Ct(r.distance),c&&r.arrowTransform&&Et(e,c,r.arrowTransform)}});return Xt.call(this,{target:e,callback:function(){t.popperInstance.update()},options:{childList:!0,subtree:!0,characterData:!0}}),new xe(n,e,u)}function Ft(t){var e=this.options;if(this.popperInstance?(this.popperInstance.scheduleUpdate(),e.livePlacement&&!Mt.call(this)&&this.popperInstance.enableEventListeners()):(this.popperInstance=Rt.call(this),e.livePlacement||this.popperInstance.disableEventListeners()),!Mt.call(this)){var n=p(this.popper),r=n.arrow;r&&(r.style.margin=""),this.popperInstance.reference=this.reference}xt(this.popperInstance,t,!0),e.appendTo.contains(this.popper)||e.appendTo.appendChild(this.popper)}function Bt(){var t=this._(Oe),e=t.showTimeout,n=t.hideTimeout;clearTimeout(e),clearTimeout(n)}function Ut(){var t=this;this._(Oe).followCursorListener=function(e){var n=t._(Oe).lastMouseMoveEvent=e,r=n.clientX,i=n.clientY;t.popperInstance&&(t.popperInstance.reference={getBoundingClientRect:function(){return{width:0,height:0,top:i,left:r,right:r,bottom:i}},clientWidth:0,clientHeight:0},t.popperInstance.scheduleUpdate())}}function Ht(){var t=this,e=function(){t.popper.style[o("transitionDuration")]=t.options.updateDuration+"ms"},n=function(){t.popper.style[o("transitionDuration")]=""};!function r(){t.popperInstance&&t.popperInstance.update(),e(),t.state.visible?requestAnimationFrame(r):n()}()}function Xt(t){var e=t.target,n=t.callback,r=t.options;if(window.MutationObserver){var i=new MutationObserver(n);i.observe(e,r),this._(Oe).mutationObservers.push(i)}}function zt(t,e){if(!t)return e();var n=p(this.popper),r=n.tooltip,i=function(t,e){e&&r[t+"EventListener"]("transition"in document.body.style?"transitionend":"webkitTransitionEnd",e)},o=function t(n){n.target===r&&(i("remove",t),e())};i("remove",this._(Oe).transitionendListener),i("add",o),this._(Oe).transitionendListener=o}function Yt(t,e){return t.reduce(function(t,n){var r=Ae,i=l(n,e.performance?e:u(n,e)),o=n.getAttribute("title");if(!(o||i.target||i.html||i.dynamicTitle))return t;n.setAttribute(i.target?"data-tippy-delegate":"data-tippy",""),f(n);var a=s(r,o,i),d=new Ce({id:r,reference:n,popper:a,options:i,title:o,popperInstance:null});i.createPopperInstanceOnInit&&(d.popperInstance=Rt.call(d),d.popperInstance.disableEventListeners());var h=Dt.call(d);return d.listeners=i.trigger.trim().split(" ").reduce(function(t,e){return t.concat(c(e,n,h,i))},[]),i.dynamicTitle&&Xt.call(d,{target:n,callback:function(){var t=p(a),e=t.content,r=n.getAttribute("title");r&&(e[i.allowTitleHTML?"innerHTML":"textContent"]=d.title=r,f(n))},options:{attributes:!0}}),n._tippy=d,a._tippy=d,a._reference=n,t.push(d),Ae++,t},[])}function qt(t){n(document.querySelectorAll(Qt.POPPER)).forEach(function(e){var n=e._tippy;if(n){var r=n.options;!(!0===r.hideOnClick||r.trigger.indexOf("focus")>-1)||t&&e===t.popper||n.hide()}})}function Vt(t){var e=function(){Jt.usingTouch||(Jt.usingTouch=!0,Jt.iOS&&document.body.classList.add("tippy-touch"),Jt.dynamicInputDetection&&window.performance&&document.addEventListener("mousemove",r),Jt.onUserInputChange("touch"))},r=function(){var t=void 0;return function(){var e=performance.now();e-t<20&&(Jt.usingTouch=!1,document.removeEventListener("mousemove",r),Jt.iOS||document.body.classList.remove("tippy-touch"),Jt.onUserInputChange("mouse")),t=e}}(),i=function(t){if(!(t.target instanceof Element))return qt();var e=At(t.target,Qt.REFERENCE),n=At(t.target,Qt.POPPER);if(!(n&&n._tippy&&n._tippy.options.interactive)){if(e&&e._tippy){var r=e._tippy.options,i=r.trigger.indexOf("click")>-1,o=r.multiple;if(!o&&Jt.usingTouch||!o&&i)return qt(e._tippy);if(!0!==r.hideOnClick||i)return}qt()}},o=function(){var t=document,e=t.activeElement;e&&e.blur&&Te.call(e,Qt.REFERENCE)&&e.blur()},a=function(){n(document.querySelectorAll(Qt.POPPER)).forEach(function(t){var e=t._tippy;e&&!e.options.livePlacement&&e.popperInstance.scheduleUpdate()})};document.addEventListener("click",i,t),document.addEventListener("touchstart",e),window.addEventListener("blur",o),window.addEventListener("resize",a),Jt.supportsTouch||!navigator.maxTouchPoints&&!navigator.msMaxTouchPoints||document.addEventListener("pointerdown",e)}function Wt(e,n,o){Jt.supported&&!Se&&(Vt(Pe),Se=!0),t(e)&&i(e),n=re({},Zt,n);var a=r(e),s=a[0];return{selector:e,options:n,tooltips:Jt.supported?Yt(o&&s?[s]:a,n):[],destroyAll:function(){this.tooltips.forEach(function(t){return t.destroy()}),this.tooltips=[]}}}var Gt="undefined"!=typeof window,Kt=Gt&&/MSIE |Trident\//.test(navigator.userAgent),Jt={};Gt&&(Jt.supported="requestAnimationFrame"in window,Jt.supportsTouch="ontouchstart"in window,Jt.usingTouch=!1,Jt.dynamicInputDetection=!0,Jt.iOS=/iPhone|iPad|iPod/.test(navigator.platform)&&!window.MSStream,Jt.onUserInputChange=function(){});for(var Qt={POPPER:".tippy-popper",TOOLTIP:".tippy-tooltip",CONTENT:".tippy-content",BACKDROP:".tippy-backdrop",ARROW:".tippy-arrow",ROUND_ARROW:".tippy-roundarrow",REFERENCE:"[data-tippy]"},Zt={placement:"top",livePlacement:!0,trigger:"mouseenter focus",animation:"shift-away",html:!1,animateFill:!0,arrow:!1,delay:[0,20],duration:[350,300],interactive:!1,interactiveBorder:2,theme:"dark",size:"regular",distance:10,offset:0,hideOnClick:!0,multiple:!1,followCursor:!1,inertia:!1,updateDuration:350,sticky:!1,appendTo:function(){return document.body},zIndex:9999,touchHold:!1,performance:!1,dynamicTitle:!1,flip:!0,flipBehavior:"flip",arrowType:"sharp",arrowTransform:"",maxWidth:"",target:null,allowTitleHTML:!0,popperOptions:{},createPopperInstanceOnInit:!1,onShow:function(){},onShown:function(){},onHide:function(){},onHidden:function(){}},te=Jt.supported&&Object.keys(Zt),ee=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},ne=(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}}()),re=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},ie="undefined"!=typeof window&&"undefined"!=typeof document,oe=["Edge","Trident","Firefox"],ae=0,se=0;se<oe.length;se+=1)if(ie&&navigator.userAgent.indexOf(oe[se])>=0){ae=1;break}var ce=ie&&window.Promise,ue=ce?d:h,le=ie&&!(!window.MSInputMethodContext||!document.documentMode),pe=ie&&/MSIE 10/.test(navigator.userAgent),fe=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},de=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}}(),he=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},ve=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},me=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],ye=me.slice(3),ge={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},be={shift:{order:100,enabled:!0,fn:yt},offset:{order:200,enabled:!0,fn:vt,offset:0},preventOverflow:{order:300,enabled:!0,fn:mt,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:ft},arrow:{order:500,enabled:!0,fn:ct,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:pt,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:bt},hide:{order:800,enabled:!0,fn:gt},computeStyle:{order:850,enabled:!0,fn:at,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:it,onLoad:ot,gpuAcceleration:void 0}},we={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:be},xe=function(){function t(e,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};fe(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=ue(this.update.bind(this)),this.options=ve({},t.Defaults,i),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(ve({},t.Defaults.modifiers,i.modifiers)).forEach(function(e){r.options.modifiers[e]=ve({},t.Defaults.modifiers[e]||{},i.modifiers?i.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(t){return ve({name:t},r.options.modifiers[t])}).sort(function(t,e){return t.order-e.order}),this.modifiers.forEach(function(t){t.enabled&&v(t.onLoad)&&t.onLoad(r.reference,r.popper,r.options,t,r.state)}),this.update();var o=this.options.eventsEnabled;o&&this.enableEventListeners(),this.state.eventsEnabled=o}return de(t,[{key:"update",value:function(){return Y.call(this)}},{key:"destroy",value:function(){return W.call(this)}},{key:"enableEventListeners",value:function(){return Q.call(this)}},{key:"disableEventListeners",value:function(){return tt.call(this)}}]),t}();xe.Utils=("undefined"!=typeof window?window:e).PopperUtils,xe.placements=me,xe.Defaults=we;var _e={};if(Gt){var ke=Element.prototype;_e=ke.matches||ke.matchesSelector||ke.webkitMatchesSelector||ke.mozMatchesSelector||ke.msMatchesSelector||function(t){for(var e=(this.document||this.ownerDocument).querySelectorAll(t),n=e.length;--n>=0&&e.item(n)!==this;);return n>-1}}var Te=_e,Oe={},Ee=function(t){return function(e){return e===Oe&&t}},Ce=function(){function t(e){ee(this,t);for(var n in e)this[n]=e[n];this.state={destroyed:!1,visible:!1,enabled:!0},this._=Ee({mutationObservers:[]})}return ne(t,[{key:"enable",value:function(){this.state.enabled=!0}},{key:"disable",value:function(){this.state.enabled=!1}},{key:"show",value:function(t){var e=this;if(!this.state.destroyed&&this.state.enabled){var n=this.popper,r=this.reference,i=this.options,a=p(n),s=a.tooltip,c=a.backdrop,u=a.content;if((!i.dynamicTitle||r.getAttribute("data-original-title"))&&!r.hasAttribute("disabled")){if(!r.refObj&&!document.documentElement.contains(r))return void this.destroy();i.onShow.call(n,this),t=St(void 0!==t?t:i.duration,0),jt([n,s,c],0),n.style.visibility="visible",this.state.visible=!0,Ft.call(this,function(){if(e.state.visible){if(Mt.call(e)||e.popperInstance.scheduleUpdate(),Mt.call(e)){e.popperInstance.disableEventListeners();var a=St(i.delay,0),l=e._(Oe).lastTriggerEvent;l&&e._(Oe).followCursorListener(a&&e._(Oe).lastMouseMoveEvent?e._(Oe).lastMouseMoveEvent:l)}jt([s,c,c?u:null],t),c&&getComputedStyle(c)[o("transform")],i.interactive&&r.classList.add("tippy-active"),i.sticky&&Ht.call(e),Pt([s,c],"visible"),zt.call(e,t,function(){i.updateDuration||s.classList.add("tippy-notransition"),i.interactive&&Lt(n),r.setAttribute("aria-describedby","tippy-"+e.id),i.onShown.call(n,e)})}})}}}},{key:"hide",value:function(t){var e=this;if(!this.state.destroyed&&this.state.enabled){var n=this.popper,r=this.reference,i=this.options,o=p(n),a=o.tooltip,s=o.backdrop,c=o.content;i.onHide.call(n,this),t=St(void 0!==t?t:i.duration,1),i.updateDuration||a.classList.remove("tippy-notransition"),i.interactive&&r.classList.remove("tippy-active"),n.style.visibility="hidden",this.state.visible=!1,jt([a,s,s?c:null],t),Pt([a,s],"hidden"),i.interactive&&i.trigger.indexOf("click")>-1&&Lt(r),zt.call(this,t,function(){!e.state.visible&&i.appendTo.contains(n)&&(e._(Oe).isPreparingToShow||(document.removeEventListener("mousemove",e._(Oe).followCursorListener),e._(Oe).lastMouseMoveEvent=null),e.popperInstance&&e.popperInstance.disableEventListeners(),r.removeAttribute("aria-describedby"),i.appendTo.removeChild(n),i.onHidden.call(n,e))})}}},{key:"destroy",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.state.destroyed||(this.state.visible&&this.hide(0),this.listeners.forEach(function(e){t.reference.removeEventListener(e.event,e.handler)}),this.title&&this.reference.setAttribute("title",this.title),delete this.reference._tippy,["data-original-title","data-tippy","data-tippy-delegate"].forEach(function(e){t.reference.removeAttribute(e)}),this.options.target&&e&&n(this.reference.querySelectorAll(this.options.target)).forEach(function(t){return t._tippy&&t._tippy.destroy()}),this.popperInstance&&this.popperInstance.destroy(),this._(Oe).mutationObservers.forEach(function(t){t.disconnect()}),this.state.destroyed=!0)}}]),t}(),Ae=1,Se=!1,Pe=!1;return Wt.version="2.6.0",Wt.browser=Jt,Wt.defaults=Zt,Wt.one=function(t,e){return Wt(t,e,!0).tooltips[0]},Wt.disableAnimations=function(){Zt.updateDuration=Zt.duration=0,Zt.animateFill=!1},Wt.useCapture=function(){Pe=!0},function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(Gt&&Jt.supported){var e=document.head||document.querySelector("head"),n=document.createElement("style");n.type="text/css",e.insertBefore(n,e.firstChild),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}}('.tippy-touch{cursor:pointer!important}.tippy-notransition{transition:none!important}.tippy-popper{max-width:350px;-webkit-perspective:700px;perspective:700px;z-index:9999;outline:0;transition-timing-function:cubic-bezier(.165,.84,.44,1);pointer-events:none;line-height:1.4}.tippy-popper[data-html]{max-width:96%;max-width:calc(100% - 20px)}.tippy-popper[x-placement^=top] .tippy-backdrop{border-radius:40% 40% 0 0}.tippy-popper[x-placement^=top] .tippy-roundarrow{bottom:-8px;-webkit-transform-origin:50% 0;transform-origin:50% 0}.tippy-popper[x-placement^=top] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.tippy-popper[x-placement^=top] .tippy-arrow{border-top:7px solid #333;border-right:7px solid transparent;border-left:7px solid transparent;bottom:-7px;margin:0 6px;-webkit-transform-origin:50% 0;transform-origin:50% 0}.tippy-popper[x-placement^=top] .tippy-backdrop{-webkit-transform-origin:0 90%;transform-origin:0 90%}.tippy-popper[x-placement^=top] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(6) translate(-50%,25%);transform:scale(6) translate(-50%,25%);opacity:1}.tippy-popper[x-placement^=top] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(1) translate(-50%,25%);transform:scale(1) translate(-50%,25%);opacity:0}.tippy-popper[x-placement^=top] [data-animation=shift-toward][data-state=visible]{opacity:1;-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateY(-20px);transform:translateY(-20px)}.tippy-popper[x-placement^=top] [data-animation=perspective]{-webkit-transform-origin:bottom;transform-origin:bottom}.tippy-popper[x-placement^=top] [data-animation=perspective][data-state=visible]{opacity:1;-webkit-transform:translateY(-10px) rotateX(0);transform:translateY(-10px) rotateX(0)}.tippy-popper[x-placement^=top] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:translateY(0) rotateX(90deg);transform:translateY(0) rotateX(90deg)}.tippy-popper[x-placement^=top] [data-animation=fade][data-state=visible]{opacity:1;-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-away][data-state=visible]{opacity:1;-webkit-transform:translateY(-10px);transform:translateY(-10px)}.tippy-popper[x-placement^=top] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateY(0);transform:translateY(0)}.tippy-popper[x-placement^=top] [data-animation=scale][data-state=visible]{opacity:1;-webkit-transform:translateY(-10px) scale(1);transform:translateY(-10px) scale(1)}.tippy-popper[x-placement^=top] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateY(0) scale(0);transform:translateY(0) scale(0)}.tippy-popper[x-placement^=bottom] .tippy-backdrop{border-radius:0 0 30% 30%}.tippy-popper[x-placement^=bottom] .tippy-roundarrow{top:-8px;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}.tippy-popper[x-placement^=bottom] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(0);transform:rotate(0)}.tippy-popper[x-placement^=bottom] .tippy-arrow{border-bottom:7px solid #333;border-right:7px solid transparent;border-left:7px solid transparent;top:-7px;margin:0 6px;-webkit-transform-origin:50% 100%;transform-origin:50% 100%}.tippy-popper[x-placement^=bottom] .tippy-backdrop{-webkit-transform-origin:0 -90%;transform-origin:0 -90%}.tippy-popper[x-placement^=bottom] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(6) translate(-50%,-125%);transform:scale(6) translate(-50%,-125%);opacity:1}.tippy-popper[x-placement^=bottom] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(1) translate(-50%,-125%);transform:scale(1) translate(-50%,-125%);opacity:0}.tippy-popper[x-placement^=bottom] [data-animation=shift-toward][data-state=visible]{opacity:1;-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateY(20px);transform:translateY(20px)}.tippy-popper[x-placement^=bottom] [data-animation=perspective]{-webkit-transform-origin:top;transform-origin:top}.tippy-popper[x-placement^=bottom] [data-animation=perspective][data-state=visible]{opacity:1;-webkit-transform:translateY(10px) rotateX(0);transform:translateY(10px) rotateX(0)}.tippy-popper[x-placement^=bottom] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:translateY(0) rotateX(-90deg);transform:translateY(0) rotateX(-90deg)}.tippy-popper[x-placement^=bottom] [data-animation=fade][data-state=visible]{opacity:1;-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-away][data-state=visible]{opacity:1;-webkit-transform:translateY(10px);transform:translateY(10px)}.tippy-popper[x-placement^=bottom] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateY(0);transform:translateY(0)}.tippy-popper[x-placement^=bottom] [data-animation=scale][data-state=visible]{opacity:1;-webkit-transform:translateY(10px) scale(1);transform:translateY(10px) scale(1)}.tippy-popper[x-placement^=bottom] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateY(0) scale(0);transform:translateY(0) scale(0)}.tippy-popper[x-placement^=left] .tippy-backdrop{border-radius:50% 0 0 50%}.tippy-popper[x-placement^=left] .tippy-roundarrow{right:-16px;-webkit-transform-origin:33.33333333% 50%;transform-origin:33.33333333% 50%}.tippy-popper[x-placement^=left] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.tippy-popper[x-placement^=left] .tippy-arrow{border-left:7px solid #333;border-top:7px solid transparent;border-bottom:7px solid transparent;right:-7px;margin:3px 0;-webkit-transform-origin:0 50%;transform-origin:0 50%}.tippy-popper[x-placement^=left] .tippy-backdrop{-webkit-transform-origin:100% 0;transform-origin:100% 0}.tippy-popper[x-placement^=left] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(6) translate(40%,-50%);transform:scale(6) translate(40%,-50%);opacity:1}.tippy-popper[x-placement^=left] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(1.5) translate(40%,-50%);transform:scale(1.5) translate(40%,-50%);opacity:0}.tippy-popper[x-placement^=left] [data-animation=shift-toward][data-state=visible]{opacity:1;-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateX(-20px);transform:translateX(-20px)}.tippy-popper[x-placement^=left] [data-animation=perspective]{-webkit-transform-origin:right;transform-origin:right}.tippy-popper[x-placement^=left] [data-animation=perspective][data-state=visible]{opacity:1;-webkit-transform:translateX(-10px) rotateY(0);transform:translateX(-10px) rotateY(0)}.tippy-popper[x-placement^=left] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:translateX(0) rotateY(-90deg);transform:translateX(0) rotateY(-90deg)}.tippy-popper[x-placement^=left] [data-animation=fade][data-state=visible]{opacity:1;-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-away][data-state=visible]{opacity:1;-webkit-transform:translateX(-10px);transform:translateX(-10px)}.tippy-popper[x-placement^=left] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateX(0);transform:translateX(0)}.tippy-popper[x-placement^=left] [data-animation=scale][data-state=visible]{opacity:1;-webkit-transform:translateX(-10px) scale(1);transform:translateX(-10px) scale(1)}.tippy-popper[x-placement^=left] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateX(0) scale(0);transform:translateX(0) scale(0)}.tippy-popper[x-placement^=right] .tippy-backdrop{border-radius:0 50% 50% 0}.tippy-popper[x-placement^=right] .tippy-roundarrow{left:-16px;-webkit-transform-origin:66.66666666% 50%;transform-origin:66.66666666% 50%}.tippy-popper[x-placement^=right] .tippy-roundarrow svg{position:absolute;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.tippy-popper[x-placement^=right] .tippy-arrow{border-right:7px solid #333;border-top:7px solid transparent;border-bottom:7px solid transparent;left:-7px;margin:3px 0;-webkit-transform-origin:100% 50%;transform-origin:100% 50%}.tippy-popper[x-placement^=right] .tippy-backdrop{-webkit-transform-origin:-100% 0;transform-origin:-100% 0}.tippy-popper[x-placement^=right] .tippy-backdrop[data-state=visible]{-webkit-transform:scale(6) translate(-140%,-50%);transform:scale(6) translate(-140%,-50%);opacity:1}.tippy-popper[x-placement^=right] .tippy-backdrop[data-state=hidden]{-webkit-transform:scale(1.5) translate(-140%,-50%);transform:scale(1.5) translate(-140%,-50%);opacity:0}.tippy-popper[x-placement^=right] [data-animation=shift-toward][data-state=visible]{opacity:1;-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-toward][data-state=hidden]{opacity:0;-webkit-transform:translateX(20px);transform:translateX(20px)}.tippy-popper[x-placement^=right] [data-animation=perspective]{-webkit-transform-origin:left;transform-origin:left}.tippy-popper[x-placement^=right] [data-animation=perspective][data-state=visible]{opacity:1;-webkit-transform:translateX(10px) rotateY(0);transform:translateX(10px) rotateY(0)}.tippy-popper[x-placement^=right] [data-animation=perspective][data-state=hidden]{opacity:0;-webkit-transform:translateX(0) rotateY(90deg);transform:translateX(0) rotateY(90deg)}.tippy-popper[x-placement^=right] [data-animation=fade][data-state=visible]{opacity:1;-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=fade][data-state=hidden]{opacity:0;-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-away][data-state=visible]{opacity:1;-webkit-transform:translateX(10px);transform:translateX(10px)}.tippy-popper[x-placement^=right] [data-animation=shift-away][data-state=hidden]{opacity:0;-webkit-transform:translateX(0);transform:translateX(0)}.tippy-popper[x-placement^=right] [data-animation=scale][data-state=visible]{opacity:1;-webkit-transform:translateX(10px) scale(1);transform:translateX(10px) scale(1)}.tippy-popper[x-placement^=right] [data-animation=scale][data-state=hidden]{opacity:0;-webkit-transform:translateX(0) scale(0);transform:translateX(0) scale(0)}.tippy-tooltip{position:relative;color:#fff;border-radius:4px;font-size:.9rem;padding:.3rem .6rem;text-align:center;will-change:transform;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#333}.tippy-tooltip[data-size=small]{padding:.2rem .4rem;font-size:.75rem}.tippy-tooltip[data-size=large]{padding:.4rem .8rem;font-size:1rem}.tippy-tooltip[data-animatefill]{overflow:hidden;background-color:transparent}.tippy-tooltip[data-animatefill] .tippy-content{transition:-webkit-clip-path cubic-bezier(.46,.1,.52,.98);transition:clip-path cubic-bezier(.46,.1,.52,.98);transition:clip-path cubic-bezier(.46,.1,.52,.98),-webkit-clip-path cubic-bezier(.46,.1,.52,.98)}.tippy-tooltip[data-interactive],.tippy-tooltip[data-interactive] path{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.53,2,.36,.85)}.tippy-tooltip[data-inertia][data-state=hidden]{transition-timing-function:ease}.tippy-arrow,.tippy-roundarrow{position:absolute;width:0;height:0}.tippy-roundarrow{width:24px;height:8px;fill:#333;pointer-events:none}.tippy-backdrop{position:absolute;will-change:transform;background-color:#333;border-radius:50%;width:26%;left:50%;top:50%;z-index:-1;transition:all cubic-bezier(.46,.1,.52,.98);-webkit-backface-visibility:hidden;backface-visibility:hidden}.tippy-backdrop:after{content:"";float:left;padding-top:100%}body:not(.tippy-touch) .tippy-tooltip[data-animatefill][data-state=visible] .tippy-content{-webkit-clip-path:ellipse(100% 100% at 50% 50%);clip-path:ellipse(100% 100% at 50% 50%)}body:not(.tippy-touch) .tippy-tooltip[data-animatefill][data-state=hidden] .tippy-content{-webkit-clip-path:ellipse(5% 50% at 50% 50%);clip-path:ellipse(5% 50% at 50% 50%)}body:not(.tippy-touch) .tippy-popper[x-placement=right] .tippy-tooltip[data-animatefill][data-state=visible] .tippy-content{-webkit-clip-path:ellipse(135% 100% at 0 50%);clip-path:ellipse(135% 100% at 0 50%)}body:not(.tippy-touch) .tippy-popper[x-placement=right] .tippy-tooltip[data-animatefill][data-state=hidden] .tippy-content{-webkit-clip-path:ellipse(40% 100% at 0 50%);clip-path:ellipse(40% 100% at 0 50%)}body:not(.tippy-touch) .tippy-popper[x-placement=left] .tippy-tooltip[data-animatefill][data-state=visible] .tippy-content{-webkit-clip-path:ellipse(135% 100% at 100% 50%);clip-path:ellipse(135% 100% at 100% 50%)}body:not(.tippy-touch) .tippy-popper[x-placement=left] .tippy-tooltip[data-animatefill][data-state=hidden] .tippy-content{-webkit-clip-path:ellipse(40% 100% at 100% 50%);clip-path:ellipse(40% 100% at 100% 50%)}@media (max-width:360px){.tippy-popper{max-width:96%;max-width:calc(100% - 20px)}}'),Wt}()}()}).call(e,n(9))},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=r(i);n(1);var a=n(0),s=r(a);window.Tippy=o.default,e.default=s.default},function(t,e,n){"use strict";Array.prototype.forEach||(Array.prototype.forEach=function(t){var e,n;if(null==this)throw new TypeError("this is null or not defined");var r=Object(this),i=r.length>>>0;if("function"!=typeof t)throw new TypeError(t+" is not a function");for(arguments.length>1&&(e=arguments[1]),n=0;n<i;){var o;n in r&&(o=r[n],t.call(e,o,n,r)),n++}}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1;r<arguments.length;r++){var i=arguments[r];if(null!=i)for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])}return n},writable:!0,configurable:!0}),window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=function(t,e){e=e||window;for(var n=0;n<this.length;n++)t.call(e,this[n],n,this)})},function(t,e,n){e=t.exports=n(6)(!1),e.push([t.i,".tippy-popper[x-placement^=top] .tippy-tooltip.light-theme .tippy-arrow {\n border-top: 7px solid #fff;\n border-right: 7px solid transparent;\n border-left: 7px solid transparent;\n}\n\n.tippy-popper[x-placement^=top] .tippy-tooltip.light-theme .tippy-roundarrow {\n width: 24px;\n height: 24px;\n fill: #fff;\n}\n\n.tippy-popper[x-placement^=bottom] .tippy-tooltip.light-theme .tippy-arrow {\n border-bottom: 7px solid #fff;\n border-right: 7px solid transparent;\n border-left: 7px solid transparent;\n}\n\n.tippy-popper[x-placement^=bottom] .tippy-tooltip.light-theme .tippy-roundarrow {\n width: 24px;\n height: 24px;\n fill: #fff;\n}\n\n.tippy-popper[x-placement^=left] .tippy-tooltip.light-theme .tippy-arrow {\n border-left: 7px solid #fff;\n border-top: 7px solid transparent;\n border-bottom: 7px solid transparent;\n}\n\n.tippy-popper[x-placement^=left] .tippy-tooltip.light-theme .tippy-roundarrow {\n width: 24px;\n height: 24px;\n fill: #fff;\n}\n\n.tippy-popper[x-placement^=right] .tippy-tooltip.light-theme .tippy-arrow {\n border-right: 7px solid #fff;\n border-top: 7px solid transparent;\n border-bottom: 7px solid transparent;\n}\n\n.tippy-popper[x-placement^=right] .tippy-tooltip.light-theme .tippy-roundarrow {\n width: 24px;\n height: 24px;\n fill: #fff;\n}\n\n.tippy-popper .tippy-tooltip.light-theme {\n color: #26323d;\n box-shadow: 0 0 20px 4px rgba(154, 161, 177, 0.15), 0 4px 80px -8px rgba(36, 40, 47, 0.25), 0 4px 4px -2px rgba(91, 94, 105, 0.15);\n background-color: #fff;\n}\n\n.tippy-popper .tippy-tooltip.light-theme .tippy-backdrop {\n background-color: #fff;\n}\n\n.tippy-popper .tippy-tooltip.light-theme[data-animatefill] {\n background-color: transparent;\n}\n\n.tippy-popper[x-placement^=top] .tippy-tooltip.translucent-theme .tippy-arrow {\n border-top: 7px solid rgba(0, 0, 0, 0.7);\n border-right: 7px solid transparent;\n border-left: 7px solid transparent;\n}\n\n.tippy-popper[x-placement^=top] .tippy-tooltip.translucent-theme .tippy-roundarrow {\n width: 24px;\n height: 24px;\n fill: rgba(0, 0, 0, 0.7);\n}\n\n.tippy-popper[x-placement^=bottom] .tippy-tooltip.translucent-theme .tippy-arrow {\n border-bottom: 7px solid rgba(0, 0, 0, 0.7);\n border-right: 7px solid transparent;\n border-left: 7px solid transparent;\n}\n\n.tippy-popper[x-placement^=bottom] .tippy-tooltip.translucent-theme .tippy-roundarrow {\n width: 24px;\n height: 24px;\n fill: rgba(0, 0, 0, 0.7);\n}\n\n.tippy-popper[x-placement^=left] .tippy-tooltip.translucent-theme .tippy-arrow {\n border-left: 7px solid rgba(0, 0, 0, 0.7);\n border-top: 7px solid transparent;\n border-bottom: 7px solid transparent;\n}\n\n.tippy-popper[x-placement^=left] .tippy-tooltip.translucent-theme .tippy-roundarrow {\n width: 24px;\n height: 24px;\n fill: rgba(0, 0, 0, 0.7);\n}\n\n.tippy-popper[x-placement^=right] .tippy-tooltip.translucent-theme .tippy-arrow {\n border-right: 7px solid rgba(0, 0, 0, 0.7);\n border-top: 7px solid transparent;\n border-bottom: 7px solid transparent;\n}\n\n.tippy-popper[x-placement^=right] .tippy-tooltip.translucent-theme .tippy-roundarrow {\n width: 24px;\n height: 24px;\n fill: rgba(0, 0, 0, 0.7);\n}\n\n.tippy-popper .tippy-tooltip.translucent-theme,\n.tippy-popper .tippy-tooltip.translucent-theme .tippy-backdrop {\n background-color: rgba(0, 0, 0, 0.7);\n}\n\n.tippy-popper .tippy-tooltip.translucent-theme[data-animatefill] {\n background-color: transparent;\n}\n\n.tippy-tooltip.gradient-theme {\n background: linear-gradient(45deg, #8c61f5, #ff9cad);\n font-weight: bold;\n}\n\n.tippy-tooltip.gradient-theme::after {\n position: absolute;\n left: 0;\n top: 5px;\n content: '';\n width: 100%;\n height: 100%;\n background: linear-gradient(45deg, #8c61f5, #ff9cad);\n -webkit-filter: blur(12px) brightness(1.2);\n filter: blur(12px) brightness(1.2);\n opacity: 0.8;\n font-weight: bold;\n z-index: -1;\n}\n",""])},function(t,e){function n(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var o=r(i);return[n].concat(i.sources.map(function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"})).concat([o]).join("\n")}return[n].join("\n")}function r(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var r=n(e,t);return e[2]?"@media "+e[2]+"{"+r+"}":r}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<t.length;i++){var a=t[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(t,e,n){function r(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=h[r.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](r.parts[o]);for(;o<r.parts.length;o++)i.parts.push(l(r.parts[o],e))}else{for(var a=[],o=0;o<r.parts.length;o++)a.push(l(r.parts[o],e));h[r.id]={id:r.id,refs:1,parts:a}}}}function i(t,e){for(var n=[],r={},i=0;i<t.length;i++){var o=t[i],a=e.base?o[0]+e.base:o[0],s=o[1],c=o[2],u=o[3],l={css:s,media:c,sourceMap:u};r[a]?r[a].parts.push(l):n.push(r[a]={id:a,parts:[l]})}return n}function o(t,e){var n=m(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=b[b.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),b.push(e);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(e)}}function a(t){t.parentNode.removeChild(t);var e=b.indexOf(t);e>=0&&b.splice(e,1)}function s(t){var e=document.createElement("style");return t.attrs.type="text/css",u(e,t.attrs),o(t,e),e}function c(t){var e=document.createElement("link");return t.attrs.type="text/css",t.attrs.rel="stylesheet",u(e,t.attrs),o(t,e),e}function u(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function l(t,e){var n,r,i,o;if(e.transform&&t.css){if(!(o=e.transform(t.css)))return function(){};t.css=o}if(e.singleton){var u=g++;n=y||(y=s(e)),r=p.bind(null,n,u,!1),i=p.bind(null,n,u,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=c(e),r=d.bind(null,n,e),i=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(e),r=f.bind(null,n),i=function(){a(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}function p(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=x(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function f(t,e){var n=e.css,r=e.media;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function d(t,e,n){var r=n.css,i=n.sourceMap,o=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||o)&&(r=w(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}var h={},v=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}}(function(){return window&&document&&document.all&&!window.atob}),m=function(t){var e={};return function(n){return void 0===e[n]&&(e[n]=t.call(this,n)),e[n]}}(function(t){return document.querySelector(t)}),y=null,g=0,b=[],w=n(8);t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");e=e||{},e.attrs="object"==typeof e.attrs?e.attrs:{},void 0===e.singleton&&(e.singleton=v()),void 0===e.insertInto&&(e.insertInto="head"),void 0===e.insertAt&&(e.insertAt="bottom");var n=i(t,e);return r(n,e),function(t){for(var o=[],a=0;a<n.length;a++){var s=n[a],c=h[s.id];c.refs--,o.push(c)}t&&r(i(t,e),e);for(var a=0;a<o.length;a++){var c=o[a];if(0===c.refs){for(var u=0;u<c.parts.length;u++)c.parts[u]();delete h[c.id]}}}};var x=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,r=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var i=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(i))return t;var o;return o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")"})}},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";/**
23
+ * vuex v3.1.0
24
+ * (c) 2019 Evan You
25
+ * @license MIT
26
+ */
27
+ function r(t){function e(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:e});else{var n=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[e].concat(t.init):e,n.call(this,t)}}}function i(t){O&&(t._devtoolHook=O,O.emit("vuex:init",t),O.on("vuex:travel-to-state",function(e){t.replaceState(e)}),t.subscribe(function(t,e){O.emit("vuex:mutation",t,e)}))}function o(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function a(t){return null!==t&&"object"==typeof t}function s(t){return t&&"function"==typeof t.then}function c(t,e,n){if(e.update(n),n.modules)for(var r in n.modules){if(!e.getChild(r))return;c(t.concat(r),e.getChild(r),n.modules[r])}}function u(t,e){return e.indexOf(t)<0&&e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function l(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;f(t,n,[],t._modules.root,!0),p(t,n,e)}function p(t,e,n){var r=t._vm;t.getters={};var i=t._wrappedGetters,a={};o(i,function(e,n){a[n]=function(){return e(t)},Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})});var s=S.config.silent;S.config.silent=!0,t._vm=new S({data:{$$state:e},computed:a}),S.config.silent=s,t.strict&&g(t),r&&(n&&t._withCommit(function(){r._data.$$state=null}),S.nextTick(function(){return r.$destroy()}))}function f(t,e,n,r,i){var o=!n.length,a=t._modules.getNamespace(n);if(r.namespaced&&(t._modulesNamespaceMap[a]=r),!o&&!i){var s=b(e,n.slice(0,-1)),c=n[n.length-1];t._withCommit(function(){S.set(s,c,r.state)})}var u=r.context=d(t,a,n);r.forEachMutation(function(e,n){v(t,a+n,e,u)}),r.forEachAction(function(e,n){var r=e.root?n:a+n,i=e.handler||e;m(t,r,i,u)}),r.forEachGetter(function(e,n){y(t,a+n,e,u)}),r.forEachChild(function(r,o){f(t,e,n.concat(o),r,i)})}function d(t,e,n){var r=""===e,i={dispatch:r?t.dispatch:function(n,r,i){var o=w(n,r,i),a=o.payload,s=o.options,c=o.type;return s&&s.root||(c=e+c),t.dispatch(c,a)},commit:r?t.commit:function(n,r,i){var o=w(n,r,i),a=o.payload,s=o.options,c=o.type;s&&s.root||(c=e+c),t.commit(c,a,s)}};return Object.defineProperties(i,{getters:{get:r?function(){return t.getters}:function(){return h(t,e)}},state:{get:function(){return b(t.state,n)}}}),i}function h(t,e){var n={},r=e.length;return Object.keys(t.getters).forEach(function(i){if(i.slice(0,r)===e){var o=i.slice(r);Object.defineProperty(n,o,{get:function(){return t.getters[i]},enumerable:!0})}}),n}function v(t,e,n,r){(t._mutations[e]||(t._mutations[e]=[])).push(function(e){n.call(t,r.state,e)})}function m(t,e,n,r){(t._actions[e]||(t._actions[e]=[])).push(function(e,i){var o=n.call(t,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:t.getters,rootState:t.state},e,i);return s(o)||(o=Promise.resolve(o)),t._devtoolHook?o.catch(function(e){throw t._devtoolHook.emit("vuex:error",e),e}):o})}function y(t,e,n,r){t._wrappedGetters[e]||(t._wrappedGetters[e]=function(t){return n(r.state,r.getters,t.state,t.getters)})}function g(t){t._vm.$watch(function(){return this._data.$$state},function(){},{deep:!0,sync:!0})}function b(t,e){return e.length?e.reduce(function(t,e){return t[e]},t):t}function w(t,e,n){return a(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function x(t){S&&t===S||(S=t,r(S))}function _(t){return Array.isArray(t)?t.map(function(t){return{key:t,val:t}}):Object.keys(t).map(function(e){return{key:e,val:t[e]}})}function k(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function T(t,e,n){return t._modulesNamespaceMap[n]}var O="undefined"!=typeof window&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,E=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},C={namespaced:{configurable:!0}};C.namespaced.get=function(){return!!this._rawModule.namespaced},E.prototype.addChild=function(t,e){this._children[t]=e},E.prototype.removeChild=function(t){delete this._children[t]},E.prototype.getChild=function(t){return this._children[t]},E.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},E.prototype.forEachChild=function(t){o(this._children,t)},E.prototype.forEachGetter=function(t){this._rawModule.getters&&o(this._rawModule.getters,t)},E.prototype.forEachAction=function(t){this._rawModule.actions&&o(this._rawModule.actions,t)},E.prototype.forEachMutation=function(t){this._rawModule.mutations&&o(this._rawModule.mutations,t)},Object.defineProperties(E.prototype,C);var A=function(t){this.register([],t,!1)};A.prototype.get=function(t){return t.reduce(function(t,e){return t.getChild(e)},this.root)},A.prototype.getNamespace=function(t){var e=this.root;return t.reduce(function(t,n){return e=e.getChild(n),t+(e.namespaced?n+"/":"")},"")},A.prototype.update=function(t){c([],this.root,t)},A.prototype.register=function(t,e,n){var r=this;void 0===n&&(n=!0);var i=new E(e,n);0===t.length?this.root=i:this.get(t.slice(0,-1)).addChild(t[t.length-1],i),e.modules&&o(e.modules,function(e,i){r.register(t.concat(i),e,n)})},A.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];e.getChild(n).runtime&&e.removeChild(n)};var S,P=function(t){var e=this;void 0===t&&(t={}),!S&&"undefined"!=typeof window&&window.Vue&&x(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var r=t.strict;void 0===r&&(r=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new A(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new S;var o=this,a=this,s=a.dispatch,c=a.commit;this.dispatch=function(t,e){return s.call(o,t,e)},this.commit=function(t,e,n){return c.call(o,t,e,n)},this.strict=r;var u=this._modules.root.state;f(this,u,[],this._modules.root),p(this,u),n.forEach(function(t){return t(e)}),(void 0!==t.devtools?t.devtools:S.config.devtools)&&i(this)},j={state:{configurable:!0}};j.state.get=function(){return this._vm._data.$$state},j.state.set=function(t){},P.prototype.commit=function(t,e,n){var r=this,i=w(t,e,n),o=i.type,a=i.payload,s=(i.options,{type:o,payload:a}),c=this._mutations[o];c&&(this._withCommit(function(){c.forEach(function(t){t(a)})}),this._subscribers.forEach(function(t){return t(s,r.state)}))},P.prototype.dispatch=function(t,e){var n=this,r=w(t,e),i=r.type,o=r.payload,a={type:i,payload:o},s=this._actions[i];if(s){try{this._actionSubscribers.filter(function(t){return t.before}).forEach(function(t){return t.before(a,n.state)})}catch(t){}return(s.length>1?Promise.all(s.map(function(t){return t(o)})):s[0](o)).then(function(t){try{n._actionSubscribers.filter(function(t){return t.after}).forEach(function(t){return t.after(a,n.state)})}catch(t){}return t})}},P.prototype.subscribe=function(t){return u(t,this._subscribers)},P.prototype.subscribeAction=function(t){return u("function"==typeof t?{before:t}:t,this._actionSubscribers)},P.prototype.watch=function(t,e,n){var r=this;return this._watcherVM.$watch(function(){return t(r.state,r.getters)},e,n)},P.prototype.replaceState=function(t){var e=this;this._withCommit(function(){e._vm._data.$$state=t})},P.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),f(this,this.state,t,this._modules.get(t),n.preserveState),p(this,this.state)},P.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var n=b(e.state,t.slice(0,-1));S.delete(n,t[t.length-1])}),l(this)},P.prototype.hotUpdate=function(t){this._modules.update(t),l(this,!0)},P.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(P.prototype,j);var L=k(function(t,e){var n={};return _(e).forEach(function(e){var r=e.key,i=e.val;n[r]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var r=T(this.$store,"mapState",t);if(!r)return;e=r.context.state,n=r.context.getters}return"function"==typeof i?i.call(this,e,n):e[i]},n[r].vuex=!0}),n}),M=k(function(t,e){var n={};return _(e).forEach(function(e){var r=e.key,i=e.val;n[r]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=this.$store.commit;if(t){var o=T(this.$store,"mapMutations",t);if(!o)return;r=o.context.commit}return"function"==typeof i?i.apply(this,[r].concat(e)):r.apply(this.$store,[i].concat(e))}}),n}),$=k(function(t,e){var n={};return _(e).forEach(function(e){var r=e.key,i=e.val;i=t+i,n[r]=function(){if(!t||T(this.$store,"mapGetters",t))return this.$store.getters[i]},n[r].vuex=!0}),n}),I=k(function(t,e){var n={};return _(e).forEach(function(e){var r=e.key,i=e.val;n[r]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var r=this.$store.dispatch;if(t){var o=T(this.$store,"mapActions",t);if(!o)return;r=o.context.dispatch}return"function"==typeof i?i.apply(this,[r].concat(e)):r.apply(this.$store,[i].concat(e))}}),n}),N=function(t){return{mapState:L.bind(null,t),mapGetters:$.bind(null,t),mapMutations:M.bind(null,t),mapActions:I.bind(null,t)}},D={Store:P,install:x,version:"3.1.0",mapState:L,mapMutations:M,mapGetters:$,mapActions:I,createNamespacedHelpers:N};e.a=D},function(t,e,n){(function(e){t.exports=function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,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(e.s=2)}([function(t,e,n){n(3);var r=n(4)(n(1),n(5),null,null);t.exports=r.exports},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={name:"ListTable",props:{columns:{type:Object,required:!0,default:function(){return{}}},rows:{type:Array,required:!0,default:function(){return[]}},index:{type:String,default:"id"},showCb:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},actionColumn:{type:String,default:""},actions:{type:Array,required:!1,default:function(){return[]}},bulkActions:{type:Array,required:!1,default:function(){return[]}},tableClass:{type:String,default:"wp-list-table widefat fixed striped"},notFound:{type:String,default:"No items found."},totalItems:{type:Number,default:0},totalPages:{type:Number,default:1},perPage:{type:Number,default:20},currentPage:{type:Number,default:1},sortBy:{type:String,default:null},sortOrder:{type:String,default:"asc"},rowClass:{type:Function,default:function(){return function(t){return""}}}},data:function(){return{bulkLocal:"-1",checkedItems:[]}},computed:{hasActions:function(){return this.actions.length>0},hasBulkActions:function(){return this.bulkActions.length>0},itemsTotal:function(){return this.totalItems||this.rows.length},hasPagination:function(){return this.itemsTotal>this.perPage},disableFirst:function(){return 1===this.currentPage||2===this.currentPage},disablePrev:function(){return 1===this.currentPage},disableNext:function(){return this.currentPage===this.totalPages},disableLast:function(){return this.currentPage===this.totalPages||this.currentPage==this.totalPages-1},colspan:function(){var t=Object.keys(this.columns).length;return this.showCb&&(t+=1),t},selectAll:{get:function(){return!!this.rows.length&&!!this.rows&&this.checkedItems.length==this.rows.length},set:function(t){var e=[],n=this;t&&this.rows.forEach(function(t){void 0!==t[n.index]?e.push(t[n.index]):e.push(t.id)}),this.checkedItems=e}}},watch:{checkedItems:function(t){this.$emit("checked",t)}},methods:{hideActionSeparator:function(t){return t===this.actions[this.actions.length-1].key},actionClicked:function(t,e){this.$emit("action:click",t,e)},goToPage:function(t){this.$emit("pagination",t)},goToCustomPage:function(t){var e=parseInt(t.target.value);!isNaN(e)&&e>0&&e<=this.totalPages&&this.$emit("pagination",e)},handleBulkAction:function(){"-1"!==this.bulkLocal&&this.$emit("bulk:click",this.bulkLocal,this.checkedItems)},isSortable:function(t){return!(!t.hasOwnProperty("sortable")||!0!==t.sortable)},isSorted:function(t){return t===this.sortBy},handleSortBy:function(t){var e="asc"===this.sortOrder?"desc":"asc";this.$emit("sort",t,e)}}}},function(t,n,r){"use strict";function i(t){t.component("ListTable",a.a)}Object.defineProperty(n,"__esModule",{value:!0}),n.install=i;var o=r(0),a=r.n(o);r.d(n,"ListTable",function(){return a.a});var s={install:i};n.default=a.a;var c=null;"undefined"!=typeof window?c=window.Vue:void 0!==e&&(c=e.Vue),c&&c.use(s)},function(t,e){},function(t,e){t.exports=function(t,e,n,r){var i,o=t=t||{},a=typeof t.default;"object"!==a&&"function"!==a||(i=t,o=t.default);var s="function"==typeof o?o.options:o;if(e&&(s.render=e.render,s.staticRenderFns=e.staticRenderFns),n&&(s._scopeId=n),r){var c=s.computed||(s.computed={});Object.keys(r).forEach(function(t){var e=r[t];c[t]=function(){return e}})}return{esModule:i,exports:o,options:s}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{class:{"table-loading":t.loading}},[t.loading?n("div",{staticClass:"table-loader-wrap"},[t._m(0)]):t._e(),t._v(" "),n("div",{staticClass:"tablenav top"},[t.hasBulkActions?n("div",{staticClass:"alignleft actions bulkactions"},[n("label",{staticClass:"screen-reader-text",attrs:{for:"bulk-action-selector-top"}},[t._v("Select bulk action")]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.bulkLocal,expression:"bulkLocal"}],attrs:{name:"action",id:"bulk-action-selector-top"},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.bulkLocal=e.target.multiple?n:n[0]}}},[n("option",{attrs:{value:"-1"}},[t._v("Bulk Actions")]),t._v(" "),t._l(t.bulkActions,function(e){return n("option",{domProps:{value:e.key}},[t._v(t._s(e.label))])})],2),t._v(" "),n("button",{staticClass:"button action",attrs:{disabled:!t.checkedItems.length},on:{click:function(e){e.preventDefault(),t.handleBulkAction(e)}}},[t._v("Apply")])]):t._e(),t._v(" "),n("div",{staticClass:"alignleft actions"},[t._t("filters")],2),t._v(" "),n("div",{staticClass:"tablenav-pages",class:{"one-page":1===t.totalPages||0===t.totalPages}},[n("span",{staticClass:"displaying-num"},[t._v(t._s(t.itemsTotal)+" items")]),t._v(" "),t.hasPagination?n("span",{staticClass:"pagination-links"},[t.disableFirst?n("span",{staticClass:"tablenav-pages-navspan button disabled",attrs:{"aria-hidden":"true"}},[t._v("«")]):n("a",{staticClass:"first-page button",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.goToPage(1)}}},[n("span",{attrs:{"aria-hidden":"true"}},[t._v("«")])]),t._v(" "),t.disablePrev?n("span",{staticClass:"tablenav-pages-navspan button disabled",attrs:{"aria-hidden":"true"}},[t._v("‹")]):n("a",{staticClass:"prev-page button",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.goToPage(t.currentPage-1)}}},[n("span",{attrs:{"aria-hidden":"true"}},[t._v("‹")])]),t._v(" "),n("span",{staticClass:"paging-input"},[n("span",{staticClass:"tablenav-paging-text"},[n("input",{staticClass:"current-page",attrs:{type:"text",name:"paged","aria-describedby":"table-paging",size:"1"},domProps:{value:t.currentPage},on:{keyup:function(e){if(!("button"in e)&&t._k(e.keyCode,"enter",13,e.key))return null;t.goToCustomPage(e)}}}),t._v(" of\n "),n("span",{staticClass:"total-pages"},[t._v(t._s(t.totalPages))])])]),t._v(" "),t.disableNext?n("span",{staticClass:"tablenav-pages-navspan button disabled",attrs:{"aria-hidden":"true"}},[t._v("›")]):n("a",{staticClass:"next-page button",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.goToPage(t.currentPage+1)}}},[n("span",{attrs:{"aria-hidden":"true"}},[t._v("›")])]),t._v(" "),t.disableLast?n("span",{staticClass:"tablenav-pages-navspan button disabled",attrs:{"aria-hidden":"true"}},[t._v("»")]):n("a",{staticClass:"last-page button",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.goToPage(t.totalPages)}}},[n("span",{attrs:{"aria-hidden":"true"}},[t._v("»")])])]):t._e()])]),t._v(" "),n("table",{class:t.tableClass},[n("thead",[n("tr",[t.showCb?n("td",{staticClass:"manage-column column-cb check-column"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.selectAll,expression:"selectAll"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.selectAll)?t._i(t.selectAll,null)>-1:t.selectAll},on:{change:function(e){var n=t.selectAll,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&(t.selectAll=n.concat([null])):o>-1&&(t.selectAll=n.slice(0,o).concat(n.slice(o+1)))}else t.selectAll=i}}})]):t._e(),t._v(" "),t._l(t.columns,function(e,r){return n("th",{class:["column",r,e.class||"",{sortable:t.isSortable(e)},{sorted:t.isSorted(r)},{asc:t.isSorted(r)&&"asc"===t.sortOrder},{desc:t.isSorted(r)&&"desc"===t.sortOrder}]},[t.isSortable(e)?n("a",{attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.handleSortBy(r)}}},[n("span",[t._v(t._s(e.label))]),t._v(" "),n("span",{staticClass:"sorting-indicator"})]):[t._v("\n "+t._s(e.label)+"\n ")]],2)})],2)]),t._v(" "),n("tfoot",[n("tr",[t.showCb?n("td",{staticClass:"manage-column column-cb check-column"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.selectAll,expression:"selectAll"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.selectAll)?t._i(t.selectAll,null)>-1:t.selectAll},on:{change:function(e){var n=t.selectAll,r=e.target,i=!!r.checked;if(Array.isArray(n)){var o=t._i(n,null);r.checked?o<0&&(t.selectAll=n.concat([null])):o>-1&&(t.selectAll=n.slice(0,o).concat(n.slice(o+1)))}else t.selectAll=i}}})]):t._e(),t._v(" "),t._l(t.columns,function(e,r){return n("th",{class:["column",r,e.class||""]},[t._v(t._s(e.label))])})],2)]),t._v(" "),n("tbody",[t.rows.length?t._l(t.rows,function(e){return n("tr",{key:e[t.index],class:t.rowClass(e)},[t.showCb?n("th",{staticClass:"check-column",attrs:{scope:"row"}},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.checkedItems,expression:"checkedItems"}],attrs:{type:"checkbox",name:"item[]"},domProps:{value:e[t.index],checked:Array.isArray(t.checkedItems)?t._i(t.checkedItems,e[t.index])>-1:t.checkedItems},on:{change:function(n){var r=t.checkedItems,i=n.target,o=!!i.checked;if(Array.isArray(r)){var a=e[t.index],s=t._i(r,a);i.checked?s<0&&(t.checkedItems=r.concat([a])):s>-1&&(t.checkedItems=r.slice(0,s).concat(r.slice(s+1)))}else t.checkedItems=o}}})]):t._e(),t._v(" "),t._l(t.columns,function(r,i){return n("td",{class:["column",i,r.class||""]},[t._t(i,[t._v("\n "+t._s(e[i])+"\n ")],{row:e}),t._v(" "),t.actionColumn===i&&t.hasActions?n("div",{staticClass:"row-actions"},[t._t("row-actions",t._l(t.actions,function(r){return n("span",{class:r.key},[n("a",{attrs:{href:"#"},on:{click:function(n){n.preventDefault(),t.actionClicked(r.key,e)}}},[t._v(t._s(r.label))]),t._v(" "),t.hideActionSeparator(r.key)?t._e():[t._v(" | ")]],2)}),{row:e})],2):t._e()],2)})],2)}):n("tr",[n("td",{attrs:{colspan:t.colspan}},[t._v(t._s(t.notFound))])])],2)]),t._v(" "),n("div",{staticClass:"tablenav bottom"},[t.hasBulkActions?n("div",{staticClass:"alignleft actions bulkactions"},[n("label",{staticClass:"screen-reader-text",attrs:{for:"bulk-action-selector-top"}},[t._v("Select bulk action")]),t._v(" "),n("select",{directives:[{name:"model",rawName:"v-model",value:t.bulkLocal,expression:"bulkLocal"}],attrs:{name:"action",id:"bulk-action-selector-top"},on:{change:function(e){var n=Array.prototype.filter.call(e.target.options,function(t){return t.selected}).map(function(t){return"_value"in t?t._value:t.value});t.bulkLocal=e.target.multiple?n:n[0]}}},[n("option",{attrs:{value:"-1"}},[t._v("Bulk Actions")]),t._v(" "),t._l(t.bulkActions,function(e){return n("option",{domProps:{value:e.key}},[t._v(t._s(e.label))])})],2),t._v(" "),n("button",{staticClass:"button action",attrs:{disabled:!t.checkedItems.length},on:{click:function(e){e.preventDefault(),t.handleBulkAction(e)}}},[t._v("Apply")])]):t._e(),t._v(" "),n("div",{staticClass:"tablenav-pages"},[n("span",{staticClass:"displaying-num"},[t._v(t._s(t.itemsTotal)+" items")]),t._v(" "),t.hasPagination?n("span",{staticClass:"pagination-links"},[t.disableFirst?n("span",{staticClass:"tablenav-pages-navspan button disabled",attrs:{"aria-hidden":"true"}},[t._v("«")]):n("a",{staticClass:"first-page button",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.goToPage(1)}}},[n("span",{attrs:{"aria-hidden":"true"}},[t._v("«")])]),t._v(" "),t.disablePrev?n("span",{staticClass:"tablenav-pages-navspan button disabled",attrs:{"aria-hidden":"true"}},[t._v("‹")]):n("a",{staticClass:"prev-page button",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.goToPage(t.currentPage-1)}}},[n("span",{attrs:{"aria-hidden":"true"}},[t._v("‹")])]),t._v(" "),n("span",{staticClass:"paging-input"},[n("span",{staticClass:"tablenav-paging-text"},[t._v("\n "+t._s(t.currentPage)+" of\n "),n("span",{staticClass:"total-pages"},[t._v(t._s(t.totalPages))])])]),t._v(" "),t.disableNext?n("span",{staticClass:"tablenav-pages-navspan button disabled",attrs:{"aria-hidden":"true"}},[t._v("›")]):n("a",{staticClass:"next-page button",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.goToPage(t.currentPage+1)}}},[n("span",{attrs:{"aria-hidden":"true"}},[t._v("›")])]),t._v(" "),t.disableLast?n("span",{staticClass:"tablenav-pages-navspan button disabled",attrs:{"aria-hidden":"true"}},[t._v("»")]):n("a",{staticClass:"last-page button",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.goToPage(t.totalPages)}}},[n("span",{attrs:{"aria-hidden":"true"}},[t._v("»")])])]):t._e()])])])},staticRenderFns:[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"table-loader-center"},[n("div",{staticClass:"table-loader"},[t._v("Loading")])])}]}}])}).call(e,n(3))},function(t,e,n){"use strict";var r=Array.isArray,i=Object.keys,o=Object.prototype.hasOwnProperty;t.exports=function t(e,n){if(e===n)return!0;if(e&&n&&"object"==typeof e&&"object"==typeof n){var a,s,c,u=r(e),l=r(n);if(u&&l){if((s=e.length)!=n.length)return!1;for(a=s;0!=a--;)if(!t(e[a],n[a]))return!1;return!0}if(u!=l)return!1;var p=e instanceof Date,f=n instanceof Date;if(p!=f)return!1;if(p&&f)return e.getTime()==n.getTime();var d=e instanceof RegExp,h=n instanceof RegExp;if(d!=h)return!1;if(d&&h)return e.toString()==n.toString();var v=i(e);if((s=v.length)!==i(n).length)return!1;for(a=s;0!=a--;)if(!o.call(n,v[a]))return!1;for(a=s;0!=a--;)if(c=v[a],!t(e[c],n[c]))return!1;return!0}return e!==e&&n!==n}}]);
js/editor.js CHANGED
@@ -5,7 +5,16 @@ var wprss_dialog_submit = null;
5
  jQuery( document ).ready( function($) {
6
 
7
  wprss_dialog_submit = function() {
8
- all = $('#wprss-dialog-all-sources').is(':checked');
 
 
 
 
 
 
 
 
 
9
 
10
  sources = [];
11
  $('#wprss-dialog-feed-source-list :selected').each( function( i, selected ){
@@ -21,17 +30,32 @@ jQuery( document ).ready( function($) {
21
 
22
  limit = $('#wprss-dialog-feed-limit').val();
23
 
24
- shortcode = '[wp-rss-aggregator';
 
 
 
25
  if ( all ) {
26
- if ( excludes.length > 0 )
27
- shortcode += ' exclude="' + excludes + '"'
 
28
  } else {
29
- if ( sources.length > 0 )
30
- shortcode += ' source="' + sources + '"'
 
31
  }
32
 
33
- if ( limit !== '' && limit !== '0' )
34
  shortcode += ' limit="' + limit + '"';
 
 
 
 
 
 
 
 
 
 
35
  shortcode += ']';
36
 
37
  WPRSS_ED.execCommand('mceInsertContent', false, shortcode);
@@ -57,8 +81,8 @@ jQuery( document ).ready( function($) {
57
  overlay = $('<div id="wprss-overlay"></div>');
58
  dialog = $('<div id="wprss-editor-dialog" class="postbox"></div>');
59
 
60
- dialog_head = $('<div class="wprss-dialog-header"> <h1>WPRSS Aggregator Shortcode</h1> </div>');
61
- dialog_head_close = $('<span class="close-btn"></span>').html('&times;').appendTo( dialog_head );
62
  dialog_inside = $('<div class="wprss-dialog-inside"></div>');
63
  dialog.append( dialog_head );
64
  dialog.append( dialog_inside );
@@ -106,8 +130,8 @@ jQuery( document ).ready( function($) {
106
  init : function( ed, url ) {
107
  // Add the button
108
  ed.addButton( WPRSS_TMCE_PLUGIN_ID, {
109
- title : 'WPRSS Aggregator shortcode',
110
- image : url + '/../images/icon-adminpage32.png',
111
  onclick : function() {
112
  idPattern = /(?:(?:[^v]+)+v.)?([^&=]{11})(?=&|$)/;
113
  WPRSS_Dialog.getDialog();
@@ -126,13 +150,13 @@ jQuery( document ).ready( function($) {
126
  },
127
  getInfo : function() {
128
  return {
129
- longname : "WPRSS Aggregator Shortcode",
130
- author : 'John Galea',
131
- authorurl : 'http://profiles.wordpress.org/jeangalea/',
132
  infourl : 'http://www.wprssaggregator.com/',
133
- version : "1.0"
134
  };
135
  }
136
  });
137
  tinymce.PluginManager.add( WPRSS_TMCE_PLUGIN_ID, tinymce.plugins.wprss );
138
- });
5
  jQuery( document ).ready( function($) {
6
 
7
  wprss_dialog_submit = function() {
8
+ this.focus();
9
+
10
+ var shortcode = '[wp-rss-aggregator';
11
+
12
+ var all = $('#wprss-dialog-all-sources').is(':checked');
13
+
14
+ var selected_template = $('#wprss-dialog-templates').val();
15
+ if (selected_template.length > 0) {
16
+ shortcode += ' template="' + selected_template + '"';
17
+ }
18
 
19
  sources = [];
20
  $('#wprss-dialog-feed-source-list :selected').each( function( i, selected ){
30
 
31
  limit = $('#wprss-dialog-feed-limit').val();
32
 
33
+ pagination = $('#wprss-dialog-pagination').val();
34
+
35
+ page = $('#wprss-dialog-start-page').val();
36
+
37
  if ( all ) {
38
+ if ( excludes.length > 0 ) {
39
+ shortcode += ' exclude="' + excludes + '"';
40
+ }
41
  } else {
42
+ if ( sources.length > 0 ) {
43
+ shortcode += ' source="' + sources + '"';
44
+ }
45
  }
46
 
47
+ if ( limit !== '' && limit !== '0' ) {
48
  shortcode += ' limit="' + limit + '"';
49
+ }
50
+
51
+ if (pagination.length > 0) {
52
+ shortcode += ' pagination="' + pagination + '"';
53
+ }
54
+
55
+ if ( page !== '' && parseInt(page) > 1 ) {
56
+ shortcode += ' page="' + page + '"';
57
+ }
58
+
59
  shortcode += ']';
60
 
61
  WPRSS_ED.execCommand('mceInsertContent', false, shortcode);
81
  overlay = $('<div id="wprss-overlay"></div>');
82
  dialog = $('<div id="wprss-editor-dialog" class="postbox"></div>');
83
 
84
+ dialog_head = $('<div class="wprss-dialog-header"> <h1>WP RSS Aggregator Shortcode</h1> </div>');
85
+ dialog_head_close = $('<span class="close-btn">Close</span>').appendTo( dialog_head );
86
  dialog_inside = $('<div class="wprss-dialog-inside"></div>');
87
  dialog.append( dialog_head );
88
  dialog.append( dialog_inside );
130
  init : function( ed, url ) {
131
  // Add the button
132
  ed.addButton( WPRSS_TMCE_PLUGIN_ID, {
133
+ title : 'WP RSS Aggregator shortcode',
134
+ image : url + '/../images/wpra-icon-32.png',
135
  onclick : function() {
136
  idPattern = /(?:(?:[^v]+)+v.)?([^&=]{11})(?=&|$)/;
137
  WPRSS_Dialog.getDialog();
150
  },
151
  getInfo : function() {
152
  return {
153
+ longname : "WP RSS Aggregator Shortcode",
154
+ author : 'RebelCode',
155
+ authorurl : 'http://www.wprssaggregator.com/',
156
  infourl : 'http://www.wprssaggregator.com/',
157
+ version : "1.1"
158
  };
159
  }
160
  });
161
  tinymce.PluginManager.add( WPRSS_TMCE_PLUGIN_ID, tinymce.plugins.wprss );
162
+ });
js/heartbeat.js CHANGED
@@ -91,7 +91,7 @@
91
  },
92
  success: function(data, status, jqXHR){
93
  updateFeedSourceTable(data);
94
- setTimeout(wprssFeedSourceTableAjax, 5000);
95
  },
96
  dataType: 'json'
97
  });
@@ -103,4 +103,4 @@
103
  });
104
 
105
 
106
- })(jQuery, wprss_admin_heartbeat);
91
  },
92
  success: function(data, status, jqXHR){
93
  updateFeedSourceTable(data);
94
+ setTimeout(wprssFeedSourceTableAjax, 1000);
95
  },
96
  dataType: 'json'
97
  });
103
  });
104
 
105
 
106
+ })(jQuery, wprss_admin_heartbeat);
js/intro.min.js DELETED
@@ -1 +0,0 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.WPRA=t():e.WPRA=t()}("undefined"!=typeof self?self:this,function(){return webpackJsonpWPRA([2],{11:function(e,t,i){"use strict";function s(e,t){for(var i=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],new FormData),s=Object.keys(t),n=Array.isArray(s),r=0,s=n?s:s[Symbol.iterator]();;){var a;if(n){if(r>=s.length)break;a=s[r++]}else{if(r=s.next(),r.done)break;a=r.value}var o=a;i.set(o,t[o])}return fetch(e,{method:"post",body:i}).then(function(e){return e.json()}).then(function(e){if(200!==e.status)throw e;return e})}function n(e){if(!navigator.clipboard)return void g(e);navigator.clipboard.writeText(e).then(function(){},function(e){console.error("Async: Could not copy text: ",e)})}Object.defineProperty(t,"__esModule",{value:!0});var r=i(4),a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"wizard-holder animated fadeIn"},[i("div",{staticClass:"connect-steps"},[i("div",{staticClass:"step-items"},[i("div",{staticClass:"step-progress",class:"step-progress--"+e.activeScreenIndex}),e._v(" "),e._l(e.screens,function(t,s){return i("div",{staticClass:"step-item",class:{"step-item_active":e.active(t.id),"step-item_completed":t.completed()&&s<e.activeScreenIndex}},[i("div",{staticClass:"step-item__status"},[t.completed()&&s<e.activeScreenIndex?i("span",{staticClass:"dashicons dashicons-yes"}):e._e()]),e._v(" "),i("div",{staticClass:"step-item__info"},[i("div",{staticClass:"step-item__title"},[e._v(e._s(t.title))]),e._v(" "),t.description?i("div",{staticClass:"step-item__description"},[e._v(e._s(t.description))]):e._e()])])})],2)]),e._v(" "),i("div",{staticClass:"wizard"},[i("transition",{attrs:{name:e.transition,mode:"out-in"}},[e.active("feed")?i("div",{key:e.activeScreen,staticClass:"wizard_content"},[i("div",{staticClass:"wizard_hello"},[e._v("\n Enter your first RSS Feed URL\n ")]),e._v(" "),i("form",{staticClass:"wizard_info",attrs:{id:"feedForm"},on:{submit:function(t){return t.preventDefault(),e.next(t)}}},[i("div",{staticClass:"form-group"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.form.feedSourceUrl,expression:"form.feedSourceUrl"}],staticClass:"wpra-feed-input",attrs:{type:"text",placeholder:"https://www.sourcedomain.com/feed/"},domProps:{value:e.form.feedSourceUrl},on:{input:function(t){t.target.composing||e.$set(e.form,"feedSourceUrl",t.target.value)}}}),e._v(" "),e.isFeedError?i("span",{staticClass:"dashicons dashicons-warning warning-icon"}):e._e(),e._v(" "),e.isFeedError?i("a",{attrs:{href:e.validateLink,target:"_blank"}},[e._v("Validate feed")]):e._e()])]),e._v(" "),e.isFeedError?i("div",{staticClass:"wizard_error"},[i("p",[e._v("This RSS feed URL appears to be invalid. Here are a couple of things you can try:")]),e._v(" "),i("ol",[i("li",[e._v('Check whether the URL you entered is the correct one by trying one of the options when clicking on "How do I find an RSS feed URL?" below.')]),e._v(" "),i("li",[e._v("\n Test out this other RSS feed URL to make sure the plugin is working correctly - https://www.wpmayor.com/feed/ - If it works, you may "),i("a",{attrs:{href:e.supportUrl,target:"_blank"}},[e._v("contact us here")]),e._v(" to help you with your source.\n ")]),e._v(" "),i("li",[e._v("Test the URL's validity by W3C standards, the standards we use in our plugins, using the “Validate feed” link above.")])])]):e._e(),e._v(" "),i("expander",{attrs:{title:"How do I find an RSS feed URL?"}},[i("p",[e._v("WP RSS Aggregator fetches feed items through RSS feeds. Almost every website in the world provides an RSS feed. Here's how to find it:")]),e._v(" "),i("p",[e._v("Option 1: Add /feed to the website's homepage URL ")]),e._v(" "),i("p",[e._v("Many sites have their RSS feed at the same URL. For instance, if the website's URL is www.thiswebsite.com, then the RSS feed could be at www.thiswebsite.com/feed.")]),e._v(" "),i("p",[e._v("Option 2: Look for the RSS share icon")]),e._v(" "),i("p",[e._v("Many websites have share icons on their pages for Facebook, Twitter and more. Many times, there will also be an orange RSS icon. Click on that to access the RSS feed URL.")]),e._v(" "),i("p",[e._v("Option 3: Browser RSS Auto-Discovery")]),e._v(" "),i("p",[e._v("Most browsers either include an RSS auto-discovery tool by default or they allow you to add extensions for it. Firefox shows an RSS icon above the website, in the address bar, which you can click on directly. Chrome offers extensions such as this one.")]),e._v(" "),i("p",[e._v("Option 4: Look at the Page Source")]),e._v(" "),i("p",[e._v('When on any page of the website you\'re looking to import feed items from, right click and press "View Page Source". Once the new window opens, use the “Find” feature (Ctrl-F on PC, Command-F on Mac) and search for " RSS". This should take you to a line that reads like this (or similar):')]),e._v(" "),i("p",[i("code",[e._v('\n <link rel="alternate" type="application/rss+xml" title="RSS Feed" href="https://www.sourcedomain.com/feed/" />\n ')])]),e._v(" "),i("p",[e._v("The RSS feed’s URL is found between the quotes after href=. In the above case, it would be https://www.sourcedomain.com/feed/.")]),e._v(" "),i("p",[i("a",{attrs:{href:e.knowledgeBaseUrl,target:"_blank"}},[e._v("Browse our Knowledge Base for more information.")])])])],1):e._e(),e._v(" "),e.active("feedItems")?i("div",{key:e.activeScreen,staticClass:"wizard_content"},[i("div",{staticClass:"wizard_hello"},[e._v("\n Latest feed items from your selected feed source:\n ")]),e._v(" "),i("div",{staticClass:"wpra-feed-items"},e._l(e.feed.items,function(t){return i("div",{staticClass:"wpra-feed-item"},[i("div",{staticClass:"wpra-feed-item__link"},[i("a",{attrs:{href:t.permalink,target:"_blank"}},[e._v(e._s(t.title))])]),e._v(" "),i("div",{staticClass:"wpra-feed-item__info"},[t.date||t.author?[t.date?[e._v("\n Published on "+e._s(t.date)+"\n ")]:e._e(),e._v(" "),t.date&&t.author?[e._v("|")]:e._e(),e._v(" "),t.author?[e._v("\n By "+e._s(t.author)+"\n ")]:e._e()]:e._e()],2)])}),0),e._v(" "),i("div",{staticClass:"wrpa-shortcode"},[i("div",{staticClass:"wrpa-shortcode-preview"},[i("div",{staticClass:"wrpa-shortcode-label"},[e._v("\n Create a draft page to preview these feed items on your site:\n ")]),e._v(" "),i("a",{staticClass:"button",class:{"button-primary":e.isPrepared,"loading-button":e.isPreparing},attrs:{href:e.previewUrl,target:"_blank"},on:{click:e.preparePreview}},[e._v("\n "+e._s(e.isPrepared?"Preview the Page":"Create Draft Page")+"\n ")])]),e._v(" "),i("div",{staticClass:"wrpa-shortcode-form",on:{click:function(t){e.copyToClipboard()}}},[i("div",{staticClass:"wrpa-shortcode-label"},[e._v("\n Copy the shortcode to any page or post on your site:\n ")]),e._v(" "),i("input",{ref:"selected",staticClass:"wrpa-shortcode-form__shortcode",attrs:{type:"text",readonly:"",value:"[wp-rss-aggregator]"}}),e._v(" "),i("div",{staticClass:"wrpa-shortcode-form__button"},[e._v("\n "+e._s(e.isCopied?"Copied!":"Click to copy")+"\n ")])])])]):e._e(),e._v(" "),e.active("finish")?i("div",{key:e.activeScreen,staticClass:"wizard_content"},[i("div",{staticClass:"wizard_hello"},[e._v("\n You’ve successfully set up your first feed source 😄\n ")]),e._v(" "),i("div",{staticClass:"wpra-cols-title"},[e._v("\n Do more with WP RSS Aggregator - here is what we did at CryptoHeadlines.com.\n ")]),e._v(" "),i("div",{staticClass:"wpra-cols"},[i("div",{staticClass:"col"},[i("p",[e._v("CryptoHeadlines.com displays latest news, Youtube videos, podcasts, jobs and more from the Cryptocurrency industry.")]),e._v(" "),i("p",[e._v("It uses Feed to Post to import articles, Youtube videos, and podcast links.")]),e._v(" "),i("p",[e._v("Full Text RSS Feeds is used to fetch the full content of the job listings to present more information to the potential applicant.")]),e._v(" "),i("p",[e._v("Keyword Filtering is used to filter out content that contains profanity and keywords or phrases deemed as inappropriate.")]),e._v(" "),i("div",{staticStyle:{"margin-bottom":".5rem"}},[i("a",{staticClass:"button",attrs:{href:e.addOnsUrl,target:"_blank"}},[e._v("\n Browse Add-ons ⭐️\n ")])]),e._v(" "),i("div",[i("a",{staticStyle:{"font-size":".9em"},attrs:{href:e.supportUrl,target:"_blank"}},[e._v("Contact support for more information.")])])]),e._v(" "),i("div",{staticClass:"col"},[i("img",{staticClass:"img wpra-demo-photo",attrs:{src:e.demoImageUrl}}),e._v(" "),i("div",{staticClass:"wpra-feedback"},[i("div",{staticClass:"wpra-feedback__copy"},[i("div",{staticClass:"wpra-feedback__text"},[e._v("\n This plugin has made my life a lot easier, and the support has been great as well.\n ")]),e._v(" "),i("div",{staticClass:"wpra-feedback__rating"},[i("span",{staticClass:"dashicons dashicons-star-filled"}),e._v(" "),i("span",{staticClass:"dashicons dashicons-star-filled"}),e._v(" "),i("span",{staticClass:"dashicons dashicons-star-filled"}),e._v(" "),i("span",{staticClass:"dashicons dashicons-star-filled"}),e._v(" "),i("span",{staticClass:"dashicons dashicons-star-filled"})]),e._v(" "),i("div",{staticClass:"wpra-feedback__by"},[i("a",{attrs:{href:e.feedbackUrl,target:"_blank"}},[e._v("\n Review by officeinnovator\n ")])])])])])])]):e._e()]),e._v(" "),i("div",{staticClass:"connect-actions pad"},[i("div",{staticClass:"pad-item--grow"},[e.active("finish")?e._e():i("button",{staticClass:"button-clear",on:{click:e.finish}},[e._v("\n Skip the introduction\n ")])]),e._v(" "),i("div",{staticClass:"pad-item--no-shrink"},[e.isBackAvailable?i("button",{staticClass:"button-clear",on:{click:e.back}},[e._v("\n Back\n ")]):e._e(),e._v(" "),i("button",{staticClass:"button button-primary button-large",class:{"loading-button":e.isLoading},on:{click:e.next}},[e._v("\n "+e._s(e.active("finish")?"Continue to Plugin":"Next")+"\n ")])])])],1)])},o=[],d=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"wpra-expander",class:{"wpra-expander--expanded":e.isExpanded}},[i("div",{staticClass:"wpra-expander__title",on:{click:function(t){e.isExpanded=!e.isExpanded}}},[e._v("\n "+e._s(e.title)+"\n "),i("span",{staticClass:"dashicons dashicons-arrow-down-alt2"})]),e._v(" "),i("transition-expand",[e.isExpanded?i("div",[i("div",{staticClass:"wpra-expander__content"},[e._t("default")],2)]):e._e()])],1)},c=[],l={name:"TransitionExpand",functional:!0,render:function(e,t){return e("transition",{props:{name:"expand"},on:{afterEnter:function(e){e.style.height="auto"},enter:function(e){var t=getComputedStyle(e),i=t.width;e.style.width=i,e.style.position="absolute",e.style.visibility="hidden",e.style.height="auto";var s=getComputedStyle(e),n=s.height;e.style.width=null,e.style.position=null,e.style.visibility=null,e.style.height=0,getComputedStyle(e).height,setTimeout(function(){e.style.height=n})},leave:function(e){var t=getComputedStyle(e),i=t.height;e.style.height=i,getComputedStyle(e).height,setTimeout(function(){e.style.height=0})}}},t.children)}},u=l,p=i(1),f=Object(p.a)(u,void 0,void 0,!1,null,null,null);f.options.__file="TransitionExpand.vue";var v=f.exports,h={data:function(){return{isExpanded:this.defaultExpanded}},props:{title:{},defaultExpanded:{value:!1}},components:{TransitionExpand:v}},_=h,m=Object(p.a)(_,d,c,!1,null,null,null);m.options.__file="Expander.vue";var w=m.exports,g=function(e){var t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.focus(),t.select();try{document.execCommand("copy")}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(t)},y=function(e){return e},b=window.wprssWizardConfig,C={data:function(){var e=this;return{prevHeight:0,screens:[{id:"feed",title:y("Add feed source URL"),description:!1,next:this.submitFeed,completed:function(){return e.feed.items.length},entered:function(){e.focusOnInput("feed")}},{id:"feedItems",title:y("Display feed items"),description:!1,next:this.continueItems,completed:function(){return e.feed.items.length&&e.itemsPassed}},{id:"finish",title:y("Complete introduction"),description:!1,next:this.completeIntroduction,completed:function(){return e.feed.items.length&&e.itemsPassed}}],isCopied:!1,isPreparing:!1,isPrepared:!1,transition:"slide-up",activeScreen:"feed",form:{feedSourceUrl:null},itemsPassed:!1,stepLoading:!1,isLoading:!1,isFeedError:!1,feed:{items:[]},previewUrl:b.previewUrl,addOnsUrl:b.addOnsUrl,supportUrl:b.supportUrl,demoImageUrl:b.demoImageUrl,feedbackUrl:b.feedbackUrl,knowledgeBaseUrl:b.knowledgeBaseUrl}},computed:{validateLink:function(){return"https://validator.w3.org/feed/check.cgi?url="+encodeURI(this.form.feedSourceUrl)},activeScreenIndex:function(){var e=this;return this.screens.findIndex(function(t){return t.id===e.activeScreen})},currentScreen:function(){var e=this;return this.screens.find(function(t){return t.id===e.activeScreen})},actionCompleted:function(){return this.currentScreen.completed()},isBackAvailable:function(){return this.activeScreenIndex>0&&this.activeScreenIndex<this.screens.length}},mounted:function(){this.onScreenEnter()},methods:{preparePreview:function(e){var t=this;if(this.isPreparing)return void e.preventDefault();this.isPrepared||(e.preventDefault(),this.isPreparing=!0,fetch(this.previewUrl).then(function(){t.isPreparing=!1,t.isPrepared=!0}))},submitFeed:function(){var e=this,t=Object.assign(b.feedEndpoint.defaultPayload,{wprss_intro_feed_url:this.form.feedSourceUrl});return this.isLoading=!0,this.isFeedError=!1,s(b.feedEndpoint.url,t).then(function(t){return e.feed.items=t.data.feed_items.slice(0,3),e.isLoading=!1,{}}).catch(function(t){throw e.isLoading=!1,e.isFeedError=!0,t})},continueItems:function(){return this.itemsPassed=!0,Promise.resolve({})},completeIntroduction:function(){return Promise.resolve({})},next:function(){var e=this;this.transition="slide-up";var t=this.currentScreen.next?this.currentScreen.next:function(){return Promise.resolve(!1)};this.stepLoading=!0,t().then(function(t){e.stepLoading=!1},function(e){throw e}).then(function(){var t=e.activeScreenIndex+1;t>=e.screens.length?e.finish():(e.activeScreen=e.screens[t].id,e.onScreenEnter())}).catch(function(e){console.error(e)})},onScreenEnter:function(){var e=this;this.$nextTick(function(){e.currentScreen.entered&&e.currentScreen.entered()})},focusOnInput:function(e){if(!this.$refs[e]||!this.$refs[e].focus)return!1;this.$refs[e].focus()},back:function(){this.transition="slide-down",this.activeScreen=this.screens[this.activeScreenIndex-1].id},finish:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=function(){return window.location.href=b.feedListUrl};if(e)return void(confirm("Are you sure you want to skip the introduction?")&&t());t()},active:function(e){return this.activeScreen===e},copyToClipboard:function(){var e=this;this.isCopied||(n("[wp-rss-aggregator]"),this.isCopied=!0,setTimeout(function(){e.isCopied=!1},1e3))}},components:{Expander:w}},S=C,k=Object(p.a)(S,a,o,!1,null,null,null);k.options.__file="Wizard.vue";var x=k.exports;i(15),i(12),new r.a({el:"#wpra-wizard-app",template:"<Wizard/>",components:{Wizard:x}})},12:function(e,t){}},[11])});
 
js/plugins.min.js DELETED
@@ -1 +0,0 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.WPRA=t():e.WPRA=t()}("undefined"!=typeof self?self:this,function(){return webpackJsonpWPRA([1],{16:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=o(4),i=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"wpra-plugin-disable-poll"},[o("modal",{attrs:{active:e.isModalVisible,"header-class":"invisible-header"},on:{close:e.closeModal}},[o("div",{attrs:{slot:"header"},slot:"header"},[o("div",{staticClass:"wpra-plugin-disable-poll__logo"},[o("img",{attrs:{src:e.image("light-line-logo.png"),alt:""}})]),e._v(" "),o("h3",[e._v("\n Do you have a moment to share why you are deactivating WP RSS Aggregator?\n ")]),e._v(" "),o("p",[e._v("\n Your feedback will help us to improve our plugins and service.\n ")])]),e._v(" "),o("div",{attrs:{slot:"body"},slot:"body"},[o("SerializedForm",{attrs:{form:e.form},model:{value:e.model,callback:function(t){e.model=t},expression:"model"}})],1),e._v(" "),o("div",{attrs:{slot:"footer"},slot:"footer"},[o("div",{staticClass:"footer-confirm__buttons"},[o("button",{staticClass:"button button-clear",on:{click:e.deactivate}},[e._v("\n Skip & Deactivate\n ")]),e._v(" "),o("button",{staticClass:"button button-primary",class:{"loading-button":e.isDeactivating},on:{click:e.submit}},[e._v("\n Submit & Deactivate\n ")])])])])],1)},n=[],l=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("transition",{attrs:{name:"modal-transition"}},[e.active?o("div",{staticClass:"modal",on:{click:function(t){if(t.target!==t.currentTarget)return null;e.$emit("close")}}},[o("div",{class:["modal__body",this.modalBodyClass]},[o("div",{staticClass:"modal__header",class:e.headerClass},[e._t("header")],2),e._v(" "),o("div",{staticClass:"modal__content"},[e._t("body")],2),e._v(" "),o("div",{staticClass:"modal__footer"},[e._t("footer")],2)])]):e._e()])},s=[],r={props:{active:{type:Boolean},title:{type:String},modalBodyClass:{type:String,default:""},headerClass:{default:function(){return{}}},dialogOpenedClass:{type:String,default:"modal-opened"}},watch:{active:function(e){this.$emit(e?"open":"close")}},mounted:function(){var e=this;this.$on("open",function(){document.querySelector("body").classList.add(e.dialogOpenedClass)}),this.$on("close",function(){document.querySelector("body").classList.remove(e.dialogOpenedClass)})}},d=r,c=o(1),u=Object(c.a)(d,l,s,!1,null,null,null);u.options.__file="Modal.vue";var m=u.exports,v=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"form"},e._l(e.form,function(t){return e.satisfiesCondition(t)?o("div",{staticClass:"form-group"},["radio"===t.type?[t.label?o("label",{attrs:{for:t.name},domProps:{innerHTML:e._s(t.label)}}):e._e(),e._v(" "),e._l(t.options,function(a,i){return o("div",{staticClass:"form-check"},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.model[t.name],expression:"model[datum.name]"}],attrs:{type:"radio",name:t.name,id:t.name+"_"+i},domProps:{value:a.value,checked:e._q(e.model[t.name],a.value)},on:{change:function(o){e.$set(e.model,t.name,a.value)}}}),e._v(" "),o("label",{attrs:{for:t.name+"_"+i}},[e._v("\n "+e._s(a.label||a.value)+"\n ")])])})]:e._e(),e._v(" "),"textarea"===t.type?[t.label?o("label",{attrs:{for:t.name},domProps:{innerHTML:e._s(t.label)}}):e._e(),e._v(" "),o("textarea",{directives:[{name:"model",rawName:"v-model",value:e.model[t.name],expression:"model[datum.name]"}],attrs:{id:t.name},domProps:{value:e.model[t.name]},on:{input:function(o){o.target.composing||e.$set(e.model,t.name,o.target.value)}}})]:e._e(),e._v(" "),"content"===t.type?[o("div",{class:t.className},[o("p",{domProps:{innerHTML:e._s(t.label)}})])]:e._e()],2):e._e()}),0)},p=[],f={props:{form:{type:Array},value:{type:Object}},computed:{model:{get:function(){return this.value},set:function(e){this.$emit("input",e)}}},methods:{satisfiesCondition:function(e){if(!e.condition)return!0;var t=this.getConditionFunction(e.condition.operator);return!!t&&t(e.condition.field,e.condition.value)},getConditionFunction:function(e){var t=this,o={"=":function(e,o){return t.model[e]===o}};return o[e]?o[e]:null}}},_=f,b=Object(c.a)(_,v,p,!1,null,null,null);b.options.__file="SerializedForm.vue";var h=b.exports,g=o(18),y=o.n(g),C=document.querySelector('[data-slug="wp-rss-aggregator"] .deactivate a'),P={components:{Modal:m,SerializedForm:h},data:function(){return{isDeactivating:!1,deactivateUrl:null,submitUrl:WrpaDisablePoll.url,model:WrpaDisablePoll.model,form:WrpaDisablePoll.form,isModalVisible:!1}},watch:{"model.reason":function(){this.model.follow_up=null}},mounted:function(){C.addEventListener("click",this.handleDeactivateClick)},methods:{image:function(e){return WrpaDisablePoll.image+e},handleDeactivateClick:function(e){this.isModalVisible||(e.preventDefault(),this.isModalVisible=!0)},closeModal:function(){this.isModalVisible=!1,this.deactivateUrl=null},submit:function(){var e=this;this.isDeactivating=!0,y.a.post(this.submitUrl,this.model,{headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(){e.deactivate()}).finally(function(){e.isDeactivating=!1})},deactivate:function(){C.click()}}},D=P,w=Object(c.a)(D,i,n,!1,null,null,null);w.options.__file="PluginDisablePoll.vue";var k=w.exports;o(17),new a.a({el:"#wpra-plugins-app",template:"<PluginDisablePoll/>",components:{PluginDisablePoll:k}})},17:function(e,t){}},[16])});
 
js/src/components/BottomPanel.vue ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <template>
2
+ <div class="wpra-bottom-panel">
3
+ <slot></slot>
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ export default {}
9
+ </script>
js/src/components/Button.js ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export default {
2
+ props: {
3
+ loading: {
4
+ type: Boolean,
5
+ default: false,
6
+ }
7
+ },
8
+ render () {
9
+ return <button
10
+ disabled={this.loading}
11
+ class={{'button': true, 'loading-button': this.loading}}
12
+ >{ this.$slots.default }</button>
13
+ }
14
+ }
js/src/{intro → components}/Expander.vue RENAMED
File without changes
js/src/components/Input.js ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export default {
2
+ props: {
3
+ id: {
4
+ type: String,
5
+ default () {
6
+ return Math.random().toString(36).substr(0, 12)
7
+ }
8
+ },
9
+ label: {},
10
+ description: {},
11
+ type: {},
12
+ value: {},
13
+ placeholder: {},
14
+ title: {},
15
+ inputDisabled: {},
16
+ options: {
17
+ default () {
18
+ return {}
19
+ }
20
+ },
21
+ },
22
+ methods: {
23
+ inputNode () {
24
+ if (this.type === 'checkbox') {
25
+ return <input type="checkbox"
26
+ id={this.id}
27
+ checked={!!this.value}
28
+ onChange={() => this.$emit('input', !this.value)}
29
+ placeholder={this.placeholder}
30
+ disabled={this.$attrs.disabled || this.inputDisabled}
31
+ {...{attrs: this.$attrs}}
32
+ />
33
+ }
34
+
35
+ if (this.type !== 'select') {
36
+ return <input type={this.type}
37
+ value={this.value}
38
+ id={this.id}
39
+ onInput={(e) => this.$emit('input', e.target.value)}
40
+ placeholder={this.placeholder}
41
+ disabled={this.$attrs.disabled || this.inputDisabled}
42
+ {...{attrs: this.$attrs}}
43
+ />
44
+ }
45
+ return this.selectNode()
46
+ },
47
+
48
+ selectNode () {
49
+ let options = Object.keys(this.options)
50
+ .map(key => <option value={key} selected={ this.value === key }>{ this.options[key] }</option>)
51
+
52
+ return <select
53
+ {...{attrs: this.$attrs}}
54
+ id={this.id}
55
+ disabled={this.$attrs.disabled || this.inputDisabled}
56
+ onChange={(e) => this.$emit('input', e.target.value)}
57
+ >{ options }</select>
58
+ },
59
+ },
60
+ render () {
61
+ let directives = []
62
+
63
+ if (this.title) {
64
+ directives.push({
65
+ name: 'tippy',
66
+ })
67
+ }
68
+
69
+ return <div class={{'form-input': true, 'form-input--disabled': this.$attrs.disabled || false}}>
70
+ { this.label ? (
71
+ <label class="form-input__label" for={this.id}>
72
+ <div>
73
+ {this.label}
74
+ {
75
+ this.title ? (
76
+ <div class="form-input__tip" {...{directives}} title={this.title}>
77
+ <span class="dashicons dashicons-editor-help"/>
78
+ </div>
79
+ ) : null
80
+ }
81
+ </div>
82
+ {this.description ? <div class="form-input__label-description" {...{domProps: {innerHTML: this.description}}}/> : ''}
83
+ </label>
84
+ ) : null }
85
+ <div class="form-input__field">
86
+ { this.inputNode() }
87
+ </div>
88
+ </div>
89
+ }
90
+ }
js/src/components/Layout.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ export default {
2
+ render () {
3
+ return (
4
+ <div id="post-body">
5
+ {
6
+ this.$slots.default
7
+ }
8
+ </div>
9
+ )
10
+ }
11
+ }
js/src/components/Main.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ export default {
2
+ render () {
3
+ return (
4
+ <div id="postbox-container-2" class="postbox-container">
5
+ {
6
+ this.$slots.default
7
+ }
8
+ </div>
9
+ )
10
+ }
11
+ }
js/src/{plugins → components}/Modal.vue RENAMED
File without changes
js/src/components/NoticeBlock.js ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Button from './Button'
2
+
3
+ /**
4
+ * Big notice block that is used to provide some information for users.
5
+ * Also can display "learn more" button to allow users to read more about
6
+ * the announce.
7
+ */
8
+ export default {
9
+ data () {
10
+ return {
11
+ shouldBeVisible: true,
12
+ }
13
+ },
14
+
15
+ props: {
16
+ /**
17
+ * Unique identifier of the notice block.
18
+ *
19
+ * @property {string}
20
+ */
21
+ id: {
22
+ type: String,
23
+ required: true,
24
+ },
25
+
26
+ /**
27
+ * Visible title on top of the block.
28
+ *
29
+ * @property {string}
30
+ */
31
+ title: {
32
+ type: String,
33
+ },
34
+
35
+ /**
36
+ * The notice's block body. Can be HTML with text formatting, links and so on.
37
+ *
38
+ * @property {string}
39
+ */
40
+ body: {
41
+ type: String,
42
+ },
43
+
44
+ /**
45
+ * The link to a "learn more" article. Will be opened in a new tab.
46
+ * If value is empty, "learn more" button won't be rendered.
47
+ *
48
+ * @property {string|boolean}
49
+ */
50
+ learnMore: {
51
+ default: false,
52
+ },
53
+
54
+ /**
55
+ * Text on the button that will hide the message.
56
+ *
57
+ * @property {string}
58
+ */
59
+ okayText: {
60
+ type: String,
61
+ default: 'Got it'
62
+ },
63
+
64
+ /**
65
+ * Text on the button that will open a "learn more" article.
66
+ *
67
+ * @property {string}
68
+ */
69
+ learnMoreText: {
70
+ type: String,
71
+ default: 'Learn more'
72
+ },
73
+
74
+ /**
75
+ * Whether the notice block is visible in UI.
76
+ *
77
+ * @property {boolean}
78
+ */
79
+ visible: {
80
+ type: Boolean,
81
+ default: true,
82
+ },
83
+ },
84
+
85
+ computed: {
86
+ isVisible () {
87
+ return this.visible
88
+ && this.shouldBeVisible
89
+ && JSON.parse(localStorage.getItem(this.getBlockKey()) || 'true')
90
+ }
91
+ },
92
+
93
+ methods: {
94
+ /**
95
+ * Hide the block.
96
+ */
97
+ onOkayClick () {
98
+ this.shouldBeVisible = false
99
+ localStorage.setItem(this.getBlockKey(), JSON.stringify(false))
100
+ },
101
+
102
+ /**
103
+ * Open learn more link in a new tab when user clicks on the "learn more" button.
104
+ */
105
+ onLearnMoreClick () {
106
+ window.open(this.learnMore, '_blank').focus()
107
+ },
108
+
109
+ /**
110
+ * Notice's block key in local storage.
111
+ *
112
+ * @return {string}
113
+ */
114
+ getBlockKey () {
115
+ return `wpra-${this.id}-visible`
116
+ }
117
+ },
118
+
119
+ render () {
120
+ /*
121
+ * Template is not rendered when it was hidden by user, or server.
122
+ */
123
+ if (!this.isVisible) {
124
+ return null
125
+ }
126
+
127
+ let learnMoreButton = this.learnMore ?
128
+ <Button class="button-clear" nativeOnClick={this.onLearnMoreClick}>
129
+ {this.learnMoreText} <span class="dashicons dashicons-external"/>
130
+ </Button> : null
131
+
132
+ return (
133
+ <div class="wpra-notice-block">
134
+ <div class="wpra-notice-block__title">{this.title}</div>
135
+ <div class="wpra-notice-block__body" {...{domProps: {innerHTML: this.body}}}/>
136
+ <div class="wpra-notice-block__buttons">
137
+ <Button class="brand button-primary" nativeOnClick={this.onOkayClick}>{this.okayText}</Button>
138
+ {learnMoreButton}
139
+ </div>
140
+ </div>
141
+ )
142
+ }
143
+ }
js/src/components/Postbox.vue ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script>
2
+ export default {
3
+ inject: ['hooks'],
4
+ data () {
5
+ return {
6
+ expanded: true,
7
+ }
8
+ },
9
+ props: {
10
+ title: {},
11
+ id: {},
12
+ submit: {
13
+ type: Boolean,
14
+ default: false,
15
+ },
16
+ },
17
+ methods: {
18
+ toggle () {
19
+ this.expanded = !this.expanded
20
+ }
21
+ },
22
+ render () {
23
+ return this.hooks.apply('postbox-' + this.id, this, (
24
+ <div class="postbox wpra-postbox" id={ this.submit ? 'submitdiv' : ''}>
25
+ <button type="button" class="handlediv" aria-expanded="true" onClick={this.toggle}>
26
+ <span class="screen-reader-text">Toggle panel: { this.title }</span>
27
+ <span class="toggle-indicator" aria-hidden="true"></span>
28
+ </button>
29
+ <h2 class="hndle ui-sortable-handle"
30
+ onClick={this.toggle}
31
+ ><span>{ this.title }</span></h2>
32
+ <div class="inside">
33
+ {
34
+ this.hooks.apply('postbox-content-' + this.id, this, [
35
+ this.$slots.default
36
+ ])
37
+ }
38
+ </div>
39
+ </div>
40
+ ))
41
+ }
42
+ }
43
+ </script>
js/src/components/RouteLink.js ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export default {
2
+ props: {
3
+ path: {},
4
+ gate: {}
5
+ },
6
+ inject: [
7
+ 'router'
8
+ ],
9
+ methods: {
10
+ getPath () {
11
+ return this.router.buildRoute(this.path)
12
+ },
13
+ navigate (e) {
14
+ const allowed = !this.gate || this.gate()
15
+
16
+ e.preventDefault()
17
+
18
+ if (allowed) {
19
+ this.router.navigate(this.path)
20
+ }
21
+ }
22
+ },
23
+ render () {
24
+ const path = this.getPath()
25
+ return <a href={path} onClick={this.navigate}>{ this.$slots.default }</a>
26
+ }
27
+ }
js/src/components/RouterApp.js ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export default function ({ store, router }) {
2
+ return {
3
+ store,
4
+ data () {
5
+ return {
6
+ afterNavigate: () => {},
7
+ params: {},
8
+ currentRoute: null,
9
+ }
10
+ },
11
+ created () {
12
+ router.setApp(this)
13
+ this.currentRoute = router.parseLocation(window.location)
14
+ this.navigated()
15
+ },
16
+ mounted () {
17
+ window.addEventListener('popstate', () => {
18
+ this.currentRoute = router.parseLocation(window.location)
19
+ this.navigated()
20
+ })
21
+ },
22
+ methods: {
23
+ ViewComponent () {
24
+ const matchingView = router.findRoute(this.currentRoute)
25
+ return matchingView.component
26
+ },
27
+ navigated () {
28
+ this.$nextTick(() => {
29
+ const main = this.$refs.main
30
+ if (!main || !main.navigated) {
31
+ return
32
+ }
33
+ main.navigated({
34
+ route: router.findRoute(this.currentRoute),
35
+ })
36
+ })
37
+ }
38
+ },
39
+ render (h) {
40
+ const content = h(this.ViewComponent(), {
41
+ ref: 'main'
42
+ })
43
+ this.afterNavigate()
44
+ return content
45
+ }
46
+ }
47
+ }
js/src/{plugins → components}/SerializedForm.vue RENAMED
File without changes
js/src/components/Sidebar.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ export default {
2
+ render () {
3
+ return (
4
+ <div id="postbox-container-1" class="wpra-postbox-container postbox-container">
5
+ {
6
+ this.$slots.default
7
+ }
8
+ </div>
9
+ )
10
+ }
11
+ }
js/src/{intro → components}/TransitionExpand.vue RENAMED
File without changes
js/src/intro/Wizard.vue DELETED
@@ -1,440 +0,0 @@
1
- <template>
2
- <div class="wizard-holder animated fadeIn">
3
- <div class="connect-steps">
4
- <div class="step-items">
5
- <div class="step-progress" :class="'step-progress--' + activeScreenIndex"></div>
6
- <div class="step-item"
7
- :class="{ 'step-item_active': active(screen.id), 'step-item_completed' : screen.completed() && index < activeScreenIndex }"
8
- v-for="(screen, index) of screens"
9
- >
10
- <div class="step-item__status">
11
- <span class="dashicons dashicons-yes" v-if="screen.completed() && index < activeScreenIndex"></span>
12
- </div>
13
- <div class="step-item__info">
14
- <div class="step-item__title">{{ screen.title }}</div>
15
- <div class="step-item__description" v-if="screen.description">{{ screen.description }}</div>
16
- </div>
17
- </div>
18
- </div>
19
- </div>
20
- <div class="wizard">
21
- <transition :name="transition" mode="out-in">
22
- <div class="wizard_content" :key="activeScreen" v-if="active('feed')">
23
- <div class="wizard_hello">
24
- Enter your first RSS Feed URL
25
- </div>
26
-
27
- <form id="feedForm" @submit.prevent="next" class="wizard_info">
28
- <div class="form-group">
29
- <input type="text" placeholder="https://www.sourcedomain.com/feed/" v-model="form.feedSourceUrl"
30
- class="wpra-feed-input"
31
- >
32
- <span class="dashicons dashicons-warning warning-icon" v-if="isFeedError"></span>
33
- <a :href="validateLink" target="_blank" v-if="isFeedError">Validate feed</a>
34
- </div>
35
- </form>
36
-
37
- <div class="wizard_error" v-if="isFeedError">
38
- <p>This RSS feed URL appears to be invalid. Here are a couple of things you can try:</p>
39
- <ol>
40
- <li>Check whether the URL you entered is the correct one by trying one of the options when clicking on "How do I find an RSS feed URL?" below.</li>
41
- <li>
42
- Test out this other RSS feed URL to make sure the plugin is working correctly - https://www.wpmayor.com/feed/ - If it works, you may <a :href="supportUrl" target="_blank">contact us here</a> to help you with your source.
43
- </li>
44
- <li>Test the URL's validity by W3C standards, the standards we use in our plugins, using the “Validate feed” link above.</li>
45
- </ol>
46
- </div>
47
-
48
- <expander title="How do I find an RSS feed URL?">
49
- <p>WP RSS Aggregator fetches feed items through RSS feeds. Almost every website in the world provides an RSS feed. Here's how to find it:</p>
50
- <p>Option 1: Add /feed to the website's homepage URL </p>
51
- <p>Many sites have their RSS feed at the same URL. For instance, if the website's URL is www.thiswebsite.com, then the RSS feed could be at www.thiswebsite.com/feed.</p>
52
- <p>Option 2: Look for the RSS share icon</p>
53
- <p>Many websites have share icons on their pages for Facebook, Twitter and more. Many times, there will also be an orange RSS icon. Click on that to access the RSS feed URL.</p>
54
- <p>Option 3: Browser RSS Auto-Discovery</p>
55
- <p>Most browsers either include an RSS auto-discovery tool by default or they allow you to add extensions for it. Firefox shows an RSS icon above the website, in the address bar, which you can click on directly. Chrome offers extensions such as this one.</p>
56
- <p>Option 4: Look at the Page Source</p>
57
- <p>When on any page of the website you're looking to import feed items from, right click and press "View Page Source". Once the new window opens, use the “Find” feature (Ctrl-F on PC, Command-F on Mac) and search for " RSS". This should take you to a line that reads like this (or similar):</p>
58
- <p>
59
- <code>
60
- &#x3C;link rel=&#x22;alternate&#x22; type=&#x22;application/rss+xml&#x22; title=&#x22;RSS Feed&#x22; href=&#x22;https://www.sourcedomain.com/feed/&#x22; /&#x3E;
61
- </code>
62
- </p>
63
- <p>The RSS feed’s URL is found between the quotes after href=. In the above case, it would be https://www.sourcedomain.com/feed/.</p>
64
- <p><a :href="knowledgeBaseUrl" target="_blank">Browse our Knowledge Base for more information.</a></p>
65
- </expander>
66
- </div>
67
-
68
- <div class="wizard_content" :key="activeScreen" v-if="active('feedItems')">
69
- <div class="wizard_hello">
70
- Latest feed items from your selected feed source:
71
- </div>
72
-
73
- <div class="wpra-feed-items">
74
- <div class="wpra-feed-item" v-for="item of feed.items">
75
- <div class="wpra-feed-item__link">
76
- <a :href="item.permalink" target="_blank">{{ item.title }}</a>
77
- </div>
78
- <div class="wpra-feed-item__info">
79
- <template v-if="item.date || item.author">
80
- <template v-if="item.date">
81
- Published on {{ item.date }}
82
- </template>
83
- <template v-if="item.date && item.author">|</template>
84
- <template v-if="item.author">
85
- By {{ item.author }}
86
- </template>
87
- </template>
88
- </div>
89
- </div>
90
- </div>
91
-
92
- <div class="wrpa-shortcode">
93
- <div class="wrpa-shortcode-preview">
94
- <div class="wrpa-shortcode-label">
95
- Create a draft page to preview these feed items on your site:
96
- </div>
97
- <a :href="previewUrl" target="_blank" class="button"
98
- @click="preparePreview"
99
- :class="{'button-primary': isPrepared, 'loading-button': isPreparing}"
100
- >
101
- {{ isPrepared ? 'Preview the Page' : 'Create Draft Page' }}
102
- </a>
103
- </div>
104
- <div class="wrpa-shortcode-form" @click="copyToClipboard()">
105
- <div class="wrpa-shortcode-label">
106
- Copy the shortcode to any page or post on your site:
107
- </div>
108
- <input class="wrpa-shortcode-form__shortcode"
109
- type="text"
110
- readonly
111
- value="[wp-rss-aggregator]"
112
- ref="selected"
113
- />
114
- <div class="wrpa-shortcode-form__button">
115
- {{ isCopied ? 'Copied!' : 'Click to copy' }}
116
- </div>
117
- </div>
118
- </div>
119
- </div>
120
-
121
- <div class="wizard_content" :key="activeScreen" v-if="active('finish')">
122
- <div class="wizard_hello">
123
- You’ve successfully set up your first feed source 😄
124
- </div>
125
-
126
- <div class="wpra-cols-title">
127
- Do more with WP RSS Aggregator - here is what we did at CryptoHeadlines.com.
128
- </div>
129
-
130
- <div class="wpra-cols">
131
- <div class="col">
132
- <p>CryptoHeadlines.com displays latest news, Youtube videos, podcasts, jobs and more from the Cryptocurrency industry.</p>
133
- <p>It uses Feed to Post to import articles, Youtube videos, and podcast links.</p>
134
- <p>Full Text RSS Feeds is used to fetch the full content of the job listings to present more information to the potential applicant.</p>
135
- <p>Keyword Filtering is used to filter out content that contains profanity and keywords or phrases deemed as inappropriate.</p>
136
- <div style="margin-bottom: .5rem">
137
- <a :href="addOnsUrl" class="button" target="_blank">
138
- Browse Add-ons ⭐️
139
- </a>
140
- </div>
141
- <div>
142
- <a :href="supportUrl" target="_blank" style="font-size: .9em">Contact support for more information.</a>
143
- </div>
144
- </div>
145
- <div class="col">
146
- <img :src="demoImageUrl"
147
- class="img wpra-demo-photo">
148
-
149
- <div class="wpra-feedback">
150
- <!--<div class="wpra-feedback__photo">-->
151
- <!--<img src="https://www.wprssaggregator.com/wp-content/themes/wp_rss_theme/assets/images/review2.jpg">-->
152
- <!--</div>-->
153
- <div class="wpra-feedback__copy">
154
- <div class="wpra-feedback__text">
155
- This plugin has made my life a lot easier, and the support has been great as well.
156
- </div>
157
- <div class="wpra-feedback__rating">
158
- <span class="dashicons dashicons-star-filled"></span>
159
- <span class="dashicons dashicons-star-filled"></span>
160
- <span class="dashicons dashicons-star-filled"></span>
161
- <span class="dashicons dashicons-star-filled"></span>
162
- <span class="dashicons dashicons-star-filled"></span>
163
- </div>
164
- <div class="wpra-feedback__by">
165
- <a :href="feedbackUrl" target="_blank">
166
- Review by officeinnovator
167
- </a>
168
- </div>
169
- </div>
170
- </div>
171
- </div>
172
- </div>
173
- </div>
174
- </transition>
175
-
176
- <div class="connect-actions pad">
177
- <div class="pad-item--grow">
178
- <button v-if="!active('finish')"
179
- class="button-clear"
180
- @click="finish"
181
- >
182
- Skip the introduction
183
- </button>
184
- </div>
185
- <div class="pad-item--no-shrink">
186
- <button class="button-clear"
187
- @click="back"
188
- v-if="isBackAvailable"
189
- >
190
- Back
191
- </button>
192
- <button @click="next"
193
- class="button button-primary button-large"
194
- :class="{'loading-button': isLoading}"
195
- >
196
- {{ active('finish') ? 'Continue to Plugin' : 'Next' }}
197
- </button>
198
- </div>
199
- </div>
200
- </div>
201
- </div>
202
- </template>
203
-
204
- <script>
205
- import Expander from './Expander'
206
- import { post } from './fetch'
207
- import { copyToClipboard } from './copy'
208
-
209
- const _ = (str) => str
210
-
211
- const CONFIG = window.wprssWizardConfig
212
-
213
- export default {
214
- data () {
215
- return {
216
- prevHeight: 0,
217
- screens: [{
218
- id: 'feed',
219
- title: _('Add feed source URL'),
220
- description: false,
221
- next: this.submitFeed,
222
- completed: () => {
223
- return this.feed.items.length
224
- },
225
- entered: () => {
226
- this.focusOnInput('feed')
227
- }
228
- }, {
229
- id: 'feedItems',
230
- title: _('Display feed items'),
231
- description: false,
232
- next: this.continueItems,
233
- completed: () => {
234
- return this.feed.items.length && this.itemsPassed
235
- }
236
- }, {
237
- id: 'finish',
238
- title: _('Complete introduction'),
239
- description: false,
240
- next: this.completeIntroduction,
241
- completed: () => {
242
- return this.feed.items.length && this.itemsPassed
243
- }
244
- }],
245
- isCopied: false,
246
-
247
- isPreparing: false,
248
- isPrepared: false,
249
-
250
- transition: 'slide-up', // 'slide-down',
251
-
252
- activeScreen: 'feed',
253
- form: {
254
- feedSourceUrl: null,
255
- },
256
- itemsPassed: false,
257
-
258
- stepLoading: false,
259
- isLoading: false,
260
-
261
- isFeedError: false,
262
-
263
- feed: {
264
- items: [],
265
- },
266
- previewUrl: CONFIG.previewUrl,
267
- addOnsUrl: CONFIG.addOnsUrl,
268
- supportUrl: CONFIG.supportUrl,
269
- demoImageUrl: CONFIG.demoImageUrl,
270
- feedbackUrl: CONFIG.feedbackUrl,
271
- knowledgeBaseUrl: CONFIG.knowledgeBaseUrl,
272
- }
273
- },
274
- computed: {
275
- validateLink () {
276
- return 'https://validator.w3.org/feed/check.cgi?url=' + encodeURI(this.form.feedSourceUrl)
277
- },
278
-
279
- activeScreenIndex () {
280
- return this.screens.findIndex(screen => screen.id === this.activeScreen)
281
- },
282
- currentScreen () {
283
- return this.screens.find(screen => screen.id === this.activeScreen)
284
- },
285
- actionCompleted () {
286
- return this.currentScreen.completed()
287
- },
288
- isBackAvailable () {
289
- return this.activeScreenIndex > 0 && this.activeScreenIndex < this.screens.length
290
- },
291
- },
292
- mounted () {
293
- this.onScreenEnter()
294
- },
295
- methods: {
296
- preparePreview (e) {
297
- if (this.isPreparing) {
298
- e.preventDefault()
299
- return
300
- }
301
- if (!this.isPrepared) {
302
- e.preventDefault()
303
- this.isPreparing = true
304
- fetch(this.previewUrl).then(() => {
305
- this.isPreparing = false
306
- this.isPrepared = true
307
- })
308
- }
309
- },
310
-
311
- /**
312
- * Submits first feed step.
313
- *
314
- * @return {Promise<any>}
315
- */
316
- submitFeed () {
317
- const data = Object.assign(CONFIG.feedEndpoint.defaultPayload, {
318
- wprss_intro_feed_url: this.form.feedSourceUrl
319
- })
320
- this.isLoading = true
321
- this.isFeedError = false
322
- return post(CONFIG.feedEndpoint.url, data).then((responseData) => {
323
- this.feed.items = responseData.data.feed_items.slice(0, 3)
324
- this.isLoading = false
325
- return {}
326
- }).catch((resp) => {
327
- this.isLoading = false
328
- this.isFeedError = true
329
- throw resp
330
- })
331
- },
332
-
333
- /**
334
- * Continue from items step.
335
- *
336
- * @return {Promise<any>}
337
- */
338
- continueItems () {
339
- this.itemsPassed = true
340
- return Promise.resolve({})
341
- },
342
-
343
- /**
344
- * Complete the introduction and proceed to sources list.
345
- *
346
- * @return {Promise<any>}
347
- */
348
- completeIntroduction () {
349
- return Promise.resolve({})
350
- },
351
-
352
- /**
353
- * Go to the next screen in this wizard.
354
- */
355
- next () {
356
- this.transition = 'slide-up'
357
- const nextTransistor = this.currentScreen.next ? this.currentScreen.next : () => Promise.resolve(false)
358
- this.stepLoading = true
359
- nextTransistor().then(result => {
360
- this.stepLoading = false
361
- }, (err) => {
362
- throw err
363
- }).then(() => {
364
- const nextStepIndex = this.activeScreenIndex + 1
365
- if (nextStepIndex >= this.screens.length) {
366
- this.finish()
367
- }
368
- else {
369
- this.activeScreen = this.screens[nextStepIndex].id
370
- this.onScreenEnter()
371
- }
372
- }).catch((err) => {
373
- console.error(err)
374
- })
375
- },
376
-
377
- /**
378
- * Run on screen event.
379
- */
380
- onScreenEnter () {
381
- this.$nextTick(() => {
382
- if (this.currentScreen.entered) {
383
- this.currentScreen.entered()
384
- }
385
- })
386
- },
387
-
388
- /**
389
- * Focus on some ref input.
390
- */
391
- focusOnInput (refName) {
392
- if (!this.$refs[refName] || !this.$refs[refName].focus) {
393
- return false
394
- }
395
- this.$refs[refName].focus()
396
- },
397
-
398
- /**
399
- * Go back in the wizard on one step.
400
- */
401
- back () {
402
- this.transition = 'slide-down'
403
- this.activeScreen = this.screens[this.activeScreenIndex - 1].id
404
- },
405
-
406
- /**
407
- * Finish this wizard.
408
- */
409
- finish (confirmFinish = false) {
410
- const visitList = () => window.location.href = CONFIG.feedListUrl
411
- if (confirmFinish) {
412
- if (confirm('Are you sure you want to skip the introduction?')) {
413
- visitList()
414
- }
415
- return
416
- }
417
- visitList()
418
- // redirect to the URL.
419
- },
420
-
421
- active (pageName) {
422
- return this.activeScreen === pageName
423
- },
424
-
425
- copyToClipboard () {
426
- if (this.isCopied) {
427
- return
428
- }
429
- copyToClipboard('[wp-rss-aggregator]')
430
- this.isCopied = true
431
- setTimeout(() => {
432
- this.isCopied = false
433
- }, 1000)
434
- }
435
- },
436
- components: {
437
- Expander
438
- }
439
- }
440
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/intro/copy.js DELETED
@@ -1,37 +0,0 @@
1
- /**
2
- * Helper functions to copy text to clipboard.
3
- *
4
- * @see https://stackoverflow.com/questions/400212/how-do-i-copy-to-the-clipboard-in-javascript
5
- *
6
- * @param text
7
- */
8
-
9
- const fallbackCopyToClipboard = function (text) {
10
- var textArea = document.createElement('textarea')
11
- textArea.value = text
12
- document.body.appendChild(textArea)
13
- textArea.focus()
14
- textArea.select()
15
-
16
- try {
17
- var successful = document.execCommand('copy')
18
- var msg = successful ? 'successful' : 'unsuccessful'
19
- console.log('Fallback: Copying text command was ' + msg)
20
- } catch (err) {
21
- console.error('Fallback: Oops, unable to copy', err)
22
- }
23
-
24
- document.body.removeChild(textArea)
25
- }
26
-
27
- export function copyToClipboard (text) {
28
- if (!navigator.clipboard) {
29
- fallbackCopyToClipboard(text)
30
- return
31
- }
32
- navigator.clipboard.writeText(text).then(function () {
33
- console.log('Async: Copying to clipboard was successful!')
34
- }, function (err) {
35
- console.error('Async: Could not copy text: ', err)
36
- })
37
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/intro/index.js DELETED
@@ -1,11 +0,0 @@
1
- require('./../../../css/src/intro/steps.scss')
2
-
3
- import Vue from 'vue'
4
- import Wizard from './Wizard'
5
- import 'whatwg-fetch'
6
-
7
- new Vue({
8
- el: '#wpra-wizard-app',
9
- template: '<Wizard/>',
10
- components: { Wizard }
11
- })
 
 
 
 
 
 
 
 
 
 
 
js/src/libs/NotificationCenter.js ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Library agnostic wrapper for notifications.
3
+ *
4
+ * @since [*next-version*]
5
+ *
6
+ * @class NotificationsCenter
7
+ */
8
+ export default class NotificationsCenter {
9
+ /**
10
+ * NotificationsCenter constructor.
11
+ *
12
+ * @since [*next-version*]
13
+ *
14
+ * @param {Function} show Function implementation for displaying messages.
15
+ * @param {Function} error Function implementation for displaying errors.
16
+ */
17
+ constructor (show, error) {
18
+ this.showMethod = show
19
+ this.errorMethod = error
20
+ }
21
+
22
+ /**
23
+ * Display informational message.
24
+ *
25
+ * @since [*next-version*]
26
+ *
27
+ * @param {string} msg Message for displaying
28
+ * @param {object} options Options for notification.
29
+ */
30
+ show (msg, options = {}) {
31
+ this.showMethod(msg, options)
32
+ }
33
+
34
+ /**
35
+ * Display error message.
36
+ *
37
+ * @since [*next-version*]
38
+ *
39
+ * @param {string} msg Message for displaying
40
+ * @param {object} options Options for notification.
41
+ */
42
+ error (msg, options = {}) {
43
+ this.errorMethod(msg, options)
44
+ }
45
+ }
js/src/libs/Router.js ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const getJsonFromUrl = (url) => {
2
+ if (!url) url = location.href
3
+ var question = url.indexOf('?')
4
+ var hash = url.indexOf('#')
5
+ if (hash == -1 && question == -1) return {}
6
+ if (hash == -1) hash = url.length
7
+ var query = question == -1 || hash == question + 1 ? url.substring(hash) :
8
+ url.substring(question + 1, hash)
9
+ var result = {}
10
+ query.split('&').forEach(function (part) {
11
+ if (!part) return
12
+ part = part.split('+').join(' ') // replace every + with space, regexp-free version
13
+ var eq = part.indexOf('=')
14
+ var key = eq > -1 ? part.substr(0, eq) : part
15
+ var val = eq > -1 ? decodeURIComponent(part.substr(eq + 1)) : ''
16
+ var from = key.indexOf('[')
17
+ if (from == -1) result[decodeURIComponent(key)] = val
18
+ else {
19
+ var to = key.indexOf(']', from)
20
+ var index = decodeURIComponent(key.substring(from + 1, to))
21
+ key = decodeURIComponent(key.substring(0, from))
22
+ if (!result[key]) result[key] = []
23
+ if (!index) result[key].push(val)
24
+ else result[key][index] = val
25
+ }
26
+ })
27
+ return result
28
+ }
29
+
30
+ export default class Router {
31
+ constructor (routes, options) {
32
+ this.routes = routes
33
+ this.options = options
34
+ this.baseParams = options.baseParams || ['post_type', 'page', 'action', 'id']
35
+ }
36
+
37
+ get params () {
38
+ return this.app ? this.app.params : {}
39
+ }
40
+
41
+ setApp (app) {
42
+ this.app = app
43
+ this.app.afterNavigate = this.options.afterNavigating || (() => {})
44
+ }
45
+
46
+ findRoute (location) {
47
+ return this.routes.find(({route}) => {
48
+ return location.indexOf(route) !== -1
49
+ })
50
+ }
51
+
52
+ updateParams (params) {
53
+ this.app.$set(this.app, 'params', params)
54
+ }
55
+
56
+ mergeParams (paramsPart) {
57
+ let currentParams = Object.keys(this.params).filter(key => {
58
+ return this.baseParams.indexOf(key) !== -1 || paramsPart.hasOwnProperty(key)
59
+ }).reduce((acc, key) => {
60
+ acc[key] = this.params[key]
61
+ return acc
62
+ }, {})
63
+
64
+ let params = Object.assign({}, currentParams, paramsPart)
65
+
66
+ this.updateParams(params)
67
+
68
+ window.history.pushState(
69
+ null,
70
+ null,
71
+ this.routeFromParams()
72
+ )
73
+
74
+ this.app.navigated()
75
+ }
76
+
77
+ routeFromParams () {
78
+ const hasParams = !!Object.keys(this.params).length
79
+ return location.pathname + (hasParams ? '?' + this.buildParams(this.params) : '')
80
+ }
81
+
82
+ buildRoute (route) {
83
+ if (route.name) {
84
+ let routeObject = this.routes.find(r => r.name === route.name)
85
+ if (!routeObject) {
86
+ return null
87
+ }
88
+ const routeStr = routeObject.route
89
+ const join = routeStr.indexOf('?') !== -1 ? '&' : '?'
90
+
91
+ return routeStr + (route.params ? join + this.buildParams(route.params ? route.params : {}) : '')
92
+ }
93
+ }
94
+
95
+ buildParams (params) {
96
+ return Object.keys(params).map(param => {
97
+ return `${param}=${params[param]}`
98
+ }).join('&')
99
+ }
100
+
101
+ parseLocation (location) {
102
+ this.updateParams(getJsonFromUrl(location.search))
103
+ console.info('ROUTE PARSE LOCATION PARAMS', getJsonFromUrl(location.search))
104
+ return location.pathname + location.search
105
+ }
106
+
107
+ navigate (route) {
108
+ if (this.app) {
109
+ this.app.currentRoute = this.buildRoute(route)
110
+ }
111
+
112
+ this.updateParams(Object.assign({}, route.params || {}, getJsonFromUrl(this.buildRoute(route))))
113
+
114
+ window.history.pushState(
115
+ null,
116
+ null,
117
+ this.buildRoute(route)
118
+ )
119
+
120
+ this.app.navigated()
121
+ }
122
+ }
js/src/mixins/DataChangesAware.js ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import jsonClone from 'app/utils/jsonClone'
2
+ import equal from 'fast-deep-equal'
3
+
4
+ /**
5
+ * Mixing for functionality that allows to track down and revert changes made on
6
+ * the primary editing data model.
7
+ *
8
+ * `model` property on base object is required for using this mixin.
9
+ */
10
+ export default {
11
+ data () {
12
+ return {
13
+ changes: {
14
+ model: {},
15
+ }
16
+ }
17
+ },
18
+ methods: {
19
+ /**
20
+ * Whether the model has been changed after last model "remembering".
21
+ *
22
+ * @return {boolean}
23
+ */
24
+ isChanged () {
25
+ return !equal(this.model, this.changes.model)
26
+ },
27
+
28
+ /**
29
+ * Remember current data model, but without any references to main model
30
+ * properties. It is important to clean any additional observers from object
31
+ * otherwise "memorized" model clone will be changed when model get changed.
32
+ */
33
+ rememberModel () {
34
+ this.$set(this.changes, 'model', jsonClone(this.model))
35
+ },
36
+
37
+ /**
38
+ * Cancel any changes on main model object.
39
+ */
40
+ cancelChanges () {
41
+ if (!confirm('Are you sure you want to cancel your changes for this template? This action cannot be reverted and all changes made since your last save will be lost.')) {
42
+ return
43
+ }
44
+ this.$set(this, 'model', jsonClone(this.changes.model))
45
+ },
46
+ }
47
+ }
js/src/modules/gutenberg-block/components/MultipleSelectControl.js ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Component } from '@wordpress/element'
2
+ import {
3
+ FormTokenField,
4
+ Placeholder,
5
+ Spinner,
6
+ BaseControl,
7
+ } from '@wordpress/components'
8
+
9
+ export default class MultipleSelectControl extends Component {
10
+ constructor (props) {
11
+ super(...arguments)
12
+ this.props = props
13
+ this.state = {
14
+ tokens: [],
15
+ loading: false,
16
+ items: []
17
+ }
18
+ }
19
+
20
+ componentDidMount () {
21
+ this.setState({loading: true})
22
+
23
+ jQuery.post(WPRA_BLOCK.ajax_url, {
24
+ action: 'wprss_fetch_items',
25
+ }, (data) => {
26
+ data = JSON.parse(data)
27
+ this.setState({
28
+ loading: false,
29
+ items: data.items
30
+ })
31
+ })
32
+ }
33
+
34
+ render () {
35
+ const setState = this.setState.bind(this)
36
+ const onChange = this.props.onChange
37
+ const items = this.state.items
38
+
39
+ if (this.state.loading) {
40
+ return <Placeholder>
41
+ <Spinner/>
42
+ </Placeholder>
43
+ }
44
+ return <BaseControl
45
+ help={this.props.help || ''}
46
+ >
47
+ <FormTokenField
48
+ label={this.props.label || ''}
49
+ placeholder={this.props.placeholder || ''}
50
+ value={this.props.value.map(function (id) {
51
+ return items.find(item => item.value === id)
52
+ }).filter(item => !!item)}
53
+ suggestions={this.state.items.map(function (item) {
54
+ item.toLocaleLowerCase = function () {
55
+ return item.title.toLocaleLowerCase()
56
+ }
57
+ item.toString = function () {
58
+ return item.title
59
+ }
60
+ return item
61
+ })}
62
+ displayTransform={function (item) {
63
+ if ('number' === typeof item) {
64
+ item = items.find(function (iteratedItem) {
65
+ return iteratedItem.value === item
66
+ })
67
+ }
68
+ if ('object' === typeof item) {
69
+ return item.title
70
+ }
71
+ return item
72
+ }}
73
+ saveTransform={function (token) {
74
+ return token
75
+ }}
76
+ onChange={function (tokens) {
77
+ setState({tokens})
78
+ onChange(tokens.map(function (item) {
79
+ return item.value
80
+ }))
81
+ }}
82
+ />
83
+ </BaseControl>
84
+ }
85
+ }
js/src/modules/gutenberg-block/index.js ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ require('css/src/gutenberg-block/index.scss')
2
+
3
+ import { __ } from '@wordpress/i18n'
4
+ import { registerBlockType } from '@wordpress/blocks'
5
+ import { InspectorControls } from '@wordpress/editor'
6
+ import {
7
+ ToggleControl,
8
+ ServerSideRender,
9
+ TextControl,
10
+ TextareaControl,
11
+ BaseControl,
12
+ PanelBody,
13
+ PanelRow,
14
+ Spinner,
15
+ Placeholder,
16
+ FormTokenField,
17
+ SelectControl,
18
+ } from '@wordpress/components'
19
+ import MultipleSelectControl from './components/MultipleSelectControl'
20
+
21
+ // Default template is selected by default.
22
+ let selectedTemplate = WPRA_BLOCK.templates[0]
23
+
24
+ // Selected template field getter. Additional function can be passed.
25
+ const getTemplateDefault = (field, wrapper = val => val, def = 0) => selectedTemplate[field] ? wrapper(selectedTemplate[field]) : def
26
+
27
+ // Helps to not override attributes that selected manually by user.
28
+ let templateLock = {}
29
+
30
+ // Whether the block is loaded initial information.
31
+ let _isLoaded = false
32
+
33
+ registerBlockType('wpra-shortcode/wpra-shortcode', {
34
+ title: __('WP RSS Aggregator Feeds'),
35
+ description: __('Display feed items imported using WP RSS Aggregator.'),
36
+ icon: 'rss',
37
+ category: 'widgets',
38
+
39
+ // Remove to make block editable in HTML mode.
40
+ supportHTML: false,
41
+
42
+ attributes: {
43
+ isAll: {
44
+ type: 'boolean',
45
+ default: true
46
+ },
47
+ template: {
48
+ type: 'string',
49
+ default: 'default'
50
+ },
51
+ pagination: {
52
+ type: 'boolean',
53
+ default: true
54
+ },
55
+ limit: {
56
+ type: 'number',
57
+ },
58
+ page: {
59
+ type: 'number',
60
+ },
61
+ exclude: {
62
+ type: 'string'
63
+ },
64
+ source: {
65
+ type: 'string'
66
+ }
67
+ },
68
+
69
+ state: {
70
+ foo: 'bar'
71
+ },
72
+
73
+ /**
74
+ * Called when Gutenberg initially loads the block.
75
+ */
76
+ edit: function (props) {
77
+ /*
78
+ * If block is not loaded, check whether we should block auto limit selection.
79
+ * It will be blocked if user selected entered limit value different from template's default.
80
+ */
81
+ if (!_isLoaded && props.attributes.template) {
82
+ selectedTemplate = WPRA_BLOCK.templates.find(item => item.value === (props.attributes.template || 'default'))
83
+
84
+ if (parseInt(props.attributes.limit) !== getTemplateDefault('limit', parseInt)) {
85
+ templateLock['limit'] = true
86
+ }
87
+
88
+ if (!!props.attributes.pagination !== getTemplateDefault('pagination', v => !!v, false)) {
89
+ templateLock['pagination'] = true
90
+ }
91
+
92
+ _isLoaded = true
93
+ }
94
+
95
+ const etWarning = WPRA_BLOCK.is_et_active ? <p style={{fontStyle: 'italic'}}>
96
+ Excerpts & Thumbnails is incompatible with the WP RSS Aggregator Feeds block. <a href="https://kb.wprssaggregator.com/article/459-using-excerpts-thumbnails-with-templates" target={'_blank'}>Learn more</a>.
97
+ </p> : null
98
+
99
+ return <div>
100
+ <ServerSideRender
101
+ block={'wpra-shortcode/wpra-shortcode'}
102
+ attributes={props.attributes}
103
+ className={'wpra-gutenberg-block'}
104
+ />
105
+ <InspectorControls>
106
+ <PanelBody
107
+ title={__('Feed Sources')}
108
+ initialOpen={true}
109
+ >
110
+ <ToggleControl
111
+ label={__('Show all Feed Sources ')}
112
+ checked={props.attributes.isAll}
113
+ onChange={(value) => {
114
+ props.setAttributes({isAll: value})
115
+ props.setAttributes({exclude: ''})
116
+ props.setAttributes({source: ''})
117
+ }}
118
+ />
119
+ <MultipleSelectControl
120
+ label={props.attributes.isAll ? __('Feed Sources to Exclude') : __('Feed Sources to Show')}
121
+ key={'select'}
122
+ help={__('Start typing to search feed sources by name')}
123
+ value={((props.attributes.isAll ? props.attributes.exclude : props.attributes.source) || '').split(',').map(item => parseInt(item))}
124
+ onChange={(selected) => {
125
+ selected = selected.join(',')
126
+ if (props.attributes.isAll) {
127
+ props.setAttributes({exclude: selected})
128
+ props.setAttributes({source: ''})
129
+ return
130
+ }
131
+ props.setAttributes({exclude: ''})
132
+ props.setAttributes({source: selected})
133
+ }}
134
+ />
135
+ </PanelBody>
136
+ <PanelBody
137
+ title={__('Display Options')}
138
+ initialOpen={false}
139
+ >
140
+ {etWarning}
141
+ <SelectControl
142
+ label={ __( 'Select Template' ) }
143
+ value={ props.attributes.template }
144
+ onChange={(template) => {
145
+ selectedTemplate = WPRA_BLOCK.templates.find(item => item.value === template)
146
+ props.setAttributes({template: template || ''})
147
+ if (!templateLock['limit']) {
148
+ props.setAttributes({limit: getTemplateDefault('limit', parseInt, 15)})
149
+ }
150
+ if (!templateLock['pagination']) {
151
+ props.setAttributes({pagination: getTemplateDefault('pagination', v => !!v, false)})
152
+ }
153
+ }}
154
+ options={WPRA_BLOCK.templates}
155
+ />
156
+ <TextControl
157
+ label={__('Feed Limit')}
158
+ help={__('Number of feed items to display')}
159
+ placeholder={getTemplateDefault('limit', parseInt)}
160
+ type={'number'}
161
+ min={1}
162
+ value={props.attributes.limit || getTemplateDefault('limit', parseInt)}
163
+ onChange={(value) => {
164
+ templateLock['limit'] = true
165
+ props.setAttributes({limit: parseInt(value) || getTemplateDefault('limit', parseInt)})
166
+ }}
167
+ />
168
+ <ToggleControl
169
+ label={__('Show Pagination ')}
170
+ checked={props.attributes.pagination}
171
+ onChange={(value) => {
172
+ templateLock['pagination'] = true
173
+ props.setAttributes({pagination: value})
174
+ }}
175
+ />
176
+ <TextControl
177
+ label={__('Page')}
178
+ placeholder={__('1')}
179
+ type={'number'}
180
+ min={1}
181
+ value={props.attributes.page || 1}
182
+ onChange={(value) => {
183
+ props.setAttributes({page: parseInt(value) || 1})
184
+ }}
185
+ />
186
+ </PanelBody>
187
+ </InspectorControls>
188
+ </div>
189
+ },
190
+
191
+ /**
192
+ * Called when Gutenberg "saves" the block to post_content
193
+ */
194
+ save: function (props) {
195
+ return null
196
+ }
197
+ })
js/src/modules/intro/Wizard.vue ADDED
@@ -0,0 +1,440 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <template>
2
+ <div class="wizard-holder animated fadeIn">
3
+ <div class="connect-steps">
4
+ <div class="step-items">
5
+ <div class="step-progress" :class="'step-progress--' + activeScreenIndex"></div>
6
+ <div class="step-item"
7
+ :class="{ 'step-item_active': active(screen.id), 'step-item_completed' : screen.completed() && index < activeScreenIndex }"
8
+ v-for="(screen, index) of screens"
9
+ >
10
+ <div class="step-item__status">
11
+ <span class="dashicons dashicons-yes" v-if="screen.completed() && index < activeScreenIndex"></span>
12
+ </div>
13
+ <div class="step-item__info">
14
+ <div class="step-item__title">{{ screen.title }}</div>
15
+ <div class="step-item__description" v-if="screen.description">{{ screen.description }}</div>
16
+ </div>
17
+ </div>
18
+ </div>
19
+ </div>
20
+ <div class="wizard">
21
+ <transition :name="transition" mode="out-in">
22
+ <div class="wizard_content" :key="activeScreen" v-if="active('feed')">
23
+ <div class="wizard_hello">
24
+ Enter your first RSS Feed URL
25
+ </div>
26
+
27
+ <form id="feedForm" @submit.prevent="next" class="wizard_info">
28
+ <div class="form-group">
29
+ <input type="text" placeholder="https://www.sourcedomain.com/feed/" v-model="form.feedSourceUrl"
30
+ class="wpra-feed-input"
31
+ >
32
+ <span class="dashicons dashicons-warning warning-icon" v-if="isFeedError"></span>
33
+ <a :href="validateLink" target="_blank" v-if="isFeedError">Validate feed</a>
34
+ </div>
35
+ </form>
36
+
37
+ <div class="wizard_error" v-if="isFeedError">
38
+ <p>This RSS feed URL appears to be invalid. Here are a couple of things you can try:</p>
39
+ <ol>
40
+ <li>Check whether the URL you entered is the correct one by trying one of the options when clicking on "How do I find an RSS feed URL?" below.</li>
41
+ <li>
42
+ Test out this other RSS feed URL to make sure the plugin is working correctly - https://www.wpmayor.com/feed/ - If it works, you may <a :href="supportUrl" target="_blank">contact us here</a> to help you with your source.
43
+ </li>
44
+ <li>Test the URL's validity by W3C standards, the standards we use in our plugins, using the “Validate feed” link above.</li>
45
+ </ol>
46
+ </div>
47
+
48
+ <expander title="How do I find an RSS feed URL?">
49
+ <p>WP RSS Aggregator fetches feed items through RSS feeds. Almost every website in the world provides an RSS feed. Here's how to find it:</p>
50
+ <p>Option 1: Add /feed to the website's homepage URL </p>
51
+ <p>Many sites have their RSS feed at the same URL. For instance, if the website's URL is www.thiswebsite.com, then the RSS feed could be at www.thiswebsite.com/feed.</p>
52
+ <p>Option 2: Look for the RSS share icon</p>
53
+ <p>Many websites have share icons on their pages for Facebook, Twitter and more. Many times, there will also be an orange RSS icon. Click on that to access the RSS feed URL.</p>
54
+ <p>Option 3: Browser RSS Auto-Discovery</p>
55
+ <p>Most browsers either include an RSS auto-discovery tool by default or they allow you to add extensions for it. Firefox shows an RSS icon above the website, in the address bar, which you can click on directly. Chrome offers extensions such as this one.</p>
56
+ <p>Option 4: Look at the Page Source</p>
57
+ <p>When on any page of the website you're looking to import feed items from, right click and press "View Page Source". Once the new window opens, use the “Find” feature (Ctrl-F on PC, Command-F on Mac) and search for " RSS". This should take you to a line that reads like this (or similar):</p>
58
+ <p>
59
+ <code>
60
+ &#x3C;link rel=&#x22;alternate&#x22; type=&#x22;application/rss+xml&#x22; title=&#x22;RSS Feed&#x22; href=&#x22;https://www.sourcedomain.com/feed/&#x22; /&#x3E;
61
+ </code>
62
+ </p>
63
+ <p>The RSS feed’s URL is found between the quotes after href=. In the above case, it would be https://www.sourcedomain.com/feed/.</p>
64
+ <p><a :href="knowledgeBaseUrl" target="_blank">Browse our Knowledge Base for more information.</a></p>
65
+ </expander>
66
+ </div>
67
+
68
+ <div class="wizard_content" :key="activeScreen" v-if="active('feedItems')">
69
+ <div class="wizard_hello">
70
+ Latest feed items from your selected feed source:
71
+ </div>
72
+
73
+ <div class="wpra-feed-items">
74
+ <div class="wpra-feed-item" v-for="item of feed.items">
75
+ <div class="wpra-feed-item__link">
76
+ <a :href="item.permalink" target="_blank">{{ item.title }}</a>
77
+ </div>
78
+ <div class="wpra-feed-item__info">
79
+ <template v-if="item.date || item.author">
80
+ <template v-if="item.date">
81
+ Published on {{ item.date }}
82
+ </template>
83
+ <template v-if="item.date && item.author">|</template>
84
+ <template v-if="item.author">
85
+ By {{ item.author }}
86
+ </template>
87
+ </template>
88
+ </div>
89
+ </div>
90
+ </div>
91
+
92
+ <div class="wrpa-shortcode">
93
+ <div class="wrpa-shortcode-preview">
94
+ <div class="wrpa-shortcode-label">
95
+ Create a draft page to preview these feed items on your site:
96
+ </div>
97
+ <a :href="previewUrl" target="_blank" class="button"
98
+ @click="preparePreview"
99
+ :class="{'button-primary': isPrepared, 'loading-button': isPreparing}"
100
+ >
101
+ {{ isPrepared ? 'Preview the Page' : 'Create Draft Page' }}
102
+ </a>
103
+ </div>
104
+ <div class="wrpa-shortcode-form" @click="copyToClipboard()">
105
+ <div class="wrpa-shortcode-label">
106
+ Copy the shortcode to any page or post on your site:
107
+ </div>
108
+ <input class="wrpa-shortcode-form__shortcode"
109
+ type="text"
110
+ readonly
111
+ value="[wp-rss-aggregator]"
112
+ ref="selected"
113
+ />
114
+ <div class="wrpa-shortcode-form__button">
115
+ {{ isCopied ? 'Copied!' : 'Click to copy' }}
116
+ </div>
117
+ </div>
118
+ </div>
119
+ </div>
120
+
121
+ <div class="wizard_content" :key="activeScreen" v-if="active('finish')">
122
+ <div class="wizard_hello">
123
+ You’ve successfully set up your first feed source 😄
124
+ </div>
125
+
126
+ <div class="wpra-cols-title">
127
+ Do more with WP RSS Aggregator - here is what we did at CryptoHeadlines.com.
128
+ </div>
129
+
130
+ <div class="wpra-cols">
131
+ <div class="col">
132
+ <p>CryptoHeadlines.com displays latest news, Youtube videos, podcasts, jobs and more from the Cryptocurrency industry.</p>
133
+ <p>It uses Feed to Post to import articles, Youtube videos, and podcast links.</p>
134
+ <p>Full Text RSS Feeds is used to fetch the full content of the job listings to present more information to the potential applicant.</p>
135
+ <p>Keyword Filtering is used to filter out content that contains profanity and keywords or phrases deemed as inappropriate.</p>
136
+ <div style="margin-bottom: .5rem">
137
+ <a :href="addOnsUrl" class="button" target="_blank">
138
+ Browse Add-ons ⭐️
139
+ </a>
140
+ </div>
141
+ <div>
142
+ <a :href="supportUrl" target="_blank" style="font-size: .9em">Contact support for more information.</a>
143
+ </div>
144
+ </div>
145
+ <div class="col">
146
+ <img :src="demoImageUrl"
147
+ class="img wpra-demo-photo">
148
+
149
+ <div class="wpra-feedback">
150
+ <!--<div class="wpra-feedback__photo">-->
151
+ <!--<img src="https://www.wprssaggregator.com/wp-content/themes/wp_rss_theme/assets/images/review2.jpg">-->
152
+ <!--</div>-->
153
+ <div class="wpra-feedback__copy">
154
+ <div class="wpra-feedback__text">
155
+ This plugin has made my life a lot easier, and the support has been great as well.
156
+ </div>
157
+ <div class="wpra-feedback__rating">
158
+ <span class="dashicons dashicons-star-filled"></span>
159
+ <span class="dashicons dashicons-star-filled"></span>
160
+ <span class="dashicons dashicons-star-filled"></span>
161
+ <span class="dashicons dashicons-star-filled"></span>
162
+ <span class="dashicons dashicons-star-filled"></span>
163
+ </div>
164
+ <div class="wpra-feedback__by">
165
+ <a :href="feedbackUrl" target="_blank">
166
+ Review by officeinnovator
167
+ </a>
168
+ </div>
169
+ </div>
170
+ </div>
171
+ </div>
172
+ </div>
173
+ </div>
174
+ </transition>
175
+
176
+ <div class="connect-actions pad">
177
+ <div class="pad-item--grow">
178
+ <button v-if="!active('finish')"
179
+ class="button-clear"
180
+ @click="finish"
181
+ >
182
+ Skip the introduction
183
+ </button>
184
+ </div>
185
+ <div class="pad-item--no-shrink">
186
+ <button class="button-clear"
187
+ @click="back"
188
+ v-if="isBackAvailable"
189
+ >
190
+ Back
191
+ </button>
192
+ <button @click="next"
193
+ class="button button-primary button-large"
194
+ :class="{'loading-button': isLoading}"
195
+ >
196
+ {{ active('finish') ? 'Continue to Plugin' : 'Next' }}
197
+ </button>
198
+ </div>
199
+ </div>
200
+ </div>
201
+ </div>
202
+ </template>
203
+
204
+ <script>
205
+ import Expander from 'app/components/Expander'
206
+ import { post } from 'app/utils/fetch'
207
+ import { copyToClipboard } from 'app/utils/copy'
208
+
209
+ const _ = (str) => str
210
+
211
+ const CONFIG = window.wprssWizardConfig
212
+
213
+ export default {
214
+ data () {
215
+ return {
216
+ prevHeight: 0,
217
+ screens: [{
218
+ id: 'feed',
219
+ title: _('Add feed source URL'),
220
+ description: false,
221
+ next: this.submitFeed,
222
+ completed: () => {
223
+ return this.feed.items.length
224
+ },
225
+ entered: () => {
226
+ this.focusOnInput('feed')
227
+ }
228
+ }, {
229
+ id: 'feedItems',
230
+ title: _('Display feed items'),
231
+ description: false,
232
+ next: this.continueItems,
233
+ completed: () => {
234
+ return this.feed.items.length && this.itemsPassed
235
+ }
236
+ }, {
237
+ id: 'finish',
238
+ title: _('Complete introduction'),
239
+ description: false,
240
+ next: this.completeIntroduction,
241
+ completed: () => {
242
+ return this.feed.items.length && this.itemsPassed
243
+ }
244
+ }],
245
+ isCopied: false,
246
+
247
+ isPreparing: false,
248
+ isPrepared: false,
249
+
250
+ transition: 'slide-up', // 'slide-down',
251
+
252
+ activeScreen: 'feed',
253
+ form: {
254
+ feedSourceUrl: null,
255
+ },
256
+ itemsPassed: false,
257
+
258
+ stepLoading: false,
259
+ isLoading: false,
260
+
261
+ isFeedError: false,
262
+
263
+ feed: {
264
+ items: [],
265
+ },
266
+ previewUrl: CONFIG.previewUrl,
267
+ addOnsUrl: CONFIG.addOnsUrl,
268
+ supportUrl: CONFIG.supportUrl,
269
+ demoImageUrl: CONFIG.demoImageUrl,
270
+ feedbackUrl: CONFIG.feedbackUrl,
271
+ knowledgeBaseUrl: CONFIG.knowledgeBaseUrl,
272
+ }
273
+ },
274
+ computed: {
275
+ validateLink () {
276
+ return 'https://validator.w3.org/feed/check.cgi?url=' + encodeURI(this.form.feedSourceUrl)
277
+ },
278
+
279
+ activeScreenIndex () {
280
+ return this.screens.findIndex(screen => screen.id === this.activeScreen)
281
+ },
282
+ currentScreen () {
283
+ return this.screens.find(screen => screen.id === this.activeScreen)
284
+ },
285
+ actionCompleted () {
286
+ return this.currentScreen.completed()
287
+ },
288
+ isBackAvailable () {
289
+ return this.activeScreenIndex > 0 && this.activeScreenIndex < this.screens.length
290
+ },
291
+ },
292
+ mounted () {
293
+ this.onScreenEnter()
294
+ },
295
+ methods: {
296
+ preparePreview (e) {
297
+ if (this.isPreparing) {
298
+ e.preventDefault()
299
+ return
300
+ }
301
+ if (!this.isPrepared) {
302
+ e.preventDefault()
303
+ this.isPreparing = true
304
+ fetch(this.previewUrl).then(() => {
305
+ this.isPreparing = false
306
+ this.isPrepared = true
307
+ })
308
+ }
309
+ },
310
+
311
+ /**
312
+ * Submits first feed step.
313
+ *
314
+ * @return {Promise<any>}
315
+ */
316
+ submitFeed () {
317
+ const data = Object.assign(CONFIG.feedEndpoint.defaultPayload, {
318
+ wprss_intro_feed_url: this.form.feedSourceUrl
319
+ })
320
+ this.isLoading = true
321
+ this.isFeedError = false
322
+ return post(CONFIG.feedEndpoint.url, data).then((responseData) => {
323
+ this.feed.items = responseData.data.feed_items.slice(0, 3)
324
+ this.isLoading = false
325
+ return {}
326
+ }).catch((resp) => {
327
+ this.isLoading = false
328
+ this.isFeedError = true
329
+ throw resp
330
+ })
331
+ },
332
+
333
+ /**
334
+ * Continue from items step.
335
+ *
336
+ * @return {Promise<any>}
337
+ */
338
+ continueItems () {
339
+ this.itemsPassed = true
340
+ return Promise.resolve({})
341
+ },
342
+
343
+ /**
344
+ * Complete the introduction and proceed to sources list.
345
+ *
346
+ * @return {Promise<any>}
347
+ */
348
+ completeIntroduction () {
349
+ return Promise.resolve({})
350
+ },
351
+
352
+ /**
353
+ * Go to the next screen in this wizard.
354
+ */
355
+ next () {
356
+ this.transition = 'slide-up'
357
+ const nextTransistor = this.currentScreen.next ? this.currentScreen.next : () => Promise.resolve(false)
358
+ this.stepLoading = true
359
+ nextTransistor().then(result => {
360
+ this.stepLoading = false
361
+ }, (err) => {
362
+ throw err
363
+ }).then(() => {
364
+ const nextStepIndex = this.activeScreenIndex + 1
365
+ if (nextStepIndex >= this.screens.length) {
366
+ this.finish()
367
+ }
368
+ else {
369
+ this.activeScreen = this.screens[nextStepIndex].id
370
+ this.onScreenEnter()
371
+ }
372
+ }).catch((err) => {
373
+ console.error(err)
374
+ })
375
+ },
376
+
377
+ /**
378
+ * Run on screen event.
379
+ */
380
+ onScreenEnter () {
381
+ this.$nextTick(() => {
382
+ if (this.currentScreen.entered) {
383
+ this.currentScreen.entered()
384
+ }
385
+ })
386
+ },
387
+
388
+ /**
389
+ * Focus on some ref input.
390
+ */
391
+ focusOnInput (refName) {
392
+ if (!this.$refs[refName] || !this.$refs[refName].focus) {
393
+ return false
394
+ }
395
+ this.$refs[refName].focus()
396
+ },
397
+
398
+ /**
399
+ * Go back in the wizard on one step.
400
+ */
401
+ back () {
402
+ this.transition = 'slide-down'
403
+ this.activeScreen = this.screens[this.activeScreenIndex - 1].id
404
+ },
405
+
406
+ /**
407
+ * Finish this wizard.
408
+ */
409
+ finish (confirmFinish = false) {
410
+ const visitList = () => window.location.href = CONFIG.feedListUrl
411
+ if (confirmFinish) {
412
+ if (confirm('Are you sure you want to skip the introduction?')) {
413
+ visitList()
414
+ }
415
+ return
416
+ }
417
+ visitList()
418
+ // redirect to the URL.
419
+ },
420
+
421
+ active (pageName) {
422
+ return this.activeScreen === pageName
423
+ },
424
+
425
+ copyToClipboard () {
426
+ if (this.isCopied) {
427
+ return
428
+ }
429
+ copyToClipboard('[wp-rss-aggregator]')
430
+ this.isCopied = true
431
+ setTimeout(() => {
432
+ this.isCopied = false
433
+ }, 1000)
434
+ }
435
+ },
436
+ components: {
437
+ Expander
438
+ }
439
+ }
440
+ </script>
js/src/modules/intro/index.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ require('css/src/intro/steps.scss')
2
+
3
+ import Vue from 'vue'
4
+ import Wizard from './Wizard'
5
+ import 'whatwg-fetch'
6
+
7
+ new Vue({
8
+ el: '#wpra-wizard-app',
9
+ template: '<Wizard/>',
10
+ components: { Wizard }
11
+ })
js/src/modules/pagination/index.js ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ require('css/src/pagination/index.scss')
2
+
3
+ jQuery(document).ready(($) => {
4
+ const fetchList = function ($targetEl, params) {
5
+ $targetEl.addClass('wpra-loading')
6
+
7
+ $([document.documentElement, document.body]).animate({
8
+ scrollTop: $targetEl.offset().top - 50
9
+ }, 500);
10
+
11
+ const template = params.template
12
+ delete params.template
13
+
14
+ let url = WpraPagination.baseUri.replace('%s', template)
15
+
16
+ $.ajax({
17
+ type: 'POST',
18
+ url,
19
+ data: JSON.stringify(params),
20
+ contentType: 'application/json',
21
+ }).done((data) => {
22
+ $targetEl.replaceWith(data.html)
23
+ })
24
+ }
25
+
26
+ const handleClick = function ($link) {
27
+ const $targetEl = $link.closest('[data-template-ctx]')
28
+
29
+ const template = $targetEl.data('wpra-template')
30
+ const templateOptions = $targetEl.data('template-ctx')
31
+
32
+ let options = Object.assign({}, {
33
+ template
34
+ }, JSON.parse(atob(templateOptions)))
35
+ options['page'] = $link.data('wpra-page')
36
+
37
+ fetchList($targetEl, options)
38
+ }
39
+
40
+ $('body').on('click', 'a[data-wpra-page]', function (e) {
41
+ e.preventDefault()
42
+ handleClick($(this))
43
+ });
44
+ })
js/src/modules/plugins/PluginDisablePoll.vue ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <template>
2
+ <div class="wpra-plugin-disable-poll">
3
+ <modal :active="isModalVisible"
4
+ @close="closeModal"
5
+ :header-class="'invisible-header'"
6
+ >
7
+ <div slot="header">
8
+ <div class="wpra-plugin-disable-poll__logo">
9
+ <img :src="image('light-line-logo.png')" alt="">
10
+ </div>
11
+ <h3>
12
+ Do you have a moment to share why you are deactivating WP RSS Aggregator?
13
+ </h3>
14
+ <p>
15
+ Your feedback will help us to improve our plugins and service.
16
+ </p>
17
+ </div>
18
+
19
+ <div slot="body">
20
+ <SerializedForm :form="form" v-model="model"/>
21
+ </div>
22
+
23
+ <div slot="footer">
24
+ <div class="footer-confirm__buttons">
25
+ <button class="button button-clear" @click="deactivate">
26
+ Skip & Deactivate
27
+ </button>
28
+ <button class="button button-primary"
29
+ :class="{'loading-button': isDeactivating}"
30
+ @click="submit">
31
+ Submit & Deactivate
32
+ </button>
33
+ </div>
34
+ </div>
35
+ </modal>
36
+ </div>
37
+ </template>
38
+
39
+ <script>
40
+ import Modal from 'app/components/Modal'
41
+ import SerializedForm from 'app/components/SerializedForm'
42
+ import axios from 'axios'
43
+
44
+ /**
45
+ * Selector string for plugin's deactivation link.
46
+ *
47
+ * @type {string}
48
+ */
49
+ const deactivateSelector = '[data-slug="wp-rss-aggregator"] .deactivate a'
50
+ const deactivateLink = document.querySelector(deactivateSelector)
51
+
52
+ export default {
53
+ components: {
54
+ Modal,
55
+ SerializedForm,
56
+ },
57
+ data () {
58
+ return {
59
+ isDeactivating: false,
60
+ deactivateUrl: null,
61
+ submitUrl: WrpaDisablePoll.url,
62
+ model: WrpaDisablePoll.model,
63
+ form: WrpaDisablePoll.form,
64
+ isModalVisible: false
65
+ }
66
+ },
67
+ watch: {
68
+ 'model.reason' () {
69
+ this.model.follow_up = null
70
+ }
71
+ },
72
+ mounted () {
73
+ deactivateLink.addEventListener('click', this.handleDeactivateClick)
74
+ },
75
+ methods: {
76
+ image (path) {
77
+ return WrpaDisablePoll.image + path
78
+ },
79
+
80
+ handleDeactivateClick (e) {
81
+ if (this.isModalVisible) {
82
+ return
83
+ }
84
+
85
+ e.preventDefault()
86
+ this.isModalVisible = true
87
+ },
88
+
89
+ closeModal () {
90
+ this.isModalVisible = false
91
+ this.deactivateUrl = null
92
+ },
93
+
94
+ submit () {
95
+ this.isDeactivating = true
96
+ axios.post(this.submitUrl, this.model, {
97
+ headers: {
98
+ 'Content-Type': 'application/x-www-form-urlencoded'
99
+ }
100
+ }).then(() => {
101
+ this.deactivate()
102
+ }).finally(() => {
103
+ this.isDeactivating = false
104
+ })
105
+ },
106
+
107
+ deactivate () {
108
+ deactivateLink.click()
109
+ }
110
+ }
111
+ }
112
+ </script>
js/src/modules/plugins/index.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ require('css/src/plugins/index.scss')
2
+
3
+ import Vue from 'vue'
4
+ import PluginDisablePoll from './PluginDisablePoll'
5
+
6
+ new Vue({
7
+ el: '#wpra-plugins-app',
8
+ template: '<PluginDisablePoll/>',
9
+ components: { PluginDisablePoll }
10
+ })
js/src/modules/settings/index.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import Vue from 'vue'
2
+ import NoticeBlock from 'app/components/NoticeBlock'
3
+
4
+ new Vue({
5
+ el: '#wpra-settings-app',
6
+ render (h) {
7
+ return h(NoticeBlock, {
8
+ props: WpraSettings.notice
9
+ })
10
+ }
11
+ })
js/src/modules/templates/Edit.js ADDED
@@ -0,0 +1,463 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import Postbox from 'app/components/Postbox'
2
+ import Main from 'app/components/Main'
3
+ import Sidebar from 'app/components/Sidebar'
4
+ import Layout from 'app/components/Layout'
5
+ import RouteLink from 'app/components/RouteLink'
6
+ import Input from 'app/components/Input'
7
+ import Button from 'app/components/Button'
8
+ import NoticeBlock from 'app/components/NoticeBlock'
9
+ import deepmerge from 'app/utils/deepmerge'
10
+ import DataChangesAware from 'app/mixins/DataChangesAware'
11
+ import jsonClone from 'app/utils/jsonClone'
12
+ import { copyToClipboard } from 'app/utils/copy'
13
+
14
+ export default {
15
+ mixins: [DataChangesAware],
16
+ data () {
17
+ return {
18
+ typeOptions: Object.keys(WpraTemplates.options.type)
19
+ .filter(key => key[0] !== '_')
20
+ .reduce((acc, key) => {
21
+ acc[key] = WpraTemplates.options.type[key]
22
+ return acc
23
+ }, {}),
24
+
25
+ model: jsonClone(WpraTemplates.model_schema),
26
+ validation: jsonClone(WpraTemplates.model_schema),
27
+ tooltips: jsonClone(WpraTemplates.model_tooltips),
28
+
29
+ baseUrl: WpraTemplates.base_url,
30
+ isSaving: false,
31
+ isLoading: false,
32
+ }
33
+ },
34
+ inject: [
35
+ 'hooks',
36
+ 'http',
37
+ 'router',
38
+ 'notification',
39
+ ],
40
+ mounted () {
41
+ this.resolveEditingItem()
42
+ },
43
+ computed: {
44
+ previewUrl () {
45
+ return `${WpraGlobal.admin_base_url}?wpra_preview_template=${this.router.params.id}`
46
+ }
47
+ },
48
+ methods: {
49
+ resolveEditingItem () {
50
+ let modelDefault = deepmerge(jsonClone(WpraTemplates.model_schema), this.$store.state.templates.preset)
51
+
52
+ this.isLoading = true
53
+ const loadItem = () => {
54
+ const id = this.router.params.id
55
+ if (!id) {
56
+ return Promise.resolve(null)
57
+ }
58
+ let item = this.$store.getters['templates/item'](id)
59
+ if (item) {
60
+ return Promise.resolve(item)
61
+ }
62
+ return this.http.get(`${this.baseUrl}/${id}`).then(response => {
63
+ return response.data
64
+ })
65
+ }
66
+
67
+ loadItem().then(item => {
68
+ this.isLoading = false
69
+ if (!item) {
70
+ this.$set(this, 'model', modelDefault)
71
+ this.rememberModel()
72
+ return
73
+ }
74
+ item = Object.assign({}, item)
75
+ this.model = deepmerge(this.model, item)
76
+ this.rememberModel()
77
+ })
78
+ },
79
+ save () {
80
+ const isNew = !this.model.id
81
+ this.isSaving = true
82
+ this.runRequest().then(response => {
83
+ this.model = deepmerge(this.model, response.data)
84
+ this.rememberModel()
85
+
86
+ this.notification.show('Template saved!', {
87
+ type: 'success',
88
+ icon (el) {
89
+ el.classList.add('dashicons', 'dashicons-yes')
90
+ return el
91
+ },
92
+ })
93
+
94
+ if (!isNew) {
95
+ return
96
+ }
97
+ this.router.navigate({
98
+ name: 'templates',
99
+ params: {
100
+ action: 'edit',
101
+ id: response.data.id
102
+ }
103
+ })
104
+ }, response => {
105
+ this.notification.show('Something went wrong. Template is not saved!', {
106
+ type: 'error',
107
+ icon (el) {
108
+ el.classList.add('dashicons', 'dashicons-warning')
109
+ return el
110
+ },
111
+ })
112
+ }).finally(() => {
113
+ this.isSaving = false
114
+ })
115
+ },
116
+ runRequest () {
117
+ const method = this.model.id ? 'put' : 'post'
118
+ const url = this.model.id ? `${this.baseUrl}/${this.model.id}` : this.baseUrl
119
+ return this.http[method](url, this.prepareModel())
120
+ },
121
+ prepareModel () {
122
+ const availableKeys = Object.keys(WpraTemplates.model_schema)
123
+
124
+ return Object.keys(this.model)
125
+ .filter(key => {
126
+ /*
127
+ * Only keys from model_schema can be saved.
128
+ */
129
+ if (!availableKeys.includes(key)) {
130
+ return false
131
+ }
132
+
133
+ /*
134
+ * Name and type shouldn't be passed for default template.
135
+ */
136
+ if (this.model.type === '__built_in' && ['name', 'type'].includes(key)) {
137
+ return false
138
+ }
139
+
140
+ /*
141
+ * Slug and ID fields are always ignored and not sent in the request body.
142
+ */
143
+ return !['slug', 'id'].includes(key)
144
+ })
145
+ .reduce((acc, key) => {
146
+ acc[key] = this.model[key]
147
+ return acc
148
+ }, {})
149
+ },
150
+ getShortcode () {
151
+ return `[wp-rss-aggregator template="${this.model.slug}"]`
152
+ },
153
+ preventLoosingNotSavedData () {
154
+ return !this.isChanged() || confirm('You have unsaved changes. All changes will be lost if you go back to the Template list before updating. Are you sure you want to continue?')
155
+ },
156
+ copyShortcode (e) {
157
+ copyToClipboard(this.getShortcode())
158
+
159
+ const text = e.target.innerText
160
+
161
+ e.target.style.width = e.target.getBoundingClientRect().width + 'px'
162
+ e.target.disabled = true
163
+ e.target.innerText = 'Copied!'
164
+
165
+ setTimeout(() => {
166
+ e.target.style.width = null
167
+ e.target.innerText = text
168
+ e.target.disabled = false
169
+ }, 5000)
170
+ },
171
+ },
172
+ render () {
173
+ let back = {
174
+ name: 'templates'
175
+ }
176
+
177
+ let minorActions = null,
178
+ shortcode = null,
179
+ noticeBlock = <NoticeBlock
180
+ class={'postbox'}
181
+ id={'templates-usage'}
182
+ title={'Setting up your Templates'}
183
+ body={'Templates are used to display the items imported using WP RSS Aggregator. Choose the preferred options ' +
184
+ 'below and use them anywhere on your site via our <a href="https://kb.wprssaggregator.com/article/54-displaying-imported-items-shortcode#tinymce" target="_blank">shortcode</a> ' +
185
+ 'or our <a href="https://kb.wprssaggregator.com/article/454-displaying-imported-items-block-gutenberg" target="_blank">block</a>. ' +
186
+ '<br/><br/>' +
187
+ 'More template types and options will be made available soon. Have you got a template idea in mind? <a href="https://www.wprssaggregator.com/request-a-template/" target="_blank">Share it with us.</a>'}
188
+ learnMore={'https://kb.wprssaggregator.com/article/457-templates'}
189
+ />
190
+
191
+ if (this.router.params.id) {
192
+ minorActions = <div id="" style={{padding: '6px 0'}}>
193
+ <div class="misc-pub-section misc-pub-visibility">
194
+ <a href={this.previewUrl}
195
+ class="wpra-preview-link"
196
+ role="button"
197
+ target="wpra-preview-template"
198
+ style={{marginLeft: '4px', textDecoration: 'none'}}
199
+ >
200
+ Open preview
201
+ <span class="dashicons dashicons-external"/>
202
+ </a>
203
+ </div>
204
+ </div>
205
+ }
206
+
207
+ if (this.model.id) {
208
+ shortcode = <div class="wpra-shortcode-copy" title={'Copy chortcode'}>
209
+ <div class="wpra-shortcode-copy__content">
210
+ <strong>Shortcode: </strong>
211
+ <code>{ this.getShortcode() }</code>
212
+ </div>
213
+ <div class="wpra-shortcode-copy__icon">
214
+ <button class="button" onClick={this.copyShortcode}>Copy Shortcode</button>
215
+ </div>
216
+ </div>
217
+ }
218
+
219
+ let content = <div>
220
+ <div class="page-title">
221
+ <RouteLink class="back-button" path={back} gate={this.preventLoosingNotSavedData}>
222
+ <span class="dashicons dashicons-arrow-left-alt"></span>
223
+ Templates
224
+ </RouteLink>
225
+ <h1 class="wp-heading-inline">
226
+ {this.router.params.id ? (this.changes.model.name || this.changes.model.slug) : 'Create a New Template'}
227
+ </h1>
228
+ {shortcode}
229
+ </div>
230
+ <div id="poststuff">
231
+ {
232
+ this.isLoading ? <div class="loading-container"/> : <Layout class="metabox-holder columns-2">
233
+ <Main>
234
+ {noticeBlock}
235
+ <Postbox id="template-details" title="Template Details">
236
+ <Input type="text"
237
+ label={'Template name'}
238
+ value={this.model.name}
239
+ onInput={(e) => this.model.name = e}
240
+ disabled={this.model.type === '__built_in'}
241
+ />
242
+ <Input type="select"
243
+ label={'Template type'}
244
+ value={this.model.type}
245
+ options={this.typeOptions}
246
+ onInput={(e) => this.model.type = e}
247
+ disabled={this.model.type === '__built_in'}
248
+ inputDisabled={true}
249
+ description={'<div class="disable-ignored"><strong class="disable-ignored">🎉 More template types coming soon!</strong> Have you got a template idea in mind? <a target="_blank" href="https://www.wprssaggregator.com/request-a-template/" class="disable-ignored">Share it with us.</a></div>'}
250
+ />
251
+ {
252
+ (this.model.type === '__built_in') ?
253
+ <div class="wpra-info-box">
254
+ <div class="wpra-info-box__icon">
255
+ <span class="dashicons dashicons-info"/>
256
+ </div>
257
+ <div class="wpra-info-box__text">
258
+ This is the default template for WP RSS Aggregator. It is used as the fallback template when one is not selected via the shortcode or block. To create a new one, please go back to the Templates List.
259
+ </div>
260
+ </div>
261
+ :
262
+ null
263
+ }
264
+ </Postbox>
265
+ <Postbox id="template-options" title="Template Options">
266
+ <Input type="checkbox"
267
+ label={'Link title to original article'}
268
+ value={this.model.options.title_is_link}
269
+ onInput={(e) => this.model.options.title_is_link = e}
270
+ title={this.tooltips.options.title_is_link}
271
+ />
272
+ <Input type="number"
273
+ label={'Title maximum length'}
274
+ value={this.model.options.title_max_length || ''}
275
+ placeholder={'No limit'}
276
+ onInput={(e) => this.model.options.title_max_length = e}
277
+ title={this.tooltips.options.title_max_length}
278
+ />
279
+ <Input type="number"
280
+ label={'Number of items to show'}
281
+ value={this.model.options.limit || ''}
282
+ onInput={(e) => this.model.options.limit = e}
283
+ title={this.tooltips.options.limit}
284
+ />
285
+
286
+ <Input type="checkbox"
287
+ label={'Show publish date'}
288
+ value={this.model.options.date_enabled}
289
+ onInput={(e) => this.model.options.date_enabled = e}
290
+ style={{paddingTop: '20px', fontWeight: 'bold'}}
291
+ title={this.tooltips.options.date_enabled}
292
+ />
293
+ <Input type="text"
294
+ label={'Date prefix'}
295
+ value={this.model.options.date_prefix}
296
+ onInput={(e) => this.model.options.date_prefix = e}
297
+ disabled={!this.model.options.date_enabled}
298
+ title={this.tooltips.options.date_prefix}
299
+ />
300
+ <Input type="text"
301
+ label={'Date format'}
302
+ value={this.model.options.date_format}
303
+ onInput={(e) => this.model.options.date_format = e}
304
+ disabled={this.model.options.date_use_time_ago || !this.model.options.date_enabled}
305
+ title={this.tooltips.options.date_format}
306
+ />
307
+ <Input type="checkbox"
308
+ label={'Use "time ago" format'}
309
+ description={'Example: 20 minutes ago'}
310
+ value={this.model.options.date_use_time_ago}
311
+ onInput={(e) => this.model.options.date_use_time_ago = e}
312
+ disabled={!this.model.options.date_enabled}
313
+ title={this.tooltips.options.date_use_time_ago}
314
+ />
315
+
316
+ <Input type="checkbox"
317
+ label={'Show source name'}
318
+ value={this.model.options.source_enabled}
319
+ onInput={(e) => this.model.options.source_enabled = e}
320
+ style={{paddingTop: '20px', fontWeight: 'bold'}}
321
+ title={this.tooltips.options.source_enabled}
322
+ />
323
+ <Input type="text"
324
+ label={'Source prefix'}
325
+ value={this.model.options.source_prefix}
326
+ onInput={(e) => this.model.options.source_prefix = e}
327
+ disabled={!this.model.options.source_enabled}
328
+ title={this.tooltips.options.source_prefix}
329
+ />
330
+ <Input type="checkbox"
331
+ label={'Link source name'}
332
+ value={this.model.options.source_is_link}
333
+ onInput={(e) => this.model.options.source_is_link = e}
334
+ disabled={!this.model.options.source_enabled}
335
+ title={this.tooltips.options.source_is_link}
336
+ />
337
+
338
+ <Input type="checkbox"
339
+ label={'Show author name'}
340
+ value={this.model.options.author_enabled}
341
+ onInput={(e) => this.model.options.author_enabled = e}
342
+ style={{paddingTop: '20px', fontWeight: 'bold'}}
343
+ title={this.tooltips.options.author_enabled}
344
+ />
345
+ <Input type="text"
346
+ label={'Author prefix'}
347
+ value={this.model.options.author_prefix}
348
+ onInput={(e) => this.model.options.author_prefix = e}
349
+ disabled={!this.model.options.author_enabled}
350
+ title={this.tooltips.options.author_prefix}
351
+ />
352
+
353
+ <Input type="checkbox"
354
+ label={'Pagination'}
355
+ value={this.model.options.pagination}
356
+ onInput={(e) => this.model.options.pagination = e}
357
+ style={{paddingTop: '20px', fontWeight: 'bold'}}
358
+ title={this.tooltips.options.pagination}
359
+ />
360
+ <Input type="select"
361
+ label={'Pagination style'}
362
+ options={WpraTemplates.options.pagination_type}
363
+ value={this.model.options.pagination_type}
364
+ onInput={(e) => this.model.options.pagination_type = e}
365
+ disabled={!this.model.options.pagination}
366
+ title={this.tooltips.options.pagination_type}
367
+ />
368
+
369
+ <Input type="checkbox"
370
+ label={'Show bullets'}
371
+ value={this.model.options.bullets_enabled}
372
+ onInput={(e) => this.model.options.bullets_enabled = e}
373
+ style={{paddingTop: '20px', fontWeight: 'bold'}}
374
+ title={this.tooltips.options.bullets_enabled}
375
+ />
376
+ <Input type="select"
377
+ label={'Bullet style'}
378
+ options={WpraTemplates.options.bullet_type}
379
+ value={this.model.options.bullet_type}
380
+ onInput={(e) => this.model.options.bullet_type = e}
381
+ disabled={!this.model.options.bullets_enabled}
382
+ title={this.tooltips.options.bullet_type}
383
+ />
384
+ </Postbox>
385
+ </Main>
386
+ <Sidebar>
387
+ <Postbox id="template-create"
388
+ title={this.model.id ? 'Update Template' : 'Create Template'}
389
+ submit={true}
390
+ class={'wpra-postbox-last'}
391
+ >
392
+ <div class="submitbox" id="submitpost">
393
+ {minorActions}
394
+
395
+ <div id="major-publishing-actions">
396
+ <div id="delete-action">
397
+ {
398
+ this.isChanged() ? <a href="#" class="submitdelete" onClick={(e) => {
399
+ e.preventDefault()
400
+ this.cancelChanges()
401
+ }}>
402
+ Cancel Changes
403
+ </a> : null
404
+ }
405
+ </div>
406
+
407
+ <div id="publishing-action">
408
+ <Button class="button-primary button-large"
409
+ loading={this.isSaving}
410
+ nativeOnClick={this.save}
411
+ >
412
+ {this.model.id ? 'Save' : 'Publish'}
413
+ </Button>
414
+ </div>
415
+ <div class="clear"></div>
416
+ </div>
417
+ </div>
418
+ </Postbox>
419
+ <Postbox id="template-link-preferences" title="Link Preferences">
420
+ <p style={{opacity: .65}}>
421
+ These options apply to all links within this template.
422
+ </p>
423
+ <Input type="checkbox"
424
+ label={'Set links as nofollow'}
425
+ value={this.model.options.links_nofollow}
426
+ onInput={(e) => this.model.options.links_nofollow = e}
427
+ title={this.tooltips.options.links_nofollow}
428
+ />
429
+ <Input type="select"
430
+ label={'Open links behaviour'}
431
+ class="form-input--vertical"
432
+ value={this.model.options.links_behavior}
433
+ options={WpraTemplates.options.links_behavior}
434
+ onInput={(e) => this.model.options.links_behavior = e}
435
+ title={this.tooltips.options.links_behavior}
436
+ />
437
+ <Input type="select"
438
+ label={'Video embed link type'}
439
+ description={'This will not affect already imported feed items.'}
440
+ class="form-input--vertical"
441
+ value={this.model.options.links_video_embed_page}
442
+ options={WpraTemplates.options.links_video_embed_page}
443
+ onInput={(e) => this.model.options.links_video_embed_page = e}
444
+ title={this.tooltips.options.links_video_embed_page}
445
+ />
446
+ </Postbox>
447
+ <Postbox id="template-custom-css" title="Custom Style">
448
+ <Input type="text"
449
+ class="form-input--vertical"
450
+ label={'Custom CSS class name'}
451
+ value={this.model.options.custom_css_classname}
452
+ onInput={(e) => this.model.options.custom_css_classname = e}
453
+ title={this.tooltips.options.custom_css_classname}
454
+ />
455
+ </Postbox>
456
+ </Sidebar>
457
+ </Layout>
458
+ }
459
+ </div>
460
+ </div>
461
+ return this.hooks.apply('wpra-templates-form', this, content)
462
+ }
463
+ }
js/src/modules/templates/List.js ADDED
@@ -0,0 +1,351 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import VueTable from '@rebelcode/vue-wp-list-table/dist/vue-wp-list-table.common'
2
+ import RouteLink from 'app/components/RouteLink'
3
+ import Input from 'app/components/Input'
4
+ import BottomPanel from 'app/components/BottomPanel'
5
+ import jsonClone from 'app/utils/jsonClone'
6
+ import NoticeBlock from 'app/components/NoticeBlock'
7
+ import collect from 'app/utils/Collection'
8
+
9
+ export default {
10
+ data () {
11
+ return {
12
+ loading: false,
13
+
14
+ columns: {
15
+ name: {
16
+ label: ('Template Name'),
17
+ class: 'column-primary'
18
+ },
19
+ style: {
20
+ label: ('Template Type'),
21
+ },
22
+ previewTemplate: {
23
+ label: ('Preview')
24
+ }
25
+ },
26
+
27
+ filters: WpraTemplates.options.type,
28
+
29
+ checked: [],
30
+
31
+ filter: {
32
+ paged: parseInt(this.router.params.paged || 1),
33
+ type: this.router.params.type || '',
34
+ s: this.router.params.s || '',
35
+ },
36
+
37
+ baseUrl: WpraTemplates.base_url,
38
+
39
+ total: 0,
40
+ }
41
+ },
42
+ inject: [
43
+ 'hooks',
44
+ 'http',
45
+ 'router',
46
+ ],
47
+ computed: {
48
+ totalPages () {
49
+ return Math.ceil(this.total / 20)
50
+ },
51
+ list: {
52
+ get () {
53
+ return this.$store.state.templates.items
54
+ },
55
+ set (value) {
56
+ this.$store.commit('templates/set', value)
57
+ },
58
+ }
59
+ },
60
+ methods: {
61
+ navigated () {
62
+ Object.keys(this.filter).forEach(key => {
63
+ this.filter[key] = this.router.params[key] || ''
64
+ })
65
+ this.filter.paged = parseInt(this.filter.paged || 1)
66
+ this.fetchList()
67
+ },
68
+
69
+ fetchList () {
70
+ this.loading = true
71
+
72
+ let params = this.getParams()
73
+
74
+ let paged = parseInt(params.paged)
75
+ delete params.paged
76
+ if (!!paged && paged !== 1) {
77
+ params['page'] = paged
78
+ }
79
+
80
+ return this.http.get(this.baseUrl, {
81
+ params
82
+ }).then((response) => {
83
+ this.list = response.data.items
84
+ this.total = response.data.count
85
+ }).finally(() => {
86
+ this.loading = false
87
+ })
88
+ },
89
+
90
+ deleteTemplate (id) {
91
+ if (!confirm('Are you sure you want to delete this template? If this template is being used in a shortcode or Gutenberg block anywhere on your site, the default template will be used instead.')) {
92
+ return
93
+ }
94
+ this.loading = true
95
+ return this.http.delete(`${this.baseUrl}/${id}`).then(() => {
96
+ return this.fetchList()
97
+ }).then(() => {
98
+ this.loading = false
99
+ })
100
+ },
101
+
102
+ bulkDelete () {
103
+ if (!confirm('Are you sure you want to delete these templates? If a template is being used in a shortcode or Gutenberg block anywhere on your site, the default template will be used instead.')) {
104
+ return
105
+ }
106
+ this.loading = true
107
+ return this.http.delete(this.baseUrl, {
108
+ params: {
109
+ ids: this.checked
110
+ }
111
+ }).then(() => {
112
+ this.checked = []
113
+ this.$refs.table.checkedItems = []
114
+ return this.fetchList()
115
+ }).then(() => {
116
+ this.loading = false
117
+ })
118
+ },
119
+
120
+ duplicateTemplate (row) {
121
+ let template = jsonClone(row)
122
+
123
+ delete template.id
124
+
125
+ if (template.type === '__built_in') {
126
+ delete template.type
127
+ }
128
+
129
+ // add copy to the title so it is mor obvious for the user that this is duplicate.
130
+ template.name = `${template.name} (Copy)`
131
+
132
+ this.$store.commit('templates/updatePreset', template)
133
+ this.router.navigate({
134
+ name: 'templates',
135
+ params: {
136
+ action: 'new',
137
+ }
138
+ })
139
+ },
140
+
141
+ getPreviewLink (row) {
142
+ return `${WpraGlobal.admin_base_url}?wpra_preview_template=${row.id}`
143
+ },
144
+
145
+ createTemplate () {
146
+ this.$store.commit('templates/updatePreset', {})
147
+ this.router.navigate({
148
+ name: 'templates',
149
+ params: {
150
+ action: 'new',
151
+ }
152
+ })
153
+ },
154
+
155
+ setChecked (values) {
156
+ this.checked = values.filter(id => {
157
+ return collect(this.list).find(id, {}).type !== '__built_in'
158
+ })
159
+ },
160
+
161
+ getParams () {
162
+ return Object.keys(this.filter).filter(key => {
163
+ return !!this.filter[key] && this.filter[key] !== 'all'
164
+ }).reduce((acc, key) => {
165
+ acc[key] = this.filter[key]
166
+ return acc
167
+ }, {})
168
+ },
169
+
170
+ setFilter (name, value) {
171
+ this.filter[name] = value
172
+ },
173
+
174
+ submitFilter () {
175
+ this.router.mergeParams(this.getParams())
176
+ },
177
+
178
+ getRowClass (row) {
179
+ return row.type === '__built_in' ? 'built-in' : ''
180
+ }
181
+ },
182
+ render () {
183
+ const editPath = (id) => {
184
+ return {
185
+ name: 'templates',
186
+ params: {
187
+ action: 'edit',
188
+ id,
189
+ }
190
+ }
191
+ }
192
+
193
+ let cells = this.hooks.apply('wpra-templates-list-cells', this, {
194
+ name: ({row}) => {
195
+ return [
196
+ <div>
197
+ <strong><RouteLink path={editPath(row.id)}>{row.name}</RouteLink></strong>
198
+ <small style={{paddingLeft: '4px', opacity: '0.6'}}>{row.slug}</small>
199
+ {
200
+ (row.type === '__built_in') ?
201
+ <span style={{opacity: '0.6', display: 'block'}}>
202
+ This is the default feed template. To create your own, either duplicate it or click "Add New" above.
203
+ </span>
204
+ :
205
+ null
206
+ }
207
+ </div>,
208
+ <div class="row-actions">
209
+ <span className="edit">
210
+ <RouteLink path={editPath(row.id)}>Edit</RouteLink> |
211
+ </span>
212
+ <span class="inline" style={{paddingLeft: '4px'}}>
213
+ <a href="#"
214
+ onClick={(e) => {
215
+ e.preventDefault()
216
+ this.duplicateTemplate(row)
217
+ }}
218
+ >Duplicate</a> {row.type !== '__built_in' ? '|' : ''}
219
+ </span>
220
+ {
221
+ (row.type !== '__built_in')
222
+ ?
223
+ <span class="trash" style={{paddingLeft: '4px'}} onClick={(e) => {
224
+ e.preventDefault()
225
+ this.deleteTemplate(row.id)
226
+ }}>
227
+ <a href="#" class="submitdelete" aria-label="Delete Item">Delete</a>
228
+ </span>
229
+ :
230
+ null
231
+ }
232
+ </div>
233
+ ]
234
+ },
235
+ style: ({row}) => {
236
+ return [
237
+ <div>{this.filters[row.type]}</div>
238
+ ]
239
+ },
240
+ previewTemplate: ({row}) => {
241
+ return [
242
+ <div>
243
+ <a href={this.getPreviewLink(row)}
244
+ target="wpra-preview-template"
245
+ class="wpra-preview-link"
246
+ >
247
+ Open preview <span class="dashicons dashicons-external"></span>
248
+ </a>
249
+ </div>
250
+ ]
251
+ },
252
+ filters: () => {
253
+ const templateTypes = {
254
+ 'all': 'Select Template Type',
255
+ 'list': 'List',
256
+ // 'grid': 'Grid',
257
+ }
258
+ return [
259
+ <Input type="select"
260
+ style={{margin: 0}}
261
+ options={templateTypes}
262
+ value={this.filter.type}
263
+ onInput={(value) => {
264
+ this.filter.type = value
265
+ this.submitFilter()
266
+ }}
267
+ />
268
+ ]
269
+ }
270
+ })
271
+
272
+ let content = <div>
273
+ <h1 class="wp-heading-inline">Templates</h1>
274
+ <a class="page-title-action"
275
+ href="#"
276
+ onClick={e => {
277
+ e.preventDefault()
278
+ this.createTemplate()
279
+ }}
280
+ >Add New</a>
281
+
282
+ <p class="search-box" style={{padding: '10px 0'}}>
283
+ <label class="screen-reader-text" for="post-search-input">Search Templates:</label>
284
+ <input type="search"
285
+ id="post-search-input"
286
+ name="s"
287
+ value={this.filter.s}
288
+ onInput={e => this.filter.s = e.target.value}
289
+ onKeyup:enter={this.submitFilter}
290
+ />
291
+ <input type="submit" id="search-submit" class="button" value="Search Templates"
292
+ onClick={this.submitFilter}
293
+ />
294
+ </p>
295
+
296
+ <NoticeBlock
297
+ id={'templates-introduction'}
298
+ title={'🎉 Welcome to Templates for WP RSS Aggregator!'}
299
+ body={'As of version 4.13, we have introduced the concept of templates to replace the display settings that were ' +
300
+ 'previously available in the WP RSS Aggregator settings. These templates provide you with much more ' +
301
+ 'flexibility and new designs. They also come with a revamped <a target="_blank" href="https://kb.wprssaggregator.com/article/54-displaying-imported-items-shortcode">TinyMCE shortcode button</a> for the Classic Editor and ' +
302
+ 'a <em><a href="https://kb.wprssaggregator.com/article/454-displaying-imported-items-block-gutenberg" target="_blank">brand new block</a></em> for those using WP 5.0+ with the Gutenberg block editor!<br/><br/>There are new template types coming ' +
303
+ 'your way in the coming weeks, but for now, the <em>list template type</em> replicates the previous options. ' +
304
+ 'Please note that the <em>Default</em> template below is set up using your pre-existing display options, nothing is lost or changed.'}
305
+ learnMore={'https://www.wprssaggregator.com/core-version-4-13-celebrating-one-million-downloads/'}
306
+ visible={!!WpraGlobal.is_existing_user}
307
+ />
308
+
309
+ <hr class="wp-header-end"/>
310
+
311
+ <VueTable
312
+ onChecked={this.setChecked}
313
+ onPagination={page => {
314
+ this.filter.paged = page
315
+ this.submitFilter()
316
+ }}
317
+ columns={this.columns}
318
+ rows={this.list}
319
+ loading={this.loading}
320
+ totalItems={this.total}
321
+ perPage={20}
322
+ totalPages={this.totalPages}
323
+ currentPage={this.filter.paged}
324
+ ref="table"
325
+ notFound="No templates found."
326
+ rowClass={this.getRowClass}
327
+ class={{
328
+ 'wpra-no-cb': this.list.length === 0 || (this.list.length === 1 && this.list[0].type === '__built_in')
329
+ }}
330
+ scopedSlots={
331
+ cells
332
+ }
333
+ />
334
+
335
+ {
336
+ this.checked.length ? <BottomPanel>
337
+ <div class="flex-row">
338
+ <div class="flex-col">
339
+ <div class="wpra-bottom-panel__title">Bulk Actions</div>
340
+ <a href="#" onClick={(e) => {
341
+ e.preventDefault()
342
+ this.bulkDelete()
343
+ }}>Delete</a>
344
+ </div>
345
+ </div>
346
+ </BottomPanel> : null
347
+ }
348
+ </div>
349
+ return this.hooks.apply('wpra-templates-list', this, content)
350
+ }
351
+ }
js/src/modules/templates/app.js ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import axios from 'axios'
2
+ import toasted from 'vue-toasted'
3
+ import VueTippy from 'vue-tippy'
4
+
5
+ import Vuex from 'vuex'
6
+ import List from './List'
7
+ import Edit from './Edit'
8
+
9
+ import makeRouterApp from 'app/components/RouterApp'
10
+ import Router from 'app/libs/Router'
11
+ import templates from './store'
12
+ import NotificationCenter from 'app/libs/NotificationCenter'
13
+
14
+ /**
15
+ * Main application's container.
16
+ */
17
+ export default {
18
+ register (services) {
19
+ /*
20
+ * Application router instance.
21
+ */
22
+ services['router'] = ({ document }) => {
23
+ return new Router([{
24
+ route: WpraGlobal.templates_url_base + '&action',
25
+ name: 'templates-form',
26
+ component: Edit,
27
+ }, {
28
+ route: WpraGlobal.templates_url_base,
29
+ name: 'templates',
30
+ component: List,
31
+ }], {
32
+ afterNavigating: () => {
33
+ document.querySelector('html').scrollTop = 0
34
+ }
35
+ })
36
+ }
37
+
38
+ /*
39
+ * Application with client side routes.
40
+ */
41
+ services['App'] = (container) => {
42
+ return makeRouterApp(container)
43
+ }
44
+
45
+ /*
46
+ * Setup and register central storage management.
47
+ */
48
+ services['vuex'] = ({ vue }) => {
49
+ vue.use(Vuex)
50
+ return Vuex
51
+ }
52
+
53
+ services['notification'] = ({ vue }) => {
54
+ vue.use(toasted, {
55
+ position: 'top-center',
56
+ duration: 4000,
57
+ iconPack: 'callback'
58
+ })
59
+ return new NotificationCenter(vue.toasted.show, vue.toasted.error)
60
+ }
61
+
62
+ services['store'] = ({ vuex }) => {
63
+ return new vuex.Store({
64
+ modules: {
65
+ templates
66
+ },
67
+ state: {}
68
+ })
69
+ }
70
+
71
+ services['http'] = () => {
72
+ /*
73
+ * Create authorized client for requests when nonce
74
+ * exists in global WPRA variable.
75
+ */
76
+ let httpClientOptions = !!WpraGlobal && !!WpraGlobal.nonce ? {
77
+ headers: {
78
+ 'X-WP-Nonce': WpraGlobal.nonce,
79
+ }
80
+ } : {}
81
+ return axios.create(httpClientOptions)
82
+ }
83
+
84
+ return services
85
+ },
86
+ run ({ container }) {
87
+ /*
88
+ * Enable tippy.js tooltips.
89
+ */
90
+ container.vue.use(VueTippy, {
91
+ theme: 'light',
92
+ animation: 'fade',
93
+ arrow: true,
94
+ arrowTransform: 'scale(0)',
95
+ placement: 'right'
96
+ })
97
+ },
98
+ }
js/src/modules/templates/index.js ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ require('css/src/templates/index.scss')
2
+
3
+ import * as UiFramework from '@rebelcode/ui-framework'
4
+ import Bottle from 'bottlejs'
5
+ import TemplatesApplication from './app'
6
+ import Vue from 'vue'
7
+
8
+ const { Container, Core, Services } = UiFramework
9
+
10
+ /*
11
+ * Extend UI framework object.
12
+ */
13
+ if (window.UiFramework) {
14
+ window.UiFramework = Object.assign({}, window.UiFramework, Core.UiFramework)
15
+ }
16
+
17
+ let services = {
18
+ uiFramework: UiFramework,
19
+ hooks: new Services.HookService,
20
+ document: document,
21
+ vue: function (container) {
22
+ Vue.use(container.uiFramework.Core.InjectedComponents, {
23
+ container
24
+ })
25
+ return Vue
26
+ }
27
+ }
28
+ const containerFactory = new Container.ContainerFactory(Bottle)
29
+ const app = new Core.UiFramework.App(containerFactory, services)
30
+
31
+ window.UiFramework.registerPlugin('templates-app', TemplatesApplication)
32
+
33
+ app.use([
34
+ 'templates-app',
35
+ // 'test-plugin'
36
+ ])
37
+ app.init({
38
+ '#wpra-templates-app': 'App',
39
+ })
js/src/modules/templates/store/actions.js ADDED
@@ -0,0 +1 @@
 
1
+ export default {}
js/src/modules/templates/store/getters.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ import collect from 'app/utils/Collection'
2
+
3
+ export default {
4
+ item: state => id => {
5
+ return collect(state.items).find(id)
6
+ }
7
+ }
js/src/modules/templates/store/index.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import mutations from './mutations'
2
+ import actions from './actions'
3
+ import state from './state'
4
+ import getters from './getters'
5
+
6
+ export default {
7
+ namespaced: true,
8
+ mutations,
9
+ actions,
10
+ state,
11
+ getters,
12
+ }
js/src/modules/templates/store/mutations.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ export default {
2
+ set (state, items = []) {
3
+ state.isInitialized = true
4
+ state.items = items
5
+ },
6
+
7
+ updatePreset (state, preset = null) {
8
+ state.preset = preset
9
+ }
10
+ }
js/src/modules/templates/store/state.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ export default {
2
+ /*
3
+ * Whether the templates was initialized.
4
+ *
5
+ * @todo: remove it. This is trick to not handle proper route params watcher.
6
+ */
7
+ isInitialized: false,
8
+
9
+ /*
10
+ * All loaded template items.
11
+ */
12
+ items: [],
13
+
14
+ /*
15
+ * Predefined template value. Used for items duplication.
16
+ */
17
+ preset: {},
18
+ }
js/src/plugins/PluginDisablePoll.vue DELETED
@@ -1,112 +0,0 @@
1
- <template>
2
- <div class="wpra-plugin-disable-poll">
3
- <modal :active="isModalVisible"
4
- @close="closeModal"
5
- :header-class="'invisible-header'"
6
- >
7
- <div slot="header">
8
- <div class="wpra-plugin-disable-poll__logo">
9
- <img :src="image('light-line-logo.png')" alt="">
10
- </div>
11
- <h3>
12
- Do you have a moment to share why you are deactivating WP RSS Aggregator?
13
- </h3>
14
- <p>
15
- Your feedback will help us to improve our plugins and service.
16
- </p>
17
- </div>
18
-
19
- <div slot="body">
20
- <SerializedForm :form="form" v-model="model"/>
21
- </div>
22
-
23
- <div slot="footer">
24
- <div class="footer-confirm__buttons">
25
- <button class="button button-clear" @click="deactivate">
26
- Skip & Deactivate
27
- </button>
28
- <button class="button button-primary"
29
- :class="{'loading-button': isDeactivating}"
30
- @click="submit">
31
- Submit & Deactivate
32
- </button>
33
- </div>
34
- </div>
35
- </modal>
36
- </div>
37
- </template>
38
-
39
- <script>
40
- import Modal from './Modal'
41
- import SerializedForm from './SerializedForm'
42
- import axios from 'axios'
43
-
44
- /**
45
- * Selector string for plugin's deactivation link.
46
- *
47
- * @type {string}
48
- */
49
- const deactivateSelector = '[data-slug="wp-rss-aggregator"] .deactivate a'
50
- const deactivateLink = document.querySelector(deactivateSelector)
51
-
52
- export default {
53
- components: {
54
- Modal,
55
- SerializedForm,
56
- },
57
- data () {
58
- return {
59
- isDeactivating: false,
60
- deactivateUrl: null,
61
- submitUrl: WrpaDisablePoll.url,
62
- model: WrpaDisablePoll.model,
63
- form: WrpaDisablePoll.form,
64
- isModalVisible: false
65
- }
66
- },
67
- watch: {
68
- 'model.reason' () {
69
- this.model.follow_up = null
70
- }
71
- },
72
- mounted () {
73
- deactivateLink.addEventListener('click', this.handleDeactivateClick)
74
- },
75
- methods: {
76
- image (path) {
77
- return WrpaDisablePoll.image + path
78
- },
79
-
80
- handleDeactivateClick (e) {
81
- if (this.isModalVisible) {
82
- return
83
- }
84
-
85
- e.preventDefault()
86
- this.isModalVisible = true
87
- },
88
-
89
- closeModal () {
90
- this.isModalVisible = false
91
- this.deactivateUrl = null
92
- },
93
-
94
- submit () {
95
- this.isDeactivating = true
96
- axios.post(this.submitUrl, this.model, {
97
- headers: {
98
- 'Content-Type': 'application/x-www-form-urlencoded'
99
- }
100
- }).then(() => {
101
- this.deactivate()
102
- }).finally(() => {
103
- this.isDeactivating = false
104
- })
105
- },
106
-
107
- deactivate () {
108
- deactivateLink.click()
109
- }
110
- }
111
- }
112
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/src/plugins/index.js DELETED
@@ -1,10 +0,0 @@
1
- require('./../../../css/src/plugins/index.scss')
2
-
3
- import Vue from 'vue'
4
- import PluginDisablePoll from './PluginDisablePoll'
5
-
6
- new Vue({
7
- el: '#wpra-plugins-app',
8
- template: '<PluginDisablePoll/>',
9
- components: { PluginDisablePoll }
10
- })
 
 
 
 
 
 
 
 
 
 
js/src/utils/Collection.js ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class Collection {
2
+ constructor (data, primaryField = 'id') {
3
+ this.data = data
4
+ this.primaryField = primaryField
5
+ return this
6
+ }
7
+
8
+ /**
9
+ * Find element by params
10
+ *
11
+ * @param params
12
+ * @param _default
13
+ * @returns {*}
14
+ */
15
+ find (params, _default = null) {
16
+ if (typeof params !== 'object' && params !== null) {
17
+ params = {
18
+ [this.primaryField]: params
19
+ }
20
+ }
21
+ for (let i in this.data) {
22
+ if (this._isMatching(this.data[i], params)) {
23
+ return this.data[i]
24
+ }
25
+ }
26
+
27
+ return _default
28
+ }
29
+
30
+ /**
31
+ * Get and left only one column
32
+ *
33
+ * @param field
34
+ * @returns {*}
35
+ */
36
+ pluck (field) {
37
+ return this.data.map((item) => {
38
+ return item[field]
39
+ })
40
+ }
41
+
42
+ /**
43
+ * Remove all elements matching given params
44
+ *
45
+ * @param params
46
+ */
47
+ remove (params) {
48
+ for (let i in this.data) {
49
+ if (this._isMatching(this.data[i], params)) {
50
+ this.data.splice(i, 1)
51
+ }
52
+ }
53
+ return this
54
+ }
55
+
56
+ /**
57
+ * Add data from parameter array that not in
58
+ * collection;
59
+ *
60
+ * @param data
61
+ */
62
+ appendDiff (data) {
63
+ for (let el of data) {
64
+ if (!this.contains(el)) {
65
+ this.data.push(el)
66
+ }
67
+ }
68
+ }
69
+
70
+ /**
71
+ * Add data from parameter array that not in
72
+ * collection;
73
+ *
74
+ * @param data
75
+ */
76
+ prependDiff (data) {
77
+ for (let el of data.slice().reverse()) {
78
+ if (!this.contains(el)) {
79
+ this.data.unshift(el)
80
+ }
81
+ }
82
+ }
83
+
84
+ contains (element) {
85
+ for (let el of this.data) {
86
+ if (el['id'] == element['id'])
87
+ return true
88
+ }
89
+ return false
90
+ }
91
+
92
+ filterValues (callback) {
93
+ return Object.keys(this.data).filter(key => {
94
+ return callback(this.data[key], key)
95
+ }).reduce((filteredResult, key) => {
96
+ filteredResult[key] = this.data[key]
97
+ return filteredResult
98
+ }, {})
99
+ }
100
+
101
+ filter (params) {
102
+ return this.data.filter((item) => {
103
+ return this._isMatching(item, params)
104
+ })
105
+ }
106
+
107
+ /**
108
+ * Select all items where value of column in given array
109
+ *
110
+ * @param data
111
+ * @param key
112
+ * @returns {Array}
113
+ */
114
+ whereIn (data, key = 'id') {
115
+ let newCollection = [],
116
+ param = {}
117
+
118
+ param[key] = null
119
+
120
+ for (let val of data) {
121
+ param[key] = val
122
+
123
+ let item = this.find(param)
124
+ if (item) {
125
+ newCollection.push(item)
126
+ }
127
+ }
128
+
129
+ return newCollection
130
+ }
131
+
132
+ key (field) {
133
+ const data = this.data.slice().reduce((obj, item) => {
134
+ obj[item[field]] = item
135
+ return obj
136
+ }, {})
137
+ return new Collection(data)
138
+ }
139
+
140
+ mapValues (callback) {
141
+ Object.keys(this.data).map((key) => {
142
+ this.data[key] = callback(this.data[key], key)
143
+ })
144
+ return this
145
+ }
146
+
147
+ values () {
148
+ return this.data
149
+ }
150
+
151
+ /**
152
+ * Check element is matching params.
153
+ *
154
+ * @param element
155
+ * @param params
156
+ * @return {boolean}
157
+ * @private
158
+ */
159
+ _isMatching (element, params) {
160
+ if (!(element instanceof Object) && !(params instanceof Object)) {
161
+ return element == params
162
+ }
163
+
164
+ let match = true
165
+ for (let key of Object.keys(params)) {
166
+ let keyMatch = element.hasOwnProperty(key) && (element[key] == params[key])
167
+ match = match && (keyMatch)
168
+ }
169
+ return match
170
+ }
171
+
172
+ }
173
+
174
+ function collect (data) {
175
+ return new Collection(data)
176
+ }
177
+
178
+ export default collect
js/src/utils/copy.js ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Helper functions to copy text to clipboard.
3
+ *
4
+ * @see https://stackoverflow.com/questions/400212/how-do-i-copy-to-the-clipboard-in-javascript
5
+ *
6
+ * @param text
7
+ */
8
+
9
+ const fallbackCopyToClipboard = function (text, scrollContainer = null) {
10
+ scrollContainer = scrollContainer || document.body.parentElement
11
+ var textArea = document.createElement('textarea')
12
+ textArea.value = text
13
+
14
+ var currentScrollTop = scrollContainer.scrollTop
15
+
16
+ document.body.appendChild(textArea)
17
+ textArea.focus()
18
+ textArea.select()
19
+
20
+ try {
21
+ var successful = document.execCommand('copy')
22
+ var msg = successful ? 'successful' : 'unsuccessful'
23
+ console.log('Fallback: Copying text command was ' + msg)
24
+ } catch (err) {
25
+ console.error('Fallback: Oops, unable to copy', err)
26
+ }
27
+
28
+ document.body.removeChild(textArea)
29
+
30
+ scrollContainer.scrollTop = currentScrollTop
31
+ }
32
+
33
+ export function copyToClipboard (text, scrollContainer = null) {
34
+ if (!navigator.clipboard) {
35
+ fallbackCopyToClipboard(text, scrollContainer)
36
+ return
37
+ }
38
+ navigator.clipboard.writeText(text).then(function () {
39
+ console.log('Async: Copying to clipboard was successful!')
40
+ }, function (err) {
41
+ console.error('Async: Could not copy text: ', err)
42
+ })
43
+ }
js/src/utils/deepmerge.js ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function isMergeableObject (val) {
2
+ var nonNullObject = val && typeof val === 'object'
3
+
4
+ return nonNullObject
5
+ && Object.prototype.toString.call(val) !== '[object RegExp]'
6
+ && Object.prototype.toString.call(val) !== '[object Date]'
7
+ }
8
+
9
+ function emptyTarget (val) {
10
+ return Array.isArray(val) ? [] : {}
11
+ }
12
+
13
+ function cloneIfNecessary (value, optionsArgument) {
14
+ var clone = optionsArgument && optionsArgument.clone === true
15
+ return (clone && isMergeableObject(value)) ? deepmerge(emptyTarget(value), value, optionsArgument) : value
16
+ }
17
+
18
+ function defaultArrayMerge (target, source, optionsArgument) {
19
+ var destination = target.slice()
20
+ source.forEach(function (e, i) {
21
+ if (typeof destination[i] === 'undefined') {
22
+ destination[i] = cloneIfNecessary(e, optionsArgument)
23
+ } else if (isMergeableObject(e)) {
24
+ destination[i] = deepmerge(target[i], e, optionsArgument)
25
+ } else if (target.indexOf(e) === -1) {
26
+ destination.push(cloneIfNecessary(e, optionsArgument))
27
+ }
28
+ })
29
+ return destination
30
+ }
31
+
32
+ function mergeObject (target, source, optionsArgument) {
33
+ var destination = {}
34
+ if (isMergeableObject(target)) {
35
+ Object.keys(target).forEach(function (key) {
36
+ destination[key] = cloneIfNecessary(target[key], optionsArgument)
37
+ })
38
+ }
39
+ Object.keys(source).forEach(function (key) {
40
+ if (!isMergeableObject(source[key]) || !target[key]) {
41
+ destination[key] = cloneIfNecessary(source[key], optionsArgument)
42
+ } else {
43
+ destination[key] = deepmerge(target[key], source[key], optionsArgument)
44
+ }
45
+ })
46
+ return destination
47
+ }
48
+
49
+ function deepmerge (target, source, optionsArgument) {
50
+ var array = Array.isArray(source)
51
+ var options = optionsArgument || {arrayMerge: defaultArrayMerge}
52
+ var arrayMerge = options.arrayMerge || defaultArrayMerge
53
+
54
+ if (array) {
55
+ return Array.isArray(target) ? arrayMerge(target, source, optionsArgument) : cloneIfNecessary(source, optionsArgument)
56
+ } else {
57
+ return mergeObject(target, source, optionsArgument)
58
+ }
59
+ }
60
+
61
+ deepmerge.all = function deepmergeAll (array, optionsArgument) {
62
+ if (!Array.isArray(array) || array.length < 2) {
63
+ throw new Error('first argument should be an array with at least two elements')
64
+ }
65
+
66
+ // we are sure there are at least 2 values, so it is safe to have no initial value
67
+ return array.reduce(function (prev, next) {
68
+ return deepmerge(prev, next, optionsArgument)
69
+ })
70
+ }
71
+
72
+ export default deepmerge
js/src/{intro → utils}/fetch.js RENAMED
File without changes
js/src/utils/jsonClone.js ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ export default function (data) {
2
+ return JSON.parse(JSON.stringify(data))
3
+ }
js/update.min.js DELETED
@@ -1 +0,0 @@
1
- !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.WPRA=o():e.WPRA=o()}("undefined"!=typeof self?self:this,function(){return webpackJsonpWPRA([3],{37:function(e,o){}},[37])});
 
js/wpra-manifest.min.js DELETED
@@ -1 +0,0 @@
1
- !function(r){function n(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return r[e].call(t.exports,t,t.exports,n),t.l=!0,t.exports}var e=window.webpackJsonpWPRA;window.webpackJsonpWPRA=function(o,u,c){for(var f,i,p,a=0,l=[];a<o.length;a++)i=o[a],t[i]&&l.push(t[i][0]),t[i]=0;for(f in u)Object.prototype.hasOwnProperty.call(u,f)&&(r[f]=u[f]);for(e&&e(o,u,c);l.length;)l.shift()();if(c)for(a=0;a<c.length;a++)p=n(n.s=c[a]);return p};var o={},t={4:0};n.m=r,n.c=o,n.d=function(r,e,o){n.o(r,e)||Object.defineProperty(r,e,{configurable:!1,enumerable:!0,get:o})},n.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(e,"a",e),e},n.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},n.p="",n.oe=function(r){throw console.error(r),r}}([]);
 
js/wpra-vendor.min.js DELETED
@@ -1,12 +0,0 @@
1
- webpackJsonpWPRA([0],[function(e,t,n){"use strict";function r(e){return"[object Array]"===$.call(e)}function o(e){return"[object ArrayBuffer]"===$.call(e)}function i(e){return"undefined"!=typeof FormData&&e instanceof FormData}function a(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer}function s(e){return"string"==typeof e}function c(e){return"number"==typeof e}function u(e){return void 0===e}function f(e){return null!==e&&"object"==typeof e}function l(e){return"[object Date]"===$.call(e)}function p(e){return"[object File]"===$.call(e)}function d(e){return"[object Blob]"===$.call(e)}function h(e){return"[object Function]"===$.call(e)}function v(e){return f(e)&&h(e.pipe)}function m(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams}function y(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")}function g(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document}function b(e,t){if(null!==e&&void 0!==e)if("object"!=typeof e&&(e=[e]),r(e))for(var n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}function _(){function e(e,n){"object"==typeof t[n]&&"object"==typeof e?t[n]=_(t[n],e):t[n]=e}for(var t={},n=0,r=arguments.length;n<r;n++)b(arguments[n],e);return t}function w(e,t,n){return b(t,function(t,r){e[r]=n&&"function"==typeof t?x(t,n):t}),e}var x=n(6),C=n(20),$=Object.prototype.toString;e.exports={isArray:r,isArrayBuffer:o,isBuffer:C,isFormData:i,isArrayBufferView:a,isString:s,isNumber:c,isObject:f,isUndefined:u,isDate:l,isFile:p,isBlob:d,isFunction:h,isStream:v,isURLSearchParams:m,isStandardBrowserEnv:g,forEach:b,merge:_,extend:w,trim:y}},function(e,t,n){"use strict";function r(e,t,n,r,o,i,a,s){var c="function"==typeof e?e.options:e;t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),i&&(c._scopeId="data-v-"+i);var u;if(a?(u=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},c._ssrRegister=u):o&&(u=s?function(){o.call(this,this.$root.$options.shadowRoot)}:o),u)if(c.functional){c._injectStyles=u;var f=c.render;c.render=function(e,t){return u.call(t),f(e,t)}}else{var l=c.beforeCreate;c.beforeCreate=l?[].concat(l,u):[u]}return{exports:e,options:c}}t.a=r},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";(function(t){function r(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var o=n(0),i=n(22),a={"Content-Type":"application/x-www-form-urlencoded"},s={adapter:function(){var e;return"undefined"!=typeof XMLHttpRequest?e=n(7):void 0!==t&&(e=n(7)),e}(),transformRequest:[function(e,t){return i(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):o.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],function(e){s.headers[e]={}}),o.forEach(["post","put","patch"],function(e){s.headers[e]=o.merge(a)}),e.exports=s}).call(t,n(5))},function(e,t,n){"use strict";(function(e,n){function r(e){return void 0===e||null===e}function o(e){return void 0!==e&&null!==e}function i(e){return!0===e}function a(e){return!1===e}function s(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function c(e){return null!==e&&"object"==typeof e}function u(e){return"[object Object]"===pi.call(e)}function f(e){return"[object RegExp]"===pi.call(e)}function l(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function p(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function d(e){var t=parseFloat(e);return isNaN(t)?e:t}function h(e,t){for(var n=Object.create(null),r=e.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}function v(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}function m(e,t){return vi.call(e,t)}function y(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}function g(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function b(e,t){return e.bind(t)}function _(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function w(e,t){for(var n in t)e[n]=t[n];return e}function x(e){for(var t={},n=0;n<e.length;n++)e[n]&&w(t,e[n]);return t}function C(e,t,n){}function $(e,t){if(e===t)return!0;var n=c(e),r=c(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var o=Array.isArray(e),i=Array.isArray(t);if(o&&i)return e.length===t.length&&e.every(function(e,n){return $(e,t[n])});if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(o||i)return!1;var a=Object.keys(e),s=Object.keys(t);return a.length===s.length&&a.every(function(n){return $(e[n],t[n])})}catch(e){return!1}}function A(e,t){for(var n=0;n<e.length;n++)if($(e[n],t))return n;return-1}function k(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}function T(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function O(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function S(e){if(!Oi.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}function E(e){return"function"==typeof e&&/native code/.test(e.toString())}function j(e){Wi.push(e),Xi.target=e}function I(){Wi.pop(),Xi.target=Wi[Wi.length-1]}function L(e){return new Gi(void 0,void 0,void 0,String(e))}function N(e){var t=new Gi(e.tag,e.data,e.children&&e.children.slice(),e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.asyncMeta=e.asyncMeta,t.isCloned=!0,t}function P(e){na=e}function D(e,t){e.__proto__=t}function R(e,t,n){for(var r=0,o=n.length;r<o;r++){var i=n[r];O(e,i,t[i])}}function B(e,t){if(c(e)&&!(e instanceof Gi)){var n;return m(e,"__ob__")&&e.__ob__ instanceof ra?n=e.__ob__:na&&!qi()&&(Array.isArray(e)||u(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new ra(e)),t&&n&&n.vmCount++,n}}function M(e,t,n,r,o){var i=new Xi,a=Object.getOwnPropertyDescriptor(e,t);if(!a||!1!==a.configurable){var s=a&&a.get,c=a&&a.set;s&&!c||2!==arguments.length||(n=e[t]);var u=!o&&B(n);Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=s?s.call(e):n;return Xi.target&&(i.depend(),u&&(u.dep.depend(),Array.isArray(t)&&H(t))),t},set:function(t){var r=s?s.call(e):n;t===r||t!==t&&r!==r||s&&!c||(c?c.call(e,t):n=t,u=!o&&B(t),i.notify())}})}}function F(e,t,n){if(Array.isArray(e)&&l(t))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(t in e&&!(t in Object.prototype))return e[t]=n,n;var r=e.__ob__;return e._isVue||r&&r.vmCount?n:r?(M(r.value,t,n),r.dep.notify(),n):(e[t]=n,n)}function U(e,t){if(Array.isArray(e)&&l(t))return void e.splice(t,1);var n=e.__ob__;e._isVue||n&&n.vmCount||m(e,t)&&(delete e[t],n&&n.dep.notify())}function H(e){for(var t=void 0,n=0,r=e.length;n<r;n++)t=e[n],t&&t.__ob__&&t.__ob__.dep.depend(),Array.isArray(t)&&H(t)}function q(e,t){if(!t)return e;for(var n,r,o,i=Object.keys(t),a=0;a<i.length;a++)n=i[a],r=e[n],o=t[n],m(e,n)?r!==o&&u(r)&&u(o)&&q(r,o):F(e,n,o);return e}function V(e,t,n){return n?function(){var r="function"==typeof t?t.call(n,n):t,o="function"==typeof e?e.call(n,n):e;return r?q(r,o):o}:t?e?function(){return q("function"==typeof t?t.call(this,this):t,"function"==typeof e?e.call(this,this):e)}:t:e}function z(e,t){var n=t?e?e.concat(t):Array.isArray(t)?t:[t]:e;return n?J(n):n}function J(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}function K(e,t,n,r){var o=Object.create(e||null);return t?w(o,t):o}function X(e,t){var n=e.props;if(n){var r,o,i,a={};if(Array.isArray(n))for(r=n.length;r--;)"string"==typeof(o=n[r])&&(i=yi(o),a[i]={type:null});else if(u(n))for(var s in n)o=n[s],i=yi(s),a[i]=u(o)?o:{type:o};e.props=a}}function W(e,t){var n=e.inject;if(n){var r=e.inject={};if(Array.isArray(n))for(var o=0;o<n.length;o++)r[n[o]]={from:n[o]};else if(u(n))for(var i in n){var a=n[i];r[i]=u(a)?w({from:i},a):{from:a}}}}function G(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"==typeof r&&(t[n]={bind:r,update:r})}}function Z(e,t,n){function r(r){var o=oa[r]||sa;s[r]=o(e[r],t[r],n,r)}if("function"==typeof t&&(t=t.options),X(t,n),W(t,n),G(t),!t._base&&(t.extends&&(e=Z(e,t.extends,n)),t.mixins))for(var o=0,i=t.mixins.length;o<i;o++)e=Z(e,t.mixins[o],n);var a,s={};for(a in e)r(a);for(a in t)m(e,a)||r(a);return s}function Y(e,t,n,r){if("string"==typeof n){var o=e[t];if(m(o,n))return o[n];var i=yi(n);if(m(o,i))return o[i];var a=gi(i);return m(o,a)?o[a]:o[n]||o[i]||o[a]}}function Q(e,t,n,r){var o=t[e],i=!m(n,e),a=n[e],s=re(Boolean,o.type);if(s>-1)if(i&&!m(o,"default"))a=!1;else if(""===a||a===_i(e)){var c=re(String,o.type);(c<0||s<c)&&(a=!0)}if(void 0===a){a=ee(r,o,e);var u=na;P(!0),B(a),P(u)}return a}function ee(e,t,n){if(m(t,"default")){var r=t.default;return e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n]?e._props[n]:"function"==typeof r&&"Function"!==te(t.type)?r.call(e):r}}function te(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function ne(e,t){return te(e)===te(t)}function re(e,t){if(!Array.isArray(t))return ne(t,e)?0:-1;for(var n=0,r=t.length;n<r;n++)if(ne(t[n],e))return n;return-1}function oe(e,t,n){if(t)for(var r=t;r=r.$parent;){var o=r.$options.errorCaptured;if(o)for(var i=0;i<o.length;i++)try{var a=!1===o[i].call(r,e,t,n);if(a)return}catch(e){ie(e,r,"errorCaptured hook")}}ie(e,t,n)}function ie(e,t,n){if(Ti.errorHandler)try{return Ti.errorHandler.call(null,e,t,n)}catch(e){ae(e,null,"config.errorHandler")}ae(e,t,n)}function ae(e,t,n){if(!Ei&&!ji||"undefined"==typeof console)throw e;console.error(e)}function se(){ua=!1;var e=ca.slice(0);ca.length=0;for(var t=0;t<e.length;t++)e[t]()}function ce(e){return e._withTask||(e._withTask=function(){fa=!0;try{return e.apply(null,arguments)}finally{fa=!1}})}function ue(e,t){var n;if(ca.push(function(){if(e)try{e.call(t)}catch(e){oe(e,t,"nextTick")}else n&&n(t)}),ua||(ua=!0,fa?aa():ia()),!e&&"undefined"!=typeof Promise)return new Promise(function(e){n=e})}function fe(e){le(e,va),va.clear()}function le(e,t){var n,r,o=Array.isArray(e);if(!(!o&&!c(e)||Object.isFrozen(e)||e instanceof Gi)){if(e.__ob__){var i=e.__ob__.dep.id;if(t.has(i))return;t.add(i)}if(o)for(n=e.length;n--;)le(e[n],t);else for(r=Object.keys(e),n=r.length;n--;)le(e[r[n]],t)}}function pe(e){function t(){var e=arguments,n=t.fns;if(!Array.isArray(n))return n.apply(null,arguments);for(var r=n.slice(),o=0;o<r.length;o++)r[o].apply(null,e)}return t.fns=e,t}function de(e,t,n,o,a,s){var c,u,f,l;for(c in e)u=e[c],f=t[c],l=ma(c),r(u)||(r(f)?(r(u.fns)&&(u=e[c]=pe(u)),i(l.once)&&(u=e[c]=a(l.name,u,l.capture)),n(l.name,u,l.capture,l.passive,l.params)):u!==f&&(f.fns=u,e[c]=f));for(c in t)r(e[c])&&(l=ma(c),o(l.name,t[c],l.capture))}function he(e,t,n){function a(){n.apply(this,arguments),v(s.fns,a)}e instanceof Gi&&(e=e.data.hook||(e.data.hook={}));var s,c=e[t];r(c)?s=pe([a]):o(c.fns)&&i(c.merged)?(s=c,s.fns.push(a)):s=pe([c,a]),s.merged=!0,e[t]=s}function ve(e,t,n){var i=t.options.props;if(!r(i)){var a={},s=e.attrs,c=e.props;if(o(s)||o(c))for(var u in i){var f=_i(u);me(a,c,u,f,!0)||me(a,s,u,f,!1)}return a}}function me(e,t,n,r,i){if(o(t)){if(m(t,n))return e[n]=t[n],i||delete t[n],!0;if(m(t,r))return e[n]=t[r],i||delete t[r],!0}return!1}function ye(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}function ge(e){return s(e)?[L(e)]:Array.isArray(e)?_e(e):void 0}function be(e){return o(e)&&o(e.text)&&a(e.isComment)}function _e(e,t){var n,a,c,u,f=[];for(n=0;n<e.length;n++)a=e[n],r(a)||"boolean"==typeof a||(c=f.length-1,u=f[c],Array.isArray(a)?a.length>0&&(a=_e(a,(t||"")+"_"+n),be(a[0])&&be(u)&&(f[c]=L(u.text+a[0].text),a.shift()),f.push.apply(f,a)):s(a)?be(u)?f[c]=L(u.text+a):""!==a&&f.push(L(a)):be(a)&&be(u)?f[c]=L(u.text+a.text):(i(e._isVList)&&o(a.tag)&&r(a.key)&&o(t)&&(a.key="__vlist"+t+"_"+n+"__"),f.push(a)));return f}function we(e,t){return(e.__esModule||zi&&"Module"===e[Symbol.toStringTag])&&(e=e.default),c(e)?t.extend(e):e}function xe(e,t,n,r,o){var i=Yi();return i.asyncFactory=e,i.asyncMeta={data:t,context:n,children:r,tag:o},i}function Ce(e,t,n){if(i(e.error)&&o(e.errorComp))return e.errorComp;if(o(e.resolved))return e.resolved;if(i(e.loading)&&o(e.loadingComp))return e.loadingComp;if(!o(e.contexts)){var a=e.contexts=[n],s=!0,u=function(e){for(var t=0,n=a.length;t<n;t++)a[t].$forceUpdate();e&&(a.length=0)},f=k(function(n){e.resolved=we(n,t),s?a.length=0:u(!0)}),l=k(function(t){o(e.errorComp)&&(e.error=!0,u(!0))}),p=e(f,l);return c(p)&&("function"==typeof p.then?r(e.resolved)&&p.then(f,l):o(p.component)&&"function"==typeof p.component.then&&(p.component.then(f,l),o(p.error)&&(e.errorComp=we(p.error,t)),o(p.loading)&&(e.loadingComp=we(p.loading,t),0===p.delay?e.loading=!0:setTimeout(function(){r(e.resolved)&&r(e.error)&&(e.loading=!0,u(!1))},p.delay||200)),o(p.timeout)&&setTimeout(function(){r(e.resolved)&&l(null)},p.timeout))),s=!1,e.loading?e.loadingComp:e.resolved}e.contexts.push(n)}function $e(e){return e.isComment&&e.asyncFactory}function Ae(e){if(Array.isArray(e))for(var t=0;t<e.length;t++){var n=e[t];if(o(n)&&(o(n.componentOptions)||$e(n)))return n}}function ke(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&Ee(e,t)}function Te(e,t){ha.$on(e,t)}function Oe(e,t){ha.$off(e,t)}function Se(e,t){var n=ha;return function r(){null!==t.apply(null,arguments)&&n.$off(e,r)}}function Ee(e,t,n){ha=e,de(t,n||{},Te,Oe,Se,e),ha=void 0}function je(e,t){var n={};if(!e)return n;for(var r=0,o=e.length;r<o;r++){var i=e[r],a=i.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,i.context!==t&&i.fnContext!==t||!a||null==a.slot)(n.default||(n.default=[])).push(i);else{var s=a.slot,c=n[s]||(n[s]=[]);"template"===i.tag?c.push.apply(c,i.children||[]):c.push(i)}}for(var u in n)n[u].every(Ie)&&delete n[u];return n}function Ie(e){return e.isComment&&!e.asyncFactory||" "===e.text}function Le(e,t){t=t||{};for(var n=0;n<e.length;n++)Array.isArray(e[n])?Le(e[n],t):t[e[n].key]=e[n].fn;return t}function Ne(e){var t=ya;return ya=e,function(){ya=t}}function Pe(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}function De(e,t,n){e.$el=t,e.$options.render||(e.$options.render=Yi),Ue(e,"beforeMount");var r;return r=function(){e._update(e._render(),n)},new Aa(e,r,C,{before:function(){e._isMounted&&!e._isDestroyed&&Ue(e,"beforeUpdate")}},!0),n=!1,null==e.$vnode&&(e._isMounted=!0,Ue(e,"mounted")),e}function Re(e,t,n,r,o){var i=!!(o||e.$options._renderChildren||r.data.scopedSlots||e.$scopedSlots!==li);if(e.$options._parentVnode=r,e.$vnode=r,e._vnode&&(e._vnode.parent=r),e.$options._renderChildren=o,e.$attrs=r.data.attrs||li,e.$listeners=n||li,t&&e.$options.props){P(!1);for(var a=e._props,s=e.$options._propKeys||[],c=0;c<s.length;c++){var u=s[c],f=e.$options.props;a[u]=Q(u,f,t,e)}P(!0),e.$options.propsData=t}n=n||li;var l=e.$options._parentListeners;e.$options._parentListeners=n,Ee(e,n,l),i&&(e.$slots=je(o,r.context),e.$forceUpdate())}function Be(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function Me(e,t){if(t){if(e._directInactive=!1,Be(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)Me(e.$children[n]);Ue(e,"activated")}}function Fe(e,t){if(!(t&&(e._directInactive=!0,Be(e))||e._inactive)){e._inactive=!0;for(var n=0;n<e.$children.length;n++)Fe(e.$children[n]);Ue(e,"deactivated")}}function Ue(e,t){j();var n=e.$options[t];if(n)for(var r=0,o=n.length;r<o;r++)try{n[r].call(e)}catch(n){oe(n,e,t+" hook")}e._hasHookEvent&&e.$emit("hook:"+t),I()}function He(){Ca=ga.length=ba.length=0,_a={},wa=xa=!1}function qe(){xa=!0;var e,t;for(ga.sort(function(e,t){return e.id-t.id}),Ca=0;Ca<ga.length;Ca++)e=ga[Ca],e.before&&e.before(),t=e.id,_a[t]=null,e.run();var n=ba.slice(),r=ga.slice();He(),Je(n),Ve(r),Vi&&Ti.devtools&&Vi.emit("flush")}function Ve(e){for(var t=e.length;t--;){var n=e[t],r=n.vm;r._watcher===n&&r._isMounted&&!r._isDestroyed&&Ue(r,"updated")}}function ze(e){e._inactive=!1,ba.push(e)}function Je(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,Me(e[t],!0)}function Ke(e){var t=e.id;if(null==_a[t]){if(_a[t]=!0,xa){for(var n=ga.length-1;n>Ca&&ga[n].id>e.id;)n--;ga.splice(n+1,0,e)}else ga.push(e);wa||(wa=!0,ue(qe))}}function Xe(e,t,n){ka.get=function(){return this[t][n]},ka.set=function(e){this[t][n]=e},Object.defineProperty(e,n,ka)}function We(e){e._watchers=[];var t=e.$options;t.props&&Ge(e,t.props),t.methods&&rt(e,t.methods),t.data?Ze(e):B(e._data={},!0),t.computed&&Qe(e,t.computed),t.watch&&t.watch!==Bi&&ot(e,t.watch)}function Ge(e,t){var n=e.$options.propsData||{},r=e._props={},o=e.$options._propKeys=[];!e.$parent||P(!1);for(var i in t)!function(i){o.push(i);var a=Q(i,t,n,e);M(r,i,a),i in e||Xe(e,"_props",i)}(i);P(!0)}function Ze(e){var t=e.$options.data;t=e._data="function"==typeof t?Ye(t,e):t||{},u(t)||(t={});for(var n=Object.keys(t),r=e.$options.props,o=(e.$options.methods,n.length);o--;){var i=n[o];r&&m(r,i)||T(i)||Xe(e,"_data",i)}B(t,!0)}function Ye(e,t){j();try{return e.call(t,t)}catch(e){return oe(e,t,"data()"),{}}finally{I()}}function Qe(e,t){var n=e._computedWatchers=Object.create(null),r=qi();for(var o in t){var i=t[o],a="function"==typeof i?i:i.get;r||(n[o]=new Aa(e,a||C,C,Ta)),o in e||et(e,o,i)}}function et(e,t,n){var r=!qi();"function"==typeof n?(ka.get=r?tt(t):nt(n),ka.set=C):(ka.get=n.get?r&&!1!==n.cache?tt(t):nt(n.get):C,ka.set=n.set||C),Object.defineProperty(e,t,ka)}function tt(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),Xi.target&&t.depend(),t.value}}function nt(e){return function(){return e.call(this,this)}}function rt(e,t){e.$options.props;for(var n in t)e[n]="function"!=typeof t[n]?C:wi(t[n],e)}function ot(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var o=0;o<r.length;o++)it(e,n,r[o]);else it(e,n,r)}}function it(e,t,n,r){return u(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}function at(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}function st(e){var t=ct(e.$options.inject,e);t&&(P(!1),Object.keys(t).forEach(function(n){M(e,n,t[n])}),P(!0))}function ct(e,t){if(e){for(var n=Object.create(null),r=zi?Reflect.ownKeys(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}):Object.keys(e),o=0;o<r.length;o++){for(var i=r[o],a=e[i].from,s=t;s;){if(s._provided&&m(s._provided,a)){n[i]=s._provided[a];break}s=s.$parent}if(!s&&"default"in e[i]){var c=e[i].default;n[i]="function"==typeof c?c.call(t):c}}return n}}function ut(e,t){var n,r,i,a,s;if(Array.isArray(e)||"string"==typeof e)for(n=new Array(e.length),r=0,i=e.length;r<i;r++)n[r]=t(e[r],r);else if("number"==typeof e)for(n=new Array(e),r=0;r<e;r++)n[r]=t(r+1,r);else if(c(e))for(a=Object.keys(e),n=new Array(a.length),r=0,i=a.length;r<i;r++)s=a[r],n[r]=t(e[s],s,r);return o(n)||(n=[]),n._isVList=!0,n}function ft(e,t,n,r){var o,i=this.$scopedSlots[e];i?(n=n||{},r&&(n=w(w({},r),n)),o=i(n)||t):o=this.$slots[e]||t;var a=n&&n.slot;return a?this.$createElement("template",{slot:a},o):o}function lt(e){return Y(this.$options,"filters",e,!0)||Ci}function pt(e,t){return Array.isArray(e)?-1===e.indexOf(t):e!==t}function dt(e,t,n,r,o){var i=Ti.keyCodes[t]||n;return o&&r&&!Ti.keyCodes[t]?pt(o,r):i?pt(i,e):r?_i(r)!==t:void 0}function ht(e,t,n,r,o){if(n&&c(n)){Array.isArray(n)&&(n=x(n));var i;for(var a in n)!function(a){if("class"===a||"style"===a||hi(a))i=e;else{var s=e.attrs&&e.attrs.type;i=r||Ti.mustUseProp(t,s,a)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}var c=yi(a);a in i||c in i||(i[a]=n[a],!o)||((e.on||(e.on={}))["update:"+c]=function(e){n[a]=e})}(a)}return e}function vt(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t?r:(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,null,this),yt(r,"__static__"+e,!1),r)}function mt(e,t,n){return yt(e,"__once__"+t+(n?"_"+n:""),!0),e}function yt(e,t,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&gt(e[r],t+"_"+r,n);else gt(e,t,n)}function gt(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function bt(e,t){if(t&&u(t)){var n=e.on=e.on?w({},e.on):{};for(var r in t){var o=n[r],i=t[r];n[r]=o?[].concat(o,i):i}}return e}function _t(e){e._o=mt,e._n=d,e._s=p,e._l=ut,e._t=ft,e._q=$,e._i=A,e._m=vt,e._f=lt,e._k=dt,e._b=ht,e._v=L,e._e=Yi,e._u=Le,e._g=bt}function wt(e,t,n,r,o){var a,s=o.options;m(r,"_uid")?(a=Object.create(r),a._original=r):(a=r,r=r._original);var c=i(s._compiled),u=!c;this.data=e,this.props=t,this.children=n,this.parent=r,this.listeners=e.on||li,this.injections=ct(s.inject,r),this.slots=function(){return je(n,r)},c&&(this.$options=s,this.$slots=this.slots(),this.$scopedSlots=e.scopedSlots||li),s._scopeId?this._c=function(e,t,n,o){var i=Et(a,e,t,n,o,u);return i&&!Array.isArray(i)&&(i.fnScopeId=s._scopeId,i.fnContext=r),i}:this._c=function(e,t,n,r){return Et(a,e,t,n,r,u)}}function xt(e,t,n,r,i){var a=e.options,s={},c=a.props;if(o(c))for(var u in c)s[u]=Q(u,c,t||li);else o(n.attrs)&&$t(s,n.attrs),o(n.props)&&$t(s,n.props);var f=new wt(n,s,i,r,e),l=a.render.call(null,f._c,f);if(l instanceof Gi)return Ct(l,n,f.parent,a,f);if(Array.isArray(l)){for(var p=ge(l)||[],d=new Array(p.length),h=0;h<p.length;h++)d[h]=Ct(p[h],n,f.parent,a,f);return d}}function Ct(e,t,n,r,o){var i=N(e);return i.fnContext=n,i.fnOptions=r,t.slot&&((i.data||(i.data={})).slot=t.slot),i}function $t(e,t){for(var n in t)e[yi(n)]=t[n]}function At(e,t,n,a,s){if(!r(e)){var u=n.$options._base;if(c(e)&&(e=u.extend(e)),"function"==typeof e){var f;if(r(e.cid)&&(f=e,void 0===(e=Ce(f,u,n))))return xe(f,t,n,a,s);t=t||{},Dt(e),o(t.model)&&St(e.options,t);var l=ve(t,e,s);if(i(e.options.functional))return xt(e,l,t,n,a);var p=t.on;if(t.on=t.nativeOn,i(e.options.abstract)){var d=t.slot;t={},d&&(t.slot=d)}Tt(t);var h=e.options.name||s;return new Gi("vue-component-"+e.cid+(h?"-"+h:""),t,void 0,void 0,void 0,n,{Ctor:e,propsData:l,listeners:p,tag:s,children:a},f)}}}function kt(e,t){var n={_isComponent:!0,_parentVnode:e,parent:t},r=e.data.inlineTemplate;return o(r)&&(n.render=r.render,n.staticRenderFns=r.staticRenderFns),new e.componentOptions.Ctor(n)}function Tt(e){for(var t=e.hook||(e.hook={}),n=0;n<Sa.length;n++){var r=Sa[n],o=t[r],i=Oa[r];o===i||o&&o._merged||(t[r]=o?Ot(i,o):i)}}function Ot(e,t){var n=function(n,r){e(n,r),t(n,r)};return n._merged=!0,n}function St(e,t){var n=e.model&&e.model.prop||"value",r=e.model&&e.model.event||"input";(t.props||(t.props={}))[n]=t.model.value;var i=t.on||(t.on={}),a=i[r],s=t.model.callback;o(a)?(Array.isArray(a)?-1===a.indexOf(s):a!==s)&&(i[r]=[s].concat(a)):i[r]=s}function Et(e,t,n,r,o,a){return(Array.isArray(n)||s(n))&&(o=r,r=n,n=void 0),i(a)&&(o=ja),jt(e,t,n,r,o)}function jt(e,t,n,r,i){if(o(n)&&o(n.__ob__))return Yi();if(o(n)&&o(n.is)&&(t=n.is),!t)return Yi();Array.isArray(r)&&"function"==typeof r[0]&&(n=n||{},n.scopedSlots={default:r[0]},r.length=0),i===ja?r=ge(r):i===Ea&&(r=ye(r));var a,s;if("string"==typeof t){var c;s=e.$vnode&&e.$vnode.ns||Ti.getTagNamespace(t),a=Ti.isReservedTag(t)?new Gi(Ti.parsePlatformTagName(t),n,r,void 0,void 0,e):n&&n.pre||!o(c=Y(e.$options,"components",t))?new Gi(t,n,r,void 0,void 0,e):At(c,n,e,r,t)}else a=At(t,n,e,r);return Array.isArray(a)?a:o(a)?(o(s)&&It(a,s),o(n)&&Lt(n),a):Yi()}function It(e,t,n){if(e.ns=t,"foreignObject"===e.tag&&(t=void 0,n=!0),o(e.children))for(var a=0,s=e.children.length;a<s;a++){var c=e.children[a];o(c.tag)&&(r(c.ns)||i(n)&&"svg"!==c.tag)&&It(c,t,n)}}function Lt(e){c(e.style)&&fe(e.style),c(e.class)&&fe(e.class)}function Nt(e){e._vnode=null,e._staticTrees=null;var t=e.$options,n=e.$vnode=t._parentVnode,r=n&&n.context;e.$slots=je(t._renderChildren,r),e.$scopedSlots=li,e._c=function(t,n,r,o){return Et(e,t,n,r,o,!1)},e.$createElement=function(t,n,r,o){return Et(e,t,n,r,o,!0)};var o=n&&n.data;M(e,"$attrs",o&&o.attrs||li,null,!0),M(e,"$listeners",t._parentListeners||li,null,!0)}function Pt(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}function Dt(e){var t=e.options;if(e.super){var n=Dt(e.super);if(n!==e.superOptions){e.superOptions=n;var r=Rt(e);r&&w(e.extendOptions,r),t=e.options=Z(n,e.extendOptions),t.name&&(t.components[t.name]=e)}}return t}function Rt(e){var t,n=e.options,r=e.sealedOptions;for(var o in n)n[o]!==r[o]&&(t||(t={}),t[o]=n[o]);return t}function Bt(e){this._init(e)}function Mt(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=_(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}function Ft(e){e.mixin=function(e){return this.options=Z(this.options,e),this}}function Ut(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,o=e._Ctor||(e._Ctor={});if(o[r])return o[r];var i=e.name||n.options.name,a=function(e){this._init(e)};return a.prototype=Object.create(n.prototype),a.prototype.constructor=a,a.cid=t++,a.options=Z(n.options,e),a.super=n,a.options.props&&Ht(a),a.options.computed&&qt(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,Ai.forEach(function(e){a[e]=n[e]}),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=w({},a.options),o[r]=a,a}}function Ht(e){var t=e.options.props;for(var n in t)Xe(e.prototype,"_props",n)}function qt(e){var t=e.options.computed;for(var n in t)et(e.prototype,n,t[n])}function Vt(e){Ai.forEach(function(t){e[t]=function(e,n){return n?("component"===t&&u(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}})}function zt(e){return e&&(e.Ctor.options.name||e.tag)}function Jt(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!f(e)&&e.test(t)}function Kt(e,t){var n=e.cache,r=e.keys,o=e._vnode;for(var i in n){var a=n[i];if(a){var s=zt(a.componentOptions);s&&!t(s)&&Xt(n,i,r,o)}}}function Xt(e,t,n,r){var o=e[t];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),e[t]=null,v(n,t)}function Wt(e){for(var t=e.data,n=e,r=e;o(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(t=Gt(r.data,t));for(;o(n=n.parent);)n&&n.data&&(t=Gt(t,n.data));return Zt(t.staticClass,t.class)}function Gt(e,t){return{staticClass:Yt(e.staticClass,t.staticClass),class:o(e.class)?[e.class,t.class]:t.class}}function Zt(e,t){return o(e)||o(t)?Yt(e,Qt(t)):""}function Yt(e,t){return e?t?e+" "+t:e:t||""}function Qt(e){return Array.isArray(e)?en(e):c(e)?tn(e):"string"==typeof e?e:""}function en(e){for(var t,n="",r=0,i=e.length;r<i;r++)o(t=Qt(e[r]))&&""!==t&&(n&&(n+=" "),n+=t);return n}function tn(e){var t="";for(var n in e)e[n]&&(t&&(t+=" "),t+=n);return t}function nn(e){return ns(e)?"svg":"math"===e?"math":void 0}function rn(e){if(!Ei)return!0;if(os(e))return!1;if(e=e.toLowerCase(),null!=is[e])return is[e];var t=document.createElement(e);return e.indexOf("-")>-1?is[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:is[e]=/HTMLUnknownElement/.test(t.toString())}function on(e){if("string"==typeof e){return document.querySelector(e)||document.createElement("div")}return e}function an(e,t){var n=document.createElement(e);return"select"!==e?n:(t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n)}function sn(e,t){return document.createElementNS(es[e],t)}function cn(e){return document.createTextNode(e)}function un(e){return document.createComment(e)}function fn(e,t,n){e.insertBefore(t,n)}function ln(e,t){e.removeChild(t)}function pn(e,t){e.appendChild(t)}function dn(e){return e.parentNode}function hn(e){return e.nextSibling}function vn(e){return e.tagName}function mn(e,t){e.textContent=t}function yn(e,t){e.setAttribute(t,"")}function gn(e,t){var n=e.data.ref;if(o(n)){var r=e.context,i=e.componentInstance||e.elm,a=r.$refs;t?Array.isArray(a[n])?v(a[n],i):a[n]===i&&(a[n]=void 0):e.data.refInFor?Array.isArray(a[n])?a[n].indexOf(i)<0&&a[n].push(i):a[n]=[i]:a[n]=i}}function bn(e,t){return e.key===t.key&&(e.tag===t.tag&&e.isComment===t.isComment&&o(e.data)===o(t.data)&&_n(e,t)||i(e.isAsyncPlaceholder)&&e.asyncFactory===t.asyncFactory&&r(t.asyncFactory.error))}function _n(e,t){if("input"!==e.tag)return!0;var n,r=o(n=e.data)&&o(n=n.attrs)&&n.type,i=o(n=t.data)&&o(n=n.attrs)&&n.type;return r===i||as(r)&&as(i)}function wn(e,t,n){var r,i,a={};for(r=t;r<=n;++r)i=e[r].key,o(i)&&(a[i]=r);return a}function xn(e,t){(e.data.directives||t.data.directives)&&Cn(e,t)}function Cn(e,t){var n,r,o,i=e===us,a=t===us,s=$n(e.data.directives,e.context),c=$n(t.data.directives,t.context),u=[],f=[];for(n in c)r=s[n],o=c[n],r?(o.oldValue=r.value,kn(o,"update",t,e),o.def&&o.def.componentUpdated&&f.push(o)):(kn(o,"bind",t,e),o.def&&o.def.inserted&&u.push(o));if(u.length){var l=function(){for(var n=0;n<u.length;n++)kn(u[n],"inserted",t,e)};i?he(t,"insert",l):l()}if(f.length&&he(t,"postpatch",function(){for(var n=0;n<f.length;n++)kn(f[n],"componentUpdated",t,e)}),!i)for(n in s)c[n]||kn(s[n],"unbind",e,e,a)}function $n(e,t){var n=Object.create(null);if(!e)return n;var r,o;for(r=0;r<e.length;r++)o=e[r],o.modifiers||(o.modifiers=ps),n[An(o)]=o,o.def=Y(t.$options,"directives",o.name,!0);return n}function An(e){return e.rawName||e.name+"."+Object.keys(e.modifiers||{}).join(".")}function kn(e,t,n,r,o){var i=e.def&&e.def[t];if(i)try{i(n.elm,e,n,r,o)}catch(r){oe(r,n.context,"directive "+e.name+" "+t+" hook")}}function Tn(e,t){var n=t.componentOptions;if(!(o(n)&&!1===n.Ctor.options.inheritAttrs||r(e.data.attrs)&&r(t.data.attrs))){var i,a,s=t.elm,c=e.data.attrs||{},u=t.data.attrs||{};o(u.__ob__)&&(u=t.data.attrs=w({},u));for(i in u)a=u[i],c[i]!==a&&On(s,i,a);(Ni||Di)&&u.value!==c.value&&On(s,"value",u.value);for(i in c)r(u[i])&&(Za(i)?s.removeAttributeNS(Ga,Ya(i)):Xa(i)||s.removeAttribute(i))}}function On(e,t,n){e.tagName.indexOf("-")>-1?Sn(e,t,n):Wa(t)?Qa(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):Xa(t)?e.setAttribute(t,Qa(n)||"false"===n?"false":"true"):Za(t)?Qa(n)?e.removeAttributeNS(Ga,Ya(t)):e.setAttributeNS(Ga,t,n):Sn(e,t,n)}function Sn(e,t,n){if(Qa(n))e.removeAttribute(t);else{if(Ni&&!Pi&&("TEXTAREA"===e.tagName||"INPUT"===e.tagName)&&"placeholder"===t&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}function En(e,t){var n=t.elm,i=t.data,a=e.data;if(!(r(i.staticClass)&&r(i.class)&&(r(a)||r(a.staticClass)&&r(a.class)))){var s=Wt(t),c=n._transitionClasses;o(c)&&(s=Yt(s,Qt(c))),s!==n._prevClass&&(n.setAttribute("class",s),n._prevClass=s)}}function jn(e){function t(){(a||(a=[])).push(e.slice(h,o).trim()),h=o+1}var n,r,o,i,a,s=!1,c=!1,u=!1,f=!1,l=0,p=0,d=0,h=0;for(o=0;o<e.length;o++)if(r=n,n=e.charCodeAt(o),s)39===n&&92!==r&&(s=!1);else if(c)34===n&&92!==r&&(c=!1);else if(u)96===n&&92!==r&&(u=!1);else if(f)47===n&&92!==r&&(f=!1);else if(124!==n||124===e.charCodeAt(o+1)||124===e.charCodeAt(o-1)||l||p||d){switch(n){case 34:c=!0;break;case 39:s=!0;break;case 96:u=!0;break;case 40:d++;break;case 41:d--;break;case 91:p++;break;case 93:p--;break;case 123:l++;break;case 125:l--}if(47===n){for(var v=o-1,m=void 0;v>=0&&" "===(m=e.charAt(v));v--);m&&ms.test(m)||(f=!0)}}else void 0===i?(h=o+1,i=e.slice(0,o).trim()):t();if(void 0===i?i=e.slice(0,o).trim():0!==h&&t(),a)for(o=0;o<a.length;o++)i=In(i,a[o]);return i}function In(e,t){var n=t.indexOf("(");if(n<0)return'_f("'+t+'")('+e+")";var r=t.slice(0,n),o=t.slice(n+1);return'_f("'+r+'")('+e+(")"!==o?","+o:o)}function Ln(e){console.error("[Vue compiler]: "+e)}function Nn(e,t){return e?e.map(function(e){return e[t]}).filter(function(e){return e}):[]}function Pn(e,t,n){(e.props||(e.props=[])).push({name:t,value:n}),e.plain=!1}function Dn(e,t,n){(e.attrs||(e.attrs=[])).push({name:t,value:n}),e.plain=!1}function Rn(e,t,n){e.attrsMap[t]=n,e.attrsList.push({name:t,value:n})}function Bn(e,t,n,r,o,i){(e.directives||(e.directives=[])).push({name:t,rawName:n,value:r,arg:o,modifiers:i}),e.plain=!1}function Mn(e,t,n,r,o,i){r=r||li,"click"===t&&(r.right?(t="contextmenu",delete r.right):r.middle&&(t="mouseup")),r.capture&&(delete r.capture,t="!"+t),r.once&&(delete r.once,t="~"+t),r.passive&&(delete r.passive,t="&"+t);var a;r.native?(delete r.native,a=e.nativeEvents||(e.nativeEvents={})):a=e.events||(e.events={});var s={value:n.trim()};r!==li&&(s.modifiers=r);var c=a[t];Array.isArray(c)?o?c.unshift(s):c.push(s):a[t]=c?o?[s,c]:[c,s]:s,e.plain=!1}function Fn(e,t,n){var r=Un(e,":"+t)||Un(e,"v-bind:"+t);if(null!=r)return jn(r);if(!1!==n){var o=Un(e,t);if(null!=o)return JSON.stringify(o)}}function Un(e,t,n){var r;if(null!=(r=e.attrsMap[t]))for(var o=e.attrsList,i=0,a=o.length;i<a;i++)if(o[i].name===t){o.splice(i,1);break}return n&&delete e.attrsMap[t],r}function Hn(e,t,n){var r=n||{},o=r.number,i=r.trim,a="$$v";i&&(a="(typeof $$v === 'string'? $$v.trim(): $$v)"),o&&(a="_n("+a+")");var s=qn(t,a);e.model={value:"("+t+")",expression:JSON.stringify(t),callback:"function ($$v) {"+s+"}"}}function qn(e,t){var n=Vn(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function Vn(e){if(e=e.trim(),Da=e.length,e.indexOf("[")<0||e.lastIndexOf("]")<Da-1)return Ma=e.lastIndexOf("."),Ma>-1?{exp:e.slice(0,Ma),key:'"'+e.slice(Ma+1)+'"'}:{exp:e,key:null};for(Ra=e,Ma=Fa=Ua=0;!Jn();)Ba=zn(),Kn(Ba)?Wn(Ba):91===Ba&&Xn(Ba);return{exp:e.slice(0,Fa),key:e.slice(Fa+1,Ua)}}function zn(){return Ra.charCodeAt(++Ma)}function Jn(){return Ma>=Da}function Kn(e){return 34===e||39===e}function Xn(e){var t=1;for(Fa=Ma;!Jn();)if(e=zn(),Kn(e))Wn(e);else if(91===e&&t++,93===e&&t--,0===t){Ua=Ma;break}}function Wn(e){for(var t=e;!Jn()&&(e=zn())!==t;);}function Gn(e,t,n){Ha=n;var r=t.value,o=t.modifiers,i=e.tag,a=e.attrsMap.type;if(e.component)return Hn(e,r,o),!1;if("select"===i)Qn(e,r,o);else if("input"===i&&"checkbox"===a)Zn(e,r,o);else if("input"===i&&"radio"===a)Yn(e,r,o);else if("input"===i||"textarea"===i)er(e,r,o);else if(!Ti.isReservedTag(i))return Hn(e,r,o),!1;return!0}function Zn(e,t,n){var r=n&&n.number,o=Fn(e,"value")||"null",i=Fn(e,"true-value")||"true",a=Fn(e,"false-value")||"false";Pn(e,"checked","Array.isArray("+t+")?_i("+t+","+o+")>-1"+("true"===i?":("+t+")":":_q("+t+","+i+")")),Mn(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+i+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+o+")":o)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+qn(t,"$$a.concat([$$v])")+")}else{$$i>-1&&("+qn(t,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+qn(t,"$$c")+"}",null,!0)}function Yn(e,t,n){var r=n&&n.number,o=Fn(e,"value")||"null";o=r?"_n("+o+")":o,Pn(e,"checked","_q("+t+","+o+")"),Mn(e,"change",qn(t,o),null,!0)}function Qn(e,t,n){var r=n&&n.number,o='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(r?"_n(val)":"val")+"})",i="var $$selectedVal = "+o+";";i=i+" "+qn(t,"$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),Mn(e,"change",i,null,!0)}function er(e,t,n){var r=e.attrsMap.type,o=n||{},i=o.lazy,a=o.number,s=o.trim,c=!i&&"range"!==r,u=i?"change":"range"===r?ys:"input",f="$event.target.value";s&&(f="$event.target.value.trim()"),a&&(f="_n("+f+")");var l=qn(t,f);c&&(l="if($event.target.composing)return;"+l),Pn(e,"value","("+t+")"),Mn(e,u,l,null,!0),(s||a)&&Mn(e,"blur","$forceUpdate()")}function tr(e){if(o(e[ys])){var t=Ni?"change":"input";e[t]=[].concat(e[ys],e[t]||[]),delete e[ys]}o(e[gs])&&(e.change=[].concat(e[gs],e.change||[]),delete e[gs])}function nr(e,t,n){var r=qa;return function o(){null!==t.apply(null,arguments)&&or(e,o,n,r)}}function rr(e,t,n,r){t=ce(t),qa.addEventListener(e,t,Mi?{capture:n,passive:r}:n)}function or(e,t,n,r){(r||qa).removeEventListener(e,t._withTask||t,n)}function ir(e,t){if(!r(e.data.on)||!r(t.data.on)){var n=t.data.on||{},o=e.data.on||{};qa=t.elm,tr(n),de(n,o,rr,or,nr,t.context),qa=void 0}}function ar(e,t){if(!r(e.data.domProps)||!r(t.data.domProps)){var n,i,a=t.elm,s=e.data.domProps||{},c=t.data.domProps||{};o(c.__ob__)&&(c=t.data.domProps=w({},c));for(n in s)r(c[n])&&(a[n]="");for(n in c){if(i=c[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),i===s[n])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===n){a._value=i;var u=r(i)?"":String(i);sr(a,u)&&(a.value=u)}else a[n]=i}}}function sr(e,t){return!e.composing&&("OPTION"===e.tagName||cr(e,t)||ur(e,t))}function cr(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}function ur(e,t){var n=e.value,r=e._vModifiers;if(o(r)){if(r.lazy)return!1;if(r.number)return d(n)!==d(t);if(r.trim)return n.trim()!==t.trim()}return n!==t}function fr(e){var t=lr(e.style);return e.staticStyle?w(e.staticStyle,t):t}function lr(e){return Array.isArray(e)?x(e):"string"==typeof e?ws(e):e}function pr(e,t){var n,r={};if(t)for(var o=e;o.componentInstance;)(o=o.componentInstance._vnode)&&o.data&&(n=fr(o.data))&&w(r,n);(n=fr(e.data))&&w(r,n);for(var i=e;i=i.parent;)i.data&&(n=fr(i.data))&&w(r,n);return r}function dr(e,t){var n=t.data,i=e.data;if(!(r(n.staticStyle)&&r(n.style)&&r(i.staticStyle)&&r(i.style))){var a,s,c=t.elm,u=i.staticStyle,f=i.normalizedStyle||i.style||{},l=u||f,p=lr(t.data.style)||{};t.data.normalizedStyle=o(p.__ob__)?w({},p):p;var d=pr(t,!0);for(s in l)r(d[s])&&$s(c,s,"");for(s in d)(a=d[s])!==l[s]&&$s(c,s,null==a?"":a)}}function hr(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(Os).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function vr(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(Os).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");n=n.trim(),n?e.setAttribute("class",n):e.removeAttribute("class")}}function mr(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&w(t,Ss(e.name||"v")),w(t,e),t}return"string"==typeof e?Ss(e):void 0}}function yr(e){Rs(function(){Rs(e)})}function gr(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),hr(e,t))}function br(e,t){e._transitionClasses&&v(e._transitionClasses,t),vr(e,t)}function _r(e,t,n){var r=wr(e,t),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===js?Ns:Ds,c=0,u=function(){e.removeEventListener(s,f),n()},f=function(t){t.target===e&&++c>=a&&u()};setTimeout(function(){c<a&&u()},i+1),e.addEventListener(s,f)}function wr(e,t){var n,r=window.getComputedStyle(e),o=(r[Ls+"Delay"]||"").split(", "),i=(r[Ls+"Duration"]||"").split(", "),a=xr(o,i),s=(r[Ps+"Delay"]||"").split(", "),c=(r[Ps+"Duration"]||"").split(", "),u=xr(s,c),f=0,l=0;return t===js?a>0&&(n=js,f=a,l=i.length):t===Is?u>0&&(n=Is,f=u,l=c.length):(f=Math.max(a,u),n=f>0?a>u?js:Is:null,l=n?n===js?i.length:c.length:0),{type:n,timeout:f,propCount:l,hasTransform:n===js&&Bs.test(r[Ls+"Property"])}}function xr(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max.apply(null,t.map(function(t,n){return Cr(t)+Cr(e[n])}))}function Cr(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function $r(e,t){var n=e.elm;o(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var i=mr(e.data.transition);if(!r(i)&&!o(n._enterCb)&&1===n.nodeType){for(var a=i.css,s=i.type,u=i.enterClass,f=i.enterToClass,l=i.enterActiveClass,p=i.appearClass,h=i.appearToClass,v=i.appearActiveClass,m=i.beforeEnter,y=i.enter,g=i.afterEnter,b=i.enterCancelled,_=i.beforeAppear,w=i.appear,x=i.afterAppear,C=i.appearCancelled,$=i.duration,A=ya,T=ya.$vnode;T&&T.parent;)T=T.parent,A=T.context;var O=!A._isMounted||!e.isRootInsert;if(!O||w||""===w){var S=O&&p?p:u,E=O&&v?v:l,j=O&&h?h:f,I=O?_||m:m,L=O&&"function"==typeof w?w:y,N=O?x||g:g,P=O?C||b:b,D=d(c($)?$.enter:$),R=!1!==a&&!Pi,B=Tr(L),M=n._enterCb=k(function(){R&&(br(n,j),br(n,E)),M.cancelled?(R&&br(n,S),P&&P(n)):N&&N(n),n._enterCb=null});e.data.show||he(e,"insert",function(){var t=n.parentNode,r=t&&t._pending&&t._pending[e.key];r&&r.tag===e.tag&&r.elm._leaveCb&&r.elm._leaveCb(),L&&L(n,M)}),I&&I(n),R&&(gr(n,S),gr(n,E),yr(function(){br(n,S),M.cancelled||(gr(n,j),B||(kr(D)?setTimeout(M,D):_r(n,s,M)))})),e.data.show&&(t&&t(),L&&L(n,M)),R||B||M()}}}function Ar(e,t){function n(){C.cancelled||(!e.data.show&&i.parentNode&&((i.parentNode._pending||(i.parentNode._pending={}))[e.key]=e),h&&h(i),_&&(gr(i,f),gr(i,p),yr(function(){br(i,f),C.cancelled||(gr(i,l),w||(kr(x)?setTimeout(C,x):_r(i,u,C)))})),v&&v(i,C),_||w||C())}var i=e.elm;o(i._enterCb)&&(i._enterCb.cancelled=!0,i._enterCb());var a=mr(e.data.transition);if(r(a)||1!==i.nodeType)return t();if(!o(i._leaveCb)){var s=a.css,u=a.type,f=a.leaveClass,l=a.leaveToClass,p=a.leaveActiveClass,h=a.beforeLeave,v=a.leave,m=a.afterLeave,y=a.leaveCancelled,g=a.delayLeave,b=a.duration,_=!1!==s&&!Pi,w=Tr(v),x=d(c(b)?b.leave:b),C=i._leaveCb=k(function(){i.parentNode&&i.parentNode._pending&&(i.parentNode._pending[e.key]=null),_&&(br(i,l),br(i,p)),C.cancelled?(_&&br(i,f),y&&y(i)):(t(),m&&m(i)),i._leaveCb=null});g?g(n):n()}}function kr(e){return"number"==typeof e&&!isNaN(e)}function Tr(e){if(r(e))return!1;var t=e.fns;return o(t)?Tr(Array.isArray(t)?t[0]:t):(e._length||e.length)>1}function Or(e,t){!0!==t.data.show&&$r(t)}function Sr(e,t,n){Er(e,t,n),(Ni||Di)&&setTimeout(function(){Er(e,t,n)},0)}function Er(e,t,n){var r=t.value,o=e.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,c=e.options.length;s<c;s++)if(a=e.options[s],o)i=A(r,Ir(a))>-1,a.selected!==i&&(a.selected=i);else if($(Ir(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));o||(e.selectedIndex=-1)}}function jr(e,t){return t.every(function(t){return!$(t,e)})}function Ir(e){return"_value"in e?e._value:e.value}function Lr(e){e.target.composing=!0}function Nr(e){e.target.composing&&(e.target.composing=!1,Pr(e.target,"input"))}function Pr(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function Dr(e){return!e.componentInstance||e.data&&e.data.transition?e:Dr(e.componentInstance._vnode)}function Rr(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?Rr(Ae(t.children)):e}function Br(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var o=n._parentListeners;for(var i in o)t[yi(i)]=o[i];return t}function Mr(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}function Fr(e){for(;e=e.parent;)if(e.data.transition)return!0}function Ur(e,t){return t.key===e.key&&t.tag===e.tag}function Hr(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function qr(e){e.data.newPos=e.elm.getBoundingClientRect()}function Vr(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,o=t.top-n.top;if(r||o){e.data.moved=!0;var i=e.elm.style;i.transform=i.WebkitTransform="translate("+r+"px,"+o+"px)",i.transitionDuration="0s"}}function zr(e,t){var n=t?dc(t):lc;if(n.test(e)){for(var r,o,i,a=[],s=[],c=n.lastIndex=0;r=n.exec(e);){(o=r.index)>c&&(s.push(i=e.slice(c,o)),a.push(JSON.stringify(i)));var u=jn(r[1].trim());a.push("_s("+u+")"),s.push({"@binding":u}),c=o+r[0].length}return c<e.length&&(s.push(i=e.slice(c)),a.push(JSON.stringify(i))),{expression:a.join("+"),tokens:s}}}function Jr(e,t){var n=(t.warn,Un(e,"class"));n&&(e.staticClass=JSON.stringify(n));var r=Fn(e,"class",!1);r&&(e.classBinding=r)}function Kr(e){var t="";return e.staticClass&&(t+="staticClass:"+e.staticClass+","),e.classBinding&&(t+="class:"+e.classBinding+","),t}function Xr(e,t){var n=(t.warn,Un(e,"style"));n&&(e.staticStyle=JSON.stringify(ws(n)));var r=Fn(e,"style",!1);r&&(e.styleBinding=r)}function Wr(e){var t="";return e.staticStyle&&(t+="staticStyle:"+e.staticStyle+","),e.styleBinding&&(t+="style:("+e.styleBinding+"),"),t}function Gr(e,t){var n=t?Lc:Ic;return e.replace(n,function(e){return jc[e]})}function Zr(e,t){function n(t){f+=t,e=e.substring(t)}function r(e,n,r){var o,s;if(null==n&&(n=f),null==r&&(r=f),e)for(s=e.toLowerCase(),o=a.length-1;o>=0&&a[o].lowerCasedTag!==s;o--);else o=0;if(o>=0){for(var c=a.length-1;c>=o;c--)t.end&&t.end(a[c].tag,n,r);a.length=o,i=o&&a[o-1].tag}else"br"===s?t.start&&t.start(e,[],!0,n,r):"p"===s&&(t.start&&t.start(e,[],!1,n,r),t.end&&t.end(e,n,r))}for(var o,i,a=[],s=t.expectHTML,c=t.isUnaryTag||xi,u=t.canBeLeftOpenTag||xi,f=0;e;){if(o=e,i&&Sc(i)){var l=0,p=i.toLowerCase(),d=Ec[p]||(Ec[p]=new RegExp("([\\s\\S]*?)(</"+p+"[^>]*>)","i")),h=e.replace(d,function(e,n,r){return l=r.length,Sc(p)||"noscript"===p||(n=n.replace(/<!\--([\s\S]*?)-->/g,"$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g,"$1")),Pc(p,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""});f+=e.length-h.length,e=h,r(p,f-l,f)}else{var v=e.indexOf("<");if(0===v){if(Tc.test(e)){var m=e.indexOf("--\x3e");if(m>=0){t.shouldKeepComment&&t.comment(e.substring(4,m)),n(m+3);continue}}if(Oc.test(e)){var y=e.indexOf("]>");if(y>=0){n(y+2);continue}}var g=e.match(kc);if(g){n(g[0].length);continue}var b=e.match(Ac);if(b){var _=f;n(b[0].length),r(b[1],_,f);continue}var w=function(){var t=e.match(Cc);if(t){var r={tagName:t[1],attrs:[],start:f};n(t[0].length);for(var o,i;!(o=e.match($c))&&(i=e.match(_c));)n(i[0].length),r.attrs.push(i);if(o)return r.unarySlash=o[1],n(o[0].length),r.end=f,r}}();if(w){!function(e){var n=e.tagName,o=e.unarySlash;s&&("p"===i&&bc(n)&&r(i),u(n)&&i===n&&r(n));for(var f=c(n)||!!o,l=e.attrs.length,p=new Array(l),d=0;d<l;d++){var h=e.attrs[d],v=h[3]||h[4]||h[5]||"",m="a"===n&&"href"===h[1]?t.shouldDecodeNewlinesForHref:t.shouldDecodeNewlines;p[d]={name:h[1],value:Gr(v,m)}}f||(a.push({tag:n,lowerCasedTag:n.toLowerCase(),attrs:p}),i=n),t.start&&t.start(n,p,f,e.start,e.end)}(w),Pc(w.tagName,e)&&n(1);continue}}var x=void 0,C=void 0,$=void 0;if(v>=0){for(C=e.slice(v);!(Ac.test(C)||Cc.test(C)||Tc.test(C)||Oc.test(C)||($=C.indexOf("<",1))<0);)v+=$,C=e.slice(v);x=e.substring(0,v),n(v)}v<0&&(x=e,e=""),t.chars&&x&&t.chars(x)}if(e===o){t.chars&&t.chars(e);break}}r()}function Yr(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:go(t),parent:n,children:[]}}function Qr(e,t){function n(e){e.pre&&(s=!1),ic(e.tag)&&(c=!1);for(var n=0;n<oc.length;n++)oc[n](e,t)}ec=t.warn||Ln,ic=t.isPreTag||xi,ac=t.mustUseProp||xi,sc=t.getTagNamespace||xi,nc=Nn(t.modules,"transformNode"),rc=Nn(t.modules,"preTransformNode"),oc=Nn(t.modules,"postTransformNode"),tc=t.delimiters;var r,o,i=[],a=!1!==t.preserveWhitespace,s=!1,c=!1;return Zr(e,{warn:ec,expectHTML:t.expectHTML,isUnaryTag:t.isUnaryTag,canBeLeftOpenTag:t.canBeLeftOpenTag,shouldDecodeNewlines:t.shouldDecodeNewlines,shouldDecodeNewlinesForHref:t.shouldDecodeNewlinesForHref,shouldKeepComment:t.comments,start:function(e,a,u){var f=o&&o.ns||sc(e);Ni&&"svg"===f&&(a=wo(a));var l=Yr(e,a,o);f&&(l.ns=f),_o(l)&&!qi()&&(l.forbidden=!0);for(var p=0;p<rc.length;p++)l=rc[p](l,t)||l;if(s||(eo(l),l.pre&&(s=!0)),ic(l.tag)&&(c=!0),s?to(l):l.processed||(io(l),so(l),lo(l),no(l,t)),r?i.length||r.if&&(l.elseif||l.else)&&fo(r,{exp:l.elseif,block:l}):r=l,o&&!l.forbidden)if(l.elseif||l.else)co(l,o);else if(l.slotScope){o.plain=!1;var d=l.slotTarget||'"default"';(o.scopedSlots||(o.scopedSlots={}))[d]=l}else o.children.push(l),l.parent=o;u?n(l):(o=l,i.push(l))},end:function(){var e=i[i.length-1],t=e.children[e.children.length-1];t&&3===t.type&&" "===t.text&&!c&&e.children.pop(),i.length-=1,o=i[i.length-1],n(e)},chars:function(e){if(o&&(!Ni||"textarea"!==o.tag||o.attrsMap.placeholder!==e)){var t=o.children;if(e=c||e.trim()?bo(o)?e:Vc(e):a&&t.length?" ":""){var n;!s&&" "!==e&&(n=zr(e,tc))?t.push({type:2,expression:n.expression,tokens:n.tokens,text:e}):" "===e&&t.length&&" "===t[t.length-1].text||t.push({type:3,text:e})}}},comment:function(e){o.children.push({type:3,text:e,isComment:!0})}}),r}function eo(e){null!=Un(e,"v-pre")&&(e.pre=!0)}function to(e){var t=e.attrsList.length;if(t)for(var n=e.attrs=new Array(t),r=0;r<t;r++)n[r]={name:e.attrsList[r].name,value:JSON.stringify(e.attrsList[r].value)};else e.pre||(e.plain=!0)}function no(e,t){ro(e),e.plain=!e.key&&!e.attrsList.length,oo(e),po(e),ho(e);for(var n=0;n<nc.length;n++)e=nc[n](e,t)||e;vo(e)}function ro(e){var t=Fn(e,"key");t&&(e.key=t)}function oo(e){var t=Fn(e,"ref");t&&(e.ref=t,e.refInFor=mo(e))}function io(e){var t;if(t=Un(e,"v-for")){var n=ao(t);n&&w(e,n)}}function ao(e){var t=e.match(Bc);if(t){var n={};n.for=t[2].trim();var r=t[1].trim().replace(Fc,""),o=r.match(Mc);return o?(n.alias=r.replace(Mc,"").trim(),n.iterator1=o[1].trim(),o[2]&&(n.iterator2=o[2].trim())):n.alias=r,n}}function so(e){var t=Un(e,"v-if");if(t)e.if=t,fo(e,{exp:t,block:e});else{null!=Un(e,"v-else")&&(e.else=!0);var n=Un(e,"v-else-if");n&&(e.elseif=n)}}function co(e,t){var n=uo(t.children);n&&n.if&&fo(n,{exp:e.elseif,block:e})}function uo(e){for(var t=e.length;t--;){if(1===e[t].type)return e[t];e.pop()}}function fo(e,t){e.ifConditions||(e.ifConditions=[]),e.ifConditions.push(t)}function lo(e){null!=Un(e,"v-once")&&(e.once=!0)}function po(e){if("slot"===e.tag)e.slotName=Fn(e,"name");else{var t;"template"===e.tag?(t=Un(e,"scope"),e.slotScope=t||Un(e,"slot-scope")):(t=Un(e,"slot-scope"))&&(e.slotScope=t);var n=Fn(e,"slot");n&&(e.slotTarget='""'===n?'"default"':n,"template"===e.tag||e.slotScope||Dn(e,"slot",n))}}function ho(e){var t;(t=Fn(e,"is"))&&(e.component=t),null!=Un(e,"inline-template")&&(e.inlineTemplate=!0)}function vo(e){var t,n,r,o,i,a,s,c=e.attrsList;for(t=0,n=c.length;t<n;t++)if(r=o=c[t].name,i=c[t].value,Rc.test(r))if(e.hasBindings=!0,a=yo(r),a&&(r=r.replace(qc,"")),Hc.test(r))r=r.replace(Hc,""),i=jn(i),s=!1,a&&(a.prop&&(s=!0,"innerHtml"===(r=yi(r))&&(r="innerHTML")),a.camel&&(r=yi(r)),a.sync&&Mn(e,"update:"+yi(r),qn(i,"$event"))),s||!e.component&&ac(e.tag,e.attrsMap.type,r)?Pn(e,r,i):Dn(e,r,i);else if(Dc.test(r))r=r.replace(Dc,""),Mn(e,r,i,a,!1,ec);else{r=r.replace(Rc,"");var u=r.match(Uc),f=u&&u[1];f&&(r=r.slice(0,-(f.length+1))),Bn(e,r,o,i,f,a)}else Dn(e,r,JSON.stringify(i)),!e.component&&"muted"===r&&ac(e.tag,e.attrsMap.type,r)&&Pn(e,r,"true")}function mo(e){for(var t=e;t;){if(void 0!==t.for)return!0;t=t.parent}return!1}function yo(e){var t=e.match(qc);if(t){var n={};return t.forEach(function(e){n[e.slice(1)]=!0}),n}}function go(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n].name]=e[n].value;return t}function bo(e){return"script"===e.tag||"style"===e.tag}function _o(e){return"style"===e.tag||"script"===e.tag&&(!e.attrsMap.type||"text/javascript"===e.attrsMap.type)}function wo(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];zc.test(r.name)||(r.name=r.name.replace(Jc,""),t.push(r))}return t}function xo(e,t){if("input"===e.tag){var n=e.attrsMap;if(!n["v-model"])return;var r;if((n[":type"]||n["v-bind:type"])&&(r=Fn(e,"type")),n.type||r||!n["v-bind"]||(r="("+n["v-bind"]+").type"),r){var o=Un(e,"v-if",!0),i=o?"&&("+o+")":"",a=null!=Un(e,"v-else",!0),s=Un(e,"v-else-if",!0),c=Co(e);io(c),Rn(c,"type","checkbox"),no(c,t),c.processed=!0,c.if="("+r+")==='checkbox'"+i,fo(c,{exp:c.if,block:c});var u=Co(e);Un(u,"v-for",!0),Rn(u,"type","radio"),no(u,t),fo(c,{exp:"("+r+")==='radio'"+i,block:u});var f=Co(e);return Un(f,"v-for",!0),Rn(f,":type",r),no(f,t),fo(c,{exp:o,block:f}),a?c.else=!0:s&&(c.elseif=s),c}}}function Co(e){return Yr(e.tag,e.attrsList.slice(),e.parent)}function $o(e,t){t.value&&Pn(e,"textContent","_s("+t.value+")")}function Ao(e,t){t.value&&Pn(e,"innerHTML","_s("+t.value+")")}function ko(e,t){e&&(cc=Zc(t.staticKeys||""),uc=t.isReservedTag||xi,Oo(e),So(e,!1))}function To(e){return h("type,tag,attrsList,attrsMap,plain,parent,children,attrs"+(e?","+e:""))}function Oo(e){if(e.static=Eo(e),1===e.type){if(!uc(e.tag)&&"slot"!==e.tag&&null==e.attrsMap["inline-template"])return;for(var t=0,n=e.children.length;t<n;t++){var r=e.children[t];Oo(r),r.static||(e.static=!1)}if(e.ifConditions)for(var o=1,i=e.ifConditions.length;o<i;o++){var a=e.ifConditions[o].block;Oo(a),a.static||(e.static=!1)}}}function So(e,t){if(1===e.type){if((e.static||e.once)&&(e.staticInFor=t),e.static&&e.children.length&&(1!==e.children.length||3!==e.children[0].type))return void(e.staticRoot=!0);if(e.staticRoot=!1,e.children)for(var n=0,r=e.children.length;n<r;n++)So(e.children[n],t||!!e.for);if(e.ifConditions)for(var o=1,i=e.ifConditions.length;o<i;o++)So(e.ifConditions[o].block,t)}}function Eo(e){return 2!==e.type&&(3===e.type||!(!e.pre&&(e.hasBindings||e.if||e.for||di(e.tag)||!uc(e.tag)||jo(e)||!Object.keys(e).every(cc))))}function jo(e){for(;e.parent;){if(e=e.parent,"template"!==e.tag)return!1;if(e.for)return!0}return!1}function Io(e,t){var n=t?"nativeOn:{":"on:{";for(var r in e)n+='"'+r+'":'+Lo(r,e[r])+",";return n.slice(0,-1)+"}"}function Lo(e,t){if(!t)return"function(){}";if(Array.isArray(t))return"["+t.map(function(t){return Lo(e,t)}).join(",")+"]";var n=Qc.test(t.value),r=Yc.test(t.value);if(t.modifiers){var o="",i="",a=[];for(var s in t.modifiers)if(ru[s])i+=ru[s],eu[s]&&a.push(s);else if("exact"===s){var c=t.modifiers;i+=nu(["ctrl","shift","alt","meta"].filter(function(e){return!c[e]}).map(function(e){return"$event."+e+"Key"}).join("||"))}else a.push(s);return a.length&&(o+=No(a)),i&&(o+=i),"function($event){"+o+(n?"return "+t.value+"($event)":r?"return ("+t.value+")($event)":t.value)+"}"}return n||r?t.value:"function($event){"+t.value+"}"}function No(e){return"if(!('button' in $event)&&"+e.map(Po).join("&&")+")return null;"}function Po(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=eu[e],r=tu[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}function Do(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}}function Ro(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}}function Bo(e,t){var n=new iu(t);return{render:"with(this){return "+(e?Mo(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function Mo(e,t){if(e.parent&&(e.pre=e.pre||e.parent.pre),e.staticRoot&&!e.staticProcessed)return Fo(e,t);if(e.once&&!e.onceProcessed)return Uo(e,t);if(e.for&&!e.forProcessed)return Vo(e,t);if(e.if&&!e.ifProcessed)return Ho(e,t);if("template"!==e.tag||e.slotTarget||t.pre){if("slot"===e.tag)return ri(e,t);var n;if(e.component)n=oi(e.component,e,t);else{var r;(!e.plain||e.pre&&t.maybeComponent(e))&&(r=zo(e,t));var o=e.inlineTemplate?null:Zo(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(o?","+o:"")+")"}for(var i=0;i<t.transforms.length;i++)n=t.transforms[i](e,n);return n}return Zo(e,t)||"void 0"}function Fo(e,t){e.staticProcessed=!0;var n=t.pre;return e.pre&&(t.pre=e.pre),t.staticRenderFns.push("with(this){return "+Mo(e,t)+"}"),t.pre=n,"_m("+(t.staticRenderFns.length-1)+(e.staticInFor?",true":"")+")"}function Uo(e,t){if(e.onceProcessed=!0,e.if&&!e.ifProcessed)return Ho(e,t);if(e.staticInFor){for(var n="",r=e.parent;r;){if(r.for){n=r.key;break}r=r.parent}return n?"_o("+Mo(e,t)+","+t.onceId+++","+n+")":Mo(e,t)}return Fo(e,t)}function Ho(e,t,n,r){return e.ifProcessed=!0,qo(e.ifConditions.slice(),t,n,r)}function qo(e,t,n,r){function o(e){return n?n(e,t):e.once?Uo(e,t):Mo(e,t)}if(!e.length)return r||"_e()";var i=e.shift();return i.exp?"("+i.exp+")?"+o(i.block)+":"+qo(e,t,n,r):""+o(i.block)}function Vo(e,t,n,r){var o=e.for,i=e.alias,a=e.iterator1?","+e.iterator1:"",s=e.iterator2?","+e.iterator2:"";return e.forProcessed=!0,(r||"_l")+"(("+o+"),function("+i+a+s+"){return "+(n||Mo)(e,t)+"})"}function zo(e,t){var n="{",r=Jo(e,t);r&&(n+=r+","),e.key&&(n+="key:"+e.key+","),e.ref&&(n+="ref:"+e.ref+","),e.refInFor&&(n+="refInFor:true,"),e.pre&&(n+="pre:true,"),e.component&&(n+='tag:"'+e.tag+'",');for(var o=0;o<t.dataGenFns.length;o++)n+=t.dataGenFns[o](e);if(e.attrs&&(n+="attrs:{"+ii(e.attrs)+"},"),e.props&&(n+="domProps:{"+ii(e.props)+"},"),e.events&&(n+=Io(e.events,!1)+","),e.nativeEvents&&(n+=Io(e.nativeEvents,!0)+","),e.slotTarget&&!e.slotScope&&(n+="slot:"+e.slotTarget+","),e.scopedSlots&&(n+=Xo(e.scopedSlots,t)+","),e.model&&(n+="model:{value:"+e.model.value+",callback:"+e.model.callback+",expression:"+e.model.expression+"},"),e.inlineTemplate){var i=Ko(e,t);i&&(n+=i+",")}return n=n.replace(/,$/,"")+"}",e.wrapData&&(n=e.wrapData(n)),e.wrapListeners&&(n=e.wrapListeners(n)),n}function Jo(e,t){var n=e.directives;if(n){var r,o,i,a,s="directives:[",c=!1;for(r=0,o=n.length;r<o;r++){i=n[r],a=!0;var u=t.directives[i.name];u&&(a=!!u(e,i,t.warn)),a&&(c=!0,s+='{name:"'+i.name+'",rawName:"'+i.rawName+'"'+(i.value?",value:("+i.value+"),expression:"+JSON.stringify(i.value):"")+(i.arg?',arg:"'+i.arg+'"':"")+(i.modifiers?",modifiers:"+JSON.stringify(i.modifiers):"")+"},")}return c?s.slice(0,-1)+"]":void 0}}function Ko(e,t){var n=e.children[0];if(1===n.type){var r=Bo(n,t.options);return"inlineTemplate:{render:function(){"+r.render+"},staticRenderFns:["+r.staticRenderFns.map(function(e){return"function(){"+e+"}"}).join(",")+"]}"}}function Xo(e,t){return"scopedSlots:_u(["+Object.keys(e).map(function(n){return Wo(n,e[n],t)}).join(",")+"])"}function Wo(e,t,n){return t.for&&!t.forProcessed?Go(e,t,n):"{key:"+e+",fn:function("+String(t.slotScope)+"){return "+("template"===t.tag?t.if?"("+t.if+")?"+(Zo(t,n)||"undefined")+":undefined":Zo(t,n)||"undefined":Mo(t,n))+"}}"}function Go(e,t,n){var r=t.for,o=t.alias,i=t.iterator1?","+t.iterator1:"",a=t.iterator2?","+t.iterator2:"";return t.forProcessed=!0,"_l(("+r+"),function("+o+i+a+"){return "+Wo(e,t,n)+"})"}function Zo(e,t,n,r,o){var i=e.children;if(i.length){var a=i[0];if(1===i.length&&a.for&&"template"!==a.tag&&"slot"!==a.tag){var s=n?t.maybeComponent(a)?",1":",0":"";return""+(r||Mo)(a,t)+s}var c=n?Yo(i,t.maybeComponent):0,u=o||ei;return"["+i.map(function(e){return u(e,t)}).join(",")+"]"+(c?","+c:"")}}function Yo(e,t){for(var n=0,r=0;r<e.length;r++){var o=e[r];if(1===o.type){if(Qo(o)||o.ifConditions&&o.ifConditions.some(function(e){return Qo(e.block)})){n=2;break}(t(o)||o.ifConditions&&o.ifConditions.some(function(e){return t(e.block)}))&&(n=1)}}return n}function Qo(e){return void 0!==e.for||"template"===e.tag||"slot"===e.tag}function ei(e,t){return 1===e.type?Mo(e,t):3===e.type&&e.isComment?ni(e):ti(e)}function ti(e){return"_v("+(2===e.type?e.expression:ai(JSON.stringify(e.text)))+")"}function ni(e){return"_e("+JSON.stringify(e.text)+")"}function ri(e,t){var n=e.slotName||'"default"',r=Zo(e,t),o="_t("+n+(r?","+r:""),i=e.attrs&&"{"+e.attrs.map(function(e){return yi(e.name)+":"+e.value}).join(",")+"}",a=e.attrsMap["v-bind"];return!i&&!a||r||(o+=",null"),i&&(o+=","+i),a&&(o+=(i?"":",null")+","+a),o+")"}function oi(e,t,n){var r=t.inlineTemplate?null:Zo(t,n,!0);return"_c("+e+","+zo(t,n)+(r?","+r:"")+")"}function ii(e){for(var t="",n=0;n<e.length;n++){var r=e[n];t+='"'+r.name+'":'+ai(r.value)+","}return t.slice(0,-1)}function ai(e){return e.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function si(e,t){try{return new Function(e)}catch(n){return t.push({err:n,code:e}),C}}function ci(e){var t=Object.create(null);return function(n,r,o){r=w({},r),r.warn,delete r.warn;var i=r.delimiters?String(r.delimiters)+n:n;if(t[i])return t[i];var a=e(n,r),s={},c=[];return s.render=si(a.render,c),s.staticRenderFns=a.staticRenderFns.map(function(e){return si(e,c)}),t[i]=s}}function ui(e){return fc=fc||document.createElement("div"),fc.innerHTML=e?'<a href="\n"/>':'<div a="\n"/>',fc.innerHTML.indexOf("&#10;")>0}function fi(e){if(e.outerHTML)return e.outerHTML;var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML}/*!
2
- * Vue.js v2.5.22
3
- * (c) 2014-2019 Evan You
4
- * Released under the MIT License.
5
- */
6
- var li=Object.freeze({}),pi=Object.prototype.toString,di=h("slot,component",!0),hi=h("key,ref,slot,slot-scope,is"),vi=Object.prototype.hasOwnProperty,mi=/-(\w)/g,yi=y(function(e){return e.replace(mi,function(e,t){return t?t.toUpperCase():""})}),gi=y(function(e){return e.charAt(0).toUpperCase()+e.slice(1)}),bi=/\B([A-Z])/g,_i=y(function(e){return e.replace(bi,"-$1").toLowerCase()}),wi=Function.prototype.bind?b:g,xi=function(e,t,n){return!1},Ci=function(e){return e},$i="data-server-rendered",Ai=["component","directive","filter"],ki=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured"],Ti={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!1,devtools:!1,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:xi,isReservedAttr:xi,isUnknownElement:xi,getTagNamespace:C,parsePlatformTagName:Ci,mustUseProp:xi,async:!0,_lifecycleHooks:ki},Oi=/[^\w.$]/,Si="__proto__"in{},Ei="undefined"!=typeof window,ji="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,Ii=ji&&WXEnvironment.platform.toLowerCase(),Li=Ei&&window.navigator.userAgent.toLowerCase(),Ni=Li&&/msie|trident/.test(Li),Pi=Li&&Li.indexOf("msie 9.0")>0,Di=Li&&Li.indexOf("edge/")>0,Ri=(Li&&Li.indexOf("android"),Li&&/iphone|ipad|ipod|ios/.test(Li)||"ios"===Ii),Bi=(Li&&/chrome\/\d+/.test(Li),{}.watch),Mi=!1;if(Ei)try{var Fi={};Object.defineProperty(Fi,"passive",{get:function(){Mi=!0}}),window.addEventListener("test-passive",null,Fi)}catch(e){}var Ui,Hi,qi=function(){return void 0===Ui&&(Ui=!Ei&&!ji&&void 0!==e&&e.process&&"server"===e.process.env.VUE_ENV),Ui},Vi=Ei&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,zi="undefined"!=typeof Symbol&&E(Symbol)&&"undefined"!=typeof Reflect&&E(Reflect.ownKeys);Hi="undefined"!=typeof Set&&E(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var Ji=C,Ki=0,Xi=function(){this.id=Ki++,this.subs=[]};Xi.prototype.addSub=function(e){this.subs.push(e)},Xi.prototype.removeSub=function(e){v(this.subs,e)},Xi.prototype.depend=function(){Xi.target&&Xi.target.addDep(this)},Xi.prototype.notify=function(){for(var e=this.subs.slice(),t=0,n=e.length;t<n;t++)e[t].update()},Xi.target=null;var Wi=[],Gi=function(e,t,n,r,o,i,a,s){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},Zi={child:{configurable:!0}};Zi.child.get=function(){return this.componentInstance},Object.defineProperties(Gi.prototype,Zi);var Yi=function(e){void 0===e&&(e="");var t=new Gi;return t.text=e,t.isComment=!0,t},Qi=Array.prototype,ea=Object.create(Qi);["push","pop","shift","unshift","splice","sort","reverse"].forEach(function(e){var t=Qi[e];O(ea,e,function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];var o,i=t.apply(this,n),a=this.__ob__;switch(e){case"push":case"unshift":o=n;break;case"splice":o=n.slice(2)}return o&&a.observeArray(o),a.dep.notify(),i})});var ta=Object.getOwnPropertyNames(ea),na=!0,ra=function(e){this.value=e,this.dep=new Xi,this.vmCount=0,O(e,"__ob__",this),Array.isArray(e)?(Si?D(e,ea):R(e,ea,ta),this.observeArray(e)):this.walk(e)};ra.prototype.walk=function(e){for(var t=Object.keys(e),n=0;n<t.length;n++)M(e,t[n])},ra.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)B(e[t])};var oa=Ti.optionMergeStrategies;oa.data=function(e,t,n){return n?V(e,t,n):t&&"function"!=typeof t?e:V(e,t)},ki.forEach(function(e){oa[e]=z}),Ai.forEach(function(e){oa[e+"s"]=K}),oa.watch=function(e,t,n,r){if(e===Bi&&(e=void 0),t===Bi&&(t=void 0),!t)return Object.create(e||null);if(!e)return t;var o={};w(o,e);for(var i in t){var a=o[i],s=t[i];a&&!Array.isArray(a)&&(a=[a]),o[i]=a?a.concat(s):Array.isArray(s)?s:[s]}return o},oa.props=oa.methods=oa.inject=oa.computed=function(e,t,n,r){if(!e)return t;var o=Object.create(null);return w(o,e),t&&w(o,t),o},oa.provide=V;var ia,aa,sa=function(e,t){return void 0===t?e:t},ca=[],ua=!1,fa=!1;if(void 0!==n&&E(n))aa=function(){n(se)};else if("undefined"==typeof MessageChannel||!E(MessageChannel)&&"[object MessageChannelConstructor]"!==MessageChannel.toString())aa=function(){setTimeout(se,0)};else{var la=new MessageChannel,pa=la.port2;la.port1.onmessage=se,aa=function(){pa.postMessage(1)}}if("undefined"!=typeof Promise&&E(Promise)){var da=Promise.resolve();ia=function(){da.then(se),Ri&&setTimeout(C)}}else ia=aa;var ha,va=new Hi,ma=y(function(e){var t="&"===e.charAt(0);e=t?e.slice(1):e;var n="~"===e.charAt(0);e=n?e.slice(1):e;var r="!"===e.charAt(0);return e=r?e.slice(1):e,{name:e,once:n,capture:r,passive:t}}),ya=null,ga=[],ba=[],_a={},wa=!1,xa=!1,Ca=0,$a=0,Aa=function(e,t,n,r,o){this.vm=e,o&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++$a,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new Hi,this.newDepIds=new Hi,this.expression="","function"==typeof t?this.getter=t:(this.getter=S(t),this.getter||(this.getter=C)),this.value=this.lazy?void 0:this.get()};Aa.prototype.get=function(){j(this);var e,t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;oe(e,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&fe(e),I(),this.cleanupDeps()}return e},Aa.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},Aa.prototype.cleanupDeps=function(){for(var e=this.deps.length;e--;){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},Aa.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():Ke(this)},Aa.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||c(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){oe(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},Aa.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},Aa.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},Aa.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||v(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var ka={enumerable:!0,configurable:!0,get:C,set:C},Ta={lazy:!0};_t(wt.prototype);var Oa={init:function(e,t){if(e.componentInstance&&!e.componentInstance._isDestroyed&&e.data.keepAlive){var n=e;Oa.prepatch(n,n)}else(e.componentInstance=kt(e,ya)).$mount(t?e.elm:void 0,t)},prepatch:function(e,t){var n=t.componentOptions;Re(t.componentInstance=e.componentInstance,n.propsData,n.listeners,t,n.children)},insert:function(e){var t=e.context,n=e.componentInstance;n._isMounted||(n._isMounted=!0,Ue(n,"mounted")),e.data.keepAlive&&(t._isMounted?ze(n):Me(n,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?Fe(t,!0):t.$destroy())}},Sa=Object.keys(Oa),Ea=1,ja=2,Ia=0;!function(e){e.prototype._init=function(e){var t=this;t._uid=Ia++,t._isVue=!0,e&&e._isComponent?Pt(t,e):t.$options=Z(Dt(t.constructor),e||{},t),t._renderProxy=t,t._self=t,Pe(t),ke(t),Nt(t),Ue(t,"beforeCreate"),st(t),We(t),at(t),Ue(t,"created"),t.$options.el&&t.$mount(t.$options.el)}}(Bt),function(e){var t={};t.get=function(){return this._data};var n={};n.get=function(){return this._props},Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=F,e.prototype.$delete=U,e.prototype.$watch=function(e,t,n){var r=this;if(u(t))return it(r,e,t,n);n=n||{},n.user=!0;var o=new Aa(r,e,t,n);if(n.immediate)try{t.call(r,o.value)}catch(e){oe(e,r,'callback for immediate watcher "'+o.expression+'"')}return function(){o.teardown()}}}(Bt),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Array.isArray(e))for(var o=0,i=e.length;o<i;o++)r.$on(e[o],n);else(r._events[e]||(r._events[e]=[])).push(n),t.test(e)&&(r._hasHookEvent=!0);return r},e.prototype.$once=function(e,t){function n(){r.$off(e,n),t.apply(r,arguments)}var r=this;return n.fn=t,r.$on(e,n),r},e.prototype.$off=function(e,t){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(e)){for(var r=0,o=e.length;r<o;r++)n.$off(e[r],t);return n}var i=n._events[e];if(!i)return n;if(!t)return n._events[e]=null,n;for(var a,s=i.length;s--;)if((a=i[s])===t||a.fn===t){i.splice(s,1);break}return n},e.prototype.$emit=function(e){var t=this,n=t._events[e];if(n){n=n.length>1?_(n):n;for(var r=_(arguments,1),o=0,i=n.length;o<i;o++)try{n[o].apply(t,r)}catch(n){oe(n,t,'event handler for "'+e+'"')}}return t}}(Bt),function(e){e.prototype._update=function(e,t){var n=this,r=n.$el,o=n._vnode,i=Ne(n);n._vnode=e,n.$el=o?n.__patch__(o,e):n.__patch__(n.$el,e,t,!1),i(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},e.prototype.$forceUpdate=function(){var e=this;e._watcher&&e._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){Ue(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||v(t.$children,e),e._watcher&&e._watcher.teardown();for(var n=e._watchers.length;n--;)e._watchers[n].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),Ue(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$vnode&&(e.$vnode.parent=null)}}}(Bt),function(e){_t(e.prototype),e.prototype.$nextTick=function(e){return ue(e,this)},e.prototype._render=function(){var e=this,t=e.$options,n=t.render,r=t._parentVnode;r&&(e.$scopedSlots=r.data.scopedSlots||li),e.$vnode=r;var o;try{o=n.call(e._renderProxy,e.$createElement)}catch(t){oe(t,e,"render"),o=e._vnode}return o instanceof Gi||(o=Yi()),o.parent=r,o}}(Bt);var La=[String,RegExp,Array],Na={name:"keep-alive",abstract:!0,props:{include:La,exclude:La,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)Xt(this.cache,e,this.keys)},mounted:function(){var e=this;this.$watch("include",function(t){Kt(e,function(e){return Jt(t,e)})}),this.$watch("exclude",function(t){Kt(e,function(e){return!Jt(t,e)})})},render:function(){var e=this.$slots.default,t=Ae(e),n=t&&t.componentOptions;if(n){var r=zt(n),o=this,i=o.include,a=o.exclude;if(i&&(!r||!Jt(i,r))||a&&r&&Jt(a,r))return t;var s=this,c=s.cache,u=s.keys,f=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;c[f]?(t.componentInstance=c[f].componentInstance,v(u,f),u.push(f)):(c[f]=t,u.push(f),this.max&&u.length>parseInt(this.max)&&Xt(c,u[0],u,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}},Pa={KeepAlive:Na};!function(e){var t={};t.get=function(){return Ti},Object.defineProperty(e,"config",t),e.util={warn:Ji,extend:w,mergeOptions:Z,defineReactive:M},e.set=F,e.delete=U,e.nextTick=ue,e.options=Object.create(null),Ai.forEach(function(t){e.options[t+"s"]=Object.create(null)}),e.options._base=e,w(e.options.components,Pa),Mt(e),Ft(e),Ut(e),Vt(e)}(Bt),Object.defineProperty(Bt.prototype,"$isServer",{get:qi}),Object.defineProperty(Bt.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Bt,"FunctionalRenderContext",{value:wt}),Bt.version="2.5.22";var Da,Ra,Ba,Ma,Fa,Ua,Ha,qa,Va,za=h("style,class"),Ja=h("input,textarea,option,select,progress"),Ka=function(e,t,n){return"value"===n&&Ja(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Xa=h("contenteditable,draggable,spellcheck"),Wa=h("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),Ga="http://www.w3.org/1999/xlink",Za=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Ya=function(e){return Za(e)?e.slice(6,e.length):""},Qa=function(e){return null==e||!1===e},es={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},ts=h("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),ns=h("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),rs=function(e){return"pre"===e},os=function(e){return ts(e)||ns(e)},is=Object.create(null),as=h("text,number,password,search,email,tel,url"),ss=Object.freeze({createElement:an,createElementNS:sn,createTextNode:cn,createComment:un,insertBefore:fn,removeChild:ln,appendChild:pn,parentNode:dn,nextSibling:hn,tagName:vn,setTextContent:mn,setStyleScope:yn}),cs={create:function(e,t){gn(t)},update:function(e,t){e.data.ref!==t.data.ref&&(gn(e,!0),gn(t))},destroy:function(e){gn(e,!0)}},us=new Gi("",{},[]),fs=["create","activate","update","remove","destroy"],ls={create:xn,update:xn,destroy:function(e){xn(e,us)}},ps=Object.create(null),ds=[cs,ls],hs={create:Tn,update:Tn},vs={create:En,update:En},ms=/[\w).+\-_$\]]/,ys="__r",gs="__c",bs={create:ir,update:ir},_s={create:ar,update:ar},ws=y(function(e){var t={},n=/;(?![^(]*\))/g,r=/:(.+)/;return e.split(n).forEach(function(e){if(e){var n=e.split(r);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}),xs=/^--/,Cs=/\s*!important$/,$s=function(e,t,n){if(xs.test(t))e.style.setProperty(t,n);else if(Cs.test(n))e.style.setProperty(t,n.replace(Cs,""),"important");else{var r=ks(t);if(Array.isArray(n))for(var o=0,i=n.length;o<i;o++)e.style[r]=n[o];else e.style[r]=n}},As=["Webkit","Moz","ms"],ks=y(function(e){if(Va=Va||document.createElement("div").style,"filter"!==(e=yi(e))&&e in Va)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<As.length;n++){var r=As[n]+t;if(r in Va)return r}}),Ts={create:dr,update:dr},Os=/\s+/,Ss=y(function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}}),Es=Ei&&!Pi,js="transition",Is="animation",Ls="transition",Ns="transitionend",Ps="animation",Ds="animationend";Es&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Ls="WebkitTransition",Ns="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Ps="WebkitAnimation",Ds="webkitAnimationEnd"));var Rs=Ei?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()},Bs=/\b(transform|all)(,|$)/,Ms=Ei?{create:Or,activate:Or,remove:function(e,t){!0!==e.data.show?Ar(e,t):t()}}:{},Fs=[hs,vs,bs,_s,Ts,Ms],Us=Fs.concat(ds),Hs=function(e){function t(e){return new Gi(j.tagName(e).toLowerCase(),{},[],void 0,e)}function n(e,t){function n(){0==--n.listeners&&a(e)}return n.listeners=t,n}function a(e){var t=j.parentNode(e);o(t)&&j.removeChild(t,e)}function c(e,t,n,r,a,s,c){if(o(e.elm)&&o(s)&&(e=s[c]=N(e)),e.isRootInsert=!a,!u(e,t,n,r)){var f=e.data,l=e.children,h=e.tag;o(h)?(e.elm=e.ns?j.createElementNS(e.ns,h):j.createElement(h,e),y(e),d(e,l,t),o(f)&&m(e,t),p(n,e.elm,r)):i(e.isComment)?(e.elm=j.createComment(e.text),p(n,e.elm,r)):(e.elm=j.createTextNode(e.text),p(n,e.elm,r))}}function u(e,t,n,r){var a=e.data;if(o(a)){var s=o(e.componentInstance)&&a.keepAlive;if(o(a=a.hook)&&o(a=a.init)&&a(e,!1),o(e.componentInstance))return f(e,t),p(n,e.elm,r),i(s)&&l(e,t,n,r),!0}}function f(e,t){o(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,v(e)?(m(e,t),y(e)):(gn(e),t.push(e))}function l(e,t,n,r){for(var i,a=e;a.componentInstance;)if(a=a.componentInstance._vnode,o(i=a.data)&&o(i=i.transition)){for(i=0;i<S.activate.length;++i)S.activate[i](us,a);t.push(a);break}p(n,e.elm,r)}function p(e,t,n){o(e)&&(o(n)?j.parentNode(n)===e&&j.insertBefore(e,t,n):j.appendChild(e,t))}function d(e,t,n){if(Array.isArray(t))for(var r=0;r<t.length;++r)c(t[r],n,e.elm,null,!0,t,r);else s(e.text)&&j.appendChild(e.elm,j.createTextNode(String(e.text)))}function v(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return o(e.tag)}function m(e,t){for(var n=0;n<S.create.length;++n)S.create[n](us,e);T=e.data.hook,o(T)&&(o(T.create)&&T.create(us,e),o(T.insert)&&t.push(e))}function y(e){var t;if(o(t=e.fnScopeId))j.setStyleScope(e.elm,t);else for(var n=e;n;)o(t=n.context)&&o(t=t.$options._scopeId)&&j.setStyleScope(e.elm,t),n=n.parent;o(t=ya)&&t!==e.context&&t!==e.fnContext&&o(t=t.$options._scopeId)&&j.setStyleScope(e.elm,t)}function g(e,t,n,r,o,i){for(;r<=o;++r)c(n[r],i,e,t,!1,n,r)}function b(e){var t,n,r=e.data;if(o(r))for(o(t=r.hook)&&o(t=t.destroy)&&t(e),t=0;t<S.destroy.length;++t)S.destroy[t](e);if(o(t=e.children))for(n=0;n<e.children.length;++n)b(e.children[n])}function _(e,t,n,r){for(;n<=r;++n){var i=t[n];o(i)&&(o(i.tag)?(w(i),b(i)):a(i.elm))}}function w(e,t){if(o(t)||o(e.data)){var r,i=S.remove.length+1;for(o(t)?t.listeners+=i:t=n(e.elm,i),o(r=e.componentInstance)&&o(r=r._vnode)&&o(r.data)&&w(r,t),r=0;r<S.remove.length;++r)S.remove[r](e,t);o(r=e.data.hook)&&o(r=r.remove)?r(e,t):t()}else a(e.elm)}function x(e,t,n,i,a){for(var s,u,f,l,p=0,d=0,h=t.length-1,v=t[0],m=t[h],y=n.length-1,b=n[0],w=n[y],x=!a;p<=h&&d<=y;)r(v)?v=t[++p]:r(m)?m=t[--h]:bn(v,b)?($(v,b,i,n,d),v=t[++p],b=n[++d]):bn(m,w)?($(m,w,i,n,y),m=t[--h],w=n[--y]):bn(v,w)?($(v,w,i,n,y),x&&j.insertBefore(e,v.elm,j.nextSibling(m.elm)),v=t[++p],w=n[--y]):bn(m,b)?($(m,b,i,n,d),x&&j.insertBefore(e,m.elm,v.elm),m=t[--h],b=n[++d]):(r(s)&&(s=wn(t,p,h)),u=o(b.key)?s[b.key]:C(b,t,p,h),r(u)?c(b,i,e,v.elm,!1,n,d):(f=t[u],bn(f,b)?($(f,b,i,n,d),t[u]=void 0,x&&j.insertBefore(e,f.elm,v.elm)):c(b,i,e,v.elm,!1,n,d)),b=n[++d]);p>h?(l=r(n[y+1])?null:n[y+1].elm,g(e,l,n,d,y,i)):d>y&&_(e,t,p,h)}function C(e,t,n,r){for(var i=n;i<r;i++){var a=t[i];if(o(a)&&bn(e,a))return i}}function $(e,t,n,a,s,c){if(e!==t){o(t.elm)&&o(a)&&(t=a[s]=N(t));var u=t.elm=e.elm;if(i(e.isAsyncPlaceholder))return void(o(t.asyncFactory.resolved)?k(e.elm,t,n):t.isAsyncPlaceholder=!0);if(i(t.isStatic)&&i(e.isStatic)&&t.key===e.key&&(i(t.isCloned)||i(t.isOnce)))return void(t.componentInstance=e.componentInstance);var f,l=t.data;o(l)&&o(f=l.hook)&&o(f=f.prepatch)&&f(e,t);var p=e.children,d=t.children;if(o(l)&&v(t)){for(f=0;f<S.update.length;++f)S.update[f](e,t);o(f=l.hook)&&o(f=f.update)&&f(e,t)}r(t.text)?o(p)&&o(d)?p!==d&&x(u,p,d,n,c):o(d)?(o(e.text)&&j.setTextContent(u,""),g(u,null,d,0,d.length-1,n)):o(p)?_(u,p,0,p.length-1):o(e.text)&&j.setTextContent(u,""):e.text!==t.text&&j.setTextContent(u,t.text),o(l)&&o(f=l.hook)&&o(f=f.postpatch)&&f(e,t)}}function A(e,t,n){if(i(n)&&o(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r<t.length;++r)t[r].data.hook.insert(t[r])}function k(e,t,n,r){var a,s=t.tag,c=t.data,u=t.children;if(r=r||c&&c.pre,t.elm=e,i(t.isComment)&&o(t.asyncFactory))return t.isAsyncPlaceholder=!0,!0;if(o(c)&&(o(a=c.hook)&&o(a=a.init)&&a(t,!0),o(a=t.componentInstance)))return f(t,n),!0;if(o(s)){if(o(u))if(e.hasChildNodes())if(o(a=c)&&o(a=a.domProps)&&o(a=a.innerHTML)){if(a!==e.innerHTML)return!1}else{for(var l=!0,p=e.firstChild,h=0;h<u.length;h++){if(!p||!k(p,u[h],n,r)){l=!1;break}p=p.nextSibling}if(!l||p)return!1}else d(t,u,n);if(o(c)){var v=!1;for(var y in c)if(!I(y)){v=!0,m(t,n);break}!v&&c.class&&fe(c.class)}}else e.data!==t.text&&(e.data=t.text);return!0}var T,O,S={},E=e.modules,j=e.nodeOps;for(T=0;T<fs.length;++T)for(S[fs[T]]=[],O=0;O<E.length;++O)o(E[O][fs[T]])&&S[fs[T]].push(E[O][fs[T]]);var I=h("attrs,class,staticClass,staticStyle,key");return function(e,n,a,s){if(r(n))return void(o(e)&&b(e));var u=!1,f=[];if(r(e))u=!0,c(n,f);else{var l=o(e.nodeType);if(!l&&bn(e,n))$(e,n,f,null,null,s);else{if(l){if(1===e.nodeType&&e.hasAttribute($i)&&(e.removeAttribute($i),a=!0),i(a)&&k(e,n,f))return A(n,f,!0),e;e=t(e)}var p=e.elm,d=j.parentNode(p);if(c(n,f,p._leaveCb?null:d,j.nextSibling(p)),o(n.parent))for(var h=n.parent,m=v(n);h;){for(var y=0;y<S.destroy.length;++y)S.destroy[y](h);if(h.elm=n.elm,m){for(var g=0;g<S.create.length;++g)S.create[g](us,h);var w=h.data.hook.insert;if(w.merged)for(var x=1;x<w.fns.length;x++)w.fns[x]()}else gn(h);h=h.parent}o(d)?_(d,[e],0,0):o(e.tag)&&b(e)}}return A(n,f,u),n.elm}}({nodeOps:ss,modules:Us});Pi&&document.addEventListener("selectionchange",function(){var e=document.activeElement;e&&e.vmodel&&Pr(e,"input")});var qs={inserted:function(e,t,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?he(n,"postpatch",function(){qs.componentUpdated(e,t,n)}):Sr(e,t,n.context),e._vOptions=[].map.call(e.options,Ir)):("textarea"===n.tag||as(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",Lr),e.addEventListener("compositionend",Nr),e.addEventListener("change",Nr),Pi&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){Sr(e,t,n.context);var r=e._vOptions,o=e._vOptions=[].map.call(e.options,Ir);o.some(function(e,t){return!$(e,r[t])})&&(e.multiple?t.value.some(function(e){return jr(e,o)}):t.value!==t.oldValue&&jr(t.value,o))&&Pr(e,"change")}}},Vs={bind:function(e,t,n){var r=t.value;n=Dr(n);var o=n.data&&n.data.transition,i=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&o?(n.data.show=!0,$r(n,function(){e.style.display=i})):e.style.display=r?i:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&(n=Dr(n),n.data&&n.data.transition?(n.data.show=!0,r?$r(n,function(){e.style.display=e.__vOriginalDisplay}):Ar(n,function(){e.style.display="none"})):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,o){o||(e.style.display=e.__vOriginalDisplay)}},zs={model:qs,show:Vs},Js={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]},Ks=function(e){return e.tag||$e(e)},Xs=function(e){return"show"===e.name},Ws={name:"transition",props:Js,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(Ks),n.length)){var r=this.mode,o=n[0];if(Fr(this.$vnode))return o;var i=Rr(o);if(!i)return o;if(this._leaving)return Mr(e,o);var a="__transition-"+this._uid+"-";i.key=null==i.key?i.isComment?a+"comment":a+i.tag:s(i.key)?0===String(i.key).indexOf(a)?i.key:a+i.key:i.key;var c=(i.data||(i.data={})).transition=Br(this),u=this._vnode,f=Rr(u);if(i.data.directives&&i.data.directives.some(Xs)&&(i.data.show=!0),f&&f.data&&!Ur(i,f)&&!$e(f)&&(!f.componentInstance||!f.componentInstance._vnode.isComment)){var l=f.data.transition=w({},c);if("out-in"===r)return this._leaving=!0,he(l,"afterLeave",function(){t._leaving=!1,t.$forceUpdate()}),Mr(e,o);if("in-out"===r){if($e(i))return u;var p,d=function(){p()};he(c,"afterEnter",d),he(c,"enterCancelled",d),he(l,"delayLeave",function(e){p=e})}}return o}}},Gs=w({tag:String,moveClass:String},Js);delete Gs.mode;var Zs={props:Gs,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var o=Ne(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,o(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=Br(this),s=0;s<o.length;s++){var c=o[s];c.tag&&null!=c.key&&0!==String(c.key).indexOf("__vlist")&&(i.push(c),n[c.key]=c,(c.data||(c.data={})).transition=a)}if(r){for(var u=[],f=[],l=0;l<r.length;l++){var p=r[l];p.data.transition=a,p.data.pos=p.elm.getBoundingClientRect(),n[p.key]?u.push(p):f.push(p)}this.kept=e(t,null,u),this.removed=f}return e(t,null,i)},updated:function(){var e=this.prevChildren,t=this.moveClass||(this.name||"v")+"-move";e.length&&this.hasMove(e[0].elm,t)&&(e.forEach(Hr),e.forEach(qr),e.forEach(Vr),this._reflow=document.body.offsetHeight,e.forEach(function(e){if(e.data.moved){var n=e.elm,r=n.style;gr(n,t),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Ns,n._moveCb=function e(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Ns,e),n._moveCb=null,br(n,t))})}}))},methods:{hasMove:function(e,t){if(!Es)return!1;if(this._hasMove)return this._hasMove;var n=e.cloneNode();e._transitionClasses&&e._transitionClasses.forEach(function(e){vr(n,e)}),hr(n,t),n.style.display="none",this.$el.appendChild(n);var r=wr(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}},Ys={Transition:Ws,TransitionGroup:Zs};Bt.config.mustUseProp=Ka,Bt.config.isReservedTag=os,Bt.config.isReservedAttr=za,Bt.config.getTagNamespace=nn,Bt.config.isUnknownElement=rn,w(Bt.options.directives,zs),w(Bt.options.components,Ys),Bt.prototype.__patch__=Ei?Hs:C,Bt.prototype.$mount=function(e,t){return e=e&&Ei?on(e):void 0,De(this,e,t)},Ei&&setTimeout(function(){Ti.devtools&&Vi&&Vi.emit("init",Bt)},0);var Qs,ec,tc,nc,rc,oc,ic,ac,sc,cc,uc,fc,lc=/\{\{((?:.|\r?\n)+?)\}\}/g,pc=/[-.*+?^${}()|[\]\/\\]/g,dc=y(function(e){var t=e[0].replace(pc,"\\$&"),n=e[1].replace(pc,"\\$&");return new RegExp(t+"((?:.|\\n)+?)"+n,"g")}),hc={staticKeys:["staticClass"],transformNode:Jr,genData:Kr},vc={staticKeys:["staticStyle"],transformNode:Xr,genData:Wr},mc={decode:function(e){return Qs=Qs||document.createElement("div"),Qs.innerHTML=e,Qs.textContent}},yc=h("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"),gc=h("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"),bc=h("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"),_c=/^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,wc="[a-zA-Z_][\\w\\-\\.]*",xc="((?:"+wc+"\\:)?"+wc+")",Cc=new RegExp("^<"+xc),$c=/^\s*(\/?)>/,Ac=new RegExp("^<\\/"+xc+"[^>]*>"),kc=/^<!DOCTYPE [^>]+>/i,Tc=/^<!\--/,Oc=/^<!\[/,Sc=h("script,style,textarea",!0),Ec={},jc={"&lt;":"<","&gt;":">","&quot;":'"',"&amp;":"&","&#10;":"\n","&#9;":"\t"},Ic=/&(?:lt|gt|quot|amp);/g,Lc=/&(?:lt|gt|quot|amp|#10|#9);/g,Nc=h("pre,textarea",!0),Pc=function(e,t){return e&&Nc(e)&&"\n"===t[0]},Dc=/^@|^v-on:/,Rc=/^v-|^@|^:/,Bc=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,Mc=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Fc=/^\(|\)$/g,Uc=/:(.*)$/,Hc=/^:|^v-bind:/,qc=/\.[^.]+/g,Vc=y(mc.decode),zc=/^xmlns:NS\d+/,Jc=/^NS\d+:/,Kc={preTransformNode:xo},Xc=[hc,vc,Kc],Wc={model:Gn,text:$o,html:Ao},Gc={expectHTML:!0,modules:Xc,directives:Wc,isPreTag:rs,isUnaryTag:yc,mustUseProp:Ka,canBeLeftOpenTag:gc,isReservedTag:os,getTagNamespace:nn,staticKeys:function(e){return e.reduce(function(e,t){return e.concat(t.staticKeys||[])},[]).join(",")}(Xc)},Zc=y(To),Yc=/^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/,Qc=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,eu={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},tu={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]},nu=function(e){return"if("+e+")return null;"},ru={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:nu("$event.target !== $event.currentTarget"),ctrl:nu("!$event.ctrlKey"),shift:nu("!$event.shiftKey"),alt:nu("!$event.altKey"),meta:nu("!$event.metaKey"),left:nu("'button' in $event && $event.button !== 0"),middle:nu("'button' in $event && $event.button !== 1"),right:nu("'button' in $event && $event.button !== 2")},ou={on:Do,bind:Ro,cloak:C},iu=function(e){this.options=e,this.warn=e.warn||Ln,this.transforms=Nn(e.modules,"transformCode"),this.dataGenFns=Nn(e.modules,"genData"),this.directives=w(w({},ou),e.directives);var t=e.isReservedTag||xi;this.maybeComponent=function(e){return!(t(e.tag)&&!e.component)},this.onceId=0,this.staticRenderFns=[],this.pre=!1},au=(new RegExp("\\b"+"do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b")+"\\b"),new RegExp("\\b"+"delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b")+"\\s*\\([^\\)]*\\)"),function(e){return function(t){function n(n,r){var o=Object.create(t),i=[],a=[];if(o.warn=function(e,t){(t?a:i).push(e)},r){r.modules&&(o.modules=(t.modules||[]).concat(r.modules)),r.directives&&(o.directives=w(Object.create(t.directives||null),r.directives));for(var s in r)"modules"!==s&&"directives"!==s&&(o[s]=r[s])}var c=e(n,o);return c.errors=i,c.tips=a,c}return{compile:n,compileToFunctions:ci(n)}}}(function(e,t){var n=Qr(e.trim(),t);!1!==t.optimize&&ko(n,t);var r=Bo(n,t);return{ast:n,render:r.render,staticRenderFns:r.staticRenderFns}})),su=au(Gc),cu=(su.compile,su.compileToFunctions),uu=!!Ei&&ui(!1),fu=!!Ei&&ui(!0),lu=y(function(e){var t=on(e);return t&&t.innerHTML}),pu=Bt.prototype.$mount;Bt.prototype.$mount=function(e,t){if((e=e&&on(e))===document.body||e===document.documentElement)return this;var n=this.$options;if(!n.render){var r=n.template;if(r)if("string"==typeof r)"#"===r.charAt(0)&&(r=lu(r));else{if(!r.nodeType)return this;r=r.innerHTML}else e&&(r=fi(e));if(r){var o=cu(r,{shouldDecodeNewlines:uu,shouldDecodeNewlinesForHref:fu,delimiters:n.delimiters,comments:n.comments},this),i=o.render,a=o.staticRenderFns;n.render=i,n.staticRenderFns=a}}return pu.call(this,e,t)},Bt.compile=cu,t.a=Bt}).call(t,n(2),n(13).setImmediate)},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(f===setTimeout)return setTimeout(e,0);if((f===n||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(t){try{return f.call(null,e,0)}catch(t){return f.call(this,e,0)}}}function i(e){if(l===clearTimeout)return clearTimeout(e);if((l===r||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(e);try{return l(e)}catch(t){try{return l.call(null,e)}catch(t){return l.call(this,e)}}}function a(){v&&d&&(v=!1,d.length?h=d.concat(h):m=-1,h.length&&s())}function s(){if(!v){var e=o(a);v=!0;for(var t=h.length;t;){for(d=h,h=[];++m<t;)d&&d[m].run();m=-1,t=h.length}d=null,v=!1,i(e)}}function c(e,t){this.fun=e,this.array=t}function u(){}var f,l,p=e.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:n}catch(e){f=n}try{l="function"==typeof clearTimeout?clearTimeout:r}catch(e){l=r}}();var d,h=[],v=!1,m=-1;p.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new c(e,t)),1!==h.length||v||o(s)},c.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=u,p.addListener=u,p.once=u,p.off=u,p.removeListener=u,p.removeAllListeners=u,p.emit=u,p.prependListener=u,p.prependOnceListener=u,p.listeners=function(e){return[]},p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(0),o=n(23),i=n(25),a=n(26),s=n(27),c=n(8),u="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n(28);e.exports=function(e){return new Promise(function(t,f){var l=e.data,p=e.headers;r.isFormData(l)&&delete p["Content-Type"];var d=new XMLHttpRequest,h="onreadystatechange",v=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in d||s(e.url)||(d=new window.XDomainRequest,h="onload",v=!0,d.onprogress=function(){},d.ontimeout=function(){}),e.auth){var m=e.auth.username||"",y=e.auth.password||"";p.Authorization="Basic "+u(m+":"+y)}if(d.open(e.method.toUpperCase(),i(e.url,e.params,e.paramsSerializer),!0),d.timeout=e.timeout,d[h]=function(){if(d&&(4===d.readyState||v)&&(0!==d.status||d.responseURL&&0===d.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in d?a(d.getAllResponseHeaders()):null,r=e.responseType&&"text"!==e.responseType?d.response:d.responseText,i={data:r,status:1223===d.status?204:d.status,statusText:1223===d.status?"No Content":d.statusText,headers:n,config:e,request:d};o(t,f,i),d=null}},d.onerror=function(){f(c("Network Error",e,null,d)),d=null},d.ontimeout=function(){f(c("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",d)),d=null},r.isStandardBrowserEnv()){var g=n(29),b=(e.withCredentials||s(e.url))&&e.xsrfCookieName?g.read(e.xsrfCookieName):void 0;b&&(p[e.xsrfHeaderName]=b)}if("setRequestHeader"in d&&r.forEach(p,function(e,t){void 0===l&&"content-type"===t.toLowerCase()?delete p[t]:d.setRequestHeader(t,e)}),e.withCredentials&&(d.withCredentials=!0),e.responseType)try{d.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&d.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&d.upload&&d.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){d&&(d.abort(),f(e),d=null)}),void 0===l&&(l=null),d.send(l)})}},function(e,t,n){"use strict";var r=n(24);e.exports=function(e,t,n,o,i){var a=new Error(e);return r(a,t,n,o,i)}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},,,function(e,t,n){(function(e){function r(e,t){this._id=e,this._clearFn=t}var o=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;t.setTimeout=function(){return new r(i.call(setTimeout,o,arguments),clearTimeout)},t.setInterval=function(){return new r(i.call(setInterval,o,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(o,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(14),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(t,n(2))},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return u[c]=r,s(c),c++}function o(e){delete u[e]}function i(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}function a(e){if(f)setTimeout(a,0,e);else{var t=u[e];if(t){f=!0;try{i(t)}finally{o(e),f=!1}}}}if(!e.setImmediate){var s,c=1,u={},f=!1,l=e.document,p=Object.getPrototypeOf&&Object.getPrototypeOf(e);p=p&&p.setTimeout?p:e,"[object process]"==={}.toString.call(e.process)?function(){s=function(e){t.nextTick(function(){a(e)})}}():function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?function(){var t="setImmediate$"+Math.random()+"$",n=function(n){n.source===e&&"string"==typeof n.data&&0===n.data.indexOf(t)&&a(+n.data.slice(t.length))};e.addEventListener?e.addEventListener("message",n,!1):e.attachEvent("onmessage",n),s=function(n){e.postMessage(t+n,"*")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){a(e.data)},s=function(t){e.port2.postMessage(t)}}():l&&"onreadystatechange"in l.createElement("script")?function(){var e=l.documentElement;s=function(t){var n=l.createElement("script");n.onreadystatechange=function(){a(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():function(){s=function(e){setTimeout(a,0,e)}}(),p.setImmediate=r,p.clearImmediate=o}}("undefined"==typeof self?void 0===e?this:e:self)}).call(t,n(2),n(5))},function(e,t,n){"use strict";function r(e){return e&&DataView.prototype.isPrototypeOf(e)}function o(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function i(e){return"string"!=typeof e&&(e=String(e)),e}function a(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return w.iterable&&(t[Symbol.iterator]=function(){return t}),t}function s(e){this.map={},e instanceof s?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function c(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function u(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function f(e){var t=new FileReader,n=u(t);return t.readAsArrayBuffer(e),n}function l(e){var t=new FileReader,n=u(t);return t.readAsText(e),n}function p(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}function d(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function h(){return this.bodyUsed=!1,this._initBody=function(e){this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:w.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:w.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:w.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():w.arrayBuffer&&w.blob&&r(e)?(this._bodyArrayBuffer=d(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):w.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||C(e))?this._bodyArrayBuffer=d(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):w.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},w.blob&&(this.blob=function(){var e=c(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?c(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(f)}),this.text=function(){var e=c(this);if(e)return e;if(this._bodyBlob)return l(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(p(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},w.formData&&(this.formData=function(){return this.text().then(y)}),this.json=function(){return this.text().then(JSON.parse)},this}function v(e){var t=e.toUpperCase();return $.indexOf(t)>-1?t:e}function m(e,t){t=t||{};var n=t.body;if(e instanceof m){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new s(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new s(t.headers)),this.method=v(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function y(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function g(e){var t=new s;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t}function b(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new s(t.headers),this.url=t.url||"",this._initBody(e)}function _(e,t){return new Promise(function(n,r){function o(){a.abort()}var i=new m(e,t);if(i.signal&&i.signal.aborted)return r(new k("Aborted","AbortError"));var a=new XMLHttpRequest;a.onload=function(){var e={status:a.status,statusText:a.statusText,headers:g(a.getAllResponseHeaders()||"")};e.url="responseURL"in a?a.responseURL:e.headers.get("X-Request-URL");var t="response"in a?a.response:a.responseText;n(new b(t,e))},a.onerror=function(){r(new TypeError("Network request failed"))},a.ontimeout=function(){r(new TypeError("Network request failed"))},a.onabort=function(){r(new k("Aborted","AbortError"))},a.open(i.method,i.url,!0),"include"===i.credentials?a.withCredentials=!0:"omit"===i.credentials&&(a.withCredentials=!1),"responseType"in a&&w.blob&&(a.responseType="blob"),i.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),i.signal&&(i.signal.addEventListener("abort",o),a.onreadystatechange=function(){4===a.readyState&&i.signal.removeEventListener("abort",o)}),a.send(void 0===i._bodyInit?null:i._bodyInit)})}var w={searchParams:"URLSearchParams"in self,iterable:"Symbol"in self&&"iterator"in Symbol,blob:"FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in self,arrayBuffer:"ArrayBuffer"in self};if(w.arrayBuffer)var x=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],C=ArrayBuffer.isView||function(e){return e&&x.indexOf(Object.prototype.toString.call(e))>-1};s.prototype.append=function(e,t){e=o(e),t=i(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},s.prototype.delete=function(e){delete this.map[o(e)]},s.prototype.get=function(e){return e=o(e),this.has(e)?this.map[e]:null},s.prototype.has=function(e){return this.map.hasOwnProperty(o(e))},s.prototype.set=function(e,t){this.map[o(e)]=i(t)},s.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},s.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),a(e)},s.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),a(e)},s.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),a(e)},w.iterable&&(s.prototype[Symbol.iterator]=s.prototype.entries);var $=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},h.call(m.prototype),h.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new s(this.headers),url:this.url})},b.error=function(){var e=new b(null,{status:0,statusText:""});return e.type="error",e};var A=[301,302,303,307,308];b.redirect=function(e,t){if(-1===A.indexOf(t))throw new RangeError("Invalid status code");return new b(null,{status:t,headers:{location:e}})};var k=self.DOMException;try{new k}catch(e){k=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},k.prototype=Object.create(Error.prototype),k.prototype.constructor=k}_.polyfill=!0,self.fetch||(self.fetch=_,self.Headers=s,self.Request=m,self.Response=b)},,,function(e,t,n){e.exports=n(19)},function(e,t,n){"use strict";function r(e){var t=new a(e),n=i(a.prototype.request,t);return o.extend(n,a.prototype,t),o.extend(n,t),n}var o=n(0),i=n(6),a=n(21),s=n(3),c=r(s);c.Axios=a,c.create=function(e){return r(o.merge(s,e))},c.Cancel=n(10),c.CancelToken=n(35),c.isCancel=n(9),c.all=function(e){return Promise.all(e)},c.spread=n(36),e.exports=c,e.exports.default=c},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function r(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))}/*!
7
- * Determine if an object is a Buffer
8
- *
9
- * @author Feross Aboukhadijeh <https://feross.org>
10
- * @license MIT
11
- */
12
- e.exports=function(e){return null!=e&&(n(e)||r(e)||!!e._isBuffer)}},function(e,t,n){"use strict";function r(e){this.defaults=e,this.interceptors={request:new a,response:new a}}var o=n(3),i=n(0),a=n(30),s=n(31);r.prototype.request=function(e){"string"==typeof e&&(e=i.merge({url:arguments[0]},arguments[1])),e=i.merge(o,{method:"get"},this.defaults,e),e.method=e.method.toLowerCase();var t=[s,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(e){t.unshift(e.fulfilled,e.rejected)}),this.interceptors.response.forEach(function(e){t.push(e.fulfilled,e.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},i.forEach(["delete","get","head","options"],function(e){r.prototype[e]=function(t,n){return this.request(i.merge(n||{},{method:e,url:t}))}}),i.forEach(["post","put","patch"],function(e){r.prototype[e]=function(t,n,r){return this.request(i.merge(r||{},{method:e,url:t,data:n}))}}),e.exports=r},function(e,t,n){"use strict";var r=n(0);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(8);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},function(e,t,n){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e}},function(e,t,n){"use strict";function r(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var o=n(0);e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(o.isURLSearchParams(t))i=t.toString();else{var a=[];o.forEach(t,function(e,t){null!==e&&void 0!==e&&(o.isArray(e)?t+="[]":e=[e],o.forEach(e,function(e){o.isDate(e)?e=e.toISOString():o.isObject(e)&&(e=JSON.stringify(e)),a.push(r(t)+"="+r(e))}))}),i=a.join("&")}return i&&(e+=(-1===e.indexOf("?")?"?":"&")+i),e}},function(e,t,n){"use strict";var r=n(0),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,a={};return e?(r.forEach(e.split("\n"),function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}}),a):a}},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t,n){"use strict";function r(){this.message="String contains an invalid character"}function o(e){for(var t,n,o=String(e),a="",s=0,c=i;o.charAt(0|s)||(c="=",s%1);a+=c.charAt(63&t>>8-s%1*8)){if((n=o.charCodeAt(s+=.75))>255)throw new r;t=t<<8|n}return a}var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.prototype=new Error,r.prototype.code=5,r.prototype.name="InvalidCharacterError",e.exports=o},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";function r(){this.handlers=[]}var o=n(0);r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var o=n(0),i=n(32),a=n(9),s=n(3),c=n(33),u=n(34);e.exports=function(e){return r(e),e.baseURL&&!c(e.url)&&(e.url=u(e.baseURL,e.url)),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||s.adapter)(e).then(function(t){return r(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(r(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(0);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(10);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e;return{token:new r(function(t){e=t}),cancel:e}},e.exports=r},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}}]);
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,72 +1,88 @@
1
  === WP RSS Aggregator ===
2
  Contributors: RebelCode, jeangalea, markzahra, Mekku, xedin.unknown,
3
  Plugin URI: https://www.wprssaggregator.com
4
- Tags: RSS import, RSS aggregator, autoblog, content curation, feed to post
5
  Requires at least: 4.0 or higher
6
- Tested up to: 5.1
7
- Requires PHP: 5.3.9 or higher
8
- Stable tag: 4.12.3
9
  License: GPLv3
10
 
11
  WP RSS Aggregator is the original & most popular WordPress solution for importing RSS feeds, auto-blogging, content curation & aggregation.
12
 
13
  == Description ==
14
 
15
- WP RSS Aggregator is the original and best plugin for easily importing, merging and displaying RSS and Atom feeds on your WordPress site. It's the most comprehensive and elegant RSS feed importer for WordPress.
16
 
17
- == Automatically Import RSS Feeds & Display Them On Your Site ==
18
 
19
- * No limit on the number of sources you can import from.
20
- * No limit on the number of items you can import.
21
- * Automate each import on its own schedule.
22
- * Use our [wp-rss-aggregator] [shortcode](https://kb.wprssaggregator.com/article/54-how-to-use-the-shortcode-to-display-feed-items) to easily display items.
23
- * Feed auto-discovery to add sources without the exact RSS feed URL
24
- * Open YouTube, DailyMotion and Vimeo videos directly
25
- * Limit the number of feed items stored to maintain performance
26
- * Choose to show, hide and/or link the author, source and publish date.
27
- * Create a custom RSS feed from imported feed items to use elsewhere
28
- * Extendable via action and filter hooks
 
 
 
29
 
30
- [Click here to learn more about this free core plugin.](https://www.wprssaggregator.com/extension/core-plugin/?utm_source=wordpress-dot-org&utm_medium=readme&utm_campaign=readme_learn_more&utm_content=learn_more)
31
 
32
- == Bloggers & Content Marketers ==
33
 
34
- Increase your WordPress site's credibility and popularity by importing full or partial Posts into your site with our premium add-ons.
35
 
36
- * Beginner Bloggers and Copywriters - Find and display fresh, new content to **engage and grow your audience**.
37
- * Site Owners & Content Marketers - Curate content to **keep your avid readers on your site for longer**.
38
 
39
- == SEO Benefits from RSS Feeds ==
40
 
41
- Importing RSS feeds alone won't improve your site's SEO, however, if you curate content (articles, tutorials, videos, listings, etc) and bring in quality traffic, the benefits begin to appear:
42
-
43
- * Generate lots of new backlinks to your site.
44
- * Enhance your online presence and gain more trust.
45
- * And therefore, you can help boost your SEO!
46
-
47
- *Quick sidetone: Don't steal other people's work; give credit where it's due.*
48
-
49
- == Who is this useful for? ==
50
 
51
  Importing and displaying RSS feeds is helpful for many types of sites:
52
 
53
  * Curate news, videos and more from the top sources in your niche.
54
  * Add related posts from other sites to your site.
55
  * Curate job, real estate or other listings for your market or niche.
56
- * Show Youtube videos on your site to engage more visitors.
57
  * Aggregate podcast episodes related to your hobby or profession.
58
- * Writers, list your articles from across the web on your main site.
59
- * And much more.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
- For example, [WP News Desk](http://wpnewsdesk.com/) curates WordPress news, tutorials and more from over 100 trusted sources. [Travel Blogger Community](http://travelbloggercommunity.com/) does something similar to share blog posts from well-known travellers. [Crypto Headlines](https://cryptoheadlines.com/youtube-videos/) shares Youtube videos from popular Youtubers. **What will you do with WP RSS Aggregator?**
 
 
62
 
63
- == Premium Add-ons to Import Posts ==
64
 
65
- Import RSS feeds as WordPress posts or any other custom post type to display them just the way you want on your site.
66
 
67
- **[Advanced Feeds Bundle](https://www.wprssaggregator.com/extension/advanced-feeds-bundle/?utm_source=wordpress-dot-org&utm_medium=readme&utm_campaign=readme_afb_link&utm_content=afb_link)** | [Free Demo](http://demo.wprssaggregator.com/)
68
 
69
- This bundle is made up of 3 great add-ons:
70
 
71
  * **[Feed to Post](https://www.wprssaggregator.com/extension/feed-to-post/?utm_source=wordpress-dot-org&utm_medium=readme&utm_campaign=readme_f2p_link&utm_content=f2p_link)**
72
  * **[Full Text RSS Feeds](https://www.wprssaggregator.com/extension/full-text-rss-feeds/?utm_source=wordpress-dot-org&utm_medium=readme&utm_campaign=readme_ftr_link&utm_content=ftr_link)**
@@ -76,49 +92,41 @@ This bundle is made up of 3 great add-ons:
76
 
77
  Here's a quick look at what these add-ons can offer:
78
 
79
- * Import Posts as Drafts or set them to Publish upon import.
80
- * Automatically categorise imported posts and/or assign tags.
81
- * Import all media within the content and pre-set featured images.
82
- * Import the original author's details or assign an existing user.
83
  * Automatically add you own custom content before or after imported posts.
84
- * Custom field mapping for the more experienced among you.
85
  * Exclude unwanted elements from the original source with extraction rules.
86
- * Import only the Posts you want with keyword, phrase and tag filters.
87
- * Connect to our premium full text service to import the full content from sources that are missing text, images and more in the original RSS feeds.
88
-
89
- == Premium Add-ons to Enhance the Shortcode Display ==
90
-
91
- **[Simple Feeds Bundle](https://www.wprssaggregator.com/extension/simple-feeds-bundle/?utm_source=wordpress-dot-org&utm_medium=readme&utm_campaign=readme_afb_link&utm_content=afb_link)** | [Free Demo](http://simple.wprssaggregator.com/)
92
 
93
- This bundle is made up of 3 add-ons:
94
 
95
  * **[Excerpts & Thumbnails](https://www.wprssaggregator.com/extension/excerpts-thumbnails/?utm_source=wordpress-dot-org&utm_medium=readme&utm_campaign=readme_et_link&utm_content=et_link)**
96
  * **[Categories](https://www.wprssaggregator.com/extension/categories/?utm_source=wordpress-dot-org&utm_medium=readme&utm_campaign=readme_cat_link&utm_content=cat_link)**
97
- * **[Keyword Filtering](https://www.wprssaggregator.com/extension/keyword-filtering/?utm_source=wordpress-dot-org&utm_medium=readme&utm_campaign=readme_kf_link&utm_content=kf_link)**
98
-
99
- [youtube https://www.youtube.com/watch?v=Wx2gkEq3MxU]
100
-
101
- == Showcase Of WordPress Sites Running WP RSS Aggregator ==
102
-
103
- Browse through our entire [**Showcase**](https://www.wprssaggregator.com/showcase/) to see how WP RSS Aggregator is being put to great use on a large variety of websites.
104
 
105
- You can even take things a step further by using our 3rd-party content spinner integrations or by creating a mobile app using the imported content. [Check out this tutorial from MobiLoud](https://www.mobiloud.com/help/knowledge-base/wp-rss-aggregator-mobile-app/) on how we built an app for the WP News Desk website.
106
 
107
- == We Stand Behind What We Build ==
108
 
109
  Our comprehensive [Knowledge Base](https://kb.wprssaggregator.com/) provides you with everything you need to install, set up and customise the plugin to your needs. You can also browse through a number of FAQs to get started.
110
 
111
  If that doesn't do the trick, we provide support for the free version of WP RSS Aggregator via the support forum [here](https://wordpress.org/support/plugin/wp-rss-aggregator), while for premium support (owners of valid premium add-on licenses) and pre-sales questions please contact us via our [premium support channel](https://www.wprssaggregator.com/contact/?utm_source=wordpress-dot-org&utm_medium=readme&utm_campaign=readme_contact_link&utm_content=contact_link).
112
 
113
- == Related Info ==
114
 
115
- WP RSS Aggregator and its premium add-ons are compatible with the new Gutenberg block editor introduced in the revolutionary WordPress 5.0. You can find more information about how the two work together [here](https://kb.wprssaggregator.com/article/444-gutenberg-compatibility-core-plugin). A dedicated Gutenberg block is in development.
116
 
117
  We provide a [Feed Creator](http://createfeed.wprssaggregator.com/) service that allows you to generate RSS feeds from any webpage, even if it doesn't have its own RSS feed. It provides inline documentation on how to use the service.
118
 
119
  Our terms & conditions can be found [here](https://www.wprssaggregator.com/terms-conditions/).
120
 
121
- == High Praise From Trusted WordPress Leaders ==
 
 
 
122
  * [MH Themes](https://mhthemes.com/blog/create-news-aggregator-site-with-wordpress/)
123
  * [WP Mayor](http://www.wpmayor.com/rss-feeds-review-wp-rss-aggregator/)
124
  * [MobiLoud](https://www.mobiloud.com/blog/wordpress-rss-aggregator/)
@@ -135,47 +143,41 @@ Our terms & conditions can be found [here](https://www.wprssaggregator.com/terms
135
 
136
  == Installation ==
137
 
138
- How to install and set up the core WP RSS Aggregator plugin:
139
 
140
- Install Method 1:
141
 
142
- > 1. Go to the Plugins section in your WordPress site's dashboard.
143
  > 2. Click the "Add New" button.
144
  > 3. Search for "WP RSS Aggregator".
145
  > 4. When found, click on the "Install" button, then hit the "Activate" button once it has installed.
146
- > 5. Go to the RSS Aggregator menu item, then set up your [feed sources](https://docs.wprssaggregator.com/adding-a-feed-source-importing-as-feed-items/) and [general settings](https://docs.wprssaggregator.com/general-plugin-settings/).
147
- > 6. Use the WP RSS Aggregator shortcode in your page and/or post to display the imported feed items: `[wp-rss-aggregator]`
148
 
149
- Install Method 2:
150
 
151
  > 1. Click on the "Download" button above.
152
- > 2. Upload the `wp-rss-aggregator` zip file to your site's `/wp-content/plugins/` directory.
153
  > 3. Activate the WP RSS Aggregator plugin from the 'Plugins' section in your dashboard.
154
- > 4. Go to the RSS Aggregator menu item, then set up your [feed sources](https://docs.wprssaggregator.com/adding-a-feed-source-importing-as-feed-items/) and [general settings](https://docs.wprssaggregator.com/general-plugin-settings/).
155
- > 5. Use the WP RSS Aggregator shortcode in your page and/or post to display the imported feed items: `[wp-rss-aggregator]`
156
 
157
  *DISPLAYING THE FEED ITEMS*
158
 
159
- You can easily select the source for your feeds and also insert a limit via [shortcode parameters](http://docs.wprssaggregator.com/shortcodes/#core-parameters) as shown below. To get your feed source ID simply hover over the required feed source in the feed source listing page. It will appear beneath the name.
160
 
161
- `[wp-rss-aggregator source="ID" limit="num"]`
162
 
163
- An example of a shortcode parameter in use could be:
164
 
165
- `[wp_rss_aggregator link_before='li class="feed-link"' link_after='/li']`
166
 
167
  It is advisable to use the 'HTML' view of the editor when inserting shortcodes with parameters.
168
 
169
  *USAGE WITHIN THEME FILES*
170
 
171
- Here are two examples of a function call from within the theme's files:
172
  `
173
  <?php
174
  wprss_display_feed_items( $args = array(
175
- 'links_before' => '<ul>',
176
- 'links_after' => '</ul>',
177
- 'link_before' => '<li>',
178
- 'link_after' => '</li>',
179
  'limit' => '8',
180
  'source' => '5,9'
181
  ));
@@ -188,19 +190,28 @@ OR
188
 
189
 
190
  == Frequently Asked Questions ==
 
 
 
 
 
 
 
191
  = How do I display the imported feed items? =
192
 
193
- You can either use the shortcode in your posts and pages: `[wp-rss-aggregator]`
194
 
195
- Or you can call the function directly within your theme: `<?php wprss_display_feed_items(); ?>`
 
 
196
 
197
  - - -
198
 
199
- = Is there a limit on the number of feed sources I can use? =
200
 
201
- No, there is no limit for the number of feed sources. Having many (50+) feed sources should not present any problems in itself. However, pulling in posts from many sites is bound to put your server under some stress, so you might want to consider using a hosting solution that goes beyond your typical shared host.
202
 
203
- Check out our dedicated page on [WordPress hosting](https://www.wprssaggregator.com/recommended-web-hosts/?utm_source=wordpress-dot-org&utm_medium=readme&utm_campaign=readme_q-and-a_hosts&utm_content=q-and-a_hosts) recommendations.
204
 
205
  - - -
206
 
@@ -214,9 +225,11 @@ No, our plugin does not currently import from JSON, it only imports from RSS and
214
 
215
  1. Try adding a few more feed sources and make sure they are valid by using the RSS Feed Validator.
216
 
217
- 2. Try out the solutions listed on our [Feed Items Not Importing](http://docs.wprssaggregator.com/feed-items-not-importing/) documentation page.
 
 
218
 
219
- 3. It's important to make sure your WordPress cron system is working well. If not, the feeds cannot be imported. If in doubt, you can install the WP Crontrol plugin to check for [bad cron](https://docs.wprssaggregator.com/cron-intervals/#bad-cron), or go to RSS Aggregator > Debugging and hit the red button to re-import all feed items.
220
 
221
  If the problems persist, please [contact our support team](https://wordpress.org/support/plugin/wp-rss-aggregator). If you're using a premium add-on, please use the [premium support channel](https://www.wprssaggregator.com/contact/).
222
 
@@ -224,11 +237,11 @@ If the problems persist, please [contact our support team](https://wordpress.org
224
 
225
  = Can I store imported feed items as posts? =
226
 
227
- Yes! You can do that with the [Feed to Post](http://www.wprssaggregator.com/extensions/feed-to-post) premium add-on. You will not only be able to store items as posts, but also as any other custom post type. You can also set the author, set tags and categories, import images into the gallery or set featured images, and much more.
228
 
229
  - - -
230
 
231
- = Some RSS feeds only give a short excerpt. Any way around that? =
232
 
233
  Yes, along with the [Feed to Post](http://www.wprssaggregator.com/extensions/feed-to-post) add-on we have another add-on called [Full Text RSS Feeds](http://www.wprssaggregator.com/extension/full-text-rss-feeds/) that can get the full content of most feeds that only supply a short excerpt. The Full Text RSS Feeds add-on requires Feed to Post and a valid license key to function.
234
 
@@ -236,650 +249,61 @@ Yes, along with the [Feed to Post](http://www.wprssaggregator.com/extensions/fee
236
 
237
  = I'm not sure which premium add-ons are right for me. Can you help me out? =
238
 
239
- Sure! We wrote a [post](http://www.wprssaggregator.com/add-ons-purchase/) just for you. Read about which add-ons you should buy as we explain the different types of usage so you'll know what to expect when purchasing.
240
 
241
- If you need any further help you can [contact our support team](http://www.wprssaggregator.com/contact/) or try out our [Simple Feeds Bundle demo](http://simple.wprssaggregator.com/) and [Advanced Feeds Bundle demo](http://demo.wprssaggregator.com/).
242
 
243
  - - -
244
 
245
  = Where can I find the documentation for the plugin? =
246
 
247
- Our complete Knowledge Base with FAQs included can be found [here](https://kb.wprssaggregator.com/).
 
248
 
249
  == Screenshots ==
250
 
251
- 1. The free shortcode display of Feed items imported by WP RSS Aggregator
 
 
252
 
253
- 2. A customised shortcode display using some simple [CSS changes](https://kb.wprssaggregator.com/article/196-shortcode-styles-classes)
254
 
255
- 3. Another customised display of the Feed Items using CSS styling, but with the [Excerpts & Thumbnails](http://www.wprssaggregator.com/extensions/excerpts-thumbnails) add-on
256
 
257
- 4. Posts imported using the Feed to Post add-on
258
 
259
- 5. Youtube videos imported using the Feed to Post add-on
260
 
261
- 6. Adding/Editing a feed source
262
 
263
- 7. The list of feed sources
264
 
265
- 8. The list of imported feeds items
266
 
267
- 9. The complete settings page for the core plugin
268
 
269
  == Changelog ==
270
 
271
- = 4.12.3 (2019-04-01) =
272
- * Fixed an issue with Feed to Post not being able to show feed items in the shortcode.
273
- * Fixed deprecation notices on PHP 7.3.
274
-
275
- = 4.12.2 (2019-03-26) =
276
- * Fixed an admin capability bug that disallowed admin users from fetching feed items.
277
-
278
- = 4.12.1 (2019-02-27) =
279
- * Added a modal with an optional poll when the plugin is deactivated.
280
- * Improved the core plugin's on-boarding process for brand new users.
281
- * Fixed the "Sorted" error appearing constantly in the debug log.
282
- * The timeout for the truncating posts hook has been extended.
283
- * Fixed PHP warnings appearing on WordPress multisite.
284
- * Fixed PHP notice appearing on Feed Items page.
285
- * Fixed strict standards notice appearing on settings import.
286
-
287
- = 4.12 (2019-01-29) =
288
- * The plugin now checks if its running on PHP 5.3.9, and deactivates itself when not.
289
- * Added message informing users that v4.13 will drop support for PHP 5.3.
290
- * Added an introduction page for new plugin users.
291
- * Disabled the welcome page on activation and updates.
292
- * Changed protocol for all links to HTTPS wherever necessary or applicable.
293
-
294
- = 4.11.4 (2018-12-11) =
295
- * Added handling of lifetime licenses.
296
- * License renewal link and expiry are not shown if they are not applicable.
297
-
298
- = 4.11.3 (2018-05-23) =
299
- * Updated Help & Support page.
300
-
301
- = 4.11.2 (2017-09-18) =
302
- * Added 2 new general settings for item import order and per-import limit.
303
- * Cosmetic and documentation improvements.
304
-
305
- = 4.11.1 (2017-03-07) =
306
- * Fixed bug that caused minor publishing controls to be hidden on unrelated Edit screens.
307
-
308
- = 4.11 (2017-03-06) =
309
- * Fixed bug with lifetime licenses showing expiry notices.
310
- * Fixed bug with being able to submit form on Licenses page.
311
- * Fixed bug with empty saved license key causing PHP notice, and not triggering reminder notification.
312
- * Fixed bug with saved but inactive licenses not triggering reminder notification.
313
- * Fixed bug with minified assets not being served by default.
314
- * Fixed bug with cached admin assets being served even after update.
315
- * Fixed bug with admin notifications displayed on unrelated pages not being dismissible.
316
- * Enhanced Licenses page so as to make the [Enter] key toggle license activation.
317
- * Enhanced architecture by using a DI container.
318
- * Enhanced admin notifications by refactoring them to use the same mechanism.
319
- * Enhanced admin notifications by making all of them dismissible.
320
-
321
- = 4.10 (2016-12-29) =
322
- * Fixed bug with feed error output breaking tooltips on "Feed Sources" page.
323
- * Fixed bug with nonces on the "Feed Sources" page that broke some source actions.
324
- * Fixed problem with image cache filenames being too long.
325
- * Fixed problem with permalink URLs sometimes being URL-encoded.
326
- * Fixed problem with large logs causing OOM errors and breaking Debugging page.
327
- * Fixed conflict with function `unparse_url()`.
328
- * Fixed bug with `_getDataOrConst()` not retrieving single value.
329
- * Fixed future incompatibility with `class-feed.php` for WP 4.7+.
330
- * Fixed conflicts with many JS scripts by only adding JS on our admin pages.
331
- * Fixed conflicts with some classes by loading only valid root namespace components.
332
- * Fixed PHP warning related to retrieving unique titles.
333
- * Added a per-feed-source "Link Source" option.
334
- * Added a per-feed-source "Feed Request User Agent" option.
335
- * The "Add New" button no longer appears for feed items.
336
- * Added "Leave a Review" notification.
337
- * Now using Composer!
338
- * Now using Phing!
339
- * Added RegEx HTML Encodifier.
340
- * Added integration with Diagnostics plugin, and tests.
341
- * Logs are now created in `wp-content/log/wprss`, and are named more descriptively.
342
-
343
- = 4.9.1 (2016-08-01) =
344
- * Changed copyright and other info in plugin header.
345
-
346
- = 4.9 (2016-06-14) =
347
- * Fixed bug: Potential security vulnerability related to triggering feed update.
348
- * Fixed bug: Error output on Feed Sources list is trimmed and cannot break the page layout.
349
- * Fixed bug: Certain notices could not be dismissed.
350
- * Fixed bug: Word trimming didn't always trim correctly with HTML.
351
- * Enhanced: Visual improvements.
352
-
353
- = 4.8.2 (2016-02-22) =
354
- * Fixed bug: Interface methods used to conflict, causing fatal error on activation.
355
- * Fixed bug: Empty feed response used to cause misleading error message in log.
356
- * Enhanced: Users can now override useragent sent with feed requests.
357
- * Enhanced: Improvements to plugin updating system.
358
- * Enhanced: Readme updated.
359
- * Enhanced: "Open link behaviour" option's internal handling has been improved.
360
-
361
- = 4.8.1 (2016-02-02) =
362
- * Fixed bug: Some exceptions used to cause fatal errors.
363
- * Fixed bug: Requests made by image caching used to always have an infinite timeout.
364
- * Fixed bug: Licensing algorithm used to use constants of inactive plugins, causing fatal error.
365
- * Enhanced: Visual improvements.
366
- * Enhanced: Included new Object Oriented code.
367
-
368
- = 4.8 (2015-12-30) =
369
- * Fixed bug: Licensing notices will now be displayed again.
370
- * Enhanced: Major licensing system improvements.
371
-
372
- = 4.7.8 (2015-11-18) =
373
- * Fixed bug: Sticky posts no longer get deleted when truncating, unless imported from a feed source.
374
- * Enhanced: Added autoloading and refactored licensing.
375
- * Enhanced: Added button to download error log.
376
- * Enhanced: Cosmetic changes and fixes.
377
-
378
- = 4.7.7 (2015-10-19) =
379
- * Enhanced: Optimized checking for plugin updates.
380
-
381
- = 4.7.6 (2015-10-07) =
382
- * Enhanced: Feeds that fail to validate due to whitespace at the beginning are now supported by the plugin.
383
- * Fixed bug: Undefined variables in the System Info section in the Debugging page.
384
- * Fixed bug: Add-on license expiration notices could not be dismissed.
385
-
386
- = 4.7.5 (2015-09-02) =
387
- * Usage tracking now disabled.
388
- * Fixed bug: error related to undefined `ajaxurl` JS variable gone from frontend.
389
- * Enhanced: Licensing errors will be output to debug log.
390
- * Enhanced: Improved compatibility with plugins that allow AJAX searching in the backend.
391
-
392
- = 4.7.4 (2015-08-20) =
393
- * Requirement: WordPress 4.0 or greater now required.
394
- * Fixed bug in image caching
395
- * Fixed bug in admin interface due to incorrectly translated IDs
396
-
397
- = 4.7.3 (2015-08-04) =
398
- * Enhanced: Core now implements an image cache logic.
399
- * Enhanced: Add-ons on the "Add-ons" page now have an installed-but-inactive status.
400
- * Enhanced: Google Alerts permalinks will now be normalized.
401
- * Enhanced: Russian translation added.
402
- * Fixed bug: Inline help (tooltips) translations now work.
403
- * Fixed bug: Link to the Feed to Post add-on on the welcome page is no longer broken.
404
-
405
- = 4.7.2 (2015-06-30) =
406
- * Enhanced: Copyright updated.
407
- * Fixed bug: Word trimming no longer adds extra closing tags at the end.
408
- * Fixed bug: Presence of `idna_convert` class no longer causes infinite redirects on some servers.
409
- * Fixed bug: Warning of unterminated comment no longer thrown in PHP 5.5.
410
- * Fixed bug: Added default value for "Unique Titles" option.
411
- * Fixed bug: Having a the port number specified with the database host no longer causes issues with the `mysqli` adapter in System Info on some servers.
412
- * Fixed bug: Nested options of inline help controller no longer cause a fatal error.
413
- * Fixed bug: Notices will no longer be displayed during rendering of feed items due to absence of required default values.
414
-
415
- = 4.7.1 (2015-04-23) =
416
- * Fixed bug: No warning will be thrown when fetching feeds.
417
-
418
- = 4.7 (2015-04-21) =
419
- * New: Optionally import only items with titles that don't already exist.
420
- * Enhanced: Accessing feeds over HTTPS is now possible.
421
- * Enhanced: Added support for multibyte strings in some places.
422
- * Enhanced: Increased JS compatibility with other plugins.
423
- * Enhanced: Increased UI support for mobile devices.
424
- * Fixed bug: Having no mysqli extension no longer causes an error to appear in the debug info.
425
- * Fixed bug: Saving an empty license key no longer results in a warning.
426
-
427
- = 4.6.13 (2015-03-20) =
428
- * Fixed bug: The "Force feed" option wasn't being correctly used.
429
-
430
- = 4.6.12 (2015-03-09) =
431
- * Fixed bug: The "Force feed" option was being removed by the Feed to Post add-on.
432
-
433
- = 4.6.11 (2015-03-04) =
434
- * Enhanced: The Help page now includes a support form if a premium add-on is detected.
435
- * Enhanced: Updated some translations for admin options.
436
- * Fixed bug: Help tooltips are now optimized for iPad screens.
437
- * Fixed bug: Errors on the licensing page when a license code has not yet been entered.
438
-
439
- = 4.6.10 (2015-02-10) =
440
- * Enhanced: AJAX license activation.
441
- * Enhanced: License form more reliable.
442
- * Enhanced: license-related UI improvements
443
- * New: Markdown library added. Changelog now read from readme.
444
- * Fixed bug: Saving license keys not longer triggers error in some cases.
445
-
446
- = 4.6.9 (2015-01-21) =
447
- * Enhanced: Admin user will now be warned about invalid or expiring licenses.
448
- * Enhanced: Admin notices logic centralized in this plugin.
449
- * Fixed: Multiple small-scale security vulnerabilities.
450
- * Fixed: Ampersand in feed URL no longer causes the product of generated feeds to be invalidated by W3C Validator.
451
-
452
- = 4.6.8 (2015-01-07) =
453
- * Enhanced: Added more logging during feed importing.
454
- * Enhanced: Irrelevent metaboxes added by other plugins are now removed from the Add/Edit Feed Source page.
455
- * Fixed bug: Valid feed URLS were being invalidated.
456
- * Fixed bug: The Blacklist feature was being hidden when the Feed to Post add-on was enabled.
457
- * Fixed bug: Patched a vulnerability where any user on the site can issue a feed fetch.
458
- * Fixed bug: The "Activate" and "Pause" actions are not shown in the bulk actions dropdown in WordPress v4.1.
459
-
460
- = 4.6.7 (2014-12-17) =
461
- * Enhanced: Some minor interface updates.
462
- * Enhanced: Added filters for use by the premium add-ons.
463
-
464
- = 4.6.6 (2014-12-06) =
465
- * Enhanced: Added output layouts for feed sources and feed items.
466
- * Enhanced: Updated EDD updater class to version 1.5.
467
- * Enhanced: Added time limit extending to prevent script from exhausting its execution time limit while importing.
468
- * Fixed bug: The "Delete and Re-import" button was deleting items but not re-importing.
469
- * Fixed bug: Non-object errors when a feed source is deleted while importing.
470
-
471
- = 4.6.5 (2014-11-17) =
472
- * Enhanced: Improved the logging.
473
- * Enhanced: Improved the licensing fields.
474
- * Enhanced: Updated the EDD updater class to the latest version.
475
- * Fixed bug: Small random error when viewing the licenses page.
476
-
477
- = 4.6.4 (2014-11-10) =
478
- * Enhanced: Added filters to the custom feed.
479
- * Enhanced: Updated some styles to improve the user interface.
480
- * Fixed bug: The "Remove selected from Blacklist" button had no nonce associated with it.
481
- * Fixed bug: The Blacklist menu entry was not always being shown.
482
-
483
- = 4.6.3 (2014-11-3) =
484
- Enhanced: Re-added the "Add New" link in the plugin's menu.
485
- Enhanced: Improved error logging.
486
- Enhanced: Bulk actions in the Feed Sources page are now also included in the bottom dropdown menu.
487
- Fixed bug: Add-on updater was prone to conflicts. Now enclosed in an action.
488
- Fixed bug: The Full Text RSS Feeds add-on was not showing as active in the "Add-ons" page.
489
- Fixed bug: Broken links in the "Add-ons" page, to add-on pages on our site.
490
-
491
- = 4.6.2 (2014-10-15) =
492
- * Enhanced: Improved plugin responsiveness.
493
- * Enhanced: Updated some help text in tooltips with better explainations and added clarity.
494
- * Enhanced: Optimized some old SQL queries.
495
- * Enhanced: Added better debug logging.
496
- * Enhanced: Added a new filter to modify the text shown before author names.
497
- * Fixed bug: Licenses were not showing as active, even though they were activated.
498
-
499
- = 4.6.1 (2014-10-06) =
500
- * Enhanced: Improved internationalization in the plugin, for better translations.
501
- * Fixed bug: If the feed source age limit was left empty, the global setting was used instead of ignoring the limit.
502
-
503
- = 4.6 (2014-09-22) =
504
- * Enhanced: Improved the user interface, with better responsiveness and tooltips.
505
- * Enhanced: Removes the ID column. The ID is now shown fixed in row actions.
506
- * Enhanced: Feed Preview indicates if feed items have no dates.
507
- * Fixed bug: If a feed item has no date, the date and time it was imported is used.
508
-
509
- = 4.5.3 (2014-09-15) =
510
- * New Featured: Added filter to allow adding RSS feeds to the head of your site's pages for CPTs.
511
- * Enhanced: Columns in the feed sources table are now sortable.
512
- * Enhanced: Removed the ID column in the feed sources table. The ID has been moved as a row action.
513
- * Enhanced: Improved various interface elements.
514
- * Enhanced: Better responsiveness for smaller screen.
515
- * Fixed bug: The importing spinning icon would get stuck and spin for a very long time.
516
- * Fixed bug: Removed an old description meta field.
517
- * Fixed bug: Plugin was not removing all scheduled cron jobs when deactivated.
518
-
519
- = 4.5.2 (2014-09-09) =
520
- * Enhanced: Optimized plugin for WordPress 4.0.
521
- * Enhanced: Improved template and added filters for add-on hooking.
522
- * Fixed bug: Editor toolbar visible over the WP RSS shortcode dialog.
523
-
524
- = 4.5.1 (2014-08-26) =
525
- * Fixed bug: Last import feed item count stays at zero.
526
- * Fixed bug: Datetime::setTimestamp error when using PHP 5.2 or earlier.
527
- * Fixed bug: The display limit was not working.
528
- * Fixed bug: Minor bug in licensing.
529
-
530
- = 4.5 (2014-08-25) =
531
- * New Feature: Bulk importer allows you to create multiple feed sources at once.
532
- * Enhanced: Improved OPML importer with added hooks.
533
- * Enhanced: Centralized add-on licensing, fixing multiple bugs.
534
- * Fixed bug: Undefined `feed_limit` errors when using the shortcode.
535
-
536
- = 4.4.4 (2014-08-19) =
537
- * Fixed bug: Errors when using older PHP versions 5.3 or lower.
538
-
539
- = 4.4.3 (2014-08-19) =
540
- * Fixed bug: Errors when using older PHP versions 5.3 or lower.
541
-
542
- = 4.4.2 (2014-08-19) =
543
- * Fixed bug: Errors when using older PHP versions 5.3 or lower.
544
-
545
- = 4.4.1 (2014-08-18) =
546
- * Enhanced: Various improvements to the plugin interface and texts.
547
- * Enhanced: Moved the restore default settings button farther down the Debugging page, to avoid confusion with the delete button.
548
- * Fixed bug: Feed item dates were not being adjusted to the timezone when using a GMT offset.
549
- * Fixed bug: Feed item dates are now adjusted according to daylight savings time.
550
-
551
- = 4.4 (2014-08-11) =
552
- * New Feature: Blacklist - delete items and blacklist them to never import them again.
553
- * Enhanced: Added a button in the Debugging page to reset the plugin settings to default.
554
- * Enhanced: WordPress Yoast SEO metaboxes and custom columns will no longer appear.
555
-
556
- = 4.3.1 (2014-08-08) =
557
- * Enhanced: Better wording on settings page.
558
- * Fixed bug: The Links Behaviour option in the settings was not working.
559
- * Fixed bug: The wrong feed items were being shown for some sources when using the "View Items" row action.
560
-
561
- = 4.3 (2014-08-04) =
562
- * New Feature: Feed items now also import authors.
563
- * Enhanced: Custom feed is now in RSS 2.0 format.
564
- * Enhanced: Improved the display template for feed items.
565
- * Fixed bug: Custom feed was not working in Firefox.
566
- * Fixed bug: Some feed items were showing items from another feed source.
567
- * Fixed bug: The feed limit in the global settings was not working.
568
-
569
- = 4.2.3 (2014-07-29) =
570
- * Enhanced: Added an option to choose between the current pagination type, and numbered pagination.
571
- * Enhanced: The Feed Preview now also shows the total number of items in the feed.
572
- * Fixed bug: A PHP warning error was being shown in the System Info.
573
- * Fixed bug: Language files were not always being referenced correctly.
574
- * Fixed bug: Manually fetching a feed fails if the feed is scheduled to update in the next 10 minutes.
575
- * Fixed bug: Bing RSS feeds were importing duplicates on every update.
576
-
577
- = 4.2.2 (2014-07-23) =
578
- * Enhanced: Facebook page feeds are now changed into RSS 2.0 feeds, rather than Atom 1.0 feeds.
579
- * Enhanced: Improved live updating performace on the Feed Sources page.
580
-
581
- = 4.2.1 (2014-07-17) =
582
- * Enhanced: Feed Sources page is now more responsive.
583
-
584
- = 4.2 (2014-07-17) =
585
- * New Feature: Can now view each feed source's imported feed items separate from other feed sources' feed items.
586
- * Enhanced: Major visual update to the Feed Sources page with new live updates.
587
- * Enhanced: The custom feed now includes the feed source.
588
- * Fixed bug: Google News feeds were importing duplicate items on every update.
589
- * Fixed bug: Multiple minor bug fixes with old filters.
590
-
591
- = 4.1.6 (2014-06-28) =
592
- * Fixed bug: Results returned by wprss_get_feed_items_for_source() will no longer be affected by filters.
593
- * Fixed bug: Charset issue in titles
594
-
595
- = 4.1.5 (2014-06-19) =
596
- * Enhanced: The Feed Sources table now indicates which feed sources encountered errors during the last import.
597
- * Fixed bug: Feed titles were not being decoded for HTML entities.
598
-
599
- = 4.1.4 (2014-05-16) =
600
- * Enhanced: Minor improvements to feed importing and handling.
601
- * Fixed bug: HTML entities were not being decoded in feed item titles.
602
-
603
- = 4.1.3 (2014-04-28) =
604
- * Enhanced: Added a force feed option, for valid RSS feeds with incorrect header content types.
605
- * Fixed bug: HTML entities in feed item titles are now being decoded.
606
-
607
- = 4.1.2 (2014-04-22) =
608
- * Enhanced: Improved the custom feed, by allowing a custom title.
609
- * Enhanced: Improved shortcode, by adding the "pagination" parameter.
610
- * Enhanced: Modified a filter to fix some bugs in the add-ons.
611
-
612
- = 4.1.1 (2014-04-09) =
613
- * Enhanced: Tracking notices only appear for admin users.
614
- * Fixed bug: Auto Feed Discovery was not working.
615
-
616
- = 4.1 (2014-04-03) =
617
- * New Feature: Feed items can now link to enclosure links in the feed.
618
- * Enhanced: Added a filter to allow add-ons to modify feed item queries.
619
-
620
- = 4.0.9 (2014-03-27) =
621
- * Enhanced: Added a filter to modify the feeds template.
622
- * Fixed bug: Nested lists in feeds template.
623
-
624
- = 4.0.8 (2014-03-20) =
625
- * Fixed bug: Using the shortcode makes the comments section always open.
626
-
627
- = 4.0.7 (2014-03-08) =
628
- * Fixed bug: The plugin prevented uploading of header images.
629
-
630
- = 4.0.6 (2014-03-05) =
631
- * Fixed bug: Hook change in last version suspected reason for some installations having non-updated feed items.
632
-
633
- = 4.0.5 (2014-03-03) =
634
- * New Feature: Time ago added as an option.
635
- * Enhanced: The plugin now allows the use of RSS and Atom feeds that do not specify the correct MIME type.
636
- * Enhanced: Better performance due to better hook usage.
637
- * Fixed bug: Facebook page feed URL conversion was not being triggered for new feed sources.
638
- * Fixed bug: Styles fix for pagination.
639
- * Fixed bug: Removed empty spaces in logging.
640
-
641
- = 4.0.4 (2014-02-17) =
642
- * Enhanced: Added Activate/Pause bulk actions in the Feed Sources page.
643
- * Enhanced: Feed Sources page table has been re-designed.
644
- * Enhanced: Logging is now site dependant on multisite.
645
- * Fixed bug: Undefined display settings where appearing on the front end.
646
-
647
- = 4.0.3 (2014-02-12) =
648
- * Fixed bug: The general setting for deleting feed items by age was not working.
649
-
650
- = 4.0.2 (2014-02-10) =
651
- * Enhanced: Added a filter to change the html tags allowed in feed item content.
652
-
653
- = 4.0.1 (2014-02-08) =
654
- * Fixed bug: Empty array of feed items bug caused importing problems.
655
-
656
- = 4.0 (2014-02-04) =
657
- * Enhanced: Improved some internal queries, for better performance.
658
- * Fixed bug: Feed limits were not working properly.
659
-
660
- = 3.9.9 (2014-02-03) =
661
- * Enhanced: The custom feed can now be extended by add-ons.
662
-
663
- = 3.9.8 (2014-01-20) =
664
- * Fixed bug: Removed excessive logging from Debugging Error Log.
665
-
666
- = 3.9.7 (2014-01-17) =
667
- * Fixed bug: Bug in admin-debugging.php causing trouble with admin login
668
-
669
- = 3.9.6 (2014-01-17) =
670
- * Enhanced: Added error logging.
671
-
672
- = 3.9.5 (2014-01-02) =
673
- * Enhanced: Added a feed validator link in the New/Edit Feed Sources page.
674
- * Enhanced: The Next Update column also shows the time remaining for next update, for feed source on the global update interval.
675
- * Enhanced: The custom feed has been improved, and is now identical to the feeds displayed with the shortcode.
676
- * Enhanced: License notifications only appear on the main site when using WordPress multisite.
677
- * Enhanced: Updated Colorbox script to 1.4.33
678
- * Fixed bug: The Imported Items column was always showing zero.
679
- * Fixed bug: Feed items not being imported with limit set to zero. Should be unlimited.
680
- * Fixed bug: Fat header in Feed Sources page
681
-
682
- = 3.9.4 (2013-12-24) =
683
- * Enhanced: Added a column in the Feed Sources page that shows the number of feed items imported for each feed source.
684
- * Fixed bug: Leaving the delete old feed items empty did not ignore the delete.
685
-
686
- = 3.9.3 (2013-12-23) =
687
- * Fixed bug: Fixed tracking pointer appearing on saving settings.
688
-
689
- = 3.9.2 (2013-12-21) =
690
- * Fixed bug: Incorrect file include call.
691
-
692
- = 3.9.1 (2013-12-12) =
693
- * Enhanced: Improved date and time handling for imported feed items.
694
- * Fixed bug: Incorrect values being shown in the Feed Processing metabox.
695
- * Fixed bug: Feed limits set to zero were causing feeds to not be imported.
696
-
697
- = 3.9 (2013-12-12) =
698
- * New Feature: Feed sources can have their own update interval.
699
- * New Feature: The time remaining until the next update has been added to the Feed Source table.
700
-
701
- = 3.8 (2013-12-05) =
702
- * New Feature: Feed items can be limited and deleted by their age.
703
- * Enhanced: Added utility functions for shorter filters.
704
- * Fixed bug: License codes were being erased when add-ons were deactivated.
705
- * Fixed bug: Some feed sources could not be set to active from the table controls.
706
- * Fixed bug: str_pos errors appear when custom feed url is left empty.
707
- * Fixed bug: Some options were producing undefined index errors.
708
-
709
- = 3.7 (2013-11-28) =
710
- * New Feature: State system - Feed sources can be activated/paused.
711
- * New Feature: State system - Feed sources can be set to activate or pause themselves at a specific date and time.
712
- * Enhanced: Added compatibility with nested outline elements in OPML files.
713
- * Enhanced: Admin menu icon image will change into a Dashicon, when WordPress is updated to 3.8 (Decemeber 2013).
714
- * Fixed bug: Custom Post types were breaking when the plugin is activated.
715
-
716
- = 3.6.1 (2013-11-17) =
717
- * Fixed bug: Missing 2nd argument for wprss_shorten_title()
718
-
719
- = 3.6 (2013-11-16) =
720
- * New Feature: Can set the maximum length for titles. Long titles get trimmed.
721
- * Fixed bug: Fixed errors with undefined indexes for unchecked checkboxes in the settings page.
722
- * Fixed bug: Pagination on front static page was not working.
723
-
724
- = 3.5.2 (2013-11-11) =
725
- * Fixed bug: Invalid feed source url was producing an Undefined method notice.
726
- * Fixed bug: Custom feed was producing a 404 page.
727
- * Fixed bug: Presstrends code firing on admin_init, opt-in implementation coming soon
728
-
729
- = 3.5.1 (2013-11-09) =
730
- * Enhanced: Increased compatibility with RSS sources.
731
- * Fixed bug: Pagination not working on home page
732
-
733
- = 3.5 (2013-11-6) =
734
- * New Feature: Can delete feed items for a particular source
735
- * Enhanced: the 'Fetch feed items' row action for feed sources resets itself after 3.5 seconds.
736
- * Enhanced: The feed image is saved for each url.
737
- * Fixed bug: Link to source now links to correct url. Previously linked to site's feed.
738
-
739
- = 3.4.6 (2013-11-1) =
740
- * Enhanced: Added more hooks to debugging page for the Feed to Post add-on.
741
- * Fixed bug: Uninitialized loop index
742
-
743
- = 3.4.5 (2013-10-30) =
744
- * Bug Fix: Feed items were not being imported while the WPML plugin was active.
745
-
746
- = 3.4.4 (2013-10-26) =
747
- * New feature: Pagination
748
- * New feature: First implementation of editor button for easy shortcode creation
749
- * Enhanced: Feed items and sources don't show up in link manager
750
- * Enhanced: Included Presstrends code for plugin usage monitoring
751
-
752
- = 3.4.3 (2013-10-20) =
753
- * Fixed bug: Removed anonymous functions for backwards PHP compatibility
754
- * Bug fix: Added suppress_filters in feed-display.php to prevent a user reported error
755
- * Bug fix: Missing <li> in certain feed displays
756
-
757
- = 3.4.2 (2013-9-19) =
758
- * Enhanced: Added some hooks for Feed to Post compatibility
759
- * Enhanced: Moved date settings to a more appropriate location
760
-
761
- = 3.4.1 (2013-9-16) =
762
- * Fixed Bug: Minor issue with options page - PHP notice
763
-
764
- = 3.4 (2013-9-15) =
765
- * New Feature: Saving/Updating a feed source triggers an update for that source's feed items.
766
- * New Feature: Option to change Youtube, Vimeo and Dailymotion feed item URLs to embedded video players URLs
767
- * New Feature: Facebook Pages URLs are automatically detected and changed into Atom Feed URLs using FB's Graph
768
- * Enhanced: Updated jQuery Colorbox library to 1.4.29
769
- * Fixed Bug: Some settings did not have a default value set, and were throwing an 'Undefined Index' error
770
- * Fixed Bug: Admin notices do not disappear immediately when dismissed.
771
-
772
- = Version 3.3.3 (2013-09-08) =
773
- * Fixed bug: Better function handling on uninstall, should remove uninstall issues
774
-
775
- = Version 3.3.2 (2013-09-07) =
776
- * New feature: Added exclude parameter to shortcode
777
- * Enhanced: Added metabox links to documentation and add-ons
778
- * Fixed bug: Custom feed linking to post on user site rather than original source
779
- * Fixed bug: Custom post types issues when activitating the plugin
780
-
781
- = Version 3.3.1 (2013-08-09) =
782
- * Fixed Bug: Roles and Capabilities file had not been included
783
- * Fixed Bug: Error on install, function not found
784
-
785
- = Version 3.3 (2013-08-08) =
786
- * New feature: OPML importer
787
- * New feature: Feed item limits for individual Feed Sources
788
- * New feature: Custom feed URL
789
- * New feature: Feed limit on custom feed
790
- * New feature: New 'Fetch feed items' action for each Feed Source in listing display
791
- * New feature: Option to enable link to source
792
- * Enhanced: Date strings now change according to locale being used (i.e. compatible with WPML)
793
- * Enhanced: Capabilities implemented
794
- * Enhanced: Feed Sources row action 'View' removed
795
- * Fixed Bug: Proxy feed URLs resulting in the permalink: example.com/url
796
-
797
- = Version 3.2 (2013-07-06) =
798
- * New feature: Parameter to limit number of feeds displayed
799
- * New feature: Paramter to limit feeds displayed to particular sources (via ID)
800
- * Enhanced: Better feed import handling to handle large number of feed sources
801
-
802
- = Version 3.1.1 (2013-06-06) =
803
- * Fixed bug: Incompatibility with some other plugins due to function missing namespace
804
-
805
- = Version 3.1 (2013-06-06) =
806
- * New feature: Option to set the number of feed items imported from every feed (default 5)
807
- * New feature: Import and Export aggregator settings and feed sources
808
- * New feature: Debugging page allowing manual feed refresh and feed reset
809
- * Enhanced: Faster handling of restoring sources from trash when feed limit is 0
810
- * Fixed bug: Limiter on number of overall feeds stored not working
811
- * Fixed bug: Incompatibility issue with Foobox plugin fixed
812
- * Fixed bug: Duplicate feeds sometimes imported
813
-
814
- = Version 3.0 (2013-03-16) =
815
- * New feature: Option to select cron frequency
816
- * New feature: Code extensibility added to be compatible with add-ons
817
- * New feature: Option to set a limit to the number of feeds stored (previously 50, hard coded)
818
- * New feature: Option to define the format of the date shown below each feed item
819
- * New feature: Option to show or hide source of feed item
820
- * New feature: Option to show or hide publish date of feed item
821
- * New feature: Option to set text preceding publish date
822
- * New feature: Option to set text preceding source of feed item
823
- * New feature: Option to link title or not
824
- * New feature: Limit of 5 items imported for each source instead of 10
825
- * Enhanced: Performance improvement when publishing * New feeds in admin
826
- * Enhanced: Query tuning for better performance
827
- * Enhanced: Major code rewrite, refactoring and inclusion of hooks
828
- * Enhanced: Updated Colorbox to v1.4.1
829
- * Enhanced: Better security implementations
830
- * Enhanced: Better feed preview display
831
- * Fixed bug: Deletion of items upon source deletion not working properly
832
- * Requires: WordPress 3.3
833
-
834
- = Version 2.2.3 (2012-11-01) =
835
- * Fixed bug: Tab navigation preventing typing in input boxes
836
- * Removed: Feeds showing up in internal linking pop up
837
-
838
- = Version 2.2.2 (2012-10-30) =
839
- * Removed: Feeds showing up in site search results
840
- * Enhanced: Better tab button navigation when adding a new feed
841
- * Enhanced: Better guidance when a feed URL is invalid
842
-
843
- = Version 2.2.1 (2012-10-17) =
844
- * Fixed bug: wprss_feed_source_order assumes everyone is an admin
845
-
846
- = Version 2.2 (2012-10-01) =
847
- * Italian translation added
848
- * Feed source order changed to alphabetical
849
- * Fixed bug - repeated entries when having a non-valid feed source
850
- * Fixed bug - all imported feeds deleted upon trashing a single feed source
851
-
852
- = Version 2.1 (2012-09-27) =
853
- * Now localised for translations
854
- * Fixed bug with date string
855
- * Fixed $link_before and $link_after, now working
856
- * Added backwards compatibility for wp_rss_aggregator() function
857
-
858
- = Version 2.0 (2012-09-21) =
859
- * Bulk of code rewritten and refactored
860
- * Added install and upgrade functions
861
- * Added DB version setting
862
- * Feed sources now stored as Custom Post Types
863
- * Feed source list sortable ascending or descending by name
864
- * Removed days subsections in feed display
865
- * Ability to limit total number of feeds displayed
866
- * Feeds now fetched via Cron
867
- * Cron job to delete old feed items, keeps max of 50 items in DB
868
- * Now requires WordPress 3.2
869
- * Updated colorbox to v1.3.20.1
870
- * Limit of 15 items max imported for each source
871
- * Fixed issue of page content displaying incorrectly after feeds
872
-
873
- = Version 1.1 (2012-08-13) =
874
- * Now requires WordPress 3.0
875
- * More flexible fetching of images directory
876
- * Has its own top level menu item
877
- * Added settings section
878
- * Ability to open in lightbox, new window or default browser behaviour
879
- * Ability to set links as follow or no follow
880
- * Using constants for oftenly used locations
881
- * Code refactoring
882
- * Changes in file and folder structure
883
-
884
- = Version 1.0 (2012-01-06) =
885
- * Initial release.
1
  === WP RSS Aggregator ===
2
  Contributors: RebelCode, jeangalea, markzahra, Mekku, xedin.unknown,
3
  Plugin URI: https://www.wprssaggregator.com
4
+ Tags: RSS import, RSS aggregator, feed import, content curation, feed to post
5
  Requires at least: 4.0 or higher
6
+ Tested up to: 5.1.1
7
+ Requires PHP: 5.4 or higher
8
+ Stable tag: 4.13
9
  License: GPLv3
10
 
11
  WP RSS Aggregator is the original & most popular WordPress solution for importing RSS feeds, auto-blogging, content curation & aggregation.
12
 
13
  == Description ==
14
 
15
+ WP RSS Aggregator is the original and best plugin for importing, merging and displaying RSS and Atom feeds on your WordPress site. It's the most comprehensive and elegant RSS feed importer for WordPress.
16
 
17
+ == Automatically import RSS feeds & display them on your site ==
18
 
19
+ * No limit on the number of sources to import from.
20
+ * No limit on the number of items to import.
21
+ * Automate each feed's import with individual or global schedules.
22
+ * Multiple [templates](https://kb.wprssaggregator.com/article/457-templates) to display items across your site.
23
+ * Choose to show, hide and/or link the author, source and publish date for every template.
24
+ * Show or hide pagination on your templates, and display specific pages.
25
+ * Use our [wp-rss-aggregator] [shortcode](https://kb.wprssaggregator.com/article/54-how-to-use-the-shortcode-to-display-feed-items) or [Gutenberg block](https://kb.wprssaggregator.com/article/454-displaying-imported-items-block-gutenberg) to display items.
26
+ * Feed auto-discovery (add sources without the exact RSS feed URL).
27
+ * Open YouTube, DailyMotion and Vimeo videos directly.
28
+ * Limit the number of feed items stored for better performance.
29
+ * Limit the number of feed items fetched per import for better performance.
30
+ * Create a custom RSS feed from imported items to use elsewhere.
31
+ * Extendable via action and filter hooks.
32
 
33
+ [Click here to learn more about the free WP RSS Aggregator plugin.](https://www.wprssaggregator.com/extension/core-plugin/?utm_source=wordpress-dot-org&utm_medium=readme&utm_campaign=readme_learn_more&utm_content=learn_more)
34
 
35
+ == NEW SINCE v4.13: Templates, gutenberg block, improved logs ==
36
 
37
+ Create as many [templates](https://kb.wprssaggregator.com/article/457-templates) as you need to display feed items in different ways across your site. Be it on the homepage, in a sidebar, or in the footer, you can specify which template to use and which sources to display in each individual area.
38
 
39
+ Our brand new [gutenberg block](https://kb.wprssaggregator.com/article/454-displaying-imported-items-block-gutenberg) ensures seamless integration with WordPress. Choose the template to use and the sources to display, then you're all set (plus a few other customisation options). If you are using the classic WordPress editor, we've got you covered. Click on the WP RSS Aggregator button in the TinyMCE editor to open our shortcode modal. It has all the same options as the block, ensuring that no functionality is lost no matter what you use.
 
40
 
41
+ [Debug logs](https://kb.wprssaggregator.com/article/110-error-logs-system-information) are an important part of any site. From time to time, some feeds may have problems that are hard to find. With our new and improved logging system we are reducing the time it takes to find the problem and making it easier to figure out the best solution.
42
 
43
+ == Who is the plugin for?? ==
 
 
 
 
 
 
 
 
44
 
45
  Importing and displaying RSS feeds is helpful for many types of sites:
46
 
47
  * Curate news, videos and more from the top sources in your niche.
48
  * Add related posts from other sites to your site.
49
  * Curate job, real estate or other listings for your market or niche.
50
+ * Embed videos from other sources (Youtube) to engage more visitors.
51
  * Aggregate podcast episodes related to your hobby or profession.
52
+ * Writers, display your works from multiple sites in your portfolio.
53
+ * And much more...
54
+
55
+ For example...
56
+
57
+ * [WP News Desk](http://wpnewsdesk.com/) curates WordPress news, tutorials and more from over 100 trusted sources.
58
+ * [Travel Blogger Community](http://travelbloggercommunity.com/) does something similar to share blog posts from well-known travellers.
59
+ * [Crypto Headlines](https://cryptoheadlines.com/youtube-videos/) shares Youtube videos from popular Youtubers.
60
+ * [Euro Finance Blogs](https://eurofinanceblogs.com/) curates content on investment, personal finance and early retirement.
61
+
62
+ Browse through our [**Showcase**](https://www.wprssaggregator.com/showcase/) to see how WP RSS Aggregator is being put to great use on a large variety of WordPress sites.
63
+
64
+ == Attention bloggers, content marketers, site owners ==
65
+
66
+ Increase your WordPress site's credibility and popularity by importing full or partial posts, videos, and more into your site with our premium add-ons.
67
+
68
+ * Beginner Bloggers and Copywriters - Find and display fresh, new content to **engage and grow your audience**.
69
+ * Site Owners & Content Marketers - Curate content to **keep your avid readers on your site for longer**.
70
+
71
+ == SEO benefits from importing RSS feeds ==
72
+
73
+ Importing RSS feeds alone won't improve your site's SEO, however, if you curate content (articles, tutorials, videos, listings, etc) and bring in quality traffic, the benefits begin to appear:
74
 
75
+ * Generate lots of new backlinks to your site.
76
+ * Enhance your online presence and gain more trust.
77
+ * And therefore, you can help boost your SEO! [Learn more from WP Mayor.](https://wpmayor.com/3-ways-content-curation-impacts-your-sites-seo/)
78
 
79
+ *Quick note: Please don't steal other people's work; give credit where it's due.*
80
 
81
+ == Premium add-ons to import full or partial posts ==
82
 
83
+ Import RSS feeds as WordPress Posts (or any other post type). You can then use your theme, a page builder, or a tool like Toolset to display the content anywhere you want, just the way you want it.
84
 
85
+ Our **[Advanced Feeds Bundle](https://www.wprssaggregator.com/extension/advanced-feeds-bundle/?utm_source=wordpress-dot-org&utm_medium=readme&utm_campaign=readme_afb_link&utm_content=afb_link)** ([demo](http://demo.wprssaggregator.com/)) consists of 3 powerful add-ons:
86
 
87
  * **[Feed to Post](https://www.wprssaggregator.com/extension/feed-to-post/?utm_source=wordpress-dot-org&utm_medium=readme&utm_campaign=readme_f2p_link&utm_content=f2p_link)**
88
  * **[Full Text RSS Feeds](https://www.wprssaggregator.com/extension/full-text-rss-feeds/?utm_source=wordpress-dot-org&utm_medium=readme&utm_campaign=readme_ftr_link&utm_content=ftr_link)**
92
 
93
  Here's a quick look at what these add-ons can offer:
94
 
95
+ * Import Posts as Drafts (to edit or approve) or set them to Publish automatically.
96
+ * Automatically assign categories and/or tags to imported posts.
97
+ * Import all media within the content and automatically set featured images.
98
+ * Import the original author's details or assign another user as the author.
99
  * Automatically add you own custom content before or after imported posts.
100
+ * Custom field mapping to map the data you want to where you need it.
101
  * Exclude unwanted elements from the original source with extraction rules.
102
+ * Import only the items you want with specific keyword, phrase and tag filters.
103
+ * Connect to our premium full text service to import the full content from sources that are missing text, images and more in the original feeds.
 
 
 
 
104
 
105
+ == Other add-Ons ==
106
 
107
  * **[Excerpts & Thumbnails](https://www.wprssaggregator.com/extension/excerpts-thumbnails/?utm_source=wordpress-dot-org&utm_medium=readme&utm_campaign=readme_et_link&utm_content=et_link)**
108
  * **[Categories](https://www.wprssaggregator.com/extension/categories/?utm_source=wordpress-dot-org&utm_medium=readme&utm_campaign=readme_cat_link&utm_content=cat_link)**
 
 
 
 
 
 
 
109
 
110
+ The above two add-ons enable you to enhance the typical feeds list that you can create with our shortcode or block templates. They also form part of our [Simple Feeds Bundle](https://www.wprssaggregator.com/extension/simple-feeds-bundle/?utm_source=wordpress-dot-org&utm_medium=readme&utm_campaign=readme_afb_link&utm_content=afb_link).
111
 
112
+ == We stand behind what we build ==
113
 
114
  Our comprehensive [Knowledge Base](https://kb.wprssaggregator.com/) provides you with everything you need to install, set up and customise the plugin to your needs. You can also browse through a number of FAQs to get started.
115
 
116
  If that doesn't do the trick, we provide support for the free version of WP RSS Aggregator via the support forum [here](https://wordpress.org/support/plugin/wp-rss-aggregator), while for premium support (owners of valid premium add-on licenses) and pre-sales questions please contact us via our [premium support channel](https://www.wprssaggregator.com/contact/?utm_source=wordpress-dot-org&utm_medium=readme&utm_campaign=readme_contact_link&utm_content=contact_link).
117
 
118
+ Our plugin also includes a Help Beacon within your dashboard through which you can search our knowledge base or contact our team (premium users only) without ever leaving your website!
119
 
120
+ == Additional information ==
121
 
122
  We provide a [Feed Creator](http://createfeed.wprssaggregator.com/) service that allows you to generate RSS feeds from any webpage, even if it doesn't have its own RSS feed. It provides inline documentation on how to use the service.
123
 
124
  Our terms & conditions can be found [here](https://www.wprssaggregator.com/terms-conditions/).
125
 
126
+ == High praise from trusted WordPress leaders ==
127
+
128
+ * [Toolset](https://toolset.com/2019/03/import-content-post-typewp-rss-aggregator/)
129
+ * [WP Explorer](https://www.wpexplorer.com/wp-rss-aggregator-review/)
130
  * [MH Themes](https://mhthemes.com/blog/create-news-aggregator-site-with-wordpress/)
131
  * [WP Mayor](http://www.wpmayor.com/rss-feeds-review-wp-rss-aggregator/)
132
  * [MobiLoud](https://www.mobiloud.com/blog/wordpress-rss-aggregator/)
143
 
144
  == Installation ==
145
 
146
+ How to install and set up the WP RSS Aggregator plugin:
147
 
148
+ Method 1:
149
 
150
+ > 1. Go to the Plugins page in your WordPress site's dashboard.
151
  > 2. Click the "Add New" button.
152
  > 3. Search for "WP RSS Aggregator".
153
  > 4. When found, click on the "Install" button, then hit the "Activate" button once it has installed.
154
+ > 5. Go to the RSS Aggregator menu item, then set up your [feed sources](https://docs.wprssaggregator.com/adding-a-feed-source-importing-as-feed-items/), [templates](https://kb.wprssaggregator.com/article/457-templates) [general settings](https://docs.wprssaggregator.com/general-plugin-settings/).
 
155
 
156
+ Method 2:
157
 
158
  > 1. Click on the "Download" button above.
159
+ > 2. Upload the wp-rss-aggregator.zip file to your site's `/wp-content/plugins/` directory via FTP.
160
  > 3. Activate the WP RSS Aggregator plugin from the 'Plugins' section in your dashboard.
161
+ > 4. Go to the RSS Aggregator menu item, then set up your [feed sources](https://docs.wprssaggregator.com/adding-a-feed-source-importing-as-feed-items/), [templates](https://kb.wprssaggregator.com/article/457-templates) [general settings](https://docs.wprssaggregator.com/general-plugin-settings/).
 
162
 
163
  *DISPLAYING THE FEED ITEMS*
164
 
165
+ Use the WP RSS Aggregator block or shortcode on any page or post to display the imported items.
166
 
167
+ Shortcode: `[wp-rss-aggregator]`
168
 
169
+ Each block or shortcode can use any template and it can also have its own [parameters](https://kb.wprssaggregator.com/article/54-displaying-imported-items-shortcode), such as selecting which sources to display items from, the maximum number of items to display, whether to use pagination, which page to show, and more.
170
 
171
+ Shortcode example with parameters: `[wp-rss-aggregator source="123" limit="5"]`
172
 
173
  It is advisable to use the 'HTML' view of the editor when inserting shortcodes with parameters.
174
 
175
  *USAGE WITHIN THEME FILES*
176
 
177
+ Here are two examples of a function call from within a theme's files:
178
  `
179
  <?php
180
  wprss_display_feed_items( $args = array(
 
 
 
 
181
  'limit' => '8',
182
  'source' => '5,9'
183
  ));
190
 
191
 
192
  == Frequently Asked Questions ==
193
+
194
+ = What feed sources can I import items from? =
195
+
196
+ Any source with a valid RSS or XML feed can have its feed items imported by WP RSS Aggregator. Most sites provide RSS feeds right out the box as shown [here](https://kb.wprssaggregator.com/article/55-how-to-find-an-rss-feed). If you can't find an RSS feed, you may try to create one using [our free service](http://createfeed.wprssaggregator.com/).
197
+
198
+ - - -
199
+
200
  = How do I display the imported feed items? =
201
 
202
+ Use the template of your choice to display imported items anywhere across your site. To show the items, you can use either one (or a combination) of the options below.
203
 
204
+ * Option 1: Use our [shortcode](https://kb.wprssaggregator.com/article/54-displaying-imported-items-shortcode) in your posts and pages: `[wp-rss-aggregator]`
205
+ * Option 2: Use our [block](https://kb.wprssaggregator.com/article/454-displaying-imported-items-block-gutenberg) in the Gutenberg editor (WP 5.0 and later)
206
+ * Option 3: Call the function directly within a theme: `<?php wprss_display_feed_items(); ?>`
207
 
208
  - - -
209
 
210
+ = Is there a limit on the number of feed sources I can set up? =
211
 
212
+ No, there is no limit for the number of feed sources to import items from. Having many (50+) feed sources should not present any problems in itself. However, pulling in posts from many sites is bound to put your server under some stress, so you might want to consider using a hosting solution that goes beyond your typical shared host and [staggering the feed imports](https://kb.wprssaggregator.com/article/200-scheduling-fetching-of-feeds-imports-for-better-performance).
213
 
214
+ Check out our dedicated page on [WordPress hosting](https://www.wprssaggregator.com/recommended-web-hosts/?utm_source=wordpress-dot-org&utm_medium=readme&utm_campaign=readme_q-and-a_hosts&utm_content=q-and-a_hosts) recommendations (includes some affiliate links).
215
 
216
  - - -
217
 
225
 
226
  1. Try adding a few more feed sources and make sure they are valid by using the RSS Feed Validator.
227
 
228
+ 2. Make sure that feed items have been imported by visiting the Feed Items page.
229
+
230
+ 3. Try out the solutions listed in our [Feed Items Not Importing](https://kb.wprssaggregator.com/category/80-feed-items-or-posts-not-importing) knowledge base section.
231
 
232
+ 4. It's important to make sure your WordPress cron system is working well. If not, the feeds cannot be imported. If in doubt, you can install the WP Crontrol plugin to check for [bad cron](https://docs.wprssaggregator.com/cron-intervals/#bad-cron), or go to RSS Aggregator > Debugging and hit the red button to re-import all feed items.
233
 
234
  If the problems persist, please [contact our support team](https://wordpress.org/support/plugin/wp-rss-aggregator). If you're using a premium add-on, please use the [premium support channel](https://www.wprssaggregator.com/contact/).
235
 
237
 
238
  = Can I store imported feed items as posts? =
239
 
240
+ Yes, you can do that using the [Feed to Post](http://www.wprssaggregator.com/extensions/feed-to-post) premium add-on. You will not only be able to store items as posts, but as any post type. You can also set the author, set tags and categories, import images into the gallery or set featured images, and much more. These can then be displayed in your theme's blog page, via a page builder, etc.
241
 
242
  - - -
243
 
244
+ = Some RSS feeds only give a short excerpt when using the add-ons. Any way around that? =
245
 
246
  Yes, along with the [Feed to Post](http://www.wprssaggregator.com/extensions/feed-to-post) add-on we have another add-on called [Full Text RSS Feeds](http://www.wprssaggregator.com/extension/full-text-rss-feeds/) that can get the full content of most feeds that only supply a short excerpt. The Full Text RSS Feeds add-on requires Feed to Post and a valid license key to function.
247
 
249
 
250
  = I'm not sure which premium add-ons are right for me. Can you help me out? =
251
 
252
+ Sure! We built an [add-on finder (guide)](https://www.wprssaggregator.com/add-on-finder/) that will help determine what you need.
253
 
254
+ If you need any further help you can [contact our support team](http://www.wprssaggregator.com/contact/).
255
 
256
  - - -
257
 
258
  = Where can I find the documentation for the plugin? =
259
 
260
+ Our complete Knowledge Base with FAQs can be found [here](https://kb.wprssaggregator.com/).
261
+
262
 
263
  == Screenshots ==
264
 
265
+ 1. Feed items displayed using WP RSS Aggregator's templates.
266
+
267
+ 2. Setting up the WP RSS Aggregator Gutenberg block.
268
 
269
+ 3. Adding/Editing a feed source in WP RSS Aggregator.
270
 
271
+ 4. The list of feed sources in WP RSS Aggregator.
272
 
273
+ 5. The list of imported feeds items in WP RSS Aggregator.
274
 
275
+ 6. Setting up a template in WP RSS Aggregator.
276
 
277
+ 7. The general settings for WP RSS Aggregator.
278
 
279
+ 8. Using the Feed to Post premium add-on to import items as posts.
280
 
281
+ 9. Using the Feed to Post premium add-on to import Youtube videos.
282
 
 
283
 
284
  == Changelog ==
285
 
286
+ = 4.13 (2019-04-24) =
287
+ Added: Introduced feed templates.
288
+ Added: Introduced a WP RSS Aggregator Gutenberg block.
289
+ Added: Brand new debug log and logging system that stores logs in the database.
290
+ Added: Items can now be added to the Blacklist manually.
291
+ Changed: Refactored a lot of legacy code over to the new modular system.
292
+ Changed: General display settings have been moved to the "Default" template type.
293
+ Changed: Reorganized the general plugin settings. Advanced options are now under an advanced settings section.
294
+ Changed: Removed the "Add New" menu item from the RSS Aggregator menu.
295
+ Changed: The feed sources page now updates every 1 second.
296
+ Changed: Updated the TinyMCE dialog options for inserting a shortcode on a page or post (Classic Editor).
297
+ Changed: Updated administrator and editor role capabilities, fixing various permission bugs.
298
+ Changed: Updated a lot of setting descriptions and tooltips.
299
+ Changed: The help support beacon is now enabled by default.
300
+ Fixed: Import errors no longer "freeze" feed sources in an infinite importing state.
301
+ Fixed: Some import errors would not be logged due to script timeout or execution errors.
302
+ Fixed: Feed to Post was not able to show feed items in the shortcode.
303
+ Fixed: Deprecation notices on PHP 7.3.
304
+ Fixed: The "Force feed" option was not properly being applied to feed sources.
305
+ Fixed: A bug that caused perfectly good RSS feeds to trigger gzip errors.
306
+ Fixed: The "Delete permanently & blacklist" row action was appearing for non-feed-item post types.
307
+ Removed: The notice that asks users to leave a review was removed due to various bugs.
308
+
309
+ [Browse the full changelog history.](https://www.wprssaggregator.com/extension/core-plugin/)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/Container/ModuleContainer.php ADDED
@@ -0,0 +1,121 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RebelCode\Wpra\Core\Container;
4
+
5
+ use DI\NotFoundException;
6
+ use Interop\Container\ContainerInterface;
7
+ use RebelCode\Wpra\Core\Modules\ModuleInterface;
8
+
9
+ /**
10
+ * A container implementation specifically tailored for modules.
11
+ *
12
+ * @since 4.13
13
+ */
14
+ class ModuleContainer implements ContainerInterface
15
+ {
16
+ /**
17
+ * The inner container.
18
+ *
19
+ * @since 4.13
20
+ *
21
+ * @var ContainerInterface
22
+ */
23
+ protected $inner;
24
+
25
+ protected $definitions;
26
+
27
+ protected $cache;
28
+
29
+ protected $proxy;
30
+
31
+ /**
32
+ * Constructor.
33
+ *
34
+ * @since 4.13
35
+ *
36
+ * @param ModuleInterface $module The module instance.
37
+ * @param ContainerInterface|null $proxy Optional container to pass to service definitions.
38
+ */
39
+ public function __construct(ModuleInterface $module, ContainerInterface $proxy = null)
40
+ {
41
+ $this->definitions = $this->compileModuleServices($module);
42
+ $this->useProxy($proxy);
43
+ $this->cache = [];
44
+ }
45
+
46
+ /**
47
+ * Constructor.
48
+ *
49
+ * @since 4.13
50
+ *
51
+ * @param ContainerInterface|null $proxy Optional container to pass to service definitions.
52
+ */
53
+ public function useProxy(ContainerInterface $proxy = null)
54
+ {
55
+ $this->proxy = $proxy;
56
+ }
57
+
58
+ /**
59
+ * {@inheritdoc}
60
+ *
61
+ * @since 4.13
62
+ */
63
+ public function get($id)
64
+ {
65
+ // If no definition for the given ID, throw an exception
66
+ if (!$this->has($id)) {
67
+ throw new NotFoundException(
68
+ sprintf(__('Service "%s" was not found', 'wprss'), $id)
69
+ );
70
+ }
71
+
72
+ // Invoke the definition and save the service in cache, if needed
73
+ if (!array_key_exists($id, $this->cache)) {
74
+ $container = ($this->proxy === null) ? $this : $this->proxy;
75
+ $this->cache[$id] = call_user_func_array($this->definitions[$id], [$container]);
76
+ }
77
+
78
+ return $this->cache[$id];
79
+ }
80
+
81
+ /**
82
+ * {@inheritdoc}
83
+ *
84
+ * @since 4.13
85
+ */
86
+ public function has($id)
87
+ {
88
+ return array_key_exists($id, $this->definitions);
89
+ }
90
+
91
+ /**
92
+ * Compiles the module's service definitions.
93
+ *
94
+ * @since 4.13
95
+ *
96
+ * @param ModuleInterface $module The module instance.
97
+ *
98
+ * @return callable[] The service definitions.
99
+ */
100
+ protected function compileModuleServices(ModuleInterface $module)
101
+ {
102
+ $factories = $module->getFactories();
103
+ $extensions = $module->getExtensions();
104
+
105
+ // Compile the factories and extensions into a flat definitions list
106
+ $definitions = [];
107
+ foreach ($factories as $key => $definition) {
108
+ // Merge factory with its extension, if an extension exists
109
+ if (array_key_exists($key, $extensions)) {
110
+ $extension = $extensions[$key];
111
+ $definition = function (ContainerInterface $c) use ($definition, $extension) {
112
+ return $extension($c, $definition($c));
113
+ };
114
+ }
115
+ // Add to definitions
116
+ $definitions[$key] = $definition;
117
+ }
118
+
119
+ return $definitions;
120
+ }
121
+ }
src/Container/WpFilterContainer.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RebelCode\Wpra\Core\Container;
4
+
5
+ use Interop\Container\ContainerInterface;
6
+
7
+ /**
8
+ * A container implementation that wraps around another container to additionally pass its service results through
9
+ * WordPress filters with hook names equal to the service keys.
10
+ *
11
+ * @since 4.13
12
+ */
13
+ class WpFilterContainer implements ContainerInterface
14
+ {
15
+ /**
16
+ * The inner container.
17
+ *
18
+ * @since 4.13
19
+ *
20
+ * @var ContainerInterface
21
+ */
22
+ protected $inner;
23
+
24
+ /**
25
+ * Constructor.
26
+ *
27
+ * @since 4.13
28
+ *
29
+ * @param ContainerInterface $inner The inner container.
30
+ */
31
+ public function __construct(ContainerInterface $inner)
32
+ {
33
+ $this->inner = $inner;
34
+ }
35
+
36
+ /**
37
+ * {@inheritdoc}
38
+ *
39
+ * @since 4.13
40
+ */
41
+ public function get($id)
42
+ {
43
+ return apply_filters($id, $this->inner->get($id));
44
+ }
45
+
46
+ /**
47
+ * {@inheritdoc}
48
+ *
49
+ * @since 4.13
50
+ */
51
+ public function has($id)
52
+ {
53
+ return $this->inner->has($id);
54
+ }
55
+ }
src/Container/WpraContainer.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RebelCode\Wpra\Core\Container;
4
+
5
+ /**
6
+ * A container implementation specific to WP RSS Aggregator.
7
+ *
8
+ * @since 4.13
9
+ */
10
+ class WpraContainer extends ModuleContainer
11
+ {
12
+ /**
13
+ * {@inheritdoc}
14
+ *
15
+ * @since 4.13
16
+ */
17
+ protected function createInnerContainer(array $definitions)
18
+ {
19
+ return new WpFilterContainer(parent::createInnerContainer($definitions));
20
+ }
21
+ }
src/Data/AbstractDataSet.php ADDED
@@ -0,0 +1,139 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RebelCode\Wpra\Core\Data;
4
+
5
+ use Exception;
6
+ use RebelCode\Wpra\Core\Util\IteratorDelegateTrait;
7
+ use RuntimeException;
8
+
9
+ /**
10
+ * A data set that inherits missing entries from a parent data set.
11
+ *
12
+ * @since 4.13
13
+ */
14
+ abstract class AbstractDataSet implements DataSetInterface
15
+ {
16
+ /* @since 4.13 */
17
+ use IteratorDelegateTrait;
18
+
19
+ /**
20
+ * {@inheritdoc}
21
+ *
22
+ * @since 4.13
23
+ */
24
+ public function offsetGet($key)
25
+ {
26
+ try {
27
+ if ($this->offsetExists($key)) {
28
+ return $this->get($key);
29
+ }
30
+ } catch (Exception $exception) {
31
+ throw new RuntimeException(
32
+ sprintf('An error occurred while reading the value for the "%s" key', $key), null, $exception
33
+ );
34
+ }
35
+
36
+ throw new RuntimeException(sprintf('Entry with key "%s" was not found in the data set', $key));
37
+ }
38
+
39
+ /**
40
+ * {@inheritdoc}
41
+ *
42
+ * @since 4.13
43
+ */
44
+ public function offsetExists($key)
45
+ {
46
+ try {
47
+ return $this->has($key);
48
+ } catch (Exception $exception) {
49
+ throw new RuntimeException(
50
+ sprintf('An error occurred while looking up the "%s" key', $key), null, $exception
51
+ );
52
+ }
53
+ }
54
+
55
+ /**
56
+ * {@inheritdoc}
57
+ *
58
+ * @since 4.13
59
+ */
60
+ public function offsetSet($key, $value)
61
+ {
62
+ try {
63
+ $this->set($key, $value);
64
+ } catch (Exception $exception) {
65
+ throw new RuntimeException(
66
+ sprintf('An error occurred while writing to the "%s" key', $key), null, $exception
67
+ );
68
+ }
69
+ }
70
+
71
+ /**
72
+ * {@inheritdoc}
73
+ *
74
+ * @since 4.13
75
+ */
76
+ public function offsetUnset($key)
77
+ {
78
+ try {
79
+ $this->delete($key);
80
+ } catch (Exception $exception) {
81
+ throw new RuntimeException(
82
+ sprintf('An error occurred while deleting the "%s" key', $key), null, $exception
83
+ );
84
+ }
85
+ }
86
+
87
+ /**
88
+ * {@inheritdoc}
89
+ *
90
+ * @since 4.13
91
+ */
92
+ protected function recursiveUnpackIterators()
93
+ {
94
+ return true;
95
+ }
96
+
97
+ /**
98
+ * Retrieves a value by key.
99
+ *
100
+ * This method should assume that existence checking has already been performed.
101
+ *
102
+ * @since 4.13
103
+ *
104
+ * @param string $key The key of the value to retrieve.
105
+ *
106
+ * @return mixed The value associated with the given key.
107
+ */
108
+ abstract protected function get($key);
109
+
110
+ /**
111
+ * Checks if an entry exists by key.
112
+ *
113
+ * @since 4.13
114
+ *
115
+ * @param string $key The key to check for.
116
+ *
117
+ * @return bool True if the key exists, false if not.
118
+ */
119
+ abstract protected function has($key);
120
+
121
+ /**
122
+ * Modifies the value for a given key, creating the entry if it doesn't exist.
123
+ *
124
+ * @since 4.13
125
+ *
126
+ * @param string $key The key of the entry to modify.
127
+ * @param mixed $value The new value.
128
+ */
129
+ abstract protected function set($key, $value);
130
+
131
+ /**
132
+ * Deletes a specific entry by key.
133
+ *
134
+ * @since 4.13
135
+ *
136
+ * @param string $key The key of the entry to delete.
137
+ */
138
+ abstract protected function delete($key);
139
+ }
src/Data/AbstractDelegateDataSet.php ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RebelCode\Wpra\Core\Data;
4
+
5
+ /**
6
+ * Abstract implementation of a data set that delegates to an inner data set.
7
+ *
8
+ * @since 4.13
9
+ */
10
+ abstract class AbstractDelegateDataSet extends AbstractDataSet
11
+ {
12
+ /**
13
+ * The inner data set instance.
14
+ *
15
+ * @since 4.13
16
+ *
17
+ * @var DataSetInterface
18
+ */
19
+ protected $inner;
20
+
21
+ /**
22
+ * Constructor.
23
+ *
24
+ * @since 4.13
25
+ *
26
+ * @param DataSetInterface $inner The inner data set.
27
+ */
28
+ public function __construct(DataSetInterface $inner)
29
+ {
30
+ $this->inner = $inner;
31
+ }
32
+
33
+ /**
34
+ * Retrieves the inner key to use with the inner data set for a given outer data set key.
35
+ *
36
+ * @since 4.13
37
+ *
38
+ * @param int|string $outerKey The outer data set key.
39
+ *
40
+ * @return int|string The inner data set key.
41
+ */
42
+ protected function getInnerKey($outerKey)
43
+ {
44
+ return $outerKey;
45
+ }
46
+
47
+ /**
48
+ * Retrieves the inner key to use with the inner data set for a given outer data set key.
49
+ *
50
+ * @since 4.13
51
+ *
52
+ * @param int|string $innerKey The inner data set key.
53
+ *
54
+ * @return int|string The outer data set key.
55
+ */
56
+ protected function getOuterKey($innerKey)
57
+ {
58
+ return $innerKey;
59
+ }
60
+
61
+ /**
62
+ * {@inheritdoc}
63
+ *
64
+ * @since 4.13
65
+ */
66
+ protected function get($key)
67
+ {
68
+ return $this->inner->offsetGet($this->getInnerKey($key));
69
+ }
70
+
71
+ /**
72
+ * {@inheritdoc}
73
+ *
74
+ * @since 4.13
75
+ */
76
+ protected function has($key)
77
+ {
78
+ return $this->inner->offsetExists($this->getInnerKey($key));
79
+ }
80
+
81
+ /**
82
+ * {@inheritdoc}
83
+ *
84
+ * @since 4.13
85
+ */
86
+ protected function set($key, $value)
87
+ {
88
+ $this->inner->offsetSet($this->getInnerKey($key), $value);
89
+ }
90
+
91
+ /**
92
+ * {@inheritdoc}
93
+ *
94
+ * @since 4.13
95
+ */
96
+ protected function delete($key)
97
+ {
98
+ $this->inner->offsetUnset($this->getInnerKey($key));
99
+ }
100
+
101
+ /**
102
+ * {@inheritdoc}
103
+ *
104
+ * @since 4.13
105
+ */
106
+ protected function getIterator()
107
+ {
108
+ return $this->inner;
109
+ }
110
+
111
+ /**
112
+ * {@inheritdoc}
113
+ *
114
+ * @since 4.13
115
+ */
116
+ public function key()
117
+ {
118
+ return $this->getOuterKey($this->inner->key());
119
+ }
120
+ }
src/Data/AliasingDataSet.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RebelCode\Wpra\Core\Data;
4
+
5
+ /**
6
+ * A data set that wraps around another data set to alias its keys.
7
+ *
8
+ * The input keys given to this implementation's offset access methods are aliased and forwarded to the inner data set.
9
+ * During iteration, the yielded keys are also aliases. This allows the consumer of this data set to separate
10
+ * themselves completely from the keys of the inner data set.
11
+ *
12
+ * @since 4.13
13
+ */
14
+ class AliasingDataSet extends AbstractDelegateDataSet
15
+ {
16
+ /**
17
+ * A mapping of input keys to internal keys.
18
+ *
19
+ * @since 4.13
20
+ *
21
+ * @var array
22
+ */
23
+ protected $aliasToKeyMap;
24
+
25
+ /**
26
+ * A flipped mapping of the aliases map.
27
+ *
28
+ * @since 4.13
29
+ *
30
+ * @var array
31
+ */
32
+ protected $keyToAliasMap;
33
+
34
+ /**
35
+ * Constructor.
36
+ *
37
+ * @since 4.13
38
+ *
39
+ * @param DataSetInterface $dataset The inner data set.
40
+ * @param array $aliases Optional mapping of input keys to inner data set keys.
41
+ */
42
+ public function __construct(DataSetInterface $dataset, array $aliases)
43
+ {
44
+ parent::__construct($dataset);
45
+ $this->aliasToKeyMap = $aliases;
46
+ $this->keyToAliasMap = array_flip($aliases);
47
+ }
48
+
49
+ /**
50
+ * {@inheritdoc}
51
+ *
52
+ * Resolves an alias to retrieve the actual key to be used with the inner data set.
53
+ *
54
+ * @since 4.13
55
+ */
56
+ protected function getInnerKey($alias)
57
+ {
58
+ return (array_key_exists($alias, $this->aliasToKeyMap))
59
+ ? $this->aliasToKeyMap[$alias]
60
+ : $alias;
61
+ }
62
+
63
+ /**
64
+ * {@inheritdoc}
65
+ *
66
+ * Aliases a key to retrieve the key that consumers expect.
67
+ *
68
+ * @since 4.13
69
+ */
70
+ protected function getOuterKey($key)
71
+ {
72
+ return (array_key_exists($key, $this->keyToAliasMap))
73
+ ? $this->keyToAliasMap[$key]
74
+ : $key;
75
+ }
76
+ }
src/Data/ArrayDataSet.php ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RebelCode\Wpra\Core\Data;
4
+
5
+ use ArrayIterator;
6
+ use Dhii\Exception\CreateInvalidArgumentExceptionCapableTrait;
7
+ use Dhii\I18n\StringTranslatingTrait;
8
+ use Dhii\Util\Normalization\NormalizeArrayCapableTrait;
9
+ use stdClass;
10
+ use Traversable;
11
+
12
+ /**
13
+ * A data set implementation that uses a static array or object data store.
14
+ *
15
+ * @since 4.13
16
+ */
17
+ class ArrayDataSet extends AbstractDataSet
18
+ {
19
+ /* @since 4.13 */
20
+ use NormalizeArrayCapableTrait;
21
+
22
+ /* @since 4.13 */
23
+ use CreateInvalidArgumentExceptionCapableTrait;
24
+
25
+ /* @since 4.13 */
26
+ use StringTranslatingTrait;
27
+
28
+ /**
29
+ * The options data as an associative array.
30
+ *
31
+ * @since 4.13
32
+ *
33
+ * @var array
34
+ */
35
+ protected $data;
36
+
37
+ /**
38
+ * Constructor.
39
+ *
40
+ * @since 4.13
41
+ *
42
+ * @param array|stdClass|Traversable $data The data store, as an associative array, object or iterator.
43
+ */
44
+ public function __construct($data)
45
+ {
46
+ $this->data = $this->_normalizeArray($data);
47
+ }
48
+
49
+ /**
50
+ * {@inheritdoc}
51
+ *
52
+ * @since 4.13
53
+ */
54
+ protected function get($key)
55
+ {
56
+ return $this->data[$key];
57
+ }
58
+
59
+ /**
60
+ * {@inheritdoc}
61
+ *
62
+ * @since 4.13
63
+ */
64
+ protected function has($key)
65
+ {
66
+ return array_key_exists($key, $this->data);
67
+ }
68
+
69
+ /**
70
+ * {@inheritdoc}
71
+ *
72
+ * @since 4.13
73
+ */
74
+ protected function set($key, $value)
75
+ {
76
+ $this->data[$key] = $value;
77
+ }
78
+
79
+ /**
80
+ * {@inheritdoc}
81
+ *
82
+ * @since 4.13
83
+ */
84
+ protected function delete($key)
85
+ {
86
+ unset($this->data[$key]);
87
+ }
88
+
89
+ /**
90
+ * {@inheritdoc}
91
+ *
92
+ * @since 4.13
93
+ */
94
+ protected function getIterator()
95
+ {
96
+ return new ArrayIterator($this->data);
97
+ }
98
+ }
src/Data/ChangelogDataSet.php ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RebelCode\Wpra\Core\Data;
4
+
5
+ use ArrayIterator;
6
+ use RebelCode\Wpra\Core\Util\IteratorDelegateTrait;
7
+ use RuntimeException;
8
+
9
+ /**
10
+ * A data set for changelog files that adhere to the {@link http://keepachangelog.com Keep a Changelog} standard.
11
+ *
12
+ * @since 4.13
13
+ */
14
+ class ChangelogDataSet implements DataSetInterface
15
+ {
16
+ /* @since 4.13 */
17
+ use IteratorDelegateTrait;
18
+
19
+ /**
20
+ * The path to the changelog file.
21
+ *
22
+ * @since 4.13
23
+ *
24
+ * @var string
25
+ */
26
+ protected $file;
27
+
28
+ /**
29
+ * The parsed changelog data.
30
+ *
31
+ * @since 4.13
32
+ *
33
+ * @var array
34
+ */
35
+ protected $parsed;
36
+
37
+ /**
38
+ * Constructor.
39
+ *
40
+ * @since 4.13
41
+ *
42
+ * @param string $file The path to the changelog file.
43
+ */
44
+ public function __construct($file)
45
+ {
46
+ $this->file = $file;
47
+ $this->parsed = null;
48
+ }
49
+
50
+ /**
51
+ * Checks if the changelog needs to be parsed and if so, it is parsed.
52
+ *
53
+ * @since 4.13
54
+ */
55
+ protected function init()
56
+ {
57
+ if ($this->parsed === null) {
58
+ $this->parse();
59
+ }
60
+ }
61
+
62
+ /**
63
+ * Parses the changelog file.
64
+ *
65
+ * @since 4.13
66
+ */
67
+ protected function parse()
68
+ {
69
+ $handle = fopen($this->file, 'r');
70
+
71
+ $this->parsed = [];
72
+ $currHeading = 0;
73
+ $version = '';
74
+
75
+ do {
76
+ $buffer = fgets($handle);
77
+ if ($buffer === false) {
78
+ break;
79
+ }
80
+
81
+ // If a level-2 heading
82
+ if (strpos($buffer, '## ', 0) === 0) {
83
+ $currHeading = 2;
84
+
85
+ preg_match('/##\s\[([^\]]+)\]\s+-\s+(.*)/', $buffer, $matches);
86
+ if (isset($matches[1])) {
87
+ $version = trim($matches[1]);
88
+ $date = isset($matches[2]) ? trim($matches[2]) : '';
89
+
90
+ $this->parsed[$version] = [
91
+ 'date' => $date,
92
+ 'lines' => [],
93
+ 'raw' => '',
94
+ ];
95
+ }
96
+
97
+ continue;
98
+ }
99
+
100
+ if ($currHeading === 2) {
101
+ $this->parsed[$version]['lines'][] = $buffer;
102
+ $this->parsed[$version]['raw'] .= $buffer;
103
+ }
104
+ } while (true);
105
+
106
+ fclose($handle);
107
+ }
108
+
109
+ /**
110
+ * {@inheritdoc}
111
+ *
112
+ * @since 4.13
113
+ */
114
+ public function offsetGet($offset)
115
+ {
116
+ $this->init();
117
+
118
+ if (isset($this->parsed[$offset])) {
119
+ return $this->parsed[$offset];
120
+ }
121
+
122
+ throw new RuntimeException(sprintf(__('No changelog entry found for version %s', 'wprss'), $offset));
123
+ }
124
+
125
+ /**
126
+ * {@inheritdoc}
127
+ *
128
+ * @since 4.13
129
+ */
130
+ public function offsetExists($offset)
131
+ {
132
+ $this->init();
133
+
134
+ return isset($this->parsed[$offset]);
135
+ }
136
+
137
+ /**
138
+ * {@inheritdoc}
139
+ *
140
+ * @since 4.13
141
+ */
142
+ public function offsetSet($offset, $value)
143
+ {
144
+ $this->init();
145
+
146
+ $this->parsed[$offset] = $value;
147
+ }
148
+
149
+ /**
150
+ * {@inheritdoc}
151
+ *
152
+ * @since 4.13
153
+ */
154
+ public function offsetUnset($offset)
155
+ {
156
+ $this->init();
157
+
158
+ unset($this->parsed[$offset]);
159
+ }
160
+
161
+ /**
162
+ * {@inheritdoc}
163
+ *
164
+ * @since 4.13
165
+ */
166
+ protected function getIterator()
167
+ {
168
+ $this->init();
169
+
170
+ return new ArrayIterator($this->parsed);
171
+ }
172
+
173
+ /**
174
+ * {@inheritdoc}
175
+ *
176
+ * @since 4.13
177
+ */
178
+ public function __toString()
179
+ {
180
+ $this->init();
181
+
182
+ $string = '';
183
+ foreach ($this as $version => $info) {
184
+ $string .= sprintf('## %s (%s)', $version, $info['date']) . PHP_EOL . $info['raw'] . PHP_EOL;
185
+ }
186
+
187
+ return $string;
188
+ }
189
+ }
src/Data/Collections/CollectionInterface.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RebelCode\Wpra\Core\Data\Collections;
4
+
5
+ use RebelCode\Wpra\Core\Data\DataSetInterface;
6
+ use stdClass;
7
+ use Traversable;
8
+
9
+ /**
10
+ * Interface for objects that act as collections.
11
+ *
12
+ * @since 4.13
13
+ */
14
+ interface CollectionInterface extends DataSetInterface
15
+ {
16
+ /**
17
+ * Filters the contents of the dataset for entries that match a given filter.
18
+ *
19
+ * Collection filtering is guaranteed to be idempotent. Collections may implement this method to return collections
20
+ * that may be filtered further. If this is case, it should be assumed that the filters given to a collection are
21
+ * used in an AND relationship with any filters currently assigned to the current collection instance.
22
+ *
23
+ * @since 4.13
24
+ *
25
+ * @param array|stdClass|Traversable $filters A list of filters as key-value pairs, where the key represents the
26
+ * filter identifier and the value represents the value to filter by.
27
+ *
28
+ * @return CollectionInterface The new collection instance.
29
+ */
30
+ public function filter($filters);
31
+
32
+ /**
33
+ * Retrieves the total number of entries in the collection.
34
+ *
35
+ * @since 4.13
36
+ *
37
+ * @return int An integer number of entries.
38
+ */
39
+ public function getCount();
40
+
41
+ /**
42
+ * Clears the contents of the collection by deleting all the entries.
43
+ *
44
+ * @since 4.13
45
+ */
46
+ public function clear();
47
+ }
src/Data/Collections/NullCollection.php ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RebelCode\Wpra\Core\Data\Collections;
4
+
5
+ /**
6
+ * An implementation of a null collection.
7
+ *
8
+ * @since 4.13
9
+ */
10
+ class NullCollection implements CollectionInterface
11
+ {
12
+ /**
13
+ * {@inheritdoc}
14
+ *
15
+ * @since 4.13
16
+ */
17
+ public function offsetGet($offset)
18
+ {
19
+ return null;
20
+ }
21
+
22
+ /**
23
+ * {@inheritdoc}
24
+ *
25
+ * @since 4.13
26
+ */
27
+ public function offsetExists($offset)
28
+ {
29
+ return false;
30
+ }
31
+
32
+ /**
33
+ * {@inheritdoc}
34
+ *
35
+ * @since 4.13
36
+ */
37
+ public function offsetSet($offset, $value)
38
+ {
39
+ }
40
+
41
+ /**
42
+ * {@inheritdoc}
43
+ *
44
+ * @since 4.13
45
+ */
46
+ public function offsetUnset($offset)
47
+ {
48
+ }
49
+
50
+ /**
51
+ * {@inheritdoc}
52
+ *
53
+ * @since 4.13
54
+ */
55
+ public function filter($filters)
56
+ {
57
+ return $this;
58
+ }
59
+
60
+ /**
61
+ * {@inheritdoc}
62
+ *
63
+ * @since 4.13
64
+ */
65
+ public function getCount()
66
+ {
67
+ return 0;
68
+ }
69
+
70
+ /**
71
+ * {@inheritdoc}
72
+ *
73
+ * @since 4.13
74
+ */
75
+ public function clear()
76
+ {
77
+ }
78
+
79
+ /**
80
+ * {@inheritdoc}
81
+ *
82
+ * @since 4.13
83
+ */
84
+ public function current()
85
+ {
86
+ return null;
87
+ }
88
+
89
+ /**
90
+ * {@inheritdoc}
91
+ *
92
+ * @since 4.13
93
+ */
94
+ public function next()
95
+ {
96
+ }
97
+
98
+ /**
99
+ * {@inheritdoc}
100
+ *
101
+ * @since 4.13]
102
+ */
103
+ public function key()
104
+ {
105
+ return null;
106
+ }
107
+
108
+ /**
109
+ * {@inheritdoc}
110
+ *
111
+ * @since 4.13
112
+ */
113
+ public function valid()
114
+ {
115
+ return false;
116
+ }
117
+
118
+ /**
119
+ * {@inheritdoc}
120
+ *
121
+ * @since 4.13
122
+ */
123
+ public function rewind()
124
+ {
125
+ }
126
+ }
src/Data/Collections/TwigTemplateCollection.php ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RebelCode\Wpra\Core\Data\Collections;
4
+
5
+ use ArrayIterator;
6
+ use Dhii\Output\TemplateInterface;
7
+ use Exception;
8
+ use LogicException;
9
+ use RebelCode\Wpra\Core\Data\AbstractDataSet;
10
+ use RebelCode\Wpra\Core\Templates\TwigTemplate;
11
+ use Twig\Environment;
12
+ use Twig\Error\LoaderError;
13
+
14
+ /**
15
+ * A dataset implementation that acts as a collection for Twig templates.
16
+ *
17
+ * @since 4.13
18
+ */
19
+ class TwigTemplateCollection extends AbstractDataSet
20
+ {
21
+ /**
22
+ * The Twig environment.
23
+ *
24
+ * @since 4.13
25
+ *
26
+ * @var Environment
27
+ */
28
+ protected $env;
29
+
30
+ /**
31
+ * Constructor.
32
+ *
33
+ * @since 4.13
34
+ *
35
+ * @param Environment $env The Twig environment instance.
36
+ */
37
+ public function __construct(Environment $env)
38
+ {
39
+ $this->env = $env;
40
+ }
41
+
42
+ /**
43
+ * Creates a template instance.
44
+ *
45
+ * @since 4.13
46
+ *
47
+ * @param string $path The path to the Twig file, relative from any registered templates directory.
48
+ *
49
+ * @return TemplateInterface The template instance.
50
+ */
51
+ protected function createTemplate($path)
52
+ {
53
+ return new TwigTemplate($this->env, $path);
54
+ }
55
+
56
+ /**
57
+ * {@inheritdoc}
58
+ *
59
+ * @since 4.13
60
+ */
61
+ protected function get($key)
62
+ {
63
+ return $this->createTemplate($key);
64
+ }
65
+
66
+ /**
67
+ * {@inheritdoc}
68
+ *
69
+ * @since 4.13
70
+ */
71
+ protected function has($key)
72
+ {
73
+ try {
74
+ $this->env->load($key);
75
+ } catch (LoaderError $e) {
76
+ return false;
77
+ } catch (Exception $e) {
78
+ // Do not emit runtime or template syntax errors
79
+ }
80
+
81
+ return true;
82
+ }
83
+
84
+ /**
85
+ * {@inheritdoc}
86
+ *
87
+ * @since 4.13
88
+ */
89
+ protected function set($key, $value)
90
+ {
91
+ throw new LogicException(__('Cannot modify Twig templates', 'wprss'));
92
+ }
93
+
94
+ /**
95
+ * {@inheritdoc}
96
+ *
97
+ * @since 4.13
98
+ */
99
+ protected function delete($key)
100
+ {
101
+ throw new LogicException(__('Cannot delete Twig templates', 'wprss'));
102
+ }
103
+
104
+ /**
105
+ * {@inheritdoc}
106
+ *
107
+ * @since 4.13
108
+ */
109
+ protected function getIterator()
110
+ {
111
+ return new ArrayIterator([]);
112
+ }
113
+ }
src/Data/Collections/WpPostCollection.php ADDED
@@ -0,0 +1,464 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RebelCode\Wpra\Core\Data\Collections;
4
+
5
+ use ArrayAccess;
6
+ use ArrayIterator;
7
+ use Dhii\Exception\CreateInvalidArgumentExceptionCapableTrait;
8
+ use Dhii\I18n\StringTranslatingTrait;
9
+ use Dhii\Util\Normalization\NormalizeArrayCapableTrait;
10
+ use InvalidArgumentException;
11
+ use OutOfRangeException;
12
+ use RebelCode\Wpra\Core\Data\AbstractDataSet;
13
+ use RebelCode\Wpra\Core\Data\DataSetInterface;
14
+ use RebelCode\Wpra\Core\Data\Wp\WpPostDataSet;
15
+ use RuntimeException;
16
+ use stdClass;
17
+ use Traversable;
18
+ use WP_Error;
19
+ use WP_Post;
20
+
21
+ /**
22
+ * A data set implementation that acts as a wrapper for a collection of posts.
23
+ *
24
+ * @since 4.13
25
+ */
26
+ class WpPostCollection extends AbstractDataSet implements CollectionInterface
27
+ {
28
+ /* @since 4.13 */
29
+ use NormalizeArrayCapableTrait;
30
+
31
+ /* @since 4.13 */
32
+ use CreateInvalidArgumentExceptionCapableTrait;
33
+
34
+ /* @since 4.13 */
35
+ use StringTranslatingTrait;
36
+
37
+ /**
38
+ * The post type.
39
+ *
40
+ * @since 4.13
41
+ *
42
+ * @var string
43
+ */
44
+ protected $postType;
45
+
46
+ /**
47
+ * The meta query.
48
+ *
49
+ * @since 4.13
50
+ *
51
+ * @var array
52
+ */
53
+ protected $metaQuery;
54
+
55
+ /**
56
+ * The ID of the last inserted post.
57
+ *
58
+ * @since 4.13
59
+ *
60
+ * @var int|string
61
+ */
62
+ protected $lastInsertedId;
63
+
64
+ /**
65
+ * Optional filter to restrict the collection query.
66
+ *
67
+ * @since 4.13
68
+ *
69
+ * @var array|null
70
+ */
71
+ protected $filter;
72
+
73
+ /**
74
+ * Constructor.
75
+ *
76
+ * @since 4.13
77
+ *
78
+ * @param string $postType The post type.
79
+ * @param array $metaQuery The meta query.
80
+ * @param array|null $filter Optional filter to restrict the collection query.
81
+ */
82
+ public function __construct($postType, $metaQuery = [], $filter = null)
83
+ {
84
+ $this->postType = $postType;
85
+ $this->metaQuery = $metaQuery;
86
+ $this->filter = $filter;
87
+ }
88
+
89
+ /**
90
+ * {@inheritdoc}
91
+ *
92
+ * @since 4.13
93
+ */
94
+ public function offsetGet($key)
95
+ {
96
+ return $this->get($key);
97
+ }
98
+
99
+ /**
100
+ * {@inheritdoc}
101
+ *
102
+ * @since 4.13
103
+ */
104
+ protected function get($key)
105
+ {
106
+ if ($key === null && $this->lastInsertedId !== null) {
107
+ return $this->offsetGet($this->lastInsertedId);
108
+ }
109
+
110
+ $posts = $this->queryPosts($key);
111
+
112
+ if (count($posts) === 0) {
113
+ throw new OutOfRangeException(
114
+ sprintf(__('Post "%s" was not found', 'wprss'), $key)
115
+ );
116
+ }
117
+
118
+ $post = reset($posts);
119
+ $result = $this->createModel($post);
120
+
121
+ return $result;
122
+ }
123
+
124
+ /**
125
+ * {@inheritdoc}
126
+ *
127
+ * @since 4.13
128
+ */
129
+ protected function has($key)
130
+ {
131
+ if ($key === null) {
132
+ return false;
133
+ }
134
+
135
+ $posts = $this->queryPosts($key);
136
+
137
+ return count($posts) === 1;
138
+ }
139
+
140
+ /**
141
+ * {@inheritdoc}
142
+ *
143
+ * @since 4.13
144
+ */
145
+ protected function set($key, $data)
146
+ {
147
+ if ($key === null) {
148
+ $this->createPost($data);
149
+
150
+ return;
151
+ }
152
+
153
+ $this->updatePost($key, $data);
154
+ }
155
+
156
+ /**
157
+ * {@inheritdoc}
158
+ *
159
+ * @since 4.13
160
+ */
161
+ protected function delete($key)
162
+ {
163
+ wp_delete_post($key, true);
164
+ }
165
+
166
+ /**
167
+ * {@inheritdoc}
168
+ *
169
+ * @since 4.13
170
+ */
171
+ public function filter($filter)
172
+ {
173
+ if (!is_array($filter)) {
174
+ throw new InvalidArgumentException('Collection filter argument is not an array');
175
+ }
176
+
177
+ if (empty($filter)) {
178
+ return $this;
179
+ }
180
+
181
+ $currFilter = empty($this->filter) ? [] : $this->filter;
182
+ $newFilter = array_merge_recursive_distinct($currFilter, $filter);
183
+
184
+ return $this->createSelfWithFilter($newFilter);
185
+ }
186
+
187
+ /**
188
+ * {@inheritdoc}
189
+ *
190
+ * @since 4.13
191
+ */
192
+ public function getCount()
193
+ {
194
+ return count($this->queryPosts(null));
195
+ }
196
+
197
+ /**
198
+ * {@inheritdoc}
199
+ *
200
+ * @since 4.13
201
+ */
202
+ public function clear()
203
+ {
204
+ foreach ($this->getIterator() as $post) {
205
+ $this->delete($post->ID);
206
+ }
207
+ }
208
+
209
+ /**
210
+ * Creates a new post using the given data.
211
+ *
212
+ * @since 4.13
213
+ *
214
+ * @param array $data The data to create the post with.
215
+ */
216
+ protected function createPost($data)
217
+ {
218
+ $post = $this->getNewPostData($data);
219
+ $result = wp_insert_post($post, true);
220
+
221
+ if ($result instanceof WP_Error) {
222
+ throw new RuntimeException($result->get_error_message(), $result->get_error_code());
223
+ }
224
+
225
+ $this->lastInsertedId = $result;
226
+ $this->updatePost($result, $data);
227
+ }
228
+
229
+ /**
230
+ * Updates a post.
231
+ *
232
+ * @since 4.13
233
+ *
234
+ * @param int|string $key The post's key (ID or slug).
235
+ * @param array $data The data to update the post with.
236
+ */
237
+ protected function updatePost($key, $data)
238
+ {
239
+ $post = $this->get($key);
240
+ $data = $this->getUpdatePostData($key, $data);
241
+
242
+ foreach ($data as $k => $v) {
243
+ $post[$k] = $v;
244
+ }
245
+ }
246
+
247
+ /**
248
+ * Retrieves the data to use for creating a new post.
249
+ *
250
+ * @since 4.13
251
+ *
252
+ * @param array $data The data being used to create the post.
253
+ *
254
+ * @return array The actual data to use with {@link wp_insert_post}.
255
+ */
256
+ protected function getNewPostData($data)
257
+ {
258
+ return [
259
+ 'post_type' => $this->postType,
260
+ ];
261
+ }
262
+
263
+ /**
264
+ * Retrieves the data to use for updating a post.
265
+ *
266
+ * @since 4.13
267
+ *
268
+ * @param int|string $key The post key (ID or slug).
269
+ * @param array $data The data being used to update the post.
270
+ *
271
+ * @return array The actual data to update the post with.
272
+ */
273
+ protected function getUpdatePostData($key, $data)
274
+ {
275
+ return $data;
276
+ }
277
+
278
+ /**
279
+ * Normalizes a variable into a post array,
280
+ *
281
+ * @since 4.13
282
+ *
283
+ * @param array|stdClass|Traversable|WP_Post $post Post data array, object or iterable, or a WP_Post instance.
284
+ *
285
+ * @return array The post data array.
286
+ */
287
+ protected function toPostArray($post)
288
+ {
289
+ if ($post instanceof WP_Post) {
290
+ return $post->to_array();
291
+ }
292
+
293
+ return $this->_normalizeArray($post);
294
+ }
295
+
296
+ /**
297
+ * Recursively patches a subject with every entry in a given patch data array.
298
+ *
299
+ * @since 4.13
300
+ *
301
+ * @param array|ArrayAccess $subject The subject to patch.
302
+ * @param array|stdClass|Traversable $patch The data to patch the subject with.
303
+ *
304
+ * @return array|ArrayAccess The patched subject.
305
+ */
306
+ protected function recursivePatch($subject, $patch)
307
+ {
308
+ foreach ($patch as $key => $value) {
309
+ $subject[$key] = $value;
310
+ }
311
+
312
+ return $subject;
313
+ }
314
+
315
+ /**
316
+ * {@inheritdoc}
317
+ *
318
+ * @since 4.13
319
+ */
320
+ protected function getIterator()
321
+ {
322
+ return new ArrayIterator($this->queryPosts(null));
323
+ }
324
+
325
+ /**
326
+ * {@inheritdoc}
327
+ *
328
+ * @since 4.13
329
+ */
330
+ protected function recursiveUnpackIterators()
331
+ {
332
+ return true;
333
+ }
334
+
335
+ /**
336
+ * {@inheritdoc}
337
+ *
338
+ * @since 4.13
339
+ */
340
+ protected function createIterationValue($value)
341
+ {
342
+ return $this->createModel($value);
343
+ }
344
+
345
+ /**
346
+ * Creates the resulting dataset model.
347
+ *
348
+ * @since 4.13
349
+ *
350
+ * @param WP_Post $post The post.
351
+ *
352
+ * @return DataSetInterface The dataset model.
353
+ */
354
+ protected function createModel(WP_Post $post)
355
+ {
356
+ return new WpPostDataSet($post);
357
+ }
358
+
359
+ /**
360
+ * Queries the posts.
361
+ *
362
+ * @since 4.13
363
+ *
364
+ * @param int|string|null $key Optional ID or slug which, if not null, narrows down the query to only that post.
365
+ *
366
+ * @return WP_Post[] An array of posts objects.
367
+ */
368
+ protected function queryPosts($key = null)
369
+ {
370
+ $queryArgs = $this->getBasePostQueryArgs();
371
+
372
+ if ($key !== null && is_numeric($key)) {
373
+ $queryArgs['p'] = $key;
374
+ }
375
+
376
+ if ($key !== null && is_string($key) && !is_numeric($key)) {
377
+ $queryArgs['name'] = $key;
378
+ }
379
+
380
+ $filter = is_array($this->filter) ? $this->filter : [];
381
+
382
+ foreach ($filter as $fKey => $fVal) {
383
+ $handled = $this->handleFilter($queryArgs, $fKey, $fVal);
384
+
385
+ if (!$handled) {
386
+ $queryArgs[$fKey] = $fVal;
387
+ }
388
+ }
389
+
390
+ return get_posts($queryArgs);
391
+ }
392
+
393
+ /**
394
+ * Retrieves the base (bare minimum) post query args.
395
+ *
396
+ * @since 4.13
397
+ *
398
+ * @return array
399
+ */
400
+ protected function getBasePostQueryArgs()
401
+ {
402
+ return [
403
+ 'post_type' => $this->postType,
404
+ 'suppress_filters' => true,
405
+ 'cache_results' => false,
406
+ 'posts_per_page' => -1,
407
+ 'meta_query' => $this->metaQuery,
408
+ ];
409
+ }
410
+
411
+ /**
412
+ * Handles the processing of a filter.
413
+ *
414
+ * @since 4.13
415
+ *
416
+ * @param array $queryArgs The query arguments to modify, passed by reference.
417
+ * @param string $key The filter key.
418
+ * @param mixed $value The filter value.
419
+ *
420
+ * @return bool True if the filter was handled, false if it wasn't.
421
+ */
422
+ protected function handleFilter(&$queryArgs, $key, $value)
423
+ {
424
+ if ($key === 'id') {
425
+ $queryArgs['post__in'] = is_array($value) ? $value : [$value];
426
+
427
+ return true;
428
+ }
429
+
430
+ if ($key === 's') {
431
+ $queryArgs['s'] = $value;
432
+
433
+ return true;
434
+ }
435
+
436
+ if ($key === 'num_items') {
437
+ $queryArgs['posts_per_page'] = $value;
438
+
439
+ return true;
440
+ }
441
+
442
+ if ($key === 'page') {
443
+ $queryArgs['paged'] = $value;
444
+
445
+ return true;
446
+ }
447
+
448
+ return false;
449
+ }
450
+
451
+ /**
452
+ * Creates a new collection of this type with an added filter.
453
+ *
454
+ * @since 4.13
455
+ *
456
+ * @param array $filter The filter for restricting the collection query.
457
+ *
458
+ * @return CollectionInterface
459
+ */
460
+ protected function createSelfWithFilter($filter)
461
+ {
462
+ return new static($this->postType, $this->metaQuery, $filter);
463
+ }
464
+ }
src/Data/CompositeDataSet.php ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RebelCode\Wpra\Core\Data;
4
+
5
+ use RebelCode\Wpra\Core\Util\IteratorDelegateTrait;
6
+ use RebelCode\Wpra\Core\Util\MergedIterator;
7
+ use RuntimeException;
8
+ use stdClass;
9
+ use Traversable;
10
+
11
+ /**
12
+ * A data set implementation that groups multiple data sets together as one.
13
+ *
14
+ * This implementation has the following properties:
15
+ * - Data is read from the first child that has the requested key.
16
+ * - Existence checking is performed on all children and if at least one child has the key, true is returned.
17
+ * - Data writing and deletion is performed on all children.
18
+ * - All children are used during iteration, yielding the aggregated data among all of them without duplicate keys.
19
+ *
20
+ * This data set is also useful for synchronizing multiple data sets. By iterating the composite data set, consumers
21
+ * get access to the aggregate data from all the children data sets. By setting each key-value pair on the composite
22
+ * data set, each child dataset will receive that key-value pair.
23
+ *
24
+ * @since 4.13
25
+ */
26
+ class CompositeDataSet implements DataSetInterface
27
+ {
28
+ /* @since 4.13 */
29
+ use IteratorDelegateTrait;
30
+
31
+ /**
32
+ * Additional data sets to write to and delete from.
33
+ *
34
+ * @since 4.13
35
+ *
36
+ * @var DataSetInterface[]
37
+ */
38
+ protected $dataSets;
39
+
40
+ /**
41
+ * Constructor.
42
+ *
43
+ * @since 4.13
44
+ *
45
+ * @param DataSetInterface[]|stdClass|Traversable $dataSets The children data sets instances.
46
+ */
47
+ public function __construct($dataSets)
48
+ {
49
+ $this->dataSets = $dataSets;
50
+ }
51
+
52
+ /**
53
+ * {@inheritdoc}
54
+ *
55
+ * @since 4.13
56
+ */
57
+ public function offsetGet($key)
58
+ {
59
+ foreach ($this->dataSets as $dataSet) {
60
+ if ($dataSet->offsetExists($key)) {
61
+ return $dataSet->offsetGet($key);
62
+ }
63
+ }
64
+
65
+ throw new RuntimeException(sprintf('Entry with key "%s" was not found in the data set', $key));
66
+ }
67
+
68
+ /**
69
+ * {@inheritdoc}
70
+ *
71
+ * @since 4.13
72
+ */
73
+ public function offsetExists($key)
74
+ {
75
+ foreach ($this->dataSets as $dataSet) {
76
+ if ($dataSet->offsetExists($key)) {
77
+ return true;
78
+ }
79
+ }
80
+
81
+ return false;
82
+ }
83
+
84
+ /**
85
+ * {@inheritdoc}
86
+ *
87
+ * @since 4.13
88
+ */
89
+ public function offsetSet($key, $value)
90
+ {
91
+ foreach ($this->dataSets as $dataSet) {
92
+ $dataSet->offsetSet($key, $value);
93
+ }
94
+ }
95
+
96
+ /**
97
+ * {@inheritdoc}
98
+ *
99
+ * @since 4.13
100
+ */
101
+ public function offsetUnset($key)
102
+ {
103
+ foreach ($this->dataSets as $dataSet) {
104
+ $dataSet->offsetUnset($key);
105
+ }
106
+ }
107
+
108
+ /**
109
+ * {@inheritdoc}
110
+ *
111
+ * @since 4.13
112
+ */
113
+ protected function getIterator()
114
+ {
115
+ return new MergedIterator($this->dataSets);
116
+ }
117
+ }
src/Data/DataSetInterface.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RebelCode\Wpra\Core\Data;
4
+
5
+ use ArrayAccess;
6
+ use Iterator;
7
+
8
+ /**
9
+ * Interface for a set of data.
10
+ *
11
+ * @since 4.13
12
+ */
13
+ interface DataSetInterface extends ArrayAccess, Iterator
14
+ {
15
+ }
src/Data/DeprefixingDataSet.php ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RebelCode\Wpra\Core\Data;
4
+
5
+ /**
6
+ * An implementation of a delegate data set that removes prefixes from consumer keys before delegating to the inner data
7
+ * set.
8
+ *
9
+ * @since 4.13
10
+ */
11
+ class DeprefixingDataSet extends AbstractDelegateDataSet
12
+ {
13
+ /**
14
+ * The prefix to strip from the inner data set's keys.
15
+ *
16
+ * @since 4.13
17
+ *
18
+ * @var string
19
+ */
20
+ protected $prefix;
21
+
22
+ /**
23
+ * Constructor.
24
+ *
25
+ * @since 4.13
26
+ *
27
+ * @param DataSetInterface $inner The inner data set.
28
+ * @param string $prefix The prefix to strip from the inner data set's keys.
29
+ */
30
+ public function __construct(DataSetInterface $inner, $prefix)
31
+ {
32
+ parent::__construct($inner);
33
+ $this->prefix = $prefix;
34
+ }
35
+
36
+ /**
37
+ * {@inheritdoc}
38
+ *
39
+ * @since 4.13
40
+ */
41
+ protected function getInnerKey($outerKey)
42
+ {
43
+ $prefixLength = strlen($this->prefix);
44
+
45
+ return ($prefixLength > 0 && strpos($outerKey, $this->prefix) === 0)
46
+ ? substr($outerKey, $prefixLength)
47
+ : $outerKey;
48
+ }
49
+
50
+ /**
51
+ * {@inheritdoc}
52
+ *
53
+ * @since 4.13
54
+ */
55
+ protected function getOuterKey($innerKey)
56
+ {
57
+ return $this->prefix . $innerKey;
58
+ }
59
+ }
src/Data/MaskingDataSet.php ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RebelCode\Wpra\Core\Data;
4
+
5
+ use OutOfRangeException;
6
+
7
+ class MaskingDataSet extends AbstractDelegateDataSet
8
+ {
9
+ /**
10
+ * An array of keys mapping to booleans, where true exposes the key and false hides the key.
11
+ *
12
+ * @since 4.13
13
+ *
14
+ * @var bool[]
15
+ */
16
+ protected $mask;
17
+
18
+ /**
19
+ * The default mask value to use for keys that are not included in the mask array.
20
+ *
21
+ * @since 4.13
22
+ *
23
+ * @var bool
24
+ */
25
+ protected $defMask;
26
+
27
+ /**
28
+ * Constructor.
29
+ *
30
+ * @since 4.13
31
+ *
32
+ * @param DataSetInterface $inner The inner data set.
33
+ * @param bool[] $mask An array of keys mapping to booleans, where true exposes the key and false
34
+ * hides the key.
35
+ * @param bool $default The default mask value to use for keys that are not included in the mask array.
36
+ */
37
+ public function __construct(DataSetInterface $inner, array $mask, $default = true)
38
+ {
39
+ parent::__construct($inner);
40
+
41
+ $this->mask = $mask;
42
+ $this->defMask = $default;
43
+ }
44
+
45
+ /**
46
+ * {@inheritdoc}
47
+ *
48
+ * @since 4.13
49
+ */
50
+ protected function has($key)
51
+ {
52
+ return $this->isExposed($key) && parent::has($key);
53
+ }
54
+
55
+ /**
56
+ * {@inheritdoc}
57
+ *
58
+ * @since 4.13
59
+ */
60
+ protected function set($key, $value)
61
+ {
62
+ if (!$this->isExposed($key)) {
63
+ throw new OutOfRangeException(sprintf('Cannot set masked key "%s"', $key));
64
+ }
65
+
66
+ parent::set($key, $value);
67
+ }
68
+
69
+ /**
70
+ * {@inheritdoc}
71
+ *
72
+ * @since 4.13
73
+ */
74
+ protected function delete($key)
75
+ {
76
+ if (!$this->has($key)) {
77
+ throw new OutOfRangeException(sprintf('Cannot delete masked key "%s"', $key));
78
+ }
79
+
80
+ parent::delete($key);
81
+ }
82
+
83
+ /**
84
+ * {@inheritdoc}
85
+ *
86
+ * @since 4.13
87
+ */
88
+ public function rewind()
89
+ {
90
+ parent::rewind();
91
+
92
+ $this->seekNextExposed();
93
+ }
94
+
95
+ /**
96
+ * {@inheritdoc}
97
+ *
98
+ * @since 4.13
99
+ */
100
+ public function valid()
101
+ {
102
+ $this->seekNextExposed();
103
+
104
+ return parent::valid();
105
+ }
106
+
107
+ /**
108
+ * Checks if a key is exposed through the mask.
109
+ *
110
+ * @since 4.13
111
+ *
112
+ * @param int|string $key The key to check.
113
+ *
114
+ * @return bool True if the key is exposed, false if the key is hidden.
115
+ */
116
+ protected function isExposed($key)
117
+ {
118
+ return array_key_exists($key, $this->mask)
119
+ ? $this->mask[$key] !== false
120
+ : $this->defMask;
121
+ }
122
+
123
+ /**
124
+ * Iterates forward until it an exposed key is found or until the end of iteration is reached.
125
+ *
126
+ * @since 4.13
127
+ */
128
+ protected function seekNextExposed()
129
+ {
130
+ while (parent::valid() && !$this->isExposed($this->key())) {
131
+ parent::next();
132
+ }
133
+ }
134
+ }
src/Data/MergedDataSet.php ADDED
@@ -0,0 +1,237 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RebelCode\Wpra\Core\Data;
4
+
5
+ use Exception;
6
+ use RebelCode\Wpra\Core\Util\MergedIterator;
7
+
8
+ /**
9
+ * An implementation of a data set that merged two data sets, with customizable override behavior and iteration.
10
+ *
11
+ * @since 4.13
12
+ */
13
+ class MergedDataSet extends AbstractDataSet
14
+ {
15
+ /**
16
+ * Iteration mode for only iterating over the primary data set.
17
+ *
18
+ * @since 4.13
19
+ */
20
+ const ITERATE_PRIMARY = 0;
21
+
22
+ /**
23
+ * Iteration mode for only iterating over the secondary data set.
24
+ *
25
+ * @since 4.13
26
+ */
27
+ const ITERATE_SECONDARY = 1;
28
+
29
+ /**
30
+ * Iteration mode for iterating over both data sets, yielding only unique keys.
31
+ *
32
+ * @since 4.13
33
+ */
34
+ const ITERATE_BOTH = 2;
35
+
36
+ /**
37
+ * The primary data set.
38
+ *
39
+ * @since 4.13
40
+ *
41
+ * @var DataSetInterface
42
+ */
43
+ protected $primary;
44
+
45
+ /**
46
+ * The secondary data set.
47
+ *
48
+ * @since 4.13
49
+ *
50
+ * @var DataSetInterface
51
+ */
52
+ protected $secondary;
53
+
54
+ /**
55
+ * The map of keys that the primary overrides.
56
+ *
57
+ * @since 4.13
58
+ *
59
+ * @var bool[]
60
+ */
61
+ protected $overrideMap;
62
+
63
+ /**
64
+ * Description
65
+ *
66
+ * @since 4.13
67
+ *
68
+ * @var bool
69
+ */
70
+ protected $iteration;
71
+
72
+ /**
73
+ * Constructor.
74
+ *
75
+ * @since 4.13
76
+ *
77
+ * @param DataSetInterface $primary The primary data set to use.
78
+ * @param DataSetInterface $secondary The secondary data set to use for keys that don't exist in the primary.
79
+ * @param bool[] $overrideMap The map of keys to booleans. If the primary data set has the key but the
80
+ * key exists in this map and is mapped to `true`, the secondary dataset will
81
+ * be used instead. If the key is not in the map or maps to `false`, the normal
82
+ * override behavior is used.
83
+ * @param int $iteration The iteration mode. See the `ITERATE_*` constants provided by this class.
84
+ */
85
+ public function __construct(
86
+ DataSetInterface $primary,
87
+ DataSetInterface $secondary,
88
+ $overrideMap = [],
89
+ $iteration = self::ITERATE_BOTH
90
+ ) {
91
+ $this->primary = $primary;
92
+ $this->secondary = $secondary;
93
+ $this->overrideMap = $overrideMap;
94
+ $this->iteration = $iteration;
95
+ }
96
+
97
+ /**
98
+ * {@inheritdoc}
99
+ *
100
+ * @since 4.13
101
+ */
102
+ protected function has($key)
103
+ {
104
+ return $this->isOverridden($key)
105
+ ? $this->secondary->offsetExists($key)
106
+ : $this->primary->offsetExists($key) || $this->secondary->offsetExists($key);
107
+ }
108
+
109
+ /**
110
+ * {@inheritdoc}
111
+ *
112
+ * @since 4.13
113
+ */
114
+ protected function get($key)
115
+ {
116
+ return $this->primary->offsetExists($key) && !$this->isOverridden($key)
117
+ ? $this->primary->offsetGet($key)
118
+ : $this->secondary->offsetGet($key);
119
+ }
120
+
121
+ /**
122
+ * {@inheritdoc}
123
+ *
124
+ * @since 4.13
125
+ */
126
+ protected function set($key, $value)
127
+ {
128
+ if ($this->isOverridden($key)) {
129
+ $this->secondary->offsetSet($key, $value);
130
+
131
+ return;
132
+ }
133
+
134
+ try {
135
+ $this->primary->offsetSet($key, $value);
136
+ } catch (Exception $exception) {
137
+ $this->secondary->offsetSet($key, $value);
138
+ }
139
+ }
140
+
141
+ /**
142
+ * {@inheritdoc}
143
+ *
144
+ * @since 4.13
145
+ */
146
+ protected function delete($key)
147
+ {
148
+ if ($this->isOverridden($key)) {
149
+ $this->secondary->offsetUnset($key);
150
+
151
+ return;
152
+ }
153
+
154
+ try {
155
+ $this->primary->offsetUnset($key);
156
+ } catch (Exception $exception) {
157
+ $this->secondary->offsetUnset($key);
158
+ }
159
+ }
160
+
161
+ /**
162
+ * Checks if a key is marked as being overridden.
163
+ *
164
+ * @since 4.13
165
+ *
166
+ * @param int|string $key The key.
167
+ *
168
+ * @return bool True if the key is overridden, false if not.
169
+ */
170
+ protected function isOverridden($key)
171
+ {
172
+ return array_key_exists($key, $this->overrideMap) && $this->overrideMap[$key] !== false;
173
+ }
174
+
175
+ /**
176
+ * {@inheritdoc}
177
+ *
178
+ * @since 4.13
179
+ */
180
+ protected function getIterator()
181
+ {
182
+ if ($this->iteration === static::ITERATE_PRIMARY) {
183
+ return $this->primary;
184
+ }
185
+
186
+ if ($this->iteration === static::ITERATE_SECONDARY) {
187
+ return $this->secondary;
188
+ }
189
+
190
+ return new MergedIterator([$this->primary, $this->secondary]);
191
+ }
192
+
193
+ /**
194
+ * {@inheritdoc}
195
+ *
196
+ * @since 4.13
197
+ */
198
+ public function current()
199
+ {
200
+ $key = $this->_iterator->key();
201
+ $set = $this->getChildForKey($key);
202
+ $val = $set->offsetGet($key);
203
+
204
+ return $this->yieldIterationValue($val);
205
+ }
206
+
207
+ /**
208
+ * Retrieves the child dataset to use for a given key.
209
+ *
210
+ * This method will attempt to return the dataset that already has the key. However, priority is determined by
211
+ * referring to the override map.
212
+ *
213
+ * If a key is marked as overwritten, then the secondary dataset is prioritized. If it does not contain the
214
+ * key, the primary dataset is returned.
215
+ *
216
+ * If a key is not marked as overwritten, then the primary dataset is prioritized. If it does not contain the key,
217
+ * then the secondary dataset is returned.
218
+ *
219
+ * @since 4.13
220
+ *
221
+ * @param int|string $key The key.
222
+ *
223
+ * @return DataSetInterface The data set to use.
224
+ */
225
+ protected function getChildForKey($key)
226
+ {
227
+ if ($this->isOverridden($key)) {
228
+ return $this->secondary->offsetExists($key)
229
+ ? $this->secondary
230
+ : $this->primary;
231
+ }
232
+
233
+ return $this->primary->offsetExists($key)
234
+ ? $this->primary
235
+ : $this->secondary;
236
+ }
237
+ }
src/Data/PrefixingDataSet.php ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RebelCode\Wpra\Core\Data;
4
+
5
+ /**
6
+ * An implementation of a delegate data set that prefixes consumer keys before delegating to the inner data set.
7
+ *
8
+ * @since 4.13
9
+ */
10
+ class PrefixingDataSet extends AbstractDelegateDataSet
11
+ {
12
+ /**
13
+ * The prefix to use when using the inner data set.
14
+ *
15
+ * @since 4.13
16
+ *
17
+ * @var string
18
+ */
19
+ protected $prefix;
20
+
21
+ /**
22
+ * Whether or not un-prefixed keys in the inner dataset can be accessed.
23
+ *
24
+ * @since 4.13
25
+ *
26
+ * @var bool
27
+ */
28
+ protected $strict;
29
+
30
+ /**
31
+ * Constructor.
32
+ *
33
+ * @since 4.13
34
+ *
35
+ * @param DataSetInterface $inner The inner data set.
36
+ * @param string $prefix The prefix to use when using the inner data set.
37
+ * @param bool $strict True to allow access to not un-prefixed keys in the inner dataset, false to
38
+ * hide them completely.
39
+ */
40
+ public function __construct(DataSetInterface $inner, $prefix, $strict = false)
41
+ {
42
+ parent::__construct($inner);
43
+ $this->prefix = $prefix;
44
+ $this->strict = $strict;
45
+ }
46
+
47
+ /**
48
+ * {@inheritdoc}
49
+ *
50
+ * @since 4.13
51
+ */
52
+ protected function getInnerKey($outerKey)
53
+ {
54
+ return ($this->inner->offsetExists($outerKey) && !$this->strict)
55
+ ? $outerKey
56
+ : $this->prefix . $outerKey;
57
+ }
58
+
59
+ /**
60
+ * {@inheritdoc}
61
+ *
62
+ * @since 4.13
63
+ */
64
+ protected function getOuterKey($innerKey)
65
+ {
66
+ $prefixLength = strlen($this->prefix);
67
+
68
+ return ($prefixLength > 0 && strpos($innerKey, $this->prefix) === 0)
69
+ ? substr($innerKey, $prefixLength)
70
+ : $innerKey;
71
+ }
72
+ }
src/Data/Wp/WpArrayOptionDataSet.php ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace RebelCode\Wpra\Core\Data\Wp;
4
+
5
+ use RebelCode\Wpra\Core\Data\ArrayDataSet;
6
+
7
+ /**
8
+ * An implementation of a data set that acts as a wrapper for serialized arrays stored in the `wp_options` table.
9
+ *
10
+ * @since 4.13
11
+ */
12
+ cl