FooGallery – Image Gallery WordPress Plugin - Version 2.2.22

Version Description

  • Date Updated : 2022-10-22
  • New : Added new BETA attachment modal on gallery edit page, which is an easier way to edit attachment info. (Turned on from settings)
  • Update : FooGallery client side 2.0.39
Download this release

Release Info

Developer bradvin
Plugin Icon 128x128 FooGallery – Image Gallery WordPress Plugin
Version 2.2.22
Comparing to
See all releases

Code changes from version 2.2.7 to 2.2.22

Files changed (72) hide show
  1. README.txt +57 -10
  2. css/admin-foogallery.css +233 -1
  3. css/admin-page-foogallery-extensions.css +6 -5
  4. extensions/albums/album-default.php +1 -1
  5. extensions/default-templates/carousel/class-carousel-gallery-template.php +50 -2
  6. extensions/default-templates/carousel/gallery-carousel.php +4 -1
  7. extensions/default-templates/shared/css/foogallery.css +27 -3
  8. extensions/default-templates/shared/css/foogallery.min.css +1 -1
  9. extensions/default-templates/shared/js/foogallery.js +183 -59
  10. extensions/default-templates/shared/js/foogallery.min.js +2 -2
  11. extensions/import-export/class-foogallery-export-view-helper.php +126 -0
  12. extensions/import-export/class-foogallery-import-export-extension.php +43 -0
  13. extensions/import-export/class-foogallery-import-export.php +240 -0
  14. extensions/import-export/class-foogallery-import-view-helper.php +65 -0
  15. extensions/import-export/functions.php +86 -0
  16. extensions/import-export/view-import-export.php +74 -0
  17. foogallery.php +4 -2
  18. freemius/LICENSE.txt +673 -673
  19. freemius/assets/css/admin/account.css +1 -1
  20. freemius/assets/css/admin/add-ons.css +2 -2
  21. freemius/assets/css/admin/affiliation.css +1 -1
  22. freemius/assets/css/admin/checkout.css +1 -1
  23. freemius/assets/css/admin/common.css +2 -2
  24. freemius/assets/css/admin/connect.css +1 -1
  25. freemius/assets/css/admin/debug.css +1 -1
  26. freemius/assets/css/admin/dialog-boxes.css +2 -2
  27. freemius/assets/css/admin/gdpr-optin-notice.css +1 -1
  28. freemius/assets/css/admin/index.php +2 -2
  29. freemius/assets/css/admin/plugins.css +1 -1
  30. freemius/assets/css/customizer.css +1 -1
  31. freemius/assets/css/index.php +2 -2
  32. freemius/assets/img/foogallery.jpg +0 -0
  33. freemius/assets/img/index.php +2 -2
  34. freemius/assets/index.php +2 -2
  35. freemius/assets/js/index.php +2 -2
  36. freemius/assets/js/nojquery.ba-postmessage.js +139 -139
  37. freemius/assets/js/nojquery.ba-postmessage.min.js +11 -11
  38. freemius/assets/js/postmessage.js +134 -134
  39. freemius/includes/class-freemius-abstract.php +596 -596
  40. freemius/includes/class-freemius.php +1 -1
  41. freemius/includes/class-fs-admin-notices.php +320 -320
  42. freemius/includes/class-fs-logger.php +691 -691
  43. freemius/includes/class-fs-security.php +85 -85
  44. freemius/includes/class-fs-user-lock.php +125 -125
  45. freemius/includes/customizer/class-fs-customizer-support-section.php +101 -101
  46. freemius/includes/customizer/class-fs-customizer-upsell-control.php +160 -160
  47. freemius/includes/customizer/index.php +2 -2
  48. freemius/includes/debug/class-fs-debug-bar-panel.php +64 -64
  49. freemius/includes/debug/debug-bar-start.php +51 -51
  50. freemius/includes/debug/index.php +2 -2
  51. freemius/includes/entities/class-fs-affiliate-terms.php +127 -127
  52. freemius/includes/entities/class-fs-affiliate.php +83 -83
  53. freemius/includes/entities/class-fs-billing.php +94 -94
  54. freemius/includes/entities/class-fs-entity.php +158 -158
  55. freemius/includes/entities/class-fs-payment.php +167 -167
  56. freemius/includes/entities/class-fs-plugin-info.php +33 -33
  57. freemius/includes/entities/class-fs-plugin-license.php +330 -330
  58. freemius/includes/entities/class-fs-plugin-plan.php +144 -144
  59. freemius/includes/entities/class-fs-plugin-tag.php +59 -59
  60. freemius/includes/entities/class-fs-plugin.php +158 -158
  61. freemius/includes/entities/class-fs-pricing.php +156 -156
  62. freemius/includes/entities/class-fs-scope-entity.php +28 -28
  63. freemius/includes/entities/class-fs-site.php +252 -252
  64. freemius/includes/entities/class-fs-subscription.php +146 -146
  65. freemius/includes/entities/class-fs-user.php +61 -61
  66. freemius/includes/entities/index.php +2 -2
  67. freemius/includes/index.php +2 -2
  68. freemius/includes/l10n.php +48 -48
  69. freemius/includes/managers/class-fs-admin-menu-manager.php +1005 -1005
  70. freemius/includes/managers/class-fs-cache-manager.php +325 -325
  71. freemius/includes/managers/class-fs-gdpr-manager.php +201 -201
  72. freemius/includes/managers/class-fs-key-value-storage.php +0 -173
README.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: bradvin, steveush, fooplugins
3
  Donate link: https://fooplugins.com
4
  Tags: gallery, image gallery, photo gallery, responsive gallery, wordpress gallery plugin, best gallery plugin, albums, media gallery, video gallery, lightbox
5
  Requires at least: 5.2
6
- Tested up to: 6.0
7
- Stable tag: 2.2.7
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -67,9 +67,10 @@ The following free features make FooGallery the **best gallery plugin** on the m
67
  * Yoast SEO sitemap integration
68
  * Rank Math SEO sitemap integration
69
  * AIOSEO sitemap integration
70
- * Albums built-in! (just activate the albums extension)
71
  * Responsive album layout - [demo](https://fooplugins.com/foogallery-wordpress-gallery-plugin/wordpress-album-gallery/)
72
  * All-in-one Stack album - [demo](https://fooplugins.com/foogallery-wordpress-gallery-plugin/wordpress-album-gallery/#all-in-one)
 
73
  * Gutenberg ready (Gallery previews inside the new editor!)
74
  * Live previews as you make changes!
75
  * Retina thumbnail support
@@ -108,11 +109,11 @@ There are 3 PRO plans available, that will work with any budget:
108
  * Multi-level filtering for galleries [demo](https://fooplugins.com/foogallery-wordpress-gallery-plugin/filtering/#multi-level)
109
  * Bulk media tags and category management for attachments
110
  * Dynamic Galleries (load images from other sources):
111
- * Load from a folder on the server
112
- * Load from a collection from Adobe Lightroom (using WP/LR Sync)
113
- * Load all attachments with Media Tags
114
- * Load all attachments with Media Categories
115
- * Load from a folder in Real Media Library
116
  * Load featured images from a post/page/custom post type - [demo](https://fooplugins.com/foogallery-wordpress-gallery-plugin/post-query-gallery/)
117
  * Advanced Pagination
118
  * Numbered pagination - [demo](https://fooplugins.com/foogallery-wordpress-gallery-plugin/pagination/#numbered)
@@ -140,6 +141,8 @@ There are 3 PRO plans available, that will work with any budget:
140
  * Supports variations
141
  * Master Galleries
142
  * Set a gallery as a master and then all galleries who use that master will inherit all settings from the master - [docs](https://fooplugins.com/documentation/foogallery/pro-commerce/use-master-gallery/)
 
 
143
 
144
  [See More Demos](https://fooplugins.com/foogallery-wordpress-gallery-plugin/demos/)
145
 
@@ -182,7 +185,7 @@ Sell your photographs online with our full WooCommerce integration, available in
182
 
183
  **Albums Built In**
184
 
185
- Albums are built in as an extension. Simply head over to the extensions page and activate the albums extension. A new menu item will appear that allows you to add albums just as easily as galleries.
186
 
187
  **Built For Developers**
188
 
@@ -265,9 +268,19 @@ You can choose to create a gallery based of your products, or you can link all i
265
  For the Free version of FooGallery - Yes, you will need to install FooBox Image Lightbox.
266
  For the PRO version of FooGallery - No, we have built in a uniquely beautiful lightbox!
267
 
 
 
 
 
 
 
 
 
 
 
268
  = How do I get albums working? =
269
 
270
- Simply go to the FooGallery extensions page and activate the Albums extension. If you do not see a button to activate the albums extension, reload the extensions list by clicking the reload button.
271
 
272
  = Can I add a watermark to my images? =
273
 
@@ -299,6 +312,40 @@ Please update in order to for FooGallery to work in WP 5.5+!
299
 
300
  == Changelog ==
301
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
302
  = 2.2.7 =
303
  * Date Updated : 2022-04-15
304
  * Fix : Fixed carousel not working when no lightbox is available
3
  Donate link: https://fooplugins.com
4
  Tags: gallery, image gallery, photo gallery, responsive gallery, wordpress gallery plugin, best gallery plugin, albums, media gallery, video gallery, lightbox
5
  Requires at least: 5.2
6
+ Tested up to: 6.1
7
+ Stable tag: 2.2.16
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
67
  * Yoast SEO sitemap integration
68
  * Rank Math SEO sitemap integration
69
  * AIOSEO sitemap integration
70
+ * Albums built-in! (just activate the albums feature)
71
  * Responsive album layout - [demo](https://fooplugins.com/foogallery-wordpress-gallery-plugin/wordpress-album-gallery/)
72
  * All-in-one Stack album - [demo](https://fooplugins.com/foogallery-wordpress-gallery-plugin/wordpress-album-gallery/#all-in-one)
73
+ * Import / Export galleries between WP installs - [docs](https://fooplugins.com/documentation/foogallery/getting-started-foogallery/import-export/)
74
  * Gutenberg ready (Gallery previews inside the new editor!)
75
  * Live previews as you make changes!
76
  * Retina thumbnail support
109
  * Multi-level filtering for galleries [demo](https://fooplugins.com/foogallery-wordpress-gallery-plugin/filtering/#multi-level)
110
  * Bulk media tags and category management for attachments
111
  * Dynamic Galleries (load images from other sources):
112
+ * Load from a folder on the server [docs](https://fooplugins.com/documentation/foogallery/pro-expert/loading-galleries-server-folders/)
113
+ * Load from a collection from Adobe Lightroom (using WP/LR Sync) [docs](https://fooplugins.com/documentation/foogallery/pro-expert/dynamic-gallery-from-lightroom-collection/)
114
+ * Load all attachments with Media Tags [docs](https://fooplugins.com/documentation/foogallery/pro-expert/loading-galleries-media-tags/)
115
+ * Load all attachments with Media Categories [docs](https://fooplugins.com/documentation/foogallery/pro-expert/loading-galleries-media-categories/)
116
+ * Load from a folder in Real Media Library [docs](https://fooplugins.com/documentation/foogallery/pro-expert/loading-galleries-real-media-library/)
117
  * Load featured images from a post/page/custom post type - [demo](https://fooplugins.com/foogallery-wordpress-gallery-plugin/post-query-gallery/)
118
  * Advanced Pagination
119
  * Numbered pagination - [demo](https://fooplugins.com/foogallery-wordpress-gallery-plugin/pagination/#numbered)
141
  * Supports variations
142
  * Master Galleries
143
  * Set a gallery as a master and then all galleries who use that master will inherit all settings from the master - [docs](https://fooplugins.com/documentation/foogallery/pro-commerce/use-master-gallery/)
144
+ * White Labeling
145
+ * Rebrand FooGallery to whatever you like for your clients. Ideal for freelancers and agencies. [docs](https://fooplugins.com/documentation/foogallery/pro-commerce/white-labeling/)
146
 
147
  [See More Demos](https://fooplugins.com/foogallery-wordpress-gallery-plugin/demos/)
148
 
185
 
186
  **Albums Built In**
187
 
188
+ Albums are built in as an feature. Simply head over to the Features page and activate the albums feature. A new menu item will appear that allows you to add albums just as easily as galleries.
189
 
190
  **Built For Developers**
191
 
268
  For the Free version of FooGallery - Yes, you will need to install FooBox Image Lightbox.
269
  For the PRO version of FooGallery - No, we have built in a uniquely beautiful lightbox!
270
 
271
+ = How do I import galleries from another install? =
272
+
273
+ Simply go to the FooGallery Features page and activate the Import/Export feature on your source installation and your destination installation.
274
+ Login into your source WordPress install, and click on the FooGallery -> Import/Export menu item.
275
+ Click the Export tab and select the galleries you want to export and click Export.
276
+ Copy the export data that is generated.
277
+ Login into your destination WordPress install, and click on the FooGallery -> Import/Export menu item.
278
+ Paste the export data and click Import.
279
+ Please note : the images in your source install need to be accessible to your destination install (this means you cannot lock down your source install if you want this to work).
280
+
281
  = How do I get albums working? =
282
 
283
+ Simply go to the FooGallery Features page and activate the Albums feature.
284
 
285
  = Can I add a watermark to my images? =
286
 
312
 
313
  == Changelog ==
314
 
315
+ = 2.2.22 =
316
+ * Date Updated : 2022-10-22
317
+ * New : Added new BETA attachment modal on gallery edit page, which is an easier way to edit attachment info. (Turned on from settings)
318
+ * Update : FooGallery client side 2.0.39
319
+
320
+
321
+ = 2.2.20 =
322
+ * Date Updated : 2022-09-05
323
+ * Fix : Fixed Justified last row + filter bug.
324
+ * Fix : Fixed iOS swipe bug.
325
+ * Fix : Fixed PHP warning when using taxonomy datasource originating from woocommerce product linking.
326
+ * Update : FooGallery client side 2.0.38
327
+
328
+
329
+ = 2.2.16 =
330
+ * Date Updated : 2022-08-16
331
+ * New : Added Import/Export feature, so you can export galleries on one install, and import into another.
332
+ * New : Added settings to hide nav/paging/progress for Carousel.
333
+ * New : Added filter 'foogallery_render_template_template_override' which allows developers to override the gallery template.
334
+ * New : Renamed Extensions page to Features. This will allow core plugin features to move to Features which can be toggled on/off.
335
+ * Fix : Fixed layout issues with Carousel gallery.
336
+ * Fix : Fixed custom JS & CSS being saved as double encoded (for real this time).
337
+ * Fix : Better integration with FooBox and FooGallery.
338
+ * Fix : Removed PHP warnings in albums extension.
339
+ * Update : FooGallery client side 2.0.35
340
+ * Update : Updated to Freemius SDK 2.4.5
341
+
342
+
343
+ = 2.2.8 =
344
+ * Date Updated : 2022-05-01
345
+ * Fix : Fixed custom JS & CSS being saved as double encoded
346
+ * Fix : Removed filter support for older AIOSEO versions.
347
+
348
+
349
  = 2.2.7 =
350
  * Date Updated : 2022-04-15
351
  * Fix : Fixed carousel not working when no lightbox is available
css/admin-foogallery.css CHANGED
@@ -732,4 +732,236 @@ button[data-balloon]{overflow:visible}[data-balloon]{position:relative}[data-bal
732
  .foogallery-custom-metabox-header .foogallery-template-selector select {
733
  font-size: 13px;
734
  margin: 0 6px;
735
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
732
  .foogallery-custom-metabox-header .foogallery-template-selector select {
733
  font-size: 13px;
734
  margin: 0 6px;
735
+ }
736
+
737
+ .foogallery-multi-filtering-modal-close {
738
+ float: right;
739
+ margin-left: 5px !important;
740
+ }
741
+
742
+ #foogallery-image-edit-modal .foogallery-image-edit-main {
743
+ text-align: center;
744
+ padding: 0 0 20px;
745
+ }
746
+ #foogallery-image-edit-modal .foogallery-image-edit-meta{
747
+ padding: 10px 0px;
748
+ position: relative;
749
+ }
750
+ #foogallery-image-edit-modal .attachment-details {
751
+ display: grid;
752
+ grid-template-columns: 1fr 2fr;
753
+ /*grid-gap: 15px;*/
754
+ padding: 0;
755
+ background: #f0f0f1;
756
+ }
757
+ #foogallery-image-edit-modal .foogallery-image-edit-view {
758
+ margin-bottom: 15px;
759
+ }
760
+ /*
761
+ CSS for the main interaction
762
+ */
763
+ #foogallery-image-edit-modal .tabset .foogallery-img-modal-tab-wrapper > input[type="radio"] {
764
+ position: absolute;
765
+ left: -200vw;
766
+ }
767
+
768
+ #foogallery-image-edit-modal .tab-panel {
769
+ display: none;
770
+ padding: 30px 0;
771
+ /* border-top: 1px solid #ccc; */
772
+ }
773
+ #foogallery-image-edit-modal .tab-panel.active {
774
+ display: block;
775
+ }
776
+ #foogallery-image-edit-modal .tabset .foogallery-img-modal-tab-wrapper > label {
777
+ position: relative;
778
+ display: inline-block;
779
+ padding: 5px 10px 5px;
780
+ border: 1px solid transparent;
781
+ border-bottom: 0;
782
+ cursor: pointer;
783
+ font-weight: 600;
784
+ }
785
+ #foogallery-image-edit-modal .tabset .foogallery-img-modal-tab-wrapper > label:hover,
786
+ #foogallery-image-edit-modal .tabset .foogallery-img-modal-tab-wrapper > input:focus + label {
787
+ color: #06c;
788
+ }
789
+ #foogallery-image-edit-modal .tabset .foogallery-img-modal-tab-wrapper > input:checked + label {
790
+ border-color: #ccc;
791
+ border-bottom-color: rgb(204, 204, 204);
792
+ border-bottom: 2px solid #fff !important;
793
+ margin-bottom: -1.7px;
794
+ cursor: pointer;
795
+ }
796
+ .foogallery-image-edit-meta {
797
+ background-color: #fff;
798
+ padding: 10px;
799
+ }
800
+ #foogallery-image-edit-modal .tabset{
801
+ max-width: 100%;
802
+ padding: 0px 10px;
803
+ border-bottom: 1px solid #ccc;
804
+ }
805
+ #foogallery-panel-main select {
806
+ margin: 0px 8px;
807
+ }
808
+ #foogallery-panel-taxonomies label{
809
+ margin-bottom: 10px;
810
+ display: block;
811
+ }
812
+ .foogallery_woocommerce_tags li {
813
+ position: relative;
814
+ float: left;
815
+ margin-right: 8px;
816
+ margin-bottom: 10px;
817
+ }
818
+ #foogallery-panel-thumbnails label {
819
+ display: inline-block;
820
+ vertical-align: text-bottom;
821
+ margin-right: 30px;
822
+ }
823
+ #foogallery-panel-thumbnails #foogallery_crop_pos {
824
+ display: inline-block;
825
+ vertical-align: text-top;
826
+ margin-bottom: 20px;
827
+ }
828
+ #foogallery-panel-watermark-preview {
829
+ margin-bottom: 20px;
830
+ display: none;
831
+ }
832
+ #foogallery-panel-watermark-preview label {
833
+ margin-bottom: 10px;
834
+ display: block;
835
+ }
836
+ .foogallery-panel-info-inner{
837
+ background: #f6f7f7;
838
+ padding: 10px;;
839
+ }
840
+ #foogallery-image-edit-modal .attachment-details .setting .name {
841
+ font-weight: 600;
842
+ }
843
+ #foogallery-image-edit-modal .attachment-details .copy-to-clipboard-container {
844
+ margin-left: 0;
845
+ margin-bottom: 15px;
846
+ padding: 0;
847
+ }
848
+ #foogallery-image-edit-modal .foogallery-attachments-list-bar {
849
+ margin-top: 20px;
850
+ }
851
+ #foogallery-image-edit-modal .foogallery-attachments-list-bar.clear-thumbnail {
852
+ margin-top: 0;
853
+ }
854
+ #foogallery-image-edit-modal .foogallery-attachments-list-bar.clear-thumbnail .button, #foogallery-img-modal-alternate-image-delete {
855
+ background: #d63638;
856
+ border-color: #d63638;
857
+ }
858
+ #foogallery-image-edit-modal .spinner.is-active{
859
+ float: unset;
860
+ height: 300px;
861
+ background-position: center center;
862
+ margin: 0 auto;
863
+ display: block;
864
+ }
865
+ .foogallery-img-modal-tab-wrapper {
866
+ display: inline-block;
867
+ }
868
+ #foogallery-image-edit-modal .tab-panels .settings span.setting {
869
+ display: grid;
870
+ grid-template-columns: 35% auto;
871
+ grid-gap: 30px;
872
+ }
873
+ #foogallery-image-edit-modal .tab-panels .settings span.setting input, #foogallery-image-edit-modal .tab-panels .settings span.setting select, #foogallery-image-edit-modal .tab-panels .settings span.setting textarea {
874
+ width: calc(100% - 10px);
875
+ box-sizing: border-box;
876
+ max-width: 100%;
877
+ margin-left: 0px !important;
878
+ margin-right: 0px !important;
879
+ }
880
+ #foogallery-image-edit-modal .tab-panels {
881
+ padding: 0px 10px;
882
+ }
883
+ #foogallery-image-edit-modal .tab-panels .settings span.setting input[type="radio"] {
884
+ width: auto;
885
+ margin: 8px 3px 0 !important;
886
+ }
887
+ #foogallery-panel-thumbnails .button-large, #foogallery-panel-watermark .attachment_protection_generate {
888
+ max-width: 225px;
889
+ width: 100%;
890
+ }
891
+ #foogallery-image-edit-modal .attachment-details #foogallery-panel-taxonomies .setting .name {
892
+ padding-top: 5px;
893
+ }
894
+ #foogallery-panel-watermark .attachment_protection_generate {
895
+ float: left;
896
+ }
897
+ .foogallery-modal-footer-wrap {
898
+ text-align: right;
899
+ margin-bottom: 10px;
900
+ margin-right: 20px;
901
+ }
902
+ #foogallery-panel-watermark-preview.watermark-preview-show {
903
+ display: block;
904
+ }
905
+ .foogallery-modal-footer-wrap {
906
+ text-align: right;
907
+ margin-bottom: 10px;
908
+ margin-right: 20px;
909
+ }
910
+ .foogallery-image-edit-footer {
911
+ position: absolute;
912
+ bottom: 10px;
913
+ width: 100%;
914
+ right: 20px;
915
+ text-align: right;
916
+ }
917
+ #foogallery-panel-taxonomies .foogallery_woocommerce_tags, #foogallery-panel-taxonomies .foogallery_woocommerce_categories {
918
+ margin: 0;
919
+ padding: 0;
920
+ }
921
+ #foogallery-image-edit-modal .media-modal-close {
922
+ border-left: 1px solid #dcdcde;
923
+ }
924
+ #foogallery-panel-info .foogallery-panel-info-inner {
925
+ text-align: left;
926
+ padding: 10px 20px;
927
+ column-count: 2;
928
+ column-rule: 2px solid #000;
929
+ column-gap: 50px;
930
+ margin-bottom: 20px;
931
+ -webkit-column-break-inside: avoid;
932
+ page-break-inside: avoid;
933
+ break-inside: avoid;
934
+ column-fill: balance;
935
+ }
936
+ .foogallery-panel-info-inner > div {
937
+ webkit-column-break-inside: avoid;
938
+ page-break-inside: avoid;
939
+ break-inside: avoid;
940
+ }
941
+ .foogallery-modal-info-fields * {
942
+ font-weight: 600;
943
+ vertical-align: middle;
944
+ font-size: 13px;
945
+ }
946
+ #foogallery-img-modal-alternate-image-delete {
947
+ background-color: #f6f7f7;
948
+ color: #2271b1;
949
+ border: 1px solid #2271b1;
950
+ }
951
+ #foogallery-img-modal-alternate-image-delete:hover {
952
+ color: #0a4b78;
953
+ background-color: #f0f0f1;
954
+ border-color: #0a4b78;
955
+ }
956
+ #foogallery-image-edit-modal .tab-panels .settings span.setting.alternate-image-upload-settings {
957
+ grid-template-columns: 1fr;
958
+ }
959
+ #foogallery-image-edit-modal .tab-panels .alternate-image-upload-wrap {
960
+ margin-left: 43px;
961
+ }
962
+ #foogallery-image-edit-modal .tab-panels .settings span.setting.override-thumbnail, #foogallery-image-edit-modal .tab-panels .settings span.setting.override-thumbnail-preview, #foogallery-image-edit-modal .tab-panels .settings span.setting.alternate-image-delete {
963
+ display: none;
964
+ }
965
+ #foogallery-image-edit-modal .tab-panels .settings span.setting.override-thumbnail.is-override-thumbnail, #foogallery-image-edit-modal .tab-panels .settings span.setting.override-thumbnail-preview.is-override-thumbnail, #foogallery-image-edit-modal .tab-panels .settings span.alternate-image-delete.is-override-thumbnail {
966
+ display: grid;
967
+ }
css/admin-page-foogallery-extensions.css CHANGED
@@ -57,8 +57,8 @@ div.foogallery-message-error {
57
  float: left;
58
  margin: 0 20px 20px 0;
59
  position: relative;
60
- width: 400px;
61
- height: 300px;
62
  border: 1px solid #DEDEDE;
63
  -webkit-box-shadow: 0 1px 1px -1px rgba(0, 0, 0, 0.1);
64
  box-shadow: 0 1px 1px -1px rgba(0, 0, 0, 0.1);
@@ -140,6 +140,7 @@ div.foogallery-message-error {
140
  -webkit-transform: translateZ(0);
141
  -webkit-transition: opacity .2s ease-in-out;
142
  transition: opacity .2s ease-in-out;
 
143
  }
144
 
145
  .foogallery-extension-browser .extensions .extension:hover .screenshot {
@@ -160,9 +161,9 @@ div.foogallery-message-error {
160
  -ms-filter: "alpha(Opacity=0)";
161
  opacity: 0;
162
  position: absolute;
163
- top: 25%;
164
- right: 20%;
165
- left: 20%;
166
  background: #222;
167
  background: rgba(0, 0, 0, 0.7);
168
  color: #FFF;
57
  float: left;
58
  margin: 0 20px 20px 0;
59
  position: relative;
60
+ width: 300px;
61
+ height: 200px;
62
  border: 1px solid #DEDEDE;
63
  -webkit-box-shadow: 0 1px 1px -1px rgba(0, 0, 0, 0.1);
64
  box-shadow: 0 1px 1px -1px rgba(0, 0, 0, 0.1);
140
  -webkit-transform: translateZ(0);
141
  -webkit-transition: opacity .2s ease-in-out;
142
  transition: opacity .2s ease-in-out;
143
+ background-size: cover !important;
144
  }
145
 
146
  .foogallery-extension-browser .extensions .extension:hover .screenshot {
161
  -ms-filter: "alpha(Opacity=0)";
162
  opacity: 0;
163
  position: absolute;
164
+ top: 15%;
165
+ right: 8%;
166
+ left: 8%;
167
  background: #222;
168
  background: rgba(0, 0, 0, 0.7);
169
  color: #FFF;
extensions/albums/album-default.php CHANGED
@@ -13,7 +13,7 @@ if ( !empty( $gallery ) ) {
13
  $foogallery = FooGallery::get_by_slug( $gallery );
14
 
15
  //check to see if the gallery belongs to the album
16
- if ( !$current_foogallery_album->includes_gallery( $foogallery->ID ) ) {
17
  $foogallery = false;
18
  }
19
  }
13
  $foogallery = FooGallery::get_by_slug( $gallery );
14
 
15
  //check to see if the gallery belongs to the album
16
+ if ( $foogallery !== false && !$current_foogallery_album->includes_gallery( $foogallery->ID ) ) {
17
  $foogallery = false;
18
  }
19
  }
extensions/default-templates/carousel/class-carousel-gallery-template.php CHANGED
@@ -132,7 +132,7 @@ if ( ! class_exists( 'FooGallery_Carousel_Gallery_Template' ) ) {
132
  'name' => __( 'Carousel', 'foogallery' ),
133
  'preview_support' => true,
134
  'common_fields_support' => true,
135
- 'paging_support' => true,
136
  'lazyload_support' => true,
137
  'mandatory_classes' => 'fg-carousel',
138
  'thumbnail_dimensions' => true,
@@ -160,7 +160,7 @@ if ( ! class_exists( 'FooGallery_Carousel_Gallery_Template' ) ) {
160
  'title' => __( 'Max Items To Show', 'foogallery' ),
161
  'desc' => __( 'The total number of items displayed in the carousel. This should be an ODD number as the active item is the center and the remainder make up each side.', 'foogallery' ),
162
  'section' => __( 'General', 'foogallery' ),
163
- 'default' => '3',
164
  'type' => 'number',
165
  'row_data' => array(
166
  'data-foogallery-change-selector' => 'input',
@@ -261,6 +261,54 @@ if ( ! class_exists( 'FooGallery_Carousel_Gallery_Template' ) ) {
261
  'data-foogallery-preview' => 'shortcode'
262
  )
263
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
264
  array(
265
  'id' => 'thumbnail_link',
266
  'title' => __( 'Thumbnail Link', 'foogallery' ),
132
  'name' => __( 'Carousel', 'foogallery' ),
133
  'preview_support' => true,
134
  'common_fields_support' => true,
135
+ 'paging_support' => false,
136
  'lazyload_support' => true,
137
  'mandatory_classes' => 'fg-carousel',
138
  'thumbnail_dimensions' => true,
160
  'title' => __( 'Max Items To Show', 'foogallery' ),
161
  'desc' => __( 'The total number of items displayed in the carousel. This should be an ODD number as the active item is the center and the remainder make up each side.', 'foogallery' ),
162
  'section' => __( 'General', 'foogallery' ),
163
+ 'default' => '5',
164
  'type' => 'number',
165
  'row_data' => array(
166
  'data-foogallery-change-selector' => 'input',
261
  'data-foogallery-preview' => 'shortcode'
262
  )
263
  ),
264
+ array(
265
+ 'id' => 'show_nav_arrows',
266
+ 'title' => __( 'Show Nav. Arrows', 'foogallery' ),
267
+ 'section' => __( 'General', 'foogallery' ),
268
+ 'default' => '',
269
+ 'type' => 'radio',
270
+ 'spacer' => '<span class="spacer"></span>',
271
+ 'choices' => array(
272
+ '' => __( 'Shown', 'foogallery' ),
273
+ 'fg-carousel-hide-nav-arrows' => __( 'Hidden', 'foogallery' ),
274
+ ),
275
+ 'row_data' => array(
276
+ 'data-foogallery-change-selector' => 'input',
277
+ 'data-foogallery-preview' => 'shortcode'
278
+ )
279
+ ),
280
+ array(
281
+ 'id' => 'show_pagination',
282
+ 'title' => __( 'Show Pagination', 'foogallery' ),
283
+ 'section' => __( 'General', 'foogallery' ),
284
+ 'default' => '',
285
+ 'type' => 'radio',
286
+ 'spacer' => '<span class="spacer"></span>',
287
+ 'choices' => array(
288
+ '' => __( 'Shown', 'foogallery' ),
289
+ 'fg-carousel-hide-pagination' => __( 'Hidden', 'foogallery' ),
290
+ ),
291
+ 'row_data' => array(
292
+ 'data-foogallery-change-selector' => 'input',
293
+ 'data-foogallery-preview' => 'shortcode'
294
+ )
295
+ ),
296
+ array(
297
+ 'id' => 'show_progress',
298
+ 'title' => __( 'Show Progress Bar', 'foogallery' ),
299
+ 'section' => __( 'General', 'foogallery' ),
300
+ 'default' => '',
301
+ 'type' => 'radio',
302
+ 'spacer' => '<span class="spacer"></span>',
303
+ 'choices' => array(
304
+ '' => __( 'Shown', 'foogallery' ),
305
+ 'fg-carousel-hide-progress-bar' => __( 'Hidden', 'foogallery' ),
306
+ ),
307
+ 'row_data' => array(
308
+ 'data-foogallery-change-selector' => 'input',
309
+ 'data-foogallery-preview' => 'shortcode'
310
+ )
311
+ ),
312
  array(
313
  'id' => 'thumbnail_link',
314
  'title' => __( 'Thumbnail Link', 'foogallery' ),
extensions/default-templates/carousel/gallery-carousel.php CHANGED
@@ -6,7 +6,10 @@ global $current_foogallery;
6
 
7
  $lightbox = foogallery_gallery_template_setting( 'lightbox', 'unknown' );
8
  $inverted = foogallery_gallery_template_setting( 'inverted', '' );
9
- $foogallery_default_classes = foogallery_build_class_attribute_safe( $current_foogallery, 'foogallery-lightbox-' . $lightbox, $inverted );
 
 
 
10
  $foogallery_default_attributes = foogallery_build_container_attributes_safe( $current_foogallery, array( 'class' => $foogallery_default_classes ) );
11
  $foogallery_active_class = 'fg-item-active';
12
  $args = foogallery_gallery_template_arguments();
6
 
7
  $lightbox = foogallery_gallery_template_setting( 'lightbox', 'unknown' );
8
  $inverted = foogallery_gallery_template_setting( 'inverted', '' );
9
+ $show_nav_arrows = foogallery_gallery_template_setting( 'show_nav_arrows', '' );
10
+ $show_pagination = foogallery_gallery_template_setting( 'show_pagination', '' );
11
+ $show_progress = foogallery_gallery_template_setting( 'show_progress', '' );
12
+ $foogallery_default_classes = foogallery_build_class_attribute_safe( $current_foogallery, 'foogallery-lightbox-' . $lightbox, $inverted, $show_nav_arrows, $show_pagination, $show_progress );
13
  $foogallery_default_attributes = foogallery_build_container_attributes_safe( $current_foogallery, array( 'class' => $foogallery_default_classes ) );
14
  $foogallery_active_class = 'fg-item-active';
15
  $args = foogallery_gallery_template_arguments();
extensions/default-templates/shared/css/foogallery.css CHANGED
@@ -873,7 +873,7 @@
873
  font-family: -apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
874
  font-size: 12px;
875
  font-weight: 400;
876
- line-height: 1.42857143;
877
  text-align: center;
878
  white-space: nowrap;
879
  vertical-align: middle;
@@ -1463,7 +1463,7 @@
1463
  display: inline-block;
1464
  margin: 3px;
1465
  font-weight: 400;
1466
- line-height: 1.42857143;
1467
  text-align: center;
1468
  white-space: nowrap;
1469
  vertical-align: middle;
@@ -1600,7 +1600,7 @@
1600
  display: inline-block;
1601
  margin: 3px;
1602
  font-weight: 400;
1603
- line-height: 1.42857143;
1604
  text-align: center;
1605
  white-space: nowrap;
1606
  vertical-align: middle;
@@ -3512,6 +3512,7 @@
3512
  }
3513
  .fg-carousel-bottom {
3514
  display: flex;
 
3515
  align-items: center;
3516
  justify-content: center;
3517
  position: relative;
@@ -3659,4 +3660,27 @@ button.fg-carousel-next:hover {
3659
  .foogallery.fg-carousel.fg-dark.fg-inverted button.fg-carousel-next {
3660
  color: #444;
3661
  background-color: transparent;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3662
  }
873
  font-family: -apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
874
  font-size: 12px;
875
  font-weight: 400;
876
+ line-height: 1.4;
877
  text-align: center;
878
  white-space: nowrap;
879
  vertical-align: middle;
1463
  display: inline-block;
1464
  margin: 3px;
1465
  font-weight: 400;
1466
+ line-height: 1.4;
1467
  text-align: center;
1468
  white-space: nowrap;
1469
  vertical-align: middle;
1600
  display: inline-block;
1601
  margin: 3px;
1602
  font-weight: 400;
1603
+ line-height: 1.4;
1604
  text-align: center;
1605
  white-space: nowrap;
1606
  vertical-align: middle;
3512
  }
3513
  .fg-carousel-bottom {
3514
  display: flex;
3515
+ flex-wrap: wrap;
3516
  align-items: center;
3517
  justify-content: center;
3518
  position: relative;
3660
  .foogallery.fg-carousel.fg-dark.fg-inverted button.fg-carousel-next {
3661
  color: #444;
3662
  background-color: transparent;
3663
+ }
3664
+
3665
+ .fg-shadow-outline .fg-carousel-inner {
3666
+ padding: 1px;
3667
+ }
3668
+ .fg-shadow-small .fg-carousel-inner {
3669
+ padding: 4px;
3670
+ }
3671
+ .fg-shadow-medium .fg-carousel-inner {
3672
+ padding: 10px;
3673
+ }
3674
+ .fg-shadow-large .fg-carousel-inner {
3675
+ padding: 16px;
3676
+ }
3677
+
3678
+ .foogallery.fg-carousel-hide-nav-arrows {
3679
+ --fg-carousel-navigation-size: 0px;
3680
+ }
3681
+ .foogallery.fg-carousel-hide-nav-arrows .fg-carousel-prev,
3682
+ .foogallery.fg-carousel-hide-nav-arrows .fg-carousel-next,
3683
+ .foogallery.fg-carousel-hide-pagination .fg-carousel-bottom,
3684
+ .foogallery.fg-carousel-hide-progress-bar .fg-carousel-progress {
3685
+ display: none;
3686
  }
extensions/default-templates/shared/css/foogallery.min.css CHANGED
@@ -1 +1 @@
1
- .foogallery,.foogallery *{box-sizing:border-box}.foogallery{display:block;z-index:1;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;position:relative;line-height:0;font-size:0;width:100%;max-width:100%}.foogallery .fg-item{display:inline-block;position:relative;background-color:transparent;z-index:2;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.foogallery .fg-item.fg-hidden{display:none!important}.foogallery .fg-item-inner{display:block;position:relative;visibility:hidden;overflow:hidden;opacity:0;z-index:3;margin:0;border:solid 0 transparent}.foogallery .fg-item.fg-error:before{content:"";display:block;position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%);width:32px;height:32px;background-image:url('../img/icons.svg#image');background-color:transparent;background-repeat:no-repeat;background-position:center center;background-size:32px 32px}.foogallery .fg-item.fg-loaded{z-index:4}.foogallery .fg-loaded .fg-item-inner{visibility:visible;opacity:1;z-index:5}.foogallery .fg-error .fg-item-inner{pointer-events:none;cursor:default}.foogallery .fg-thumb{display:block;position:relative;border:none;outline:0;text-decoration:none;z-index:4;box-shadow:none}.foogallery .fg-thumb:focus,.foogallery .fg-thumb:hover{border:none;outline:0;text-decoration:none;box-shadow:none}.foogallery .fg-image-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:8;visibility:hidden;opacity:0}.foogallery .fg-image-wrap{display:block;position:relative}.foogallery .fg-image{display:block;position:relative;border:none;outline:0;text-decoration:none;z-index:5;max-width:100%;height:auto;margin:0;width:auto}.foogallery picture.fg-image>img{display:block;position:relative;border:none;outline:0;text-decoration:none;max-width:100%;height:auto;margin:0;width:auto}.foogallery .fg-loaded .fg-thumb{z-index:6}.foogallery .fg-loaded .fg-image{z-index:7}.fg-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.foogallery.fg-light .fg-item-inner{background-color:#fff;color:#333;border-color:#fff}.foogallery.fg-dark .fg-item-inner{background-color:#333;color:#fff;border-color:#333}.foogallery.fg-light .fg-item.fg-error,.foogallery.fg-light .fg-item.fg-idle,.foogallery.fg-light .fg-item.fg-loading{background-color:#eee;box-shadow:inset 0 0 0 1px #ddd}.foogallery.fg-dark .fg-item.fg-error,.foogallery.fg-dark .fg-item.fg-idle,.foogallery.fg-dark .fg-item.fg-loading{background-color:#444;box-shadow:inset 0 0 0 1px #333}.foogallery .fg-caption{background-color:rgba(0,0,0,.6);color:#fff}.foogallery .fg-caption a{color:#fff;border-bottom:1px solid #fff}.foogallery.fg-light-overlays .fg-caption{background-color:rgba(255,255,255,.8);color:#333}.foogallery.fg-light-overlays .fg-caption a{color:#333;border-bottom-color:#333}.foogallery.fg-transparent-overlays .fg-caption{background-color:transparent;color:#fff}.foogallery.fg-transparent-overlays .fg-caption a{color:#fff;border-bottom-color:#fff}.foogallery .fg-image-overlay{background-color:rgba(0,0,0,.6);color:#fff}.foogallery.fg-light-overlays .fg-image-overlay{background-color:rgba(255,255,255,.8);color:#333}.foogallery.fg-transparent-overlays .fg-image-overlay{background-color:transparent;color:#fff}.fg-exif-light .fg-item.fg-item-exif .fg-image-wrap:after{background-color:#fff;color:#333}.fg-exif-dark .fg-item.fg-item-exif .fg-image-wrap:after{background-color:#333;color:#fff}.fg-exif-rounded .fg-item.fg-item-exif .fg-image-wrap:after{border-radius:3px}.fg-exif-bottom-left .fg-item.fg-item-exif .fg-image-wrap:after,.fg-exif-bottom-right .fg-item.fg-item-exif .fg-image-wrap:after,.fg-exif-top-left .fg-item.fg-item-exif .fg-image-wrap:after,.fg-exif-top-right .fg-item.fg-item-exif .fg-image-wrap:after{display:inline-block;position:absolute;content:'EXIF';font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:11px;line-height:10px;padding:3px 4px;z-index:7}.fg-exif-bottom-right .fg-item.fg-item-exif .fg-image-wrap:after{bottom:5px;right:5px}.fg-exif-bottom-left .fg-item.fg-item-exif .fg-image-wrap:after{bottom:5px;left:5px}.fg-exif-top-right .fg-item.fg-item-exif .fg-image-wrap:after{top:5px;right:5px}.fg-exif-top-left .fg-item.fg-item-exif .fg-image-wrap:after{top:5px;left:5px}.foogallery.fg-border-thin .fg-item-inner{border-width:4px}.foogallery.fg-border-medium .fg-item-inner{border-width:10px}.foogallery.fg-border-thick .fg-item-inner{border-width:16px}.foogallery.fg-light.fg-shadow-outline .fg-item-inner{box-shadow:0 0 0 1px #ddd}.foogallery.fg-dark.fg-shadow-outline .fg-item-inner{box-shadow:0 0 0 1px #222}.foogallery.fg-dark.fg-shadow-small .fg-item-inner,.foogallery.fg-light.fg-shadow-small .fg-item-inner{box-shadow:0 1px 4px 0 rgba(0,0,0,.5)}.foogallery.fg-dark.fg-shadow-medium .fg-item-inner,.foogallery.fg-light.fg-shadow-medium .fg-item-inner{box-shadow:0 1px 10px 0 rgba(0,0,0,.5)}.foogallery.fg-dark.fg-shadow-large .fg-item-inner,.foogallery.fg-light.fg-shadow-large .fg-item-inner{box-shadow:0 1px 16px 0 rgba(0,0,0,.5)}.foogallery.fg-shadow-inset-large .fg-thumb:after,.foogallery.fg-shadow-inset-medium .fg-thumb:after,.foogallery.fg-shadow-inset-small .fg-thumb:after{display:block;content:"";position:absolute;top:0;left:0;right:0;bottom:0;z-index:7}.foogallery.fg-dark.fg-shadow-inset-small .fg-thumb:after,.foogallery.fg-light.fg-shadow-inset-small .fg-thumb:after{box-shadow:inset 0 1px 4px 0 rgba(0,0,0,.3)}.foogallery.fg-dark.fg-shadow-inset-medium .fg-thumb:after,.foogallery.fg-light.fg-shadow-inset-medium .fg-thumb:after{box-shadow:inset 0 1px 10px 0 rgba(0,0,0,.3)}.foogallery.fg-dark.fg-shadow-inset-large .fg-thumb:after,.foogallery.fg-light.fg-shadow-inset-large .fg-thumb:after{box-shadow:inset 0 1px 16px 0 rgba(0,0,0,.3)}.foogallery.fg-round-full.fg-shadow-inset-large .fg-thumb:after,.foogallery.fg-round-full.fg-shadow-inset-medium .fg-thumb:after,.foogallery.fg-round-full.fg-shadow-inset-small .fg-thumb:after{border-radius:50%}.foogallery.fg-round-small .fg-item,.foogallery.fg-round-small .fg-item-inner{border-radius:5px}.foogallery.fg-round-medium .fg-item,.foogallery.fg-round-medium .fg-item-inner{border-radius:10px}.foogallery.fg-round-large .fg-item,.foogallery.fg-round-large .fg-item-inner{border-radius:15px}.foogallery.fg-round-full .fg-item,.foogallery.fg-round-full .fg-item-inner{border-radius:50%}.foogallery .fg-loader{position:absolute;top:50%;left:50%;margin-top:-.5em;margin-left:-.5em;width:1em;height:1em;font-size:5px;visibility:hidden;opacity:0;pointer-events:none}.foogallery .fg-loading .fg-loader{visibility:visible;opacity:1}.fg-loading-default .fg-loader{border-radius:50%;text-indent:-9999em;box-shadow:0 -2.6em 0 0 #828282,1.8em -1.8em 0 0 rgba(130,130,130,.2),2.5em 0 0 0 rgba(130,130,130,.2),1.75em 1.75em 0 0 rgba(130,130,130,.2),0 2.5em 0 0 rgba(130,130,130,.2),-1.8em 1.8em 0 0 rgba(130,130,130,.2),-2.6em 0 0 0 rgba(130,130,130,.5),-1.8em -1.8em 0 0 rgba(130,130,130,.7);-webkit-animation:loading-default 1.1s infinite paused steps(8,start);animation:loading-default 1.1s infinite paused steps(8,start)}.fg-loading-default .fg-loading .fg-loader{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes loading-default{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes loading-default{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.fg-loading-bars .fg-loader,.fg-loading-bars .fg-loader:after,.fg-loading-bars .fg-loader:before{background:#828282;width:1em;height:4em;-webkit-animation:loading-bars 1s infinite paused ease-in-out;animation:loading-bars 1s infinite paused ease-in-out}.fg-loading-bars .fg-loading .fg-loader,.fg-loading-bars .fg-loading .fg-loader:after,.fg-loading-bars .fg-loading .fg-loader:before{-webkit-animation-play-state:running;animation-play-state:running}.fg-loading-bars .fg-loader{color:#828282;text-indent:-9999em;font-size:4px;margin-top:-2em;margin-left:-.5em;-webkit-animation-delay:-.16s;animation-delay:-.16s}.fg-loading-bars .fg-loader:after,.fg-loading-bars .fg-loader:before{position:absolute;top:0;content:''}.fg-loading-bars .fg-loader:before{left:-1.5em;-webkit-animation-delay:-.32s;animation-delay:-.32s}.fg-loading-bars .fg-loader:after{left:1.5em}@-webkit-keyframes loading-bars{0%,100%,80%{box-shadow:0 0;height:4em}40%{box-shadow:0 -2em;height:5em}}@keyframes loading-bars{0%,100%,80%{box-shadow:0 0;height:4em}40%{box-shadow:0 -2em;height:5em}}.fg-loading-trail .fg-loader{color:#828282;margin-top:0;margin-left:0;font-size:20px;text-indent:-9999em;overflow:hidden;border-radius:50%;-webkit-animation:loading-trail-1 1.7s infinite paused ease,loading-trail-2 1.7s infinite paused ease;animation:loading-trail-1 1.7s infinite paused ease,loading-trail-2 1.7s infinite paused ease}.fg-loading-trail .fg-loading .fg-loader{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes loading-trail-1{0%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}5%,95%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}10%,59%{box-shadow:0 -.83em 0 -.4em,-.087em -.825em 0 -.42em,-.173em -.812em 0 -.44em,-.256em -.789em 0 -.46em,-.297em -.775em 0 -.477em}20%{box-shadow:0 -.83em 0 -.4em,-.338em -.758em 0 -.42em,-.555em -.617em 0 -.44em,-.671em -.488em 0 -.46em,-.749em -.34em 0 -.477em}38%{box-shadow:0 -.83em 0 -.4em,-.377em -.74em 0 -.42em,-.645em -.522em 0 -.44em,-.775em -.297em 0 -.46em,-.82em -.09em 0 -.477em}100%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}}@keyframes loading-trail-1{0%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}5%,95%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}10%,59%{box-shadow:0 -.83em 0 -.4em,-.087em -.825em 0 -.42em,-.173em -.812em 0 -.44em,-.256em -.789em 0 -.46em,-.297em -.775em 0 -.477em}20%{box-shadow:0 -.83em 0 -.4em,-.338em -.758em 0 -.42em,-.555em -.617em 0 -.44em,-.671em -.488em 0 -.46em,-.749em -.34em 0 -.477em}38%{box-shadow:0 -.83em 0 -.4em,-.377em -.74em 0 -.42em,-.645em -.522em 0 -.44em,-.775em -.297em 0 -.46em,-.82em -.09em 0 -.477em}100%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}}@-webkit-keyframes loading-trail-2{0%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(0);transform:translateX(-50%) translateY(-50%) rotate(0)}100%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(360deg);transform:translateX(-50%) translateY(-50%) rotate(360deg)}}@keyframes loading-trail-2{0%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(0);transform:translateX(-50%) translateY(-50%) rotate(0)}100%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(360deg);transform:translateX(-50%) translateY(-50%) rotate(360deg)}}.fg-loading-pulse .fg-loader,.fg-loading-pulse .fg-loader:after,.fg-loading-pulse .fg-loader:before{border-radius:50%;width:2.5em;height:2.5em;-webkit-animation:loading-pulse 1.8s infinite both paused ease-in-out;animation:loading-pulse 1.8s infinite both paused ease-in-out}.fg-loading-pulse .fg-loading .fg-loader,.fg-loading-pulse .fg-loading .fg-loader:after,.fg-loading-pulse .fg-loading .fg-loader:before{-webkit-animation-play-state:running;animation-play-state:running}.fg-loading-pulse .fg-loader{color:#828282;font-size:4px;margin-top:-3.75em;margin-left:-1.25em;text-indent:-9999em;-webkit-animation-delay:-.16s;animation-delay:-.16s}.fg-loading-pulse .fg-loader:after,.fg-loading-pulse .fg-loader:before{content:'';position:absolute;top:0}.fg-loading-pulse .fg-loader:before{left:-3.5em;-webkit-animation-delay:-.32s;animation-delay:-.32s}.fg-loading-pulse .fg-loader:after{left:3.5em}@-webkit-keyframes loading-pulse{0%,100%,80%{box-shadow:0 2.5em 0 -1.3em}40%{box-shadow:0 2.5em 0 0}}@keyframes loading-pulse{0%,100%,80%{box-shadow:0 2.5em 0 -1.3em}40%{box-shadow:0 2.5em 0 0}}.fg-loading-dots .fg-loader{color:#828282;font-size:5px;border-radius:50%;text-indent:-9999em;-webkit-animation:loading-dots 1.3s infinite paused linear;animation:loading-dots 1.3s infinite paused linear}.fg-loading-dots .fg-loading .fg-loader{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes loading-dots{0%,100%{box-shadow:0 -3em 0 .2em,2em -2em 0 0,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 0}12.5%{box-shadow:0 -3em 0 0,2em -2em 0 .2em,3em 0 0 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em 0 0,3em 0 0 .2em,2em 2em 0 0,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 0,2em 2em 0 .2em,0 3em 0 0,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 0,0 3em 0 .2em,-2em 2em 0 0,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 0,-2em 2em 0 .2em,-3em 0 0 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 .2em,-2em -2em 0 0}87.5%{box-shadow:0 -3em 0 0,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 0,-2em -2em 0 .2em}}@keyframes loading-dots{0%,100%{box-shadow:0 -3em 0 .2em,2em -2em 0 0,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 0}12.5%{box-shadow:0 -3em 0 0,2em -2em 0 .2em,3em 0 0 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em 0 0,3em 0 0 .2em,2em 2em 0 0,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 0,2em 2em 0 .2em,0 3em 0 0,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 0,0 3em 0 .2em,-2em 2em 0 0,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 0,-2em 2em 0 .2em,-3em 0 0 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 .2em,-2em -2em 0 0}87.5%{box-shadow:0 -3em 0 0,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 0,-2em -2em 0 .2em}}.fg-loading-partial .fg-loader,.fg-loading-partial .fg-loader:after{border-radius:50%;width:10em;height:10em}.fg-loading-partial .fg-loader{font-size:4px;text-indent:-9999em;margin-top:0;margin-left:0;border-top:1.1em solid rgba(130,130,130,.2);border-right:1.1em solid rgba(130,130,130,.2);border-bottom:1.1em solid rgba(130,130,130,.2);border-left:1.1em solid #828282;-webkit-animation:loading-partial 1.1s infinite paused linear;animation:loading-partial 1.1s infinite paused linear}.fg-loading-partial .fg-loading .fg-loader{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes loading-partial{0%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(0);transform:translateX(-50%) translateY(-50%) rotate(0)}100%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(360deg);transform:translateX(-50%) translateY(-50%) rotate(360deg)}}@keyframes loading-partial{0%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(0);transform:translateX(-50%) translateY(-50%) rotate(0)}100%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(360deg);transform:translateX(-50%) translateY(-50%) rotate(360deg)}}.foogallery.fg-loaded-drop .fg-item.fg-loaded,.foogallery.fg-loaded-fade-in .fg-item.fg-loaded,.foogallery.fg-loaded-flip .fg-item.fg-loaded,.foogallery.fg-loaded-fly .fg-item.fg-loaded,.foogallery.fg-loaded-scale-up .fg-item.fg-loaded,.foogallery.fg-loaded-slide-down .fg-item.fg-loaded,.foogallery.fg-loaded-slide-left .fg-item.fg-loaded,.foogallery.fg-loaded-slide-right .fg-item.fg-loaded,.foogallery.fg-loaded-slide-up .fg-item.fg-loaded,.foogallery.fg-loaded-swing-down .fg-item.fg-loaded{transition-timing-function:ease;transition-duration:650ms;transition-property:background-color,transform}.foogallery.fg-loaded-drop .fg-loaded .fg-item-inner,.foogallery.fg-loaded-fade-in .fg-loaded .fg-item-inner,.foogallery.fg-loaded-flip .fg-loaded .fg-item-inner,.foogallery.fg-loaded-fly .fg-loaded .fg-item-inner,.foogallery.fg-loaded-scale-up .fg-loaded .fg-item-inner,.foogallery.fg-loaded-slide-down .fg-loaded .fg-item-inner,.foogallery.fg-loaded-slide-left .fg-loaded .fg-item-inner,.foogallery.fg-loaded-slide-right .fg-loaded .fg-item-inner,.foogallery.fg-loaded-slide-up .fg-loaded .fg-item-inner,.foogallery.fg-loaded-swing-down .fg-loaded .fg-item-inner{transition-timing-function:ease;transition-duration:650ms}.foogallery.fg-loaded-drop .fg-item.fg-loaded,.foogallery.fg-loaded-flip .fg-item.fg-loaded,.foogallery.fg-loaded-fly .fg-item.fg-loaded,.foogallery.fg-loaded-swing-down .fg-item.fg-loaded{perspective:1300px}.foogallery.fg-loaded-drop .fg-item-inner{transition-property:visibility,opacity,transform;transform-style:preserve-3d;transform:translateZ(400px) translateY(100%) rotateX(-90deg)}.foogallery.fg-loaded-drop .fg-loaded .fg-item-inner{transform:translateZ(0) translateY(0) rotateX(0)}.foogallery.fg-loaded-fade-in .fg-item-inner{transition-property:visibility,opacity}.foogallery.fg-loaded-flip .fg-item-inner{transition-property:visibility,opacity,transform;backface-visibility:hidden;transform-style:preserve-3d;transform:rotateY(-180deg)}.foogallery.fg-loaded-flip .fg-loaded .fg-item-inner{transform:rotateY(0)}.foogallery.fg-loaded-fly .fg-item-inner{transition-property:visibility,opacity,transform;transform-style:preserve-3d;transform-origin:50% 50% -300px;transform:rotateX(-180deg)}.foogallery.fg-loaded-fly .fg-loaded .fg-item-inner{transform:rotateX(0)}.foogallery.fg-loaded-scale-up .fg-item-inner{transition-property:visibility,opacity,transform;transform:scale(.6)}.foogallery.fg-loaded-scale-up .fg-loaded .fg-item-inner{transform:scale(1)}.foogallery.fg-loaded-slide-up .fg-item-inner{transition-property:visibility,opacity,transform;transform:translateY(50%)}.foogallery.fg-loaded-slide-up .fg-loaded .fg-item-inner{transform:translateY(0)}.foogallery.fg-loaded-slide-down .fg-item-inner{transition-property:visibility,opacity,transform;transform:translateY(-50%)}.foogallery.fg-loaded-slide-down .fg-loaded .fg-item-inner{transform:translateY(0)}.foogallery.fg-loaded-slide-left .fg-item-inner{transition-property:visibility,opacity,transform;transform:translateX(50%)}.foogallery.fg-loaded-slide-left .fg-loaded .fg-item-inner{transform:translateX(0)}.foogallery.fg-loaded-slide-right .fg-item-inner{transition-property:visibility,opacity,transform;transform:translateX(-50%)}.foogallery.fg-loaded-slide-right .fg-loaded .fg-item-inner{transform:translateX(0)}.foogallery.fg-loaded-swing-down .fg-item-inner{transition-property:visibility,opacity,transform;transform-style:preserve-3d;transform-origin:0 0;transform:rotateX(-80deg)}.foogallery.fg-loaded-swing-down .fg-loaded .fg-item-inner{transform:rotateX(0)}.foogallery .fg-caption{visibility:hidden;opacity:0;position:absolute;z-index:8;width:100%;max-height:100%;overflow:hidden;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:13px;font-weight:400;line-height:1.3;border:none;text-align:center;cursor:pointer;margin:0}.foogallery .fg-caption a{text-decoration:none}.foogallery .fg-caption a:hover{border-bottom:none}.foogallery .fg-caption-title{box-sizing:content-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:16px;font-weight:400;padding:0;margin:.4em;height:1.3em;min-height:1.3em;line-height:1.3em}.foogallery .fg-caption-desc{padding:0;margin:.4em;overflow:hidden;height:100%;max-height:100%}.foogallery .fg-caption-title+.fg-caption-desc{margin-top:0}.foogallery .fg-caption-buttons{display:flex;position:relative;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;padding:5px;margin:0}.foogallery .fg-caption-buttons>a{display:inline-block;position:relative;padding:.4em .8em;margin:1px;max-width:100%;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:12px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;background-image:none;text-decoration:none!important;border:1px solid transparent;border-radius:4px;box-shadow:none;outline:0;opacity:1;transition-timing-function:ease-out;transition-duration:.3s;transition-property:color,opacity,border-color,background-color}@media only screen and (max-width:600px){.foogallery .fg-caption-buttons{align-items:stretch}.foogallery .fg-caption-buttons>a{flex:1}}.foogallery .fg-caption .fg-caption-buttons>a{color:#333;background-color:#fff;border-color:#ccc}.foogallery .fg-caption .fg-caption-buttons>a:not(.fg-disabled):hover{color:#333;background-color:#e6e6e6;border-color:#adadad;border-bottom:solid 1px}.foogallery .fg-caption .fg-caption-buttons>a.fg-disabled{color:#9d9d9d}.foogallery .fg-caption .fg-caption-buttons>a.fg-disabled:hover{border-bottom:solid 1px}.foogallery.fg-light-overlays .fg-caption .fg-caption-buttons>a{color:#fff;background-color:#444;border-color:#333}.foogallery.fg-light-overlays .fg-caption .fg-caption-buttons>a:not(.fg-disabled):hover{color:#9d9d9d;background-color:#333;border-color:#222}.foogallery.fg-light-overlays .fg-caption .fg-caption-buttons>a.fg-disabled{color:#9d9d9d}.foogallery.fg-light-overlays .fg-caption .fg-caption-buttons>a.fg-disabled:hover{border-bottom:solid 1px}.foogallery.fg-caption-always .fg-item .fg-caption .fg-caption-inner:before{display:none}.foogallery.fg-caption-always .fg-item.fg-loaded .fg-caption{left:0;bottom:0;transition-timing-function:ease;transition-duration:.3s;transition-property:visibility,opacity;visibility:visible;opacity:1}.foogallery.fg-caption-always .fg-caption{text-align:left}.foogallery.fg-caption-hover .fg-caption .fg-caption-inner{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;max-height:100%;position:absolute;top:50%;left:0;transform:translateY(-50%);padding:.4em}.foogallery.fg-caption-hover .fg-item.fg-loaded .fg-image-overlay{display:none}.foogallery.fg-c-l .fg-caption,.foogallery.fg-caption-always.fg-c-l .fg-caption{text-align:left}.foogallery.fg-c-c .fg-caption,.foogallery.fg-caption-always.fg-c-c .fg-caption{text-align:center}.foogallery.fg-c-r .fg-caption,.foogallery.fg-caption-always.fg-c-r .fg-caption{text-align:right}.foogallery.fg-c-j .fg-caption,.foogallery.fg-caption-always.fg-c-j .fg-caption{text-align:justify}.foogallery .fg-image-overlay:before{content:"";display:block;position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%);width:32px;height:32px;background-size:32px 32px;background-position:center center;background-repeat:no-repeat;min-width:32px;min-height:32px}.foogallery .fg-caption-inner:before{content:"";display:none;position:relative;width:32px;height:32px;margin:.4em;background-size:32px 32px;vertical-align:middle;background-position:center center;background-repeat:no-repeat;min-width:32px;min-height:32px}.foogallery.fg-hover-cart:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-circle-plus:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-external:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-eye:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-plus:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-tint:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-zoom2:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-zoom3:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-zoom:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-video-1:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-video-2:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-video-3:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-video-4:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-video-default:not(.fg-preset) .fg-caption-inner:before{display:block}.foogallery.fg-hover-cart:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-circle-plus:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-external:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-eye:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-plus:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-tint:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-zoom2:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-zoom3:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-zoom:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-video-1:not(.fg-preset) .fg-type-video .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-video-2:not(.fg-preset) .fg-type-video .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-video-3:not(.fg-preset) .fg-type-video .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-video-4:not(.fg-preset) .fg-type-video .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-video-default:not(.fg-preset) .fg-type-video .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-video-sticky .fg-type-video.fg-loaded .fg-item-inner .fg-image-overlay{background-color:transparent;visibility:visible;opacity:1;display:block}.foogallery.fg-video-sticky .fg-type-video .fg-caption-inner:before{display:none}.foogallery.fg-hover-zoom .fg-caption-inner:before,.foogallery.fg-hover-zoom .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom-light')}.foogallery.fg-light-overlays.fg-hover-zoom .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-zoom .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom-dark')}.foogallery.fg-hover-zoom2 .fg-caption-inner:before,.foogallery.fg-hover-zoom2 .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom2-light')}.foogallery.fg-light-overlays.fg-hover-zoom2 .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-zoom2 .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom2-dark')}.foogallery.fg-hover-zoom3 .fg-caption-inner:before,.foogallery.fg-hover-zoom3 .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom3-light')}.foogallery.fg-light-overlays.fg-hover-zoom3 .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-zoom3 .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom3-dark')}.foogallery.fg-hover-plus .fg-caption-inner:before,.foogallery.fg-hover-plus .fg-image-overlay:before{background-image:url('../img/icons.svg#plus-light')}.foogallery.fg-light-overlays.fg-hover-plus .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-plus .fg-image-overlay:before{background-image:url('../img/icons.svg#plus-dark')}.foogallery.fg-hover-circle-plus .fg-caption-inner:before,.foogallery.fg-hover-circle-plus .fg-image-overlay:before{background-image:url('../img/icons.svg#circle-plus-light')}.foogallery.fg-light-overlays.fg-hover-circle-plus .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-circle-plus .fg-image-overlay:before{background-image:url('../img/icons.svg#circle-plus-dark')}.foogallery.fg-hover-eye .fg-caption-inner:before,.foogallery.fg-hover-eye .fg-image-overlay:before{background-image:url('../img/icons.svg#eye-light')}.foogallery.fg-light-overlays.fg-hover-eye .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-eye .fg-image-overlay:before{background-image:url('../img/icons.svg#eye-dark')}.foogallery.fg-hover-external .fg-caption-inner:before,.foogallery.fg-hover-external .fg-image-overlay:before{background-image:url('../img/icons.svg#external-light')}.foogallery.fg-light-overlays.fg-hover-external .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-external .fg-image-overlay:before{background-image:url('../img/icons.svg#external-dark')}.foogallery.fg-hover-cart .fg-caption-inner:before,.foogallery.fg-hover-cart .fg-image-overlay:before{background-image:url('../img/icons.svg#cart-light')}.foogallery.fg-light-overlays.fg-hover-cart .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-cart .fg-image-overlay:before{background-image:url('../img/icons.svg#cart-dark')}.foogallery.fg-video-default .fg-type-video .fg-caption-inner:before,.foogallery.fg-video-default .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-default-light')}.foogallery.fg-light-overlays.fg-video-default .fg-type-video .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-video-default .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-default-dark')}.foogallery.fg-video-1 .fg-type-video .fg-caption-inner:before,.foogallery.fg-video-1 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-1-light')}.foogallery.fg-light-overlays.fg-video-1 .fg-type-video .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-video-1 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-1-dark')}.foogallery.fg-video-2 .fg-type-video .fg-caption-inner:before,.foogallery.fg-video-2 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-2-light')}.foogallery.fg-light-overlays.fg-video-2 .fg-type-video .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-video-2 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-2-dark')}.foogallery.fg-video-3 .fg-type-video .fg-caption-inner:before,.foogallery.fg-video-3 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-3-light')}.foogallery.fg-light-overlays.fg-video-3 .fg-type-video .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-video-3 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-3-dark')}.foogallery.fg-video-4 .fg-type-video .fg-caption-inner:before,.foogallery.fg-video-4 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-4-light')}.foogallery.fg-light-overlays.fg-video-4 .fg-type-video .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-video-4 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-4-dark')}.foogallery.fg-caption-hover.fg-hover-colorize .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-fade .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-grayscale .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-instant .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-scale .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-down .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-left .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-right .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-up .fg-loaded .fg-caption,.foogallery.fg-hover-colorize .fg-loaded .fg-image,.foogallery.fg-hover-colorize .fg-loaded .fg-image-overlay,.foogallery.fg-hover-fade .fg-loaded .fg-image-overlay,.foogallery.fg-hover-grayscale .fg-loaded .fg-image,.foogallery.fg-hover-grayscale .fg-loaded .fg-image-overlay,.foogallery.fg-hover-instant .fg-loaded .fg-image-overlay,.foogallery.fg-hover-push .fg-loaded .fg-thumb,.foogallery.fg-hover-scale .fg-item.fg-loaded,.foogallery.fg-hover-scale .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-down .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-left .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-right .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-up .fg-loaded .fg-image-overlay,.foogallery.fg-hover-zoomed .fg-loaded .fg-image{transition-timing-function:ease;transition-duration:.3s;backface-visibility:hidden}.foogallery.fg-hover-colorize .fg-image{filter:grayscale(100%);transition-property:filter}.foogallery.fg-hover-colorize .fg-item-inner:focus-within .fg-image,.foogallery.fg-hover-colorize .fg-item-inner:hover .fg-image{filter:grayscale(0%)}.foogallery.fg-caption-hover.fg-hover-colorize .fg-caption,.foogallery.fg-hover-colorize .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:visibility,opacity,background-color}.foogallery.fg-caption-hover.fg-hover-colorize .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-colorize .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-colorize .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-colorize .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-fade .fg-loaded .fg-caption,.foogallery.fg-hover-fade .fg-loaded .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:visibility,opacity,background-color}.foogallery.fg-caption-hover.fg-hover-fade .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-fade .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-fade .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-fade .fg-loaded .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-hover-grayscale .fg-image{filter:grayscale(0%);transition-property:filter}.foogallery.fg-hover-grayscale .fg-item-inner:focus-within .fg-image,.foogallery.fg-hover-grayscale .fg-item-inner:hover .fg-image{filter:grayscale(100%)}.foogallery.fg-caption-hover.fg-hover-grayscale .fg-caption,.foogallery.fg-hover-grayscale .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:visibility,opacity,background-color}.foogallery.fg-caption-hover.fg-hover-grayscale .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-grayscale .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-grayscale .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-grayscale .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-instant .fg-loaded .fg-caption,.foogallery.fg-hover-instant .fg-loaded .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:none}.foogallery.fg-caption-hover.fg-hover-instant .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-instant .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-instant .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-instant .fg-loaded .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-caption,.foogallery.fg-hover-push .fg-loaded .fg-image-overlay{display:block;left:0;top:0;bottom:0;transform:translateX(100%);visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-caption,.foogallery.fg-hover-push .fg-loaded .fg-thumb{transition-property:transform}.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-item-inner:hover .fg-caption{transform:translateY(0)}.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-item-inner .fg-thumb:focus,.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-item-inner:hover .fg-thumb,.foogallery.fg-hover-push .fg-loaded .fg-item-inner .fg-thumb:focus,.foogallery.fg-hover-push .fg-loaded .fg-item-inner:hover .fg-thumb{transform:translateX(-100%)}.foogallery.fg-hover-scale .fg-item{transition-property:transform;z-index:4}.foogallery.fg-hover-scale .fg-item:focus-within,.foogallery.fg-hover-scale .fg-item:hover{transform:scale(1.048);z-index:10}.foogallery.fg-caption-hover.fg-hover-scale .fg-caption,.foogallery.fg-hover-scale .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:visibility,opacity,background-color}.foogallery.fg-caption-hover.fg-hover-scale .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-scale .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-scale .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-scale .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-hover-zoomed .fg-image{transition-property:transform;z-index:4}.foogallery.fg-hover-zoomed .fg-item:focus-within .fg-image,.foogallery.fg-hover-zoomed .fg-item:hover .fg-image{transform:scale(1.15)}.foogallery.fg-hover-zoomed .fg-image-wrap{overflow:hidden}.foogallery.fg-caption-hover.fg-hover-zoomed .fg-caption,.foogallery.fg-hover-zoomed .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:visibility,opacity,background-color}.foogallery.fg-caption-hover.fg-hover-zoomed .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-zoomed .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-zoomed .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-zoomed .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-slide-down .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-left .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-right .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-up .fg-loaded .fg-caption,.foogallery.fg-hover-slide-down .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-left .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-right .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-up .fg-loaded .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:transform,background-color,opacity,visibility;visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-slide-down .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-down .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-left .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-left .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-right .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-right .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-up .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-up .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-slide-down .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-slide-down .fg-loaded .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-slide-left .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-slide-left .fg-loaded .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-slide-right .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-slide-right .fg-loaded .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-slide-up .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-slide-up .fg-loaded .fg-item-inner:hover .fg-image-overlay{transform:translateY(0) translateX(0)}.foogallery.fg-caption-hover.fg-hover-slide-up .fg-loaded .fg-caption,.foogallery.fg-hover-slide-up .fg-loaded .fg-image-overlay{transform:translateY(100%)}.foogallery.fg-caption-hover.fg-hover-slide-down .fg-loaded .fg-caption,.foogallery.fg-hover-slide-down .fg-loaded .fg-image-overlay{transform:translateY(-100%)}.foogallery.fg-caption-hover.fg-hover-slide-left .fg-loaded .fg-caption,.foogallery.fg-hover-slide-left .fg-loaded .fg-image-overlay{transform:translateX(100%)}.foogallery.fg-caption-hover.fg-hover-slide-right .fg-loaded .fg-caption,.foogallery.fg-hover-slide-right .fg-loaded .fg-image-overlay{transform:translateX(-100%)}.fg-paging-container,.fg-paging-container *,.fg-paging-container :after,.fg-paging-container :before{box-sizing:border-box}.fg-paging-container{display:block;padding:15px;margin-top:0!important;margin-bottom:0!important;margin-left:auto;margin-right:auto;text-align:center;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fg-ph-dots:after{display:block;content:'';width:0;height:22px}.fg-paging-container .fg-dot-item,.fg-paging-container .fg-dots{display:inline-block;margin:0;padding:0;outline:0;list-style:none}.fg-paging-container .fg-dot-item .fg-dot-link{display:inline-block;margin:3px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;background-image:none;text-decoration:none;border:1px solid transparent;position:relative;border-radius:50%;padding:0;font-size:0;outline:0;color:transparent;box-shadow:none}.fg-paging-container .fg-dot-item .fg-dot-link:before{content:"";background-color:transparent;border:1px solid transparent;display:block;border-radius:50%;width:9px;height:9px;padding:0;margin:2px}.fg-paging-container .fg-dot-item .fg-dot-link:active,.fg-paging-container .fg-dot-item .fg-dot-link:focus,.fg-paging-container .fg-dot-item .fg-dot-link:hover{text-decoration:none;box-shadow:none;outline:0}.fg-paging-container .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container .fg-dot-item.fg-selected .fg-dot-link{cursor:not-allowed;pointer-events:none}.fg-paging-container .fg-dot-item.fg-disabled .fg-dot-link{cursor:not-allowed;pointer-events:none;outline:0}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link,.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:before{transition-timing-function:ease-out;transition-duration:.3s;transition-property:color,border-color,background-color}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link{background-color:#eee;border-color:#9d9d9d}.fg-paging-container.fg-light .fg-dot-item.fg-selected .fg-dot-link{border-color:#888}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:focus:before,.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:hover:before,.fg-paging-container.fg-light .fg-dot-item.fg-selected .fg-dot-link:before{background-color:#666;border-color:#888}.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link:focus,.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link:hover{background-color:#eee;border-color:#9d9d9d;opacity:.5}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link,.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:before{transition-timing-function:ease-out;transition-duration:.3s;transition-property:color,border-color,background-color}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link{background-color:#666;border-color:#333}.fg-paging-container.fg-dark .fg-dot-item.fg-selected .fg-dot-link{border-color:#444}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:focus:before,.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:hover:before,.fg-paging-container.fg-dark .fg-dot-item.fg-selected .fg-dot-link:before{background-color:#333;border-color:#444}.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link:focus,.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link:hover{background-color:#666;border-color:#333;opacity:.5}.fg-paging-container,.fg-paging-container *,.fg-paging-container :after,.fg-paging-container :before{box-sizing:border-box}.fg-paging-container{display:block;padding:15px;margin-top:0!important;margin-bottom:0!important;margin-left:auto;margin-right:auto;text-align:center;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fg-ph-dots:after{display:block;content:'';width:0;height:22px}.fg-paging-container .fg-dot-item,.fg-paging-container .fg-dots{display:inline-block;margin:0;padding:0;outline:0;list-style:none}.fg-paging-container .fg-dot-item .fg-dot-link{display:inline-block;margin:3px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;background-image:none;text-decoration:none;border:1px solid transparent;position:relative;border-radius:50%;padding:0;font-size:0;outline:0;color:transparent;box-shadow:none}.fg-paging-container .fg-dot-item .fg-dot-link:before{content:"";background-color:transparent;border:1px solid transparent;display:block;border-radius:50%;width:9px;height:9px;padding:0;margin:2px}.fg-paging-container .fg-dot-item .fg-dot-link:active,.fg-paging-container .fg-dot-item .fg-dot-link:focus,.fg-paging-container .fg-dot-item .fg-dot-link:hover{text-decoration:none;box-shadow:none;outline:0}.fg-paging-container .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container .fg-dot-item.fg-selected .fg-dot-link{cursor:not-allowed;pointer-events:none}.fg-paging-container .fg-dot-item.fg-disabled .fg-dot-link{cursor:not-allowed;pointer-events:none;outline:0}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link,.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:before{transition-timing-function:ease-out;transition-duration:.3s;transition-property:color,border-color,background-color}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link{background-color:#eee;border-color:#9d9d9d}.fg-paging-container.fg-light .fg-dot-item.fg-selected .fg-dot-link{border-color:#888}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:focus:before,.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:hover:before,.fg-paging-container.fg-light .fg-dot-item.fg-selected .fg-dot-link:before{background-color:#666;border-color:#888}.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link:focus,.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link:hover{background-color:#eee;border-color:#9d9d9d;opacity:.5}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link,.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:before{transition-timing-function:ease-out;transition-duration:.3s;transition-property:color,border-color,background-color}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link{background-color:#666;border-color:#333}.fg-paging-container.fg-dark .fg-dot-item.fg-selected .fg-dot-link{border-color:#444}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:focus:before,.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:hover:before,.fg-paging-container.fg-dark .fg-dot-item.fg-selected .fg-dot-link:before{background-color:#333;border-color:#444}.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link:focus,.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link:hover{background-color:#666;border-color:#333;opacity:.5}.fg-default:after{content:'';display:block;clear:both}.fg-default .fg-item{display:inline-block;vertical-align:top;max-width:100%}.fg-default .fg-item-inner,.fg-default .fg-thumb{display:block;vertical-align:top;max-width:100%}.fg-default .fg-image{border-radius:0;display:block;max-width:100%;height:auto;margin:0;padding:0}.fg-default .fg-image{vertical-align:top}.fg-default.fg-left{text-align:left}.fg-default.fg-center{text-align:center}.fg-default.fg-right{text-align:right}.fg-default.fg-gutter-5{padding-left:5px;margin-bottom:-5px}.fg-default.fg-gutter-5 .fg-item{margin-right:5px;margin-bottom:5px}.fg-default.fg-gutter-10{padding-left:10px;margin-bottom:-10px}.fg-default.fg-gutter-10 .fg-item{margin-right:10px;margin-bottom:10px}.fg-default.fg-gutter-15{padding-left:15px;margin-bottom:-15px}.fg-default.fg-gutter-15 .fg-item{margin-right:15px;margin-bottom:15px}.fg-default.fg-gutter-20{padding-left:20px;margin-bottom:-20px}.fg-default.fg-gutter-20 .fg-item{margin-right:20px;margin-bottom:20px}.fg-default.fg-gutter-25{padding-left:25px;margin-bottom:-25px}.fg-default.fg-gutter-25 .fg-item{margin-right:25px;margin-bottom:25px}@media only screen and (max-width:600px){.fg-default.fg-m-col1 .fg-image,.fg-default.fg-m-col2 .fg-image,.fg-default.fg-m-col3 .fg-image{width:100%}.fg-default.fg-m-col1.fg-gutter-5 .fg-item{width:calc(100% - 10px);min-width:calc(100% - 10px);max-width:calc(100% - 10px)}.fg-default.fg-m-col2.fg-gutter-5 .fg-item{width:calc(50% - 10px);min-width:calc(50% - 10px);max-width:calc(50% - 10px)}.fg-default.fg-m-col3.fg-gutter-5 .fg-item{width:calc(33.33% - 10px);min-width:calc(33.33% - 10px);max-width:calc(33.33% - 10px)}.fg-default.fg-m-col1.fg-gutter-10 .fg-item{width:calc(100% - 20px);min-width:calc(100% - 20px);max-width:calc(100% - 20px)}.fg-default.fg-m-col2.fg-gutter-10 .fg-item{width:calc(50% - 20px);min-width:calc(50% - 20px);max-width:calc(50% - 20px)}.fg-default.fg-m-col3.fg-gutter-10 .fg-item{width:calc(33.33% - 20px);min-width:calc(33.33% - 20px);max-width:calc(33.33% - 20px)}.fg-default.fg-m-col1.fg-gutter-15 .fg-item{width:calc(100% - 30px);min-width:calc(100% - 30px);max-width:calc(100% - 30px)}.fg-default.fg-m-col2.fg-gutter-15 .fg-item{width:calc(50% - 30px);min-width:calc(50% - 30px);max-width:calc(50% - 30px)}.fg-default.fg-m-col3.fg-gutter-15 .fg-item{width:calc(33.33% - 30px);min-width:calc(33.33% - 30px);max-width:calc(33.33% - 30px)}.fg-default.fg-m-col1.fg-gutter-20 .fg-item{width:calc(100% - 40px);min-width:calc(100% - 40px);max-width:calc(100% - 40px)}.fg-default.fg-m-col2.fg-gutter-20 .fg-item{width:calc(50% - 40px);min-width:calc(50% - 40px);max-width:calc(50% - 40px)}.fg-default.fg-m-col3.fg-gutter-20 .fg-item{width:calc(33.33% - 40px);min-width:calc(33.33% - 40px);max-width:calc(33.33% - 40px)}.fg-default.fg-m-col1.fg-gutter-25 .fg-item{width:calc(100% - 50px);min-width:calc(100% - 50px);max-width:calc(100% - 50px)}.fg-default.fg-m-col2.fg-gutter-25 .fg-item{width:calc(50% - 50px);min-width:calc(50% - 50px);max-width:calc(50% - 50px)}.fg-default.fg-m-col3.fg-gutter-25 .fg-item{width:calc(33.33% - 50px);min-width:calc(33.33% - 50px);max-width:calc(33.33% - 50px)}}.fg-masonry *{box-sizing:border-box}.foogallery.fg-masonry{margin:0 auto;text-align:center}.fg-masonry .fg-thumb{display:block}.fg-masonry.fg-fixed .fg-column-width,.fg-masonry.fg-fixed .fg-image,.fg-masonry.fg-fixed .fg-item{max-width:100%}.fg-masonry .fg-column-width{display:inline-block;border:solid 0 transparent}.fg-masonry .fg-column-width,.fg-masonry .fg-gutter-width{position:absolute;height:0;visibility:hidden;opacity:0;pointer-events:none}.fg-masonry.fg-col2 .fg-item .fg-image,.fg-masonry.fg-col3 .fg-item .fg-image,.fg-masonry.fg-col4 .fg-item .fg-image,.fg-masonry.fg-col5 .fg-item .fg-image,.fg-masonry.fg-col6 .fg-item .fg-image,.fg-masonry.fg-fixed .fg-item .fg-image{width:100%;height:auto;max-width:100%}.fg-masonry .fg-item{line-height:0;font-size:0;vertical-align:top}.fg-masonry.fg-col2 .fg-item{margin-bottom:1%;width:49.5%}.fg-masonry.fg-col2 .fg-column-width{width:49.5%}.fg-masonry.fg-col2 .fg-gutter-width{width:1%}.fg-masonry.fg-col2.fg-gutter-none .fg-item{margin-bottom:0;width:50%}.fg-masonry.fg-col2.fg-gutter-none .fg-column-width{width:50%}.fg-masonry.fg-col2.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col2.fg-gutter-large .fg-item{margin-bottom:3%;width:48.5%}.fg-masonry.fg-col2.fg-gutter-large .fg-column-width{width:48.5%}.fg-masonry.fg-col2.fg-gutter-large .fg-gutter-width{width:3%}.fg-masonry.fg-col3 .fg-item{margin-bottom:1%;width:32.66%}.fg-masonry.fg-col3 .fg-column-width{width:32.66%}.fg-masonry.fg-col3 .fg-gutter-width{width:1%}.fg-masonry.fg-col3.fg-gutter-none .fg-item{margin-bottom:0;width:33.33%}.fg-masonry.fg-col3.fg-gutter-none .fg-column-width{width:33.33%}.fg-masonry.fg-col3.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col3.fg-gutter-large .fg-item{margin-bottom:3%;width:31.33%}.fg-masonry.fg-col3.fg-gutter-large .fg-column-width{width:31.33%}.fg-masonry.fg-col3.fg-gutter-large .fg-gutter-width{width:3%}.fg-masonry.fg-col4 .fg-item{margin-bottom:1%;width:24.25%}.fg-masonry.fg-col4 .fg-column-width{width:24.25%}.fg-masonry.fg-col4 .fg-gutter-width{width:1%}.fg-masonry.fg-col4.fg-gutter-none .fg-item{margin-bottom:0;width:25%}.fg-masonry.fg-col4.fg-gutter-none .fg-column-width{width:25%}.fg-masonry.fg-col4.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col4.fg-gutter-large .fg-item{margin-bottom:3%;width:22.75%}.fg-masonry.fg-col4.fg-gutter-large .fg-column-width{width:22.75%}.fg-masonry.fg-col4.fg-gutter-large .fg-gutter-width{width:3%}.fg-masonry.fg-col5 .fg-item{margin-bottom:1%;width:19.2%}.fg-masonry.fg-col5 .fg-column-width{width:19.2%}.fg-masonry.fg-col5 .fg-gutter-width{width:1%}.fg-masonry.fg-col5.fg-gutter-none .fg-item{margin-bottom:0;width:20%}.fg-masonry.fg-col5.fg-gutter-none .fg-column-width{width:20%}.fg-masonry.fg-col5.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col5.fg-gutter-large .fg-item{margin-bottom:3%;width:17.6%}.fg-masonry.fg-col5.fg-gutter-large .fg-column-width{width:17.6%}.fg-masonry.fg-col5.fg-gutter-large .fg-gutter-width{width:3%}.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:15.83%}.fg-masonry.fg-col6 .fg-column-width{width:15.83%}.fg-masonry.fg-col6 .fg-gutter-width{width:1%}.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:16.66%}.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:16.66%}.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:14.16%}.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:14.16%}.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:3%}@media screen and (max-width:1280px){.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:19.2%}.fg-masonry.fg-col6 .fg-column-width{width:19.2%}.fg-masonry.fg-col6 .fg-gutter-width{width:1%}.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:20%}.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:20%}.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:17.6%}.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:17.6%}.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:3%}}@media screen and (max-width:1024px){.fg-masonry.fg-col5 .fg-item,.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:24.25%}.fg-masonry.fg-col5 .fg-column-width,.fg-masonry.fg-col6 .fg-column-width{width:24.25%}.fg-masonry.fg-col5 .fg-gutter-width,.fg-masonry.fg-col6 .fg-gutter-width{width:1%}.fg-masonry.fg-col5.fg-gutter-none .fg-item,.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:25%}.fg-masonry.fg-col5.fg-gutter-none .fg-column-width,.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:25%}.fg-masonry.fg-col5.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col5.fg-gutter-large .fg-item,.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:22.75%}.fg-masonry.fg-col5.fg-gutter-large .fg-column-width,.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:22.75%}.fg-masonry.fg-col5.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:3%}}@media screen and (max-width:720px){.fg-masonry.fg-col4 .fg-item,.fg-masonry.fg-col5 .fg-item,.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:32.66%}.fg-masonry.fg-col4 .fg-column-width,.fg-masonry.fg-col5 .fg-column-width,.fg-masonry.fg-col6 .fg-column-width{width:32.66%}.fg-masonry.fg-col4 .fg-gutter-width,.fg-masonry.fg-col5 .fg-gutter-width,.fg-masonry.fg-col6 .fg-gutter-width{width:1%}.fg-masonry.fg-col4.fg-gutter-none .fg-item,.fg-masonry.fg-col5.fg-gutter-none .fg-item,.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:33.33%}.fg-masonry.fg-col4.fg-gutter-none .fg-column-width,.fg-masonry.fg-col5.fg-gutter-none .fg-column-width,.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:33.33%}.fg-masonry.fg-col4.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col4.fg-gutter-large .fg-item,.fg-masonry.fg-col5.fg-gutter-large .fg-item,.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:31.33%}.fg-masonry.fg-col4.fg-gutter-large .fg-column-width,.fg-masonry.fg-col5.fg-gutter-large .fg-column-width,.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:31.33%}.fg-masonry.fg-col4.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:3%}}@media screen and (max-width:480px){.fg-masonry.fg-col3 .fg-item,.fg-masonry.fg-col4 .fg-item,.fg-masonry.fg-col5 .fg-item,.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:49.5%}.fg-masonry.fg-col3 .fg-column-width,.fg-masonry.fg-col4 .fg-column-width,.fg-masonry.fg-col5 .fg-column-width,.fg-masonry.fg-col6 .fg-column-width{width:49.5%}.fg-masonry.fg-col3 .fg-gutter-width,.fg-masonry.fg-col4 .fg-gutter-width,.fg-masonry.fg-col5 .fg-gutter-width,.fg-masonry.fg-col6 .fg-gutter-width{width:1%}.fg-masonry.fg-col3.fg-gutter-none .fg-item,.fg-masonry.fg-col4.fg-gutter-none .fg-item,.fg-masonry.fg-col5.fg-gutter-none .fg-item,.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:50%}.fg-masonry.fg-col3.fg-gutter-none .fg-column-width,.fg-masonry.fg-col4.fg-gutter-none .fg-column-width,.fg-masonry.fg-col5.fg-gutter-none .fg-column-width,.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:50%}.fg-masonry.fg-col3.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col4.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col3.fg-gutter-large .fg-item,.fg-masonry.fg-col4.fg-gutter-large .fg-item,.fg-masonry.fg-col5.fg-gutter-large .fg-item,.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:48.5%}.fg-masonry.fg-col3.fg-gutter-large .fg-column-width,.fg-masonry.fg-col4.fg-gutter-large .fg-column-width,.fg-masonry.fg-col5.fg-gutter-large .fg-column-width,.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:48.5%}.fg-masonry.fg-col3.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col4.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:3%}}@media screen and (max-width:320px){.fg-masonry.fg-col2 .fg-item,.fg-masonry.fg-col3 .fg-item,.fg-masonry.fg-col4 .fg-item,.fg-masonry.fg-col5 .fg-item,.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:100%}.fg-masonry.fg-col2 .fg-column-width,.fg-masonry.fg-col3 .fg-column-width,.fg-masonry.fg-col4 .fg-column-width,.fg-masonry.fg-col5 .fg-column-width,.fg-masonry.fg-col6 .fg-column-width{width:100%}.fg-masonry.fg-col2 .fg-gutter-width,.fg-masonry.fg-col3 .fg-gutter-width,.fg-masonry.fg-col4 .fg-gutter-width,.fg-masonry.fg-col5 .fg-gutter-width,.fg-masonry.fg-col6 .fg-gutter-width{width:0}.fg-masonry.fg-col2.fg-gutter-none .fg-item,.fg-masonry.fg-col3.fg-gutter-none .fg-item,.fg-masonry.fg-col4.fg-gutter-none .fg-item,.fg-masonry.fg-col5.fg-gutter-none .fg-item,.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:100%}.fg-masonry.fg-col2.fg-gutter-none .fg-column-width,.fg-masonry.fg-col3.fg-gutter-none .fg-column-width,.fg-masonry.fg-col4.fg-gutter-none .fg-column-width,.fg-masonry.fg-col5.fg-gutter-none .fg-column-width,.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:100%}.fg-masonry.fg-col2.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col3.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col4.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col2.fg-gutter-large .fg-item,.fg-masonry.fg-col3.fg-gutter-large .fg-item,.fg-masonry.fg-col4.fg-gutter-large .fg-item,.fg-masonry.fg-col5.fg-gutter-large .fg-item,.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:100%}.fg-masonry.fg-col2.fg-gutter-large .fg-column-width,.fg-masonry.fg-col3.fg-gutter-large .fg-column-width,.fg-masonry.fg-col4.fg-gutter-large .fg-column-width,.fg-masonry.fg-col5.fg-gutter-large .fg-column-width,.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:100%}.fg-masonry.fg-col2.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col3.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col4.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:0}}.foogallery.fg-border-thin .fg-column-width{border-width:4px}.foogallery.fg-border-medium .fg-column-width{border-width:10px}.foogallery.fg-border-thick .fg-column-width{border-width:16px}.foogallery.fg-masonry.fg-captions-bottom .fg-item-inner .fg-caption{visibility:visible;opacity:1;font-size:13px;position:relative;display:block;top:auto;bottom:auto;left:auto;right:auto;width:auto;height:auto;text-transform:none;transform:none;transition:none;background-color:transparent;border-style:solid;border-color:transparent;text-align:left}.foogallery.fg-masonry.fg-captions-bottom.fg-c-l .fg-item-inner .fg-caption{text-align:left}.foogallery.fg-masonry.fg-captions-bottom.fg-c-c .fg-item-inner .fg-caption{text-align:center}.foogallery.fg-masonry.fg-captions-bottom.fg-c-r .fg-item-inner .fg-caption{text-align:right}.foogallery.fg-masonry.fg-captions-bottom.fg-c-j .fg-item-inner .fg-caption{text-align:justify}.foogallery.fg-masonry.fg-captions-bottom .fg-item-inner:hover .fg-caption{transform:none;transition:none}.foogallery.fg-masonry.fg-captions-bottom .fg-item-inner .fg-caption-inner{display:block;position:relative;max-height:none;top:auto;bottom:auto;left:auto;right:auto;width:auto;height:auto;border:none;transform:none;transition:none}.foogallery.fg-masonry.fg-captions-bottom .fg-item-inner .fg-caption-inner:before{display:none}.foogallery.fg-masonry.fg-captions-bottom.fg-caption-hover .fg-item-inner .fg-image-overlay{display:block}.foogallery.fg-masonry.fg-captions-bottom.fg-caption-always .fg-item-inner:hover .fg-caption{visibility:visible;opacity:1}.fg-masonry.fg-captions-bottom.fg-dark .fg-caption,.fg-masonry.fg-captions-bottom.fg-light .fg-caption{color:#828282}.fg-masonry.fg-captions-bottom.fg-dark .fg-caption a,.fg-masonry.fg-captions-bottom.fg-light .fg-caption a{color:#828282;border-bottom:1px solid #828282}.fg-masonry.fg-captions-bottom.fg-dark .fg-caption a:hover,.fg-masonry.fg-captions-bottom.fg-light .fg-caption a:hover{border-bottom:none}.fg-masonry.fg-captions-bottom.fg-light .fg-caption-title,.fg-masonry.fg-captions-bottom.fg-light .fg-caption-title a{color:#222}.fg-masonry.fg-captions-bottom.fg-dark .fg-caption-title,.fg-masonry.fg-captions-bottom.fg-dark .fg-caption-title a{color:#fff}.fg-masonry.fg-captions-bottom.fg-light .fg-caption-title a{border-bottom:1px solid #222}.fg-masonry.fg-captions-bottom.fg-dark .fg-caption-title a{border-bottom:1px solid #fff}.fg-masonry.fg-captions-bottom .fg-caption{border-width:10px}.fg-masonry.fg-captions-bottom .fg-caption-title+.fg-caption-desc{margin-top:4px}.fg-masonry.fg-captions-bottom.fg-border-thin .fg-caption{border-width:10px 4px 4px 4px}.fg-masonry.fg-captions-bottom.fg-border-medium .fg-caption{border-width:10px 0 0 0}.fg-masonry.fg-captions-bottom.fg-border-thick .fg-caption{border-width:16px 0 0 0}.fg-masonry.fg-captions-bottom.fg-border-thick .fg-caption-title+.fg-caption-desc{margin-top:10px}.fg-masonry.fg-transparent .fg-item-inner{background-color:transparent;color:#333;border-color:transparent}.fg-masonry.fg-transparent .fg-caption{color:#7f7f7f}.fg-masonry.fg-transparent.fg-captions-bottom .fg-caption{border-width:0;border-top-width:10px;border-bottom-width:10px}.fg-masonry.fg-transparent .fg-caption a{color:#7f7f7f;border-bottom:1px solid #7f7f7f}.fg-masonry.fg-transparent .fg-caption a:hover{border-bottom:none}.fg-masonry.fg-transparent .fg-caption-title,.fg-masonry.fg-transparent .fg-caption-title a{color:#333}.fg-masonry.fg-transparent .fg-caption-title a{border-bottom:1px solid #333}.fg-masonry.fg-transparent.fg-round-full .fg-item,.fg-masonry.fg-transparent.fg-round-full .fg-item-inner{border-radius:15px}.fg-masonry.fg-transparent.fg-round-full .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-full .fg-image-wrap,.fg-masonry.fg-transparent.fg-round-full.fg-shadow-inset-large .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-full.fg-shadow-inset-medium .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-full.fg-shadow-inset-small .fg-thumb:after{border-radius:50%;overflow:hidden}.fg-masonry.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap,.fg-masonry.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap,.fg-masonry.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{overflow:hidden}.fg-masonry.fg-transparent.fg-round-small.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-small.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-small.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:5px}.fg-masonry.fg-transparent.fg-round-medium.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-medium.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-medium.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:10px}.fg-masonry.fg-transparent.fg-round-large.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-large.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-large.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:15px}.fg-masonry.fg-transparent.fg-shadow-inset-small .fg-thumb:after{box-shadow:inset 0 1px 4px 0 rgba(0,0,0,.3)}.fg-masonry.fg-transparent.fg-shadow-inset-medium .fg-thumb:after{box-shadow:inset 0 1px 10px 0 rgba(0,0,0,.3)}.fg-masonry.fg-transparent.fg-shadow-inset-large .fg-thumb:after{box-shadow:inset 0 1px 16px 0 rgba(0,0,0,.3)}.fg-masonry.fg-transparent.fg-shadow-outline .fg-item-inner{box-shadow:0 0 0 1px rgba(128,128,128,.5)}.fg-masonry.fg-transparent.fg-shadow-small .fg-item-inner{box-shadow:0 1px 4px 0 rgba(128,128,128,.5)}.fg-masonry.fg-transparent.fg-shadow-medium .fg-item-inner{box-shadow:0 1px 10px 0 rgba(128,128,128,.5)}.fg-masonry.fg-transparent.fg-shadow-large .fg-item-inner{box-shadow:0 1px 16px 0 rgba(128,128,128,.5)}.fg-justified{box-sizing:border-box;position:relative;text-align:center}.foogallery.fg-justified .fg-item{box-sizing:border-box;display:inline-block;margin:0;padding:0}.foogallery.fg-justified .fg-image,.foogallery.fg-justified .fg-item-inner,.foogallery.fg-justified .fg-thumb{box-sizing:border-box;display:block;margin:0;padding:0}.fg-justified .fg-item{visibility:visible;position:relative}.fg-justified .fg-item-inner{position:relative;width:100%;height:100%}.fg-justified .fg-thumb{position:relative;overflow:hidden}.fg-justified .fg-image{z-index:1}.fg-justified .fg-item.fg-positioned .fg-image-wrap,.fg-justified .fg-item.fg-positioned .fg-thumb{width:100%;height:100%}.fg-justified .fg-item.fg-positioned .fg-image{width:100%!important;height:auto!important;min-height:100%}.fg-simple_portfolio{display:flex;flex-wrap:wrap;justify-content:center;align-items:stretch;align-content:center}.fg-simple_portfolio .fg-item{position:relative;flex-grow:0;flex-shrink:0;flex-basis:auto;margin:10px;max-width:100%}.fg-simple_portfolio .fg-item-inner{display:flex;flex-direction:column;margin:0;height:100%}.fg-simple_portfolio.fg-captions-top .fg-item-inner{flex-direction:column-reverse}.fg-simple_portfolio .fg-image{height:auto;width:100%}.fg-simple_portfolio .fg-thumb{min-width:auto;min-height:auto}.foogallery.fg-simple_portfolio .fg-item-inner .fg-caption{visibility:visible;opacity:1;font-size:13px;position:relative;display:block;top:auto;bottom:auto;left:auto;right:auto;width:100%;height:100%;text-transform:none;transform:none;transition:none;background-color:transparent;border-style:solid;border-color:transparent;text-align:left}.foogallery.fg-simple_portfolio.fg-c-l .fg-item-inner .fg-caption{text-align:left}.foogallery.fg-simple_portfolio.fg-c-c .fg-item-inner .fg-caption{text-align:center}.foogallery.fg-simple_portfolio.fg-c-r .fg-item-inner .fg-caption{text-align:right}.foogallery.fg-simple_portfolio.fg-c-j .fg-item-inner .fg-caption{text-align:justify}.foogallery.fg-simple_portfolio .fg-item-inner:hover .fg-caption{transform:none;transition:none}.foogallery.fg-simple_portfolio .fg-item-inner .fg-caption-inner{display:block;top:auto;bottom:auto;left:auto;right:auto;width:auto;height:auto;border:none;transform:none;transition:none}.foogallery.fg-simple_portfolio .fg-item-inner .fg-caption-inner:before{display:none}.foogallery.fg-simple_portfolio.fg-caption-hover .fg-item-inner .fg-image-overlay{display:block}.foogallery.fg-simple_portfolio.fg-caption-always .fg-item-inner:hover .fg-caption{visibility:visible;opacity:1}.fg-simple_portfolio .fg-caption-title{white-space:normal;height:auto}.fg-simple_portfolio.fg-dark .fg-caption,.fg-simple_portfolio.fg-light .fg-caption{color:#828282}.fg-simple_portfolio.fg-dark .fg-caption a,.fg-simple_portfolio.fg-light .fg-caption a{color:#828282;border-bottom:1px solid #828282}.fg-simple_portfolio.fg-dark .fg-caption a:hover,.fg-simple_portfolio.fg-light .fg-caption a:hover{border-bottom:none}.fg-simple_portfolio.fg-light .fg-caption-title,.fg-simple_portfolio.fg-light .fg-caption-title a{color:#222}.fg-simple_portfolio.fg-dark .fg-caption-title,.fg-simple_portfolio.fg-dark .fg-caption-title a{color:#fff}.fg-simple_portfolio.fg-light .fg-caption-title a{border-bottom:1px solid #222}.fg-simple_portfolio.fg-dark .fg-caption-title a{border-bottom:1px solid #fff}.fg-simple_portfolio .fg-caption{border-width:0}.fg-simple_portfolio .fg-caption-title+.fg-caption-desc{margin-top:4px}.fg-simple_portfolio.fg-border-thin .fg-caption{border-width:10px 4px 4px 4px}.fg-simple_portfolio.fg-captions-top.fg-border-thin .fg-caption{border-width:4px 4px 10px 4px}.fg-simple_portfolio.fg-border-medium .fg-caption{border-width:10px 0 0 0}.fg-simple_portfolio.fg-captions-top.fg-border-medium .fg-caption{border-width:0 0 10px 0}.fg-simple_portfolio.fg-border-thick .fg-caption{border-width:16px 0 0 0}.fg-simple_portfolio.fg-captions-top.fg-border-thick .fg-caption{border-width:0 0 16px 0}.fg-simple_portfolio.fg-border-thick .fg-caption-title+.fg-caption-desc{margin-top:10px}.fg-simple_portfolio.fg-transparent .fg-item-inner{background-color:transparent;color:#333;border-color:transparent}.fg-simple_portfolio.fg-transparent .fg-caption{color:#7f7f7f}.fg-simple_portfolio.fg-transparent .fg-caption a{color:#7f7f7f;border-bottom:1px solid #7f7f7f}.fg-simple_portfolio.fg-transparent .fg-caption a:hover{border-bottom:none}.fg-simple_portfolio.fg-transparent .fg-caption-title,.fg-simple_portfolio.fg-transparent .fg-caption-title a{color:#333}.fg-simple_portfolio.fg-transparent .fg-caption-title a{border-bottom:1px solid #333}.fg-simple_portfolio.fg-transparent.fg-round-full .fg-item,.fg-simple_portfolio.fg-transparent.fg-round-full .fg-item-inner{border-radius:15px}.fg-simple_portfolio.fg-transparent.fg-round-full .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-full .fg-image-wrap,.fg-simple_portfolio.fg-transparent.fg-round-full.fg-shadow-inset-large .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-full.fg-shadow-inset-medium .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-full.fg-shadow-inset-small .fg-thumb:after{border-radius:50%;overflow:hidden}.fg-simple_portfolio.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap,.fg-simple_portfolio.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap,.fg-simple_portfolio.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{overflow:hidden}.fg-simple_portfolio.fg-transparent.fg-round-small.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-small.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-small.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:5px}.fg-simple_portfolio.fg-transparent.fg-round-medium.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-medium.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-medium.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:10px}.fg-simple_portfolio.fg-transparent.fg-round-large.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-large.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-large.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:15px}.fg-simple_portfolio.fg-transparent.fg-shadow-inset-small .fg-thumb:after{box-shadow:inset 0 1px 4px 0 rgba(0,0,0,.3)}.fg-simple_portfolio.fg-transparent.fg-shadow-inset-medium .fg-thumb:after{box-shadow:inset 0 1px 10px 0 rgba(0,0,0,.3)}.fg-simple_portfolio.fg-transparent.fg-shadow-inset-large .fg-thumb:after{box-shadow:inset 0 1px 16px 0 rgba(0,0,0,.3)}.fg-simple_portfolio.fg-transparent.fg-shadow-outline .fg-item-inner{box-shadow:0 0 0 1px rgba(128,128,128,.5)}.fg-simple_portfolio.fg-transparent.fg-shadow-small .fg-item-inner{box-shadow:0 1px 4px 0 rgba(128,128,128,.5)}.fg-simple_portfolio.fg-transparent.fg-shadow-medium .fg-item-inner{box-shadow:0 1px 10px 0 rgba(128,128,128,.5)}.fg-simple_portfolio.fg-transparent.fg-shadow-large .fg-item-inner{box-shadow:0 1px 16px 0 rgba(128,128,128,.5)}.foogallery.fg-preset.fg-polaroid .fg-item{-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:transform .35s,background-color .65s}.foogallery.fg-preset.fg-polaroid .fg-item:nth-child(2n+1){-webkit-transform:rotate(3deg);transform:rotate(3deg)}.foogallery.fg-preset.fg-polaroid .fg-item:nth-child(2n){-webkit-transform:rotate(-3deg);transform:rotate(-3deg)}.foogallery.fg-preset.fg-polaroid .fg-item:nth-child(3n){-webkit-transform:rotate(1deg);transform:rotate(1deg)}.foogallery.fg-preset.fg-polaroid .fg-item:nth-child(5n){-webkit-transform:rotate(-2deg);transform:rotate(-2deg)}.foogallery.fg-preset.fg-polaroid .fg-item:hover{-webkit-transform:rotate(0);transform:rotate(0)}.foogallery.fg-preset.fg-polaroid .fg-caption{position:relative;width:auto;font-family:"Segoe Print Regular",-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}.foogallery.fg-preset.fg-polaroid .fg-caption-inner,.foogallery.fg-preset.fg-polaroid .fg-caption-title{position:relative;width:auto}.foogallery.fg-preset.fg-polaroid .fg-caption-title{text-align:center}.foogallery.fg-preset.fg-polaroid .fg-caption-desc{display:none}.foogallery.fg-light.fg-preset.fg-polaroid .fg-caption-title,.foogallery.fg-preset.fg-polaroid .fg-caption-title{color:#333}.foogallery.fg-dark.fg-preset.fg-polaroid .fg-caption-title{color:#fff}.foogallery.fg-preset.fg-polaroid .fg-caption{border-style:solid;border-color:transparent;border-width:10px}.foogallery.fg-preset.fg-polaroid .fg-caption-title+.fg-caption-desc{margin-top:4px}.foogallery.fg-preset.fg-polaroid.fg-border-thin .fg-caption{border-width:10px 4px 4px 4px}.foogallery.fg-preset.fg-polaroid.fg-captions-top.fg-border-thin .fg-caption{border-width:4px 4px 10px 4px}.foogallery.fg-preset.fg-polaroid.fg-border-medium .fg-caption{border-width:10px 0 0 0}.foogallery.fg-preset.fg-polaroid.fg-captions-top.fg-border-medium .fg-caption{border-width:0 0 10px 0}.foogallery.fg-preset.fg-polaroid.fg-border-thick .fg-caption{border-width:16px 0 0 0}.foogallery.fg-preset.fg-polaroid.fg-captions-top.fg-border-thick .fg-caption{border-width:0 0 16px 0}.foogallery.fg-preset.fg-polaroid.fg-border-thick .fg-caption-title+.fg-caption-desc{margin-top:10px}.fg-image-viewer{display:block;font-family:'Open Sans','Helvetica Neue',Arial,sans-serif}.fg-image-viewer.fg-left{text-align:left}.fg-image-viewer.fg-center{text-align:center}.fg-image-viewer.fg-right{text-align:right}.fiv-inner{position:relative;display:inline-block;max-width:100%;overflow:hidden;z-index:6}.fiv-inner .fiv-inner-container{position:relative;overflow:hidden;max-width:100%;border-style:solid;border-width:0;border-bottom-width:4px;z-index:5}.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item .fg-thumb,.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item .fg-thumb:active,.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item .fg-thumb:hover,.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item .fg-thumb:visited{position:relative;display:block;border:none;outline:0;text-decoration:none;box-shadow:none;max-width:100%}.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item{position:absolute;visibility:visible;opacity:1;border:none;outline:0;text-decoration:none;box-shadow:none;max-width:100%}.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item:first-of-type{position:relative}.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item .fg-thumb img{display:block;max-width:100%;height:auto;border:none;outline:0;text-decoration:none}.fg-image-viewer .fiv-inner .fiv-ctrls{display:block;text-align:center;font-size:14px;border-style:solid;line-height:34px}.fg-image-viewer .fiv-inner .fiv-ctrls:after{content:'';display:block;clear:both}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-count{display:inline-block;font-weight:400;margin:0}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next,.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:none;min-width:80px;position:relative;overflow:hidden;transition:background-color .3s}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next:before,.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev:before{display:block;position:absolute;font-size:24px;line-height:30px;top:0;left:0;width:100%;transform:translateY(0);transition:transform .3s}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next:hover:before,.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev:hover:before{transform:translateY(-100%)}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next span,.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev span{display:block;width:100%;transform:translateY(100%);transition:transform .3s}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next:hover span,.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev:hover span{transform:translateY(0)}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev{float:left}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev:before{content:'\2190'}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next{float:right}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next:before{content:'\2192'}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-count span{margin:0 4px}.rtl .fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev{float:right}.rtl .fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev:before{content:'\2192'}.rtl .fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next{float:left}.rtl .fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next:before{content:'\2190'}.foogallery.fg-image-viewer.fg-caption-always .fg-item-inner .fg-caption{padding:0;border:none}.foogallery.fg-image-viewer.fg-caption-always .fg-caption-title{padding:10px 10px 10px 10px}.foogallery.fg-image-viewer.fg-caption-always .fg-caption-desc{padding:10px 10px 10px 10px}.foogallery.fg-image-viewer.fg-caption-always .fg-caption-title+.fg-caption-desc{padding:0 10px 10px 10px}.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls,.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls .fiv-count,.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls .fiv-next,.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls .fiv-prev,.fg-image-viewer.fg-light .fiv-inner .fiv-inner-container{background-color:#fff;color:#333;border-color:#fff}.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls .fiv-next:hover,.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls .fiv-prev:hover{background-color:#f2f2f2}.fg-image-viewer.fg-light .fiv-next,.fg-image-viewer.fg-light .fiv-prev{box-shadow:inset 0 0 0 1px #ddd}.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls,.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls .fiv-count,.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls .fiv-next,.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls .fiv-prev,.fg-image-viewer.fg-dark .fiv-inner .fiv-inner-container{background-color:#333;color:#fff;border-color:#333}.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls .fiv-next:hover,.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls .fiv-prev:hover{background-color:#444}.fg-image-viewer.fg-dark .fiv-next,.fg-image-viewer.fg-dark .fiv-prev{box-shadow:inset 0 0 0 1px #222}.foogallery.fg-image-viewer.fg-border-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thick .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thin .fg-item-inner{border-width:0}.foogallery.fg-image-viewer .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-thin .fiv-inner-container{border-width:4px}.foogallery.fg-image-viewer.fg-border-medium .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-medium .fiv-inner-container{border-width:10px}.foogallery.fg-image-viewer.fg-border-thick .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-thick .fiv-inner-container{border-width:16px}.foogallery.fg-image-viewer .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-medium .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-thick .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-thin .fiv-ctrls{border-top-width:1px}.foogallery.fg-image-viewer.fg-round-small .fg-item,.foogallery.fg-image-viewer.fg-round-small .fg-item-inner,.foogallery.fg-image-viewer.fg-round-small .fiv-inner{border-radius:5px}.foogallery.fg-image-viewer.fg-round-small .fg-item,.foogallery.fg-image-viewer.fg-round-small .fg-item-inner{border-bottom-left-radius:0;border-bottom-right-radius:0}.foogallery.fg-image-viewer.fg-round-small .fiv-next,.foogallery.fg-image-viewer.fg-round-small .fiv-prev{border-radius:3px}.foogallery.fg-image-viewer.fg-border-medium.fg-round-small .fg-item,.foogallery.fg-image-viewer.fg-border-medium.fg-round-small .fg-item-inner,.foogallery.fg-image-viewer.fg-border-medium.fg-round-small .fiv-next,.foogallery.fg-image-viewer.fg-border-medium.fg-round-small .fiv-prev,.foogallery.fg-image-viewer.fg-border-thick.fg-round-small .fg-item,.foogallery.fg-image-viewer.fg-border-thick.fg-round-small .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thick.fg-round-small .fiv-next,.foogallery.fg-image-viewer.fg-border-thick.fg-round-small .fiv-prev,.foogallery.fg-image-viewer.fg-border-thin.fg-round-small .fg-item,.foogallery.fg-image-viewer.fg-border-thin.fg-round-small .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thin.fg-round-small .fiv-next,.foogallery.fg-image-viewer.fg-border-thin.fg-round-small .fiv-prev{border-radius:3px}.foogallery.fg-image-viewer.fg-round-medium .fg-item,.foogallery.fg-image-viewer.fg-round-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-round-medium .fiv-inner{border-radius:10px}.foogallery.fg-image-viewer.fg-round-medium .fg-item,.foogallery.fg-image-viewer.fg-round-medium .fg-item-inner{border-bottom-left-radius:0;border-bottom-right-radius:0}.foogallery.fg-image-viewer.fg-round-medium .fiv-next,.foogallery.fg-image-viewer.fg-round-medium .fiv-prev{border-radius:5px}.foogallery.fg-image-viewer.fg-border-thin.fg-round-medium .fg-item,.foogallery.fg-image-viewer.fg-border-thin.fg-round-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thin.fg-round-medium .fiv-next,.foogallery.fg-image-viewer.fg-border-thin.fg-round-medium .fiv-prev{border-radius:5px}.foogallery.fg-image-viewer.fg-border-medium.fg-round-medium .fg-item,.foogallery.fg-image-viewer.fg-border-medium.fg-round-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-border-medium.fg-round-medium .fiv-next,.foogallery.fg-image-viewer.fg-border-medium.fg-round-medium .fiv-prev,.foogallery.fg-image-viewer.fg-border-thick.fg-round-medium .fg-item,.foogallery.fg-image-viewer.fg-border-thick.fg-round-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thick.fg-round-medium .fiv-next,.foogallery.fg-image-viewer.fg-border-thick.fg-round-medium .fiv-prev{border-radius:3px}.foogallery.fg-image-viewer.fg-round-large .fg-item,.foogallery.fg-image-viewer.fg-round-large .fg-item-inner,.foogallery.fg-image-viewer.fg-round-large .fiv-inner{border-radius:15px}.foogallery.fg-image-viewer.fg-round-large .fg-item,.foogallery.fg-image-viewer.fg-round-large .fg-item-inner{border-bottom-left-radius:0;border-bottom-right-radius:0}.foogallery.fg-image-viewer.fg-round-large .fiv-next,.foogallery.fg-image-viewer.fg-round-large .fiv-prev{border-radius:11px}.foogallery.fg-image-viewer.fg-border-thin.fg-round-large .fg-item,.foogallery.fg-image-viewer.fg-border-thin.fg-round-large .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thin.fg-round-large .fiv-next,.foogallery.fg-image-viewer.fg-border-thin.fg-round-large .fiv-prev{border-radius:11px}.foogallery.fg-image-viewer.fg-border-medium.fg-round-large .fg-item,.foogallery.fg-image-viewer.fg-border-medium.fg-round-large .fg-item-inner,.foogallery.fg-image-viewer.fg-border-medium.fg-round-large .fiv-next,.foogallery.fg-image-viewer.fg-border-medium.fg-round-large .fiv-prev{border-radius:5px}.foogallery.fg-image-viewer.fg-border-thick.fg-round-large .fg-item,.foogallery.fg-image-viewer.fg-border-thick.fg-round-large .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thick.fg-round-large .fiv-next,.foogallery.fg-image-viewer.fg-border-thick.fg-round-large .fiv-prev{border-radius:3px}.foogallery.fg-image-viewer.fg-round-full .fiv-inner,.foogallery.fg-image-viewer.fg-round-full .fiv-next,.foogallery.fg-image-viewer.fg-round-full .fiv-prev{border-radius:50%}.foogallery.fg-image-viewer.fg-dark.fg-shadow-large .fg-item-inner,.foogallery.fg-image-viewer.fg-dark.fg-shadow-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-dark.fg-shadow-outline .fg-item-inner,.foogallery.fg-image-viewer.fg-dark.fg-shadow-small .fg-item-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-large .fg-item-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-outline .fg-item-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-small .fg-item-inner{box-shadow:none}.foogallery.fg-image-viewer.fg-light.fg-shadow-outline .fiv-inner{box-shadow:0 0 0 1px #ddd}.foogallery.fg-image-viewer.fg-dark.fg-shadow-outline .fiv-inner{box-shadow:0 0 0 1px #222}.foogallery.fg-image-viewer.fg-dark.fg-shadow-small .fiv-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-small .fiv-inner{box-shadow:0 1px 4px 0 rgba(0,0,0,.5)}.foogallery.fg-image-viewer.fg-dark.fg-shadow-medium .fiv-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-medium .fiv-inner{box-shadow:0 1px 10px 0 rgba(0,0,0,.5)}.foogallery.fg-image-viewer.fg-dark.fg-shadow-large .fiv-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-large .fiv-inner{box-shadow:0 1px 16px 0 rgba(0,0,0,.5)}.foogallery.fg-thumbnail,.foogallery.fg-thumbnail.fg-center{text-align:center}.foogallery.fg-thumbnail.fg-left{text-align:left}.foogallery.fg-thumbnail.fg-right{text-align:right}.foogallery.fg-thumbnail.fg-float-left{float:left;width:auto}.foogallery.fg-thumbnail.fg-float-right{float:right;width:auto}.foogallery.fg-thumbnail .fg-item{display:inline-block;vertical-align:top;max-width:100%}.foogallery.fg-thumbnail .fg-image{max-width:100%}.foogallery.fg-thumbnail .fg-st-hidden{display:none}.foogallery-stack-album{text-align:center;overflow:hidden;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:13px;font-weight:400;line-height:1.3}.foogallery-stack-album,.foogallery-stack-album *{box-sizing:border-box}.foogallery-stack-album.fg-align-left{text-align:left}.foogallery-stack-album.fg-align-center{text-align:center}.foogallery-stack-album.fg-align-right{text-align:right}.foogallery-stack-album.fg-disable-transitions,.foogallery-stack-album.fg-disable-transitions *{transition:none!important}.fg-header{display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;position:relative;padding:0;margin:0;border-top:solid 1px #aaa;border-bottom:solid 1px #aaa}.fg-header-title{display:block;margin:0;padding:0 20px;width:100%;text-align:left}.fg-header-active{display:block;margin:0;padding:0 20px;visibility:hidden;opacity:0;width:100%;text-align:right;transition-property:opacity,visibility;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-header-back{display:block;padding:0;margin:5px;visibility:hidden;opacity:0;min-width:40px;width:40px;height:40px;border-radius:50%;text-align:center;line-height:38px;color:#999;background:#ddd;background:rgba(200,200,200,.5);cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition-property:opacity,visibility;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-has-active .fg-header-active,.fg-has-active .fg-header-back{visibility:visible;opacity:1}.fg-piles{display:inline-block;position:relative;transition-property:width,height;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-pile{display:block;position:absolute;top:0;left:0;list-style:none;padding:0;margin:0;visibility:visible;opacity:1;transition-property:opacity,visibility,top,left,width,height;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-pile.fg-hidden{visibility:hidden;opacity:0}.fg-pile-item{display:block;position:absolute;top:25px;left:25px;visibility:visible;opacity:1;cursor:pointer;border:10px solid #fff;background-color:#fff;box-shadow:0 1px 4px rgba(0,0,0,.2);transition-property:opacity,visibility,top,left,transform;transition-duration:.3s;transition-timing-function:ease-in-out;z-index:1;transform:rotate(0)}.fg-expanded .fg-pile-item{z-index:2;transform:rotate(0)!important}.fg-pile-item.fg-has-cover{z-index:10;transform:rotate(0)!important}.fg-pile-item:nth-child(2){z-index:9}.fg-pile-item:nth-child(3){z-index:8}.fg-pile-item:nth-child(4){z-index:7}.fg-pile-item:nth-child(1n+5){visibility:hidden;opacity:0}.fg-expanded .fg-pile-item:nth-child(1n+4){visibility:visible;opacity:1}.fg-pile-item-thumb{display:block}.fg-pile-item-image{display:block}.fg-pile-item-caption{display:flex;justify-content:center;flex-direction:column;position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;margin:0;padding:10px;background-color:rgba(68,68,68,.5);color:#fff;text-align:center;visibility:hidden;opacity:0;transition-property:opacity,visibility;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-pile-item-title{display:block;width:100%;padding:0 0 10px}.fg-pile-item-desc{display:block;width:100%;max-height:100%;border-top:solid 1px currentColor;padding:10px 0 0;overflow:hidden}.fg-pile-item-thumb:hover .fg-pile-item-caption{visibility:visible;opacity:1}.fg-pile-cover{display:flex;justify-content:left;align-items:center;position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;visibility:visible;opacity:1;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition-property:opacity,visibility;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-expanded .fg-pile-cover{visibility:hidden;opacity:0;pointer-events:none}.fg-pile-cover-content{display:flex;position:relative;background:#fff;color:#333;width:75%;font-weight:700;box-shadow:1px 1px 1px rgba(0,0,0,.1),5px 0 5px -3px rgba(0,0,0,.4),inset 0 0 5px rgba(0,0,0,.04)}.fg-pile-cover-title{text-align:center;padding:10px;width:100%}.fg-pile-cover-count{color:#aaa;padding:10px 5px;background:#f7f7f7;height:100%}:root{--fg-carousel-perspective:150px;--fg-carousel-navigation-size:48px;--fg-carousel-pagination-size:14px;--fg-carousel-progress-size:4px;--fg-carousel-navigation-opacity:0.3;--fg-carousel-transition-speed:650ms;--fg-carousel-ui-speed:300ms}.foogallery.fg-carousel{--fg-carousel-inverse-perspective:calc( -1 * var(--fg-carousel-perspective) );position:relative;overflow:hidden;display:grid;grid-template-columns:var(--fg-carousel-navigation-size) auto var(--fg-carousel-navigation-size);grid-template-rows:auto auto;grid-template-areas:"prev inner next" "bottom bottom bottom"}.fg-carousel-inner{position:relative;grid-area:inner;display:grid;grid-template-columns:1fr auto 1fr;grid-template-rows:auto;grid-template-areas:"left center right";padding:10px 0;perspective:var(--fg-carousel-perspective);transform:translate3d(0,0,0);transform-style:preserve-3d;backface-visibility:hidden;will-change:contents}.foogallery_preview_container .fg-carousel-inner{transform-style:unset}.fg-carousel-center{position:relative;z-index:-1;pointer-events:none;visibility:hidden}.fg-carousel-center{grid-area:center}.fg-carousel-progress{display:block;position:absolute;visibility:visible;bottom:0;left:0;width:0;height:var(--fg-carousel-progress-size);border-radius:calc(var(--fg-carousel-progress-size)/ 2);transition:width .1s linear;opacity:var(--fg-carousel-navigation-opacity)}.rtl .fg-carousel-progress{left:auto;right:0}.fg-carousel-bottom{display:flex;align-items:center;justify-content:center;position:relative;grid-area:bottom;font-size:var(--fg-carousel-pagination-size);padding:0;margin-bottom:10px}.fg-carousel-bullet{width:1em;height:1em;display:block;padding:0;margin:.3em;border-radius:50%;border:solid 1px transparent;background:0 0;box-shadow:none;outline:0;opacity:var(--fg-carousel-navigation-opacity);cursor:pointer;font-size:inherit;transition:opacity var(--fg-carousel-ui-speed) ease-in}@media only screen and (max-width:782px){.fg-carousel-bullet{width:1.25em;height:1.25em}}.fg-carousel-bullet:hover{background:0 0;box-shadow:none;outline:0;opacity:1}.fg-carousel-bullet.fg-bullet-active{opacity:1}button.fg-carousel-next,button.fg-carousel-prev{position:relative;height:100%;width:100%;display:flex;align-items:center;justify-content:center;font-size:var(--fg-carousel-navigation-size);background:0 0;border:none;box-shadow:none;outline:0;z-index:11;cursor:pointer;opacity:var(--fg-carousel-navigation-opacity);transition:opacity var(--fg-carousel-ui-speed) ease-in;padding:0;margin:0}button.fg-carousel-next:hover,button.fg-carousel-prev:hover{background:0 0;border:none;box-shadow:none;outline:0;opacity:1}.fg-carousel-next .fg-icon,.fg-carousel-prev .fg-icon{width:1em;height:1em}.rtl .fg-carousel-next .fg-icon,.rtl .fg-carousel-prev .fg-icon{transform:rotate(180deg)}.fg-carousel-prev{grid-area:prev}.fg-carousel-next{grid-area:next}.foogallery.fg-carousel .fg-item{display:block;opacity:0;visibility:hidden;grid-area:center;transform-origin:center center;transform:translate3d(0,200%,var(--fg-carousel-inverse-perspective));transition-timing-function:ease-in-out;transition-duration:0s;transition-property:background-color,transform,transform-origin,opacity,visibility;backface-visibility:hidden}.foogallery.fg-carousel .fg-item.fg-loaded{transform:translate3d(0,0,var(--fg-carousel-inverse-perspective));transition-timing-function:ease-in-out;transition-duration:calc( var(--fg-carousel-transition-speed) / 2 );transition-property:background-color,transform,transform-origin,opacity,visibility}.foogallery.fg-carousel .fg-item.fg-item-active,.foogallery.fg-carousel .fg-item.fg-item-next,.foogallery.fg-carousel .fg-item.fg-item-prev{opacity:1;visibility:visible}.foogallery.fg-carousel .fg-item.fg-item-active{transform:translate3d(0,0,0)}.foogallery.fg-carousel.fg-dark .fg-carousel-progress,.foogallery.fg-carousel.fg-light.fg-inverted .fg-carousel-progress{background-color:#fff;box-shadow:inset 0 0 0 1px #9d9d9d}.foogallery.fg-carousel.fg-dark button.fg-carousel-bullet,.foogallery.fg-carousel.fg-light.fg-inverted button.fg-carousel-bullet{background-color:#fff;border-color:#ccc}.foogallery.fg-carousel.fg-dark button.fg-carousel-next,.foogallery.fg-carousel.fg-dark button.fg-carousel-prev,.foogallery.fg-carousel.fg-light.fg-inverted button.fg-carousel-next,.foogallery.fg-carousel.fg-light.fg-inverted button.fg-carousel-prev{color:#fff;background-color:transparent}.foogallery.fg-carousel.fg-dark.fg-inverted .fg-carousel-progress,.foogallery.fg-carousel.fg-light .fg-carousel-progress{background-color:#444;box-shadow:inset 0 0 0 1px #333}.foogallery.fg-carousel.fg-dark.fg-inverted button.fg-carousel-bullet,.foogallery.fg-carousel.fg-light button.fg-carousel-bullet{background-color:#444;border-color:#333}.foogallery.fg-carousel.fg-dark.fg-inverted button.fg-carousel-next,.foogallery.fg-carousel.fg-dark.fg-inverted button.fg-carousel-prev,.foogallery.fg-carousel.fg-light button.fg-carousel-next,.foogallery.fg-carousel.fg-light button.fg-carousel-prev{color:#444;background-color:transparent}
1
+ .foogallery,.foogallery *{box-sizing:border-box}.foogallery{display:block;z-index:1;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;position:relative;line-height:0;font-size:0;width:100%;max-width:100%}.foogallery .fg-item{display:inline-block;position:relative;background-color:transparent;z-index:2;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.foogallery .fg-item.fg-hidden{display:none!important}.foogallery .fg-item-inner{display:block;position:relative;visibility:hidden;overflow:hidden;opacity:0;z-index:3;margin:0;border:solid 0 transparent}.foogallery .fg-item.fg-error:before{content:"";display:block;position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%);width:32px;height:32px;background-image:url('../img/icons.svg#image');background-color:transparent;background-repeat:no-repeat;background-position:center center;background-size:32px 32px}.foogallery .fg-item.fg-loaded{z-index:4}.foogallery .fg-loaded .fg-item-inner{visibility:visible;opacity:1;z-index:5}.foogallery .fg-error .fg-item-inner{pointer-events:none;cursor:default}.foogallery .fg-thumb{display:block;position:relative;border:none;outline:0;text-decoration:none;z-index:4;box-shadow:none}.foogallery .fg-thumb:focus,.foogallery .fg-thumb:hover{border:none;outline:0;text-decoration:none;box-shadow:none}.foogallery .fg-image-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:8;visibility:hidden;opacity:0}.foogallery .fg-image-wrap{display:block;position:relative}.foogallery .fg-image{display:block;position:relative;border:none;outline:0;text-decoration:none;z-index:5;max-width:100%;height:auto;margin:0;width:auto}.foogallery picture.fg-image>img{display:block;position:relative;border:none;outline:0;text-decoration:none;max-width:100%;height:auto;margin:0;width:auto}.foogallery .fg-loaded .fg-thumb{z-index:6}.foogallery .fg-loaded .fg-image{z-index:7}.fg-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.foogallery.fg-light .fg-item-inner{background-color:#fff;color:#333;border-color:#fff}.foogallery.fg-dark .fg-item-inner{background-color:#333;color:#fff;border-color:#333}.foogallery.fg-light .fg-item.fg-error,.foogallery.fg-light .fg-item.fg-idle,.foogallery.fg-light .fg-item.fg-loading{background-color:#eee;box-shadow:inset 0 0 0 1px #ddd}.foogallery.fg-dark .fg-item.fg-error,.foogallery.fg-dark .fg-item.fg-idle,.foogallery.fg-dark .fg-item.fg-loading{background-color:#444;box-shadow:inset 0 0 0 1px #333}.foogallery .fg-caption{background-color:rgba(0,0,0,.6);color:#fff}.foogallery .fg-caption a{color:#fff;border-bottom:1px solid #fff}.foogallery.fg-light-overlays .fg-caption{background-color:rgba(255,255,255,.8);color:#333}.foogallery.fg-light-overlays .fg-caption a{color:#333;border-bottom-color:#333}.foogallery.fg-transparent-overlays .fg-caption{background-color:transparent;color:#fff}.foogallery.fg-transparent-overlays .fg-caption a{color:#fff;border-bottom-color:#fff}.foogallery .fg-image-overlay{background-color:rgba(0,0,0,.6);color:#fff}.foogallery.fg-light-overlays .fg-image-overlay{background-color:rgba(255,255,255,.8);color:#333}.foogallery.fg-transparent-overlays .fg-image-overlay{background-color:transparent;color:#fff}.fg-exif-light .fg-item.fg-item-exif .fg-image-wrap:after{background-color:#fff;color:#333}.fg-exif-dark .fg-item.fg-item-exif .fg-image-wrap:after{background-color:#333;color:#fff}.fg-exif-rounded .fg-item.fg-item-exif .fg-image-wrap:after{border-radius:3px}.fg-exif-bottom-left .fg-item.fg-item-exif .fg-image-wrap:after,.fg-exif-bottom-right .fg-item.fg-item-exif .fg-image-wrap:after,.fg-exif-top-left .fg-item.fg-item-exif .fg-image-wrap:after,.fg-exif-top-right .fg-item.fg-item-exif .fg-image-wrap:after{display:inline-block;position:absolute;content:'EXIF';font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:11px;line-height:10px;padding:3px 4px;z-index:7}.fg-exif-bottom-right .fg-item.fg-item-exif .fg-image-wrap:after{bottom:5px;right:5px}.fg-exif-bottom-left .fg-item.fg-item-exif .fg-image-wrap:after{bottom:5px;left:5px}.fg-exif-top-right .fg-item.fg-item-exif .fg-image-wrap:after{top:5px;right:5px}.fg-exif-top-left .fg-item.fg-item-exif .fg-image-wrap:after{top:5px;left:5px}.foogallery.fg-border-thin .fg-item-inner{border-width:4px}.foogallery.fg-border-medium .fg-item-inner{border-width:10px}.foogallery.fg-border-thick .fg-item-inner{border-width:16px}.foogallery.fg-light.fg-shadow-outline .fg-item-inner{box-shadow:0 0 0 1px #ddd}.foogallery.fg-dark.fg-shadow-outline .fg-item-inner{box-shadow:0 0 0 1px #222}.foogallery.fg-dark.fg-shadow-small .fg-item-inner,.foogallery.fg-light.fg-shadow-small .fg-item-inner{box-shadow:0 1px 4px 0 rgba(0,0,0,.5)}.foogallery.fg-dark.fg-shadow-medium .fg-item-inner,.foogallery.fg-light.fg-shadow-medium .fg-item-inner{box-shadow:0 1px 10px 0 rgba(0,0,0,.5)}.foogallery.fg-dark.fg-shadow-large .fg-item-inner,.foogallery.fg-light.fg-shadow-large .fg-item-inner{box-shadow:0 1px 16px 0 rgba(0,0,0,.5)}.foogallery.fg-shadow-inset-large .fg-thumb:after,.foogallery.fg-shadow-inset-medium .fg-thumb:after,.foogallery.fg-shadow-inset-small .fg-thumb:after{display:block;content:"";position:absolute;top:0;left:0;right:0;bottom:0;z-index:7}.foogallery.fg-dark.fg-shadow-inset-small .fg-thumb:after,.foogallery.fg-light.fg-shadow-inset-small .fg-thumb:after{box-shadow:inset 0 1px 4px 0 rgba(0,0,0,.3)}.foogallery.fg-dark.fg-shadow-inset-medium .fg-thumb:after,.foogallery.fg-light.fg-shadow-inset-medium .fg-thumb:after{box-shadow:inset 0 1px 10px 0 rgba(0,0,0,.3)}.foogallery.fg-dark.fg-shadow-inset-large .fg-thumb:after,.foogallery.fg-light.fg-shadow-inset-large .fg-thumb:after{box-shadow:inset 0 1px 16px 0 rgba(0,0,0,.3)}.foogallery.fg-round-full.fg-shadow-inset-large .fg-thumb:after,.foogallery.fg-round-full.fg-shadow-inset-medium .fg-thumb:after,.foogallery.fg-round-full.fg-shadow-inset-small .fg-thumb:after{border-radius:50%}.foogallery.fg-round-small .fg-item,.foogallery.fg-round-small .fg-item-inner{border-radius:5px}.foogallery.fg-round-medium .fg-item,.foogallery.fg-round-medium .fg-item-inner{border-radius:10px}.foogallery.fg-round-large .fg-item,.foogallery.fg-round-large .fg-item-inner{border-radius:15px}.foogallery.fg-round-full .fg-item,.foogallery.fg-round-full .fg-item-inner{border-radius:50%}.foogallery .fg-loader{position:absolute;top:50%;left:50%;margin-top:-.5em;margin-left:-.5em;width:1em;height:1em;font-size:5px;visibility:hidden;opacity:0;pointer-events:none}.foogallery .fg-loading .fg-loader{visibility:visible;opacity:1}.fg-loading-default .fg-loader{border-radius:50%;text-indent:-9999em;box-shadow:0 -2.6em 0 0 #828282,1.8em -1.8em 0 0 rgba(130,130,130,.2),2.5em 0 0 0 rgba(130,130,130,.2),1.75em 1.75em 0 0 rgba(130,130,130,.2),0 2.5em 0 0 rgba(130,130,130,.2),-1.8em 1.8em 0 0 rgba(130,130,130,.2),-2.6em 0 0 0 rgba(130,130,130,.5),-1.8em -1.8em 0 0 rgba(130,130,130,.7);-webkit-animation:loading-default 1.1s infinite paused steps(8,start);animation:loading-default 1.1s infinite paused steps(8,start)}.fg-loading-default .fg-loading .fg-loader{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes loading-default{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes loading-default{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.fg-loading-bars .fg-loader,.fg-loading-bars .fg-loader:after,.fg-loading-bars .fg-loader:before{background:#828282;width:1em;height:4em;-webkit-animation:loading-bars 1s infinite paused ease-in-out;animation:loading-bars 1s infinite paused ease-in-out}.fg-loading-bars .fg-loading .fg-loader,.fg-loading-bars .fg-loading .fg-loader:after,.fg-loading-bars .fg-loading .fg-loader:before{-webkit-animation-play-state:running;animation-play-state:running}.fg-loading-bars .fg-loader{color:#828282;text-indent:-9999em;font-size:4px;margin-top:-2em;margin-left:-.5em;-webkit-animation-delay:-.16s;animation-delay:-.16s}.fg-loading-bars .fg-loader:after,.fg-loading-bars .fg-loader:before{position:absolute;top:0;content:''}.fg-loading-bars .fg-loader:before{left:-1.5em;-webkit-animation-delay:-.32s;animation-delay:-.32s}.fg-loading-bars .fg-loader:after{left:1.5em}@-webkit-keyframes loading-bars{0%,100%,80%{box-shadow:0 0;height:4em}40%{box-shadow:0 -2em;height:5em}}@keyframes loading-bars{0%,100%,80%{box-shadow:0 0;height:4em}40%{box-shadow:0 -2em;height:5em}}.fg-loading-trail .fg-loader{color:#828282;margin-top:0;margin-left:0;font-size:20px;text-indent:-9999em;overflow:hidden;border-radius:50%;-webkit-animation:loading-trail-1 1.7s infinite paused ease,loading-trail-2 1.7s infinite paused ease;animation:loading-trail-1 1.7s infinite paused ease,loading-trail-2 1.7s infinite paused ease}.fg-loading-trail .fg-loading .fg-loader{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes loading-trail-1{0%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}5%,95%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}10%,59%{box-shadow:0 -.83em 0 -.4em,-.087em -.825em 0 -.42em,-.173em -.812em 0 -.44em,-.256em -.789em 0 -.46em,-.297em -.775em 0 -.477em}20%{box-shadow:0 -.83em 0 -.4em,-.338em -.758em 0 -.42em,-.555em -.617em 0 -.44em,-.671em -.488em 0 -.46em,-.749em -.34em 0 -.477em}38%{box-shadow:0 -.83em 0 -.4em,-.377em -.74em 0 -.42em,-.645em -.522em 0 -.44em,-.775em -.297em 0 -.46em,-.82em -.09em 0 -.477em}100%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}}@keyframes loading-trail-1{0%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}5%,95%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}10%,59%{box-shadow:0 -.83em 0 -.4em,-.087em -.825em 0 -.42em,-.173em -.812em 0 -.44em,-.256em -.789em 0 -.46em,-.297em -.775em 0 -.477em}20%{box-shadow:0 -.83em 0 -.4em,-.338em -.758em 0 -.42em,-.555em -.617em 0 -.44em,-.671em -.488em 0 -.46em,-.749em -.34em 0 -.477em}38%{box-shadow:0 -.83em 0 -.4em,-.377em -.74em 0 -.42em,-.645em -.522em 0 -.44em,-.775em -.297em 0 -.46em,-.82em -.09em 0 -.477em}100%{box-shadow:0 -.83em 0 -.4em,0 -.83em 0 -.42em,0 -.83em 0 -.44em,0 -.83em 0 -.46em,0 -.83em 0 -.477em}}@-webkit-keyframes loading-trail-2{0%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(0);transform:translateX(-50%) translateY(-50%) rotate(0)}100%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(360deg);transform:translateX(-50%) translateY(-50%) rotate(360deg)}}@keyframes loading-trail-2{0%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(0);transform:translateX(-50%) translateY(-50%) rotate(0)}100%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(360deg);transform:translateX(-50%) translateY(-50%) rotate(360deg)}}.fg-loading-pulse .fg-loader,.fg-loading-pulse .fg-loader:after,.fg-loading-pulse .fg-loader:before{border-radius:50%;width:2.5em;height:2.5em;-webkit-animation:loading-pulse 1.8s infinite both paused ease-in-out;animation:loading-pulse 1.8s infinite both paused ease-in-out}.fg-loading-pulse .fg-loading .fg-loader,.fg-loading-pulse .fg-loading .fg-loader:after,.fg-loading-pulse .fg-loading .fg-loader:before{-webkit-animation-play-state:running;animation-play-state:running}.fg-loading-pulse .fg-loader{color:#828282;font-size:4px;margin-top:-3.75em;margin-left:-1.25em;text-indent:-9999em;-webkit-animation-delay:-.16s;animation-delay:-.16s}.fg-loading-pulse .fg-loader:after,.fg-loading-pulse .fg-loader:before{content:'';position:absolute;top:0}.fg-loading-pulse .fg-loader:before{left:-3.5em;-webkit-animation-delay:-.32s;animation-delay:-.32s}.fg-loading-pulse .fg-loader:after{left:3.5em}@-webkit-keyframes loading-pulse{0%,100%,80%{box-shadow:0 2.5em 0 -1.3em}40%{box-shadow:0 2.5em 0 0}}@keyframes loading-pulse{0%,100%,80%{box-shadow:0 2.5em 0 -1.3em}40%{box-shadow:0 2.5em 0 0}}.fg-loading-dots .fg-loader{color:#828282;font-size:5px;border-radius:50%;text-indent:-9999em;-webkit-animation:loading-dots 1.3s infinite paused linear;animation:loading-dots 1.3s infinite paused linear}.fg-loading-dots .fg-loading .fg-loader{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes loading-dots{0%,100%{box-shadow:0 -3em 0 .2em,2em -2em 0 0,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 0}12.5%{box-shadow:0 -3em 0 0,2em -2em 0 .2em,3em 0 0 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em 0 0,3em 0 0 .2em,2em 2em 0 0,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 0,2em 2em 0 .2em,0 3em 0 0,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 0,0 3em 0 .2em,-2em 2em 0 0,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 0,-2em 2em 0 .2em,-3em 0 0 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 .2em,-2em -2em 0 0}87.5%{box-shadow:0 -3em 0 0,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 0,-2em -2em 0 .2em}}@keyframes loading-dots{0%,100%{box-shadow:0 -3em 0 .2em,2em -2em 0 0,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 0}12.5%{box-shadow:0 -3em 0 0,2em -2em 0 .2em,3em 0 0 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em 0 0,3em 0 0 .2em,2em 2em 0 0,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 0,2em 2em 0 .2em,0 3em 0 0,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 0,0 3em 0 .2em,-2em 2em 0 0,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 0,-2em 2em 0 .2em,-3em 0 0 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 .2em,-2em -2em 0 0}87.5%{box-shadow:0 -3em 0 0,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 0,-3em 0 0 0,-2em -2em 0 .2em}}.fg-loading-partial .fg-loader,.fg-loading-partial .fg-loader:after{border-radius:50%;width:10em;height:10em}.fg-loading-partial .fg-loader{font-size:4px;text-indent:-9999em;margin-top:0;margin-left:0;border-top:1.1em solid rgba(130,130,130,.2);border-right:1.1em solid rgba(130,130,130,.2);border-bottom:1.1em solid rgba(130,130,130,.2);border-left:1.1em solid #828282;-webkit-animation:loading-partial 1.1s infinite paused linear;animation:loading-partial 1.1s infinite paused linear}.fg-loading-partial .fg-loading .fg-loader{-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes loading-partial{0%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(0);transform:translateX(-50%) translateY(-50%) rotate(0)}100%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(360deg);transform:translateX(-50%) translateY(-50%) rotate(360deg)}}@keyframes loading-partial{0%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(0);transform:translateX(-50%) translateY(-50%) rotate(0)}100%{-webkit-transform:translateX(-50%) translateY(-50%) rotate(360deg);transform:translateX(-50%) translateY(-50%) rotate(360deg)}}.foogallery.fg-loaded-drop .fg-item.fg-loaded,.foogallery.fg-loaded-fade-in .fg-item.fg-loaded,.foogallery.fg-loaded-flip .fg-item.fg-loaded,.foogallery.fg-loaded-fly .fg-item.fg-loaded,.foogallery.fg-loaded-scale-up .fg-item.fg-loaded,.foogallery.fg-loaded-slide-down .fg-item.fg-loaded,.foogallery.fg-loaded-slide-left .fg-item.fg-loaded,.foogallery.fg-loaded-slide-right .fg-item.fg-loaded,.foogallery.fg-loaded-slide-up .fg-item.fg-loaded,.foogallery.fg-loaded-swing-down .fg-item.fg-loaded{transition-timing-function:ease;transition-duration:650ms;transition-property:background-color,transform}.foogallery.fg-loaded-drop .fg-loaded .fg-item-inner,.foogallery.fg-loaded-fade-in .fg-loaded .fg-item-inner,.foogallery.fg-loaded-flip .fg-loaded .fg-item-inner,.foogallery.fg-loaded-fly .fg-loaded .fg-item-inner,.foogallery.fg-loaded-scale-up .fg-loaded .fg-item-inner,.foogallery.fg-loaded-slide-down .fg-loaded .fg-item-inner,.foogallery.fg-loaded-slide-left .fg-loaded .fg-item-inner,.foogallery.fg-loaded-slide-right .fg-loaded .fg-item-inner,.foogallery.fg-loaded-slide-up .fg-loaded .fg-item-inner,.foogallery.fg-loaded-swing-down .fg-loaded .fg-item-inner{transition-timing-function:ease;transition-duration:650ms}.foogallery.fg-loaded-drop .fg-item.fg-loaded,.foogallery.fg-loaded-flip .fg-item.fg-loaded,.foogallery.fg-loaded-fly .fg-item.fg-loaded,.foogallery.fg-loaded-swing-down .fg-item.fg-loaded{perspective:1300px}.foogallery.fg-loaded-drop .fg-item-inner{transition-property:visibility,opacity,transform;transform-style:preserve-3d;transform:translateZ(400px) translateY(100%) rotateX(-90deg)}.foogallery.fg-loaded-drop .fg-loaded .fg-item-inner{transform:translateZ(0) translateY(0) rotateX(0)}.foogallery.fg-loaded-fade-in .fg-item-inner{transition-property:visibility,opacity}.foogallery.fg-loaded-flip .fg-item-inner{transition-property:visibility,opacity,transform;backface-visibility:hidden;transform-style:preserve-3d;transform:rotateY(-180deg)}.foogallery.fg-loaded-flip .fg-loaded .fg-item-inner{transform:rotateY(0)}.foogallery.fg-loaded-fly .fg-item-inner{transition-property:visibility,opacity,transform;transform-style:preserve-3d;transform-origin:50% 50% -300px;transform:rotateX(-180deg)}.foogallery.fg-loaded-fly .fg-loaded .fg-item-inner{transform:rotateX(0)}.foogallery.fg-loaded-scale-up .fg-item-inner{transition-property:visibility,opacity,transform;transform:scale(.6)}.foogallery.fg-loaded-scale-up .fg-loaded .fg-item-inner{transform:scale(1)}.foogallery.fg-loaded-slide-up .fg-item-inner{transition-property:visibility,opacity,transform;transform:translateY(50%)}.foogallery.fg-loaded-slide-up .fg-loaded .fg-item-inner{transform:translateY(0)}.foogallery.fg-loaded-slide-down .fg-item-inner{transition-property:visibility,opacity,transform;transform:translateY(-50%)}.foogallery.fg-loaded-slide-down .fg-loaded .fg-item-inner{transform:translateY(0)}.foogallery.fg-loaded-slide-left .fg-item-inner{transition-property:visibility,opacity,transform;transform:translateX(50%)}.foogallery.fg-loaded-slide-left .fg-loaded .fg-item-inner{transform:translateX(0)}.foogallery.fg-loaded-slide-right .fg-item-inner{transition-property:visibility,opacity,transform;transform:translateX(-50%)}.foogallery.fg-loaded-slide-right .fg-loaded .fg-item-inner{transform:translateX(0)}.foogallery.fg-loaded-swing-down .fg-item-inner{transition-property:visibility,opacity,transform;transform-style:preserve-3d;transform-origin:0 0;transform:rotateX(-80deg)}.foogallery.fg-loaded-swing-down .fg-loaded .fg-item-inner{transform:rotateX(0)}.foogallery .fg-caption{visibility:hidden;opacity:0;position:absolute;z-index:8;width:100%;max-height:100%;overflow:hidden;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:13px;font-weight:400;line-height:1.3;border:none;text-align:center;cursor:pointer;margin:0}.foogallery .fg-caption a{text-decoration:none}.foogallery .fg-caption a:hover{border-bottom:none}.foogallery .fg-caption-title{box-sizing:content-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:16px;font-weight:400;padding:0;margin:.4em;height:1.3em;min-height:1.3em;line-height:1.3em}.foogallery .fg-caption-desc{padding:0;margin:.4em;overflow:hidden;height:100%;max-height:100%}.foogallery .fg-caption-title+.fg-caption-desc{margin-top:0}.foogallery .fg-caption-buttons{display:flex;position:relative;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;padding:5px;margin:0}.foogallery .fg-caption-buttons>a{display:inline-block;position:relative;padding:.4em .8em;margin:1px;max-width:100%;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:12px;font-weight:400;line-height:1.4;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;background-image:none;text-decoration:none!important;border:1px solid transparent;border-radius:4px;box-shadow:none;outline:0;opacity:1;transition-timing-function:ease-out;transition-duration:.3s;transition-property:color,opacity,border-color,background-color}@media only screen and (max-width:600px){.foogallery .fg-caption-buttons{align-items:stretch}.foogallery .fg-caption-buttons>a{flex:1}}.foogallery .fg-caption .fg-caption-buttons>a{color:#333;background-color:#fff;border-color:#ccc}.foogallery .fg-caption .fg-caption-buttons>a:not(.fg-disabled):hover{color:#333;background-color:#e6e6e6;border-color:#adadad;border-bottom:solid 1px}.foogallery .fg-caption .fg-caption-buttons>a.fg-disabled{color:#9d9d9d}.foogallery .fg-caption .fg-caption-buttons>a.fg-disabled:hover{border-bottom:solid 1px}.foogallery.fg-light-overlays .fg-caption .fg-caption-buttons>a{color:#fff;background-color:#444;border-color:#333}.foogallery.fg-light-overlays .fg-caption .fg-caption-buttons>a:not(.fg-disabled):hover{color:#9d9d9d;background-color:#333;border-color:#222}.foogallery.fg-light-overlays .fg-caption .fg-caption-buttons>a.fg-disabled{color:#9d9d9d}.foogallery.fg-light-overlays .fg-caption .fg-caption-buttons>a.fg-disabled:hover{border-bottom:solid 1px}.foogallery.fg-caption-always .fg-item .fg-caption .fg-caption-inner:before{display:none}.foogallery.fg-caption-always .fg-item.fg-loaded .fg-caption{left:0;bottom:0;transition-timing-function:ease;transition-duration:.3s;transition-property:visibility,opacity;visibility:visible;opacity:1}.foogallery.fg-caption-always .fg-caption{text-align:left}.foogallery.fg-caption-hover .fg-caption .fg-caption-inner{display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;max-height:100%;position:absolute;top:50%;left:0;transform:translateY(-50%);padding:.4em}.foogallery.fg-caption-hover .fg-item.fg-loaded .fg-image-overlay{display:none}.foogallery.fg-c-l .fg-caption,.foogallery.fg-caption-always.fg-c-l .fg-caption{text-align:left}.foogallery.fg-c-c .fg-caption,.foogallery.fg-caption-always.fg-c-c .fg-caption{text-align:center}.foogallery.fg-c-r .fg-caption,.foogallery.fg-caption-always.fg-c-r .fg-caption{text-align:right}.foogallery.fg-c-j .fg-caption,.foogallery.fg-caption-always.fg-c-j .fg-caption{text-align:justify}.foogallery .fg-image-overlay:before{content:"";display:block;position:absolute;top:50%;left:50%;transform:translateX(-50%) translateY(-50%);width:32px;height:32px;background-size:32px 32px;background-position:center center;background-repeat:no-repeat;min-width:32px;min-height:32px}.foogallery .fg-caption-inner:before{content:"";display:none;position:relative;width:32px;height:32px;margin:.4em;background-size:32px 32px;vertical-align:middle;background-position:center center;background-repeat:no-repeat;min-width:32px;min-height:32px}.foogallery.fg-hover-cart:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-circle-plus:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-external:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-eye:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-plus:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-tint:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-zoom2:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-zoom3:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-hover-zoom:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-video-1:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-video-2:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-video-3:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-video-4:not(.fg-preset) .fg-caption-inner:before,.foogallery.fg-video-default:not(.fg-preset) .fg-caption-inner:before{display:block}.foogallery.fg-hover-cart:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-circle-plus:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-external:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-eye:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-plus:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-tint:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-zoom2:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-zoom3:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-zoom:not(.fg-preset) .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-video-1:not(.fg-preset) .fg-type-video .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-video-2:not(.fg-preset) .fg-type-video .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-video-3:not(.fg-preset) .fg-type-video .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-video-4:not(.fg-preset) .fg-type-video .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-video-default:not(.fg-preset) .fg-type-video .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-video-sticky .fg-type-video.fg-loaded .fg-item-inner .fg-image-overlay{background-color:transparent;visibility:visible;opacity:1;display:block}.foogallery.fg-video-sticky .fg-type-video .fg-caption-inner:before{display:none}.foogallery.fg-hover-zoom .fg-caption-inner:before,.foogallery.fg-hover-zoom .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom-light')}.foogallery.fg-light-overlays.fg-hover-zoom .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-zoom .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom-dark')}.foogallery.fg-hover-zoom2 .fg-caption-inner:before,.foogallery.fg-hover-zoom2 .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom2-light')}.foogallery.fg-light-overlays.fg-hover-zoom2 .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-zoom2 .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom2-dark')}.foogallery.fg-hover-zoom3 .fg-caption-inner:before,.foogallery.fg-hover-zoom3 .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom3-light')}.foogallery.fg-light-overlays.fg-hover-zoom3 .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-zoom3 .fg-image-overlay:before{background-image:url('../img/icons.svg#zoom3-dark')}.foogallery.fg-hover-plus .fg-caption-inner:before,.foogallery.fg-hover-plus .fg-image-overlay:before{background-image:url('../img/icons.svg#plus-light')}.foogallery.fg-light-overlays.fg-hover-plus .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-plus .fg-image-overlay:before{background-image:url('../img/icons.svg#plus-dark')}.foogallery.fg-hover-circle-plus .fg-caption-inner:before,.foogallery.fg-hover-circle-plus .fg-image-overlay:before{background-image:url('../img/icons.svg#circle-plus-light')}.foogallery.fg-light-overlays.fg-hover-circle-plus .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-circle-plus .fg-image-overlay:before{background-image:url('../img/icons.svg#circle-plus-dark')}.foogallery.fg-hover-eye .fg-caption-inner:before,.foogallery.fg-hover-eye .fg-image-overlay:before{background-image:url('../img/icons.svg#eye-light')}.foogallery.fg-light-overlays.fg-hover-eye .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-eye .fg-image-overlay:before{background-image:url('../img/icons.svg#eye-dark')}.foogallery.fg-hover-external .fg-caption-inner:before,.foogallery.fg-hover-external .fg-image-overlay:before{background-image:url('../img/icons.svg#external-light')}.foogallery.fg-light-overlays.fg-hover-external .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-external .fg-image-overlay:before{background-image:url('../img/icons.svg#external-dark')}.foogallery.fg-hover-cart .fg-caption-inner:before,.foogallery.fg-hover-cart .fg-image-overlay:before{background-image:url('../img/icons.svg#cart-light')}.foogallery.fg-light-overlays.fg-hover-cart .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-hover-cart .fg-image-overlay:before{background-image:url('../img/icons.svg#cart-dark')}.foogallery.fg-video-default .fg-type-video .fg-caption-inner:before,.foogallery.fg-video-default .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-default-light')}.foogallery.fg-light-overlays.fg-video-default .fg-type-video .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-video-default .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-default-dark')}.foogallery.fg-video-1 .fg-type-video .fg-caption-inner:before,.foogallery.fg-video-1 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-1-light')}.foogallery.fg-light-overlays.fg-video-1 .fg-type-video .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-video-1 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-1-dark')}.foogallery.fg-video-2 .fg-type-video .fg-caption-inner:before,.foogallery.fg-video-2 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-2-light')}.foogallery.fg-light-overlays.fg-video-2 .fg-type-video .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-video-2 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-2-dark')}.foogallery.fg-video-3 .fg-type-video .fg-caption-inner:before,.foogallery.fg-video-3 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-3-light')}.foogallery.fg-light-overlays.fg-video-3 .fg-type-video .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-video-3 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-3-dark')}.foogallery.fg-video-4 .fg-type-video .fg-caption-inner:before,.foogallery.fg-video-4 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-4-light')}.foogallery.fg-light-overlays.fg-video-4 .fg-type-video .fg-caption-inner:before,.foogallery.fg-light-overlays.fg-video-4 .fg-type-video .fg-image-overlay:before{background-image:url('../img/icons.svg#video-4-dark')}.foogallery.fg-caption-hover.fg-hover-colorize .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-fade .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-grayscale .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-instant .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-scale .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-down .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-left .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-right .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-up .fg-loaded .fg-caption,.foogallery.fg-hover-colorize .fg-loaded .fg-image,.foogallery.fg-hover-colorize .fg-loaded .fg-image-overlay,.foogallery.fg-hover-fade .fg-loaded .fg-image-overlay,.foogallery.fg-hover-grayscale .fg-loaded .fg-image,.foogallery.fg-hover-grayscale .fg-loaded .fg-image-overlay,.foogallery.fg-hover-instant .fg-loaded .fg-image-overlay,.foogallery.fg-hover-push .fg-loaded .fg-thumb,.foogallery.fg-hover-scale .fg-item.fg-loaded,.foogallery.fg-hover-scale .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-down .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-left .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-right .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-up .fg-loaded .fg-image-overlay,.foogallery.fg-hover-zoomed .fg-loaded .fg-image{transition-timing-function:ease;transition-duration:.3s;backface-visibility:hidden}.foogallery.fg-hover-colorize .fg-image{filter:grayscale(100%);transition-property:filter}.foogallery.fg-hover-colorize .fg-item-inner:focus-within .fg-image,.foogallery.fg-hover-colorize .fg-item-inner:hover .fg-image{filter:grayscale(0%)}.foogallery.fg-caption-hover.fg-hover-colorize .fg-caption,.foogallery.fg-hover-colorize .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:visibility,opacity,background-color}.foogallery.fg-caption-hover.fg-hover-colorize .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-colorize .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-colorize .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-colorize .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-fade .fg-loaded .fg-caption,.foogallery.fg-hover-fade .fg-loaded .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:visibility,opacity,background-color}.foogallery.fg-caption-hover.fg-hover-fade .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-fade .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-fade .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-fade .fg-loaded .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-hover-grayscale .fg-image{filter:grayscale(0%);transition-property:filter}.foogallery.fg-hover-grayscale .fg-item-inner:focus-within .fg-image,.foogallery.fg-hover-grayscale .fg-item-inner:hover .fg-image{filter:grayscale(100%)}.foogallery.fg-caption-hover.fg-hover-grayscale .fg-caption,.foogallery.fg-hover-grayscale .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:visibility,opacity,background-color}.foogallery.fg-caption-hover.fg-hover-grayscale .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-grayscale .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-grayscale .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-grayscale .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-instant .fg-loaded .fg-caption,.foogallery.fg-hover-instant .fg-loaded .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:none}.foogallery.fg-caption-hover.fg-hover-instant .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-instant .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-instant .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-instant .fg-loaded .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-caption,.foogallery.fg-hover-push .fg-loaded .fg-image-overlay{display:block;left:0;top:0;bottom:0;transform:translateX(100%);visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-caption,.foogallery.fg-hover-push .fg-loaded .fg-thumb{transition-property:transform}.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-item-inner:hover .fg-caption{transform:translateY(0)}.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-item-inner .fg-thumb:focus,.foogallery.fg-caption-hover.fg-hover-push .fg-loaded .fg-item-inner:hover .fg-thumb,.foogallery.fg-hover-push .fg-loaded .fg-item-inner .fg-thumb:focus,.foogallery.fg-hover-push .fg-loaded .fg-item-inner:hover .fg-thumb{transform:translateX(-100%)}.foogallery.fg-hover-scale .fg-item{transition-property:transform;z-index:4}.foogallery.fg-hover-scale .fg-item:focus-within,.foogallery.fg-hover-scale .fg-item:hover{transform:scale(1.048);z-index:10}.foogallery.fg-caption-hover.fg-hover-scale .fg-caption,.foogallery.fg-hover-scale .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:visibility,opacity,background-color}.foogallery.fg-caption-hover.fg-hover-scale .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-scale .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-scale .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-scale .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-hover-zoomed .fg-image{transition-property:transform;z-index:4}.foogallery.fg-hover-zoomed .fg-item:focus-within .fg-image,.foogallery.fg-hover-zoomed .fg-item:hover .fg-image{transform:scale(1.15)}.foogallery.fg-hover-zoomed .fg-image-wrap{overflow:hidden}.foogallery.fg-caption-hover.fg-hover-zoomed .fg-caption,.foogallery.fg-hover-zoomed .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:visibility,opacity,background-color}.foogallery.fg-caption-hover.fg-hover-zoomed .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-zoomed .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-zoomed .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-zoomed .fg-item-inner:hover .fg-image-overlay{visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-slide-down .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-left .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-right .fg-loaded .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-up .fg-loaded .fg-caption,.foogallery.fg-hover-slide-down .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-left .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-right .fg-loaded .fg-image-overlay,.foogallery.fg-hover-slide-up .fg-loaded .fg-image-overlay{display:block;left:0;top:0;bottom:0;transition-property:transform,background-color,opacity,visibility;visibility:visible;opacity:1}.foogallery.fg-caption-hover.fg-hover-slide-down .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-down .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-left .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-left .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-right .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-right .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-up .fg-loaded .fg-item-inner:focus-within .fg-caption,.foogallery.fg-caption-hover.fg-hover-slide-up .fg-loaded .fg-item-inner:hover .fg-caption,.foogallery.fg-hover-slide-down .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-slide-down .fg-loaded .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-slide-left .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-slide-left .fg-loaded .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-slide-right .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-slide-right .fg-loaded .fg-item-inner:hover .fg-image-overlay,.foogallery.fg-hover-slide-up .fg-loaded .fg-item-inner:focus-within .fg-image-overlay,.foogallery.fg-hover-slide-up .fg-loaded .fg-item-inner:hover .fg-image-overlay{transform:translateY(0) translateX(0)}.foogallery.fg-caption-hover.fg-hover-slide-up .fg-loaded .fg-caption,.foogallery.fg-hover-slide-up .fg-loaded .fg-image-overlay{transform:translateY(100%)}.foogallery.fg-caption-hover.fg-hover-slide-down .fg-loaded .fg-caption,.foogallery.fg-hover-slide-down .fg-loaded .fg-image-overlay{transform:translateY(-100%)}.foogallery.fg-caption-hover.fg-hover-slide-left .fg-loaded .fg-caption,.foogallery.fg-hover-slide-left .fg-loaded .fg-image-overlay{transform:translateX(100%)}.foogallery.fg-caption-hover.fg-hover-slide-right .fg-loaded .fg-caption,.foogallery.fg-hover-slide-right .fg-loaded .fg-image-overlay{transform:translateX(-100%)}.fg-paging-container,.fg-paging-container *,.fg-paging-container :after,.fg-paging-container :before{box-sizing:border-box}.fg-paging-container{display:block;padding:15px;margin-top:0!important;margin-bottom:0!important;margin-left:auto;margin-right:auto;text-align:center;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fg-ph-dots:after{display:block;content:'';width:0;height:22px}.fg-paging-container .fg-dot-item,.fg-paging-container .fg-dots{display:inline-block;margin:0;padding:0;outline:0;list-style:none}.fg-paging-container .fg-dot-item .fg-dot-link{display:inline-block;margin:3px;font-weight:400;line-height:1.4;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;background-image:none;text-decoration:none;border:1px solid transparent;position:relative;border-radius:50%;padding:0;font-size:0;outline:0;color:transparent;box-shadow:none}.fg-paging-container .fg-dot-item .fg-dot-link:before{content:"";background-color:transparent;border:1px solid transparent;display:block;border-radius:50%;width:9px;height:9px;padding:0;margin:2px}.fg-paging-container .fg-dot-item .fg-dot-link:active,.fg-paging-container .fg-dot-item .fg-dot-link:focus,.fg-paging-container .fg-dot-item .fg-dot-link:hover{text-decoration:none;box-shadow:none;outline:0}.fg-paging-container .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container .fg-dot-item.fg-selected .fg-dot-link{cursor:not-allowed;pointer-events:none}.fg-paging-container .fg-dot-item.fg-disabled .fg-dot-link{cursor:not-allowed;pointer-events:none;outline:0}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link,.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:before{transition-timing-function:ease-out;transition-duration:.3s;transition-property:color,border-color,background-color}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link{background-color:#eee;border-color:#9d9d9d}.fg-paging-container.fg-light .fg-dot-item.fg-selected .fg-dot-link{border-color:#888}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:focus:before,.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:hover:before,.fg-paging-container.fg-light .fg-dot-item.fg-selected .fg-dot-link:before{background-color:#666;border-color:#888}.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link:focus,.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link:hover{background-color:#eee;border-color:#9d9d9d;opacity:.5}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link,.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:before{transition-timing-function:ease-out;transition-duration:.3s;transition-property:color,border-color,background-color}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link{background-color:#666;border-color:#333}.fg-paging-container.fg-dark .fg-dot-item.fg-selected .fg-dot-link{border-color:#444}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:focus:before,.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:hover:before,.fg-paging-container.fg-dark .fg-dot-item.fg-selected .fg-dot-link:before{background-color:#333;border-color:#444}.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link:focus,.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link:hover{background-color:#666;border-color:#333;opacity:.5}.fg-paging-container,.fg-paging-container *,.fg-paging-container :after,.fg-paging-container :before{box-sizing:border-box}.fg-paging-container{display:block;padding:15px;margin-top:0!important;margin-bottom:0!important;margin-left:auto;margin-right:auto;text-align:center;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fg-ph-dots:after{display:block;content:'';width:0;height:22px}.fg-paging-container .fg-dot-item,.fg-paging-container .fg-dots{display:inline-block;margin:0;padding:0;outline:0;list-style:none}.fg-paging-container .fg-dot-item .fg-dot-link{display:inline-block;margin:3px;font-weight:400;line-height:1.4;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;background-image:none;text-decoration:none;border:1px solid transparent;position:relative;border-radius:50%;padding:0;font-size:0;outline:0;color:transparent;box-shadow:none}.fg-paging-container .fg-dot-item .fg-dot-link:before{content:"";background-color:transparent;border:1px solid transparent;display:block;border-radius:50%;width:9px;height:9px;padding:0;margin:2px}.fg-paging-container .fg-dot-item .fg-dot-link:active,.fg-paging-container .fg-dot-item .fg-dot-link:focus,.fg-paging-container .fg-dot-item .fg-dot-link:hover{text-decoration:none;box-shadow:none;outline:0}.fg-paging-container .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container .fg-dot-item.fg-selected .fg-dot-link{cursor:not-allowed;pointer-events:none}.fg-paging-container .fg-dot-item.fg-disabled .fg-dot-link{cursor:not-allowed;pointer-events:none;outline:0}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link,.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:before{transition-timing-function:ease-out;transition-duration:.3s;transition-property:color,border-color,background-color}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link{background-color:#eee;border-color:#9d9d9d}.fg-paging-container.fg-light .fg-dot-item.fg-selected .fg-dot-link{border-color:#888}.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:focus:before,.fg-paging-container.fg-light .fg-dot-item .fg-dot-link:hover:before,.fg-paging-container.fg-light .fg-dot-item.fg-selected .fg-dot-link:before{background-color:#666;border-color:#888}.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link:focus,.fg-paging-container.fg-light .fg-dot-item.fg-disabled .fg-dot-link:hover{background-color:#eee;border-color:#9d9d9d;opacity:.5}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link,.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:before{transition-timing-function:ease-out;transition-duration:.3s;transition-property:color,border-color,background-color}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link{background-color:#666;border-color:#333}.fg-paging-container.fg-dark .fg-dot-item.fg-selected .fg-dot-link{border-color:#444}.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:focus:before,.fg-paging-container.fg-dark .fg-dot-item .fg-dot-link:hover:before,.fg-paging-container.fg-dark .fg-dot-item.fg-selected .fg-dot-link:before{background-color:#333;border-color:#444}.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link,.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link:focus,.fg-paging-container.fg-dark .fg-dot-item.fg-disabled .fg-dot-link:hover{background-color:#666;border-color:#333;opacity:.5}.fg-default:after{content:'';display:block;clear:both}.fg-default .fg-item{display:inline-block;vertical-align:top;max-width:100%}.fg-default .fg-item-inner,.fg-default .fg-thumb{display:block;vertical-align:top;max-width:100%}.fg-default .fg-image{border-radius:0;display:block;max-width:100%;height:auto;margin:0;padding:0}.fg-default .fg-image{vertical-align:top}.fg-default.fg-left{text-align:left}.fg-default.fg-center{text-align:center}.fg-default.fg-right{text-align:right}.fg-default.fg-gutter-5{padding-left:5px;margin-bottom:-5px}.fg-default.fg-gutter-5 .fg-item{margin-right:5px;margin-bottom:5px}.fg-default.fg-gutter-10{padding-left:10px;margin-bottom:-10px}.fg-default.fg-gutter-10 .fg-item{margin-right:10px;margin-bottom:10px}.fg-default.fg-gutter-15{padding-left:15px;margin-bottom:-15px}.fg-default.fg-gutter-15 .fg-item{margin-right:15px;margin-bottom:15px}.fg-default.fg-gutter-20{padding-left:20px;margin-bottom:-20px}.fg-default.fg-gutter-20 .fg-item{margin-right:20px;margin-bottom:20px}.fg-default.fg-gutter-25{padding-left:25px;margin-bottom:-25px}.fg-default.fg-gutter-25 .fg-item{margin-right:25px;margin-bottom:25px}@media only screen and (max-width:600px){.fg-default.fg-m-col1 .fg-image,.fg-default.fg-m-col2 .fg-image,.fg-default.fg-m-col3 .fg-image{width:100%}.fg-default.fg-m-col1.fg-gutter-5 .fg-item{width:calc(100% - 10px);min-width:calc(100% - 10px);max-width:calc(100% - 10px)}.fg-default.fg-m-col2.fg-gutter-5 .fg-item{width:calc(50% - 10px);min-width:calc(50% - 10px);max-width:calc(50% - 10px)}.fg-default.fg-m-col3.fg-gutter-5 .fg-item{width:calc(33.33% - 10px);min-width:calc(33.33% - 10px);max-width:calc(33.33% - 10px)}.fg-default.fg-m-col1.fg-gutter-10 .fg-item{width:calc(100% - 20px);min-width:calc(100% - 20px);max-width:calc(100% - 20px)}.fg-default.fg-m-col2.fg-gutter-10 .fg-item{width:calc(50% - 20px);min-width:calc(50% - 20px);max-width:calc(50% - 20px)}.fg-default.fg-m-col3.fg-gutter-10 .fg-item{width:calc(33.33% - 20px);min-width:calc(33.33% - 20px);max-width:calc(33.33% - 20px)}.fg-default.fg-m-col1.fg-gutter-15 .fg-item{width:calc(100% - 30px);min-width:calc(100% - 30px);max-width:calc(100% - 30px)}.fg-default.fg-m-col2.fg-gutter-15 .fg-item{width:calc(50% - 30px);min-width:calc(50% - 30px);max-width:calc(50% - 30px)}.fg-default.fg-m-col3.fg-gutter-15 .fg-item{width:calc(33.33% - 30px);min-width:calc(33.33% - 30px);max-width:calc(33.33% - 30px)}.fg-default.fg-m-col1.fg-gutter-20 .fg-item{width:calc(100% - 40px);min-width:calc(100% - 40px);max-width:calc(100% - 40px)}.fg-default.fg-m-col2.fg-gutter-20 .fg-item{width:calc(50% - 40px);min-width:calc(50% - 40px);max-width:calc(50% - 40px)}.fg-default.fg-m-col3.fg-gutter-20 .fg-item{width:calc(33.33% - 40px);min-width:calc(33.33% - 40px);max-width:calc(33.33% - 40px)}.fg-default.fg-m-col1.fg-gutter-25 .fg-item{width:calc(100% - 50px);min-width:calc(100% - 50px);max-width:calc(100% - 50px)}.fg-default.fg-m-col2.fg-gutter-25 .fg-item{width:calc(50% - 50px);min-width:calc(50% - 50px);max-width:calc(50% - 50px)}.fg-default.fg-m-col3.fg-gutter-25 .fg-item{width:calc(33.33% - 50px);min-width:calc(33.33% - 50px);max-width:calc(33.33% - 50px)}}.fg-masonry *{box-sizing:border-box}.foogallery.fg-masonry{margin:0 auto;text-align:center}.fg-masonry .fg-thumb{display:block}.fg-masonry.fg-fixed .fg-column-width,.fg-masonry.fg-fixed .fg-image,.fg-masonry.fg-fixed .fg-item{max-width:100%}.fg-masonry .fg-column-width{display:inline-block;border:solid 0 transparent}.fg-masonry .fg-column-width,.fg-masonry .fg-gutter-width{position:absolute;height:0;visibility:hidden;opacity:0;pointer-events:none}.fg-masonry.fg-col2 .fg-item .fg-image,.fg-masonry.fg-col3 .fg-item .fg-image,.fg-masonry.fg-col4 .fg-item .fg-image,.fg-masonry.fg-col5 .fg-item .fg-image,.fg-masonry.fg-col6 .fg-item .fg-image,.fg-masonry.fg-fixed .fg-item .fg-image{width:100%;height:auto;max-width:100%}.fg-masonry .fg-item{line-height:0;font-size:0;vertical-align:top}.fg-masonry.fg-col2 .fg-item{margin-bottom:1%;width:49.5%}.fg-masonry.fg-col2 .fg-column-width{width:49.5%}.fg-masonry.fg-col2 .fg-gutter-width{width:1%}.fg-masonry.fg-col2.fg-gutter-none .fg-item{margin-bottom:0;width:50%}.fg-masonry.fg-col2.fg-gutter-none .fg-column-width{width:50%}.fg-masonry.fg-col2.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col2.fg-gutter-large .fg-item{margin-bottom:3%;width:48.5%}.fg-masonry.fg-col2.fg-gutter-large .fg-column-width{width:48.5%}.fg-masonry.fg-col2.fg-gutter-large .fg-gutter-width{width:3%}.fg-masonry.fg-col3 .fg-item{margin-bottom:1%;width:32.66%}.fg-masonry.fg-col3 .fg-column-width{width:32.66%}.fg-masonry.fg-col3 .fg-gutter-width{width:1%}.fg-masonry.fg-col3.fg-gutter-none .fg-item{margin-bottom:0;width:33.33%}.fg-masonry.fg-col3.fg-gutter-none .fg-column-width{width:33.33%}.fg-masonry.fg-col3.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col3.fg-gutter-large .fg-item{margin-bottom:3%;width:31.33%}.fg-masonry.fg-col3.fg-gutter-large .fg-column-width{width:31.33%}.fg-masonry.fg-col3.fg-gutter-large .fg-gutter-width{width:3%}.fg-masonry.fg-col4 .fg-item{margin-bottom:1%;width:24.25%}.fg-masonry.fg-col4 .fg-column-width{width:24.25%}.fg-masonry.fg-col4 .fg-gutter-width{width:1%}.fg-masonry.fg-col4.fg-gutter-none .fg-item{margin-bottom:0;width:25%}.fg-masonry.fg-col4.fg-gutter-none .fg-column-width{width:25%}.fg-masonry.fg-col4.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col4.fg-gutter-large .fg-item{margin-bottom:3%;width:22.75%}.fg-masonry.fg-col4.fg-gutter-large .fg-column-width{width:22.75%}.fg-masonry.fg-col4.fg-gutter-large .fg-gutter-width{width:3%}.fg-masonry.fg-col5 .fg-item{margin-bottom:1%;width:19.2%}.fg-masonry.fg-col5 .fg-column-width{width:19.2%}.fg-masonry.fg-col5 .fg-gutter-width{width:1%}.fg-masonry.fg-col5.fg-gutter-none .fg-item{margin-bottom:0;width:20%}.fg-masonry.fg-col5.fg-gutter-none .fg-column-width{width:20%}.fg-masonry.fg-col5.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col5.fg-gutter-large .fg-item{margin-bottom:3%;width:17.6%}.fg-masonry.fg-col5.fg-gutter-large .fg-column-width{width:17.6%}.fg-masonry.fg-col5.fg-gutter-large .fg-gutter-width{width:3%}.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:15.83%}.fg-masonry.fg-col6 .fg-column-width{width:15.83%}.fg-masonry.fg-col6 .fg-gutter-width{width:1%}.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:16.66%}.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:16.66%}.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:14.16%}.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:14.16%}.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:3%}@media screen and (max-width:1280px){.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:19.2%}.fg-masonry.fg-col6 .fg-column-width{width:19.2%}.fg-masonry.fg-col6 .fg-gutter-width{width:1%}.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:20%}.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:20%}.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:17.6%}.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:17.6%}.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:3%}}@media screen and (max-width:1024px){.fg-masonry.fg-col5 .fg-item,.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:24.25%}.fg-masonry.fg-col5 .fg-column-width,.fg-masonry.fg-col6 .fg-column-width{width:24.25%}.fg-masonry.fg-col5 .fg-gutter-width,.fg-masonry.fg-col6 .fg-gutter-width{width:1%}.fg-masonry.fg-col5.fg-gutter-none .fg-item,.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:25%}.fg-masonry.fg-col5.fg-gutter-none .fg-column-width,.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:25%}.fg-masonry.fg-col5.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col5.fg-gutter-large .fg-item,.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:22.75%}.fg-masonry.fg-col5.fg-gutter-large .fg-column-width,.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:22.75%}.fg-masonry.fg-col5.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:3%}}@media screen and (max-width:720px){.fg-masonry.fg-col4 .fg-item,.fg-masonry.fg-col5 .fg-item,.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:32.66%}.fg-masonry.fg-col4 .fg-column-width,.fg-masonry.fg-col5 .fg-column-width,.fg-masonry.fg-col6 .fg-column-width{width:32.66%}.fg-masonry.fg-col4 .fg-gutter-width,.fg-masonry.fg-col5 .fg-gutter-width,.fg-masonry.fg-col6 .fg-gutter-width{width:1%}.fg-masonry.fg-col4.fg-gutter-none .fg-item,.fg-masonry.fg-col5.fg-gutter-none .fg-item,.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:33.33%}.fg-masonry.fg-col4.fg-gutter-none .fg-column-width,.fg-masonry.fg-col5.fg-gutter-none .fg-column-width,.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:33.33%}.fg-masonry.fg-col4.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col4.fg-gutter-large .fg-item,.fg-masonry.fg-col5.fg-gutter-large .fg-item,.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:31.33%}.fg-masonry.fg-col4.fg-gutter-large .fg-column-width,.fg-masonry.fg-col5.fg-gutter-large .fg-column-width,.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:31.33%}.fg-masonry.fg-col4.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:3%}}@media screen and (max-width:480px){.fg-masonry.fg-col3 .fg-item,.fg-masonry.fg-col4 .fg-item,.fg-masonry.fg-col5 .fg-item,.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:49.5%}.fg-masonry.fg-col3 .fg-column-width,.fg-masonry.fg-col4 .fg-column-width,.fg-masonry.fg-col5 .fg-column-width,.fg-masonry.fg-col6 .fg-column-width{width:49.5%}.fg-masonry.fg-col3 .fg-gutter-width,.fg-masonry.fg-col4 .fg-gutter-width,.fg-masonry.fg-col5 .fg-gutter-width,.fg-masonry.fg-col6 .fg-gutter-width{width:1%}.fg-masonry.fg-col3.fg-gutter-none .fg-item,.fg-masonry.fg-col4.fg-gutter-none .fg-item,.fg-masonry.fg-col5.fg-gutter-none .fg-item,.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:50%}.fg-masonry.fg-col3.fg-gutter-none .fg-column-width,.fg-masonry.fg-col4.fg-gutter-none .fg-column-width,.fg-masonry.fg-col5.fg-gutter-none .fg-column-width,.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:50%}.fg-masonry.fg-col3.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col4.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col3.fg-gutter-large .fg-item,.fg-masonry.fg-col4.fg-gutter-large .fg-item,.fg-masonry.fg-col5.fg-gutter-large .fg-item,.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:48.5%}.fg-masonry.fg-col3.fg-gutter-large .fg-column-width,.fg-masonry.fg-col4.fg-gutter-large .fg-column-width,.fg-masonry.fg-col5.fg-gutter-large .fg-column-width,.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:48.5%}.fg-masonry.fg-col3.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col4.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:3%}}@media screen and (max-width:320px){.fg-masonry.fg-col2 .fg-item,.fg-masonry.fg-col3 .fg-item,.fg-masonry.fg-col4 .fg-item,.fg-masonry.fg-col5 .fg-item,.fg-masonry.fg-col6 .fg-item{margin-bottom:1%;width:100%}.fg-masonry.fg-col2 .fg-column-width,.fg-masonry.fg-col3 .fg-column-width,.fg-masonry.fg-col4 .fg-column-width,.fg-masonry.fg-col5 .fg-column-width,.fg-masonry.fg-col6 .fg-column-width{width:100%}.fg-masonry.fg-col2 .fg-gutter-width,.fg-masonry.fg-col3 .fg-gutter-width,.fg-masonry.fg-col4 .fg-gutter-width,.fg-masonry.fg-col5 .fg-gutter-width,.fg-masonry.fg-col6 .fg-gutter-width{width:0}.fg-masonry.fg-col2.fg-gutter-none .fg-item,.fg-masonry.fg-col3.fg-gutter-none .fg-item,.fg-masonry.fg-col4.fg-gutter-none .fg-item,.fg-masonry.fg-col5.fg-gutter-none .fg-item,.fg-masonry.fg-col6.fg-gutter-none .fg-item{margin-bottom:0;width:100%}.fg-masonry.fg-col2.fg-gutter-none .fg-column-width,.fg-masonry.fg-col3.fg-gutter-none .fg-column-width,.fg-masonry.fg-col4.fg-gutter-none .fg-column-width,.fg-masonry.fg-col5.fg-gutter-none .fg-column-width,.fg-masonry.fg-col6.fg-gutter-none .fg-column-width{width:100%}.fg-masonry.fg-col2.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col3.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col4.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-none .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-none .fg-gutter-width{width:0}.fg-masonry.fg-col2.fg-gutter-large .fg-item,.fg-masonry.fg-col3.fg-gutter-large .fg-item,.fg-masonry.fg-col4.fg-gutter-large .fg-item,.fg-masonry.fg-col5.fg-gutter-large .fg-item,.fg-masonry.fg-col6.fg-gutter-large .fg-item{margin-bottom:3%;width:100%}.fg-masonry.fg-col2.fg-gutter-large .fg-column-width,.fg-masonry.fg-col3.fg-gutter-large .fg-column-width,.fg-masonry.fg-col4.fg-gutter-large .fg-column-width,.fg-masonry.fg-col5.fg-gutter-large .fg-column-width,.fg-masonry.fg-col6.fg-gutter-large .fg-column-width{width:100%}.fg-masonry.fg-col2.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col3.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col4.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col5.fg-gutter-large .fg-gutter-width,.fg-masonry.fg-col6.fg-gutter-large .fg-gutter-width{width:0}}.foogallery.fg-border-thin .fg-column-width{border-width:4px}.foogallery.fg-border-medium .fg-column-width{border-width:10px}.foogallery.fg-border-thick .fg-column-width{border-width:16px}.foogallery.fg-masonry.fg-captions-bottom .fg-item-inner .fg-caption{visibility:visible;opacity:1;font-size:13px;position:relative;display:block;top:auto;bottom:auto;left:auto;right:auto;width:auto;height:auto;text-transform:none;transform:none;transition:none;background-color:transparent;border-style:solid;border-color:transparent;text-align:left}.foogallery.fg-masonry.fg-captions-bottom.fg-c-l .fg-item-inner .fg-caption{text-align:left}.foogallery.fg-masonry.fg-captions-bottom.fg-c-c .fg-item-inner .fg-caption{text-align:center}.foogallery.fg-masonry.fg-captions-bottom.fg-c-r .fg-item-inner .fg-caption{text-align:right}.foogallery.fg-masonry.fg-captions-bottom.fg-c-j .fg-item-inner .fg-caption{text-align:justify}.foogallery.fg-masonry.fg-captions-bottom .fg-item-inner:hover .fg-caption{transform:none;transition:none}.foogallery.fg-masonry.fg-captions-bottom .fg-item-inner .fg-caption-inner{display:block;position:relative;max-height:none;top:auto;bottom:auto;left:auto;right:auto;width:auto;height:auto;border:none;transform:none;transition:none}.foogallery.fg-masonry.fg-captions-bottom .fg-item-inner .fg-caption-inner:before{display:none}.foogallery.fg-masonry.fg-captions-bottom.fg-caption-hover .fg-item-inner .fg-image-overlay{display:block}.foogallery.fg-masonry.fg-captions-bottom.fg-caption-always .fg-item-inner:hover .fg-caption{visibility:visible;opacity:1}.fg-masonry.fg-captions-bottom.fg-dark .fg-caption,.fg-masonry.fg-captions-bottom.fg-light .fg-caption{color:#828282}.fg-masonry.fg-captions-bottom.fg-dark .fg-caption a,.fg-masonry.fg-captions-bottom.fg-light .fg-caption a{color:#828282;border-bottom:1px solid #828282}.fg-masonry.fg-captions-bottom.fg-dark .fg-caption a:hover,.fg-masonry.fg-captions-bottom.fg-light .fg-caption a:hover{border-bottom:none}.fg-masonry.fg-captions-bottom.fg-light .fg-caption-title,.fg-masonry.fg-captions-bottom.fg-light .fg-caption-title a{color:#222}.fg-masonry.fg-captions-bottom.fg-dark .fg-caption-title,.fg-masonry.fg-captions-bottom.fg-dark .fg-caption-title a{color:#fff}.fg-masonry.fg-captions-bottom.fg-light .fg-caption-title a{border-bottom:1px solid #222}.fg-masonry.fg-captions-bottom.fg-dark .fg-caption-title a{border-bottom:1px solid #fff}.fg-masonry.fg-captions-bottom .fg-caption{border-width:10px}.fg-masonry.fg-captions-bottom .fg-caption-title+.fg-caption-desc{margin-top:4px}.fg-masonry.fg-captions-bottom.fg-border-thin .fg-caption{border-width:10px 4px 4px 4px}.fg-masonry.fg-captions-bottom.fg-border-medium .fg-caption{border-width:10px 0 0 0}.fg-masonry.fg-captions-bottom.fg-border-thick .fg-caption{border-width:16px 0 0 0}.fg-masonry.fg-captions-bottom.fg-border-thick .fg-caption-title+.fg-caption-desc{margin-top:10px}.fg-masonry.fg-transparent .fg-item-inner{background-color:transparent;color:#333;border-color:transparent}.fg-masonry.fg-transparent .fg-caption{color:#7f7f7f}.fg-masonry.fg-transparent.fg-captions-bottom .fg-caption{border-width:0;border-top-width:10px;border-bottom-width:10px}.fg-masonry.fg-transparent .fg-caption a{color:#7f7f7f;border-bottom:1px solid #7f7f7f}.fg-masonry.fg-transparent .fg-caption a:hover{border-bottom:none}.fg-masonry.fg-transparent .fg-caption-title,.fg-masonry.fg-transparent .fg-caption-title a{color:#333}.fg-masonry.fg-transparent .fg-caption-title a{border-bottom:1px solid #333}.fg-masonry.fg-transparent.fg-round-full .fg-item,.fg-masonry.fg-transparent.fg-round-full .fg-item-inner{border-radius:15px}.fg-masonry.fg-transparent.fg-round-full .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-full .fg-image-wrap,.fg-masonry.fg-transparent.fg-round-full.fg-shadow-inset-large .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-full.fg-shadow-inset-medium .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-full.fg-shadow-inset-small .fg-thumb:after{border-radius:50%;overflow:hidden}.fg-masonry.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap,.fg-masonry.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap,.fg-masonry.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{overflow:hidden}.fg-masonry.fg-transparent.fg-round-small.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-small.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-small.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:5px}.fg-masonry.fg-transparent.fg-round-medium.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-medium.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-medium.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:10px}.fg-masonry.fg-transparent.fg-round-large.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-large.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-large.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-masonry.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-masonry.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:15px}.fg-masonry.fg-transparent.fg-shadow-inset-small .fg-thumb:after{box-shadow:inset 0 1px 4px 0 rgba(0,0,0,.3)}.fg-masonry.fg-transparent.fg-shadow-inset-medium .fg-thumb:after{box-shadow:inset 0 1px 10px 0 rgba(0,0,0,.3)}.fg-masonry.fg-transparent.fg-shadow-inset-large .fg-thumb:after{box-shadow:inset 0 1px 16px 0 rgba(0,0,0,.3)}.fg-masonry.fg-transparent.fg-shadow-outline .fg-item-inner{box-shadow:0 0 0 1px rgba(128,128,128,.5)}.fg-masonry.fg-transparent.fg-shadow-small .fg-item-inner{box-shadow:0 1px 4px 0 rgba(128,128,128,.5)}.fg-masonry.fg-transparent.fg-shadow-medium .fg-item-inner{box-shadow:0 1px 10px 0 rgba(128,128,128,.5)}.fg-masonry.fg-transparent.fg-shadow-large .fg-item-inner{box-shadow:0 1px 16px 0 rgba(128,128,128,.5)}.fg-justified{box-sizing:border-box;position:relative;text-align:center}.foogallery.fg-justified .fg-item{box-sizing:border-box;display:inline-block;margin:0;padding:0}.foogallery.fg-justified .fg-image,.foogallery.fg-justified .fg-item-inner,.foogallery.fg-justified .fg-thumb{box-sizing:border-box;display:block;margin:0;padding:0}.fg-justified .fg-item{visibility:visible;position:relative}.fg-justified .fg-item-inner{position:relative;width:100%;height:100%}.fg-justified .fg-thumb{position:relative;overflow:hidden}.fg-justified .fg-image{z-index:1}.fg-justified .fg-item.fg-positioned .fg-image-wrap,.fg-justified .fg-item.fg-positioned .fg-thumb{width:100%;height:100%}.fg-justified .fg-item.fg-positioned .fg-image{width:100%!important;height:auto!important;min-height:100%}.fg-simple_portfolio{display:flex;flex-wrap:wrap;justify-content:center;align-items:stretch;align-content:center}.fg-simple_portfolio .fg-item{position:relative;flex-grow:0;flex-shrink:0;flex-basis:auto;margin:10px;max-width:100%}.fg-simple_portfolio .fg-item-inner{display:flex;flex-direction:column;margin:0;height:100%}.fg-simple_portfolio.fg-captions-top .fg-item-inner{flex-direction:column-reverse}.fg-simple_portfolio .fg-image{height:auto;width:100%}.fg-simple_portfolio .fg-thumb{min-width:auto;min-height:auto}.foogallery.fg-simple_portfolio .fg-item-inner .fg-caption{visibility:visible;opacity:1;font-size:13px;position:relative;display:block;top:auto;bottom:auto;left:auto;right:auto;width:100%;height:100%;text-transform:none;transform:none;transition:none;background-color:transparent;border-style:solid;border-color:transparent;text-align:left}.foogallery.fg-simple_portfolio.fg-c-l .fg-item-inner .fg-caption{text-align:left}.foogallery.fg-simple_portfolio.fg-c-c .fg-item-inner .fg-caption{text-align:center}.foogallery.fg-simple_portfolio.fg-c-r .fg-item-inner .fg-caption{text-align:right}.foogallery.fg-simple_portfolio.fg-c-j .fg-item-inner .fg-caption{text-align:justify}.foogallery.fg-simple_portfolio .fg-item-inner:hover .fg-caption{transform:none;transition:none}.foogallery.fg-simple_portfolio .fg-item-inner .fg-caption-inner{display:block;top:auto;bottom:auto;left:auto;right:auto;width:auto;height:auto;border:none;transform:none;transition:none}.foogallery.fg-simple_portfolio .fg-item-inner .fg-caption-inner:before{display:none}.foogallery.fg-simple_portfolio.fg-caption-hover .fg-item-inner .fg-image-overlay{display:block}.foogallery.fg-simple_portfolio.fg-caption-always .fg-item-inner:hover .fg-caption{visibility:visible;opacity:1}.fg-simple_portfolio .fg-caption-title{white-space:normal;height:auto}.fg-simple_portfolio.fg-dark .fg-caption,.fg-simple_portfolio.fg-light .fg-caption{color:#828282}.fg-simple_portfolio.fg-dark .fg-caption a,.fg-simple_portfolio.fg-light .fg-caption a{color:#828282;border-bottom:1px solid #828282}.fg-simple_portfolio.fg-dark .fg-caption a:hover,.fg-simple_portfolio.fg-light .fg-caption a:hover{border-bottom:none}.fg-simple_portfolio.fg-light .fg-caption-title,.fg-simple_portfolio.fg-light .fg-caption-title a{color:#222}.fg-simple_portfolio.fg-dark .fg-caption-title,.fg-simple_portfolio.fg-dark .fg-caption-title a{color:#fff}.fg-simple_portfolio.fg-light .fg-caption-title a{border-bottom:1px solid #222}.fg-simple_portfolio.fg-dark .fg-caption-title a{border-bottom:1px solid #fff}.fg-simple_portfolio .fg-caption{border-width:0}.fg-simple_portfolio .fg-caption-title+.fg-caption-desc{margin-top:4px}.fg-simple_portfolio.fg-border-thin .fg-caption{border-width:10px 4px 4px 4px}.fg-simple_portfolio.fg-captions-top.fg-border-thin .fg-caption{border-width:4px 4px 10px 4px}.fg-simple_portfolio.fg-border-medium .fg-caption{border-width:10px 0 0 0}.fg-simple_portfolio.fg-captions-top.fg-border-medium .fg-caption{border-width:0 0 10px 0}.fg-simple_portfolio.fg-border-thick .fg-caption{border-width:16px 0 0 0}.fg-simple_portfolio.fg-captions-top.fg-border-thick .fg-caption{border-width:0 0 16px 0}.fg-simple_portfolio.fg-border-thick .fg-caption-title+.fg-caption-desc{margin-top:10px}.fg-simple_portfolio.fg-transparent .fg-item-inner{background-color:transparent;color:#333;border-color:transparent}.fg-simple_portfolio.fg-transparent .fg-caption{color:#7f7f7f}.fg-simple_portfolio.fg-transparent .fg-caption a{color:#7f7f7f;border-bottom:1px solid #7f7f7f}.fg-simple_portfolio.fg-transparent .fg-caption a:hover{border-bottom:none}.fg-simple_portfolio.fg-transparent .fg-caption-title,.fg-simple_portfolio.fg-transparent .fg-caption-title a{color:#333}.fg-simple_portfolio.fg-transparent .fg-caption-title a{border-bottom:1px solid #333}.fg-simple_portfolio.fg-transparent.fg-round-full .fg-item,.fg-simple_portfolio.fg-transparent.fg-round-full .fg-item-inner{border-radius:15px}.fg-simple_portfolio.fg-transparent.fg-round-full .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-full .fg-image-wrap,.fg-simple_portfolio.fg-transparent.fg-round-full.fg-shadow-inset-large .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-full.fg-shadow-inset-medium .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-full.fg-shadow-inset-small .fg-thumb:after{border-radius:50%;overflow:hidden}.fg-simple_portfolio.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap,.fg-simple_portfolio.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap,.fg-simple_portfolio.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{overflow:hidden}.fg-simple_portfolio.fg-transparent.fg-round-small.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-small.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-small.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:5px}.fg-simple_portfolio.fg-transparent.fg-round-medium.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-medium.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-medium.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:10px}.fg-simple_portfolio.fg-transparent.fg-round-large.fg-shadow-inset-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-large.fg-shadow-inset-medium:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-large.fg-shadow-inset-small:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-thumb:after,.fg-simple_portfolio.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-overlay,.fg-simple_portfolio.fg-transparent.fg-round-large:not(.fg-shadow-outline):not(.fg-shadow-small):not(.fg-shadow-medium):not(.fg-shadow-large) .fg-image-wrap{border-radius:15px}.fg-simple_portfolio.fg-transparent.fg-shadow-inset-small .fg-thumb:after{box-shadow:inset 0 1px 4px 0 rgba(0,0,0,.3)}.fg-simple_portfolio.fg-transparent.fg-shadow-inset-medium .fg-thumb:after{box-shadow:inset 0 1px 10px 0 rgba(0,0,0,.3)}.fg-simple_portfolio.fg-transparent.fg-shadow-inset-large .fg-thumb:after{box-shadow:inset 0 1px 16px 0 rgba(0,0,0,.3)}.fg-simple_portfolio.fg-transparent.fg-shadow-outline .fg-item-inner{box-shadow:0 0 0 1px rgba(128,128,128,.5)}.fg-simple_portfolio.fg-transparent.fg-shadow-small .fg-item-inner{box-shadow:0 1px 4px 0 rgba(128,128,128,.5)}.fg-simple_portfolio.fg-transparent.fg-shadow-medium .fg-item-inner{box-shadow:0 1px 10px 0 rgba(128,128,128,.5)}.fg-simple_portfolio.fg-transparent.fg-shadow-large .fg-item-inner{box-shadow:0 1px 16px 0 rgba(128,128,128,.5)}.foogallery.fg-preset.fg-polaroid .fg-item{-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:transform .35s,background-color .65s}.foogallery.fg-preset.fg-polaroid .fg-item:nth-child(2n+1){-webkit-transform:rotate(3deg);transform:rotate(3deg)}.foogallery.fg-preset.fg-polaroid .fg-item:nth-child(2n){-webkit-transform:rotate(-3deg);transform:rotate(-3deg)}.foogallery.fg-preset.fg-polaroid .fg-item:nth-child(3n){-webkit-transform:rotate(1deg);transform:rotate(1deg)}.foogallery.fg-preset.fg-polaroid .fg-item:nth-child(5n){-webkit-transform:rotate(-2deg);transform:rotate(-2deg)}.foogallery.fg-preset.fg-polaroid .fg-item:hover{-webkit-transform:rotate(0);transform:rotate(0)}.foogallery.fg-preset.fg-polaroid .fg-caption{position:relative;width:auto;font-family:"Segoe Print Regular",-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif}.foogallery.fg-preset.fg-polaroid .fg-caption-inner,.foogallery.fg-preset.fg-polaroid .fg-caption-title{position:relative;width:auto}.foogallery.fg-preset.fg-polaroid .fg-caption-title{text-align:center}.foogallery.fg-preset.fg-polaroid .fg-caption-desc{display:none}.foogallery.fg-light.fg-preset.fg-polaroid .fg-caption-title,.foogallery.fg-preset.fg-polaroid .fg-caption-title{color:#333}.foogallery.fg-dark.fg-preset.fg-polaroid .fg-caption-title{color:#fff}.foogallery.fg-preset.fg-polaroid .fg-caption{border-style:solid;border-color:transparent;border-width:10px}.foogallery.fg-preset.fg-polaroid .fg-caption-title+.fg-caption-desc{margin-top:4px}.foogallery.fg-preset.fg-polaroid.fg-border-thin .fg-caption{border-width:10px 4px 4px 4px}.foogallery.fg-preset.fg-polaroid.fg-captions-top.fg-border-thin .fg-caption{border-width:4px 4px 10px 4px}.foogallery.fg-preset.fg-polaroid.fg-border-medium .fg-caption{border-width:10px 0 0 0}.foogallery.fg-preset.fg-polaroid.fg-captions-top.fg-border-medium .fg-caption{border-width:0 0 10px 0}.foogallery.fg-preset.fg-polaroid.fg-border-thick .fg-caption{border-width:16px 0 0 0}.foogallery.fg-preset.fg-polaroid.fg-captions-top.fg-border-thick .fg-caption{border-width:0 0 16px 0}.foogallery.fg-preset.fg-polaroid.fg-border-thick .fg-caption-title+.fg-caption-desc{margin-top:10px}.fg-image-viewer{display:block;font-family:'Open Sans','Helvetica Neue',Arial,sans-serif}.fg-image-viewer.fg-left{text-align:left}.fg-image-viewer.fg-center{text-align:center}.fg-image-viewer.fg-right{text-align:right}.fiv-inner{position:relative;display:inline-block;max-width:100%;overflow:hidden;z-index:6}.fiv-inner .fiv-inner-container{position:relative;overflow:hidden;max-width:100%;border-style:solid;border-width:0;border-bottom-width:4px;z-index:5}.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item .fg-thumb,.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item .fg-thumb:active,.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item .fg-thumb:hover,.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item .fg-thumb:visited{position:relative;display:block;border:none;outline:0;text-decoration:none;box-shadow:none;max-width:100%}.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item{position:absolute;visibility:visible;opacity:1;border:none;outline:0;text-decoration:none;box-shadow:none;max-width:100%}.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item:first-of-type{position:relative}.fg-image-viewer .fiv-inner .fiv-inner-container .fg-item .fg-thumb img{display:block;max-width:100%;height:auto;border:none;outline:0;text-decoration:none}.fg-image-viewer .fiv-inner .fiv-ctrls{display:block;text-align:center;font-size:14px;border-style:solid;line-height:34px}.fg-image-viewer .fiv-inner .fiv-ctrls:after{content:'';display:block;clear:both}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-count{display:inline-block;font-weight:400;margin:0}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next,.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:none;min-width:80px;position:relative;overflow:hidden;transition:background-color .3s}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next:before,.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev:before{display:block;position:absolute;font-size:24px;line-height:30px;top:0;left:0;width:100%;transform:translateY(0);transition:transform .3s}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next:hover:before,.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev:hover:before{transform:translateY(-100%)}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next span,.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev span{display:block;width:100%;transform:translateY(100%);transition:transform .3s}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next:hover span,.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev:hover span{transform:translateY(0)}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev{float:left}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev:before{content:'\2190'}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next{float:right}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next:before{content:'\2192'}.fg-image-viewer .fiv-inner .fiv-ctrls .fiv-count span{margin:0 4px}.rtl .fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev{float:right}.rtl .fg-image-viewer .fiv-inner .fiv-ctrls .fiv-prev:before{content:'\2192'}.rtl .fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next{float:left}.rtl .fg-image-viewer .fiv-inner .fiv-ctrls .fiv-next:before{content:'\2190'}.foogallery.fg-image-viewer.fg-caption-always .fg-item-inner .fg-caption{padding:0;border:none}.foogallery.fg-image-viewer.fg-caption-always .fg-caption-title{padding:10px 10px 10px 10px}.foogallery.fg-image-viewer.fg-caption-always .fg-caption-desc{padding:10px 10px 10px 10px}.foogallery.fg-image-viewer.fg-caption-always .fg-caption-title+.fg-caption-desc{padding:0 10px 10px 10px}.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls,.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls .fiv-count,.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls .fiv-next,.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls .fiv-prev,.fg-image-viewer.fg-light .fiv-inner .fiv-inner-container{background-color:#fff;color:#333;border-color:#fff}.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls .fiv-next:hover,.fg-image-viewer.fg-light .fiv-inner .fiv-ctrls .fiv-prev:hover{background-color:#f2f2f2}.fg-image-viewer.fg-light .fiv-next,.fg-image-viewer.fg-light .fiv-prev{box-shadow:inset 0 0 0 1px #ddd}.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls,.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls .fiv-count,.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls .fiv-next,.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls .fiv-prev,.fg-image-viewer.fg-dark .fiv-inner .fiv-inner-container{background-color:#333;color:#fff;border-color:#333}.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls .fiv-next:hover,.fg-image-viewer.fg-dark .fiv-inner .fiv-ctrls .fiv-prev:hover{background-color:#444}.fg-image-viewer.fg-dark .fiv-next,.fg-image-viewer.fg-dark .fiv-prev{box-shadow:inset 0 0 0 1px #222}.foogallery.fg-image-viewer.fg-border-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thick .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thin .fg-item-inner{border-width:0}.foogallery.fg-image-viewer .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-thin .fiv-inner-container{border-width:4px}.foogallery.fg-image-viewer.fg-border-medium .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-medium .fiv-inner-container{border-width:10px}.foogallery.fg-image-viewer.fg-border-thick .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-thick .fiv-inner-container{border-width:16px}.foogallery.fg-image-viewer .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-medium .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-thick .fiv-ctrls,.foogallery.fg-image-viewer.fg-border-thin .fiv-ctrls{border-top-width:1px}.foogallery.fg-image-viewer.fg-round-small .fg-item,.foogallery.fg-image-viewer.fg-round-small .fg-item-inner,.foogallery.fg-image-viewer.fg-round-small .fiv-inner{border-radius:5px}.foogallery.fg-image-viewer.fg-round-small .fg-item,.foogallery.fg-image-viewer.fg-round-small .fg-item-inner{border-bottom-left-radius:0;border-bottom-right-radius:0}.foogallery.fg-image-viewer.fg-round-small .fiv-next,.foogallery.fg-image-viewer.fg-round-small .fiv-prev{border-radius:3px}.foogallery.fg-image-viewer.fg-border-medium.fg-round-small .fg-item,.foogallery.fg-image-viewer.fg-border-medium.fg-round-small .fg-item-inner,.foogallery.fg-image-viewer.fg-border-medium.fg-round-small .fiv-next,.foogallery.fg-image-viewer.fg-border-medium.fg-round-small .fiv-prev,.foogallery.fg-image-viewer.fg-border-thick.fg-round-small .fg-item,.foogallery.fg-image-viewer.fg-border-thick.fg-round-small .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thick.fg-round-small .fiv-next,.foogallery.fg-image-viewer.fg-border-thick.fg-round-small .fiv-prev,.foogallery.fg-image-viewer.fg-border-thin.fg-round-small .fg-item,.foogallery.fg-image-viewer.fg-border-thin.fg-round-small .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thin.fg-round-small .fiv-next,.foogallery.fg-image-viewer.fg-border-thin.fg-round-small .fiv-prev{border-radius:3px}.foogallery.fg-image-viewer.fg-round-medium .fg-item,.foogallery.fg-image-viewer.fg-round-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-round-medium .fiv-inner{border-radius:10px}.foogallery.fg-image-viewer.fg-round-medium .fg-item,.foogallery.fg-image-viewer.fg-round-medium .fg-item-inner{border-bottom-left-radius:0;border-bottom-right-radius:0}.foogallery.fg-image-viewer.fg-round-medium .fiv-next,.foogallery.fg-image-viewer.fg-round-medium .fiv-prev{border-radius:5px}.foogallery.fg-image-viewer.fg-border-thin.fg-round-medium .fg-item,.foogallery.fg-image-viewer.fg-border-thin.fg-round-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thin.fg-round-medium .fiv-next,.foogallery.fg-image-viewer.fg-border-thin.fg-round-medium .fiv-prev{border-radius:5px}.foogallery.fg-image-viewer.fg-border-medium.fg-round-medium .fg-item,.foogallery.fg-image-viewer.fg-border-medium.fg-round-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-border-medium.fg-round-medium .fiv-next,.foogallery.fg-image-viewer.fg-border-medium.fg-round-medium .fiv-prev,.foogallery.fg-image-viewer.fg-border-thick.fg-round-medium .fg-item,.foogallery.fg-image-viewer.fg-border-thick.fg-round-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thick.fg-round-medium .fiv-next,.foogallery.fg-image-viewer.fg-border-thick.fg-round-medium .fiv-prev{border-radius:3px}.foogallery.fg-image-viewer.fg-round-large .fg-item,.foogallery.fg-image-viewer.fg-round-large .fg-item-inner,.foogallery.fg-image-viewer.fg-round-large .fiv-inner{border-radius:15px}.foogallery.fg-image-viewer.fg-round-large .fg-item,.foogallery.fg-image-viewer.fg-round-large .fg-item-inner{border-bottom-left-radius:0;border-bottom-right-radius:0}.foogallery.fg-image-viewer.fg-round-large .fiv-next,.foogallery.fg-image-viewer.fg-round-large .fiv-prev{border-radius:11px}.foogallery.fg-image-viewer.fg-border-thin.fg-round-large .fg-item,.foogallery.fg-image-viewer.fg-border-thin.fg-round-large .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thin.fg-round-large .fiv-next,.foogallery.fg-image-viewer.fg-border-thin.fg-round-large .fiv-prev{border-radius:11px}.foogallery.fg-image-viewer.fg-border-medium.fg-round-large .fg-item,.foogallery.fg-image-viewer.fg-border-medium.fg-round-large .fg-item-inner,.foogallery.fg-image-viewer.fg-border-medium.fg-round-large .fiv-next,.foogallery.fg-image-viewer.fg-border-medium.fg-round-large .fiv-prev{border-radius:5px}.foogallery.fg-image-viewer.fg-border-thick.fg-round-large .fg-item,.foogallery.fg-image-viewer.fg-border-thick.fg-round-large .fg-item-inner,.foogallery.fg-image-viewer.fg-border-thick.fg-round-large .fiv-next,.foogallery.fg-image-viewer.fg-border-thick.fg-round-large .fiv-prev{border-radius:3px}.foogallery.fg-image-viewer.fg-round-full .fiv-inner,.foogallery.fg-image-viewer.fg-round-full .fiv-next,.foogallery.fg-image-viewer.fg-round-full .fiv-prev{border-radius:50%}.foogallery.fg-image-viewer.fg-dark.fg-shadow-large .fg-item-inner,.foogallery.fg-image-viewer.fg-dark.fg-shadow-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-dark.fg-shadow-outline .fg-item-inner,.foogallery.fg-image-viewer.fg-dark.fg-shadow-small .fg-item-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-large .fg-item-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-medium .fg-item-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-outline .fg-item-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-small .fg-item-inner{box-shadow:none}.foogallery.fg-image-viewer.fg-light.fg-shadow-outline .fiv-inner{box-shadow:0 0 0 1px #ddd}.foogallery.fg-image-viewer.fg-dark.fg-shadow-outline .fiv-inner{box-shadow:0 0 0 1px #222}.foogallery.fg-image-viewer.fg-dark.fg-shadow-small .fiv-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-small .fiv-inner{box-shadow:0 1px 4px 0 rgba(0,0,0,.5)}.foogallery.fg-image-viewer.fg-dark.fg-shadow-medium .fiv-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-medium .fiv-inner{box-shadow:0 1px 10px 0 rgba(0,0,0,.5)}.foogallery.fg-image-viewer.fg-dark.fg-shadow-large .fiv-inner,.foogallery.fg-image-viewer.fg-light.fg-shadow-large .fiv-inner{box-shadow:0 1px 16px 0 rgba(0,0,0,.5)}.foogallery.fg-thumbnail,.foogallery.fg-thumbnail.fg-center{text-align:center}.foogallery.fg-thumbnail.fg-left{text-align:left}.foogallery.fg-thumbnail.fg-right{text-align:right}.foogallery.fg-thumbnail.fg-float-left{float:left;width:auto}.foogallery.fg-thumbnail.fg-float-right{float:right;width:auto}.foogallery.fg-thumbnail .fg-item{display:inline-block;vertical-align:top;max-width:100%}.foogallery.fg-thumbnail .fg-image{max-width:100%}.foogallery.fg-thumbnail .fg-st-hidden{display:none}.foogallery-stack-album{text-align:center;overflow:hidden;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:13px;font-weight:400;line-height:1.3}.foogallery-stack-album,.foogallery-stack-album *{box-sizing:border-box}.foogallery-stack-album.fg-align-left{text-align:left}.foogallery-stack-album.fg-align-center{text-align:center}.foogallery-stack-album.fg-align-right{text-align:right}.foogallery-stack-album.fg-disable-transitions,.foogallery-stack-album.fg-disable-transitions *{transition:none!important}.fg-header{display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center;position:relative;padding:0;margin:0;border-top:solid 1px #aaa;border-bottom:solid 1px #aaa}.fg-header-title{display:block;margin:0;padding:0 20px;width:100%;text-align:left}.fg-header-active{display:block;margin:0;padding:0 20px;visibility:hidden;opacity:0;width:100%;text-align:right;transition-property:opacity,visibility;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-header-back{display:block;padding:0;margin:5px;visibility:hidden;opacity:0;min-width:40px;width:40px;height:40px;border-radius:50%;text-align:center;line-height:38px;color:#999;background:#ddd;background:rgba(200,200,200,.5);cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition-property:opacity,visibility;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-has-active .fg-header-active,.fg-has-active .fg-header-back{visibility:visible;opacity:1}.fg-piles{display:inline-block;position:relative;transition-property:width,height;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-pile{display:block;position:absolute;top:0;left:0;list-style:none;padding:0;margin:0;visibility:visible;opacity:1;transition-property:opacity,visibility,top,left,width,height;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-pile.fg-hidden{visibility:hidden;opacity:0}.fg-pile-item{display:block;position:absolute;top:25px;left:25px;visibility:visible;opacity:1;cursor:pointer;border:10px solid #fff;background-color:#fff;box-shadow:0 1px 4px rgba(0,0,0,.2);transition-property:opacity,visibility,top,left,transform;transition-duration:.3s;transition-timing-function:ease-in-out;z-index:1;transform:rotate(0)}.fg-expanded .fg-pile-item{z-index:2;transform:rotate(0)!important}.fg-pile-item.fg-has-cover{z-index:10;transform:rotate(0)!important}.fg-pile-item:nth-child(2){z-index:9}.fg-pile-item:nth-child(3){z-index:8}.fg-pile-item:nth-child(4){z-index:7}.fg-pile-item:nth-child(1n+5){visibility:hidden;opacity:0}.fg-expanded .fg-pile-item:nth-child(1n+4){visibility:visible;opacity:1}.fg-pile-item-thumb{display:block}.fg-pile-item-image{display:block}.fg-pile-item-caption{display:flex;justify-content:center;flex-direction:column;position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;margin:0;padding:10px;background-color:rgba(68,68,68,.5);color:#fff;text-align:center;visibility:hidden;opacity:0;transition-property:opacity,visibility;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-pile-item-title{display:block;width:100%;padding:0 0 10px}.fg-pile-item-desc{display:block;width:100%;max-height:100%;border-top:solid 1px currentColor;padding:10px 0 0;overflow:hidden}.fg-pile-item-thumb:hover .fg-pile-item-caption{visibility:visible;opacity:1}.fg-pile-cover{display:flex;justify-content:left;align-items:center;position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;visibility:visible;opacity:1;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition-property:opacity,visibility;transition-duration:.3s;transition-timing-function:ease-in-out}.fg-expanded .fg-pile-cover{visibility:hidden;opacity:0;pointer-events:none}.fg-pile-cover-content{display:flex;position:relative;background:#fff;color:#333;width:75%;font-weight:700;box-shadow:1px 1px 1px rgba(0,0,0,.1),5px 0 5px -3px rgba(0,0,0,.4),inset 0 0 5px rgba(0,0,0,.04)}.fg-pile-cover-title{text-align:center;padding:10px;width:100%}.fg-pile-cover-count{color:#aaa;padding:10px 5px;background:#f7f7f7;height:100%}:root{--fg-carousel-perspective:150px;--fg-carousel-navigation-size:48px;--fg-carousel-pagination-size:14px;--fg-carousel-progress-size:4px;--fg-carousel-navigation-opacity:0.3;--fg-carousel-transition-speed:650ms;--fg-carousel-ui-speed:300ms}.foogallery.fg-carousel{--fg-carousel-inverse-perspective:calc( -1 * var(--fg-carousel-perspective) );position:relative;overflow:hidden;display:grid;grid-template-columns:var(--fg-carousel-navigation-size) auto var(--fg-carousel-navigation-size);grid-template-rows:auto auto;grid-template-areas:"prev inner next" "bottom bottom bottom"}.fg-carousel-inner{position:relative;grid-area:inner;display:grid;grid-template-columns:1fr auto 1fr;grid-template-rows:auto;grid-template-areas:"left center right";padding:10px 0;perspective:var(--fg-carousel-perspective);transform:translate3d(0,0,0);transform-style:preserve-3d;backface-visibility:hidden;will-change:contents}.foogallery_preview_container .fg-carousel-inner{transform-style:unset}.fg-carousel-center{position:relative;z-index:-1;pointer-events:none;visibility:hidden}.fg-carousel-center{grid-area:center}.fg-carousel-progress{display:block;position:absolute;visibility:visible;bottom:0;left:0;width:0;height:var(--fg-carousel-progress-size);border-radius:calc(var(--fg-carousel-progress-size)/ 2);transition:width .1s linear;opacity:var(--fg-carousel-navigation-opacity)}.rtl .fg-carousel-progress{left:auto;right:0}.fg-carousel-bottom{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;position:relative;grid-area:bottom;font-size:var(--fg-carousel-pagination-size);padding:0;margin-bottom:10px}.fg-carousel-bullet{width:1em;height:1em;display:block;padding:0;margin:.3em;border-radius:50%;border:solid 1px transparent;background:0 0;box-shadow:none;outline:0;opacity:var(--fg-carousel-navigation-opacity);cursor:pointer;font-size:inherit;transition:opacity var(--fg-carousel-ui-speed) ease-in}@media only screen and (max-width:782px){.fg-carousel-bullet{width:1.25em;height:1.25em}}.fg-carousel-bullet:hover{background:0 0;box-shadow:none;outline:0;opacity:1}.fg-carousel-bullet.fg-bullet-active{opacity:1}button.fg-carousel-next,button.fg-carousel-prev{position:relative;height:100%;width:100%;display:flex;align-items:center;justify-content:center;font-size:var(--fg-carousel-navigation-size);background:0 0;border:none;box-shadow:none;outline:0;z-index:11;cursor:pointer;opacity:var(--fg-carousel-navigation-opacity);transition:opacity var(--fg-carousel-ui-speed) ease-in;padding:0;margin:0}button.fg-carousel-next:hover,button.fg-carousel-prev:hover{background:0 0;border:none;box-shadow:none;outline:0;opacity:1}.fg-carousel-next .fg-icon,.fg-carousel-prev .fg-icon{width:1em;height:1em}.rtl .fg-carousel-next .fg-icon,.rtl .fg-carousel-prev .fg-icon{transform:rotate(180deg)}.fg-carousel-prev{grid-area:prev}.fg-carousel-next{grid-area:next}.foogallery.fg-carousel .fg-item{display:block;opacity:0;visibility:hidden;grid-area:center;transform-origin:center center;transform:translate3d(0,200%,var(--fg-carousel-inverse-perspective));transition-timing-function:ease-in-out;transition-duration:0s;transition-property:background-color,transform,transform-origin,opacity,visibility;backface-visibility:hidden}.foogallery.fg-carousel .fg-item.fg-loaded{transform:translate3d(0,0,var(--fg-carousel-inverse-perspective));transition-timing-function:ease-in-out;transition-duration:calc( var(--fg-carousel-transition-speed) / 2 );transition-property:background-color,transform,transform-origin,opacity,visibility}.foogallery.fg-carousel .fg-item.fg-item-active,.foogallery.fg-carousel .fg-item.fg-item-next,.foogallery.fg-carousel .fg-item.fg-item-prev{opacity:1;visibility:visible}.foogallery.fg-carousel .fg-item.fg-item-active{transform:translate3d(0,0,0)}.foogallery.fg-carousel.fg-dark .fg-carousel-progress,.foogallery.fg-carousel.fg-light.fg-inverted .fg-carousel-progress{background-color:#fff;box-shadow:inset 0 0 0 1px #9d9d9d}.foogallery.fg-carousel.fg-dark button.fg-carousel-bullet,.foogallery.fg-carousel.fg-light.fg-inverted button.fg-carousel-bullet{background-color:#fff;border-color:#ccc}.foogallery.fg-carousel.fg-dark button.fg-carousel-next,.foogallery.fg-carousel.fg-dark button.fg-carousel-prev,.foogallery.fg-carousel.fg-light.fg-inverted button.fg-carousel-next,.foogallery.fg-carousel.fg-light.fg-inverted button.fg-carousel-prev{color:#fff;background-color:transparent}.foogallery.fg-carousel.fg-dark.fg-inverted .fg-carousel-progress,.foogallery.fg-carousel.fg-light .fg-carousel-progress{background-color:#444;box-shadow:inset 0 0 0 1px #333}.foogallery.fg-carousel.fg-dark.fg-inverted button.fg-carousel-bullet,.foogallery.fg-carousel.fg-light button.fg-carousel-bullet{background-color:#444;border-color:#333}.foogallery.fg-carousel.fg-dark.fg-inverted button.fg-carousel-next,.foogallery.fg-carousel.fg-dark.fg-inverted button.fg-carousel-prev,.foogallery.fg-carousel.fg-light button.fg-carousel-next,.foogallery.fg-carousel.fg-light button.fg-carousel-prev{color:#444;background-color:transparent}.fg-shadow-outline .fg-carousel-inner{padding:1px}.fg-shadow-small .fg-carousel-inner{padding:4px}.fg-shadow-medium .fg-carousel-inner{padding:10px}.fg-shadow-large .fg-carousel-inner{padding:16px}.foogallery.fg-carousel-hide-nav-arrows{--fg-carousel-navigation-size:0px}.foogallery.fg-carousel-hide-nav-arrows .fg-carousel-next,.foogallery.fg-carousel-hide-nav-arrows .fg-carousel-prev,.foogallery.fg-carousel-hide-pagination .fg-carousel-bottom,.foogallery.fg-carousel-hide-progress-bar .fg-carousel-progress{display:none}
extensions/default-templates/shared/js/foogallery.js CHANGED
@@ -4646,11 +4646,10 @@ FooGallery.utils, FooGallery.utils.is, FooGallery.utils.str);
4646
  * @memberof FooGallery.utils.
4647
  * @class Timer
4648
  * @param {number} [interval=1000] - The internal tick interval of the timer.
4649
- * @augments FooGallery.utils.EventClass
4650
  */
4651
 
4652
  _.Timer = _.EventClass.extend(
4653
- /** @lends FooGallery.utils.Timer.prototype */
4654
  {
4655
  /**
4656
  * @ignore
@@ -4937,7 +4936,6 @@ FooGallery.utils, FooGallery.utils.is, FooGallery.utils.str);
4937
  if (self.isRunning) {
4938
  self.isRunning = false;
4939
  self.isPaused = true;
4940
- self.canResume = self.__remaining > 0;
4941
  self.trigger("pause", self.__eventArgs());
4942
  }
4943
 
@@ -6289,7 +6287,7 @@ FooGallery.utils.$, FooGallery.utils, FooGallery.utils.is, FooGallery.utils.fn);
6289
  FooGallery.utils.is,
6290
  FooGallery.utils.obj
6291
  );
6292
- (function($, _, _utils, _is, _fn){
6293
 
6294
  /**
6295
  * @summary A factory for classes allowing them to be registered and created using a friendly name.
@@ -6483,6 +6481,23 @@ FooGallery.utils.$, FooGallery.utils, FooGallery.utils.is, FooGallery.utils.fn);
6483
  result.push(self.make(r.name));
6484
  });
6485
  return result;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6486
  }
6487
  });
6488
 
@@ -6492,7 +6507,8 @@ FooGallery.utils.$, FooGallery.utils, FooGallery.utils.is, FooGallery.utils.fn);
6492
  FooGallery,
6493
  FooGallery.utils,
6494
  FooGallery.utils.is,
6495
- FooGallery.utils.fn
 
6496
  );
6497
  (function ($, _, _utils, _is, _fn, _obj) {
6498
 
@@ -6588,23 +6604,6 @@ FooGallery.utils.$, FooGallery.utils, FooGallery.utils.is, FooGallery.utils.fn);
6588
  }
6589
  return type;
6590
  },
6591
- /**
6592
- * @memberof FooGallery.TemplateFactory#
6593
- * @function configure
6594
- * @param {string} name
6595
- * @param {object} options
6596
- * @param {object} classes
6597
- * @param {object} il8n
6598
- */
6599
- configure: function (name, options, classes, il8n) {
6600
- var self = this;
6601
- if (self.contains(name)) {
6602
- var reg = self.registered;
6603
- _obj.extend(reg[name].opt, options);
6604
- _obj.extend(reg[name].cls, classes);
6605
- _obj.extend(reg[name].il8n, il8n);
6606
- }
6607
- },
6608
  options: function (name, options) {
6609
  options = _obj.extend({type: name}, options);
6610
  var self = this, reg = self.registered,
@@ -10090,15 +10089,6 @@ FooGallery.utils.$, FooGallery.utils, FooGallery.utils.is, FooGallery.utils.fn);
10090
  }
10091
  return options;
10092
  },
10093
- configure: function(name, options, classes, il8n){
10094
- var self = this;
10095
- if (self.contains(name)){
10096
- var reg = self.registered;
10097
- _obj.extend(reg[name].opt, options);
10098
- _obj.extend(reg[name].cls, classes);
10099
- _obj.extend(reg[name].il8n, il8n);
10100
- }
10101
- },
10102
  /**
10103
  * @summary Checks if the factory contains a control registered using the supplied `name`.
10104
  * @memberof FooGallery.PagingFactory#
@@ -10849,7 +10839,7 @@ FooGallery.utils.$, FooGallery.utils, FooGallery.utils.is, FooGallery.utils.fn);
10849
  break;
10850
  case "hide":
10851
  height = self.justify(row, top_start, maxWidth, self.maxRowHeight);
10852
- if (row.width < maxWidth){
10853
  row.visible = false;
10854
  }
10855
  break;
@@ -11828,6 +11818,15 @@ FooGallery.utils.$, FooGallery.utils, FooGallery.utils.is, FooGallery.utils.fn);
11828
  scaleToZ: function( value, vectorZ, perspective ){
11829
  return value * ( 1 - vectorZ / ( perspective + vectorZ ) );
11830
  },
 
 
 
 
 
 
 
 
 
11831
 
11832
  //#endregion
11833
 
@@ -11910,7 +11909,7 @@ FooGallery.utils.$, FooGallery.utils, FooGallery.utils.is, FooGallery.utils.fn);
11910
  },
11911
  initSwipe: function(){
11912
  const self = this;
11913
- let startX = 0, endX = 0;
11914
  self._listeners.add( self.elem.inner, "touchstart", function( event ){
11915
  self.interacted = true;
11916
  startX = event.changedTouches[0].screenX;
@@ -11918,10 +11917,13 @@ FooGallery.utils.$, FooGallery.utils, FooGallery.utils.is, FooGallery.utils.fn);
11918
 
11919
  self._listeners.add( self.elem.inner, "touchend", function( event ){
11920
  endX = event.changedTouches[0].screenX;
11921
- if ( endX < startX ){ // swipe left
11922
- self.next();
11923
- } else { // swipe right
11924
- self.previous();
 
 
 
11925
  }
11926
  endX = 0;
11927
  startX = 0;
@@ -12045,6 +12047,16 @@ FooGallery.utils.$, FooGallery.utils, FooGallery.utils.is, FooGallery.utils.fn);
12045
  self.el.style.removeProperty( "--fg-carousel-perspective" );
12046
  }
12047
  },
 
 
 
 
 
 
 
 
 
 
12048
  layout: function( width ){
12049
  const self = this;
12050
  if ( self.activeItem === null ){
@@ -12072,8 +12084,8 @@ FooGallery.utils.$, FooGallery.utils, FooGallery.utils.is, FooGallery.utils.fn);
12072
  if ( self.cache.has("layout") && self.cache.get("width") === width ){
12073
  return self.cache.get("layout");
12074
  }
12075
- const itemWidth = self.elem.center.getBoundingClientRect().width;
12076
- const maxOffset = ( self.elem.inner.getBoundingClientRect().width / 2 ) + ( itemWidth / 2 );
12077
  const layout = self.calculate( itemWidth, maxOffset );
12078
  self.cache.set( "width", width );
12079
  self.cache.set( "layout", layout );
@@ -12337,16 +12349,67 @@ FooGallery.utils.$, FooGallery.utils, FooGallery.utils.is, FooGallery.utils.fn);
12337
  );
12338
  (function ($, _, _utils, _obj, _is) {
12339
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12340
  _.triggerPostLoad = function (e, current, prev, isFilter) {
12341
- var tmpl = e.target;
12342
  if (tmpl instanceof _.Template){
12343
- if (tmpl.initialized && (e.type === "after-page-change" && !isFilter || e.type === "after-filter-change")) {
12344
  try {
12345
- // if the gallery is displayed within a FooBox do not trigger the post-load which would cause the lightbox to re-init
12346
- if (tmpl.$el.parents(".fbx-item").length > 0) return;
12347
- if (tmpl.$el.hasClass("fbx-instance") && !!window.FOOBOX && !!$.fn.foobox){
12348
- var opts = $.extend({}, window.FOOBOX.o, (tmpl.opt.protected ? { images: { noRightClick: true } } : {}));
12349
- tmpl.$el.foobox(opts);
12350
  } else {
12351
  $("body").trigger("post-load");
12352
  }
@@ -12357,43 +12420,98 @@ FooGallery.utils.$, FooGallery.utils, FooGallery.utils.is, FooGallery.utils.fn);
12357
  }
12358
  };
12359
 
 
 
 
 
 
 
 
12360
  _.autoDefaults = {
12361
  on: {
12362
- "after-page-change after-filter-change": _.triggerPostLoad
12363
  }
12364
  };
12365
 
 
 
 
 
 
 
 
 
 
12366
  _.autoEnabled = true;
12367
 
 
 
 
 
 
 
 
 
12368
  _.auto = function (options) {
12369
- _.autoDefaults = _obj.merge(_.autoDefaults, options);
12370
  };
12371
 
 
 
 
 
 
 
 
 
 
12372
  _.globalsMerged = false;
12373
 
 
 
 
12374
  _.mergeGlobals = function(){
12375
- if (_.globalsMerged === true) return;
12376
- if (window.FooGallery_il8n && _is.object(window.FooGallery_il8n)){
12377
- var il8n = window.FooGallery_il8n;
12378
- for (var factory in il8n){
12379
- if (!il8n.hasOwnProperty(factory) || !(_[factory] instanceof _.Factory) || !_is.object(il8n[factory])) continue;
12380
- for (var component in il8n[factory]){
12381
- if (il8n[factory].hasOwnProperty(component)){
12382
- _[factory].configure(component, null, null, il8n[factory][component]);
12383
- }
12384
- }
12385
- }
12386
  _.globalsMerged = true;
12387
  }
12388
  };
12389
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12390
  _.load = _.reload = function(){
 
12391
  // this automatically initializes all templates on page load
12392
  $(function () {
12393
  _.mergeGlobals();
12394
  if (_.autoEnabled){
12395
  $('[id^="foogallery-gallery-"]:not(.fg-ready)').foogallery(_.autoDefaults);
12396
  }
 
 
 
 
12397
  });
12398
 
12399
  _utils.ready(function () {
@@ -12401,9 +12519,15 @@ FooGallery.utils.$, FooGallery.utils, FooGallery.utils.is, FooGallery.utils.fn);
12401
  if (_.autoEnabled){
12402
  $('[id^="foogallery-gallery-"].fg-ready').foogallery(_.autoDefaults);
12403
  }
 
 
 
 
12404
  });
12405
  };
12406
 
 
 
12407
  _.load();
12408
 
12409
  })(
4646
  * @memberof FooGallery.utils.
4647
  * @class Timer
4648
  * @param {number} [interval=1000] - The internal tick interval of the timer.
 
4649
  */
4650
 
4651
  _.Timer = _.EventClass.extend(
4652
+ /** @lends FooGallery.utils.Timer */
4653
  {
4654
  /**
4655
  * @ignore
4936
  if (self.isRunning) {
4937
  self.isRunning = false;
4938
  self.isPaused = true;
 
4939
  self.trigger("pause", self.__eventArgs());
4940
  }
4941
 
6287
  FooGallery.utils.is,
6288
  FooGallery.utils.obj
6289
  );
6290
+ (function($, _, _utils, _is, _fn, _obj){
6291
 
6292
  /**
6293
  * @summary A factory for classes allowing them to be registered and created using a friendly name.
6481
  result.push(self.make(r.name));
6482
  });
6483
  return result;
6484
+ },
6485
+ /**
6486
+ * @memberof FooGallery.Factory#
6487
+ * @function configure
6488
+ * @param {string} name
6489
+ * @param {object} options
6490
+ * @param {object} classes
6491
+ * @param {object} il8n
6492
+ */
6493
+ configure: function(name, options, classes, il8n){
6494
+ var self = this;
6495
+ if (self.contains(name)) {
6496
+ var reg = self.registered;
6497
+ _obj.extend(reg[name].opt, options);
6498
+ _obj.extend(reg[name].cls, classes);
6499
+ _obj.extend(reg[name].il8n, il8n);
6500
+ }
6501
  }
6502
  });
6503
 
6507
  FooGallery,
6508
  FooGallery.utils,
6509
  FooGallery.utils.is,
6510
+ FooGallery.utils.fn,
6511
+ FooGallery.utils.obj
6512
  );
6513
  (function ($, _, _utils, _is, _fn, _obj) {
6514
 
6604
  }
6605
  return type;
6606
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6607
  options: function (name, options) {
6608
  options = _obj.extend({type: name}, options);
6609
  var self = this, reg = self.registered,
10089
  }
10090
  return options;
10091
  },
 
 
 
 
 
 
 
 
 
10092
  /**
10093
  * @summary Checks if the factory contains a control registered using the supplied `name`.
10094
  * @memberof FooGallery.PagingFactory#
10839
  break;
10840
  case "hide":
10841
  height = self.justify(row, top_start, maxWidth, self.maxRowHeight);
10842
+ if (row.width < maxWidth && rows.length > 1){
10843
  row.visible = false;
10844
  }
10845
  break;
11818
  scaleToZ: function( value, vectorZ, perspective ){
11819
  return value * ( 1 - vectorZ / ( perspective + vectorZ ) );
11820
  },
11821
+ /**
11822
+ * @summary Returns the absolute difference between 2 numbers.
11823
+ * @param {number} num1
11824
+ * @param {number} num2
11825
+ * @returns {number}
11826
+ */
11827
+ getDiff: function( num1, num2 ){
11828
+ return num1 > num2 ? num1 - num2 : num2 - num1;
11829
+ },
11830
 
11831
  //#endregion
11832
 
11909
  },
11910
  initSwipe: function(){
11911
  const self = this;
11912
+ let startX = 0, endX = 0, min = 25 * (window.devicePixelRatio || 1);
11913
  self._listeners.add( self.elem.inner, "touchstart", function( event ){
11914
  self.interacted = true;
11915
  startX = event.changedTouches[0].screenX;
11917
 
11918
  self._listeners.add( self.elem.inner, "touchend", function( event ){
11919
  endX = event.changedTouches[0].screenX;
11920
+ const diff = self.getDiff( startX, endX );
11921
+ if ( diff > min ){
11922
+ if ( endX < startX ){ // swipe left
11923
+ self.next();
11924
+ } else { // swipe right
11925
+ self.previous();
11926
+ }
11927
  }
11928
  endX = 0;
11929
  startX = 0;
12047
  self.el.style.removeProperty( "--fg-carousel-perspective" );
12048
  }
12049
  },
12050
+ getSize: function( element, inner ){
12051
+ const rect = element.getBoundingClientRect();
12052
+ const size = { width: rect.width, height: rect.height };
12053
+ if ( inner ){
12054
+ const style = getComputedStyle( element );
12055
+ size.width -= parseFloat( style.paddingLeft ) + parseFloat( style.paddingRight ) + parseFloat( style.borderLeftWidth ) + parseFloat( style.borderRightWidth );
12056
+ size.height -= parseFloat( style.paddingTop ) + parseFloat( style.paddingBottom ) + parseFloat( style.borderTopWidth ) + parseFloat( style.borderBottomWidth );
12057
+ }
12058
+ return size;
12059
+ },
12060
  layout: function( width ){
12061
  const self = this;
12062
  if ( self.activeItem === null ){
12084
  if ( self.cache.has("layout") && self.cache.get("width") === width ){
12085
  return self.cache.get("layout");
12086
  }
12087
+ const itemWidth = self.getSize( self.elem.center ).width;
12088
+ const maxOffset = ( self.getSize( self.elem.inner, true ).width / 2 ) + ( itemWidth / 2 );
12089
  const layout = self.calculate( itemWidth, maxOffset );
12090
  self.cache.set( "width", width );
12091
  self.cache.set( "layout", layout );
12349
  );
12350
  (function ($, _, _utils, _obj, _is) {
12351
 
12352
+ /**
12353
+ * Contains any FooBox specific integration code.
12354
+ *
12355
+ * @namespace FooGallery.__foobox__
12356
+ * @private
12357
+ */
12358
+ _.__foobox__ = {
12359
+ /**
12360
+ * Check if the element is displayed within FooBox.
12361
+ *
12362
+ * @param {jQuery} $element
12363
+ * @return {boolean}
12364
+ */
12365
+ owns: function( $element ){
12366
+ return $element.parents(".fbx-item").length > 0;
12367
+ },
12368
+ /**
12369
+ * Check if the template can be handled by FooBox.
12370
+ *
12371
+ * @param {FooGallery.Template} template
12372
+ * @return {boolean}
12373
+ */
12374
+ handles: function( template ){
12375
+ return template.$el.hasClass("fbx-instance") && _is.object( window[ 'FOOBOX' ] ) && !!$.fn[ 'foobox' ];
12376
+ },
12377
+ /**
12378
+ * Updates the template's FooBox.
12379
+ *
12380
+ * @param {FooGallery.Template} template
12381
+ */
12382
+ update: function( template ){
12383
+ const opts = [{}];
12384
+ if ( _is.object( window[ 'FOOBOX' ][ 'o' ] ) ) {
12385
+ opts.push( window[ 'FOOBOX' ][ 'o' ] );
12386
+ }
12387
+ if ( template.opt.protected ) {
12388
+ opts.push( { images: { noRightClick: true } } );
12389
+ }
12390
+ if ( _is.fn( template.$el[ 'foobox' ] ) ) {
12391
+ template.$el[ 'foobox' ]( _obj.extend.apply( null, opts ) );
12392
+ }
12393
+ }
12394
+ };
12395
+
12396
+ /**
12397
+ * Handles the ready, after-page-change and after-filter-change events and conditional raises a post-load event
12398
+ * on the document body to notify other plugins that content has changed.
12399
+ * @param e
12400
+ * @param current
12401
+ * @param prev
12402
+ * @param isFilter
12403
+ */
12404
  _.triggerPostLoad = function (e, current, prev, isFilter) {
12405
+ const tmpl = e.target;
12406
  if (tmpl instanceof _.Template){
12407
+ if (tmpl.initialized && (e.type === "ready" || (e.type === "after-page-change" && !isFilter) || e.type === "after-filter-change")) {
12408
  try {
12409
+ if ( _.__foobox__.owns( tmpl.$el ) ) return;
12410
+
12411
+ if ( _.__foobox__.handles( tmpl ) ){
12412
+ _.__foobox__.update( tmpl );
 
12413
  } else {
12414
  $("body").trigger("post-load");
12415
  }
12420
  }
12421
  };
12422
 
12423
+ /**
12424
+ * The options applied to all galleries initialized using the auto mechanism.
12425
+ *
12426
+ * @memberof FooGallery.
12427
+ * @name autoDefaults
12428
+ * @type {object}
12429
+ */
12430
  _.autoDefaults = {
12431
  on: {
12432
+ "ready after-page-change after-filter-change": _.triggerPostLoad
12433
  }
12434
  };
12435
 
12436
+ /**
12437
+ * If set to FALSE then FooGallery will not automatically initialize itself on all valid elements
12438
+ * with an ID starting with 'foogallery-gallery-'.
12439
+ *
12440
+ * @memberof FooGallery.
12441
+ * @name autoEnabled
12442
+ * @type {boolean}
12443
+ * @default true
12444
+ */
12445
  _.autoEnabled = true;
12446
 
12447
+ /**
12448
+ * Allows you to merge options into the FooGallery.autoDefaults object.
12449
+ *
12450
+ * @memberof FooGallery.
12451
+ * @function auto
12452
+ * @param {object} options
12453
+ * @returns {object} The result of the merged options.
12454
+ */
12455
  _.auto = function (options) {
12456
+ return _.autoDefaults = _obj.merge(_.autoDefaults, options);
12457
  };
12458
 
12459
+ /**
12460
+ * Indicates if any globally supplied variables such as the FooGallery_il8n object have been merged.
12461
+ *
12462
+ * @memberof FooGallery.
12463
+ * @name globalsMerged
12464
+ * @type {boolean}
12465
+ * @default false
12466
+ * @readonly
12467
+ */
12468
  _.globalsMerged = false;
12469
 
12470
+ /**
12471
+ * Merges any globally supplied variables such as the FooGallery_il8n object into the various component configurations for the plugin.
12472
+ */
12473
  _.mergeGlobals = function(){
12474
+ // if this has already been done, don't do it again
12475
+ if ( _.globalsMerged === true ) return;
12476
+
12477
+ if ( _is.object( window[ 'FooGallery_il8n' ] ) ){
12478
+ _.merge_il8n( window[ 'FooGallery_il8n' ] );
 
 
 
 
 
 
12479
  _.globalsMerged = true;
12480
  }
12481
  };
12482
 
12483
+ /**
12484
+ * Merges an "il8n" configuration object into the various component configurations for the plugin.
12485
+ * @param configuration
12486
+ */
12487
+ _.merge_il8n = function( configuration ){
12488
+ if ( !_is.object( configuration ) ) return;
12489
+ Object.keys( configuration ).forEach( ( factoryName ) => {
12490
+ if ( _is.object( configuration[ factoryName ] ) && _[ factoryName ] instanceof _.Factory ) {
12491
+ const factory = /** @type FooGallery.Factory */ _[ factoryName ],
12492
+ componentConfiguration = configuration[ factoryName ];
12493
+
12494
+ Object.keys( componentConfiguration ).forEach( ( componentName ) => {
12495
+ if ( _is.object( componentConfiguration[ componentName ] ) ) {
12496
+ factory.configure( componentName, null, null, componentConfiguration[ componentName ] );
12497
+ }
12498
+ } );
12499
+ }
12500
+ } );
12501
+ };
12502
+
12503
  _.load = _.reload = function(){
12504
+ let jqReady = false, customReady = false;
12505
  // this automatically initializes all templates on page load
12506
  $(function () {
12507
  _.mergeGlobals();
12508
  if (_.autoEnabled){
12509
  $('[id^="foogallery-gallery-"]:not(.fg-ready)').foogallery(_.autoDefaults);
12510
  }
12511
+ jqReady = true;
12512
+ if ( jqReady && customReady ){
12513
+ document.dispatchEvent( new CustomEvent( 'foogallery-loaded', { detail: _ } ) );
12514
+ }
12515
  });
12516
 
12517
  _utils.ready(function () {
12519
  if (_.autoEnabled){
12520
  $('[id^="foogallery-gallery-"].fg-ready').foogallery(_.autoDefaults);
12521
  }
12522
+ customReady = true;
12523
+ if ( jqReady && customReady ){
12524
+ document.dispatchEvent( new CustomEvent( 'foogallery-loaded', { detail: _ } ) );
12525
+ }
12526
  });
12527
  };
12528
 
12529
+ document.dispatchEvent( new CustomEvent( 'foogallery-ready', { detail: _ } ) );
12530
+
12531
  _.load();
12532
 
12533
  })(
extensions/default-templates/shared/js/foogallery.min.js CHANGED
@@ -1,8 +1,8 @@
1
  /*
2
  * FooGallery - The Most Intuitive and Extensible Gallery Creation and Management Tool Ever Created for WordPress
3
- * @version 2.0.32
4
  * @link
5
  * @copyright Steven Usher & Brad Vincent 2015
6
  * @license Released under the GPLv3 license.
7
  */
8
- function _typeof(e){return(_typeof="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})(e)}!function(){"use strict";var h,t;function l(e){this.time=e.time,this.target=e.target,this.rootBounds=e.rootBounds,this.boundingClientRect=e.boundingClientRect,this.intersectionRect=e.intersectionRect||r(),this.isIntersecting=!!e.intersectionRect;var e=this.boundingClientRect,e=e.width*e.height,t=this.intersectionRect,t=t.width*t.height;this.intersectionRatio=e?Number((t/e).toFixed(4)):this.isIntersecting?1:0}function e(e,t){var n,i,r,t=t||{};if("function"!=typeof e)throw new Error("callback must be a function");if(t.root&&1!=t.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),i=this.THROTTLE_TIMEOUT,r=null,function(){r=r||setTimeout(function(){n(),r=null},i)}),this._callback=e,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(t.rootMargin),this.thresholds=this._initThresholds(t.threshold),this.root=t.root||null,this.rootMargin=this._rootMarginValues.map(function(e){return e.value+e.unit}).join(" ")}function n(e,t,n,i){"function"==typeof e.addEventListener?e.addEventListener(t,n,i||!1):"function"==typeof e.attachEvent&&e.attachEvent("on"+t,n)}function i(e,t,n,i){"function"==typeof e.removeEventListener?e.removeEventListener(t,n,i||!1):"function"==typeof e.detatchEvent&&e.detatchEvent("on"+t,n)}function p(e){var t;try{t=e.getBoundingClientRect()}catch(e){}return t?t.width&&t.height?t:{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}:r()}function r(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function o(e,t){for(var n=t;n;){if(n==e)return!0;n=d(n)}return!1}function d(e){e=e.parentNode;return e&&11==e.nodeType&&e.host?e.host:e&&e.assignedSlot?e.assignedSlot.parentNode:e}"object"==typeof window&&("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype?"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return 0<this.intersectionRatio}}):(h=window.document,t=[],e.prototype.THROTTLE_TIMEOUT=100,e.prototype.POLL_INTERVAL=null,e.prototype.USE_MUTATION_OBSERVER=!0,e.prototype.observe=function(t){if(!this._observationTargets.some(function(e){return e.element==t})){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(),this._checkForIntersections()}},e.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter(function(e){return e.element!=t}),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},e.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},e.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},e.prototype._initThresholds=function(e){e=e||[0];return(e=!Array.isArray(e)?[e]:e).sort().filter(function(e,t,n){if("number"!=typeof e||isNaN(e)||e<0||1<e)throw new Error("threshold must be a number between 0 and 1 inclusively");return e!==n[t-1]})},e.prototype._parseRootMargin=function(e){e=(e||"0px").split(/\s+/).map(function(e){e=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}});return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},e.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(n(window,"resize",this._checkForIntersections,!0),n(h,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in window&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(h,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},e.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,i(window,"resize",this._checkForIntersections,!0),i(h,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},e.prototype._checkForIntersections=function(){var s=this._rootIsInDom(),a=s?this._getRootRect():r();this._observationTargets.forEach(function(e){var t=e.element,n=p(t),i=this._rootContainsTarget(t),r=e.entry,o=s&&i&&this._computeTargetAndRootIntersection(t,a),e=e.entry=new l({time:window.performance&&performance.now&&performance.now(),target:t,boundingClientRect:n,rootBounds:a,intersectionRect:o});r?s&&i?this._hasCrossedThreshold(r,e)&&this._queuedEntries.push(e):r&&r.isIntersecting&&this._queuedEntries.push(e):this._queuedEntries.push(e)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},e.prototype._computeTargetAndRootIntersection=function(e,u){if("none"!=window.getComputedStyle(e).display){for(var t,n,i,r,o=p(e),s=d(e),a=!1;!a;){var l=null,c=1==s.nodeType?window.getComputedStyle(s):{};if("none"==c.display)return;if(s==this.root||s==h?(a=!0,l=u):s!=h.body&&s!=h.documentElement&&"visible"!=c.overflow&&(l=p(s)),l&&(c=l,l=o,r=i=n=t=void 0,t=Math.max(c.top,l.top),n=Math.min(c.bottom,l.bottom),i=Math.max(c.left,l.left),c=Math.min(c.right,l.right),r=n-t,!(o=0<=(l=c-i)&&0<=r&&{top:t,bottom:n,left:i,right:c,width:l,height:r})))break;s=d(s)}return o}},e.prototype._getRootRect=function(){var e,t;return t=this.root?p(this.root):(t=h.documentElement,e=h.body,{top:0,left:0,right:t.clientWidth||e.clientWidth,width:t.clientWidth||e.clientWidth,bottom:t.clientHeight||e.clientHeight,height:t.clientHeight||e.clientHeight}),this._expandRectByRootMargin(t)},e.prototype._expandRectByRootMargin=function(n){var e=this._rootMarginValues.map(function(e,t){return"px"==e.unit?e.value:e.value*(t%2?n.width:n.height)/100}),e={top:n.top-e[0],right:n.right+e[1],bottom:n.bottom+e[2],left:n.left-e[3]};return e.width=e.right-e.left,e.height=e.bottom-e.top,e},e.prototype._hasCrossedThreshold=function(e,t){var n=e&&e.isIntersecting?e.intersectionRatio||0:-1,i=t.isIntersecting?t.intersectionRatio||0:-1;if(n!==i)for(var r=0;r<this.thresholds.length;r++){var o=this.thresholds[r];if(o==n||o==i||o<n!=o<i)return!0}},e.prototype._rootIsInDom=function(){return!this.root||o(h,this.root)},e.prototype._rootContainsTarget=function(e){return o(this.root||h,e)},e.prototype._registerInstance=function(){t.indexOf(this)<0&&t.push(this)},e.prototype._unregisterInstance=function(){var e=t.indexOf(this);-1!=e&&t.splice(e,1)},window.IntersectionObserver=e,window.IntersectionObserverEntry=l))}(),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.ResizeObserver=t()}(this,function(){"use strict";var a="undefined"!=typeof Map?Map:(Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){e=i(this.__entries__,e),e=this.__entries__[e];return e&&e[1]},e.prototype.set=function(e,t){var n=i(this.__entries__,e);~n?this.__entries__[n][1]=t:this.__entries__.push([e,t])},e.prototype.delete=function(e){var t=this.__entries__,e=i(t,e);~e&&t.splice(e,1)},e.prototype.has=function(e){return!!~i(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,i=this.__entries__;n<i.length;n++){var r=i[n];e.call(t,r[1],r[0])}},e);function i(e,n){var i=-1;return e.some(function(e,t){return e[0]===n&&(i=t,!0)}),i}function e(){this.__entries__=[]}var n="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,t="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),l="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(t):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},p=2;var d=["top","right","bottom","left","width","height","size","weight"],f="undefined"!=typeof MutationObserver,g=(r.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},r.prototype.removeObserver=function(e){var t=this.observers_,e=t.indexOf(e);~e&&t.splice(e,1),!t.length&&this.connected_&&this.disconnect_()},r.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},r.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),0<e.length},r.prototype.connect_=function(){n&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),f?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},r.prototype.disconnect_=function(){n&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},r.prototype.onTransitionEnd_=function(e){var e=e.propertyName,t=void 0===e?"":e;d.some(function(e){return!!~t.indexOf(e)})&&this.refresh()},r.getInstance=function(){return this.instance_||(this.instance_=new r),this.instance_},r.instance_=null,r);function r(){function e(){o&&(o=!1,i()),s&&n()}function t(){l(e)}function n(){var e=Date.now();if(o){if(e-a<p)return;s=!0}else s=!(o=!0),setTimeout(t,r);a=e}var i,r,o,s,a;this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=(i=this.refresh.bind(this),s=o=!(r=20),a=0,n)}var m=function(e,t){for(var n=0,i=Object.keys(t);n<i.length;n++){var r=i[n];Object.defineProperty(e,r,{value:t[r],enumerable:!1,writable:!1,configurable:!0})}return e},c=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||t},v=h(0,0,0,0);function u(e){return parseFloat(e)||0}function y(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return e.reduce(function(e,t){return e+u(n["border-"+t+"-width"])},0)}function b(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return v;var i=c(e).getComputedStyle(e),r=function(e){for(var t={},n=0,i=["top","right","bottom","left"];n<i.length;n++){var r=i[n],o=e["padding-"+r];t[r]=u(o)}return t}(i),o=r.left+r.right,s=r.top+r.bottom,a=u(i.width),l=u(i.height);return"border-box"===i.boxSizing&&(Math.round(a+o)!==t&&(a-=y(i,"left","right")+o),Math.round(l+s)!==n&&(l-=y(i,"top","bottom")+s)),e!==c(e).document.documentElement&&(i=Math.round(a+o)-t,e=Math.round(l+s)-n,1!==Math.abs(i)&&(a-=i),1!==Math.abs(e)&&(l-=e)),h(r.left,r.top,a,l)}var _="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof c(e).SVGGraphicsElement}:function(e){return e instanceof c(e).SVGElement&&"function"==typeof e.getBBox};function w(e){return n?_(e)?h(0,0,(t=(t=e).getBBox()).width,t.height):b(e):v;var t}function h(e,t,n,i){return{x:e,y:t,width:n,height:i}}o.prototype.isActive=function(){var e=w(this.target);return(this.contentRect_=e).width!==this.broadcastWidth||e.height!==this.broadcastHeight},o.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e};var x=o;function o(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=h(0,0,0,0),this.target=e}var C=function(e,t){n=(t=t).x,i=t.y,o=t.width,t=t.height,r="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,r=Object.create(r.prototype),m(r,{x:n,y:i,width:o,height:t,top:i,right:n+o,bottom:t+i,left:n});var n,i,r,o=r;m(this,{target:e,contentRect:o})},E=(s.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new x(e)),this.controller_.addObserver(this),this.controller_.refresh())}},s.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},s.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},s.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},s.prototype.broadcastActive=function(){var e,t;this.hasActive()&&(e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new C(e.target,e.broadcastRect())}),this.callback_.call(e,t,e),this.clearActive())},s.prototype.clearActive=function(){this.activeObservations_.splice(0)},s.prototype.hasActive=function(){return 0<this.activeObservations_.length},s);function s(e,t,n){if(this.activeObservations_=[],this.observations_=new a,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}var $=new("undefined"!=typeof WeakMap?WeakMap:a),F=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=g.getInstance(),t=new E(t,n,this);$.set(this,t)};return["observe","unobserve","disconnect"].forEach(function(t){F.prototype[t]=function(){var e;return(e=$.get(this))[t].apply(e,arguments)}}),void 0!==t.ResizeObserver?t.ResizeObserver:F}),function(e){(window.FooGallery=window.FooGallery||{}).$=e}(jQuery),function(e){e?function(){try{return window.FooGallery.utils}catch(e){return}}()||(window.FooGallery.utils={$:e,version:"1.0.0"}):console.warn("jQuery must be included in the page prior to the FooGallery.utils library.")}(jQuery),function(t,n){"1.0.0"===n.version&&(n.is={},n.is.array=function(e){return"[object Array]"===Object.prototype.toString.call(e)},n.is.boolean=function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},n.is.element=function(e){return"object"===("undefined"==typeof HTMLElement?"undefined":_typeof(HTMLElement))?e instanceof HTMLElement:!!e&&"object"===_typeof(e)&&1===e.nodeType&&"string"==typeof e.nodeName},n.is.empty=function(e){if(n.is.undef(e)||null===e)return!0;if(n.is.number(e)&&0===e)return!0;if(n.is.boolean(e)&&!1===e)return!0;if(n.is.string(e)&&0===e.length)return!0;if(n.is.array(e)&&0===e.length)return!0;if(n.is.jq(e)&&0===e.length)return!0;if(n.is.hash(e)){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}return!1},n.is.error=function(e){return"[object Error]"===Object.prototype.toString.call(e)},n.is.fn=function(e){return e===window.alert||"[object Function]"===Object.prototype.toString.call(e)},n.is.hash=function(e){return n.is.object(e)&&e.constructor===Object&&!e.nodeType&&!e.setInterval},n.is.jq=function(e){return!n.is.undef(t)&&e instanceof t},n.is.number=function(e){return"[object Number]"===Object.prototype.toString.call(e)&&!isNaN(e)},n.is.object=function(e){return"[object Object]"===Object.prototype.toString.call(e)&&!n.is.undef(e)&&null!==e},n.is.promise=function(e){return n.is.object(e)&&n.is.fn(e.then)&&n.is.fn(e.promise)},n.is.size=function(e){return!!(n.is.string(e)&&!n.is.empty(e)||n.is.number(e))&&/^(auto|none|(?:[\d.]*)+?(?:%|px|mm|q|cm|in|pt|pc|em|ex|ch|rem|vh|vw|vmin|vmax)?)$/.test(e)},n.is.string=function(e){return"[object String]"===Object.prototype.toString.call(e)},n.is.undef=function(e){return void 0===e})}(FooGallery.utils.$,FooGallery.utils),function(l,c,u){var a;"1.0.0"===c.version&&(c.fn={},a=Function.prototype.toString,c.fn.CONTAINS_SUPER=/xyz/.test(a.call(function(){xyz}))?/\b_super\b/:/.*/,c.fn.noop=function(){},c.fn.addOrOverride=function(e,t,n){var i,r,o,s;u.object(e)&&u.string(t)&&!u.empty(t)&&u.fn(n)&&(i=e[t],r=u.fn(i)&&c.fn.CONTAINS_SUPER.test(a.call(n)),e[t]=r?(o=i,s=n,function(){var e=this._super,t=(this._super=o,s.apply(this,arguments));return this._super=e,t}):n)},c.fn.expose=function(t,n,e,i){u.object(t)&&u.object(n)&&u.array(e)&&(i=u.undef(i)?t:i,e.forEach(function(e){u.string(e)&&u.fn(t[e])&&(n[e]=t[e].bind(i))}))},c.fn.apply=function(e,t){return t.unshift(e),new(Function.prototype.bind.apply(e,t))},c.fn.arg2arr=function(e){return Array.prototype.slice.call(e)},c.fn.debounce=function(n,i){var r;return function(){var e=this,t=c.fn.arg2arr(arguments);clearTimeout(r),r=setTimeout(function(){n.apply(e,t)},i)}},c.fn.throttle=function(n,i){var r,o;return function(){var e=this,t=c.fn.arg2arr(arguments);r?(clearTimeout(o),o=setTimeout(function(){Date.now()-r>=i&&(n.apply(e,t),r=Date.now())},i-(Date.now()-r))):(n.apply(e,t),r=Date.now())}},c.fn.resolved=l.Deferred().resolve().promise(),c.fn.rejected=l.Deferred().reject().promise(),c.fn.reject=function(e,t){var n=l.Deferred(),i=c.fn.arg2arr(arguments);return n.reject.apply(n,i).promise()},c.fn.resolve=function(e,t){var n=l.Deferred(),i=c.fn.arg2arr(arguments);return n.resolve.apply(n,i).promise()},c.fn.rejectWith=function(e,t,n){var i=l.Deferred(),r=c.fn.arg2arr(arguments);return r.shift(),i.rejectWith(e,r).promise()},c.fn.resolveWith=function(e,t,n){var i=l.Deferred(),r=c.fn.arg2arr(arguments);return r.shift(),i.resolveWith(e,r).promise()},c.fn.all=function(t){var n=l.Deferred(),i=[];if(u.array(t)&&0<t.length){function r(e,t){s||(i[e]=0===t.length?void 0:1===t.length?t[0]:t,--o||n.resolve(i))}for(var o=t.length,s=!1,a=0,e=t.length;a<e&&"break"!==function(){if(s)return"break";var e=a;u.promise(t[e])?t[e].then(function(){r(e,c.fn.arg2arr(arguments))},function(){s||(s=!0,n.reject.apply(n,c.fn.arg2arr(arguments)))}):r(e,[t[e]])}();a++);}else n.resolve(i);return n.promise()},c.fn.allSettled=function(t){var i=l.Deferred(),r=[];if(u.array(t)&&0<t.length){function n(e,t,n){r[e]={status:t},0<n.length&&(r[e]["rejected"===t?"reason":"value"]=1===n.length?n[0]:n),--o||i.resolve(r)}for(var o=t.length,s=0,e=t.length;s<e;s++)!function(){var e=s;u.promise(t[e])?t[e].then(function(){n(e,"fulfilled",c.fn.arg2arr(arguments))},function(){n(e,"rejected",c.fn.arg2arr(arguments))}):n(e,"fulfilled",[t[e]])}()}else i.resolve(r);return i.promise()})}(FooGallery.utils.$,FooGallery.utils,FooGallery.utils.is),function(e,o){var r;"1.0.0"===e.version&&(e.url={},r=document.createElement("a"),e.url.parts=function(e){r.href=e;var e=r.port||(-1!==["http:","https:"].indexOf(r.protocol)?"https:"===r.protocol?"443":"80":""),t=r.hostname+(e?":"+e:""),n=r.origin||r.protocol+"//"+t,i="/"===r.pathname.slice(0,1)?r.pathname:"/"+r.pathname;return{hash:r.hash,host:t,hostname:r.hostname,href:r.href,origin:n,pathname:i,port:e,protocol:r.protocol,search:r.search}},e.url.full=function(e){return!o.string(e)||o.empty(e)?null:(r.href=e,r.href)},e.url.param=function(e,t,n){return o.string(e)&&o.string(t)&&!o.empty(t)?o.undef(n)?(r=((i=new RegExp("[?|&]"+t+"=([^&;]+?)(&|#|;|$)")).exec(e)||["",""])[1].replace(/\+/g,"%20"),o.string(r)&&!o.empty(r)?decodeURIComponent(r):null):(o.empty(n)?(i=new RegExp("^([^#]*?)(([^#]*)&)?"+t+"(=[^&#]*)?(&|#|$)"),r=e.replace(i,"$1$3$5").replace(/^([^#]*)((\?)&|\?(#|$))/,"$1$3$4")):(i=new RegExp("([?&])"+t+"[^&]*"),t=t+"="+encodeURIComponent(n),(r=e.replace(i,"$1"+t))!==e||i.test(r)||(r+=(-1!==r.indexOf("?")?"&":"?")+t)),r):e;var i,r})}(FooGallery.utils,FooGallery.utils.is),function(a,l,c){"1.0.0"===a.version&&(a.str={},a.str.trim=function(e){return l.string(e)?e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""):null},a.str.camel=function(e){return l.string(e)?e.toUpperCase()===e?e.toLowerCase():e.replace(/^([A-Z])|[-\s_]+(\w)/g,function(e,t,n){return l.string(n)?n.toUpperCase():t.toLowerCase()}):e},a.str.kebab=function(e){return l.string(e)?e.match(/[A-Z]{2,}(?=[A-Z][a-z0-9]*|\b)|[A-Z]?[a-z0-9]*|[A-Z]|[0-9]+/g).filter(Boolean).map(function(e){return e.toLowerCase()}).join("-"):e},a.str.contains=function(e,t,n){return!(!l.string(e)||l.empty(e)||!l.string(t)||l.empty(t))&&(t.length<=e.length&&-1!==(n?e.toUpperCase().indexOf(t.toUpperCase()):e.indexOf(t)))},a.str.containsWord=function(e,t,n){if(!l.string(e)||l.empty(e)||!l.string(t)||l.empty(t)||e.length<t.length)return!1;for(var i=e.split(/\W/),r=0,o=i.length;r<o;r++)if(n?i[r].toUpperCase()===t.toUpperCase():i[r]===t)return!0;return!1},a.str.endsWith=function(e,t){return!(!l.string(e)||!l.string(t)||t.length>e.length)&&e.slice(e.length-t.length)===t},a.str.startsWith=function(e,t){return!l.empty(e)&&!l.empty(t)&&e.slice(0,t.length)===t},a.str.escapeRegExp=function(e){return l.string(e)?e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"):e},a.str.fnv1a=function(e){if(!l.string(e)||l.empty(e))return null;for(var t=2166136261,n=0,i=e.length;n<i;n++)t=(t^=e.charCodeAt(n))+((t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24));return t>>>0},a.str.from=function(e,t){return a.str.contains(e,t)?e.substring(e.indexOf(t)+t.length):null},a.str.join=function(e,t,n){if(!l.string(e)||!l.string(t))return null;var i=c.arg2arr(arguments);e=i.shift();for(var r=i.shift(),o=0,s=i.length;o<s;o++)t=i[o],l.empty(t)||(a.str.endsWith(r,e)&&(r=r.slice(0,r.length-e.length)),r+=e+(t=a.str.startsWith(t,e)?t.slice(e.length):t));return r},a.str.until=function(e,t){return a.str.contains(e,t)?e.substring(0,e.indexOf(t)):e},a.str.format=function(n,e,t){var i=c.arg2arr(arguments);return n=i.shift(),l.string(n)&&0<i.length&&(1===i.length&&(l.array(i[0])||l.object(i[0]))&&(i=i[0]),a.each(i,function(e,t){n=n.replace(new RegExp("\\{"+t+"\\}","gi"),e+"")})),n})}(FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn),function(a,l,r,o){"1.0.0"===a.version&&(a.obj={},a.obj.create=function(e){if(!l.object(e))throw TypeError("Argument must be an object");function t(){}return t.prototype=e,new t},a.obj.extend=function(t,e,n){t=l.object(t)?t:{};var i=r.arg2arr(arguments);return i.shift(),a.each(i,function(e){a.obj.merge(t,e)}),t},a.obj.merge=function(e,t){for(var n in e=l.hash(e)?e:{},t=l.hash(t)?t:{})t.hasOwnProperty(n)&&(l.hash(t[n])?(e[n]=l.hash(e[n])?e[n]:{},a.obj.merge(e[n],t[n])):l.array(t[n])?e[n]=t[n].slice():e[n]=t[n]);return e},a.obj.mergeValid=function(t,n,i,e){if(!l.hash(i)||!l.hash(n))return t;var r,o,s;for(r in n=l.hash(n)?n:{},e=l.hash(e)?e:{},n)n.hasOwnProperty(r)&&l.fn(n[r])&&(o=l.array(e[r])?e[r]:l.string(e[r])?[e[r]]:[r],a.each(o,function(e){if(s=a.obj.prop(i,e),!l.undef(s))return n[r](s)?(a.obj.prop(t,r,s),!1):void 0}));return t},a.obj.prop=function(n,e,i){var t,r;if(l.object(n)&&!l.empty(e))return l.undef(i)?(o.contains(e,".")?(t=e.split("."),r=t.length-1,a.each(t,function(e,t){if(t===r)i=n[e];else{if(!l.hash(n[e]))return!1;n=n[e]}})):l.undef(n[e])||(i=n[e]),i):void(o.contains(e,".")?(t=e.split("."),r=t.length-1,a.each(t,function(e,t){t===r?n[e]=i:n=l.hash(n[e])?n[e]:n[e]={}})):l.undef(n[e])||(n[e]=i))})}((FooGallery.utils.$,FooGallery.utils),FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.str),function(t,r,s){"1.0.0"===r.version&&(r.ready=function(e){function t(){try{e.call(window,r.$)}catch(e){console.error(e)}}(Function("/*@cc_on return true@*/")()?"complete"===document.readyState:"loading"!==document.readyState)?t():document.addEventListener("DOMContentLoaded",t,!1)},r.find=function(e,t,n){if(s.fn(t))if(n=s.undef(n)?t:n,s.array(e)){for(r=0,o=e.length;r<o;r++)if(t.call(n,e[r],r,e))return e[r]}else if(s.object(e))for(var i=Object.keys(e),r=0,o=i.length;r<o;r++)if(t.call(n,e[i[r]],i[r],e))return e[i[r]]},r.each=function(e,t,n){if(s.fn(t))if(n=s.undef(n)?t:n,s.array(e))for(r=0,o=e.length;r<o&&!1!==t.call(n,e[r],r,e);r++);else if(s.object(e))for(var i=Object.keys(e),r=0,o=i.length;r<o&&!1!==t.call(n,e[i[r]],i[r],e);r++);},r.inArray=function(e,t){return s.array(t)?t.indexOf(e):-1},r.selectify=function(e){if(s.empty(e))return null;if(s.hash(e)){var t,n,i={};for(n in e)e.hasOwnProperty(n)&&(t=r.selectify(e[n]))&&(i[n]=t);return i}return s.string(e)||s.array(e)?(e=s.string(e)?[e]:e).map(function(e){return s.string(e)?"."+e.split(/\s/g).join("."):null}).join(","):null},r.requestFrame=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(e){return setTimeout(e,1e3/60)}).bind(window),r.cancelFrame=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||function(e){clearTimeout(e)}).bind(window),r.nextFrame=function(e,n){return t.Deferred(function(t){s.fn(e)?(n=s.undef(n)?e:n,r.requestFrame(function(){try{t.resolve(e.call(n))}catch(e){t.reject(e)}})):t.reject(new Error("Provided callback is not a function."))}).promise()})}(FooGallery.utils.$,FooGallery.utils,FooGallery.utils.is),function(r,o,s,a){"1.0.0"===r.version&&(r.Class=function(){},r.Class.extend=function(e){e=o.hash(e)?e:{};var t,n=s.create(this.prototype);for(t in e)e.hasOwnProperty(t)&&a.addOrOverride(n,t,e[t]);function i(){if(!o.fn(this.construct))throw new SyntaxError('FooGallery.utils.Class objects must be constructed with the "new" keyword.');this.construct.apply(this,arguments)}return n.construct=o.fn(n.construct)?n.construct:function(){},(i.prototype=n).constructor=o.fn(n.__ctor__)?n.__ctor__:i,i.extend=r.Class.extend,i.override=r.Class.override,i.getBaseClasses=r.Class.getBaseClasses,i.__baseClass__=this,i},r.Class.override=function(e,t){a.addOrOverride(this.prototype,e,t)},r.Class.__baseClass__=null,r.Class.getBaseClasses=function(){return function e(t,n){return o.array(n)||(n=[]),o.fn(t)&&null!==t.__baseClass__?(n.unshift(t.__baseClass__),e(t.__baseClass__,n)):n}(this,[])})}((FooGallery.utils.$,FooGallery.utils),FooGallery.utils.is,FooGallery.utils.obj,FooGallery.utils.fn),function(e,a,l,r){e.ClassRegistry=e.Class.extend({construct:function(e){this.opt=r.extend({allowBase:!0,beforeCreate:null},e),this.registered={}},register:function(e,t,n,i){var r;return!(!a.string(e)||a.empty(e)||!a.fn(t))&&(i=a.number(i)?i:0,r=this.registered[e],this.registered[e]={name:e,ctor:t,config:a.hash(n)?n:{},priority:a.undef(r)?i:r.priority},!0)},each:function(e,t,n){t=!!a.boolean(t)&&t,n=a.undef(n)?e:n;for(var i=this,r=Object.keys(i.registered).map(function(e){return i.registered[e]}),o=(t&&r.sort(function(e,t){return t.priority-e.priority}),0),s=r.length;o<s&&!1!==e.call(n,r[o],o);o++);},find:function(e,t,n){t=!!a.boolean(t)&&t,n=a.undef(n)?e:n;for(var i=this,r=Object.keys(i.registered).map(function(e){return i.registered[e]}),o=(t&&r.sort(function(e,t){return t.priority-e.priority}),0),s=r.length;o<s;o++)if(e.call(n,r[o],o))return r[o];return null},create:function(e,t,n){var i=this,r=l.arg2arr(arguments);if(e=r.shift(),a.string(e)&&i.registered.hasOwnProperty(e)){var o=i.registered[e],s=!0;if((s=o.priority<0&&!i.opt.allowBase?!1:s)&&a.fn(o.ctor))return t=r.shift(),t=i.mergeConfigurations(o.name,t),r.unshift.apply(r,[o.name,t]),l.apply(o.ctor,i.onBeforeCreate(o,r))}return null},onBeforeCreate:function(e,t){return null!==this.opt.beforeCreate&&a.fn(this.opt.beforeCreate)?this.opt.beforeCreate.call(this,e,t):t},mergeConfigurations:function(e,t){var n,i;return a.string(e)&&this.registered.hasOwnProperty(e)?(t=a.hash(t)?t:{},n=this.getBaseClasses(e),i=[{}],n.push(this.registered[e]),n.forEach(function(e){i.push(e.config)}),i.push(t),r.extend.apply(r,i)):{}},getBaseClass:function(){return this.find(function(e){return e.priority<0},!0)},getBaseClasses:function(e){var t=this,e=t.registered[e],n=[];return a.undef(e)||e.ctor.getBaseClasses().forEach(function(e){e=t.fromType(e);a.hash(e)&&n.push(e)}),n},fromType:function(t){if(a.fn(t))return this.find(function(e){return e.ctor===t})}})}((FooGallery.utils.$,FooGallery.utils),FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.obj),function(o,s,n){"1.0.0"===o.version&&(o.Event=o.Class.extend({construct:function(e){if(s.empty(e))throw new SyntaxError("FooGallery.utils.Event objects must be supplied a `type`.");e=o.Event.parse(e);this.type=e.type,this.namespace=e.namespace,this.defaultPrevented=!1,this.target=null},preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented}}),o.Event.parse=function(e){e=s.string(e)&&!s.empty(e)?e:null;var t=n.contains(e,".");return{namespaced:t,type:t?n.startsWith(e,".")?null:n.until(e,"."):e,namespace:t?n.from(e,"."):null}},o.EventClass=o.Class.extend({construct:function(){this.events={}},destroy:function(){this.events={}},on:function(n,t,i){var r=this;return s.object(n)?(i=t,Object.keys(n).forEach(function(t){s.fn(n[t])&&t.split(" ").forEach(function(e){r.addListener(e,n[t],i)})})):s.string(n)&&s.fn(t)&&n.split(" ").forEach(function(e){r.addListener(e,t,i)}),r},addListener:function(e,t,n){if(!s.string(e)||/\s/.test(e)||!s.fn(t))return!1;var i=this,r=o.Event.parse(e);return n=s.undef(n)?i:n,s.array(i.events[r.type])||(i.events[r.type]=[]),!i.events[r.type].some(function(e){return e.namespace===r.namespace&&e.fn===t&&e.thisArg===n})&&(i.events[r.type].push({namespace:r.namespace,fn:t,thisArg:n}),!0)},off:function(n,t,i){var r=this;return s.object(n)?(i=t,Object.keys(n).forEach(function(t){t.split(" ").forEach(function(e){r.removeListener(e,n[t],i)})})):s.string(n)&&n.split(" ").forEach(function(e){r.removeListener(e,t,i)}),r},removeListener:function(e,t,n){if(!s.string(e)||/\s/.test(e))return!1;var i=this,r=o.Event.parse(e),e=[];return n=s.undef(n)?i:n,s.empty(r.type)?s.empty(r.namespace)||e.push.apply(e,Object.keys(i.events)):e.push(r.type),e.forEach(function(e){s.array(i.events[e])&&(i.events[e]=i.events[e].filter(function(e){return null!=t?!(e.namespace===r.namespace&&e.fn===t&&e.thisArg===n):null!=r.namespace&&e.namespace!==r.namespace}),0===i.events[e].length&&delete i.events[e])}),!0},trigger:function(e,t){t=s.array(t)?t:[];var n=this,i=[];return e instanceof o.Event?(i.push(e),n.emit(e,t)):s.string(e)&&e.split(" ").forEach(function(e){e=new o.Event(e);i.push(e),n.emit(e,t)}),s.empty(i)?null:1===i.length?i[0]:i},emit:function(t,n){var e;t instanceof FooGallery.utils.Event&&(e=this,n=s.array(n)?n:[],null===t.target&&(t.target=e),s.array(e.events[t.type])&&e.events[t.type].forEach(function(e){null!=t.namespace&&e.namespace!==t.namespace||e.fn.apply(e.thisArg,[t].concat(n))}),s.array(e.events.__all__)&&e.events.__all__.forEach(function(e){e.fn.apply(e.thisArg,[t].concat(n))}))}}))}(FooGallery.utils,FooGallery.utils.is,FooGallery.utils.str),function(e,i,t){"1.0.0"===e.version&&(e.Timer=e.EventClass.extend({construct:function(e){var t=this;t._super(),t.interval=i.number(e)?e:1e3,t.isRunning=!1,t.isPaused=!1,t.canResume=!1,t.canRestart=!1,t.__timeout=null,t.__decrement=!1,t.__time=0,t.__remaining=0,t.__current=0,t.__finish=0,t.__restart=[]},__reset:function(){var e=this;clearTimeout(e.__timeout),e.__timeout=null,e.__decrement=!1,e.__time=0,e.__remaining=0,e.__current=0,e.__finish=0,e.isRunning=!1,e.isPaused=!1,e.canResume=!1},__eventArgs:function(e){return[this.__current,this.__time,this.__decrement].concat(t.arg2arr(arguments))},__tick:function(){var e=this;e.trigger("tick",e.__eventArgs()),e.__current===e.__finish?(e.trigger("complete",e.__eventArgs()),e.__reset()):(e.__decrement?e.__current--:e.__current++,e.__remaining--,e.canResume=0<e.__remaining,e.__timeout=setTimeout(function(){e.__tick()},e.interval))},start:function(e,t){var n=this;n.isRunning||(t=!!i.boolean(t)&&t,n.__restart=[e,t],n.__decrement=t,n.__time=e,n.__remaining=e,n.__current=t?e:0,n.__finish=t?0:e,n.canRestart=!0,n.isRunning=!0,n.isPaused=!1,n.trigger("start",n.__eventArgs()),n.__tick())},countdown:function(e){this.start(e,!0)},countup:function(e){this.start(e,!1)},restart:function(){var e=this;e.stop(),e.canRestart&&e.start.apply(e,e.__restart)},stop:function(){var e=this;(e.isRunning||e.isPaused)&&(e.__reset(),e.trigger("stop",e.__eventArgs()))},pause:function(){var e=this;return null!=e.__timeout&&(clearTimeout(e.__timeout),e.__timeout=null),e.isRunning&&(e.isRunning=!1,e.isPaused=!0,e.canResume=0<e.__remaining,e.trigger("pause",e.__eventArgs())),e.__remaining},resume:function(){var e=this;e.canResume&&(e.isRunning=!0,e.isPaused=!1,e.trigger("resume",e.__eventArgs()),e.__tick())},reset:function(){this.__reset(),this.trigger("reset",this.__eventArgs())}}))}((FooGallery.utils.$,FooGallery.utils),FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.obj),function(o,e,t){"1.0.0"===e.version&&(e.FullscreenAPI=e.EventClass.extend({construct:function(){this._super(),this.apis={w3:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}},this.api=this.getAPI(),this.supported=null!=this.api,this.__listen()},destroy:function(){return this.__stopListening(),this._super()},getAPI:function(){for(var e in this.apis)if(this.apis.hasOwnProperty(e)&&this.apis[e].enabled in document)return this.apis[e];return null},element:function(){return this.supported?document[this.api.element]:null},request:function(e){return this.supported&&e[this.api.request]?e[this.api.request]()||o.Deferred(this.__resolver(this.api.request)).promise():t.rejected},exit:function(){return this.supported&&this.element()?document[this.api.exit]()||o.Deferred(this.__resolver(this.api.exit)).promise():t.rejected},toggle:function(e){return this.element()?this.exit():this.request(e)},__listen:function(){var e=this;e.supported&&o(document).on(e.api.events.change+".utils",function(){e.trigger("change")}).on(e.api.events.error+".utils",function(){e.trigger("error")})},__stopListening:function(){this.supported&&o(document).off(this.api.events.change+".utils").off(this.api.events.error+".utils")},__resolver:function(i){var r=this;return function(e){function t(){e.resolve(),o(document).off(r.api.events.change,t).off(r.api.events.error,n)}function n(){e.reject(new TypeError),o(document).off(r.api.events.change,t).off(r.api.events.error,n)}i===r.api.exit&&r.element()?setTimeout(function(){e.reject(new TypeError)},1):o(document).on(r.api.events.change,t).on(r.api.events.error,n)}}}))}(FooGallery.utils.$,FooGallery.utils,FooGallery.utils.fn),function(l,c,u,a){"1.0.0"===c.version&&(c.transition={},c.transition.dataName="__foo-transition__",c.transition.disableClassName=null,c.transition.timeout=3e3,c.transition.disable=function(e,t){var n,i,r,e=u.jq(e)?e:l(e);0<e.length&&u.fn(t)&&(n=e.get(0),r=null,(i=u.string(c.transition.disableClassName))?e.addClass(c.transition.disableClassName):(r={value:n.style.getPropertyValue("transition"),priority:n.style.getPropertyPriority("transition")},n.style.setProperty("transition","none","important")),t.call(t,e),e.prop("offsetWidth"),i?e.removeClass(c.transition.disableClassName):(n.style.removeProperty("transition"),u.string(r.value)&&0<r.value.length&&n.style.setProperty("transition",r.value,r.priority)))},c.transition.stop=function(e){var t=l.Deferred(),n=u.jq(e)?e:l(e);return 0<n.length?(e=n.data(c.transition.dataName),u.promise(e)?e.always(function(){c.requestFrame(function(){t.resolve(n)})}).reject(new Error("Transition cancelled.")):t.resolve(n)):t.reject(new Error("Unable to stop transition. Make sure the element exists.")),t.promise()},c.transition.createListener=function(e,t,n){var i=e,r=t,o=n,s=u.string(n);return function(e){var t=e.originalEvent instanceof TransitionEvent?e.originalEvent:e,n=!1;(n=t.target===i?!s||t.propertyName===o:n)&&r.apply(r,a.arg2arr(arguments))}},c.transition.start=function(e,n,i,r){var o,s=l.Deferred(),a=u.jq(e)?e:l(e);return 0<a.length&&u.fn(n)?(o=a.get(0),c.transition.stop(a).always(function(){var t=c.transition.createListener(o,function(){s.resolve(a)},i);a.data(c.transition.dataName,s).on("transitionend.foo-utils",t).prop("offsetWidth"),c.requestFrame(function(){var e=setTimeout(function(){s.reject(new Error("Transition safety timeout triggered."))},u.number(r)?r:c.transition.timeout);s.always(function(){clearTimeout(e),a.removeData(c.transition.dataName).off("transitionend.foo-utils",t)}),n.call(n,a)})})):s.reject(new Error("Unable to perform transition. Make sure the element exists and a trigger function is supplied.")),s.promise()},c.transition.modify=function(e,t,n,i){e=u.jq(e)?e:l(e);return 0<e.length&&u.fn(t)?n?(c.transition.disable(e,t),a.resolve()):c.transition.start(e,t,i):a.reject(new Error("Unable to perform modification. Make sure the element exists and a modify function is supplied."))})}(FooGallery.utils.$,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn),function(o,s,e,a,i,t){s.DATA_TEMPLATE="__FooGallery__",s.DATA_ITEM="__FooGalleryItem__",s.get=function(e){return o(e).data(s.DATA_TEMPLATE)},s.init=function(t,n){if(0<(n=a.jq(n)?n:o(n)).length){var e=n.data(s.DATA_TEMPLATE);if(e instanceof s.Template)return e.destroy(!0).then(function(){var e=s.template.make(t,n);return e instanceof s.Template?e.initialize():i.rejected})}e=s.template.make(t,n);return e instanceof s.Template?e.initialize():i.rejected},o.fn.foogallery=function(i,r){return r=a.fn(r)?r:o.noop,this.each(function(e,t){if(a.string(i)){var n=o.data(t,s.DATA_TEMPLATE);if(n instanceof s.Template)switch(i){case"layout":return void n.layout();case"destroy":return void n.destroy()}}else s.init(i,t).then(r)})},s.isCached=function(e){var t=new Image,e=(t.src=e,t.complete);return t.src="",t=null,e},s.supportedExifProperties=["camera","aperture","created_timestamp","shutter_speed","focal_length","iso","orientation"],a.exif=function(t){var e;return!!a.object(t)&&(0<(e=Object.keys(t)).length&&e.some(function(e){return-1!==s.supportedExifProperties.indexOf(e)&&!a.empty(t[e])}))},t.trimTo=function(e,t,n){return a.string(e)&&a.number(t)&&0<t&&e.length>t?e.substr(0,t)+(a.string(n)?n:"&hellip;"):e},e.getResizeObserverSize=function(e){var t,e=e.contentBoxSize?e.contentBoxSize[0]?(t=e.contentBoxSize[0].inlineSize,e.contentBoxSize[0].blockSize):(t=e.contentBoxSize.inlineSize,e.contentBoxSize.blockSize):(t=e.contentRect.width,e.contentRect.height);return{width:t,height:e}},s.supportsWebP=!1;var n=new Image;n.onload=function(){s.supportsWebP=0<n.width&&0<n.height},n.onerror=function(){s.supportsWebP=!1},n.src="data:image/webp;base64,UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",s.supportsPicture=!!window.HTMLPictureElement,e.DOMEventListeners=e.Class.extend({construct:function(){this.eventTargets=new Map},add:function(e,t,n,i){e.addEventListener(t,n,i);let r=this.eventTargets.get(e);return r||(r=new Map,this.eventTargets.set(e,r)),!r.get(t)&&(r.set(t,{listener:n,options:i}),!0)},remove:function(e,t){let n=this.eventTargets.get(e);var i;!n||(i=n.get(t))&&(e.removeEventListener(t,i.listener,i.options),n.delete(t),0===n.size&&this.eventTargets.delete(e))},clear:function(){this.eventTargets.forEach(function(e,n){e.forEach(function(e,t){n.removeEventListener(t,e.listener,e.options)})}),this.eventTargets.clear()}}),e.Timeouts=e.Class.extend({construct:function(){this.instances=new Map},has:function(e){return this.instances.has(e)},get:function(e){return this.instances.get(e)},set:function(e,t,n){const i=this;i.delete(e);n={id:setTimeout(function(){i.instances.delete(e),t.call(i)},n),delay:n,fn:t};return this.instances.set(e,n),i},delete:function(e){var t;return!!this.instances.has(e)&&(t=this.instances.get(e),clearTimeout(t.id),this.instances.delete(e))},clear:function(){this.instances.forEach(function(e){clearTimeout(e.id)}),this.instances.clear()}})}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.str),function(o,e,t,a,l){e.Icons=t.Class.extend({construct:function(){this.className="fg-icon",this.registered={default:{close:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M13.957 3.457l-1.414-1.414-4.543 4.543-4.543-4.543-1.414 1.414 4.543 4.543-4.543 4.543 1.414 1.414 4.543-4.543 4.543 4.543 1.414-1.414-4.543-4.543z"></path></svg>',"arrow-left":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M10.5 16l1.5-1.5-6.5-6.5 6.5-6.5-1.5-1.5-8 8 8 8z"></path></svg>',"arrow-right":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M5.5 0l-1.5 1.5 6.5 6.5-6.5 6.5 1.5 1.5 8-8-8-8z"></path></svg>',maximize:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M2 2v4h-2v-5c0-0.552 0.448-1 1-1h14c0.552 0 1 0.448 1 1v14c0 0.552-0.448 1-1 1h-14c-0.552 0-1-0.448-1-1v-9h9c0.552 0 1 0.448 1 1v7h4v-12h-12z"/></svg>',expand:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M2 5h-2v-4c0-0.552 0.448-1 1-1h4v2h-3v3z"></path><path d="M16 5h-2v-3h-3v-2h4c0.552 0 1 0.448 1 1v4z"></path><path d="M15 16h-4v-2h3v-3h2v4c0 0.552-0.448 1-1 1z"></path><path d="M5 16h-4c-0.552 0-1-0.448-1-1v-4h2v3h3v2z"></path></svg>',shrink:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M3 0h2v4c0 0.552-0.448 1-1 1h-4v-2h3v-3z"></path><path d="M11 0h2v3h3v2h-4c-0.552 0-1-0.448-1-1v-4z"></path><path d="M12 11h4v2h-3v3h-2v-4c0-0.552 0.448-1 1-1z"></path><path d="M0 11h4c0.552 0 1 0.448 1 1v4h-2v-3h-3v-2z"></path></svg>',info:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M7 4.75c0-0.412 0.338-0.75 0.75-0.75h0.5c0.412 0 0.75 0.338 0.75 0.75v0.5c0 0.412-0.338 0.75-0.75 0.75h-0.5c-0.412 0-0.75-0.338-0.75-0.75v-0.5z"></path><path d="M10 12h-4v-1h1v-3h-1v-1h3v4h1z"></path><path d="M8 0c-4.418 0-8 3.582-8 8s3.582 8 8 8 8-3.582 8-8-3.582-8-8-8zM8 14.5c-3.59 0-6.5-2.91-6.5-6.5s2.91-6.5 6.5-6.5 6.5 2.91 6.5 6.5-2.91 6.5-6.5 6.5z"></path></svg>',comment:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M3 4h10v1h-10zM3 6h8v1h-8zM3 8h4v1h-4zM14.5 1h-13c-0.825 0-1.5 0.675-1.5 1.5v8c0 0.825 0.675 1.5 1.5 1.5h2.5v4l4.8-4h5.7c0.825 0 1.5-0.675 1.5-1.5v-8c0-0.825-0.675-1.5-1.5-1.5zM14 10h-5.924l-3.076 2.73v-2.73h-3v-7h12v7z"></path></svg>',thumbs:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M3 3v10h-2v-11c0-0.552 0.448-1 1-1h12c0.552 0 1 0.448 1 1v12c0 0.552-0.448 1-1 1h-12c-0.552 0-1-0.448-1-1v-1h4v-2h-2v-2h2v-2h-2v-2h2v-2h2v10h6v-10h-10z"></path></svg>',cart:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M13.238 9c0.55 0 1.124-0.433 1.275-0.962l1.451-5.077c0.151-0.529-0.175-0.962-0.725-0.962h-10.238c0-1.105-0.895-2-2-2h-3v2h3v8.5c0 0.828 0.672 1.5 1.5 1.5h9.5c0.552 0 1-0.448 1-1s-0.448-1-1-1h-9v-1h8.238zM5 4h9.044l-0.857 3h-8.187v-3z"></path><path d="M6 14.5c0 0.828-0.672 1.5-1.5 1.5s-1.5-0.672-1.5-1.5c0-0.828 0.672-1.5 1.5-1.5s1.5 0.672 1.5 1.5z"></path><path d="M15 14.5c0 0.828-0.672 1.5-1.5 1.5s-1.5-0.672-1.5-1.5c0-0.828 0.672-1.5 1.5-1.5s1.5 0.672 1.5 1.5z"></path></svg>',"circle-close":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M8 0c-4.418 0-8 3.582-8 8s3.582 8 8 8 8-3.582 8-8-3.582-8-8-8zM8 14.5c-3.59 0-6.5-2.91-6.5-6.5s2.91-6.5 6.5-6.5 6.5 2.91 6.5 6.5-2.91 6.5-6.5 6.5z"></path><path d="M10.5 4l-2.5 2.5-2.5-2.5-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 2.5-2.5 2.5 2.5 1.5-1.5-2.5-2.5 2.5-2.5z"></path></svg>',"auto-progress":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path class="[ICON_CLASS]-idle" d="M11.39 8c2.152-1.365 3.61-3.988 3.61-7 0-0.339-0.019-0.672-0.054-1h-13.891c-0.036 0.328-0.054 0.661-0.054 1 0 3.012 1.457 5.635 3.609 7-2.152 1.365-3.609 3.988-3.609 7 0 0.339 0.019 0.672 0.054 1h13.891c0.036-0.328 0.054-0.661 0.054-1 0-3.012-1.457-5.635-3.609-7zM2.5 15c0-2.921 1.253-5.397 3.5-6.214v-1.572c-2.247-0.817-3.5-3.294-3.5-6.214v0h11c0 2.921-1.253 5.397-3.5 6.214v1.572c2.247 0.817 3.5 3.294 3.5 6.214h-11zM9.462 10.462c-1.12-0.635-1.181-1.459-1.182-1.959v-1.004c0-0.5 0.059-1.327 1.184-1.963 0.602-0.349 1.122-0.88 1.516-1.537h-6.4c0.395 0.657 0.916 1.188 1.518 1.538 1.12 0.635 1.181 1.459 1.182 1.959v1.004c0 0.5-0.059 1.327-1.184 1.963-1.135 0.659-1.98 1.964-2.236 3.537h7.839c-0.256-1.574-1.102-2.879-2.238-3.538z"/><circle class="[ICON_CLASS]-circle" r="4" cx="8" cy="8"/><path class="[ICON_CLASS]-play" d="M3 2l10 6-10 6z"/><path class="[ICON_CLASS]-pause" d="M2 2h5v12h-5zM9 2h5v12h-5z"/></svg>',search:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M16 13.5l-4.695-4.695c0.444-0.837 0.695-1.792 0.695-2.805 0-3.314-2.686-6-6-6s-6 2.686-6 6 2.686 6 6 6c1.013 0 1.968-0.252 2.805-0.695l4.695 4.695 2.5-2.5zM2 6c0-2.209 1.791-4 4-4s4 1.791 4 4-1.791 4-4 4-4-1.791-4-4z"></path></svg>',"exif-aperture":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M 8,0 C 3.5876443,0 0,3.5876443 0,8 c 0,4.412356 3.5876443,8 8,8 4.412356,0 8,-3.587644 8,-8 C 16,3.5876443 12.412356,0 8,0 Z m 0,1 c 3.871916,0 7,3.1280844 7,7 0,3.871916 -3.128084,7 -7,7 C 4.1280844,15 1,11.871916 1,8 1,4.1280844 4.1280844,1 8,1 Z M 7.53125,2.0214844 A 6,6 0 0 0 3.1835938,4.4335938 H 8.9257812 Z M 8.6132812,2.03125 C 9.5587451,3.6702105 10.504247,5.3091484 11.451172,6.9472656 L 12.863281,4.5 A 6,6 0 0 0 8.6132812,2.03125 Z M 2.5957031,5.4101562 A 6,6 0 0 0 2,8 6,6 0 0 0 2.5273438,10.439453 L 5.4296875,5.4101562 Z m 10.8261719,0.033203 -2.855469,4.9433598 h 2.935547 A 6,6 0 0 0 14,8 6,6 0 0 0 13.421875,5.4433592 Z M 4.5722656,8.8945312 3.0996094,11.449219 a 6,6 0 0 0 4.40625,2.527343 z m 2.5820313,2.4707028 1.4960937,2.591797 a 6,6 0 0 0 4.3144534,-2.591797 z"></path></svg>',"exif-camera":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="m 8.0000002,5 a 4,4 0 0 0 -4,4 4,4 0 0 0 4,4 A 4,4 0 0 0 12,9 4,4 0 0 0 8.0000002,5 Z m 0.019531,1.015625 a 3,2.9814477 0 0 1 2.9804688,3 l -1,-0.00586 a 2,2 0 0 0 0,-0.00976 2,2 0 0 0 -1.9863279,-2 z M 5.125,1 C 4.5,1 4,1.5 4,2.125 V 3.0000004 L 1.125,3 C 0.5,2.9999999 0,3.5 0,4.125 v 9.75 C 0,14.5 0.5,15 1.125,15 h 13.75 C 15.5,15 16,14.5 16,13.875 V 4.125 C 16,3.5 15.5,3 14.875,3 H 12 V 2.125 C 12,1.5 11.5,1 10.875,1 Z M 5.25,2.0000004 h 5.5 c 0.125,0 0.25,0.1249996 0.25,0.25 v 1.75 h 3.75 c 0.125,0 0.25,0.1249996 0.25,0.25 V 13.75 C 15,13.875 14.875,14 14.75,14 H 1.25 C 1.125,14 1,13.875 1,13.75 V 4.25 C 1,4.125 1.125,4 1.25,4 l 3.75,4e-7 v -1.75 c 0,-0.1250004 0.125,-0.25 0.25,-0.25 z"></path></svg>',"exif-created-timestamp":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M 3,1 V 2 H 1 V 15 H 16 V 2 H 14 V 1 H 13 V 2 H 4 V 1 Z M 2,4 H 15 V 14 H 2 Z M 6,5 V 7 H 8 V 5 Z m 3,0 v 2 h 2 V 5 Z m 3,0 v 2 h 2 V 5 Z M 3,8 v 2 H 5 V 8 Z m 3,0 v 2 H 8 V 8 Z m 3,0 v 2 h 2 V 8 Z m 3,0 v 2 h 2 V 8 Z m -9,3 v 2 h 2 v -2 z m 3,0 v 2 h 2 v -2 z m 3,0 v 2 h 2 v -2 z"></path></svg>',"exif-shutter-speed":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M 8,0 C 3.5876443,0 -2.9415707e-8,3.5876443 0,8 c 2.3532563e-7,4.412356 3.5876445,8 8,8 4.412356,0 8,-3.587644 8,-8 C 16,3.5876443 12.412356,0 8,0 Z m 0,1 c 3.871916,0 7,3.1280844 7,7 0,3.871915 -3.128085,7 -7,7 -3.8719154,0 -6.9999998,-3.128085 -7,-7 -3e-8,-3.8719156 3.1280844,-7 7,-7 z M 11.646484,3.6464844 8.6445312,6.6484375 A 1.5,1.5 0 0 0 8,6.5 1.5,1.5 0 0 0 6.5,8 1.5,1.5 0 0 0 8,9.5 1.5,1.5 0 0 0 9.5,8 1.5,1.5 0 0 0 9.3515625,7.3554688 L 12.353516,4.3535156 Z M 2,7.5 v 1 h 2 v -1 z M 7.5,12 v 2 h 1 V 12 Z M 12,7.5 v 1 h 2 v -1 z M 7.5,2 v 2 h 1 V 2 Z"></path></svg>',"exif-focal-length":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="m 1,4.125 -1,0.25 v 7.25 l 1,0.25 z M 5,1 2,4 v 8 l 3,3 h 6.875 C 12.500003,15 13,14.5 13,13.875 V 2.125 C 13,1.4999986 12.5,1 11.875,1 9.576807,0.99914375 7.1414067,0.96597644 5,1 Z M 5.5,2 H 6 V 14 H 5.5 L 3,11.5 v -7 z M 7,2 h 4.75 C 11.875,2 12,2.1249997 12,2.25 v 11.5 c 0,0.125 -0.125,0.250622 -0.25,0.25 H 7 Z m 7,0 c 1,2.2 1.5,4.35 1.5,6 0,1.65 -0.5,3.8 -1.5,6"></path></svg>',"exif-iso":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M 7.5,0 V 1.6015625 C 6.0969201,1.7146076 4.8392502,2.256185 3.828125,3.1210938 L 2.6035156,1.8964844 1.8964844,2.6035156 3.1210938,3.828125 C 2.256185,4.8392502 1.7146076,6.0969201 1.6015625,7.5 H 0 v 1 h 1.6015625 c 0.1130451,1.4030799 0.6546225,2.66075 1.5195313,3.671875 l -1.2246094,1.224609 0.7070312,0.707032 1.2246094,-1.22461 C 4.8392502,13.743815 6.0969201,14.285392 7.5,14.398438 V 16 h 1 v -1.601562 c 1.4030799,-0.113046 2.66075,-0.654623 3.671875,-1.519532 l 1.224609,1.22461 0.707032,-0.707032 -1.22461,-1.224609 C 13.743815,11.16075 14.285392,9.9030799 14.398438,8.5 H 16 v -1 H 14.398438 C 14.285392,6.0969201 13.743815,4.8392502 12.878906,3.828125 L 14.103516,2.6035156 13.396484,1.8964844 12.171875,3.1210938 C 11.16075,2.256185 9.9030799,1.7146076 8.5,1.6015625 V 0 Z M 8,2.5 c 3.043488,0 5.5,2.4565116 5.5,5.5 0,3.043488 -2.456512,5.5 -5.5,5.5 C 4.9565116,13.5 2.5,11.043488 2.5,8 2.5,4.9565116 4.9565116,2.5 8,2.5 Z"></path></svg>',"exif-orientation":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M 1.25,0 C 0.625,0 0,0.625 0,1.25 V 5 H 1 V 3 h 8 v 2 h 1 V 1.25 C 10,0.625 9.375,0 8.75,0 Z m 0,1 h 7.5 C 8.875,1 9,1.125 9,1.25 V 2 H 1 V 1.25 C 1,1.125 1.125,1 1.25,1 Z m 0,5 C 0.625,6 0,6.625 0,7.25 v 7.5 C 0,15.375 0.625,16 1.25,16 h 13.5 C 15.375,16 16,15.375 16,14.75 V 7.25 C 16,6.625 15.375,6 14.75,6 Z m 0,1 H 2 v 3 H 1 V 7.25 C 1,7.125 1.125,7 1.25,7 Z M 3,7 h 10 v 8 H 3 Z m 11,0 h 0.75 C 14.875,7 15,7.125 15,7.25 v 7.5 C 15,14.875 14.875,15 14.75,15 H 14 Z M 1,12 h 1 v 3 H 1.25 C 1.125,15 1,14.875 1,14.75 Z"></path></svg>'}}},register:function(e,t){return!(a.empty(e)||a.empty(t)||!a.string(e)||!a.hash(t))&&(this.registered[e]=l.extend({},this.registered.default,t),!0)},get:function(e,t){var n=this,i="default",r=l.extend({},n.registered.default),t=(a.string(t)&&"default"!==t?r=l.extend(r,n.registered[i=t]):a.hash(t)&&(i="custom",r=l.extend(r,t)),a.string(e)&&r.hasOwnProperty(e)?r[e].replace(/\[ICON_CLASS]/g,n.className+"-"+e):null),r=[!1,e,i].map(function(e){return!1===e?n.className:n.className+"-"+e}).join(" ");return o(t).addClass(r)},element:function(e,t){const n=this;let i="default",r=l.extend({},n.registered.default);a.string(t)&&"default"!==t?(i=t,r=l.extend(r,n.registered[t])):a.hash(t)&&(i="custom",r=l.extend(r,t));t=a.string(e)&&r.hasOwnProperty(e)?r[e].replace(/\[ICON_CLASS]/g,n.className+"-"+e):null;if(null!==t){const o=document.createRange().createContextualFragment(t),s=o.querySelector("svg");if(s)return["","-"+e,"-"+i].forEach(function(e){s.classList.add(n.className+e)}),s}return null}}),e.icons=new e.Icons}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.obj),function(r,n,i,o,s){var a="__FooGallerySwipe__",e="ontouchstart"in window,l=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled&&!e,c=(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&!e,u=e||c;n.Swipe=i.Class.extend({construct:function(e,t){var n=this,i=".fgswipe";n.$el=r(e),n.opt=s.extend({threshold:20,allowPageScroll:!1,swipe:r.noop,data:{}},t),n.active=!1,n.startPoint=null,n.endPoint=null,n.events={start:(u?c?l?"MSPointerDown":"pointerdown":"touchstart":"mousedown")+i,move:(u?c?l?"MSPointerMove":"pointermove":"touchmove":"mousemove")+i,end:(u?c?l?"MSPointerUp":"pointerup":"touchend":"mouseup")+i,leave:(!u||c?"mouseleave":null)+i}},init:function(){var e=this;e.$el.on(e.events.start,{self:e},e.onStart),e.$el.on(e.events.move,{self:e},e.onMove),e.$el.on(e.events.end,{self:e},e.onEnd),o.string(e.events.leave)&&e.$el.on(e.events.leave,{self:e},e.onEnd),e.$el.data(a,e)},destroy:function(){var e=this;e.$el.off(e.events.start,e.onStart),e.$el.off(e.events.move,e.onMove),e.$el.off(e.events.end,e.onEnd),o.string(e.events.leave)&&e.$el.off(e.events.leave,e.onEnd),e.$el.removeData(a)},getAngle:function(e,t){e=Math.atan2(e.x-t.x,e.y-t.y),t=Math.round(180*e/Math.PI);return 360-(t<0?360-Math.abs(t):t)},getDistance:function(e,t){var n=t.x-e.x,t=t.y-e.y;return n*=n,t*=t,Math.sqrt(n+t)},getDirection:function(e,t){e=this.getAngle(e,t);return 337.5<e||e<=22.5?"N":22.5<e&&e<=67.5?"NE":67.5<e&&e<=112.5?"E":112.5<e&&e<=157.5?"SE":157.5<e&&e<=202.5?"S":202.5<e&&e<=247.5?"SW":247.5<e&&e<=292.5?"W":292.5<e&&e<=337.5?"NW":"NONE"},getPoint:function(e){var t;return u&&!o.empty(t=e.originalEvent.touches||e.touches)?{x:t[0].pageX,y:t[0].pageY}:o.number(e.pageX)&&o.number(e.pageY)?{x:e.pageX,y:e.pageY}:null},getOffset:function(e){var t=this.$el.offset();return{left:e.x-t.left,top:e.y-t.top}},onStart:function(e){var t=e.data.self,e=t.getPoint(e);o.empty(e)||(t.active=!0,t.startPoint=t.endPoint=e)},onMove:function(e){var t=e.data.self,n=t.getPoint(e);t.active&&!o.empty(n)&&(t.endPoint=n,t.opt.allowPageScroll?o.hash(t.opt.allowPageScroll)&&(n=t.getDirection(t.startPoint,t.endPoint),t.opt.allowPageScroll.x||-1===i.inArray(n,["NE","E","SE","NW","W","SW"])||e.preventDefault(),t.opt.allowPageScroll.y||-1===i.inArray(n,["NW","N","NE","SW","S","SE"])||e.preventDefault()):e.preventDefault())},onEnd:function(e){var t,e=e.data.self;e.active&&(e.active=!1,t={startPoint:e.startPoint,endPoint:e.endPoint,startOffset:e.getOffset(e.startPoint),endOffset:e.getOffset(e.endPoint),angle:e.getAngle(e.startPoint,e.endPoint),distance:e.getDistance(e.startPoint,e.endPoint),direction:e.getDirection(e.startPoint,e.endPoint)},0<e.opt.threshold&&t.distance<e.opt.threshold||(e.opt.swipe.apply(this,[t,e.opt.data]),e.startPoint=null,e.endPoint=null))}}),r.fn.fgswipe=function(t){return this.each(function(){var e=r(this).data(a);if(e instanceof n.Swipe){if(o.string(t)&&o.fn(e[t]))return void e[t]();e.destroy()}o.hash(t)&&(e=new n.Swipe(this,t)).init()})}}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.obj),function(r,e,t,o,s){e.Factory=t.Class.extend({construct:function(){this.registered={}},contains:function(e){return!o.undef(this.registered[e])},make:function(e,t,n){var i,r=s.arg2arr(arguments);return e=r.shift(),i=this.registered[e],o.hash(i)&&o.fn(i.klass)?s.apply(i.klass,r):null},names:function(e){e=!!o.boolean(e)&&e;var t,n=[];if(e){var i=[];for(t in this.registered)this.registered.hasOwnProperty(t)&&i.push(this.registered[t]);i.sort(function(e,t){return t.priority-e.priority}),r.each(i,function(e,t){n.push(t.name)})}else for(t in this.registered)this.registered.hasOwnProperty(t)&&n.push(t);return n},register:function(e,t,n){if(!o.string(e)||o.empty(e)||!o.fn(t))return!1;n=o.number(n)?n:0;var i=this.registered[e];return this.registered[e]={name:e,klass:t,priority:o.undef(i)?n:i.priority},!0},load:function(){var e,n=this,i=[],t=[];for(e in n.registered)n.registered.hasOwnProperty(e)&&t.push(n.registered[e]);return t.sort(function(e,t){return t.priority-e.priority}),r.each(t,function(e,t){i.push(n.make(t.name))}),i}})}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn),function(l,s,c,u,a){s.TemplateFactory=s.Factory.extend({construct:function(){this.registered={}},register:function(e,t,n,i,r,o){t=this._super(e,t,o);return t&&((o=this.registered)[e].opt=u.hash(n)?n:{},o[e].cls=u.hash(i)?i:{},o[e].il8n=u.hash(r)?r:{}),t},make:function(e,t){t=u.jq(t)?t:l(t),e=a.extend({},e,t.data("foogallery"));var n=this.type(e,t);return this.contains(n)?(e=this.options(n,e),this._super(n,e,t)):null},type:function(e,t){t=u.jq(t)?t:l(t);var n=u.hash(e)&&u.hash(e)&&u.string(e.type)&&this.contains(e.type)?e.type:null;if(null===n&&0<t.length)for(var i=this.registered,r=this.names(!0),o=0,s=r.length;o<s;o++)if(i.hasOwnProperty(r[o])&&"core"!==r[o]){var a=i[r[o]].cls;if(u.string(a.container)){a=c.selectify(a.container);if(t.is(a)){n=r[o];break}}}return n},configure:function(e,t,n,i){var r;this.contains(e)&&(r=this.registered,a.extend(r[e].opt,t),a.extend(r[e].cls,n),a.extend(r[e].il8n,i))},options:function(e,t){t=a.extend({type:e},t);var n=this.registered,i=n.core.opt,r=n.core.cls,o=n.core.il8n;return u.hash(t.cls)||(t.cls={}),u.hash(t.il8n)||(t.il8n={}),u.undef(s.filtering)||(t=s.filtering.merge(t)),u.undef(s.paging)||(t=s.paging.merge(t)),"core"!==e&&this.contains(e)?((t=a.extend({},i,n[e].opt,t)).cls=a.extend({},r,n[e].cls,t.cls),t.il8n=a.extend({},o,n[e].il8n,t.il8n)):((t=a.extend({},i,t)).cls=a.extend({},r,t.cls),t.il8n=a.extend({},o,t.il8n)),t}}),s.template=new s.TemplateFactory}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,(FooGallery.utils.fn,FooGallery.utils.obj)),function(i,r,o,s,a){var l=0;r.Template=o.EventClass.extend({construct:function(e,t){var n=this;n._super(),n.namespace=".foogallery-"+ ++l,n.$el=s.jq(t)?t:i(t),n.el=n.$el.get(0)||null,n.$scrollParent=null,n.opt=e,n.template=e.template,n.id=n.$el.prop("id")||e.id,n.cls=e.cls,n.il8n=e.il8n,n.sel=o.selectify(n.cls),n.items=r.components.make("items",n),n.pages=s.undef(r.paging)?null:r.paging.make(e.paging.type,n),n.filter=s.undef(r.filtering)?null:r.filtering.make(e.filtering.type,n),n.state=r.components.make("state",n),n._initialize=null,n._layoutTimeout=null,n._layoutWidths=[],n.lastWidth=0,n.initializing=!1,n.initialized=!1,n.destroying=!1,n.destroyed=!1,n._undo={classes:"",style:"",create:!1,children:!1},n.robserver=new ResizeObserver(a.throttle(function(e){n.destroying||n.destroyed||1!==e.length||e[0].target!==n.el||(e=o.getResizeObserverSize(e[0]),n.layout(e.width))},50))},initialize:function(t){var n=this;return s.promise(n._initialize)?n._initialize:n._initialize=i.Deferred(function(e){n.preInit(t)?n.init().then(function(){n.postInit()?(n.ready(),e.resolve(n)):e.reject("post-init failed")}).fail(e.reject):e.reject("pre-init failed")}).fail(function(e){return console.log("initialize failed",n,e),n.destroy()}).promise()},preInit:function(e){var t,n=this;if(n.destroying)return!1;if(e=s.jq(e)?e:i(e),n.initializing=!0,0===e.length&&0===n.$el.parent().length)return!1;0===n.$el.length&&(n.$el=n.create(),n.el=n.$el.get(0),n._undo.create=!0),0<e.length&&n.$el.appendTo(e),s.empty(n.opt.scrollParent)||0===(t=i(n.opt.scrollParent)).length?n.$scrollParent=i(document):n.$scrollParent=t.is("html")?i(document):t,n.$el.data(r.DATA_TEMPLATE,n),s.empty(n.opt.on)||n.on(n.opt.on),n._undo.classes=n.$el.attr("class"),n._undo.style=n.$el.attr("style"),n.$el.is(n.sel.container)||n.$el.addClass(n.cls.container);e=o.selectify(n.opt.classes);return null==e||n.$el.is(e)||n.$el.addClass(n.opt.classes),0===n.$el.children().not(n.sel.item.elem).length&&(n.$el.append(n.createChildren()),n._undo.children=!0),n.opt.protected&&(n.el.oncontextmenu=function(e){return e.preventDefault(),!1}),!n.trigger("pre-init").isDefaultPrevented()},init:function(){return this.trigger("init").isDefaultPrevented()?a.reject("init default prevented"):this.items.fetch()},postInit:function(){var e=this;return!e.destroying&&(!e.trigger("post-init").isDefaultPrevented()&&(e.state.init(),e.pages&&e.pages.init(),i(window).on("popstate"+e.namespace,{self:e},e.onWindowPopState),e.robserver.observe(e.el),!0))},ready:function(){return!this.destroying&&(this.initializing=!1,this.initialized=!0,this.trigger("ready"),!0)},create:function(){return i("<div/>",{id:this.id,class:this.cls.container}).addClass(this.opt.classes)},createChildren:function(){return i()},destroy:function(t){var n=this,e=n._super.bind(n);return n.destroyed?a.resolved:(n.destroying=!0,i.Deferred(function(e){n.initializing&&s.promise(n._initialize)?n._initialize.always(function(){n.destroying=!1,n.doDestroy(t),e.resolve()}):(n.destroying=!1,n.doDestroy(t),e.resolve())}).then(function(){e()}).promise())},doDestroy:function(e){var t=this;t.destroyed||(t.trigger("destroy"),t.robserver.disconnect(),i(window).off(t.namespace),t.state.destroy(e),t.filter&&t.filter.destroy(),t.pages&&t.pages.destroy(),t.items.destroy(),s.empty(t.opt.on)||t.$el.off(t.opt.on),t.trigger("destroyed"),t.$el.removeData(r.DATA_TEMPLATE),s.empty(t._undo.classes)?t.$el.removeAttr("class"):t.$el.attr("class",t._undo.classes),s.empty(t._undo.style)?t.$el.removeAttr("style"):t.$el.attr("style",t._undo.style),t._undo.children&&t.destroyChildren(),t._undo.create&&t.$el.remove(),t.$el=t.state=t.items=t.pages=null,t.destroyed=!0,t.initializing=!1,t.initialized=!1)},destroyChildren:function(){},getAvailable:function(){return(this.pages||this.items).available()},layout:function(e){var t=this;null!==t._initialize&&(0===(e=!s.number(e)?t.el.getBoundingClientRect().width:e)||t._checkWidth(e)||(t.lastWidth=e,t.trigger("layout",[e])))},_checkWidth:function(e){var t,n=this;return(t=-1!==n._layoutWidths.indexOf(e))||(n._layoutWidths.unshift(e),n._layoutWidths.splice(2,n._layoutWidths.length-2),null!=n._layoutTimeout&&clearTimeout(n._layoutTimeout),n._layoutTimeout=setTimeout(function(){n._layoutWidths.splice(0,n._layoutWidths.length)},100)),t},getCSSClass:function(e,t){t=s.empty(t)?"":t;var e=e instanceof RegExp?e:s.string(e)&&this.opt.regex.hasOwnProperty(e)?this.opt.regex[e]:null,n=this.$el.prop("className")||"",n=null!=e?n.match(e):null;return null!=n&&2<=n.length?n[1]:t},onWindowPopState:function(e){var t=e.data.self,e=e.originalEvent.state;s.empty(e)||e.id!==t.id||t.state.set(e)}}),r.template.register("core",r.Template,{id:null,type:"core",classes:"",on:{},lazy:!0,items:[],scrollParent:null,delay:0,throttle:50,shortpixel:!1,srcset:"data-srcset-fg",src:"data-src-fg",protected:!1,template:{},regex:{theme:/(?:\s|^)(fg-(?:light|dark|custom))(?:\s|$)/,loadingIcon:/(?:\s|^)(fg-loading-(?:default|bars|dots|partial|pulse|trail))(?:\s|$)/,hoverIcon:/(?:\s|^)(fg-hover-(?:zoom|zoom2|zoom3|plus|circle-plus|eye|external|tint))(?:\s|$)/,videoIcon:/(?:\s|^)(fg-video-(?:default|1|2|3|4))(?:\s|$)/,border:/(?:\s|^)(fg-border-(?:thin|medium|thick))(?:\s|$)/,hoverColor:/(?:\s|^)(fg-hover-(?:colorize|grayscale))(?:\s|$)/,hoverScale:/(?:\s|^)(fg-hover-scale)(?:\s|$)/,stickyVideoIcon:/(?:\s|^)(fg-video-sticky)(?:\s|$)/,insetShadow:/(?:\s|^)(fg-shadow-inset-(?:small|medium|large))(?:\s|$)/,filter:/(?:\s|^)(fg-filter-(?:1977|amaro|brannan|clarendon|earlybird|lofi|poprocket|reyes|toaster|walden|xpro2|xtreme))(?:\s|$)/}},{container:"foogallery"},{},-100)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.str),function(e,t){e.Component=t.EventClass.extend({construct:function(e){this._super(),this.tmpl=e},destroy:function(){this.tmpl=null,this._super()}}),e.components=new e.Factory}(FooGallery,FooGallery.utils,FooGallery.utils.is),function(t,o,n,s,a,l){o.State=o.Component.extend({construct:function(e){var t=this,e=(t._super(e),t.apiEnabled=!!window.history&&!!history.replaceState,t.opt=t.tmpl.opt.state,t.enabled=t.opt.enabled,t.current={filter:[],page:0,item:null},t.pushOrReplace=t.isPushOrReplace(t.opt.pushOrReplace)?t.opt.pushOrReplace:"replace",t.defaultMask="foogallery-gallery-{id}",a.escapeRegExp(t.tmpl.id)),n=a.escapeRegExp(t.getMasked()),i=a.escapeRegExp(t.opt.values),r=a.escapeRegExp(t.opt.pair);t.regex={exists:new RegExp("^#"+e+"\\"+i+".+?"),masked:new RegExp("^#"+n+"\\"+i+".+?"),values:new RegExp("(\\w+)"+r+"([^"+i+"]+)","g")}},destroy:function(e){e||this.clear(),this.opt=this.regex={},this._super()},init:function(){this.set(this.initial())},getIdNumber:function(){return this.tmpl.id.match(/\d+/g)[0]},getMasked:function(){var e=a.contains(this.opt.mask,"{id}")?this.opt.mask:this.defaultMask;return a.format(e,{id:this.getIdNumber()})},isPushOrReplace:function(e){return-1!==n.inArray(e,["push","replace"])},exists:function(){return this.regex.values.lastIndex=0,(this.regex.exists.test(location.hash)||this.regex.masked.test(location.hash))&&this.regex.values.test(location.hash)},parse:function(){var e,r=this,o=r.tmpl,s={};return r.exists()&&(r.enabled?(s.id=r.tmpl.id,r.regex.values.lastIndex=0,e=location.hash.match(r.regex.values),t.each(e,function(e,t){var n,i=t.split(r.opt.pair);if(2===i.length)switch(i[0]){case r.opt.itemKey:null!==(n=o.items.fromHash(i[1]))&&(s.item=n);break;case r.opt.pageKey:o.pages&&null!==(n=o.pages.fromHash(i[1]))&&(s.page=n);break;case r.opt.filterKey:o.filter&&null!==(n=o.filter.fromHash(i[1]))&&(s.filter=n)}})):r.apiEnabled?history.replaceState(null,"",location.pathname+location.search):location.hash="#"),s},hashify:function(e){var t,n,i=this,r=i.tmpl;return s.hash(e)?(t=[],null!==(n=r.items.toHash(e.item))&&t.push(i.opt.itemKey+i.opt.pair+n),r.filter&&null!==(n=r.filter.toHash(e.filter))&&t.push(i.opt.filterKey+i.opt.pair+n),r.pages&&null!==(n=r.pages.toHash(e.page))&&t.push(i.opt.pageKey+i.opt.pair+n),0<t.length&&t.unshift("#"+i.getMasked()),t.join(i.opt.values)):""},replace:function(e){var t,n;this.enabled&&this.apiEnabled&&(e.id=this.tmpl.id,t=this.hashify(e),n=s.empty(t),e=l.extend({},e,{item:e.item instanceof o.Item?e.item.id:e.item}),history.replaceState(n?null:e,"",n?location.pathname+location.search:t))},push:function(e){var t,n;this.enabled&&this.apiEnabled&&(e.id=this.tmpl.id,t=this.hashify(e),n=s.empty(t),e=l.extend({},e,{item:e.item instanceof o.Item?e.item.id:e.item}),history.pushState(n?null:e,"",n?location.pathname+location.search:t))},update:function(e,t){var n=this;n.enabled&&n.apiEnabled&&(t=n.isPushOrReplace(t)?t:n.pushOrReplace,n[t](e))},clear:function(){this.exists()&&this.replace({})},initial:function(){var e=this.parse();return s.empty(e)?this.get():l.extend({filter:[],page:1,item:null},e)},get:function(e){var t,n=this.tmpl,i={};return e instanceof o.Item&&(i.item=e),n.filter&&null!==(t=n.filter.getState())&&(i.filter=t),n.pages&&null!==(t=n.pages.getState())&&(i.page=t),l.extend({filter:[],page:1,item:null},i)},set:function(e){var t,n,i,r=this.tmpl;s.hash(e)&&(t=l.extend({filter:[],page:1,item:null},e),r.items.reset(),r.trigger("before-state",[t]).isDefaultPrevented()||(r.filter&&r.filter.setState(t),r.pages?r.pages.setState(t):(n=r.items.available(),r.items.isAll(n)||(i=r.items.not(n),r.items.detach(i)),r.items.create(n,!0)),t.item instanceof o.Item&&(this.opt.scrollTo&&t.item.scrollTo(),s.empty(e.item)||(e.item=null,this.replace(e))),this.current=t,r.trigger("after-state",[t])))}}),o.template.configure("core",{state:{enabled:!1,scrollTo:!0,pushOrReplace:"replace",mask:"foogallery-gallery-{id}",values:"/",pair:":",array:"+",arraySeparator:",",itemKey:"i",filterKey:"f",pageKey:"p"}}),o.components.register("state",o.State)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.str,FooGallery.utils.obj),function(s,o,n,a,i,l){o.Items=o.Component.extend({construct:function(e){var t=this,e=(t.ALLOW_CREATE=!0,t.ALLOW_APPEND=!0,t.LAYOUT_AFTER_LOAD=!0,t._super(e),t._typeRegex=/(?:^|\s)?fg-type-(.*?)(?:$|\s)/,t._fetched=null,t._all=[],t._available=[],t._unavailable=[],t._observed=new Map,t.tmpl.cls.item.caption);t.tmpl.sel.item.caption.all=n.selectify([e.elem,e.inner,e.title,e.description]),t._wait=[],t._layoutTimeout=null,t.iobserver=new IntersectionObserver(function(e){t.tmpl.destroying||t.tmpl.destroyed||(t.LAYOUT_AFTER_LOAD&&clearTimeout(t._layoutTimeout),e.forEach(function(e){!e.isIntersecting||(e=t._observed.get(e.target))instanceof o.Item&&t._wait.push(e.load())}),t.LAYOUT_AFTER_LOAD&&(t._layoutTimeout=setTimeout(function(){0<t._wait.length&&i.allSettled(t._wait.splice(0)).then(function(){t.tmpl.layout()})},100)))})},fromHash:function(t){return this.find(this._all,function(e){return e.id===t})},toHash:function(e){return e instanceof o.Item?e.id:null},destroy:function(){var e=this,t=e.all();e.iobserver.disconnect(),0<t.length&&(e.tmpl.trigger("destroy-items",[t]),0<(t=s.map(t,function(e){return e.destroy()?e:null})).length&&e.tmpl.trigger("destroyed-items",[t])),e._fetched=null,e._all=[],e._available=[],e._unavailable=[],e._observed.clear(),e._super()},fetch:function(e){var t=this;if(!e&&a.promise(t._fetched))return t._fetched;var e=t.tmpl.id+"_items",n=t.tmpl.sel,i=t.tmpl.opt.items,r=s.Deferred(),o=t.make(t.tmpl.$el.find(n.item.elem));return a.empty(i)?(a.array(window[e])&&o.push.apply(o,t.make(window[e])),r.resolve(o)):a.array(i)?(o.push.apply(o,t.make(i)),r.resolve(o)):a.string(i)?s.get(i).then(function(e){o.push.apply(o,t.make(e)),r.resolve(o)},function(e,t,n){console.log("FooGallery: GET items error.",i,e,t,n),r.resolve(o)}):r.resolve(o),r.then(function(e){t.setAll(e)}),t._fetched=r.promise()},toJSON:function(e){return(e?this.all():this.available()).map(function(e){return e.toJSON()})},all:function(){return this._all.slice()},count:function(e){return(e?this.all():this.available()).length},available:function(e){return a.fn(e)?this._available.filter(e,this):this._available.slice()},unavailable:function(e){return a.fn(e)?this._unavailable.filter(e,this):this._unavailable.slice()},setAll:function(e){this._all=a.array(e)?e:[],this._all.forEach(function(e,t){e.index=t,a.empty(e.id)&&(e.id=t+1+"")}),this._available=this.all(),this._unavailable=[]},setAvailable:function(e){var t=this;t._available=a.array(e)?e:[],t._all.length!==t._available.length?t._unavailable=t._all.filter(function(e){return-1===t._available.indexOf(e)}):t._unavailable=[]},reset:function(){this.setAvailable(this.all())},find:function(e,t){if(t=a.fn(t)?t:function(){return!0},a.array(e))for(var n=0,i=e.length;n<i;n++)if(!0===t.call(this,e[n]))return e[n];return null},not:function(t){var e=this.all();return a.array(t)?e.filter(function(e){return-1===t.indexOf(e)}):e},isAll:function(e){return!!a.array(e)&&this._all.length===e.length},first:function(e){return this.find(this._available,e)},last:function(e){return this.find(this._available.slice().reverse(),e)},next:function(e,t,n){if(!(e instanceof o.Item))return null;n=!!a.boolean(n)&&n;var i,r=this._available.slice(),e=r.indexOf(e);return-1!==e?(i=r.slice(0,e),r=r.slice(e+1),n&&(r=r.concat(i)),this.find(r,t)):null},prev:function(e,t,n){if(!(e instanceof o.Item))return null;n=!!a.boolean(n)&&n;var i,r=this._available.slice().reverse(),e=r.indexOf(e);return-1!==e?(i=r.slice(0,e),r=r.slice(e+1),n&&(r=r.concat(i)),this.find(r,t)):null},get:function(t,e){e=e?this._all:this._available;return a.number(t)?0<=t&&t<this._all.length?e[t]:null:this.find(e,function(e){return e.el===t})},indexOf:function(e,t){return(t?this._all:this._available).indexOf(e)},creatable:function(e){return this.ALLOW_CREATE&&a.array(e)?s.map(e,function(e){return e instanceof o.Item&&!e.isCreated?e:null}):[]},appendable:function(e){return this.ALLOW_APPEND&&a.array(e)?s.map(e,function(e){return e instanceof o.Item&&e.isCreated&&!e.isAttached?e:null}):[]},detachable:function(e){return a.array(e)?s.map(e,function(e){return e instanceof o.Item&&e.isCreated&&e.isAttached?e:null}):[]},jquerify:function(e){return s(s.map(e,function(e){return e.$el.get()}))},make:function(e){var i=this,t=[];if(a.jq(e)||a.array(e)){var r=[],e=s.makeArray(e);if(0===e.length)return t;0<(t=!i.tmpl.trigger("make-items",[e]).isDefaultPrevented()?s.map(e,function(e){var t=i.type(e),n=l.extend(a.hash(e)?e:{},{type:t}),t=o.components.make(t,i.tmpl,n);return a.element(e)?t.parse(e)?(r.push(t),i.ALLOW_APPEND||t.detach(),t):null:t}):t).length&&i.tmpl.trigger("made-items",[t]),0<r.length&&i.tmpl.trigger("parsed-items",[r])}return t},type:function(e){var t;return a.hash(e)?t=e.type:!a.element(e)||null!==(e=e.className.match(this._typeRegex))&&2===e.length&&(t=e[1]),a.string(t)&&o.components.contains(t)?t:"image"},create:function(e,t){var n=[],i=this.creatable(e);return 0<i.length&&0<(n=!this.tmpl.trigger("create-items",[i]).isDefaultPrevented()?s.map(i,function(e){return e.create()?e:null}):n).length&&this.tmpl.trigger("created-items",[n]),a.boolean(t)&&t?this.append(e):n},append:function(e){var t=[],e=this.appendable(e);return 0<e.length&&0<(t=!this.tmpl.trigger("append-items",[e]).isDefaultPrevented()?s.map(e,function(e){return e.append()?e:null}):t).length&&this.tmpl.trigger("appended-items",[t]),t},detach:function(e){var t=[],e=this.detachable(e);return 0<e.length&&0<(t=!this.tmpl.trigger("detach-items",[e]).isDefaultPrevented()?s.map(e,function(e){return e.detach()?e:null}):t).length&&this.tmpl.trigger("detached-items",[t]),t},observe:function(e){!(this.iobserver&&e.isCreated&&e.isAttached)||e.isLoading&&e.isLoaded||(this.iobserver.observe(e.el),this._observed.set(e.el,e))},unobserve:function(e){this.iobserver&&(this.iobserver.unobserve(e.el),this._observed.delete(e.el))}}),o.components.register("items",o.Items)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.obj),function(y,b,_,w,o,x){b.Item=b.Component.extend({construct:function(e,t){var n=this;n._super(e),n.cls=e.cls.item,n.il8n=e.il8n.item,n.sel=e.sel.item,n.opt=o.extend({},e.opt.item,t),n.isAttached=!1,n.isCreated=!1,n.isDestroyed=!1,n.isLoading=!1,n.isLoaded=!1,n.isError=!1,n.isParsed=!1,n.isPicture=!1,n.$el=null,n.el=null,n.$inner=null,n.$anchor=null,n.$overlay=null,n.$wrap=null,n.$image=null,n.$caption=null,n.$loader=null,n.index=-1,n.type=n.opt.type,n.id=n.opt.id,n.productId=n.opt.productId,n.href=n.opt.href,n.placeholder=n.opt.placeholder,n.src=n.opt.src,n.srcset=n.opt.srcset,n.sources=n.opt.sources,n.width=n.opt.width,n.height=n.opt.height,n.title=n.opt.title,n.alt=n.opt.alt,n.caption=n.opt.caption,n.description=n.opt.description,n.attr=n.opt.attr,n.tags=n.opt.tags,n.maxCaptionLength=n.opt.maxCaptionLength,n.maxDescriptionLength=n.opt.maxDescriptionLength,n.showCaptionTitle=n.opt.showCaptionTitle,n.showCaptionDescription=n.opt.showCaptionDescription,n.noLightbox=n.opt.noLightbox,n.panelHide=n.opt.panelHide,n.exif=n.opt.exif,n.hasExif=w.exif(n.exif),n.ribbon=n.opt.ribbon,n.hasRibbon=w.hash(n.ribbon)&&w.string(n.ribbon.text)&&w.string(n.ribbon.type),n.buttons=n.opt.buttons,n._load=null,n._undo={classes:"",style:"",placeholder:!1}},destroy:function(){var e=this;return e.tmpl.trigger("destroy-item",[e]).isDefaultPrevented()||(e.isDestroyed=e.doDestroyItem()),e.isDestroyed&&(e.tmpl.trigger("destroyed-item",[e]),e._super()),e.isDestroyed},doDestroyItem:function(){var e=this;return e.isParsed?(e.$anchor.add(e.$caption).off("click.foogallery"),e.append(),e.tmpl.items.unobserve(e),w.empty(e._undo.classes)?e.$el.removeAttr("class"):e.$el.attr("class",e._undo.classes),w.empty(e._undo.style)?e.$el.removeAttr("style"):e.$el.attr("style",e._undo.style),e._undo.placeholder&&e.$image.prop("src")===e.placeholder&&e.$image.removeAttr("src")):e.isCreated&&(e.detach(),e.$el.remove()),!0},parse:function(e){var t=this,e=y(e);return!t.tmpl.trigger("parse-item",[t,e]).isDefaultPrevented()&&(t.isCreated=e.is(t.sel.elem))&&(t.isParsed=t.doParseItem(e)),t.isParsed&&(t.isLoaded||t.tmpl.items.observe(t),t.tmpl.trigger("parsed-item",[t])),t.isParsed},doParseItem:function(e){var n=this,t=n.cls,i=n.sel,r=e.get(0);if(n._undo.classes=e.attr("class")||"",n._undo.style=e.attr("style")||"",n.$el=e.data(b.DATA_ITEM,n),n.el=r,n.$inner=y(r.querySelector(i.inner)),n.$anchor=y(r.querySelector(i.anchor)).on("click.foogallery",{self:n},n.onAnchorClick),n.$image=y(r.querySelector(i.image)),n.$caption=y(r.querySelector(i.caption.elem)).on("click.foogallery",{self:n},n.onCaptionClick),n.$overlay=y(r.querySelector(i.overlay)),n.$wrap=y(r.querySelector(i.wrap)),n.$loader=y(r.querySelector(i.loader)),!(n.$el.length&&n.$inner.length&&n.$anchor.length&&n.$image.length))return console.error("FooGallery Error: Invalid HTML markup. Check the item markup for additional elements or malformed HTML in the title or description.",n),n.isError=!0,n.tmpl.trigger("error-item",[n]),0!==n.$el.length&&n.$el.remove(),!1;n.isAttached=null!==r.parentNode,n.isLoading=n.$el.hasClass(t.loading),n.isLoaded=n.$el.hasClass(t.loaded),n.isError=n.$el.hasClass(t.error);var e=n.$anchor.data(),i=(n.id=e.id||n.id,n.productId=e.productId||n.productId,n.tags=e.tags||n.tags,n.href=e.href||n.$anchor.attr("href")||n.href,r=n.$image.is("picture")?(n.isPicture=!0,n.sources=n.$image.find("source").map(function(e,t){return{srcset:t.getAttribute(n.tmpl.opt.srcset),type:t.getAttribute("type"),media:t.getAttribute("media"),sizes:t.getAttribute("sizes")}}).get(),n.$image.find("img")):n.$image,n.src=r.attr(n.tmpl.opt.src)||n.src,n.srcset=r.attr(n.tmpl.opt.srcset)||n.srcset,n.width=parseInt(r.attr("width"))||n.width,n.height=parseInt(r.attr("height"))||n.height,n.title=r.attr("title")||n.title,n.alt=r.attr("alt")||n.alt,n.caption=e.title||e.captionTitle||n.caption,n.description=e.description||e.captionDesc||n.description,n.noLightbox=n.$anchor.hasClass(t.noLightbox),n.panelHide=n.$anchor.hasClass(t.panelHide),w.exif(e.exif)&&(n.exif=o.extend(n.exif,e.exif),n.hasExif=!0),0<n.maxCaptionLength&&((e=x.trimTo(n.caption,n.maxCaptionLength))!==n.caption&&n.$caption.find(i.caption.title).html(e)),!n.maxDescriptionLength||(e=x.trimTo(n.description,n.maxDescriptionLength))!==n.description&&n.$caption.find(i.caption.description).html(e),r.get(0)),e=(w.string(i.src)&&0!==i.src.length||(w.string(n.placeholder)&&0!==n.placeholder.length||(n.placeholder=n.createPlaceholder(n.width,n.height)),0<n.placeholder.length&&(i.src=n.placeholder,n._undo.placeholder=!0)),n.getTypeClass());return n.$el.hasClass(e)||n.$el.addClass(e),n.hasExif&&!n.$el.hasClass(t.exif)&&n.$el.addClass(t.exif),!n.isCreated||!n.isAttached||n.isLoading||n.isLoaded||n.isError||n.$el.hasClass(t.idle)||n.$el.addClass(t.idle),n.doShortPixel(),!0},create:function(){var e=this;return!e.isCreated&&w.string(e.href)&&w.string(e.src)&&w.number(e.width)&&w.number(e.height)&&(e.tmpl.trigger("create-item",[e]).isDefaultPrevented()||(e.isCreated=e.doCreateItem()),e.isCreated&&e.tmpl.trigger("created-item",[e])),e.isCreated},_setAttributes:function(t,n){Object.keys(n).forEach(function(e){w.empty(n[e])||t.setAttribute(e,w.string(n[e])?n[e]:JSON.stringify(n[e]))})},doShortPixel:function(){var e,t=this;function n(e,t,n){return"/"===t||"/"===n?"/":t}t.tmpl.opt.shortpixel&&!b.supportsWebP&&(t.href=t.href.replace(e=/([\/,+])to_webp([\/,+])/i,n),t.src=t.src.replace(e,n),t.srcset=t.srcset.replace(e,n))},doCreateItem:function(){var i,u,r=this,e=r.cls,t=r.attr,n=r.hasExif?e.exif:"",o=(r.isLoaded=!r.tmpl.opt.lazy,r.isPicture=0<r.sources.length,r.doShortPixel(),document.createElement("div")),n=(r._setAttributes(o,t.elem),o.className=[e.elem,r.getTypeClass(),n,r.isLoaded?e.loaded:e.idle].join(" "),document.createElement("figure")),s=(r._setAttributes(n,t.inner),n.className=e.inner,[e.anchor]),a=(r.noLightbox&&s.push(e.noLightbox),r.panelHide&&s.push(e.panelHide),document.createElement("a")),s=(r._setAttributes(a,t.anchor),r._setAttributes(a,{class:s.join(" "),href:r.href,"data-id":r.id,"data-type":r.type,"data-title":r.caption,"data-description":r.description,"data-tags":r.tags,"data-exif":r.exif,"data-product-id":r.productId}),w.string(r.placeholder)&&0!==r.placeholder.length||(r.placeholder=r.createPlaceholder(r.width,r.height)),document.createElement("img")),l=(r._setAttributes(s,t.image),{class:e.image,src:r.placeholder,width:r.width+"",height:r.height+"",title:r.title,alt:r.alt}),l=(r.isLoaded?(l.src=r.src,l.srcset=r.srcset):(l[r.tmpl.opt.src]=r.src,l[r.tmpl.opt.srcset]=r.srcset),r._setAttributes(s,l),r.isPicture&&(i=document.createElement("picture"),r._setAttributes(i,t.picture),r.sources.forEach(function(e){var t=document.createElement("source"),n={media:e.media,sizes:e.sizes,type:e.type};r.isLoaded?n.srcset=e.srcset:n[r.tmpl.opt.srcset]=e.srcset,r._setAttributes(t,n),i.appendChild(t)}),i.appendChild(s)),r.hasRibbon&&((u=document.createElement("div")).className=r.ribbon.type,(l=document.createElement("span")).innerHTML=r.ribbon.text,u.appendChild(l)),document.createElement("span")),h=(l.className=e.overlay,document.createElement("span")),p=(h.className=e.wrap,document.createElement("div")),d=(p.className=e.loader,document.createElement("figcaption")),f=(r._setAttributes(d,t.caption.elem),d.className=e.caption.elem,document.createElement("div")),c=(r._setAttributes(f,t.caption.inner),f.className=e.caption.inner,null),g=r.showCaptionTitle&&w.string(r.caption)&&0<r.caption.length,c=(g&&(c=document.createElement("div"),r._setAttributes(c,t.caption.title),c.className=e.caption.title,c.innerHTML=0<r.maxCaptionLength?x.trimTo(r.caption,r.maxCaptionLength):r.caption,f.appendChild(c)),null),m=r.showCaptionDescription&&w.string(r.description)&&0<r.description.length,v=(m&&(c=document.createElement("div"),r._setAttributes(c,t.caption.description),c.className=e.caption.description,c.innerHTML=0<r.maxDescriptionLength?x.trimTo(r.description,r.maxDescriptionLength):r.description,f.appendChild(c)),null),t=w.array(r.buttons)&&0<r.buttons.length;return t&&((v=document.createElement("div")).className=e.caption.buttons,_.each(r.buttons,function(e){var t;w.hash(e)&&w.string(e.text)&&((t=document.createElement("a")).innerHTML=e.text,w.string(e.url)&&0<e.url.length&&(t.href=e.url),w.string(e.rel)&&0<e.rel.length&&(t.rel=e.rel),w.string(e.target)&&0<e.target.length&&(t.target=e.target),w.string(e.classes)&&0<e.classes.length&&(t.className=e.classes),w.hash(e.attr)&&r._setAttributes(t,e.attr),v.appendChild(t))}),f.appendChild(v)),d.appendChild(f),r.isPicture?h.appendChild(i):h.appendChild(s),a.appendChild(l),a.appendChild(h),n.appendChild(a),(g||m||t)&&n.appendChild(d),r.hasRibbon&&o.appendChild(u),o.appendChild(n),o.appendChild(p),r.$el=y(o).data(b.DATA_ITEM,r),r.el=o,r.$inner=y(n),r.$anchor=y(a).on("click.foogallery",{self:r},r.onAnchorClick),r.$overlay=y(l),r.$wrap=y(h),r.isPicture?r.$image=y(i):r.$image=y(s),r.$caption=y(d).on("click.foogallery",{self:r},r.onCaptionClick),r.$loader=y(p),!0},append:function(){var e=this;return e.isCreated&&!e.isAttached&&(e.tmpl.trigger("append-item",[e]).isDefaultPrevented()||(e.tmpl.$el.append(e.$el.removeClass(e.cls.hidden)),e.isAttached=!0),e.isAttached&&(e.isLoaded||e.tmpl.items.observe(e),e.tmpl.trigger("appended-item",[e]))),e.isAttached},detach:function(){var e=this;return e.isCreated&&e.isAttached&&(e.tmpl.items.unobserve(e),e.tmpl.trigger("detach-item",[e]).isDefaultPrevented()||(e.$el.detach().removeClass(e.cls.hidden),e.isAttached=!1),e.isAttached||e.tmpl.trigger("detached-item",[e])),!e.isAttached},load:function(){var n=this;return w.promise(n._load)?n._load:n._load=y.Deferred(function(t){return n.isLoaded?t.resolve(n):n.isCreated&&n.isAttached?n.tmpl.trigger("load-item",[n]).isDefaultPrevented()?t.reject("default prevented"):(n.isLoading=!0,n.tmpl.items.unobserve(n),n.$el.removeClass(n.cls.idle).removeClass(n.cls.hidden).removeClass(n.cls.loaded).removeClass(n.cls.error).addClass(n.cls.loading),void n.loadIMG().then(function(){n.isLoading=!1,n.isLoaded=!0,n.$el.removeClass(n.cls.loading).addClass(n.cls.loaded),n.tmpl.trigger("loaded-item",[n]),t.resolve(n)},function(e){n.isLoading=!1,n.isError=!0,n.$el.removeClass(n.cls.loading).addClass(n.cls.error),n.tmpl.trigger("error-item",[n]),t.reject(e)})):t.reject("not created or attached")}).promise()},loadIMG:function(){var o=this;return new y.Deferred(function(e){var t=(o.isPicture?o.$image.find("img"):o.$image).get(0);if(!t)return e.reject("Unable to find img element.");var n=t.src,i=t.srcset,r=(t.onload=function(){t.onload=t.onerror=null,t.style.removeProperty("width"),t.style.removeProperty("height"),e.resolve(t)},t.onerror=function(){t.onload=t.onerror=null,w.empty(n)?t.removeAttribute("src"):t.src=n,w.empty(i)?t.removeAttribute("srcset"):t.srcset=i,e.reject(t)},o.isPicture&&o.$image.find("source").each(function(e,t){var n=t.getAttribute(o.tmpl.opt.srcset);w.empty(n)||(t.srcset=n)}),t.getBoundingClientRect());t.style.width=r.width,t.style.height=r.height,t.src=o.src,w.empty(o.srcset)||(t.srcset=o.srcset),t.complete&&t.onload()}).promise()},createPlaceholder:function(e,t){return w.number(e)&&w.number(t)?"data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22"+e+"%22%20height=%22"+t+"%22%20viewBox=%220%200%20"+e+"%20"+t+"%22%3E%3C/svg%3E":""},getTypeClass:function(){return this.cls.types[this.type]||""},scrollTo:function(e){var t;return this.isAttached&&((t=this.$el.get(0)).scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded():t.scrollIntoView("top"===e)),this},updateState:function(){this.tmpl.state.update(this.tmpl.state.get(this))},toJSON:function(){return{type:this.type,id:this.id,productId:this.productId,href:this.href,src:this.src,srcset:this.srcset,width:this.width,height:this.height,alt:this.alt,title:this.title,caption:this.caption,description:this.description,tags:this.tags.slice(),maxCaptionLength:this.maxCaptionLength,maxDescriptionLength:this.maxDescriptionLength,showCaptionTitle:this.showCaptionTitle,showCaptionDescription:this.showCaptionDescription,noLightbox:this.noLightbox,panelHide:this.panelHide,attr:o.extend({},this.attr)}},onAnchorClick:function(e){var t=e.data.self;t.tmpl.trigger("anchor-click-item",[t]).isDefaultPrevented()?e.preventDefault():t.updateState()},onCaptionClick:function(e){var t=e.data.self;!t.tmpl.trigger("caption-click-item",[t]).isDefaultPrevented()&&0<t.$anchor.length&&!y(e.target).is("a[href],:input")&&t.$anchor.get(0).click()}}),b.template.configure("core",{item:{type:"item",id:"",href:"",placeholder:"",src:"",srcset:"",sources:[],width:0,height:0,title:"",alt:"",caption:"",description:"",tags:[],maxCaptionLength:0,maxDescriptionLength:0,showCaptionTitle:!0,showCaptionDescription:!0,noLightbox:!1,panelHide:!1,buttons:[],ribbon:{type:null,text:null},exif:{aperture:null,camera:null,created_timestamp:null,shutter_speed:null,focal_length:null,iso:null,orientation:null},attr:{elem:{},inner:{},anchor:{},image:{},picture:{},caption:{elem:{},inner:{},title:{},description:{}}}}},{item:{elem:"fg-item",inner:"fg-item-inner",exif:"fg-item-exif",anchor:"fg-thumb",overlay:"fg-image-overlay",wrap:"fg-image-wrap",image:"fg-image",loader:"fg-loader",idle:"fg-idle",loading:"fg-loading",loaded:"fg-loaded",error:"fg-error",hidden:"fg-hidden",noLightbox:"fg-no-lightbox",panelHide:"fg-panel-hide",types:{item:"fg-type-unknown"},caption:{elem:"fg-caption",inner:"fg-caption-inner",title:"fg-caption-title",description:"fg-caption-desc",buttons:"fg-caption-buttons",button:"fg-caption-button"}}},{item:{exif:{aperture:"Aperture",camera:"Camera",created_timestamp:"Date",shutter_speed:"Exposure",focal_length:"Focal Length",iso:"ISO",orientation:"Orientation"}}}),b.components.register("item",b.Item)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,(FooGallery.utils.fn,FooGallery.utils.obj),FooGallery.utils.str),function(e){e.Image=e.Item.extend({}),e.template.configure("core",null,{item:{types:{image:"fg-type-image"}}}),e.components.register("image",e.Image)}((FooGallery.$,FooGallery),(FooGallery.utils,FooGallery.utils.is)),function(e,c,u){e.PagingFactory=e.Factory.extend({construct:function(){this.registered={}},register:function(e,t,n,i,r,o,s){t=this._super(e,t,s);return t&&((s=this.registered)[e].ctrl=c.fn(n)?n:null,s[e].opt=c.hash(i)?i:{},s[e].cls=c.hash(r)?r:{},s[e].il8n=c.hash(o)?o:{}),t},type:function(e){var t;return c.hash(e)&&c.hash(t=e.paging)&&c.string(t.type)&&this.contains(t.type)?t.type:null},merge:function(e){e=u.extend({},e);var t=this.type(e),n=this.registered,i=n.default.opt,r=n.default.cls,o=n.default.il8n,s=c.hash(e.paging)?e.paging:{},a=c.hash(e.cls)&&c.hash(e.cls.paging)?u.extend({},e.cls.paging):{},l=c.hash(e.il8n)&&c.hash(e.il8n.paging)?u.extend({},e.il8n.paging):{};return c.hash(e.cls)||(e.cls={}),c.hash(e.il8n)||(e.il8n={}),"default"!==t&&this.contains(t)?(e.paging=u.extend({},i,n[t].opt,s,{type:t}),e.cls=u.extend(e.cls,{paging:r},{paging:n[t].cls},{paging:a}),e.il8n=u.extend(e.il8n,{paging:o},{paging:n[t].il8n},{paging:l})):(e.paging=u.extend({},i,s,{type:t}),e.cls=u.extend(e.cls,{paging:r},{paging:a}),e.il8n=u.extend(e.il8n,{paging:o},{paging:l})),e},configure:function(e,t,n,i){var r;this.contains(e)&&(r=this.registered,u.extend(r[e].opt,t),u.extend(r[e].cls,n),u.extend(r[e].il8n,i))},hasCtrl:function(e){e=this.registered[e];return c.hash(e)&&c.fn(e.ctrl)},makeCtrl:function(e,t,n,i){e=this.registered[e];return c.hash(e)&&c.fn(e.ctrl)?new e.ctrl(t,n,i):null}}),e.paging=new e.PagingFactory}(FooGallery,FooGallery.utils.is,(FooGallery.utils.fn,FooGallery.utils.obj)),function(t,o,i,l){o.Paging=o.Component.extend({construct:function(e){var t=this;t._super(e),t.opt=t.tmpl.opt.paging,t.cls=t.tmpl.cls.paging,t.il8n=t.tmpl.il8n.paging,t.sel=t.tmpl.sel.paging,t.pushOrReplace=t.opt.pushOrReplace,t.type=t.opt.type,t.theme=t.opt.theme,t.size=t.opt.size,t.position=t.opt.position,t.scrollToTop=t.opt.scrollToTop,t.current=0,t.total=0,t.ctrls=[],t._pages=[]},init:function(){},fromHash:function(e){e=parseInt(e);return isNaN(e)?null:e},toHash:function(e){return l.number(e)&&0<e?e.toString():null},getState:function(){return this.isValid(this.current)?this.current:null},setState:function(e){this.rebuild();var t=!1;e.item&&!this.contains(e.page,e.item)&&(e.page=this.find(e.item),e.page=0!==e.page?e.page:1,t=!0),this.set(e.page,t,!1,!1)},destroy:function(){var e=this;e._pages.splice(0,e._pages.length),t.each(e.ctrls.splice(0,e.ctrls.length),function(e,t){t.destroy()}),e._super()},build:function(){var e=this,t=e.tmpl.items.available();e.total=0<e.size&&0<t.length?Math.ceil(t.length/e.size):1;for(var n,i,r=0;r<e.total;r++)e._pages.push(t.splice(0,e.size));1<e.total&&o.paging.hasCtrl(e.type)&&("both"!==(n=e.position)&&"top"!==n||(i=o.paging.makeCtrl(e.type,e.tmpl,e,"top")).create()&&(i.append(),e.ctrls.push(i)),"both"!==n&&"bottom"!==n||(i=o.paging.makeCtrl(e.type,e.tmpl,e,"bottom")).create()&&(i.append(),e.ctrls.push(i)))},rebuild:function(){var e=this;e.current=0,e.total=0,e._pages.splice(0,e._pages.length),t.each(e.ctrls.splice(0,e.ctrls.length),function(e,t){t.destroy()}),e.build()},all:function(){return this._pages.slice()},available:function(){return this.get(this.current)},controls:function(n){this.isValid(n)&&t.each(this.ctrls,function(e,t){t.update(n)})},isValid:function(e){return l.number(e)&&0<e&&e<=this.total},number:function(e){return this.isValid(e)?e:0===this.current?1:this.current},create:function(e,t){var n=this,i=(e=n.number(e))-1,r=n._pages[i],t=t?n.tmpl.items.all():n._pages.reduce(function(e,t,n){return n===i?e:e.concat(t)},n.tmpl.items.unavailable());n.current=e,n.tmpl.items.detach(t),n.tmpl.items.create(r,!0)},get:function(e){return this.isValid(e)?(e=this.number(e),this._pages[e-1]):[]},set:function(e,t,n,i){var r=this;if(r.isValid(e)){r.controls(e);var o,s,a=r.number(e);if(a!==r.current)return s=r.current,!r.tmpl.trigger("before-page-change",[r.current,a,e=function(){var e;n=!l.boolean(n)||n,i=!!l.boolean(i)&&i,n&&1===r.current&&!r.tmpl.state.exists()&&(o=r.tmpl.state.get(),r.tmpl.state.update(o,r.pushOrReplace)),r.create(a,i),n&&(o=r.tmpl.state.get(),r.tmpl.state.update(o,r.pushOrReplace)),r.tmpl.trigger("page-change",[r.current,s,i]),r.scrollToTop&&l.boolean(t)&&t&&(0<(e=r.get(r.current)).length&&e[0].scrollTo("top")),r.tmpl.trigger("after-page-change",[r.current,s,i])},i]).isDefaultPrevented()&&(e(),!0)}return!1},find:function(e){for(var t=0,n=this._pages.length;t<n;t++)if(-1!==i.inArray(e,this._pages[t]))return t+1;return 0},contains:function(e,t){e=this.get(e);return-1!==i.inArray(t,e)},first:function(){this.goto(1)},last:function(){this.goto(this._pages.length)},prev:function(){this.goto(this.current-1)},next:function(){this.goto(this.current+1)},goto:function(e){this.set(e,!0)}}),o.PagingControl=o.Component.extend({construct:function(e,t,n){var i=this;i._super(e),i.pages=t,i.position=n,i.$container=null,i._containerExisted=!1,i._placeholderClasses=[]},create:function(){var n=this;return n.$container=t("#"+n.tmpl.id+"_paging-"+n.position),0<n.$container.length?(n._containerExisted=!0,n.$container.removeClass(function(e,t){return n._placeholderClasses=t.match(/(^|\s)fg-ph-\S+/g)||[],n._placeholderClasses.join(" ")}).addClass([n.pages.cls.container,n.pages.theme].join(" "))):n.$container=t("<nav/>",{class:[n.pages.cls.container,n.pages.theme].join(" ")}),!0},destroy:function(){var e=this;e._containerExisted?e.$container.empty().removeClass().addClass(e._placeholderClasses.join(" ")):e.$container.remove(),e.$container=null},append:function(){var e=this;e._containerExisted||("top"===e.position?e.$container.insertBefore(e.tmpl.$el):e.$container.insertAfter(e.tmpl.$el))},update:function(e){}}),o.paging.register("default",o.Paging,null,{type:"none",theme:"fg-light",size:30,pushOrReplace:"push",position:"none",scrollToTop:!0},{container:"fg-paging-container"},null,-100)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is),function(l,e,a){e.Dots=e.Paging.extend({}),e.DotsControl=e.PagingControl.extend({construct:function(e,t,n){this._super(e,t,n),this.$list=null,this.$items=null},create:function(){var e=this;if(e._super()){for(var t,n=e.pages.cls,i=e.pages.il8n,r=[],o=l("<ul/>",{class:n.list}),s=0,a=e.pages.total;s<a;s++)r.push(t=e.createItem(s+1,i.page)),o.append(t);return e.$list=o,e.$items=l(l.map(r,function(e){return e.get()})),e.$container.append(o),!0}return!1},destroy:function(){var e=this,t=e.pages.sel;e.$list.find(t.link).off("click.foogallery",e.onLinkClick),e.$list=l(),e.$items=l(),e._super()},update:function(e){this.setSelected(e-1)},setSelected:function(e){var t=this,n=t.pages.cls,r=t.pages.il8n,o=t.pages.sel;t.$items.filter(o.selected).removeClass(n.selected).each(function(e,t){var t=l(t),n=t.data("label"),t=t.find(o.reader);a.string(n)&&0!==t.length&&t.html(n)}),t.$items.eq(e).addClass(n.selected).each(function(e,t){var t=l(t),n=t.find(o.reader),i=n.html();a.string(i)&&0!==n.length&&(t.data("label",i),n.html(r.current))})},createItem:function(e,t,n,i,r){n=a.string(n)?n:e,t=a.string(t)?t:"";var o=this.pages.opt,s=this.pages.cls,n=l("<a/>",{class:s.link,href:"#page-"+e}).html(n).on("click.foogallery",{self:this,page:e},this.onLinkClick),e=(a.empty(t)||n.attr("title",t.replace(/\{PAGE}/g,e).replace(/\{LIMIT}/g,o.limit+"")),r=a.string(r)?r:t,a.empty(r)||n.prepend(l("<span/>",{class:s.reader,text:r.replace(/\{PAGE}/g,"").replace(/\{LIMIT}/g,o.limit+"")})),l("<li/>",{class:s.item}).append(n));return i=a.string(i)?i:"",a.empty(i)||e.addClass(i),e},onLinkClick:function(e){e.preventDefault();var t=e.data.self,e=e.data.page,n=t.pages.sel;l(this).closest(n.item).is(n.disabled)||t.pages.set(e,!0)}}),e.paging.register("dots",e.Dots,e.DotsControl,{type:"dots",position:"both",pushOrReplace:"push"},{list:"fg-dots",item:"fg-dot-item",link:"fg-dot-link",disabled:"fg-disabled",selected:"fg-selected",visible:"fg-visible",reader:"fg-sr-only"},{current:"Current page",page:"Page {PAGE}"})}(FooGallery.$,FooGallery,(FooGallery.utils,FooGallery.utils.is)),function(e){e.DefaultTemplate=e.Template.extend({}),e.template.register("default",e.DefaultTemplate,null,{container:"foogallery fg-default"})}((FooGallery.$,FooGallery),FooGallery.utils),function(e){e.MasonryTemplate=e.Template.extend({construct:function(e,t){var n=this;n._super(e,t),n.masonry=null,n.on({"pre-init":n.onPreInit,destroyed:n.onDestroyed,"appended-items":n.onAppendedItems,"detach-item":n.onDetachItem,"layout after-filter-change":n.onLayoutRequired,"page-change":n.onPageChange},n)},onPreInit:function(){var e=this,t=e.sel,n=e.$el.hasClass("fg-fixed");e.template.isFitWidth=n,e.template.percentPosition=!n,e.template.transitionDuration=0,e.template.itemSelector=t.item.elem,n||(e.template.gutter=t.gutterWidth,e.template.columnWidth=t.columnWidth),e.masonry=new Masonry(e.el,e.template)},onDestroyed:function(){this.masonry instanceof Masonry&&this.masonry.destroy()},onLayoutRequired:function(){this.masonry.layout()},onPageChange:function(e,t,n,i){i||this.masonry.layout()},onAppendedItems:function(e,t){t=t.map(function(e){return e.el}),t=this.masonry.addItems(t);this.masonry.layoutItems(t,!0)},onDetachItem:function(e,t){e.isDefaultPrevented()||(e.preventDefault(),this.masonry.remove(t.el),t.$el.removeClass(this.cls.hidden),t.isAttached=!1)}}),e.template.register("masonry",e.MasonryTemplate,{template:{}},{container:"foogallery fg-masonry",columnWidth:"fg-column-width",gutterWidth:"fg-gutter-width"})}((FooGallery.$,FooGallery),(FooGallery.utils,FooGallery.utils.is)),function(i,r,e,o){r.Justified=e.Class.extend({construct:function(e,t){var n=this;n.tmpl=e,n.$el=e.$el,n.options=i.extend(!0,{},r.Justified.defaults,t),n._items=[],n.maxRowHeight=0,n.borderSize=0,n.align=-1!==["left","center","right"].indexOf(n.options.align)?n.options.align:"center"},init:function(){var e=this;e.maxRowHeight=e.getMaxRowHeight(e.options.maxRowHeight,e.options.rowHeight),e.borderSize=e.getBorderSize()},destroy:function(){this.$el.removeAttr("style")},getBorderSize:function(){switch(this.tmpl.getCSSClass("border","")){case"fg-border-thin":return 4;case"fg-border-medium":return 10;case"fg-border-thick":return 16;default:return 0}},getMaxRowHeight:function(e,t){var n;return o.string(e)?(n=parseInt(e),isNaN(n)?t:n<=0?1/0:-1!==e.indexOf("%")?t*(n/100):n):o.number(e)?e<=0?1/0:e:t},layout:function(e){var n,i=this;0<(e=!o.number(e)?i.$el.width():e)&&(0!==(n=i.createRows(e)).height&&0<n.rows.length&&(i.$el.height(n.height),n.rows.forEach(function(e,t){i.render(e,t===n.rows.length-1)})))},render:function(t,e){var n=this,i=!e&&"justify"!==n.options.lastRow;t.items.forEach(function(e){e.elem&&(t.visible?(e.elem.style.setProperty("position","absolute"),e.elem.style.setProperty("width",e.width+"px"),e.elem.style.setProperty("height",e.height+"px"),e.elem.style.setProperty("top",e.top+"px"),e.elem.style.setProperty("left",e.left+"px"),e.elem.style.setProperty("margin","0"),e.elem.style.removeProperty("display"),0<n.maxRowHeight&&i?e.elem.style.setProperty("max-height",n.maxRowHeight+2*n.borderSize+"px"):e.elem.style.removeProperty("max-height"),e.elem.classList.contains("fg-positioned")||e.elem.classList.add("fg-positioned")):e.elem.style.setProperty("display","none"))})},justify:function(n,i,e,t){var r=this,o=r.options.margins,s=o*(n.items.length-1),e=e-s,a=n.width-s,l=e/a,c=(n.width=a*l,n.height=n.height*l,n.height>t+2*r.borderSize&&(a=(t+2*r.borderSize)/n.height,n.width=n.width*a,n.height=n.height*a),n.top=i,n.left=0,"left"!==r.align&&n.width<e&&("right"===r.align?n.left=e-n.width:n.left=(e-n.width)/2),n.width+=s,n.left);return n.items.forEach(function(e,t){0<t&&(c+=o),e.left=c,e.top=i;t=n.height/e.height;e.width=e.width*t,e.height=e.height*t,c+=e.width}),n.height},createRows:function(o){var s=this,a=s.options.margins,i=s.tmpl.getAvailable(),l=[],r=-1;function p(){return{index:++r,visible:!0,width:0,height:s.options.rowHeight+2*s.borderSize,top:0,left:0,items:[]}}var c=p(),u=0,h=0;if(i.forEach(function(e){r=c.height,t=e.width,(n=e.height)!==r&&(n*=i=r/n,t*=i),i=s.maxRowHeight/r;var t,n,i,r={__item:e,elem:e.el,width:t,height:n,maxWidth:t*i,maxHeight:n*i,top:0,left:0};c.width+r.width>o&&0<c.items.length&&(0<l.length&&(u+=a),e=s.justify(c,u,o,s.maxRowHeight),h<e&&(h=e),u+=e,l.push(c),c=p()),0<c.items.length&&(c.width+=a),c.width+=r.width,c.items.push(r)}),0<c.items.length){var e=u+a;switch(s.options.lastRow){case"smart":var t,d,n=s.justify(c,e,o,s.maxRowHeight);0!==h&&h<n&&(t=h/n,d=c.width*t/o,(t<.9||d<.9)&&(n=s.justify(c,e,o,h-2*s.borderSize)));break;case"justify":n=s.justify(c,e,o,99999);break;case"hide":n=s.justify(c,e,o,s.maxRowHeight),c.width<o&&(c.visible=!1)}c.visible&&(u+=n+a),l.push(c)}return{height:u,rows:l}}}),r.Justified.defaults={rowHeight:150,maxRowHeight:"200%",margins:0,align:"center",lastRow:"smart"}}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is),function(e){e.JustifiedTemplate=e.Template.extend({construct:function(e,t){var n=this;n._super(e,t),n.justified=null,n.on({"pre-init":n.onPreInit,init:n.onInit,destroyed:n.onDestroyed,"layout after-filter-change":n.onLayoutRequired,"page-change":n.onPageChange},n)},onPreInit:function(){this.justified=new e.Justified(this,this.template)},onInit:function(){this.justified.init()},onDestroyed:function(){this.justified instanceof e.Justified&&this.justified.destroy()},onLayoutRequired:function(){this.justified.layout(this.lastWidth)},onPageChange:function(e,t,n,i){i||this.justified.layout(this.lastWidth)}}),e.template.register("justified",e.JustifiedTemplate,null,{container:"foogallery fg-justified"})}((FooGallery.$,FooGallery)),function(e){e.PortfolioTemplate=e.Template.extend({}),e.template.register("simple_portfolio",e.PortfolioTemplate,{},{container:"foogallery fg-simple_portfolio"})}((FooGallery.$,FooGallery),(FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn)),function(i,e,r){e.ImageViewerTemplate=e.Template.extend({construct:function(e,t){var n=this;n._super(r.extend({},e,{paging:{pushOrReplace:"replace",theme:"fg-light",type:"default",size:1,position:"none",scrollToTop:!1}}),t),n.$inner=i(),n.$current=i(),n.$total=i(),n.$prev=i(),n.$next=i(),n.on({"pre-init":n.onPreInit,init:n.onInit,destroy:n.onDestroy,"append-item":n.onAppendItem,"after-page-change":n.onAfterPageChange,"after-filter-change":n.onAfterFilterChange},n)},createChildren:function(){var e=this;return i("<div/>",{class:e.cls.inner}).append(i("<div/>",{class:e.cls.innerContainer}),i("<div/>",{class:e.cls.controls}).append(i("<div/>",{class:e.cls.prev}).append(i("<span/>",{text:e.il8n.prev})),i("<label/>",{class:e.cls.count,text:e.il8n.count}).prepend(i("<span/>",{class:e.cls.countCurrent,text:"0"})).append(i("<span/>",{class:e.cls.countTotal,text:"0"})),i("<div/>",{class:e.cls.next}).append(i("<span/>",{text:e.il8n.next}))))},destroyChildren:function(){this.$el.find(this.sel.inner).remove()},onPreInit:function(e){var t=this;t.$inner=t.$el.find(t.sel.innerContainer),t.$current=t.$el.find(t.sel.countCurrent),t.$total=t.$el.find(t.sel.countTotal),t.$prev=t.$el.find(t.sel.prev),t.$next=t.$el.find(t.sel.next)},onInit:function(e){var t=this;t.template.attachFooBox&&t.$el.on("foobox.previous",{self:t},t.onFooBoxPrev).on("foobox.next",{self:t},t.onFooBoxNext),t.$prev.on("click",{self:t},t.onPrevClick),t.$next.on("click",{self:t},t.onNextClick)},onDestroy:function(e){var t=this;t.template.attachFooBox&&t.$el.off({"foobox.previous":t.onFooBoxPrev,"foobox.next":t.onFooBoxNext}),t.$prev.off("click",t.onPrevClick),t.$next.off("click",t.onNextClick)},onAppendItem:function(e,t){e.preventDefault(),this.$inner.append(t.$el),t.isAttached=!0},onAfterPageChange:function(e,t,n,i){i||this.update()},onAfterFilterChange:function(e){this.update()},update:function(){this.pages&&(this.$current.text(this.pages.current),this.$total.text(this.pages.total))},prev:function(){this.pages&&(this.template.loop&&1===this.pages.current?this.pages.last():this.pages.prev(),this.update())},next:function(){this.pages&&(this.template.loop&&this.pages.current===this.pages.total?this.pages.first():this.pages.next(),this.update())},onFooBoxPrev:function(e){e.data.self.prev()},onFooBoxNext:function(e){e.data.self.next()},onPrevClick:function(e){e.preventDefault(),e.stopPropagation(),e.data.self.prev()},onNextClick:function(e){e.preventDefault(),e.stopPropagation(),e.data.self.next()}}),e.template.register("image-viewer",e.ImageViewerTemplate,{template:{attachFooBox:!1,loop:!1}},{container:"foogallery fg-image-viewer",inner:"fiv-inner",innerContainer:"fiv-inner-container",controls:"fiv-ctrls",prev:"fiv-prev",next:"fiv-next",count:"fiv-count",countCurrent:"fiv-count-current",countTotal:"fiv-count-total"},{prev:"Prev",next:"Next",count:"of"})}(FooGallery.$,FooGallery,(FooGallery.utils,FooGallery.utils.obj)),function(e,n){e.ThumbnailTemplate=e.Template.extend({construct:function(e,t){this._super(n.extend({},e,{filtering:{type:"none"},paging:{pushOrReplace:"replace",theme:"fg-light",type:"default",size:1,position:"none",scrollToTop:!1}}),t)}}),e.template.register("thumbnail",e.ThumbnailTemplate,null,{container:"foogallery fg-thumbnail"})}((FooGallery.$,FooGallery),FooGallery.utils.obj),function(i,o,e,l,r,s){o.StackAlbum=e.Class.extend({construct:function(e,t){var n=this;n.$el=l.jq(e)?e:i(e),n.el=n.$el.get(0),n.opt=r.extend({},o.StackAlbum.defaults,t,n.$el.data("foogallery")),n.$back=n.$el.find(".fg-header-back"),n.$active=n.$el.find(".fg-header-active"),n.$piles=n.$el.find(".fg-piles"),n.piles=n.$piles.find(".fg-pile").map(function(e,t){return new o.StackAlbum.Pile(n,t,{index:e})}).get(),n.ignoreResize=!1,n.robserver=new ResizeObserver(function(){!n.ignoreResize&&n.$el.is(":visible")&&n.layout(!0)})},init:function(){var e=this;e.piles.forEach(function(e){e.init()}),e.$back.on("click.foogallery",{self:e},e.onBackClick),e.robserver.observe(e.el)},destroy:function(){this.robserver.disconnect(),this.$back.off(".foogallery"),this.piles.forEach(function(e){e.destroy()})},getLayoutInfo:function(){var e=this,t=e.opt.gutter+2*e.opt.border;return{maxWidth:e.$el.width(),space:t,halfSpace:t/2,itemWidth:e.opt.itemWidth,itemHeight:e.opt.itemHeight,itemOuterWidth:e.opt.itemWidth+2*e.opt.border,itemOuterHeight:e.opt.itemHeight+2*e.opt.border,blockWidth:e.opt.itemWidth+t,blockHeight:e.opt.itemHeight+t,border:e.opt.border,doubleBorder:2*e.opt.border,gutter:e.opt.gutter,halfGutter:e.opt.gutter/2}},layout:function(e){var t,n=this;e&&(n.$el.addClass("fg-disable-transitions"),n.$el.prop("offsetWidth")),n.hasActive?(t=n.activePile.layout(),n.activePile.setPosition(0,0,t.width,t.height)):t=n.layoutPiles(),n.$piles.css({width:t.width+"px",height:t.height+"px"}),e&&n.$el.removeClass("fg-disable-transitions")},layoutPiles:function(i){var r=this.getLayoutInfo(),o=0,s=1,a=0;return i=l.fn(i)?i:function(){},this.piles.forEach(function(e){var t=o,n=((o+=r.blockWidth)>r.maxWidth&&(t=0,o=r.blockWidth,s++),r.blockHeight*(s-1));i(e,n,t,r.blockWidth,r.blockHeight),e.setPosition(n,t,r.blockWidth,r.blockHeight),a<o&&(a=o)}),{width:a,height:r.blockHeight*s}},setActive:function(t){var n,i=this,e=i.activePile,r=e instanceof o.StackAlbum.Pile;t=t instanceof o.StackAlbum.Pile?t:null,i.activePile=t,i.hasActive=null!==t,r&&e.collapse(),i.ignoreResize=!0,i.hasActive?(i.piles.forEach(function(e){e!==t&&e.hide(i.activePile)}),n=i.activePile.expand(),i.$active.text(t.title),i.$el.addClass("fg-has-active")):(n=i.layoutPiles(function(e){e.show()}),i.$el.removeClass("fg-has-active")),s.start(i.$piles,function(e){e.css({width:n.width+"px",height:n.height+"px"})},null,350).then(function(){i.ignoreResize=!1})},onBackClick:function(e){e.preventDefault(),e.stopPropagation(),e.data.self.setActive(null)}}),o.StackAlbum.defaults={gutter:50,itemWidth:150,itemHeight:150,border:10,angleStep:1,randomAngle:!1}}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.obj,FooGallery.utils.transition),function(r,o,e,s,a){o.StackAlbum.Pile=e.Class.extend({construct:function(e,t,n){var i=this;i.album=e,i.$el=s.jq(t)?t:r(t),i.opt=a.extend({},o.StackAlbum.Pile.defaults,n,i.$el.data()),i.title=i.opt.title,i.items=i.$el.find(".fg-pile-item").map(function(e,t){return new o.StackAlbum.Item(i,t,{index:e})}).get(),i.$cover=r("<div/>",{class:"fg-pile-cover"}).append(r("<div/>",{class:"fg-pile-cover-content"}).append(r("<span/>",{class:"fg-pile-cover-title",text:i.opt.title}),r("<span/>",{class:"fg-pile-cover-count",text:i.items.length}))),i.top=0,i.left=0,i.isExpanded=!1},init:function(){var n=this,i=n.album.opt,r=n.getAngles(i.angleStep),o=i.randomAngle?n.randomAngle(r):i.angleStep;n.$cover.on("click.foogallery",{self:n},n.onCoverClick),n.items.forEach(function(e,t){e.init(),3<t||(0===t?(e.$el.addClass("fg-has-cover").append(n.$cover),e.load()):(t%2==0?e.setAngle(-o):e.setAngle(o),i.randomAngle?o=n.randomAngle(r):o+=i.angleStep))})},destroy:function(){this.$cover.remove(),this.items.forEach(function(e,t){0===t&&e.$el.removeClass("fg-has-cover"),e.destroy()})},getAngles:function(e){for(var t=[],n=1;n<=3;n++)t.push(n*e);return t},randomAngle:function(e){var t=e.length,t=Math.floor(Math.random()*+t+0),e=e.splice(t,1);return 1===e.length?e[0]:0},setPosition:function(e,t,n,i){this.top=e,this.left=t,s.number(n)&&s.number(i)?this.$el.css({top:e+"px",left:t+"px",width:n+"px",height:i+"px"}):this.$el.css({top:e+"px",left:t+"px"})},layout:function(){var i=this.album.getLayoutInfo(),r=0,o=1,s=!1,a=0;return this.items.forEach(function(e){(r+=i.halfGutter)>i.maxWidth&&(r=i.halfGutter,o++,s=!0);var t=r,n=(r+=i.itemOuterWidth+i.halfGutter,!s&&r>i.maxWidth&&(t=i.halfGutter,r=i.blockWidth,o++),i.blockHeight*(o-1)+i.halfGutter);s=!1,e.setPosition(n,t,i.itemOuterWidth,i.itemOuterHeight),e.isLoaded||e.load(),a<r&&(a=r)}),{width:a,height:i.blockHeight*o}},expand:function(){var e;return this.$el.removeClass("fg-collapsed").addClass("fg-expanded"),e=this.layout(),this.setPosition(0,0,e.width,e.height),this.isExpanded=!0,e},collapse:function(){var e=this,t=e.album.getLayoutInfo(),n=(e.$el.removeClass("fg-expanded").addClass("fg-collapsed"),e.items.forEach(function(e){e.setPosition(t.halfGutter,t.halfGutter,t.itemOuterWidth,t.itemOuterHeight)}),{width:t.blockWidth,height:t.blockHeight});return e.setPosition(0,0,n.width,n.height),e.isExpanded=!1,n},show:function(){this.$el.removeClass("fg-hidden fg-expanded fg-collapsed")},hide:function(e){e instanceof o.StackAlbum.Pile&&this.setPosition(e.top,e.left),this.$el.addClass("fg-hidden")},onCoverClick:function(e){e.preventDefault(),e.stopPropagation();e=e.data.self;e.album.setActive(e)}}),o.StackAlbum.Pile.defaults={index:-1,title:null}}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.obj),function(r,o,e,s,a){o.StackAlbum.Item=e.Class.extend({construct:function(e,t,n){var i=this;i.$el=s.jq(t)?t:r(t),i.opt=a.extend({},o.StackAlbum.Item.defaults,n,i.$el.data()),i.$thumb=i.$el.find(".fg-pile-item-thumb"),i.$image=i.$el.find(".fg-pile-item-image"),i.isLoaded=!1,i.isLoading=!1,i._loading=null},init:function(){},destroy:function(){},setAngle:function(e){this.$el.css({transform:"rotate("+e+"deg)"})},setPosition:function(e,t,n,i){this.$el.css({top:e+"px",left:t+"px",width:n+"px",height:i+"px"})},load:function(){var t=this;return s.promise(t._loading)?t._loading:t._loading=r.Deferred(function(e){t.$el.addClass("fg-loading"),t.isLoading=!0,t.$image.on({"load.foogallery":function(){t.$image.off(".foogallery"),t.$el.removeClass("fg-loading"),t.isLoading=!1,t.isLoaded=!0,e.resolve()},"error.foogallery":function(){t.$image.off(".foogallery"),t.$el.removeClass("fg-loading"),t.isLoading=!1,t.isLoaded=!0,e.reject()}}),t.$image.prop("src",t.$image.attr(t.opt.src)).prop("srcset",t.$image.attr(t.opt.srcset))}).promise()}}),o.StackAlbum.Item.defaults={index:-1,src:"data-src-fg",srcset:"data-srcset-fg"}}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.obj),function(i,r,e){i.fn.foogalleryStackAlbum=function(e){return this.each(function(e,t){var t=i(t),n=t.data("__FooGalleryAlbum__");n instanceof r.StackAlbum&&n.destroy(),(n=new r.StackAlbum(t)).init(),t.data("__FooGalleryAlbum__",n)})},r.loadStackAlbums=r.reloadStackAlbums=function(){i(function(){i(".foogallery-stack-album:not(.fg-ready)").foogalleryStackAlbum()}),e.ready(function(){i(".foogallery-stack-album.fg-ready").foogalleryStackAlbum()})},r.loadStackAlbums()}(FooGallery.$,FooGallery,FooGallery.utils),function(u,e,o,d){o.Progress=o.EventClass.extend({construct:function(e){var t=this;t._super(),t.percent=0,t.tickRate=d.number(e)?e:100,t.isPaused=!1,t.isActive=!1,t._intervalId=null,t._total=0,t._target=null,t.onTick=t.onTick.bind(t)},destroy:function(){this._reset(),this._super()},_reset:function(){var e=this;null!==e._intervalId&&clearInterval(e._intervalId),e.percent=0,e._total=0,e._intervalId=null,e._target=null,e.isActive=!1,e.isPaused=!1},stop:function(){this.isActive&&(this._reset(),this.trigger("stop"))},start:function(e){var t=this;t.stop(),!t.isActive&&d.number(e)&&0<e&&(t._total=1e3*e,t._target=Date.now()+t._total,t._intervalId=setInterval(t.onTick,t.tickRate),t.isActive=!0,t.trigger("start"))},pause:function(){var e=this;e.isActive&&!e.isPaused&&e.percent<100&&(null!==e._intervalId&&clearInterval(e._intervalId),e._intervalId=null,e._target=null,e.isPaused=!0,e.trigger("pause"))},resume:function(){var e,t=this;t.isActive&&t.isPaused?(e=t._total-t._total*t.percent/100,t._target=Date.now()+e,t._intervalId=setInterval(t.onTick,t.tickRate),t.isPaused=!1,t.trigger("resume")):0<t._total&&t.start(t._total/1e3)},onTick:function(){var e=this,t=e._total-Math.max(e._target-Date.now(),0);e.percent=Math.min(t/e._total*100,100),e.trigger("tick",[e.percent]),100<=e.percent&&(null!==e._intervalId&&clearInterval(e._intervalId),e._intervalId=null,e._target=null,e.isActive=!1,e.trigger("complete"))}}),u.Carousel=o.Class.extend({construct:function(e,t,n,i){var r=this;r.tmpl=e,r.el=e.el,r.opt=t,r.cls=n,r.sel=i,r.elem={inner:null,center:null,bottom:null,prev:null,next:null,progress:null},r.activeItem=null,r._itemWidth=0,r._leftExclude=[r.sel.activeItem,r.sel.nextItem].join(","),r._rightExclude=[r.sel.activeItem,r.sel.prevItem].join(","),r._centerListeners=new o.DOMEventListeners,r._listeners=new o.DOMEventListeners,r._progress=new o.Progress,r._canHover=window.matchMedia("(hover: hover)").matches,r.cache=new Map,r.timeouts=new o.Timeouts,r.interacted=!1,r.isRTL=!1,r._firstLayout=!0},getScreenX:function(e,t,n){return n/(n+t)*e},getVectorX:function(e,t,n){return(n+t)/n*e},getSequentialZFromScale:function(e,t,n){return n*(t*(e+1))},scaleToZ:function(e,t,n){return e*(1-t/(n+t))},pause:function(){this._progress.pause()},resume:function(){this._progress.resume()},start:function(){"disable"===this.opt.autoplay.interaction&&this.interacted||this._progress.start(this.opt.autoplay.time)},stop:function(){this._progress.stop()},init:function(){var e=this;e.isRTL="rtl"===window.getComputedStyle(e.el).direction,e.elem={inner:e.el.querySelector(e.sel.inner),center:e.el.querySelector(e.sel.center),bottom:e.el.querySelector(e.sel.bottom),prev:e.el.querySelector(e.sel.prev),next:e.el.querySelector(e.sel.next),progress:e.el.querySelector(e.sel.progress)},150!==e.opt.perspective&&e.el.style.setProperty("--fg-carousel-perspective",e.opt.perspective+"px")},postInit:function(){var e=this;e.activeItem=e.tmpl.items.first(),e.initNavigation(),e.initPagination(),e.initSwipe(),e.initAutoplay()},initNavigation:function(){const t=this;t._listeners.add(t.elem.prev,"click",function(e){e.preventDefault(),t.interacted=!0,t.previous()}),"button"!==t.elem.prev.type&&(t.elem.prev.type="button"),t.elem.prev.appendChild(e.element("arrow-left")),t._listeners.add(t.elem.next,"click",function(e){e.preventDefault(),t.interacted=!0,t.next()}),"button"!==t.elem.next.type&&(t.elem.next.type="button"),t.elem.next.appendChild(e.element("arrow-right"))},initPagination:function(){const n=this;var e=n.tmpl.items.count();for(let t=0;t<e;t++){const i=document.createElement("button");i.type="button",i.classList.add(n.cls.bullet),0===t&&i.classList.add(n.cls.activeBullet),n._listeners.add(i,"click",function(e){e.preventDefault(),n.interacted=!0,n.goto(n.tmpl.items.get(t))}),n.elem.bottom.appendChild(i)}},initSwipe:function(){const t=this;let n=0,i;t._listeners.add(t.elem.inner,"touchstart",function(e){t.interacted=!0,n=e.changedTouches[0].screenX},{passive:!0}),t._listeners.add(t.elem.inner,"touchend",function(e){i=e.changedTouches[0].screenX,i<n?t.next():t.previous(),n=0},{passive:!0})},initAutoplay:function(){const n=this,t=n.opt.autoplay;if(!(t.time<=0)&&n.elem.progress instanceof HTMLElement){const i=n.elem.progress.style;function e(e,t){o.cancelFrame(null),o.requestFrame(function(){i.setProperty("width",e+"%"),t?i.setProperty("transition-duration","0s"):i.setProperty("transition-duration",n._progress.tickRate+"ms")})}n._progress.on({"start stop":function(){e(0,!0)},"pause resume":function(){e(n._progress.percent,!0)},tick:function(){e(n._progress.percent,!1)},complete:function(){n.next(function(){n._progress.start(t.time)})}}),"pause"===t.interaction&&(n._canHover?(n._listeners.add(n.el,"mouseenter",function(e){n._progress.pause()},{passive:!0}),n._listeners.add(n.el,"mouseleave",function(e){n._progress.resume()},{passive:!0})):(n._listeners.add(n.el,"touchstart",function(e){n.timeouts.delete("autoplay"),n._progress.pause()},{passive:!0}),n._listeners.add(n.el,"touchend",function(e){n.timeouts.set("autoplay",function(){n._progress.resume()},1e3*t.time)},{passive:!0}))),n._progress.start(t.time)}},getFirst:function(){return this.tmpl.items.first()},getNext:function(e){return this.tmpl.items.next(e instanceof u.Item?e:this.activeItem,null,!0)},getPrev:function(e){return this.tmpl.items.prev(e instanceof u.Item?e:this.activeItem,null,!0)},goto:function(e,t){const n=this;if(e instanceof u.Item){const i=n.opt.autoplay,r=!n._canHover&&n.timeouts.has("autoplay"),o=(n.timeouts.delete("autoplay"),n.timeouts.delete("navigation"),n._progress.isPaused);n._progress.isActive&&n._progress.stop(),n.activeItem=e,n.layout(),n.timeouts.set("navigation",function(){0<i.time&&("pause"===i.interaction||"disable"===i.interaction&&!n.interacted)&&(n._progress.start(i.time),o&&n._progress.pause(),r&&n.timeouts.set("autoplay",function(){n._progress.resume()},1e3*i.time)),d.fn(t)&&t.call(n)},n.opt.speed)}},next:function(e){this.goto(this.getNext(),e)},previous:function(e){this.goto(this.getPrev(),e)},destroy:function(){var e=this;e.cache.clear(),e.timeouts.clear(),e._listeners.clear(),e._centerListeners.clear(),150!==e.opt.perspective&&e.el.style.removeProperty("--fg-carousel-perspective")},layout:function(e){const t=this;if(null===t.activeItem&&(t.activeItem=t.tmpl.items.first()),!d.number(e)&&t.cache.has("width")&&(e=t.cache.get("width")),d.number(e)){const n=t.getLayout(e);null!==t._layoutFrame&&o.cancelFrame(t._layoutFrame),t._layoutFrame=o.requestFrame(function(){t._layoutFrame=null,t.renderActive(n)&&(t.renderSide("left",t.sel.prevItem,t._leftExclude,t.cls.prevItem,n),t.renderSide("right",t.sel.nextItem,t._rightExclude,t.cls.nextItem,n),t._firstLayout=!1)})}},getLayout:function(e){var t=this;if(t.cache.has("layout")&&t.cache.get("width")===e)return t.cache.get("layout");var n=t.elem.center.getBoundingClientRect().width,i=t.elem.inner.getBoundingClientRect().width/2+n/2,n=t.calculate(n,i);return t.cache.set("width",e),t.cache.set("layout",n),n},round:function(e,t){t=Math.pow(10,t||0);return Math.round(e*t)/t},getShowPerSide:function(){var e=this.tmpl.items.count();let t=this.opt.maxItems;return("auto"===t||t<=0)&&(t=e%2==0?e-1:e),t%2==0&&--t,t<1&&(t=1),t>e&&(t=e%2==0?e-1:e),(t-1)/2},calculate:function(t,n,i,r){var o=this;d.number(i)||(i=o.opt.gutter.max);const s={zIndex:(r=!d.number(r)?o.getShowPerSide():r)+10,gutter:i,perSide:r,side:[]};let a=t,h=s.zIndex-1;for(let e=0;e<r;e++,h--){var l=o.getSequentialZFromScale(e,o.opt.scale,o.opt.perspective),c=o.scaleToZ(t,l,o.opt.perspective),p=(t-c)/2,u=(a-=p,"%"===o.opt.gutter.unit?t*Math.abs(i/100):Math.abs(i)),u="%"===o.opt.gutter.unit?o.scaleToZ(u,l,o.opt.perspective):u;if(0<i?a+=u:a-=u,a+c+p>n)return i-1<o.opt.gutter.min?o.calculate(t,n,o.opt.gutter.max,r-1):o.calculate(t,n,i-1,r);u=o.getVectorX(a,l,o.opt.perspective);a+=c+p,s.side.push({x:u,z:l,zIndex:h})}return s},cleanup:function(e,t,n){const i=this,r=d.string(n);Array.from(i.el.querySelectorAll(e)).forEach(function(e){e.classList.remove(t),i.opt.centerOnClick&&i._centerListeners.remove(e,"click"),r&&e.matches(n)||(e.style.removeProperty("transition-duration"),e.style.removeProperty("transform"),e.style.removeProperty("z-index"))})},renderActive:function(e){const n=this;if(!(n.activeItem instanceof u.Item))return!1;const t=n.activeItem.el,i=(n.cleanup(n.sel.activeItem,n.cls.activeItem),t.classList.add(n.cls.activeItem),t.style.setProperty("transition-duration",n.opt.speed+"ms"),t.style.setProperty("z-index",e.zIndex),t.style.removeProperty("transform"),n.tmpl.items.indexOf(n.activeItem));return Array.from(n.el.querySelectorAll(n.sel.bullet)).forEach(function(e,t){e.classList.remove(n.cls.activeBullet),t===i&&e.classList.add(n.cls.activeBullet)}),!0},renderSide:function(n,e,i,r,o){const s=this;if(-1!==["left","right"].indexOf(n)){s.cleanup(e,r,i);let t=s.activeItem;for(let e=0;e<o.side.length;e++){var a=o.side[e];const c="left"===n?s.getPrev(t):s.getNext(t);if(!(c instanceof u.Item))break;var l="translate3d("+("left"===n&&!s.isRTL||"right"===n&&s.isRTL?"-":"")+a.x+"px, 0,-"+a.z+"px)";c.el.classList.add(r),c.isLoaded||(c.el.style.setProperty("transition-duration","0ms"),c.el.style.setProperty("transform","translate3d(0,0,-"+s.opt.perspective+"px)"),c.el.offsetHeight),c.el.style.setProperty("transition-duration",(s._firstLayout?0:s.opt.speed)+"ms"),c.el.style.setProperty("transform",l),c.el.style.setProperty("z-index",a.zIndex),s.opt.centerOnClick&&s._centerListeners.add(c.el,"click",function(e){e.preventDefault(),e.stopPropagation(),s.interacted=!0,s.goto(c)},!0),t=c}}}})}((FooGallery.$,FooGallery),FooGallery.icons,FooGallery.utils,FooGallery.utils.is),function(i,r){i.CarouselTemplate=i.Template.extend({construct:function(e,t){var n=this;n._super(r.extend({},e,{paging:{type:"none"}}),t),n.items.LAYOUT_AFTER_LOAD=!1,n.carousel=null,n.on({"pre-init":n.onPreInit,init:n.onInit,"post-init":n.onPostInit,destroyed:n.onDestroyed,"append-item":n.onAppendItem,"after-filter-change":n.onAfterFilterChange,layout:n.onLayout},n),i.Panel&&n.lightbox instanceof i.Panel&&n.lightbox.on({open:n.onLightboxOpen,closed:n.onLightboxClosed,next:n.onLightboxNext,prev:n.onLightboxPrev},n)},onPreInit:function(){var e=this;e.carousel=new i.Carousel(e,e.template,e.cls.carousel,e.sel.carousel)},onInit:function(){this.carousel.init()},onPostInit:function(){this.carousel.postInit()},onDestroyed:function(){this.carousel instanceof i.Carousel&&this.carousel.destroy()},onAppendItem:function(e,t){e.preventDefault(),this.carousel.elem.inner.appendChild(t.el),t.isAttached=!0},onAfterFilterChange:function(){this.carousel.cache.delete("layout"),this.carousel.interacted=!0,this.carousel.goto(this.carousel.getFirst())},onLayout:function(){this.carousel.layout(this.lastWidth)},onLightboxOpen:function(){this.carousel.interacted=!0,this.carousel.stop()},onLightboxClosed:function(){this.carousel.start()},onLightboxNext:function(){this.carousel.next()},onLightboxPrev:function(){this.carousel.previous()}}),i.template.register("carousel",i.CarouselTemplate,{template:{maxItems:0,perspective:150,scale:.12,speed:300,centerOnClick:!0,gutter:{min:-40,max:-20,unit:"%"},autoplay:{time:0,interaction:"pause"}}},{container:"foogallery fg-carousel",carousel:{inner:"fg-carousel-inner",center:"fg-carousel-center",bottom:"fg-carousel-bottom",prev:"fg-carousel-prev",next:"fg-carousel-next",bullet:"fg-carousel-bullet",activeBullet:"fg-bullet-active",activeItem:"fg-item-active",prevItem:"fg-item-prev",nextItem:"fg-item-next",progress:"fg-carousel-progress"}})}((FooGallery.$,FooGallery),FooGallery.utils.obj),function(s,a,e,t,i){a.triggerPostLoad=function(e,t,n,i){var r,o=e.target;if(o instanceof a.Template&&o.initialized&&("after-page-change"===e.type&&!i||"after-filter-change"===e.type))try{if(0<o.$el.parents(".fbx-item").length)return;o.$el.hasClass("fbx-instance")&&window.FOOBOX&&s.fn.foobox?(r=s.extend({},window.FOOBOX.o,o.opt.protected?{images:{noRightClick:!0}}:{}),o.$el.foobox(r)):s("body").trigger("post-load")}catch(e){console.error(e)}},a.autoDefaults={on:{"after-page-change after-filter-change":a.triggerPostLoad}},a.autoEnabled=!0,a.auto=function(e){a.autoDefaults=t.merge(a.autoDefaults,e)},a.globalsMerged=!1,a.mergeGlobals=function(){if(!0!==a.globalsMerged&&window.FooGallery_il8n&&i.object(window.FooGallery_il8n)){var e,t=window.FooGallery_il8n;for(e in t)if(t.hasOwnProperty(e)&&a[e]instanceof a.Factory&&i.object(t[e]))for(var n in t[e])t[e].hasOwnProperty(n)&&a[e].configure(n,null,null,t[e][n]);a.globalsMerged=!0}},a.load=a.reload=function(){s(function(){a.mergeGlobals(),a.autoEnabled&&s('[id^="foogallery-gallery-"]:not(.fg-ready)').foogallery(a.autoDefaults)}),e.ready(function(){a.mergeGlobals(),a.autoEnabled&&s('[id^="foogallery-gallery-"].fg-ready').foogallery(a.autoDefaults)})},a.load()}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.obj,FooGallery.utils.is);
1
  /*
2
  * FooGallery - The Most Intuitive and Extensible Gallery Creation and Management Tool Ever Created for WordPress
3
+ * @version 2.0.39
4
  * @link
5
  * @copyright Steven Usher & Brad Vincent 2015
6
  * @license Released under the GPLv3 license.
7
  */
8
+ function _typeof(e){return(_typeof="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})(e)}!function(){"use strict";var h,t;function l(e){this.time=e.time,this.target=e.target,this.rootBounds=e.rootBounds,this.boundingClientRect=e.boundingClientRect,this.intersectionRect=e.intersectionRect||r(),this.isIntersecting=!!e.intersectionRect;var e=this.boundingClientRect,e=e.width*e.height,t=this.intersectionRect,t=t.width*t.height;this.intersectionRatio=e?Number((t/e).toFixed(4)):this.isIntersecting?1:0}function e(e,t){var n,i,r,t=t||{};if("function"!=typeof e)throw new Error("callback must be a function");if(t.root&&1!=t.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),i=this.THROTTLE_TIMEOUT,r=null,function(){r=r||setTimeout(function(){n(),r=null},i)}),this._callback=e,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(t.rootMargin),this.thresholds=this._initThresholds(t.threshold),this.root=t.root||null,this.rootMargin=this._rootMarginValues.map(function(e){return e.value+e.unit}).join(" ")}function n(e,t,n,i){"function"==typeof e.addEventListener?e.addEventListener(t,n,i||!1):"function"==typeof e.attachEvent&&e.attachEvent("on"+t,n)}function i(e,t,n,i){"function"==typeof e.removeEventListener?e.removeEventListener(t,n,i||!1):"function"==typeof e.detatchEvent&&e.detatchEvent("on"+t,n)}function p(e){var t;try{t=e.getBoundingClientRect()}catch(e){}return t?t.width&&t.height?t:{top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}:r()}function r(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function o(e,t){for(var n=t;n;){if(n==e)return!0;n=d(n)}return!1}function d(e){e=e.parentNode;return e&&11==e.nodeType&&e.host?e.host:e&&e.assignedSlot?e.assignedSlot.parentNode:e}"object"==typeof window&&("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype?"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return 0<this.intersectionRatio}}):(h=window.document,t=[],e.prototype.THROTTLE_TIMEOUT=100,e.prototype.POLL_INTERVAL=null,e.prototype.USE_MUTATION_OBSERVER=!0,e.prototype.observe=function(t){var e=this._observationTargets.some(function(e){return e.element==t});if(!e){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(),this._checkForIntersections()}},e.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter(function(e){return e.element!=t}),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},e.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},e.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},e.prototype._initThresholds=function(e){e=e||[0];return(e=Array.isArray(e)?e:[e]).sort().filter(function(e,t,n){if("number"!=typeof e||isNaN(e)||e<0||1<e)throw new Error("threshold must be a number between 0 and 1 inclusively");return e!==n[t-1]})},e.prototype._parseRootMargin=function(e){e=(e||"0px").split(/\s+/).map(function(e){e=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(e)return{value:parseFloat(e[1]),unit:e[2]};throw new Error("rootMargin must be specified in pixels or percent")});return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},e.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(n(window,"resize",this._checkForIntersections,!0),n(h,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in window&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(h,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},e.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,i(window,"resize",this._checkForIntersections,!0),i(h,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},e.prototype._checkForIntersections=function(){var s=this._rootIsInDom(),a=s?this._getRootRect():r();this._observationTargets.forEach(function(e){var t=e.element,n=p(t),i=this._rootContainsTarget(t),r=e.entry,o=s&&i&&this._computeTargetAndRootIntersection(t,a),e=e.entry=new l({time:window.performance&&performance.now&&performance.now(),target:t,boundingClientRect:n,rootBounds:a,intersectionRect:o});r?s&&i?this._hasCrossedThreshold(r,e)&&this._queuedEntries.push(e):r&&r.isIntersecting&&this._queuedEntries.push(e):this._queuedEntries.push(e)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},e.prototype._computeTargetAndRootIntersection=function(e,t){if("none"!=window.getComputedStyle(e).display){for(var n,i,r,o,s=p(e),a=d(e),l=!1;!l;){var c=null,u=1==a.nodeType?window.getComputedStyle(a):{};if("none"==u.display)return;if(a==this.root||a==h?(l=!0,c=t):a!=h.body&&a!=h.documentElement&&"visible"!=u.overflow&&(c=p(a)),c&&(u=c,c=s,o=r=i=n=void 0,n=Math.max(u.top,c.top),i=Math.min(u.bottom,c.bottom),r=Math.max(u.left,c.left),u=Math.min(u.right,c.right),o=i-n,!(s=0<=(c=u-r)&&0<=o&&{top:n,bottom:i,left:r,right:u,width:c,height:o})))break;a=d(a)}return s}},e.prototype._getRootRect=function(){var e,t;return t=this.root?p(this.root):(t=h.documentElement,e=h.body,{top:0,left:0,right:t.clientWidth||e.clientWidth,width:t.clientWidth||e.clientWidth,bottom:t.clientHeight||e.clientHeight,height:t.clientHeight||e.clientHeight}),this._expandRectByRootMargin(t)},e.prototype._expandRectByRootMargin=function(n){var e=this._rootMarginValues.map(function(e,t){return"px"==e.unit?e.value:e.value*(t%2?n.width:n.height)/100}),e={top:n.top-e[0],right:n.right+e[1],bottom:n.bottom+e[2],left:n.left-e[3]};return e.width=e.right-e.left,e.height=e.bottom-e.top,e},e.prototype._hasCrossedThreshold=function(e,t){var n=e&&e.isIntersecting?e.intersectionRatio||0:-1,i=t.isIntersecting?t.intersectionRatio||0:-1;if(n!==i)for(var r=0;r<this.thresholds.length;r++){var o=this.thresholds[r];if(o==n||o==i||o<n!=o<i)return!0}},e.prototype._rootIsInDom=function(){return!this.root||o(h,this.root)},e.prototype._rootContainsTarget=function(e){return o(this.root||h,e)},e.prototype._registerInstance=function(){t.indexOf(this)<0&&t.push(this)},e.prototype._unregisterInstance=function(){var e=t.indexOf(this);-1!=e&&t.splice(e,1)},window.IntersectionObserver=e,window.IntersectionObserverEntry=l))}(),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.ResizeObserver=t()}(this,function(){"use strict";var i="undefined"!=typeof Map?Map:(Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){e=r(this.__entries__,e),e=this.__entries__[e];return e&&e[1]},e.prototype.set=function(e,t){var n=r(this.__entries__,e);~n?this.__entries__[n][1]=t:this.__entries__.push([e,t])},e.prototype.delete=function(e){var t=this.__entries__,e=r(t,e);~e&&t.splice(e,1)},e.prototype.has=function(e){return!!~r(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,i=this.__entries__;n<i.length;n++){var r=i[n];e.call(t,r[1],r[0])}},e);function e(){this.__entries__=[]}function r(e,n){var i=-1;return e.some(function(e,t){return e[0]===n&&(i=t,!0)}),i}var n="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,t="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),l="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(t):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},c=2;var o=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,a=(u.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},u.prototype.removeObserver=function(e){var t=this.observers_,e=t.indexOf(e);~e&&t.splice(e,1),!t.length&&this.connected_&&this.disconnect_()},u.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},u.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),0<e.length},u.prototype.connect_=function(){n&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},u.prototype.disconnect_=function(){n&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},u.prototype.onTransitionEnd_=function(e){var e=e.propertyName,t=void 0===e?"":e;o.some(function(e){return!!~t.indexOf(e)})&&this.refresh()},u.getInstance=function(){return this.instance_||(this.instance_=new u),this.instance_},u.instance_=null,u);function u(){function e(){o&&(o=!1,i()),s&&n()}function t(){l(e)}function n(){var e=Date.now();if(o){if(e-a<c)return;s=!0}else s=!(o=!0),setTimeout(t,r);a=e}var i,r,o,s,a;this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=(i=this.refresh.bind(this),s=o=!(r=20),a=0,n)}var h=function(e,t){for(var n=0,i=Object.keys(t);n<i.length;n++){var r=i[n];Object.defineProperty(e,r,{value:t[r],enumerable:!1,writable:!1,configurable:!0})}return e},p=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||t},d=b(0,0,0,0);function f(e){return parseFloat(e)||0}function g(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return e.reduce(function(e,t){return e+f(n["border-"+t+"-width"])},0)}function m(e){var t,n,i,r,o,s,a=e.clientWidth,l=e.clientHeight;return a||l?(n=(t=function(e){for(var t={},n=0,i=["top","right","bottom","left"];n<i.length;n++){var r=i[n],o=e["padding-"+r];t[r]=f(o)}return t}(s=p(e).getComputedStyle(e))).left+t.right,i=t.top+t.bottom,r=f(s.width),o=f(s.height),"border-box"===s.boxSizing&&(Math.round(r+n)!==a&&(r-=g(s,"left","right")+n),Math.round(o+i)!==l&&(o-=g(s,"top","bottom")+i)),e!==p(e).document.documentElement&&(s=Math.round(r+n)-a,e=Math.round(o+i)-l,1!==Math.abs(s)&&(r-=s),1!==Math.abs(e)&&(o-=e)),b(t.left,t.top,r,o)):d}var v="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof p(e).SVGGraphicsElement}:function(e){return e instanceof p(e).SVGElement&&"function"==typeof e.getBBox};function y(e){var t;return n?v(e)?b(0,0,(t=(t=e).getBBox()).width,t.height):m(e):d}function b(e,t,n,i){return{x:e,y:t,width:n,height:i}}w.prototype.isActive=function(){var e=y(this.target);return(this.contentRect_=e).width!==this.broadcastWidth||e.height!==this.broadcastHeight},w.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e};var _=w;function w(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=b(0,0,0,0),this.target=e}var x=function(e,t){n=(t=t).x,i=t.y,o=t.width,t=t.height,r="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,r=Object.create(r.prototype),h(r,{x:n,y:i,width:o,height:t,top:i,right:n+o,bottom:t+i,left:n});var n,i,r,o=r;h(this,{target:e,contentRect:o})},C=(E.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof p(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new _(e)),this.controller_.addObserver(this),this.controller_.refresh())}},E.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof p(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},E.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},E.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},E.prototype.broadcastActive=function(){var e,t;this.hasActive()&&(e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new x(e.target,e.broadcastRect())}),this.callback_.call(e,t,e),this.clearActive())},E.prototype.clearActive=function(){this.activeObservations_.splice(0)},E.prototype.hasActive=function(){return 0<this.activeObservations_.length},E);function E(e,t,n){if(this.activeObservations_=[],this.observations_=new i,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}var F=new("undefined"!=typeof WeakMap?WeakMap:i),$=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=a.getInstance(),t=new C(t,n,this);F.set(this,t)};return["observe","unobserve","disconnect"].forEach(function(t){$.prototype[t]=function(){var e;return(e=F.get(this))[t].apply(e,arguments)}}),void 0!==t.ResizeObserver?t.ResizeObserver:$}),function(e){(window.FooGallery=window.FooGallery||{}).$=e}(jQuery),function(e){e?function(){try{return window.FooGallery.utils}catch(e){}}()||(window.FooGallery.utils={$:e,version:"1.0.0"}):console.warn("jQuery must be included in the page prior to the FooGallery.utils library.")}(jQuery),function(t,n){"1.0.0"===n.version&&(n.is={},n.is.array=function(e){return"[object Array]"===Object.prototype.toString.call(e)},n.is.boolean=function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},n.is.element=function(e){return"object"===("undefined"==typeof HTMLElement?"undefined":_typeof(HTMLElement))?e instanceof HTMLElement:!!e&&"object"===_typeof(e)&&1===e.nodeType&&"string"==typeof e.nodeName},n.is.empty=function(e){if(n.is.undef(e)||null===e)return!0;if(n.is.number(e)&&0===e)return!0;if(n.is.boolean(e)&&!1===e)return!0;if(n.is.string(e)&&0===e.length)return!0;if(n.is.array(e)&&0===e.length)return!0;if(n.is.jq(e)&&0===e.length)return!0;if(n.is.hash(e)){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}return!1},n.is.error=function(e){return"[object Error]"===Object.prototype.toString.call(e)},n.is.fn=function(e){return e===window.alert||"[object Function]"===Object.prototype.toString.call(e)},n.is.hash=function(e){return n.is.object(e)&&e.constructor===Object&&!e.nodeType&&!e.setInterval},n.is.jq=function(e){return!n.is.undef(t)&&e instanceof t},n.is.number=function(e){return"[object Number]"===Object.prototype.toString.call(e)&&!isNaN(e)},n.is.object=function(e){return"[object Object]"===Object.prototype.toString.call(e)&&!n.is.undef(e)&&null!==e},n.is.promise=function(e){return n.is.object(e)&&n.is.fn(e.then)&&n.is.fn(e.promise)},n.is.size=function(e){return!!(n.is.string(e)&&!n.is.empty(e)||n.is.number(e))&&/^(auto|none|(?:[\d.]*)+?(?:%|px|mm|q|cm|in|pt|pc|em|ex|ch|rem|vh|vw|vmin|vmax)?)$/.test(e)},n.is.string=function(e){return"[object String]"===Object.prototype.toString.call(e)},n.is.undef=function(e){return void 0===e})}(FooGallery.utils.$,FooGallery.utils),function(l,c,u){var a;"1.0.0"===c.version&&(c.fn={},a=Function.prototype.toString,c.fn.CONTAINS_SUPER=/xyz/.test(a.call(function(){xyz}))?/\b_super\b/:/.*/,c.fn.noop=function(){},c.fn.addOrOverride=function(e,t,n){var i,r,o,s;u.object(e)&&u.string(t)&&!u.empty(t)&&u.fn(n)&&(i=e[t],r=u.fn(i)&&c.fn.CONTAINS_SUPER.test(a.call(n)),e[t]=r?(o=i,s=n,function(){var e=this._super,t=(this._super=o,s.apply(this,arguments));return this._super=e,t}):n)},c.fn.expose=function(t,n,e,i){u.object(t)&&u.object(n)&&u.array(e)&&(i=u.undef(i)?t:i,e.forEach(function(e){u.string(e)&&u.fn(t[e])&&(n[e]=t[e].bind(i))}))},c.fn.apply=function(e,t){return t.unshift(e),new(Function.prototype.bind.apply(e,t))},c.fn.arg2arr=function(e){return Array.prototype.slice.call(e)},c.fn.debounce=function(n,i){var r;return function(){var e=this,t=c.fn.arg2arr(arguments);clearTimeout(r),r=setTimeout(function(){n.apply(e,t)},i)}},c.fn.throttle=function(n,i){var r,o;return function(){var e=this,t=c.fn.arg2arr(arguments);r?(clearTimeout(o),o=setTimeout(function(){Date.now()-r>=i&&(n.apply(e,t),r=Date.now())},i-(Date.now()-r))):(n.apply(e,t),r=Date.now())}},c.fn.resolved=l.Deferred().resolve().promise(),c.fn.rejected=l.Deferred().reject().promise(),c.fn.reject=function(e,t){var n=l.Deferred(),i=c.fn.arg2arr(arguments);return n.reject.apply(n,i).promise()},c.fn.resolve=function(e,t){var n=l.Deferred(),i=c.fn.arg2arr(arguments);return n.resolve.apply(n,i).promise()},c.fn.rejectWith=function(e,t,n){var i=l.Deferred(),r=c.fn.arg2arr(arguments);return r.shift(),i.rejectWith(e,r).promise()},c.fn.resolveWith=function(e,t,n){var i=l.Deferred(),r=c.fn.arg2arr(arguments);return r.shift(),i.resolveWith(e,r).promise()},c.fn.all=function(t){var n=l.Deferred(),i=[];if(u.array(t)&&0<t.length){function r(e,t){s||(i[e]=0===t.length?void 0:1===t.length?t[0]:t,--o||n.resolve(i))}for(var o=t.length,s=!1,a=0,e=t.length;a<e&&"break"!==function(){if(s)return"break";var e=a;u.promise(t[e])?t[e].then(function(){r(e,c.fn.arg2arr(arguments))},function(){s||(s=!0,n.reject.apply(n,c.fn.arg2arr(arguments)))}):r(e,[t[e]])}();a++);}else n.resolve(i);return n.promise()},c.fn.allSettled=function(t){var i=l.Deferred(),r=[];if(u.array(t)&&0<t.length){function n(e,t,n){r[e]={status:t},0<n.length&&(r[e]["rejected"===t?"reason":"value"]=1===n.length?n[0]:n),--o||i.resolve(r)}for(var o=t.length,s=0,e=t.length;s<e;s++)!function(){var e=s;u.promise(t[e])?t[e].then(function(){n(e,"fulfilled",c.fn.arg2arr(arguments))},function(){n(e,"rejected",c.fn.arg2arr(arguments))}):n(e,"fulfilled",[t[e]])}()}else i.resolve(r);return i.promise()})}(FooGallery.utils.$,FooGallery.utils,FooGallery.utils.is),function(e,o){var r;"1.0.0"===e.version&&(e.url={},r=document.createElement("a"),e.url.parts=function(e){r.href=e;var e=r.port||(-1!==["http:","https:"].indexOf(r.protocol)?"https:"===r.protocol?"443":"80":""),t=r.hostname+(e?":"+e:""),n=r.origin||r.protocol+"//"+t,i="/"===r.pathname.slice(0,1)?r.pathname:"/"+r.pathname;return{hash:r.hash,host:t,hostname:r.hostname,href:r.href,origin:n,pathname:i,port:e,protocol:r.protocol,search:r.search}},e.url.full=function(e){return!o.string(e)||o.empty(e)?null:(r.href=e,r.href)},e.url.param=function(e,t,n){var i,r;return o.string(e)&&o.string(t)&&!o.empty(t)?o.undef(n)?(r=((i=new RegExp("[?|&]"+t+"=([^&;]+?)(&|#|;|$)")).exec(e)||["",""])[1].replace(/\+/g,"%20"),o.string(r)&&!o.empty(r)?decodeURIComponent(r):null):(o.empty(n)?(i=new RegExp("^([^#]*?)(([^#]*)&)?"+t+"(=[^&#]*)?(&|#|$)"),r=e.replace(i,"$1$3$5").replace(/^([^#]*)((\?)&|\?(#|$))/,"$1$3$4")):(i=new RegExp("([?&])"+t+"[^&]*"),t=t+"="+encodeURIComponent(n),(r=e.replace(i,"$1"+t))!==e||i.test(r)||(r+=(-1!==r.indexOf("?")?"&":"?")+t)),r):e})}(FooGallery.utils,FooGallery.utils.is),function(a,l,c){"1.0.0"===a.version&&(a.str={},a.str.trim=function(e){return l.string(e)?e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""):null},a.str.camel=function(e){return l.string(e)?e.toUpperCase()===e?e.toLowerCase():e.replace(/^([A-Z])|[-\s_]+(\w)/g,function(e,t,n){return l.string(n)?n.toUpperCase():t.toLowerCase()}):e},a.str.kebab=function(e){return l.string(e)?e.match(/[A-Z]{2,}(?=[A-Z][a-z0-9]*|\b)|[A-Z]?[a-z0-9]*|[A-Z]|[0-9]+/g).filter(Boolean).map(function(e){return e.toLowerCase()}).join("-"):e},a.str.contains=function(e,t,n){return!(!l.string(e)||l.empty(e)||!l.string(t)||l.empty(t))&&(t.length<=e.length&&-1!==(n?e.toUpperCase().indexOf(t.toUpperCase()):e.indexOf(t)))},a.str.containsWord=function(e,t,n){if(!(!l.string(e)||l.empty(e)||!l.string(t)||l.empty(t)||e.length<t.length))for(var i=e.split(/\W/),r=0,o=i.length;r<o;r++)if(n?i[r].toUpperCase()===t.toUpperCase():i[r]===t)return!0;return!1},a.str.endsWith=function(e,t){return!(!l.string(e)||!l.string(t)||t.length>e.length)&&e.slice(e.length-t.length)===t},a.str.startsWith=function(e,t){return!l.empty(e)&&!l.empty(t)&&e.slice(0,t.length)===t},a.str.escapeRegExp=function(e){return l.string(e)?e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"):e},a.str.fnv1a=function(e){if(!l.string(e)||l.empty(e))return null;for(var t=2166136261,n=0,i=e.length;n<i;n++)t=(t^=e.charCodeAt(n))+((t<<1)+(t<<4)+(t<<7)+(t<<8)+(t<<24));return t>>>0},a.str.from=function(e,t){return a.str.contains(e,t)?e.substring(e.indexOf(t)+t.length):null},a.str.join=function(e,t,n){if(!l.string(e)||!l.string(t))return null;var i=c.arg2arr(arguments);e=i.shift();for(var r=i.shift(),o=0,s=i.length;o<s;o++)t=i[o],l.empty(t)||(a.str.endsWith(r,e)&&(r=r.slice(0,r.length-e.length)),r+=e+(t=a.str.startsWith(t,e)?t.slice(e.length):t));return r},a.str.until=function(e,t){return a.str.contains(e,t)?e.substring(0,e.indexOf(t)):e},a.str.format=function(n,e,t){var i=c.arg2arr(arguments);return n=i.shift(),l.string(n)&&0<i.length&&(1===i.length&&(l.array(i[0])||l.object(i[0]))&&(i=i[0]),a.each(i,function(e,t){n=n.replace(new RegExp("\\{"+t+"\\}","gi"),e+"")})),n})}(FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn),function(a,l,r,o){"1.0.0"===a.version&&(a.obj={},a.obj.create=function(e){if(l.object(e))return t.prototype=e,new t;throw TypeError("Argument must be an object");function t(){}},a.obj.extend=function(t,e,n){t=l.object(t)?t:{};var i=r.arg2arr(arguments);return i.shift(),a.each(i,function(e){a.obj.merge(t,e)}),t},a.obj.merge=function(e,t){for(var n in e=l.hash(e)?e:{},t=l.hash(t)?t:{})t.hasOwnProperty(n)&&(l.hash(t[n])?(e[n]=l.hash(e[n])?e[n]:{},a.obj.merge(e[n],t[n])):l.array(t[n])?e[n]=t[n].slice():e[n]=t[n]);return e},a.obj.mergeValid=function(t,n,i,e){var r,o,s;if(l.hash(i)&&l.hash(n))for(r in n=l.hash(n)?n:{},e=l.hash(e)?e:{},n)n.hasOwnProperty(r)&&l.fn(n[r])&&(o=l.array(e[r])?e[r]:l.string(e[r])?[e[r]]:[r],a.each(o,function(e){return s=a.obj.prop(i,e),!l.undef(s)&&n[r](s)?(a.obj.prop(t,r,s),!1):void 0}));return t},a.obj.prop=function(n,e,i){var t,r;if(l.object(n)&&!l.empty(e))return l.undef(i)?(o.contains(e,".")?(t=e.split("."),r=t.length-1,a.each(t,function(e,t){if(t===r)i=n[e];else{if(!l.hash(n[e]))return!1;n=n[e]}})):l.undef(n[e])||(i=n[e]),i):void(o.contains(e,".")?(t=e.split("."),r=t.length-1,a.each(t,function(e,t){t===r?n[e]=i:n=l.hash(n[e])?n[e]:n[e]={}})):l.undef(n[e])||(n[e]=i))})}((FooGallery.utils.$,FooGallery.utils),FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.str),function(t,r,s){"1.0.0"===r.version&&(r.ready=function(e){function t(){try{e.call(window,r.$)}catch(e){console.error(e)}}(Function("/*@cc_on return true@*/")()?"complete"===document.readyState:"loading"!==document.readyState)?t():document.addEventListener("DOMContentLoaded",t,!1)},r.find=function(e,t,n){if(s.fn(t))if(n=s.undef(n)?t:n,s.array(e)){for(r=0,o=e.length;r<o;r++)if(t.call(n,e[r],r,e))return e[r]}else if(s.object(e))for(var i=Object.keys(e),r=0,o=i.length;r<o;r++)if(t.call(n,e[i[r]],i[r],e))return e[i[r]]},r.each=function(e,t,n){if(s.fn(t))if(n=s.undef(n)?t:n,s.array(e))for(r=0,o=e.length;r<o&&!1!==t.call(n,e[r],r,e);r++);else if(s.object(e))for(var i=Object.keys(e),r=0,o=i.length;r<o&&!1!==t.call(n,e[i[r]],i[r],e);r++);},r.inArray=function(e,t){return s.array(t)?t.indexOf(e):-1},r.selectify=function(e){if(s.empty(e))return null;if(s.hash(e)){var t,n,i={};for(n in e)e.hasOwnProperty(n)&&(t=r.selectify(e[n]))&&(i[n]=t);return i}return s.string(e)||s.array(e)?(e=s.string(e)?[e]:e).map(function(e){return s.string(e)?"."+e.split(/\s/g).join("."):null}).join(","):null},r.requestFrame=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(e){return setTimeout(e,1e3/60)}).bind(window),r.cancelFrame=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||function(e){clearTimeout(e)}).bind(window),r.nextFrame=function(e,n){return t.Deferred(function(t){s.fn(e)?(n=s.undef(n)?e:n,r.requestFrame(function(){try{t.resolve(e.call(n))}catch(e){t.reject(e)}})):t.reject(new Error("Provided callback is not a function."))}).promise()})}(FooGallery.utils.$,FooGallery.utils,FooGallery.utils.is),function(r,o,s,a){"1.0.0"===r.version&&(r.Class=function(){},r.Class.extend=function(e){e=o.hash(e)?e:{};var t,n=s.create(this.prototype);for(t in e)e.hasOwnProperty(t)&&a.addOrOverride(n,t,e[t]);function i(){if(!o.fn(this.construct))throw new SyntaxError('FooGallery.utils.Class objects must be constructed with the "new" keyword.');this.construct.apply(this,arguments)}return n.construct=o.fn(n.construct)?n.construct:function(){},(i.prototype=n).constructor=o.fn(n.__ctor__)?n.__ctor__:i,i.extend=r.Class.extend,i.override=r.Class.override,i.getBaseClasses=r.Class.getBaseClasses,i.__baseClass__=this,i},r.Class.override=function(e,t){a.addOrOverride(this.prototype,e,t)},r.Class.__baseClass__=null,r.Class.getBaseClasses=function(){return function e(t,n){return o.array(n)||(n=[]),o.fn(t)&&null!==t.__baseClass__?(n.unshift(t.__baseClass__),e(t.__baseClass__,n)):n}(this,[])})}((FooGallery.utils.$,FooGallery.utils),FooGallery.utils.is,FooGallery.utils.obj,FooGallery.utils.fn),function(e,a,l,r){e.ClassRegistry=e.Class.extend({construct:function(e){this.opt=r.extend({allowBase:!0,beforeCreate:null},e),this.registered={}},register:function(e,t,n,i){var r;return!(!a.string(e)||a.empty(e)||!a.fn(t))&&(i=a.number(i)?i:0,r=this.registered[e],this.registered[e]={name:e,ctor:t,config:a.hash(n)?n:{},priority:a.undef(r)?i:r.priority},!0)},each:function(e,t,n){t=!!a.boolean(t)&&t,n=a.undef(n)?e:n;for(var i=this,r=Object.keys(i.registered).map(function(e){return i.registered[e]}),o=(t&&r.sort(function(e,t){return t.priority-e.priority}),0),s=r.length;o<s&&!1!==e.call(n,r[o],o);o++);},find:function(e,t,n){t=!!a.boolean(t)&&t,n=a.undef(n)?e:n;for(var i=this,r=Object.keys(i.registered).map(function(e){return i.registered[e]}),o=(t&&r.sort(function(e,t){return t.priority-e.priority}),0),s=r.length;o<s;o++)if(e.call(n,r[o],o))return r[o];return null},create:function(e,t,n){var i=this,r=l.arg2arr(arguments);if(e=r.shift(),a.string(e)&&i.registered.hasOwnProperty(e)){var o=i.registered[e],s=!0;if((s=o.priority<0&&!i.opt.allowBase?!1:s)&&a.fn(o.ctor))return t=r.shift(),t=i.mergeConfigurations(o.name,t),r.unshift.apply(r,[o.name,t]),l.apply(o.ctor,i.onBeforeCreate(o,r))}return null},onBeforeCreate:function(e,t){return null!==this.opt.beforeCreate&&a.fn(this.opt.beforeCreate)?this.opt.beforeCreate.call(this,e,t):t},mergeConfigurations:function(e,t){var n,i;return a.string(e)&&this.registered.hasOwnProperty(e)?(t=a.hash(t)?t:{},n=this.getBaseClasses(e),i=[{}],n.push(this.registered[e]),n.forEach(function(e){i.push(e.config)}),i.push(t),r.extend.apply(r,i)):{}},getBaseClass:function(){return this.find(function(e){return e.priority<0},!0)},getBaseClasses:function(e){var t=this,e=t.registered[e],n=[];return a.undef(e)||e.ctor.getBaseClasses().forEach(function(e){e=t.fromType(e);a.hash(e)&&n.push(e)}),n},fromType:function(t){if(a.fn(t))return this.find(function(e){return e.ctor===t})}})}((FooGallery.utils.$,FooGallery.utils),FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.obj),function(o,s,n){"1.0.0"===o.version&&(o.Event=o.Class.extend({construct:function(e){if(s.empty(e))throw new SyntaxError("FooGallery.utils.Event objects must be supplied a `type`.");e=o.Event.parse(e);this.type=e.type,this.namespace=e.namespace,this.defaultPrevented=!1,this.target=null},preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented}}),o.Event.parse=function(e){e=s.string(e)&&!s.empty(e)?e:null;var t=n.contains(e,".");return{namespaced:t,type:t?n.startsWith(e,".")?null:n.until(e,"."):e,namespace:t?n.from(e,"."):null}},o.EventClass=o.Class.extend({construct:function(){this.events={}},destroy:function(){this.events={}},on:function(n,t,i){var r=this;return s.object(n)?(i=t,Object.keys(n).forEach(function(t){s.fn(n[t])&&t.split(" ").forEach(function(e){r.addListener(e,n[t],i)})})):s.string(n)&&s.fn(t)&&n.split(" ").forEach(function(e){r.addListener(e,t,i)}),r},addListener:function(e,t,n){var i,r;return!(!s.string(e)||/\s/.test(e)||!s.fn(t))&&(i=this,r=o.Event.parse(e),n=s.undef(n)?i:n,s.array(i.events[r.type])||(i.events[r.type]=[]),!i.events[r.type].some(function(e){return e.namespace===r.namespace&&e.fn===t&&e.thisArg===n})&&(i.events[r.type].push({namespace:r.namespace,fn:t,thisArg:n}),!0))},off:function(n,t,i){var r=this;return s.object(n)?(i=t,Object.keys(n).forEach(function(t){t.split(" ").forEach(function(e){r.removeListener(e,n[t],i)})})):s.string(n)&&n.split(" ").forEach(function(e){r.removeListener(e,t,i)}),r},removeListener:function(e,t,n){var i,r;return!(!s.string(e)||/\s/.test(e))&&(i=this,r=o.Event.parse(e),e=[],n=s.undef(n)?i:n,s.empty(r.type)?s.empty(r.namespace)||e.push.apply(e,Object.keys(i.events)):e.push(r.type),e.forEach(function(e){s.array(i.events[e])&&(i.events[e]=i.events[e].filter(function(e){return null!=t?!(e.namespace===r.namespace&&e.fn===t&&e.thisArg===n):null!=r.namespace&&e.namespace!==r.namespace}),0===i.events[e].length&&delete i.events[e])}),!0)},trigger:function(e,t){t=s.array(t)?t:[];var n=this,i=[];return e instanceof o.Event?(i.push(e),n.emit(e,t)):s.string(e)&&e.split(" ").forEach(function(e){e=new o.Event(e);i.push(e),n.emit(e,t)}),s.empty(i)?null:1===i.length?i[0]:i},emit:function(t,n){var e;t instanceof FooGallery.utils.Event&&(e=this,n=s.array(n)?n:[],null===t.target&&(t.target=e),s.array(e.events[t.type])&&e.events[t.type].forEach(function(e){null!=t.namespace&&e.namespace!==t.namespace||e.fn.apply(e.thisArg,[t].concat(n))}),s.array(e.events.__all__)&&e.events.__all__.forEach(function(e){e.fn.apply(e.thisArg,[t].concat(n))}))}}))}(FooGallery.utils,FooGallery.utils.is,FooGallery.utils.str),function(e,i,t){"1.0.0"===e.version&&(e.Timer=e.EventClass.extend({construct:function(e){var t=this;t._super(),t.interval=i.number(e)?e:1e3,t.isRunning=!1,t.isPaused=!1,t.canResume=!1,t.canRestart=!1,t.__timeout=null,t.__decrement=!1,t.__time=0,t.__remaining=0,t.__current=0,t.__finish=0,t.__restart=[]},__reset:function(){var e=this;clearTimeout(e.__timeout),e.__timeout=null,e.__decrement=!1,e.__time=0,e.__remaining=0,e.__current=0,e.__finish=0,e.isRunning=!1,e.isPaused=!1,e.canResume=!1},__eventArgs:function(e){return[this.__current,this.__time,this.__decrement].concat(t.arg2arr(arguments))},__tick:function(){var e=this;e.trigger("tick",e.__eventArgs()),e.__current===e.__finish?(e.trigger("complete",e.__eventArgs()),e.__reset()):(e.__decrement?e.__current--:e.__current++,e.__remaining--,e.canResume=0<e.__remaining,e.__timeout=setTimeout(function(){e.__tick()},e.interval))},start:function(e,t){var n=this;n.isRunning||(t=!!i.boolean(t)&&t,n.__restart=[e,t],n.__decrement=t,n.__time=e,n.__remaining=e,n.__current=t?e:0,n.__finish=t?0:e,n.canRestart=!0,n.isRunning=!0,n.isPaused=!1,n.trigger("start",n.__eventArgs()),n.__tick())},countdown:function(e){this.start(e,!0)},countup:function(e){this.start(e,!1)},restart:function(){var e=this;e.stop(),e.canRestart&&e.start.apply(e,e.__restart)},stop:function(){var e=this;(e.isRunning||e.isPaused)&&(e.__reset(),e.trigger("stop",e.__eventArgs()))},pause:function(){var e=this;return null!=e.__timeout&&(clearTimeout(e.__timeout),e.__timeout=null),e.isRunning&&(e.isRunning=!1,e.isPaused=!0,e.trigger("pause",e.__eventArgs())),e.__remaining},resume:function(){var e=this;e.canResume&&(e.isRunning=!0,e.isPaused=!1,e.trigger("resume",e.__eventArgs()),e.__tick())},reset:function(){this.__reset(),this.trigger("reset",this.__eventArgs())}}))}((FooGallery.utils.$,FooGallery.utils),FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.obj),function(o,e,t){"1.0.0"===e.version&&(e.FullscreenAPI=e.EventClass.extend({construct:function(){this._super(),this.apis={w3:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}},this.api=this.getAPI(),this.supported=null!=this.api,this.__listen()},destroy:function(){return this.__stopListening(),this._super()},getAPI:function(){for(var e in this.apis)if(this.apis.hasOwnProperty(e)&&this.apis[e].enabled in document)return this.apis[e];return null},element:function(){return this.supported?document[this.api.element]:null},request:function(e){return this.supported&&e[this.api.request]?e[this.api.request]()||o.Deferred(this.__resolver(this.api.request)).promise():t.rejected},exit:function(){return this.supported&&this.element()?document[this.api.exit]()||o.Deferred(this.__resolver(this.api.exit)).promise():t.rejected},toggle:function(e){return this.element()?this.exit():this.request(e)},__listen:function(){var e=this;e.supported&&o(document).on(e.api.events.change+".utils",function(){e.trigger("change")}).on(e.api.events.error+".utils",function(){e.trigger("error")})},__stopListening:function(){this.supported&&o(document).off(this.api.events.change+".utils").off(this.api.events.error+".utils")},__resolver:function(i){var r=this;return function(e){function t(){e.resolve(),o(document).off(r.api.events.change,t).off(r.api.events.error,n)}function n(){e.reject(new TypeError),o(document).off(r.api.events.change,t).off(r.api.events.error,n)}i===r.api.exit&&r.element()?setTimeout(function(){e.reject(new TypeError)},1):o(document).on(r.api.events.change,t).on(r.api.events.error,n)}}}))}(FooGallery.utils.$,FooGallery.utils,FooGallery.utils.fn),function(l,c,u,a){"1.0.0"===c.version&&(c.transition={},c.transition.dataName="__foo-transition__",c.transition.disableClassName=null,c.transition.timeout=3e3,c.transition.disable=function(e,t){var n,i,r,e=u.jq(e)?e:l(e);0<e.length&&u.fn(t)&&(n=e.get(0),r=null,(i=u.string(c.transition.disableClassName))?e.addClass(c.transition.disableClassName):(r={value:n.style.getPropertyValue("transition"),priority:n.style.getPropertyPriority("transition")},n.style.setProperty("transition","none","important")),t.call(t,e),e.prop("offsetWidth"),i?e.removeClass(c.transition.disableClassName):(n.style.removeProperty("transition"),u.string(r.value)&&0<r.value.length&&n.style.setProperty("transition",r.value,r.priority)))},c.transition.stop=function(e){var t=l.Deferred(),n=u.jq(e)?e:l(e);return 0<n.length?(e=n.data(c.transition.dataName),u.promise(e)?e.always(function(){c.requestFrame(function(){t.resolve(n)})}).reject(new Error("Transition cancelled.")):t.resolve(n)):t.reject(new Error("Unable to stop transition. Make sure the element exists.")),t.promise()},c.transition.createListener=function(e,t,n){var i=e,r=t,o=n,s=u.string(n);return function(e){var t=e.originalEvent instanceof TransitionEvent?e.originalEvent:e,n=!1;(n=t.target===i?!s||t.propertyName===o:n)&&r.apply(r,a.arg2arr(arguments))}},c.transition.start=function(e,n,i,r){var o,s=l.Deferred(),a=u.jq(e)?e:l(e);return 0<a.length&&u.fn(n)?(o=a.get(0),c.transition.stop(a).always(function(){var t=c.transition.createListener(o,function(){s.resolve(a)},i);a.data(c.transition.dataName,s).on("transitionend.foo-utils",t).prop("offsetWidth"),c.requestFrame(function(){var e=setTimeout(function(){s.reject(new Error("Transition safety timeout triggered."))},u.number(r)?r:c.transition.timeout);s.always(function(){clearTimeout(e),a.removeData(c.transition.dataName).off("transitionend.foo-utils",t)}),n.call(n,a)})})):s.reject(new Error("Unable to perform transition. Make sure the element exists and a trigger function is supplied.")),s.promise()},c.transition.modify=function(e,t,n,i){e=u.jq(e)?e:l(e);return 0<e.length&&u.fn(t)?n?(c.transition.disable(e,t),a.resolve()):c.transition.start(e,t,i):a.reject(new Error("Unable to perform modification. Make sure the element exists and a modify function is supplied."))})}(FooGallery.utils.$,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn),function(o,s,e,a,i,t){s.DATA_TEMPLATE="__FooGallery__",s.DATA_ITEM="__FooGalleryItem__",s.get=function(e){return o(e).data(s.DATA_TEMPLATE)},s.init=function(t,n){if(0<(n=a.jq(n)?n:o(n)).length){var e=n.data(s.DATA_TEMPLATE);if(e instanceof s.Template)return e.destroy(!0).then(function(){var e=s.template.make(t,n);return e instanceof s.Template?e.initialize():i.rejected})}e=s.template.make(t,n);return e instanceof s.Template?e.initialize():i.rejected},o.fn.foogallery=function(i,r){return r=a.fn(r)?r:o.noop,this.each(function(e,t){if(a.string(i)){var n=o.data(t,s.DATA_TEMPLATE);if(n instanceof s.Template)switch(i){case"layout":return void n.layout();case"destroy":return void n.destroy()}}else s.init(i,t).then(r)})},s.isCached=function(e){var t=new Image,e=(t.src=e,t.complete);return t.src="",t=null,e},s.supportedExifProperties=["camera","aperture","created_timestamp","shutter_speed","focal_length","iso","orientation"],a.exif=function(t){var e;return!!a.object(t)&&(0<(e=Object.keys(t)).length&&e.some(function(e){return-1!==s.supportedExifProperties.indexOf(e)&&!a.empty(t[e])}))},t.trimTo=function(e,t,n){return a.string(e)&&a.number(t)&&0<t&&e.length>t?e.substr(0,t)+(a.string(n)?n:"&hellip;"):e},e.getResizeObserverSize=function(e){var t,e=e.contentBoxSize?(e.contentBoxSize[0]?(t=e.contentBoxSize[0].inlineSize,e.contentBoxSize[0]):(t=e.contentBoxSize.inlineSize,e.contentBoxSize)).blockSize:(t=e.contentRect.width,e.contentRect.height);return{width:t,height:e}},s.supportsWebP=!1;var n=new Image;n.onload=function(){s.supportsWebP=0<n.width&&0<n.height},n.onerror=function(){s.supportsWebP=!1},n.src="data:image/webp;base64,UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",s.supportsPicture=!!window.HTMLPictureElement,e.DOMEventListeners=e.Class.extend({construct:function(){this.eventTargets=new Map},add:function(e,t,n,i){e.addEventListener(t,n,i);let r=this.eventTargets.get(e);return r||(r=new Map,this.eventTargets.set(e,r)),!r.get(t)&&(r.set(t,{listener:n,options:i}),!0)},remove:function(e,t){let n=this.eventTargets.get(e);var i;!n||(i=n.get(t))&&(e.removeEventListener(t,i.listener,i.options),n.delete(t),0===n.size&&this.eventTargets.delete(e))},clear:function(){this.eventTargets.forEach(function(e,n){e.forEach(function(e,t){n.removeEventListener(t,e.listener,e.options)})}),this.eventTargets.clear()}}),e.Timeouts=e.Class.extend({construct:function(){this.instances=new Map},has:function(e){return this.instances.has(e)},get:function(e){return this.instances.get(e)},set:function(e,t,n){const i=this;i.delete(e);n={id:setTimeout(function(){i.instances.delete(e),t.call(i)},n),delay:n,fn:t};return this.instances.set(e,n),i},delete:function(e){var t;return!!this.instances.has(e)&&(t=this.instances.get(e),clearTimeout(t.id),this.instances.delete(e))},clear:function(){this.instances.forEach(function(e){clearTimeout(e.id)}),this.instances.clear()}})}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.str),function(o,e,t,a,l){e.Icons=t.Class.extend({construct:function(){this.className="fg-icon",this.registered={default:{close:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M13.957 3.457l-1.414-1.414-4.543 4.543-4.543-4.543-1.414 1.414 4.543 4.543-4.543 4.543 1.414 1.414 4.543-4.543 4.543 4.543 1.414-1.414-4.543-4.543z"></path></svg>',"arrow-left":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M10.5 16l1.5-1.5-6.5-6.5 6.5-6.5-1.5-1.5-8 8 8 8z"></path></svg>',"arrow-right":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M5.5 0l-1.5 1.5 6.5 6.5-6.5 6.5 1.5 1.5 8-8-8-8z"></path></svg>',maximize:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M2 2v4h-2v-5c0-0.552 0.448-1 1-1h14c0.552 0 1 0.448 1 1v14c0 0.552-0.448 1-1 1h-14c-0.552 0-1-0.448-1-1v-9h9c0.552 0 1 0.448 1 1v7h4v-12h-12z"/></svg>',expand:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M2 5h-2v-4c0-0.552 0.448-1 1-1h4v2h-3v3z"></path><path d="M16 5h-2v-3h-3v-2h4c0.552 0 1 0.448 1 1v4z"></path><path d="M15 16h-4v-2h3v-3h2v4c0 0.552-0.448 1-1 1z"></path><path d="M5 16h-4c-0.552 0-1-0.448-1-1v-4h2v3h3v2z"></path></svg>',shrink:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M3 0h2v4c0 0.552-0.448 1-1 1h-4v-2h3v-3z"></path><path d="M11 0h2v3h3v2h-4c-0.552 0-1-0.448-1-1v-4z"></path><path d="M12 11h4v2h-3v3h-2v-4c0-0.552 0.448-1 1-1z"></path><path d="M0 11h4c0.552 0 1 0.448 1 1v4h-2v-3h-3v-2z"></path></svg>',info:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M7 4.75c0-0.412 0.338-0.75 0.75-0.75h0.5c0.412 0 0.75 0.338 0.75 0.75v0.5c0 0.412-0.338 0.75-0.75 0.75h-0.5c-0.412 0-0.75-0.338-0.75-0.75v-0.5z"></path><path d="M10 12h-4v-1h1v-3h-1v-1h3v4h1z"></path><path d="M8 0c-4.418 0-8 3.582-8 8s3.582 8 8 8 8-3.582 8-8-3.582-8-8-8zM8 14.5c-3.59 0-6.5-2.91-6.5-6.5s2.91-6.5 6.5-6.5 6.5 2.91 6.5 6.5-2.91 6.5-6.5 6.5z"></path></svg>',comment:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M3 4h10v1h-10zM3 6h8v1h-8zM3 8h4v1h-4zM14.5 1h-13c-0.825 0-1.5 0.675-1.5 1.5v8c0 0.825 0.675 1.5 1.5 1.5h2.5v4l4.8-4h5.7c0.825 0 1.5-0.675 1.5-1.5v-8c0-0.825-0.675-1.5-1.5-1.5zM14 10h-5.924l-3.076 2.73v-2.73h-3v-7h12v7z"></path></svg>',thumbs:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M3 3v10h-2v-11c0-0.552 0.448-1 1-1h12c0.552 0 1 0.448 1 1v12c0 0.552-0.448 1-1 1h-12c-0.552 0-1-0.448-1-1v-1h4v-2h-2v-2h2v-2h-2v-2h2v-2h2v10h6v-10h-10z"></path></svg>',cart:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M13.238 9c0.55 0 1.124-0.433 1.275-0.962l1.451-5.077c0.151-0.529-0.175-0.962-0.725-0.962h-10.238c0-1.105-0.895-2-2-2h-3v2h3v8.5c0 0.828 0.672 1.5 1.5 1.5h9.5c0.552 0 1-0.448 1-1s-0.448-1-1-1h-9v-1h8.238zM5 4h9.044l-0.857 3h-8.187v-3z"></path><path d="M6 14.5c0 0.828-0.672 1.5-1.5 1.5s-1.5-0.672-1.5-1.5c0-0.828 0.672-1.5 1.5-1.5s1.5 0.672 1.5 1.5z"></path><path d="M15 14.5c0 0.828-0.672 1.5-1.5 1.5s-1.5-0.672-1.5-1.5c0-0.828 0.672-1.5 1.5-1.5s1.5 0.672 1.5 1.5z"></path></svg>',"circle-close":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M8 0c-4.418 0-8 3.582-8 8s3.582 8 8 8 8-3.582 8-8-3.582-8-8-8zM8 14.5c-3.59 0-6.5-2.91-6.5-6.5s2.91-6.5 6.5-6.5 6.5 2.91 6.5 6.5-2.91 6.5-6.5 6.5z"></path><path d="M10.5 4l-2.5 2.5-2.5-2.5-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 2.5-2.5 2.5 2.5 1.5-1.5-2.5-2.5 2.5-2.5z"></path></svg>',"auto-progress":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path class="[ICON_CLASS]-idle" d="M11.39 8c2.152-1.365 3.61-3.988 3.61-7 0-0.339-0.019-0.672-0.054-1h-13.891c-0.036 0.328-0.054 0.661-0.054 1 0 3.012 1.457 5.635 3.609 7-2.152 1.365-3.609 3.988-3.609 7 0 0.339 0.019 0.672 0.054 1h13.891c0.036-0.328 0.054-0.661 0.054-1 0-3.012-1.457-5.635-3.609-7zM2.5 15c0-2.921 1.253-5.397 3.5-6.214v-1.572c-2.247-0.817-3.5-3.294-3.5-6.214v0h11c0 2.921-1.253 5.397-3.5 6.214v1.572c2.247 0.817 3.5 3.294 3.5 6.214h-11zM9.462 10.462c-1.12-0.635-1.181-1.459-1.182-1.959v-1.004c0-0.5 0.059-1.327 1.184-1.963 0.602-0.349 1.122-0.88 1.516-1.537h-6.4c0.395 0.657 0.916 1.188 1.518 1.538 1.12 0.635 1.181 1.459 1.182 1.959v1.004c0 0.5-0.059 1.327-1.184 1.963-1.135 0.659-1.98 1.964-2.236 3.537h7.839c-0.256-1.574-1.102-2.879-2.238-3.538z"/><circle class="[ICON_CLASS]-circle" r="4" cx="8" cy="8"/><path class="[ICON_CLASS]-play" d="M3 2l10 6-10 6z"/><path class="[ICON_CLASS]-pause" d="M2 2h5v12h-5zM9 2h5v12h-5z"/></svg>',search:'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M16 13.5l-4.695-4.695c0.444-0.837 0.695-1.792 0.695-2.805 0-3.314-2.686-6-6-6s-6 2.686-6 6 2.686 6 6 6c1.013 0 1.968-0.252 2.805-0.695l4.695 4.695 2.5-2.5zM2 6c0-2.209 1.791-4 4-4s4 1.791 4 4-1.791 4-4 4-4-1.791-4-4z"></path></svg>',"exif-aperture":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M 8,0 C 3.5876443,0 0,3.5876443 0,8 c 0,4.412356 3.5876443,8 8,8 4.412356,0 8,-3.587644 8,-8 C 16,3.5876443 12.412356,0 8,0 Z m 0,1 c 3.871916,0 7,3.1280844 7,7 0,3.871916 -3.128084,7 -7,7 C 4.1280844,15 1,11.871916 1,8 1,4.1280844 4.1280844,1 8,1 Z M 7.53125,2.0214844 A 6,6 0 0 0 3.1835938,4.4335938 H 8.9257812 Z M 8.6132812,2.03125 C 9.5587451,3.6702105 10.504247,5.3091484 11.451172,6.9472656 L 12.863281,4.5 A 6,6 0 0 0 8.6132812,2.03125 Z M 2.5957031,5.4101562 A 6,6 0 0 0 2,8 6,6 0 0 0 2.5273438,10.439453 L 5.4296875,5.4101562 Z m 10.8261719,0.033203 -2.855469,4.9433598 h 2.935547 A 6,6 0 0 0 14,8 6,6 0 0 0 13.421875,5.4433592 Z M 4.5722656,8.8945312 3.0996094,11.449219 a 6,6 0 0 0 4.40625,2.527343 z m 2.5820313,2.4707028 1.4960937,2.591797 a 6,6 0 0 0 4.3144534,-2.591797 z"></path></svg>',"exif-camera":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="m 8.0000002,5 a 4,4 0 0 0 -4,4 4,4 0 0 0 4,4 A 4,4 0 0 0 12,9 4,4 0 0 0 8.0000002,5 Z m 0.019531,1.015625 a 3,2.9814477 0 0 1 2.9804688,3 l -1,-0.00586 a 2,2 0 0 0 0,-0.00976 2,2 0 0 0 -1.9863279,-2 z M 5.125,1 C 4.5,1 4,1.5 4,2.125 V 3.0000004 L 1.125,3 C 0.5,2.9999999 0,3.5 0,4.125 v 9.75 C 0,14.5 0.5,15 1.125,15 h 13.75 C 15.5,15 16,14.5 16,13.875 V 4.125 C 16,3.5 15.5,3 14.875,3 H 12 V 2.125 C 12,1.5 11.5,1 10.875,1 Z M 5.25,2.0000004 h 5.5 c 0.125,0 0.25,0.1249996 0.25,0.25 v 1.75 h 3.75 c 0.125,0 0.25,0.1249996 0.25,0.25 V 13.75 C 15,13.875 14.875,14 14.75,14 H 1.25 C 1.125,14 1,13.875 1,13.75 V 4.25 C 1,4.125 1.125,4 1.25,4 l 3.75,4e-7 v -1.75 c 0,-0.1250004 0.125,-0.25 0.25,-0.25 z"></path></svg>',"exif-created-timestamp":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M 3,1 V 2 H 1 V 15 H 16 V 2 H 14 V 1 H 13 V 2 H 4 V 1 Z M 2,4 H 15 V 14 H 2 Z M 6,5 V 7 H 8 V 5 Z m 3,0 v 2 h 2 V 5 Z m 3,0 v 2 h 2 V 5 Z M 3,8 v 2 H 5 V 8 Z m 3,0 v 2 H 8 V 8 Z m 3,0 v 2 h 2 V 8 Z m 3,0 v 2 h 2 V 8 Z m -9,3 v 2 h 2 v -2 z m 3,0 v 2 h 2 v -2 z m 3,0 v 2 h 2 v -2 z"></path></svg>',"exif-shutter-speed":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M 8,0 C 3.5876443,0 -2.9415707e-8,3.5876443 0,8 c 2.3532563e-7,4.412356 3.5876445,8 8,8 4.412356,0 8,-3.587644 8,-8 C 16,3.5876443 12.412356,0 8,0 Z m 0,1 c 3.871916,0 7,3.1280844 7,7 0,3.871915 -3.128085,7 -7,7 -3.8719154,0 -6.9999998,-3.128085 -7,-7 -3e-8,-3.8719156 3.1280844,-7 7,-7 z M 11.646484,3.6464844 8.6445312,6.6484375 A 1.5,1.5 0 0 0 8,6.5 1.5,1.5 0 0 0 6.5,8 1.5,1.5 0 0 0 8,9.5 1.5,1.5 0 0 0 9.5,8 1.5,1.5 0 0 0 9.3515625,7.3554688 L 12.353516,4.3535156 Z M 2,7.5 v 1 h 2 v -1 z M 7.5,12 v 2 h 1 V 12 Z M 12,7.5 v 1 h 2 v -1 z M 7.5,2 v 2 h 1 V 2 Z"></path></svg>',"exif-focal-length":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="m 1,4.125 -1,0.25 v 7.25 l 1,0.25 z M 5,1 2,4 v 8 l 3,3 h 6.875 C 12.500003,15 13,14.5 13,13.875 V 2.125 C 13,1.4999986 12.5,1 11.875,1 9.576807,0.99914375 7.1414067,0.96597644 5,1 Z M 5.5,2 H 6 V 14 H 5.5 L 3,11.5 v -7 z M 7,2 h 4.75 C 11.875,2 12,2.1249997 12,2.25 v 11.5 c 0,0.125 -0.125,0.250622 -0.25,0.25 H 7 Z m 7,0 c 1,2.2 1.5,4.35 1.5,6 0,1.65 -0.5,3.8 -1.5,6"></path></svg>',"exif-iso":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M 7.5,0 V 1.6015625 C 6.0969201,1.7146076 4.8392502,2.256185 3.828125,3.1210938 L 2.6035156,1.8964844 1.8964844,2.6035156 3.1210938,3.828125 C 2.256185,4.8392502 1.7146076,6.0969201 1.6015625,7.5 H 0 v 1 h 1.6015625 c 0.1130451,1.4030799 0.6546225,2.66075 1.5195313,3.671875 l -1.2246094,1.224609 0.7070312,0.707032 1.2246094,-1.22461 C 4.8392502,13.743815 6.0969201,14.285392 7.5,14.398438 V 16 h 1 v -1.601562 c 1.4030799,-0.113046 2.66075,-0.654623 3.671875,-1.519532 l 1.224609,1.22461 0.707032,-0.707032 -1.22461,-1.224609 C 13.743815,11.16075 14.285392,9.9030799 14.398438,8.5 H 16 v -1 H 14.398438 C 14.285392,6.0969201 13.743815,4.8392502 12.878906,3.828125 L 14.103516,2.6035156 13.396484,1.8964844 12.171875,3.1210938 C 11.16075,2.256185 9.9030799,1.7146076 8.5,1.6015625 V 0 Z M 8,2.5 c 3.043488,0 5.5,2.4565116 5.5,5.5 0,3.043488 -2.456512,5.5 -5.5,5.5 C 4.9565116,13.5 2.5,11.043488 2.5,8 2.5,4.9565116 4.9565116,2.5 8,2.5 Z"></path></svg>',"exif-orientation":'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M 1.25,0 C 0.625,0 0,0.625 0,1.25 V 5 H 1 V 3 h 8 v 2 h 1 V 1.25 C 10,0.625 9.375,0 8.75,0 Z m 0,1 h 7.5 C 8.875,1 9,1.125 9,1.25 V 2 H 1 V 1.25 C 1,1.125 1.125,1 1.25,1 Z m 0,5 C 0.625,6 0,6.625 0,7.25 v 7.5 C 0,15.375 0.625,16 1.25,16 h 13.5 C 15.375,16 16,15.375 16,14.75 V 7.25 C 16,6.625 15.375,6 14.75,6 Z m 0,1 H 2 v 3 H 1 V 7.25 C 1,7.125 1.125,7 1.25,7 Z M 3,7 h 10 v 8 H 3 Z m 11,0 h 0.75 C 14.875,7 15,7.125 15,7.25 v 7.5 C 15,14.875 14.875,15 14.75,15 H 14 Z M 1,12 h 1 v 3 H 1.25 C 1.125,15 1,14.875 1,14.75 Z"></path></svg>'}}},register:function(e,t){return!(a.empty(e)||a.empty(t)||!a.string(e)||!a.hash(t))&&(this.registered[e]=l.extend({},this.registered.default,t),!0)},get:function(e,t){var n=this,i="default",r=l.extend({},n.registered.default),t=(a.string(t)&&"default"!==t?r=l.extend(r,n.registered[i=t]):a.hash(t)&&(i="custom",r=l.extend(r,t)),a.string(e)&&r.hasOwnProperty(e)?r[e].replace(/\[ICON_CLASS]/g,n.className+"-"+e):null),r=[!1,e,i].map(function(e){return!1===e?n.className:n.className+"-"+e}).join(" ");return o(t).addClass(r)},element:function(e,t){const n=this;let i="default",r=l.extend({},n.registered.default);a.string(t)&&"default"!==t?(i=t,r=l.extend(r,n.registered[t])):a.hash(t)&&(i="custom",r=l.extend(r,t));t=a.string(e)&&r.hasOwnProperty(e)?r[e].replace(/\[ICON_CLASS]/g,n.className+"-"+e):null;if(null!==t){const o=document.createRange().createContextualFragment(t),s=o.querySelector("svg");if(s)return["","-"+e,"-"+i].forEach(function(e){s.classList.add(n.className+e)}),s}return null}}),e.icons=new e.Icons}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.obj),function(r,n,i,o,s){var a="__FooGallerySwipe__",e="ontouchstart"in window,l=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled&&!e,c=(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&!e,u=e||c;n.Swipe=i.Class.extend({construct:function(e,t){var n=this,i=".fgswipe";n.$el=r(e),n.opt=s.extend({threshold:20,allowPageScroll:!1,swipe:r.noop,data:{}},t),n.active=!1,n.startPoint=null,n.endPoint=null,n.events={start:(u?c?l?"MSPointerDown":"pointerdown":"touchstart":"mousedown")+i,move:(u?c?l?"MSPointerMove":"pointermove":"touchmove":"mousemove")+i,end:(u?c?l?"MSPointerUp":"pointerup":"touchend":"mouseup")+i,leave:(!u||c?"mouseleave":null)+i}},init:function(){var e=this;e.$el.on(e.events.start,{self:e},e.onStart),e.$el.on(e.events.move,{self:e},e.onMove),e.$el.on(e.events.end,{self:e},e.onEnd),o.string(e.events.leave)&&e.$el.on(e.events.leave,{self:e},e.onEnd),e.$el.data(a,e)},destroy:function(){var e=this;e.$el.off(e.events.start,e.onStart),e.$el.off(e.events.move,e.onMove),e.$el.off(e.events.end,e.onEnd),o.string(e.events.leave)&&e.$el.off(e.events.leave,e.onEnd),e.$el.removeData(a)},getAngle:function(e,t){e=Math.atan2(e.x-t.x,e.y-t.y),t=Math.round(180*e/Math.PI);return 360-(t<0?360-Math.abs(t):t)},getDistance:function(e,t){var n=t.x-e.x,t=t.y-e.y;return n*=n,t*=t,Math.sqrt(n+t)},getDirection:function(e,t){e=this.getAngle(e,t);return 337.5<e||e<=22.5?"N":22.5<e&&e<=67.5?"NE":67.5<e&&e<=112.5?"E":112.5<e&&e<=157.5?"SE":157.5<e&&e<=202.5?"S":202.5<e&&e<=247.5?"SW":247.5<e&&e<=292.5?"W":292.5<e&&e<=337.5?"NW":"NONE"},getPoint:function(e){var t;return u&&!o.empty(t=e.originalEvent.touches||e.touches)?{x:t[0].pageX,y:t[0].pageY}:o.number(e.pageX)&&o.number(e.pageY)?{x:e.pageX,y:e.pageY}:null},getOffset:function(e){var t=this.$el.offset();return{left:e.x-t.left,top:e.y-t.top}},onStart:function(e){var t=e.data.self,e=t.getPoint(e);o.empty(e)||(t.active=!0,t.startPoint=t.endPoint=e)},onMove:function(e){var t=e.data.self,n=t.getPoint(e);t.active&&!o.empty(n)&&(t.endPoint=n,t.opt.allowPageScroll?o.hash(t.opt.allowPageScroll)&&(n=t.getDirection(t.startPoint,t.endPoint),t.opt.allowPageScroll.x||-1===i.inArray(n,["NE","E","SE","NW","W","SW"])||e.preventDefault(),t.opt.allowPageScroll.y||-1===i.inArray(n,["NW","N","NE","SW","S","SE"])||e.preventDefault()):e.preventDefault())},onEnd:function(e){var t,e=e.data.self;e.active&&(e.active=!1,t={startPoint:e.startPoint,endPoint:e.endPoint,startOffset:e.getOffset(e.startPoint),endOffset:e.getOffset(e.endPoint),angle:e.getAngle(e.startPoint,e.endPoint),distance:e.getDistance(e.startPoint,e.endPoint),direction:e.getDirection(e.startPoint,e.endPoint)},0<e.opt.threshold&&t.distance<e.opt.threshold||(e.opt.swipe.apply(this,[t,e.opt.data]),e.startPoint=null,e.endPoint=null))}}),r.fn.fgswipe=function(t){return this.each(function(){var e=r(this).data(a);if(e instanceof n.Swipe){if(o.string(t)&&o.fn(e[t]))return void e[t]();e.destroy()}o.hash(t)&&(e=new n.Swipe(this,t)).init()})}}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.obj),function(r,e,t,o,s,a){e.Factory=t.Class.extend({construct:function(){this.registered={}},contains:function(e){return!o.undef(this.registered[e])},make:function(e,t,n){var i,r=s.arg2arr(arguments);return e=r.shift(),i=this.registered[e],o.hash(i)&&o.fn(i.klass)?s.apply(i.klass,r):null},names:function(e){e=!!o.boolean(e)&&e;var t,n=[];if(e){var i=[];for(t in this.registered)this.registered.hasOwnProperty(t)&&i.push(this.registered[t]);i.sort(function(e,t){return t.priority-e.priority}),r.each(i,function(e,t){n.push(t.name)})}else for(t in this.registered)this.registered.hasOwnProperty(t)&&n.push(t);return n},register:function(e,t,n){if(!o.string(e)||o.empty(e)||!o.fn(t))return!1;n=o.number(n)?n:0;var i=this.registered[e];return this.registered[e]={name:e,klass:t,priority:o.undef(i)?n:i.priority},!0},load:function(){var e,n=this,i=[],t=[];for(e in n.registered)n.registered.hasOwnProperty(e)&&t.push(n.registered[e]);return t.sort(function(e,t){return t.priority-e.priority}),r.each(t,function(e,t){i.push(n.make(t.name))}),i},configure:function(e,t,n,i){var r;this.contains(e)&&(r=this.registered,a.extend(r[e].opt,t),a.extend(r[e].cls,n),a.extend(r[e].il8n,i))}})}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.obj),function(l,s,c,u,a){s.TemplateFactory=s.Factory.extend({construct:function(){this.registered={}},register:function(e,t,n,i,r,o){t=this._super(e,t,o);return t&&((o=this.registered)[e].opt=u.hash(n)?n:{},o[e].cls=u.hash(i)?i:{},o[e].il8n=u.hash(r)?r:{}),t},make:function(e,t){t=u.jq(t)?t:l(t),e=a.extend({},e,t.data("foogallery"));var n=this.type(e,t);return this.contains(n)?(e=this.options(n,e),this._super(n,e,t)):null},type:function(e,t){t=u.jq(t)?t:l(t);var n=u.hash(e)&&u.hash(e)&&u.string(e.type)&&this.contains(e.type)?e.type:null;if(null===n&&0<t.length)for(var i=this.registered,r=this.names(!0),o=0,s=r.length;o<s;o++)if(i.hasOwnProperty(r[o])&&"core"!==r[o]){var a=i[r[o]].cls;if(u.string(a.container)){a=c.selectify(a.container);if(t.is(a)){n=r[o];break}}}return n},options:function(e,t){t=a.extend({type:e},t);var n=this.registered,i=n.core.opt,r=n.core.cls,o=n.core.il8n;return u.hash(t.cls)||(t.cls={}),u.hash(t.il8n)||(t.il8n={}),u.undef(s.filtering)||(t=s.filtering.merge(t)),u.undef(s.paging)||(t=s.paging.merge(t)),"core"!==e&&this.contains(e)?((t=a.extend({},i,n[e].opt,t)).cls=a.extend({},r,n[e].cls,t.cls),t.il8n=a.extend({},o,n[e].il8n,t.il8n)):((t=a.extend({},i,t)).cls=a.extend({},r,t.cls),t.il8n=a.extend({},o,t.il8n)),t}}),s.template=new s.TemplateFactory}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,(FooGallery.utils.fn,FooGallery.utils.obj)),function(i,r,o,s,a){var l=0;r.Template=o.EventClass.extend({construct:function(e,t){var n=this;n._super(),n.namespace=".foogallery-"+ ++l,n.$el=s.jq(t)?t:i(t),n.el=n.$el.get(0)||null,n.$scrollParent=null,n.opt=e,n.template=e.template,n.id=n.$el.prop("id")||e.id,n.cls=e.cls,n.il8n=e.il8n,n.sel=o.selectify(n.cls),n.items=r.components.make("items",n),n.pages=s.undef(r.paging)?null:r.paging.make(e.paging.type,n),n.filter=s.undef(r.filtering)?null:r.filtering.make(e.filtering.type,n),n.state=r.components.make("state",n),n._initialize=null,n._layoutTimeout=null,n._layoutWidths=[],n.lastWidth=0,n.initializing=!1,n.initialized=!1,n.destroying=!1,n.destroyed=!1,n._undo={classes:"",style:"",create:!1,children:!1},n.robserver=new ResizeObserver(a.throttle(function(e){n.destroying||n.destroyed||1!==e.length||e[0].target!==n.el||(e=o.getResizeObserverSize(e[0]),n.layout(e.width))},50))},initialize:function(t){var n=this;return s.promise(n._initialize)?n._initialize:n._initialize=i.Deferred(function(e){n.preInit(t)?n.init().then(function(){n.postInit()?(n.ready(),e.resolve(n)):e.reject("post-init failed")}).fail(e.reject):e.reject("pre-init failed")}).fail(function(e){return console.log("initialize failed",n,e),n.destroy()}).promise()},preInit:function(e){var t=this;if(t.destroying)return!1;if(e=s.jq(e)?e:i(e),t.initializing=!0,0===e.length&&0===t.$el.parent().length)return!1;0===t.$el.length&&(t.$el=t.create(),t.el=t.$el.get(0),t._undo.create=!0),0<e.length&&t.$el.appendTo(e),s.empty(t.opt.scrollParent)||0===(e=i(t.opt.scrollParent)).length?t.$scrollParent=i(document):t.$scrollParent=e.is("html")?i(document):e,t.$el.data(r.DATA_TEMPLATE,t),s.empty(t.opt.on)||t.on(t.opt.on),t._undo.classes=t.$el.attr("class"),t._undo.style=t.$el.attr("style"),t.$el.is(t.sel.container)||t.$el.addClass(t.cls.container);e=o.selectify(t.opt.classes);return null==e||t.$el.is(e)||t.$el.addClass(t.opt.classes),0===t.$el.children().not(t.sel.item.elem).length&&(t.$el.append(t.createChildren()),t._undo.children=!0),t.opt.protected&&(t.el.oncontextmenu=function(e){return e.preventDefault(),!1}),!t.trigger("pre-init").isDefaultPrevented()},init:function(){return this.trigger("init").isDefaultPrevented()?a.reject("init default prevented"):this.items.fetch()},postInit:function(){var e=this;return!e.destroying&&(!e.trigger("post-init").isDefaultPrevented()&&(e.state.init(),e.pages&&e.pages.init(),i(window).on("popstate"+e.namespace,{self:e},e.onWindowPopState),e.robserver.observe(e.el),!0))},ready:function(){return!this.destroying&&(this.initializing=!1,this.initialized=!0,this.trigger("ready"),!0)},create:function(){return i("<div/>",{id:this.id,class:this.cls.container}).addClass(this.opt.classes)},createChildren:function(){return i()},destroy:function(t){var n=this,e=n._super.bind(n);return n.destroyed?a.resolved:(n.destroying=!0,i.Deferred(function(e){n.initializing&&s.promise(n._initialize)?n._initialize.always(function(){n.destroying=!1,n.doDestroy(t),e.resolve()}):(n.destroying=!1,n.doDestroy(t),e.resolve())}).then(function(){e()}).promise())},doDestroy:function(e){var t=this;t.destroyed||(t.trigger("destroy"),t.robserver.disconnect(),i(window).off(t.namespace),t.state.destroy(e),t.filter&&t.filter.destroy(),t.pages&&t.pages.destroy(),t.items.destroy(),s.empty(t.opt.on)||t.$el.off(t.opt.on),t.trigger("destroyed"),t.$el.removeData(r.DATA_TEMPLATE),s.empty(t._undo.classes)?t.$el.removeAttr("class"):t.$el.attr("class",t._undo.classes),s.empty(t._undo.style)?t.$el.removeAttr("style"):t.$el.attr("style",t._undo.style),t._undo.children&&t.destroyChildren(),t._undo.create&&t.$el.remove(),t.$el=t.state=t.items=t.pages=null,t.destroyed=!0,t.initializing=!1,t.initialized=!1)},destroyChildren:function(){},getAvailable:function(){return(this.pages||this.items).available()},layout:function(e){var t=this;null===t._initialize||0===(e=s.number(e)?e:t.el.getBoundingClientRect().width)||t._checkWidth(e)||(t.lastWidth=e,t.trigger("layout",[e]))},_checkWidth:function(e){var t,n=this;return(t=-1!==n._layoutWidths.indexOf(e))||(n._layoutWidths.unshift(e),n._layoutWidths.splice(2,n._layoutWidths.length-2),null!=n._layoutTimeout&&clearTimeout(n._layoutTimeout),n._layoutTimeout=setTimeout(function(){n._layoutWidths.splice(0,n._layoutWidths.length)},100)),t},getCSSClass:function(e,t){t=s.empty(t)?"":t;var e=e instanceof RegExp?e:s.string(e)&&this.opt.regex.hasOwnProperty(e)?this.opt.regex[e]:null,n=this.$el.prop("className")||"",n=null!=e?n.match(e):null;return null!=n&&2<=n.length?n[1]:t},onWindowPopState:function(e){var t=e.data.self,e=e.originalEvent.state;s.empty(e)||e.id!==t.id||t.state.set(e)}}),r.template.register("core",r.Template,{id:null,type:"core",classes:"",on:{},lazy:!0,items:[],scrollParent:null,delay:0,throttle:50,shortpixel:!1,srcset:"data-srcset-fg",src:"data-src-fg",protected:!1,template:{},regex:{theme:/(?:\s|^)(fg-(?:light|dark|custom))(?:\s|$)/,loadingIcon:/(?:\s|^)(fg-loading-(?:default|bars|dots|partial|pulse|trail))(?:\s|$)/,hoverIcon:/(?:\s|^)(fg-hover-(?:zoom|zoom2|zoom3|plus|circle-plus|eye|external|tint))(?:\s|$)/,videoIcon:/(?:\s|^)(fg-video-(?:default|1|2|3|4))(?:\s|$)/,border:/(?:\s|^)(fg-border-(?:thin|medium|thick))(?:\s|$)/,hoverColor:/(?:\s|^)(fg-hover-(?:colorize|grayscale))(?:\s|$)/,hoverScale:/(?:\s|^)(fg-hover-scale)(?:\s|$)/,stickyVideoIcon:/(?:\s|^)(fg-video-sticky)(?:\s|$)/,insetShadow:/(?:\s|^)(fg-shadow-inset-(?:small|medium|large))(?:\s|$)/,filter:/(?:\s|^)(fg-filter-(?:1977|amaro|brannan|clarendon|earlybird|lofi|poprocket|reyes|toaster|walden|xpro2|xtreme))(?:\s|$)/}},{container:"foogallery"},{},-100)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.str),function(e,t){e.Component=t.EventClass.extend({construct:function(e){this._super(),this.tmpl=e},destroy:function(){this.tmpl=null,this._super()}}),e.components=new e.Factory}(FooGallery,FooGallery.utils,FooGallery.utils.is),function(t,o,n,s,a,l){o.State=o.Component.extend({construct:function(e){var t=this,e=(t._super(e),t.apiEnabled=!!window.history&&!!history.replaceState,t.opt=t.tmpl.opt.state,t.enabled=t.opt.enabled,t.current={filter:[],page:0,item:null},t.pushOrReplace=t.isPushOrReplace(t.opt.pushOrReplace)?t.opt.pushOrReplace:"replace",t.defaultMask="foogallery-gallery-{id}",a.escapeRegExp(t.tmpl.id)),n=a.escapeRegExp(t.getMasked()),i=a.escapeRegExp(t.opt.values),r=a.escapeRegExp(t.opt.pair);t.regex={exists:new RegExp("^#"+e+"\\"+i+".+?"),masked:new RegExp("^#"+n+"\\"+i+".+?"),values:new RegExp("(\\w+)"+r+"([^"+i+"]+)","g")}},destroy:function(e){e||this.clear(),this.opt=this.regex={},this._super()},init:function(){this.set(this.initial())},getIdNumber:function(){return this.tmpl.id.match(/\d+/g)[0]},getMasked:function(){var e=a.contains(this.opt.mask,"{id}")?this.opt.mask:this.defaultMask;return a.format(e,{id:this.getIdNumber()})},isPushOrReplace:function(e){return-1!==n.inArray(e,["push","replace"])},exists:function(){return this.regex.values.lastIndex=0,(this.regex.exists.test(location.hash)||this.regex.masked.test(location.hash))&&this.regex.values.test(location.hash)},parse:function(){var e,r=this,o=r.tmpl,s={};return r.exists()&&(r.enabled?(s.id=r.tmpl.id,r.regex.values.lastIndex=0,e=location.hash.match(r.regex.values),t.each(e,function(e,t){var n,i=t.split(r.opt.pair);if(2===i.length)switch(i[0]){case r.opt.itemKey:null!==(n=o.items.fromHash(i[1]))&&(s.item=n);break;case r.opt.pageKey:o.pages&&null!==(n=o.pages.fromHash(i[1]))&&(s.page=n);break;case r.opt.filterKey:o.filter&&null!==(n=o.filter.fromHash(i[1]))&&(s.filter=n)}})):r.apiEnabled?history.replaceState(null,"",location.pathname+location.search):location.hash="#"),s},hashify:function(e){var t,n,i=this,r=i.tmpl;return s.hash(e)?(t=[],null!==(n=r.items.toHash(e.item))&&t.push(i.opt.itemKey+i.opt.pair+n),r.filter&&null!==(n=r.filter.toHash(e.filter))&&t.push(i.opt.filterKey+i.opt.pair+n),r.pages&&null!==(n=r.pages.toHash(e.page))&&t.push(i.opt.pageKey+i.opt.pair+n),0<t.length&&t.unshift("#"+i.getMasked()),t.join(i.opt.values)):""},replace:function(e){var t,n;this.enabled&&this.apiEnabled&&(e.id=this.tmpl.id,t=this.hashify(e),n=s.empty(t),e=l.extend({},e,{item:e.item instanceof o.Item?e.item.id:e.item}),history.replaceState(n?null:e,"",n?location.pathname+location.search:t))},push:function(e){var t,n;this.enabled&&this.apiEnabled&&(e.id=this.tmpl.id,t=this.hashify(e),n=s.empty(t),e=l.extend({},e,{item:e.item instanceof o.Item?e.item.id:e.item}),history.pushState(n?null:e,"",n?location.pathname+location.search:t))},update:function(e,t){var n=this;n.enabled&&n.apiEnabled&&(t=n.isPushOrReplace(t)?t:n.pushOrReplace,n[t](e))},clear:function(){this.exists()&&this.replace({})},initial:function(){var e=this.parse();return s.empty(e)?this.get():l.extend({filter:[],page:1,item:null},e)},get:function(e){var t,n=this.tmpl,i={};return e instanceof o.Item&&(i.item=e),n.filter&&null!==(t=n.filter.getState())&&(i.filter=t),n.pages&&null!==(t=n.pages.getState())&&(i.page=t),l.extend({filter:[],page:1,item:null},i)},set:function(e){var t,n,i,r=this.tmpl;s.hash(e)&&(t=l.extend({filter:[],page:1,item:null},e),r.items.reset(),r.trigger("before-state",[t]).isDefaultPrevented()||(r.filter&&r.filter.setState(t),r.pages?r.pages.setState(t):(n=r.items.available(),r.items.isAll(n)||(i=r.items.not(n),r.items.detach(i)),r.items.create(n,!0)),t.item instanceof o.Item&&(this.opt.scrollTo&&t.item.scrollTo(),s.empty(e.item)||(e.item=null,this.replace(e))),this.current=t,r.trigger("after-state",[t])))}}),o.template.configure("core",{state:{enabled:!1,scrollTo:!0,pushOrReplace:"replace",mask:"foogallery-gallery-{id}",values:"/",pair:":",array:"+",arraySeparator:",",itemKey:"i",filterKey:"f",pageKey:"p"}}),o.components.register("state",o.State)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.str,FooGallery.utils.obj),function(s,o,n,a,i,l){o.Items=o.Component.extend({construct:function(e){var t=this,e=(t.ALLOW_CREATE=!0,t.ALLOW_APPEND=!0,t.LAYOUT_AFTER_LOAD=!0,t._super(e),t._typeRegex=/(?:^|\s)?fg-type-(.*?)(?:$|\s)/,t._fetched=null,t._all=[],t._available=[],t._unavailable=[],t._observed=new Map,t.tmpl.cls.item.caption);t.tmpl.sel.item.caption.all=n.selectify([e.elem,e.inner,e.title,e.description]),t._wait=[],t._layoutTimeout=null,t.iobserver=new IntersectionObserver(function(e){t.tmpl.destroying||t.tmpl.destroyed||(t.LAYOUT_AFTER_LOAD&&clearTimeout(t._layoutTimeout),e.forEach(function(e){e.isIntersecting&&(e=t._observed.get(e.target))instanceof o.Item&&t._wait.push(e.load())}),t.LAYOUT_AFTER_LOAD&&(t._layoutTimeout=setTimeout(function(){0<t._wait.length&&i.allSettled(t._wait.splice(0)).then(function(){t.tmpl.layout()})},100)))})},fromHash:function(t){return this.find(this._all,function(e){return e.id===t})},toHash:function(e){return e instanceof o.Item?e.id:null},destroy:function(){var e=this,t=e.all();e.iobserver.disconnect(),0<t.length&&(e.tmpl.trigger("destroy-items",[t]),0<(t=s.map(t,function(e){return e.destroy()?e:null})).length&&e.tmpl.trigger("destroyed-items",[t])),e._fetched=null,e._all=[],e._available=[],e._unavailable=[],e._observed.clear(),e._super()},fetch:function(e){var t,i,r,o,n=this;return!e&&a.promise(n._fetched)?n._fetched:(e=n.tmpl.id+"_items",t=n.tmpl.sel,i=n.tmpl.opt.items,r=s.Deferred(),o=n.make(n.tmpl.$el.find(t.item.elem)),a.empty(i)?(a.array(window[e])&&o.push.apply(o,n.make(window[e])),r.resolve(o)):a.array(i)?(o.push.apply(o,n.make(i)),r.resolve(o)):a.string(i)?s.get(i).then(function(e){o.push.apply(o,n.make(e)),r.resolve(o)},function(e,t,n){console.log("FooGallery: GET items error.",i,e,t,n),r.resolve(o)}):r.resolve(o),r.then(function(e){n.setAll(e)}),n._fetched=r.promise())},toJSON:function(e){return(e?this.all():this.available()).map(function(e){return e.toJSON()})},all:function(){return this._all.slice()},count:function(e){return(e?this.all():this.available()).length},available:function(e){return a.fn(e)?this._available.filter(e,this):this._available.slice()},unavailable:function(e){return a.fn(e)?this._unavailable.filter(e,this):this._unavailable.slice()},setAll:function(e){this._all=a.array(e)?e:[],this._all.forEach(function(e,t){e.index=t,a.empty(e.id)&&(e.id=t+1+"")}),this._available=this.all(),this._unavailable=[]},setAvailable:function(e){var t=this;t._available=a.array(e)?e:[],t._all.length!==t._available.length?t._unavailable=t._all.filter(function(e){return-1===t._available.indexOf(e)}):t._unavailable=[]},reset:function(){this.setAvailable(this.all())},find:function(e,t){if(t=a.fn(t)?t:function(){return!0},a.array(e))for(var n=0,i=e.length;n<i;n++)if(!0===t.call(this,e[n]))return e[n];return null},not:function(t){var e=this.all();return a.array(t)?e.filter(function(e){return-1===t.indexOf(e)}):e},isAll:function(e){return!!a.array(e)&&this._all.length===e.length},first:function(e){return this.find(this._available,e)},last:function(e){return this.find(this._available.slice().reverse(),e)},next:function(e,t,n){if(!(e instanceof o.Item))return null;n=!!a.boolean(n)&&n;var i,r=this._available.slice(),e=r.indexOf(e);return-1!==e?(i=r.slice(0,e),r=r.slice(e+1),n&&(r=r.concat(i)),this.find(r,t)):null},prev:function(e,t,n){if(!(e instanceof o.Item))return null;n=!!a.boolean(n)&&n;var i,r=this._available.slice().reverse(),e=r.indexOf(e);return-1!==e?(i=r.slice(0,e),r=r.slice(e+1),n&&(r=r.concat(i)),this.find(r,t)):null},get:function(t,e){e=e?this._all:this._available;return a.number(t)?0<=t&&t<this._all.length?e[t]:null:this.find(e,function(e){return e.el===t})},indexOf:function(e,t){return(t?this._all:this._available).indexOf(e)},creatable:function(e){return this.ALLOW_CREATE&&a.array(e)?s.map(e,function(e){return e instanceof o.Item&&!e.isCreated?e:null}):[]},appendable:function(e){return this.ALLOW_APPEND&&a.array(e)?s.map(e,function(e){return e instanceof o.Item&&e.isCreated&&!e.isAttached?e:null}):[]},detachable:function(e){return a.array(e)?s.map(e,function(e){return e instanceof o.Item&&e.isCreated&&e.isAttached?e:null}):[]},jquerify:function(e){return s(s.map(e,function(e){return e.$el.get()}))},make:function(e){var i=this,t=[];if(a.jq(e)||a.array(e)){var r=[],e=s.makeArray(e);if(0===e.length)return t;0<(t=i.tmpl.trigger("make-items",[e]).isDefaultPrevented()?t:s.map(e,function(e){var t=i.type(e),n=l.extend(a.hash(e)?e:{},{type:t}),t=o.components.make(t,i.tmpl,n);return a.element(e)?t.parse(e)?(r.push(t),i.ALLOW_APPEND||t.detach(),t):null:t})).length&&i.tmpl.trigger("made-items",[t]),0<r.length&&i.tmpl.trigger("parsed-items",[r])}return t},type:function(e){var t;return a.hash(e)?t=e.type:a.element(e)&&null!==(e=e.className.match(this._typeRegex))&&2===e.length&&(t=e[1]),a.string(t)&&o.components.contains(t)?t:"image"},create:function(e,t){var n=[],i=this.creatable(e);return 0<i.length&&0<(n=this.tmpl.trigger("create-items",[i]).isDefaultPrevented()?n:s.map(i,function(e){return e.create()?e:null})).length&&this.tmpl.trigger("created-items",[n]),a.boolean(t)&&t?this.append(e):n},append:function(e){var t=[],e=this.appendable(e);return 0<e.length&&0<(t=this.tmpl.trigger("append-items",[e]).isDefaultPrevented()?t:s.map(e,function(e){return e.append()?e:null})).length&&this.tmpl.trigger("appended-items",[t]),t},detach:function(e){var t=[],e=this.detachable(e);return 0<e.length&&0<(t=this.tmpl.trigger("detach-items",[e]).isDefaultPrevented()?t:s.map(e,function(e){return e.detach()?e:null})).length&&this.tmpl.trigger("detached-items",[t]),t},observe:function(e){!(this.iobserver&&e.isCreated&&e.isAttached)||e.isLoading&&e.isLoaded||(this.iobserver.observe(e.el),this._observed.set(e.el,e))},unobserve:function(e){this.iobserver&&(this.iobserver.unobserve(e.el),this._observed.delete(e.el))}}),o.components.register("items",o.Items)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn,FooGallery.utils.obj),function(y,b,_,w,o,x){b.Item=b.Component.extend({construct:function(e,t){var n=this;n._super(e),n.cls=e.cls.item,n.il8n=e.il8n.item,n.sel=e.sel.item,n.opt=o.extend({},e.opt.item,t),n.isAttached=!1,n.isCreated=!1,n.isDestroyed=!1,n.isLoading=!1,n.isLoaded=!1,n.isError=!1,n.isParsed=!1,n.isPicture=!1,n.$el=null,n.el=null,n.$inner=null,n.$anchor=null,n.$overlay=null,n.$wrap=null,n.$image=null,n.$caption=null,n.$loader=null,n.index=-1,n.type=n.opt.type,n.id=n.opt.id,n.productId=n.opt.productId,n.href=n.opt.href,n.placeholder=n.opt.placeholder,n.src=n.opt.src,n.srcset=n.opt.srcset,n.sources=n.opt.sources,n.width=n.opt.width,n.height=n.opt.height,n.title=n.opt.title,n.alt=n.opt.alt,n.caption=n.opt.caption,n.description=n.opt.description,n.attr=n.opt.attr,n.tags=n.opt.tags,n.maxCaptionLength=n.opt.maxCaptionLength,n.maxDescriptionLength=n.opt.maxDescriptionLength,n.showCaptionTitle=n.opt.showCaptionTitle,n.showCaptionDescription=n.opt.showCaptionDescription,n.noLightbox=n.opt.noLightbox,n.panelHide=n.opt.panelHide,n.exif=n.opt.exif,n.hasExif=w.exif(n.exif),n.ribbon=n.opt.ribbon,n.hasRibbon=w.hash(n.ribbon)&&w.string(n.ribbon.text)&&w.string(n.ribbon.type),n.buttons=n.opt.buttons,n._load=null,n._undo={classes:"",style:"",placeholder:!1}},destroy:function(){var e=this;return e.tmpl.trigger("destroy-item",[e]).isDefaultPrevented()||(e.isDestroyed=e.doDestroyItem()),e.isDestroyed&&(e.tmpl.trigger("destroyed-item",[e]),e._super()),e.isDestroyed},doDestroyItem:function(){var e=this;return e.isParsed?(e.$anchor.add(e.$caption).off("click.foogallery"),e.append(),e.tmpl.items.unobserve(e),w.empty(e._undo.classes)?e.$el.removeAttr("class"):e.$el.attr("class",e._undo.classes),w.empty(e._undo.style)?e.$el.removeAttr("style"):e.$el.attr("style",e._undo.style),e._undo.placeholder&&e.$image.prop("src")===e.placeholder&&e.$image.removeAttr("src")):e.isCreated&&(e.detach(),e.$el.remove()),!0},parse:function(e){var t=this,e=y(e);return!t.tmpl.trigger("parse-item",[t,e]).isDefaultPrevented()&&(t.isCreated=e.is(t.sel.elem))&&(t.isParsed=t.doParseItem(e)),t.isParsed&&(t.isLoaded||t.tmpl.items.observe(t),t.tmpl.trigger("parsed-item",[t])),t.isParsed},doParseItem:function(e){var n=this,t=n.cls,i=n.sel,r=e.get(0);if(n._undo.classes=e.attr("class")||"",n._undo.style=e.attr("style")||"",n.$el=e.data(b.DATA_ITEM,n),n.el=r,n.$inner=y(r.querySelector(i.inner)),n.$anchor=y(r.querySelector(i.anchor)).on("click.foogallery",{self:n},n.onAnchorClick),n.$image=y(r.querySelector(i.image)),n.$caption=y(r.querySelector(i.caption.elem)).on("click.foogallery",{self:n},n.onCaptionClick),n.$overlay=y(r.querySelector(i.overlay)),n.$wrap=y(r.querySelector(i.wrap)),n.$loader=y(r.querySelector(i.loader)),!(n.$el.length&&n.$inner.length&&n.$anchor.length&&n.$image.length))return console.error("FooGallery Error: Invalid HTML markup. Check the item markup for additional elements or malformed HTML in the title or description.",n),n.isError=!0,n.tmpl.trigger("error-item",[n]),0!==n.$el.length&&n.$el.remove(),!1;n.isAttached=null!==r.parentNode,n.isLoading=n.$el.hasClass(t.loading),n.isLoaded=n.$el.hasClass(t.loaded),n.isError=n.$el.hasClass(t.error);var e=n.$anchor.data(),i=(n.id=e.id||n.id,n.productId=e.productId||n.productId,n.tags=e.tags||n.tags,n.href=e.href||n.$anchor.attr("href")||n.href,r=n.$image.is("picture")?(n.isPicture=!0,n.sources=n.$image.find("source").map(function(e,t){return{srcset:t.getAttribute(n.tmpl.opt.srcset),type:t.getAttribute("type"),media:t.getAttribute("media"),sizes:t.getAttribute("sizes")}}).get(),n.$image.find("img")):n.$image,n.src=r.attr(n.tmpl.opt.src)||n.src,n.srcset=r.attr(n.tmpl.opt.srcset)||n.srcset,n.width=parseInt(r.attr("width"))||n.width,n.height=parseInt(r.attr("height"))||n.height,n.title=r.attr("title")||n.title,n.alt=r.attr("alt")||n.alt,n.caption=e.title||e.captionTitle||n.caption,n.description=e.description||e.captionDesc||n.description,n.noLightbox=n.$anchor.hasClass(t.noLightbox),n.panelHide=n.$anchor.hasClass(t.panelHide),w.exif(e.exif)&&(n.exif=o.extend(n.exif,e.exif),n.hasExif=!0),0<n.maxCaptionLength&&((e=x.trimTo(n.caption,n.maxCaptionLength))!==n.caption&&n.$caption.find(i.caption.title).html(e)),!n.maxDescriptionLength||(e=x.trimTo(n.description,n.maxDescriptionLength))!==n.description&&n.$caption.find(i.caption.description).html(e),r.get(0)),e=(w.string(i.src)&&0!==i.src.length||(w.string(n.placeholder)&&0!==n.placeholder.length||(n.placeholder=n.createPlaceholder(n.width,n.height)),0<n.placeholder.length&&(i.src=n.placeholder,n._undo.placeholder=!0)),n.getTypeClass());return n.$el.hasClass(e)||n.$el.addClass(e),n.hasExif&&!n.$el.hasClass(t.exif)&&n.$el.addClass(t.exif),!n.isCreated||!n.isAttached||n.isLoading||n.isLoaded||n.isError||n.$el.hasClass(t.idle)||n.$el.addClass(t.idle),n.doShortPixel(),!0},create:function(){var e=this;return!e.isCreated&&w.string(e.href)&&w.string(e.src)&&w.number(e.width)&&w.number(e.height)&&(e.tmpl.trigger("create-item",[e]).isDefaultPrevented()||(e.isCreated=e.doCreateItem()),e.isCreated&&e.tmpl.trigger("created-item",[e])),e.isCreated},_setAttributes:function(t,n){Object.keys(n).forEach(function(e){w.empty(n[e])||t.setAttribute(e,w.string(n[e])?n[e]:JSON.stringify(n[e]))})},doShortPixel:function(){var e,t=this;function n(e,t,n){return"/"===t||"/"===n?"/":t}t.tmpl.opt.shortpixel&&!b.supportsWebP&&(t.href=t.href.replace(e=/([\/,+])to_webp([\/,+])/i,n),t.src=t.src.replace(e,n),t.srcset=t.srcset.replace(e,n))},doCreateItem:function(){var i,e,r=this,t=r.cls,n=r.attr,o=r.hasExif?t.exif:"",s=(r.isLoaded=!r.tmpl.opt.lazy,r.isPicture=0<r.sources.length,r.doShortPixel(),document.createElement("div")),o=(r._setAttributes(s,n.elem),s.className=[t.elem,r.getTypeClass(),o,r.isLoaded?t.loaded:t.idle].join(" "),document.createElement("figure")),a=(r._setAttributes(o,n.inner),o.className=t.inner,[t.anchor]),l=(r.noLightbox&&a.push(t.noLightbox),r.panelHide&&a.push(t.panelHide),document.createElement("a")),a=(r._setAttributes(l,n.anchor),r._setAttributes(l,{class:a.join(" "),href:r.href,"data-id":r.id,"data-type":r.type,"data-title":r.caption,"data-description":r.description,"data-tags":r.tags,"data-exif":r.exif,"data-product-id":r.productId}),w.string(r.placeholder)&&0!==r.placeholder.length||(r.placeholder=r.createPlaceholder(r.width,r.height)),document.createElement("img")),c=(r._setAttributes(a,n.image),{class:t.image,src:r.placeholder,width:r.width+"",height:r.height+"",title:r.title,alt:r.alt}),c=(r.isLoaded?(c.src=r.src,c.srcset=r.srcset):(c[r.tmpl.opt.src]=r.src,c[r.tmpl.opt.srcset]=r.srcset),r._setAttributes(a,c),r.isPicture&&(i=document.createElement("picture"),r._setAttributes(i,n.picture),r.sources.forEach(function(e){var t=document.createElement("source"),n={media:e.media,sizes:e.sizes,type:e.type};r.isLoaded?n.srcset=e.srcset:n[r.tmpl.opt.srcset]=e.srcset,r._setAttributes(t,n),i.appendChild(t)}),i.appendChild(a)),r.hasRibbon&&((e=document.createElement("div")).className=r.ribbon.type,(c=document.createElement("span")).innerHTML=r.ribbon.text,e.appendChild(c)),document.createElement("span")),u=(c.className=t.overlay,document.createElement("span")),h=(u.className=t.wrap,document.createElement("div")),p=(h.className=t.loader,document.createElement("figcaption")),d=(r._setAttributes(p,n.caption.elem),p.className=t.caption.elem,document.createElement("div")),f=(r._setAttributes(d,n.caption.inner),d.className=t.caption.inner,null),g=r.showCaptionTitle&&w.string(r.caption)&&0<r.caption.length,f=(g&&(f=document.createElement("div"),r._setAttributes(f,n.caption.title),f.className=t.caption.title,f.innerHTML=0<r.maxCaptionLength?x.trimTo(r.caption,r.maxCaptionLength):r.caption,d.appendChild(f)),null),m=r.showCaptionDescription&&w.string(r.description)&&0<r.description.length,v=(m&&(f=document.createElement("div"),r._setAttributes(f,n.caption.description),f.className=t.caption.description,f.innerHTML=0<r.maxDescriptionLength?x.trimTo(r.description,r.maxDescriptionLength):r.description,d.appendChild(f)),null),n=w.array(r.buttons)&&0<r.buttons.length;return n&&((v=document.createElement("div")).className=t.caption.buttons,_.each(r.buttons,function(e){var t;w.hash(e)&&w.string(e.text)&&((t=document.createElement("a")).innerHTML=e.text,w.string(e.url)&&0<e.url.length&&(t.href=e.url),w.string(e.rel)&&0<e.rel.length&&(t.rel=e.rel),w.string(e.target)&&0<e.target.length&&(t.target=e.target),w.string(e.classes)&&0<e.classes.length&&(t.className=e.classes),w.hash(e.attr)&&r._setAttributes(t,e.attr),v.appendChild(t))}),d.appendChild(v)),p.appendChild(d),r.isPicture?u.appendChild(i):u.appendChild(a),l.appendChild(c),l.appendChild(u),o.appendChild(l),(g||m||n)&&o.appendChild(p),r.hasRibbon&&s.appendChild(e),s.appendChild(o),s.appendChild(h),r.$el=y(s).data(b.DATA_ITEM,r),r.el=s,r.$inner=y(o),r.$anchor=y(l).on("click.foogallery",{self:r},r.onAnchorClick),r.$overlay=y(c),r.$wrap=y(u),r.isPicture?r.$image=y(i):r.$image=y(a),r.$caption=y(p).on("click.foogallery",{self:r},r.onCaptionClick),r.$loader=y(h),!0},append:function(){var e=this;return e.isCreated&&!e.isAttached&&(e.tmpl.trigger("append-item",[e]).isDefaultPrevented()||(e.tmpl.$el.append(e.$el.removeClass(e.cls.hidden)),e.isAttached=!0),e.isAttached&&(e.isLoaded||e.tmpl.items.observe(e),e.tmpl.trigger("appended-item",[e]))),e.isAttached},detach:function(){var e=this;return e.isCreated&&e.isAttached&&(e.tmpl.items.unobserve(e),e.tmpl.trigger("detach-item",[e]).isDefaultPrevented()||(e.$el.detach().removeClass(e.cls.hidden),e.isAttached=!1),e.isAttached||e.tmpl.trigger("detached-item",[e])),!e.isAttached},load:function(){var n=this;return w.promise(n._load)?n._load:n._load=y.Deferred(function(t){return n.isLoaded?t.resolve(n):n.isCreated&&n.isAttached?n.tmpl.trigger("load-item",[n]).isDefaultPrevented()?t.reject("default prevented"):(n.isLoading=!0,n.tmpl.items.unobserve(n),n.$el.removeClass(n.cls.idle).removeClass(n.cls.hidden).removeClass(n.cls.loaded).removeClass(n.cls.error).addClass(n.cls.loading),void n.loadIMG().then(function(){n.isLoading=!1,n.isLoaded=!0,n.$el.removeClass(n.cls.loading).addClass(n.cls.loaded),n.tmpl.trigger("loaded-item",[n]),t.resolve(n)},function(e){n.isLoading=!1,n.isError=!0,n.$el.removeClass(n.cls.loading).addClass(n.cls.error),n.tmpl.trigger("error-item",[n]),t.reject(e)})):t.reject("not created or attached")}).promise()},loadIMG:function(){var o=this;return new y.Deferred(function(e){var t=(o.isPicture?o.$image.find("img"):o.$image).get(0);if(!t)return e.reject("Unable to find img element.");var n=t.src,i=t.srcset,r=(t.onload=function(){t.onload=t.onerror=null,t.style.removeProperty("width"),t.style.removeProperty("height"),e.resolve(t)},t.onerror=function(){t.onload=t.onerror=null,w.empty(n)?t.removeAttribute("src"):t.src=n,w.empty(i)?t.removeAttribute("srcset"):t.srcset=i,e.reject(t)},o.isPicture&&o.$image.find("source").each(function(e,t){var n=t.getAttribute(o.tmpl.opt.srcset);w.empty(n)||(t.srcset=n)}),t.getBoundingClientRect());t.style.width=r.width,t.style.height=r.height,t.src=o.src,w.empty(o.srcset)||(t.srcset=o.srcset),t.complete&&t.onload()}).promise()},createPlaceholder:function(e,t){return w.number(e)&&w.number(t)?"data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22"+e+"%22%20height=%22"+t+"%22%20viewBox=%220%200%20"+e+"%20"+t+"%22%3E%3C/svg%3E":""},getTypeClass:function(){return this.cls.types[this.type]||""},scrollTo:function(e){var t;return this.isAttached&&((t=this.$el.get(0)).scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded():t.scrollIntoView("top"===e)),this},updateState:function(){this.tmpl.state.update(this.tmpl.state.get(this))},toJSON:function(){return{type:this.type,id:this.id,productId:this.productId,href:this.href,src:this.src,srcset:this.srcset,width:this.width,height:this.height,alt:this.alt,title:this.title,caption:this.caption,description:this.description,tags:this.tags.slice(),maxCaptionLength:this.maxCaptionLength,maxDescriptionLength:this.maxDescriptionLength,showCaptionTitle:this.showCaptionTitle,showCaptionDescription:this.showCaptionDescription,noLightbox:this.noLightbox,panelHide:this.panelHide,attr:o.extend({},this.attr)}},onAnchorClick:function(e){var t=e.data.self;t.tmpl.trigger("anchor-click-item",[t]).isDefaultPrevented()?e.preventDefault():t.updateState()},onCaptionClick:function(e){var t=e.data.self;!t.tmpl.trigger("caption-click-item",[t]).isDefaultPrevented()&&0<t.$anchor.length&&!y(e.target).is("a[href],:input")&&t.$anchor.get(0).click()}}),b.template.configure("core",{item:{type:"item",id:"",href:"",placeholder:"",src:"",srcset:"",sources:[],width:0,height:0,title:"",alt:"",caption:"",description:"",tags:[],maxCaptionLength:0,maxDescriptionLength:0,showCaptionTitle:!0,showCaptionDescription:!0,noLightbox:!1,panelHide:!1,buttons:[],ribbon:{type:null,text:null},exif:{aperture:null,camera:null,created_timestamp:null,shutter_speed:null,focal_length:null,iso:null,orientation:null},attr:{elem:{},inner:{},anchor:{},image:{},picture:{},caption:{elem:{},inner:{},title:{},description:{}}}}},{item:{elem:"fg-item",inner:"fg-item-inner",exif:"fg-item-exif",anchor:"fg-thumb",overlay:"fg-image-overlay",wrap:"fg-image-wrap",image:"fg-image",loader:"fg-loader",idle:"fg-idle",loading:"fg-loading",loaded:"fg-loaded",error:"fg-error",hidden:"fg-hidden",noLightbox:"fg-no-lightbox",panelHide:"fg-panel-hide",types:{item:"fg-type-unknown"},caption:{elem:"fg-caption",inner:"fg-caption-inner",title:"fg-caption-title",description:"fg-caption-desc",buttons:"fg-caption-buttons",button:"fg-caption-button"}}},{item:{exif:{aperture:"Aperture",camera:"Camera",created_timestamp:"Date",shutter_speed:"Exposure",focal_length:"Focal Length",iso:"ISO",orientation:"Orientation"}}}),b.components.register("item",b.Item)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,(FooGallery.utils.fn,FooGallery.utils.obj),FooGallery.utils.str),function(e){e.Image=e.Item.extend({}),e.template.configure("core",null,{item:{types:{image:"fg-type-image"}}}),e.components.register("image",e.Image)}((FooGallery.$,FooGallery),(FooGallery.utils,FooGallery.utils.is)),function(e,c,u){e.PagingFactory=e.Factory.extend({construct:function(){this.registered={}},register:function(e,t,n,i,r,o,s){t=this._super(e,t,s);return t&&((s=this.registered)[e].ctrl=c.fn(n)?n:null,s[e].opt=c.hash(i)?i:{},s[e].cls=c.hash(r)?r:{},s[e].il8n=c.hash(o)?o:{}),t},type:function(e){return c.hash(e)&&c.hash(e=e.paging)&&c.string(e.type)&&this.contains(e.type)?e.type:null},merge:function(e){e=u.extend({},e);var t=this.type(e),n=this.registered,i=n.default.opt,r=n.default.cls,o=n.default.il8n,s=c.hash(e.paging)?e.paging:{},a=c.hash(e.cls)&&c.hash(e.cls.paging)?u.extend({},e.cls.paging):{},l=c.hash(e.il8n)&&c.hash(e.il8n.paging)?u.extend({},e.il8n.paging):{};return c.hash(e.cls)||(e.cls={}),c.hash(e.il8n)||(e.il8n={}),"default"!==t&&this.contains(t)?(e.paging=u.extend({},i,n[t].opt,s,{type:t}),e.cls=u.extend(e.cls,{paging:r},{paging:n[t].cls},{paging:a}),e.il8n=u.extend(e.il8n,{paging:o},{paging:n[t].il8n},{paging:l})):(e.paging=u.extend({},i,s,{type:t}),e.cls=u.extend(e.cls,{paging:r},{paging:a}),e.il8n=u.extend(e.il8n,{paging:o},{paging:l})),e},hasCtrl:function(e){e=this.registered[e];return c.hash(e)&&c.fn(e.ctrl)},makeCtrl:function(e,t,n,i){e=this.registered[e];return c.hash(e)&&c.fn(e.ctrl)?new e.ctrl(t,n,i):null}}),e.paging=new e.PagingFactory}(FooGallery,FooGallery.utils.is,(FooGallery.utils.fn,FooGallery.utils.obj)),function(t,o,i,l){o.Paging=o.Component.extend({construct:function(e){var t=this;t._super(e),t.opt=t.tmpl.opt.paging,t.cls=t.tmpl.cls.paging,t.il8n=t.tmpl.il8n.paging,t.sel=t.tmpl.sel.paging,t.pushOrReplace=t.opt.pushOrReplace,t.type=t.opt.type,t.theme=t.opt.theme,t.size=t.opt.size,t.position=t.opt.position,t.scrollToTop=t.opt.scrollToTop,t.current=0,t.total=0,t.ctrls=[],t._pages=[]},init:function(){},fromHash:function(e){e=parseInt(e);return isNaN(e)?null:e},toHash:function(e){return l.number(e)&&0<e?e.toString():null},getState:function(){return this.isValid(this.current)?this.current:null},setState:function(e){this.rebuild();var t=!1;e.item&&!this.contains(e.page,e.item)&&(e.page=this.find(e.item),e.page=0!==e.page?e.page:1,t=!0),this.set(e.page,t,!1,!1)},destroy:function(){var e=this;e._pages.splice(0,e._pages.length),t.each(e.ctrls.splice(0,e.ctrls.length),function(e,t){t.destroy()}),e._super()},build:function(){var e=this,t=e.tmpl.items.available();e.total=0<e.size&&0<t.length?Math.ceil(t.length/e.size):1;for(var n,i,r=0;r<e.total;r++)e._pages.push(t.splice(0,e.size));1<e.total&&o.paging.hasCtrl(e.type)&&("both"!==(n=e.position)&&"top"!==n||(i=o.paging.makeCtrl(e.type,e.tmpl,e,"top")).create()&&(i.append(),e.ctrls.push(i)),"both"!==n&&"bottom"!==n||(i=o.paging.makeCtrl(e.type,e.tmpl,e,"bottom")).create()&&(i.append(),e.ctrls.push(i)))},rebuild:function(){var e=this;e.current=0,e.total=0,e._pages.splice(0,e._pages.length),t.each(e.ctrls.splice(0,e.ctrls.length),function(e,t){t.destroy()}),e.build()},all:function(){return this._pages.slice()},available:function(){return this.get(this.current)},controls:function(n){this.isValid(n)&&t.each(this.ctrls,function(e,t){t.update(n)})},isValid:function(e){return l.number(e)&&0<e&&e<=this.total},number:function(e){return this.isValid(e)?e:0===this.current?1:this.current},create:function(e,t){var n=this,i=(e=n.number(e))-1,r=n._pages[i],t=t?n.tmpl.items.all():n._pages.reduce(function(e,t,n){return n===i?e:e.concat(t)},n.tmpl.items.unavailable());n.current=e,n.tmpl.items.detach(t),n.tmpl.items.create(r,!0)},get:function(e){return this.isValid(e)?(e=this.number(e),this._pages[e-1]):[]},set:function(e,t,n,i){var r=this;if(r.isValid(e)){r.controls(e);var o,s,a=r.number(e);if(a!==r.current)return s=r.current,!r.tmpl.trigger("before-page-change",[r.current,a,e=function(){var e;n=!l.boolean(n)||n,i=!!l.boolean(i)&&i,n&&1===r.current&&!r.tmpl.state.exists()&&(o=r.tmpl.state.get(),r.tmpl.state.update(o,r.pushOrReplace)),r.create(a,i),n&&(o=r.tmpl.state.get(),r.tmpl.state.update(o,r.pushOrReplace)),r.tmpl.trigger("page-change",[r.current,s,i]),r.scrollToTop&&l.boolean(t)&&t&&(0<(e=r.get(r.current)).length&&e[0].scrollTo("top")),r.tmpl.trigger("after-page-change",[r.current,s,i])},i]).isDefaultPrevented()&&(e(),!0)}return!1},find:function(e){for(var t=0,n=this._pages.length;t<n;t++)if(-1!==i.inArray(e,this._pages[t]))return t+1;return 0},contains:function(e,t){e=this.get(e);return-1!==i.inArray(t,e)},first:function(){this.goto(1)},last:function(){this.goto(this._pages.length)},prev:function(){this.goto(this.current-1)},next:function(){this.goto(this.current+1)},goto:function(e){this.set(e,!0)}}),o.PagingControl=o.Component.extend({construct:function(e,t,n){var i=this;i._super(e),i.pages=t,i.position=n,i.$container=null,i._containerExisted=!1,i._placeholderClasses=[]},create:function(){var n=this;return n.$container=t("#"+n.tmpl.id+"_paging-"+n.position),0<n.$container.length?(n._containerExisted=!0,n.$container.removeClass(function(e,t){return n._placeholderClasses=t.match(/(^|\s)fg-ph-\S+/g)||[],n._placeholderClasses.join(" ")}).addClass([n.pages.cls.container,n.pages.theme].join(" "))):n.$container=t("<nav/>",{class:[n.pages.cls.container,n.pages.theme].join(" ")}),!0},destroy:function(){var e=this;e._containerExisted?e.$container.empty().removeClass().addClass(e._placeholderClasses.join(" ")):e.$container.remove(),e.$container=null},append:function(){var e=this;e._containerExisted||("top"===e.position?e.$container.insertBefore(e.tmpl.$el):e.$container.insertAfter(e.tmpl.$el))},update:function(e){}}),o.paging.register("default",o.Paging,null,{type:"none",theme:"fg-light",size:30,pushOrReplace:"push",position:"none",scrollToTop:!0},{container:"fg-paging-container"},null,-100)}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is),function(l,e,a){e.Dots=e.Paging.extend({}),e.DotsControl=e.PagingControl.extend({construct:function(e,t,n){this._super(e,t,n),this.$list=null,this.$items=null},create:function(){var e=this;if(e._super()){for(var t,n=e.pages.cls,i=e.pages.il8n,r=[],o=l("<ul/>",{class:n.list}),s=0,a=e.pages.total;s<a;s++)r.push(t=e.createItem(s+1,i.page)),o.append(t);return e.$list=o,e.$items=l(l.map(r,function(e){return e.get()})),e.$container.append(o),!0}return!1},destroy:function(){var e=this,t=e.pages.sel;e.$list.find(t.link).off("click.foogallery",e.onLinkClick),e.$list=l(),e.$items=l(),e._super()},update:function(e){this.setSelected(e-1)},setSelected:function(e){var t=this,n=t.pages.cls,r=t.pages.il8n,o=t.pages.sel;t.$items.filter(o.selected).removeClass(n.selected).each(function(e,t){var t=l(t),n=t.data("label"),t=t.find(o.reader);a.string(n)&&0!==t.length&&t.html(n)}),t.$items.eq(e).addClass(n.selected).each(function(e,t){var t=l(t),n=t.find(o.reader),i=n.html();a.string(i)&&0!==n.length&&(t.data("label",i),n.html(r.current))})},createItem:function(e,t,n,i,r){n=a.string(n)?n:e,t=a.string(t)?t:"";var o=this.pages.opt,s=this.pages.cls,n=l("<a/>",{class:s.link,href:"#page-"+e}).html(n).on("click.foogallery",{self:this,page:e},this.onLinkClick),e=(a.empty(t)||n.attr("title",t.replace(/\{PAGE}/g,e).replace(/\{LIMIT}/g,o.limit+"")),r=a.string(r)?r:t,a.empty(r)||n.prepend(l("<span/>",{class:s.reader,text:r.replace(/\{PAGE}/g,"").replace(/\{LIMIT}/g,o.limit+"")})),l("<li/>",{class:s.item}).append(n));return i=a.string(i)?i:"",a.empty(i)||e.addClass(i),e},onLinkClick:function(e){e.preventDefault();var t=e.data.self,e=e.data.page,n=t.pages.sel;l(this).closest(n.item).is(n.disabled)||t.pages.set(e,!0)}}),e.paging.register("dots",e.Dots,e.DotsControl,{type:"dots",position:"both",pushOrReplace:"push"},{list:"fg-dots",item:"fg-dot-item",link:"fg-dot-link",disabled:"fg-disabled",selected:"fg-selected",visible:"fg-visible",reader:"fg-sr-only"},{current:"Current page",page:"Page {PAGE}"})}(FooGallery.$,FooGallery,(FooGallery.utils,FooGallery.utils.is)),function(e){e.DefaultTemplate=e.Template.extend({}),e.template.register("default",e.DefaultTemplate,null,{container:"foogallery fg-default"})}((FooGallery.$,FooGallery),FooGallery.utils),function(e){e.MasonryTemplate=e.Template.extend({construct:function(e,t){var n=this;n._super(e,t),n.masonry=null,n.on({"pre-init":n.onPreInit,destroyed:n.onDestroyed,"appended-items":n.onAppendedItems,"detach-item":n.onDetachItem,"layout after-filter-change":n.onLayoutRequired,"page-change":n.onPageChange},n)},onPreInit:function(){var e=this,t=e.sel,n=e.$el.hasClass("fg-fixed");e.template.isFitWidth=n,e.template.percentPosition=!n,e.template.transitionDuration=0,e.template.itemSelector=t.item.elem,n||(e.template.gutter=t.gutterWidth,e.template.columnWidth=t.columnWidth),e.masonry=new Masonry(e.el,e.template)},onDestroyed:function(){this.masonry instanceof Masonry&&this.masonry.destroy()},onLayoutRequired:function(){this.masonry.layout()},onPageChange:function(e,t,n,i){i||this.masonry.layout()},onAppendedItems:function(e,t){t=t.map(function(e){return e.el}),t=this.masonry.addItems(t);this.masonry.layoutItems(t,!0)},onDetachItem:function(e,t){e.isDefaultPrevented()||(e.preventDefault(),this.masonry.remove(t.el),t.$el.removeClass(this.cls.hidden),t.isAttached=!1)}}),e.template.register("masonry",e.MasonryTemplate,{template:{}},{container:"foogallery fg-masonry",columnWidth:"fg-column-width",gutterWidth:"fg-gutter-width"})}((FooGallery.$,FooGallery),(FooGallery.utils,FooGallery.utils.is)),function(i,r,e,o){r.Justified=e.Class.extend({construct:function(e,t){var n=this;n.tmpl=e,n.$el=e.$el,n.options=i.extend(!0,{},r.Justified.defaults,t),n._items=[],n.maxRowHeight=0,n.borderSize=0,n.align=-1!==["left","center","right"].indexOf(n.options.align)?n.options.align:"center"},init:function(){var e=this;e.maxRowHeight=e.getMaxRowHeight(e.options.maxRowHeight,e.options.rowHeight),e.borderSize=e.getBorderSize()},destroy:function(){this.$el.removeAttr("style")},getBorderSize:function(){switch(this.tmpl.getCSSClass("border","")){case"fg-border-thin":return 4;case"fg-border-medium":return 10;case"fg-border-thick":return 16;default:return 0}},getMaxRowHeight:function(e,t){var n;return o.string(e)?(n=parseInt(e),isNaN(n)?t:n<=0?1/0:-1!==e.indexOf("%")?t*(n/100):n):o.number(e)?e<=0?1/0:e:t},layout:function(e){var n,i=this;0<(e=o.number(e)?e:i.$el.width())&&(0!==(n=i.createRows(e)).height&&0<n.rows.length&&(i.$el.height(n.height),n.rows.forEach(function(e,t){i.render(e,t===n.rows.length-1)})))},render:function(t,e){var n=this,i=!e&&"justify"!==n.options.lastRow;t.items.forEach(function(e){e.elem&&(t.visible?(e.elem.style.setProperty("position","absolute"),e.elem.style.setProperty("width",e.width+"px"),e.elem.style.setProperty("height",e.height+"px"),e.elem.style.setProperty("top",e.top+"px"),e.elem.style.setProperty("left",e.left+"px"),e.elem.style.setProperty("margin","0"),e.elem.style.removeProperty("display"),0<n.maxRowHeight&&i?e.elem.style.setProperty("max-height",n.maxRowHeight+2*n.borderSize+"px"):e.elem.style.removeProperty("max-height"),e.elem.classList.contains("fg-positioned")||e.elem.classList.add("fg-positioned")):e.elem.style.setProperty("display","none"))})},justify:function(n,i,e,t){var r=this,o=r.options.margins,s=o*(n.items.length-1),e=e-s,a=n.width-s,l=e/a,c=(n.width=a*l,n.height=n.height*l,n.height>t+2*r.borderSize&&(a=(t+2*r.borderSize)/n.height,n.width=n.width*a,n.height=n.height*a),n.top=i,n.left=0,"left"!==r.align&&n.width<e&&("right"===r.align?n.left=e-n.width:n.left=(e-n.width)/2),n.width+=s,n.left);return n.items.forEach(function(e,t){0<t&&(c+=o),e.left=c,e.top=i;t=n.height/e.height;e.width=e.width*t,e.height=e.height*t,c+=e.width}),n.height},createRows:function(o){var s=this,a=s.options.margins,e=s.tmpl.getAvailable(),l=[],t=-1;function c(){return{index:++t,visible:!0,width:0,height:s.options.rowHeight+2*s.borderSize,top:0,left:0,items:[]}}var u=c(),h=0,p=0;if(e.forEach(function(e){r=u.height,t=e.width,(n=e.height)!==r&&(n*=i=r/n,t*=i),i=s.maxRowHeight/r;var t,n,i,r={__item:e,elem:e.el,width:t,height:n,maxWidth:t*i,maxHeight:n*i,top:0,left:0};u.width+r.width>o&&0<u.items.length&&(0<l.length&&(h+=a),e=s.justify(u,h,o,s.maxRowHeight),p<e&&(p=e),h+=e,l.push(u),u=c()),0<u.items.length&&(u.width+=a),u.width+=r.width,u.items.push(r)}),0<u.items.length){var n=h+a;switch(s.options.lastRow){case"smart":var i,r,d=s.justify(u,n,o,s.maxRowHeight);0!==p&&p<d&&(i=p/d,r=u.width*i/o,(i<.9||r<.9)&&(d=s.justify(u,n,o,p-2*s.borderSize)));break;case"justify":d=s.justify(u,n,o,99999);break;case"hide":d=s.justify(u,n,o,s.maxRowHeight),u.width<o&&1<l.length&&(u.visible=!1)}u.visible&&(h+=d+a),l.push(u)}return{height:h,rows:l}}}),r.Justified.defaults={rowHeight:150,maxRowHeight:"200%",margins:0,align:"center",lastRow:"smart"}}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is),function(e){e.JustifiedTemplate=e.Template.extend({construct:function(e,t){var n=this;n._super(e,t),n.justified=null,n.on({"pre-init":n.onPreInit,init:n.onInit,destroyed:n.onDestroyed,"layout after-filter-change":n.onLayoutRequired,"page-change":n.onPageChange},n)},onPreInit:function(){this.justified=new e.Justified(this,this.template)},onInit:function(){this.justified.init()},onDestroyed:function(){this.justified instanceof e.Justified&&this.justified.destroy()},onLayoutRequired:function(){this.justified.layout(this.lastWidth)},onPageChange:function(e,t,n,i){i||this.justified.layout(this.lastWidth)}}),e.template.register("justified",e.JustifiedTemplate,null,{container:"foogallery fg-justified"})}((FooGallery.$,FooGallery)),function(e){e.PortfolioTemplate=e.Template.extend({}),e.template.register("simple_portfolio",e.PortfolioTemplate,{},{container:"foogallery fg-simple_portfolio"})}((FooGallery.$,FooGallery),(FooGallery.utils,FooGallery.utils.is,FooGallery.utils.fn)),function(i,e,r){e.ImageViewerTemplate=e.Template.extend({construct:function(e,t){var n=this;n._super(r.extend({},e,{paging:{pushOrReplace:"replace",theme:"fg-light",type:"default",size:1,position:"none",scrollToTop:!1}}),t),n.$inner=i(),n.$current=i(),n.$total=i(),n.$prev=i(),n.$next=i(),n.on({"pre-init":n.onPreInit,init:n.onInit,destroy:n.onDestroy,"append-item":n.onAppendItem,"after-page-change":n.onAfterPageChange,"after-filter-change":n.onAfterFilterChange},n)},createChildren:function(){var e=this;return i("<div/>",{class:e.cls.inner}).append(i("<div/>",{class:e.cls.innerContainer}),i("<div/>",{class:e.cls.controls}).append(i("<div/>",{class:e.cls.prev}).append(i("<span/>",{text:e.il8n.prev})),i("<label/>",{class:e.cls.count,text:e.il8n.count}).prepend(i("<span/>",{class:e.cls.countCurrent,text:"0"})).append(i("<span/>",{class:e.cls.countTotal,text:"0"})),i("<div/>",{class:e.cls.next}).append(i("<span/>",{text:e.il8n.next}))))},destroyChildren:function(){this.$el.find(this.sel.inner).remove()},onPreInit:function(e){var t=this;t.$inner=t.$el.find(t.sel.innerContainer),t.$current=t.$el.find(t.sel.countCurrent),t.$total=t.$el.find(t.sel.countTotal),t.$prev=t.$el.find(t.sel.prev),t.$next=t.$el.find(t.sel.next)},onInit:function(e){var t=this;t.template.attachFooBox&&t.$el.on("foobox.previous",{self:t},t.onFooBoxPrev).on("foobox.next",{self:t},t.onFooBoxNext),t.$prev.on("click",{self:t},t.onPrevClick),t.$next.on("click",{self:t},t.onNextClick)},onDestroy:function(e){var t=this;t.template.attachFooBox&&t.$el.off({"foobox.previous":t.onFooBoxPrev,"foobox.next":t.onFooBoxNext}),t.$prev.off("click",t.onPrevClick),t.$next.off("click",t.onNextClick)},onAppendItem:function(e,t){e.preventDefault(),this.$inner.append(t.$el),t.isAttached=!0},onAfterPageChange:function(e,t,n,i){i||this.update()},onAfterFilterChange:function(e){this.update()},update:function(){this.pages&&(this.$current.text(this.pages.current),this.$total.text(this.pages.total))},prev:function(){this.pages&&(this.template.loop&&1===this.pages.current?this.pages.last():this.pages.prev(),this.update())},next:function(){this.pages&&(this.template.loop&&this.pages.current===this.pages.total?this.pages.first():this.pages.next(),this.update())},onFooBoxPrev:function(e){e.data.self.prev()},onFooBoxNext:function(e){e.data.self.next()},onPrevClick:function(e){e.preventDefault(),e.stopPropagation(),e.data.self.prev()},onNextClick:function(e){e.preventDefault(),e.stopPropagation(),e.data.self.next()}}),e.template.register("image-viewer",e.ImageViewerTemplate,{template:{attachFooBox:!1,loop:!1}},{container:"foogallery fg-image-viewer",inner:"fiv-inner",innerContainer:"fiv-inner-container",controls:"fiv-ctrls",prev:"fiv-prev",next:"fiv-next",count:"fiv-count",countCurrent:"fiv-count-current",countTotal:"fiv-count-total"},{prev:"Prev",next:"Next",count:"of"})}(FooGallery.$,FooGallery,(FooGallery.utils,FooGallery.utils.obj)),function(e,n){e.ThumbnailTemplate=e.Template.extend({construct:function(e,t){this._super(n.extend({},e,{filtering:{type:"none"},paging:{pushOrReplace:"replace",theme:"fg-light",type:"default",size:1,position:"none",scrollToTop:!1}}),t)}}),e.template.register("thumbnail",e.ThumbnailTemplate,null,{container:"foogallery fg-thumbnail"})}((FooGallery.$,FooGallery),FooGallery.utils.obj),function(i,o,e,l,r,s){o.StackAlbum=e.Class.extend({construct:function(e,t){var n=this;n.$el=l.jq(e)?e:i(e),n.el=n.$el.get(0),n.opt=r.extend({},o.StackAlbum.defaults,t,n.$el.data("foogallery")),n.$back=n.$el.find(".fg-header-back"),n.$active=n.$el.find(".fg-header-active"),n.$piles=n.$el.find(".fg-piles"),n.piles=n.$piles.find(".fg-pile").map(function(e,t){return new o.StackAlbum.Pile(n,t,{index:e})}).get(),n.ignoreResize=!1,n.robserver=new ResizeObserver(function(){!n.ignoreResize&&n.$el.is(":visible")&&n.layout(!0)})},init:function(){var e=this;e.piles.forEach(function(e){e.init()}),e.$back.on("click.foogallery",{self:e},e.onBackClick),e.robserver.observe(e.el)},destroy:function(){this.robserver.disconnect(),this.$back.off(".foogallery"),this.piles.forEach(function(e){e.destroy()})},getLayoutInfo:function(){var e=this,t=e.opt.gutter+2*e.opt.border;return{maxWidth:e.$el.width(),space:t,halfSpace:t/2,itemWidth:e.opt.itemWidth,itemHeight:e.opt.itemHeight,itemOuterWidth:e.opt.itemWidth+2*e.opt.border,itemOuterHeight:e.opt.itemHeight+2*e.opt.border,blockWidth:e.opt.itemWidth+t,blockHeight:e.opt.itemHeight+t,border:e.opt.border,doubleBorder:2*e.opt.border,gutter:e.opt.gutter,halfGutter:e.opt.gutter/2}},layout:function(e){var t,n=this;e&&(n.$el.addClass("fg-disable-transitions"),n.$el.prop("offsetWidth")),n.hasActive?(t=n.activePile.layout(),n.activePile.setPosition(0,0,t.width,t.height)):t=n.layoutPiles(),n.$piles.css({width:t.width+"px",height:t.height+"px"}),e&&n.$el.removeClass("fg-disable-transitions")},layoutPiles:function(i){var r=this.getLayoutInfo(),o=0,s=1,a=0;return i=l.fn(i)?i:function(){},this.piles.forEach(function(e){var t=o,n=((o+=r.blockWidth)>r.maxWidth&&(t=0,o=r.blockWidth,s++),r.blockHeight*(s-1));i(e,n,t,r.blockWidth,r.blockHeight),e.setPosition(n,t,r.blockWidth,r.blockHeight),a<o&&(a=o)}),{width:a,height:r.blockHeight*s}},setActive:function(t){var n,i=this,e=i.activePile,r=e instanceof o.StackAlbum.Pile;t=t instanceof o.StackAlbum.Pile?t:null,i.activePile=t,i.hasActive=null!==t,r&&e.collapse(),i.ignoreResize=!0,i.hasActive?(i.piles.forEach(function(e){e!==t&&e.hide(i.activePile)}),n=i.activePile.expand(),i.$active.text(t.title),i.$el.addClass("fg-has-active")):(n=i.layoutPiles(function(e){e.show()}),i.$el.removeClass("fg-has-active")),s.start(i.$piles,function(e){e.css({width:n.width+"px",height:n.height+"px"})},null,350).then(function(){i.ignoreResize=!1})},onBackClick:function(e){e.preventDefault(),e.stopPropagation(),e.data.self.setActive(null)}}),o.StackAlbum.defaults={gutter:50,itemWidth:150,itemHeight:150,border:10,angleStep:1,randomAngle:!1}}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.obj,FooGallery.utils.transition),function(r,o,e,s,a){o.StackAlbum.Pile=e.Class.extend({construct:function(e,t,n){var i=this;i.album=e,i.$el=s.jq(t)?t:r(t),i.opt=a.extend({},o.StackAlbum.Pile.defaults,n,i.$el.data()),i.title=i.opt.title,i.items=i.$el.find(".fg-pile-item").map(function(e,t){return new o.StackAlbum.Item(i,t,{index:e})}).get(),i.$cover=r("<div/>",{class:"fg-pile-cover"}).append(r("<div/>",{class:"fg-pile-cover-content"}).append(r("<span/>",{class:"fg-pile-cover-title",text:i.opt.title}),r("<span/>",{class:"fg-pile-cover-count",text:i.items.length}))),i.top=0,i.left=0,i.isExpanded=!1},init:function(){var n=this,i=n.album.opt,r=n.getAngles(i.angleStep),o=i.randomAngle?n.randomAngle(r):i.angleStep;n.$cover.on("click.foogallery",{self:n},n.onCoverClick),n.items.forEach(function(e,t){e.init(),3<t||(0===t?(e.$el.addClass("fg-has-cover").append(n.$cover),e.load()):(t%2==0?e.setAngle(-o):e.setAngle(o),i.randomAngle?o=n.randomAngle(r):o+=i.angleStep))})},destroy:function(){this.$cover.remove(),this.items.forEach(function(e,t){0===t&&e.$el.removeClass("fg-has-cover"),e.destroy()})},getAngles:function(e){for(var t=[],n=1;n<=3;n++)t.push(n*e);return t},randomAngle:function(e){var t=e.length,t=Math.floor(Math.random()*+t+0),e=e.splice(t,1);return 1===e.length?e[0]:0},setPosition:function(e,t,n,i){this.top=e,this.left=t,s.number(n)&&s.number(i)?this.$el.css({top:e+"px",left:t+"px",width:n+"px",height:i+"px"}):this.$el.css({top:e+"px",left:t+"px"})},layout:function(){var i=this.album.getLayoutInfo(),r=0,o=1,s=!1,a=0;return this.items.forEach(function(e){(r+=i.halfGutter)>i.maxWidth&&(r=i.halfGutter,o++,s=!0);var t=r,n=(r+=i.itemOuterWidth+i.halfGutter,!s&&r>i.maxWidth&&(t=i.halfGutter,r=i.blockWidth,o++),i.blockHeight*(o-1)+i.halfGutter);s=!1,e.setPosition(n,t,i.itemOuterWidth,i.itemOuterHeight),e.isLoaded||e.load(),a<r&&(a=r)}),{width:a,height:i.blockHeight*o}},expand:function(){var e;return this.$el.removeClass("fg-collapsed").addClass("fg-expanded"),e=this.layout(),this.setPosition(0,0,e.width,e.height),this.isExpanded=!0,e},collapse:function(){var e=this,t=e.album.getLayoutInfo(),n=(e.$el.removeClass("fg-expanded").addClass("fg-collapsed"),e.items.forEach(function(e){e.setPosition(t.halfGutter,t.halfGutter,t.itemOuterWidth,t.itemOuterHeight)}),{width:t.blockWidth,height:t.blockHeight});return e.setPosition(0,0,n.width,n.height),e.isExpanded=!1,n},show:function(){this.$el.removeClass("fg-hidden fg-expanded fg-collapsed")},hide:function(e){e instanceof o.StackAlbum.Pile&&this.setPosition(e.top,e.left),this.$el.addClass("fg-hidden")},onCoverClick:function(e){e.preventDefault(),e.stopPropagation();e=e.data.self;e.album.setActive(e)}}),o.StackAlbum.Pile.defaults={index:-1,title:null}}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.obj),function(r,o,e,s,a){o.StackAlbum.Item=e.Class.extend({construct:function(e,t,n){var i=this;i.$el=s.jq(t)?t:r(t),i.opt=a.extend({},o.StackAlbum.Item.defaults,n,i.$el.data()),i.$thumb=i.$el.find(".fg-pile-item-thumb"),i.$image=i.$el.find(".fg-pile-item-image"),i.isLoaded=!1,i.isLoading=!1,i._loading=null},init:function(){},destroy:function(){},setAngle:function(e){this.$el.css({transform:"rotate("+e+"deg)"})},setPosition:function(e,t,n,i){this.$el.css({top:e+"px",left:t+"px",width:n+"px",height:i+"px"})},load:function(){var t=this;return s.promise(t._loading)?t._loading:t._loading=r.Deferred(function(e){t.$el.addClass("fg-loading"),t.isLoading=!0,t.$image.on({"load.foogallery":function(){t.$image.off(".foogallery"),t.$el.removeClass("fg-loading"),t.isLoading=!1,t.isLoaded=!0,e.resolve()},"error.foogallery":function(){t.$image.off(".foogallery"),t.$el.removeClass("fg-loading"),t.isLoading=!1,t.isLoaded=!0,e.reject()}}),t.$image.prop("src",t.$image.attr(t.opt.src)).prop("srcset",t.$image.attr(t.opt.srcset))}).promise()}}),o.StackAlbum.Item.defaults={index:-1,src:"data-src-fg",srcset:"data-srcset-fg"}}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.is,FooGallery.utils.obj),function(i,r,e){i.fn.foogalleryStackAlbum=function(e){return this.each(function(e,t){var t=i(t),n=t.data("__FooGalleryAlbum__");n instanceof r.StackAlbum&&n.destroy(),(n=new r.StackAlbum(t)).init(),t.data("__FooGalleryAlbum__",n)})},r.loadStackAlbums=r.reloadStackAlbums=function(){i(function(){i(".foogallery-stack-album:not(.fg-ready)").foogalleryStackAlbum()}),e.ready(function(){i(".foogallery-stack-album.fg-ready").foogalleryStackAlbum()})},r.loadStackAlbums()}(FooGallery.$,FooGallery,FooGallery.utils),function(u,e,o,d){o.Progress=o.EventClass.extend({construct:function(e){var t=this;t._super(),t.percent=0,t.tickRate=d.number(e)?e:100,t.isPaused=!1,t.isActive=!1,t._intervalId=null,t._total=0,t._target=null,t.onTick=t.onTick.bind(t)},destroy:function(){this._reset(),this._super()},_reset:function(){var e=this;null!==e._intervalId&&clearInterval(e._intervalId),e.percent=0,e._total=0,e._intervalId=null,e._target=null,e.isActive=!1,e.isPaused=!1},stop:function(){this.isActive&&(this._reset(),this.trigger("stop"))},start:function(e){var t=this;t.stop(),!t.isActive&&d.number(e)&&0<e&&(t._total=1e3*e,t._target=Date.now()+t._total,t._intervalId=setInterval(t.onTick,t.tickRate),t.isActive=!0,t.trigger("start"))},pause:function(){var e=this;e.isActive&&!e.isPaused&&e.percent<100&&(null!==e._intervalId&&clearInterval(e._intervalId),e._intervalId=null,e._target=null,e.isPaused=!0,e.trigger("pause"))},resume:function(){var e,t=this;t.isActive&&t.isPaused?(e=t._total-t._total*t.percent/100,t._target=Date.now()+e,t._intervalId=setInterval(t.onTick,t.tickRate),t.isPaused=!1,t.trigger("resume")):0<t._total&&t.start(t._total/1e3)},onTick:function(){var e=this,t=e._total-Math.max(e._target-Date.now(),0);e.percent=Math.min(t/e._total*100,100),e.trigger("tick",[e.percent]),100<=e.percent&&(null!==e._intervalId&&clearInterval(e._intervalId),e._intervalId=null,e._target=null,e.isActive=!1,e.trigger("complete"))}}),u.Carousel=o.Class.extend({construct:function(e,t,n,i){var r=this;r.tmpl=e,r.el=e.el,r.opt=t,r.cls=n,r.sel=i,r.elem={inner:null,center:null,bottom:null,prev:null,next:null,progress:null},r.activeItem=null,r._itemWidth=0,r._leftExclude=[r.sel.activeItem,r.sel.nextItem].join(","),r._rightExclude=[r.sel.activeItem,r.sel.prevItem].join(","),r._centerListeners=new o.DOMEventListeners,r._listeners=new o.DOMEventListeners,r._progress=new o.Progress,r._canHover=window.matchMedia("(hover: hover)").matches,r.cache=new Map,r.timeouts=new o.Timeouts,r.interacted=!1,r.isRTL=!1,r._firstLayout=!0},getScreenX:function(e,t,n){return n/(n+t)*e},getVectorX:function(e,t,n){return(n+t)/n*e},getSequentialZFromScale:function(e,t,n){return n*(t*(e+1))},scaleToZ:function(e,t,n){return e*(1-t/(n+t))},getDiff:function(e,t){return t<e?e-t:t-e},pause:function(){this._progress.pause()},resume:function(){this._progress.resume()},start:function(){"disable"===this.opt.autoplay.interaction&&this.interacted||this._progress.start(this.opt.autoplay.time)},stop:function(){this._progress.stop()},init:function(){var e=this;e.isRTL="rtl"===window.getComputedStyle(e.el).direction,e.elem={inner:e.el.querySelector(e.sel.inner),center:e.el.querySelector(e.sel.center),bottom:e.el.querySelector(e.sel.bottom),prev:e.el.querySelector(e.sel.prev),next:e.el.querySelector(e.sel.next),progress:e.el.querySelector(e.sel.progress)},150!==e.opt.perspective&&e.el.style.setProperty("--fg-carousel-perspective",e.opt.perspective+"px")},postInit:function(){var e=this;e.activeItem=e.tmpl.items.first(),e.initNavigation(),e.initPagination(),e.initSwipe(),e.initAutoplay()},initNavigation:function(){const t=this;t._listeners.add(t.elem.prev,"click",function(e){e.preventDefault(),t.interacted=!0,t.previous()}),"button"!==t.elem.prev.type&&(t.elem.prev.type="button"),t.elem.prev.appendChild(e.element("arrow-left")),t._listeners.add(t.elem.next,"click",function(e){e.preventDefault(),t.interacted=!0,t.next()}),"button"!==t.elem.next.type&&(t.elem.next.type="button"),t.elem.next.appendChild(e.element("arrow-right"))},initPagination:function(){const n=this;var e=n.tmpl.items.count();for(let t=0;t<e;t++){const i=document.createElement("button");i.type="button",i.classList.add(n.cls.bullet),0===t&&i.classList.add(n.cls.activeBullet),n._listeners.add(i,"click",function(e){e.preventDefault(),n.interacted=!0,n.goto(n.tmpl.items.get(t))}),n.elem.bottom.appendChild(i)}},initSwipe:function(){const t=this;let n=0,i=0,r=25*(window.devicePixelRatio||1);t._listeners.add(t.elem.inner,"touchstart",function(e){t.interacted=!0,n=e.changedTouches[0].screenX},{passive:!0}),t._listeners.add(t.elem.inner,"touchend",function(e){i=e.changedTouches[0].screenX,t.getDiff(n,i)>r&&(i<n?t.next():t.previous()),i=0,n=0},{passive:!0})},initAutoplay:function(){const n=this,t=n.opt.autoplay;if(!(t.time<=0)&&n.elem.progress instanceof HTMLElement){const i=n.elem.progress.style;function e(e,t){o.cancelFrame(null),o.requestFrame(function(){i.setProperty("width",e+"%"),t?i.setProperty("transition-duration","0s"):i.setProperty("transition-duration",n._progress.tickRate+"ms")})}n._progress.on({"start stop":function(){e(0,!0)},"pause resume":function(){e(n._progress.percent,!0)},tick:function(){e(n._progress.percent,!1)},complete:function(){n.next(function(){n._progress.start(t.time)})}}),"pause"===t.interaction&&(n._canHover?(n._listeners.add(n.el,"mouseenter",function(e){n._progress.pause()},{passive:!0}),n._listeners.add(n.el,"mouseleave",function(e){n._progress.resume()},{passive:!0})):(n._listeners.add(n.el,"touchstart",function(e){n.timeouts.delete("autoplay"),n._progress.pause()},{passive:!0}),n._listeners.add(n.el,"touchend",function(e){n.timeouts.set("autoplay",function(){n._progress.resume()},1e3*t.time)},{passive:!0}))),n._progress.start(t.time)}},getFirst:function(){return this.tmpl.items.first()},getNext:function(e){return this.tmpl.items.next(e instanceof u.Item?e:this.activeItem,null,!0)},getPrev:function(e){return this.tmpl.items.prev(e instanceof u.Item?e:this.activeItem,null,!0)},goto:function(e,t){const n=this;if(e instanceof u.Item){const i=n.opt.autoplay,r=!n._canHover&&n.timeouts.has("autoplay"),o=(n.timeouts.delete("autoplay"),n.timeouts.delete("navigation"),n._progress.isPaused);n._progress.isActive&&n._progress.stop(),n.activeItem=e,n.layout(),n.timeouts.set("navigation",function(){0<i.time&&("pause"===i.interaction||"disable"===i.interaction&&!n.interacted)&&(n._progress.start(i.time),o&&n._progress.pause(),r&&n.timeouts.set("autoplay",function(){n._progress.resume()},1e3*i.time)),d.fn(t)&&t.call(n)},n.opt.speed)}},next:function(e){this.goto(this.getNext(),e)},previous:function(e){this.goto(this.getPrev(),e)},destroy:function(){var e=this;e.cache.clear(),e.timeouts.clear(),e._listeners.clear(),e._centerListeners.clear(),150!==e.opt.perspective&&e.el.style.removeProperty("--fg-carousel-perspective")},getSize:function(e,t){var n=e.getBoundingClientRect();const i={width:n.width,height:n.height};return t&&(n=getComputedStyle(e),i.width-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),i.height-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth)),i},layout:function(e){const t=this;if(null===t.activeItem&&(t.activeItem=t.tmpl.items.first()),!d.number(e)&&t.cache.has("width")&&(e=t.cache.get("width")),d.number(e)){const n=t.getLayout(e);null!==t._layoutFrame&&o.cancelFrame(t._layoutFrame),t._layoutFrame=o.requestFrame(function(){t._layoutFrame=null,t.renderActive(n)&&(t.renderSide("left",t.sel.prevItem,t._leftExclude,t.cls.prevItem,n),t.renderSide("right",t.sel.nextItem,t._rightExclude,t.cls.nextItem,n),t._firstLayout=!1)})}},getLayout:function(e){var t,n,i=this;return i.cache.has("layout")&&i.cache.get("width")===e?i.cache.get("layout"):(n=i.getSize(i.elem.center).width,t=i.getSize(i.elem.inner,!0).width/2+n/2,n=i.calculate(n,t),i.cache.set("width",e),i.cache.set("layout",n),n)},round:function(e,t){t=Math.pow(10,t||0);return Math.round(e*t)/t},getShowPerSide:function(){var e=this.tmpl.items.count();let t=this.opt.maxItems;return(t="auto"===t||t<=0?e%2==0?e-1:e:t)%2==0&&--t,((t=(t=t<1?1:t)>e?e%2==0?e-1:e:t)-1)/2},calculate:function(t,n,i,r){var o=this;d.number(i)||(i=o.opt.gutter.max);const s={zIndex:(r=d.number(r)?r:o.getShowPerSide())+10,gutter:i,perSide:r,side:[]};let a=t,l=s.zIndex-1;for(let e=0;e<r;e++,l--){var c=o.getSequentialZFromScale(e,o.opt.scale,o.opt.perspective),u=o.scaleToZ(t,c,o.opt.perspective),h=(t-u)/2,p=(a-=h,"%"===o.opt.gutter.unit?t*Math.abs(i/100):Math.abs(i)),p="%"===o.opt.gutter.unit?o.scaleToZ(p,c,o.opt.perspective):p;if(0<i?a+=p:a-=p,a+u+h>n)return i-1<o.opt.gutter.min?o.calculate(t,n,o.opt.gutter.max,r-1):o.calculate(t,n,i-1,r);p=o.getVectorX(a,c,o.opt.perspective);a+=u+h,s.side.push({x:p,z:c,zIndex:l})}return s},cleanup:function(e,t,n){const i=this,r=d.string(n);Array.from(i.el.querySelectorAll(e)).forEach(function(e){e.classList.remove(t),i.opt.centerOnClick&&i._centerListeners.remove(e,"click"),r&&e.matches(n)||(e.style.removeProperty("transition-duration"),e.style.removeProperty("transform"),e.style.removeProperty("z-index"))})},renderActive:function(e){const n=this;if(!(n.activeItem instanceof u.Item))return!1;const t=n.activeItem.el,i=(n.cleanup(n.sel.activeItem,n.cls.activeItem),t.classList.add(n.cls.activeItem),t.style.setProperty("transition-duration",n.opt.speed+"ms"),t.style.setProperty("z-index",e.zIndex),t.style.removeProperty("transform"),n.tmpl.items.indexOf(n.activeItem));return Array.from(n.el.querySelectorAll(n.sel.bullet)).forEach(function(e,t){e.classList.remove(n.cls.activeBullet),t===i&&e.classList.add(n.cls.activeBullet)}),!0},renderSide:function(n,e,i,r,o){const s=this;if(-1!==["left","right"].indexOf(n)){s.cleanup(e,r,i);let t=s.activeItem;for(let e=0;e<o.side.length;e++){var a=o.side[e];const c="left"===n?s.getPrev(t):s.getNext(t);if(!(c instanceof u.Item))break;var l="translate3d("+("left"===n&&!s.isRTL||"right"===n&&s.isRTL?"-":"")+a.x+"px, 0,-"+a.z+"px)";c.el.classList.add(r),c.isLoaded||(c.el.style.setProperty("transition-duration","0ms"),c.el.style.setProperty("transform","translate3d(0,0,-"+s.opt.perspective+"px)"),c.el.offsetHeight),c.el.style.setProperty("transition-duration",(s._firstLayout?0:s.opt.speed)+"ms"),c.el.style.setProperty("transform",l),c.el.style.setProperty("z-index",a.zIndex),s.opt.centerOnClick&&s._centerListeners.add(c.el,"click",function(e){e.preventDefault(),e.stopPropagation(),s.interacted=!0,s.goto(c)},!0),t=c}}}})}((FooGallery.$,FooGallery),FooGallery.icons,FooGallery.utils,FooGallery.utils.is),function(i,r){i.CarouselTemplate=i.Template.extend({construct:function(e,t){var n=this;n._super(r.extend({},e,{paging:{type:"none"}}),t),n.items.LAYOUT_AFTER_LOAD=!1,n.carousel=null,n.on({"pre-init":n.onPreInit,init:n.onInit,"post-init":n.onPostInit,destroyed:n.onDestroyed,"append-item":n.onAppendItem,"after-filter-change":n.onAfterFilterChange,layout:n.onLayout},n),i.Panel&&n.lightbox instanceof i.Panel&&n.lightbox.on({open:n.onLightboxOpen,closed:n.onLightboxClosed,next:n.onLightboxNext,prev:n.onLightboxPrev},n)},onPreInit:function(){var e=this;e.carousel=new i.Carousel(e,e.template,e.cls.carousel,e.sel.carousel)},onInit:function(){this.carousel.init()},onPostInit:function(){this.carousel.postInit()},onDestroyed:function(){this.carousel instanceof i.Carousel&&this.carousel.destroy()},onAppendItem:function(e,t){e.preventDefault(),this.carousel.elem.inner.appendChild(t.el),t.isAttached=!0},onAfterFilterChange:function(){this.carousel.cache.delete("layout"),this.carousel.interacted=!0,this.carousel.goto(this.carousel.getFirst())},onLayout:function(){this.carousel.layout(this.lastWidth)},onLightboxOpen:function(){this.carousel.interacted=!0,this.carousel.stop()},onLightboxClosed:function(){this.carousel.start()},onLightboxNext:function(){this.carousel.next()},onLightboxPrev:function(){this.carousel.previous()}}),i.template.register("carousel",i.CarouselTemplate,{template:{maxItems:0,perspective:150,scale:.12,speed:300,centerOnClick:!0,gutter:{min:-40,max:-20,unit:"%"},autoplay:{time:0,interaction:"pause"}}},{container:"foogallery fg-carousel",carousel:{inner:"fg-carousel-inner",center:"fg-carousel-center",bottom:"fg-carousel-bottom",prev:"fg-carousel-prev",next:"fg-carousel-next",bullet:"fg-carousel-bullet",activeBullet:"fg-bullet-active",activeItem:"fg-item-active",prevItem:"fg-item-prev",nextItem:"fg-item-next",progress:"fg-carousel-progress"}})}((FooGallery.$,FooGallery),FooGallery.utils.obj),function(o,s,n,i,r){s.__foobox__={owns:function(e){return 0<e.parents(".fbx-item").length},handles:function(e){return e.$el.hasClass("fbx-instance")&&r.object(window.FOOBOX)&&!!o.fn.foobox},update:function(e){const t=[{}];r.object(window.FOOBOX.o)&&t.push(window.FOOBOX.o),e.opt.protected&&t.push({images:{noRightClick:!0}}),r.fn(e.$el.foobox)&&e.$el.foobox(i.extend.apply(null,t))}},s.triggerPostLoad=function(e,t,n,i){var r=e.target;if(r instanceof s.Template&&r.initialized&&("ready"===e.type||"after-page-change"===e.type&&!i||"after-filter-change"===e.type))try{s.__foobox__.owns(r.$el)||(s.__foobox__.handles(r)?s.__foobox__.update(r):o("body").trigger("post-load"))}catch(e){console.error(e)}},s.autoDefaults={on:{"ready after-page-change after-filter-change":s.triggerPostLoad}},s.autoEnabled=!0,s.auto=function(e){return s.autoDefaults=i.merge(s.autoDefaults,e)},s.globalsMerged=!1,s.mergeGlobals=function(){!0!==s.globalsMerged&&r.object(window.FooGallery_il8n)&&(s.merge_il8n(window.FooGallery_il8n),s.globalsMerged=!0)},s.merge_il8n=function(i){r.object(i)&&Object.keys(i).forEach(e=>{if(r.object(i[e])&&s[e]instanceof s.Factory){const t=s[e],n=i[e];Object.keys(n).forEach(e=>{r.object(n[e])&&t.configure(e,null,null,n[e])})}})},s.load=s.reload=function(){let e=!1,t=!1;o(function(){s.mergeGlobals(),s.autoEnabled&&o('[id^="foogallery-gallery-"]:not(.fg-ready)').foogallery(s.autoDefaults),(e=!0)&&t&&document.dispatchEvent(new CustomEvent("foogallery-loaded",{detail:s}))}),n.ready(function(){s.mergeGlobals(),s.autoEnabled&&o('[id^="foogallery-gallery-"].fg-ready').foogallery(s.autoDefaults),t=!0,e&&t&&document.dispatchEvent(new CustomEvent("foogallery-loaded",{detail:s}))})},document.dispatchEvent(new CustomEvent("foogallery-ready",{detail:s})),s.load()}(FooGallery.$,FooGallery,FooGallery.utils,FooGallery.utils.obj,FooGallery.utils.is);
extensions/import-export/class-foogallery-export-view-helper.php ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! class_exists( 'FooGallery_Export_View_Helper' ) ) {
4
+
5
+ /**
6
+ * Class FooGallery_Export_View_Helper
7
+ */
8
+ class FooGallery_Export_View_Helper {
9
+ /**
10
+ * Renders the export form for a number of galleries.
11
+ *
12
+ * @param $galleries
13
+ * @return void
14
+ */
15
+ public function render_export_form( $galleries ) {
16
+ ?>
17
+ <style>
18
+ #foogallery_gallery_export_output {
19
+ width: 100%;
20
+ height: 500px;
21
+ }
22
+ </style>
23
+ <script>
24
+ jQuery(function ($) {
25
+ $('#foogallery_export_form').on('click', '.foogallery_gallery_export', function (e) {
26
+ e.preventDefault();
27
+
28
+ $('#foogallery_gallery_export_output_container').hide();
29
+ $('.foogallery_export_spinner').addClass('is-active');
30
+
31
+ var data = {
32
+ action: 'foogallery_gallery_export',
33
+ galleries: $('#foogallery_export_form .foogallery_id:checkbox:checked').map(function() {
34
+ return this.value;
35
+ }).get(),
36
+ '_wpnonce' : $('#foogallery_gallery_export').val()
37
+ };
38
+
39
+ $.ajax({
40
+ type: "POST",
41
+ url: ajaxurl,
42
+ data: data,
43
+ success: function(data) {
44
+ $('#foogallery_gallery_export_output').val(data);
45
+ $('#foogallery_gallery_export_output_container').show();
46
+ },
47
+ complete: function() {
48
+ $('.foogallery_export_spinner').removeClass('is-active');
49
+ },
50
+ error: function() {
51
+ //something went wrong! Alert the user and reload the page
52
+ alert('<?php _e( 'Something went wrong with the export!', 'foogallery' ); ?>');
53
+ }
54
+ });
55
+ });
56
+ });
57
+ </script>
58
+ <?php
59
+ wp_nonce_field( 'foogallery_gallery_export', 'foogallery_gallery_export', false );
60
+ ?>
61
+ <form id="foogallery_export_form" method="POST">
62
+ <table class="wp-list-table widefat" cellspacing="0">
63
+ <thead>
64
+ <tr>
65
+ <td scope="col" id="cb" class="manage-column column-cb check-column">
66
+ <label class="screen-reader-text" for="cb-select-all-1"><?php _e( 'Select All', 'foogallery' ); ?></label>
67
+ <input id="cb-select-all-1" type="checkbox" />
68
+ </td>
69
+ <th scope="col" class="manage-column">
70
+ <span><?php _e( 'Gallery Name', 'foogallery' ); ?></span>
71
+ </th>
72
+ <th scope="col" class="manage-column">
73
+ <span><?php _e( 'Template', 'foogallery' ); ?></span>
74
+ </th>
75
+ <th scope="col" class="manage-column">
76
+ <span><?php _e( 'Datasource', 'foogallery' ); ?></span>
77
+ </th>
78
+ <th scope="col" class="manage-column">
79
+ <span><?php _e( 'Attachments', 'foogallery' ); ?></span>
80
+ </th>
81
+ </tr>
82
+ </thead>
83
+ <tbody>
84
+ <?php
85
+ $counter = 0;
86
+ foreach ( $galleries as $gallery ) {
87
+ $counter++; ?>
88
+ <tr class="<?php echo ($counter % 2 === 0) ? 'alternate' : ''; ?>">
89
+ <th scope="row" class="column-cb check-column">
90
+ <input name="foogallery-id[]" class="foogallery_id" type="checkbox" value="<?php echo $gallery->ID; ?>">
91
+ </th>
92
+ <td>
93
+ <?php echo $gallery->name; ?>
94
+ </td>
95
+ <td>
96
+ <?php echo $gallery->gallery_template; ?>
97
+ </td>
98
+ <td>
99
+ <?php echo $gallery->datasource_name; ?>
100
+ </td>
101
+ <td>
102
+ <?php
103
+ if ( 'media_library' === $gallery->datasource_name ) {
104
+ echo $gallery->item_count();
105
+ } else {
106
+ echo '0';
107
+ }
108
+ ?>
109
+ </td>
110
+ </tr>
111
+ <?php } ?>
112
+ </tbody>
113
+ </table>
114
+ <br />
115
+ <input type="submit" name="foogallery_gallery_export" class="button button-primary foogallery_gallery_export" value="<?php _e( 'Export', 'foogallery' ); ?>">
116
+ <span class="foogallery_export_spinner spinner" style="float: none"></span>
117
+ </form>
118
+ <br />
119
+ <div id="foogallery_gallery_export_output_container" style="display:none">
120
+ <p><?php echo esc_html( __( 'Copy the export data below and paste it into the import form on the destination site.', 'foogallery' ) ); ?></p>
121
+ <textarea id="foogallery_gallery_export_output"></textarea>
122
+ </div>
123
+ <?php
124
+ }
125
+ }
126
+ }
extensions/import-export/class-foogallery-import-export-extension.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * FooGallery Import Export Class that registers the extension.
4
+ */
5
+
6
+ if ( ! class_exists('FooGallery_Import_Export_Extension') ) {
7
+
8
+ require_once 'class-foogallery-import-export.php';
9
+
10
+ class FooGallery_Import_Export_Extension {
11
+
12
+ /**
13
+ * FooGallery_Import_Export_Extension constructor.
14
+ */
15
+ function __construct() {
16
+ add_filter( 'foogallery_available_extensions', array( $this, 'register_extension' ) );
17
+ }
18
+
19
+ /**
20
+ * Register the extension
21
+ *
22
+ * @param $extensions_list
23
+ *
24
+ * @return array
25
+ */
26
+ function register_extension( $extensions_list ) {
27
+ $extensions_list[] = array(
28
+ 'slug' => 'foogallery-import-export',
29
+ 'class' => 'FooGallery_Import_Export',
30
+ 'categories' => array( 'Utilities' ),
31
+ 'title' => __( 'Import Export', 'foogallery' ),
32
+ 'description' => __( 'Export your galleries, and then import them into another WordPress install.', 'foogallery' ),
33
+ 'author' => 'FooPlugins',
34
+ 'author_url' => 'https://fooplugins.com',
35
+ 'thumbnail' => 'https://foogallery.s3.amazonaws.com/extensions/import_export.jpg',
36
+ 'tags' => array( 'utils' ),
37
+ 'source' => 'bundled'
38
+ );
39
+
40
+ return $extensions_list;
41
+ }
42
+ }
43
+ }
extensions/import-export/class-foogallery-import-export.php ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * FooGallery - Import Export Class
4
+ */
5
+
6
+ if ( ! class_exists( 'FooGallery_Import_Export' ) ) {
7
+
8
+ require_once 'functions.php';
9
+
10
+ /**
11
+ * Class FooGallery_Import_Export
12
+ */
13
+ class FooGallery_Import_Export {
14
+
15
+ /**
16
+ * Wire up everything we need to run the extension
17
+ */
18
+ public function __construct() {
19
+ if ( is_admin() ) {
20
+ //add_action( 'add_meta_boxes_foogallery', array( $this, 'add_export_metabox' ) );
21
+ add_action( 'foogallery_admin_menu_after', array( $this, 'add_import_export_menu' ) );
22
+ add_action( 'wp_ajax_foogallery_gallery_export', array( $this, 'ajax_generate_export' ) );
23
+ add_action( 'wp_ajax_foogallery_gallery_import', array( $this, 'ajax_import_galleries' ) );
24
+ }
25
+ }
26
+
27
+ /**
28
+ * Output a log message
29
+ *
30
+ * @param string $message The message to show.
31
+ * @param bool $line_break If a line break should also be output.
32
+ */
33
+ public function log_message( $message, $line_break = true ) {
34
+ echo esc_html( $message );
35
+ if ( $line_break ) {
36
+ echo '<br />';
37
+ }
38
+ }
39
+
40
+ /**
41
+ * Import galleries
42
+ */
43
+ public function ajax_import_galleries() {
44
+ if ( check_admin_referer( 'foogallery_gallery_import' ) ) {
45
+ if ( isset( $_POST['data'] ) ) {
46
+ if ( empty( $_POST['data'] ) ) {
47
+ echo esc_html( __( 'No import data provided!', 'foogallery' ) );
48
+ } else {
49
+
50
+ $galleries = json_decode( wp_unslash( $_POST['data'] ), true );
51
+
52
+ if ( null === $galleries ) {
53
+ echo esc_html( __( 'The import data could not be interpreted.', 'foogallery' ) );
54
+ } else {
55
+ $gallery_count = 0;
56
+ $attachment_count = 0;
57
+ $new_attachments = array();
58
+ foreach ( $galleries as $gallery ) {
59
+ $datasource_name = $gallery['datasource_name'];
60
+ $gallery_id = $gallery['ID'];
61
+ $name = $gallery['name'];
62
+ $template = $gallery['template'];
63
+
64
+ $this->log_message( sprintf( __( 'Import started for gallery ID : %1$s; Name : "%2$s"; Template : %3$s.', 'foogallery' ), $gallery_id, $name, $template ) );
65
+
66
+ // Check if we have already imported the gallery.
67
+ $search_gallery = FooGallery::get_by_id( $gallery_id );
68
+ // A match is made if the ID, name and template are the same, and also it's published!
69
+ if ( $search_gallery->ID === intval( $gallery_id ) && $search_gallery->gallery_template === $template && $search_gallery->name === $name && 'publish' === $search_gallery->post_status ) {
70
+ $this->log_message( __( 'Gallery already exists so skipping.', 'foogallery' ) );
71
+ continue;
72
+ }
73
+
74
+ $media_library_datasource = 'media_library' === $datasource_name;
75
+
76
+ if ( $media_library_datasource ) {
77
+ // We need to import attachments!
78
+ foreach ( $gallery['attachments'] as $attachment_id => $attachment ) {
79
+ $this->log_message( sprintf( __( 'Importing attachment from URL : %s ... ', 'foogallery' ), $attachment['url'] ), false );
80
+ // Try to find the image.
81
+ $imported_attachment_id = $this->find_attachment( $attachment['url'] );
82
+ if ( 0 === $imported_attachment_id ) {
83
+ // Import the attachment into the media library.
84
+
85
+ $imported_attachment_id = foogallery_import_attachment( $attachment );
86
+ if ( is_wp_error( $imported_attachment_id ) ) {
87
+ $this->log_message( sprintf( __( 'error : %s.', 'foogallery' ), $imported_attachment_id->get_error_message() ) );
88
+ $imported_attachment_id = 0;
89
+ } else {
90
+ $this->log_message( sprintf( __( 'success! ID : %s.', 'foogallery' ), $imported_attachment_id ) );
91
+ $attachment_count ++;
92
+ }
93
+ } else {
94
+ $this->log_message( __( 'already exists so skipping.', 'foogallery' ) );
95
+ }
96
+ if ( !is_wp_error( $imported_attachment_id ) && intval( $imported_attachment_id ) > 0 ) {
97
+ $new_attachments[ $attachment_id ] = $imported_attachment_id;
98
+ }
99
+ }
100
+ }
101
+
102
+ $gallery_data = array(
103
+ 'post_title' => $name,
104
+ 'post_status' => 'publish',
105
+ 'post_type' => FOOGALLERY_CPT_GALLERY,
106
+ 'meta_input' => array(
107
+ FOOGALLERY_META_TEMPLATE => $template,
108
+ FOOGALLERY_META_SETTINGS => $gallery['settings'],
109
+ FOOGALLERY_META_SORT => $gallery['sorting'],
110
+ FOOGALLERY_META_DATASOURCE => $datasource_name,
111
+ FOOGALLERY_META_RETINA => $gallery['retina'],
112
+ FOOGALLERY_META_CUSTOM_CSS => $gallery['custom_css'],
113
+ ),
114
+ );
115
+
116
+ if ( $media_library_datasource ) {
117
+ $new_attachment_ids = array();
118
+ foreach ( $gallery['attachment_ids'] as $old_attachment_id ) {
119
+ if ( array_key_exists( $old_attachment_id, $new_attachments ) ) {
120
+ $new_attachment_ids[] = $new_attachments[ $old_attachment_id ];
121
+ }
122
+ }
123
+ $gallery_data['meta_input'][ FOOGALLERY_META_ATTACHMENTS ] = $new_attachment_ids;
124
+ } else {
125
+ $gallery_data['meta_input'][ FOOGALLERY_META_DATASOURCE_VALUE ] = $gallery['datasource_value'];
126
+ }
127
+
128
+ $new_gallery_id = wp_insert_post( $gallery_data, true );
129
+
130
+ if ( ! is_wp_error( $new_gallery_id ) ) {
131
+ $gallery_count ++;
132
+ $this->log_message( sprintf( __( 'Success! Gallery successfully created. Gallery ID : %s.', 'foogallery' ), $new_gallery_id ) );
133
+ } else {
134
+ $this->log_message( sprintf( __( 'Error! Could not create gallery. Error : %s.', 'foogallery' ), $new_gallery_id->get_error_message() ) );
135
+ }
136
+ }
137
+ }
138
+ }
139
+ }
140
+ }
141
+ wp_die();
142
+ }
143
+
144
+ public function find_attachment( $url ) {
145
+ $imported_attachment_id = attachment_url_to_postid( $url );
146
+ if ( $imported_attachment_id === 0 ) {
147
+ $found_attachments = get_posts( array(
148
+ 'post_type' => 'attachment',
149
+ 'meta_key' => '_foogallery_imported_from',
150
+ 'meta_value' => $url,
151
+ ) );
152
+
153
+ if ( is_array( $found_attachments ) && count( $found_attachments ) > 0 ) {
154
+ $imported_attachment_id = $found_attachments[0]->ID;
155
+ }
156
+ }
157
+
158
+ return $imported_attachment_id;
159
+ }
160
+
161
+ /**
162
+ * Generate the export data
163
+ */
164
+ public function ajax_generate_export() {
165
+ if ( check_admin_referer( 'foogallery_gallery_export' ) ) {
166
+ if ( isset( $_POST['galleries'] ) ) {
167
+ $galleries = array_map( 'sanitize_text_field', wp_unslash( $_POST['galleries'] ) );
168
+ echo foogallery_generate_export_json( $galleries );
169
+ }
170
+ }
171
+ die();
172
+ }
173
+
174
+ /**
175
+ * Registers the test menu and page
176
+ */
177
+ public function add_import_export_menu() {
178
+ foogallery_add_submenu_page(
179
+ __( 'Import / Export', 'foogallery' ),
180
+ 'manage_options',
181
+ 'foogallery_import_export',
182
+ array( $this, 'render_import_export_page' )
183
+ );
184
+ }
185
+
186
+ /**
187
+ * Renders Import / Export page
188
+ */
189
+ public function render_import_export_page() {
190
+ require_once 'class-foogallery-export-view-helper.php';
191
+ require_once 'class-foogallery-import-view-helper.php';
192
+ require_once 'view-import-export.php';
193
+ }
194
+
195
+ /**
196
+ * Add a metabox to the gallery for exporting
197
+ *
198
+ * @param WP_Post $post the post we are dealing with.
199
+ */
200
+ public function add_export_metabox( $post ) {
201
+ add_meta_box(
202
+ 'foogallery_export',
203
+ __( 'Export', 'foogallery' ),
204
+ array( $this, 'render_export_metabox' ),
205
+ FOOGALLERY_CPT_GALLERY,
206
+ 'normal',
207
+ 'low'
208
+ );
209
+ }
210
+
211
+ /**
212
+ * Render the export metabox on the gallery edit page
213
+ *
214
+ * @param WP_Post $post the post we are dealing with.
215
+ */
216
+ public function render_export_metabox( $post ) {
217
+ $export = foogallery_generate_export_json( $post->ID );
218
+ ?>
219
+ <style>
220
+ .foogallery_metabox_export {
221
+ width: 100%;
222
+ height: 50em;
223
+ }
224
+ </style>
225
+ <p>
226
+ <?php echo esc_html( __( 'Below is a JSON export of your gallery.', 'foogallery' ) ); ?>
227
+ </p>
228
+ <table id="table_styling" class="form-table">
229
+ <tbody>
230
+ <tr>
231
+ <td>
232
+ <textarea class="foogallery_metabox_export" type="text"><?php echo esc_html( $export ); ?></textarea>
233
+ </td>
234
+ </tr>
235
+ </tbody>
236
+ </table>
237
+ <?php
238
+ }
239
+ }
240
+ }
extensions/import-export/class-foogallery-import-view-helper.php ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! class_exists( 'FooGallery_Import_View_Helper' ) ) {
4
+
5
+ /**
6
+ * Class FooGallery_Import_View_Helper
7
+ */
8
+ class FooGallery_Import_View_Helper {
9
+ public function render_import_form() {
10
+ ?>
11
+ <style>
12
+ #foogallery_import_form textarea {
13
+ width: 100%;
14
+ height: 200px;
15
+ }
16
+ .foogallery_gallery_import_results {
17
+ display: none;
18
+ }
19
+ </style>
20
+ <script>
21
+ jQuery(function ($) {
22
+ $('#foogallery_import_form').on('click', '.foogallery_gallery_import', function (e) {
23
+ e.preventDefault();
24
+
25
+ //show the spinner
26
+ $('.foogallery_import_spinner').addClass('is-active');
27
+
28
+ var data = {
29
+ action: 'foogallery_gallery_import',
30
+ data: $('#foogallery_import_form textarea').val(),
31
+ '_wpnonce' : $('#foogallery_gallery_import').val()
32
+ };
33
+
34
+ $.ajax({
35
+ type: "POST",
36
+ url: ajaxurl,
37
+ data: data,
38
+ success: function(data) {
39
+ $('.foogallery_gallery_import_results').html(data).show();
40
+ },
41
+ complete: function() {
42
+ $('.foogallery_import_spinner').removeClass('is-active');
43
+ },
44
+ error: function() {
45
+ alert('<?php _e( 'Something went wrong with the import!', 'foogallery' ); ?>');
46
+ }
47
+ });
48
+ });
49
+ });
50
+ </script>
51
+ <?php
52
+ wp_nonce_field( 'foogallery_gallery_import', 'foogallery_gallery_import', false );
53
+ ?>
54
+ <form id="foogallery_import_form" method="POST">
55
+ <textarea></textarea>
56
+ <br />
57
+ <br />
58
+ <input type="submit" name="foogallery_gallery_import" class="button button-primary foogallery_gallery_import" value="<?php echo esc_attr( __( 'Import', 'foogallery' ) ); ?>">
59
+ <span class="foogallery_import_spinner spinner" style="float: none"></span>
60
+ <p class="foogallery_gallery_import_results"></p>
61
+ </form>
62
+ <?php
63
+ }
64
+ }
65
+ }
extensions/import-export/functions.php ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Generate the JSON export for a gallery
5
+ *
6
+ * @param int[] $foogallery_ids The IDs of the gallery to export.
7
+ *
8
+ * @return string
9
+ */
10
+ function foogallery_generate_export_json( $foogallery_ids ) {
11
+ global $current_foogallery;
12
+
13
+ $exported_galleries = array();
14
+
15
+ if ( ! is_array( $foogallery_ids ) && intval( $foogallery_ids ) > 0 ) {
16
+ $foogallery_ids = array( $foogallery_ids );
17
+ }
18
+
19
+ foreach ( $foogallery_ids as $foogallery_id ) {
20
+
21
+ $current_foogallery = FooGallery::get_by_id( $foogallery_id );
22
+ do_action( 'foogallery_located_template', $current_foogallery );
23
+
24
+ $source_settings = get_post_meta( $foogallery_id, FOOGALLERY_META_SETTINGS, true );
25
+ $source_sorting = get_post_meta( $foogallery_id, FOOGALLERY_META_SORT, true );
26
+ $source_retina = get_post_meta( $foogallery_id, FOOGALLERY_META_RETINA, true );
27
+ $source_custom_css = get_post_meta( $foogallery_id, FOOGALLERY_META_CUSTOM_CSS, true );
28
+
29
+ $export = array(
30
+ 'ID' => $foogallery_id,
31
+ 'template' => $current_foogallery->gallery_template,
32
+ 'name' => $current_foogallery->name,
33
+ 'datasource_name' => $current_foogallery->datasource_name,
34
+ );
35
+
36
+ if ( 'media_library' === $current_foogallery->datasource_name ) {
37
+ $export['attachment_ids'] = $current_foogallery->attachment_ids;
38
+ $attachments = array();
39
+ foreach ( $current_foogallery->attachments() as $attachment ) {
40
+
41
+ $attachment_object = array(
42
+ 'url' => $attachment->url,
43
+ 'title' => $attachment->title,
44
+ 'caption' => $attachment->caption,
45
+ 'description' => $attachment->description,
46
+ 'alt' => $attachment->alt,
47
+ );
48
+
49
+ if ( ! empty( $attachment->custom_url ) ) {
50
+ $attachment_object['custom_url'] = $attachment->custom_url;
51
+ }
52
+ if ( ! empty( $attachment->custom_target ) ) {
53
+ $attachment_object['custom_target'] = $attachment->custom_target;
54
+ }
55
+
56
+ if ( defined( 'FOOGALLERY_ATTACHMENT_TAXONOMY_TAG' ) ) {
57
+ $tags = wp_get_post_terms( $attachment->ID, FOOGALLERY_ATTACHMENT_TAXONOMY_TAG, array( 'fields' => 'names' ) );
58
+ if ( ! empty( $tags ) && ! is_wp_error( $tags ) ) {
59
+ $attachment_object['tags'] = $tags;
60
+ }
61
+
62
+ $categories = wp_get_post_terms( $attachment->ID, FOOGALLERY_ATTACHMENT_TAXONOMY_CATEGORY, array( 'fields' => 'names' ) );
63
+ if ( ! empty( $categories ) && ! is_wp_error( $categories ) ) {
64
+ $attachment_object['categories'] = $categories;
65
+ }
66
+ }
67
+
68
+ $attachments[ $attachment->ID ] = $attachment_object;
69
+ }
70
+ } else {
71
+ $export['datasource_value'] = $current_foogallery->datasource_value;
72
+ }
73
+
74
+ $export['settings'] = $source_settings;
75
+ $export['sorting'] = $source_sorting;
76
+ $export['retina'] = $source_retina;
77
+ $export['custom_css'] = $source_custom_css;
78
+ if ( isset( $attachments ) ) {
79
+ $export['attachments'] = $attachments;
80
+ }
81
+
82
+ $exported_galleries[] = $export;
83
+ }
84
+
85
+ return foogallery_json_encode( $exported_galleries );
86
+ }
extensions/import-export/view-import-export.php ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Import / Export view
4
+ *
5
+ * @package foogallery
6
+ */
7
+
8
+ $galleries = foogallery_get_all_galleries();
9
+ $export_helper = new FooGallery_Export_View_Helper();
10
+ $import_helper = new FooGallery_Import_View_Helper();
11
+ ?>
12
+ <style>
13
+ .foo-nav-tabs a:focus {
14
+ -webkit-box-shadow: none;
15
+ box-shadow: none;
16
+ }
17
+
18
+ .foo-nav-container {
19
+ margin-top: 10px;
20
+ }
21
+
22
+ .foogallery-help {
23
+ margin-bottom: 10px;
24
+ }
25
+ </style>
26
+ <script>
27
+ jQuery(function ($) {
28
+ $('.foo-nav-tabs').on('click', 'a', function (e) {
29
+ $('.foo-nav-container').hide();
30
+ var tab = $(this).data('tab');
31
+ $('#' + tab).show();
32
+ $('.nav-tab').removeClass('nav-tab-active');
33
+ $(this).addClass('nav-tab-active');
34
+ });
35
+
36
+ if (window.location.hash) {
37
+ $('.foo-nav-tabs a[href="' + window.location.hash + '"]').click();
38
+ }
39
+ });
40
+ </script>
41
+
42
+ <h2><?php _e( 'FooGallery Import / Export', 'foogallery' ); ?></h2>
43
+
44
+ <h2 class="foo-nav-tabs nav-tab-wrapper">
45
+ <a href="#import" data-tab="foogallery_import_galleries" class="nav-tab nav-tab-active"><?php _e('Import', 'foogallery'); ?></a>
46
+ <a href="#export" data-tab="foogallery_export_galleries" class="nav-tab"><?php _e('Export', 'foogallery'); ?></a>
47
+
48
+
49
+ </h2>
50
+
51
+ <div class="foo-nav-container" id="foogallery_import_galleries">
52
+ <div class="foogallery-help">
53
+ <?php echo esc_html( __( 'Paste the output from a previous export into the textarea below and click Import.', 'foogallery' ) ); ?>
54
+ <br />
55
+ <?php echo esc_html( __( 'Attachments will be imported into the media library, but only if the exported images are publicly available. Galleries with large amounts of images will take a long time to import.', 'foogallery' ) ); ?>
56
+ </div>
57
+ <?php $import_helper->render_import_form(); ?>
58
+ </div>
59
+ <div class="foo-nav-container" id="foogallery_export_galleries" style="display: none">
60
+ <?php
61
+ if ( ! $galleries ) {
62
+ _e( 'There are no galleries to export!', 'foogallery' );
63
+ } else { ?>
64
+ <div class="foogallery-help">
65
+ <?php echo esc_html( __( 'Choose the galleries you want to export and click Export. You can then copy the output and use that to import on another WordPress install.', 'foogallery' ) ); ?>
66
+ <br />
67
+ <?php echo esc_html( __( 'If your galleries are loaded from another source, images will not be exported.', 'foogallery' ) ); ?>
68
+ <br />
69
+ <?php echo esc_html( __( 'Only images that are publicly accessible will be able to be imported.', 'foogallery' ) ); ?>
70
+ </div>
71
+
72
+ <?php $export_helper->render_export_form( $galleries ); ?>
73
+ <?php } ?>
74
+ </div>
foogallery.php CHANGED
@@ -3,7 +3,7 @@
3
  /*
4
  Plugin Name: FooGallery
5
  Description: FooGallery is the most intuitive and extensible gallery management tool ever created for WordPress
6
- Version: 2.2.7
7
  Author: FooPlugins
8
  Plugin URI: https://fooplugins.com/foogallery-wordpress-gallery-plugin/
9
  Author URI: https://fooplugins.com
@@ -25,7 +25,7 @@ if ( function_exists( 'foogallery_fs' ) ) {
25
  define( 'FOOGALLERY_PATH', plugin_dir_path( __FILE__ ) );
26
  define( 'FOOGALLERY_URL', plugin_dir_url( __FILE__ ) );
27
  define( 'FOOGALLERY_FILE', __FILE__ );
28
- define( 'FOOGALLERY_VERSION', '2.2.7' );
29
  define( 'FOOGALLERY_SETTINGS_VERSION', '2' );
30
  require_once FOOGALLERY_PATH . 'includes/constants.php';
31
  // Create a helper function for easy SDK access.
@@ -107,6 +107,8 @@ if ( function_exists( 'foogallery_fs' ) ) {
107
  new FooGallery_PostTypes();
108
  // load any extensions.
109
  new FooGallery_Extensions_Loader();
 
 
110
 
111
  if ( is_admin() ) {
112
  new FooGallery_Admin();
3
  /*
4
  Plugin Name: FooGallery
5
  Description: FooGallery is the most intuitive and extensible gallery management tool ever created for WordPress
6
+ Version: 2.2.22
7
  Author: FooPlugins
8
  Plugin URI: https://fooplugins.com/foogallery-wordpress-gallery-plugin/
9
  Author URI: https://fooplugins.com
25
  define( 'FOOGALLERY_PATH', plugin_dir_path( __FILE__ ) );
26
  define( 'FOOGALLERY_URL', plugin_dir_url( __FILE__ ) );
27
  define( 'FOOGALLERY_FILE', __FILE__ );
28
+ define( 'FOOGALLERY_VERSION', '2.2.22' );
29
  define( 'FOOGALLERY_SETTINGS_VERSION', '2' );
30
  require_once FOOGALLERY_PATH . 'includes/constants.php';
31
  // Create a helper function for easy SDK access.
107
  new FooGallery_PostTypes();
108
  // load any extensions.
109
  new FooGallery_Extensions_Loader();
110
+ // Load any bundled extension initializers.
111
+ new FooGallery_Import_Export_Extension();
112
 
113
  if ( is_admin() ) {
114
  new FooGallery_Admin();
freemius/LICENSE.txt CHANGED
@@ -1,674 +1,674 @@
1
- GNU GENERAL PUBLIC LICENSE
2
- Version 3, 29 June 2007
3
-
4
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
- Everyone is permitted to copy and distribute verbatim copies
6
- of this license document, but changing it is not allowed.
7
-
8
- Preamble
9
-
10
- The GNU General Public License is a free, copyleft license for
11
- software and other kinds of works.
12
-
13
- The licenses for most software and other practical works are designed
14
- to take away your freedom to share and change the works. By contrast,
15
- the GNU General Public License is intended to guarantee your freedom to
16
- share and change all versions of a program--to make sure it remains free
17
- software for all its users. We, the Free Software Foundation, use the
18
- GNU General Public License for most of our software; it applies also to
19
- any other work released this way by its authors. You can apply it to
20
- your programs, too.
21
-
22
- When we speak of free software, we are referring to freedom, not
23
- price. Our General Public Licenses are designed to make sure that you
24
- have the freedom to distribute copies of free software (and charge for
25
- them if you wish), that you receive source code or can get it if you
26
- want it, that you can change the software or use pieces of it in new
27
- free programs, and that you know you can do these things.
28
-
29
- To protect your rights, we need to prevent others from denying you
30
- these rights or asking you to surrender the rights. Therefore, you have
31
- certain responsibilities if you distribute copies of the software, or if
32
- you modify it: responsibilities to respect the freedom of others.
33
-
34
- For example, if you distribute copies of such a program, whether
35
- gratis or for a fee, you must pass on to the recipients the same
36
- freedoms that you received. You must make sure that they, too, receive
37
- or can get the source code. And you must show them these terms so they
38
- know their rights.
39
-
40
- Developers that use the GNU GPL protect your rights with two steps:
41
- (1) assert copyright on the software, and (2) offer you this License
42
- giving you legal permission to copy, distribute and/or modify it.
43
-
44
- For the developers' and authors' protection, the GPL clearly explains
45
- that there is no warranty for this free software. For both users' and
46
- authors' sake, the GPL requires that modified versions be marked as
47
- changed, so that their problems will not be attributed erroneously to
48
- authors of previous versions.
49
-
50
- Some devices are designed to deny users access to install or run
51
- modified versions of the software inside them, although the manufacturer
52
- can do so. This is fundamentally incompatible with the aim of
53
- protecting users' freedom to change the software. The systematic
54
- pattern of such abuse occurs in the area of products for individuals to
55
- use, which is precisely where it is most unacceptable. Therefore, we
56
- have designed this version of the GPL to prohibit the practice for those
57
- products. If such problems arise substantially in other domains, we
58
- stand ready to extend this provision to those domains in future versions
59
- of the GPL, as needed to protect the freedom of users.
60
-
61
- Finally, every program is threatened constantly by software patents.
62
- States should not allow patents to restrict development and use of
63
- software on general-purpose computers, but in those that do, we wish to
64
- avoid the special danger that patents applied to a free program could
65
- make it effectively proprietary. To prevent this, the GPL assures that
66
- patents cannot be used to render the program non-free.
67
-
68
- The precise terms and conditions for copying, distribution and
69
- modification follow.
70
-
71
- TERMS AND CONDITIONS
72
-
73
- 0. Definitions.
74
-
75
- "This License" refers to version 3 of the GNU General Public License.
76
-
77
- "Copyright" also means copyright-like laws that apply to other kinds of
78
- works, such as semiconductor masks.
79
-
80
- "The Program" refers to any copyrightable work licensed under this
81
- License. Each licensee is addressed as "you". "Licensees" and
82
- "recipients" may be individuals or organizations.
83
-
84
- To "modify" a work means to copy from or adapt all or part of the work
85
- in a fashion requiring copyright permission, other than the making of an
86
- exact copy. The resulting work is called a "modified version" of the
87
- earlier work or a work "based on" the earlier work.
88
-
89
- A "covered work" means either the unmodified Program or a work based
90
- on the Program.
91
-
92
- To "propagate" a work means to do anything with it that, without
93
- permission, would make you directly or secondarily liable for
94
- infringement under applicable copyright law, except executing it on a
95
- computer or modifying a private copy. Propagation includes copying,
96
- distribution (with or without modification), making available to the
97
- public, and in some countries other activities as well.
98
-
99
- To "convey" a work means any kind of propagation that enables other
100
- parties to make or receive copies. Mere interaction with a user through
101
- a computer network, with no transfer of a copy, is not conveying.
102
-
103
- An interactive user interface displays "Appropriate Legal Notices"
104
- to the extent that it includes a convenient and prominently visible
105
- feature that (1) displays an appropriate copyright notice, and (2)
106
- tells the user that there is no warranty for the work (except to the
107
- extent that warranties are provided), that licensees may convey the
108
- work under this License, and how to view a copy of this License. If
109
- the interface presents a list of user commands or options, such as a
110
- menu, a prominent item in the list meets this criterion.
111
-
112
- 1. Source Code.
113
-
114
- The "source code" for a work means the preferred form of the work
115
- for making modifications to it. "Object code" means any non-source
116
- form of a work.
117
-
118
- A "Standard Interface" means an interface that either is an official
119
- standard defined by a recognized standards body, or, in the case of
120
- interfaces specified for a particular programming language, one that
121
- is widely used among developers working in that language.
122
-
123
- The "System Libraries" of an executable work include anything, other
124
- than the work as a whole, that (a) is included in the normal form of
125
- packaging a Major Component, but which is not part of that Major
126
- Component, and (b) serves only to enable use of the work with that
127
- Major Component, or to implement a Standard Interface for which an
128
- implementation is available to the public in source code form. A
129
- "Major Component", in this context, means a major essential component
130
- (kernel, window system, and so on) of the specific operating system
131
- (if any) on which the executable work runs, or a compiler used to
132
- produce the work, or an object code interpreter used to run it.
133
-
134
- The "Corresponding Source" for a work in object code form means all
135
- the source code needed to generate, install, and (for an executable
136
- work) run the object code and to modify the work, including scripts to
137
- control those activities. However, it does not include the work's
138
- System Libraries, or general-purpose tools or generally available free
139
- programs which are used unmodified in performing those activities but
140
- which are not part of the work. For example, Corresponding Source
141
- includes interface definition files associated with source files for
142
- the work, and the source code for shared libraries and dynamically
143
- linked subprograms that the work is specifically designed to require,
144
- such as by intimate data communication or control flow between those
145
- subprograms and other parts of the work.
146
-
147
- The Corresponding Source need not include anything that users
148
- can regenerate automatically from other parts of the Corresponding
149
- Source.
150
-
151
- The Corresponding Source for a work in source code form is that
152
- same work.
153
-
154
- 2. Basic Permissions.
155
-
156
- All rights granted under this License are granted for the term of
157
- copyright on the Program, and are irrevocable provided the stated
158
- conditions are met. This License explicitly affirms your unlimited
159
- permission to run the unmodified Program. The output from running a
160
- covered work is covered by this License only if the output, given its
161
- content, constitutes a covered work. This License acknowledges your
162
- rights of fair use or other equivalent, as provided by copyright law.
163
-
164
- You may make, run and propagate covered works that you do not
165
- convey, without conditions so long as your license otherwise remains
166
- in force. You may convey covered works to others for the sole purpose
167
- of having them make modifications exclusively for you, or provide you
168
- with facilities for running those works, provided that you comply with
169
- the terms of this License in conveying all material for which you do
170
- not control copyright. Those thus making or running the covered works
171
- for you must do so exclusively on your behalf, under your direction
172
- and control, on terms that prohibit them from making any copies of
173
- your copyrighted material outside their relationship with you.
174
-
175
- Conveying under any other circumstances is permitted solely under
176
- the conditions stated below. Sublicensing is not allowed; section 10
177
- makes it unnecessary.
178
-
179
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
-
181
- No covered work shall be deemed part of an effective technological
182
- measure under any applicable law fulfilling obligations under article
183
- 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184
- similar laws prohibiting or restricting circumvention of such
185
- measures.
186
-
187
- When you convey a covered work, you waive any legal power to forbid
188
- circumvention of technological measures to the extent such circumvention
189
- is effected by exercising rights under this License with respect to
190
- the covered work, and you disclaim any intention to limit operation or
191
- modification of the work as a means of enforcing, against the work's
192
- users, your or third parties' legal rights to forbid circumvention of
193
- technological measures.
194
-
195
- 4. Conveying Verbatim Copies.
196
-
197
- You may convey verbatim copies of the Program's source code as you
198
- receive it, in any medium, provided that you conspicuously and
199
- appropriately publish on each copy an appropriate copyright notice;
200
- keep intact all notices stating that this License and any
201
- non-permissive terms added in accord with section 7 apply to the code;
202
- keep intact all notices of the absence of any warranty; and give all
203
- recipients a copy of this License along with the Program.
204
-
205
- You may charge any price or no price for each copy that you convey,
206
- and you may offer support or warranty protection for a fee.
207
-
208
- 5. Conveying Modified Source Versions.
209
-
210
- You may convey a work based on the Program, or the modifications to
211
- produce it from the Program, in the form of source code under the
212
- terms of section 4, provided that you also meet all of these conditions:
213
-
214
- a) The work must carry prominent notices stating that you modified
215
- it, and giving a relevant date.
216
-
217
- b) The work must carry prominent notices stating that it is
218
- released under this License and any conditions added under section
219
- 7. This requirement modifies the requirement in section 4 to
220
- "keep intact all notices".
221
-
222
- c) You must license the entire work, as a whole, under this
223
- License to anyone who comes into possession of a copy. This
224
- License will therefore apply, along with any applicable section 7
225
- additional terms, to the whole of the work, and all its parts,
226
- regardless of how they are packaged. This License gives no
227
- permission to license the work in any other way, but it does not
228
- invalidate such permission if you have separately received it.
229
-
230
- d) If the work has interactive user interfaces, each must display
231
- Appropriate Legal Notices; however, if the Program has interactive
232
- interfaces that do not display Appropriate Legal Notices, your
233
- work need not make them do so.
234
-
235
- A compilation of a covered work with other separate and independent
236
- works, which are not by their nature extensions of the covered work,
237
- and which are not combined with it such as to form a larger program,
238
- in or on a volume of a storage or distribution medium, is called an
239
- "aggregate" if the compilation and its resulting copyright are not
240
- used to limit the access or legal rights of the compilation's users
241
- beyond what the individual works permit. Inclusion of a covered work
242
- in an aggregate does not cause this License to apply to the other
243
- parts of the aggregate.
244
-
245
- 6. Conveying Non-Source Forms.
246
-
247
- You may convey a covered work in object code form under the terms
248
- of sections 4 and 5, provided that you also convey the
249
- machine-readable Corresponding Source under the terms of this License,
250
- in one of these ways:
251
-
252
- a) Convey the object code in, or embodied in, a physical product
253
- (including a physical distribution medium), accompanied by the
254
- Corresponding Source fixed on a durable physical medium
255
- customarily used for software interchange.
256
-
257
- b) Convey the object code in, or embodied in, a physical product
258
- (including a physical distribution medium), accompanied by a
259
- written offer, valid for at least three years and valid for as
260
- long as you offer spare parts or customer support for that product
261
- model, to give anyone who possesses the object code either (1) a
262
- copy of the Corresponding Source for all the software in the
263
- product that is covered by this License, on a durable physical
264
- medium customarily used for software interchange, for a price no
265
- more than your reasonable cost of physically performing this
266
- conveying of source, or (2) access to copy the
267
- Corresponding Source from a network server at no charge.
268
-
269
- c) Convey individual copies of the object code with a copy of the
270
- written offer to provide the Corresponding Source. This
271
- alternative is allowed only occasionally and noncommercially, and
272
- only if you received the object code with such an offer, in accord
273
- with subsection 6b.
274
-
275
- d) Convey the object code by offering access from a designated
276
- place (gratis or for a charge), and offer equivalent access to the
277
- Corresponding Source in the same way through the same place at no
278
- further charge. You need not require recipients to copy the
279
- Corresponding Source along with the object code. If the place to
280
- copy the object code is a network server, the Corresponding Source
281
- may be on a different server (operated by you or a third party)
282
- that supports equivalent copying facilities, provided you maintain
283
- clear directions next to the object code saying where to find the
284
- Corresponding Source. Regardless of what server hosts the
285
- Corresponding Source, you remain obligated to ensure that it is
286
- available for as long as needed to satisfy these requirements.
287
-
288
- e) Convey the object code using peer-to-peer transmission, provided
289
- you inform other peers where the object code and Corresponding
290
- Source of the work are being offered to the general public at no
291
- charge under subsection 6d.
292
-
293
- A separable portion of the object code, whose source code is excluded
294
- from the Corresponding Source as a System Library, need not be
295
- included in conveying the object code work.
296
-
297
- A "User Product" is either (1) a "consumer product", which means any
298
- tangible personal property which is normally used for personal, family,
299
- or household purposes, or (2) anything designed or sold for incorporation
300
- into a dwelling. In determining whether a product is a consumer product,
301
- doubtful cases shall be resolved in favor of coverage. For a particular
302
- product received by a particular user, "normally used" refers to a
303
- typical or common use of that class of product, regardless of the status
304
- of the particular user or of the way in which the particular user
305
- actually uses, or expects or is expected to use, the product. A product
306
- is a consumer product regardless of whether the product has substantial
307
- commercial, industrial or non-consumer uses, unless such uses represent
308
- the only significant mode of use of the product.
309
-
310
- "Installation Information" for a User Product means any methods,
311
- procedures, authorization keys, or other information required to install
312
- and execute modified versions of a covered work in that User Product from
313
- a modified version of its Corresponding Source. The information must
314
- suffice to ensure that the continued functioning of the modified object
315
- code is in no case prevented or interfered with solely because
316
- modification has been made.
317
-
318
- If you convey an object code work under this section in, or with, or
319
- specifically for use in, a User Product, and the conveying occurs as
320
- part of a transaction in which the right of possession and use of the
321
- User Product is transferred to the recipient in perpetuity or for a
322
- fixed term (regardless of how the transaction is characterized), the
323
- Corresponding Source conveyed under this section must be accompanied
324
- by the Installation Information. But this requirement does not apply
325
- if neither you nor any third party retains the ability to install
326
- modified object code on the User Product (for example, the work has
327
- been installed in ROM).
328
-
329
- The requirement to provide Installation Information does not include a
330
- requirement to continue to provide support service, warranty, or updates
331
- for a work that has been modified or installed by the recipient, or for
332
- the User Product in which it has been modified or installed. Access to a
333
- network may be denied when the modification itself materially and
334
- adversely affects the operation of the network or violates the rules and
335
- protocols for communication across the network.
336
-
337
- Corresponding Source conveyed, and Installation Information provided,
338
- in accord with this section must be in a format that is publicly
339
- documented (and with an implementation available to the public in
340
- source code form), and must require no special password or key for
341
- unpacking, reading or copying.
342
-
343
- 7. Additional Terms.
344
-
345
- "Additional permissions" are terms that supplement the terms of this
346
- License by making exceptions from one or more of its conditions.
347
- Additional permissions that are applicable to the entire Program shall
348
- be treated as though they were included in this License, to the extent
349
- that they are valid under applicable law. If additional permissions
350
- apply only to part of the Program, that part may be used separately
351
- under those permissions, but the entire Program remains governed by
352
- this License without regard to the additional permissions.
353
-
354
- When you convey a copy of a covered work, you may at your option
355
- remove any additional permissions from that copy, or from any part of
356
- it. (Additional permissions may be written to require their own
357
- removal in certain cases when you modify the work.) You may place
358
- additional permissions on material, added by you to a covered work,
359
- for which you have or can give appropriate copyright permission.
360
-
361
- Notwithstanding any other provision of this License, for material you
362
- add to a covered work, you may (if authorized by the copyright holders of
363
- that material) supplement the terms of this License with terms:
364
-
365
- a) Disclaiming warranty or limiting liability differently from the
366
- terms of sections 15 and 16 of this License; or
367
-
368
- b) Requiring preservation of specified reasonable legal notices or
369
- author attributions in that material or in the Appropriate Legal
370
- Notices displayed by works containing it; or
371
-
372
- c) Prohibiting misrepresentation of the origin of that material, or
373
- requiring that modified versions of such material be marked in
374
- reasonable ways as different from the original version; or
375
-
376
- d) Limiting the use for publicity purposes of names of licensors or
377
- authors of the material; or
378
-
379
- e) Declining to grant rights under trademark law for use of some
380
- trade names, trademarks, or service marks; or
381
-
382
- f) Requiring indemnification of licensors and authors of that
383
- material by anyone who conveys the material (or modified versions of
384
- it) with contractual assumptions of liability to the recipient, for
385
- any liability that these contractual assumptions directly impose on
386
- those licensors and authors.
387
-
388
- All other non-permissive additional terms are considered "further
389
- restrictions" within the meaning of section 10. If the Program as you
390
- received it, or any part of it, contains a notice stating that it is
391
- governed by this License along with a term that is a further
392
- restriction, you may remove that term. If a license document contains
393
- a further restriction but permits relicensing or conveying under this
394
- License, you may add to a covered work material governed by the terms
395
- of that license document, provided that the further restriction does
396
- not survive such relicensing or conveying.
397
-
398
- If you add terms to a covered work in accord with this section, you
399
- must place, in the relevant source files, a statement of the
400
- additional terms that apply to those files, or a notice indicating
401
- where to find the applicable terms.
402
-
403
- Additional terms, permissive or non-permissive, may be stated in the
404
- form of a separately written license, or stated as exceptions;
405
- the above requirements apply either way.
406
-
407
- 8. Termination.
408
-
409
- You may not propagate or modify a covered work except as expressly
410
- provided under this License. Any attempt otherwise to propagate or
411
- modify it is void, and will automatically terminate your rights under
412
- this License (including any patent licenses granted under the third
413
- paragraph of section 11).
414
-
415
- However, if you cease all violation of this License, then your
416
- license from a particular copyright holder is reinstated (a)
417
- provisionally, unless and until the copyright holder explicitly and
418
- finally terminates your license, and (b) permanently, if the copyright
419
- holder fails to notify you of the violation by some reasonable means
420
- prior to 60 days after the cessation.
421
-
422
- Moreover, your license from a particular copyright holder is
423
- reinstated permanently if the copyright holder notifies you of the
424
- violation by some reasonable means, this is the first time you have
425
- received notice of violation of this License (for any work) from that
426
- copyright holder, and you cure the violation prior to 30 days after
427
- your receipt of the notice.
428
-
429
- Termination of your rights under this section does not terminate the
430
- licenses of parties who have received copies or rights from you under
431
- this License. If your rights have been terminated and not permanently
432
- reinstated, you do not qualify to receive new licenses for the same
433
- material under section 10.
434
-
435
- 9. Acceptance Not Required for Having Copies.
436
-
437
- You are not required to accept this License in order to receive or
438
- run a copy of the Program. Ancillary propagation of a covered work
439
- occurring solely as a consequence of using peer-to-peer transmission
440
- to receive a copy likewise does not require acceptance. However,
441
- nothing other than this License grants you permission to propagate or
442
- modify any covered work. These actions infringe copyright if you do
443
- not accept this License. Therefore, by modifying or propagating a
444
- covered work, you indicate your acceptance of this License to do so.
445
-
446
- 10. Automatic Licensing of Downstream Recipients.
447
-
448
- Each time you convey a covered work, the recipient automatically
449
- receives a license from the original licensors, to run, modify and
450
- propagate that work, subject to this License. You are not responsible
451
- for enforcing compliance by third parties with this License.
452
-
453
- An "entity transaction" is a transaction transferring control of an
454
- organization, or substantially all assets of one, or subdividing an
455
- organization, or merging organizations. If propagation of a covered
456
- work results from an entity transaction, each party to that
457
- transaction who receives a copy of the work also receives whatever
458
- licenses to the work the party's predecessor in interest had or could
459
- give under the previous paragraph, plus a right to possession of the
460
- Corresponding Source of the work from the predecessor in interest, if
461
- the predecessor has it or can get it with reasonable efforts.
462
-
463
- You may not impose any further restrictions on the exercise of the
464
- rights granted or affirmed under this License. For example, you may
465
- not impose a license fee, royalty, or other charge for exercise of
466
- rights granted under this License, and you may not initiate litigation
467
- (including a cross-claim or counterclaim in a lawsuit) alleging that
468
- any patent claim is infringed by making, using, selling, offering for
469
- sale, or importing the Program or any portion of it.
470
-
471
- 11. Patents.
472
-
473
- A "contributor" is a copyright holder who authorizes use under this
474
- License of the Program or a work on which the Program is based. The
475
- work thus licensed is called the contributor's "contributor version".
476
-
477
- A contributor's "essential patent claims" are all patent claims
478
- owned or controlled by the contributor, whether already acquired or
479
- hereafter acquired, that would be infringed by some manner, permitted
480
- by this License, of making, using, or selling its contributor version,
481
- but do not include claims that would be infringed only as a
482
- consequence of further modification of the contributor version. For
483
- purposes of this definition, "control" includes the right to grant
484
- patent sublicenses in a manner consistent with the requirements of
485
- this License.
486
-
487
- Each contributor grants you a non-exclusive, worldwide, royalty-free
488
- patent license under the contributor's essential patent claims, to
489
- make, use, sell, offer for sale, import and otherwise run, modify and
490
- propagate the contents of its contributor version.
491
-
492
- In the following three paragraphs, a "patent license" is any express
493
- agreement or commitment, however denominated, not to enforce a patent
494
- (such as an express permission to practice a patent or covenant not to
495
- sue for patent infringement). To "grant" such a patent license to a
496
- party means to make such an agreement or commitment not to enforce a
497
- patent against the party.
498
-
499
- If you convey a covered work, knowingly relying on a patent license,
500
- and the Corresponding Source of the work is not available for anyone
501
- to copy, free of charge and under the terms of this License, through a
502
- publicly available network server or other readily accessible means,
503
- then you must either (1) cause the Corresponding Source to be so
504
- available, or (2) arrange to deprive yourself of the benefit of the
505
- patent license for this particular work, or (3) arrange, in a manner
506
- consistent with the requirements of this License, to extend the patent
507
- license to downstream recipients. "Knowingly relying" means you have
508
- actual knowledge that, but for the patent license, your conveying the
509
- covered work in a country, or your recipient's use of the covered work
510
- in a country, would infringe one or more identifiable patents in that
511
- country that you have reason to believe are valid.
512
-
513
- If, pursuant to or in connection with a single transaction or
514
- arrangement, you convey, or propagate by procuring conveyance of, a
515
- covered work, and grant a patent license to some of the parties
516
- receiving the covered work authorizing them to use, propagate, modify
517
- or convey a specific copy of the covered work, then the patent license
518
- you grant is automatically extended to all recipients of the covered
519
- work and works based on it.
520
-
521
- A patent license is "discriminatory" if it does not include within
522
- the scope of its coverage, prohibits the exercise of, or is
523
- conditioned on the non-exercise of one or more of the rights that are
524
- specifically granted under this License. You may not convey a covered
525
- work if you are a party to an arrangement with a third party that is
526
- in the business of distributing software, under which you make payment
527
- to the third party based on the extent of your activity of conveying
528
- the work, and under which the third party grants, to any of the
529
- parties who would receive the covered work from you, a discriminatory
530
- patent license (a) in connection with copies of the covered work
531
- conveyed by you (or copies made from those copies), or (b) primarily
532
- for and in connection with specific products or compilations that
533
- contain the covered work, unless you entered into that arrangement,
534
- or that patent license was granted, prior to 28 March 2007.
535
-
536
- Nothing in this License shall be construed as excluding or limiting
537
- any implied license or other defenses to infringement that may
538
- otherwise be available to you under applicable patent law.
539
-
540
- 12. No Surrender of Others' Freedom.
541
-
542
- If conditions are imposed on you (whether by court order, agreement or
543
- otherwise) that contradict the conditions of this License, they do not
544
- excuse you from the conditions of this License. If you cannot convey a
545
- covered work so as to satisfy simultaneously your obligations under this
546
- License and any other pertinent obligations, then as a consequence you may
547
- not convey it at all. For example, if you agree to terms that obligate you
548
- to collect a royalty for further conveying from those to whom you convey
549
- the Program, the only way you could satisfy both those terms and this
550
- License would be to refrain entirely from conveying the Program.
551
-
552
- 13. Use with the GNU Affero General Public License.
553
-
554
- Notwithstanding any other provision of this License, you have
555
- permission to link or combine any covered work with a work licensed
556
- under version 3 of the GNU Affero General Public License into a single
557
- combined work, and to convey the resulting work. The terms of this
558
- License will continue to apply to the part which is the covered work,
559
- but the special requirements of the GNU Affero General Public License,
560
- section 13, concerning interaction through a network will apply to the
561
- combination as such.
562
-
563
- 14. Revised Versions of this License.
564
-
565
- The Free Software Foundation may publish revised and/or new versions of
566
- the GNU General Public License from time to time. Such new versions will
567
- be similar in spirit to the present version, but may differ in detail to
568
- address new problems or concerns.
569
-
570
- Each version is given a distinguishing version number. If the
571
- Program specifies that a certain numbered version of the GNU General
572
- Public License "or any later version" applies to it, you have the
573
- option of following the terms and conditions either of that numbered
574
- version or of any later version published by the Free Software
575
- Foundation. If the Program does not specify a version number of the
576
- GNU General Public License, you may choose any version ever published
577
- by the Free Software Foundation.
578
-
579
- If the Program specifies that a proxy can decide which future
580
- versions of the GNU General Public License can be used, that proxy's
581
- public statement of acceptance of a version permanently authorizes you
582
- to choose that version for the Program.
583
-
584
- Later license versions may give you additional or different
585
- permissions. However, no additional obligations are imposed on any
586
- author or copyright holder as a result of your choosing to follow a
587
- later version.
588
-
589
- 15. Disclaimer of Warranty.
590
-
591
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592
- APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593
- HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594
- OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595
- THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596
- PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597
- IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598
- ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
-
600
- 16. Limitation of Liability.
601
-
602
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603
- WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604
- THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605
- GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606
- USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607
- DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608
- PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609
- EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610
- SUCH DAMAGES.
611
-
612
- 17. Interpretation of Sections 15 and 16.
613
-
614
- If the disclaimer of warranty and limitation of liability provided
615
- above cannot be given local legal effect according to their terms,
616
- reviewing courts shall apply local law that most closely approximates
617
- an absolute waiver of all civil liability in connection with the
618
- Program, unless a warranty or assumption of liability accompanies a
619
- copy of the Program in return for a fee.
620
-
621
- END OF TERMS AND CONDITIONS
622
-
623
- How to Apply These Terms to Your New Programs
624
-
625
- If you develop a new program, and you want it to be of the greatest
626
- possible use to the public, the best way to achieve this is to make it
627
- free software which everyone can redistribute and change under these terms.
628
-
629
- To do so, attach the following notices to the program. It is safest
630
- to attach them to the start of each source file to most effectively
631
- state the exclusion of warranty; and each file should have at least
632
- the "copyright" line and a pointer to where the full notice is found.
633
-
634
- {one line to give the program's name and a brief idea of what it does.}
635
- Copyright (C) {year} {name of author}
636
-
637
- This program is free software: you can redistribute it and/or modify
638
- it under the terms of the GNU General Public License as published by
639
- the Free Software Foundation, either version 3 of the License, or
640
- (at your option) any later version.
641
-
642
- This program is distributed in the hope that it will be useful,
643
- but WITHOUT ANY WARRANTY; without even the implied warranty of
644
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645
- GNU General Public License for more details.
646
-
647
- You should have received a copy of the GNU General Public License
648
- along with this program. If not, see <http://www.gnu.org/licenses/>.
649
-
650
- Also add information on how to contact you by electronic and paper mail.
651
-
652
- If the program does terminal interaction, make it output a short
653
- notice like this when it starts in an interactive mode:
654
-
655
- {project} Copyright (C) {year} {fullname}
656
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657
- This is free software, and you are welcome to redistribute it
658
- under certain conditions; type `show c' for details.
659
-
660
- The hypothetical commands `show w' and `show c' should show the appropriate
661
- parts of the General Public License. Of course, your program's commands
662
- might be different; for a GUI interface, you would use an "about box".
663
-
664
- You should also get your employer (if you work as a programmer) or school,
665
- if any, to sign a "copyright disclaimer" for the program, if necessary.
666
- For more information on this, and how to apply and follow the GNU GPL, see
667
- <http://www.gnu.org/licenses/>.
668
-
669
- The GNU General Public License does not permit incorporating your program
670
- into proprietary programs. If your program is a subroutine library, you
671
- may consider it more useful to permit linking proprietary applications with
672
- the library. If this is what you want to do, use the GNU Lesser General
673
- Public License instead of this License. But first, please read
674
  <http://www.gnu.org/philosophy/why-not-lgpl.html>.
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ The GNU General Public License is a free, copyleft license for
11
+ software and other kinds of works.
12
+
13
+ The licenses for most software and other practical works are designed
14
+ to take away your freedom to share and change the works. By contrast,
15
+ the GNU General Public License is intended to guarantee your freedom to
16
+ share and change all versions of a program--to make sure it remains free
17
+ software for all its users. We, the Free Software Foundation, use the
18
+ GNU General Public License for most of our software; it applies also to
19
+ any other work released this way by its authors. You can apply it to
20
+ your programs, too.
21
+
22
+ When we speak of free software, we are referring to freedom, not
23
+ price. Our General Public Licenses are designed to make sure that you
24
+ have the freedom to distribute copies of free software (and charge for
25
+ them if you wish), that you receive source code or can get it if you
26
+ want it, that you can change the software or use pieces of it in new
27
+ free programs, and that you know you can do these things.
28
+
29
+ To protect your rights, we need to prevent others from denying you
30
+ these rights or asking you to surrender the rights. Therefore, you have
31
+ certain responsibilities if you distribute copies of the software, or if
32
+ you modify it: responsibilities to respect the freedom of others.
33
+
34
+ For example, if you distribute copies of such a program, whether
35
+ gratis or for a fee, you must pass on to the recipients the same
36
+ freedoms that you received. You must make sure that they, too, receive
37
+ or can get the source code. And you must show them these terms so they
38
+ know their rights.
39
+
40
+ Developers that use the GNU GPL protect your rights with two steps:
41
+ (1) assert copyright on the software, and (2) offer you this License
42
+ giving you legal permission to copy, distribute and/or modify it.
43
+
44
+ For the developers' and authors' protection, the GPL clearly explains
45
+ that there is no warranty for this free software. For both users' and
46
+ authors' sake, the GPL requires that modified versions be marked as
47
+ changed, so that their problems will not be attributed erroneously to
48
+ authors of previous versions.
49
+
50
+ Some devices are designed to deny users access to install or run
51
+ modified versions of the software inside them, although the manufacturer
52
+ can do so. This is fundamentally incompatible with the aim of
53
+ protecting users' freedom to change the software. The systematic
54
+ pattern of such abuse occurs in the area of products for individuals to
55
+ use, which is precisely where it is most unacceptable. Therefore, we
56
+ have designed this version of the GPL to prohibit the practice for those
57
+ products. If such problems arise substantially in other domains, we
58
+ stand ready to extend this provision to those domains in future versions
59
+ of the GPL, as needed to protect the freedom of users.
60
+
61
+ Finally, every program is threatened constantly by software patents.
62
+ States should not allow patents to restrict development and use of
63
+ software on general-purpose computers, but in those that do, we wish to
64
+ avoid the special danger that patents applied to a free program could
65
+ make it effectively proprietary. To prevent this, the GPL assures that
66
+ patents cannot be used to render the program non-free.
67
+
68
+ The precise terms and conditions for copying, distribution and
69
+ modification follow.
70
+
71
+ TERMS AND CONDITIONS
72
+
73
+ 0. Definitions.
74
+
75
+ "This License" refers to version 3 of the GNU General Public License.
76
+
77
+ "Copyright" also means copyright-like laws that apply to other kinds of
78
+ works, such as semiconductor masks.
79
+
80
+ "The Program" refers to any copyrightable work licensed under this
81
+ License. Each licensee is addressed as "you". "Licensees" and
82
+ "recipients" may be individuals or organizations.
83
+
84
+ To "modify" a work means to copy from or adapt all or part of the work
85
+ in a fashion requiring copyright permission, other than the making of an
86
+ exact copy. The resulting work is called a "modified version" of the
87
+ earlier work or a work "based on" the earlier work.
88
+
89
+ A "covered work" means either the unmodified Program or a work based
90
+ on the Program.
91
+
92
+ To "propagate" a work means to do anything with it that, without
93
+ permission, would make you directly or secondarily liable for
94
+ infringement under applicable copyright law, except executing it on a
95
+ computer or modifying a private copy. Propagation includes copying,
96
+ distribution (with or without modification), making available to the
97
+ public, and in some countries other activities as well.
98
+
99
+ To "convey" a work means any kind of propagation that enables other
100
+ parties to make or receive copies. Mere interaction with a user through
101
+ a computer network, with no transfer of a copy, is not conveying.
102
+
103
+ An interactive user interface displays "Appropriate Legal Notices"
104
+ to the extent that it includes a convenient and prominently visible
105
+ feature that (1) displays an appropriate copyright notice, and (2)
106
+ tells the user that there is no warranty for the work (except to the
107
+ extent that warranties are provided), that licensees may convey the
108
+ work under this License, and how to view a copy of this License. If
109
+ the interface presents a list of user commands or options, such as a
110
+ menu, a prominent item in the list meets this criterion.
111
+
112
+ 1. Source Code.
113
+
114
+ The "source code" for a work means the preferred form of the work
115
+ for making modifications to it. "Object code" means any non-source
116
+ form of a work.
117
+
118
+ A "Standard Interface" means an interface that either is an official
119
+ standard defined by a recognized standards body, or, in the case of
120
+ interfaces specified for a particular programming language, one that
121
+ is widely used among developers working in that language.
122
+
123
+ The "System Libraries" of an executable work include anything, other
124
+ than the work as a whole, that (a) is included in the normal form of
125
+ packaging a Major Component, but which is not part of that Major
126
+ Component, and (b) serves only to enable use of the work with that
127
+ Major Component, or to implement a Standard Interface for which an
128
+ implementation is available to the public in source code form. A
129
+ "Major Component", in this context, means a major essential component
130
+ (kernel, window system, and so on) of the specific operating system
131
+ (if any) on which the executable work runs, or a compiler used to
132
+ produce the work, or an object code interpreter used to run it.
133
+
134
+ The "Corresponding Source" for a work in object code form means all
135
+ the source code needed to generate, install, and (for an executable
136
+ work) run the object code and to modify the work, including scripts to
137
+ control those activities. However, it does not include the work's
138
+ System Libraries, or general-purpose tools or generally available free
139
+ programs which are used unmodified in performing those activities but
140
+ which are not part of the work. For example, Corresponding Source
141
+ includes interface definition files associated with source files for
142
+ the work, and the source code for shared libraries and dynamically
143
+ linked subprograms that the work is specifically designed to require,
144
+ such as by intimate data communication or control flow between those
145
+ subprograms and other parts of the work.
146
+
147
+ The Corresponding Source need not include anything that users
148
+ can regenerate automatically from other parts of the Corresponding
149
+ Source.
150
+
151
+ The Corresponding Source for a work in source code form is that
152
+ same work.
153
+
154
+ 2. Basic Permissions.
155
+
156
+ All rights granted under this License are granted for the term of
157
+ copyright on the Program, and are irrevocable provided the stated
158
+ conditions are met. This License explicitly affirms your unlimited
159
+ permission to run the unmodified Program. The output from running a
160
+ covered work is covered by this License only if the output, given its
161
+ content, constitutes a covered work. This License acknowledges your
162
+ rights of fair use or other equivalent, as provided by copyright law.
163
+
164
+ You may make, run and propagate covered works that you do not
165
+ convey, without conditions so long as your license otherwise remains
166
+ in force. You may convey covered works to others for the sole purpose
167
+ of having them make modifications exclusively for you, or provide you
168
+ with facilities for running those works, provided that you comply with
169
+ the terms of this License in conveying all material for which you do
170
+ not control copyright. Those thus making or running the covered works
171
+ for you must do so exclusively on your behalf, under your direction
172
+ and control, on terms that prohibit them from making any copies of
173
+ your copyrighted material outside their relationship with you.
174
+
175
+ Conveying under any other circumstances is permitted solely under
176
+ the conditions stated below. Sublicensing is not allowed; section 10
177
+ makes it unnecessary.
178
+
179
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
+
181
+ No covered work shall be deemed part of an effective technological
182
+ measure under any applicable law fulfilling obligations under article
183
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184
+ similar laws prohibiting or restricting circumvention of such
185
+ measures.
186
+
187
+ When you convey a covered work, you waive any legal power to forbid
188
+ circumvention of technological measures to the extent such circumvention
189
+ is effected by exercising rights under this License with respect to
190
+ the covered work, and you disclaim any intention to limit operation or
191
+ modification of the work as a means of enforcing, against the work's
192
+ users, your or third parties' legal rights to forbid circumvention of
193
+ technological measures.
194
+
195
+ 4. Conveying Verbatim Copies.
196
+
197
+ You may convey verbatim copies of the Program's source code as you
198
+ receive it, in any medium, provided that you conspicuously and
199
+ appropriately publish on each copy an appropriate copyright notice;
200
+ keep intact all notices stating that this License and any
201
+ non-permissive terms added in accord with section 7 apply to the code;
202
+ keep intact all notices of the absence of any warranty; and give all
203
+ recipients a copy of this License along with the Program.
204
+
205
+ You may charge any price or no price for each copy that you convey,
206
+ and you may offer support or warranty protection for a fee.
207
+
208
+ 5. Conveying Modified Source Versions.
209
+
210
+ You may convey a work based on the Program, or the modifications to
211
+ produce it from the Program, in the form of source code under the
212
+ terms of section 4, provided that you also meet all of these conditions:
213
+
214
+ a) The work must carry prominent notices stating that you modified
215
+ it, and giving a relevant date.
216
+
217
+ b) The work must carry prominent notices stating that it is
218
+ released under this License and any conditions added under section
219
+ 7. This requirement modifies the requirement in section 4 to
220
+ "keep intact all notices".
221
+
222
+ c) You must license the entire work, as a whole, under this
223
+ License to anyone who comes into possession of a copy. This
224
+ License will therefore apply, along with any applicable section 7
225
+ additional terms, to the whole of the work, and all its parts,
226
+ regardless of how they are packaged. This License gives no
227
+ permission to license the work in any other way, but it does not
228
+ invalidate such permission if you have separately received it.
229
+
230
+ d) If the work has interactive user interfaces, each must display
231
+ Appropriate Legal Notices; however, if the Program has interactive
232
+ interfaces that do not display Appropriate Legal Notices, your
233
+ work need not make them do so.
234
+
235
+ A compilation of a covered work with other separate and independent
236
+ works, which are not by their nature extensions of the covered work,
237
+ and which are not combined with it such as to form a larger program,
238
+ in or on a volume of a storage or distribution medium, is called an
239
+ "aggregate" if the compilation and its resulting copyright are not
240
+ used to limit the access or legal rights of the compilation's users
241
+ beyond what the individual works permit. Inclusion of a covered work
242
+ in an aggregate does not cause this License to apply to the other
243
+ parts of the aggregate.
244
+
245
+ 6. Conveying Non-Source Forms.
246
+
247
+ You may convey a covered work in object code form under the terms
248
+ of sections 4 and 5, provided that you also convey the
249
+ machine-readable Corresponding Source under the terms of this License,
250
+ in one of these ways:
251
+
252
+ a) Convey the object code in, or embodied in, a physical product
253
+ (including a physical distribution medium), accompanied by the
254
+ Corresponding Source fixed on a durable physical medium
255
+ customarily used for software interchange.
256
+
257
+ b) Convey the object code in, or embodied in, a physical product
258
+ (including a physical distribution medium), accompanied by a
259
+ written offer, valid for at least three years and valid for as
260
+ long as you offer spare parts or customer support for that product
261
+ model, to give anyone who possesses the object code either (1) a
262
+ copy of the Corresponding Source for all the software in the
263
+ product that is covered by this License, on a durable physical
264
+ medium customarily used for software interchange, for a price no
265
+ more than your reasonable cost of physically performing this
266
+ conveying of source, or (2) access to copy the
267
+ Corresponding Source from a network server at no charge.
268
+
269
+ c) Convey individual copies of the object code with a copy of the
270
+ written offer to provide the Corresponding Source. This
271
+ alternative is allowed only occasionally and noncommercially, and
272
+ only if you received the object code with such an offer, in accord
273
+ with subsection 6b.
274
+
275
+ d) Convey the object code by offering access from a designated
276
+ place (gratis or for a charge), and offer equivalent access to the
277
+ Corresponding Source in the same way through the same place at no
278
+ further charge. You need not require recipients to copy the
279
+ Corresponding Source along with the object code. If the place to
280
+ copy the object code is a network server, the Corresponding Source
281
+ may be on a different server (operated by you or a third party)
282
+ that supports equivalent copying facilities, provided you maintain
283
+ clear directions next to the object code saying where to find the
284
+ Corresponding Source. Regardless of what server hosts the
285
+ Corresponding Source, you remain obligated to ensure that it is
286
+ available for as long as needed to satisfy these requirements.
287
+
288
+ e) Convey the object code using peer-to-peer transmission, provided
289
+ you inform other peers where the object code and Corresponding
290
+ Source of the work are being offered to the general public at no
291
+ charge under subsection 6d.
292
+
293
+ A separable portion of the object code, whose source code is excluded
294
+ from the Corresponding Source as a System Library, need not be
295
+ included in conveying the object code work.
296
+
297
+ A "User Product" is either (1) a "consumer product", which means any
298
+ tangible personal property which is normally used for personal, family,
299
+ or household purposes, or (2) anything designed or sold for incorporation
300
+ into a dwelling. In determining whether a product is a consumer product,
301
+ doubtful cases shall be resolved in favor of coverage. For a particular
302
+ product received by a particular user, "normally used" refers to a
303
+ typical or common use of that class of product, regardless of the status
304
+ of the particular user or of the way in which the particular user
305
+ actually uses, or expects or is expected to use, the product. A product
306
+ is a consumer product regardless of whether the product has substantial
307
+ commercial, industrial or non-consumer uses, unless such uses represent
308
+ the only significant mode of use of the product.
309
+
310
+ "Installation Information" for a User Product means any methods,
311
+ procedures, authorization keys, or other information required to install
312
+ and execute modified versions of a covered work in that User Product from
313
+ a modified version of its Corresponding Source. The information must
314
+ suffice to ensure that the continued functioning of the modified object
315
+ code is in no case prevented or interfered with solely because
316
+ modification has been made.
317
+
318
+ If you convey an object code work under this section in, or with, or
319
+ specifically for use in, a User Product, and the conveying occurs as
320
+ part of a transaction in which the right of possession and use of the
321
+ User Product is transferred to the recipient in perpetuity or for a
322
+ fixed term (regardless of how the transaction is characterized), the
323
+ Corresponding Source conveyed under this section must be accompanied
324
+ by the Installation Information. But this requirement does not apply
325
+ if neither you nor any third party retains the ability to install
326
+ modified object code on the User Product (for example, the work has
327
+ been installed in ROM).
328
+
329
+ The requirement to provide Installation Information does not include a
330
+ requirement to continue to provide support service, warranty, or updates
331
+ for a work that has been modified or installed by the recipient, or for
332
+ the User Product in which it has been modified or installed. Access to a
333
+ network may be denied when the modification itself materially and
334
+ adversely affects the operation of the network or violates the rules and
335
+ protocols for communication across the network.
336
+
337
+ Corresponding Source conveyed, and Installation Information provided,
338
+ in accord with this section must be in a format that is publicly
339
+ documented (and with an implementation available to the public in
340
+ source code form), and must require no special password or key for
341
+ unpacking, reading or copying.
342
+
343
+ 7. Additional Terms.
344
+
345
+ "Additional permissions" are terms that supplement the terms of this
346
+ License by making exceptions from one or more of its conditions.
347
+ Additional permissions that are applicable to the entire Program shall
348
+ be treated as though they were included in this License, to the extent
349
+ that they are valid under applicable law. If additional permissions
350
+ apply only to part of the Program, that part may be used separately
351
+ under those permissions, but the entire Program remains governed by
352
+ this License without regard to the additional permissions.
353
+
354
+ When you convey a copy of a covered work, you may at your option
355
+ remove any additional permissions from that copy, or from any part of
356
+ it. (Additional permissions may be written to require their own
357
+ removal in certain cases when you modify the work.) You may place
358
+ additional permissions on material, added by you to a covered work,
359
+ for which you have or can give appropriate copyright permission.
360
+
361
+ Notwithstanding any other provision of this License, for material you
362
+ add to a covered work, you may (if authorized by the copyright holders of
363
+ that material) supplement the terms of this License with terms:
364
+
365
+ a) Disclaiming warranty or limiting liability differently from the
366
+ terms of sections 15 and 16 of this License; or
367
+
368
+ b) Requiring preservation of specified reasonable legal notices or
369
+ author attributions in that material or in the Appropriate Legal
370
+ Notices displayed by works containing it; or
371
+
372
+ c) Prohibiting misrepresentation of the origin of that material, or
373
+ requiring that modified versions of such material be marked in
374
+ reasonable ways as different from the original version; or
375
+
376
+ d) Limiting the use for publicity purposes of names of licensors or
377
+ authors of the material; or
378
+
379
+ e) Declining to grant rights under trademark law for use of some
380
+ trade names, trademarks, or service marks; or
381
+
382
+ f) Requiring indemnification of licensors and authors of that
383
+ material by anyone who conveys the material (or modified versions of
384
+ it) with contractual assumptions of liability to the recipient, for
385
+ any liability that these contractual assumptions directly impose on
386
+ those licensors and authors.
387
+
388
+ All other non-permissive additional terms are considered "further
389
+ restrictions" within the meaning of section 10. If the Program as you
390
+ received it, or any part of it, contains a notice stating that it is
391
+ governed by this License along with a term that is a further
392
+ restriction, you may remove that term. If a license document contains
393
+ a further restriction but permits relicensing or conveying under this
394
+ License, you may add to a covered work material governed by the terms
395
+ of that license document, provided that the further restriction does
396
+ not survive such relicensing or conveying.
397
+
398
+ If you add terms to a covered work in accord with this section, you
399
+ must place, in the relevant source files, a statement of the
400
+ additional terms that apply to those files, or a notice indicating
401
+ where to find the applicable terms.
402
+
403
+ Additional terms, permissive or non-permissive, may be stated in the
404
+ form of a separately written license, or stated as exceptions;
405
+ the above requirements apply either way.
406
+
407
+ 8. Termination.
408
+
409
+ You may not propagate or modify a covered work except as expressly
410
+ provided under this License. Any attempt otherwise to propagate or
411
+ modify it is void, and will automatically terminate your rights under
412
+ this License (including any patent licenses granted under the third
413
+ paragraph of section 11).
414
+
415
+ However, if you cease all violation of this License, then your
416
+ license from a particular copyright holder is reinstated (a)
417
+ provisionally, unless and until the copyright holder explicitly and
418
+ finally terminates your license, and (b) permanently, if the copyright
419
+ holder fails to notify you of the violation by some reasonable means
420
+ prior to 60 days after the cessation.
421
+
422
+ Moreover, your license from a particular copyright holder is
423
+ reinstated permanently if the copyright holder notifies you of the
424
+ violation by some reasonable means, this is the first time you have
425
+ received notice of violation of this License (for any work) from that
426
+ copyright holder, and you cure the violation prior to 30 days after
427
+ your receipt of the notice.
428
+
429
+ Termination of your rights under this section does not terminate the
430
+ licenses of parties who have received copies or rights from you under
431
+ this License. If your rights have been terminated and not permanently
432
+ reinstated, you do not qualify to receive new licenses for the same
433
+ material under section 10.
434
+
435
+ 9. Acceptance Not Required for Having Copies.
436
+
437
+ You are not required to accept this License in order to receive or
438
+ run a copy of the Program. Ancillary propagation of a covered work
439
+ occurring solely as a consequence of using peer-to-peer transmission
440
+ to receive a copy likewise does not require acceptance. However,
441
+ nothing other than this License grants you permission to propagate or
442
+ modify any covered work. These actions infringe copyright if you do
443
+ not accept this License. Therefore, by modifying or propagating a
444
+ covered work, you indicate your acceptance of this License to do so.
445
+
446
+ 10. Automatic Licensing of Downstream Recipients.
447
+
448
+ Each time you convey a covered work, the recipient automatically
449
+ receives a license from the original licensors, to run, modify and
450
+ propagate that work, subject to this License. You are not responsible
451
+ for enforcing compliance by third parties with this License.
452
+
453
+ An "entity transaction" is a transaction transferring control of an
454
+ organization, or substantially all assets of one, or subdividing an
455
+ organization, or merging organizations. If propagation of a covered
456
+ work results from an entity transaction, each party to that
457
+ transaction who receives a copy of the work also receives whatever
458
+ licenses to the work the party's predecessor in interest had or could
459
+ give under the previous paragraph, plus a right to possession of the
460
+ Corresponding Source of the work from the predecessor in interest, if
461
+ the predecessor has it or can get it with reasonable efforts.
462
+
463
+ You may not impose any further restrictions on the exercise of the
464
+ rights granted or affirmed under this License. For example, you may
465
+ not impose a license fee, royalty, or other charge for exercise of
466
+ rights granted under this License, and you may not initiate litigation
467
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
468
+ any patent claim is infringed by making, using, selling, offering for
469
+ sale, or importing the Program or any portion of it.
470
+
471
+ 11. Patents.
472
+
473
+ A "contributor" is a copyright holder who authorizes use under this
474
+ License of the Program or a work on which the Program is based. The
475
+ work thus licensed is called the contributor's "contributor version".
476
+
477
+ A contributor's "essential patent claims" are all patent claims
478
+ owned or controlled by the contributor, whether already acquired or
479
+ hereafter acquired, that would be infringed by some manner, permitted
480
+ by this License, of making, using, or selling its contributor version,
481
+ but do not include claims that would be infringed only as a
482
+ consequence of further modification of the contributor version. For
483
+ purposes of this definition, "control" includes the right to grant
484
+ patent sublicenses in a manner consistent with the requirements of
485
+ this License.
486
+
487
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
488
+ patent license under the contributor's essential patent claims, to
489
+ make, use, sell, offer for sale, import and otherwise run, modify and
490
+ propagate the contents of its contributor version.
491
+
492
+ In the following three paragraphs, a "patent license" is any express
493
+ agreement or commitment, however denominated, not to enforce a patent
494
+ (such as an express permission to practice a patent or covenant not to
495
+ sue for patent infringement). To "grant" such a patent license to a
496
+ party means to make such an agreement or commitment not to enforce a
497
+ patent against the party.
498
+
499
+ If you convey a covered work, knowingly relying on a patent license,
500
+ and the Corresponding Source of the work is not available for anyone
501
+ to copy, free of charge and under the terms of this License, through a
502
+ publicly available network server or other readily accessible means,
503
+ then you must either (1) cause the Corresponding Source to be so
504
+ available, or (2) arrange to deprive yourself of the benefit of the
505
+ patent license for this particular work, or (3) arrange, in a manner
506
+ consistent with the requirements of this License, to extend the patent
507
+ license to downstream recipients. "Knowingly relying" means you have
508
+ actual knowledge that, but for the patent license, your conveying the
509
+ covered work in a country, or your recipient's use of the covered work
510
+ in a country, would infringe one or more identifiable patents in that
511
+ country that you have reason to believe are valid.
512
+
513
+ If, pursuant to or in connection with a single transaction or
514
+ arrangement, you convey, or propagate by procuring conveyance of, a
515
+ covered work, and grant a patent license to some of the parties
516
+ receiving the covered work authorizing them to use, propagate, modify
517
+ or convey a specific copy of the covered work, then the patent license
518
+ you grant is automatically extended to all recipients of the covered
519
+ work and works based on it.
520
+
521
+ A patent license is "discriminatory" if it does not include within
522
+ the scope of its coverage, prohibits the exercise of, or is
523
+ conditioned on the non-exercise of one or more of the rights that are
524
+ specifically granted under this License. You may not convey a covered
525
+ work if you are a party to an arrangement with a third party that is
526
+ in the business of distributing software, under which you make payment
527
+ to the third party based on the extent of your activity of conveying
528
+ the work, and under which the third party grants, to any of the
529
+ parties who would receive the covered work from you, a discriminatory
530
+ patent license (a) in connection with copies of the covered work
531
+ conveyed by you (or copies made from those copies), or (b) primarily
532
+ for and in connection with specific products or compilations that
533
+ contain the covered work, unless you entered into that arrangement,
534
+ or that patent license was granted, prior to 28 March 2007.
535
+
536
+ Nothing in this License shall be construed as excluding or limiting
537
+ any implied license or other defenses to infringement that may
538
+ otherwise be available to you under applicable patent law.
539
+
540
+ 12. No Surrender of Others' Freedom.
541
+
542
+ If conditions are imposed on you (whether by court order, agreement or
543
+ otherwise) that contradict the conditions of this License, they do not
544
+ excuse you from the conditions of this License. If you cannot convey a
545
+ covered work so as to satisfy simultaneously your obligations under this
546
+ License and any other pertinent obligations, then as a consequence you may
547
+ not convey it at all. For example, if you agree to terms that obligate you
548
+ to collect a royalty for further conveying from those to whom you convey
549
+ the Program, the only way you could satisfy both those terms and this
550
+ License would be to refrain entirely from conveying the Program.
551
+
552
+ 13. Use with the GNU Affero General Public License.
553
+
554
+ Notwithstanding any other provision of this License, you have
555
+ permission to link or combine any covered work with a work licensed
556
+ under version 3 of the GNU Affero General Public License into a single
557
+ combined work, and to convey the resulting work. The terms of this
558
+ License will continue to apply to the part which is the covered work,
559
+ but the special requirements of the GNU Affero General Public License,
560
+ section 13, concerning interaction through a network will apply to the
561
+ combination as such.
562
+
563
+ 14. Revised Versions of this License.
564
+
565
+ The Free Software Foundation may publish revised and/or new versions of
566
+ the GNU General Public License from time to time. Such new versions will
567
+ be similar in spirit to the present version, but may differ in detail to
568
+ address new problems or concerns.
569
+
570
+ Each version is given a distinguishing version number. If the
571
+ Program specifies that a certain numbered version of the GNU General
572
+ Public License "or any later version" applies to it, you have the
573
+ option of following the terms and conditions either of that numbered
574
+ version or of any later version published by the Free Software
575
+ Foundation. If the Program does not specify a version number of the
576
+ GNU General Public License, you may choose any version ever published
577
+ by the Free Software Foundation.
578
+
579
+ If the Program specifies that a proxy can decide which future
580
+ versions of the GNU General Public License can be used, that proxy's
581
+ public statement of acceptance of a version permanently authorizes you
582
+ to choose that version for the Program.
583
+
584
+ Later license versions may give you additional or different
585
+ permissions. However, no additional obligations are imposed on any
586
+ author or copyright holder as a result of your choosing to follow a
587
+ later version.
588
+
589
+ 15. Disclaimer of Warranty.
590
+
591
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
+
600
+ 16. Limitation of Liability.
601
+
602
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610
+ SUCH DAMAGES.
611
+
612
+ 17. Interpretation of Sections 15 and 16.
613
+
614
+ If the disclaimer of warranty and limitation of liability provided
615
+ above cannot be given local legal effect according to their terms,
616
+ reviewing courts shall apply local law that most closely approximates
617
+ an absolute waiver of all civil liability in connection with the
618
+ Program, unless a warranty or assumption of liability accompanies a
619
+ copy of the Program in return for a fee.
620
+
621
+ END OF TERMS AND CONDITIONS
622
+
623
+ How to Apply These Terms to Your New Programs
624
+
625
+ If you develop a new program, and you want it to be of the greatest
626
+ possible use to the public, the best way to achieve this is to make it
627
+ free software which everyone can redistribute and change under these terms.
628
+
629
+ To do so, attach the following notices to the program. It is safest
630
+ to attach them to the start of each source file to most effectively
631
+ state the exclusion of warranty; and each file should have at least
632
+ the "copyright" line and a pointer to where the full notice is found.
633
+
634
+ {one line to give the program's name and a brief idea of what it does.}
635
+ Copyright (C) {year} {name of author}
636
+
637
+ This program is free software: you can redistribute it and/or modify
638
+ it under the terms of the GNU General Public License as published by
639
+ the Free Software Foundation, either version 3 of the License, or
640
+ (at your option) any later version.
641
+
642
+ This program is distributed in the hope that it will be useful,
643
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
644
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645
+ GNU General Public License for more details.
646
+
647
+ You should have received a copy of the GNU General Public License
648
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
649
+
650
+ Also add information on how to contact you by electronic and paper mail.
651
+
652
+ If the program does terminal interaction, make it output a short
653
+ notice like this when it starts in an interactive mode:
654
+
655
+ {project} Copyright (C) {year} {fullname}
656
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657
+ This is free software, and you are welcome to redistribute it
658
+ under certain conditions; type `show c' for details.
659
+
660
+ The hypothetical commands `show w' and `show c' should show the appropriate
661
+ parts of the General Public License. Of course, your program's commands
662
+ might be different; for a GUI interface, you would use an "about box".
663
+
664
+ You should also get your employer (if you work as a programmer) or school,
665
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
666
+ For more information on this, and how to apply and follow the GNU GPL, see
667
+ <http://www.gnu.org/licenses/>.
668
+
669
+ The GNU General Public License does not permit incorporating your program
670
+ into proprietary programs. If your program is a subroutine library, you
671
+ may consider it more useful to permit linking proprietary applications with
672
+ the library. If this is what you want to do, use the GNU Lesser General
673
+ Public License instead of this License. But first, please read
674
  <http://www.gnu.org/philosophy/why-not-lgpl.html>.
freemius/assets/css/admin/account.css CHANGED
@@ -1 +1 @@
1
- label.fs-tag,span.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn,span.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-info,span.fs-tag.fs-info{background:#00a0d2}label.fs-tag.fs-success,span.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error,span.fs-tag.fs-error{background:#dc3232}.fs-notice[data-id="license_not_whitelabeled"].success,.fs-notice[data-id="license_whitelabeled"].success{color:inherit;border-left-color:#00a0d2}.fs-notice[data-id="license_not_whitelabeled"].success label.fs-plugin-title,.fs-notice[data-id="license_whitelabeled"].success label.fs-plugin-title{display:none}#fs_account .postbox,#fs_account .widefat{max-width:800px}#fs_account h3{font-size:1.3em;padding:12px 15px;margin:0 0 12px 0;line-height:1.4;border-bottom:1px solid #F1F1F1}#fs_account h3 .dashicons{width:26px;height:26px;font-size:1.3em}#fs_account i.dashicons{font-size:1.2em;height:1.2em;width:1.2em}#fs_account .dashicons{vertical-align:middle}#fs_account .fs-header-actions{position:absolute;top:17px;right:15px;font-size:0.9em}#fs_account .fs-header-actions ul{margin:0}#fs_account .fs-header-actions li{float:left}#fs_account .fs-header-actions li form{display:inline-block}#fs_account .fs-header-actions li a{text-decoration:none}#fs_account_details .button-group{float:right}.rtl #fs_account .fs-header-actions{left:15px;right:auto}.fs-key-value-table{width:100%}.fs-key-value-table form{display:inline-block}.fs-key-value-table tr td:first-child{text-align:right}.fs-key-value-table tr td:first-child nobr{font-weight:bold}.fs-key-value-table tr td:first-child form{display:block}.fs-key-value-table tr td.fs-right{text-align:right}.fs-key-value-table tr.fs-odd{background:#ebebeb}.fs-key-value-table td,.fs-key-value-table th{padding:10px}.fs-key-value-table code{line-height:28px}.fs-key-value-table var,.fs-key-value-table code,.fs-key-value-table input[type="text"]{color:#0073AA;font-size:16px;background:none}.fs-key-value-table input[type="text"]{width:100%;font-weight:bold}.fs-field-beta_program label{margin-left:7px}label.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error{background:#dc3232}#fs_sites .fs-scrollable-table .fs-table-body{max-height:200px;overflow:auto;border:1px solid #e5e5e5}#fs_sites .fs-scrollable-table .fs-table-body>table.widefat{border:none !important}#fs_sites .fs-scrollable-table .fs-main-column{width:100%}#fs_sites .fs-scrollable-table .fs-site-details td:first-of-type{text-align:right;color:grey;width:1px}#fs_sites .fs-scrollable-table .fs-site-details td:last-of-type{text-align:right}#fs_sites .fs-scrollable-table .fs-install-details table tr td{width:1px;white-space:nowrap}#fs_sites .fs-scrollable-table .fs-install-details table tr td:last-of-type{width:auto}#fs_addons h3{border:none;margin-bottom:0;padding:4px 5px}#fs_addons td{vertical-align:middle}#fs_addons thead{white-space:nowrap}#fs_addons td:first-child,#fs_addons th:first-child{text-align:left;font-weight:bold}#fs_addons td:last-child,#fs_addons th:last-child{text-align:right}#fs_addons th{font-weight:bold}#fs_billing_address{width:100%}#fs_billing_address tr td{width:50%;padding:5px}#fs_billing_address tr:first-of-type td{padding-top:0}#fs_billing_address span{font-weight:bold}#fs_billing_address input,#fs_billing_address select{display:block;width:100%;margin-top:5px}#fs_billing_address input::-moz-placeholder,#fs_billing_address select::-moz-placeholder{color:transparent;opacity:1}#fs_billing_address input:-ms-input-placeholder,#fs_billing_address select:-ms-input-placeholder{color:transparent}#fs_billing_address input::-webkit-input-placeholder,#fs_billing_address select::-webkit-input-placeholder{color:transparent}#fs_billing_address input.fs-read-mode,#fs_billing_address select.fs-read-mode{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode td span{display:none}#fs_billing_address.fs-read-mode input,#fs_billing_address.fs-read-mode select{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode input::-moz-placeholder,#fs_billing_address.fs-read-mode select::-moz-placeholder{color:#ccc;opacity:1}#fs_billing_address.fs-read-mode input:-ms-input-placeholder,#fs_billing_address.fs-read-mode select:-ms-input-placeholder{color:#ccc}#fs_billing_address.fs-read-mode input::-webkit-input-placeholder,#fs_billing_address.fs-read-mode select::-webkit-input-placeholder{color:#ccc}#fs_billing_address button{display:block;width:100%}
1
+ label.fs-tag,span.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn,span.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-info,span.fs-tag.fs-info{background:#00a0d2}label.fs-tag.fs-success,span.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error,span.fs-tag.fs-error{background:#dc3232}.fs-notice[data-id="license_not_whitelabeled"].success,.fs-notice[data-id="license_whitelabeled"].success{color:inherit;border-left-color:#00a0d2}.fs-notice[data-id="license_not_whitelabeled"].success label.fs-plugin-title,.fs-notice[data-id="license_whitelabeled"].success label.fs-plugin-title{display:none}#fs_account .postbox,#fs_account .widefat{max-width:800px}#fs_account h3{font-size:1.3em;padding:12px 15px;margin:0 0 12px 0;line-height:1.4;border-bottom:1px solid #F1F1F1}#fs_account h3 .dashicons{width:26px;height:26px;font-size:1.3em}#fs_account i.dashicons{font-size:1.2em;height:1.2em;width:1.2em}#fs_account .dashicons{vertical-align:middle}#fs_account .fs-header-actions{position:absolute;top:17px;right:15px;font-size:0.9em}#fs_account .fs-header-actions ul{margin:0}#fs_account .fs-header-actions li{float:left}#fs_account .fs-header-actions li form{display:inline-block}#fs_account .fs-header-actions li a{text-decoration:none}#fs_account_details .button-group{float:right}.rtl #fs_account .fs-header-actions{left:15px;right:auto}.fs-key-value-table{width:100%}.fs-key-value-table form{display:inline-block}.fs-key-value-table tr td:first-child{text-align:right}.fs-key-value-table tr td:first-child nobr{font-weight:bold}.fs-key-value-table tr td:first-child form{display:block}.fs-key-value-table tr td.fs-right{text-align:right}.fs-key-value-table tr.fs-odd{background:#ebebeb}.fs-key-value-table td,.fs-key-value-table th{padding:10px}.fs-key-value-table code{line-height:28px}.fs-key-value-table var,.fs-key-value-table code,.fs-key-value-table input[type="text"]{color:#0073AA;font-size:16px;background:none}.fs-key-value-table input[type="text"]{width:100%;font-weight:bold}.fs-field-beta_program label{margin-left:7px}label.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error{background:#dc3232}#fs_sites .fs-scrollable-table .fs-table-body{max-height:200px;overflow:auto;border:1px solid #e5e5e5}#fs_sites .fs-scrollable-table .fs-table-body>table.widefat{border:none !important}#fs_sites .fs-scrollable-table .fs-main-column{width:100%}#fs_sites .fs-scrollable-table .fs-site-details td:first-of-type{text-align:right;color:grey;width:1px}#fs_sites .fs-scrollable-table .fs-site-details td:last-of-type{text-align:right}#fs_sites .fs-scrollable-table .fs-install-details table tr td{width:1px;white-space:nowrap}#fs_sites .fs-scrollable-table .fs-install-details table tr td:last-of-type{width:auto}#fs_addons h3{border:none;margin-bottom:0;padding:4px 5px}#fs_addons td{vertical-align:middle}#fs_addons thead{white-space:nowrap}#fs_addons td:first-child,#fs_addons th:first-child{text-align:left;font-weight:bold}#fs_addons td:last-child,#fs_addons th:last-child{text-align:right}#fs_addons th{font-weight:bold}#fs_billing_address{width:100%}#fs_billing_address tr td{width:50%;padding:5px}#fs_billing_address tr:first-of-type td{padding-top:0}#fs_billing_address span{font-weight:bold}#fs_billing_address input,#fs_billing_address select{display:block;width:100%;margin-top:5px}#fs_billing_address input::-moz-placeholder,#fs_billing_address select::-moz-placeholder{color:transparent;opacity:1}#fs_billing_address input:-ms-input-placeholder,#fs_billing_address select:-ms-input-placeholder{color:transparent}#fs_billing_address input::-webkit-input-placeholder,#fs_billing_address select::-webkit-input-placeholder{color:transparent}#fs_billing_address input.fs-read-mode,#fs_billing_address select.fs-read-mode{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode td span{display:none}#fs_billing_address.fs-read-mode input,#fs_billing_address.fs-read-mode select{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode input::-moz-placeholder,#fs_billing_address.fs-read-mode select::-moz-placeholder{color:#ccc;opacity:1}#fs_billing_address.fs-read-mode input:-ms-input-placeholder,#fs_billing_address.fs-read-mode select:-ms-input-placeholder{color:#ccc}#fs_billing_address.fs-read-mode input::-webkit-input-placeholder,#fs_billing_address.fs-read-mode select::-webkit-input-placeholder{color:#ccc}#fs_billing_address button{display:block;width:100%}
freemius/assets/css/admin/add-ons.css CHANGED
@@ -1,2 +1,2 @@
1
- .fs-badge{position:absolute;top:10px;right:0;background:#71ae00;color:white;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);box-shadow:0 2px 1px -1px rgba(0,0,0,0.3)}#fs_addons .fs-cards-list{list-style:none}#fs_addons .fs-cards-list .fs-card{float:left;height:152px;width:310px;padding:0;margin:0 0 30px 30px;font-size:14px;list-style:none;border:1px solid #ddd;cursor:pointer;position:relative}#fs_addons .fs-cards-list .fs-card .fs-overlay{position:absolute;left:0;right:0;bottom:0;top:0;z-index:9}#fs_addons .fs-cards-list .fs-card .fs-inner{background-color:#fff;overflow:hidden;height:100%;position:relative}#fs_addons .fs-cards-list .fs-card .fs-inner>ul{-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s;left:0;right:0;top:0;position:absolute}#fs_addons .fs-cards-list .fs-card .fs-inner>ul>li{list-style:none;line-height:18px;padding:0 15px;width:100%;display:block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-card-banner{padding:0;margin:0;line-height:0;display:block;height:100px;background-repeat:repeat-x;background-size:100% 100%;-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-card-banner .fs-badge.fs-installed-addon-badge{font-size:1.02em;line-height:1.3em}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-title{margin:10px 0 0 0;height:18px;overflow:hidden;color:#000;white-space:nowrap;text-overflow:ellipsis;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-offer{font-size:0.9em}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-description{background-color:#f9f9f9;padding:10px 15px 100px 15px;border-top:1px solid #eee;margin:0 0 10px 0;color:#777}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-tag{position:absolute;top:10px;right:0px;background:greenyellow;display:block;padding:2px 10px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.3);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.3);box-shadow:1px 1px 1px rgba(0,0,0,0.3);text-transform:uppercase;font-size:0.9em;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-cta .button,#fs_addons .fs-cards-list .fs-card .fs-inner .fs-cta .button-group{position:absolute;top:112px;right:10px}@media screen and (min-width: 960px){#fs_addons .fs-cards-list .fs-card:hover .fs-overlay{border:2px solid #29abe1;margin-left:-1px;margin-top:-1px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner ul{top:-100px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-title,#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-offer{color:#29abe1}}
2
- #TB_window,#TB_window iframe{width:821px !important}#plugin-information .fyi{width:266px !important}#plugin-information #section-holder{margin-right:299px}#plugin-information #section-description h2,#plugin-information #section-description h3,#plugin-information #section-description p,#plugin-information #section-description b,#plugin-information #section-description i,#plugin-information #section-description blockquote,#plugin-information #section-description li,#plugin-information #section-description ul,#plugin-information #section-description ol{clear:none}#plugin-information #section-description iframe{max-width:100%}#plugin-information #section-description .fs-selling-points{padding-bottom:10px;border-bottom:1px solid #ddd}#plugin-information #section-description .fs-selling-points ul{margin:0}#plugin-information #section-description .fs-selling-points ul li{padding:0;list-style:none outside none}#plugin-information #section-description .fs-selling-points ul li i.dashicons{color:#71ae00;font-size:3em;vertical-align:middle;line-height:30px;float:left;margin:0 0 0 -15px}#plugin-information #section-description .fs-selling-points ul li h3{margin:1em 30px !important}#plugin-information #section-description .fs-screenshots:after{content:"";display:table;clear:both}#plugin-information #section-description .fs-screenshots ul{list-style:none;margin:0}#plugin-information #section-description .fs-screenshots ul li{width:225px;height:225px;float:left;margin-bottom:20px;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}#plugin-information #section-description .fs-screenshots ul li a{display:block;width:100%;height:100%;border:1px solid;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);background-size:cover}#plugin-information #section-description .fs-screenshots ul li.odd{margin-right:20px}#plugin-information .plugin-information-pricing{margin:-16px;border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan h3{margin-top:0;padding:20px;font-size:16px}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper{border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab{cursor:pointer;position:relative;padding:0 10px;font-size:0.9em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab label{text-transform:uppercase;color:green;background:greenyellow;position:absolute;left:-1px;right:-1px;bottom:100%;border:1px solid darkgreen;padding:2px;text-align:center;font-size:0.9em;line-height:1em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab.nav-tab-active{cursor:default;background:#fffeec;border-bottom-color:#fffeec}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle h3{background:#fffeec;margin:0;padding-bottom:0;color:#0073aa}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .nav-tab-wrapper,#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .fs-billing-frequency{display:none}#plugin-information .plugin-information-pricing .fs-plan .fs-pricing-body{background:#fffeec;padding:20px}#plugin-information .plugin-information-pricing .fs-plan .button{width:100%;text-align:center;font-weight:bold;text-transform:uppercase;font-size:1.1em}#plugin-information .plugin-information-pricing .fs-plan label{white-space:nowrap}#plugin-information .plugin-information-pricing .fs-plan var{font-style:normal}#plugin-information .plugin-information-pricing .fs-plan .fs-billing-frequency,#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-align:center;display:block;font-weight:bold;margin-bottom:10px;text-transform:uppercase;background:#F3F3F3;padding:2px;border:1px solid #ccc}#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-transform:none;color:green;background:greenyellow}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms{font-size:0.9em}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms i{float:left;margin:0 0 0 -15px}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms li{margin:10px 0 0 0}#plugin-information #section-features .fs-features{margin:-20px -26px}#plugin-information #section-features table{width:100%;border-spacing:0;border-collapse:separate}#plugin-information #section-features table thead th{padding:10px 0}#plugin-information #section-features table thead .fs-price{color:#71ae00;font-weight:normal;display:block;text-align:center}#plugin-information #section-features table tbody td{border-top:1px solid #ccc;padding:10px 0;text-align:center;width:100px;color:#71ae00}#plugin-information #section-features table tbody td:first-child{text-align:left;width:auto;color:inherit;padding-left:26px}#plugin-information #section-features table tbody tr.fs-odd td{background:#fefefe}#plugin-information #section-features .dashicons-yes{width:30px;height:30px;font-size:30px}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .button,#plugin-information .fs-dropdown .button-group .button{position:relative;width:auto;top:0;right:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .button:focus,#plugin-information .fs-dropdown .button-group .button:focus{z-index:10}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .fs-dropdown-arrow,#plugin-information .fs-dropdown .button-group .fs-dropdown-arrow{border-top:6px solid white;border-right:4px solid transparent;border-left:4px solid transparent;top:12px;position:relative}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active:not(.up) .button:not(.fs-dropdown-arrow-button),#plugin-information .fs-dropdown.active:not(.up) .button:not(.fs-dropdown-arrow-button){border-bottom-left-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active:not(.up) .fs-dropdown-arrow-button,#plugin-information .fs-dropdown.active:not(.up) .fs-dropdown-arrow-button{border-bottom-right-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active.up .button:not(.fs-dropdown-arrow-button),#plugin-information .fs-dropdown.active.up .button:not(.fs-dropdown-arrow-button){border-top-left-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active.up .fs-dropdown-arrow-button,#plugin-information .fs-dropdown.active.up .fs-dropdown-arrow-button{border-top-right-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list,#plugin-information .fs-dropdown .fs-dropdown-list{position:absolute;right:-1px;top:100%;margin-left:auto;padding:3px 0;border:1px solid #bfbfbf;background-color:#fff;z-index:1;width:230px;text-align:left;-moz-box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12);-webkit-box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12);box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li,#plugin-information .fs-dropdown .fs-dropdown-list li{margin:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li a,#plugin-information .fs-dropdown .fs-dropdown-list li a{display:block;padding:5px 10px;text-decoration:none;text-shadow:none}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li:hover,#plugin-information .fs-dropdown .fs-dropdown-list li:hover{background-color:#0074a3;color:#fff}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li:hover a,#plugin-information .fs-dropdown .fs-dropdown-list li:hover a{color:#fff}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown:not(.up) .fs-dropdown-list,#plugin-information .fs-dropdown:not(.up) .fs-dropdown-list{-moz-border-radius:3px 0 3px 3px;-webkit-border-radius:3px 0 3px 3px;border-radius:3px 0 3px 3px}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.up .fs-dropdown-list,#plugin-information .fs-dropdown.up .fs-dropdown-list{-moz-border-radius:3px 3px 0 3px;-webkit-border-radius:3px 3px 0 3px;border-radius:3px 3px 0 3px}#plugin-information .fs-dropdown .button-group{width:100%}#plugin-information .fs-dropdown .button-group .button{float:none;font-size:14px;font-weight:normal;text-transform:none}#plugin-information .fs-dropdown .fs-dropdown-list{margin-top:1px}#plugin-information .fs-dropdown.up .fs-dropdown-list{top:auto;bottom:100%;margin-bottom:2px}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group{text-align:center;display:table}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group .button{display:table-cell}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group .button:not(.fs-dropdown-arrow-button){left:1px;width:100%}#plugin-information-footer>.button,#plugin-information-footer .fs-dropdown{position:relative;top:3px}#plugin-information-footer>.button.left,#plugin-information-footer .fs-dropdown.left{float:left}#plugin-information-footer>.right,#plugin-information-footer .fs-dropdown{float:right}@media screen and (max-width: 961px){#fs_addons .fs-cards-list .fs-card{height:265px}}
1
+ .fs-badge{position:absolute;top:10px;right:0;background:#71ae00;color:white;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);box-shadow:0 2px 1px -1px rgba(0,0,0,0.3)}#fs_addons .fs-cards-list{list-style:none}#fs_addons .fs-cards-list .fs-card{float:left;height:152px;width:310px;padding:0;margin:0 0 30px 30px;font-size:14px;list-style:none;border:1px solid #ddd;cursor:pointer;position:relative}#fs_addons .fs-cards-list .fs-card .fs-overlay{position:absolute;left:0;right:0;bottom:0;top:0;z-index:9}#fs_addons .fs-cards-list .fs-card .fs-inner{background-color:#fff;overflow:hidden;height:100%;position:relative}#fs_addons .fs-cards-list .fs-card .fs-inner>ul{-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s;left:0;right:0;top:0;position:absolute}#fs_addons .fs-cards-list .fs-card .fs-inner>ul>li{list-style:none;line-height:18px;padding:0 15px;width:100%;display:block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-card-banner{padding:0;margin:0;line-height:0;display:block;height:100px;background-repeat:repeat-x;background-size:100% 100%;-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-card-banner .fs-badge.fs-installed-addon-badge{font-size:1.02em;line-height:1.3em}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-title{margin:10px 0 0 0;height:18px;overflow:hidden;color:#000;white-space:nowrap;text-overflow:ellipsis;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-offer{font-size:0.9em}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-description{background-color:#f9f9f9;padding:10px 15px 100px 15px;border-top:1px solid #eee;margin:0 0 10px 0;color:#777}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-tag{position:absolute;top:10px;right:0px;background:greenyellow;display:block;padding:2px 10px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.3);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.3);box-shadow:1px 1px 1px rgba(0,0,0,0.3);text-transform:uppercase;font-size:0.9em;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-cta .button,#fs_addons .fs-cards-list .fs-card .fs-inner .fs-cta .button-group{position:absolute;top:112px;right:10px}@media screen and (min-width: 960px){#fs_addons .fs-cards-list .fs-card:hover .fs-overlay{border:2px solid #29abe1;margin-left:-1px;margin-top:-1px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner ul{top:-100px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-title,#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-offer{color:#29abe1}}
2
+ #TB_window,#TB_window iframe{width:821px !important}#plugin-information .fyi{width:266px !important}#plugin-information #section-holder{margin-right:299px}#plugin-information #section-description h2,#plugin-information #section-description h3,#plugin-information #section-description p,#plugin-information #section-description b,#plugin-information #section-description i,#plugin-information #section-description blockquote,#plugin-information #section-description li,#plugin-information #section-description ul,#plugin-information #section-description ol{clear:none}#plugin-information #section-description iframe{max-width:100%}#plugin-information #section-description .fs-selling-points{padding-bottom:10px;border-bottom:1px solid #ddd}#plugin-information #section-description .fs-selling-points ul{margin:0}#plugin-information #section-description .fs-selling-points ul li{padding:0;list-style:none outside none}#plugin-information #section-description .fs-selling-points ul li i.dashicons{color:#71ae00;font-size:3em;vertical-align:middle;line-height:30px;float:left;margin:0 0 0 -15px}#plugin-information #section-description .fs-selling-points ul li h3{margin:1em 30px !important}#plugin-information #section-description .fs-screenshots:after{content:"";display:table;clear:both}#plugin-information #section-description .fs-screenshots ul{list-style:none;margin:0}#plugin-information #section-description .fs-screenshots ul li{width:225px;height:225px;float:left;margin-bottom:20px;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}#plugin-information #section-description .fs-screenshots ul li a{display:block;width:100%;height:100%;border:1px solid;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);background-size:cover}#plugin-information #section-description .fs-screenshots ul li.odd{margin-right:20px}#plugin-information .plugin-information-pricing{margin:-16px;border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan h3{margin-top:0;padding:20px;font-size:16px}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper{border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab{cursor:pointer;position:relative;padding:0 10px;font-size:0.9em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab label{text-transform:uppercase;color:green;background:greenyellow;position:absolute;left:-1px;right:-1px;bottom:100%;border:1px solid darkgreen;padding:2px;text-align:center;font-size:0.9em;line-height:1em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab.nav-tab-active{cursor:default;background:#fffeec;border-bottom-color:#fffeec}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle h3{background:#fffeec;margin:0;padding-bottom:0;color:#0073aa}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .nav-tab-wrapper,#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .fs-billing-frequency{display:none}#plugin-information .plugin-information-pricing .fs-plan .fs-pricing-body{background:#fffeec;padding:20px}#plugin-information .plugin-information-pricing .fs-plan .button{width:100%;text-align:center;font-weight:bold;text-transform:uppercase;font-size:1.1em}#plugin-information .plugin-information-pricing .fs-plan label{white-space:nowrap}#plugin-information .plugin-information-pricing .fs-plan var{font-style:normal}#plugin-information .plugin-information-pricing .fs-plan .fs-billing-frequency,#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-align:center;display:block;font-weight:bold;margin-bottom:10px;text-transform:uppercase;background:#F3F3F3;padding:2px;border:1px solid #ccc}#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-transform:none;color:green;background:greenyellow}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms{font-size:0.9em}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms i{float:left;margin:0 0 0 -15px}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms li{margin:10px 0 0 0}#plugin-information #section-features .fs-features{margin:-20px -26px}#plugin-information #section-features table{width:100%;border-spacing:0;border-collapse:separate}#plugin-information #section-features table thead th{padding:10px 0}#plugin-information #section-features table thead .fs-price{color:#71ae00;font-weight:normal;display:block;text-align:center}#plugin-information #section-features table tbody td{border-top:1px solid #ccc;padding:10px 0;text-align:center;width:100px;color:#71ae00}#plugin-information #section-features table tbody td:first-child{text-align:left;width:auto;color:inherit;padding-left:26px}#plugin-information #section-features table tbody tr.fs-odd td{background:#fefefe}#plugin-information #section-features .dashicons-yes{width:30px;height:30px;font-size:30px}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .button,#plugin-information .fs-dropdown .button-group .button{position:relative;width:auto;top:0;right:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .button:focus,#plugin-information .fs-dropdown .button-group .button:focus{z-index:10}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .fs-dropdown-arrow,#plugin-information .fs-dropdown .button-group .fs-dropdown-arrow{border-top:6px solid white;border-right:4px solid transparent;border-left:4px solid transparent;top:12px;position:relative}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active:not(.up) .button:not(.fs-dropdown-arrow-button),#plugin-information .fs-dropdown.active:not(.up) .button:not(.fs-dropdown-arrow-button){border-bottom-left-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active:not(.up) .fs-dropdown-arrow-button,#plugin-information .fs-dropdown.active:not(.up) .fs-dropdown-arrow-button{border-bottom-right-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active.up .button:not(.fs-dropdown-arrow-button),#plugin-information .fs-dropdown.active.up .button:not(.fs-dropdown-arrow-button){border-top-left-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active.up .fs-dropdown-arrow-button,#plugin-information .fs-dropdown.active.up .fs-dropdown-arrow-button{border-top-right-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list,#plugin-information .fs-dropdown .fs-dropdown-list{position:absolute;right:-1px;top:100%;margin-left:auto;padding:3px 0;border:1px solid #bfbfbf;background-color:#fff;z-index:1;width:230px;text-align:left;-moz-box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12);-webkit-box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12);box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li,#plugin-information .fs-dropdown .fs-dropdown-list li{margin:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li a,#plugin-information .fs-dropdown .fs-dropdown-list li a{display:block;padding:5px 10px;text-decoration:none;text-shadow:none}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li:hover,#plugin-information .fs-dropdown .fs-dropdown-list li:hover{background-color:#0074a3;color:#fff}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li:hover a,#plugin-information .fs-dropdown .fs-dropdown-list li:hover a{color:#fff}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown:not(.up) .fs-dropdown-list,#plugin-information .fs-dropdown:not(.up) .fs-dropdown-list{-moz-border-radius:3px 0 3px 3px;-webkit-border-radius:3px 0 3px 3px;border-radius:3px 0 3px 3px}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.up .fs-dropdown-list,#plugin-information .fs-dropdown.up .fs-dropdown-list{-moz-border-radius:3px 3px 0 3px;-webkit-border-radius:3px 3px 0 3px;border-radius:3px 3px 0 3px}#plugin-information .fs-dropdown .button-group{width:100%}#plugin-information .fs-dropdown .button-group .button{float:none;font-size:14px;font-weight:normal;text-transform:none}#plugin-information .fs-dropdown .fs-dropdown-list{margin-top:1px}#plugin-information .fs-dropdown.up .fs-dropdown-list{top:auto;bottom:100%;margin-bottom:2px}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group{text-align:center;display:table}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group .button{display:table-cell}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group .button:not(.fs-dropdown-arrow-button){left:1px;width:100%}#plugin-information-footer>.button,#plugin-information-footer .fs-dropdown{position:relative;top:3px}#plugin-information-footer>.button.left,#plugin-information-footer .fs-dropdown.left{float:left}#plugin-information-footer>.right,#plugin-information-footer .fs-dropdown{float:right}@media screen and (max-width: 961px){#fs_addons .fs-cards-list .fs-card{height:265px}}
freemius/assets/css/admin/affiliation.css CHANGED
@@ -1 +1 @@
1
- @charset "UTF-8";#fs_affiliation_content_wrapper #messages{margin-top:25px}#fs_affiliation_content_wrapper h3{font-size:24px;padding:0;margin-left:0}#fs_affiliation_content_wrapper ul li{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;list-style-type:none}#fs_affiliation_content_wrapper ul li:before{content:'✓';margin-right:10px;font-weight:bold}#fs_affiliation_content_wrapper p:not(.description),#fs_affiliation_content_wrapper li,#fs_affiliation_content_wrapper label{font-size:16px !important;line-height:26px !important}#fs_affiliation_content_wrapper .button{margin-top:20px;margin-bottom:7px;line-height:35px;height:40px;font-size:16px}#fs_affiliation_content_wrapper .button#cancel_button{margin-right:5px}#fs_affiliation_content_wrapper form .input-container{margin-bottom:15px}#fs_affiliation_content_wrapper form .input-container .input-label{font-weight:bold;display:block;width:100%}#fs_affiliation_content_wrapper form .input-container.input-container-text label,#fs_affiliation_content_wrapper form .input-container.input-container-text input,#fs_affiliation_content_wrapper form .input-container.input-container-text textarea{display:block}#fs_affiliation_content_wrapper form .input-container #add_domain,#fs_affiliation_content_wrapper form .input-container .remove-domain{text-decoration:none;display:inline-block;margin-top:3px}#fs_affiliation_content_wrapper form .input-container #add_domain:focus,#fs_affiliation_content_wrapper form .input-container .remove-domain:focus{box-shadow:none}#fs_affiliation_content_wrapper form .input-container #add_domain.disabled,#fs_affiliation_content_wrapper form .input-container .remove-domain.disabled{color:#aaa;cursor:default}#fs_affiliation_content_wrapper form #extra_domains_container .description{margin-top:0;position:relative;top:-4px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container{margin-bottom:15px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container .domain{display:inline-block;margin-right:5px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container .domain:last-of-type{margin-bottom:0}
1
+ @charset "UTF-8";#fs_affiliation_content_wrapper #messages{margin-top:25px}#fs_affiliation_content_wrapper h3{font-size:24px;padding:0;margin-left:0}#fs_affiliation_content_wrapper ul li{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;list-style-type:none}#fs_affiliation_content_wrapper ul li:before{content:'✓';margin-right:10px;font-weight:bold}#fs_affiliation_content_wrapper p:not(.description),#fs_affiliation_content_wrapper li,#fs_affiliation_content_wrapper label{font-size:16px !important;line-height:26px !important}#fs_affiliation_content_wrapper .button{margin-top:20px;margin-bottom:7px;line-height:35px;height:40px;font-size:16px}#fs_affiliation_content_wrapper .button#cancel_button{margin-right:5px}#fs_affiliation_content_wrapper form .input-container{margin-bottom:15px}#fs_affiliation_content_wrapper form .input-container .input-label{font-weight:bold;display:block;width:100%}#fs_affiliation_content_wrapper form .input-container.input-container-text label,#fs_affiliation_content_wrapper form .input-container.input-container-text input,#fs_affiliation_content_wrapper form .input-container.input-container-text textarea{display:block}#fs_affiliation_content_wrapper form .input-container #add_domain,#fs_affiliation_content_wrapper form .input-container .remove-domain{text-decoration:none;display:inline-block;margin-top:3px}#fs_affiliation_content_wrapper form .input-container #add_domain:focus,#fs_affiliation_content_wrapper form .input-container .remove-domain:focus{box-shadow:none}#fs_affiliation_content_wrapper form .input-container #add_domain.disabled,#fs_affiliation_content_wrapper form .input-container .remove-domain.disabled{color:#aaa;cursor:default}#fs_affiliation_content_wrapper form #extra_domains_container .description{margin-top:0;position:relative;top:-4px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container{margin-bottom:15px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container .domain{display:inline-block;margin-right:5px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container .domain:last-of-type{margin-bottom:0}
freemius/assets/css/admin/checkout.css CHANGED
@@ -1 +1 @@
1
- @media screen and (max-width: 782px){#wpbody-content{padding-bottom:0 !important}}
1
+ @media screen and (max-width: 782px){#wpbody-content{padding-bottom:0 !important}}
freemius/assets/css/admin/common.css CHANGED
@@ -1,2 +1,2 @@
1
- .fs-badge{position:absolute;top:10px;right:0;background:#71ae00;color:white;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);box-shadow:0 2px 1px -1px rgba(0,0,0,0.3)}.theme-browser .theme .fs-premium-theme-badge-container{position:absolute;right:0;top:0}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge{position:relative;top:0;margin-top:10px;text-align:center}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge.fs-premium-theme-badge{font-size:1.1em}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge.fs-beta-theme-badge{background:#00a0d2}.fs-switch{position:relative;display:inline-block;color:#ccc;text-shadow:0 1px 1px rgba(255,255,255,0.8);height:18px;padding:6px 6px 5px 6px;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);background:#ececec;box-shadow:0 0 4px rgba(0,0,0,0.1),inset 0 1px 3px 0 rgba(0,0,0,0.1);cursor:pointer}.fs-switch span{display:inline-block;width:35px;text-transform:uppercase}.fs-switch .fs-toggle{position:absolute;top:1px;width:37px;height:25px;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.3);border-radius:4px;background:#fff;background-color:#fff;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #ececec), color-stop(1, #fff));background-image:-webkit-linear-gradient(top, #ececec, #fff);background-image:-moz-linear-gradient(top, #ececec, #fff);background-image:-ms-linear-gradient(top, #ececec, #fff);background-image:-o-linear-gradient(top, #ececec, #fff);background-image:linear-gradient(top, bottom, #ececec, #fff);box-shadow:inset 0 1px 0 0 rgba(255,255,255,0.5);z-index:999;-moz-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);-o-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);-ms-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);-webkit-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1)}.fs-switch.fs-off .fs-toggle{left:2%}.fs-switch.fs-on .fs-toggle{left:54%}.fs-switch.fs-round{top:8px;padding:4px 25px;-moz-border-radius:24px;-webkit-border-radius:24px;border-radius:24px}.fs-switch.fs-round .fs-toggle{top:0;width:24px;height:24px;-moz-border-radius:24px;-webkit-border-radius:24px;border-radius:24px}.fs-switch.fs-round.fs-off .fs-toggle{left:-1px}.fs-switch.fs-round.fs-on{background:#0085ba}.fs-switch.fs-round.fs-on .fs-toggle{left:25px}.fs-switch.fs-small.fs-round{padding:1px 19px}.fs-switch.fs-small.fs-round .fs-toggle{top:0;width:18px;height:18px;-moz-border-radius:18px;-webkit-border-radius:18px;border-radius:18px}.fs-switch.fs-small.fs-round.fs-on .fs-toggle{left:19px}.fs-switch-feedback{margin-left:10px}.fs-switch-feedback.success{color:#71ae00}.rtl .fs-switch-feedback{margin-left:0;margin-right:10px}#fs_frame{line-height:0;font-size:0}.fs-full-size-wrapper{margin:40px 0 -65px -20px}@media (max-width: 600px){.fs-full-size-wrapper{margin:0 0 -65px -10px}}
2
- .fs-notice{position:relative}.fs-notice.fs-has-title{margin-bottom:30px !important}.fs-notice.success{color:green}.fs-notice.promotion{border-color:#00a0d2 !important;background-color:#f2fcff !important}.fs-notice .fs-notice-body{margin:.5em 0;padding:2px}.fs-notice .fs-close{cursor:pointer;color:#aaa;float:right}.fs-notice .fs-close:hover{color:#666}.fs-notice .fs-close>*{margin-top:7px;display:inline-block}.fs-notice label.fs-plugin-title{background:rgba(0,0,0,0.3);color:#fff;padding:2px 10px;position:absolute;top:100%;bottom:auto;right:auto;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;left:10px;font-size:12px;font-weight:bold;cursor:auto}div.fs-notice.updated,div.fs-notice.success,div.fs-notice.promotion{display:block !important}.rtl .fs-notice .fs-close{float:left}.fs-secure-notice{position:fixed;top:32px;left:160px;right:0;background:#ebfdeb;padding:10px 20px;color:green;z-index:9999;-moz-box-shadow:0 2px 2px rgba(6,113,6,0.3);-webkit-box-shadow:0 2px 2px rgba(6,113,6,0.3);box-shadow:0 2px 2px rgba(6,113,6,0.3);opacity:0.95;filter:alpha(opacity=95)}.fs-secure-notice:hover{opacity:1;filter:alpha(opacity=100)}.fs-secure-notice a.fs-security-proof{color:green;text-decoration:none}@media screen and (max-width: 960px){.fs-secure-notice{left:36px}}@media screen and (max-width: 600px){.fs-secure-notice{display:none}}@media screen and (max-width: 1250px){#fs_promo_tab{display:none}}@media screen and (max-width: 782px){.fs-secure-notice{left:0;top:46px;text-align:center}}span.fs-submenu-item.fs-sub:before{content:'\21B3';padding:0 5px}.rtl span.fs-submenu-item.fs-sub:before{content:'\21B2'}.fs-submenu-item.pricing.upgrade-mode{color:greenyellow}.fs-submenu-item.pricing.trial-mode{color:#83e2ff}#adminmenu .update-plugins.fs-trial{background-color:#00b9eb}.fs-ajax-spinner{border:0;width:20px;height:20px;margin-right:5px;vertical-align:sub;display:inline-block;background:url("/wp-admin/images/wpspin_light-2x.gif");background-size:contain;margin-bottom:-2px}.wrap.fs-section h2{text-align:left}.plugins p.fs-upgrade-notice{border:0;background-color:#d54e21;padding:10px;color:#f9f9f9;margin-top:10px}
1
+ .fs-badge{position:absolute;top:10px;right:0;background:#71ae00;color:white;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);box-shadow:0 2px 1px -1px rgba(0,0,0,0.3)}.theme-browser .theme .fs-premium-theme-badge-container{position:absolute;right:0;top:0}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge{position:relative;top:0;margin-top:10px;text-align:center}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge.fs-premium-theme-badge{font-size:1.1em}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge.fs-beta-theme-badge{background:#00a0d2}.fs-switch{position:relative;display:inline-block;color:#ccc;text-shadow:0 1px 1px rgba(255,255,255,0.8);height:18px;padding:6px 6px 5px 6px;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);background:#ececec;box-shadow:0 0 4px rgba(0,0,0,0.1),inset 0 1px 3px 0 rgba(0,0,0,0.1);cursor:pointer}.fs-switch span{display:inline-block;width:35px;text-transform:uppercase}.fs-switch .fs-toggle{position:absolute;top:1px;width:37px;height:25px;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.3);border-radius:4px;background:#fff;background-color:#fff;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #ececec), color-stop(1, #fff));background-image:-webkit-linear-gradient(top, #ececec, #fff);background-image:-moz-linear-gradient(top, #ececec, #fff);background-image:-ms-linear-gradient(top, #ececec, #fff);background-image:-o-linear-gradient(top, #ececec, #fff);background-image:linear-gradient(top, bottom, #ececec, #fff);box-shadow:inset 0 1px 0 0 rgba(255,255,255,0.5);z-index:999;-moz-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);-o-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);-ms-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);-webkit-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1)}.fs-switch.fs-off .fs-toggle{left:2%}.fs-switch.fs-on .fs-toggle{left:54%}.fs-switch.fs-round{top:8px;padding:4px 25px;-moz-border-radius:24px;-webkit-border-radius:24px;border-radius:24px}.fs-switch.fs-round .fs-toggle{top:0;width:24px;height:24px;-moz-border-radius:24px;-webkit-border-radius:24px;border-radius:24px}.fs-switch.fs-round.fs-off .fs-toggle{left:-1px}.fs-switch.fs-round.fs-on{background:#0085ba}.fs-switch.fs-round.fs-on .fs-toggle{left:25px}.fs-switch.fs-small.fs-round{padding:1px 19px}.fs-switch.fs-small.fs-round .fs-toggle{top:0;width:18px;height:18px;-moz-border-radius:18px;-webkit-border-radius:18px;border-radius:18px}.fs-switch.fs-small.fs-round.fs-on .fs-toggle{left:19px}.fs-switch-feedback{margin-left:10px}.fs-switch-feedback.success{color:#71ae00}.rtl .fs-switch-feedback{margin-left:0;margin-right:10px}#fs_frame{line-height:0;font-size:0}.fs-full-size-wrapper{margin:40px 0 -65px -20px}@media (max-width: 600px){.fs-full-size-wrapper{margin:0 0 -65px -10px}}
2
+ .fs-notice{position:relative}.fs-notice.fs-has-title{margin-bottom:30px !important}.fs-notice.success{color:green}.fs-notice.promotion{border-color:#00a0d2 !important;background-color:#f2fcff !important}.fs-notice .fs-notice-body{margin:.5em 0;padding:2px}.fs-notice .fs-close{cursor:pointer;color:#aaa;float:right}.fs-notice .fs-close:hover{color:#666}.fs-notice .fs-close>*{margin-top:7px;display:inline-block}.fs-notice label.fs-plugin-title{background:rgba(0,0,0,0.3);color:#fff;padding:2px 10px;position:absolute;top:100%;bottom:auto;right:auto;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;left:10px;font-size:12px;font-weight:bold;cursor:auto}div.fs-notice.updated,div.fs-notice.success,div.fs-notice.promotion{display:block !important}.rtl .fs-notice .fs-close{float:left}.fs-secure-notice{position:fixed;top:32px;left:160px;right:0;background:#ebfdeb;padding:10px 20px;color:green;z-index:9999;-moz-box-shadow:0 2px 2px rgba(6,113,6,0.3);-webkit-box-shadow:0 2px 2px rgba(6,113,6,0.3);box-shadow:0 2px 2px rgba(6,113,6,0.3);opacity:0.95;filter:alpha(opacity=95)}.fs-secure-notice:hover{opacity:1;filter:alpha(opacity=100)}.fs-secure-notice a.fs-security-proof{color:green;text-decoration:none}@media screen and (max-width: 960px){.fs-secure-notice{left:36px}}@media screen and (max-width: 600px){.fs-secure-notice{display:none}}@media screen and (max-width: 1250px){#fs_promo_tab{display:none}}@media screen and (max-width: 782px){.fs-secure-notice{left:0;top:46px;text-align:center}}span.fs-submenu-item.fs-sub:before{content:'\21B3';padding:0 5px}.rtl span.fs-submenu-item.fs-sub:before{content:'\21B2'}.fs-submenu-item.pricing.upgrade-mode{color:greenyellow}.fs-submenu-item.pricing.trial-mode{color:#83e2ff}#adminmenu .update-plugins.fs-trial{background-color:#00b9eb}.fs-ajax-spinner{border:0;width:20px;height:20px;margin-right:5px;vertical-align:sub;display:inline-block;background:url("/wp-admin/images/wpspin_light-2x.gif");background-size:contain;margin-bottom:-2px}.wrap.fs-section h2{text-align:left}.plugins p.fs-upgrade-notice{border:0;background-color:#d54e21;padding:10px;color:#f9f9f9;margin-top:10px}
freemius/assets/css/admin/connect.css CHANGED
@@ -1 +1 @@
1
- #fs_connect{width:480px;-moz-box-shadow:0px 1px 2px rgba(0,0,0,0.3);-webkit-box-shadow:0px 1px 2px rgba(0,0,0,0.3);box-shadow:0px 1px 2px rgba(0,0,0,0.3);margin:20px 0}@media screen and (max-width: 479px){#fs_connect{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;width:auto;margin:0 0 0 -10px}}#fs_connect .fs-content{background:#fff;padding:15px 20px}#fs_connect .fs-content .fs-error{background:snow;color:#d3135a;border:1px solid #d3135a;-moz-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);text-align:center;padding:5px;margin-bottom:10px}#fs_connect .fs-content p{margin:0;padding:0;font-size:1.2em}#fs_connect .fs-license-key-container{position:relative;width:280px;margin:10px auto 0 auto}#fs_connect .fs-license-key-container input{width:100%}#fs_connect .fs-license-key-container .dashicons{position:absolute;top:5px;right:5px}#fs_connect.require-license-key .fs-sites-list-container td{cursor:pointer}#fs_connect #delegate_to_site_admins{margin-right:15px;float:right;height:26px;vertical-align:middle;line-height:37px;font-weight:bold;border-bottom:1px dashed;text-decoration:none}#fs_connect #delegate_to_site_admins.rtl{margin-left:15px;margin-right:0}#fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}#fs_connect .fs-actions .button{padding:0 10px 1px;line-height:35px;height:37px;font-size:16px;margin-bottom:0}#fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}#fs_connect .fs-actions .button.button-primary{padding-right:15px;padding-left:15px}#fs_connect .fs-actions .button.button-primary:after{content:' \279C'}#fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}#fs_connect .fs-actions .button.button-secondary{float:right}#fs_connect.fs-anonymous-disabled .fs-actions .button.button-primary{width:100%}#fs_connect .fs-permissions{padding:10px 20px;background:#FEFEFE;-moz-transition:background 0.5s ease;-o-transition:background 0.5s ease;-ms-transition:background 0.5s ease;-webkit-transition:background 0.5s ease;transition:background 0.5s ease}#fs_connect .fs-permissions .fs-license-sync-disclaimer{text-align:center;margin-top:0}#fs_connect .fs-permissions>.fs-trigger{font-size:0.9em;text-decoration:none;text-align:center;display:block}#fs_connect .fs-permissions ul{height:0;overflow:hidden;margin:0}#fs_connect .fs-permissions ul li{margin-bottom:12px}#fs_connect .fs-permissions ul li:last-child{margin-bottom:0}#fs_connect .fs-permissions ul li>i.dashicons{float:left;font-size:40px;width:40px;height:40px}#fs_connect .fs-permissions ul li .fs-switch{float:right}#fs_connect .fs-permissions ul li .fs-permission-description{margin-left:55px}#fs_connect .fs-permissions ul li .fs-permission-description span{font-weight:bold;text-transform:uppercase;color:#23282d}#fs_connect .fs-permissions ul li .fs-permission-description p{margin:2px 0 0 0}#fs_connect .fs-permissions.fs-open{background:#fff}#fs_connect .fs-permissions.fs-open ul{overflow:initial;height:auto;margin:20px 20px 10px 20px}@media screen and (max-width: 479px){#fs_connect .fs-permissions{background:#fff}#fs_connect .fs-permissions .fs-trigger{display:none}#fs_connect .fs-permissions ul{height:auto;margin:20px}}#fs_connect .fs-freemium-licensing{padding:8px;background:#777;color:#fff}#fs_connect .fs-freemium-licensing p{text-align:center;display:block;margin:0;padding:0}#fs_connect .fs-freemium-licensing a{color:#C2EEFF;text-decoration:underline}#fs_connect .fs-visual{padding:12px;line-height:0;background:#fafafa;height:80px;position:relative}#fs_connect .fs-visual .fs-site-icon{position:absolute;left:20px;top:10px}#fs_connect .fs-visual .fs-connect-logo{position:absolute;right:20px;top:10px}#fs_connect .fs-visual .fs-plugin-icon{position:absolute;top:10px;left:50%;margin-left:-40px}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-site-icon,#fs_connect .fs-visual img,#fs_connect .fs-visual object{width:80px;height:80px}#fs_connect .fs-visual .dashicons-wordpress{font-size:64px;background:#01749a;color:#fff;width:64px;height:64px;padding:8px}#fs_connect .fs-visual .dashicons-plus{position:absolute;top:50%;font-size:30px;margin-top:-10px;color:#bbb}#fs_connect .fs-visual .dashicons-plus.fs-first{left:28%}#fs_connect .fs-visual .dashicons-plus.fs-second{left:65%}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-connect-logo,#fs_connect .fs-visual .fs-site-icon{border:1px solid #ccc;padding:1px;background:#fff}#fs_connect .fs-terms{text-align:center;font-size:0.85em;padding:5px;background:rgba(0,0,0,0.05)}#fs_connect .fs-terms,#fs_connect .fs-terms a{color:#999}#fs_connect .fs-terms a{text-decoration:none}.fs-multisite-options-container{margin-top:10px;border:1px solid #ccc;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:bold}.fs-multisite-options-container.fs-apply-on-all-sites{border:0 none;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-tooltip-trigger{position:relative}.fs-tooltip-trigger:not(a){cursor:help}.fs-tooltip-trigger .fs-tooltip{opacity:0;visibility:hidden;-moz-transition:opacity 0.3s ease-in-out;-o-transition:opacity 0.3s ease-in-out;-ms-transition:opacity 0.3s ease-in-out;-webkit-transition:opacity 0.3s ease-in-out;transition:opacity 0.3s ease-in-out;position:absolute;background:rgba(0,0,0,0.8);color:#fff !important;font-family:'arial', serif;font-size:12px;padding:10px;z-index:999999;bottom:100%;margin-bottom:5px;left:-17px;right:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);line-height:1.3em;font-weight:bold;text-align:left;text-transform:none !important}.rtl .fs-tooltip-trigger .fs-tooltip{text-align:right;left:auto;right:-17px}.fs-tooltip-trigger .fs-tooltip::after{content:' ';display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:rgba(0,0,0,0.8) transparent transparent transparent;position:absolute;top:100%;left:21px}.rtl .fs-tooltip-trigger .fs-tooltip::after{right:21px;left:auto}.fs-tooltip-trigger:hover .fs-tooltip{visibility:visible;opacity:1}#fs_marketing_optin{display:none;margin-top:10px;border:1px solid #ccc;padding:10px;line-height:1.5em}#fs_marketing_optin .fs-message{display:block;margin-bottom:5px;font-size:1.05em;font-weight:600}#fs_marketing_optin.error{border:1px solid #d3135a;background:#fee}#fs_marketing_optin.error .fs-message{color:#d3135a}#fs_marketing_optin .fs-input-container{margin-top:5px}#fs_marketing_optin .fs-input-container label{margin-top:5px;display:block}#fs_marketing_optin .fs-input-container label input{float:left;margin:1px 0 0 0}#fs_marketing_optin .fs-input-container label:first-child{display:block;margin-bottom:2px}#fs_marketing_optin .fs-input-label{display:block;margin-left:20px}#fs_marketing_optin .fs-input-label .underlined{text-decoration:underline}.rtl #fs_marketing_optin .fs-input-container label input{float:right}.rtl #fs_marketing_optin .fs-input-label{margin-left:0;margin-right:20px}.rtl #fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}.rtl #fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}.rtl #fs_connect .fs-actions .button.button-primary:after{content:' \000bb'}.rtl #fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}.rtl #fs_connect .fs-actions .button.button-secondary{float:left}.rtl #fs_connect .fs-permissions ul li .fs-permission-description{margin-right:55px;margin-left:0}.rtl #fs_connect .fs-permissions ul li .fs-switch{float:left}.rtl #fs_connect .fs-permissions ul li i.dashicons{float:right}.rtl #fs_connect .fs-visual .fs-site-icon{right:20px;left:auto}.rtl #fs_connect .fs-visual .fs-connect-logo{right:auto;left:20px}#fs_theme_connect_wrapper{position:fixed;top:0;height:100%;width:100%;z-index:99990;background:rgba(0,0,0,0.75);text-align:center;overflow-y:auto}#fs_theme_connect_wrapper:before{content:"";display:inline-block;vertical-align:middle;height:100%}#fs_theme_connect_wrapper>button.close{color:white;cursor:pointer;height:40px;width:40px;position:absolute;right:0;border:0;background-color:transparent;top:32px}#fs_theme_connect_wrapper #fs_connect{top:0;text-align:left;display:inline-block;vertical-align:middle;margin-top:52px;margin-bottom:20px}#fs_theme_connect_wrapper #fs_connect .fs-terms{background:rgba(140,140,140,0.64)}#fs_theme_connect_wrapper #fs_connect .fs-terms,#fs_theme_connect_wrapper #fs_connect .fs-terms a{color:#c5c5c5}.wp-pointer-content #fs_connect{margin:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.fs-opt-in-pointer .wp-pointer-content{padding:0}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow{border-bottom-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow-inner{border-bottom-color:#fafafa}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow{border-top-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow-inner{border-top-color:#fafafa}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow{border-right-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow-inner{border-right-color:#fafafa}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow{border-left-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow-inner{border-left-color:#fafafa}#license_issues_link{display:block;text-align:center;font-size:0.9em;margin-top:10px}
1
+ #fs_connect{width:480px;-moz-box-shadow:0px 1px 2px rgba(0,0,0,0.3);-webkit-box-shadow:0px 1px 2px rgba(0,0,0,0.3);box-shadow:0px 1px 2px rgba(0,0,0,0.3);margin:20px 0}@media screen and (max-width: 479px){#fs_connect{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;width:auto;margin:0 0 0 -10px}}#fs_connect .fs-content{background:#fff;padding:15px 20px}#fs_connect .fs-content .fs-error{background:snow;color:#d3135a;border:1px solid #d3135a;-moz-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);text-align:center;padding:5px;margin-bottom:10px}#fs_connect .fs-content p{margin:0;padding:0;font-size:1.2em}#fs_connect .fs-license-key-container{position:relative;width:280px;margin:10px auto 0 auto}#fs_connect .fs-license-key-container input{width:100%}#fs_connect .fs-license-key-container .dashicons{position:absolute;top:5px;right:5px}#fs_connect.require-license-key .fs-sites-list-container td{cursor:pointer}#fs_connect #delegate_to_site_admins{margin-right:15px;float:right;height:26px;vertical-align:middle;line-height:37px;font-weight:bold;border-bottom:1px dashed;text-decoration:none}#fs_connect #delegate_to_site_admins.rtl{margin-left:15px;margin-right:0}#fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}#fs_connect .fs-actions .button{padding:0 10px 1px;line-height:35px;height:37px;font-size:16px;margin-bottom:0}#fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}#fs_connect .fs-actions .button.button-primary{padding-right:15px;padding-left:15px}#fs_connect .fs-actions .button.button-primary:after{content:' \279C'}#fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}#fs_connect .fs-actions .button.button-secondary{float:right}#fs_connect.fs-anonymous-disabled .fs-actions .button.button-primary{width:100%}#fs_connect .fs-permissions{padding:10px 20px;background:#FEFEFE;-moz-transition:background 0.5s ease;-o-transition:background 0.5s ease;-ms-transition:background 0.5s ease;-webkit-transition:background 0.5s ease;transition:background 0.5s ease}#fs_connect .fs-permissions .fs-license-sync-disclaimer{text-align:center;margin-top:0}#fs_connect .fs-permissions>.fs-trigger{font-size:0.9em;text-decoration:none;text-align:center;display:block}#fs_connect .fs-permissions ul{height:0;overflow:hidden;margin:0}#fs_connect .fs-permissions ul li{margin-bottom:12px}#fs_connect .fs-permissions ul li:last-child{margin-bottom:0}#fs_connect .fs-permissions ul li>i.dashicons{float:left;font-size:40px;width:40px;height:40px}#fs_connect .fs-permissions ul li .fs-switch{float:right}#fs_connect .fs-permissions ul li .fs-permission-description{margin-left:55px}#fs_connect .fs-permissions ul li .fs-permission-description span{font-weight:bold;text-transform:uppercase;color:#23282d}#fs_connect .fs-permissions ul li .fs-permission-description p{margin:2px 0 0 0}#fs_connect .fs-permissions.fs-open{background:#fff}#fs_connect .fs-permissions.fs-open ul{overflow:initial;height:auto;margin:20px 20px 10px 20px}@media screen and (max-width: 479px){#fs_connect .fs-permissions{background:#fff}#fs_connect .fs-permissions .fs-trigger{display:none}#fs_connect .fs-permissions ul{height:auto;margin:20px}}#fs_connect .fs-freemium-licensing{padding:8px;background:#777;color:#fff}#fs_connect .fs-freemium-licensing p{text-align:center;display:block;margin:0;padding:0}#fs_connect .fs-freemium-licensing a{color:#C2EEFF;text-decoration:underline}#fs_connect .fs-visual{padding:12px;line-height:0;background:#fafafa;height:80px;position:relative}#fs_connect .fs-visual .fs-site-icon{position:absolute;left:20px;top:10px}#fs_connect .fs-visual .fs-connect-logo{position:absolute;right:20px;top:10px}#fs_connect .fs-visual .fs-plugin-icon{position:absolute;top:10px;left:50%;margin-left:-40px}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-site-icon,#fs_connect .fs-visual img,#fs_connect .fs-visual object{width:80px;height:80px}#fs_connect .fs-visual .dashicons-wordpress{font-size:64px;background:#01749a;color:#fff;width:64px;height:64px;padding:8px}#fs_connect .fs-visual .dashicons-plus{position:absolute;top:50%;font-size:30px;margin-top:-10px;color:#bbb}#fs_connect .fs-visual .dashicons-plus.fs-first{left:28%}#fs_connect .fs-visual .dashicons-plus.fs-second{left:65%}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-connect-logo,#fs_connect .fs-visual .fs-site-icon{border:1px solid #ccc;padding:1px;background:#fff}#fs_connect .fs-terms{text-align:center;font-size:0.85em;padding:5px;background:rgba(0,0,0,0.05)}#fs_connect .fs-terms,#fs_connect .fs-terms a{color:#999}#fs_connect .fs-terms a{text-decoration:none}.fs-multisite-options-container{margin-top:10px;border:1px solid #ccc;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:bold}.fs-multisite-options-container.fs-apply-on-all-sites{border:0 none;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-tooltip-trigger{position:relative}.fs-tooltip-trigger:not(a){cursor:help}.fs-tooltip-trigger .fs-tooltip{opacity:0;visibility:hidden;-moz-transition:opacity 0.3s ease-in-out;-o-transition:opacity 0.3s ease-in-out;-ms-transition:opacity 0.3s ease-in-out;-webkit-transition:opacity 0.3s ease-in-out;transition:opacity 0.3s ease-in-out;position:absolute;background:rgba(0,0,0,0.8);color:#fff !important;font-family:'arial', serif;font-size:12px;padding:10px;z-index:999999;bottom:100%;margin-bottom:5px;left:-17px;right:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);line-height:1.3em;font-weight:bold;text-align:left;text-transform:none !important}.rtl .fs-tooltip-trigger .fs-tooltip{text-align:right;left:auto;right:-17px}.fs-tooltip-trigger .fs-tooltip::after{content:' ';display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:rgba(0,0,0,0.8) transparent transparent transparent;position:absolute;top:100%;left:21px}.rtl .fs-tooltip-trigger .fs-tooltip::after{right:21px;left:auto}.fs-tooltip-trigger:hover .fs-tooltip{visibility:visible;opacity:1}#fs_marketing_optin{display:none;margin-top:10px;border:1px solid #ccc;padding:10px;line-height:1.5em}#fs_marketing_optin .fs-message{display:block;margin-bottom:5px;font-size:1.05em;font-weight:600}#fs_marketing_optin.error{border:1px solid #d3135a;background:#fee}#fs_marketing_optin.error .fs-message{color:#d3135a}#fs_marketing_optin .fs-input-container{margin-top:5px}#fs_marketing_optin .fs-input-container label{margin-top:5px;display:block}#fs_marketing_optin .fs-input-container label input{float:left;margin:1px 0 0 0}#fs_marketing_optin .fs-input-container label:first-child{display:block;margin-bottom:2px}#fs_marketing_optin .fs-input-label{display:block;margin-left:20px}#fs_marketing_optin .fs-input-label .underlined{text-decoration:underline}.rtl #fs_marketing_optin .fs-input-container label input{float:right}.rtl #fs_marketing_optin .fs-input-label{margin-left:0;margin-right:20px}.rtl #fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}.rtl #fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}.rtl #fs_connect .fs-actions .button.button-primary:after{content:' \000bb'}.rtl #fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}.rtl #fs_connect .fs-actions .button.button-secondary{float:left}.rtl #fs_connect .fs-permissions ul li .fs-permission-description{margin-right:55px;margin-left:0}.rtl #fs_connect .fs-permissions ul li .fs-switch{float:left}.rtl #fs_connect .fs-permissions ul li i.dashicons{float:right}.rtl #fs_connect .fs-visual .fs-site-icon{right:20px;left:auto}.rtl #fs_connect .fs-visual .fs-connect-logo{right:auto;left:20px}#fs_theme_connect_wrapper{position:fixed;top:0;height:100%;width:100%;z-index:99990;background:rgba(0,0,0,0.75);text-align:center;overflow-y:auto}#fs_theme_connect_wrapper:before{content:"";display:inline-block;vertical-align:middle;height:100%}#fs_theme_connect_wrapper>button.close{color:white;cursor:pointer;height:40px;width:40px;position:absolute;right:0;border:0;background-color:transparent;top:32px}#fs_theme_connect_wrapper #fs_connect{top:0;text-align:left;display:inline-block;vertical-align:middle;margin-top:52px;margin-bottom:20px}#fs_theme_connect_wrapper #fs_connect .fs-terms{background:rgba(140,140,140,0.64)}#fs_theme_connect_wrapper #fs_connect .fs-terms,#fs_theme_connect_wrapper #fs_connect .fs-terms a{color:#c5c5c5}.wp-pointer-content #fs_connect{margin:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.fs-opt-in-pointer .wp-pointer-content{padding:0}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow{border-bottom-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow-inner{border-bottom-color:#fafafa}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow{border-top-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow-inner{border-top-color:#fafafa}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow{border-right-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow-inner{border-right-color:#fafafa}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow{border-left-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow-inner{border-left-color:#fafafa}#license_issues_link{display:block;text-align:center;font-size:0.9em;margin-top:10px}
freemius/assets/css/admin/debug.css CHANGED
@@ -1 +1 @@
1
- .fs-switch-label{font-size:20px;line-height:31px;margin:0 5px}#fs_log_book table{font-family:Consolas,Monaco,monospace;font-size:12px}#fs_log_book table th{color:#ccc}#fs_log_book table tr{background:#232525}#fs_log_book table tr.alternate{background:#2b2b2b}#fs_log_book table tr td.fs-col--logger{color:#5a7435}#fs_log_book table tr td.fs-col--type{color:#ffc861}#fs_log_book table tr td.fs-col--function{color:#a7b7b1;font-weight:bold}#fs_log_book table tr td.fs-col--message,#fs_log_book table tr td.fs-col--message a{color:#9a73ac !important}#fs_log_book table tr td.fs-col--file{color:#d07922}#fs_log_book table tr td.fs-col--timestamp{color:#6596be}
1
+ .fs-switch-label{font-size:20px;line-height:31px;margin:0 5px}#fs_log_book table{font-family:Consolas,Monaco,monospace;font-size:12px}#fs_log_book table th{color:#ccc}#fs_log_book table tr{background:#232525}#fs_log_book table tr.alternate{background:#2b2b2b}#fs_log_book table tr td.fs-col--logger{color:#5a7435}#fs_log_book table tr td.fs-col--type{color:#ffc861}#fs_log_book table tr td.fs-col--function{color:#a7b7b1;font-weight:bold}#fs_log_book table tr td.fs-col--message,#fs_log_book table tr td.fs-col--message a{color:#9a73ac !important}#fs_log_book table tr td.fs-col--file{color:#d07922}#fs_log_book table tr td.fs-col--timestamp{color:#6596be}
freemius/assets/css/admin/dialog-boxes.css CHANGED
@@ -1,2 +1,2 @@
1
- .fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,0.6)}.fs-modal .dashicons{vertical-align:middle}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media (max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal.fs-success .fs-modal-header{border-bottom-color:#46b450}.fs-modal.fs-success .fs-modal-body{background-color:#f7fff7}.fs-modal.fs-warn .fs-modal-header{border-bottom-color:#ffb900}.fs-modal.fs-warn .fs-modal-body{background-color:#fff8e5}.fs-modal.fs-error .fs-modal-header{border-bottom-color:#dc3232}.fs-modal.fs-error .fs-modal-body{background-color:#ffeaea}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-header{border-bottom:#eeeeee solid 1px;background:#fbfbfb;padding:15px 20px;position:relative;margin-bottom:-10px}.fs-modal .fs-modal-header h4{margin:0;padding:0;text-transform:uppercase;font-size:1.2em;font-weight:bold;color:#cacaca;text-shadow:1px 1px 1px #fff;letter-spacing:0.6px;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{position:absolute;right:10px;top:12px;cursor:pointer;color:#bbb;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;padding:3px;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{color:#fff;background:#aaa}.fs-modal .fs-modal-header .fs-close .dashicons,.fs-modal .fs-modal-header .fs-close:hover .dashicons{text-decoration:none}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px;line-height:1.5em}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eeeeee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel>.notice.inline{margin:0;display:none}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{right:auto;left:20px}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .reason-input,.fs-modal.fs-modal-deactivation-feedback .internal-message{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea,.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea{width:100%}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;padding:7px;display:none}@media (max-width: 650px){.fs-modal.fs-modal-deactivation-feedback li.reason li.reason{margin-bottom:10px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .internal-message{margin-left:29px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label{display:table}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label{float:left}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0 !important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{margin-top:0;line-height:1.5em}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-subscription-cancellation .fs-price-increase-warning{color:red;font-weight:bold;padding:0 25px;margin-bottom:0}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:left;top:5px;position:relative}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:right}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{display:block;margin-left:24px}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{margin-left:0;margin-right:24px}.fs-modal.fs-modal-license-activation .fs-modal-body input.fs-license-key{width:100%}.fs-license-options-container table,.fs-license-options-container table select,.fs-license-options-container table .fs-available-license-key{width:100%}.fs-license-options-container table td:first-child{width:1%}.fs-license-options-container table .fs-other-license-key-container label{position:relative;top:6px;float:left;margin-right:5px}.fs-license-options-container table .fs-other-license-key-container div{overflow:hidden;width:auto;height:30px;display:block;top:2px;position:relative}.fs-license-options-container table .fs-other-license-key-container div input{margin:0}.fs-sites-list-container td{cursor:pointer}.fs-modal.fs-modal-user-change .fs-modal-body input#fs_other_email_address{width:100%}.fs-user-change-options-container table{width:100%;border-collapse:collapse}.fs-user-change-options-container table tr{display:block;margin-bottom:2px}.fs-user-change-options-container table .fs-email-address-container td{display:inline-block}.fs-user-change-options-container table .fs-email-address-container input[type="radio"]{margin-bottom:0;margin-top:0}.fs-user-change-options-container table .fs-other-email-address-container{width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div{display:table;width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div label,.fs-user-change-options-container table .fs-other-email-address-container>div>div{display:table-cell}.fs-user-change-options-container table .fs-other-email-address-container>div label{width:1%;padding-left:3px;padding-right:3px}.fs-user-change-options-container table .fs-other-email-address-container>div>div{width:auto}.fs-user-change-options-container table .fs-other-email-address-container>div>div input{width:100%}.fs-modal.fs-modal-developer-license-debug-mode .fs-modal-body input.fs-license-or-user-key{width:100%}.fs-multisite-options-container{margin-top:10px;border:1px solid #ccc;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:bold}.fs-multisite-options-container.fs-apply-on-all-sites{border:0 none;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-modal.fs-modal-license-key-resend .email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend.fs-freemium input.email-address{width:300px}.fs-modal.fs-modal-license-key-resend.fs-freemium label{display:block;margin-bottom:10px}.fs-modal.fs-modal-license-key-resend.fs-premium input.email-address{width:100%}.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{float:right;margin-left:7px}@media (max-width: 650px){.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{margin-top:2px}}
2
- .rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{padding-left:2px;padding-right:0}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:left;margin-right:7px;margin-left:0}a.show-license-resend-modal{margin-top:4px;display:inline-block}.fs-ajax-loader{position:relative;width:170px;height:20px;margin:auto}.fs-ajax-loader .fs-ajax-loader-bar{position:absolute;top:0;background-color:#0074a3;width:20px;height:20px;-webkit-animation-name:bounce_ajaxLoader;-moz-animation-name:bounce_ajaxLoader;-ms-animation-name:bounce_ajaxLoader;-o-animation-name:bounce_ajaxLoader;animation-name:bounce_ajaxLoader;-webkit-animation-duration:1.5s;-moz-animation-duration:1.5s;-ms-animation-duration:1.5s;-o-animation-duration:1.5s;animation-duration:1.5s;animation-iteration-count:infinite;-o-animation-iteration-count:infinite;-ms-animation-iteration-count:infinite;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;-webkit-animation-direction:normal;-moz-animation-direction:normal;-ms-animation-direction:normal;-o-animation-direction:normal;animation-direction:normal;-moz-transform:0.3;-o-transform:0.3;-ms-transform:0.3;-webkit-transform:0.3;transform:0.3}.fs-ajax-loader .fs-ajax-loader-bar-1{left:0px;animation-delay:0.6s;-o-animation-delay:0.6s;-ms-animation-delay:0.6s;-webkit-animation-delay:0.6s;-moz-animation-delay:0.6s}.fs-ajax-loader .fs-ajax-loader-bar-2{left:19px;animation-delay:0.75s;-o-animation-delay:0.75s;-ms-animation-delay:0.75s;-webkit-animation-delay:0.75s;-moz-animation-delay:0.75s}.fs-ajax-loader .fs-ajax-loader-bar-3{left:38px;animation-delay:0.9s;-o-animation-delay:0.9s;-ms-animation-delay:0.9s;-webkit-animation-delay:0.9s;-moz-animation-delay:0.9s}.fs-ajax-loader .fs-ajax-loader-bar-4{left:57px;animation-delay:1.05s;-o-animation-delay:1.05s;-ms-animation-delay:1.05s;-webkit-animation-delay:1.05s;-moz-animation-delay:1.05s}.fs-ajax-loader .fs-ajax-loader-bar-5{left:76px;animation-delay:1.2s;-o-animation-delay:1.2s;-ms-animation-delay:1.2s;-webkit-animation-delay:1.2s;-moz-animation-delay:1.2s}.fs-ajax-loader .fs-ajax-loader-bar-6{left:95px;animation-delay:1.35s;-o-animation-delay:1.35s;-ms-animation-delay:1.35s;-webkit-animation-delay:1.35s;-moz-animation-delay:1.35s}.fs-ajax-loader .fs-ajax-loader-bar-7{left:114px;animation-delay:1.5s;-o-animation-delay:1.5s;-ms-animation-delay:1.5s;-webkit-animation-delay:1.5s;-moz-animation-delay:1.5s}.fs-ajax-loader .fs-ajax-loader-bar-8{left:133px;animation-delay:1.65s;-o-animation-delay:1.65s;-ms-animation-delay:1.65s;-webkit-animation-delay:1.65s;-moz-animation-delay:1.65s}@-moz-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-ms-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-o-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-webkit-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}.fs-modal-auto-install #request-filesystem-credentials-form h2,.fs-modal-auto-install #request-filesystem-credentials-form .request-filesystem-credentials-action-buttons{display:none}.fs-modal-auto-install #request-filesystem-credentials-form input[type=password],.fs-modal-auto-install #request-filesystem-credentials-form input[type=email],.fs-modal-auto-install #request-filesystem-credentials-form input[type=text]{-webkit-appearance:none;padding:10px 10px 5px 10px;width:300px;max-width:100%}.fs-modal-auto-install #request-filesystem-credentials-form>div,.fs-modal-auto-install #request-filesystem-credentials-form label,.fs-modal-auto-install #request-filesystem-credentials-form fieldset{width:300px;max-width:100%;margin:0 auto;display:block}.button-primary.warn{box-shadow:0 1px 0 #d2593c;text-shadow:0 -1px 1px #d2593c,1px 0 1px #d2593c,0 1px 1px #d2593c,-1px 0 1px #d2593c;background:#f56a48;border-color:#ec6544 #d2593c #d2593c}.button-primary.warn:hover{background:#fd6d4a;border-color:#d2593c}.button-primary.warn:focus{box-shadow:0 1px 0 #dd6041,0 0 2px 1px #e4a796}.button-primary.warn:active{background:#dd6041;border-color:#d2593c;box-shadow:inset 0 2px 0 #d2593c}.button-primary.warn.disabled{color:#f5b3a1 !important;background:#e76444 !important;border-color:#d85e40 !important;text-shadow:0 -1px 0 rgba(0,0,0,0.1) !important}
1
+ .fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,0.6)}.fs-modal .dashicons{vertical-align:middle}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media (max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal.fs-success .fs-modal-header{border-bottom-color:#46b450}.fs-modal.fs-success .fs-modal-body{background-color:#f7fff7}.fs-modal.fs-warn .fs-modal-header{border-bottom-color:#ffb900}.fs-modal.fs-warn .fs-modal-body{background-color:#fff8e5}.fs-modal.fs-error .fs-modal-header{border-bottom-color:#dc3232}.fs-modal.fs-error .fs-modal-body{background-color:#ffeaea}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-header{border-bottom:#eeeeee solid 1px;background:#fbfbfb;padding:15px 20px;position:relative;margin-bottom:-10px}.fs-modal .fs-modal-header h4{margin:0;padding:0;text-transform:uppercase;font-size:1.2em;font-weight:bold;color:#cacaca;text-shadow:1px 1px 1px #fff;letter-spacing:0.6px;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{position:absolute;right:10px;top:12px;cursor:pointer;color:#bbb;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;padding:3px;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{color:#fff;background:#aaa}.fs-modal .fs-modal-header .fs-close .dashicons,.fs-modal .fs-modal-header .fs-close:hover .dashicons{text-decoration:none}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px;line-height:1.5em}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eeeeee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel>.notice.inline{margin:0;display:none}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{right:auto;left:20px}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .reason-input,.fs-modal.fs-modal-deactivation-feedback .internal-message{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea,.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea{width:100%}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;padding:7px;display:none}@media (max-width: 650px){.fs-modal.fs-modal-deactivation-feedback li.reason li.reason{margin-bottom:10px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .internal-message{margin-left:29px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label{display:table}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label{float:left}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0 !important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{margin-top:0;line-height:1.5em}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-subscription-cancellation .fs-price-increase-warning{color:red;font-weight:bold;padding:0 25px;margin-bottom:0}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:left;top:5px;position:relative}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:right}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{display:block;margin-left:24px}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{margin-left:0;margin-right:24px}.fs-modal.fs-modal-license-activation .fs-modal-body input.fs-license-key{width:100%}.fs-license-options-container table,.fs-license-options-container table select,.fs-license-options-container table .fs-available-license-key{width:100%}.fs-license-options-container table td:first-child{width:1%}.fs-license-options-container table .fs-other-license-key-container label{position:relative;top:6px;float:left;margin-right:5px}.fs-license-options-container table .fs-other-license-key-container div{overflow:hidden;width:auto;height:30px;display:block;top:2px;position:relative}.fs-license-options-container table .fs-other-license-key-container div input{margin:0}.fs-sites-list-container td{cursor:pointer}.fs-modal.fs-modal-user-change .fs-modal-body input#fs_other_email_address{width:100%}.fs-user-change-options-container table{width:100%;border-collapse:collapse}.fs-user-change-options-container table tr{display:block;margin-bottom:2px}.fs-user-change-options-container table .fs-email-address-container td{display:inline-block}.fs-user-change-options-container table .fs-email-address-container input[type="radio"]{margin-bottom:0;margin-top:0}.fs-user-change-options-container table .fs-other-email-address-container{width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div{display:table;width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div label,.fs-user-change-options-container table .fs-other-email-address-container>div>div{display:table-cell}.fs-user-change-options-container table .fs-other-email-address-container>div label{width:1%;padding-left:3px;padding-right:3px}.fs-user-change-options-container table .fs-other-email-address-container>div>div{width:auto}.fs-user-change-options-container table .fs-other-email-address-container>div>div input{width:100%}.fs-modal.fs-modal-developer-license-debug-mode .fs-modal-body input.fs-license-or-user-key{width:100%}.fs-multisite-options-container{margin-top:10px;border:1px solid #ccc;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:bold}.fs-multisite-options-container.fs-apply-on-all-sites{border:0 none;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-modal.fs-modal-license-key-resend .email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend.fs-freemium input.email-address{width:300px}.fs-modal.fs-modal-license-key-resend.fs-freemium label{display:block;margin-bottom:10px}.fs-modal.fs-modal-license-key-resend.fs-premium input.email-address{width:100%}.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{float:right;margin-left:7px}@media (max-width: 650px){.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{margin-top:2px}}
2
+ .rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{padding-left:2px;padding-right:0}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:left;margin-right:7px;margin-left:0}a.show-license-resend-modal{margin-top:4px;display:inline-block}.fs-ajax-loader{position:relative;width:170px;height:20px;margin:auto}.fs-ajax-loader .fs-ajax-loader-bar{position:absolute;top:0;background-color:#0074a3;width:20px;height:20px;-webkit-animation-name:bounce_ajaxLoader;-moz-animation-name:bounce_ajaxLoader;-ms-animation-name:bounce_ajaxLoader;-o-animation-name:bounce_ajaxLoader;animation-name:bounce_ajaxLoader;-webkit-animation-duration:1.5s;-moz-animation-duration:1.5s;-ms-animation-duration:1.5s;-o-animation-duration:1.5s;animation-duration:1.5s;animation-iteration-count:infinite;-o-animation-iteration-count:infinite;-ms-animation-iteration-count:infinite;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;-webkit-animation-direction:normal;-moz-animation-direction:normal;-ms-animation-direction:normal;-o-animation-direction:normal;animation-direction:normal;-moz-transform:0.3;-o-transform:0.3;-ms-transform:0.3;-webkit-transform:0.3;transform:0.3}.fs-ajax-loader .fs-ajax-loader-bar-1{left:0px;animation-delay:0.6s;-o-animation-delay:0.6s;-ms-animation-delay:0.6s;-webkit-animation-delay:0.6s;-moz-animation-delay:0.6s}.fs-ajax-loader .fs-ajax-loader-bar-2{left:19px;animation-delay:0.75s;-o-animation-delay:0.75s;-ms-animation-delay:0.75s;-webkit-animation-delay:0.75s;-moz-animation-delay:0.75s}.fs-ajax-loader .fs-ajax-loader-bar-3{left:38px;animation-delay:0.9s;-o-animation-delay:0.9s;-ms-animation-delay:0.9s;-webkit-animation-delay:0.9s;-moz-animation-delay:0.9s}.fs-ajax-loader .fs-ajax-loader-bar-4{left:57px;animation-delay:1.05s;-o-animation-delay:1.05s;-ms-animation-delay:1.05s;-webkit-animation-delay:1.05s;-moz-animation-delay:1.05s}.fs-ajax-loader .fs-ajax-loader-bar-5{left:76px;animation-delay:1.2s;-o-animation-delay:1.2s;-ms-animation-delay:1.2s;-webkit-animation-delay:1.2s;-moz-animation-delay:1.2s}.fs-ajax-loader .fs-ajax-loader-bar-6{left:95px;animation-delay:1.35s;-o-animation-delay:1.35s;-ms-animation-delay:1.35s;-webkit-animation-delay:1.35s;-moz-animation-delay:1.35s}.fs-ajax-loader .fs-ajax-loader-bar-7{left:114px;animation-delay:1.5s;-o-animation-delay:1.5s;-ms-animation-delay:1.5s;-webkit-animation-delay:1.5s;-moz-animation-delay:1.5s}.fs-ajax-loader .fs-ajax-loader-bar-8{left:133px;animation-delay:1.65s;-o-animation-delay:1.65s;-ms-animation-delay:1.65s;-webkit-animation-delay:1.65s;-moz-animation-delay:1.65s}@-moz-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-ms-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-o-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-webkit-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}.fs-modal-auto-install #request-filesystem-credentials-form h2,.fs-modal-auto-install #request-filesystem-credentials-form .request-filesystem-credentials-action-buttons{display:none}.fs-modal-auto-install #request-filesystem-credentials-form input[type=password],.fs-modal-auto-install #request-filesystem-credentials-form input[type=email],.fs-modal-auto-install #request-filesystem-credentials-form input[type=text]{-webkit-appearance:none;padding:10px 10px 5px 10px;width:300px;max-width:100%}.fs-modal-auto-install #request-filesystem-credentials-form>div,.fs-modal-auto-install #request-filesystem-credentials-form label,.fs-modal-auto-install #request-filesystem-credentials-form fieldset{width:300px;max-width:100%;margin:0 auto;display:block}.button-primary.warn{box-shadow:0 1px 0 #d2593c;text-shadow:0 -1px 1px #d2593c,1px 0 1px #d2593c,0 1px 1px #d2593c,-1px 0 1px #d2593c;background:#f56a48;border-color:#ec6544 #d2593c #d2593c}.button-primary.warn:hover{background:#fd6d4a;border-color:#d2593c}.button-primary.warn:focus{box-shadow:0 1px 0 #dd6041,0 0 2px 1px #e4a796}.button-primary.warn:active{background:#dd6041;border-color:#d2593c;box-shadow:inset 0 2px 0 #d2593c}.button-primary.warn.disabled{color:#f5b3a1 !important;background:#e76444 !important;border-color:#d85e40 !important;text-shadow:0 -1px 0 rgba(0,0,0,0.1) !important}
freemius/assets/css/admin/gdpr-optin-notice.css CHANGED
@@ -1 +1 @@
1
- .fs-notice[data-id^="gdpr_optin_actions"] .underlined{text-decoration:underline}.fs-notice[data-id^="gdpr_optin_actions"] ul .button,.fs-notice[data-id^="gdpr_optin_actions"] ul .action-description{vertical-align:middle}.fs-notice[data-id^="gdpr_optin_actions"] ul .action-description{display:inline-block;margin-left:3px}
1
+ .fs-notice[data-id^="gdpr_optin_actions"] .underlined{text-decoration:underline}.fs-notice[data-id^="gdpr_optin_actions"] ul .button,.fs-notice[data-id^="gdpr_optin_actions"] ul .action-description{vertical-align:middle}.fs-notice[data-id^="gdpr_optin_actions"] ul .action-description{display:inline-block;margin-left:3px}
freemius/assets/css/admin/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/assets/css/admin/plugins.css CHANGED
@@ -1 +1 @@
1
- label.fs-tag,span.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn,span.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-info,span.fs-tag.fs-info{background:#00a0d2}label.fs-tag.fs-success,span.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error,span.fs-tag.fs-error{background:#dc3232}.wp-list-table.plugins .plugin-title span.fs-tag{display:inline-block;margin-left:5px;line-height:10px}
1
+ label.fs-tag,span.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn,span.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-info,span.fs-tag.fs-info{background:#00a0d2}label.fs-tag.fs-success,span.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error,span.fs-tag.fs-error{background:#dc3232}.wp-list-table.plugins .plugin-title span.fs-tag{display:inline-block;margin-left:5px;line-height:10px}
freemius/assets/css/customizer.css CHANGED
@@ -1 +1 @@
1
- #fs_customizer_upsell .fs-customizer-plan{padding:10px 20px 20px 20px;border-radius:3px;background:#fff}#fs_customizer_upsell .fs-customizer-plan h2{position:relative;margin:0;line-height:2em;text-transform:uppercase}#fs_customizer_upsell .fs-customizer-plan h2 .button-link{top:-2px}#fs_customizer_upsell .fs-feature{position:relative}#fs_customizer_upsell .dashicons-yes{color:#0085ba;font-size:2em;vertical-align:bottom;margin-left:-7px;margin-right:10px}.rtl #fs_customizer_upsell .dashicons-yes{margin-left:10px;margin-right:-7px}#fs_customizer_upsell .dashicons-editor-help{color:#bbb;cursor:help}#fs_customizer_upsell .dashicons-editor-help .fs-feature-desc{opacity:0;visibility:hidden;-moz-transition:opacity 0.3s ease-in-out;-o-transition:opacity 0.3s ease-in-out;-ms-transition:opacity 0.3s ease-in-out;-webkit-transition:opacity 0.3s ease-in-out;transition:opacity 0.3s ease-in-out;position:absolute;background:#000;color:#fff;font-family:'arial', serif;font-size:12px;padding:10px;z-index:999999;bottom:100%;margin-bottom:5px;left:0;right:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);line-height:1.3em;font-weight:bold;text-align:left}.rtl #fs_customizer_upsell .dashicons-editor-help .fs-feature-desc{text-align:right}#fs_customizer_upsell .dashicons-editor-help .fs-feature-desc::after{content:' ';display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:#000 transparent transparent transparent;position:absolute;top:100%;left:21px}.rtl #fs_customizer_upsell .dashicons-editor-help .fs-feature-desc::after{right:21px;left:auto}#fs_customizer_upsell .dashicons-editor-help:hover .fs-feature-desc{visibility:visible;opacity:1}#fs_customizer_upsell .button-primary{display:block;text-align:center;margin-top:10px}#fs_customizer_support{display:block !important}#fs_customizer_support .button{float:right}#fs_customizer_support .button-group{width:100%;display:block;margin-top:10px}#fs_customizer_support .button-group .button{float:none;width:50%;text-align:center}#customize-theme-controls #accordion-section-freemius_upsell{border-top:1px solid #0085ba !important;border-bottom:1px solid #0085ba !important}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title{color:#fff;background-color:#0085ba;border-left:4px solid #0085ba;transition:.15s background-color ease-in-out, .15s border-color ease-in-out;outline:none;border-bottom:none !important}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title:hover{background-color:#008ec2;border-left-color:#0073aa}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title:after{color:#fff}#customize-theme-controls #accordion-section-freemius_upsell .rtl h3.accordion-section-title{border-left:none;border-right:4px solid #0085ba}#customize-theme-controls #accordion-section-freemius_upsell .rtl h3.accordion-section-title:hover{border-right-color:#0073aa}
1
+ #fs_customizer_upsell .fs-customizer-plan{padding:10px 20px 20px 20px;border-radius:3px;background:#fff}#fs_customizer_upsell .fs-customizer-plan h2{position:relative;margin:0;line-height:2em;text-transform:uppercase}#fs_customizer_upsell .fs-customizer-plan h2 .button-link{top:-2px}#fs_customizer_upsell .fs-feature{position:relative}#fs_customizer_upsell .dashicons-yes{color:#0085ba;font-size:2em;vertical-align:bottom;margin-left:-7px;margin-right:10px}.rtl #fs_customizer_upsell .dashicons-yes{margin-left:10px;margin-right:-7px}#fs_customizer_upsell .dashicons-editor-help{color:#bbb;cursor:help}#fs_customizer_upsell .dashicons-editor-help .fs-feature-desc{opacity:0;visibility:hidden;-moz-transition:opacity 0.3s ease-in-out;-o-transition:opacity 0.3s ease-in-out;-ms-transition:opacity 0.3s ease-in-out;-webkit-transition:opacity 0.3s ease-in-out;transition:opacity 0.3s ease-in-out;position:absolute;background:#000;color:#fff;font-family:'arial', serif;font-size:12px;padding:10px;z-index:999999;bottom:100%;margin-bottom:5px;left:0;right:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);line-height:1.3em;font-weight:bold;text-align:left}.rtl #fs_customizer_upsell .dashicons-editor-help .fs-feature-desc{text-align:right}#fs_customizer_upsell .dashicons-editor-help .fs-feature-desc::after{content:' ';display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:#000 transparent transparent transparent;position:absolute;top:100%;left:21px}.rtl #fs_customizer_upsell .dashicons-editor-help .fs-feature-desc::after{right:21px;left:auto}#fs_customizer_upsell .dashicons-editor-help:hover .fs-feature-desc{visibility:visible;opacity:1}#fs_customizer_upsell .button-primary{display:block;text-align:center;margin-top:10px}#fs_customizer_support{display:block !important}#fs_customizer_support .button{float:right}#fs_customizer_support .button-group{width:100%;display:block;margin-top:10px}#fs_customizer_support .button-group .button{float:none;width:50%;text-align:center}#customize-theme-controls #accordion-section-freemius_upsell{border-top:1px solid #0085ba !important;border-bottom:1px solid #0085ba !important}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title{color:#fff;background-color:#0085ba;border-left:4px solid #0085ba;transition:.15s background-color ease-in-out, .15s border-color ease-in-out;outline:none;border-bottom:none !important}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title:hover{background-color:#008ec2;border-left-color:#0073aa}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title:after{color:#fff}#customize-theme-controls #accordion-section-freemius_upsell .rtl h3.accordion-section-title{border-left:none;border-right:4px solid #0085ba}#customize-theme-controls #accordion-section-freemius_upsell .rtl h3.accordion-section-title:hover{border-right-color:#0073aa}
freemius/assets/css/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/assets/img/foogallery.jpg ADDED
Binary file
freemius/assets/img/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/assets/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/assets/js/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/assets/js/nojquery.ba-postmessage.js CHANGED
@@ -1,140 +1,140 @@
1
- /*!
2
- * jQuery postMessage - v0.5 - 9/11/2009
3
- * http://benalman.com/projects/jquery-postmessage-plugin/
4
- *
5
- * Copyright (c) 2009 "Cowboy" Ben Alman
6
- * Dual licensed under the MIT and GPL licenses.
7
- * http://benalman.com/about/license/
8
- *
9
- * Non-jQuery fork by Jeff Lee
10
- *
11
- * This fork consists of the following changes:
12
- * 1. Basic code cleanup and restructuring, for legibility.
13
- * 2. The `postMessage` and `receiveMessage` functions can be bound arbitrarily,
14
- * in terms of both function names and object scope. Scope is specified by
15
- * the the "this" context of NoJQueryPostMessageMixin();
16
- * 3. I've removed the check for Opera 9.64, which used `$.browser`. There were
17
- * at least three different GitHub users requesting the removal of this
18
- * "Opera sniff" on the original project's Issues page, so I figured this
19
- * would be a relatively safe change.
20
- * 4. `postMessage` no longer uses `$.param` to serialize messages that are not
21
- * strings. I actually prefer this structure anyway. `receiveMessage` does
22
- * not implement a corresponding deserialization step, and as such it seems
23
- * cleaner and more symmetric to leave both data serialization and
24
- * deserialization to the client.
25
- * 5. The use of `$.isFunction` is replaced by a functionally-identical check.
26
- * 6. The `$:nomunge` YUI option is no longer necessary.
27
- */
28
-
29
- function NoJQueryPostMessageMixin(postBinding, receiveBinding) {
30
-
31
- var setMessageCallback, unsetMessageCallback, currentMsgCallback,
32
- intervalId, lastHash, cacheBust = 1;
33
-
34
- if (window.postMessage) {
35
-
36
- if (window.addEventListener) {
37
- setMessageCallback = function(callback) {
38
- window.addEventListener('message', callback, false);
39
- }
40
-
41
- unsetMessageCallback = function(callback) {
42
- window.removeEventListener('message', callback, false);
43
- }
44
- } else {
45
- setMessageCallback = function(callback) {
46
- window.attachEvent('onmessage', callback);
47
- }
48
-
49
- unsetMessageCallback = function(callback) {
50
- window.detachEvent('onmessage', callback);
51
- }
52
- }
53
-
54
- this[postBinding] = function(message, targetUrl, target) {
55
- if (!targetUrl) {
56
- return;
57
- }
58
-
59
- // The browser supports window.postMessage, so call it with a targetOrigin
60
- // set appropriately, based on the targetUrl parameter.
61
- target.postMessage( message, targetUrl.replace( /([^:]+:\/\/[^\/]+).*/, '$1' ) );
62
- }
63
-
64
- // Since the browser supports window.postMessage, the callback will be
65
- // bound to the actual event associated with window.postMessage.
66
- this[receiveBinding] = function(callback, sourceOrigin, delay) {
67
- // Unbind an existing callback if it exists.
68
- if (currentMsgCallback) {
69
- unsetMessageCallback(currentMsgCallback);
70
- currentMsgCallback = null;
71
- }
72
-
73
- if (!callback) {
74
- return false;
75
- }
76
-
77
- // Bind the callback. A reference to the callback is stored for ease of
78
- // unbinding.
79
- currentMsgCallback = setMessageCallback(function(e) {
80
- switch(Object.prototype.toString.call(sourceOrigin)) {
81
- case '[object String]':
82
- if (sourceOrigin !== e.origin) {
83
- return false;
84
- }
85
- break;
86
- case '[object Function]':
87
- if (sourceOrigin(e.origin)) {
88
- return false;
89
- }
90
- break;
91
- }
92
-
93
- callback(e);
94
- });
95
- };
96
-
97
- } else {
98
-
99
- this[postBinding] = function(message, targetUrl, target) {
100
- if (!targetUrl) {
101
- return;
102
- }
103
-
104
- // The browser does not support window.postMessage, so set the location
105
- // of the target to targetUrl#message. A bit ugly, but it works! A cache
106
- // bust parameter is added to ensure that repeat messages trigger the
107
- // callback.
108
- target.location = targetUrl.replace( /#.*$/, '' ) + '#' + (+new Date) + (cacheBust++) + '&' + message;
109
- }
110
-
111
- // Since the browser sucks, a polling loop will be started, and the
112
- // callback will be called whenever the location.hash changes.
113
- this[receiveBinding] = function(callback, sourceOrigin, delay) {
114
- if (intervalId) {
115
- clearInterval(intervalId);
116
- intervalId = null;
117
- }
118
-
119
- if (callback) {
120
- delay = typeof sourceOrigin === 'number'
121
- ? sourceOrigin
122
- : typeof delay === 'number'
123
- ? delay
124
- : 100;
125
-
126
- intervalId = setInterval(function(){
127
- var hash = document.location.hash,
128
- re = /^#?\d+&/;
129
- if ( hash !== lastHash && re.test( hash ) ) {
130
- lastHash = hash;
131
- callback({ data: hash.replace( re, '' ) });
132
- }
133
- }, delay );
134
- }
135
- };
136
-
137
- }
138
-
139
- return this;
140
  }
1
+ /*!
2
+ * jQuery postMessage - v0.5 - 9/11/2009
3
+ * http://benalman.com/projects/jquery-postmessage-plugin/
4
+ *
5
+ * Copyright (c) 2009 "Cowboy" Ben Alman
6
+ * Dual licensed under the MIT and GPL licenses.
7
+ * http://benalman.com/about/license/
8
+ *
9
+ * Non-jQuery fork by Jeff Lee
10
+ *
11
+ * This fork consists of the following changes:
12
+ * 1. Basic code cleanup and restructuring, for legibility.
13
+ * 2. The `postMessage` and `receiveMessage` functions can be bound arbitrarily,
14
+ * in terms of both function names and object scope. Scope is specified by
15
+ * the the "this" context of NoJQueryPostMessageMixin();
16
+ * 3. I've removed the check for Opera 9.64, which used `$.browser`. There were
17
+ * at least three different GitHub users requesting the removal of this
18
+ * "Opera sniff" on the original project's Issues page, so I figured this
19
+ * would be a relatively safe change.
20
+ * 4. `postMessage` no longer uses `$.param` to serialize messages that are not
21
+ * strings. I actually prefer this structure anyway. `receiveMessage` does
22
+ * not implement a corresponding deserialization step, and as such it seems
23
+ * cleaner and more symmetric to leave both data serialization and
24
+ * deserialization to the client.
25
+ * 5. The use of `$.isFunction` is replaced by a functionally-identical check.
26
+ * 6. The `$:nomunge` YUI option is no longer necessary.
27
+ */
28
+
29
+ function NoJQueryPostMessageMixin(postBinding, receiveBinding) {
30
+
31
+ var setMessageCallback, unsetMessageCallback, currentMsgCallback,
32
+ intervalId, lastHash, cacheBust = 1;
33
+
34
+ if (window.postMessage) {
35
+
36
+ if (window.addEventListener) {
37
+ setMessageCallback = function(callback) {
38
+ window.addEventListener('message', callback, false);
39
+ }
40
+
41
+ unsetMessageCallback = function(callback) {
42
+ window.removeEventListener('message', callback, false);
43
+ }
44
+ } else {
45
+ setMessageCallback = function(callback) {
46
+ window.attachEvent('onmessage', callback);
47
+ }
48
+
49
+ unsetMessageCallback = function(callback) {
50
+ window.detachEvent('onmessage', callback);
51
+ }
52
+ }
53
+
54
+ this[postBinding] = function(message, targetUrl, target) {
55
+ if (!targetUrl) {
56
+ return;
57
+ }
58
+
59
+ // The browser supports window.postMessage, so call it with a targetOrigin
60
+ // set appropriately, based on the targetUrl parameter.
61
+ target.postMessage( message, targetUrl.replace( /([^:]+:\/\/[^\/]+).*/, '$1' ) );
62
+ }
63
+
64
+ // Since the browser supports window.postMessage, the callback will be
65
+ // bound to the actual event associated with window.postMessage.
66
+ this[receiveBinding] = function(callback, sourceOrigin, delay) {
67
+ // Unbind an existing callback if it exists.
68
+ if (currentMsgCallback) {
69
+ unsetMessageCallback(currentMsgCallback);
70
+ currentMsgCallback = null;
71
+ }
72
+
73
+ if (!callback) {
74
+ return false;
75
+ }
76
+
77
+ // Bind the callback. A reference to the callback is stored for ease of
78
+ // unbinding.
79
+ currentMsgCallback = setMessageCallback(function(e) {
80
+ switch(Object.prototype.toString.call(sourceOrigin)) {
81
+ case '[object String]':
82
+ if (sourceOrigin !== e.origin) {
83
+ return false;
84
+ }
85
+ break;
86
+ case '[object Function]':
87
+ if (sourceOrigin(e.origin)) {
88
+ return false;
89
+ }
90
+ break;
91
+ }
92
+
93
+ callback(e);
94
+ });
95
+ };
96
+
97
+ } else {
98
+
99
+ this[postBinding] = function(message, targetUrl, target) {
100
+ if (!targetUrl) {
101
+ return;
102
+ }
103
+
104
+ // The browser does not support window.postMessage, so set the location
105
+ // of the target to targetUrl#message. A bit ugly, but it works! A cache
106
+ // bust parameter is added to ensure that repeat messages trigger the
107
+ // callback.
108
+ target.location = targetUrl.replace( /#.*$/, '' ) + '#' + (+new Date) + (cacheBust++) + '&' + message;
109
+ }
110
+
111
+ // Since the browser sucks, a polling loop will be started, and the
112
+ // callback will be called whenever the location.hash changes.
113
+ this[receiveBinding] = function(callback, sourceOrigin, delay) {
114
+ if (intervalId) {
115
+ clearInterval(intervalId);
116
+ intervalId = null;
117
+ }
118
+
119
+ if (callback) {
120
+ delay = typeof sourceOrigin === 'number'
121
+ ? sourceOrigin
122
+ : typeof delay === 'number'
123
+ ? delay
124
+ : 100;
125
+
126
+ intervalId = setInterval(function(){
127
+ var hash = document.location.hash,
128
+ re = /^#?\d+&/;
129
+ if ( hash !== lastHash && re.test( hash ) ) {
130
+ lastHash = hash;
131
+ callback({ data: hash.replace( re, '' ) });
132
+ }
133
+ }, delay );
134
+ }
135
+ };
136
+
137
+ }
138
+
139
+ return this;
140
  }
freemius/assets/js/nojquery.ba-postmessage.min.js CHANGED
@@ -1,12 +1,12 @@
1
- /*
2
- * nojquery-postmessage by Jeff Lee
3
- * a non-jQuery fork of:
4
- *
5
- * jQuery postMessage - v0.5 - 9/11/2009
6
- * http://benalman.com/projects/jquery-postmessage-plugin/
7
- *
8
- * Copyright (c) 2009 "Cowboy" Ben Alman
9
- * Dual licensed under the MIT and GPL licenses.
10
- * http://benalman.com/about/license/
11
- */
12
  function NoJQueryPostMessageMixin(g,a){var b,h,e,d,f,c=1;if(window.postMessage){if(window.addEventListener){b=function(i){window.addEventListener("message",i,false)};h=function(i){window.removeEventListener("message",i,false)}}else{b=function(i){window.attachEvent("onmessage",i)};h=function(i){window.detachEvent("onmessage",i)}}this[g]=function(i,k,j){if(!k){return}j.postMessage(i,k.replace(/([^:]+:\/\/[^\/]+).*/,"$1"))};this[a]=function(k,j,i){if(e){h(e);e=null}if(!k){return false}e=b(function(l){switch(Object.prototype.toString.call(j)){case"[object String]":if(j!==l.origin){return false}break;case"[object Function]":if(j(l.origin)){return false}break}k(l)})}}else{this[g]=function(i,k,j){if(!k){return}j.location=k.replace(/#.*$/,"")+"#"+(+new Date)+(c++)+"&"+i};this[a]=function(k,j,i){if(d){clearInterval(d);d=null}if(k){i=typeof j==="number"?j:typeof i==="number"?i:100;d=setInterval(function(){var m=document.location.hash,l=/^#?\d+&/;if(m!==f&&l.test(m)){f=m;k({data:m.replace(l,"")})}},i)}}}return this};
1
+ /*
2
+ * nojquery-postmessage by Jeff Lee
3
+ * a non-jQuery fork of:
4
+ *
5
+ * jQuery postMessage - v0.5 - 9/11/2009
6
+ * http://benalman.com/projects/jquery-postmessage-plugin/
7
+ *
8
+ * Copyright (c) 2009 "Cowboy" Ben Alman
9
+ * Dual licensed under the MIT and GPL licenses.
10
+ * http://benalman.com/about/license/
11
+ */
12
  function NoJQueryPostMessageMixin(g,a){var b,h,e,d,f,c=1;if(window.postMessage){if(window.addEventListener){b=function(i){window.addEventListener("message",i,false)};h=function(i){window.removeEventListener("message",i,false)}}else{b=function(i){window.attachEvent("onmessage",i)};h=function(i){window.detachEvent("onmessage",i)}}this[g]=function(i,k,j){if(!k){return}j.postMessage(i,k.replace(/([^:]+:\/\/[^\/]+).*/,"$1"))};this[a]=function(k,j,i){if(e){h(e);e=null}if(!k){return false}e=b(function(l){switch(Object.prototype.toString.call(j)){case"[object String]":if(j!==l.origin){return false}break;case"[object Function]":if(j(l.origin)){return false}break}k(l)})}}else{this[g]=function(i,k,j){if(!k){return}j.location=k.replace(/#.*$/,"")+"#"+(+new Date)+(c++)+"&"+i};this[a]=function(k,j,i){if(d){clearInterval(d);d=null}if(k){i=typeof j==="number"?j:typeof i==="number"?i:100;d=setInterval(function(){var m=document.location.hash,l=/^#?\d+&/;if(m!==f&&l.test(m)){f=m;k({data:m.replace(l,"")})}},i)}}}return this};
freemius/assets/js/postmessage.js CHANGED
@@ -1,135 +1,135 @@
1
- (function ($, undef) {
2
- var global = this;
3
-
4
- // Namespace.
5
- global.FS = global.FS || {};
6
-
7
- global.FS.PostMessage = function ()
8
- {
9
- var
10
- _is_child = false,
11
- _postman = new NoJQueryPostMessageMixin('postMessage', 'receiveMessage'),
12
- _callbacks = {},
13
- _base_url,
14
- _parent_url = decodeURIComponent(document.location.hash.replace(/^#/, '')),
15
- _parent_subdomain = _parent_url.substring(0, _parent_url.indexOf('/', ('https://' === _parent_url.substring(0, ('https://').length)) ? 8 : 7)),
16
- _init = function () {
17
- _postman.receiveMessage(function (e) {
18
- var data = JSON.parse(e.data);
19
-
20
- if (_callbacks[data.type]) {
21
- for (var i = 0; i < _callbacks[data.type].length; i++) {
22
- // Execute type callbacks.
23
- _callbacks[data.type][i](data.data);
24
- }
25
- }
26
- }, _base_url);
27
- },
28
- _hasParent = ('' !== _parent_url),
29
- $window = $(window),
30
- $html = $('html');
31
-
32
- return {
33
- init : function (url, iframes)
34
- {
35
- _base_url = url;
36
- _init();
37
-
38
- // Automatically receive forward messages.
39
- FS.PostMessage.receiveOnce('forward', function (data){
40
- window.location = data.url;
41
- });
42
-
43
- iframes = iframes || [];
44
-
45
- if (iframes.length > 0) {
46
- $window.on('scroll', function () {
47
- for (var i = 0; i < iframes.length; i++) {
48
- FS.PostMessage.postScroll(iframes[i]);
49
- }
50
- });
51
- }
52
- },
53
- init_child : function ()
54
- {
55
- this.init(_parent_subdomain);
56
-
57
- _is_child = true;
58
-
59
- // Post height of a child right after window is loaded.
60
- $(window).bind('load', function () {
61
- FS.PostMessage.postHeight();
62
-
63
- // Post message that window was loaded.
64
- FS.PostMessage.post('loaded');
65
- });
66
- },
67
- hasParent : function ()
68
- {
69
- return _hasParent;
70
- },
71
- postHeight : function (diff, wrapper) {
72
- diff = diff || 0;
73
- wrapper = wrapper || '#wrap_section';
74
- this.post('height', {
75
- height: diff + $(wrapper).outerHeight(true)
76
- });
77
- },
78
- postScroll : function (iframe) {
79
- this.post('scroll', {
80
- top: $window.scrollTop(),
81
- height: ($window.height() - parseFloat($html.css('paddingTop')) - parseFloat($html.css('marginTop')))
82
- }, iframe);
83
- },
84
- post : function (type, data, iframe)
85
- {
86
- console.debug('PostMessage.post', type);
87
-
88
- if (iframe)
89
- {
90
- // Post to iframe.
91
- _postman.postMessage(JSON.stringify({
92
- type: type,
93
- data: data
94
- }), iframe.src, iframe.contentWindow);
95
- }
96
- else {
97
- // Post to parent.
98
- _postman.postMessage(JSON.stringify({
99
- type: type,
100
- data: data
101
- }), _parent_url, window.parent);
102
- }
103
- },
104
- receive: function (type, callback)
105
- {
106
- console.debug('PostMessage.receive', type);
107
-
108
- if (undef === _callbacks[type])
109
- _callbacks[type] = [];
110
-
111
- _callbacks[type].push(callback);
112
- },
113
- receiveOnce: function (type, callback)
114
- {
115
- if (this.is_set(type))
116
- return;
117
-
118
- this.receive(type, callback);
119
- },
120
- // Check if any callbacks assigned to a specified message type.
121
- is_set: function (type)
122
- {
123
- return (undef != _callbacks[type]);
124
- },
125
- parent_url: function ()
126
- {
127
- return _parent_url;
128
- },
129
- parent_subdomain: function ()
130
- {
131
- return _parent_subdomain;
132
- }
133
- };
134
- }();
135
  })(jQuery);
1
+ (function ($, undef) {
2
+ var global = this;
3
+
4
+ // Namespace.
5
+ global.FS = global.FS || {};
6
+
7
+ global.FS.PostMessage = function ()
8
+ {
9
+ var
10
+ _is_child = false,
11
+ _postman = new NoJQueryPostMessageMixin('postMessage', 'receiveMessage'),
12
+ _callbacks = {},
13
+ _base_url,
14
+ _parent_url = decodeURIComponent(document.location.hash.replace(/^#/, '')),
15
+ _parent_subdomain = _parent_url.substring(0, _parent_url.indexOf('/', ('https://' === _parent_url.substring(0, ('https://').length)) ? 8 : 7)),
16
+ _init = function () {
17
+ _postman.receiveMessage(function (e) {
18
+ var data = JSON.parse(e.data);
19
+
20
+ if (_callbacks[data.type]) {
21
+ for (var i = 0; i < _callbacks[data.type].length; i++) {
22
+ // Execute type callbacks.
23
+ _callbacks[data.type][i](data.data);
24
+ }
25
+ }
26
+ }, _base_url);
27
+ },
28
+ _hasParent = ('' !== _parent_url),
29
+ $window = $(window),
30
+ $html = $('html');
31
+
32
+ return {
33
+ init : function (url, iframes)
34
+ {
35
+ _base_url = url;
36
+ _init();
37
+
38
+ // Automatically receive forward messages.
39
+ FS.PostMessage.receiveOnce('forward', function (data){
40
+ window.location = data.url;
41
+ });
42
+
43
+ iframes = iframes || [];
44
+
45
+ if (iframes.length > 0) {
46
+ $window.on('scroll', function () {
47
+ for (var i = 0; i < iframes.length; i++) {
48
+ FS.PostMessage.postScroll(iframes[i]);
49
+ }
50
+ });
51
+ }
52
+ },
53
+ init_child : function ()
54
+ {
55
+ this.init(_parent_subdomain);
56
+
57
+ _is_child = true;
58
+
59
+ // Post height of a child right after window is loaded.
60
+ $(window).bind('load', function () {
61
+ FS.PostMessage.postHeight();
62
+
63
+ // Post message that window was loaded.
64
+ FS.PostMessage.post('loaded');
65
+ });
66
+ },
67
+ hasParent : function ()
68
+ {
69
+ return _hasParent;
70
+ },
71
+ postHeight : function (diff, wrapper) {
72
+ diff = diff || 0;
73
+ wrapper = wrapper || '#wrap_section';
74
+ this.post('height', {
75
+ height: diff + $(wrapper).outerHeight(true)
76
+ });
77
+ },
78
+ postScroll : function (iframe) {
79
+ this.post('scroll', {
80
+ top: $window.scrollTop(),
81
+ height: ($window.height() - parseFloat($html.css('paddingTop')) - parseFloat($html.css('marginTop')))
82
+ }, iframe);
83
+ },
84
+ post : function (type, data, iframe)
85
+ {
86
+ console.debug('PostMessage.post', type);
87
+
88
+ if (iframe)
89
+ {
90
+ // Post to iframe.
91
+ _postman.postMessage(JSON.stringify({
92
+ type: type,
93
+ data: data
94
+ }), iframe.src, iframe.contentWindow);
95
+ }
96
+ else {
97
+ // Post to parent.
98
+ _postman.postMessage(JSON.stringify({
99
+ type: type,
100
+ data: data
101
+ }), _parent_url, window.parent);
102
+ }
103
+ },
104
+ receive: function (type, callback)
105
+ {
106
+ console.debug('PostMessage.receive', type);
107
+
108
+ if (undef === _callbacks[type])
109
+ _callbacks[type] = [];
110
+
111
+ _callbacks[type].push(callback);
112
+ },
113
+ receiveOnce: function (type, callback)
114
+ {
115
+ if (this.is_set(type))
116
+ return;
117
+
118
+ this.receive(type, callback);
119
+ },
120
+ // Check if any callbacks assigned to a specified message type.
121
+ is_set: function (type)
122
+ {
123
+ return (undef != _callbacks[type]);
124
+ },
125
+ parent_url: function ()
126
+ {
127
+ return _parent_url;
128
+ },
129
+ parent_subdomain: function ()
130
+ {
131
+ return _parent_subdomain;
132
+ }
133
+ };
134
+ }();
135
  })(jQuery);
freemius/includes/class-freemius-abstract.php CHANGED
@@ -1,597 +1,597 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.7
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
-
14
- /**
15
- * - Each instance of Freemius class represents a single plugin
16
- * install by a single user (the installer of the plugin).
17
- *
18
- * - Each website can only have one install of the same plugin.
19
- *
20
- * - Install entity is only created after a user connects his account with Freemius.
21
- *
22
- * Class Freemius_Abstract
23
- */
24
- abstract class Freemius_Abstract {
25
-
26
- #----------------------------------------------------------------------------------
27
- #region Identity
28
- #----------------------------------------------------------------------------------
29
-
30
- /**
31
- * Check if user has connected his account (opted-in).
32
- *
33
- * Note:
34
- * If the user opted-in and opted-out on a later stage,
35
- * this will still return true. If you want to check if the
36
- * user is currently opted-in, use:
37
- * `$fs->is_registered() && $fs->is_tracking_allowed()`
38
- *
39
- * @since 1.0.1
40
- * @return bool
41
- */
42
- abstract function is_registered();
43
-
44
- /**
45
- * Check if the user skipped connecting the account with Freemius.
46
- *
47
- * @since 1.0.7
48
- *
49
- * @return bool
50
- */
51
- abstract function is_anonymous();
52
-
53
- /**
54
- * Check if the user currently in activation mode.
55
- *
56
- * @since 1.0.7
57
- *
58
- * @return bool
59
- */
60
- abstract function is_activation_mode();
61
-
62
- #endregion
63
-
64
- #----------------------------------------------------------------------------------
65
- #region Usage Tracking
66
- #----------------------------------------------------------------------------------
67
-
68
- /**
69
- * Returns TRUE if the user opted-in and didn't disconnect (opt-out).
70
- *
71
- * @author Leo Fajardo (@leorw)
72
- * @since 1.2.1.5
73
- *
74
- * @return bool
75
- */
76
- abstract function is_tracking_allowed();
77
-
78
- /**
79
- * Returns TRUE if the user never opted-in or manually opted-out.
80
- *
81
- * @author Vova Feldman (@svovaf)
82
- * @since 1.2.1.5
83
- *
84
- * @return bool
85
- */
86
- function is_tracking_prohibited() {
87
- return ! $this->is_registered() || ! $this->is_tracking_allowed();
88
- }
89
-
90
- /**
91
- * Opt-out from usage tracking.
92
- *
93
- * Note: This will not delete the account information but will stop all tracking.
94
- *
95
- * Returns:
96
- * 1. FALSE - If the user never opted-in.
97
- * 2. TRUE - If successfully opted-out.
98
- * 3. object - API Result on failure.
99
- *
100
- * @author Leo Fajardo (@leorw)
101
- * @since 1.2.1.5
102
- *
103
- * @return bool|object
104
- */
105
- abstract function stop_tracking();
106
-
107
- /**
108
- * Opt-in back into usage tracking.
109
- *
110
- * Note: This will only work if the user opted-in previously.
111
- *
112
- * Returns:
113
- * 1. FALSE - If the user never opted-in.
114
- * 2. TRUE - If successfully opted-in back to usage tracking.
115
- * 3. object - API result on failure.
116
- *
117
- * @author Leo Fajardo (@leorw)
118
- * @since 1.2.1.5
119
- *
120
- * @return bool|object
121
- */
122
- abstract function allow_tracking();
123
-
124
- #endregion
125
-
126
- #----------------------------------------------------------------------------------
127
- #region Module Type
128
- #----------------------------------------------------------------------------------
129
-
130
- /**
131
- * Checks if the plugin's type is "plugin". The other type is "theme".
132
- *
133
- * @author Leo Fajardo (@leorw)
134
- * @since 1.2.2
135
- *
136
- * @return bool
137
- */
138
- abstract function is_plugin();
139
-
140
- /**
141
- * Checks if the module type is "theme". The other type is "plugin".
142
- *
143
- * @author Leo Fajardo (@leorw)
144
- * @since 1.2.2
145
- *
146
- * @return bool
147
- */
148
- function is_theme() {
149
- return ( ! $this->is_plugin() );
150
- }
151
-
152
- #endregion
153
-
154
- #----------------------------------------------------------------------------------
155
- #region Permissions
156
- #----------------------------------------------------------------------------------
157
-
158
- /**
159
- * Check if plugin must be WordPress.org compliant.
160
- *
161
- * @since 1.0.7
162
- *
163
- * @return bool
164
- */
165
- abstract function is_org_repo_compliant();
166
-
167
- /**
168
- * Check if plugin is allowed to install executable files.
169
- *
170
- * @author Vova Feldman (@svovaf)
171
- * @since 1.0.5
172
- *
173
- * @return bool
174
- */
175
- function is_allowed_to_install() {
176
- return ( $this->is_premium() || ! $this->is_org_repo_compliant() );
177
- }
178
-
179
- #endregion
180
-
181
- /**
182
- * Check if user in trial or in free plan (not paying).
183
- *
184
- * @author Vova Feldman (@svovaf)
185
- * @since 1.0.4
186
- *
187
- * @return bool
188
- */
189
- function is_not_paying() {
190
- return ( $this->is_trial() || $this->is_free_plan() );
191
- }
192
-
193
- /**
194
- * Check if the user has an activated and valid paid license on current plugin's install.
195
- *
196
- * @since 1.0.9
197
- *
198
- * @return bool
199
- */
200
- abstract function is_paying();
201
-
202
- /**
203
- * Check if the user is paying or in trial.
204
- *
205
- * @since 1.0.9
206
- *
207
- * @return bool
208
- */
209
- function is_paying_or_trial() {
210
- return ( $this->is_paying() || $this->is_trial() );
211
- }
212
-
213
- /**
214
- * Check if user in a trial or have feature enabled license.
215
- *
216
- * @author Vova Feldman (@svovaf)
217
- * @since 1.1.7
218
- *
219
- * @return bool
220
- */
221
- abstract function can_use_premium_code();
222
-
223
- #----------------------------------------------------------------------------------
224
- #region Premium Only
225
- #----------------------------------------------------------------------------------
226
-
227
- /**
228
- * All logic wrapped in methods with "__premium_only()" suffix will be only
229
- * included in the premium code.
230
- *
231
- * Example:
232
- * if ( freemius()->is__premium_only() ) {
233
- * ...
234
- * }
235
- */
236
-
237
- /**
238
- * Returns true when running premium plugin code.
239
- *
240
- * @since 1.0.9
241
- *
242
- * @return bool
243
- */
244
- function is__premium_only() {
245
- return $this->is_premium();
246
- }
247
-
248
- /**
249
- * Check if the user has an activated and valid paid license on current plugin's install.
250
- *
251
- * @since 1.0.9
252
- *
253
- * @return bool
254
- *
255
- */
256
- function is_paying__premium_only() {
257
- return ( $this->is__premium_only() && $this->is_paying() );
258
- }
259
-
260
- /**
261
- * All code wrapped in this statement will be only included in the premium code.
262
- *
263
- * @since 1.0.9
264
- *
265
- * @param string $plan Plan name.
266
- * @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
267
- *
268
- * @return bool
269
- */
270
- function is_plan__premium_only( $plan, $exact = false ) {
271
- return ( $this->is_premium() && $this->is_plan( $plan, $exact ) );
272
- }
273
-
274
- /**
275
- * Check if plan matches active license' plan or active trial license' plan.
276
- *
277
- * All code wrapped in this statement will be only included in the premium code.
278
- *
279
- * @since 1.0.9
280
- *
281
- * @param string $plan Plan name.
282
- * @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
283
- *
284
- * @return bool
285
- */
286
- function is_plan_or_trial__premium_only( $plan, $exact = false ) {
287
- return ( $this->is_premium() && $this->is_plan_or_trial( $plan, $exact ) );
288
- }
289
-
290
- /**
291
- * Check if the user is paying or in trial.
292
- *
293
- * All code wrapped in this statement will be only included in the premium code.
294
- *
295
- * @since 1.0.9
296
- *
297
- * @return bool
298
- */
299
- function is_paying_or_trial__premium_only() {
300
- return $this->is_premium() && $this->is_paying_or_trial();
301
- }
302
-
303
- /**
304
- * Check if the user has an activated and valid paid license on current plugin's install.
305
- *
306
- * @since 1.0.4
307
- *
308
- * @return bool
309
- *
310
- * @deprecated Method name is confusing since it's not clear from the name the code will be removed.
311
- * @using Alias to is_paying__premium_only()
312
- */
313
- function is_paying__fs__() {
314
- return $this->is_paying__premium_only();
315
- }
316
-
317
- /**
318
- * Check if user in a trial or have feature enabled license.
319
- *
320
- * All code wrapped in this statement will be only included in the premium code.
321
- *
322
- * @author Vova Feldman (@svovaf)
323
- * @since 1.1.9
324
- *
325
- * @return bool
326
- */
327
- function can_use_premium_code__premium_only() {
328
- return $this->is_premium() && $this->can_use_premium_code();
329
- }
330
-
331
- #endregion
332
-
333
- #----------------------------------------------------------------------------------
334
- #region Trial
335
- #----------------------------------------------------------------------------------
336
-
337
- /**
338
- * Check if the user in a trial.
339
- *
340
- * @since 1.0.3
341
- *
342
- * @return bool
343
- */
344
- abstract function is_trial();
345
-
346
- /**
347
- * Check if trial already utilized.
348
- *
349
- * @since 1.0.9
350
- *
351
- * @return bool
352
- */
353
- abstract function is_trial_utilized();
354
-
355
- #endregion
356
-
357
- #----------------------------------------------------------------------------------
358
- #region Plans
359
- #----------------------------------------------------------------------------------
360
-
361
- /**
362
- * Check if the user is on the free plan of the product.
363
- *
364
- * @since 1.0.4
365
- *
366
- * @return bool
367
- */
368
- abstract function is_free_plan();
369
-
370
- /**
371
- * @since 1.0.2
372
- *
373
- * @param string $plan Plan name.
374
- * @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
375
- *
376
- * @return bool
377
- */
378
- abstract function is_plan( $plan, $exact = false );
379
-
380
- /**
381
- * Check if plan based on trial. If not in trial mode, should return false.
382
- *
383
- * @since 1.0.9
384
- *
385
- * @param string $plan Plan name.
386
- * @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
387
- *
388
- * @return bool
389
- */
390
- abstract function is_trial_plan( $plan, $exact = false );
391
-
392
- /**
393
- * Check if plan matches active license' plan or active trial license' plan.
394
- *
395
- * @since 1.0.9
396
- *
397
- * @param string $plan Plan name.
398
- * @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
399
- *
400
- * @return bool
401
- */
402
- function is_plan_or_trial( $plan, $exact = false ) {
403
- return $this->is_plan( $plan, $exact ) ||
404
- $this->is_trial_plan( $plan, $exact );
405
- }
406
-
407
- /**
408
- * Check if plugin has any paid plans.
409
- *
410
- * @author Vova Feldman (@svovaf)
411
- * @since 1.0.7
412
- *
413
- * @return bool
414
- */
415
- abstract function has_paid_plan();
416
-
417
- /**
418
- * Check if plugin has any free plan, or is it premium only.
419
- *
420
- * Note: If no plans configured, assume plugin is free.
421
- *
422
- * @author Vova Feldman (@svovaf)
423
- * @since 1.0.7
424
- *
425
- * @return bool
426
- */
427
- abstract function has_free_plan();
428
-
429
- /**
430
- * Check if plugin is premium only (no free plans).
431
- *
432
- * NOTE: is__premium_only() is very different method, don't get confused.
433
- *
434
- * @author Vova Feldman (@svovaf)
435
- * @since 1.1.9
436
- *
437
- * @return bool
438
- */
439
- abstract function is_only_premium();
440
-
441
- /**
442
- * Check if module has a premium code version.
443
- *
444
- * Serviceware module might be freemium without any
445
- * premium code version, where the paid features
446
- * are all part of the service.
447
- *
448
- * @author Vova Feldman (@svovaf)
449
- * @since 1.2.1.6
450
- *
451
- * @return bool
452
- */
453
- abstract function has_premium_version();
454
-
455
- /**
456
- * Check if module has any release on Freemius,
457
- * or all plugin's code is on WordPress.org (Serviceware).
458
- *
459
- * @return bool
460
- */
461
- function has_release_on_freemius() {
462
- return ! $this->is_org_repo_compliant() ||
463
- $this->has_premium_version();
464
- }
465
-
466
- /**
467
- * Checks if it's a freemium plugin.
468
- *
469
- * @author Vova Feldman (@svovaf)
470
- * @since 1.1.9
471
- *
472
- * @return bool
473
- */
474
- function is_freemium() {
475
- return $this->has_paid_plan() &&
476
- $this->has_free_plan();
477
- }
478
-
479
- /**
480
- * Check if module has only one plan.
481
- *
482
- * @author Vova Feldman (@svovaf)
483
- * @since 1.2.1.7
484
- *
485
- * @return bool
486
- */
487
- abstract function is_single_plan();
488
-
489
- #endregion
490
-
491
- /**
492
- * Check if running payments in sandbox mode.
493
- *
494
- * @since 1.0.4
495
- *
496
- * @return bool
497
- */
498
- abstract function is_payments_sandbox();
499
-
500
- /**
501
- * Check if running test vs. live plugin.
502
- *
503
- * @since 1.0.5
504
- *
505
- * @return bool
506
- */
507
- abstract function is_live();
508
-
509
- /**
510
- * Check if running premium plugin code.
511
- *
512
- * @since 1.0.5
513
- *
514
- * @return bool
515
- */
516
- abstract function is_premium();
517
-
518
- /**
519
- * Get upgrade URL.
520
- *
521
- * @author Vova Feldman (@svovaf)
522
- * @since 1.0.2
523
- *
524
- * @param string $period Billing cycle.
525
- *
526
- * @return string
527
- */
528
- abstract function get_upgrade_url( $period = WP_FS__PERIOD_ANNUALLY );
529
-
530
- /**
531
- * Check if Freemius was first added in a plugin update.
532
- *
533
- * @author Vova Feldman (@svovaf)
534
- * @since 1.1.5
535
- *
536
- * @return bool
537
- */
538
- function is_plugin_update() {
539
- return ! $this->is_plugin_new_install();
540
- }
541
-
542
- /**
543
- * Check if Freemius was part of the plugin when the user installed it first.
544
- *
545
- * @author Vova Feldman (@svovaf)
546
- * @since 1.1.5
547
- *
548
- * @return bool
549
- */
550
- abstract function is_plugin_new_install();
551
-
552
- #----------------------------------------------------------------------------------
553
- #region Marketing
554
- #----------------------------------------------------------------------------------
555
-
556
- /**
557
- * Check if current user purchased any other plugins before.
558
- *
559
- * @author Vova Feldman (@svovaf)
560
- * @since 1.0.9
561
- *
562
- * @return bool
563
- */
564
- abstract function has_purchased_before();
565
-
566
- /**
567
- * Check if current user classified as an agency.
568
- *
569
- * @author Vova Feldman (@svovaf)
570
- * @since 1.0.9
571
- *
572
- * @return bool
573
- */
574
- abstract function is_agency();
575
-
576
- /**
577
- * Check if current user classified as a developer.
578
- *
579
- * @author Vova Feldman (@svovaf)
580
- * @since 1.0.9
581
- *
582
- * @return bool
583
- */
584
- abstract function is_developer();
585
-
586
- /**
587
- * Check if current user classified as a business.
588
- *
589
- * @author Vova Feldman (@svovaf)
590
- * @since 1.0.9
591
- *
592
- * @return bool
593
- */
594
- abstract function is_business();
595
-
596
- #endregion
597
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.0.7
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+
14
+ /**
15
+ * - Each instance of Freemius class represents a single plugin
16
+ * install by a single user (the installer of the plugin).
17
+ *
18
+ * - Each website can only have one install of the same plugin.
19
+ *
20
+ * - Install entity is only created after a user connects his account with Freemius.
21
+ *
22
+ * Class Freemius_Abstract
23
+ */
24
+ abstract class Freemius_Abstract {
25
+
26
+ #----------------------------------------------------------------------------------
27
+ #region Identity
28
+ #----------------------------------------------------------------------------------
29
+
30
+ /**
31
+ * Check if user has connected his account (opted-in).
32
+ *
33
+ * Note:
34
+ * If the user opted-in and opted-out on a later stage,
35
+ * this will still return true. If you want to check if the
36
+ * user is currently opted-in, use:
37
+ * `$fs->is_registered() && $fs->is_tracking_allowed()`
38
+ *
39
+ * @since 1.0.1
40
+ * @return bool
41
+ */
42
+ abstract function is_registered();
43
+
44
+ /**
45
+ * Check if the user skipped connecting the account with Freemius.
46
+ *
47
+ * @since 1.0.7
48
+ *
49
+ * @return bool
50
+ */
51
+ abstract function is_anonymous();
52
+
53
+ /**
54
+ * Check if the user currently in activation mode.
55
+ *
56
+ * @since 1.0.7
57
+ *
58
+ * @return bool
59
+ */
60
+ abstract function is_activation_mode();
61
+
62
+ #endregion
63
+
64
+ #----------------------------------------------------------------------------------
65
+ #region Usage Tracking
66
+ #----------------------------------------------------------------------------------
67
+
68
+ /**
69
+ * Returns TRUE if the user opted-in and didn't disconnect (opt-out).
70
+ *
71
+ * @author Leo Fajardo (@leorw)
72
+ * @since 1.2.1.5
73
+ *
74
+ * @return bool
75
+ */
76
+ abstract function is_tracking_allowed();
77
+
78
+ /**
79
+ * Returns TRUE if the user never opted-in or manually opted-out.
80
+ *
81
+ * @author Vova Feldman (@svovaf)
82
+ * @since 1.2.1.5
83
+ *
84
+ * @return bool
85
+ */
86
+ function is_tracking_prohibited() {
87
+ return ! $this->is_registered() || ! $this->is_tracking_allowed();
88
+ }
89
+
90
+ /**
91
+ * Opt-out from usage tracking.
92
+ *
93
+ * Note: This will not delete the account information but will stop all tracking.
94
+ *
95
+ * Returns:
96
+ * 1. FALSE - If the user never opted-in.
97
+ * 2. TRUE - If successfully opted-out.
98
+ * 3. object - API Result on failure.
99
+ *
100
+ * @author Leo Fajardo (@leorw)
101
+ * @since 1.2.1.5
102
+ *
103
+ * @return bool|object
104
+ */
105
+ abstract function stop_tracking();
106
+
107
+ /**
108
+ * Opt-in back into usage tracking.
109
+ *
110
+ * Note: This will only work if the user opted-in previously.
111
+ *
112
+ * Returns:
113
+ * 1. FALSE - If the user never opted-in.
114
+ * 2. TRUE - If successfully opted-in back to usage tracking.
115
+ * 3. object - API result on failure.
116
+ *
117
+ * @author Leo Fajardo (@leorw)
118
+ * @since 1.2.1.5
119
+ *
120
+ * @return bool|object
121
+ */
122
+ abstract function allow_tracking();
123
+
124
+ #endregion
125
+
126
+ #----------------------------------------------------------------------------------
127
+ #region Module Type
128
+ #----------------------------------------------------------------------------------
129
+
130
+ /**
131
+ * Checks if the plugin's type is "plugin". The other type is "theme".
132
+ *
133
+ * @author Leo Fajardo (@leorw)
134
+ * @since 1.2.2
135
+ *
136
+ * @return bool
137
+ */
138
+ abstract function is_plugin();
139
+
140
+ /**
141
+ * Checks if the module type is "theme". The other type is "plugin".
142
+ *
143
+ * @author Leo Fajardo (@leorw)
144
+ * @since 1.2.2
145
+ *
146
+ * @return bool
147
+ */
148
+ function is_theme() {
149
+ return ( ! $this->is_plugin() );
150
+ }
151
+
152
+ #endregion
153
+
154
+ #----------------------------------------------------------------------------------
155
+ #region Permissions
156
+ #----------------------------------------------------------------------------------
157
+
158
+ /**
159
+ * Check if plugin must be WordPress.org compliant.
160
+ *
161
+ * @since 1.0.7
162
+ *
163
+ * @return bool
164
+ */
165
+ abstract function is_org_repo_compliant();
166
+
167
+ /**
168
+ * Check if plugin is allowed to install executable files.
169
+ *
170
+ * @author Vova Feldman (@svovaf)
171
+ * @since 1.0.5
172
+ *
173
+ * @return bool
174
+ */
175
+ function is_allowed_to_install() {
176
+ return ( $this->is_premium() || ! $this->is_org_repo_compliant() );
177
+ }
178
+
179
+ #endregion
180
+
181
+ /**
182
+ * Check if user in trial or in free plan (not paying).
183
+ *
184
+ * @author Vova Feldman (@svovaf)
185
+ * @since 1.0.4
186
+ *
187
+ * @return bool
188
+ */
189
+ function is_not_paying() {
190
+ return ( $this->is_trial() || $this->is_free_plan() );
191
+ }
192
+
193
+ /**
194
+ * Check if the user has an activated and valid paid license on current plugin's install.
195
+ *
196
+ * @since 1.0.9
197
+ *
198
+ * @return bool
199
+ */
200
+ abstract function is_paying();
201
+
202
+ /**
203
+ * Check if the user is paying or in trial.
204
+ *
205
+ * @since 1.0.9
206
+ *
207
+ * @return bool
208
+ */
209
+ function is_paying_or_trial() {
210
+ return ( $this->is_paying() || $this->is_trial() );
211
+ }
212
+
213
+ /**
214
+ * Check if user in a trial or have feature enabled license.
215
+ *
216
+ * @author Vova Feldman (@svovaf)
217
+ * @since 1.1.7
218
+ *
219
+ * @return bool
220
+ */
221
+ abstract function can_use_premium_code();
222
+
223
+ #----------------------------------------------------------------------------------
224
+ #region Premium Only
225
+ #----------------------------------------------------------------------------------
226
+
227
+ /**
228
+ * All logic wrapped in methods with "__premium_only()" suffix will be only
229
+ * included in the premium code.
230
+ *
231
+ * Example:
232
+ * if ( freemius()->is__premium_only() ) {
233
+ * ...
234
+ * }
235
+ */
236
+
237
+ /**
238
+ * Returns true when running premium plugin code.
239
+ *
240
+ * @since 1.0.9
241
+ *
242
+ * @return bool
243
+ */
244
+ function is__premium_only() {
245
+ return $this->is_premium();
246
+ }
247
+
248
+ /**
249
+ * Check if the user has an activated and valid paid license on current plugin's install.
250
+ *
251
+ * @since 1.0.9
252
+ *
253
+ * @return bool
254
+ *
255
+ */
256
+ function is_paying__premium_only() {
257
+ return ( $this->is__premium_only() && $this->is_paying() );
258
+ }
259
+
260
+ /**
261
+ * All code wrapped in this statement will be only included in the premium code.
262
+ *
263
+ * @since 1.0.9
264
+ *
265
+ * @param string $plan Plan name.
266
+ * @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
267
+ *
268
+ * @return bool
269
+ */
270
+ function is_plan__premium_only( $plan, $exact = false ) {
271
+ return ( $this->is_premium() && $this->is_plan( $plan, $exact ) );
272
+ }
273
+
274
+ /**
275
+ * Check if plan matches active license' plan or active trial license' plan.
276
+ *
277
+ * All code wrapped in this statement will be only included in the premium code.
278
+ *
279
+ * @since 1.0.9
280
+ *
281
+ * @param string $plan Plan name.
282
+ * @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
283
+ *
284
+ * @return bool
285
+ */
286
+ function is_plan_or_trial__premium_only( $plan, $exact = false ) {
287
+ return ( $this->is_premium() && $this->is_plan_or_trial( $plan, $exact ) );
288
+ }
289
+
290
+ /**
291
+ * Check if the user is paying or in trial.
292
+ *
293
+ * All code wrapped in this statement will be only included in the premium code.
294
+ *
295
+ * @since 1.0.9
296
+ *
297
+ * @return bool
298
+ */
299
+ function is_paying_or_trial__premium_only() {
300
+ return $this->is_premium() && $this->is_paying_or_trial();
301
+ }
302
+
303
+ /**
304
+ * Check if the user has an activated and valid paid license on current plugin's install.
305
+ *
306
+ * @since 1.0.4
307
+ *
308
+ * @return bool
309
+ *
310
+ * @deprecated Method name is confusing since it's not clear from the name the code will be removed.
311
+ * @using Alias to is_paying__premium_only()
312
+ */
313
+ function is_paying__fs__() {
314
+ return $this->is_paying__premium_only();
315
+ }
316
+
317
+ /**
318
+ * Check if user in a trial or have feature enabled license.
319
+ *
320
+ * All code wrapped in this statement will be only included in the premium code.
321
+ *
322
+ * @author Vova Feldman (@svovaf)
323
+ * @since 1.1.9
324
+ *
325
+ * @return bool
326
+ */
327
+ function can_use_premium_code__premium_only() {
328
+ return $this->is_premium() && $this->can_use_premium_code();
329
+ }
330
+
331
+ #endregion
332
+
333
+ #----------------------------------------------------------------------------------
334
+ #region Trial
335
+ #----------------------------------------------------------------------------------
336
+
337
+ /**
338
+ * Check if the user in a trial.
339
+ *
340
+ * @since 1.0.3
341
+ *
342
+ * @return bool
343
+ */
344
+ abstract function is_trial();
345
+
346
+ /**
347
+ * Check if trial already utilized.
348
+ *
349
+ * @since 1.0.9
350
+ *
351
+ * @return bool
352
+ */
353
+ abstract function is_trial_utilized();
354
+
355
+ #endregion
356
+
357
+ #----------------------------------------------------------------------------------
358
+ #region Plans
359
+ #----------------------------------------------------------------------------------
360
+
361
+ /**
362
+ * Check if the user is on the free plan of the product.
363
+ *
364
+ * @since 1.0.4
365
+ *
366
+ * @return bool
367
+ */
368
+ abstract function is_free_plan();
369
+
370
+ /**
371
+ * @since 1.0.2
372
+ *
373
+ * @param string $plan Plan name.
374
+ * @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
375
+ *
376
+ * @return bool
377
+ */
378
+ abstract function is_plan( $plan, $exact = false );
379
+
380
+ /**
381
+ * Check if plan based on trial. If not in trial mode, should return false.
382
+ *
383
+ * @since 1.0.9
384
+ *
385
+ * @param string $plan Plan name.
386
+ * @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
387
+ *
388
+ * @return bool
389
+ */
390
+ abstract function is_trial_plan( $plan, $exact = false );
391
+
392
+ /**
393
+ * Check if plan matches active license' plan or active trial license' plan.
394
+ *
395
+ * @since 1.0.9
396
+ *
397
+ * @param string $plan Plan name.
398
+ * @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
399
+ *
400
+ * @return bool
401
+ */
402
+ function is_plan_or_trial( $plan, $exact = false ) {
403
+ return $this->is_plan( $plan, $exact ) ||
404
+ $this->is_trial_plan( $plan, $exact );
405
+ }
406
+
407
+ /**
408
+ * Check if plugin has any paid plans.
409
+ *
410
+ * @author Vova Feldman (@svovaf)
411
+ * @since 1.0.7
412
+ *
413
+ * @return bool
414
+ */
415
+ abstract function has_paid_plan();
416
+
417
+ /**
418
+ * Check if plugin has any free plan, or is it premium only.
419
+ *
420
+ * Note: If no plans configured, assume plugin is free.
421
+ *
422
+ * @author Vova Feldman (@svovaf)
423
+ * @since 1.0.7
424
+ *
425
+ * @return bool
426
+ */
427
+ abstract function has_free_plan();
428
+
429
+ /**
430
+ * Check if plugin is premium only (no free plans).
431
+ *
432
+ * NOTE: is__premium_only() is very different method, don't get confused.
433
+ *
434
+ * @author Vova Feldman (@svovaf)
435
+ * @since 1.1.9
436
+ *
437
+ * @return bool
438
+ */
439
+ abstract function is_only_premium();
440
+
441
+ /**
442
+ * Check if module has a premium code version.
443
+ *
444
+ * Serviceware module might be freemium without any
445
+ * premium code version, where the paid features
446
+ * are all part of the service.
447
+ *
448
+ * @author Vova Feldman (@svovaf)
449
+ * @since 1.2.1.6
450
+ *
451
+ * @return bool
452
+ */
453
+ abstract function has_premium_version();
454
+
455
+ /**
456
+ * Check if module has any release on Freemius,
457
+ * or all plugin's code is on WordPress.org (Serviceware).
458
+ *
459
+ * @return bool
460
+ */
461
+ function has_release_on_freemius() {
462
+ return ! $this->is_org_repo_compliant() ||
463
+ $this->has_premium_version();
464
+ }
465
+
466
+ /**
467
+ * Checks if it's a freemium plugin.
468
+ *
469
+ * @author Vova Feldman (@svovaf)
470
+ * @since 1.1.9
471
+ *
472
+ * @return bool
473
+ */
474
+ function is_freemium() {
475
+ return $this->has_paid_plan() &&
476
+ $this->has_free_plan();
477
+ }
478
+
479
+ /**
480
+ * Check if module has only one plan.
481
+ *
482
+ * @author Vova Feldman (@svovaf)
483
+ * @since 1.2.1.7
484
+ *
485
+ * @return bool
486
+ */
487
+ abstract function is_single_plan();
488
+
489
+ #endregion
490
+
491
+ /**
492
+ * Check if running payments in sandbox mode.
493
+ *
494
+ * @since 1.0.4
495
+ *
496
+ * @return bool
497
+ */
498
+ abstract function is_payments_sandbox();
499
+
500
+ /**
501
+ * Check if running test vs. live plugin.
502
+ *
503
+ * @since 1.0.5
504
+ *
505
+ * @return bool
506
+ */
507
+ abstract function is_live();
508
+
509
+ /**
510
+ * Check if running premium plugin code.
511
+ *
512
+ * @since 1.0.5
513
+ *
514
+ * @return bool
515
+ */
516
+ abstract function is_premium();
517
+
518
+ /**
519
+ * Get upgrade URL.
520
+ *
521
+ * @author Vova Feldman (@svovaf)
522
+ * @since 1.0.2
523
+ *
524
+ * @param string $period Billing cycle.
525
+ *
526
+ * @return string
527
+ */
528
+ abstract function get_upgrade_url( $period = WP_FS__PERIOD_ANNUALLY );
529
+
530
+ /**
531
+ * Check if Freemius was first added in a plugin update.
532
+ *
533
+ * @author Vova Feldman (@svovaf)
534
+ * @since 1.1.5
535
+ *
536
+ * @return bool
537
+ */
538
+ function is_plugin_update() {
539
+ return ! $this->is_plugin_new_install();
540
+ }
541
+
542
+ /**
543
+ * Check if Freemius was part of the plugin when the user installed it first.
544
+ *
545
+ * @author Vova Feldman (@svovaf)
546
+ * @since 1.1.5
547
+ *
548
+ * @return bool
549
+ */
550
+ abstract function is_plugin_new_install();
551
+
552
+ #----------------------------------------------------------------------------------
553
+ #region Marketing
554
+ #----------------------------------------------------------------------------------
555
+
556
+ /**
557
+ * Check if current user purchased any other plugins before.
558
+ *
559
+ * @author Vova Feldman (@svovaf)
560
+ * @since 1.0.9
561
+ *
562
+ * @return bool
563
+ */
564
+ abstract function has_purchased_before();
565
+
566
+ /**
567
+ * Check if current user classified as an agency.
568
+ *
569
+ * @author Vova Feldman (@svovaf)
570
+ * @since 1.0.9
571
+ *
572
+ * @return bool
573
+ */
574
+ abstract function is_agency();
575
+
576
+ /**
577
+ * Check if current user classified as a developer.
578
+ *
579
+ * @author Vova Feldman (@svovaf)
580
+ * @since 1.0.9
581
+ *
582
+ * @return bool
583
+ */
584
+ abstract function is_developer();
585
+
586
+ /**
587
+ * Check if current user classified as a business.
588
+ *
589
+ * @author Vova Feldman (@svovaf)
590
+ * @since 1.0.9
591
+ *
592
+ * @return bool
593
+ */
594
+ abstract function is_business();
595
+
596
+ #endregion
597
  }
freemius/includes/class-freemius.php CHANGED
@@ -4058,7 +4058,7 @@
4058
  if ( empty( $unique_id ) || ! is_string( $unique_id ) ) {
4059
  $key = fs_strip_url_protocol( get_site_url( $blog_id ) );
4060
 
4061
- $secure_auth = SECURE_AUTH_KEY;
4062
  if ( empty( $secure_auth ) ||
4063
  false !== strpos( $secure_auth, ' ' ) ||
4064
  'put your unique phrase here' === $secure_auth
4058
  if ( empty( $unique_id ) || ! is_string( $unique_id ) ) {
4059
  $key = fs_strip_url_protocol( get_site_url( $blog_id ) );
4060
 
4061
+ $secure_auth = defined( 'SECURE_AUTH_KEY' ) ? SECURE_AUTH_KEY : '';
4062
  if ( empty( $secure_auth ) ||
4063
  false !== strpos( $secure_auth, ' ' ) ||
4064
  'put your unique phrase here' === $secure_auth
freemius/includes/class-fs-admin-notices.php CHANGED
@@ -1,321 +1,321 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 2.0.0
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * WP Admin notices manager both for site level and network level.
15
- *
16
- * Class FS_Admin_Notices
17
- */
18
- class FS_Admin_Notices {
19
- /**
20
- * @since 1.2.2
21
- *
22
- * @var string
23
- */
24
- protected $_module_unique_affix;
25
- /**
26
- * @var string
27
- */
28
- protected $_id;
29
- /**
30
- * @var string
31
- */
32
- protected $_title;
33
- /**
34
- * @var FS_Admin_Notice_Manager
35
- */
36
- protected $_notices;
37
- /**
38
- * @var FS_Admin_Notice_Manager
39
- */
40
- protected $_network_notices;
41
- /**
42
- * @var int The ID of the blog that is associated with the current site level options.
43
- */
44
- private $_blog_id = 0;
45
- /**
46
- * @var bool
47
- */
48
- private $_is_multisite;
49
- /**
50
- * @var FS_Admin_Notices[]
51
- */
52
- private static $_instances = array();
53
-
54
- /**
55
- * @param string $id
56
- * @param string $title
57
- * @param string $module_unique_affix
58
- * @param bool $is_network_and_blog_admins Whether or not the message should be shown both on network and
59
- * blog admin pages.
60
- *
61
- * @return FS_Admin_Notices
62
- */
63
- static function instance( $id, $title = '', $module_unique_affix = '', $is_network_and_blog_admins = false ) {
64
- if ( ! isset( self::$_instances[ $id ] ) ) {
65
- self::$_instances[ $id ] = new FS_Admin_Notices( $id, $title, $module_unique_affix, $is_network_and_blog_admins );
66
- }
67
-
68
- return self::$_instances[ $id ];
69
- }
70
-
71
- /**
72
- * @param string $id
73
- * @param string $title
74
- * @param string $module_unique_affix
75
- * @param bool $is_network_and_blog_admins Whether or not the message should be shown both on network and
76
- * blog admin pages.
77
- */
78
- protected function __construct( $id, $title = '', $module_unique_affix = '', $is_network_and_blog_admins = false ) {
79
- $this->_id = $id;
80
- $this->_title = $title;
81
- $this->_module_unique_affix = $module_unique_affix;
82
- $this->_is_multisite = is_multisite();
83
-
84
- if ( $this->_is_multisite ) {
85
- $this->_blog_id = get_current_blog_id();
86
-
87
- $this->_network_notices = FS_Admin_Notice_Manager::instance(
88
- $id,
89
- $title,
90
- $module_unique_affix,
91
- $is_network_and_blog_admins,
92
- true
93
- );
94
- }
95
-
96
- $this->_notices = FS_Admin_Notice_Manager::instance(
97
- $id,
98
- $title,
99
- $module_unique_affix,
100
- false,
101
- $this->_blog_id
102
- );
103
- }
104
-
105
- /**
106
- * Add admin message to admin messages queue, and hook to admin_notices / all_admin_notices if not yet hooked.
107
- *
108
- * @author Vova Feldman (@svovaf)
109
- * @since 1.0.4
110
- *
111
- * @param string $message
112
- * @param string $title
113
- * @param string $type
114
- * @param bool $is_sticky
115
- * @param string $id Message ID
116
- * @param bool $store_if_sticky
117
- * @param int|null $network_level_or_blog_id
118
- *
119
- * @uses add_action()
120
- */
121
- function add(
122
- $message,
123
- $title = '',
124
- $type = 'success',
125
- $is_sticky = false,
126
- $id = '',
127
- $store_if_sticky = true,
128
- $network_level_or_blog_id = null
129
- ) {
130
- if ( $this->should_use_network_notices( $id, $network_level_or_blog_id ) ) {
131
- $notices = $this->_network_notices;
132
- } else {
133
- $notices = $this->get_site_notices( $network_level_or_blog_id );
134
- }
135
-
136
- $notices->add(
137
- $message,
138
- $title,
139
- $type,
140
- $is_sticky,
141
- $id,
142
- $store_if_sticky
143
- );
144
- }
145
-
146
- /**
147
- * @author Vova Feldman (@svovaf)
148
- * @since 1.0.7
149
- *
150
- * @param string|string[] $ids
151
- * @param int|null $network_level_or_blog_id
152
- */
153
- function remove_sticky( $ids, $network_level_or_blog_id = null ) {
154
- if ( ! is_array( $ids ) ) {
155
- $ids = array( $ids );
156
- }
157
-
158
- if ( $this->should_use_network_notices( $ids[0], $network_level_or_blog_id ) ) {
159
- $notices = $this->_network_notices;
160
- } else {
161
- $notices = $this->get_site_notices( $network_level_or_blog_id );
162
- }
163
-
164
- return $notices->remove_sticky( $ids );
165
- }
166
-
167
- /**
168
- * Check if sticky message exists by id.
169
- *
170
- * @author Vova Feldman (@svovaf)
171
- * @since 1.0.9
172
- *
173
- * @param string $id
174
- * @param int|null $network_level_or_blog_id
175
- *
176
- * @return bool
177
- */
178
- function has_sticky( $id, $network_level_or_blog_id = null ) {
179
- if ( $this->should_use_network_notices( $id, $network_level_or_blog_id ) ) {
180
- $notices = $this->_network_notices;
181
- } else {
182
- $notices = $this->get_site_notices( $network_level_or_blog_id );
183
- }
184
-
185
- return $notices->has_sticky( $id );
186
- }
187
-
188
- /**
189
- * Adds sticky admin notification.
190
- *
191
- * @author Vova Feldman (@svovaf)
192
- * @since 1.0.7
193
- *
194
- * @param string $message
195
- * @param string $id Message ID
196
- * @param string $title
197
- * @param string $type
198
- * @param int|null $network_level_or_blog_id
199
- * @param number|null $wp_user_id
200
- * @param string|null $plugin_title
201
- * @param bool $is_network_and_blog_admins Whether or not the message should be shown both on network and
202
- * blog admin pages.
203
- */
204
- function add_sticky(
205
- $message,
206
- $id,
207
- $title = '',
208
- $type = 'success',
209
- $network_level_or_blog_id = null,
210
- $wp_user_id = null,
211
- $plugin_title = null,
212
- $is_network_and_blog_admins = false
213
- ) {
214
- if ( $this->should_use_network_notices( $id, $network_level_or_blog_id ) ) {
215
- $notices = $this->_network_notices;
216
- } else {
217
- $notices = $this->get_site_notices( $network_level_or_blog_id );
218
- }
219
-
220
- $notices->add_sticky( $message, $id, $title, $type, $wp_user_id, $plugin_title, $is_network_and_blog_admins );
221
- }
222
-
223
- /**
224
- * Clear all sticky messages.
225
- *
226
- * @author Vova Feldman (@svovaf)
227
- * @since 2.0.0
228
- *
229
- * @param int|null $network_level_or_blog_id
230
- */
231
- function clear_all_sticky( $network_level_or_blog_id = null ) {
232
- if ( ! $this->_is_multisite ||
233
- false === $network_level_or_blog_id ||
234
- 0 == $network_level_or_blog_id ||
235
- is_null( $network_level_or_blog_id )
236
- ) {
237
- $notices = $this->get_site_notices( $network_level_or_blog_id );
238
- $notices->clear_all_sticky();
239
- }
240
-
241
- if ( $this->_is_multisite &&
242
- ( true === $network_level_or_blog_id || is_null( $network_level_or_blog_id ) )
243
- ) {
244
- $this->_network_notices->clear_all_sticky();
245
- }
246
- }
247
-
248
- /**
249
- * Add admin message to all admin messages queue, and hook to all_admin_notices if not yet hooked.
250
- *
251
- * @author Vova Feldman (@svovaf)
252
- * @since 1.0.4
253
- *
254
- * @param string $message
255
- * @param string $title
256
- * @param string $type
257
- * @param bool $is_sticky
258
- * @param string $id Message ID
259
- */
260
- function add_all( $message, $title = '', $type = 'success', $is_sticky = false, $id = '' ) {
261
- $this->add( $message, $title, $type, $is_sticky, true, $id );
262
- }
263
-
264
- #--------------------------------------------------------------------------------
265
- #region Helper Methods
266
- #--------------------------------------------------------------------------------
267
-
268
- /**
269
- * @author Vova Feldman (@svovaf)
270
- * @since 2.0.0
271
- *
272
- * @param int $blog_id
273
- *
274
- * @return FS_Admin_Notice_Manager
275
- */
276
- private function get_site_notices( $blog_id = 0 ) {
277
- if ( 0 == $blog_id || $blog_id == $this->_blog_id ) {
278
- return $this->_notices;
279
- }
280
-
281
- return FS_Admin_Notice_Manager::instance(
282
- $this->_id,
283
- $this->_title,
284
- $this->_module_unique_affix,
285
- false,
286
- $blog_id
287
- );
288
- }
289
-
290
- /**
291
- * Check if the network notices should be used.
292
- *
293
- * @author Vova Feldman (@svovaf)
294
- * @since 2.0.0
295
- *
296
- * @param string $id
297
- * @param null|bool|int $network_level_or_blog_id When an integer, use the given blog storage. When `true` use the multisite notices (if there's a network). When `false`, use the current context blog notices. When `null`, the decision which notices manager to use (MS vs. Current S) will be handled internally and determined based on the $id and the context admin (blog admin vs. network level admin).
298
- *
299
- * @return bool
300
- */
301
- private function should_use_network_notices( $id = '', $network_level_or_blog_id = null ) {
302
- if ( ! $this->_is_multisite ) {
303
- // Not a multisite environment.
304
- return false;
305
- }
306
-
307
- if ( is_numeric( $network_level_or_blog_id ) ) {
308
- // Explicitly asked to use a specified blog storage.
309
- return false;
310
- }
311
-
312
- if ( is_bool( $network_level_or_blog_id ) ) {
313
- // Explicitly specified whether should use the network or blog level storage.
314
- return $network_level_or_blog_id;
315
- }
316
-
317
- return fs_is_network_admin();
318
- }
319
-
320
- #endregion
321
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 2.0.0
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * WP Admin notices manager both for site level and network level.
15
+ *
16
+ * Class FS_Admin_Notices
17
+ */
18
+ class FS_Admin_Notices {
19
+ /**
20
+ * @since 1.2.2
21
+ *
22
+ * @var string
23
+ */
24
+ protected $_module_unique_affix;
25
+ /**
26
+ * @var string
27
+ */
28
+ protected $_id;
29
+ /**
30
+ * @var string
31
+ */
32
+ protected $_title;
33
+ /**
34
+ * @var FS_Admin_Notice_Manager
35
+ */
36
+ protected $_notices;
37
+ /**
38
+ * @var FS_Admin_Notice_Manager
39
+ */
40
+ protected $_network_notices;
41
+ /**
42
+ * @var int The ID of the blog that is associated with the current site level options.
43
+ */
44
+ private $_blog_id = 0;
45
+ /**
46
+ * @var bool
47
+ */
48
+ private $_is_multisite;
49
+ /**
50
+ * @var FS_Admin_Notices[]
51
+ */
52
+ private static $_instances = array();
53
+
54
+ /**
55
+ * @param string $id
56
+ * @param string $title
57
+ * @param string $module_unique_affix
58
+ * @param bool $is_network_and_blog_admins Whether or not the message should be shown both on network and
59
+ * blog admin pages.
60
+ *
61
+ * @return FS_Admin_Notices
62
+ */
63
+ static function instance( $id, $title = '', $module_unique_affix = '', $is_network_and_blog_admins = false ) {
64
+ if ( ! isset( self::$_instances[ $id ] ) ) {
65
+ self::$_instances[ $id ] = new FS_Admin_Notices( $id, $title, $module_unique_affix, $is_network_and_blog_admins );
66
+ }
67
+
68
+ return self::$_instances[ $id ];
69
+ }
70
+
71
+ /**
72
+ * @param string $id
73
+ * @param string $title
74
+ * @param string $module_unique_affix
75
+ * @param bool $is_network_and_blog_admins Whether or not the message should be shown both on network and
76
+ * blog admin pages.
77
+ */
78
+ protected function __construct( $id, $title = '', $module_unique_affix = '', $is_network_and_blog_admins = false ) {
79
+ $this->_id = $id;
80
+ $this->_title = $title;
81
+ $this->_module_unique_affix = $module_unique_affix;
82
+ $this->_is_multisite = is_multisite();
83
+
84
+ if ( $this->_is_multisite ) {
85
+ $this->_blog_id = get_current_blog_id();
86
+
87
+ $this->_network_notices = FS_Admin_Notice_Manager::instance(
88
+ $id,
89
+ $title,
90
+ $module_unique_affix,
91
+ $is_network_and_blog_admins,
92
+ true
93
+ );
94
+ }
95
+
96
+ $this->_notices = FS_Admin_Notice_Manager::instance(
97
+ $id,
98
+ $title,
99
+ $module_unique_affix,
100
+ false,
101
+ $this->_blog_id
102
+ );
103
+ }
104
+
105
+ /**
106
+ * Add admin message to admin messages queue, and hook to admin_notices / all_admin_notices if not yet hooked.
107
+ *
108
+ * @author Vova Feldman (@svovaf)
109
+ * @since 1.0.4
110
+ *
111
+ * @param string $message
112
+ * @param string $title
113
+ * @param string $type
114
+ * @param bool $is_sticky
115
+ * @param string $id Message ID
116
+ * @param bool $store_if_sticky
117
+ * @param int|null $network_level_or_blog_id
118
+ *
119
+ * @uses add_action()
120
+ */
121
+ function add(
122
+ $message,
123
+ $title = '',
124
+ $type = 'success',
125
+ $is_sticky = false,
126
+ $id = '',
127
+ $store_if_sticky = true,
128
+ $network_level_or_blog_id = null
129
+ ) {
130
+ if ( $this->should_use_network_notices( $id, $network_level_or_blog_id ) ) {
131
+ $notices = $this->_network_notices;
132
+ } else {
133
+ $notices = $this->get_site_notices( $network_level_or_blog_id );
134
+ }
135
+
136
+ $notices->add(
137
+ $message,
138
+ $title,
139
+ $type,
140
+ $is_sticky,
141
+ $id,
142
+ $store_if_sticky
143
+ );
144
+ }
145
+
146
+ /**
147
+ * @author Vova Feldman (@svovaf)
148
+ * @since 1.0.7
149
+ *
150
+ * @param string|string[] $ids
151
+ * @param int|null $network_level_or_blog_id
152
+ */
153
+ function remove_sticky( $ids, $network_level_or_blog_id = null ) {
154
+ if ( ! is_array( $ids ) ) {
155
+ $ids = array( $ids );
156
+ }
157
+
158
+ if ( $this->should_use_network_notices( $ids[0], $network_level_or_blog_id ) ) {
159
+ $notices = $this->_network_notices;
160
+ } else {
161
+ $notices = $this->get_site_notices( $network_level_or_blog_id );
162
+ }
163
+
164
+ return $notices->remove_sticky( $ids );
165
+ }
166
+
167
+ /**
168
+ * Check if sticky message exists by id.
169
+ *
170
+ * @author Vova Feldman (@svovaf)
171
+ * @since 1.0.9
172
+ *
173
+ * @param string $id
174
+ * @param int|null $network_level_or_blog_id
175
+ *
176
+ * @return bool
177
+ */
178
+ function has_sticky( $id, $network_level_or_blog_id = null ) {
179
+ if ( $this->should_use_network_notices( $id, $network_level_or_blog_id ) ) {
180
+ $notices = $this->_network_notices;
181
+ } else {
182
+ $notices = $this->get_site_notices( $network_level_or_blog_id );
183
+ }
184
+
185
+ return $notices->has_sticky( $id );
186
+ }
187
+
188
+ /**
189
+ * Adds sticky admin notification.
190
+ *
191
+ * @author Vova Feldman (@svovaf)
192
+ * @since 1.0.7
193
+ *
194
+ * @param string $message
195
+ * @param string $id Message ID
196
+ * @param string $title
197
+ * @param string $type
198
+ * @param int|null $network_level_or_blog_id
199
+ * @param number|null $wp_user_id
200
+ * @param string|null $plugin_title
201
+ * @param bool $is_network_and_blog_admins Whether or not the message should be shown both on network and
202
+ * blog admin pages.
203
+ */
204
+ function add_sticky(
205
+ $message,
206
+ $id,
207
+ $title = '',
208
+ $type = 'success',
209
+ $network_level_or_blog_id = null,
210
+ $wp_user_id = null,
211
+ $plugin_title = null,
212
+ $is_network_and_blog_admins = false
213
+ ) {
214
+ if ( $this->should_use_network_notices( $id, $network_level_or_blog_id ) ) {
215
+ $notices = $this->_network_notices;
216
+ } else {
217
+ $notices = $this->get_site_notices( $network_level_or_blog_id );
218
+ }
219
+
220
+ $notices->add_sticky( $message, $id, $title, $type, $wp_user_id, $plugin_title, $is_network_and_blog_admins );
221
+ }
222
+
223
+ /**
224
+ * Clear all sticky messages.
225
+ *
226
+ * @author Vova Feldman (@svovaf)
227
+ * @since 2.0.0
228
+ *
229
+ * @param int|null $network_level_or_blog_id
230
+ */
231
+ function clear_all_sticky( $network_level_or_blog_id = null ) {
232
+ if ( ! $this->_is_multisite ||
233
+ false === $network_level_or_blog_id ||
234
+ 0 == $network_level_or_blog_id ||
235
+ is_null( $network_level_or_blog_id )
236
+ ) {
237
+ $notices = $this->get_site_notices( $network_level_or_blog_id );
238
+ $notices->clear_all_sticky();
239
+ }
240
+
241
+ if ( $this->_is_multisite &&
242
+ ( true === $network_level_or_blog_id || is_null( $network_level_or_blog_id ) )
243
+ ) {
244
+ $this->_network_notices->clear_all_sticky();
245
+ }
246
+ }
247
+
248
+ /**
249
+ * Add admin message to all admin messages queue, and hook to all_admin_notices if not yet hooked.
250
+ *
251
+ * @author Vova Feldman (@svovaf)
252
+ * @since 1.0.4
253
+ *
254
+ * @param string $message
255
+ * @param string $title
256
+ * @param string $type
257
+ * @param bool $is_sticky
258
+ * @param string $id Message ID
259
+ */
260
+ function add_all( $message, $title = '', $type = 'success', $is_sticky = false, $id = '' ) {
261
+ $this->add( $message, $title, $type, $is_sticky, true, $id );
262
+ }
263
+
264
+ #--------------------------------------------------------------------------------
265
+ #region Helper Methods
266
+ #--------------------------------------------------------------------------------
267
+
268
+ /**
269
+ * @author Vova Feldman (@svovaf)
270
+ * @since 2.0.0
271
+ *
272
+ * @param int $blog_id
273
+ *
274
+ * @return FS_Admin_Notice_Manager
275
+ */
276
+ private function get_site_notices( $blog_id = 0 ) {
277
+ if ( 0 == $blog_id || $blog_id == $this->_blog_id ) {
278
+ return $this->_notices;
279
+ }
280
+
281
+ return FS_Admin_Notice_Manager::instance(
282
+ $this->_id,
283
+ $this->_title,
284
+ $this->_module_unique_affix,
285
+ false,
286
+ $blog_id
287
+ );
288
+ }
289
+
290
+ /**
291
+ * Check if the network notices should be used.
292
+ *
293
+ * @author Vova Feldman (@svovaf)
294
+ * @since 2.0.0
295
+ *
296
+ * @param string $id
297
+ * @param null|bool|int $network_level_or_blog_id When an integer, use the given blog storage. When `true` use the multisite notices (if there's a network). When `false`, use the current context blog notices. When `null`, the decision which notices manager to use (MS vs. Current S) will be handled internally and determined based on the $id and the context admin (blog admin vs. network level admin).
298
+ *
299
+ * @return bool
300
+ */
301
+ private function should_use_network_notices( $id = '', $network_level_or_blog_id = null ) {
302
+ if ( ! $this->_is_multisite ) {
303
+ // Not a multisite environment.
304
+ return false;
305
+ }
306
+
307
+ if ( is_numeric( $network_level_or_blog_id ) ) {
308
+ // Explicitly asked to use a specified blog storage.
309
+ return false;
310
+ }
311
+
312
+ if ( is_bool( $network_level_or_blog_id ) ) {
313
+ // Explicitly specified whether should use the network or blog level storage.
314
+ return $network_level_or_blog_id;
315
+ }
316
+
317
+ return fs_is_network_admin();
318
+ }
319
+
320
+ #endregion
321
  }
freemius/includes/class-fs-logger.php CHANGED
@@ -1,691 +1,691 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.3
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Logger {
14
- private $_id;
15
- private $_on = false;
16
- private $_echo = false;
17
- private $_file_start = 0;
18
- /**
19
- * @var int PHP Process ID.
20
- */
21
- private static $_processID;
22
- /**
23
- * @var string PHP Script user name.
24
- */
25
- private static $_ownerName;
26
- /**
27
- * @var bool Is storage logging turned on.
28
- */
29
- private static $_isStorageLoggingOn;
30
- /**
31
- * @var int ABSPATH length.
32
- */
33
- private static $_abspathLength;
34
-
35
- private static $LOGGERS = array();
36
- private static $LOG = array();
37
- private static $CNT = 0;
38
- private static $_HOOKED_FOOTER = false;
39
-
40
- private function __construct( $id, $on = false, $echo = false ) {
41
- $this->_id = $id;
42
-
43
- $bt = debug_backtrace();
44
- $caller = $bt[2];
45
-
46
- if ( false !== strpos( $caller['file'], 'plugins' ) ) {
47
- $this->_file_start = strpos( $caller['file'], 'plugins' ) + strlen( 'plugins/' );
48
- } else {
49
- $this->_file_start = strpos( $caller['file'], 'themes' ) + strlen( 'themes/' );
50
- }
51
-
52
- if ( $on ) {
53
- $this->on();
54
- }
55
- if ( $echo ) {
56
- $this->echo_on();
57
- }
58
- }
59
-
60
- /**
61
- * @param string $id
62
- * @param bool $on
63
- * @param bool $echo
64
- *
65
- * @return FS_Logger
66
- */
67
- public static function get_logger( $id, $on = false, $echo = false ) {
68
- $id = strtolower( $id );
69
-
70
- if ( ! isset( self::$_processID ) ) {
71
- self::init();
72
- }
73
-
74
- if ( ! isset( self::$LOGGERS[ $id ] ) ) {
75
- self::$LOGGERS[ $id ] = new FS_Logger( $id, $on, $echo );
76
- }
77
-
78
- return self::$LOGGERS[ $id ];
79
- }
80
-
81
- /**
82
- * Initialize logging global info.
83
- *
84
- * @author Vova Feldman (@svovaf)
85
- * @since 1.2.1.6
86
- */
87
- private static function init() {
88
- self::$_ownerName = function_exists( 'get_current_user' ) ?
89
- get_current_user() :
90
- 'unknown';
91
- self::$_isStorageLoggingOn = ( 1 == get_option( 'fs_storage_logger', 0 ) );
92
- self::$_abspathLength = strlen( ABSPATH );
93
- self::$_processID = mt_rand( 0, 32000 );
94
-
95
- // Process ID may be `false` on errors.
96
- if ( ! is_numeric( self::$_processID ) ) {
97
- self::$_processID = 0;
98
- }
99
- }
100
-
101
- private static function hook_footer() {
102
- if ( self::$_HOOKED_FOOTER ) {
103
- return;
104
- }
105
-
106
- if ( is_admin() ) {
107
- add_action( 'admin_footer', 'FS_Logger::dump', 100 );
108
- } else {
109
- add_action( 'wp_footer', 'FS_Logger::dump', 100 );
110
- }
111
- }
112
-
113
- function is_on() {
114
- return $this->_on;
115
- }
116
-
117
- function on() {
118
- $this->_on = true;
119
-
120
- if ( ! function_exists( 'dbDelta' ) ) {
121
- require_once ABSPATH . 'wp-admin/includes/upgrade.php';
122
- }
123
-
124
- self::hook_footer();
125
- }
126
-
127
- function echo_on() {
128
- $this->on();
129
-
130
- $this->_echo = true;
131
- }
132
-
133
- function is_echo_on() {
134
- return $this->_echo;
135
- }
136
-
137
- function get_id() {
138
- return $this->_id;
139
- }
140
-
141
- function get_file() {
142
- return $this->_file_start;
143
- }
144
-
145
- private function _log( &$message, $type, $wrapper = false ) {
146
- if ( ! $this->is_on() ) {
147
- return;
148
- }
149
-
150
- $bt = debug_backtrace();
151
- $depth = $wrapper ? 3 : 2;
152
- while ( $depth < count( $bt ) - 1 && 'eval' === $bt[ $depth ]['function'] ) {
153
- $depth ++;
154
- }
155
-
156
- $caller = $bt[ $depth ];
157
-
158
- /**
159
- * Retrieve the correct call file & line number from backtrace
160
- * when logging from a wrapper method.
161
- *
162
- * @author Vova Feldman
163
- * @since 1.2.1.6
164
- */
165
- if ( empty( $caller['line'] ) ) {
166
- $depth --;
167
-
168
- while ( $depth >= 0 ) {
169
- if ( ! empty( $bt[ $depth ]['line'] ) ) {
170
- $caller['line'] = $bt[ $depth ]['line'];
171
- $caller['file'] = $bt[ $depth ]['file'];
172
- break;
173
- }
174
- }
175
- }
176
-
177
- $log = array_merge( $caller, array(
178
- 'cnt' => self::$CNT ++,
179
- 'logger' => $this,
180
- 'timestamp' => microtime( true ),
181
- 'log_type' => $type,
182
- 'msg' => $message,
183
- ) );
184
-
185
- if ( self::$_isStorageLoggingOn ) {
186
- $this->db_log( $type, $message, self::$CNT, $caller );
187
- }
188
-
189
- self::$LOG[] = $log;
190
-
191
- if ( $this->is_echo_on() && ! Freemius::is_ajax() ) {
192
- echo self::format_html( $log ) . "\n";
193
- }
194
- }
195
-
196
- function log( $message, $wrapper = false ) {
197
- $this->_log( $message, 'log', $wrapper );
198
- }
199
-
200
- function info( $message, $wrapper = false ) {
201
- $this->_log( $message, 'info', $wrapper );
202
- }
203
-
204
- function warn( $message, $wrapper = false ) {
205
- $this->_log( $message, 'warn', $wrapper );
206
- }
207
-
208
- function error( $message, $wrapper = false ) {
209
- $this->_log( $message, 'error', $wrapper );
210
- }
211
-
212
- /**
213
- * Log API error.
214
- *
215
- * @author Vova Feldman (@svovaf)
216
- * @since 1.2.1.5
217
- *
218
- * @param mixed $api_result
219
- * @param bool $wrapper
220
- */
221
- function api_error( $api_result, $wrapper = false ) {
222
- $message = '';
223
- if ( is_object( $api_result ) &&
224
- ! empty( $api_result->error ) &&
225
- ! empty( $api_result->error->message )
226
- ) {
227
- $message = $api_result->error->message;
228
- } else if ( is_object( $api_result ) ) {
229
- $message = var_export( $api_result, true );
230
- } else if ( is_string( $api_result ) ) {
231
- $message = $api_result;
232
- } else if ( empty( $api_result ) ) {
233
- $message = 'Empty API result.';
234
- }
235
-
236
- $message = 'API Error: ' . $message;
237
-
238
- $this->_log( $message, 'error', $wrapper );
239
- }
240
-
241
- function entrance( $message = '', $wrapper = false ) {
242
- $msg = 'Entrance' . ( empty( $message ) ? '' : ' > ' ) . $message;
243
-
244
- $this->_log( $msg, 'log', $wrapper );
245
- }
246
-
247
- function departure( $message = '', $wrapper = false ) {
248
- $msg = 'Departure' . ( empty( $message ) ? '' : ' > ' ) . $message;
249
-
250
- $this->_log( $msg, 'log', $wrapper );
251
- }
252
-
253
- #--------------------------------------------------------------------------------
254
- #region Log Formatting
255
- #--------------------------------------------------------------------------------
256
-
257
- private static function format( $log, $show_type = true ) {
258
- return '[' . str_pad( $log['cnt'], strlen( self::$CNT ), '0', STR_PAD_LEFT ) . '] [' . $log['logger']->_id . '] ' . ( $show_type ? '[' . $log['log_type'] . ']' : '' ) . ( ! empty( $log['class'] ) ? $log['class'] . $log['type'] : '' ) . $log['function'] . ' >> ' . $log['msg'] . ( isset( $log['file'] ) ? ' (' . substr( $log['file'], $log['logger']->_file_start ) . ' ' . $log['line'] . ') ' : '' ) . ' [' . $log['timestamp'] . ']';
259
- }
260
-
261
- private static function format_html( $log ) {
262
- return '<div style="font-size: 13px; font-family: monospace; color: #7da767; padding: 8px 3px; background: #000; border-bottom: 1px solid #555;">[' . $log['cnt'] . '] [' . $log['logger']->_id . '] [' . $log['log_type'] . '] <b><code style="color: #c4b1e0;">' . ( ! empty( $log['class'] ) ? $log['class'] . $log['type'] : '' ) . $log['function'] . '</code> >> <b style="color: #f59330;">' . esc_html( $log['msg'] ) . '</b></b>' . ( isset( $log['file'] ) ? ' (' . substr( $log['file'], $log['logger']->_file_start ) . ' ' . $log['line'] . ')' : '' ) . ' [' . $log['timestamp'] . ']</div>';
263
- }
264
-
265
- #endregion
266
-
267
- static function dump() {
268
- ?>
269
- <!-- BEGIN: Freemius PHP Console Log -->
270
- <script type="text/javascript">
271
- <?php
272
- foreach ( self::$LOG as $log ) {
273
- echo 'console.' . $log['log_type'] . '(' . json_encode( self::format( $log, false ) ) . ')' . "\n";
274
- }
275
- ?>
276
- </script>
277
- <!-- END: Freemius PHP Console Log -->
278
- <?php
279
- }
280
-
281
- static function get_log() {
282
- return self::$LOG;
283
- }
284
-
285
- #--------------------------------------------------------------------------------
286
- #region Database Logging
287
- #--------------------------------------------------------------------------------
288
-
289
- /**
290
- * @author Vova Feldman (@svovaf)
291
- * @since 1.2.1.6
292
- *
293
- * @return bool
294
- */
295
- public static function is_storage_logging_on() {
296
- if ( ! isset( self::$_isStorageLoggingOn ) ) {
297
- self::$_isStorageLoggingOn = ( 1 == get_option( 'fs_storage_logger', 0 ) );
298
- }
299
-
300
- return self::$_isStorageLoggingOn;
301
- }
302
-
303
- /**
304
- * Turns on/off database persistent debugging to capture
305
- * multi-session logs to debug complex flows like
306
- * plugin auto-deactivate on premium version activation.
307
- *
308
- * @todo Check if Theme Check has issues with DB tables for themes.
309
- *
310
- * @author Vova Feldman (@svovaf)
311
- * @since 1.2.1.6
312
- *
313
- * @param bool $is_on
314
- *
315
- * @return bool
316
- */
317
- public static function _set_storage_logging( $is_on = true ) {
318
- global $wpdb;
319
-
320
- $table = "{$wpdb->prefix}fs_logger";
321
-
322
- if ( $is_on ) {
323
- /**
324
- * Create logging table.
325
- *
326
- * NOTE:
327
- * dbDelta must use KEY and not INDEX for indexes.
328
- *
329
- * @link https://core.trac.wordpress.org/ticket/2695
330
- */
331
- $result = $wpdb->query( "CREATE TABLE {$table} (
332
- `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
333
- `process_id` INT UNSIGNED NOT NULL,
334
- `user_name` VARCHAR(64) NOT NULL,
335
- `logger` VARCHAR(128) NOT NULL,
336
- `log_order` INT UNSIGNED NOT NULL,
337
- `type` ENUM('log','info','warn','error') NOT NULL DEFAULT 'log',
338
- `message` TEXT NOT NULL,
339
- `file` VARCHAR(256) NOT NULL,
340
- `line` INT UNSIGNED NOT NULL,
341
- `function` VARCHAR(256) NOT NULL,
342
- `request_type` ENUM('call','ajax','cron') NOT NULL DEFAULT 'call',
343
- `request_url` VARCHAR(1024) NOT NULL,
344
- `created` DECIMAL(16, 6) NOT NULL,
345
- PRIMARY KEY (`id`),
346
- KEY `process_id` (`process_id` ASC),
347
- KEY `process_logger` (`process_id` ASC, `logger` ASC),
348
- KEY `function` (`function` ASC),
349
- KEY `type` (`type` ASC))" );
350
- } else {
351
- /**
352
- * Drop logging table.
353
- */
354
- $result = $wpdb->query( "DROP TABLE IF EXISTS $table;" );
355
- }
356
-
357
- if ( false !== $result ) {
358
- update_option( 'fs_storage_logger', ( $is_on ? 1 : 0 ) );
359
- }
360
-
361
- return ( false !== $result );
362
- }
363
-
364
- /**
365
- * @author Vova Feldman (@svovaf)
366
- * @since 1.2.1.6
367
- *
368
- * @param string $type
369
- * @param string $message
370
- * @param int $log_order
371
- * @param array $caller
372
- *
373
- * @return false|int
374
- */
375
- private function db_log(
376
- &$type,
377
- &$message,
378
- &$log_order,
379
- &$caller
380
- ) {
381
- global $wpdb;
382
-
383
- $request_type = 'call';
384
- if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
385
- $request_type = 'cron';
386
- } else if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
387
- $request_type = 'ajax';
388
- }
389
-
390
- $request_url = WP_FS__IS_HTTP_REQUEST ?
391
- $_SERVER['REQUEST_URI'] :
392
- '';
393
-
394
- return $wpdb->insert(
395
- "{$wpdb->prefix}fs_logger",
396
- array(
397
- 'process_id' => self::$_processID,
398
- 'user_name' => self::$_ownerName,
399
- 'logger' => $this->_id,
400
- 'log_order' => $log_order,
401
- 'type' => $type,
402
- 'request_type' => $request_type,
403
- 'request_url' => $request_url,
404
- 'message' => $message,
405
- 'file' => isset( $caller['file'] ) ?
406
- substr( $caller['file'], self::$_abspathLength ) :
407
- '',
408
- 'line' => $caller['line'],
409
- 'function' => ( ! empty( $caller['class'] ) ? $caller['class'] . $caller['type'] : '' ) . $caller['function'],
410
- 'created' => microtime( true ),
411
- )
412
- );
413
- }
414
-
415
- /**
416
- * Persistent DB logger columns.
417
- *
418
- * @var array
419
- */
420
- private static $_log_columns = array(
421
- 'id',
422
- 'process_id',
423
- 'user_name',
424
- 'logger',
425
- 'log_order',
426
- 'type',
427
- 'message',
428
- 'file',
429
- 'line',
430
- 'function',
431
- 'request_type',
432
- 'request_url',
433
- 'created',
434
- );
435
-
436
- /**
437
- * Create DB logs query.
438
- *
439
- * @author Vova Feldman (@svovaf)
440
- * @since 1.2.1.6
441
- *
442
- * @param bool $filters
443
- * @param int $limit
444
- * @param int $offset
445
- * @param bool $order
446
- * @param bool $escape_eol
447
- *
448
- * @return string
449
- */
450
- private static function build_db_logs_query(
451
- $filters = false,
452
- $limit = 200,
453
- $offset = 0,
454
- $order = false,
455
- $escape_eol = false
456
- ) {
457
- global $wpdb;
458
-
459
- $select = '*';
460
-
461
- if ( $escape_eol ) {
462
- $select = '';
463
- for ( $i = 0, $len = count( self::$_log_columns ); $i < $len; $i ++ ) {
464
- if ( $i > 0 ) {
465
- $select .= ', ';
466
- }
467
-
468
- if ( 'message' !== self::$_log_columns[ $i ] ) {
469
- $select .= self::$_log_columns[ $i ];
470
- } else {
471
- $select .= 'REPLACE(message , \'\n\', \' \') AS message';
472
- }
473
- }
474
- }
475
-
476
- $query = "SELECT {$select} FROM {$wpdb->prefix}fs_logger";
477
- if ( is_array( $filters ) ) {
478
- $criteria = array();
479
-
480
- if ( ! empty( $filters['type'] ) && 'all' !== $filters['type'] ) {
481
- $filters['type'] = strtolower( $filters['type'] );
482
-
483
- switch ( $filters['type'] ) {
484
- case 'warn_error':
485
- $criteria[] = array( 'col' => 'type', 'val' => array( 'warn', 'error' ) );
486
- break;
487
- case 'error':
488
- case 'warn':
489
- $criteria[] = array( 'col' => 'type', 'val' => $filters['type'] );
490
- break;
491
- case 'info':
492
- default:
493
- $criteria[] = array( 'col' => 'type', 'val' => array( 'info', 'log' ) );
494
- break;
495
- }
496
- }
497
-
498
- if ( ! empty( $filters['request_type'] ) ) {
499
- $filters['request_type'] = strtolower( $filters['request_type'] );
500
-
501
- if ( in_array( $filters['request_type'], array( 'call', 'ajax', 'cron' ) ) ) {
502
- $criteria[] = array( 'col' => 'request_type', 'val' => $filters['request_type'] );
503
- }
504
- }
505
-
506
- if ( ! empty( $filters['file'] ) ) {
507
- $criteria[] = array(
508
- 'col' => 'file',
509
- 'op' => 'LIKE',
510
- 'val' => '%' . esc_sql( $filters['file'] ),
511
- );
512
- }
513
-
514
- if ( ! empty( $filters['function'] ) ) {
515
- $criteria[] = array(
516
- 'col' => 'function',
517
- 'op' => 'LIKE',
518
- 'val' => '%' . esc_sql( $filters['function'] ),
519
- );
520
- }
521
-
522
- if ( ! empty( $filters['process_id'] ) && is_numeric( $filters['process_id'] ) ) {
523
- $criteria[] = array( 'col' => 'process_id', 'val' => $filters['process_id'] );
524
- }
525
-
526
- if ( ! empty( $filters['logger'] ) ) {
527
- $criteria[] = array(
528
- 'col' => 'logger',
529
- 'op' => 'LIKE',
530
- 'val' => '%' . esc_sql( $filters['logger'] ) . '%',
531
- );
532
- }
533
-
534
- if ( ! empty( $filters['message'] ) ) {
535
- $criteria[] = array(
536
- 'col' => 'message',
537
- 'op' => 'LIKE',
538
- 'val' => '%' . esc_sql( $filters['message'] ) . '%',
539
- );
540
- }
541
-
542
- if ( 0 < count( $criteria ) ) {
543
- $query .= "\nWHERE\n";
544
-
545
- $first = true;
546
- foreach ( $criteria as $c ) {
547
- if ( ! $first ) {
548
- $query .= "AND\n";
549
- }
550
-
551
- if ( is_array( $c['val'] ) ) {
552
- $operator = 'IN';
553
-
554
- for ( $i = 0, $len = count( $c['val'] ); $i < $len; $i ++ ) {
555
- $c['val'][ $i ] = "'" . esc_sql( $c['val'][ $i ] ) . "'";
556
- }
557
-
558
- $val = '(' . implode( ',', $c['val'] ) . ')';
559
- } else {
560
- $operator = ! empty( $c['op'] ) ? $c['op'] : '=';
561
- $val = "'" . esc_sql( $c['val'] ) . "'";
562
- }
563
-
564
- $query .= "`{$c['col']}` {$operator} {$val}\n";
565
-
566
- $first = false;
567
- }
568
- }
569
- }
570
-
571
- if ( ! is_array( $order ) ) {
572
- $order = array(
573
- 'col' => 'id',
574
- 'order' => 'desc'
575
- );
576
- }
577
-
578
- $query .= " ORDER BY {$order['col']} {$order['order']} LIMIT {$offset},{$limit}";
579
-
580
- return $query;
581
- }
582
-
583
- /**
584
- * Load logs from DB.
585
- *
586
- * @author Vova Feldman (@svovaf)
587
- * @since 1.2.1.6
588
- *
589
- * @param bool $filters
590
- * @param int $limit
591
- * @param int $offset
592
- * @param bool $order
593
- *
594
- * @return object[]|null
595
- */
596
- public static function load_db_logs(
597
- $filters = false,
598
- $limit = 200,
599
- $offset = 0,
600
- $order = false
601
- ) {
602
- global $wpdb;
603
-
604
- $query = self::build_db_logs_query(
605
- $filters,
606
- $limit,
607
- $offset,
608
- $order
609
- );
610
-
611
- return $wpdb->get_results( $query );
612
- }
613
-
614
- /**
615
- * Load logs from DB.
616
- *
617
- * @author Vova Feldman (@svovaf)
618
- * @since 1.2.1.6
619
- *
620
- * @param bool $filters
621
- * @param string $filename
622
- * @param int $limit
623
- * @param int $offset
624
- * @param bool $order
625
- *
626
- * @return false|string File download URL or false on failure.
627
- */
628
- public static function download_db_logs(
629
- $filters = false,
630
- $filename = '',
631
- $limit = 10000,
632
- $offset = 0,
633
- $order = false
634
- ) {
635
- global $wpdb;
636
-
637
- $query = self::build_db_logs_query(
638
- $filters,
639
- $limit,
640
- $offset,
641
- $order,
642
- true
643
- );
644
-
645
- $upload_dir = wp_upload_dir();
646
- if ( empty( $filename ) ) {
647
- $filename = 'fs-logs-' . date( 'Y-m-d_H-i-s', WP_FS__SCRIPT_START_TIME ) . '.csv';
648
- }
649
- $filepath = rtrim( $upload_dir['path'], '/' ) . "/{$filename}";
650
-
651
- $query .= " INTO OUTFILE '{$filepath}' FIELDS TERMINATED BY '\t' ESCAPED BY '\\\\' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\\n'";
652
-
653
- $columns = '';
654
- for ( $i = 0, $len = count( self::$_log_columns ); $i < $len; $i ++ ) {
655
- if ( $i > 0 ) {
656
- $columns .= ', ';
657
- }
658
-
659
- $columns .= "'" . self::$_log_columns[ $i ] . "'";
660
- }
661
-
662
- $query = "SELECT {$columns} UNION ALL " . $query;
663
-
664
- $result = $wpdb->query( $query );
665
-
666
- if ( false === $result ) {
667
- return false;
668
- }
669
-
670
- return rtrim( $upload_dir['url'], '/' ) . '/' . $filename;
671
- }
672
-
673
- /**
674
- * @author Vova Feldman (@svovaf)
675
- * @since 1.2.1.6
676
- *
677
- * @param string $filename
678
- *
679
- * @return string
680
- */
681
- public static function get_logs_download_url( $filename = '' ) {
682
- $upload_dir = wp_upload_dir();
683
- if ( empty( $filename ) ) {
684
- $filename = 'fs-logs-' . date( 'Y-m-d_H-i-s', WP_FS__SCRIPT_START_TIME ) . '.csv';
685
- }
686
-
687
- return rtrim( $upload_dir['url'], '/' ) . $filename;
688
- }
689
-
690
- #endregion
691
- }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.0.3
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Logger {
14
+ private $_id;
15
+ private $_on = false;
16
+ private $_echo = false;
17
+ private $_file_start = 0;
18
+ /**
19
+ * @var int PHP Process ID.
20
+ */
21
+ private static $_processID;
22
+ /**
23
+ * @var string PHP Script user name.
24
+ */
25
+ private static $_ownerName;
26
+ /**
27
+ * @var bool Is storage logging turned on.
28
+ */
29
+ private static $_isStorageLoggingOn;
30
+ /**
31
+ * @var int ABSPATH length.
32
+ */
33
+ private static $_abspathLength;
34
+
35
+ private static $LOGGERS = array();
36
+ private static $LOG = array();
37
+ private static $CNT = 0;
38
+ private static $_HOOKED_FOOTER = false;
39
+
40
+ private function __construct( $id, $on = false, $echo = false ) {
41
+ $this->_id = $id;
42
+
43
+ $bt = debug_backtrace();
44
+ $caller = $bt[2];
45
+
46
+ if ( false !== strpos( $caller['file'], 'plugins' ) ) {
47
+ $this->_file_start = strpos( $caller['file'], 'plugins' ) + strlen( 'plugins/' );
48
+ } else {
49
+ $this->_file_start = strpos( $caller['file'], 'themes' ) + strlen( 'themes/' );
50
+ }
51
+
52
+ if ( $on ) {
53
+ $this->on();
54
+ }
55
+ if ( $echo ) {
56
+ $this->echo_on();
57
+ }
58
+ }
59
+
60
+ /**
61
+ * @param string $id
62
+ * @param bool $on
63
+ * @param bool $echo
64
+ *
65
+ * @return FS_Logger
66
+ */
67
+ public static function get_logger( $id, $on = false, $echo = false ) {
68
+ $id = strtolower( $id );
69
+
70
+ if ( ! isset( self::$_processID ) ) {
71
+ self::init();
72
+ }
73
+
74
+ if ( ! isset( self::$LOGGERS[ $id ] ) ) {
75
+ self::$LOGGERS[ $id ] = new FS_Logger( $id, $on, $echo );
76
+ }
77
+
78
+ return self::$LOGGERS[ $id ];
79
+ }
80
+
81
+ /**
82
+ * Initialize logging global info.
83
+ *
84
+ * @author Vova Feldman (@svovaf)
85
+ * @since 1.2.1.6
86
+ */
87
+ private static function init() {
88
+ self::$_ownerName = function_exists( 'get_current_user' ) ?
89
+ get_current_user() :
90
+ 'unknown';
91
+ self::$_isStorageLoggingOn = ( 1 == get_option( 'fs_storage_logger', 0 ) );
92
+ self::$_abspathLength = strlen( ABSPATH );
93
+ self::$_processID = mt_rand( 0, 32000 );
94
+
95
+ // Process ID may be `false` on errors.
96
+ if ( ! is_numeric( self::$_processID ) ) {
97
+ self::$_processID = 0;
98
+ }
99
+ }
100
+
101
+ private static function hook_footer() {
102
+ if ( self::$_HOOKED_FOOTER ) {
103
+ return;
104
+ }
105
+
106
+ if ( is_admin() ) {
107
+ add_action( 'admin_footer', 'FS_Logger::dump', 100 );
108
+ } else {
109
+ add_action( 'wp_footer', 'FS_Logger::dump', 100 );
110
+ }
111
+ }
112
+
113
+ function is_on() {
114
+ return $this->_on;
115
+ }
116
+
117
+ function on() {
118
+ $this->_on = true;
119
+
120
+ if ( ! function_exists( 'dbDelta' ) ) {
121
+ require_once ABSPATH . 'wp-admin/includes/upgrade.php';
122
+ }
123
+
124
+ self::hook_footer();
125
+ }
126
+
127
+ function echo_on() {
128
+ $this->on();
129
+
130
+ $this->_echo = true;
131
+ }
132
+
133
+ function is_echo_on() {
134
+ return $this->_echo;
135
+ }
136
+
137
+ function get_id() {
138
+ return $this->_id;
139
+ }
140
+
141
+ function get_file() {
142
+ return $this->_file_start;
143
+ }
144
+
145
+ private function _log( &$message, $type, $wrapper = false ) {
146
+ if ( ! $this->is_on() ) {
147
+ return;
148
+ }
149
+
150
+ $bt = debug_backtrace();
151
+ $depth = $wrapper ? 3 : 2;
152
+ while ( $depth < count( $bt ) - 1 && 'eval' === $bt[ $depth ]['function'] ) {
153
+ $depth ++;
154
+ }
155
+
156
+ $caller = $bt[ $depth ];
157
+
158
+ /**
159
+ * Retrieve the correct call file & line number from backtrace
160
+ * when logging from a wrapper method.
161
+ *
162
+ * @author Vova Feldman
163
+ * @since 1.2.1.6
164
+ */
165
+ if ( empty( $caller['line'] ) ) {
166
+ $depth --;
167
+
168
+ while ( $depth >= 0 ) {
169
+ if ( ! empty( $bt[ $depth ]['line'] ) ) {
170
+ $caller['line'] = $bt[ $depth ]['line'];
171
+ $caller['file'] = $bt[ $depth ]['file'];
172
+ break;
173
+ }
174
+ }
175
+ }
176
+
177
+ $log = array_merge( $caller, array(
178
+ 'cnt' => self::$CNT ++,
179
+ 'logger' => $this,
180
+ 'timestamp' => microtime( true ),
181
+ 'log_type' => $type,
182
+ 'msg' => $message,
183
+ ) );
184
+
185
+ if ( self::$_isStorageLoggingOn ) {
186
+ $this->db_log( $type, $message, self::$CNT, $caller );
187
+ }
188
+
189
+ self::$LOG[] = $log;
190
+
191
+ if ( $this->is_echo_on() && ! Freemius::is_ajax() ) {
192
+ echo self::format_html( $log ) . "\n";
193
+ }
194
+ }
195
+
196
+ function log( $message, $wrapper = false ) {
197
+ $this->_log( $message, 'log', $wrapper );
198
+ }
199
+
200
+ function info( $message, $wrapper = false ) {
201
+ $this->_log( $message, 'info', $wrapper );
202
+ }
203
+
204
+ function warn( $message, $wrapper = false ) {
205
+ $this->_log( $message, 'warn', $wrapper );
206
+ }
207
+
208
+ function error( $message, $wrapper = false ) {
209
+ $this->_log( $message, 'error', $wrapper );
210
+ }
211
+
212
+ /**
213
+ * Log API error.
214
+ *
215
+ * @author Vova Feldman (@svovaf)
216
+ * @since 1.2.1.5
217
+ *
218
+ * @param mixed $api_result
219
+ * @param bool $wrapper
220
+ */
221
+ function api_error( $api_result, $wrapper = false ) {
222
+ $message = '';
223
+ if ( is_object( $api_result ) &&
224
+ ! empty( $api_result->error ) &&
225
+ ! empty( $api_result->error->message )
226
+ ) {
227
+ $message = $api_result->error->message;
228
+ } else if ( is_object( $api_result ) ) {
229
+ $message = var_export( $api_result, true );
230
+ } else if ( is_string( $api_result ) ) {
231
+ $message = $api_result;
232
+ } else if ( empty( $api_result ) ) {
233
+ $message = 'Empty API result.';
234
+ }
235
+
236
+ $message = 'API Error: ' . $message;
237
+
238
+ $this->_log( $message, 'error', $wrapper );
239
+ }
240
+
241
+ function entrance( $message = '', $wrapper = false ) {
242
+ $msg = 'Entrance' . ( empty( $message ) ? '' : ' > ' ) . $message;
243
+
244
+ $this->_log( $msg, 'log', $wrapper );
245
+ }
246
+
247
+ function departure( $message = '', $wrapper = false ) {
248
+ $msg = 'Departure' . ( empty( $message ) ? '' : ' > ' ) . $message;
249
+
250
+ $this->_log( $msg, 'log', $wrapper );
251
+ }
252
+
253
+ #--------------------------------------------------------------------------------
254
+ #region Log Formatting
255
+ #--------------------------------------------------------------------------------
256
+
257
+ private static function format( $log, $show_type = true ) {
258
+ return '[' . str_pad( $log['cnt'], strlen( self::$CNT ), '0', STR_PAD_LEFT ) . '] [' . $log['logger']->_id . '] ' . ( $show_type ? '[' . $log['log_type'] . ']' : '' ) . ( ! empty( $log['class'] ) ? $log['class'] . $log['type'] : '' ) . $log['function'] . ' >> ' . $log['msg'] . ( isset( $log['file'] ) ? ' (' . substr( $log['file'], $log['logger']->_file_start ) . ' ' . $log['line'] . ') ' : '' ) . ' [' . $log['timestamp'] . ']';
259
+ }
260
+
261
+ private static function format_html( $log ) {
262
+ return '<div style="font-size: 13px; font-family: monospace; color: #7da767; padding: 8px 3px; background: #000; border-bottom: 1px solid #555;">[' . $log['cnt'] . '] [' . $log['logger']->_id . '] [' . $log['log_type'] . '] <b><code style="color: #c4b1e0;">' . ( ! empty( $log['class'] ) ? $log['class'] . $log['type'] : '' ) . $log['function'] . '</code> >> <b style="color: #f59330;">' . esc_html( $log['msg'] ) . '</b></b>' . ( isset( $log['file'] ) ? ' (' . substr( $log['file'], $log['logger']->_file_start ) . ' ' . $log['line'] . ')' : '' ) . ' [' . $log['timestamp'] . ']</div>';
263
+ }
264
+
265
+ #endregion
266
+
267
+ static function dump() {
268
+ ?>
269
+ <!-- BEGIN: Freemius PHP Console Log -->
270
+ <script type="text/javascript">
271
+ <?php
272
+ foreach ( self::$LOG as $log ) {
273
+ echo 'console.' . $log['log_type'] . '(' . json_encode( self::format( $log, false ) ) . ')' . "\n";
274
+ }
275
+ ?>
276
+ </script>
277
+ <!-- END: Freemius PHP Console Log -->
278
+ <?php
279
+ }
280
+
281
+ static function get_log() {
282
+ return self::$LOG;
283
+ }
284
+
285
+ #--------------------------------------------------------------------------------
286
+ #region Database Logging
287
+ #--------------------------------------------------------------------------------
288
+
289
+ /**
290
+ * @author Vova Feldman (@svovaf)
291
+ * @since 1.2.1.6
292
+ *
293
+ * @return bool
294
+ */
295
+ public static function is_storage_logging_on() {
296
+ if ( ! isset( self::$_isStorageLoggingOn ) ) {
297
+ self::$_isStorageLoggingOn = ( 1 == get_option( 'fs_storage_logger', 0 ) );
298
+ }
299
+
300
+ return self::$_isStorageLoggingOn;
301
+ }
302
+
303
+ /**
304
+ * Turns on/off database persistent debugging to capture
305
+ * multi-session logs to debug complex flows like
306
+ * plugin auto-deactivate on premium version activation.
307
+ *
308
+ * @todo Check if Theme Check has issues with DB tables for themes.
309
+ *
310
+ * @author Vova Feldman (@svovaf)
311
+ * @since 1.2.1.6
312
+ *
313
+ * @param bool $is_on
314
+ *
315
+ * @return bool
316
+ */
317
+ public static function _set_storage_logging( $is_on = true ) {
318
+ global $wpdb;
319
+
320
+ $table = "{$wpdb->prefix}fs_logger";
321
+
322
+ if ( $is_on ) {
323
+ /**
324
+ * Create logging table.
325
+ *
326
+ * NOTE:
327
+ * dbDelta must use KEY and not INDEX for indexes.
328
+ *
329
+ * @link https://core.trac.wordpress.org/ticket/2695
330
+ */
331
+ $result = $wpdb->query( "CREATE TABLE {$table} (
332
+ `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
333
+ `process_id` INT UNSIGNED NOT NULL,
334
+ `user_name` VARCHAR(64) NOT NULL,
335
+ `logger` VARCHAR(128) NOT NULL,
336
+ `log_order` INT UNSIGNED NOT NULL,
337
+ `type` ENUM('log','info','warn','error') NOT NULL DEFAULT 'log',
338
+ `message` TEXT NOT NULL,
339
+ `file` VARCHAR(256) NOT NULL,
340
+ `line` INT UNSIGNED NOT NULL,
341
+ `function` VARCHAR(256) NOT NULL,
342
+ `request_type` ENUM('call','ajax','cron') NOT NULL DEFAULT 'call',
343
+ `request_url` VARCHAR(1024) NOT NULL,
344
+ `created` DECIMAL(16, 6) NOT NULL,
345
+ PRIMARY KEY (`id`),
346
+ KEY `process_id` (`process_id` ASC),
347
+ KEY `process_logger` (`process_id` ASC, `logger` ASC),
348
+ KEY `function` (`function` ASC),
349
+ KEY `type` (`type` ASC))" );
350
+ } else {
351
+ /**
352
+ * Drop logging table.
353
+ */
354
+ $result = $wpdb->query( "DROP TABLE IF EXISTS $table;" );
355
+ }
356
+
357
+ if ( false !== $result ) {
358
+ update_option( 'fs_storage_logger', ( $is_on ? 1 : 0 ) );
359
+ }
360
+
361
+ return ( false !== $result );
362
+ }
363
+
364
+ /**
365
+ * @author Vova Feldman (@svovaf)
366
+ * @since 1.2.1.6
367
+ *
368
+ * @param string $type
369
+ * @param string $message
370
+ * @param int $log_order
371
+ * @param array $caller
372
+ *
373
+ * @return false|int
374
+ */
375
+ private function db_log(
376
+ &$type,
377
+ &$message,
378
+ &$log_order,
379
+ &$caller
380
+ ) {
381
+ global $wpdb;
382
+
383
+ $request_type = 'call';
384
+ if ( defined( 'DOING_CRON' ) && DOING_CRON ) {
385
+ $request_type = 'cron';
386
+ } else if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
387
+ $request_type = 'ajax';
388
+ }
389
+
390
+ $request_url = WP_FS__IS_HTTP_REQUEST ?
391
+ $_SERVER['REQUEST_URI'] :
392
+ '';
393
+
394
+ return $wpdb->insert(
395
+ "{$wpdb->prefix}fs_logger",
396
+ array(
397
+ 'process_id' => self::$_processID,
398
+ 'user_name' => self::$_ownerName,
399
+ 'logger' => $this->_id,
400
+ 'log_order' => $log_order,
401
+ 'type' => $type,
402
+ 'request_type' => $request_type,
403
+ 'request_url' => $request_url,
404
+ 'message' => $message,
405
+ 'file' => isset( $caller['file'] ) ?
406
+ substr( $caller['file'], self::$_abspathLength ) :
407
+ '',
408
+ 'line' => $caller['line'],
409
+ 'function' => ( ! empty( $caller['class'] ) ? $caller['class'] . $caller['type'] : '' ) . $caller['function'],
410
+ 'created' => microtime( true ),
411
+ )
412
+ );
413
+ }
414
+
415
+ /**
416
+ * Persistent DB logger columns.
417
+ *
418
+ * @var array
419
+ */
420
+ private static $_log_columns = array(
421
+ 'id',
422
+ 'process_id',
423
+ 'user_name',
424
+ 'logger',
425
+ 'log_order',
426
+ 'type',
427
+ 'message',
428
+ 'file',
429
+ 'line',
430
+ 'function',
431
+ 'request_type',
432
+ 'request_url',
433
+ 'created',
434
+ );
435
+
436
+ /**
437
+ * Create DB logs query.
438
+ *
439
+ * @author Vova Feldman (@svovaf)
440
+ * @since 1.2.1.6
441
+ *
442
+ * @param bool $filters
443
+ * @param int $limit
444
+ * @param int $offset
445
+ * @param bool $order
446
+ * @param bool $escape_eol
447
+ *
448
+ * @return string
449
+ */
450
+ private static function build_db_logs_query(
451
+ $filters = false,
452
+ $limit = 200,
453
+ $offset = 0,
454
+ $order = false,
455
+ $escape_eol = false
456
+ ) {
457
+ global $wpdb;
458
+
459
+ $select = '*';
460
+
461
+ if ( $escape_eol ) {
462
+ $select = '';
463
+ for ( $i = 0, $len = count( self::$_log_columns ); $i < $len; $i ++ ) {
464
+ if ( $i > 0 ) {
465
+ $select .= ', ';
466
+ }
467
+
468
+ if ( 'message' !== self::$_log_columns[ $i ] ) {
469
+ $select .= self::$_log_columns[ $i ];
470
+ } else {
471
+ $select .= 'REPLACE(message , \'\n\', \' \') AS message';
472
+ }
473
+ }
474
+ }
475
+
476
+ $query = "SELECT {$select} FROM {$wpdb->prefix}fs_logger";
477
+ if ( is_array( $filters ) ) {
478
+ $criteria = array();
479
+
480
+ if ( ! empty( $filters['type'] ) && 'all' !== $filters['type'] ) {
481
+ $filters['type'] = strtolower( $filters['type'] );
482
+
483
+ switch ( $filters['type'] ) {
484
+ case 'warn_error':
485
+ $criteria[] = array( 'col' => 'type', 'val' => array( 'warn', 'error' ) );
486
+ break;
487
+ case 'error':
488
+ case 'warn':
489
+ $criteria[] = array( 'col' => 'type', 'val' => $filters['type'] );
490
+ break;
491
+ case 'info':
492
+ default:
493
+ $criteria[] = array( 'col' => 'type', 'val' => array( 'info', 'log' ) );
494
+ break;
495
+ }
496
+ }
497
+
498
+ if ( ! empty( $filters['request_type'] ) ) {
499
+ $filters['request_type'] = strtolower( $filters['request_type'] );
500
+
501
+ if ( in_array( $filters['request_type'], array( 'call', 'ajax', 'cron' ) ) ) {
502
+ $criteria[] = array( 'col' => 'request_type', 'val' => $filters['request_type'] );
503
+ }
504
+ }
505
+
506
+ if ( ! empty( $filters['file'] ) ) {
507
+ $criteria[] = array(
508
+ 'col' => 'file',
509
+ 'op' => 'LIKE',
510
+ 'val' => '%' . esc_sql( $filters['file'] ),
511
+ );
512
+ }
513
+
514
+ if ( ! empty( $filters['function'] ) ) {
515
+ $criteria[] = array(
516
+ 'col' => 'function',
517
+ 'op' => 'LIKE',
518
+ 'val' => '%' . esc_sql( $filters['function'] ),
519
+ );
520
+ }
521
+
522
+ if ( ! empty( $filters['process_id'] ) && is_numeric( $filters['process_id'] ) ) {
523
+ $criteria[] = array( 'col' => 'process_id', 'val' => $filters['process_id'] );
524
+ }
525
+
526
+ if ( ! empty( $filters['logger'] ) ) {
527
+ $criteria[] = array(
528
+ 'col' => 'logger',
529
+ 'op' => 'LIKE',
530
+ 'val' => '%' . esc_sql( $filters['logger'] ) . '%',
531
+ );
532
+ }
533
+
534
+ if ( ! empty( $filters['message'] ) ) {
535
+ $criteria[] = array(
536
+ 'col' => 'message',
537
+ 'op' => 'LIKE',
538
+ 'val' => '%' . esc_sql( $filters['message'] ) . '%',
539
+ );
540
+ }
541
+
542
+ if ( 0 < count( $criteria ) ) {
543
+ $query .= "\nWHERE\n";
544
+
545
+ $first = true;
546
+ foreach ( $criteria as $c ) {
547
+ if ( ! $first ) {
548
+ $query .= "AND\n";
549
+ }
550
+
551
+ if ( is_array( $c['val'] ) ) {
552
+ $operator = 'IN';
553
+
554
+ for ( $i = 0, $len = count( $c['val'] ); $i < $len; $i ++ ) {
555
+ $c['val'][ $i ] = "'" . esc_sql( $c['val'][ $i ] ) . "'";
556
+ }
557
+
558
+ $val = '(' . implode( ',', $c['val'] ) . ')';
559
+ } else {
560
+ $operator = ! empty( $c['op'] ) ? $c['op'] : '=';
561
+ $val = "'" . esc_sql( $c['val'] ) . "'";
562
+ }
563
+
564
+ $query .= "`{$c['col']}` {$operator} {$val}\n";
565
+
566
+ $first = false;
567
+ }
568
+ }
569
+ }
570
+
571
+ if ( ! is_array( $order ) ) {
572
+ $order = array(
573
+ 'col' => 'id',
574
+ 'order' => 'desc'
575
+ );
576
+ }
577
+
578
+ $query .= " ORDER BY {$order['col']} {$order['order']} LIMIT {$offset},{$limit}";
579
+
580
+ return $query;
581
+ }
582
+
583
+ /**
584
+ * Load logs from DB.
585
+ *
586
+ * @author Vova Feldman (@svovaf)
587
+ * @since 1.2.1.6
588
+ *
589
+ * @param bool $filters
590
+ * @param int $limit
591
+ * @param int $offset
592
+ * @param bool $order
593
+ *
594
+ * @return object[]|null
595
+ */
596
+ public static function load_db_logs(
597
+ $filters = false,
598
+ $limit = 200,
599
+ $offset = 0,
600
+ $order = false
601
+ ) {
602
+ global $wpdb;
603
+
604
+ $query = self::build_db_logs_query(
605
+ $filters,
606
+ $limit,
607
+ $offset,
608
+ $order
609
+ );
610
+
611
+ return $wpdb->get_results( $query );
612
+ }
613
+
614
+ /**
615
+ * Load logs from DB.
616
+ *
617
+ * @author Vova Feldman (@svovaf)
618
+ * @since 1.2.1.6
619
+ *
620
+ * @param bool $filters
621
+ * @param string $filename
622
+ * @param int $limit
623
+ * @param int $offset
624
+ * @param bool $order
625
+ *
626
+ * @return false|string File download URL or false on failure.
627
+ */
628
+ public static function download_db_logs(
629
+ $filters = false,
630
+ $filename = '',
631
+ $limit = 10000,
632
+ $offset = 0,
633
+ $order = false
634
+ ) {
635
+ global $wpdb;
636
+
637
+ $query = self::build_db_logs_query(
638
+ $filters,
639
+ $limit,
640
+ $offset,
641
+ $order,
642
+ true
643
+ );
644
+
645
+ $upload_dir = wp_upload_dir();
646
+ if ( empty( $filename ) ) {
647
+ $filename = 'fs-logs-' . date( 'Y-m-d_H-i-s', WP_FS__SCRIPT_START_TIME ) . '.csv';
648
+ }
649
+ $filepath = rtrim( $upload_dir['path'], '/' ) . "/{$filename}";
650
+
651
+ $query .= " INTO OUTFILE '{$filepath}' FIELDS TERMINATED BY '\t' ESCAPED BY '\\\\' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\\n'";
652
+
653
+ $columns = '';
654
+ for ( $i = 0, $len = count( self::$_log_columns ); $i < $len; $i ++ ) {
655
+ if ( $i > 0 ) {
656
+ $columns .= ', ';
657
+ }
658
+
659
+ $columns .= "'" . self::$_log_columns[ $i ] . "'";
660
+ }
661
+
662
+ $query = "SELECT {$columns} UNION ALL " . $query;
663
+
664
+ $result = $wpdb->query( $query );
665
+
666
+ if ( false === $result ) {
667
+ return false;
668
+ }
669
+
670
+ return rtrim( $upload_dir['url'], '/' ) . '/' . $filename;
671
+ }
672
+
673
+ /**
674
+ * @author Vova Feldman (@svovaf)
675
+ * @since 1.2.1.6
676
+ *
677
+ * @param string $filename
678
+ *
679
+ * @return string
680
+ */
681
+ public static function get_logs_download_url( $filename = '' ) {
682
+ $upload_dir = wp_upload_dir();
683
+ if ( empty( $filename ) ) {
684
+ $filename = 'fs-logs-' . date( 'Y-m-d_H-i-s', WP_FS__SCRIPT_START_TIME ) . '.csv';
685
+ }
686
+
687
+ return rtrim( $upload_dir['url'], '/' ) . $filename;
688
+ }
689
+
690
+ #endregion
691
+ }
freemius/includes/class-fs-security.php CHANGED
@@ -1,85 +1,85 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.3
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- define( 'WP_FS__SECURITY_PARAMS_PREFIX', 's_' );
14
-
15
- /**
16
- * Class FS_Security
17
- */
18
- class FS_Security {
19
- /**
20
- * @var FS_Security
21
- * @since 1.0.3
22
- */
23
- private static $_instance;
24
- /**
25
- * @var FS_Logger
26
- * @since 1.0.3
27
- */
28
- private static $_logger;
29
-
30
- /**
31
- * @return \FS_Security
32
- */
33
- public static function instance() {
34
- if ( ! isset( self::$_instance ) ) {
35
- self::$_instance = new FS_Security();
36
- self::$_logger = FS_Logger::get_logger(
37
- WP_FS__SLUG,
38
- WP_FS__DEBUG_SDK,
39
- WP_FS__ECHO_DEBUG_SDK
40
- );
41
- }
42
-
43
- return self::$_instance;
44
- }
45
-
46
- private function __construct() {
47
- }
48
-
49
- /**
50
- * @param \FS_Scope_Entity $entity
51
- * @param int $timestamp
52
- * @param string $action
53
- *
54
- * @return string
55
- */
56
- function get_secure_token( FS_Scope_Entity $entity, $timestamp, $action = '' ) {
57
- return md5(
58
- $timestamp .
59
- $entity->id .
60
- $entity->secret_key .
61
- $entity->public_key .
62
- $action
63
- );
64
- }
65
-
66
- /**
67
- * @param \FS_Scope_Entity $entity
68
- * @param int|bool $timestamp
69
- * @param string $action
70
- *
71
- * @return array
72
- */
73
- function get_context_params( FS_Scope_Entity $entity, $timestamp = false, $action = '' ) {
74
- if ( false === $timestamp ) {
75
- $timestamp = time();
76
- }
77
-
78
- return array(
79
- 's_ctx_type' => $entity->get_type(),
80
- 's_ctx_id' => $entity->id,
81
- 's_ctx_ts' => $timestamp,
82
- 's_ctx_secure' => $this->get_secure_token( $entity, $timestamp, $action ),
83
- );
84
- }
85
- }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.0.3
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ define( 'WP_FS__SECURITY_PARAMS_PREFIX', 's_' );
14
+
15
+ /**
16
+ * Class FS_Security
17
+ */
18
+ class FS_Security {
19
+ /**
20
+ * @var FS_Security
21
+ * @since 1.0.3
22
+ */
23
+ private static $_instance;
24
+ /**
25
+ * @var FS_Logger
26
+ * @since 1.0.3
27
+ */
28
+ private static $_logger;
29
+
30
+ /**
31
+ * @return \FS_Security
32
+ */
33
+ public static function instance() {
34
+ if ( ! isset( self::$_instance ) ) {
35
+ self::$_instance = new FS_Security();
36
+ self::$_logger = FS_Logger::get_logger(
37
+ WP_FS__SLUG,
38
+ WP_FS__DEBUG_SDK,
39
+ WP_FS__ECHO_DEBUG_SDK
40
+ );
41
+ }
42
+
43
+ return self::$_instance;
44
+ }
45
+
46
+ private function __construct() {
47
+ }
48
+
49
+ /**
50
+ * @param \FS_Scope_Entity $entity
51
+ * @param int $timestamp
52
+ * @param string $action
53
+ *
54
+ * @return string
55
+ */
56
+ function get_secure_token( FS_Scope_Entity $entity, $timestamp, $action = '' ) {
57
+ return md5(
58
+ $timestamp .
59
+ $entity->id .
60
+ $entity->secret_key .
61
+ $entity->public_key .
62
+ $action
63
+ );
64
+ }
65
+
66
+ /**
67
+ * @param \FS_Scope_Entity $entity
68
+ * @param int|bool $timestamp
69
+ * @param string $action
70
+ *
71
+ * @return array
72
+ */
73
+ function get_context_params( FS_Scope_Entity $entity, $timestamp = false, $action = '' ) {
74
+ if ( false === $timestamp ) {
75
+ $timestamp = time();
76
+ }
77
+
78
+ return array(
79
+ 's_ctx_type' => $entity->get_type(),
80
+ 's_ctx_id' => $entity->id,
81
+ 's_ctx_ts' => $timestamp,
82
+ 's_ctx_secure' => $this->get_secure_token( $entity, $timestamp, $action ),
83
+ );
84
+ }
85
+ }
freemius/includes/class-fs-user-lock.php CHANGED
@@ -1,126 +1,126 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 2.1.0
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Class FS_User_Lock
15
- */
16
- class FS_User_Lock {
17
- /**
18
- * @var int
19
- */
20
- private $_wp_user_id;
21
- /**
22
- * @var int
23
- */
24
- private $_thread_id;
25
-
26
- #--------------------------------------------------------------------------------
27
- #region Singleton
28
- #--------------------------------------------------------------------------------
29
-
30
- /**
31
- * @var FS_User_Lock
32
- */
33
- private static $_instance;
34
-
35
- /**
36
- * @author Vova Feldman (@svovaf)
37
- * @since 2.1.0
38
- *
39
- * @return FS_User_Lock
40
- */
41
- static function instance() {
42
- if ( ! isset( self::$_instance ) ) {
43
- self::$_instance = new self();
44
- }
45
-
46
- return self::$_instance;
47
- }
48
-
49
- #endregion
50
-
51
- private function __construct() {
52
- $this->_wp_user_id = Freemius::get_current_wp_user_id();
53
- $this->_thread_id = mt_rand( 0, 32000 );
54
- }
55
-
56
-
57
- /**
58
- * Try to acquire lock. If the lock is already set or is being acquired by another locker, don't do anything.
59
- *
60
- * @author Vova Feldman (@svovaf)
61
- * @since 2.1.0
62
- *
63
- * @param int $expiration
64
- *
65
- * @return bool TRUE if successfully acquired lock.
66
- */
67
- function try_lock( $expiration = 0 ) {
68
- if ( $this->is_locked() ) {
69
- // Already locked.
70
- return false;
71
- }
72
-
73
- set_site_transient( "locked_{$this->_wp_user_id}", $this->_thread_id, $expiration );
74
-
75
- if ( $this->has_lock() ) {
76
- set_site_transient( "locked_{$this->_wp_user_id}", true, $expiration );
77
-
78
- return true;
79
- }
80
-
81
- return false;
82
- }
83
-
84
- /**
85
- * Acquire lock regardless if it's already acquired by another locker or not.
86
- *
87
- * @author Vova Feldman (@svovaf)
88
- * @since 2.1.0
89
- *
90
- * @param int $expiration
91
- */
92
- function lock( $expiration = 0 ) {
93
- set_site_transient( "locked_{$this->_wp_user_id}", true, $expiration );
94
- }
95
-
96
- /**
97
- * Checks if lock is currently acquired.
98
- *
99
- * @author Vova Feldman (@svovaf)
100
- * @since 2.1.0
101
- *
102
- * @return bool
103
- */
104
- function is_locked() {
105
- return ( false !== get_site_transient( "locked_{$this->_wp_user_id}" ) );
106
- }
107
-
108
- /**
109
- * Unlock the lock.
110
- *
111
- * @author Vova Feldman (@svovaf)
112
- * @since 2.1.0
113
- */
114
- function unlock() {
115
- delete_site_transient( "locked_{$this->_wp_user_id}" );
116
- }
117
-
118
- /**
119
- * Checks if lock is currently acquired by the current locker.
120
- *
121
- * @return bool
122
- */
123
- private function has_lock() {
124
- return ( $this->_thread_id == get_site_transient( "locked_{$this->_wp_user_id}" ) );
125
- }
126
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 2.1.0
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * Class FS_User_Lock
15
+ */
16
+ class FS_User_Lock {
17
+ /**
18
+ * @var int
19
+ */
20
+ private $_wp_user_id;
21
+ /**
22
+ * @var int
23
+ */
24
+ private $_thread_id;
25
+
26
+ #--------------------------------------------------------------------------------
27
+ #region Singleton
28
+ #--------------------------------------------------------------------------------
29
+
30
+ /**
31
+ * @var FS_User_Lock
32
+ */
33
+ private static $_instance;
34
+
35
+ /**
36
+ * @author Vova Feldman (@svovaf)
37
+ * @since 2.1.0
38
+ *
39
+ * @return FS_User_Lock
40
+ */
41
+ static function instance() {
42
+ if ( ! isset( self::$_instance ) ) {
43
+ self::$_instance = new self();
44
+ }
45
+
46
+ return self::$_instance;
47
+ }
48
+
49
+ #endregion
50
+
51
+ private function __construct() {
52
+ $this->_wp_user_id = Freemius::get_current_wp_user_id();
53
+ $this->_thread_id = mt_rand( 0, 32000 );
54
+ }
55
+
56
+
57
+ /**
58
+ * Try to acquire lock. If the lock is already set or is being acquired by another locker, don't do anything.
59
+ *
60
+ * @author Vova Feldman (@svovaf)
61
+ * @since 2.1.0
62
+ *
63
+ * @param int $expiration
64
+ *
65
+ * @return bool TRUE if successfully acquired lock.
66
+ */
67
+ function try_lock( $expiration = 0 ) {
68
+ if ( $this->is_locked() ) {
69
+ // Already locked.
70
+ return false;
71
+ }
72
+
73
+ set_site_transient( "locked_{$this->_wp_user_id}", $this->_thread_id, $expiration );
74
+
75
+ if ( $this->has_lock() ) {
76
+ set_site_transient( "locked_{$this->_wp_user_id}", true, $expiration );
77
+
78
+ return true;
79
+ }
80
+
81
+ return false;
82
+ }
83
+
84
+ /**
85
+ * Acquire lock regardless if it's already acquired by another locker or not.
86
+ *
87
+ * @author Vova Feldman (@svovaf)
88
+ * @since 2.1.0
89
+ *
90
+ * @param int $expiration
91
+ */
92
+ function lock( $expiration = 0 ) {
93
+ set_site_transient( "locked_{$this->_wp_user_id}", true, $expiration );
94
+ }
95
+
96
+ /**
97
+ * Checks if lock is currently acquired.
98
+ *
99
+ * @author Vova Feldman (@svovaf)
100
+ * @since 2.1.0
101
+ *
102
+ * @return bool
103
+ */
104
+ function is_locked() {
105
+ return ( false !== get_site_transient( "locked_{$this->_wp_user_id}" ) );
106
+ }
107
+
108
+ /**
109
+ * Unlock the lock.
110
+ *
111
+ * @author Vova Feldman (@svovaf)
112
+ * @since 2.1.0
113
+ */
114
+ function unlock() {
115
+ delete_site_transient( "locked_{$this->_wp_user_id}" );
116
+ }
117
+
118
+ /**
119
+ * Checks if lock is currently acquired by the current locker.
120
+ *
121
+ * @return bool
122
+ */
123
+ private function has_lock() {
124
+ return ( $this->_thread_id == get_site_transient( "locked_{$this->_wp_user_id}" ) );
125
+ }
126
  }
freemius/includes/customizer/class-fs-customizer-support-section.php CHANGED
@@ -1,102 +1,102 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.2.2.7
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Class Zerif_Customizer_Theme_Info_Main
15
- *
16
- * @since 1.0.0
17
- * @access public
18
- */
19
- class FS_Customizer_Support_Section extends WP_Customize_Section {
20
-
21
- function __construct( $manager, $id, $args = array() ) {
22
- $manager->register_section_type( 'FS_Customizer_Support_Section' );
23
-
24
- parent::__construct( $manager, $id, $args );
25
- }
26
-
27
- /**
28
- * The type of customize section being rendered.
29
- *
30
- * @since 1.0.0
31
- * @access public
32
- * @var string
33
- */
34
- public $type = 'freemius-support-section';
35
-
36
- /**
37
- * @var Freemius
38
- */
39
- public $fs = null;
40
-
41
- /**
42
- * Add custom parameters to pass to the JS via JSON.
43
- *
44
- * @since 1.0.0
45
- */
46
- public function json() {
47
- $json = parent::json();
48
-
49
- $is_contact_visible = $this->fs->is_page_visible( 'contact' );
50
- $is_support_visible = $this->fs->is_page_visible( 'support' );
51
-
52
- $json['theme_title'] = $this->fs->get_plugin_name();
53
-
54
- if ( $is_contact_visible && $is_support_visible ) {
55
- $json['theme_title'] .= ' ' . $this->fs->get_text_inline( 'Support', 'support' );
56
- }
57
-
58
- if ( $is_contact_visible ) {
59
- $json['contact'] = array(
60
- 'label' => $this->fs->get_text_inline( 'Contact Us', 'contact-us' ),
61
- 'url' => $this->fs->contact_url(),
62
- );
63
- }
64
-
65
- if ( $is_support_visible ) {
66
- $json['support'] = array(
67
- 'label' => $this->fs->get_text_inline( 'Support Forum', 'support-forum' ),
68
- 'url' => $this->fs->get_support_forum_url()
69
- );
70
- }
71
-
72
- return $json;
73
- }
74
-
75
- /**
76
- * Outputs the Underscore.js template.
77
- *
78
- * @since 1.0.0
79
- */
80
- protected function render_template() {
81
- ?>
82
- <li id="fs_customizer_support"
83
- class="accordion-section control-section control-section-{{ data.type }} cannot-expand">
84
- <h3 class="accordion-section-title">
85
- <span>{{ data.theme_title }}</span>
86
- <# if ( data.contact && data.support ) { #>
87
- <div class="button-group">
88
- <# } #>
89
- <# if ( data.contact ) { #>
90
- <a class="button" href="{{ data.contact.url }}" target="_blank" rel="noopener noreferrer">{{ data.contact.label }} </a>
91
- <# } #>
92
- <# if ( data.support ) { #>
93
- <a class="button" href="{{ data.support.url }}" target="_blank" rel="noopener noreferrer">{{ data.support.label }} </a>
94
- <# } #>
95
- <# if ( data.contact && data.support ) { #>
96
- </div>
97
- <# } #>
98
- </h3>
99
- </li>
100
- <?php
101
- }
102
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.2.2.7
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * Class Zerif_Customizer_Theme_Info_Main
15
+ *
16
+ * @since 1.0.0
17
+ * @access public
18
+ */
19
+ class FS_Customizer_Support_Section extends WP_Customize_Section {
20
+
21
+ function __construct( $manager, $id, $args = array() ) {
22
+ $manager->register_section_type( 'FS_Customizer_Support_Section' );
23
+
24
+ parent::__construct( $manager, $id, $args );
25
+ }
26
+
27
+ /**
28
+ * The type of customize section being rendered.
29
+ *
30
+ * @since 1.0.0
31
+ * @access public
32
+ * @var string
33
+ */
34
+ public $type = 'freemius-support-section';
35
+
36
+ /**
37
+ * @var Freemius
38
+ */
39
+ public $fs = null;
40
+
41
+ /**
42
+ * Add custom parameters to pass to the JS via JSON.
43
+ *
44
+ * @since 1.0.0
45
+ */
46
+ public function json() {
47
+ $json = parent::json();
48
+
49
+ $is_contact_visible = $this->fs->is_page_visible( 'contact' );
50
+ $is_support_visible = $this->fs->is_page_visible( 'support' );
51
+
52
+ $json['theme_title'] = $this->fs->get_plugin_name();
53
+
54
+ if ( $is_contact_visible && $is_support_visible ) {
55
+ $json['theme_title'] .= ' ' . $this->fs->get_text_inline( 'Support', 'support' );
56
+ }
57
+
58
+ if ( $is_contact_visible ) {
59
+ $json['contact'] = array(
60
+ 'label' => $this->fs->get_text_inline( 'Contact Us', 'contact-us' ),
61
+ 'url' => $this->fs->contact_url(),
62
+ );
63
+ }
64
+
65
+ if ( $is_support_visible ) {
66
+ $json['support'] = array(
67
+ 'label' => $this->fs->get_text_inline( 'Support Forum', 'support-forum' ),
68
+ 'url' => $this->fs->get_support_forum_url()
69
+ );
70
+ }
71
+
72
+ return $json;
73
+ }
74
+
75
+ /**
76
+ * Outputs the Underscore.js template.
77
+ *
78
+ * @since 1.0.0
79
+ */
80
+ protected function render_template() {
81
+ ?>
82
+ <li id="fs_customizer_support"
83
+ class="accordion-section control-section control-section-{{ data.type }} cannot-expand">
84
+ <h3 class="accordion-section-title">
85
+ <span>{{ data.theme_title }}</span>
86
+ <# if ( data.contact && data.support ) { #>
87
+ <div class="button-group">
88
+ <# } #>
89
+ <# if ( data.contact ) { #>
90
+ <a class="button" href="{{ data.contact.url }}" target="_blank" rel="noopener noreferrer">{{ data.contact.label }} </a>
91
+ <# } #>
92
+ <# if ( data.support ) { #>
93
+ <a class="button" href="{{ data.support.url }}" target="_blank" rel="noopener noreferrer">{{ data.support.label }} </a>
94
+ <# } #>
95
+ <# if ( data.contact && data.support ) { #>
96
+ </div>
97
+ <# } #>
98
+ </h3>
99
+ </li>
100
+ <?php
101
+ }
102
  }
freemius/includes/customizer/class-fs-customizer-upsell-control.php CHANGED
@@ -1,161 +1,161 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.2.2.7
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Class FS_Customizer_Upsell_Control
15
- */
16
- class FS_Customizer_Upsell_Control extends WP_Customize_Control {
17
-
18
- /**
19
- * Control type
20
- *
21
- * @var string control type
22
- */
23
- public $type = 'freemius-upsell-control';
24
-
25
- /**
26
- * @var Freemius
27
- */
28
- public $fs = null;
29
-
30
- /**
31
- * @param WP_Customize_Manager $manager the customize manager class.
32
- * @param string $id id.
33
- * @param array $args customizer manager parameters.
34
- */
35
- public function __construct( WP_Customize_Manager $manager, $id, array $args ) {
36
- $manager->register_control_type( 'FS_Customizer_Upsell_Control' );
37
-
38
- parent::__construct( $manager, $id, $args );
39
- }
40
-
41
- /**
42
- * Enqueue resources for the control.
43
- */
44
- public function enqueue() {
45
- fs_enqueue_local_style( 'fs_customizer', 'customizer.css' );
46
- }
47
-
48
- /**
49
- * Json conversion
50
- */
51
- public function to_json() {
52
- $pricing_cta = esc_html( $this->fs->get_pricing_cta_label() ) . '&nbsp;&nbsp;' . ( is_rtl() ? '&#x2190;' : '&#x27a4;' );
53
-
54
- parent::to_json();
55
-
56
- $this->json['button_text'] = $pricing_cta;
57
- $this->json['button_url'] = $this->fs->is_in_trial_promotion() ?
58
- $this->fs->get_trial_url() :
59
- $this->fs->get_upgrade_url();
60
-
61
- $api = FS_Plugin::is_valid_id( $this->fs->get_bundle_id() ) ?
62
- $this->fs->get_api_bundle_scope() :
63
- $this->fs->get_api_plugin_scope();
64
-
65
- // Load features.
66
- $pricing = $api->get( $this->fs->add_show_pending( "pricing.json" ) );
67
-
68
- if ( $this->fs->is_api_result_object( $pricing, 'plans' ) ) {
69
- // Add support features.
70
- if ( is_array( $pricing->plans ) && 0 < count( $pricing->plans ) ) {
71
- $support_features = array(
72
- 'kb' => 'Help Center',
73
- 'forum' => 'Support Forum',
74
- 'email' => 'Priority Email Support',
75
- 'phone' => 'Phone Support',
76
- 'skype' => 'Skype Support',
77
- 'is_success_manager' => 'Personal Success Manager',
78
- );
79
-
80
- for ( $i = 0, $len = count( $pricing->plans ); $i < $len; $i ++ ) {
81
- if ( 'free' == $pricing->plans[$i]->name ) {
82
- continue;
83
- }
84
-
85
- if ( ! isset( $pricing->plans[ $i ]->features ) ||
86
- ! is_array( $pricing->plans[ $i ]->features ) ) {
87
- $pricing->plans[$i]->features = array();
88
- }
89
-
90
- foreach ( $support_features as $key => $label ) {
91
- $key = ( 'is_success_manager' !== $key ) ?
92
- "support_{$key}" :
93
- $key;
94
-
95
- if ( ! empty( $pricing->plans[ $i ]->{$key} ) ) {
96
-
97
- $support_feature = new stdClass();
98
- $support_feature->title = $label;
99
-
100
- $pricing->plans[ $i ]->features[] = $support_feature;
101
- }
102
- }
103
- }
104
- }
105
- }
106
-
107
- $this->json['plans'] = $pricing->plans;
108
-
109
- $this->json['strings'] = array(
110
- 'plan' => $this->fs->get_text_x_inline( 'Plan', 'as product pricing plan', 'plan' ),
111
- );
112
- }
113
-
114
- /**
115
- * Control content
116
- */
117
- public function content_template() {
118
- ?>
119
- <div id="fs_customizer_upsell">
120
- <# if ( data.plans ) { #>
121
- <ul class="fs-customizer-plans">
122
- <# for (i in data.plans) { #>
123
- <# if ( 'free' != data.plans[i].name && (null != data.plans[i].features && 0 < data.plans[i].features.length) ) { #>
124
- <li class="fs-customizer-plan">
125
- <div class="fs-accordion-section-open">
126
- <h2 class="fs-accordion-section-title menu-item">
127
- <span>{{ data.plans[i].title }}</span>
128
- <button type="button" class="button-link item-edit" aria-expanded="true">
129
- <span class="screen-reader-text">Toggle section: {{ data.plans[i].title }} {{ data.strings.plan }}</span>
130
- <span class="toggle-indicator" aria-hidden="true"></span>
131
- </button>
132
- </h2>
133
- <div class="fs-accordion-section-content">
134
- <# if ( data.plans[i].description ) { #>
135
- <h3>{{ data.plans[i].description }}</h3>
136
- <# } #>
137
- <# if ( data.plans[i].features ) { #>
138
- <ul>
139
- <# for ( j in data.plans[i].features ) { #>
140
- <li><div class="fs-feature">
141
- <span class="dashicons dashicons-yes"></span><span><# if ( data.plans[i].features[j].value ) { #>{{ data.plans[i].features[j].value }} <# } #>{{ data.plans[i].features[j].title }}</span>
142
- <# if ( data.plans[i].features[j].description ) { #>
143
- <span class="dashicons dashicons-editor-help"><span class="fs-feature-desc">{{ data.plans[i].features[j].description }}</span></span>
144
- <# } #>
145
- </div></li>
146
- <# } #>
147
- </ul>
148
- <# } #>
149
- <# if ( 'free' != data.plans[i].name ) { #>
150
- <a href="{{ data.button_url }}" class="button button-primary" target="_blank">{{{ data.button_text }}}</a>
151
- <# } #>
152
- </div>
153
- </div>
154
- </li>
155
- <# } #>
156
- <# } #>
157
- </ul>
158
- <# } #>
159
- </div>
160
- <?php }
161
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.2.2.7
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * Class FS_Customizer_Upsell_Control
15
+ */
16
+ class FS_Customizer_Upsell_Control extends WP_Customize_Control {
17
+
18
+ /**
19
+ * Control type
20
+ *
21
+ * @var string control type
22
+ */
23
+ public $type = 'freemius-upsell-control';
24
+
25
+ /**
26
+ * @var Freemius
27
+ */
28
+ public $fs = null;
29
+
30
+ /**
31
+ * @param WP_Customize_Manager $manager the customize manager class.
32
+ * @param string $id id.
33
+ * @param array $args customizer manager parameters.
34
+ */
35
+ public function __construct( WP_Customize_Manager $manager, $id, array $args ) {
36
+ $manager->register_control_type( 'FS_Customizer_Upsell_Control' );
37
+
38
+ parent::__construct( $manager, $id, $args );
39
+ }
40
+
41
+ /**
42
+ * Enqueue resources for the control.
43
+ */
44
+ public function enqueue() {
45
+ fs_enqueue_local_style( 'fs_customizer', 'customizer.css' );
46
+ }
47
+
48
+ /**
49
+ * Json conversion
50
+ */
51
+ public function to_json() {
52
+ $pricing_cta = esc_html( $this->fs->get_pricing_cta_label() ) . '&nbsp;&nbsp;' . ( is_rtl() ? '&#x2190;' : '&#x27a4;' );
53
+
54
+ parent::to_json();
55
+
56
+ $this->json['button_text'] = $pricing_cta;
57
+ $this->json['button_url'] = $this->fs->is_in_trial_promotion() ?
58
+ $this->fs->get_trial_url() :
59
+ $this->fs->get_upgrade_url();
60
+
61
+ $api = FS_Plugin::is_valid_id( $this->fs->get_bundle_id() ) ?
62
+ $this->fs->get_api_bundle_scope() :
63
+ $this->fs->get_api_plugin_scope();
64
+
65
+ // Load features.
66
+ $pricing = $api->get( $this->fs->add_show_pending( "pricing.json" ) );
67
+
68
+ if ( $this->fs->is_api_result_object( $pricing, 'plans' ) ) {
69
+ // Add support features.
70
+ if ( is_array( $pricing->plans ) && 0 < count( $pricing->plans ) ) {
71
+ $support_features = array(
72
+ 'kb' => 'Help Center',
73
+ 'forum' => 'Support Forum',
74
+ 'email' => 'Priority Email Support',
75
+ 'phone' => 'Phone Support',
76
+ 'skype' => 'Skype Support',
77
+ 'is_success_manager' => 'Personal Success Manager',
78
+ );
79
+
80
+ for ( $i = 0, $len = count( $pricing->plans ); $i < $len; $i ++ ) {
81
+ if ( 'free' == $pricing->plans[$i]->name ) {
82
+ continue;
83
+ }
84
+
85
+ if ( ! isset( $pricing->plans[ $i ]->features ) ||
86
+ ! is_array( $pricing->plans[ $i ]->features ) ) {
87
+ $pricing->plans[$i]->features = array();
88
+ }
89
+
90
+ foreach ( $support_features as $key => $label ) {
91
+ $key = ( 'is_success_manager' !== $key ) ?
92
+ "support_{$key}" :
93
+ $key;
94
+
95
+ if ( ! empty( $pricing->plans[ $i ]->{$key} ) ) {
96
+
97
+ $support_feature = new stdClass();
98
+ $support_feature->title = $label;
99
+
100
+ $pricing->plans[ $i ]->features[] = $support_feature;
101
+ }
102
+ }
103
+ }
104
+ }
105
+ }
106
+
107
+ $this->json['plans'] = $pricing->plans;
108
+
109
+ $this->json['strings'] = array(
110
+ 'plan' => $this->fs->get_text_x_inline( 'Plan', 'as product pricing plan', 'plan' ),
111
+ );
112
+ }
113
+
114
+ /**
115
+ * Control content
116
+ */
117
+ public function content_template() {
118
+ ?>
119
+ <div id="fs_customizer_upsell">
120
+ <# if ( data.plans ) { #>
121
+ <ul class="fs-customizer-plans">
122
+ <# for (i in data.plans) { #>
123
+ <# if ( 'free' != data.plans[i].name && (null != data.plans[i].features && 0 < data.plans[i].features.length) ) { #>
124
+ <li class="fs-customizer-plan">
125
+ <div class="fs-accordion-section-open">
126
+ <h2 class="fs-accordion-section-title menu-item">
127
+ <span>{{ data.plans[i].title }}</span>
128
+ <button type="button" class="button-link item-edit" aria-expanded="true">
129
+ <span class="screen-reader-text">Toggle section: {{ data.plans[i].title }} {{ data.strings.plan }}</span>
130
+ <span class="toggle-indicator" aria-hidden="true"></span>
131
+ </button>
132
+ </h2>
133
+ <div class="fs-accordion-section-content">
134
+ <# if ( data.plans[i].description ) { #>
135
+ <h3>{{ data.plans[i].description }}</h3>
136
+ <# } #>
137
+ <# if ( data.plans[i].features ) { #>
138
+ <ul>
139
+ <# for ( j in data.plans[i].features ) { #>
140
+ <li><div class="fs-feature">
141
+ <span class="dashicons dashicons-yes"></span><span><# if ( data.plans[i].features[j].value ) { #>{{ data.plans[i].features[j].value }} <# } #>{{ data.plans[i].features[j].title }}</span>
142
+ <# if ( data.plans[i].features[j].description ) { #>
143
+ <span class="dashicons dashicons-editor-help"><span class="fs-feature-desc">{{ data.plans[i].features[j].description }}</span></span>
144
+ <# } #>
145
+ </div></li>
146
+ <# } #>
147
+ </ul>
148
+ <# } #>
149
+ <# if ( 'free' != data.plans[i].name ) { #>
150
+ <a href="{{ data.button_url }}" class="button button-primary" target="_blank">{{{ data.button_text }}}</a>
151
+ <# } #>
152
+ </div>
153
+ </div>
154
+ </li>
155
+ <# } #>
156
+ <# } #>
157
+ </ul>
158
+ <# } #>
159
+ </div>
160
+ <?php }
161
  }
freemius/includes/customizer/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/includes/debug/class-fs-debug-bar-panel.php CHANGED
@@ -1,64 +1,64 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.1.7.3
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Extends Debug Bar plugin by adding a panel to show all Freemius API requests.
15
- *
16
- * @author Vova Feldman (@svovaf)
17
- * @since 1.1.7.3
18
- *
19
- * Class Freemius_Debug_Bar_Panel
20
- */
21
- class Freemius_Debug_Bar_Panel extends Debug_Bar_Panel {
22
- function init() {
23
- $this->title( 'Freemius' );
24
- }
25
-
26
- static function requests_count() {
27
- if ( class_exists( 'Freemius_Api_WordPress' ) ) {
28
- $logger = Freemius_Api_WordPress::GetLogger();
29
- } else {
30
- $logger = array();
31
- }
32
-
33
- return number_format( count( $logger ) );
34
- }
35
-
36
- static function total_time() {
37
- if ( class_exists( 'Freemius_Api_WordPress' ) ) {
38
- $logger = Freemius_Api_WordPress::GetLogger();
39
- } else {
40
- $logger = array();
41
- }
42
-
43
- $total_time = .0;
44
- foreach ( $logger as $l ) {
45
- $total_time += $l['total'];
46
- }
47
-
48
- return number_format( 100 * $total_time, 2 ) . ' ' . fs_text_x_inline( 'ms', 'milliseconds' );
49
- }
50
-
51
- function render() {
52
- ?>
53
- <div id='debug-bar-php'>
54
- <?php fs_require_template( '/debug/api-calls.php' ) ?>
55
- <br>
56
- <?php fs_require_template( '/debug/scheduled-crons.php' ) ?>
57
- <br>
58
- <?php fs_require_template( '/debug/plugins-themes-sync.php' ) ?>
59
- <br>
60
- <?php fs_require_template( '/debug/logger.php' ) ?>
61
- </div>
62
- <?php
63
- }
64
- }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.1.7.3
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * Extends Debug Bar plugin by adding a panel to show all Freemius API requests.
15
+ *
16
+ * @author Vova Feldman (@svovaf)
17
+ * @since 1.1.7.3
18
+ *
19
+ * Class Freemius_Debug_Bar_Panel
20
+ */
21
+ class Freemius_Debug_Bar_Panel extends Debug_Bar_Panel {
22
+ function init() {
23
+ $this->title( 'Freemius' );
24
+ }
25
+
26
+ static function requests_count() {
27
+ if ( class_exists( 'Freemius_Api_WordPress' ) ) {
28
+ $logger = Freemius_Api_WordPress::GetLogger();
29
+ } else {
30
+ $logger = array();
31
+ }
32
+
33
+ return number_format( count( $logger ) );
34
+ }
35
+
36
+ static function total_time() {
37
+ if ( class_exists( 'Freemius_Api_WordPress' ) ) {
38
+ $logger = Freemius_Api_WordPress::GetLogger();
39
+ } else {
40
+ $logger = array();
41
+ }
42
+
43
+ $total_time = .0;
44
+ foreach ( $logger as $l ) {
45
+ $total_time += $l['total'];
46
+ }
47
+
48
+ return number_format( 100 * $total_time, 2 ) . ' ' . fs_text_x_inline( 'ms', 'milliseconds' );
49
+ }
50
+
51
+ function render() {
52
+ ?>
53
+ <div id='debug-bar-php'>
54
+ <?php fs_require_template( '/debug/api-calls.php' ) ?>
55
+ <br>
56
+ <?php fs_require_template( '/debug/scheduled-crons.php' ) ?>
57
+ <br>
58
+ <?php fs_require_template( '/debug/plugins-themes-sync.php' ) ?>
59
+ <br>
60
+ <?php fs_require_template( '/debug/logger.php' ) ?>
61
+ </div>
62
+ <?php
63
+ }
64
+ }
freemius/includes/debug/debug-bar-start.php CHANGED
@@ -1,52 +1,52 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.1.7.3
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- if ( ! WP_FS__DEBUG_SDK ) {
14
- return;
15
- }
16
-
17
- /**
18
- * Initialize Freemius custom debug panels.
19
- *
20
- * @param array $panels Debug bar panels objects
21
- *
22
- * @return array Debug bar panels with your custom panels
23
- */
24
- function fs_custom_panels_init( $panels ) {
25
- if ( class_exists( 'Debug_Bar_Panel' ) ) {
26
- if ( FS_API__LOGGER_ON ) {
27
- require_once dirname( __FILE__ ) . '/class-fs-debug-bar-panel.php';
28
- $panels[] = new Freemius_Debug_Bar_Panel();
29
- }
30
- }
31
-
32
- return $panels;
33
- }
34
-
35
- function fs_custom_status_init( $statuses ) {
36
- if ( class_exists( 'Debug_Bar_Panel' ) ) {
37
- if ( FS_API__LOGGER_ON ) {
38
- require_once dirname( __FILE__ ) . '/class-fs-debug-bar-panel.php';
39
- $statuses[] = array(
40
- 'fs_api_requests',
41
- fs_text_inline( 'Freemius API' ),
42
- Freemius_Debug_Bar_Panel::requests_count() . ' ' . fs_text_inline( 'Requests' ) .
43
- ' (' . Freemius_Debug_Bar_Panel::total_time() . ')'
44
- );
45
- }
46
- }
47
-
48
- return $statuses;
49
- }
50
-
51
- add_filter( 'debug_bar_panels', 'fs_custom_panels_init' );
52
  add_filter( 'debug_bar_statuses', 'fs_custom_status_init' );
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.1.7.3
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ if ( ! WP_FS__DEBUG_SDK ) {
14
+ return;
15
+ }
16
+
17
+ /**
18
+ * Initialize Freemius custom debug panels.
19
+ *
20
+ * @param array $panels Debug bar panels objects
21
+ *
22
+ * @return array Debug bar panels with your custom panels
23
+ */
24
+ function fs_custom_panels_init( $panels ) {
25
+ if ( class_exists( 'Debug_Bar_Panel' ) ) {
26
+ if ( FS_API__LOGGER_ON ) {
27
+ require_once dirname( __FILE__ ) . '/class-fs-debug-bar-panel.php';
28
+ $panels[] = new Freemius_Debug_Bar_Panel();
29
+ }
30
+ }
31
+
32
+ return $panels;
33
+ }
34
+
35
+ function fs_custom_status_init( $statuses ) {
36
+ if ( class_exists( 'Debug_Bar_Panel' ) ) {
37
+ if ( FS_API__LOGGER_ON ) {
38
+ require_once dirname( __FILE__ ) . '/class-fs-debug-bar-panel.php';
39
+ $statuses[] = array(
40
+ 'fs_api_requests',
41
+ fs_text_inline( 'Freemius API' ),
42
+ Freemius_Debug_Bar_Panel::requests_count() . ' ' . fs_text_inline( 'Requests' ) .
43
+ ' (' . Freemius_Debug_Bar_Panel::total_time() . ')'
44
+ );
45
+ }
46
+ }
47
+
48
+ return $statuses;
49
+ }
50
+
51
+ add_filter( 'debug_bar_panels', 'fs_custom_panels_init' );
52
  add_filter( 'debug_bar_statuses', 'fs_custom_status_init' );
freemius/includes/debug/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/includes/entities/class-fs-affiliate-terms.php CHANGED
@@ -1,128 +1,128 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.2.3
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_AffiliateTerms extends FS_Scope_Entity {
14
-
15
- #region Properties
16
-
17
- /**
18
- * @var bool
19
- */
20
- public $is_active;
21
- /**
22
- * @var string Enum: `affiliation` or `rewards`. Defaults to `affiliation`.
23
- */
24
- public $type;
25
- /**
26
- * @var string Enum: `payout` or `credit`. Defaults to `payout`.
27
- */
28
- public $reward_type;
29
- /**
30
- * If `first`, the referral will be attributed to the first visited source containing the affiliation link that
31
- * was clicked.
32
- *
33
- * @var string Enum: `first` or `last`. Defaults to `first`.
34
- */
35
- public $referral_attribution;
36
- /**
37
- * @var int Defaults to `30`, `0` for session cookie, and `null` for endless cookie (until cookies are cleaned).
38
- */
39
- public $cookie_days;
40
- /**
41
- * @var int
42
- */
43
- public $commission;
44
- /**
45
- * @var string Enum: `percentage` or `dollar`. Defaults to `percentage`.
46
- */
47
- public $commission_type;
48
- /**
49
- * @var null|int Defaults to `0` (affiliate only on first payment). `null` for commission for all renewals. If
50
- * greater than `0`, affiliate will get paid for all renewals for `commission_renewals_days` days after
51
- * the initial upgrade/purchase.
52
- */
53
- public $commission_renewals_days;
54
- /**
55
- * @var int Only cents and no percentage. In US cents, e.g.: 100 = $1.00. Defaults to `null`.
56
- */
57
- public $install_commission;
58
- /**
59
- * @var string Required default target link, e.g.: pricing page.
60
- */
61
- public $default_url;
62
- /**
63
- * @var string One of the following: 'all', 'new_customer', 'new_user'.
64
- * If 'all' - reward for any user type.
65
- * If 'new_customer' - reward only for new customers.
66
- * If 'new_user' - reward only for new users.
67
- */
68
- public $reward_customer_type;
69
- /**
70
- * @var int Defaults to `0` (affiliate only on directly affiliated links). `null` if an affiliate will get
71
- * paid for all customers' lifetime payments. If greater than `0`, an affiliate will get paid for all
72
- * customer payments for `future_payments_days` days after the initial payment.
73
- */
74
- public $future_payments_days;
75
- /**
76
- * @var bool If `true`, allow referrals from social sites.
77
- */
78
- public $is_social_allowed;
79
- /**
80
- * @var bool If `true`, allow conversions without HTTP referrer header at all.
81
- */
82
- public $is_app_allowed;
83
- /**
84
- * @var bool If `true`, allow referrals from any site.
85
- */
86
- public $is_any_site_allowed;
87
-
88
- #endregion Properties
89
-
90
- /**
91
- * @author Leo Fajardo (@leorw)
92
- *
93
- * @return string
94
- */
95
- function get_formatted_commission()
96
- {
97
- return ( 'dollar' === $this->commission_type ) ?
98
- ( '$' . $this->commission ) :
99
- ( $this->commission . '%' );
100
- }
101
-
102
- /**
103
- * @author Leo Fajardo (@leorw)
104
- *
105
- * @return bool
106
- */
107
- function has_lifetime_commission() {
108
- return ( 0 !== $this->future_payments_days );
109
- }
110
-
111
- /**
112
- * @author Leo Fajardo (@leorw)
113
- *
114
- * @return bool
115
- */
116
- function is_session_cookie() {
117
- return ( 0 == $this->cookie_days );
118
- }
119
-
120
- /**
121
- * @author Leo Fajardo (@leorw)
122
- *
123
- * @return bool
124
- */
125
- function has_renewals_commission() {
126
- return ( is_null( $this->commission_renewals_days ) || $this->commission_renewals_days > 0 );
127
- }
128
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.2.3
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_AffiliateTerms extends FS_Scope_Entity {
14
+
15
+ #region Properties
16
+
17
+ /**
18
+ * @var bool
19
+ */
20
+ public $is_active;
21
+ /**
22
+ * @var string Enum: `affiliation` or `rewards`. Defaults to `affiliation`.
23
+ */
24
+ public $type;
25
+ /**
26
+ * @var string Enum: `payout` or `credit`. Defaults to `payout`.
27
+ */
28
+ public $reward_type;
29
+ /**
30
+ * If `first`, the referral will be attributed to the first visited source containing the affiliation link that
31
+ * was clicked.
32
+ *
33
+ * @var string Enum: `first` or `last`. Defaults to `first`.
34
+ */
35
+ public $referral_attribution;
36
+ /**
37
+ * @var int Defaults to `30`, `0` for session cookie, and `null` for endless cookie (until cookies are cleaned).
38
+ */
39
+ public $cookie_days;
40
+ /**
41
+ * @var int
42
+ */
43
+ public $commission;
44
+ /**
45
+ * @var string Enum: `percentage` or `dollar`. Defaults to `percentage`.
46
+ */
47
+ public $commission_type;
48
+ /**
49
+ * @var null|int Defaults to `0` (affiliate only on first payment). `null` for commission for all renewals. If
50
+ * greater than `0`, affiliate will get paid for all renewals for `commission_renewals_days` days after
51
+ * the initial upgrade/purchase.
52
+ */
53
+ public $commission_renewals_days;
54
+ /**
55
+ * @var int Only cents and no percentage. In US cents, e.g.: 100 = $1.00. Defaults to `null`.
56
+ */
57
+ public $install_commission;
58
+ /**
59
+ * @var string Required default target link, e.g.: pricing page.
60
+ */
61
+ public $default_url;
62
+ /**
63
+ * @var string One of the following: 'all', 'new_customer', 'new_user'.
64
+ * If 'all' - reward for any user type.
65
+ * If 'new_customer' - reward only for new customers.
66
+ * If 'new_user' - reward only for new users.
67
+ */
68
+ public $reward_customer_type;
69
+ /**
70
+ * @var int Defaults to `0` (affiliate only on directly affiliated links). `null` if an affiliate will get
71
+ * paid for all customers' lifetime payments. If greater than `0`, an affiliate will get paid for all
72
+ * customer payments for `future_payments_days` days after the initial payment.
73
+ */
74
+ public $future_payments_days;
75
+ /**
76
+ * @var bool If `true`, allow referrals from social sites.
77
+ */
78
+ public $is_social_allowed;
79
+ /**
80
+ * @var bool If `true`, allow conversions without HTTP referrer header at all.
81
+ */
82
+ public $is_app_allowed;
83
+ /**
84
+ * @var bool If `true`, allow referrals from any site.
85
+ */
86
+ public $is_any_site_allowed;
87
+
88
+ #endregion Properties
89
+
90
+ /**
91
+ * @author Leo Fajardo (@leorw)
92
+ *
93
+ * @return string
94
+ */
95
+ function get_formatted_commission()
96
+ {
97
+ return ( 'dollar' === $this->commission_type ) ?
98
+ ( '$' . $this->commission ) :
99
+ ( $this->commission . '%' );
100
+ }
101
+
102
+ /**
103
+ * @author Leo Fajardo (@leorw)
104
+ *
105
+ * @return bool
106
+ */
107
+ function has_lifetime_commission() {
108
+ return ( 0 !== $this->future_payments_days );
109
+ }
110
+
111
+ /**
112
+ * @author Leo Fajardo (@leorw)
113
+ *
114
+ * @return bool
115
+ */
116
+ function is_session_cookie() {
117
+ return ( 0 == $this->cookie_days );
118
+ }
119
+
120
+ /**
121
+ * @author Leo Fajardo (@leorw)
122
+ *
123
+ * @return bool
124
+ */
125
+ function has_renewals_commission() {
126
+ return ( is_null( $this->commission_renewals_days ) || $this->commission_renewals_days > 0 );
127
+ }
128
  }
freemius/includes/entities/class-fs-affiliate.php CHANGED
@@ -1,84 +1,84 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.2.3
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Affiliate extends FS_Scope_Entity {
14
-
15
- #region Properties
16
-
17
- /**
18
- * @var string
19
- */
20
- public $paypal_email;
21
- /**
22
- * @var number
23
- */
24
- public $custom_affiliate_terms_id;
25
- /**
26
- * @var boolean
27
- */
28
- public $is_using_custom_terms;
29
- /**
30
- * @var string status Enum: `pending`, `rejected`, `suspended`, or `active`. Defaults to `pending`.
31
- */
32
- public $status;
33
- /**
34
- * @var string
35
- */
36
- public $domain;
37
-
38
- #endregion Properties
39
-
40
- /**
41
- * @author Leo Fajardo
42
- *
43
- * @return bool
44
- */
45
- function is_active() {
46
- return ( 'active' === $this->status );
47
- }
48
-
49
- /**
50
- * @author Leo Fajardo
51
- *
52
- * @return bool
53
- */
54
- function is_pending() {
55
- return ( 'pending' === $this->status );
56
- }
57
-
58
- /**
59
- * @author Leo Fajardo
60
- *
61
- * @return bool
62
- */
63
- function is_suspended() {
64
- return ( 'suspended' === $this->status );
65
- }
66
-
67
- /**
68
- * @author Leo Fajardo
69
- *
70
- * @return bool
71
- */
72
- function is_rejected() {
73
- return ( 'rejected' === $this->status );
74
- }
75
-
76
- /**
77
- * @author Leo Fajardo
78
- *
79
- * @return bool
80
- */
81
- function is_blocked() {
82
- return ( 'blocked' === $this->status );
83
- }
84
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.2.3
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Affiliate extends FS_Scope_Entity {
14
+
15
+ #region Properties
16
+
17
+ /**
18
+ * @var string
19
+ */
20
+ public $paypal_email;
21
+ /**
22
+ * @var number
23
+ */
24
+ public $custom_affiliate_terms_id;
25
+ /**
26
+ * @var boolean
27
+ */
28
+ public $is_using_custom_terms;
29
+ /**
30
+ * @var string status Enum: `pending`, `rejected`, `suspended`, or `active`. Defaults to `pending`.
31
+ */
32
+ public $status;
33
+ /**
34
+ * @var string
35
+ */
36
+ public $domain;
37
+
38
+ #endregion Properties
39
+
40
+ /**
41
+ * @author Leo Fajardo
42
+ *
43
+ * @return bool
44
+ */
45
+ function is_active() {
46
+ return ( 'active' === $this->status );
47
+ }
48
+
49
+ /**
50
+ * @author Leo Fajardo
51
+ *
52
+ * @return bool
53
+ */
54
+ function is_pending() {
55
+ return ( 'pending' === $this->status );
56
+ }
57
+
58
+ /**
59
+ * @author Leo Fajardo
60
+ *
61
+ * @return bool
62
+ */
63
+ function is_suspended() {
64
+ return ( 'suspended' === $this->status );
65
+ }
66
+
67
+ /**
68
+ * @author Leo Fajardo
69
+ *
70
+ * @return bool
71
+ */
72
+ function is_rejected() {
73
+ return ( 'rejected' === $this->status );
74
+ }
75
+
76
+ /**
77
+ * @author Leo Fajardo
78
+ *
79
+ * @return bool
80
+ */
81
+ function is_blocked() {
82
+ return ( 'blocked' === $this->status );
83
+ }
84
  }
freemius/includes/entities/class-fs-billing.php CHANGED
@@ -1,95 +1,95 @@
1
- <?php
2
- /**
3
- * @package Freemius for EDD Add-On
4
- * @copyright Copyright (c) 2016, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.0
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Billing extends FS_Entity {
14
-
15
- #region Properties
16
-
17
- /**
18
- * @var int
19
- */
20
- public $entity_id;
21
- /**
22
- * @var string (Enum) Linked entity type. One of: developer, plugin, user, install
23
- */
24
- public $entity_type;
25
- /**
26
- * @var string
27
- */
28
- public $business_name;
29
- /**
30
- * @var string
31
- */
32
- public $first;
33
- /**
34
- * @var string
35
- */
36
- public $last;
37
- /**
38
- * @var string
39
- */
40
- public $email;
41
- /**
42
- * @var string
43
- */
44
- public $phone;
45
- /**
46
- * @var string
47
- */
48
- public $website;
49
- /**
50
- * @var string Tax or VAT ID.
51
- */
52
- public $tax_id;
53
- /**
54
- * @var string
55
- */
56
- public $address_street;
57
- /**
58
- * @var string
59
- */
60
- public $address_apt;
61
- /**
62
- * @var string
63
- */
64
- public $address_city;
65
- /**
66
- * @var string
67
- */
68
- public $address_country;
69
- /**
70
- * @var string Two chars country code.
71
- */
72
- public $address_country_code;
73
- /**
74
- * @var string
75
- */
76
- public $address_state;
77
- /**
78
- * @var number Numeric ZIP code (cab be with leading zeros).
79
- */
80
- public $address_zip;
81
-
82
- #endregion Properties
83
-
84
-
85
- /**
86
- * @param object|bool $event
87
- */
88
- function __construct( $event = false ) {
89
- parent::__construct( $event );
90
- }
91
-
92
- static function get_type() {
93
- return 'billing';
94
- }
95
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius for EDD Add-On
4
+ * @copyright Copyright (c) 2016, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.0.0
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Billing extends FS_Entity {
14
+
15
+ #region Properties
16
+
17
+ /**
18
+ * @var int
19
+ */
20
+ public $entity_id;
21
+ /**
22
+ * @var string (Enum) Linked entity type. One of: developer, plugin, user, install
23
+ */
24
+ public $entity_type;
25
+ /**
26
+ * @var string
27
+ */
28
+ public $business_name;
29
+ /**
30
+ * @var string
31
+ */
32
+ public $first;
33
+ /**
34
+ * @var string
35
+ */
36
+ public $last;
37
+ /**
38
+ * @var string
39
+ */
40
+ public $email;
41
+ /**
42
+ * @var string
43
+ */
44
+ public $phone;
45
+ /**
46
+ * @var string
47
+ */
48
+ public $website;
49
+ /**
50
+ * @var string Tax or VAT ID.
51
+ */
52
+ public $tax_id;
53
+ /**
54
+ * @var string
55
+ */
56
+ public $address_street;
57
+ /**
58
+ * @var string
59
+ */
60
+ public $address_apt;
61
+ /**
62
+ * @var string
63
+ */
64
+ public $address_city;
65
+ /**
66
+ * @var string
67
+ */
68
+ public $address_country;
69
+ /**
70
+ * @var string Two chars country code.
71
+ */
72
+ public $address_country_code;
73
+ /**
74
+ * @var string
75
+ */
76
+ public $address_state;
77
+ /**
78
+ * @var number Numeric ZIP code (cab be with leading zeros).
79
+ */
80
+ public $address_zip;
81
+
82
+ #endregion Properties
83
+
84
+
85
+ /**
86
+ * @param object|bool $event
87
+ */
88
+ function __construct( $event = false ) {
89
+ parent::__construct( $event );
90
+ }
91
+
92
+ static function get_type() {
93
+ return 'billing';
94
+ }
95
  }
freemius/includes/entities/class-fs-entity.php CHANGED
@@ -1,159 +1,159 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.3
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Get object's public variables.
15
- *
16
- * @author Vova Feldman (@svovaf)
17
- * @since 1.0.0
18
- *
19
- * @param object $object
20
- *
21
- * @return array
22
- */
23
- function fs_get_object_public_vars( $object ) {
24
- return get_object_vars( $object );
25
- }
26
-
27
- class FS_Entity {
28
- /**
29
- * @var number
30
- */
31
- public $id;
32
- /**
33
- * @var string Datetime value in 'YYYY-MM-DD HH:MM:SS' format.
34
- */
35
- public $updated;
36
- /**
37
- * @var string Datetime value in 'YYYY-MM-DD HH:MM:SS' format.
38
- */
39
- public $created;
40
-
41
- /**
42
- * @param bool|object $entity
43
- */
44
- function __construct( $entity = false ) {
45
- if ( ! ( $entity instanceof stdClass ) && ! ( $entity instanceof FS_Entity ) ) {
46
- return;
47
- }
48
-
49
- $props = fs_get_object_public_vars( $this );
50
-
51
- foreach ( $props as $key => $def_value ) {
52
- $this->{$key} = isset( $entity->{$key} ) ?
53
- $entity->{$key} :
54
- $def_value;
55
- }
56
- }
57
-
58
- static function get_type() {
59
- return 'type';
60
- }
61
-
62
- /**
63
- * @author Vova Feldman (@svovaf)
64
- * @since 1.0.6
65
- *
66
- * @param FS_Entity $entity1
67
- * @param FS_Entity $entity2
68
- *
69
- * @return bool
70
- */
71
- static function equals( $entity1, $entity2 ) {
72
- if ( is_null( $entity1 ) && is_null( $entity2 ) ) {
73
- return true;
74
- } else if ( is_object( $entity1 ) && is_object( $entity2 ) ) {
75
- return ( $entity1->id == $entity2->id );
76
- } else if ( is_object( $entity1 ) ) {
77
- return is_null( $entity1->id );
78
- } else {
79
- return is_null( $entity2->id );
80
- }
81
- }
82
-
83
- private $_is_updated = false;
84
-
85
- /**
86
- * Update object property.
87
- *
88
- * @author Vova Feldman (@svovaf)
89
- * @since 1.0.9
90
- *
91
- * @param string|array[string]mixed $key
92
- * @param string|bool $val
93
- *
94
- * @return bool
95
- */
96
- function update( $key, $val = false ) {
97
- if ( ! is_array( $key ) ) {
98
- $key = array( $key => $val );
99
- }
100
-
101
- $is_updated = false;
102
-
103
- foreach ( $key as $k => $v ) {
104
- if ( $this->{$k} === $v ) {
105
- continue;
106
- }
107
-
108
- if ( ( is_string( $this->{$k} ) && is_numeric( $v ) ||
109
- ( is_numeric( $this->{$k} ) && is_string( $v ) ) ) &&
110
- $this->{$k} == $v
111
- ) {
112
- continue;
113
- }
114
-
115
- // Update value.
116
- $this->{$k} = $v;
117
-
118
- $is_updated = true;
119
- }
120
-
121
- $this->_is_updated = $is_updated;
122
-
123
- return $is_updated;
124
- }
125
-
126
- /**
127
- * Checks if entity was updated.
128
- *
129
- * @author Vova Feldman (@svovaf)
130
- * @since 1.0.9
131
- *
132
- * @return bool
133
- */
134
- function is_updated() {
135
- return $this->_is_updated;
136
- }
137
-
138
- /**
139
- * @param $id
140
- *
141
- * @author Vova Feldman (@svovaf)
142
- * @since 1.1.2
143
- *
144
- * @return bool
145
- */
146
- static function is_valid_id($id){
147
- return is_numeric($id);
148
- }
149
-
150
- /**
151
- * @author Leo Fajardo (@leorw)
152
- * @since 2.3.1
153
- *
154
- * @return string
155
- */
156
- public static function get_class_name() {
157
- return get_called_class();
158
- }
159
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.0.3
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * Get object's public variables.
15
+ *
16
+ * @author Vova Feldman (@svovaf)
17
+ * @since 1.0.0
18
+ *
19
+ * @param object $object
20
+ *
21
+ * @return array
22
+ */
23
+ function fs_get_object_public_vars( $object ) {
24
+ return get_object_vars( $object );
25
+ }
26
+
27
+ class FS_Entity {
28
+ /**
29
+ * @var number
30
+ */
31
+ public $id;
32
+ /**
33
+ * @var string Datetime value in 'YYYY-MM-DD HH:MM:SS' format.
34
+ */
35
+ public $updated;
36
+ /**
37
+ * @var string Datetime value in 'YYYY-MM-DD HH:MM:SS' format.
38
+ */
39
+ public $created;
40
+
41
+ /**
42
+ * @param bool|object $entity
43
+ */
44
+ function __construct( $entity = false ) {
45
+ if ( ! ( $entity instanceof stdClass ) && ! ( $entity instanceof FS_Entity ) ) {
46
+ return;
47
+ }
48
+
49
+ $props = fs_get_object_public_vars( $this );
50
+
51
+ foreach ( $props as $key => $def_value ) {
52
+ $this->{$key} = isset( $entity->{$key} ) ?
53
+ $entity->{$key} :
54
+ $def_value;
55
+ }
56
+ }
57
+
58
+ static function get_type() {
59
+ return 'type';
60
+ }
61
+
62
+ /**
63
+ * @author Vova Feldman (@svovaf)
64
+ * @since 1.0.6
65
+ *
66
+ * @param FS_Entity $entity1
67
+ * @param FS_Entity $entity2
68
+ *
69
+ * @return bool
70
+ */
71
+ static function equals( $entity1, $entity2 ) {
72
+ if ( is_null( $entity1 ) && is_null( $entity2 ) ) {
73
+ return true;
74
+ } else if ( is_object( $entity1 ) && is_object( $entity2 ) ) {
75
+ return ( $entity1->id == $entity2->id );
76
+ } else if ( is_object( $entity1 ) ) {
77
+ return is_null( $entity1->id );
78
+ } else {
79
+ return is_null( $entity2->id );
80
+ }
81
+ }
82
+
83
+ private $_is_updated = false;
84
+
85
+ /**
86
+ * Update object property.
87
+ *
88
+ * @author Vova Feldman (@svovaf)
89
+ * @since 1.0.9
90
+ *
91
+ * @param string|array[string]mixed $key
92
+ * @param string|bool $val
93
+ *
94
+ * @return bool
95
+ */
96
+ function update( $key, $val = false ) {
97
+ if ( ! is_array( $key ) ) {
98
+ $key = array( $key => $val );
99
+ }
100
+
101
+ $is_updated = false;
102
+
103
+ foreach ( $key as $k => $v ) {
104
+ if ( $this->{$k} === $v ) {
105
+ continue;
106
+ }
107
+
108
+ if ( ( is_string( $this->{$k} ) && is_numeric( $v ) ||
109
+ ( is_numeric( $this->{$k} ) && is_string( $v ) ) ) &&
110
+ $this->{$k} == $v
111
+ ) {
112
+ continue;
113
+ }
114
+
115
+ // Update value.
116
+ $this->{$k} = $v;
117
+
118
+ $is_updated = true;
119
+ }
120
+
121
+ $this->_is_updated = $is_updated;
122
+
123
+ return $is_updated;
124
+ }
125
+
126
+ /**
127
+ * Checks if entity was updated.
128
+ *
129
+ * @author Vova Feldman (@svovaf)
130
+ * @since 1.0.9
131
+ *
132
+ * @return bool
133
+ */
134
+ function is_updated() {
135
+ return $this->_is_updated;
136
+ }
137
+
138
+ /**
139
+ * @param $id
140
+ *
141
+ * @author Vova Feldman (@svovaf)
142
+ * @since 1.1.2
143
+ *
144
+ * @return bool
145
+ */
146
+ static function is_valid_id($id){
147
+ return is_numeric($id);
148
+ }
149
+
150
+ /**
151
+ * @author Leo Fajardo (@leorw)
152
+ * @since 2.3.1
153
+ *
154
+ * @return string
155
+ */
156
+ public static function get_class_name() {
157
+ return get_called_class();
158
+ }
159
  }
freemius/includes/entities/class-fs-payment.php CHANGED
@@ -1,168 +1,168 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2016, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.0
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Payment extends FS_Entity {
14
-
15
- #region Properties
16
-
17
- /**
18
- * @var number
19
- */
20
- public $plugin_id;
21
- /**
22
- * @var number
23
- */
24
- public $user_id;
25
- /**
26
- * @var number
27
- */
28
- public $install_id;
29
- /**
30
- * @var number
31
- */
32
- public $subscription_id;
33
- /**
34
- * @var number
35
- */
36
- public $plan_id;
37
- /**
38
- * @var number
39
- */
40
- public $license_id;
41
- /**
42
- * @var float
43
- */
44
- public $gross;
45
- /**
46
- * @author Leo Fajardo (@leorw)
47
- * @since 2.3.0
48
- *
49
- * @var string One of the following: `usd`, `gbp`, `eur`.
50
- */
51
- public $currency;
52
- /**
53
- * @var number
54
- */
55
- public $bound_payment_id;
56
- /**
57
- * @var string
58
- */
59
- public $external_id;
60
- /**
61
- * @var string
62
- */
63
- public $gateway;
64
- /**
65
- * @var string ISO 3166-1 alpha-2 - two-letter country code.
66
- *
67
- * @link http://www.wikiwand.com/en/ISO_3166-1_alpha-2
68
- */
69
- public $country_code;
70
- /**
71
- * @var string
72
- */
73
- public $vat_id;
74
- /**
75
- * @var float Actual Tax / VAT in $$$
76
- */
77
- public $vat;
78
- /**
79
- * @var int Payment source.
80
- */
81
- public $source = 0;
82
-
83
- #endregion Properties
84
-
85
- const CURRENCY_USD = 'usd';
86
- const CURRENCY_GBP = 'gbp';
87
- const CURRENCY_EUR = 'eur';
88
-
89
- /**
90
- * @param object|bool $payment
91
- */
92
- function __construct( $payment = false ) {
93
- parent::__construct( $payment );
94
- }
95
-
96
- static function get_type() {
97
- return 'payment';
98
- }
99
-
100
- /**
101
- * @author Vova Feldman (@svovaf)
102
- * @since 1.0.0
103
- *
104
- * @return bool
105
- */
106
- function is_refund() {
107
- return ( parent::is_valid_id( $this->bound_payment_id ) && 0 > $this->gross );
108
- }
109
-
110
- /**
111
- * Checks if the payment was migrated from another platform.
112
- *
113
- * @author Vova Feldman (@svovaf)
114
- * @since 2.0.2
115
- *
116
- * @return bool
117
- */
118
- function is_migrated() {
119
- return ( 0 != $this->source );
120
- }
121
-
122
- /**
123
- * Returns the gross in this format:
124
- * `{symbol}{amount | 2 decimal digits} {currency | uppercase}`
125
- *
126
- * Examples: £9.99 GBP, -£9.99 GBP.
127
- *
128
- * @author Leo Fajardo (@leorw)
129
- * @since 2.3.0
130
- *
131
- * @return string
132
- */
133
- function formatted_gross()
134
- {
135
- return (
136
- ( $this->gross < 0 ? '-' : '' ) .
137
- $this->get_symbol() .
138
- number_format( abs( $this->gross ), 2, '.', ',' ) . ' ' .
139
- strtoupper( $this->currency )
140
- );
141
- }
142
-
143
- /**
144
- * A map between supported currencies with their symbols.
145
- *
146
- * @var array<string,string>
147
- */
148
- static $CURRENCY_2_SYMBOL;
149
-
150
- /**
151
- * @author Leo Fajardo (@leorw)
152
- * @since 2.3.0
153
- *
154
- * @return string
155
- */
156
- private function get_symbol() {
157
- if ( ! isset( self::$CURRENCY_2_SYMBOL ) ) {
158
- // Lazy load.
159
- self::$CURRENCY_2_SYMBOL = array(
160
- self::CURRENCY_USD => '$',
161
- self::CURRENCY_GBP => '&pound;',
162
- self::CURRENCY_EUR => '&euro;',
163
- );
164
- }
165
-
166
- return self::$CURRENCY_2_SYMBOL[ $this->currency ];
167
- }
168
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2016, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.0.0
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Payment extends FS_Entity {
14
+
15
+ #region Properties
16
+
17
+ /**
18
+ * @var number
19
+ */
20
+ public $plugin_id;
21
+ /**
22
+ * @var number
23
+ */
24
+ public $user_id;
25
+ /**
26
+ * @var number
27
+ */
28
+ public $install_id;
29
+ /**
30
+ * @var number
31
+ */
32
+ public $subscription_id;
33
+ /**
34
+ * @var number
35
+ */
36
+ public $plan_id;
37
+ /**
38
+ * @var number
39
+ */
40
+ public $license_id;
41
+ /**
42
+ * @var float
43
+ */
44
+ public $gross;
45
+ /**
46
+ * @author Leo Fajardo (@leorw)
47
+ * @since 2.3.0
48
+ *
49
+ * @var string One of the following: `usd`, `gbp`, `eur`.
50
+ */
51
+ public $currency;
52
+ /**
53
+ * @var number
54
+ */
55
+ public $bound_payment_id;
56
+ /**
57
+ * @var string
58
+ */
59
+ public $external_id;
60
+ /**
61
+ * @var string
62
+ */
63
+ public $gateway;
64
+ /**
65
+ * @var string ISO 3166-1 alpha-2 - two-letter country code.
66
+ *
67
+ * @link http://www.wikiwand.com/en/ISO_3166-1_alpha-2
68
+ */
69
+ public $country_code;
70
+ /**
71
+ * @var string
72
+ */
73
+ public $vat_id;
74
+ /**
75
+ * @var float Actual Tax / VAT in $$$
76
+ */
77
+ public $vat;
78
+ /**
79
+ * @var int Payment source.
80
+ */
81
+ public $source = 0;
82
+
83
+ #endregion Properties
84
+
85
+ const CURRENCY_USD = 'usd';
86
+ const CURRENCY_GBP = 'gbp';
87
+ const CURRENCY_EUR = 'eur';
88
+
89
+ /**
90
+ * @param object|bool $payment
91
+ */
92
+ function __construct( $payment = false ) {
93
+ parent::__construct( $payment );
94
+ }
95
+
96
+ static function get_type() {
97
+ return 'payment';
98
+ }
99
+
100
+ /**
101
+ * @author Vova Feldman (@svovaf)
102
+ * @since 1.0.0
103
+ *
104
+ * @return bool
105
+ */
106
+ function is_refund() {
107
+ return ( parent::is_valid_id( $this->bound_payment_id ) && 0 > $this->gross );
108
+ }
109
+
110
+ /**
111
+ * Checks if the payment was migrated from another platform.
112
+ *
113
+ * @author Vova Feldman (@svovaf)
114
+ * @since 2.0.2
115
+ *
116
+ * @return bool
117
+ */
118
+ function is_migrated() {
119
+ return ( 0 != $this->source );
120
+ }
121
+
122
+ /**
123
+ * Returns the gross in this format:
124
+ * `{symbol}{amount | 2 decimal digits} {currency | uppercase}`
125
+ *
126
+ * Examples: £9.99 GBP, -£9.99 GBP.
127
+ *
128
+ * @author Leo Fajardo (@leorw)
129
+ * @since 2.3.0
130
+ *
131
+ * @return string
132
+ */
133
+ function formatted_gross()
134
+ {
135
+ return (
136
+ ( $this->gross < 0 ? '-' : '' ) .
137
+ $this->get_symbol() .
138
+ number_format( abs( $this->gross ), 2, '.', ',' ) . ' ' .
139
+ strtoupper( $this->currency )
140
+ );
141
+ }
142
+
143
+ /**
144
+ * A map between supported currencies with their symbols.
145
+ *
146
+ * @var array<string,string>
147
+ */
148
+ static $CURRENCY_2_SYMBOL;
149
+
150
+ /**
151
+ * @author Leo Fajardo (@leorw)
152
+ * @since 2.3.0
153
+ *
154
+ * @return string
155
+ */
156
+ private function get_symbol() {
157
+ if ( ! isset( self::$CURRENCY_2_SYMBOL ) ) {
158
+ // Lazy load.
159
+ self::$CURRENCY_2_SYMBOL = array(
160
+ self::CURRENCY_USD => '$',
161
+ self::CURRENCY_GBP => '&pound;',
162
+ self::CURRENCY_EUR => '&euro;',
163
+ );
164
+ }
165
+
166
+ return self::$CURRENCY_2_SYMBOL[ $this->currency ];
167
+ }
168
  }
freemius/includes/entities/class-fs-plugin-info.php CHANGED
@@ -1,34 +1,34 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.3
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Plugin_Info extends FS_Entity {
14
- public $plugin_id;
15
- public $description;
16
- public $short_description;
17
- public $banner_url;
18
- public $card_banner_url;
19
- public $selling_point_0;
20
- public $selling_point_1;
21
- public $selling_point_2;
22
- public $screenshots;
23
-
24
- /**
25
- * @param stdClass|bool $plugin_info
26
- */
27
- function __construct( $plugin_info = false ) {
28
- parent::__construct( $plugin_info );
29
- }
30
-
31
- static function get_type() {
32
- return 'plugin';
33
- }
34
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.0.3
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Plugin_Info extends FS_Entity {
14
+ public $plugin_id;
15
+ public $description;
16
+ public $short_description;
17
+ public $banner_url;
18
+ public $card_banner_url;
19
+ public $selling_point_0;
20
+ public $selling_point_1;
21
+ public $selling_point_2;
22
+ public $screenshots;
23
+
24
+ /**
25
+ * @param stdClass|bool $plugin_info
26
+ */
27
+ function __construct( $plugin_info = false ) {
28
+ parent::__construct( $plugin_info );
29
+ }
30
+
31
+ static function get_type() {
32
+ return 'plugin';
33
+ }
34
  }
freemius/includes/entities/class-fs-plugin-license.php CHANGED
@@ -1,330 +1,330 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.5
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Class FS_Plugin_License
15
- */
16
- class FS_Plugin_License extends FS_Entity {
17
-
18
- #region Properties
19
-
20
- /**
21
- * @var number
22
- */
23
- public $plugin_id;
24
- /**
25
- * @var number
26
- */
27
- public $user_id;
28
- /**
29
- * @var number
30
- */
31
- public $plan_id;
32
- /**
33
- * @author Leo Fajardo (@leorw)
34
- * @since 2.3.0
35
- *
36
- * @var string
37
- */
38
- public $parent_plan_name;
39
- /**
40
- * @author Leo Fajardo (@leorw)
41
- * @since 2.3.0
42
- *
43
- * @var string
44
- */
45
- public $parent_plan_title;
46
- /**
47
- * @author Leo Fajardo (@leorw)
48
- * @since 2.3.0
49
- *
50
- * @var number
51
- */
52
- public $parent_license_id;
53
- /**
54
- * @author Leo Fajardo (@leorw)
55
- * @since 2.4.0
56
- *
57
- * @var array
58
- */
59
- public $products;
60
- /**
61
- * @var number
62
- */
63
- public $pricing_id;
64
- /**
65
- * @var int|null
66
- */
67
- public $quota;
68
- /**
69
- * @var int
70
- */
71
- public $activated;
72
- /**
73
- * @var int
74
- */
75
- public $activated_local;
76
- /**
77
- * @var string
78
- */
79
- public $expiration;
80
- /**
81
- * @var string
82
- */
83
- public $secret_key;
84
- /**
85
- * @var bool
86
- */
87
- public $is_whitelabeled;
88
- /**
89
- * @var bool $is_free_localhost Defaults to true. If true, allow unlimited localhost installs with the same
90
- * license.
91
- */
92
- public $is_free_localhost;
93
- /**
94
- * @var bool $is_block_features Defaults to true. If false, don't block features after license expiry - only
95
- * block updates and support.
96
- */
97
- public $is_block_features;
98
- /**
99
- * @var bool
100
- */
101
- public $is_cancelled;
102
-
103
- #endregion Properties
104
-
105
- /**
106
- * @param stdClass|bool $license
107
- */
108
- function __construct( $license = false ) {
109
- parent::__construct( $license );
110
- }
111
-
112
- /**
113
- * Get entity type.
114
- *
115
- * @return string
116
- */
117
- static function get_type() {
118
- return 'license';
119
- }
120
-
121
- /**
122
- * Check how many site activations left.
123
- *
124
- * @author Vova Feldman (@svovaf)
125
- * @since 1.0.5
126
- *
127
- * @return int
128
- */
129
- function left() {
130
- if ( ! $this->is_features_enabled() ) {
131
- return 0;
132
- }
133
-
134
- if ( $this->is_unlimited() ) {
135
- return 999;
136
- }
137
-
138
- return ( $this->quota - $this->activated - ( $this->is_free_localhost ? 0 : $this->activated_local ) );
139
- }
140
-
141
- /**
142
- * Check if single site license.
143
- *
144
- * @author Vova Feldman (@svovaf)
145
- * @since 1.1.8.1
146
- *
147
- * @return bool
148
- */
149
- function is_single_site() {
150
- return ( is_numeric( $this->quota ) && 1 == $this->quota );
151
- }
152
-
153
- /**
154
- * @author Vova Feldman (@svovaf)
155
- * @since 1.0.5
156
- *
157
- * @return bool
158
- */
159
- function is_expired() {
160
- return ! $this->is_lifetime() && ( strtotime( $this->expiration ) < WP_FS__SCRIPT_START_TIME );
161
- }
162
-
163
- /**
164
- * Check if license is not expired.
165
- *
166
- * @author Vova Feldman (@svovaf)
167
- * @since 1.2.1
168
- *
169
- * @return bool
170
- */
171
- function is_valid() {
172
- return ! $this->is_expired();
173
- }
174
-
175
- /**
176
- * @author Vova Feldman (@svovaf)
177
- * @since 1.0.6
178
- *
179
- * @return bool
180
- */
181
- function is_lifetime() {
182
- return is_null( $this->expiration );
183
- }
184
-
185
- /**
186
- * @author Vova Feldman (@svovaf)
187
- * @since 1.2.0
188
- *
189
- * @return bool
190
- */
191
- function is_unlimited() {
192
- return is_null( $this->quota );
193
- }
194
-
195
- /**
196
- * Check if license is fully utilized.
197
- *
198
- * @author Vova Feldman (@svovaf)
199
- * @since 1.0.6
200
- *
201
- * @param bool|null $is_localhost
202
- *
203
- * @return bool
204
- */
205
- function is_utilized( $is_localhost = null ) {
206
- if ( is_null( $is_localhost ) ) {
207
- $is_localhost = WP_FS__IS_LOCALHOST_FOR_SERVER;
208
- }
209
-
210
- if ( $this->is_unlimited() ) {
211
- return false;
212
- }
213
-
214
- return ! ( $this->is_free_localhost && $is_localhost ) &&
215
- ( $this->quota <= $this->activated + ( $this->is_free_localhost ? 0 : $this->activated_local ) );
216
- }
217
-
218
- /**
219
- * Check if license can be activated.
220
- *
221
- * @author Vova Feldman (@svovaf)
222
- * @since 2.0.0
223
- *
224
- * @param bool|null $is_localhost
225
- *
226
- * @return bool
227
- */
228
- function can_activate( $is_localhost = null ) {
229
- return ! $this->is_utilized( $is_localhost ) && $this->is_features_enabled();
230
- }
231
-
232
- /**
233
- * Check if license can be activated on a given number of production and localhost sites.
234
- *
235
- * @author Vova Feldman (@svovaf)
236
- * @since 2.0.0
237
- *
238
- * @param int $production_count
239
- * @param int $localhost_count
240
- *
241
- * @return bool
242
- */
243
- function can_activate_bulk( $production_count, $localhost_count ) {
244
- if ( $this->is_unlimited() ) {
245
- return true;
246
- }
247
-
248
- /**
249
- * For simplicity, the logic will work as following: when given X sites to activate the license on, if it's
250
- * possible to activate on ALL of them, do the activation. If it's not possible to activate on ALL of them,
251
- * do NOT activate on any of them.
252
- */
253
- return ( $this->quota >= $this->activated + $production_count + ( $this->is_free_localhost ? 0 : $this->activated_local + $localhost_count ) );
254
- }
255
-
256
- /**
257
- * @author Vova Feldman (@svovaf)
258
- * @since 1.2.1
259
- *
260
- * @return bool
261
- */
262
- function is_active() {
263
- return ( ! $this->is_cancelled );
264
- }
265
-
266
- /**
267
- * Check if license's plan features are enabled.
268
- *
269
- * - Either if plan not expired
270
- * - If expired, based on the configuration to block features or not.
271
- *
272
- * @author Vova Feldman (@svovaf)
273
- * @since 1.0.6
274
- *
275
- * @return bool
276
- */
277
- function is_features_enabled() {
278
- return $this->is_active() && ( ! $this->is_block_features || ! $this->is_expired() );
279
- }
280
-
281
- /**
282
- * Subscription considered to be new without any payments
283
- * if the license expires in less than 24 hours
284
- * from the license creation.
285
- *
286
- * @author Vova Feldman (@svovaf)
287
- * @since 1.0.9
288
- *
289
- * @return bool
290
- */
291
- function is_first_payment_pending() {
292
- return ( WP_FS__TIME_24_HOURS_IN_SEC >= strtotime( $this->expiration ) - strtotime( $this->created ) );
293
- }
294
-
295
- /**
296
- * @return int
297
- */
298
- function total_activations() {
299
- return ( $this->activated + $this->activated_local );
300
- }
301
-
302
- /**
303
- * @author Vova Feldman (@svovaf)
304
- * @since 2.3.1
305
- *
306
- * @return string
307
- */
308
- function get_html_escaped_masked_secret_key() {
309
- return self::mask_secret_key_for_html( $this->secret_key );
310
- }
311
-
312
- /**
313
- * @author Vova Feldman (@svovaf)
314
- * @since 2.3.1
315
- *
316
- * @param string $secret_key
317
- *
318
- * @return string
319
- */
320
- static function mask_secret_key_for_html( $secret_key ) {
321
- return (
322
- // Initial 6 chars - sk_ABC
323
- htmlspecialchars( substr( $secret_key, 0, 6 ) ) .
324
- // Masking
325
- str_pad( '', ( strlen( $secret_key ) - 9 ) * 6, '&bull;' ) .
326
- // Last 3 chars.
327
- htmlspecialchars( substr( $secret_key, - 3 ) )
328
- );
329
- }
330
- }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.0.5
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * Class FS_Plugin_License
15
+ */
16
+ class FS_Plugin_License extends FS_Entity {
17
+
18
+ #region Properties
19
+
20
+ /**
21
+ * @var number
22
+ */
23
+ public $plugin_id;
24
+ /**
25
+ * @var number
26
+ */
27
+ public $user_id;
28
+ /**
29
+ * @var number
30
+ */
31
+ public $plan_id;
32
+ /**
33
+ * @author Leo Fajardo (@leorw)
34
+ * @since 2.3.0
35
+ *
36
+ * @var string
37
+ */
38
+ public $parent_plan_name;
39
+ /**
40
+ * @author Leo Fajardo (@leorw)
41
+ * @since 2.3.0
42
+ *
43
+ * @var string
44
+ */
45
+ public $parent_plan_title;
46
+ /**
47
+ * @author Leo Fajardo (@leorw)
48
+ * @since 2.3.0
49
+ *
50
+ * @var number
51
+ */
52
+ public $parent_license_id;
53
+ /**
54
+ * @author Leo Fajardo (@leorw)
55
+ * @since 2.4.0
56
+ *
57
+ * @var array
58
+ */
59
+ public $products;
60
+ /**
61
+ * @var number
62
+ */
63
+ public $pricing_id;
64
+ /**
65
+ * @var int|null
66
+ */
67
+ public $quota;
68
+ /**
69
+ * @var int
70
+ */
71
+ public $activated;
72
+ /**
73
+ * @var int
74
+ */
75
+ public $activated_local;
76
+ /**
77
+ * @var string
78
+ */
79
+ public $expiration;
80
+ /**
81
+ * @var string
82
+ */
83
+ public $secret_key;
84
+ /**
85
+ * @var bool
86
+ */
87
+ public $is_whitelabeled;
88
+ /**
89
+ * @var bool $is_free_localhost Defaults to true. If true, allow unlimited localhost installs with the same
90
+ * license.
91
+ */
92
+ public $is_free_localhost;
93
+ /**
94
+ * @var bool $is_block_features Defaults to true. If false, don't block features after license expiry - only
95
+ * block updates and support.
96
+ */
97
+ public $is_block_features;
98
+ /**
99
+ * @var bool
100
+ */
101
+ public $is_cancelled;
102
+
103
+ #endregion Properties
104
+
105
+ /**
106
+ * @param stdClass|bool $license
107
+ */
108
+ function __construct( $license = false ) {
109
+ parent::__construct( $license );
110
+ }
111
+
112
+ /**
113
+ * Get entity type.
114
+ *
115
+ * @return string
116
+ */
117
+ static function get_type() {
118
+ return 'license';
119
+ }
120
+
121
+ /**
122
+ * Check how many site activations left.
123
+ *
124
+ * @author Vova Feldman (@svovaf)
125
+ * @since 1.0.5
126
+ *
127
+ * @return int
128
+ */
129
+ function left() {
130
+ if ( ! $this->is_features_enabled() ) {
131
+ return 0;
132
+ }
133
+
134
+ if ( $this->is_unlimited() ) {
135
+ return 999;
136
+ }
137
+
138
+ return ( $this->quota - $this->activated - ( $this->is_free_localhost ? 0 : $this->activated_local ) );
139
+ }
140
+
141
+ /**
142
+ * Check if single site license.
143
+ *
144
+ * @author Vova Feldman (@svovaf)
145
+ * @since 1.1.8.1
146
+ *
147
+ * @return bool
148
+ */
149
+ function is_single_site() {
150
+ return ( is_numeric( $this->quota ) && 1 == $this->quota );
151
+ }
152
+
153
+ /**
154
+ * @author Vova Feldman (@svovaf)
155
+ * @since 1.0.5
156
+ *
157
+ * @return bool
158
+ */
159
+ function is_expired() {
160
+ return ! $this->is_lifetime() && ( strtotime( $this->expiration ) < WP_FS__SCRIPT_START_TIME );
161
+ }
162
+
163
+ /**
164
+ * Check if license is not expired.
165
+ *
166
+ * @author Vova Feldman (@svovaf)
167
+ * @since 1.2.1
168
+ *
169
+ * @return bool
170
+ */
171
+ function is_valid() {
172
+ return ! $this->is_expired();
173
+ }
174
+
175
+ /**
176
+ * @author Vova Feldman (@svovaf)
177
+ * @since 1.0.6
178
+ *
179
+ * @return bool
180
+ */
181
+ function is_lifetime() {
182
+ return is_null( $this->expiration );
183
+ }
184
+
185
+ /**
186
+ * @author Vova Feldman (@svovaf)
187
+ * @since 1.2.0
188
+ *
189
+ * @return bool
190
+ */
191
+ function is_unlimited() {
192
+ return is_null( $this->quota );
193
+ }
194
+
195
+ /**
196
+ * Check if license is fully utilized.
197
+ *
198
+ * @author Vova Feldman (@svovaf)
199
+ * @since 1.0.6
200
+ *
201
+ * @param bool|null $is_localhost
202
+ *
203
+ * @return bool
204
+ */
205
+ function is_utilized( $is_localhost = null ) {
206
+ if ( is_null( $is_localhost ) ) {
207
+ $is_localhost = WP_FS__IS_LOCALHOST_FOR_SERVER;
208
+ }
209
+
210
+ if ( $this->is_unlimited() ) {
211
+ return false;
212
+ }
213
+
214
+ return ! ( $this->is_free_localhost && $is_localhost ) &&
215
+ ( $this->quota <= $this->activated + ( $this->is_free_localhost ? 0 : $this->activated_local ) );
216
+ }
217
+
218
+ /**
219
+ * Check if license can be activated.
220
+ *
221
+ * @author Vova Feldman (@svovaf)
222
+ * @since 2.0.0
223
+ *
224
+ * @param bool|null $is_localhost
225
+ *
226
+ * @return bool
227
+ */
228
+ function can_activate( $is_localhost = null ) {
229
+ return ! $this->is_utilized( $is_localhost ) && $this->is_features_enabled();
230
+ }
231
+
232
+ /**
233
+ * Check if license can be activated on a given number of production and localhost sites.
234
+ *
235
+ * @author Vova Feldman (@svovaf)
236
+ * @since 2.0.0
237
+ *
238
+ * @param int $production_count
239
+ * @param int $localhost_count
240
+ *
241
+ * @return bool
242
+ */
243
+ function can_activate_bulk( $production_count, $localhost_count ) {
244
+ if ( $this->is_unlimited() ) {
245
+ return true;
246
+ }
247
+
248
+ /**
249
+ * For simplicity, the logic will work as following: when given X sites to activate the license on, if it's
250
+ * possible to activate on ALL of them, do the activation. If it's not possible to activate on ALL of them,
251
+ * do NOT activate on any of them.
252
+ */
253
+ return ( $this->quota >= $this->activated + $production_count + ( $this->is_free_localhost ? 0 : $this->activated_local + $localhost_count ) );
254
+ }
255
+
256
+ /**
257
+ * @author Vova Feldman (@svovaf)
258
+ * @since 1.2.1
259
+ *
260
+ * @return bool
261
+ */
262
+ function is_active() {
263
+ return ( ! $this->is_cancelled );
264
+ }
265
+
266
+ /**
267
+ * Check if license's plan features are enabled.
268
+ *
269
+ * - Either if plan not expired
270
+ * - If expired, based on the configuration to block features or not.
271
+ *
272
+ * @author Vova Feldman (@svovaf)
273
+ * @since 1.0.6
274
+ *
275
+ * @return bool
276
+ */
277
+ function is_features_enabled() {
278
+ return $this->is_active() && ( ! $this->is_block_features || ! $this->is_expired() );
279
+ }
280
+
281
+ /**
282
+ * Subscription considered to be new without any payments
283
+ * if the license expires in less than 24 hours
284
+ * from the license creation.
285
+ *
286
+ * @author Vova Feldman (@svovaf)
287
+ * @since 1.0.9
288
+ *
289
+ * @return bool
290
+ */
291
+ function is_first_payment_pending() {
292
+ return ( WP_FS__TIME_24_HOURS_IN_SEC >= strtotime( $this->expiration ) - strtotime( $this->created ) );
293
+ }
294
+
295
+ /**
296
+ * @return int
297
+ */
298
+ function total_activations() {
299
+ return ( $this->activated + $this->activated_local );
300
+ }
301
+
302
+ /**
303
+ * @author Vova Feldman (@svovaf)
304
+ * @since 2.3.1
305
+ *
306
+ * @return string
307
+ */
308
+ function get_html_escaped_masked_secret_key() {
309
+ return self::mask_secret_key_for_html( $this->secret_key );
310
+ }
311
+
312
+ /**
313
+ * @author Vova Feldman (@svovaf)
314
+ * @since 2.3.1
315
+ *
316
+ * @param string $secret_key
317
+ *
318
+ * @return string
319
+ */
320
+ static function mask_secret_key_for_html( $secret_key ) {
321
+ return (
322
+ // Initial 6 chars - sk_ABC
323
+ htmlspecialchars( substr( $secret_key, 0, 6 ) ) .
324
+ // Masking
325
+ str_pad( '', ( strlen( $secret_key ) - 9 ) * 6, '&bull;' ) .
326
+ // Last 3 chars.
327
+ htmlspecialchars( substr( $secret_key, - 3 ) )
328
+ );
329
+ }
330
+ }
freemius/includes/entities/class-fs-plugin-plan.php CHANGED
@@ -1,145 +1,145 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.5
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Class FS_Plugin_Plan
15
- *
16
- * @property FS_Pricing[] $pricing
17
- */
18
- class FS_Plugin_Plan extends FS_Entity {
19
-
20
- #region Properties
21
-
22
- /**
23
- * @var number
24
- */
25
- public $plugin_id;
26
- /**
27
- * @var string
28
- */
29
- public $name;
30
- /**
31
- * @var string
32
- */
33
- public $title;
34
- /**
35
- * @var string
36
- */
37
- public $description;
38
- /**
39
- * @var bool Defaults to true. If true, allow unlimited localhost installs with the same license.
40
- */
41
- public $is_free_localhost;
42
- /**
43
- * @var bool Defaults to true. If false, don't block features after license expiry - only block updates and
44
- * support.
45
- */
46
- public $is_block_features;
47
- /**
48
- * @var int
49
- */
50
- public $license_type;
51
- /**
52
- * @var bool
53
- */
54
- public $is_https_support;
55
- /**
56
- * @var int Trial days.
57
- */
58
- public $trial_period;
59
- /**
60
- * @var string If true, require payment for trial.
61
- */
62
- public $is_require_subscription;
63
- /**
64
- * @var string Knowledge Base URL.
65
- */
66
- public $support_kb;
67
- /**
68
- * @var string Support Forum URL.
69
- */
70
- public $support_forum;
71
- /**
72
- * @var string Support email address.
73
- */
74
- public $support_email;
75
- /**
76
- * @var string Support phone.
77
- */
78
- public $support_phone;
79
- /**
80
- * @var string Support skype username.
81
- */
82
- public $support_skype;
83
- /**
84
- * @var bool Is personal success manager supported with the plan.
85
- */
86
- public $is_success_manager;
87
- /**
88
- * @var bool Is featured plan.
89
- */
90
- public $is_featured;
91
-
92
- #endregion Properties
93
-
94
- /**
95
- * @param object|bool $plan
96
- */
97
- function __construct( $plan = false ) {
98
- parent::__construct( $plan );
99
-
100
- if ( is_object( $plan ) ) {
101
- $this->name = strtolower( $plan->name );
102
- }
103
- }
104
-
105
- static function get_type() {
106
- return 'plan';
107
- }
108
-
109
- /**
110
- * @author Vova Feldman (@svovaf)
111
- * @since 1.0.9
112
- *
113
- * @return bool
114
- */
115
- function is_free() {
116
- return ( 'free' === $this->name );
117
- }
118
-
119
- /**
120
- * Checks if this plan supports "Technical Support".
121
- *
122
- * @author Leo Fajardo (leorw)
123
- * @since 1.2.0
124
- *
125
- * @return bool
126
- */
127
- function has_technical_support() {
128
- return ( ! empty( $this->support_email ) ||
129
- ! empty( $this->support_skype ) ||
130
- ! empty( $this->support_phone ) ||
131
- ! empty( $this->is_success_manager )
132
- );
133
- }
134
-
135
- /**
136
- * @author Vova Feldman (@svovaf)
137
- * @since 1.0.9
138
- *
139
- * @return bool
140
- */
141
- function has_trial() {
142
- return ! $this->is_free() &&
143
- is_numeric( $this->trial_period ) && ( $this->trial_period > 0 );
144
- }
145
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.0.5
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * Class FS_Plugin_Plan
15
+ *
16
+ * @property FS_Pricing[] $pricing
17
+ */
18
+ class FS_Plugin_Plan extends FS_Entity {
19
+
20
+ #region Properties
21
+
22
+ /**
23
+ * @var number
24
+ */
25
+ public $plugin_id;
26
+ /**
27
+ * @var string
28
+ */
29
+ public $name;
30
+ /**
31
+ * @var string
32
+ */
33
+ public $title;
34
+ /**
35
+ * @var string
36
+ */
37
+ public $description;
38
+ /**
39
+ * @var bool Defaults to true. If true, allow unlimited localhost installs with the same license.
40
+ */
41
+ public $is_free_localhost;
42
+ /**
43
+ * @var bool Defaults to true. If false, don't block features after license expiry - only block updates and
44
+ * support.
45
+ */
46
+ public $is_block_features;
47
+ /**
48
+ * @var int
49
+ */
50
+ public $license_type;
51
+ /**
52
+ * @var bool
53
+ */
54
+ public $is_https_support;
55
+ /**
56
+ * @var int Trial days.
57
+ */
58
+ public $trial_period;
59
+ /**
60
+ * @var string If true, require payment for trial.
61
+ */
62
+ public $is_require_subscription;
63
+ /**
64
+ * @var string Knowledge Base URL.
65
+ */
66
+ public $support_kb;
67
+ /**
68
+ * @var string Support Forum URL.
69
+ */
70
+ public $support_forum;
71
+ /**
72
+ * @var string Support email address.
73
+ */
74
+ public $support_email;
75
+ /**
76
+ * @var string Support phone.
77
+ */
78
+ public $support_phone;
79
+ /**
80
+ * @var string Support skype username.
81
+ */
82
+ public $support_skype;
83
+ /**
84
+ * @var bool Is personal success manager supported with the plan.
85
+ */
86
+ public $is_success_manager;
87
+ /**
88
+ * @var bool Is featured plan.
89
+ */
90
+ public $is_featured;
91
+
92
+ #endregion Properties
93
+
94
+ /**
95
+ * @param object|bool $plan
96
+ */
97
+ function __construct( $plan = false ) {
98
+ parent::__construct( $plan );
99
+
100
+ if ( is_object( $plan ) ) {
101
+ $this->name = strtolower( $plan->name );
102
+ }
103
+ }
104
+
105
+ static function get_type() {
106
+ return 'plan';
107
+ }
108
+
109
+ /**
110
+ * @author Vova Feldman (@svovaf)
111
+ * @since 1.0.9
112
+ *
113
+ * @return bool
114
+ */
115
+ function is_free() {
116
+ return ( 'free' === $this->name );
117
+ }
118
+
119
+ /**
120
+ * Checks if this plan supports "Technical Support".
121
+ *
122
+ * @author Leo Fajardo (leorw)
123
+ * @since 1.2.0
124
+ *
125
+ * @return bool
126
+ */
127
+ function has_technical_support() {
128
+ return ( ! empty( $this->support_email ) ||
129
+ ! empty( $this->support_skype ) ||
130
+ ! empty( $this->support_phone ) ||
131
+ ! empty( $this->is_success_manager )
132
+ );
133
+ }
134
+
135
+ /**
136
+ * @author Vova Feldman (@svovaf)
137
+ * @since 1.0.9
138
+ *
139
+ * @return bool
140
+ */
141
+ function has_trial() {
142
+ return ! $this->is_free() &&
143
+ is_numeric( $this->trial_period ) && ( $this->trial_period > 0 );
144
+ }
145
  }
freemius/includes/entities/class-fs-plugin-tag.php CHANGED
@@ -1,60 +1,60 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2018, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 2.0.0
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Plugin_Tag extends FS_Entity {
14
- /**
15
- * @var string
16
- */
17
- public $version;
18
- /**
19
- * @var string
20
- */
21
- public $url;
22
- /**
23
- * @var string
24
- */
25
- public $requires_platform_version;
26
- /**
27
- * @var string
28
- */
29
- public $tested_up_to_version;
30
- /**
31
- * @var bool
32
- */
33
- public $has_free;
34
- /**
35
- * @var bool
36
- */
37
- public $has_premium;
38
- /**
39
- * @var string One of the following: `pending`, `beta`, `unreleased`.
40
- */
41
- public $release_mode;
42
-
43
- function __construct( $tag = false ) {
44
- parent::__construct( $tag );
45
- }
46
-
47
- static function get_type() {
48
- return 'tag';
49
- }
50
-
51
- /**
52
- * @author Leo Fajardo (@leorw)
53
- * @since 2.3.0
54
- *
55
- * @return bool
56
- */
57
- function is_beta() {
58
- return ( 'beta' === $this->release_mode );
59
- }
60
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2018, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 2.0.0
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Plugin_Tag extends FS_Entity {
14
+ /**
15
+ * @var string
16
+ */
17
+ public $version;
18
+ /**
19
+ * @var string
20
+ */
21
+ public $url;
22
+ /**
23
+ * @var string
24
+ */
25
+ public $requires_platform_version;
26
+ /**
27
+ * @var string
28
+ */
29
+ public $tested_up_to_version;
30
+ /**
31
+ * @var bool
32
+ */
33
+ public $has_free;
34
+ /**
35
+ * @var bool
36
+ */
37
+ public $has_premium;
38
+ /**
39
+ * @var string One of the following: `pending`, `beta`, `unreleased`.
40
+ */
41
+ public $release_mode;
42
+
43
+ function __construct( $tag = false ) {
44
+ parent::__construct( $tag );
45
+ }
46
+
47
+ static function get_type() {
48
+ return 'tag';
49
+ }
50
+
51
+ /**
52
+ * @author Leo Fajardo (@leorw)
53
+ * @since 2.3.0
54
+ *
55
+ * @return bool
56
+ */
57
+ function is_beta() {
58
+ return ( 'beta' === $this->release_mode );
59
+ }
60
  }
freemius/includes/entities/class-fs-plugin.php CHANGED
@@ -1,159 +1,159 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.3
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Plugin extends FS_Scope_Entity {
14
- /**
15
- * @since 1.0.6
16
- * @var null|number
17
- */
18
- public $parent_plugin_id;
19
- /**
20
- * @var string
21
- */
22
- public $title;
23
- /**
24
- * @var string
25
- */
26
- public $slug;
27
- /**
28
- * @author Leo Fajardo (@leorw)
29
- * @since 2.2.1
30
- *
31
- * @var string
32
- */
33
- public $premium_slug;
34
- /**
35
- * @since 1.2.2
36
- *
37
- * @var string 'plugin' or 'theme'
38
- */
39
- public $type;
40
- /**
41
- * @author Leo Fajardo (@leorw)
42
- *
43
- * @since 1.2.3
44
- *
45
- * @var string|false false if the module doesn't have an affiliate program or one of the following: 'selected', 'customers', or 'all'.
46
- */
47
- public $affiliate_moderation;
48
- /**
49
- * @var bool Set to true if the free version of the module is hosted on WordPress.org. Defaults to true.
50
- */
51
- public $is_wp_org_compliant = true;
52
- /**
53
- * @author Leo Fajardo (@leorw)
54
- * @since 2.2.5
55
- *
56
- * @var int
57
- */
58
- public $premium_releases_count;
59
-
60
- #region Install Specific Properties
61
-
62
- /**
63
- * @var string
64
- */
65
- public $file;
66
- /**
67
- * @var string
68
- */
69
- public $version;
70
- /**
71
- * @var bool
72
- */
73
- public $auto_update;
74
- /**
75
- * @var FS_Plugin_Info
76
- */
77
- public $info;
78
- /**
79
- * @since 1.0.9
80
- *
81
- * @var bool
82
- */
83
- public $is_premium;
84
- /**
85
- * @author Leo Fajardo (@leorw)
86
- * @since 2.2.1
87
- *
88
- * @var string
89
- */
90
- public $premium_suffix;
91
- /**
92
- * @since 1.0.9
93
- *
94
- * @var bool
95
- */
96
- public $is_live;
97
- /**
98
- * @since 2.2.3
99
- * @var null|number
100
- */
101
- public $bundle_id;
102
- /**
103
- * @since 2.3.1
104
- * @var null|string
105
- */
106
- public $bundle_public_key;
107
-
108
- const AFFILIATE_MODERATION_CUSTOMERS = 'customers';
109
-
110
- #endregion Install Specific Properties
111
-
112
- /**
113
- * @param stdClass|bool $plugin
114
- */
115
- function __construct( $plugin = false ) {
116
- parent::__construct( $plugin );
117
-
118
- $this->is_premium = false;
119
- $this->is_live = true;
120
-
121
- if ( empty( $this->premium_slug ) && ! empty( $plugin->slug ) ) {
122
- $this->premium_slug = "{$this->slug}-premium";
123
- }
124
-
125
- if ( empty( $this->premium_suffix ) ) {
126
- $this->premium_suffix = '(Premium)';
127
- }
128
-
129
- if ( isset( $plugin->info ) && is_object( $plugin->info ) ) {
130
- $this->info = new FS_Plugin_Info( $plugin->info );
131
- }
132
- }
133
-
134
- /**
135
- * Check if plugin is an add-on (has parent).
136
- *
137
- * @author Vova Feldman (@svovaf)
138
- * @since 1.0.6
139
- *
140
- * @return bool
141
- */
142
- function is_addon() {
143
- return isset( $this->parent_plugin_id ) && is_numeric( $this->parent_plugin_id );
144
- }
145
-
146
- /**
147
- * @author Leo Fajardo (@leorw)
148
- * @since 1.2.3
149
- *
150
- * @return bool
151
- */
152
- function has_affiliate_program() {
153
- return ( ! empty( $this->affiliate_moderation ) );
154
- }
155
-
156
- static function get_type() {
157
- return 'plugin';
158
- }
159
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.0.3
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Plugin extends FS_Scope_Entity {
14
+ /**
15
+ * @since 1.0.6
16
+ * @var null|number
17
+ */
18
+ public $parent_plugin_id;
19
+ /**
20
+ * @var string
21
+ */
22
+ public $title;
23
+ /**
24
+ * @var string
25
+ */
26
+ public $slug;
27
+ /**
28
+ * @author Leo Fajardo (@leorw)
29
+ * @since 2.2.1
30
+ *
31
+ * @var string
32
+ */
33
+ public $premium_slug;
34
+ /**
35
+ * @since 1.2.2
36
+ *
37
+ * @var string 'plugin' or 'theme'
38
+ */
39
+ public $type;
40
+ /**
41
+ * @author Leo Fajardo (@leorw)
42
+ *
43
+ * @since 1.2.3
44
+ *
45
+ * @var string|false false if the module doesn't have an affiliate program or one of the following: 'selected', 'customers', or 'all'.
46
+ */
47
+ public $affiliate_moderation;
48
+ /**
49
+ * @var bool Set to true if the free version of the module is hosted on WordPress.org. Defaults to true.
50
+ */
51
+ public $is_wp_org_compliant = true;
52
+ /**
53
+ * @author Leo Fajardo (@leorw)
54
+ * @since 2.2.5
55
+ *
56
+ * @var int
57
+ */
58
+ public $premium_releases_count;
59
+
60
+ #region Install Specific Properties
61
+
62
+ /**
63
+ * @var string
64
+ */
65
+ public $file;
66
+ /**
67
+ * @var string
68
+ */
69
+ public $version;
70
+ /**
71
+ * @var bool
72
+ */
73
+ public $auto_update;
74
+ /**
75
+ * @var FS_Plugin_Info
76
+ */
77
+ public $info;
78
+ /**
79
+ * @since 1.0.9
80
+ *
81
+ * @var bool
82
+ */
83
+ public $is_premium;
84
+ /**
85
+ * @author Leo Fajardo (@leorw)
86
+ * @since 2.2.1
87
+ *
88
+ * @var string
89
+ */
90
+ public $premium_suffix;
91
+ /**
92
+ * @since 1.0.9
93
+ *
94
+ * @var bool
95
+ */
96
+ public $is_live;
97
+ /**
98
+ * @since 2.2.3
99
+ * @var null|number
100
+ */
101
+ public $bundle_id;
102
+ /**
103
+ * @since 2.3.1
104
+ * @var null|string
105
+ */
106
+ public $bundle_public_key;
107
+
108
+ const AFFILIATE_MODERATION_CUSTOMERS = 'customers';
109
+
110
+ #endregion Install Specific Properties
111
+
112
+ /**
113
+ * @param stdClass|bool $plugin
114
+ */
115
+ function __construct( $plugin = false ) {
116
+ parent::__construct( $plugin );
117
+
118
+ $this->is_premium = false;
119
+ $this->is_live = true;
120
+
121
+ if ( empty( $this->premium_slug ) && ! empty( $plugin->slug ) ) {
122
+ $this->premium_slug = "{$this->slug}-premium";
123
+ }
124
+
125
+ if ( empty( $this->premium_suffix ) ) {
126
+ $this->premium_suffix = '(Premium)';
127
+ }
128
+
129
+ if ( isset( $plugin->info ) && is_object( $plugin->info ) ) {
130
+ $this->info = new FS_Plugin_Info( $plugin->info );
131
+ }
132
+ }
133
+
134
+ /**
135
+ * Check if plugin is an add-on (has parent).
136
+ *
137
+ * @author Vova Feldman (@svovaf)
138
+ * @since 1.0.6
139
+ *
140
+ * @return bool
141
+ */
142
+ function is_addon() {
143
+ return isset( $this->parent_plugin_id ) && is_numeric( $this->parent_plugin_id );
144
+ }
145
+
146
+ /**
147
+ * @author Leo Fajardo (@leorw)
148
+ * @since 1.2.3
149
+ *
150
+ * @return bool
151
+ */
152
+ function has_affiliate_program() {
153
+ return ( ! empty( $this->affiliate_moderation ) );
154
+ }
155
+
156
+ static function get_type() {
157
+ return 'plugin';
158
+ }
159
  }
freemius/includes/entities/class-fs-pricing.php CHANGED
@@ -1,157 +1,157 @@
1
- <?php
2
- /**
3
- * @package Freemius for EDD Add-On
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.0
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Pricing extends FS_Entity {
14
-
15
- #region Properties
16
-
17
- /**
18
- * @var number
19
- */
20
- public $plan_id;
21
- /**
22
- * @var int
23
- */
24
- public $licenses;
25
- /**
26
- * @var null|float
27
- */
28
- public $monthly_price;
29
- /**
30
- * @var null|float
31
- */
32
- public $annual_price;
33
- /**
34
- * @var null|float
35
- */
36
- public $lifetime_price;
37
- /**
38
- * @author Leo Fajardo (@leorw)
39
- * @since 2.3.1
40
- *
41
- * @var string One of the following: `usd`, `gbp`, `eur`.
42
- */
43
- public $currency;
44
-
45
- #endregion Properties
46
-
47
- /**
48
- * @param object|bool $pricing
49
- */
50
- function __construct( $pricing = false ) {
51
- parent::__construct( $pricing );
52
- }
53
-
54
- static function get_type() {
55
- return 'pricing';
56
- }
57
-
58
- /**
59
- * @author Vova Feldman (@svovaf)
60
- * @since 1.1.8
61
- *
62
- * @return bool
63
- */
64
- function has_monthly() {
65
- return ( is_numeric( $this->monthly_price ) && $this->monthly_price > 0 );
66
- }
67
-
68
- /**
69
- * @author Vova Feldman (@svovaf)
70
- * @since 1.1.8
71
- *
72
- * @return bool
73
- */
74
- function has_annual() {
75
- return ( is_numeric( $this->annual_price ) && $this->annual_price > 0 );
76
- }
77
-
78
- /**
79
- * @author Vova Feldman (@svovaf)
80
- * @since 1.1.8
81
- *
82
- * @return bool
83
- */
84
- function has_lifetime() {
85
- return ( is_numeric( $this->lifetime_price ) && $this->lifetime_price > 0 );
86
- }
87
-
88
- /**
89
- * Check if unlimited licenses pricing.
90
- *
91
- * @author Vova Feldman (@svovaf)
92
- * @since 1.1.8
93
- *
94
- * @return bool
95
- */
96
- function is_unlimited() {
97
- return is_null( $this->licenses );
98
- }
99
-
100
-
101
- /**
102
- * Check if pricing has more than one billing cycle.
103
- *
104
- * @author Vova Feldman (@svovaf)
105
- * @since 1.1.8
106
- *
107
- * @return bool
108
- */
109
- function is_multi_cycle() {
110
- $cycles = 0;
111
- if ( $this->has_monthly() ) {
112
- $cycles ++;
113
- }
114
- if ( $this->has_annual() ) {
115
- $cycles ++;
116
- }
117
- if ( $this->has_lifetime() ) {
118
- $cycles ++;
119
- }
120
-
121
- return $cycles > 1;
122
- }
123
-
124
- /**
125
- * Get annual over monthly discount.
126
- *
127
- * @author Vova Feldman (@svovaf)
128
- * @since 1.1.8
129
- *
130
- * @return int
131
- */
132
- function annual_discount_percentage() {
133
- return floor( $this->annual_savings() / ( $this->monthly_price * 12 * ( $this->is_unlimited() ? 1 : $this->licenses ) ) * 100 );
134
- }
135
-
136
- /**
137
- * Get annual over monthly savings.
138
- *
139
- * @author Vova Feldman (@svovaf)
140
- * @since 1.1.8
141
- *
142
- * @return float
143
- */
144
- function annual_savings() {
145
- return ( $this->monthly_price * 12 - $this->annual_price ) * ( $this->is_unlimited() ? 1 : $this->licenses );
146
- }
147
-
148
- /**
149
- * @author Leo Fajardo (@leorw)
150
- * @since 2.3.1
151
- *
152
- * @return bool
153
- */
154
- function is_usd() {
155
- return ( 'usd' === $this->currency );
156
- }
157
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius for EDD Add-On
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.0.0
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Pricing extends FS_Entity {
14
+
15
+ #region Properties
16
+
17
+ /**
18
+ * @var number
19
+ */
20
+ public $plan_id;
21
+ /**
22
+ * @var int
23
+ */
24
+ public $licenses;
25
+ /**
26
+ * @var null|float
27
+ */
28
+ public $monthly_price;
29
+ /**
30
+ * @var null|float
31
+ */
32
+ public $annual_price;
33
+ /**
34
+ * @var null|float
35
+ */
36
+ public $lifetime_price;
37
+ /**
38
+ * @author Leo Fajardo (@leorw)
39
+ * @since 2.3.1
40
+ *
41
+ * @var string One of the following: `usd`, `gbp`, `eur`.
42
+ */
43
+ public $currency;
44
+
45
+ #endregion Properties
46
+
47
+ /**
48
+ * @param object|bool $pricing
49
+ */
50
+ function __construct( $pricing = false ) {
51
+ parent::__construct( $pricing );
52
+ }
53
+
54
+ static function get_type() {
55
+ return 'pricing';
56
+ }
57
+
58
+ /**
59
+ * @author Vova Feldman (@svovaf)
60
+ * @since 1.1.8
61
+ *
62
+ * @return bool
63
+ */
64
+ function has_monthly() {
65
+ return ( is_numeric( $this->monthly_price ) && $this->monthly_price > 0 );
66
+ }
67
+
68
+ /**
69
+ * @author Vova Feldman (@svovaf)
70
+ * @since 1.1.8
71
+ *
72
+ * @return bool
73
+ */
74
+ function has_annual() {
75
+ return ( is_numeric( $this->annual_price ) && $this->annual_price > 0 );
76
+ }
77
+
78
+ /**
79
+ * @author Vova Feldman (@svovaf)
80
+ * @since 1.1.8
81
+ *
82
+ * @return bool
83
+ */
84
+ function has_lifetime() {
85
+ return ( is_numeric( $this->lifetime_price ) && $this->lifetime_price > 0 );
86
+ }
87
+
88
+ /**
89
+ * Check if unlimited licenses pricing.
90
+ *
91
+ * @author Vova Feldman (@svovaf)
92
+ * @since 1.1.8
93
+ *
94
+ * @return bool
95
+ */
96
+ function is_unlimited() {
97
+ return is_null( $this->licenses );
98
+ }
99
+
100
+
101
+ /**
102
+ * Check if pricing has more than one billing cycle.
103
+ *
104
+ * @author Vova Feldman (@svovaf)
105
+ * @since 1.1.8
106
+ *
107
+ * @return bool
108
+ */
109
+ function is_multi_cycle() {
110
+ $cycles = 0;
111
+ if ( $this->has_monthly() ) {
112
+ $cycles ++;
113
+ }
114
+ if ( $this->has_annual() ) {
115
+ $cycles ++;
116
+ }
117
+ if ( $this->has_lifetime() ) {
118
+ $cycles ++;
119
+ }
120
+
121
+ return $cycles > 1;
122
+ }
123
+
124
+ /**
125
+ * Get annual over monthly discount.
126
+ *
127
+ * @author Vova Feldman (@svovaf)
128
+ * @since 1.1.8
129
+ *
130
+ * @return int
131
+ */
132
+ function annual_discount_percentage() {
133
+ return floor( $this->annual_savings() / ( $this->monthly_price * 12 * ( $this->is_unlimited() ? 1 : $this->licenses ) ) * 100 );
134
+ }
135
+
136
+ /**
137
+ * Get annual over monthly savings.
138
+ *
139
+ * @author Vova Feldman (@svovaf)
140
+ * @since 1.1.8
141
+ *
142
+ * @return float
143
+ */
144
+ function annual_savings() {
145
+ return ( $this->monthly_price * 12 - $this->annual_price ) * ( $this->is_unlimited() ? 1 : $this->licenses );
146
+ }
147
+
148
+ /**
149
+ * @author Leo Fajardo (@leorw)
150
+ * @since 2.3.1
151
+ *
152
+ * @return bool
153
+ */
154
+ function is_usd() {
155
+ return ( 'usd' === $this->currency );
156
+ }
157
  }
freemius/includes/entities/class-fs-scope-entity.php CHANGED
@@ -1,29 +1,29 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.4
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Scope_Entity extends FS_Entity {
14
- /**
15
- * @var string
16
- */
17
- public $public_key;
18
- /**
19
- * @var string
20
- */
21
- public $secret_key;
22
-
23
- /**
24
- * @param bool|stdClass $scope_entity
25
- */
26
- function __construct( $scope_entity = false ) {
27
- parent::__construct( $scope_entity );
28
- }
29
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.0.4
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Scope_Entity extends FS_Entity {
14
+ /**
15
+ * @var string
16
+ */
17
+ public $public_key;
18
+ /**
19
+ * @var string
20
+ */
21
+ public $secret_key;
22
+
23
+ /**
24
+ * @param bool|stdClass $scope_entity
25
+ */
26
+ function __construct( $scope_entity = false ) {
27
+ parent::__construct( $scope_entity );
28
+ }
29
  }
freemius/includes/entities/class-fs-site.php CHANGED
@@ -1,253 +1,253 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.3
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Site extends FS_Scope_Entity {
14
- /**
15
- * @var number
16
- */
17
- public $site_id;
18
- /**
19
- * @var number
20
- */
21
- public $plugin_id;
22
- /**
23
- * @var number
24
- */
25
- public $user_id;
26
- /**
27
- * @var string
28
- */
29
- public $title;
30
- /**
31
- * @var string
32
- */
33
- public $url;
34
- /**
35
- * @var string
36
- */
37
- public $version;
38
- /**
39
- * @var string E.g. en-GB
40
- */
41
- public $language;
42
- /**
43
- * @var string E.g. UTF-8
44
- */
45
- public $charset;
46
- /**
47
- * @var string Platform version (e.g WordPress version).
48
- */
49
- public $platform_version;
50
- /**
51
- * Freemius SDK version
52
- *
53
- * @author Leo Fajardo (@leorw)
54
- * @since 1.2.2
55
- *
56
- * @var string SDK version (e.g.: 1.2.2)
57
- */
58
- public $sdk_version;
59
- /**
60
- * @var string Programming language version (e.g PHP version).
61
- */
62
- public $programming_language_version;
63
- /**
64
- * @var number|null
65
- */
66
- public $plan_id;
67
- /**
68
- * @var number|null
69
- */
70
- public $license_id;
71
- /**
72
- * @var number|null
73
- */
74
- public $trial_plan_id;
75
- /**
76
- * @var string|null
77
- */
78
- public $trial_ends;
79
- /**
80
- * @since 1.0.9
81
- *
82
- * @var bool
83
- */
84
- public $is_premium = false;
85
- /**
86
- * @author Leo Fajardo (@leorw)
87
- *
88
- * @since 1.2.1.5
89
- *
90
- * @var bool
91
- */
92
- public $is_disconnected = false;
93
- /**
94
- * @since 2.0.0
95
- *
96
- * @var bool
97
- */
98
- public $is_active = true;
99
- /**
100
- * @since 2.0.0
101
- *
102
- * @var bool
103
- */
104
- public $is_uninstalled = false;
105
- /**
106
- * @author Edgar Melkonyan
107
- *
108
- * @since 2.4.2
109
- *
110
- * @var bool
111
- */
112
- public $is_beta;
113
-
114
- /**
115
- * @param stdClass|bool $site
116
- */
117
- function __construct( $site = false ) {
118
- parent::__construct( $site );
119
-
120
- if ( is_object( $site ) ) {
121
- $this->plan_id = $site->plan_id;
122
- }
123
-
124
- if ( ! is_bool( $this->is_disconnected ) ) {
125
- $this->is_disconnected = false;
126
- }
127
- }
128
-
129
- static function get_type() {
130
- return 'install';
131
- }
132
-
133
- /**
134
- * @author Vova Feldman (@svovaf)
135
- * @since 2.0.0
136
- *
137
- * @param string $url
138
- *
139
- * @return bool
140
- */
141
- static function is_localhost_by_address( $url ) {
142
- if ( false !== strpos( $url, '127.0.0.1' ) ||
143
- false !== strpos( $url, 'localhost' )
144
- ) {
145
- return true;
146
- }
147
-
148
- if ( ! fs_starts_with( $url, 'http' ) ) {
149
- $url = 'http://' . $url;
150
- }
151
-
152
- $url_parts = parse_url( $url );
153
-
154
- $subdomain = $url_parts['host'];
155
-
156
- return (
157
- // Starts with.
158
- fs_starts_with( $subdomain, 'local.' ) ||
159
- fs_starts_with( $subdomain, 'dev.' ) ||
160
- fs_starts_with( $subdomain, 'test.' ) ||
161
- fs_starts_with( $subdomain, 'stage.' ) ||
162
- fs_starts_with( $subdomain, 'staging.' ) ||
163
-
164
- // Ends with.
165
- fs_ends_with( $subdomain, '.dev' ) ||
166
- fs_ends_with( $subdomain, '.test' ) ||
167
- fs_ends_with( $subdomain, '.staging' ) ||
168
- fs_ends_with( $subdomain, '.local' ) ||
169
- fs_ends_with( $subdomain, '.example' ) ||
170
- fs_ends_with( $subdomain, '.invalid' ) ||
171
- // GoDaddy test/dev.
172
- fs_ends_with( $subdomain, '.myftpupload.com' ) ||
173
- // ngrok tunneling.
174
- fs_ends_with( $subdomain, '.ngrok.io' ) ||
175
- // wpsandbox.
176
- fs_ends_with( $subdomain, '.wpsandbox.pro' ) ||
177
- // SiteGround staging.
178
- fs_starts_with( $subdomain, 'staging' ) ||
179
- // WPEngine staging.
180
- fs_ends_with( $subdomain, '.staging.wpengine.com' ) ||
181
- fs_ends_with( $subdomain, '.dev.wpengine.com' ) ||
182
- fs_ends_with( $subdomain, '.wpengine.com' ) ||
183
- // Pantheon
184
- ( fs_ends_with( $subdomain, 'pantheonsite.io' ) &&
185
- ( fs_starts_with( $subdomain, 'test-' ) || fs_starts_with( $subdomain, 'dev-' ) ) ) ||
186
- // Cloudways
187
- fs_ends_with( $subdomain, '.cloudwaysapps.com' ) ||
188
- // Kinsta
189
- ( fs_starts_with( $subdomain, 'staging-' ) && ( fs_ends_with( $subdomain, '.kinsta.com' ) || fs_ends_with( $subdomain, '.kinsta.cloud' ) ) ) ||
190
- // DesktopServer
191
- fs_ends_with( $subdomain, '.dev.cc' ) ||
192
- // Pressable
193
- fs_ends_with( $subdomain, '.mystagingwebsite.com' )
194
- );
195
- }
196
-
197
- function is_localhost() {
198
- return ( WP_FS__IS_LOCALHOST_FOR_SERVER || self::is_localhost_by_address( $this->url ) );
199
- }
200
-
201
- /**
202
- * Check if site in trial.
203
- *
204
- * @author Vova Feldman (@svovaf)
205
- * @since 1.0.9
206
- *
207
- * @return bool
208
- */
209
- function is_trial() {
210
- return is_numeric( $this->trial_plan_id ) && ( strtotime( $this->trial_ends ) > WP_FS__SCRIPT_START_TIME );
211
- }
212
-
213
- /**
214
- * Check if user already utilized the trial with the current install.
215
- *
216
- * @author Vova Feldman (@svovaf)
217
- * @since 1.0.9
218
- *
219
- * @return bool
220
- */
221
- function is_trial_utilized() {
222
- return is_numeric( $this->trial_plan_id );
223
- }
224
-
225
- /**
226
- * @author Vova Feldman (@svovaf)
227
- * @since 2.0.0
228
- *
229
- * @return bool
230
- */
231
- function is_tracking_allowed() {
232
- return ( true !== $this->is_disconnected );
233
- }
234
-
235
- /**
236
- * @author Vova Feldman (@svovaf)
237
- * @since 2.0.0
238
- *
239
- * @return bool
240
- */
241
- function is_tracking_prohibited() {
242
- return ! $this->is_tracking_allowed();
243
- }
244
-
245
- /**
246
- * @author Edgar Melkonyan
247
- *
248
- * @return bool
249
- */
250
- function is_beta() {
251
- return ( isset( $this->is_beta ) && true === $this->is_beta );
252
- }
253
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.0.3
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Site extends FS_Scope_Entity {
14
+ /**
15
+ * @var number
16
+ */
17
+ public $site_id;
18
+ /**
19
+ * @var number
20
+ */
21
+ public $plugin_id;
22
+ /**
23
+ * @var number
24
+ */
25
+ public $user_id;
26
+ /**
27
+ * @var string
28
+ */
29
+ public $title;
30
+ /**
31
+ * @var string
32
+ */
33
+ public $url;
34
+ /**
35
+ * @var string
36
+ */
37
+ public $version;
38
+ /**
39
+ * @var string E.g. en-GB
40
+ */
41
+ public $language;
42
+ /**
43
+ * @var string E.g. UTF-8
44
+ */
45
+ public $charset;
46
+ /**
47
+ * @var string Platform version (e.g WordPress version).
48
+ */
49
+ public $platform_version;
50
+ /**
51
+ * Freemius SDK version
52
+ *
53
+ * @author Leo Fajardo (@leorw)
54
+ * @since 1.2.2
55
+ *
56
+ * @var string SDK version (e.g.: 1.2.2)
57
+ */
58
+ public $sdk_version;
59
+ /**
60
+ * @var string Programming language version (e.g PHP version).
61
+ */
62
+ public $programming_language_version;
63
+ /**
64
+ * @var number|null
65
+ */
66
+ public $plan_id;
67
+ /**
68
+ * @var number|null
69
+ */
70
+ public $license_id;
71
+ /**
72
+ * @var number|null
73
+ */
74
+ public $trial_plan_id;
75
+ /**
76
+ * @var string|null
77
+ */
78
+ public $trial_ends;
79
+ /**
80
+ * @since 1.0.9
81
+ *
82
+ * @var bool
83
+ */
84
+ public $is_premium = false;
85
+ /**
86
+ * @author Leo Fajardo (@leorw)
87
+ *
88
+ * @since 1.2.1.5
89
+ *
90
+ * @var bool
91
+ */
92
+ public $is_disconnected = false;
93
+ /**
94
+ * @since 2.0.0
95
+ *
96
+ * @var bool
97
+ */
98
+ public $is_active = true;
99
+ /**
100
+ * @since 2.0.0
101
+ *
102
+ * @var bool
103
+ */
104
+ public $is_uninstalled = false;
105
+ /**
106
+ * @author Edgar Melkonyan
107
+ *
108
+ * @since 2.4.2
109
+ *
110
+ * @var bool
111
+ */
112
+ public $is_beta;
113
+
114
+ /**
115
+ * @param stdClass|bool $site
116
+ */
117
+ function __construct( $site = false ) {
118
+ parent::__construct( $site );
119
+
120
+ if ( is_object( $site ) ) {
121
+ $this->plan_id = $site->plan_id;
122
+ }
123
+
124
+ if ( ! is_bool( $this->is_disconnected ) ) {
125
+ $this->is_disconnected = false;
126
+ }
127
+ }
128
+
129
+ static function get_type() {
130
+ return 'install';
131
+ }
132
+
133
+ /**
134
+ * @author Vova Feldman (@svovaf)
135
+ * @since 2.0.0
136
+ *
137
+ * @param string $url
138
+ *
139
+ * @return bool
140
+ */
141
+ static function is_localhost_by_address( $url ) {
142
+ if ( false !== strpos( $url, '127.0.0.1' ) ||
143
+ false !== strpos( $url, 'localhost' )
144
+ ) {
145
+ return true;
146
+ }
147
+
148
+ if ( ! fs_starts_with( $url, 'http' ) ) {
149
+ $url = 'http://' . $url;
150
+ }
151
+
152
+ $url_parts = parse_url( $url );
153
+
154
+ $subdomain = $url_parts['host'];
155
+
156
+ return (
157
+ // Starts with.
158
+ fs_starts_with( $subdomain, 'local.' ) ||
159
+ fs_starts_with( $subdomain, 'dev.' ) ||
160
+ fs_starts_with( $subdomain, 'test.' ) ||
161
+ fs_starts_with( $subdomain, 'stage.' ) ||
162
+ fs_starts_with( $subdomain, 'staging.' ) ||
163
+
164
+ // Ends with.
165
+ fs_ends_with( $subdomain, '.dev' ) ||
166
+ fs_ends_with( $subdomain, '.test' ) ||
167
+ fs_ends_with( $subdomain, '.staging' ) ||
168
+ fs_ends_with( $subdomain, '.local' ) ||
169
+ fs_ends_with( $subdomain, '.example' ) ||
170
+ fs_ends_with( $subdomain, '.invalid' ) ||
171
+ // GoDaddy test/dev.
172
+ fs_ends_with( $subdomain, '.myftpupload.com' ) ||
173
+ // ngrok tunneling.
174
+ fs_ends_with( $subdomain, '.ngrok.io' ) ||
175
+ // wpsandbox.
176
+ fs_ends_with( $subdomain, '.wpsandbox.pro' ) ||
177
+ // SiteGround staging.
178
+ fs_starts_with( $subdomain, 'staging' ) ||
179
+ // WPEngine staging.
180
+ fs_ends_with( $subdomain, '.staging.wpengine.com' ) ||
181
+ fs_ends_with( $subdomain, '.dev.wpengine.com' ) ||
182
+ fs_ends_with( $subdomain, '.wpengine.com' ) ||
183
+ // Pantheon
184
+ ( fs_ends_with( $subdomain, 'pantheonsite.io' ) &&
185
+ ( fs_starts_with( $subdomain, 'test-' ) || fs_starts_with( $subdomain, 'dev-' ) ) ) ||
186
+ // Cloudways
187
+ fs_ends_with( $subdomain, '.cloudwaysapps.com' ) ||
188
+ // Kinsta
189
+ ( fs_starts_with( $subdomain, 'staging-' ) && ( fs_ends_with( $subdomain, '.kinsta.com' ) || fs_ends_with( $subdomain, '.kinsta.cloud' ) ) ) ||
190
+ // DesktopServer
191
+ fs_ends_with( $subdomain, '.dev.cc' ) ||
192
+ // Pressable
193
+ fs_ends_with( $subdomain, '.mystagingwebsite.com' )
194
+ );
195
+ }
196
+
197
+ function is_localhost() {
198
+ return ( WP_FS__IS_LOCALHOST_FOR_SERVER || self::is_localhost_by_address( $this->url ) );
199
+ }
200
+
201
+ /**
202
+ * Check if site in trial.
203
+ *
204
+ * @author Vova Feldman (@svovaf)
205
+ * @since 1.0.9
206
+ *
207
+ * @return bool
208
+ */
209
+ function is_trial() {
210
+ return is_numeric( $this->trial_plan_id ) && ( strtotime( $this->trial_ends ) > WP_FS__SCRIPT_START_TIME );
211
+ }
212
+
213
+ /**
214
+ * Check if user already utilized the trial with the current install.
215
+ *
216
+ * @author Vova Feldman (@svovaf)
217
+ * @since 1.0.9
218
+ *
219
+ * @return bool
220
+ */
221
+ function is_trial_utilized() {
222
+ return is_numeric( $this->trial_plan_id );
223
+ }
224
+
225
+ /**
226
+ * @author Vova Feldman (@svovaf)
227
+ * @since 2.0.0
228
+ *
229
+ * @return bool
230
+ */
231
+ function is_tracking_allowed() {
232
+ return ( true !== $this->is_disconnected );
233
+ }
234
+
235
+ /**
236
+ * @author Vova Feldman (@svovaf)
237
+ * @since 2.0.0
238
+ *
239
+ * @return bool
240
+ */
241
+ function is_tracking_prohibited() {
242
+ return ! $this->is_tracking_allowed();
243
+ }
244
+
245
+ /**
246
+ * @author Edgar Melkonyan
247
+ *
248
+ * @return bool
249
+ */
250
+ function is_beta() {
251
+ return ( isset( $this->is_beta ) && true === $this->is_beta );
252
+ }
253
  }
freemius/includes/entities/class-fs-subscription.php CHANGED
@@ -1,147 +1,147 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.9
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Subscription extends FS_Entity {
14
-
15
- #region Properties
16
-
17
- /**
18
- * @var number
19
- */
20
- public $user_id;
21
- /**
22
- * @var number
23
- */
24
- public $install_id;
25
- /**
26
- * @var number
27
- */
28
- public $plan_id;
29
- /**
30
- * @var number
31
- */
32
- public $license_id;
33
- /**
34
- * @var float
35
- */
36
- public $total_gross;
37
- /**
38
- * @var float
39
- */
40
- public $amount_per_cycle;
41
- /**
42
- * @var int # of months
43
- */
44
- public $billing_cycle;
45
- /**
46
- * @var float
47
- */
48
- public $outstanding_balance;
49
- /**
50
- * @var int
51
- */
52
- public $failed_payments;
53
- /**
54
- * @var string
55
- */
56
- public $gateway;
57
- /**
58
- * @var string
59
- */
60
- public $external_id;
61
- /**
62
- * @var string|null
63
- */
64
- public $trial_ends;
65
- /**
66
- * @var string|null Datetime of the next payment, or null if cancelled.
67
- */
68
- public $next_payment;
69
- /**
70
- * @since 2.3.1
71
- *
72
- * @var string|null Datetime of the cancellation.
73
- */
74
- public $canceled_at;
75
- /**
76
- * @var string|null
77
- */
78
- public $vat_id;
79
- /**
80
- * @var string Two characters country code
81
- */
82
- public $country_code;
83
-
84
- #endregion Properties
85
-
86
- /**
87
- * @param object|bool $subscription
88
- */
89
- function __construct( $subscription = false ) {
90
- parent::__construct( $subscription );
91
- }
92
-
93
- static function get_type() {
94
- return 'subscription';
95
- }
96
-
97
- /**
98
- * Check if subscription is active.
99
- *
100
- * @author Vova Feldman (@svovaf)
101
- * @since 1.0.9
102
- *
103
- * @return bool
104
- */
105
- function is_active() {
106
- if ( $this->is_canceled() ) {
107
- return false;
108
- }
109
-
110
- return (
111
- ! empty( $this->next_payment ) &&
112
- strtotime( $this->next_payment ) > WP_FS__SCRIPT_START_TIME
113
- );
114
- }
115
-
116
- /**
117
- * @author Vova Feldman (@svovaf)
118
- * @since 2.3.1
119
- *
120
- * @return bool
121
- */
122
- function is_canceled() {
123
- return ! is_null( $this->canceled_at );
124
- }
125
-
126
- /**
127
- * Subscription considered to be new without any payments
128
- * if the next payment should be made within less than 24 hours
129
- * from the subscription creation.
130
- *
131
- * @author Vova Feldman (@svovaf)
132
- * @since 1.0.9
133
- *
134
- * @return bool
135
- */
136
- function is_first_payment_pending() {
137
- return ( WP_FS__TIME_24_HOURS_IN_SEC >= strtotime( $this->next_payment ) - strtotime( $this->created ) );
138
- }
139
-
140
- /**
141
- * @author Vova Feldman (@svovaf)
142
- * @since 1.1.7
143
- */
144
- function has_trial() {
145
- return ! is_null( $this->trial_ends );
146
- }
147
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.0.9
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Subscription extends FS_Entity {
14
+
15
+ #region Properties
16
+
17
+ /**
18
+ * @var number
19
+ */
20
+ public $user_id;
21
+ /**
22
+ * @var number
23
+ */
24
+ public $install_id;
25
+ /**
26
+ * @var number
27
+ */
28
+ public $plan_id;
29
+ /**
30
+ * @var number
31
+ */
32
+ public $license_id;
33
+ /**
34
+ * @var float
35
+ */
36
+ public $total_gross;
37
+ /**
38
+ * @var float
39
+ */
40
+ public $amount_per_cycle;
41
+ /**
42
+ * @var int # of months
43
+ */
44
+ public $billing_cycle;
45
+ /**
46
+ * @var float
47
+ */
48
+ public $outstanding_balance;
49
+ /**
50
+ * @var int
51
+ */
52
+ public $failed_payments;
53
+ /**
54
+ * @var string
55
+ */
56
+ public $gateway;
57
+ /**
58
+ * @var string
59
+ */
60
+ public $external_id;
61
+ /**
62
+ * @var string|null
63
+ */
64
+ public $trial_ends;
65
+ /**
66
+ * @var string|null Datetime of the next payment, or null if cancelled.
67
+ */
68
+ public $next_payment;
69
+ /**
70
+ * @since 2.3.1
71
+ *
72
+ * @var string|null Datetime of the cancellation.
73
+ */
74
+ public $canceled_at;
75
+ /**
76
+ * @var string|null
77
+ */
78
+ public $vat_id;
79
+ /**
80
+ * @var string Two characters country code
81
+ */
82
+ public $country_code;
83
+
84
+ #endregion Properties
85
+
86
+ /**
87
+ * @param object|bool $subscription
88
+ */
89
+ function __construct( $subscription = false ) {
90
+ parent::__construct( $subscription );
91
+ }
92
+
93
+ static function get_type() {
94
+ return 'subscription';
95
+ }
96
+
97
+ /**
98
+ * Check if subscription is active.
99
+ *
100
+ * @author Vova Feldman (@svovaf)
101
+ * @since 1.0.9
102
+ *
103
+ * @return bool
104
+ */
105
+ function is_active() {
106
+ if ( $this->is_canceled() ) {
107
+ return false;
108
+ }
109
+
110
+ return (
111
+ ! empty( $this->next_payment ) &&
112
+ strtotime( $this->next_payment ) > WP_FS__SCRIPT_START_TIME
113
+ );
114
+ }
115
+
116
+ /**
117
+ * @author Vova Feldman (@svovaf)
118
+ * @since 2.3.1
119
+ *
120
+ * @return bool
121
+ */
122
+ function is_canceled() {
123
+ return ! is_null( $this->canceled_at );
124
+ }
125
+
126
+ /**
127
+ * Subscription considered to be new without any payments
128
+ * if the next payment should be made within less than 24 hours
129
+ * from the subscription creation.
130
+ *
131
+ * @author Vova Feldman (@svovaf)
132
+ * @since 1.0.9
133
+ *
134
+ * @return bool
135
+ */
136
+ function is_first_payment_pending() {
137
+ return ( WP_FS__TIME_24_HOURS_IN_SEC >= strtotime( $this->next_payment ) - strtotime( $this->created ) );
138
+ }
139
+
140
+ /**
141
+ * @author Vova Feldman (@svovaf)
142
+ * @since 1.1.7
143
+ */
144
+ function has_trial() {
145
+ return ! is_null( $this->trial_ends );
146
+ }
147
  }
freemius/includes/entities/class-fs-user.php CHANGED
@@ -1,62 +1,62 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.3
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_User extends FS_Scope_Entity {
14
-
15
- #region Properties
16
-
17
- /**
18
- * @var string
19
- */
20
- public $email;
21
- /**
22
- * @var string
23
- */
24
- public $first;
25
- /**
26
- * @var string
27
- */
28
- public $last;
29
- /**
30
- * @var bool
31
- */
32
- public $is_verified;
33
- /**
34
- * @var string|null
35
- */
36
- public $customer_id;
37
- /**
38
- * @var float
39
- */
40
- public $gross;
41
-
42
- #endregion Properties
43
-
44
- /**
45
- * @param object|bool $user
46
- */
47
- function __construct( $user = false ) {
48
- parent::__construct( $user );
49
- }
50
-
51
- function get_name() {
52
- return trim( ucfirst( trim( is_string( $this->first ) ? $this->first : '' ) ) . ' ' . ucfirst( trim( is_string( $this->last ) ? $this->last : '' ) ) );
53
- }
54
-
55
- function is_verified() {
56
- return ( isset( $this->is_verified ) && true === $this->is_verified );
57
- }
58
-
59
- static function get_type() {
60
- return 'user';
61
- }
62
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.0.3
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_User extends FS_Scope_Entity {
14
+
15
+ #region Properties
16
+
17
+ /**
18
+ * @var string
19
+ */
20
+ public $email;
21
+ /**
22
+ * @var string
23
+ */
24
+ public $first;
25
+ /**
26
+ * @var string
27
+ */
28
+ public $last;
29
+ /**
30
+ * @var bool
31
+ */
32
+ public $is_verified;
33
+ /**
34
+ * @var string|null
35
+ */
36
+ public $customer_id;
37
+ /**
38
+ * @var float
39
+ */
40
+ public $gross;
41
+
42
+ #endregion Properties
43
+
44
+ /**
45
+ * @param object|bool $user
46
+ */
47
+ function __construct( $user = false ) {
48
+ parent::__construct( $user );
49
+ }
50
+
51
+ function get_name() {
52
+ return trim( ucfirst( trim( is_string( $this->first ) ? $this->first : '' ) ) . ' ' . ucfirst( trim( is_string( $this->last ) ? $this->last : '' ) ) );
53
+ }
54
+
55
+ function is_verified() {
56
+ return ( isset( $this->is_verified ) && true === $this->is_verified );
57
+ }
58
+
59
+ static function get_type() {
60
+ return 'user';
61
+ }
62
  }
freemius/includes/entities/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/includes/index.php CHANGED
@@ -1,3 +1,3 @@
1
- <?php
2
- // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
1
+ <?php
2
+ // Silence is golden.
3
  // Hide file structure from users on unprotected servers.
freemius/includes/l10n.php CHANGED
@@ -1,48 +1,48 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.2.1.6
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Retrieve the translation of $text.
15
- *
16
- * @since 1.2.1.6
17
- *
18
- * @param string $text
19
- *
20
- * @return string
21
- */
22
- function _fs_text( $text ) {
23
- // Avoid misleading Theme Check warning.
24
- $fn = 'translate';
25
- return $fn( $text, 'freemius' );
26
- }
27
-
28
- /**
29
- * Retrieve translated string with gettext context.
30
- *
31
- * Quite a few times, there will be collisions with similar translatable text
32
- * found in more than two places, but with different translated context.
33
- *
34
- * By including the context in the pot file, translators can translate the two
35
- * strings differently.
36
- *
37
- * @since 1.2.1.6
38
- *
39
- * @param string $text
40
- * @param string $context
41
- *
42
- * @return string
43
- */
44
- function _fs_x( $text, $context ) {
45
- // Avoid misleading Theme Check warning.
46
- $fn = 'translate_with_gettext_context';
47
- return $fn( $text, $context, 'freemius' );
48
- }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.2.1.6
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ /**
14
+ * Retrieve the translation of $text.
15
+ *
16
+ * @since 1.2.1.6
17
+ *
18
+ * @param string $text
19
+ *
20
+ * @return string
21
+ */
22
+ function _fs_text( $text ) {
23
+ // Avoid misleading Theme Check warning.
24
+ $fn = 'translate';
25
+ return $fn( $text, 'freemius' );
26
+ }
27
+
28
+ /**
29
+ * Retrieve translated string with gettext context.
30
+ *
31
+ * Quite a few times, there will be collisions with similar translatable text
32
+ * found in more than two places, but with different translated context.
33
+ *
34
+ * By including the context in the pot file, translators can translate the two
35
+ * strings differently.
36
+ *
37
+ * @since 1.2.1.6
38
+ *
39
+ * @param string $text
40
+ * @param string $context
41
+ *
42
+ * @return string
43
+ */
44
+ function _fs_x( $text, $context ) {
45
+ // Avoid misleading Theme Check warning.
46
+ $fn = 'translate_with_gettext_context';
47
+ return $fn( $text, $context, 'freemius' );
48
+ }
freemius/includes/managers/class-fs-admin-menu-manager.php CHANGED
@@ -1,1006 +1,1006 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.1.3
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Admin_Menu_Manager {
14
-
15
- #region Properties
16
-
17
- /**
18
- * @since 1.2.2
19
- *
20
- * @var string
21
- */
22
- protected $_module_unique_affix;
23
-
24
- /**
25
- * @since 1.2.2
26
- *
27
- * @var number
28
- */
29
- protected $_module_id;
30
-
31
- /**
32
- * @since 1.2.2
33
- *
34
- * @var string
35
- */
36
- protected $_module_type;
37
-
38
- /**
39
- * @since 1.0.6
40
- *
41
- * @var string
42
- */
43
- private $_menu_slug;
44
- /**
45
- * @since 1.1.3
46
- *
47
- * @var string
48
- */
49
- private $_parent_slug;
50
- /**
51
- * @since 1.1.3
52
- *
53
- * @var string
54
- */
55
- private $_parent_type;
56
- /**
57
- * @since 1.1.3
58
- *
59
- * @var string
60
- */
61
- private $_type;
62
- /**
63
- * @since 1.1.3
64
- *
65
- * @var bool
66
- */
67
- private $_is_top_level;
68
- /**
69
- * @since 1.1.3
70
- *
71
- * @var bool
72
- */
73
- private $_is_override_exact;
74
- /**
75
- * @since 1.1.3
76
- *
77
- * @var array<string,bool>
78
- */
79
- private $_default_submenu_items;
80
- /**
81
- * @since 1.1.3
82
- *
83
- * @var string
84
- */
85
- private $_first_time_path;
86
- /**
87
- * @since 1.2.2
88
- *
89
- * @var bool
90
- */
91
- private $_menu_exists;
92
- /**
93
- * @since 2.0.0
94
- *
95
- * @var bool
96
- */
97
- private $_network_menu_exists;
98
-
99
- #endregion Properties
100
-
101
- /**
102
- * @var FS_Logger
103
- */
104
- protected $_logger;
105
-
106
- #region Singleton
107
-
108
- /**
109
- * @var FS_Admin_Menu_Manager[]
110
- */
111
- private static $_instances = array();
112
-
113
- /**
114
- * @param number $module_id
115
- * @param string $module_type
116
- * @param string $module_unique_affix
117
- *
118
- * @return FS_Admin_Menu_Manager
119
- */
120
- static function instance( $module_id, $module_type, $module_unique_affix ) {
121
- $key = 'm_' . $module_id;
122
-
123
- if ( ! isset( self::$_instances[ $key ] ) ) {
124
- self::$_instances[ $key ] = new FS_Admin_Menu_Manager( $module_id, $module_type, $module_unique_affix );
125
- }
126
-
127
- return self::$_instances[ $key ];
128
- }
129
-
130
- protected function __construct( $module_id, $module_type, $module_unique_affix ) {
131
- $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $module_id . '_admin_menu', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
132
-
133
- $this->_module_id = $module_id;
134
- $this->_module_type = $module_type;
135
- $this->_module_unique_affix = $module_unique_affix;
136
- }
137
-
138
- #endregion Singleton
139
-
140
- #region Helpers
141
-
142
- private function get_option( &$options, $key, $default = false ) {
143
- return ! empty( $options[ $key ] ) ? $options[ $key ] : $default;
144
- }
145
-
146
- private function get_bool_option( &$options, $key, $default = false ) {
147
- return isset( $options[ $key ] ) && is_bool( $options[ $key ] ) ? $options[ $key ] : $default;
148
- }
149
-
150
- #endregion Helpers
151
-
152
- /**
153
- * @param array $menu
154
- * @param bool $is_addon
155
- */
156
- function init( $menu, $is_addon = false ) {
157
- $this->_menu_exists = ( isset( $menu['slug'] ) && ! empty( $menu['slug'] ) );
158
- $this->_network_menu_exists = ( ! empty( $menu['network'] ) && true === $menu['network'] );
159
-
160
- $this->_menu_slug = ( $this->_menu_exists ? $menu['slug'] : $this->_module_unique_affix );
161
-
162
- $this->_default_submenu_items = array();
163
- // @deprecated
164
- $this->_type = 'page';
165
- $this->_is_top_level = true;
166
- $this->_is_override_exact = false;
167
- $this->_parent_slug = false;
168
- // @deprecated
169
- $this->_parent_type = 'page';
170
-
171
- if ( isset( $menu ) ) {
172
- if ( ! $is_addon ) {
173
- $this->_default_submenu_items = array(
174
- 'contact' => $this->get_bool_option( $menu, 'contact', true ),
175
- 'support' => $this->get_bool_option( $menu, 'support', true ),
176
- 'affiliation' => $this->get_bool_option( $menu, 'affiliation', true ),
177
- 'account' => $this->get_bool_option( $menu, 'account', true ),
178
- 'pricing' => $this->get_bool_option( $menu, 'pricing', true ),
179
- 'addons' => $this->get_bool_option( $menu, 'addons', true ),
180
- );
181
-
182
- // @deprecated
183
- $this->_type = $this->get_option( $menu, 'type', 'page' );
184
- }
185
-
186
- $this->_is_override_exact = $this->get_bool_option( $menu, 'override_exact' );
187
-
188
- if ( isset( $menu['parent'] ) ) {
189
- $this->_parent_slug = $this->get_option( $menu['parent'], 'slug' );
190
- // @deprecated
191
- $this->_parent_type = $this->get_option( $menu['parent'], 'type', 'page' );
192
-
193
- // If parent's slug is different, then it's NOT a top level menu item.
194
- $this->_is_top_level = ( $this->_parent_slug === $this->_menu_slug );
195
- } else {
196
- /**
197
- * If no parent then top level if:
198
- * - Has custom admin menu ('page')
199
- * - CPT menu type ('cpt')
200
- */
201
- // $this->_is_top_level = in_array( $this->_type, array(
202
- // 'cpt',
203
- // 'page'
204
- // ) );
205
- }
206
-
207
- $first_path = $this->get_option( $menu, 'first-path', false );
208
-
209
- if ( ! empty( $first_path ) && is_string( $first_path ) ) {
210
- $this->_first_time_path = $first_path;
211
- }
212
- }
213
- }
214
-
215
- /**
216
- * Check if top level menu.
217
- *
218
- * @author Vova Feldman (@svovaf)
219
- * @since 1.1.3
220
- *
221
- * @return bool False if submenu item.
222
- */
223
- function is_top_level() {
224
- return $this->_is_top_level;
225
- }
226
-
227
- /**
228
- * Check if the page should be override on exact URL match.
229
- *
230
- * @author Vova Feldman (@svovaf)
231
- * @since 1.1.3
232
- *
233
- * @return bool False if submenu item.
234
- */
235
- function is_override_exact() {
236
- return $this->_is_override_exact;
237
- }
238
-
239
-
240
- /**
241
- * Get the path of the page the user should be forwarded to after first activation.
242
- *
243
- * @author Vova Feldman (@svovaf)
244
- * @since 1.1.3
245
- *
246
- * @param bool $is_network Since 2.4.5
247
- *
248
- * @return string
249
- */
250
- function get_first_time_path( $is_network = false ) {
251
- if ( empty ( $this->_first_time_path ) ) {
252
- return $this->_first_time_path;
253
- }
254
-
255
- if ( $is_network ) {
256
- return network_admin_url( $this->_first_time_path );
257
- } else {
258
- return admin_url( $this->_first_time_path );
259
- }
260
- }
261
-
262
- /**
263
- * Check if plugin's menu item is part of a custom top level menu.
264
- *
265
- * @author Vova Feldman (@svovaf)
266
- * @since 1.1.3
267
- *
268
- * @return bool
269
- */
270
- function has_custom_parent() {
271
- return ! $this->_is_top_level && is_string( $this->_parent_slug );
272
- }
273
-
274
- /**
275
- * @author Leo Fajardo (@leorw)
276
- * @since 1.2.2
277
- *
278
- * @return bool
279
- */
280
- function has_menu() {
281
- return $this->_menu_exists;
282
- }
283
-
284
- /**
285
- * @author Vova Feldman (@svovaf)
286
- * @since 2.0.0
287
- *
288
- * @return bool
289
- */
290
- function has_network_menu() {
291
- return $this->_network_menu_exists;
292
- }
293
-
294
- /**
295
- * @author Leo Fajardo (@leorw)
296
- *
297
- * @param string $menu_slug
298
- *
299
- * @since 2.1.3
300
- */
301
- function set_slug_and_network_menu_exists_flag($menu_slug ) {
302
- $this->_menu_slug = $menu_slug;
303
- $this->_network_menu_exists = false;
304
- }
305
-
306
- /**
307
- * @author Vova Feldman (@svovaf)
308
- * @since 1.1.3
309
- *
310
- * @param string $id
311
- * @param bool $default
312
- * @param bool $ignore_menu_existence Since 1.2.2.7 If true, check if the submenu item visible even if there's no parent menu.
313
- *
314
- * @return bool
315
- */
316
- function is_submenu_item_visible( $id, $default = true, $ignore_menu_existence = false ) {
317
- if ( ! $ignore_menu_existence && ! $this->has_menu() ) {
318
- return false;
319
- }
320
-
321
- return fs_apply_filter(
322
- $this->_module_unique_affix,
323
- 'is_submenu_visible',
324
- $this->get_bool_option( $this->_default_submenu_items, $id, $default ),
325
- $id
326
- );
327
- }
328
-
329
- /**
330
- * Calculates admin settings menu slug.
331
- * If plugin's menu slug is a file (e.g. CPT), uses plugin's slug as the menu slug.
332
- *
333
- * @author Vova Feldman (@svovaf)
334
- * @since 1.1.3
335
- *
336
- * @param string $page
337
- *
338
- * @return string
339
- */
340
- function get_slug( $page = '' ) {
341
- return ( ( false === strpos( $this->_menu_slug, '.php?' ) ) ?
342
- $this->_menu_slug :
343
- $this->_module_unique_affix ) . ( empty( $page ) ? '' : ( '-' . $page ) );
344
- }
345
-
346
- /**
347
- * @author Vova Feldman (@svovaf)
348
- * @since 1.1.3
349
- *
350
- * @return string
351
- */
352
- function get_parent_slug() {
353
- return $this->_parent_slug;
354
- }
355
-
356
- /**
357
- * @author Vova Feldman (@svovaf)
358
- * @since 1.1.3
359
- *
360
- * @return string
361
- */
362
- function get_type() {
363
- return $this->_type;
364
- }
365
-
366
- /**
367
- * @author Vova Feldman (@svovaf)
368
- * @since 1.1.3
369
- *
370
- * @return bool
371
- */
372
- function is_cpt() {
373
- return ( 0 === strpos( $this->_menu_slug, 'edit.php?post_type=' ) ||
374
- // Back compatibility.
375
- 'cpt' === $this->_type
376
- );
377
- }
378
-
379
- /**
380
- * @author Vova Feldman (@svovaf)
381
- * @since 1.1.3
382
- *
383
- * @return string
384
- */
385
- function get_parent_type() {
386
- return $this->_parent_type;
387
- }
388
-
389
- /**
390
- * @author Vova Feldman (@svovaf)
391
- * @since 1.1.3
392
- *
393
- * @return string
394
- */
395
- function get_raw_slug() {
396
- return $this->_menu_slug;
397
- }
398
-
399
- /**
400
- * Get plugin's original menu slug.
401
- *
402
- * @author Vova Feldman (@svovaf)
403
- * @since 1.1.3
404
- *
405
- * @return string
406
- */
407
- function get_original_menu_slug() {
408
- if ( 'cpt' === $this->_type ) {
409
- return add_query_arg( array(
410
- 'post_type' => $this->_menu_slug
411
- ), 'edit.php' );
412
- }
413
-
414
- if ( false === strpos( $this->_menu_slug, '.php?' ) ) {
415
- return $this->_menu_slug;
416
- } else {
417
- return $this->_module_unique_affix;
418
- }
419
- }
420
-
421
- /**
422
- * @author Vova Feldman (@svovaf)
423
- * @since 1.1.3
424
- *
425
- * @return string
426
- */
427
- function get_top_level_menu_slug() {
428
- return $this->has_custom_parent() ?
429
- $this->get_parent_slug() :
430
- $this->get_raw_slug();
431
- }
432
-
433
- /**
434
- * Is user on plugin's admin activation page.
435
- *
436
- * @author Vova Feldman (@svovaf)
437
- * @since 1.0.8
438
- *
439
- * @param bool $show_opt_in_on_themes_page Since 2.3.1
440
- *
441
- * @return bool
442
- *
443
- * @deprecated Please use is_activation_page() instead.
444
- */
445
- function is_main_settings_page( $show_opt_in_on_themes_page = false ) {
446
- return $this->is_activation_page( $show_opt_in_on_themes_page );
447
- }
448
-
449
- /**
450
- * Is user on product's admin activation page.
451
- *
452
- * @author Vova Feldman (@svovaf)
453
- * @since 2.3.1
454
- *
455
- * @param bool $show_opt_in_on_themes_page Since 2.3.1
456
- *
457
- * @return bool
458
- */
459
- function is_activation_page( $show_opt_in_on_themes_page = false ) {
460
- if ( $show_opt_in_on_themes_page ) {
461
- /**
462
- * In activation only when show_optin query string param is given.
463
- *
464
- * @since 1.2.2
465
- */
466
- return (
467
- ( WP_FS__MODULE_TYPE_THEME === $this->_module_type ) &&
468
- Freemius::is_themes_page() &&
469
- fs_request_get_bool( $this->_module_unique_affix . '_show_optin' )
470
- );
471
- }
472
-
473
- if ( $this->_menu_exists &&
474
- ( fs_is_plugin_page( $this->_menu_slug ) || fs_is_plugin_page( $this->_module_unique_affix ) )
475
- ) {
476
- /**
477
- * Module has a settings menu and the context page is the main settings page, so assume it's in
478
- * activation (doesn't really check if already opted-in/skipped or not).
479
- *
480
- * @since 1.2.2
481
- */
482
- return true;
483
- }
484
-
485
- return false;
486
- }
487
-
488
- #region Submenu Override
489
-
490
- /**
491
- * Override submenu's action.
492
- *
493
- * @author Vova Feldman (@svovaf)
494
- * @since 1.1.0
495
- *
496
- * @param string $parent_slug
497
- * @param string $menu_slug
498
- * @param callable $function
499
- *
500
- * @return false|string If submenu exist, will return the hook name.
501
- */
502
- function override_submenu_action( $parent_slug, $menu_slug, $function ) {
503
- global $submenu;
504
-
505
- $menu_slug = plugin_basename( $menu_slug );
506
- $parent_slug = plugin_basename( $parent_slug );
507
-
508
- if ( ! isset( $submenu[ $parent_slug ] ) ) {
509
- // Parent menu not exist.
510
- return false;
511
- }
512
-
513
- $found_submenu_item = false;
514
- foreach ( $submenu[ $parent_slug ] as $submenu_item ) {
515
- if ( $menu_slug === $submenu_item[2] ) {
516
- $found_submenu_item = $submenu_item;
517
- break;
518
- }
519
- }
520
-
521
- if ( false === $found_submenu_item ) {
522
- // Submenu item not found.
523
- return false;
524
- }
525
-
526
- // Remove current function.
527
- $hookname = get_plugin_page_hookname( $menu_slug, $parent_slug );
528
- remove_all_actions( $hookname );
529
-
530
- // Attach new action.
531
- add_action( $hookname, $function );
532
-
533
- return $hookname;
534
- }
535
-
536
- #endregion Submenu Override
537
-
538
- #region Top level menu Override
539
-
540
- /**
541
- * Find plugin's admin dashboard main menu item.
542
- *
543
- * @author Vova Feldman (@svovaf)
544
- * @since 1.0.2
545
- *
546
- * @return string[]|false
547
- */
548
- private function find_top_level_menu() {
549
- global $menu;
550
-
551
- $position = - 1;
552
- $found_menu = false;
553
-
554
- $menu_slug = $this->get_raw_slug();
555
-
556
- $hook_name = get_plugin_page_hookname( $menu_slug, '' );
557
- foreach ( $menu as $pos => $m ) {
558
- if ( $menu_slug === $m[2] ) {
559
- $position = $pos;
560
- $found_menu = $m;
561
- break;
562
- }
563
- }
564
-
565
- if ( false === $found_menu ) {
566
- return false;
567
- }
568
-
569
- return array(
570
- 'menu' => $found_menu,
571
- 'position' => $position,
572
- 'hook_name' => $hook_name
573
- );
574
- }
575
-
576
- /**
577
- * Find plugin's admin dashboard main submenu item.
578
- *
579
- * @author Vova Feldman (@svovaf)
580
- * @since 1.2.1.6
581
- *
582
- * @return array|false
583
- */
584
- private function find_main_submenu() {
585
- global $submenu;
586
-
587
- $top_level_menu_slug = $this->get_top_level_menu_slug();
588
-
589
- if ( ! isset( $submenu[ $top_level_menu_slug ] ) ) {
590
- return false;
591
- }
592
-
593
- $submenu_slug = $this->get_raw_slug();
594
-
595
- $position = - 1;
596
- $found_submenu = false;
597
-
598
- $hook_name = get_plugin_page_hookname( $submenu_slug, '' );
599
-
600
- foreach ( $submenu[ $top_level_menu_slug ] as $pos => $sub ) {
601
- if ( $submenu_slug === $sub[2] ) {
602
- $position = $pos;
603
- $found_submenu = $sub;
604
- }
605
- }
606
-
607
- if ( false === $found_submenu ) {
608
- return false;
609
- }
610
-
611
- return array(
612
- 'menu' => $found_submenu,
613
- 'parent_slug' => $top_level_menu_slug,
614
- 'position' => $position,
615
- 'hook_name' => $hook_name
616
- );
617
- }
618
-
619
- /**
620
- * Remove all sub-menu items.
621
- *
622
- * @author Vova Feldman (@svovaf)
623
- * @since 1.0.7
624
- *
625
- * @return bool If submenu with plugin's menu slug was found.
626
- */
627
- private function remove_all_submenu_items() {
628
- global $submenu;
629
-
630
- $menu_slug = $this->get_raw_slug();
631
-
632
- if ( ! isset( $submenu[ $menu_slug ] ) ) {
633
- return false;
634
- }
635
-
636
- /**
637
- * This method is NOT executed for WordPress.org themes.
638
- * Since we maintain only one version of the SDK we added this small
639
- * hack to avoid the error from Theme Check since it's a false-positive.
640
- *
641
- * @author Vova Feldman (@svovaf)
642
- * @since 1.2.2.7
643
- */
644
- $submenu_ref = &$submenu;
645
- $submenu_ref[ $menu_slug ] = array();
646
-
647
- return true;
648
- }
649
-
650
- /**
651
- *
652
- * @author Vova Feldman (@svovaf)
653
- * @since 1.0.9
654
- *
655
- * @param bool $remove_top_level_menu
656
- *
657
- * @return false|array[string]mixed
658
- */
659
- function remove_menu_item( $remove_top_level_menu = false ) {
660
- $this->_logger->entrance();
661
-
662
- // Find main menu item.
663
- $top_level_menu = $this->find_top_level_menu();
664
-
665
- if ( false === $top_level_menu ) {
666
- return false;
667
- }
668
-
669
- // Remove it with its actions.
670
- remove_all_actions( $top_level_menu['hook_name'] );
671
-
672
- // Remove all submenu items.
673
- $this->remove_all_submenu_items();
674
-
675
- if ( $remove_top_level_menu ) {
676
- global $menu;
677
- unset( $menu[ $top_level_menu['position'] ] );
678
- }
679
-
680
- return $top_level_menu;
681
- }
682
-
683
- /**
684
- * Get module's main admin setting page URL.
685
- *
686
- * @todo This method was only tested for wp.org compliant themes with a submenu item. Need to test for plugins with top level, submenu, and CPT top level, menu items.
687
- *
688
- * @author Vova Feldman (@svovaf)
689
- * @since 1.2.2.7
690
- *
691
- * @return string
692
- */
693
- function main_menu_url() {
694
- $this->_logger->entrance();
695
-
696
- if ( $this->_is_top_level ) {
697
- $menu = $this->find_top_level_menu();
698
- } else {
699
- $menu = $this->find_main_submenu();
700
- }
701
-
702
- $parent_slug = isset( $menu['parent_slug'] ) ?
703
- $menu['parent_slug'] :
704
- 'admin.php';
705
-
706
- return admin_url(
707
- $parent_slug .
708
- ( false === strpos( $parent_slug, '?' ) ? '?' : '&' ) .
709
- 'page=' .
710
- $menu['menu'][2]
711
- );
712
- }
713
-
714
- /**
715
- * @author Vova Feldman (@svovaf)
716
- * @since 1.1.4
717
- *
718
- * @param callable $function
719
- *
720
- * @return false|array[string]mixed
721
- */
722
- function override_menu_item( $function ) {
723
- $found_menu = $this->remove_menu_item();
724
-
725
- if ( false === $found_menu ) {
726
- return false;
727
- }
728
-
729
- if ( ! $this->is_top_level() || ! $this->is_cpt() ) {
730
- $menu_slug = plugin_basename( $this->get_slug() );
731
-
732
- $hookname = get_plugin_page_hookname( $menu_slug, '' );
733
-
734
- // Override menu action.
735
- add_action( $hookname, $function );
736
- } else {
737
- global $menu;
738
-
739
- // Remove original CPT menu.
740
- unset( $menu[ $found_menu['position'] ] );
741
-
742
- // Create new top-level menu action.
743
- $hookname = self::add_page(
744
- $found_menu['menu'][3],
745
- $found_menu['menu'][0],
746
- 'manage_options',
747
- $this->get_slug(),
748
- $function,
749
- $found_menu['menu'][6],
750
- $found_menu['position']
751
- );
752
- }
753
-
754
- return $hookname;
755
- }
756
-
757
- /**
758
- * Adds a counter to the module's top level menu item.
759
- *
760
- * @author Vova Feldman (@svovaf)
761
- * @since 1.2.1.5
762
- *
763
- * @param int $counter
764
- * @param string $class
765
- */
766
- function add_counter_to_menu_item( $counter = 1, $class = '' ) {
767
- global $menu, $submenu;
768
-
769
- $mask = '%s <span class="update-plugins %s count-%3$s" aria-hidden="true"><span>%3$s<span class="screen-reader-text">%3$s notifications</span></span></span>';
770
-
771
- /**
772
- * This method is NOT executed for WordPress.org themes.
773
- * Since we maintain only one version of the SDK we added this small
774
- * hack to avoid the error from Theme Check since it's a false-positive.
775
- *
776
- * @author Vova Feldman (@svovaf)
777
- * @since 1.2.2.7
778
- */
779
- $menu_ref = &$menu;
780
- $submenu_ref = &$submenu;
781
-
782
- if ( $this->_is_top_level ) {
783
- // Find main menu item.
784
- $found_menu = $this->find_top_level_menu();
785
-
786
- if ( false !== $found_menu ) {
787
- // Override menu label.
788
- $menu_ref[ $found_menu['position'] ][0] = sprintf(
789
- $mask,
790
- $found_menu['menu'][0],
791
- $class,
792
- $counter
793
- );
794
- }
795
- } else {
796
- $found_submenu = $this->find_main_submenu();
797
-
798
- if ( false !== $found_submenu ) {
799
- // Override menu label.
800
- $submenu_ref[ $found_submenu['parent_slug'] ][ $found_submenu['position'] ][0] = sprintf(
801
- $mask,
802
- $found_submenu['menu'][0],
803
- $class,
804
- $counter
805
- );
806
- }
807
- }
808
- }
809
-
810
- #endregion Top level menu Override
811
-
812
- /**
813
- * Add a top-level menu page.
814
- *
815
- * Note for WordPress.org Theme/Plugin reviewer:
816
- *
817
- * This is a replication of `add_menu_page()` to avoid Theme Check warning.
818
- *
819
- * Why?
820
- * ====
821
- * Freemius is an SDK for plugin and theme developers. Since the core
822
- * of the SDK is relevant both for plugins and themes, for obvious reasons,
823
- * we only develop and maintain one code base.
824
- *
825
- * This method will not run for wp.org themes (only plugins) since theme
826
- * admin settings/options are now only allowed in the customizer.
827
- *
828
- * If you have any questions or need clarifications, please don't hesitate
829
- * pinging me on slack, my username is @svovaf.
830
- *
831
- * @author Vova Feldman (@svovaf)
832
- * @since 1.2.2
833
- *
834
- * @param string $page_title The text to be displayed in the title tags of the page when the menu is
835
- * selected.
836
- * @param string $menu_title The text to be used for the menu.
837
- * @param string $capability The capability required for this menu to be displayed to the user.
838
- * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
839
- * @param callable|string $function The function to be called to output the content for this page.
840
- * @param string $icon_url The URL to the icon to be used for this menu.
841
- * * Pass a base64-encoded SVG using a data URI, which will be colored to
842
- * match the color scheme. This should begin with
843
- * 'data:image/svg+xml;base64,'.
844
- * * Pass the name of a Dashicons helper class to use a font icon,
845
- * e.g. 'dashicons-chart-pie'.
846
- * * Pass 'none' to leave div.wp-menu-image empty so an icon can be added
847
- * via CSS.
848
- * @param int $position The position in the menu order this one should appear.
849
- *
850
- * @return string The resulting page's hook_suffix.
851
- */
852
- static function add_page(
853
- $page_title,
854
- $menu_title,
855
- $capability,
856
- $menu_slug,
857
- $function = '',
858
- $icon_url = '',
859
- $position = null
860
- ) {
861
- $fn = 'add_menu' . '_page';
862
-
863
- return $fn(
864
- $page_title,
865
- $menu_title,
866
- $capability,
867
- $menu_slug,
868
- $function,
869
- $icon_url,
870
- $position
871
- );
872
- }
873
-
874
- /**
875
- * Add page and update menu instance settings.
876
- *
877
- * @author Vova Feldman (@svovaf)
878
- * @since 2.0.0
879
- *
880
- * @param string $page_title
881
- * @param string $menu_title
882
- * @param string $capability
883
- * @param string $menu_slug
884
- * @param callable|string $function
885
- * @param string $icon_url
886
- * @param int|null $position
887
- *
888
- * @return string
889
- */
890
- function add_page_and_update(
891
- $page_title,
892
- $menu_title,
893
- $capability,
894
- $menu_slug,
895
- $function = '',
896
- $icon_url = '',
897
- $position = null
898
- ) {
899
- $this->_menu_slug = $menu_slug;
900
- $this->_is_top_level = true;
901
- $this->_menu_exists = true;
902
- $this->_network_menu_exists = true;
903
-
904
- return self::add_page(
905
- $page_title,
906
- $menu_title,
907
- $capability,
908
- $menu_slug,
909
- $function,
910
- $icon_url,
911
- $position
912
- );
913
- }
914
-
915
- /**
916
- * Add a submenu page.
917
- *
918
- * Note for WordPress.org Theme/Plugin reviewer:
919
- *
920
- * This is a replication of `add_submenu_page()` to avoid Theme Check warning.
921
- *
922
- * Why?
923
- * ====
924
- * Freemius is an SDK for plugin and theme developers. Since the core
925
- * of the SDK is relevant both for plugins and themes, for obvious reasons,
926
- * we only develop and maintain one code base.
927
- *
928
- * This method will not run for wp.org themes (only plugins) since theme
929
- * admin settings/options are now only allowed in the customizer.
930
- *
931
- * If you have any questions or need clarifications, please don't hesitate
932
- * pinging me on slack, my username is @svovaf.
933
- *
934
- * @author Vova Feldman (@svovaf)
935
- * @since 1.2.2
936
- *
937
- * @param string $parent_slug The slug name for the parent menu (or the file name of a standard
938
- * WordPress admin page).
939
- * @param string $page_title The text to be displayed in the title tags of the page when the menu is
940
- * selected.
941
- * @param string $menu_title The text to be used for the menu.
942
- * @param string $capability The capability required for this menu to be displayed to the user.
943
- * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
944
- * @param callable|string $function The function to be called to output the content for this page.
945
- *
946
- * @return false|string The resulting page's hook_suffix, or false if the user does not have the capability
947
- * required.
948
- */
949
- static function add_subpage(
950
- $parent_slug,
951
- $page_title,
952
- $menu_title,
953
- $capability,
954
- $menu_slug,
955
- $function = ''
956
- ) {
957
- $fn = 'add_submenu' . '_page';
958
-
959
- return $fn( $parent_slug,
960
- $page_title,
961
- $menu_title,
962
- $capability,
963
- $menu_slug,
964
- $function
965
- );
966
- }
967
-
968
- /**
969
- * Add sub page and update menu instance settings.
970
- *
971
- * @author Vova Feldman (@svovaf)
972
- * @since 2.0.0
973
- *
974
- * @param string $parent_slug
975
- * @param string $page_title
976
- * @param string $menu_title
977
- * @param string $capability
978
- * @param string $menu_slug
979
- * @param callable|string $function
980
- *
981
- * @return string
982
- */
983
- function add_subpage_and_update(
984
- $parent_slug,
985
- $page_title,
986
- $menu_title,
987
- $capability,
988
- $menu_slug,
989
- $function = ''
990
- ) {
991
- $this->_menu_slug = $menu_slug;
992
- $this->_parent_slug = $parent_slug;
993
- $this->_is_top_level = false;
994
- $this->_menu_exists = true;
995
- $this->_network_menu_exists = true;
996
-
997
- return self::add_subpage(
998
- $parent_slug,
999
- $page_title,
1000
- $menu_title,
1001
- $capability,
1002
- $menu_slug,
1003
- $function
1004
- );
1005
- }
1006
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.1.3
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Admin_Menu_Manager {
14
+
15
+ #region Properties
16
+
17
+ /**
18
+ * @since 1.2.2
19
+ *
20
+ * @var string
21
+ */
22
+ protected $_module_unique_affix;
23
+
24
+ /**
25
+ * @since 1.2.2
26
+ *
27
+ * @var number
28
+ */
29
+ protected $_module_id;
30
+
31
+ /**
32
+ * @since 1.2.2
33
+ *
34
+ * @var string
35
+ */
36
+ protected $_module_type;
37
+
38
+ /**
39
+ * @since 1.0.6
40
+ *
41
+ * @var string
42
+ */
43
+ private $_menu_slug;
44
+ /**
45
+ * @since 1.1.3
46
+ *
47
+ * @var string
48
+ */
49
+ private $_parent_slug;
50
+ /**
51
+ * @since 1.1.3
52
+ *
53
+ * @var string
54
+ */
55
+ private $_parent_type;
56
+ /**
57
+ * @since 1.1.3
58
+ *
59
+ * @var string
60
+ */
61
+ private $_type;
62
+ /**
63
+ * @since 1.1.3
64
+ *
65
+ * @var bool
66
+ */
67
+ private $_is_top_level;
68
+ /**
69
+ * @since 1.1.3
70
+ *
71
+ * @var bool
72
+ */
73
+ private $_is_override_exact;
74
+ /**
75
+ * @since 1.1.3
76
+ *
77
+ * @var array<string,bool>
78
+ */
79
+ private $_default_submenu_items;
80
+ /**
81
+ * @since 1.1.3
82
+ *
83
+ * @var string
84
+ */
85
+ private $_first_time_path;
86
+ /**
87
+ * @since 1.2.2
88
+ *
89
+ * @var bool
90
+ */
91
+ private $_menu_exists;
92
+ /**
93
+ * @since 2.0.0
94
+ *
95
+ * @var bool
96
+ */
97
+ private $_network_menu_exists;
98
+
99
+ #endregion Properties
100
+
101
+ /**
102
+ * @var FS_Logger
103
+ */
104
+ protected $_logger;
105
+
106
+ #region Singleton
107
+
108
+ /**
109
+ * @var FS_Admin_Menu_Manager[]
110
+ */
111
+ private static $_instances = array();
112
+
113
+ /**
114
+ * @param number $module_id
115
+ * @param string $module_type
116
+ * @param string $module_unique_affix
117
+ *
118
+ * @return FS_Admin_Menu_Manager
119
+ */
120
+ static function instance( $module_id, $module_type, $module_unique_affix ) {
121
+ $key = 'm_' . $module_id;
122
+
123
+ if ( ! isset( self::$_instances[ $key ] ) ) {
124
+ self::$_instances[ $key ] = new FS_Admin_Menu_Manager( $module_id, $module_type, $module_unique_affix );
125
+ }
126
+
127
+ return self::$_instances[ $key ];
128
+ }
129
+
130
+ protected function __construct( $module_id, $module_type, $module_unique_affix ) {
131
+ $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $module_id . '_admin_menu', WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
132
+
133
+ $this->_module_id = $module_id;
134
+ $this->_module_type = $module_type;
135
+ $this->_module_unique_affix = $module_unique_affix;
136
+ }
137
+
138
+ #endregion Singleton
139
+
140
+ #region Helpers
141
+
142
+ private function get_option( &$options, $key, $default = false ) {
143
+ return ! empty( $options[ $key ] ) ? $options[ $key ] : $default;
144
+ }
145
+
146
+ private function get_bool_option( &$options, $key, $default = false ) {
147
+ return isset( $options[ $key ] ) && is_bool( $options[ $key ] ) ? $options[ $key ] : $default;
148
+ }
149
+
150
+ #endregion Helpers
151
+
152
+ /**
153
+ * @param array $menu
154
+ * @param bool $is_addon
155
+ */
156
+ function init( $menu, $is_addon = false ) {
157
+ $this->_menu_exists = ( isset( $menu['slug'] ) && ! empty( $menu['slug'] ) );
158
+ $this->_network_menu_exists = ( ! empty( $menu['network'] ) && true === $menu['network'] );
159
+
160
+ $this->_menu_slug = ( $this->_menu_exists ? $menu['slug'] : $this->_module_unique_affix );
161
+
162
+ $this->_default_submenu_items = array();
163
+ // @deprecated
164
+ $this->_type = 'page';
165
+ $this->_is_top_level = true;
166
+ $this->_is_override_exact = false;
167
+ $this->_parent_slug = false;
168
+ // @deprecated
169
+ $this->_parent_type = 'page';
170
+
171
+ if ( isset( $menu ) ) {
172
+ if ( ! $is_addon ) {
173
+ $this->_default_submenu_items = array(
174
+ 'contact' => $this->get_bool_option( $menu, 'contact', true ),
175
+ 'support' => $this->get_bool_option( $menu, 'support', true ),
176
+ 'affiliation' => $this->get_bool_option( $menu, 'affiliation', true ),
177
+ 'account' => $this->get_bool_option( $menu, 'account', true ),
178
+ 'pricing' => $this->get_bool_option( $menu, 'pricing', true ),
179
+ 'addons' => $this->get_bool_option( $menu, 'addons', true ),
180
+ );
181
+
182
+ // @deprecated
183
+ $this->_type = $this->get_option( $menu, 'type', 'page' );
184
+ }
185
+
186
+ $this->_is_override_exact = $this->get_bool_option( $menu, 'override_exact' );
187
+
188
+ if ( isset( $menu['parent'] ) ) {
189
+ $this->_parent_slug = $this->get_option( $menu['parent'], 'slug' );
190
+ // @deprecated
191
+ $this->_parent_type = $this->get_option( $menu['parent'], 'type', 'page' );
192
+
193
+ // If parent's slug is different, then it's NOT a top level menu item.
194
+ $this->_is_top_level = ( $this->_parent_slug === $this->_menu_slug );
195
+ } else {
196
+ /**
197
+ * If no parent then top level if:
198
+ * - Has custom admin menu ('page')
199
+ * - CPT menu type ('cpt')
200
+ */
201
+ // $this->_is_top_level = in_array( $this->_type, array(
202
+ // 'cpt',
203
+ // 'page'
204
+ // ) );
205
+ }
206
+
207
+ $first_path = $this->get_option( $menu, 'first-path', false );
208
+
209
+ if ( ! empty( $first_path ) && is_string( $first_path ) ) {
210
+ $this->_first_time_path = $first_path;
211
+ }
212
+ }
213
+ }
214
+
215
+ /**
216
+ * Check if top level menu.
217
+ *
218
+ * @author Vova Feldman (@svovaf)
219
+ * @since 1.1.3
220
+ *
221
+ * @return bool False if submenu item.
222
+ */
223
+ function is_top_level() {
224
+ return $this->_is_top_level;
225
+ }
226
+
227
+ /**
228
+ * Check if the page should be override on exact URL match.
229
+ *
230
+ * @author Vova Feldman (@svovaf)
231
+ * @since 1.1.3
232
+ *
233
+ * @return bool False if submenu item.
234
+ */
235
+ function is_override_exact() {
236
+ return $this->_is_override_exact;
237
+ }
238
+
239
+
240
+ /**
241
+ * Get the path of the page the user should be forwarded to after first activation.
242
+ *
243
+ * @author Vova Feldman (@svovaf)
244
+ * @since 1.1.3
245
+ *
246
+ * @param bool $is_network Since 2.4.5
247
+ *
248
+ * @return string
249
+ */
250
+ function get_first_time_path( $is_network = false ) {
251
+ if ( empty ( $this->_first_time_path ) ) {
252
+ return $this->_first_time_path;
253
+ }
254
+
255
+ if ( $is_network ) {
256
+ return network_admin_url( $this->_first_time_path );
257
+ } else {
258
+ return admin_url( $this->_first_time_path );
259
+ }
260
+ }
261
+
262
+ /**
263
+ * Check if plugin's menu item is part of a custom top level menu.
264
+ *
265
+ * @author Vova Feldman (@svovaf)
266
+ * @since 1.1.3
267
+ *
268
+ * @return bool
269
+ */
270
+ function has_custom_parent() {
271
+ return ! $this->_is_top_level && is_string( $this->_parent_slug );
272
+ }
273
+
274
+ /**
275
+ * @author Leo Fajardo (@leorw)
276
+ * @since 1.2.2
277
+ *
278
+ * @return bool
279
+ */
280
+ function has_menu() {
281
+ return $this->_menu_exists;
282
+ }
283
+
284
+ /**
285
+ * @author Vova Feldman (@svovaf)
286
+ * @since 2.0.0
287
+ *
288
+ * @return bool
289
+ */
290
+ function has_network_menu() {
291
+ return $this->_network_menu_exists;
292
+ }
293
+
294
+ /**
295
+ * @author Leo Fajardo (@leorw)
296
+ *
297
+ * @param string $menu_slug
298
+ *
299
+ * @since 2.1.3
300
+ */
301
+ function set_slug_and_network_menu_exists_flag($menu_slug ) {
302
+ $this->_menu_slug = $menu_slug;
303
+ $this->_network_menu_exists = false;
304
+ }
305
+
306
+ /**
307
+ * @author Vova Feldman (@svovaf)
308
+ * @since 1.1.3
309
+ *
310
+ * @param string $id
311
+ * @param bool $default
312
+ * @param bool $ignore_menu_existence Since 1.2.2.7 If true, check if the submenu item visible even if there's no parent menu.
313
+ *
314
+ * @return bool
315
+ */
316
+ function is_submenu_item_visible( $id, $default = true, $ignore_menu_existence = false ) {
317
+ if ( ! $ignore_menu_existence && ! $this->has_menu() ) {
318
+ return false;
319
+ }
320
+
321
+ return fs_apply_filter(
322
+ $this->_module_unique_affix,
323
+ 'is_submenu_visible',
324
+ $this->get_bool_option( $this->_default_submenu_items, $id, $default ),
325
+ $id
326
+ );
327
+ }
328
+
329
+ /**
330
+ * Calculates admin settings menu slug.
331
+ * If plugin's menu slug is a file (e.g. CPT), uses plugin's slug as the menu slug.
332
+ *
333
+ * @author Vova Feldman (@svovaf)
334
+ * @since 1.1.3
335
+ *
336
+ * @param string $page
337
+ *
338
+ * @return string
339
+ */
340
+ function get_slug( $page = '' ) {
341
+ return ( ( false === strpos( $this->_menu_slug, '.php?' ) ) ?
342
+ $this->_menu_slug :
343
+ $this->_module_unique_affix ) . ( empty( $page ) ? '' : ( '-' . $page ) );
344
+ }
345
+
346
+ /**
347
+ * @author Vova Feldman (@svovaf)
348
+ * @since 1.1.3
349
+ *
350
+ * @return string
351
+ */
352
+ function get_parent_slug() {
353
+ return $this->_parent_slug;
354
+ }
355
+
356
+ /**
357
+ * @author Vova Feldman (@svovaf)
358
+ * @since 1.1.3
359
+ *
360
+ * @return string
361
+ */
362
+ function get_type() {
363
+ return $this->_type;
364
+ }
365
+
366
+ /**
367
+ * @author Vova Feldman (@svovaf)
368
+ * @since 1.1.3
369
+ *
370
+ * @return bool
371
+ */
372
+ function is_cpt() {
373
+ return ( 0 === strpos( $this->_menu_slug, 'edit.php?post_type=' ) ||
374
+ // Back compatibility.
375
+ 'cpt' === $this->_type
376
+ );
377
+ }
378
+
379
+ /**
380
+ * @author Vova Feldman (@svovaf)
381
+ * @since 1.1.3
382
+ *
383
+ * @return string
384
+ */
385
+ function get_parent_type() {
386
+ return $this->_parent_type;
387
+ }
388
+
389
+ /**
390
+ * @author Vova Feldman (@svovaf)
391
+ * @since 1.1.3
392
+ *
393
+ * @return string
394
+ */
395
+ function get_raw_slug() {
396
+ return $this->_menu_slug;
397
+ }
398
+
399
+ /**
400
+ * Get plugin's original menu slug.
401
+ *
402
+ * @author Vova Feldman (@svovaf)
403
+ * @since 1.1.3
404
+ *
405
+ * @return string
406
+ */
407
+ function get_original_menu_slug() {
408
+ if ( 'cpt' === $this->_type ) {
409
+ return add_query_arg( array(
410
+ 'post_type' => $this->_menu_slug
411
+ ), 'edit.php' );
412
+ }
413
+
414
+ if ( false === strpos( $this->_menu_slug, '.php?' ) ) {
415
+ return $this->_menu_slug;
416
+ } else {
417
+ return $this->_module_unique_affix;
418
+ }
419
+ }
420
+
421
+ /**
422
+ * @author Vova Feldman (@svovaf)
423
+ * @since 1.1.3
424
+ *
425
+ * @return string
426
+ */
427
+ function get_top_level_menu_slug() {
428
+ return $this->has_custom_parent() ?
429
+ $this->get_parent_slug() :
430
+ $this->get_raw_slug();
431
+ }
432
+
433
+ /**
434
+ * Is user on plugin's admin activation page.
435
+ *
436
+ * @author Vova Feldman (@svovaf)
437
+ * @since 1.0.8
438
+ *
439
+ * @param bool $show_opt_in_on_themes_page Since 2.3.1
440
+ *
441
+ * @return bool
442
+ *
443
+ * @deprecated Please use is_activation_page() instead.
444
+ */
445
+ function is_main_settings_page( $show_opt_in_on_themes_page = false ) {
446
+ return $this->is_activation_page( $show_opt_in_on_themes_page );
447
+ }
448
+
449
+ /**
450
+ * Is user on product's admin activation page.
451
+ *
452
+ * @author Vova Feldman (@svovaf)
453
+ * @since 2.3.1
454
+ *
455
+ * @param bool $show_opt_in_on_themes_page Since 2.3.1
456
+ *
457
+ * @return bool
458
+ */
459
+ function is_activation_page( $show_opt_in_on_themes_page = false ) {
460
+ if ( $show_opt_in_on_themes_page ) {
461
+ /**
462
+ * In activation only when show_optin query string param is given.
463
+ *
464
+ * @since 1.2.2
465
+ */
466
+ return (
467
+ ( WP_FS__MODULE_TYPE_THEME === $this->_module_type ) &&
468
+ Freemius::is_themes_page() &&
469
+ fs_request_get_bool( $this->_module_unique_affix . '_show_optin' )
470
+ );
471
+ }
472
+
473
+ if ( $this->_menu_exists &&
474
+ ( fs_is_plugin_page( $this->_menu_slug ) || fs_is_plugin_page( $this->_module_unique_affix ) )
475
+ ) {
476
+ /**
477
+ * Module has a settings menu and the context page is the main settings page, so assume it's in
478
+ * activation (doesn't really check if already opted-in/skipped or not).
479
+ *
480
+ * @since 1.2.2
481
+ */
482
+ return true;
483
+ }
484
+
485
+ return false;
486
+ }
487
+
488
+ #region Submenu Override
489
+
490
+ /**
491
+ * Override submenu's action.
492
+ *
493
+ * @author Vova Feldman (@svovaf)
494
+ * @since 1.1.0
495
+ *
496
+ * @param string $parent_slug
497
+ * @param string $menu_slug
498
+ * @param callable $function
499
+ *
500
+ * @return false|string If submenu exist, will return the hook name.
501
+ */
502
+ function override_submenu_action( $parent_slug, $menu_slug, $function ) {
503
+ global $submenu;
504
+
505
+ $menu_slug = plugin_basename( $menu_slug );
506
+ $parent_slug = plugin_basename( $parent_slug );
507
+
508
+ if ( ! isset( $submenu[ $parent_slug ] ) ) {
509
+ // Parent menu not exist.
510
+ return false;
511
+ }
512
+
513
+ $found_submenu_item = false;
514
+ foreach ( $submenu[ $parent_slug ] as $submenu_item ) {
515
+ if ( $menu_slug === $submenu_item[2] ) {
516
+ $found_submenu_item = $submenu_item;
517
+ break;
518
+ }
519
+ }
520
+
521
+ if ( false === $found_submenu_item ) {
522
+ // Submenu item not found.
523
+ return false;
524
+ }
525
+
526
+ // Remove current function.
527
+ $hookname = get_plugin_page_hookname( $menu_slug, $parent_slug );
528
+ remove_all_actions( $hookname );
529
+
530
+ // Attach new action.
531
+ add_action( $hookname, $function );
532
+
533
+ return $hookname;
534
+ }
535
+
536
+ #endregion Submenu Override
537
+
538
+ #region Top level menu Override
539
+
540
+ /**
541
+ * Find plugin's admin dashboard main menu item.
542
+ *
543
+ * @author Vova Feldman (@svovaf)
544
+ * @since 1.0.2
545
+ *
546
+ * @return string[]|false
547
+ */
548
+ private function find_top_level_menu() {
549
+ global $menu;
550
+
551
+ $position = - 1;
552
+ $found_menu = false;
553
+
554
+ $menu_slug = $this->get_raw_slug();
555
+
556
+ $hook_name = get_plugin_page_hookname( $menu_slug, '' );
557
+ foreach ( $menu as $pos => $m ) {
558
+ if ( $menu_slug === $m[2] ) {
559
+ $position = $pos;
560
+ $found_menu = $m;
561
+ break;
562
+ }
563
+ }
564
+
565
+ if ( false === $found_menu ) {
566
+ return false;
567
+ }
568
+
569
+ return array(
570
+ 'menu' => $found_menu,
571
+ 'position' => $position,
572
+ 'hook_name' => $hook_name
573
+ );
574
+ }
575
+
576
+ /**
577
+ * Find plugin's admin dashboard main submenu item.
578
+ *
579
+ * @author Vova Feldman (@svovaf)
580
+ * @since 1.2.1.6
581
+ *
582
+ * @return array|false
583
+ */
584
+ private function find_main_submenu() {
585
+ global $submenu;
586
+
587
+ $top_level_menu_slug = $this->get_top_level_menu_slug();
588
+
589
+ if ( ! isset( $submenu[ $top_level_menu_slug ] ) ) {
590
+ return false;
591
+ }
592
+
593
+ $submenu_slug = $this->get_raw_slug();
594
+
595
+ $position = - 1;
596
+ $found_submenu = false;
597
+
598
+ $hook_name = get_plugin_page_hookname( $submenu_slug, '' );
599
+
600
+ foreach ( $submenu[ $top_level_menu_slug ] as $pos => $sub ) {
601
+ if ( $submenu_slug === $sub[2] ) {
602
+ $position = $pos;
603
+ $found_submenu = $sub;
604
+ }
605
+ }
606
+
607
+ if ( false === $found_submenu ) {
608
+ return false;
609
+ }
610
+
611
+ return array(
612
+ 'menu' => $found_submenu,
613
+ 'parent_slug' => $top_level_menu_slug,
614
+ 'position' => $position,
615
+ 'hook_name' => $hook_name
616
+ );
617
+ }
618
+
619
+ /**
620
+ * Remove all sub-menu items.
621
+ *
622
+ * @author Vova Feldman (@svovaf)
623
+ * @since 1.0.7
624
+ *
625
+ * @return bool If submenu with plugin's menu slug was found.
626
+ */
627
+ private function remove_all_submenu_items() {
628
+ global $submenu;
629
+
630
+ $menu_slug = $this->get_raw_slug();
631
+
632
+ if ( ! isset( $submenu[ $menu_slug ] ) ) {
633
+ return false;
634
+ }
635
+
636
+ /**
637
+ * This method is NOT executed for WordPress.org themes.
638
+ * Since we maintain only one version of the SDK we added this small
639
+ * hack to avoid the error from Theme Check since it's a false-positive.
640
+ *
641
+ * @author Vova Feldman (@svovaf)
642
+ * @since 1.2.2.7
643
+ */
644
+ $submenu_ref = &$submenu;
645
+ $submenu_ref[ $menu_slug ] = array();
646
+
647
+ return true;
648
+ }
649
+
650
+ /**
651
+ *
652
+ * @author Vova Feldman (@svovaf)
653
+ * @since 1.0.9
654
+ *
655
+ * @param bool $remove_top_level_menu
656
+ *
657
+ * @return false|array[string]mixed
658
+ */
659
+ function remove_menu_item( $remove_top_level_menu = false ) {
660
+ $this->_logger->entrance();
661
+
662
+ // Find main menu item.
663
+ $top_level_menu = $this->find_top_level_menu();
664
+
665
+ if ( false === $top_level_menu ) {
666
+ return false;
667
+ }
668
+
669
+ // Remove it with its actions.
670
+ remove_all_actions( $top_level_menu['hook_name'] );
671
+
672
+ // Remove all submenu items.
673
+ $this->remove_all_submenu_items();
674
+
675
+ if ( $remove_top_level_menu ) {
676
+ global $menu;
677
+ unset( $menu[ $top_level_menu['position'] ] );
678
+ }
679
+
680
+ return $top_level_menu;
681
+ }
682
+
683
+ /**
684
+ * Get module's main admin setting page URL.
685
+ *
686
+ * @todo This method was only tested for wp.org compliant themes with a submenu item. Need to test for plugins with top level, submenu, and CPT top level, menu items.
687
+ *
688
+ * @author Vova Feldman (@svovaf)
689
+ * @since 1.2.2.7
690
+ *
691
+ * @return string
692
+ */
693
+ function main_menu_url() {
694
+ $this->_logger->entrance();
695
+
696
+ if ( $this->_is_top_level ) {
697
+ $menu = $this->find_top_level_menu();
698
+ } else {
699
+ $menu = $this->find_main_submenu();
700
+ }
701
+
702
+ $parent_slug = isset( $menu['parent_slug'] ) ?
703
+ $menu['parent_slug'] :
704
+ 'admin.php';
705
+
706
+ return admin_url(
707
+ $parent_slug .
708
+ ( false === strpos( $parent_slug, '?' ) ? '?' : '&' ) .
709
+ 'page=' .
710
+ $menu['menu'][2]
711
+ );
712
+ }
713
+
714
+ /**
715
+ * @author Vova Feldman (@svovaf)
716
+ * @since 1.1.4
717
+ *
718
+ * @param callable $function
719
+ *
720
+ * @return false|array[string]mixed
721
+ */
722
+ function override_menu_item( $function ) {
723
+ $found_menu = $this->remove_menu_item();
724
+
725
+ if ( false === $found_menu ) {
726
+ return false;
727
+ }
728
+
729
+ if ( ! $this->is_top_level() || ! $this->is_cpt() ) {
730
+ $menu_slug = plugin_basename( $this->get_slug() );
731
+
732
+ $hookname = get_plugin_page_hookname( $menu_slug, '' );
733
+
734
+ // Override menu action.
735
+ add_action( $hookname, $function );
736
+ } else {
737
+ global $menu;
738
+
739
+ // Remove original CPT menu.
740
+ unset( $menu[ $found_menu['position'] ] );
741
+
742
+ // Create new top-level menu action.
743
+ $hookname = self::add_page(
744
+ $found_menu['menu'][3],
745
+ $found_menu['menu'][0],
746
+ 'manage_options',
747
+ $this->get_slug(),
748
+ $function,
749
+ $found_menu['menu'][6],
750
+ $found_menu['position']
751
+ );
752
+ }
753
+
754
+ return $hookname;
755
+ }
756
+
757
+ /**
758
+ * Adds a counter to the module's top level menu item.
759
+ *
760
+ * @author Vova Feldman (@svovaf)
761
+ * @since 1.2.1.5
762
+ *
763
+ * @param int $counter
764
+ * @param string $class
765
+ */
766
+ function add_counter_to_menu_item( $counter = 1, $class = '' ) {
767
+ global $menu, $submenu;
768
+
769
+ $mask = '%s <span class="update-plugins %s count-%3$s" aria-hidden="true"><span>%3$s<span class="screen-reader-text">%3$s notifications</span></span></span>';
770
+
771
+ /**
772
+ * This method is NOT executed for WordPress.org themes.
773
+ * Since we maintain only one version of the SDK we added this small
774
+ * hack to avoid the error from Theme Check since it's a false-positive.
775
+ *
776
+ * @author Vova Feldman (@svovaf)
777
+ * @since 1.2.2.7
778
+ */
779
+ $menu_ref = &$menu;
780
+ $submenu_ref = &$submenu;
781
+
782
+ if ( $this->_is_top_level ) {
783
+ // Find main menu item.
784
+ $found_menu = $this->find_top_level_menu();
785
+
786
+ if ( false !== $found_menu ) {
787
+ // Override menu label.
788
+ $menu_ref[ $found_menu['position'] ][0] = sprintf(
789
+ $mask,
790
+ $found_menu['menu'][0],
791
+ $class,
792
+ $counter
793
+ );
794
+ }
795
+ } else {
796
+ $found_submenu = $this->find_main_submenu();
797
+
798
+ if ( false !== $found_submenu ) {
799
+ // Override menu label.
800
+ $submenu_ref[ $found_submenu['parent_slug'] ][ $found_submenu['position'] ][0] = sprintf(
801
+ $mask,
802
+ $found_submenu['menu'][0],
803
+ $class,
804
+ $counter
805
+ );
806
+ }
807
+ }
808
+ }
809
+
810
+ #endregion Top level menu Override
811
+
812
+ /**
813
+ * Add a top-level menu page.
814
+ *
815
+ * Note for WordPress.org Theme/Plugin reviewer:
816
+ *
817
+ * This is a replication of `add_menu_page()` to avoid Theme Check warning.
818
+ *
819
+ * Why?
820
+ * ====
821
+ * Freemius is an SDK for plugin and theme developers. Since the core
822
+ * of the SDK is relevant both for plugins and themes, for obvious reasons,
823
+ * we only develop and maintain one code base.
824
+ *
825
+ * This method will not run for wp.org themes (only plugins) since theme
826
+ * admin settings/options are now only allowed in the customizer.
827
+ *
828
+ * If you have any questions or need clarifications, please don't hesitate
829
+ * pinging me on slack, my username is @svovaf.
830
+ *
831
+ * @author Vova Feldman (@svovaf)
832
+ * @since 1.2.2
833
+ *
834
+ * @param string $page_title The text to be displayed in the title tags of the page when the menu is
835
+ * selected.
836
+ * @param string $menu_title The text to be used for the menu.
837
+ * @param string $capability The capability required for this menu to be displayed to the user.
838
+ * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
839
+ * @param callable|string $function The function to be called to output the content for this page.
840
+ * @param string $icon_url The URL to the icon to be used for this menu.
841
+ * * Pass a base64-encoded SVG using a data URI, which will be colored to
842
+ * match the color scheme. This should begin with
843
+ * 'data:image/svg+xml;base64,'.
844
+ * * Pass the name of a Dashicons helper class to use a font icon,
845
+ * e.g. 'dashicons-chart-pie'.
846
+ * * Pass 'none' to leave div.wp-menu-image empty so an icon can be added
847
+ * via CSS.
848
+ * @param int $position The position in the menu order this one should appear.
849
+ *
850
+ * @return string The resulting page's hook_suffix.
851
+ */
852
+ static function add_page(
853
+ $page_title,
854
+ $menu_title,
855
+ $capability,
856
+ $menu_slug,
857
+ $function = '',
858
+ $icon_url = '',
859
+ $position = null
860
+ ) {
861
+ $fn = 'add_menu' . '_page';
862
+
863
+ return $fn(
864
+ $page_title,
865
+ $menu_title,
866
+ $capability,
867
+ $menu_slug,
868
+ $function,
869
+ $icon_url,
870
+ $position
871
+ );
872
+ }
873
+
874
+ /**
875
+ * Add page and update menu instance settings.
876
+ *
877
+ * @author Vova Feldman (@svovaf)
878
+ * @since 2.0.0
879
+ *
880
+ * @param string $page_title
881
+ * @param string $menu_title
882
+ * @param string $capability
883
+ * @param string $menu_slug
884
+ * @param callable|string $function
885
+ * @param string $icon_url
886
+ * @param int|null $position
887
+ *
888
+ * @return string
889
+ */
890
+ function add_page_and_update(
891
+ $page_title,
892
+ $menu_title,
893
+ $capability,
894
+ $menu_slug,
895
+ $function = '',
896
+ $icon_url = '',
897
+ $position = null
898
+ ) {
899
+ $this->_menu_slug = $menu_slug;
900
+ $this->_is_top_level = true;
901
+ $this->_menu_exists = true;
902
+ $this->_network_menu_exists = true;
903
+
904
+ return self::add_page(
905
+ $page_title,
906
+ $menu_title,
907
+ $capability,
908
+ $menu_slug,
909
+ $function,
910
+ $icon_url,
911
+ $position
912
+ );
913
+ }
914
+
915
+ /**
916
+ * Add a submenu page.
917
+ *
918
+ * Note for WordPress.org Theme/Plugin reviewer:
919
+ *
920
+ * This is a replication of `add_submenu_page()` to avoid Theme Check warning.
921
+ *
922
+ * Why?
923
+ * ====
924
+ * Freemius is an SDK for plugin and theme developers. Since the core
925
+ * of the SDK is relevant both for plugins and themes, for obvious reasons,
926
+ * we only develop and maintain one code base.
927
+ *
928
+ * This method will not run for wp.org themes (only plugins) since theme
929
+ * admin settings/options are now only allowed in the customizer.
930
+ *
931
+ * If you have any questions or need clarifications, please don't hesitate
932
+ * pinging me on slack, my username is @svovaf.
933
+ *
934
+ * @author Vova Feldman (@svovaf)
935
+ * @since 1.2.2
936
+ *
937
+ * @param string $parent_slug The slug name for the parent menu (or the file name of a standard
938
+ * WordPress admin page).
939
+ * @param string $page_title The text to be displayed in the title tags of the page when the menu is
940
+ * selected.
941
+ * @param string $menu_title The text to be used for the menu.
942
+ * @param string $capability The capability required for this menu to be displayed to the user.
943
+ * @param string $menu_slug The slug name to refer to this menu by (should be unique for this menu).
944
+ * @param callable|string $function The function to be called to output the content for this page.
945
+ *
946
+ * @return false|string The resulting page's hook_suffix, or false if the user does not have the capability
947
+ * required.
948
+ */
949
+ static function add_subpage(
950
+ $parent_slug,
951
+ $page_title,
952
+ $menu_title,
953
+ $capability,
954
+ $menu_slug,
955
+ $function = ''
956
+ ) {
957
+ $fn = 'add_submenu' . '_page';
958
+
959
+ return $fn( $parent_slug,
960
+ $page_title,
961
+ $menu_title,
962
+ $capability,
963
+ $menu_slug,
964
+ $function
965
+ );
966
+ }
967
+
968
+ /**
969
+ * Add sub page and update menu instance settings.
970
+ *
971
+ * @author Vova Feldman (@svovaf)
972
+ * @since 2.0.0
973
+ *
974
+ * @param string $parent_slug
975
+ * @param string $page_title
976
+ * @param string $menu_title
977
+ * @param string $capability
978
+ * @param string $menu_slug
979
+ * @param callable|string $function
980
+ *
981
+ * @return string
982
+ */
983
+ function add_subpage_and_update(
984
+ $parent_slug,
985
+ $page_title,
986
+ $menu_title,
987
+ $capability,
988
+ $menu_slug,
989
+ $function = ''
990
+ ) {
991
+ $this->_menu_slug = $menu_slug;
992
+ $this->_parent_slug = $parent_slug;
993
+ $this->_is_top_level = false;
994
+ $this->_menu_exists = true;
995
+ $this->_network_menu_exists = true;
996
+
997
+ return self::add_subpage(
998
+ $parent_slug,
999
+ $page_title,
1000
+ $menu_title,
1001
+ $capability,
1002
+ $menu_slug,
1003
+ $function
1004
+ );
1005
+ }
1006
  }
freemius/includes/managers/class-fs-cache-manager.php CHANGED
@@ -1,326 +1,326 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.1.6
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_Cache_Manager {
14
- /**
15
- * @var FS_Option_Manager
16
- */
17
- private $_options;
18
- /**
19
- * @var FS_Logger
20
- */
21
- private $_logger;
22
-
23
- /**
24
- * @var FS_Cache_Manager[]
25
- */
26
- private static $_MANAGERS = array();
27
-
28
- /**
29
- * @author Vova Feldman (@svovaf)
30
- * @since 1.1.3
31
- *
32
- * @param string $id
33
- */
34
- private function __construct( $id ) {
35
- $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_cach_mngr_' . $id, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
36
-
37
- $this->_logger->entrance();
38
- $this->_logger->log( 'id = ' . $id );
39
-
40
- $this->_options = FS_Option_Manager::get_manager( $id, true, true, false );
41
- }
42
-
43
- /**
44
- * @author Vova Feldman (@svovaf)
45
- * @since 1.1.6
46
- *
47
- * @param $id
48
- *
49
- * @return FS_Cache_Manager
50
- */
51
- static function get_manager( $id ) {
52
- $id = strtolower( $id );
53
-
54
- if ( ! isset( self::$_MANAGERS[ $id ] ) ) {
55
- self::$_MANAGERS[ $id ] = new FS_Cache_Manager( $id );
56
- }
57
-
58
- return self::$_MANAGERS[ $id ];
59
- }
60
-
61
- /**
62
- * @author Vova Feldman (@svovaf)
63
- * @since 1.1.6
64
- *
65
- * @return bool
66
- */
67
- function is_empty() {
68
- $this->_logger->entrance();
69
-
70
- return $this->_options->is_empty();
71
- }
72
-
73
- /**
74
- * @author Vova Feldman (@svovaf)
75
- * @since 1.1.6
76
- */
77
- function clear() {
78
- $this->_logger->entrance();
79
-
80
- $this->_options->clear( true );
81
- }
82
-
83
- /**
84
- * Delete cache manager from DB.
85
- *
86
- * @author Vova Feldman (@svovaf)
87
- * @since 1.0.9
88
- */
89
- function delete() {
90
- $this->_options->delete();
91
- }
92
-
93
- /**
94
- * Check if there's a cached item.
95
- *
96
- * @author Vova Feldman (@svovaf)
97
- * @since 1.1.6
98
- *
99
- * @param string $key
100
- *
101
- * @return bool
102
- */
103
- function has( $key ) {
104
- $cache_entry = $this->_options->get_option( $key, false );
105
-
106
- return ( is_object( $cache_entry ) &&
107
- isset( $cache_entry->timestamp ) &&
108
- is_numeric( $cache_entry->timestamp )
109
- );
110
- }
111
-
112
- /**
113
- * Check if there's a valid cached item.
114
- *
115
- * @author Vova Feldman (@svovaf)
116
- * @since 1.1.6
117
- *
118
- * @param string $key
119
- * @param null|int $expiration Since 1.2.2.7
120
- *
121
- * @return bool
122
- */
123
- function has_valid( $key, $expiration = null ) {
124
- $cache_entry = $this->_options->get_option( $key, false );
125
-
126
- $is_valid = ( is_object( $cache_entry ) &&
127
- isset( $cache_entry->timestamp ) &&
128
- is_numeric( $cache_entry->timestamp ) &&
129
- $cache_entry->timestamp > WP_FS__SCRIPT_START_TIME
130
- );
131
-
132
- if ( $is_valid &&
133
- is_numeric( $expiration ) &&
134
- isset( $cache_entry->created ) &&
135
- is_numeric( $cache_entry->created ) &&
136
- $cache_entry->created + $expiration < WP_FS__SCRIPT_START_TIME
137
- ) {
138
- /**
139
- * Even if the cache is still valid, since we are checking for validity
140
- * with an explicit expiration period, if the period has past, return
141
- * `false` as if the cache is invalid.
142
- *
143
- * @since 1.2.2.7
144
- */
145
- $is_valid = false;
146
- }
147
-
148
- return $is_valid;
149
- }
150
-
151
- /**
152
- * @author Vova Feldman (@svovaf)
153
- * @since 1.1.6
154
- *
155
- * @param string $key
156
- * @param mixed $default
157
- *
158
- * @return mixed
159
- */
160
- function get( $key, $default = null ) {
161
- $this->_logger->entrance( 'key = ' . $key );
162
-
163
- $cache_entry = $this->_options->get_option( $key, false );
164
-
165
- if ( is_object( $cache_entry ) &&
166
- isset( $cache_entry->timestamp ) &&
167
- is_numeric( $cache_entry->timestamp )
168
- ) {
169
- return $cache_entry->result;
170
- }
171
-
172
- return is_object( $default ) ? clone $default : $default;
173
- }
174
-
175
- /**
176
- * @author Vova Feldman (@svovaf)
177
- * @since 1.1.6
178
- *
179
- * @param string $key
180
- * @param mixed $default
181
- *
182
- * @return mixed
183
- */
184
- function get_valid( $key, $default = null ) {
185
- $this->_logger->entrance( 'key = ' . $key );
186
-
187
- $cache_entry = $this->_options->get_option( $key, false );
188
-
189
- if ( is_object( $cache_entry ) &&
190
- isset( $cache_entry->timestamp ) &&
191
- is_numeric( $cache_entry->timestamp ) &&
192
- $cache_entry->timestamp > WP_FS__SCRIPT_START_TIME
193
- ) {
194
- return $cache_entry->result;
195
- }
196
-
197
- return is_object( $default ) ? clone $default : $default;
198
- }
199
-
200
- /**
201
- * @author Vova Feldman (@svovaf)
202
- * @since 1.1.6
203
- *
204
- * @param string $key
205
- * @param mixed $value
206
- * @param int $expiration
207
- * @param int $created Since 2.0.0 Cache creation date.
208
- */
209
- function set( $key, $value, $expiration = WP_FS__TIME_24_HOURS_IN_SEC, $created = WP_FS__SCRIPT_START_TIME ) {
210
- $this->_logger->entrance( 'key = ' . $key );
211
-
212
- $cache_entry = new stdClass();
213
-
214
- $cache_entry->result = $value;
215
- $cache_entry->created = $created;
216
- $cache_entry->timestamp = $created + $expiration;
217
- $this->_options->set_option( $key, $cache_entry, true );
218
- }
219
-
220
- /**
221
- * Get cached record expiration, or false if not cached or expired.
222
- *
223
- * @author Vova Feldman (@svovaf)
224
- * @since 1.1.7.3
225
- *
226
- * @param string $key
227
- *
228
- * @return bool|int
229
- */
230
- function get_record_expiration( $key ) {
231
- $this->_logger->entrance( 'key = ' . $key );
232
-
233
- $cache_entry = $this->_options->get_option( $key, false );
234
-
235
- if ( is_object( $cache_entry ) &&
236
- isset( $cache_entry->timestamp ) &&
237
- is_numeric( $cache_entry->timestamp ) &&
238
- $cache_entry->timestamp > WP_FS__SCRIPT_START_TIME
239
- ) {
240
- return $cache_entry->timestamp;
241
- }
242
-
243
- return false;
244
- }
245
-
246
- /**
247
- * Purge cached item.
248
- *
249
- * @author Vova Feldman (@svovaf)
250
- * @since 1.1.6
251
- *
252
- * @param string $key
253
- */
254
- function purge( $key ) {
255
- $this->_logger->entrance( 'key = ' . $key );
256
-
257
- $this->_options->unset_option( $key, true );
258
- }
259
-
260
- /**
261
- * Extend cached item caching period.
262
- *
263
- * @author Vova Feldman (@svovaf)
264
- * @since 2.0.0
265
- *
266
- * @param string $key
267
- * @param int $expiration
268
- *
269
- * @return bool
270
- */
271
- function update_expiration( $key, $expiration = WP_FS__TIME_24_HOURS_IN_SEC ) {
272
- $this->_logger->entrance( 'key = ' . $key );
273
-
274
- $cache_entry = $this->_options->get_option( $key, false );
275
-
276
- if ( ! is_object( $cache_entry ) ||
277
- ! isset( $cache_entry->timestamp ) ||
278
- ! is_numeric( $cache_entry->timestamp )
279
- ) {
280
- return false;
281
- }
282
-
283
- $this->set( $key, $cache_entry->result, $expiration, $cache_entry->created );
284
-
285
- return true;
286
- }
287
-
288
- /**
289
- * Set cached item as expired.
290
- *
291
- * @author Vova Feldman (@svovaf)
292
- * @since 1.2.2.7
293
- *
294
- * @param string $key
295
- */
296
- function expire( $key ) {
297
- $this->_logger->entrance( 'key = ' . $key );
298
-
299
- $cache_entry = $this->_options->get_option( $key, false );
300
-
301
- if ( is_object( $cache_entry ) &&
302
- isset( $cache_entry->timestamp ) &&
303
- is_numeric( $cache_entry->timestamp )
304
- ) {
305
- // Set to expired.
306
- $cache_entry->timestamp = WP_FS__SCRIPT_START_TIME;
307
- $this->_options->set_option( $key, $cache_entry, true );
308
- }
309
- }
310
-
311
- #--------------------------------------------------------------------------------
312
- #region Migration
313
- #--------------------------------------------------------------------------------
314
-
315
- /**
316
- * Migrate options from site level.
317
- *
318
- * @author Vova Feldman (@svovaf)
319
- * @since 2.0.0
320
- */
321
- function migrate_to_network() {
322
- $this->_options->migrate_to_network();
323
- }
324
-
325
- #endregion
326
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 1.1.6
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_Cache_Manager {
14
+ /**
15
+ * @var FS_Option_Manager
16
+ */
17
+ private $_options;
18
+ /**
19
+ * @var FS_Logger
20
+ */
21
+ private $_logger;
22
+
23
+ /**
24
+ * @var FS_Cache_Manager[]
25
+ */
26
+ private static $_MANAGERS = array();
27
+
28
+ /**
29
+ * @author Vova Feldman (@svovaf)
30
+ * @since 1.1.3
31
+ *
32
+ * @param string $id
33
+ */
34
+ private function __construct( $id ) {
35
+ $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_cach_mngr_' . $id, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
36
+
37
+ $this->_logger->entrance();
38
+ $this->_logger->log( 'id = ' . $id );
39
+
40
+ $this->_options = FS_Option_Manager::get_manager( $id, true, true, false );
41
+ }
42
+
43
+ /**
44
+ * @author Vova Feldman (@svovaf)
45
+ * @since 1.1.6
46
+ *
47
+ * @param $id
48
+ *
49
+ * @return FS_Cache_Manager
50
+ */
51
+ static function get_manager( $id ) {
52
+ $id = strtolower( $id );
53
+
54
+ if ( ! isset( self::$_MANAGERS[ $id ] ) ) {
55
+ self::$_MANAGERS[ $id ] = new FS_Cache_Manager( $id );
56
+ }
57
+
58
+ return self::$_MANAGERS[ $id ];
59
+ }
60
+
61
+ /**
62
+ * @author Vova Feldman (@svovaf)
63
+ * @since 1.1.6
64
+ *
65
+ * @return bool
66
+ */
67
+ function is_empty() {
68
+ $this->_logger->entrance();
69
+
70
+ return $this->_options->is_empty();
71
+ }
72
+
73
+ /**
74
+ * @author Vova Feldman (@svovaf)
75
+ * @since 1.1.6
76
+ */
77
+ function clear() {
78
+ $this->_logger->entrance();
79
+
80
+ $this->_options->clear( true );
81
+ }
82
+
83
+ /**
84
+ * Delete cache manager from DB.
85
+ *
86
+ * @author Vova Feldman (@svovaf)
87
+ * @since 1.0.9
88
+ */
89
+ function delete() {
90
+ $this->_options->delete();
91
+ }
92
+
93
+ /**
94
+ * Check if there's a cached item.
95
+ *
96
+ * @author Vova Feldman (@svovaf)
97
+ * @since 1.1.6
98
+ *
99
+ * @param string $key
100
+ *
101
+ * @return bool
102
+ */
103
+ function has( $key ) {
104
+ $cache_entry = $this->_options->get_option( $key, false );
105
+
106
+ return ( is_object( $cache_entry ) &&
107
+ isset( $cache_entry->timestamp ) &&
108
+ is_numeric( $cache_entry->timestamp )
109
+ );
110
+ }
111
+
112
+ /**
113
+ * Check if there's a valid cached item.
114
+ *
115
+ * @author Vova Feldman (@svovaf)
116
+ * @since 1.1.6
117
+ *
118
+ * @param string $key
119
+ * @param null|int $expiration Since 1.2.2.7
120
+ *
121
+ * @return bool
122
+ */
123
+ function has_valid( $key, $expiration = null ) {
124
+ $cache_entry = $this->_options->get_option( $key, false );
125
+
126
+ $is_valid = ( is_object( $cache_entry ) &&
127
+ isset( $cache_entry->timestamp ) &&
128
+ is_numeric( $cache_entry->timestamp ) &&
129
+ $cache_entry->timestamp > WP_FS__SCRIPT_START_TIME
130
+ );
131
+
132
+ if ( $is_valid &&
133
+ is_numeric( $expiration ) &&
134
+ isset( $cache_entry->created ) &&
135
+ is_numeric( $cache_entry->created ) &&
136
+ $cache_entry->created + $expiration < WP_FS__SCRIPT_START_TIME
137
+ ) {
138
+ /**
139
+ * Even if the cache is still valid, since we are checking for validity
140
+ * with an explicit expiration period, if the period has past, return
141
+ * `false` as if the cache is invalid.
142
+ *
143
+ * @since 1.2.2.7
144
+ */
145
+ $is_valid = false;
146
+ }
147
+
148
+ return $is_valid;
149
+ }
150
+
151
+ /**
152
+ * @author Vova Feldman (@svovaf)
153
+ * @since 1.1.6
154
+ *
155
+ * @param string $key
156
+ * @param mixed $default
157
+ *
158
+ * @return mixed
159
+ */
160
+ function get( $key, $default = null ) {
161
+ $this->_logger->entrance( 'key = ' . $key );
162
+
163
+ $cache_entry = $this->_options->get_option( $key, false );
164
+
165
+ if ( is_object( $cache_entry ) &&
166
+ isset( $cache_entry->timestamp ) &&
167
+ is_numeric( $cache_entry->timestamp )
168
+ ) {
169
+ return $cache_entry->result;
170
+ }
171
+
172
+ return is_object( $default ) ? clone $default : $default;
173
+ }
174
+
175
+ /**
176
+ * @author Vova Feldman (@svovaf)
177
+ * @since 1.1.6
178
+ *
179
+ * @param string $key
180
+ * @param mixed $default
181
+ *
182
+ * @return mixed
183
+ */
184
+ function get_valid( $key, $default = null ) {
185
+ $this->_logger->entrance( 'key = ' . $key );
186
+
187
+ $cache_entry = $this->_options->get_option( $key, false );
188
+
189
+ if ( is_object( $cache_entry ) &&
190
+ isset( $cache_entry->timestamp ) &&
191
+ is_numeric( $cache_entry->timestamp ) &&
192
+ $cache_entry->timestamp > WP_FS__SCRIPT_START_TIME
193
+ ) {
194
+ return $cache_entry->result;
195
+ }
196
+
197
+ return is_object( $default ) ? clone $default : $default;
198
+ }
199
+
200
+ /**
201
+ * @author Vova Feldman (@svovaf)
202
+ * @since 1.1.6
203
+ *
204
+ * @param string $key
205
+ * @param mixed $value
206
+ * @param int $expiration
207
+ * @param int $created Since 2.0.0 Cache creation date.
208
+ */
209
+ function set( $key, $value, $expiration = WP_FS__TIME_24_HOURS_IN_SEC, $created = WP_FS__SCRIPT_START_TIME ) {
210
+ $this->_logger->entrance( 'key = ' . $key );
211
+
212
+ $cache_entry = new stdClass();
213
+
214
+ $cache_entry->result = $value;
215
+ $cache_entry->created = $created;
216
+ $cache_entry->timestamp = $created + $expiration;
217
+ $this->_options->set_option( $key, $cache_entry, true );
218
+ }
219
+
220
+ /**
221
+ * Get cached record expiration, or false if not cached or expired.
222
+ *
223
+ * @author Vova Feldman (@svovaf)
224
+ * @since 1.1.7.3
225
+ *
226
+ * @param string $key
227
+ *
228
+ * @return bool|int
229
+ */
230
+ function get_record_expiration( $key ) {
231
+ $this->_logger->entrance( 'key = ' . $key );
232
+
233
+ $cache_entry = $this->_options->get_option( $key, false );
234
+
235
+ if ( is_object( $cache_entry ) &&
236
+ isset( $cache_entry->timestamp ) &&
237
+ is_numeric( $cache_entry->timestamp ) &&
238
+ $cache_entry->timestamp > WP_FS__SCRIPT_START_TIME
239
+ ) {
240
+ return $cache_entry->timestamp;
241
+ }
242
+
243
+ return false;
244
+ }
245
+
246
+ /**
247
+ * Purge cached item.
248
+ *
249
+ * @author Vova Feldman (@svovaf)
250
+ * @since 1.1.6
251
+ *
252
+ * @param string $key
253
+ */
254
+ function purge( $key ) {
255
+ $this->_logger->entrance( 'key = ' . $key );
256
+
257
+ $this->_options->unset_option( $key, true );
258
+ }
259
+
260
+ /**
261
+ * Extend cached item caching period.
262
+ *
263
+ * @author Vova Feldman (@svovaf)
264
+ * @since 2.0.0
265
+ *
266
+ * @param string $key
267
+ * @param int $expiration
268
+ *
269
+ * @return bool
270
+ */
271
+ function update_expiration( $key, $expiration = WP_FS__TIME_24_HOURS_IN_SEC ) {
272
+ $this->_logger->entrance( 'key = ' . $key );
273
+
274
+ $cache_entry = $this->_options->get_option( $key, false );
275
+
276
+ if ( ! is_object( $cache_entry ) ||
277
+ ! isset( $cache_entry->timestamp ) ||
278
+ ! is_numeric( $cache_entry->timestamp )
279
+ ) {
280
+ return false;
281
+ }
282
+
283
+ $this->set( $key, $cache_entry->result, $expiration, $cache_entry->created );
284
+
285
+ return true;
286
+ }
287
+
288
+ /**
289
+ * Set cached item as expired.
290
+ *
291
+ * @author Vova Feldman (@svovaf)
292
+ * @since 1.2.2.7
293
+ *
294
+ * @param string $key
295
+ */
296
+ function expire( $key ) {
297
+ $this->_logger->entrance( 'key = ' . $key );
298
+
299
+ $cache_entry = $this->_options->get_option( $key, false );
300
+
301
+ if ( is_object( $cache_entry ) &&
302
+ isset( $cache_entry->timestamp ) &&
303
+ is_numeric( $cache_entry->timestamp )
304
+ ) {
305
+ // Set to expired.
306
+ $cache_entry->timestamp = WP_FS__SCRIPT_START_TIME;
307
+ $this->_options->set_option( $key, $cache_entry, true );
308
+ }
309
+ }
310
+
311
+ #--------------------------------------------------------------------------------
312
+ #region Migration
313
+ #--------------------------------------------------------------------------------
314
+
315
+ /**
316
+ * Migrate options from site level.
317
+ *
318
+ * @author Vova Feldman (@svovaf)
319
+ * @since 2.0.0
320
+ */
321
+ function migrate_to_network() {
322
+ $this->_options->migrate_to_network();
323
+ }
324
+
325
+ #endregion
326
  }
freemius/includes/managers/class-fs-gdpr-manager.php CHANGED
@@ -1,202 +1,202 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 2.1.0
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- class FS_GDPR_Manager {
14
- /**
15
- * @var FS_Option_Manager
16
- */
17
- private $_storage;
18
- /**
19
- * @var array {
20
- * @type bool $required Are GDPR rules apply on the current context admin.
21
- * @type bool $show_opt_in_notice Should the marketing and offers opt-in message be shown to the admin or not. If not set, defaults to `true`.
22
- * @type int $notice_shown_at Last time the special GDPR opt-in message was shown to the current admin.
23
- * }
24
- */
25
- private $_data;
26
- /**
27
- * @var int
28
- */
29
- private $_wp_user_id;
30
- /**
31
- * @var string
32
- */
33
- private $_option_name;
34
- /**
35
- * @var FS_Admin_Notices
36
- */
37
- private $_notices;
38
-
39
- #--------------------------------------------------------------------------------
40
- #region Singleton
41
- #--------------------------------------------------------------------------------
42
-
43
- /**
44
- * @var FS_GDPR_Manager
45
- */
46
- private static $_instance;
47
-
48
- /**
49
- * @return FS_GDPR_Manager
50
- */
51
- public static function instance() {
52
- if ( ! isset( self::$_instance ) ) {
53
- self::$_instance = new self();
54
- }
55
-
56
- return self::$_instance;
57
- }
58
-
59
- #endregion
60
-
61
- private function __construct() {
62
- $this->_storage = FS_Option_Manager::get_manager( WP_FS__GDPR_OPTION_NAME, true, true );
63
- $this->_wp_user_id = Freemius::get_current_wp_user_id();
64
- $this->_option_name = "u{$this->_wp_user_id}";
65
- $this->_data = $this->_storage->get_option( $this->_option_name, array() );
66
- $this->_notices = FS_Admin_Notices::instance( 'all_admins', '', '', true );
67
-
68
- if ( ! is_array( $this->_data ) ) {
69
- $this->_data = array();
70
- }
71
- }
72
-
73
- /**
74
- * Update a GDPR option for the current admin and store it.
75
- *
76
- * @author Vova Feldman (@svovaf)
77
- * @since 2.1.0
78
- *
79
- * @param string $name
80
- * @param mixed $value
81
- */
82
- private function update_option( $name, $value ) {
83
- $this->_data[ $name ] = $value;
84
-
85
- $this->_storage->set_option( $this->_option_name, $this->_data, true );
86
- }
87
-
88
- /**
89
- * @author Leo Fajardo (@leorw)
90
- * @since 2.1.0
91
- *
92
- * @return bool|null
93
- */
94
- public function is_required() {
95
- return isset( $this->_data['required'] ) ?
96
- $this->_data['required'] :
97
- null;
98
- }
99
-
100
- /**
101
- * @author Leo Fajardo (@leorw)
102
- * @since 2.1.0
103
- *
104
- * @param bool $is_required
105
- */
106
- public function store_is_required( $is_required ) {
107
- $this->update_option( 'required', $is_required );
108
- }
109
-
110
- /**
111
- * Checks if the GDPR opt-in sticky notice is currently shown.
112
- *
113
- * @author Vova Feldman (@svovaf)
114
- * @since 2.1.0
115
- *
116
- * @return bool
117
- */
118
- public function is_opt_in_notice_shown() {
119
- return $this->_notices->has_sticky( "gdpr_optin_actions_{$this->_wp_user_id}", true );
120
- }
121
-
122
- /**
123
- * Remove the GDPR opt-in sticky notice.
124
- *
125
- * @author Vova Feldman (@svovaf)
126
- * @since 2.1.0
127
- */
128
- public function remove_opt_in_notice() {
129
- $this->_notices->remove_sticky( "gdpr_optin_actions_{$this->_wp_user_id}", true );
130
-
131
- $this->disable_opt_in_notice();
132
- }
133
-
134
- /**
135
- * Prevents the opt-in message from being added/shown.
136
- *
137
- * @author Leo Fajardo (@leorw)
138
- * @since 2.1.0
139
- */
140
- public function disable_opt_in_notice() {
141
- $this->update_option( 'show_opt_in_notice', false );
142
- }
143
-
144
- /**
145
- * Checks if a GDPR opt-in message needs to be shown to the current admin.
146
- *
147
- * @author Vova Feldman (@svovaf)
148
- * @since 2.1.0
149
- *
150
- * @return bool
151
- */
152
- public function should_show_opt_in_notice() {
153
- return (
154
- ! isset( $this->_data['show_opt_in_notice'] ) ||
155
- true === $this->_data['show_opt_in_notice']
156
- );
157
- }
158
-
159
- /**
160
- * Get the last time the GDPR opt-in notice was shown.
161
- *
162
- * @author Vova Feldman (@svovaf)
163
- * @since 2.1.0
164
- *
165
- * @return false|int
166
- */
167
- public function last_time_notice_was_shown() {
168
- return isset( $this->_data['notice_shown_at'] ) ?
169
- $this->_data['notice_shown_at'] :
170
- false;
171
- }
172
-
173
- /**
174
- * Update the timestamp of the last time the GDPR opt-in message was shown to now.
175
- *
176
- * @author Vova Feldman (@svovaf)
177
- * @since 2.1.0
178
- */
179
- public function notice_was_just_shown() {
180
- $this->update_option( 'notice_shown_at', WP_FS__SCRIPT_START_TIME );
181
- }
182
-
183
- /**
184
- * @param string $message
185
- * @param string|null $plugin_title
186
- *
187
- * @author Vova Feldman (@svovaf)
188
- * @since 2.1.0
189
- */
190
- public function add_opt_in_sticky_notice( $message, $plugin_title = null ) {
191
- $this->_notices->add_sticky(
192
- $message,
193
- "gdpr_optin_actions_{$this->_wp_user_id}",
194
- '',
195
- 'promotion',
196
- true,
197
- $this->_wp_user_id,
198
- $plugin_title,
199
- true
200
- );
201
- }
202
  }
1
+ <?php
2
+ /**
3
+ * @package Freemius
4
+ * @copyright Copyright (c) 2015, Freemius, Inc.
5
+ * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
+ * @since 2.1.0
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+ class FS_GDPR_Manager {
14
+ /**
15
+ * @var FS_Option_Manager
16
+ */
17
+ private $_storage;
18
+ /**
19
+ * @var array {
20
+ * @type bool $required Are GDPR rules apply on the current context admin.
21
+ * @type bool $show_opt_in_notice Should the marketing and offers opt-in message be shown to the admin or not. If not set, defaults to `true`.
22
+ * @type int $notice_shown_at Last time the special GDPR opt-in message was shown to the current admin.
23
+ * }
24
+ */
25
+ private $_data;
26
+ /**
27
+ * @var int
28
+ */
29
+ private $_wp_user_id;
30
+ /**
31
+ * @var string
32
+ */
33
+ private $_option_name;
34
+ /**
35
+ * @var FS_Admin_Notices
36
+ */
37
+ private $_notices;
38
+
39
+ #--------------------------------------------------------------------------------
40
+ #region Singleton
41
+ #--------------------------------------------------------------------------------
42
+
43
+ /**
44
+ * @var FS_GDPR_Manager
45
+ */
46
+ private static $_instance;
47
+
48
+ /**
49
+ * @return FS_GDPR_Manager
50
+ */
51
+ public static function instance() {
52
+ if ( ! isset( self::$_instance ) ) {
53
+ self::$_instance = new self();
54
+ }
55
+
56
+ return self::$_instance;
57
+ }
58
+
59
+ #endregion
60
+
61
+ private function __construct() {
62
+ $this->_storage = FS_Option_Manager::get_manager( WP_FS__GDPR_OPTION_NAME, true, true );
63
+ $this->_wp_user_id = Freemius::get_current_wp_user_id();
64
+ $this->_option_name = "u{$this->_wp_user_id}";
65
+ $this->_data = $this->_storage->get_option( $this->_option_name, array() );
66
+ $this->_notices = FS_Admin_Notices::instance( 'all_admins', '', '', true );
67
+
68
+ if ( ! is_array( $this->_data ) ) {
69
+ $this->_data = array();
70
+ }
71
+ }
72
+
73
+ /**
74
+ * Update a GDPR option for the current admin and store it.
75
+ *
76
+ * @author Vova Feldman (@svovaf)
77
+ * @since 2.1.0
78
+ *
79
+ * @param string $name
80
+ * @param mixed $value
81
+ */
82
+ private function update_option( $name, $value ) {
83
+ $this->_data[ $name ] = $value;
84
+
85
+ $this->_storage->set_option( $this->_option_name, $this->_data, true );
86
+ }
87
+
88
+ /**
89
+ * @author Leo Fajardo (@leorw)
90
+ * @since 2.1.0
91
+ *
92
+ * @return bool|null
93
+ */
94
+ public function is_required() {
95
+ return isset( $this->_data['required'] ) ?
96
+ $this->_data['required'] :
97
+ null;
98
+ }
99
+
100
+ /**
101
+ * @author Leo Fajardo (@leorw)
102
+ * @since 2.1.0
103
+ *
104
+ * @param bool $is_required
105
+ */
106
+ public function store_is_required( $is_required ) {
107
+ $this->update_option( 'required', $is_required );
108
+ }
109
+
110
+ /**
111
+ * Checks if the GDPR opt-in sticky notice is currently shown.
112
+ *
113
+ * @author Vova Feldman (@svovaf)
114
+ * @since 2.1.0
115
+ *
116
+ * @return bool
117
+ */
118
+ public function is_opt_in_notice_shown() {
119
+ return $this->_notices->has_sticky( "gdpr_optin_actions_{$this->_wp_user_id}", true );
120
+ }
121
+
122
+ /**
123
+ * Remove the GDPR opt-in sticky notice.
124
+ *
125
+ * @author Vova Feldman (@svovaf)
126
+ * @since 2.1.0
127
+ */
128
+ public function remove_opt_in_notice() {
129
+ $this->_notices->remove_sticky( "gdpr_optin_actions_{$this->_wp_user_id}", true );
130
+
131
+ $this->disable_opt_in_notice();
132
+ }
133
+
134
+ /**
135
+ * Prevents the opt-in message from being added/shown.
136
+ *
137
+ * @author Leo Fajardo (@leorw)
138
+ * @since 2.1.0
139
+ */
140
+ public function disable_opt_in_notice() {
141
+ $this->update_option( 'show_opt_in_notice', false );
142
+ }
143
+
144
+ /**
145
+ * Checks if a GDPR opt-in message needs to be shown to the current admin.
146
+ *
147
+ * @author Vova Feldman (@svovaf)
148
+ * @since 2.1.0
149
+ *
150
+ * @return bool
151
+ */
152
+ public function should_show_opt_in_notice() {
153
+ return (
154
+ ! isset( $this->_data['show_opt_in_notice'] ) ||
155
+ true === $this->_data['show_opt_in_notice']
156
+ );
157
+ }
158
+
159
+ /**
160
+ * Get the last time the GDPR opt-in notice was shown.
161
+ *
162
+ * @author Vova Feldman (@svovaf)
163
+ * @since 2.1.0
164
+ *
165
+ * @return false|int
166
+ */
167
+ public function last_time_notice_was_shown() {
168
+ return isset( $this->_data['notice_shown_at'] ) ?
169
+ $this->_data['notice_shown_at'] :
170
+ false;
171
+ }
172
+
173
+ /**
174
+ * Update the timestamp of the last time the GDPR opt-in message was shown to now.
175
+ *
176
+ * @author Vova Feldman (@svovaf)
177
+ * @since 2.1.0
178
+ */
179
+ public function notice_was_just_shown() {
180
+ $this->update_option( 'notice_shown_at', WP_FS__SCRIPT_START_TIME );
181
+ }
182
+
183
+ /**
184
+ * @param string $message
185
+ * @param string|null $plugin_title
186
+ *
187
+ * @author Vova Feldman (@svovaf)
188
+ * @since 2.1.0
189
+ */
190
+ public function add_opt_in_sticky_notice( $message, $plugin_title = null ) {
191
+ $this->_notices->add_sticky(
192
+ $message,
193
+ "gdpr_optin_actions_{$this->_wp_user_id}",
194
+ '',
195
+ 'promotion',
196
+ true,
197
+ $this->_wp_user_id,
198
+ $plugin_title,
199
+ true
200
+ );
201
+ }
202
  }
freemius/includes/managers/class-fs-key-value-storage.php CHANGED
@@ -1,392 +1,402 @@
1
- <?php
2
- /**
3
- * @package Freemius
4
- * @copyright Copyright (c) 2015, Freemius, Inc.
5
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
6
- * @since 1.0.7
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Class FS_Key_Value_Storage
15
- *
16
- * @property int $install_timestamp
17
- * @property int $activation_timestamp
18
- * @property int $sync_timestamp
19
- * @property object $sync_cron
20
- * @property int $install_sync_timestamp
21
- * @property array $connectivity_test
22
- * @property array $is_on
23
- * @property object $trial_plan
24
- * @property bool $has_trial_plan
25
- * @property bool $trial_promotion_shown
26
- * @property string $sdk_version
27
- * @property string $sdk_last_version
28
- * @property bool $sdk_upgrade_mode
29
- * @property bool $sdk_downgrade_mode
30
- * @property bool $plugin_upgrade_mode
31
- * @property bool $plugin_downgrade_mode
32
- * @property string $plugin_version
33
- * @property string $plugin_last_version
34
- * @property bool $is_plugin_new_install
35
- * @property bool $was_plugin_loaded
36
- * @property object $plugin_main_file
37
- * @property bool $prev_is_premium
38
- * @property array $is_anonymous
39
- * @property bool $is_pending_activation
40
- * @property bool $sticky_optin_added
41
- * @property object $uninstall_reason
42
- * @property object $subscription
43
- */
44
- class FS_Key_Value_Storage implements ArrayAccess, Iterator, Countable {
45
- /**
46
- * @var string
47
- */
48
- protected $_id;
49
-
50
- /**
51
- * @since 1.2.2
52
- *
53
- * @var string
54
- */
55
- protected $_secondary_id;
56
-
57
- /**
58
- * @since 2.0.0
59
- * @var int The ID of the blog that is associated with the current site level options.
60
- */
61
- private $_blog_id = 0;
62
-
63
- /**
64
- * @since 2.0.0
65
- * @var bool
66
- */
67
- private $_is_multisite_storage;
68
-
69
- /**
70
- * @var array
71
- */
72
- protected $_data;
73
-
74
- /**
75
- * @var FS_Key_Value_Storage[]
76
- */
77
- private static $_instances = array();
78
-
79
- /**
80
- * @var FS_Logger
81
- */
82
- protected $_logger;
83
-
84
- /**
85
- * @param string $id
86
- * @param string $secondary_id
87
- * @param bool $network_level_or_blog_id
88
- *
89
- * @return FS_Key_Value_Storage
90
- */
91
- static function instance( $id, $secondary_id, $network_level_or_blog_id = false ) {
92
- $key = $id . ':' . $secondary_id;
93
-
94
- if ( is_multisite() ) {
95
- if ( true === $network_level_or_blog_id ) {
96
- $key .= ':ms';
97
- } else if ( is_numeric( $network_level_or_blog_id ) && $network_level_or_blog_id > 0 ) {
98
- $key .= ":{$network_level_or_blog_id}";
99
- } else {
100
- $network_level_or_blog_id = get_current_blog_id();
101
-
102
- $key .= ":{$network_level_or_blog_id}";
103
- }
104
- }
105
-
106
- if ( ! isset( self::$_instances[ $key ] ) ) {
107
- self::$_instances[ $key ] = new FS_Key_Value_Storage( $id, $secondary_id, $network_level_or_blog_id );
108
- }
109
-
110
- return self::$_instances[ $key ];
111
- }
112
-
113
- protected function __construct( $id, $secondary_id, $network_level_or_blog_id = false ) {
114
- $this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $secondary_id . '_' . $id, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
115
-
116
- $this->_id = $id;
117
- $this->_secondary_id = $secondary_id;
118
-
119
- if ( is_multisite() ) {
120
- $this->_is_multisite_storage = ( true === $network_level_or_blog_id );
121
-
122
- if ( is_numeric( $network_level_or_blog_id ) ) {
123
- $this->_blog_id = $network_level_or_blog_id;
124
- }
125
- } else {
126
- $this->_is_multisite_storage = false;
127
- }
128
-
129
- $this->load();
130
- }
131
-
132
- protected function get_option_manager() {
133
- return FS_Option_Manager::get_manager(
134
- WP_FS__ACCOUNTS_OPTION_NAME,
135
- true,
136
- $this->_is_multisite_storage ?
137
- true :
138
- ( $this->_blog_id > 0 ? $this->_blog_id : false )
139
- );
140
- }
141
-
142
- protected function get_all_data() {
143
- return $this->get_option_manager()->get_option( $this->_id, array() );
144
- }
145
-
146
- /**
147
- * Load plugin data from local DB.
148
- *
149
- * @author Vova Feldman (@svovaf)
150
- * @since 1.0.7
151
- */
152
- function load() {
153
- $all_plugins_data = $this->get_all_data();
154
- $this->_data = isset( $all_plugins_data[ $this->_secondary_id ] ) ?
155
- $all_plugins_data[ $this->_secondary_id ] :
156
- array();
157
- }
158
-
159
- /**
160
- * @author Vova Feldman (@svovaf)
161
- * @since 1.0.7
162
- *
163
- * @param string $key
164
- * @param mixed $value
165
- * @param bool $flush
166
- */
167
- function store( $key, $value, $flush = true ) {
168
- if ( $this->_logger->is_on() ) {
169
- $this->_logger->entrance( $key . ' = ' . var_export( $value, true ) );
170
- }
171
-
172
- if ( array_key_exists( $key, $this->_data ) && $value === $this->_data[ $key ] ) {
173
- // No need t