Gallery – Photo Gallery – Image Gallery - Version 2.5.2

Version Description

Download this release

Release Info

Developer giucu91
Plugin Icon wp plugin Gallery – Photo Gallery – Image Gallery
Version 2.5.2
Comparing to
See all releases

Code changes from version 2.5.1 to 2.5.2

Modula.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: https://wp-modula.com/
5
  * Description: Modula is the most powerful, user-friendly WordPress gallery plugin. Add galleries, masonry grids and more in a few clicks.
6
  * Author: WPChill
7
- * Version: 2.5.1
8
  * Author URI: https://www.wpchill.com/
9
  * License: GPLv3 or later
10
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -47,7 +47,7 @@
47
  * @since 2.0.2
48
  */
49
 
50
- define( 'MODULA_LITE_VERSION' , '2.5.1' );
51
  define( 'MODULA_PATH' , plugin_dir_path( __FILE__ ) );
52
  define( 'MODULA_URL' , plugin_dir_url( __FILE__ ) );
53
  defined( 'MODULA_PRO_STORE_URL' ) || define( 'MODULA_PRO_STORE_URL' , 'https://wp-modula.com' );
4
  * Plugin URI: https://wp-modula.com/
5
  * Description: Modula is the most powerful, user-friendly WordPress gallery plugin. Add galleries, masonry grids and more in a few clicks.
6
  * Author: WPChill
7
+ * Version: 2.5.2
8
  * Author URI: https://www.wpchill.com/
9
  * License: GPLv3 or later
10
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
47
  * @since 2.0.2
48
  */
49
 
50
+ define( 'MODULA_LITE_VERSION' , '2.5.2' );
51
  define( 'MODULA_PATH' , plugin_dir_path( __FILE__ ) );
52
  define( 'MODULA_URL' , plugin_dir_url( __FILE__ ) );
53
  defined( 'MODULA_PRO_STORE_URL' ) || define( 'MODULA_PRO_STORE_URL' , 'https://wp-modula.com' );
assets/css/admin/edit.css CHANGED
@@ -1,5 +1,5 @@
1
- .post-type-modula-gallery .wrap h1.wp-heading-inline,
2
- .post-type-modula-gallery .wrap > .page-title-action {
3
  display: none;
4
  }
5
  .post-type-modula-gallery .wrap .nav-tab-wrapper .page-title-action {
@@ -8,16 +8,16 @@
8
 
9
  /* Copy Shortcode */
10
  .modula-copy-shortcode {
11
- display: flex;
12
- align-items: center;
13
- flex-wrap: wrap;
14
  }
15
  .modula-copy-shortcode input {
16
- margin:0;
17
- border-top-right-radius: 0;
18
  border-bottom-right-radius: 0;
19
- flex-grow:1;
20
- width:calc(100% - 60px);
21
  }
22
  .modula-copy-shortcode span {
23
  width: 100%;
@@ -32,5 +32,183 @@
32
  }
33
 
34
  tbody#the-list .no-items {
35
- text-align:center;
36
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .post-type-modula-gallery:not( .single-modula-gallery ) .wrap h1.wp-heading-inline,
2
+ .post-type-modula-gallery:not( .single-modula-gallery ) .wrap > .page-title-action {
3
  display: none;
4
  }
5
  .post-type-modula-gallery .wrap .nav-tab-wrapper .page-title-action {
8
 
9
  /* Copy Shortcode */
10
  .modula-copy-shortcode {
11
+ display: flex;
12
+ align-items: center;
13
+ flex-wrap: wrap;
14
  }
15
  .modula-copy-shortcode input {
16
+ margin: 0;
17
+ border-top-right-radius: 0;
18
  border-bottom-right-radius: 0;
19
+ flex-grow: 1;
20
+ width: calc(100% - 60px);
21
  }
22
  .modula-copy-shortcode span {
23
  width: 100%;
32
  }
33
 
34
  tbody#the-list .no-items {
35
+ text-align: center;
36
  }
37
+
38
+ @keyframes modula-modal__fade-in-animation {
39
+ from {
40
+ opacity: 0;
41
+ }
42
+ to {
43
+ opacity: 1;
44
+ }
45
+ }
46
+
47
+ @keyframes modula-modal__appear-animation {
48
+ from {
49
+ margin-top: 32px;
50
+ }
51
+ to {
52
+ margin-top: 0;
53
+ }
54
+ }
55
+
56
+ .modula-modal__overlay {
57
+ position: fixed;
58
+ top: 0;
59
+ bottom: 0;
60
+ left: 0;
61
+ right: 0;
62
+ display: flex;
63
+ justify-content: center;
64
+ align-items: center;
65
+ background-color: rgba(0, 0, 0, 0.35);
66
+ z-index: 100000;
67
+ animation: modula-modal__fade-in-animation 0.2s ease-out 0s;
68
+ animation-fill-mode: forwards;
69
+ }
70
+
71
+ .modula-modal__frame {
72
+ position: relative;
73
+ box-sizing: border-box;
74
+ background: #fff;
75
+ width: 450px;
76
+ max-height: 90vh;
77
+ overflow: auto;
78
+ animation: modula-modal__appear-animation 0.1s ease-out;
79
+ animation-fill-mode: forwards;
80
+ box-shadow: 0 3px 30px rgb(0 0 0 / 20%);
81
+ }
82
+
83
+ @media screen and (max-width: 800px) {
84
+ .modula-modal__frame {
85
+ width: auto;
86
+ margin: 20px;
87
+ }
88
+ }
89
+
90
+ .modula-modal__header {
91
+ position: sticky;
92
+ top: 0;
93
+ left: 0;
94
+ right: 0;
95
+ }
96
+
97
+ .modula-modal__dismiss {
98
+ position: absolute;
99
+ top: 0;
100
+ right: 0;
101
+ display: inline-flex;
102
+ justify-content: center;
103
+ height: 36px;
104
+ min-width: 36px;
105
+ margin: 8px;
106
+ padding: 6px;
107
+ border: 0;
108
+ cursor: pointer;
109
+ -webkit-appearance: none;
110
+ background: none;
111
+ transition: box-shadow 0.1s linear;
112
+ border-radius: 2px;
113
+ }
114
+
115
+ .modula-modal__dismiss:focus {
116
+ box-shadow: 0 0 0 2px #007cba;
117
+ outline: 3px solid transparent;
118
+ }
119
+
120
+ .modula-modal__dismiss:hover svg {
121
+ fill: #2271b1;
122
+ }
123
+
124
+ .modula-modal__body {
125
+ padding: 40px 25px 40px;
126
+ }
127
+
128
+ @media screen and (max-width: 800px) {
129
+ .modula-modal__body {
130
+ padding: 30px 30px 40px;
131
+ }
132
+ }
133
+
134
+
135
+ .modula-upsells-carousel-wrapper-modal{
136
+ position: relative;
137
+ display:flex;
138
+ }
139
+
140
+ .modula-upsells-carousel-modal {
141
+ /*animation: carousel 20s infinite;*/
142
+ flex-shrink: 0;
143
+ position: relative;
144
+ /* display:flex;*/
145
+ display:block;
146
+ width:100%;
147
+ }
148
+
149
+ .modula-upsells-carousel-modal .modula-upsell-item-modal {
150
+ position: relative;
151
+ width:100%;
152
+ flex-shrink: 0;
153
+ margin-top:0;
154
+
155
+ }
156
+
157
+ .modula-upsells-carousel-modal .modula-upsell-item-modal {
158
+ text-align: center;
159
+ }
160
+
161
+ .modula-upsells-carousel-modal .modula-upsell-item-modal ul.modula-upsells-list-modal {
162
+ padding-left:40px;
163
+ }
164
+
165
+ .modula-upsells-carousel-modal .modula-upsell-item-modal ul li {
166
+ position: relative;
167
+ list-style-type: none !important;
168
+ text-align:left;
169
+ }
170
+
171
+ #modula-albums-upsell-modal .modula-upsells-carousel-modal .modula-upsell-item-modal ul li {
172
+ display: inline-block;
173
+ margin: 0px 15px 15px 35px;
174
+ }
175
+
176
+ .modula-upsells-carousel-modal .modula-upsell-item-modal ul li:before {
177
+ font-family: Dashicons;
178
+ content: "\f147";
179
+ position: absolute;
180
+ left: -30px;
181
+ font-size: 14px;
182
+ color: green;
183
+ background-color: #FFF;
184
+ padding: 0 3px;
185
+ border-radius: 50%;
186
+ border: 1px solid #DDD;
187
+ top: -1px;
188
+ }
189
+
190
+
191
+ .modula-upsell-modal ul.modula-upsell-features li span.modula-check {
192
+ display: inline-block;
193
+ color: green;
194
+ background-color: #FFF;
195
+ border-radius: 50%;
196
+ border: 1px solid #DDD;
197
+ display: inline-block;
198
+ margin-right: 5px;
199
+ }
200
+ .modula-upsell-modal {
201
+ border: 0;
202
+ padding: 15px 0;
203
+ }
204
+
205
+
206
+ .modula-upsell-modal .button:first-child {
207
+ margin-right: 10px;
208
+ }
209
+
210
+ .modula-upsell-modal .button {
211
+ height: 31px;
212
+ line-height: 31px;
213
+ font-weight: bold;
214
+ }
assets/css/admin/modula-cpt.css CHANGED
@@ -30,7 +30,9 @@
30
  display: inline-block;
31
  line-height: 1;
32
  position: relative;
33
- top: -2px;
 
 
34
  }
35
  .modula-settings-container .modula-tabs .modula-tab:hover sup,
36
  .modula-settings-container .modula-tabs .modula-tab.active-tab sup {
@@ -324,7 +326,7 @@ tr label.th-label {
324
  .modula .modula-items .modula-item p {
325
  margin:0;
326
  padding: 0;
327
- }
328
  .modula .figc {
329
  color: black;
330
  text-align: center;
@@ -372,7 +374,7 @@ html body .modula.modula-gallery .modula-items .jtg-social {
372
  }
373
 
374
  .modula .modula-items .jtg-social a:last-of-type {
375
- margin-right: 0;
376
  }
377
 
378
  .modula .modula-item.effect-pufrobo p.description {
@@ -396,7 +398,7 @@ html body .modula.modula-gallery .modula-items .jtg-social {
396
  .modula .modula-item { background-color:#000; }
397
 
398
  .modula .modula-item.effect-pufrobo p {
399
- bottom: 20%;
400
  line-height: 1.5;
401
  -webkit-transform: translate3d(0,100%,0);
402
  transform: translate3d(0,100%,0);
@@ -1613,7 +1615,7 @@ Scaling Effect Preview
1613
  padding: 0 12px 2.5px!important;
1614
  }
1615
 
1616
- .shortcode-description {
1617
  margin: 10px 0 0 0;
1618
  border-bottom: 1px solid #DDD;
1619
  color: #696969;
30
  display: inline-block;
31
  line-height: 1;
32
  position: relative;
33
+ /* top: -2px; */
34
+ float: right;
35
+ top: 4px;
36
  }
37
  .modula-settings-container .modula-tabs .modula-tab:hover sup,
38
  .modula-settings-container .modula-tabs .modula-tab.active-tab sup {
326
  .modula .modula-items .modula-item p {
327
  margin:0;
328
  padding: 0;
329
+ }
330
  .modula .figc {
331
  color: black;
332
  text-align: center;
374
  }
375
 
376
  .modula .modula-items .jtg-social a:last-of-type {
377
+ margin-right: 0;
378
  }
379
 
380
  .modula .modula-item.effect-pufrobo p.description {
398
  .modula .modula-item { background-color:#000; }
399
 
400
  .modula .modula-item.effect-pufrobo p {
401
+ bottom: 20%;
402
  line-height: 1.5;
403
  -webkit-transform: translate3d(0,100%,0);
404
  transform: translate3d(0,100%,0);
1615
  padding: 0 12px 2.5px!important;
1616
  }
1617
 
1618
+ .shortcode-description {
1619
  margin: 10px 0 0 0;
1620
  border-bottom: 1px solid #DDD;
1621
  color: #696969;
assets/css/admin/modula-gutenberg.css CHANGED
@@ -1,2 +1,2 @@
1
- html body .modula-block-preview{background:#f3f3f5;border-radius:6px;position:relative;overflow:hidden}html body .modula-block-preview .components-spinner{display:block;float:none;margin:0 auto}html body .modula-block-preview .modula-block-preview__content{width:100%;max-width:400px;margin:40px auto;text-align:center}html body .modula-block-preview .modula-block-preview__content select.components-select-control__input{min-height:40px;line-height:20px}.modula-block-preview__logo{width:100%;height:60px;background:url(../../images/block-preview-bg.svg) no-repeat 50% 0%;background-size:75%}.modula-block-preview--images{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-left:-1%;margin-right:-1%}.modula-preview-image-wrap{width:23%;height:0px;padding-bottom:23%;position:relative;margin:1%}.modula-preview-image-wrap img{position:absolute;left:0;top:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.modula-appender-media{height:60px}.modula-preview-image-wrap{width:31%;padding-bottom:23%;position:relative;margin:1%;height:200px}.modula-preview-image-wrap .modula-button{width:40px}.modula-items{width:100%}.modula-item-content img.pic{height:auto}.modula-button-group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:0 auto}.modula-button{margin:0px;background:white;color:black !important;height:50px;font-size:14px;box-shadow:none;border:1px solid #e3e5e5;position:relative;width:calc(100% + 20px)}.modula-button svg{position:absolute;right:5px}.modula-button:hover{color:#478DB6 !important;text-decoration:underline !important}html body .modula-button-group .modula-button-upsell:hover{text-decoration:underline;color:black !important}html body .modula-button-group .modula-button-upsell{margin:0px;background:#3FBF90;color:black;height:50px;font-size:14px;width:calc(100% + 20px)}
2
 
1
+ html body .modula-block-preview{background:#f3f3f5;border-radius:6px;position:relative;overflow:hidden;height:250px}html body .modula-block-preview .components-spinner{display:block;float:none;margin:0 auto}html body .modula-block-preview .modula-block-preview__content{width:100%;max-width:400px;margin:40px auto;text-align:center}html body .modula-block-preview .modula-block-preview__content select.components-select-control__input{min-height:40px;line-height:20px}html body .modula-block-preview .modula-gallery-input{text-align:left}html body .modula-block-preview .modula-gallery-input .selectize-dropdown-content{max-height:100px}html body .modula-block-preview .modula-gallery-input .selectize-input::after{content:'';border:0}.modula-block-preview__logo{width:100%;height:60px;background:url(../../images/block-preview-bg.svg) no-repeat 50% 0%;background-size:75%}.modula-block-preview--images{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-left:-1%;margin-right:-1%}.modula-preview-image-wrap{width:23%;height:0px;padding-bottom:23%;position:relative;margin:1%}.modula-preview-image-wrap img{position:absolute;left:0;top:0;width:100%;height:100%;object-fit:cover}.modula-appender-media{height:60px}.modula-preview-image-wrap{width:31%;padding-bottom:23%;position:relative;margin:1%;height:200px}.modula-preview-image-wrap .modula-button{width:40px}.modula-items{width:100%}.modula-item-content img.pic{height:auto}.modula-button-group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:0 auto}.modula-button{margin:0px;background:white;color:black !important;height:50px;font-size:14px;box-shadow:none;border:1px solid #e3e5e5;position:relative;width:calc(100% + 20px)}.modula-button svg{position:absolute;right:5px}.modula-button:hover{color:#478DB6 !important;text-decoration:underline !important}html body .modula-button-group .modula-button-upsell:hover{text-decoration:underline;color:black !important}html body .modula-button-group .modula-button-upsell{margin:0px;background:#3FBF90;color:black;height:50px;font-size:14px;width:calc(100% + 20px)}
2
 
assets/css/admin/welcome.css CHANGED
@@ -15,6 +15,11 @@
15
 
16
  /* Lite vs PRO Section */
17
 
 
 
 
 
 
18
  .lite-vs-pro-section .wp-badge{
19
  display:inline-block;
20
  vertical-align:middle;
@@ -29,6 +34,127 @@
29
  margin:0 2.5% 0 25px;
30
  }
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  .featured-section.features .row {
33
  display: inline-block;
34
  width: 97%;
@@ -148,4 +274,51 @@
148
 
149
  .modula-license-label p.red strong {
150
  color:red;
151
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  /* Lite vs PRO Section */
17
 
18
+ body.modula-gallery_page_modula-lite-vs-pro #wpcontent .wrap {
19
+ margin : 0 auto;
20
+ max-width : 85%;
21
+ }
22
+
23
  .lite-vs-pro-section .wp-badge{
24
  display:inline-block;
25
  vertical-align:middle;
34
  margin:0 2.5% 0 25px;
35
  }
36
 
37
+ .wpchill-plans-table {
38
+ display : flex;
39
+ }
40
+
41
+ .wpchill-plans-table.table-header {
42
+ margin-top : 50px;
43
+ }
44
+
45
+ .wpchill-plans-table.table-header .wpchill-pricing-package:last-child:before {
46
+ content : '';
47
+ width : auto;
48
+ display : inline-block;
49
+ opacity : 1;
50
+ position : absolute;
51
+ top : -1px;
52
+ background : #41495b;
53
+ text-align : center;
54
+ left : 0;
55
+ right : 0;
56
+ color : #fff;
57
+ font-size : 15px;
58
+ text-transform : uppercase;
59
+ padding : 10px 5px;
60
+ transform : translateY(-100%);
61
+ }
62
+
63
+ .wpchill-plans-table .wpchill-pricing-package {
64
+ text-align : center;
65
+ border-left : 1px solid #ebebeb;
66
+ border-top : 1px solid #ebebeb;
67
+ line-height : 1.5;
68
+ height : 50px;
69
+ display : -ms-flexbox;
70
+ display : flex;
71
+ -ms-flex-align : center;
72
+ align-items : center;
73
+ -ms-flex-pack : center;
74
+ justify-content : center;
75
+ padding-left : 10px;
76
+ padding-right : 10px;
77
+ background : #fff;
78
+ }
79
+
80
+ .wpchill-plans-table .wpchill-pricing-package.wpchill-title {
81
+ font-weight : 400;
82
+ color : #666;
83
+ font-size : 1.25rem;
84
+ height : auto;
85
+ -ms-flex-direction : column;
86
+ flex-direction : column;
87
+ padding-top : 30px;
88
+ padding-bottom : 30px;
89
+ justify-content : space-between;
90
+ position : relative;
91
+ }
92
+
93
+ .wpchill-plans-table .wpchill-pricing-package.wpchill-title.wpchill-modula-lite {
94
+ justify-content: center;
95
+ }
96
+
97
+ .wpchill-plans-table .wpchill-pricing-package.wpchill-title p.description {
98
+ font-style : italic;
99
+ font-size : 13px;
100
+ margin-bottom: 40px;
101
+ }
102
+
103
+ .wpchill-plans-table .wpchill-pricing-package.wpchill-title .wpchill-price p:last-child {
104
+ font-size : 30px;
105
+ margin: 0 0 40px 0;
106
+ }
107
+ .wpchill-plans-table .wpchill-pricing-package.wpchill-title .wpchill-price p.old-price {
108
+ margin: 0;
109
+ position: relative;
110
+ }
111
+
112
+ .wpchill-plans-table .wpchill-pricing-package.wpchill-title .wpchill-price p.old-price:after {
113
+ content: "";
114
+ height: 2px;
115
+ width: 60px;
116
+ background: red;
117
+ display: block;
118
+ position: absolute;
119
+ left: 50%;
120
+ top: 52%;
121
+ transform: translate(-50%,-50%);
122
+ }
123
+
124
+ .wpchill-plans-table .wpchill-pricing-package.wpchill-title p.wpchill-name {
125
+ margin : 0;
126
+ font-size : 36px;
127
+ }
128
+
129
+ .wpchill-plans-table .wpchill-pricing-package.wpchill-title p.wpchill-price sup {
130
+ top: 2px;
131
+ position: relative;
132
+ font-size: 15px;
133
+ }
134
+
135
+ .wpchill-plans-table .wpchill-pricing-package.wpchill-empty {
136
+ background : transparent;
137
+ border-color : transparent;
138
+ }
139
+
140
+ .wpchill-plans-table .wpchill-pricing-package.feature-name {
141
+ justify-content : space-between;
142
+ font-weight : 700;
143
+ text-align : left;
144
+ }
145
+
146
+ .wpchill-plans-table .wpchill-pricing-package .dashicons-saved {
147
+ color : green;
148
+ }
149
+
150
+ .wpchill-plans-table .wpchill-pricing-package .dashicons-no-alt {
151
+ color : #cdcdcd;
152
+ }
153
+
154
+ /**
155
+ Featured section
156
+ */
157
+
158
  .featured-section.features .row {
159
  display: inline-block;
160
  width: 97%;
274
 
275
  .modula-license-label p.red strong {
276
  color:red;
277
+ }
278
+
279
+ /* Tabs tooltips */
280
+ .modula-tooltip {
281
+ position: relative;
282
+ display: inline-block;
283
+ float: left;
284
+ margin-right: 10px;
285
+ }
286
+
287
+ .modula-tooltip > span {
288
+ cursor: pointer;
289
+ color: #0073aa;
290
+ text-decoration: underline;
291
+ margin-left: 5px;
292
+ }
293
+
294
+ .modula-tooltip .modula-tooltip-content {
295
+ display: none;
296
+ position: absolute;
297
+ top: 50%;
298
+ right: -10px;
299
+ transform: translate( 100% ,-50% );
300
+ width: 300px;
301
+ background: #000;
302
+ color: #fff;
303
+ padding: 10px;
304
+ box-sizing: border-box;
305
+ z-index: 99;
306
+ }
307
+
308
+ .modula-tooltip .modula-tooltip-content:before {
309
+ content: '';
310
+ width: 0px;
311
+ height: 0px;
312
+ border-style: solid;
313
+ border-width: 8px 8px 8px 0;
314
+ border-color: transparent #000 transparent transparent;
315
+ display: block;
316
+ position: absolute;
317
+ top: 50%;
318
+ left: -8px;
319
+ transform: translateY( -50% );
320
+ }
321
+
322
+ .modula-tooltip:hover .modula-tooltip-content {
323
+ display: block;
324
+ }
assets/css/front.css CHANGED
@@ -1,2 +1,2 @@
1
  html body .compensate-for-scrollbar{overflow:hidden}html body .modula-fancybox-active{height:auto}html body .modula-fancybox-is-hidden{left:-9999px;margin:0;position:absolute!important;top:-9999px;visibility:hidden}html body .modula-fancybox-container{-webkit-backface-visibility:hidden;height:100%;left:0;outline:0;position:fixed;-webkit-tap-highlight-color:transparent;top:0;-ms-touch-action:manipulation;touch-action:manipulation;transform:translateZ(0);width:100%;z-index:99992}html body .modula-fancybox-container *{box-sizing:border-box}html body .modula-fancybox-bg,html body .modula-fancybox-inner,html body .modula-fancybox-outer,html body .modula-fancybox-stage{bottom:0;left:0;position:absolute;right:0;top:0}html body .modula-fancybox-outer{-webkit-overflow-scrolling:touch;overflow-y:auto}html body .modula-fancybox-bg{background:#1e1e1e;opacity:0;transition-duration:inherit;transition-property:opacity;transition-timing-function:cubic-bezier(.47,0,.74,.71)}html body .modula-fancybox-is-open .modula-fancybox-bg{opacity:.9;transition-timing-function:cubic-bezier(.22,.61,.36,1)}html body .modula-fancybox-container .modula-fancybox-caption,html body .modula-fancybox-container .modula-fancybox-infobar,html body .modula-fancybox-container .modula-fancybox-navigation .modula-fancybox-button,html body .modula-fancybox-container .modula-fancybox-toolbar{direction:ltr;opacity:0;position:absolute;transition:opacity .25s ease,visibility 0s ease .25s;visibility:hidden;z-index:99997}html body .modula-fancybox-show-caption .modula-fancybox-caption,html body .modula-fancybox-show-infobar .modula-fancybox-infobar,html body .modula-fancybox-show-nav .modula-fancybox-navigation .modula-fancybox-button,html body .modula-fancybox-show-toolbar .modula-fancybox-toolbar{opacity:1;transition:opacity .25s ease 0s,visibility 0s ease 0s;visibility:visible}html body .modula-fancybox-container .modula-fancybox-infobar{color:#ccc;font-size:13px;-webkit-font-smoothing:subpixel-antialiased;height:44px;left:0;line-height:44px;min-width:44px;mix-blend-mode:difference;padding:0 10px;pointer-events:none;top:0;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}html body .modula-fancybox-container .modula-fancybox-toolbar{right:0;top:0}html body .modula-fancybox-stage{direction:ltr;overflow:visible;transform:translateZ(0);z-index:99994}html body .modula-fancybox-is-open .modula-fancybox-stage{overflow:hidden}html body .modula-fancybox-slide{-webkit-backface-visibility:hidden;display:none;height:100%;left:0;outline:0;overflow:auto;-webkit-overflow-scrolling:touch;padding:44px;position:absolute;text-align:center;top:0;transition-property:transform,opacity;white-space:normal;width:100%;z-index:99994}html body .modula-fancybox-slide::before{content:'';display:inline-block;font-size:0;height:100%;vertical-align:middle;width:0}html body .modula-fancybox-is-sliding .modula-fancybox-slide,html body .modula-fancybox-slide--current,html body .modula-fancybox-slide--next,html body .modula-fancybox-slide--previous{display:block}html body .modula-fancybox-slide--image{overflow:hidden;padding:44px 0}html body .modula-fancybox-slide--image::before{display:none}html body .modula-fancybox-slide--html{padding:6px}html body .modula-fancybox-content{background:#fff;display:inline-block;margin:0;max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch;padding:44px;position:relative;text-align:left;vertical-align:middle}html body .modula-fancybox-slide--image .modula-fancybox-content{animation-timing-function:cubic-bezier(.5,0,.14,1);-webkit-backface-visibility:hidden;background:0 0;background-repeat:no-repeat;background-size:100% 100%;left:0;max-width:none;overflow:visible;padding:0;position:absolute;top:0;-ms-transform-origin:top left;transform-origin:top left;transition-property:transform,opacity;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:99995}html body .modula-fancybox-can-zoomOut .modula-fancybox-content{cursor:zoom-out}html body .modula-fancybox-can-zoomIn .modula-fancybox-content{cursor:zoom-in}html body .modula-fancybox-can-pan .modula-fancybox-content,html body .modula-fancybox-can-swipe .modula-fancybox-content{cursor:-webkit-grab;cursor:grab}html body .modula-fancybox-is-grabbing .modula-fancybox-content{cursor:-webkit-grabbing;cursor:grabbing}html body .modula-fancybox-container [data-selectable=true]{cursor:text}html body .modula-fancybox-image,html body .modula-fancybox-spaceball{background:0 0;border:0;height:100%;left:0;margin:0;max-height:none;max-width:none;padding:0;position:absolute;top:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}html body .modula-fancybox-spaceball{z-index:1}html body .modula-fancybox-slide--iframe .modula-fancybox-content,html body .modula-fancybox-slide--map .modula-fancybox-content,html body .modula-fancybox-slide--pdf .modula-fancybox-content,html body .modula-fancybox-slide--video .modula-fancybox-content{height:100%;overflow:visible;padding:0;width:100%}html body .modula-fancybox-slide--video .modula-fancybox-content{background:#000}html body .modula-fancybox-slide--map .modula-fancybox-content{background:#e5e3df}html body .modula-fancybox-slide--iframe .modula-fancybox-content{background:#fff}html body .modula-fancybox-iframe,html body .modula-fancybox-video{background:0 0;border:0;display:block;height:100%;margin:0;overflow:hidden;padding:0;width:100%}html body .modula-fancybox-iframe{left:0;position:absolute;top:0}html body .modula-fancybox-error{background:#fff;cursor:default;max-width:400px;padding:40px;width:100%}html body .modula-fancybox-error p{color:#444;font-size:16px;line-height:20px;margin:0;padding:0}html body .modula-fancybox-container .modula-fancybox-button{background:rgba(30,30,30,.6);border:0;border-radius:0;box-shadow:none;cursor:pointer;display:inline-block;height:44px;margin:0;padding:10px;position:relative;transition:color .2s;vertical-align:top;visibility:inherit;width:44px}html body .modula-fancybox-container .modula-fancybox-button,html body .modula-fancybox-container .modula-fancybox-button:link,html body .modula-fancybox-container .modula-fancybox-button:visited{color:#ccc}html body .modula-fancybox-container .modula-fancybox-button:hover{color:#fff;box-shadow:none}html body .modula-fancybox-container .modula-fancybox-button:focus{outline:0}html body .modula-fancybox-container .modula-fancybox-button.modula-fancybox-focus{outline:1px dotted}html body .modula-fancybox-container .modula-fancybox-button[disabled],html body .modula-fancybox-container .modula-fancybox-button[disabled]:hover{color:#888;cursor:default;outline:0}html body .modula-fancybox-container .modula-fancybox-button div{height:100%}html body .modula-fancybox-container .modula-fancybox-button svg{display:block;height:100%;overflow:visible;position:relative;width:100%}html body .modula-fancybox-container .modula-fancybox-button svg path{fill:currentColor;stroke-width:0}html body .modula-fancybox-container .modula-fancybox-button--fsenter svg:nth-child(2),html body .modula-fancybox-container .modula-fancybox-button--play svg:nth-child(2){display:none}html body .modula-fancybox-container .modula-fancybox-button--fsexit svg:nth-child(1),html body .modula-fancybox-container .modula-fancybox-button--pause svg:nth-child(1){display:none}html body .modula-fancybox-container .modula-fancybox-progress{background:#ff5268;height:2px;left:0;position:absolute;right:0;top:0;-ms-transform:scaleX(0);transform:scaleX(0);-ms-transform-origin:0;transform-origin:0;transition-property:transform;transition-timing-function:linear;z-index:99998}html body .modula-fancybox-container .modula-fancybox-close-small{background:0 0;border:0;border-radius:0;color:#ccc;cursor:pointer;opacity:.8;padding:8px;position:absolute;right:-12px;top:-44px;z-index:401}html body .modula-fancybox-container .modula-fancybox-close-small:hover{color:#fff;opacity:1}html body .modula-fancybox-container .modula-fancybox-stage .modula-fancybox-slide--html .modula-fancybox-close-small{color:#000;padding:10px;right:0;top:0;background-color:transparent}html body .modula-fancybox-slide--image.modula-fancybox-is-scaling .modula-fancybox-content{overflow:hidden}html body .modula-fancybox-is-scaling .modula-fancybox-close-small,html body .modula-fancybox-is-zoomable.modula-fancybox-can-pan .modula-fancybox-close-small{display:none}html body .modula-fancybox-navigation .modula-fancybox-button{background-clip:content-box;height:100px;opacity:0;position:absolute;top:calc(50% - 50px);width:70px}html body .modula-fancybox-navigation .modula-fancybox-button div{padding:7px}html body .modula-fancybox-navigation .modula-fancybox-button--arrow_left{left:0;left:env(safe-area-inset-left);padding:31px 26px 31px 6px}html body .modula-fancybox-navigation .modula-fancybox-button--arrow_right{padding:31px 6px 31px 26px;right:0;right:env(safe-area-inset-right)}html body .modula-fancybox-caption{background:linear-gradient(to top,rgba(0,0,0,.85) 0,rgba(0,0,0,.3) 50%,rgba(0,0,0,.15) 65%,rgba(0,0,0,.075) 75.5%,rgba(0,0,0,.037) 82.85%,rgba(0,0,0,.019) 88%,rgba(0,0,0,0) 100%);bottom:0;color:#eee;font-size:14px;font-weight:400;left:0;line-height:1.5;padding:75px 44px 25px 44px;pointer-events:none;right:0;text-align:center;z-index:99996}@supports (padding:max(0px)){html body .modula-fancybox-caption{padding:75px max(44px,env(safe-area-inset-right)) max(25px,env(safe-area-inset-bottom)) max(44px,env(safe-area-inset-left))}}html body .modula-fancybox-caption--separate{margin-top:-50px}html body .modula-fancybox-caption__body{max-height:50vh;overflow:auto;pointer-events:all}html body .modula-fancybox-caption a,html body .modula-fancybox-caption a:link,html body .modula-fancybox-caption a:visited{color:#ccc;text-decoration:none}html body .modula-fancybox-caption a:hover{color:#fff;text-decoration:underline}html body .modula-fancybox-loading{animation:fancybox-rotate 1s linear infinite;background:0 0;border:4px solid #888;border-bottom-color:#fff;border-radius:50%;height:50px;left:50%;margin:-25px 0 0 -25px;opacity:.7;padding:0;position:absolute;top:50%;width:50px;z-index:99999}@keyframes fancybox-rotate{100%{transform:rotate(360deg)}}html body .modula-fancybox-animated{transition-timing-function:cubic-bezier(0,0,.25,1)}html body .modula-fancybox-fx-slide.modula-fancybox-slide--previous{opacity:0;transform:translate3d(-100%,0,0)}html body .modula-fancybox-fx-slide.modula-fancybox-slide--next{opacity:0;transform:translate3d(100%,0,0)}html body .modula-fancybox-fx-slide.modula-fancybox-slide--current{opacity:1;transform:translate3d(0,0,0)}html body .modula-fancybox-fx-fade.modula-fancybox-slide--next,html body .modula-fancybox-fx-fade.modula-fancybox-slide--previous{opacity:0;transition-timing-function:cubic-bezier(.19,1,.22,1)}html body .modula-fancybox-fx-fade.modula-fancybox-slide--current{opacity:1}html body .modula-fancybox-fx-zoom-in-out.modula-fancybox-slide--previous{opacity:0;transform:scale3d(1.5,1.5,1.5)}html body .modula-fancybox-fx-zoom-in-out.modula-fancybox-slide--next{opacity:0;transform:scale3d(.5,.5,.5)}html body .modula-fancybox-fx-zoom-in-out.modula-fancybox-slide--current{opacity:1;transform:scale3d(1,1,1)}html body .modula-fancybox-fx-rotate.modula-fancybox-slide--previous{opacity:0;-ms-transform:rotate(-360deg);transform:rotate(-360deg)}html body .modula-fancybox-fx-rotate.modula-fancybox-slide--next{opacity:0;-ms-transform:rotate(360deg);transform:rotate(360deg)}html body .modula-fancybox-fx-rotate.modula-fancybox-slide--current{opacity:1;-ms-transform:rotate(0);transform:rotate(0)}html body .modula-fancybox-fx-circular.modula-fancybox-slide--previous{opacity:0;transform:scale3d(0,0,0) translate3d(-100%,0,0)}html body .modula-fancybox-fx-circular.modula-fancybox-slide--next{opacity:0;transform:scale3d(0,0,0) translate3d(100%,0,0)}html body .modula-fancybox-fx-circular.modula-fancybox-slide--current{opacity:1;transform:scale3d(1,1,1) translate3d(0,0,0)}html body .modula-fancybox-fx-tube.modula-fancybox-slide--previous{transform:translate3d(-100%,0,0) scale(.1) skew(-10deg)}html body .modula-fancybox-fx-tube.modula-fancybox-slide--next{transform:translate3d(100%,0,0) scale(.1) skew(10deg)}html body .modula-fancybox-fx-tube.modula-fancybox-slide--current{transform:translate3d(0,0,0) scale(1)}@media all and (max-height:576px){html body .modula-fancybox-slide{padding-left:6px;padding-right:6px}html body .modula-fancybox-slide--image{padding:6px 0}html body .modula-fancybox-close-small{right:-6px}html body .modula-fancybox-slide--image .modula-fancybox-close-small{background:#4e4e4e;color:#f2f4f6;height:36px;opacity:1;padding:6px;right:0;top:0;width:36px}html body .modula-fancybox-caption{padding-left:12px;padding-right:12px}@supports (padding:max(0px)){html body .modula-fancybox-caption{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}}}html body .modula-fancybox-container .modula-fancybox-stage .modula-fancybox-share{background:#f4f4f4;border-radius:3px;max-width:90%;padding:30px;text-align:center}html body .modula-fancybox-container .modula-fancybox-stage .modula-fancybox-share h1{color:#222;font-size:35px;font-weight:700;margin:0 0 20px 0}.modula-fancybox-container .modula-fancybox-stage .modula-fancybox-share h1:after,.modula-fancybox-container .modula-fancybox-stage .modula-fancybox-share h1:before{display:none}html body .modula-fancybox-container .modula-fancybox-stage .modula-fancybox-share p{margin:0;padding:0}html body .modula-fancybox-container .modula-fancybox-stage .modula-fancybox-share__button{border:0;border-radius:3px;display:inline-block;font-size:14px;font-weight:700;line-height:40px;margin:0 5px 10px 5px;min-width:130px;padding:0 15px;text-decoration:none;transition:all .2s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}html body .modula-fancybox-container .modula-fancybox-stage .modula-fancybox-share__button:link,html body .modula-fancybox-container .modula-fancybox-stage .modula-fancybox-share__button:visited{color:#fff}html body .modula-fancybox-container .modula-fancybox-stage .modula-fancybox-share__button:hover{text-decoration:none}html body .modula-fancybox-share__button--fb{background:#3b5998}html body .modula-fancybox-share__button--fb:hover{background:#344e86}html body .modula-fancybox-share__button--pt{background:#bd081d}html body .modula-fancybox-share__button--pt:hover{background:#aa0719}html body .modula-fancybox-share__button--tw{background:#1da1f2}html body .modula-fancybox-share__button--tw:hover{background:#0d95e8}html body .modula-fancybox-share__button--email{background:#9c3}html body .modula-fancybox-share__button--email:hover{background:#7aa329}html body .modula-fancybox-share__button svg{height:25px;margin-right:7px;position:relative;top:-1px;vertical-align:middle;width:25px;display:inline-block}html body .modula-fancybox-container .modula-fancybox-stage .modula-fancybox-share__button svg path{fill:#fff}html body .modula-fancybox-container .modula-fancybox-stage .modula-fancybox-share .modula-fancybox-share__input{background:0 0;border:0;border-bottom:1px solid #d7d7d7;border-radius:0;color:#5d5b5b;font-size:14px;margin:10px 0 0 0;outline:0;padding:10px 15px;width:100%}html body .modula-fancybox-container .modula-fancybox-thumbs{background:#ddd;bottom:0;display:none;margin:0;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;padding:2px 2px 4px 2px;position:absolute;right:0;-webkit-tap-highlight-color:transparent;top:0;width:212px;z-index:99995}html body .modula-fancybox-thumbs-x{overflow-x:auto;overflow-y:hidden}html body .modula-fancybox-show-thumbs .modula-fancybox-thumbs{display:block}html body .modula-fancybox-show-thumbs .modula-fancybox-inner{right:212px}html body .modula-fancybox-thumbs__list{font-size:0;height:100%;list-style:none;margin:0;overflow-x:hidden;overflow-y:auto;padding:0;position:absolute;position:relative;white-space:nowrap;width:100%}html body .modula-fancybox-thumbs-x .modula-fancybox-thumbs__list{overflow:hidden}html body .modula-fancybox-thumbs-y .modula-fancybox-thumbs__list::-webkit-scrollbar{width:7px}html body .modula-fancybox-thumbs-y .modula-fancybox-thumbs__list::-webkit-scrollbar-track{background:#fff;border-radius:10px;box-shadow:inset 0 0 6px rgba(0,0,0,.3)}html body .modula-fancybox-thumbs-y .modula-fancybox-thumbs__list::-webkit-scrollbar-thumb{background:#2a2a2a;border-radius:10px}html body .modula-fancybox-thumbs__list a{-webkit-backface-visibility:hidden;backface-visibility:hidden;background-color:rgba(0,0,0,.1);background-position:center center;background-repeat:no-repeat;background-size:cover;cursor:pointer;float:left;height:75px;margin:2px;max-height:calc(100% - 8px);max-width:calc(50% - 4px);outline:0;overflow:hidden;padding:0;position:relative;-webkit-tap-highlight-color:transparent;width:100px}html body .modula-fancybox-thumbs__list a::before{border:6px solid #ff5268;bottom:0;content:'';left:0;opacity:0;position:absolute;right:0;top:0;transition:all .2s cubic-bezier(.25,.46,.45,.94);z-index:99991}html body .modula-fancybox-thumbs__list a:focus::before{opacity:.5}html body .modula-fancybox-thumbs__list a.modula-fancybox-thumbs-active::before{opacity:1}@media all and (max-width:576px){html body .modula-fancybox-thumbs{width:110px}html body .modula-fancybox-show-thumbs .modula-fancybox-inner{right:110px}html body .modula-fancybox-thumbs__list a{max-width:calc(100% - 10px)}}
2
- html body .modula .modula-items .modula-item{position:absolute;overflow:hidden;box-sizing:border-box}html body .modula .modula-items .modula-item .modula-item-content{transition:transform .3s ease-out,opacity .2s linear,top .3s,left .6s;opacity:0}html body .modula .modula-items{position:relative;z-index:1;min-height:10px}html body .modula .modula-items .modula-item .modula-item-content>a{display:block;position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background:0 0}html body .modula.modula-creative-gallery .modula-items .modula-item .modula-item-content,html body .modula.modula-custom-grid .modula-items .modula-item .modula-item-content{height:100%}html body .modula .modula-items .modula-item .jtg-social{z-index:10;font-size:0}html body .modula.modula-columns:not(.modula-loaded-scale) .modula-items .modula-item .modula-item-content,html body .modula:not(.modula-loaded-scale) .modula-items .modula-item.tg-loaded .modula-item-content,html body .modula:not(.modula-loaded-scale) .modula-items.justified-gallery .modula-item .modula-item-content{transform:scale(1) translate(0,0) rotate(0)!important;opacity:1}html body .modula .modula-items .modula-item img.pic{font-size:12px;position:absolute;max-width:999em;transition:width .3s,height .3s,transform .3s linear,opacity .2s linear}html body .modula.modula-columns .modula-items .modula-item img.pic{position:relative;max-width:100%;margin:0 auto}html body .modula .modula-items .modula-item.tg-loaded img.pic,html body .modula.modula-columns .modula-items .modula-item img.pic{display:block;opacity:1}html body .modula .modula-items .modula-item img.pic.lazyload,html body .modula .modula-items .modula-item img.pic.lazyloaded{display:block}html body .modula .modula-items .modula-item .caption .icon{font-size:14px;position:absolute;left:50%;top:50%;margin:-12px 0 0 -8px}html body .modula .modula-items .modula-item .figc{color:#fff;text-align:center;position:absolute;left:0;width:100%;padding:0;max-width:100%}html body .modula .modula-items .hidden .figc{display:none}html body .modula .modula-items .hidden:hover .figc{display:block}html body .modula .modula-items .visible .figc{display:block}html body .modula .modula-items .always-visible .figc{display:block}html body .modula .modula-items .visible:hover .figc{display:none}html body .modula .modula-items .caption span.text{display:block;padding:10px}html body .modula .modula-items .caption span.title{font-size:14px;font-weight:700}html body .modula .jtg-social a{box-shadow:none}html body .modula .jtg-social svg{width:20px;height:16px}html body .modula .modula-items .modula-item .jtg-title{margin:0}html body .modula .modula-items .modula-item p{margin:0;padding:0}html body .modula .figc{color:#000;text-align:center;position:absolute;left:0;width:100%;padding:2em}html body .modula .modula-item .jtg-social a{text-decoration:none;color:#fff;display:inline-block;margin:0 10px 0 0;padding:0;border:0;opacity:0;transition:opacity .3s}html body .modula .modula-item:hover .jtg-social a{opacity:1}html body .modula .modula-items .jtg-social{opacity:0;right:30px;position:absolute;bottom:20px;text-align:right;transition:all .3s}html body .et_pb_module_inner .modula .modula-items .jtg-social{transition:all .3s!important}html body .modula .modula-items .modula-item.effect-pufrobo .jtg-social a{margin-right:10px}@media all and (max-width:480px){html body .modula .modula-items .modula-item.effect-pufrobo .jtg-social{right:0;width:100%;text-align:center}html body .modula .modula-items .modula-item.effect-pufrobo .jtg-social a{padding:5px}}html body .modula .modula-items .jtg-social{opacity:1}html body .modula .modula-items .jtg-social a:last-of-type{margin-right:0}html body .modula .modula-item.effect-pufrobo p.description{margin-bottom:2em}html body .et_pb_module_inner .modula .modula-item.effect-pufrobo p.description{-webkit-transition:-webkit-transform .35s!important;transition:transform .35s!important}html body .modula .modula-item.effect-pufrobo .figc{text-align:right}html body .modula .modula-item.effect-pufrobo .jtg-title,html body .modula .modula-item.effect-pufrobo p{position:absolute;right:5%;left:5%;padding:10px 0}html body .modula .modula-item:hover img,html body .modula .modula-items .modula-item.tg-loaded:hover img.pic{opacity:.8}html body .modula .modula-item.effect-pufrobo p{bottom:20%;line-height:1.5;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);letter-spacing:1px}html body .modula .modula-items .modula-item.effect-pufrobo .jtg-title{top:10%;-webkit-transition:-webkit-transform .35s;transition:transform .35s;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}html body .et_pb_module_inner .modula .modula-items .modula-item.effect-pufrobo .jtg-title{-webkit-transition:-webkit-transform .35s!important;transition:transform .35s!important}html body .modula .modula-item.effect-pufrobo:hover .jtg-title{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}html body .modula .modula-item.effect-pufrobo .jtg-title::after{position:absolute;top:80%;left:0;width:100%;height:4px;background:#fff;content:'';-webkit-transform:translate3d(0,40px,0);transform:translate3d(0,40px,0)}html body .modula .modula-item.effect-pufrobo .jtg-title::after,html body .modula .modula-item.effect-pufrobo p{opacity:0;-webkit-transition:opacity .35s,-webkit-transform .35s;transition:opacity .35s,transform .35s}html body .modula .modula-item.effect-pufrobo:hover .jtg-title::after,html body .modula .modula-item.effect-pufrobo:hover p{margin-top:10px;margin-bottom:5px;opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}html body .modula .modula-items .modula-item.effect-pufrobo .figc.no-title.no-description .jtg-title:after{display:none}html body .modula .modula-items .modula-item.effect-appear .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-comodo .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-crafty .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-curtain .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-fluid-up .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-hide .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-lens .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-pufrobo .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-quiet .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-reflex .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-seemo .figc .jtg-title:before{display:none}html body .modula .modula-items .modula-item>a{cursor:zoom-in}html body .modula-fancybox-container.modula-fancybox-is-open{z-index:99999999}html body .modula-fancybox-share__button--li{background:#0e76a8}html body .modula-fancybox-share__button--wa{background:#25d366}html body .modula.modula-columns .modula-item{display:flex;justify-content:center}html body .modula.modula-columns .modula-item .modula-item-content{position:relative}html body .modula.modula-columns .modula-items.grid-gallery .modula-item .modula-item-content{height:100%}html body .modula.modula-columns .modula-items.grid-gallery.justified-gallery .modula-item .modula-item-content{width:100%}html body .modula.modula-columns .modula-items.grid-gallery.justified-gallery .modula-item .modula-item-content .pic{position:absolute;top:50%;left:50%;margin:0;padding:0;border:none}html body .modula.modula-columns .modula-item.jg-filtered{display:none}html body .modula-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}html body .modula-row-cols-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}html body .modula-row-cols-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}html body .modula-row-cols-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}html body .modula-row-cols-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}html body .modula-row-cols-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}html body .modula-row-cols-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}@media (min-width:576px){html body .modula-row-cols-sm-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}html body .modula-row-cols-sm-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}html body .modula-row-cols-sm-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}html body .modula-row-cols-sm-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}html body .modula-row-cols-sm-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}html body .modula-row-cols-sm-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}}@media (min-width:768px){html body .modula-row-cols-md-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}html body .modula-row-cols-md-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}html body .modula-row-cols-md-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}html body .modula-row-cols-md-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}html body .modula-row-cols-md-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}html body .modula-row-cols-md-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}}@media (min-width:992px){html body .modula-row-cols-lg-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}html body .modula-row-cols-lg-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}html body .modula-row-cols-lg-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}html body .modula-row-cols-lg-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}html body .modula-row-cols-lg-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}html body .modula-row-cols-lg-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}}@media (min-width:1200px){html body .modula-row-cols-xl-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}html body .modula-row-cols-xl-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}html body .modula-row-cols-xl-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}html body .modula-row-cols-xl-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}html body .modula-row-cols-xl-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}html body .modula-row-cols-xl-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}}html body .modula .modula-items.grid-gallery .modula-item .figc{height:100%;top:0}html body div.modula-powered{text-align:right;font-size:14px;margin-right:5px;clear:both}html body div.modula-powered svg.modula-logo{width:14px;position:relative;top:3px}html body div.modula-powered svg.modula-logo path{color:#58ab7e!important}html body div.modula-powered svg.modula-logo{display:inline-block}
1
  html body .compensate-for-scrollbar{overflow:hidden}html body .modula-fancybox-active{height:auto}html body .modula-fancybox-is-hidden{left:-9999px;margin:0;position:absolute!important;top:-9999px;visibility:hidden}html body .modula-fancybox-container{-webkit-backface-visibility:hidden;height:100%;left:0;outline:0;position:fixed;-webkit-tap-highlight-color:transparent;top:0;-ms-touch-action:manipulation;touch-action:manipulation;transform:translateZ(0);width:100%;z-index:99992}html body .modula-fancybox-container *{box-sizing:border-box}html body .modula-fancybox-bg,html body .modula-fancybox-inner,html body .modula-fancybox-outer,html body .modula-fancybox-stage{bottom:0;left:0;position:absolute;right:0;top:0}html body .modula-fancybox-outer{-webkit-overflow-scrolling:touch;overflow-y:auto}html body .modula-fancybox-bg{background:#1e1e1e;opacity:0;transition-duration:inherit;transition-property:opacity;transition-timing-function:cubic-bezier(.47,0,.74,.71)}html body .modula-fancybox-is-open .modula-fancybox-bg{opacity:.9;transition-timing-function:cubic-bezier(.22,.61,.36,1)}html body .modula-fancybox-container .modula-fancybox-caption,html body .modula-fancybox-container .modula-fancybox-infobar,html body .modula-fancybox-container .modula-fancybox-navigation .modula-fancybox-button,html body .modula-fancybox-container .modula-fancybox-toolbar{direction:ltr;opacity:0;position:absolute;transition:opacity .25s ease,visibility 0s ease .25s;visibility:hidden;z-index:99997}html body .modula-fancybox-show-caption .modula-fancybox-caption,html body .modula-fancybox-show-infobar .modula-fancybox-infobar,html body .modula-fancybox-show-nav .modula-fancybox-navigation .modula-fancybox-button,html body .modula-fancybox-show-toolbar .modula-fancybox-toolbar{opacity:1;transition:opacity .25s ease 0s,visibility 0s ease 0s;visibility:visible}html body .modula-fancybox-container .modula-fancybox-infobar{color:#ccc;font-size:13px;-webkit-font-smoothing:subpixel-antialiased;height:44px;left:0;line-height:44px;min-width:44px;mix-blend-mode:difference;padding:0 10px;pointer-events:none;top:0;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}html body .modula-fancybox-container .modula-fancybox-toolbar{right:0;top:0}html body .modula-fancybox-stage{direction:ltr;overflow:visible;transform:translateZ(0);z-index:99994}html body .modula-fancybox-is-open .modula-fancybox-stage{overflow:hidden}html body .modula-fancybox-slide{-webkit-backface-visibility:hidden;display:none;height:100%;left:0;outline:0;overflow:auto;-webkit-overflow-scrolling:touch;padding:44px;position:absolute;text-align:center;top:0;transition-property:transform,opacity;white-space:normal;width:100%;z-index:99994}html body .modula-fancybox-slide::before{content:'';display:inline-block;font-size:0;height:100%;vertical-align:middle;width:0}html body .modula-fancybox-is-sliding .modula-fancybox-slide,html body .modula-fancybox-slide--current,html body .modula-fancybox-slide--next,html body .modula-fancybox-slide--previous{display:block}html body .modula-fancybox-slide--image{overflow:hidden;padding:44px 0}html body .modula-fancybox-slide--image::before{display:none}html body .modula-fancybox-slide--html{padding:6px}html body .modula-fancybox-content{background:#fff;display:inline-block;margin:0;max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch;padding:44px;position:relative;text-align:left;vertical-align:middle}html body .modula-fancybox-slide--image .modula-fancybox-content{animation-timing-function:cubic-bezier(.5,0,.14,1);-webkit-backface-visibility:hidden;background:0 0;background-repeat:no-repeat;background-size:100% 100%;left:0;max-width:none;overflow:visible;padding:0;position:absolute;top:0;-ms-transform-origin:top left;transform-origin:top left;transition-property:transform,opacity;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:99995}html body .modula-fancybox-can-zoomOut .modula-fancybox-content{cursor:zoom-out}html body .modula-fancybox-can-zoomIn .modula-fancybox-content{cursor:zoom-in}html body .modula-fancybox-can-pan .modula-fancybox-content,html body .modula-fancybox-can-swipe .modula-fancybox-content{cursor:-webkit-grab;cursor:grab}html body .modula-fancybox-is-grabbing .modula-fancybox-content{cursor:-webkit-grabbing;cursor:grabbing}html body .modula-fancybox-container [data-selectable=true]{cursor:text}html body .modula-fancybox-image,html body .modula-fancybox-spaceball{background:0 0;border:0;height:100%;left:0;margin:0;max-height:none;max-width:none;padding:0;position:absolute;top:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}html body .modula-fancybox-spaceball{z-index:1}html body .modula-fancybox-slide--iframe .modula-fancybox-content,html body .modula-fancybox-slide--map .modula-fancybox-content,html body .modula-fancybox-slide--pdf .modula-fancybox-content,html body .modula-fancybox-slide--video .modula-fancybox-content{height:100%;overflow:visible;padding:0;width:100%}html body .modula-fancybox-slide--video .modula-fancybox-content{background:#000}html body .modula-fancybox-slide--map .modula-fancybox-content{background:#e5e3df}html body .modula-fancybox-slide--iframe .modula-fancybox-content{background:#fff}html body .modula-fancybox-iframe,html body .modula-fancybox-video{background:0 0;border:0;display:block;height:100%;margin:0;overflow:hidden;padding:0;width:100%}html body .modula-fancybox-iframe{left:0;position:absolute;top:0}html body .modula-fancybox-error{background:#fff;cursor:default;max-width:400px;padding:40px;width:100%}html body .modula-fancybox-error p{color:#444;font-size:16px;line-height:20px;margin:0;padding:0}html body .modula-fancybox-container .modula-fancybox-button{background:rgba(30,30,30,.6);border:0;border-radius:0;box-shadow:none;cursor:pointer;display:inline-block;height:44px;margin:0;padding:10px;position:relative;transition:color .2s;vertical-align:top;visibility:inherit;width:44px}html body .modula-fancybox-container .modula-fancybox-button,html body .modula-fancybox-container .modula-fancybox-button:link,html body .modula-fancybox-container .modula-fancybox-button:visited{color:#ccc}html body .modula-fancybox-container .modula-fancybox-button:hover{color:#fff;box-shadow:none}html body .modula-fancybox-container .modula-fancybox-button:focus{outline:0}html body .modula-fancybox-container .modula-fancybox-button.modula-fancybox-focus{outline:1px dotted}html body .modula-fancybox-container .modula-fancybox-button[disabled],html body .modula-fancybox-container .modula-fancybox-button[disabled]:hover{color:#888;cursor:default;outline:0}html body .modula-fancybox-container .modula-fancybox-button div{height:100%}html body .modula-fancybox-container .modula-fancybox-button svg{display:block;height:100%;overflow:visible;position:relative;width:100%}html body .modula-fancybox-container .modula-fancybox-button svg path{fill:currentColor;stroke-width:0}html body .modula-fancybox-container .modula-fancybox-button--fsenter svg:nth-child(2),html body .modula-fancybox-container .modula-fancybox-button--play svg:nth-child(2){display:none}html body .modula-fancybox-container .modula-fancybox-button--fsexit svg:nth-child(1),html body .modula-fancybox-container .modula-fancybox-button--pause svg:nth-child(1){display:none}html body .modula-fancybox-container .modula-fancybox-progress{background:#ff5268;height:2px;left:0;position:absolute;right:0;top:0;-ms-transform:scaleX(0);transform:scaleX(0);-ms-transform-origin:0;transform-origin:0;transition-property:transform;transition-timing-function:linear;z-index:99998}html body .modula-fancybox-container .modula-fancybox-close-small{background:0 0;border:0;border-radius:0;color:#ccc;cursor:pointer;opacity:.8;padding:8px;position:absolute;right:-12px;top:-44px;z-index:401}html body .modula-fancybox-container .modula-fancybox-close-small:hover{color:#fff;opacity:1}html body .modula-fancybox-container .modula-fancybox-stage .modula-fancybox-slide--html .modula-fancybox-close-small{color:#000;padding:10px;right:0;top:0;background-color:transparent}html body .modula-fancybox-slide--image.modula-fancybox-is-scaling .modula-fancybox-content{overflow:hidden}html body .modula-fancybox-is-scaling .modula-fancybox-close-small,html body .modula-fancybox-is-zoomable.modula-fancybox-can-pan .modula-fancybox-close-small{display:none}html body .modula-fancybox-navigation .modula-fancybox-button{background-clip:content-box;height:100px;opacity:0;position:absolute;top:calc(50% - 50px);width:70px}html body .modula-fancybox-navigation .modula-fancybox-button div{padding:7px}html body .modula-fancybox-navigation .modula-fancybox-button--arrow_left{left:0;left:env(safe-area-inset-left);padding:31px 26px 31px 6px}html body .modula-fancybox-navigation .modula-fancybox-button--arrow_right{padding:31px 6px 31px 26px;right:0;right:env(safe-area-inset-right)}html body .modula-fancybox-caption{background:linear-gradient(to top,rgba(0,0,0,.85) 0,rgba(0,0,0,.3) 50%,rgba(0,0,0,.15) 65%,rgba(0,0,0,.075) 75.5%,rgba(0,0,0,.037) 82.85%,rgba(0,0,0,.019) 88%,rgba(0,0,0,0) 100%);bottom:0;color:#eee;font-size:14px;font-weight:400;left:0;line-height:1.5;padding:75px 44px 25px 44px;pointer-events:none;right:0;text-align:center;z-index:99996}@supports (padding:max(0px)){html body .modula-fancybox-caption{padding:75px max(44px,env(safe-area-inset-right)) max(25px,env(safe-area-inset-bottom)) max(44px,env(safe-area-inset-left))}}html body .modula-fancybox-caption--separate{margin-top:-50px}html body .modula-fancybox-caption__body{max-height:50vh;overflow:auto;pointer-events:all}html body .modula-fancybox-caption a,html body .modula-fancybox-caption a:link,html body .modula-fancybox-caption a:visited{color:#ccc;text-decoration:none}html body .modula-fancybox-caption a:hover{color:#fff;text-decoration:underline}html body .modula-fancybox-loading{animation:fancybox-rotate 1s linear infinite;background:0 0;border:4px solid #888;border-bottom-color:#fff;border-radius:50%;height:50px;left:50%;margin:-25px 0 0 -25px;opacity:.7;padding:0;position:absolute;top:50%;width:50px;z-index:99999}@keyframes fancybox-rotate{100%{transform:rotate(360deg)}}html body .modula-fancybox-animated{transition-timing-function:cubic-bezier(0,0,.25,1)}html body .modula-fancybox-fx-slide.modula-fancybox-slide--previous{opacity:0;transform:translate3d(-100%,0,0)}html body .modula-fancybox-fx-slide.modula-fancybox-slide--next{opacity:0;transform:translate3d(100%,0,0)}html body .modula-fancybox-fx-slide.modula-fancybox-slide--current{opacity:1;transform:translate3d(0,0,0)}html body .modula-fancybox-fx-fade.modula-fancybox-slide--next,html body .modula-fancybox-fx-fade.modula-fancybox-slide--previous{opacity:0;transition-timing-function:cubic-bezier(.19,1,.22,1)}html body .modula-fancybox-fx-fade.modula-fancybox-slide--current{opacity:1}html body .modula-fancybox-fx-zoom-in-out.modula-fancybox-slide--previous{opacity:0;transform:scale3d(1.5,1.5,1.5)}html body .modula-fancybox-fx-zoom-in-out.modula-fancybox-slide--next{opacity:0;transform:scale3d(.5,.5,.5)}html body .modula-fancybox-fx-zoom-in-out.modula-fancybox-slide--current{opacity:1;transform:scale3d(1,1,1)}html body .modula-fancybox-fx-rotate.modula-fancybox-slide--previous{opacity:0;-ms-transform:rotate(-360deg);transform:rotate(-360deg)}html body .modula-fancybox-fx-rotate.modula-fancybox-slide--next{opacity:0;-ms-transform:rotate(360deg);transform:rotate(360deg)}html body .modula-fancybox-fx-rotate.modula-fancybox-slide--current{opacity:1;-ms-transform:rotate(0);transform:rotate(0)}html body .modula-fancybox-fx-circular.modula-fancybox-slide--previous{opacity:0;transform:scale3d(0,0,0) translate3d(-100%,0,0)}html body .modula-fancybox-fx-circular.modula-fancybox-slide--next{opacity:0;transform:scale3d(0,0,0) translate3d(100%,0,0)}html body .modula-fancybox-fx-circular.modula-fancybox-slide--current{opacity:1;transform:scale3d(1,1,1) translate3d(0,0,0)}html body .modula-fancybox-fx-tube.modula-fancybox-slide--previous{transform:translate3d(-100%,0,0) scale(.1) skew(-10deg)}html body .modula-fancybox-fx-tube.modula-fancybox-slide--next{transform:translate3d(100%,0,0) scale(.1) skew(10deg)}html body .modula-fancybox-fx-tube.modula-fancybox-slide--current{transform:translate3d(0,0,0) scale(1)}@media all and (max-height:576px){html body .modula-fancybox-slide{padding-left:6px;padding-right:6px}html body .modula-fancybox-slide--image{padding:6px 0}html body .modula-fancybox-close-small{right:-6px}html body .modula-fancybox-slide--image .modula-fancybox-close-small{background:#4e4e4e;color:#f2f4f6;height:36px;opacity:1;padding:6px;right:0;top:0;width:36px}html body .modula-fancybox-caption{padding-left:12px;padding-right:12px}@supports (padding:max(0px)){html body .modula-fancybox-caption{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}}}html body .modula-fancybox-container .modula-fancybox-stage .modula-fancybox-share{background:#f4f4f4;border-radius:3px;max-width:90%;padding:30px;text-align:center}html body .modula-fancybox-container .modula-fancybox-stage .modula-fancybox-share h1{color:#222;font-size:35px;font-weight:700;margin:0 0 20px 0}.modula-fancybox-container .modula-fancybox-stage .modula-fancybox-share h1:after,.modula-fancybox-container .modula-fancybox-stage .modula-fancybox-share h1:before{display:none}html body .modula-fancybox-container .modula-fancybox-stage .modula-fancybox-share p{margin:0;padding:0}html body .modula-fancybox-container .modula-fancybox-stage .modula-fancybox-share__button{border:0;border-radius:3px;display:inline-block;font-size:14px;font-weight:700;line-height:40px;margin:0 5px 10px 5px;min-width:130px;padding:0 15px;text-decoration:none;transition:all .2s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}html body .modula-fancybox-container .modula-fancybox-stage .modula-fancybox-share__button:link,html body .modula-fancybox-container .modula-fancybox-stage .modula-fancybox-share__button:visited{color:#fff}html body .modula-fancybox-container .modula-fancybox-stage .modula-fancybox-share__button:hover{text-decoration:none}html body .modula-fancybox-share__button--fb{background:#3b5998}html body .modula-fancybox-share__button--fb:hover{background:#344e86}html body .modula-fancybox-share__button--pt{background:#bd081d}html body .modula-fancybox-share__button--pt:hover{background:#aa0719}html body .modula-fancybox-share__button--tw{background:#1da1f2}html body .modula-fancybox-share__button--tw:hover{background:#0d95e8}html body .modula-fancybox-share__button--email{background:#9c3}html body .modula-fancybox-share__button--email:hover{background:#7aa329}html body .modula-fancybox-share__button svg{height:25px;margin-right:7px;position:relative;top:-1px;vertical-align:middle;width:25px;display:inline-block}html body .modula-fancybox-container .modula-fancybox-stage .modula-fancybox-share__button svg path{fill:#fff}html body .modula-fancybox-container .modula-fancybox-stage .modula-fancybox-share .modula-fancybox-share__input{background:0 0;border:0;border-bottom:1px solid #d7d7d7;border-radius:0;color:#5d5b5b;font-size:14px;margin:10px 0 0 0;outline:0;padding:10px 15px;width:100%}html body .modula-fancybox-container .modula-fancybox-thumbs{background:#ddd;bottom:0;display:none;margin:0;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar;padding:2px 2px 4px 2px;position:absolute;right:0;-webkit-tap-highlight-color:transparent;top:0;width:212px;z-index:99995}html body .modula-fancybox-thumbs-x{overflow-x:auto;overflow-y:hidden}html body .modula-fancybox-show-thumbs .modula-fancybox-thumbs{display:block}html body .modula-fancybox-show-thumbs .modula-fancybox-inner{right:212px}html body .modula-fancybox-thumbs__list{font-size:0;height:100%;list-style:none;margin:0;overflow-x:hidden;overflow-y:auto;padding:0;position:absolute;position:relative;white-space:nowrap;width:100%}html body .modula-fancybox-thumbs-x .modula-fancybox-thumbs__list{overflow:hidden}html body .modula-fancybox-thumbs-y .modula-fancybox-thumbs__list::-webkit-scrollbar{width:7px}html body .modula-fancybox-thumbs-y .modula-fancybox-thumbs__list::-webkit-scrollbar-track{background:#fff;border-radius:10px;box-shadow:inset 0 0 6px rgba(0,0,0,.3)}html body .modula-fancybox-thumbs-y .modula-fancybox-thumbs__list::-webkit-scrollbar-thumb{background:#2a2a2a;border-radius:10px}html body .modula-fancybox-thumbs__list a{-webkit-backface-visibility:hidden;backface-visibility:hidden;background-color:rgba(0,0,0,.1);background-position:center center;background-repeat:no-repeat;background-size:cover;cursor:pointer;float:left;height:75px;margin:2px;max-height:calc(100% - 8px);max-width:calc(50% - 4px);outline:0;overflow:hidden;padding:0;position:relative;-webkit-tap-highlight-color:transparent;width:100px}html body .modula-fancybox-thumbs__list a::before{border:6px solid #ff5268;bottom:0;content:'';left:0;opacity:0;position:absolute;right:0;top:0;transition:all .2s cubic-bezier(.25,.46,.45,.94);z-index:99991}html body .modula-fancybox-thumbs__list a:focus::before{opacity:.5}html body .modula-fancybox-thumbs__list a.modula-fancybox-thumbs-active::before{opacity:1}@media all and (max-width:576px){html body .modula-fancybox-thumbs{width:110px}html body .modula-fancybox-show-thumbs .modula-fancybox-inner{right:110px}html body .modula-fancybox-thumbs__list a{max-width:calc(100% - 10px)}}
2
+ html body .modula .modula-items .modula-item{position:absolute;overflow:hidden;box-sizing:border-box}html body .modula .modula-items .modula-item .modula-item-content{transition:transform .3s ease-out,opacity .2s linear,top .3s,left .6s;opacity:0}html body .modula .modula-items{position:relative;z-index:1;min-height:10px}html body .modula .modula-items .modula-item .modula-item-content>a{display:block;position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background:0 0}html body .modula.modula-creative-gallery .modula-items .modula-item .modula-item-content,html body .modula.modula-custom-grid .modula-items .modula-item .modula-item-content{height:100%}html body .modula .modula-items .modula-item .jtg-social{z-index:10;font-size:0}html body .modula.modula-columns:not(.modula-loaded-scale).modula-gallery-initialized .modula-items .modula-item .modula-item-content,html body .modula:not(.modula-loaded-scale).modula-gallery-initialized .modula-items .modula-item.tg-loaded .modula-item-content,html body .modula:not(.modula-loaded-scale).modula-gallery-initialized .modula-items.justified-gallery .modula-item .modula-item-content{transform:scale(1) translate(0,0) rotate(0)!important;opacity:1}html body .modula .modula-items .modula-item img.pic{font-size:12px;position:absolute;max-width:999em;transition:width .3s,height .3s,transform .3s linear,opacity .2s linear}html body .modula.modula-columns .modula-items .modula-item img.pic{position:relative;max-width:100%;margin:0 auto}html body .modula .modula-items .modula-item.tg-loaded img.pic,html body .modula.modula-columns .modula-items .modula-item img.pic{display:block;opacity:1}html body .modula .modula-items .modula-item img.pic.lazyload,html body .modula .modula-items .modula-item img.pic.lazyloaded{display:block}html body .modula .modula-items .modula-item .caption .icon{font-size:14px;position:absolute;left:50%;top:50%;margin:-12px 0 0 -8px}html body .modula .modula-items .modula-item .figc{color:#fff;text-align:center;position:absolute;left:0;width:100%;padding:0;max-width:100%}html body .modula .modula-items .hidden .figc{display:none}html body .modula .modula-items .hidden:hover .figc{display:block}html body .modula .modula-items .visible .figc{display:block}html body .modula .modula-items .always-visible .figc{display:block}html body .modula .modula-items .visible:hover .figc{display:none}html body .modula .modula-items .caption span.text{display:block;padding:10px}html body .modula .modula-items .caption span.title{font-size:14px;font-weight:700}html body .modula .jtg-social a{box-shadow:none}html body .modula .jtg-social svg{width:20px;height:16px}html body .modula .modula-items .modula-item .jtg-title{margin:0}html body .modula .modula-items .modula-item p{margin:0;padding:0}html body .modula .figc{color:#000;text-align:center;position:absolute;left:0;width:100%;padding:2em}html body .modula .modula-item .jtg-social a{text-decoration:none;color:#fff;display:inline-block;margin:0 10px 0 0;padding:0;border:0;opacity:0;transition:opacity .3s}html body .modula .modula-item:hover .jtg-social a{opacity:1}html body .modula .modula-items .jtg-social{opacity:0;right:30px;position:absolute;bottom:20px;text-align:right;transition:all .3s}html body .et_pb_module_inner .modula .modula-items .jtg-social{transition:all .3s!important}html body .modula .modula-items .modula-item.effect-pufrobo .jtg-social a{margin-right:10px}@media all and (max-width:480px){html body .modula .modula-items .modula-item.effect-pufrobo .jtg-social{right:0;width:100%;text-align:center}html body .modula .modula-items .modula-item.effect-pufrobo .jtg-social a{padding:5px}}html body .modula .modula-items .jtg-social{opacity:1}html body .modula .modula-items .jtg-social a:last-of-type{margin-right:0}html body .modula .modula-item.effect-pufrobo p.description{margin-bottom:2em}html body .et_pb_module_inner .modula .modula-item.effect-pufrobo p.description{-webkit-transition:-webkit-transform .35s!important;transition:transform .35s!important}html body .modula .modula-item.effect-pufrobo .figc{text-align:right}html body .modula .modula-item.effect-pufrobo .jtg-title,html body .modula .modula-item.effect-pufrobo p{position:absolute;right:5%;left:5%;padding:10px 0}html body .modula.modula-gallery-initialized .modula-item:hover img,html body .modula.modula-gallery-initialized .modula-items .modula-item.tg-loaded:hover img.pic{opacity:.8}html body .modula .modula-item.effect-pufrobo p{bottom:20%;line-height:1.5;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);letter-spacing:1px}html body .modula .modula-items .modula-item.effect-pufrobo .jtg-title{top:10%;-webkit-transition:-webkit-transform .35s;transition:transform .35s;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}html body .et_pb_module_inner .modula .modula-items .modula-item.effect-pufrobo .jtg-title{-webkit-transition:-webkit-transform .35s!important;transition:transform .35s!important}html body .modula .modula-item.effect-pufrobo:hover .jtg-title{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}html body .modula .modula-item.effect-pufrobo .jtg-title::after{position:absolute;top:80%;left:0;width:100%;height:4px;background:#fff;content:'';-webkit-transform:translate3d(0,40px,0);transform:translate3d(0,40px,0)}html body .modula .modula-item.effect-pufrobo .jtg-title::after,html body .modula .modula-item.effect-pufrobo p{opacity:0;-webkit-transition:opacity .35s,-webkit-transform .35s;transition:opacity .35s,transform .35s}html body .modula .modula-item.effect-pufrobo:hover .jtg-title::after,html body .modula .modula-item.effect-pufrobo:hover p{margin-top:10px;margin-bottom:5px;opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}html body .modula .modula-items .modula-item.effect-pufrobo .figc.no-title.no-description .jtg-title:after{display:none}html body .modula .modula-items .modula-item.effect-appear .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-comodo .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-crafty .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-curtain .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-fluid-up .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-hide .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-lens .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-pufrobo .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-quiet .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-reflex .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-seemo .figc .jtg-title:before{display:none}html body .modula .modula-items .modula-item>a{cursor:zoom-in}html body .modula-fancybox-container.modula-fancybox-is-open{z-index:99999999}html body .modula-fancybox-share__button--li{background:#0e76a8}html body .modula-fancybox-share__button--wa{background:#25d366}html body .modula.modula-columns .modula-item{display:flex;justify-content:center}html body .modula.modula-columns .modula-item .modula-item-content{position:relative}html body .modula.modula-columns .modula-items.grid-gallery .modula-item .modula-item-content{height:100%}html body .modula.modula-columns .modula-items.grid-gallery.justified-gallery .modula-item .modula-item-content{width:100%}html body .modula.modula-columns .modula-items.grid-gallery.justified-gallery .modula-item .modula-item-content .pic{position:absolute;top:50%;left:50%;margin:0;padding:0;border:none}html body .modula.modula-columns .modula-item.jg-filtered{display:none}html body .modula-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}html body .modula-row-cols-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}html body .modula-row-cols-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}html body .modula-row-cols-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}html body .modula-row-cols-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}html body .modula-row-cols-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}html body .modula-row-cols-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}@media (min-width:576px){html body .modula-row-cols-sm-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}html body .modula-row-cols-sm-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}html body .modula-row-cols-sm-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}html body .modula-row-cols-sm-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}html body .modula-row-cols-sm-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}html body .modula-row-cols-sm-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}}@media (min-width:768px){html body .modula-row-cols-md-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}html body .modula-row-cols-md-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}html body .modula-row-cols-md-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}html body .modula-row-cols-md-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}html body .modula-row-cols-md-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}html body .modula-row-cols-md-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}}@media (min-width:992px){html body .modula-row-cols-lg-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}html body .modula-row-cols-lg-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}html body .modula-row-cols-lg-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}html body .modula-row-cols-lg-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}html body .modula-row-cols-lg-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}html body .modula-row-cols-lg-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}}@media (min-width:1200px){html body .modula-row-cols-xl-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}html body .modula-row-cols-xl-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}html body .modula-row-cols-xl-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}html body .modula-row-cols-xl-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}html body .modula-row-cols-xl-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}html body .modula-row-cols-xl-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}}html body .modula .modula-items.grid-gallery .modula-item .figc{height:100%;top:0}html body div.modula-powered{text-align:right;font-size:14px;margin-right:5px;clear:both}html body div.modula-powered svg.modula-logo{width:14px;position:relative;top:3px}html body div.modula-powered svg.modula-logo path{color:#58ab7e!important}html body div.modula-powered svg.modula-logo{display:inline-block}html body .modula-gallery:not(.modula-gallery-initialized){visibility:hidden}html body .modula-gallery.modula-gallery-initialized .modula-items .modula-item{visibility:visible}
assets/css/front/modula.css CHANGED
@@ -36,9 +36,9 @@ html body .modula .modula-items .modula-item .jtg-social {
36
  font-size: 0;
37
  }
38
 
39
- html body .modula:not(.modula-loaded-scale) .modula-items .modula-item.tg-loaded .modula-item-content,
40
- html body .modula:not(.modula-loaded-scale) .modula-items.justified-gallery .modula-item .modula-item-content,
41
- html body .modula.modula-columns:not(.modula-loaded-scale) .modula-items .modula-item .modula-item-content {
42
  transform: scale(1) translate(0, 0) rotate(0deg) !important;
43
  opacity: 1;
44
  }
@@ -221,8 +221,8 @@ html body .modula .modula-item.effect-pufrobo p {
221
  padding: 10px 0;
222
  }
223
 
224
- html body .modula .modula-item:hover img,
225
- html body .modula .modula-items .modula-item.tg-loaded:hover img.pic {
226
  opacity: .8
227
  }
228
 
@@ -578,4 +578,12 @@ html body div.modula-powered svg.modula-logo path {
578
 
579
  html body div.modula-powered svg.modula-logo {
580
  display: inline-block;
 
 
 
 
 
 
 
 
581
  }
36
  font-size: 0;
37
  }
38
 
39
+ html body .modula:not(.modula-loaded-scale).modula-gallery-initialized .modula-items .modula-item.tg-loaded .modula-item-content,
40
+ html body .modula:not(.modula-loaded-scale).modula-gallery-initialized .modula-items.justified-gallery .modula-item .modula-item-content,
41
+ html body .modula.modula-columns:not(.modula-loaded-scale).modula-gallery-initialized .modula-items .modula-item .modula-item-content {
42
  transform: scale(1) translate(0, 0) rotate(0deg) !important;
43
  opacity: 1;
44
  }
221
  padding: 10px 0;
222
  }
223
 
224
+ html body .modula.modula-gallery-initialized .modula-item:hover img,
225
+ html body .modula.modula-gallery-initialized .modula-items .modula-item.tg-loaded:hover img.pic {
226
  opacity: .8
227
  }
228
 
578
 
579
  html body div.modula-powered svg.modula-logo {
580
  display: inline-block;
581
+ }
582
+
583
+ html body .modula-gallery:not( .modula-gallery-initialized ) {
584
+ visibility: hidden;
585
+ }
586
+
587
+ html body .modula-gallery.modula-gallery-initialized .modula-items .modula-item {
588
+ visibility: visible;
589
  }
assets/css/front/modula.min.css CHANGED
@@ -1 +1 @@
1
- html body .modula .modula-items .modula-item{position:absolute;overflow:hidden;box-sizing:border-box}html body .modula .modula-items .modula-item .modula-item-content{transition:transform .3s ease-out,opacity .2s linear,top .3s,left .6s;opacity:0}html body .modula .modula-items{position:relative;z-index:1;min-height:10px}html body .modula .modula-items .modula-item .modula-item-content>a{display:block;position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background:0 0}html body .modula.modula-creative-gallery .modula-items .modula-item .modula-item-content,html body .modula.modula-custom-grid .modula-items .modula-item .modula-item-content{height:100%}html body .modula .modula-items .modula-item .jtg-social{z-index:10;font-size:0}html body .modula.modula-columns:not(.modula-loaded-scale) .modula-items .modula-item .modula-item-content,html body .modula:not(.modula-loaded-scale) .modula-items .modula-item.tg-loaded .modula-item-content,html body .modula:not(.modula-loaded-scale) .modula-items.justified-gallery .modula-item .modula-item-content{transform:scale(1) translate(0,0) rotate(0)!important;opacity:1}html body .modula .modula-items .modula-item img.pic{font-size:12px;position:absolute;max-width:999em;transition:width .3s,height .3s,transform .3s linear,opacity .2s linear}html body .modula.modula-columns .modula-items .modula-item img.pic{position:relative;max-width:100%;margin:0 auto}html body .modula .modula-items .modula-item.tg-loaded img.pic,html body .modula.modula-columns .modula-items .modula-item img.pic{display:block;opacity:1}html body .modula .modula-items .modula-item img.pic.lazyload,html body .modula .modula-items .modula-item img.pic.lazyloaded{display:block}html body .modula .modula-items .modula-item .caption .icon{font-size:14px;position:absolute;left:50%;top:50%;margin:-12px 0 0 -8px}html body .modula .modula-items .modula-item .figc{color:#fff;text-align:center;position:absolute;left:0;width:100%;padding:0;max-width:100%}html body .modula .modula-items .hidden .figc{display:none}html body .modula .modula-items .hidden:hover .figc{display:block}html body .modula .modula-items .visible .figc{display:block}html body .modula .modula-items .always-visible .figc{display:block}html body .modula .modula-items .visible:hover .figc{display:none}html body .modula .modula-items .caption span.text{display:block;padding:10px}html body .modula .modula-items .caption span.title{font-size:14px;font-weight:700}html body .modula .jtg-social a{box-shadow:none}html body .modula .jtg-social svg{width:20px;height:16px}html body .modula .modula-items .modula-item .jtg-title{margin:0}html body .modula .modula-items .modula-item p{margin:0;padding:0}html body .modula .figc{color:#000;text-align:center;position:absolute;left:0;width:100%;padding:2em}html body .modula .modula-item .jtg-social a{text-decoration:none;color:#fff;display:inline-block;margin:0 10px 0 0;padding:0;border:0;opacity:0;transition:opacity .3s}html body .modula .modula-item:hover .jtg-social a{opacity:1}html body .modula .modula-items .jtg-social{opacity:0;right:30px;position:absolute;bottom:20px;text-align:right;transition:all .3s}html body .et_pb_module_inner .modula .modula-items .jtg-social{transition:all .3s!important}html body .modula .modula-items .modula-item.effect-pufrobo .jtg-social a{margin-right:10px}@media all and (max-width:480px){html body .modula .modula-items .modula-item.effect-pufrobo .jtg-social{right:0;width:100%;text-align:center}html body .modula .modula-items .modula-item.effect-pufrobo .jtg-social a{padding:5px}}html body .modula .modula-items .jtg-social{opacity:1}html body .modula .modula-items .jtg-social a:last-of-type{margin-right:0}html body .modula .modula-item.effect-pufrobo p.description{margin-bottom:2em}html body .et_pb_module_inner .modula .modula-item.effect-pufrobo p.description{-webkit-transition:-webkit-transform .35s!important;transition:transform .35s!important}html body .modula .modula-item.effect-pufrobo .figc{text-align:right}html body .modula .modula-item.effect-pufrobo .jtg-title,html body .modula .modula-item.effect-pufrobo p{position:absolute;right:5%;left:5%;padding:10px 0}html body .modula .modula-item:hover img,html body .modula .modula-items .modula-item.tg-loaded:hover img.pic{opacity:.8}html body .modula .modula-item.effect-pufrobo p{bottom:20%;line-height:1.5;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);letter-spacing:1px}html body .modula .modula-items .modula-item.effect-pufrobo .jtg-title{top:10%;-webkit-transition:-webkit-transform .35s;transition:transform .35s;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}html body .et_pb_module_inner .modula .modula-items .modula-item.effect-pufrobo .jtg-title{-webkit-transition:-webkit-transform .35s!important;transition:transform .35s!important}html body .modula .modula-item.effect-pufrobo:hover .jtg-title{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}html body .modula .modula-item.effect-pufrobo .jtg-title::after{position:absolute;top:80%;left:0;width:100%;height:4px;background:#fff;content:'';-webkit-transform:translate3d(0,40px,0);transform:translate3d(0,40px,0)}html body .modula .modula-item.effect-pufrobo .jtg-title::after,html body .modula .modula-item.effect-pufrobo p{opacity:0;-webkit-transition:opacity .35s,-webkit-transform .35s;transition:opacity .35s,transform .35s}html body .modula .modula-item.effect-pufrobo:hover .jtg-title::after,html body .modula .modula-item.effect-pufrobo:hover p{margin-top:10px;margin-bottom:5px;opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}html body .modula .modula-items .modula-item.effect-pufrobo .figc.no-title.no-description .jtg-title:after{display:none}html body .modula .modula-items .modula-item.effect-appear .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-comodo .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-crafty .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-curtain .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-fluid-up .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-hide .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-lens .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-pufrobo .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-quiet .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-reflex .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-seemo .figc .jtg-title:before{display:none}html body .modula .modula-items .modula-item>a{cursor:zoom-in}html body .modula-fancybox-container.modula-fancybox-is-open{z-index:99999999}html body .modula-fancybox-share__button--li{background:#0e76a8}html body .modula-fancybox-share__button--wa{background:#25d366}html body .modula.modula-columns .modula-item{display:flex;justify-content:center}html body .modula.modula-columns .modula-item .modula-item-content{position:relative}html body .modula.modula-columns .modula-items.grid-gallery .modula-item .modula-item-content{height:100%}html body .modula.modula-columns .modula-items.grid-gallery.justified-gallery .modula-item .modula-item-content{width:100%}html body .modula.modula-columns .modula-items.grid-gallery.justified-gallery .modula-item .modula-item-content .pic{position:absolute;top:50%;left:50%;margin:0;padding:0;border:none}html body .modula.modula-columns .modula-item.jg-filtered{display:none}html body .modula-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}html body .modula-row-cols-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}html body .modula-row-cols-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}html body .modula-row-cols-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}html body .modula-row-cols-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}html body .modula-row-cols-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}html body .modula-row-cols-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}@media (min-width:576px){html body .modula-row-cols-sm-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}html body .modula-row-cols-sm-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}html body .modula-row-cols-sm-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}html body .modula-row-cols-sm-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}html body .modula-row-cols-sm-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}html body .modula-row-cols-sm-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}}@media (min-width:768px){html body .modula-row-cols-md-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}html body .modula-row-cols-md-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}html body .modula-row-cols-md-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}html body .modula-row-cols-md-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}html body .modula-row-cols-md-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}html body .modula-row-cols-md-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}}@media (min-width:992px){html body .modula-row-cols-lg-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}html body .modula-row-cols-lg-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}html body .modula-row-cols-lg-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}html body .modula-row-cols-lg-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}html body .modula-row-cols-lg-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}html body .modula-row-cols-lg-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}}@media (min-width:1200px){html body .modula-row-cols-xl-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}html body .modula-row-cols-xl-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}html body .modula-row-cols-xl-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}html body .modula-row-cols-xl-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}html body .modula-row-cols-xl-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}html body .modula-row-cols-xl-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}}html body .modula .modula-items.grid-gallery .modula-item .figc{height:100%;top:0}html body div.modula-powered{text-align:right;font-size:14px;margin-right:5px;clear:both}html body div.modula-powered svg.modula-logo{width:14px;position:relative;top:3px}html body div.modula-powered svg.modula-logo path{color:#58ab7e!important}html body div.modula-powered svg.modula-logo{display:inline-block}
1
+ html body .modula .modula-items .modula-item{position:absolute;overflow:hidden;box-sizing:border-box}html body .modula .modula-items .modula-item .modula-item-content{transition:transform .3s ease-out,opacity .2s linear,top .3s,left .6s;opacity:0}html body .modula .modula-items{position:relative;z-index:1;min-height:10px}html body .modula .modula-items .modula-item .modula-item-content>a{display:block;position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background:0 0}html body .modula.modula-creative-gallery .modula-items .modula-item .modula-item-content,html body .modula.modula-custom-grid .modula-items .modula-item .modula-item-content{height:100%}html body .modula .modula-items .modula-item .jtg-social{z-index:10;font-size:0}html body .modula.modula-columns:not(.modula-loaded-scale).modula-gallery-initialized .modula-items .modula-item .modula-item-content,html body .modula:not(.modula-loaded-scale).modula-gallery-initialized .modula-items .modula-item.tg-loaded .modula-item-content,html body .modula:not(.modula-loaded-scale).modula-gallery-initialized .modula-items.justified-gallery .modula-item .modula-item-content{transform:scale(1) translate(0,0) rotate(0)!important;opacity:1}html body .modula .modula-items .modula-item img.pic{font-size:12px;position:absolute;max-width:999em;transition:width .3s,height .3s,transform .3s linear,opacity .2s linear}html body .modula.modula-columns .modula-items .modula-item img.pic{position:relative;max-width:100%;margin:0 auto}html body .modula .modula-items .modula-item.tg-loaded img.pic,html body .modula.modula-columns .modula-items .modula-item img.pic{display:block;opacity:1}html body .modula .modula-items .modula-item img.pic.lazyload,html body .modula .modula-items .modula-item img.pic.lazyloaded{display:block}html body .modula .modula-items .modula-item .caption .icon{font-size:14px;position:absolute;left:50%;top:50%;margin:-12px 0 0 -8px}html body .modula .modula-items .modula-item .figc{color:#fff;text-align:center;position:absolute;left:0;width:100%;padding:0;max-width:100%}html body .modula .modula-items .hidden .figc{display:none}html body .modula .modula-items .hidden:hover .figc{display:block}html body .modula .modula-items .visible .figc{display:block}html body .modula .modula-items .always-visible .figc{display:block}html body .modula .modula-items .visible:hover .figc{display:none}html body .modula .modula-items .caption span.text{display:block;padding:10px}html body .modula .modula-items .caption span.title{font-size:14px;font-weight:700}html body .modula .jtg-social a{box-shadow:none}html body .modula .jtg-social svg{width:20px;height:16px}html body .modula .modula-items .modula-item .jtg-title{margin:0}html body .modula .modula-items .modula-item p{margin:0;padding:0}html body .modula .figc{color:#000;text-align:center;position:absolute;left:0;width:100%;padding:2em}html body .modula .modula-item .jtg-social a{text-decoration:none;color:#fff;display:inline-block;margin:0 10px 0 0;padding:0;border:0;opacity:0;transition:opacity .3s}html body .modula .modula-item:hover .jtg-social a{opacity:1}html body .modula .modula-items .jtg-social{opacity:0;right:30px;position:absolute;bottom:20px;text-align:right;transition:all .3s}html body .et_pb_module_inner .modula .modula-items .jtg-social{transition:all .3s!important}html body .modula .modula-items .modula-item.effect-pufrobo .jtg-social a{margin-right:10px}@media all and (max-width:480px){html body .modula .modula-items .modula-item.effect-pufrobo .jtg-social{right:0;width:100%;text-align:center}html body .modula .modula-items .modula-item.effect-pufrobo .jtg-social a{padding:5px}}html body .modula .modula-items .jtg-social{opacity:1}html body .modula .modula-items .jtg-social a:last-of-type{margin-right:0}html body .modula .modula-item.effect-pufrobo p.description{margin-bottom:2em}html body .et_pb_module_inner .modula .modula-item.effect-pufrobo p.description{-webkit-transition:-webkit-transform .35s!important;transition:transform .35s!important}html body .modula .modula-item.effect-pufrobo .figc{text-align:right}html body .modula .modula-item.effect-pufrobo .jtg-title,html body .modula .modula-item.effect-pufrobo p{position:absolute;right:5%;left:5%;padding:10px 0}html body .modula.modula-gallery-initialized .modula-item:hover img,html body .modula.modula-gallery-initialized .modula-items .modula-item.tg-loaded:hover img.pic{opacity:.8}html body .modula .modula-item.effect-pufrobo p{bottom:20%;line-height:1.5;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);letter-spacing:1px}html body .modula .modula-items .modula-item.effect-pufrobo .jtg-title{top:10%;-webkit-transition:-webkit-transform .35s;transition:transform .35s;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}html body .et_pb_module_inner .modula .modula-items .modula-item.effect-pufrobo .jtg-title{-webkit-transition:-webkit-transform .35s!important;transition:transform .35s!important}html body .modula .modula-item.effect-pufrobo:hover .jtg-title{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}html body .modula .modula-item.effect-pufrobo .jtg-title::after{position:absolute;top:80%;left:0;width:100%;height:4px;background:#fff;content:'';-webkit-transform:translate3d(0,40px,0);transform:translate3d(0,40px,0)}html body .modula .modula-item.effect-pufrobo .jtg-title::after,html body .modula .modula-item.effect-pufrobo p{opacity:0;-webkit-transition:opacity .35s,-webkit-transform .35s;transition:opacity .35s,transform .35s}html body .modula .modula-item.effect-pufrobo:hover .jtg-title::after,html body .modula .modula-item.effect-pufrobo:hover p{margin-top:10px;margin-bottom:5px;opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}html body .modula .modula-items .modula-item.effect-pufrobo .figc.no-title.no-description .jtg-title:after{display:none}html body .modula .modula-items .modula-item.effect-appear .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-comodo .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-crafty .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-curtain .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-fluid-up .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-hide .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-lens .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-pufrobo .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-quiet .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-reflex .figc .jtg-title:before,html body .modula .modula-items .modula-item.effect-seemo .figc .jtg-title:before{display:none}html body .modula .modula-items .modula-item>a{cursor:zoom-in}html body .modula-fancybox-container.modula-fancybox-is-open{z-index:99999999}html body .modula-fancybox-share__button--li{background:#0e76a8}html body .modula-fancybox-share__button--wa{background:#25d366}html body .modula.modula-columns .modula-item{display:flex;justify-content:center}html body .modula.modula-columns .modula-item .modula-item-content{position:relative}html body .modula.modula-columns .modula-items.grid-gallery .modula-item .modula-item-content{height:100%}html body .modula.modula-columns .modula-items.grid-gallery.justified-gallery .modula-item .modula-item-content{width:100%}html body .modula.modula-columns .modula-items.grid-gallery.justified-gallery .modula-item .modula-item-content .pic{position:absolute;top:50%;left:50%;margin:0;padding:0;border:none}html body .modula.modula-columns .modula-item.jg-filtered{display:none}html body .modula-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}html body .modula-row-cols-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}html body .modula-row-cols-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}html body .modula-row-cols-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}html body .modula-row-cols-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}html body .modula-row-cols-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}html body .modula-row-cols-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}@media (min-width:576px){html body .modula-row-cols-sm-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}html body .modula-row-cols-sm-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}html body .modula-row-cols-sm-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}html body .modula-row-cols-sm-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}html body .modula-row-cols-sm-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}html body .modula-row-cols-sm-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}}@media (min-width:768px){html body .modula-row-cols-md-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}html body .modula-row-cols-md-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}html body .modula-row-cols-md-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}html body .modula-row-cols-md-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}html body .modula-row-cols-md-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}html body .modula-row-cols-md-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}}@media (min-width:992px){html body .modula-row-cols-lg-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}html body .modula-row-cols-lg-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}html body .modula-row-cols-lg-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}html body .modula-row-cols-lg-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}html body .modula-row-cols-lg-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}html body .modula-row-cols-lg-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}}@media (min-width:1200px){html body .modula-row-cols-xl-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}html body .modula-row-cols-xl-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}html body .modula-row-cols-xl-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}html body .modula-row-cols-xl-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}html body .modula-row-cols-xl-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}html body .modula-row-cols-xl-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}}html body .modula .modula-items.grid-gallery .modula-item .figc{height:100%;top:0}html body div.modula-powered{text-align:right;font-size:14px;margin-right:5px;clear:both}html body div.modula-powered svg.modula-logo{width:14px;position:relative;top:3px}html body div.modula-powered svg.modula-logo path{color:#58ab7e!important}html body div.modula-powered svg.modula-logo{display:inline-block}html body .modula-gallery:not(.modula-gallery-initialized){visibility:hidden}html body .modula-gallery.modula-gallery-initialized .modula-items .modula-item{visibility:visible}
assets/js/admin/modula-edit.js CHANGED
@@ -1,49 +1,73 @@
1
- (function( $ ){
2
- "use strict";
3
 
4
- $( document ).ready(function(){
5
- $( '.modula-feedback-notice .notice-dismiss' ).click(function(evt){
6
  evt.preventDefault();
7
 
8
  var notice = $(this).parent();
9
  $.ajax({
10
- method: "POST",
11
- url: ajaxurl,
12
- data: { action: "modula-edit-notice" }
13
- }).done(function( msg ) {
14
- notice.remove();
15
- });
16
-
17
  });
18
 
19
  // Copy shortcode functionality
20
- $('.copy-modula-shortcode').click(function (e) {
21
  e.preventDefault();
22
  var gallery_shortcode = $(this).parent().find('input');
23
  gallery_shortcode.focus();
24
  gallery_shortcode.select();
25
- document.execCommand("copy");
26
  $(this).next('span').text('Shortcode copied');
27
  $('.copy-modula-shortcode').not($(this)).parent().find('span').text('');
28
-
29
  });
30
 
31
  // Dismiss notice
32
- $('body').on('click','#modula-lightbox-upgrade .notice-dismiss',function (e) {
33
-
34
  e.preventDefault();
35
  var notice = $(this).parent();
36
 
37
  var data = {
38
- 'action': 'modula_lbu_notice',
39
- 'nonce' : modulaHelper._wpnonce
40
  };
41
 
42
- $.post(modulaHelper.ajax_url, data, function (response) {
43
  // Redirect to plugins page
44
  notice.remove();
45
  });
46
  });
47
  });
48
 
49
- })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($) {
2
+ 'use strict';
3
 
4
+ $(document).ready(function() {
5
+ $('.modula-feedback-notice .notice-dismiss').click(function(evt) {
6
  evt.preventDefault();
7
 
8
  var notice = $(this).parent();
9
  $.ajax({
10
+ method: 'POST',
11
+ url: ajaxurl,
12
+ data: { action: 'modula-edit-notice' }
13
+ }).done(function(msg) {
14
+ notice.remove();
15
+ });
 
16
  });
17
 
18
  // Copy shortcode functionality
19
+ $('.copy-modula-shortcode').click(function(e) {
20
  e.preventDefault();
21
  var gallery_shortcode = $(this).parent().find('input');
22
  gallery_shortcode.focus();
23
  gallery_shortcode.select();
24
+ document.execCommand('copy');
25
  $(this).next('span').text('Shortcode copied');
26
  $('.copy-modula-shortcode').not($(this)).parent().find('span').text('');
 
27
  });
28
 
29
  // Dismiss notice
30
+ $('body').on('click', '#modula-lightbox-upgrade .notice-dismiss', function(e) {
 
31
  e.preventDefault();
32
  var notice = $(this).parent();
33
 
34
  var data = {
35
+ action: 'modula_lbu_notice',
36
+ nonce: modulaHelper._wpnonce
37
  };
38
 
39
+ $.post(modulaHelper.ajax_url, data, function(response) {
40
  // Redirect to plugins page
41
  notice.remove();
42
  });
43
  });
44
  });
45
 
46
+ const modulaOpenModal = (e) => {
47
+ e.preventDefault();
48
+ $.get(
49
+ modulaHelper.ajax_url,
50
+ {
51
+ action: 'modula_modal_upgrade'
52
+ },
53
+ (html) => {
54
+ $('body').addClass('modal-open');
55
+ $('body').append(html);
56
+
57
+ $(document).one('click', '.modula-modal__overlay', modulaCloseModal);
58
+ $(document).one('click', '.modula-modal__dismiss', modulaCloseModal);
59
+ }
60
+ );
61
+ };
62
+
63
+ const modulaCloseModal = () => {
64
+ $('.modula-modal__overlay').remove();
65
+ $('body').removeClass('modal-open');
66
+ };
67
+
68
+ $('body').on(
69
+ 'click',
70
+ '#adminmenu #menu-posts-modula-gallery ul li a[href="edit.php?post_type=modula-gallery&page=#modula-albums"]',
71
+ modulaOpenModal
72
+ );
73
+ })(jQuery);
assets/js/admin/wp-modula-gutenberg.js CHANGED
@@ -1 +1 @@
1
- !function(t){var e={};function a(n){if(e[n])return e[n].exports;var l=e[n]={i:n,l:!1,exports:{}};return t[n].call(l.exports,l,l.exports,a),l.l=!0,l.exports}a.m=t,a.c=e,a.d=function(t,e,n){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var l in t)a.d(n,l,function(e){return t[e]}.bind(null,l));return n},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="",a(a.s=0)}([function(t,e,a){"use strict";a.r(e);var n=wp.i18n.__,l=wp.element,o=(l.Component,l.Fragment),c=wp.editor.InspectorControls,i=wp.components,r=i.SelectControl,d=i.Button,s=i.PanelBody,u=wp.components.withFilters("modula.ModulaInspector")((function(t){var e=t.attributes,a=(t.setAttributes,t.galleries),l=e.id;return React.createElement(o,null,React.createElement(c,null,React.createElement(s,{title:n("Gallery Settings","modula-best-grid-gallery"),initialOpen:!0},a.length>0&&React.createElement(o,null,React.createElement(r,{key:l,label:n("Select Gallery","modula-best-grid-gallery"),value:l,options:t.selectOptions(),onChange:function(e){return t.onIdChange(parseInt(e))}}),0!=l&&React.createElement(d,{target:"_blank",href:modulaVars.adminURL+"post.php?post="+l+"&action=edit",isDefault:!0},n("Edit gallery"))))))})),m={};m.modula=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"364 242.9 312.2 357"},React.createElement("g",null,React.createElement("path",{d:"M528.1,242.9c8.5,16.9,17,33.8,25.6,50.6c13.4,26.4,26.9,52.7,39.9,79.7c-41.8-23.3-83.6-46.7-125.4-70.1 c0.3-1.9,1.7-2.6,2.7-3.5c17.7-17.7,35.4-35.4,53.1-53c1.1-1.1,2.6-2,3.1-3.7C527.4,242.9,527.8,242.9,528.1,242.9z"}),React.createElement("path",{d:"M602.3,463.3c11.3-6.9,22.6-13.9,33.9-20.8c5.5-3.4,11.1-6.7,16.5-10.3c2.2-1.4,2.9-1.1,3.5,1.5 c6.4,25.3,13,50.6,19.6,75.8c0.6,2.2,1,3.7-2.4,3.5c-46.7-2.1-93.5-4.1-140.2-6.1c-0.2,0-0.3-0.1-0.5-0.2c0.5-1.7,2.1-2,3.3-2.7 c20-12.3,39.9-24.7,60-36.8c3.4-2.1,5.1-3.7,4.8-8.5c-1.4-21.3-1.8-42.6-2.6-63.9c-0.9-24.1-1.8-48.3-2.8-72.4 c-0.2-6.1-0.2-6.1,5.5-4.6c23.8,6.2,47.6,12.5,71.5,18.5c3.9,1,4.2,1.9,2.1,5.4c-23.4,38.5-46.7,77.1-70,115.7c-1,1.7-2,3.4-3,5.1 C601.7,462.8,602,463,602.3,463.3z"}),React.createElement("path",{d:"M372.8,326.9c48,2.6,95.8,5.1,143.9,7.7c-0.9,2-2.5,2.3-3.7,3.1c-38.6,23.2-77.3,46.4-115.9,69.6c-3,1.8-4.3,2.6-5.4-1.9 c-5.9-24.9-12.2-49.7-18.3-74.6C373.1,329.6,373,328.4,372.8,326.9z"}),React.createElement("path",{d:"M517.6,599.9c-23.2-43.7-45.9-86.6-69.2-130.5c2.3,1.2,3.5,1.8,4.7,2.4c39.8,21.5,79.5,43.1,119.3,64.5 c3.2,1.7,4.1,2.5,1,5.6c-17.7,17.8-35.2,35.9-52.8,53.9C519.7,596.9,518.9,598.2,517.6,599.9z"}),React.createElement("path",{d:"M364.9,505.1c26.6-40.5,53.1-80.8,79.7-121.3c1.3,1.3,0.9,2.5,0.9,3.6c0,46-0.1,92-0.1,137.9c0,3.1-0.2,4.5-4,3.3 c-24.9-7.7-49.9-15.2-74.9-22.8C366,505.8,365.7,505.5,364.9,505.1z"}))),m.remove=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"})),m.replace=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"})),m.chevronLeft=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),m.chevronRight=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),m.twitter=React.createElement("svg",{"aria-hidden":"true","data-prefix":"fab","data-icon":"twitter",class:"svg-inline--fa fa-twitter fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},React.createElement("path",{fill:"currentColor",d:"M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"})),m.facebook=React.createElement("svg",{"aria-hidden":"true","data-prefix":"fab","data-icon":"facebook-f",class:"svg-inline--fa fa-facebook-f fa-w-9",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 264 512"},React.createElement("path",{fill:"currentColor",d:"M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229"})),m.whatsapp=React.createElement("svg",{"aria-hidden":"true",focusable:"false",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 1536 1600"},React.createElement("path",{d:"M985 878q13 0 97.5 44t89.5 53q2 5 2 15q0 33-17 76q-16 39-71 65.5T984 1158q-57 0-190-62q-98-45-170-118T476 793q-72-107-71-194v-8q3-91 74-158q24-22 52-22q6 0 18 1.5t19 1.5q19 0 26.5 6.5T610 448q8 20 33 88t25 75q0 21-34.5 57.5T599 715q0 7 5 15q34 73 102 137q56 53 151 101q12 7 22 7q15 0 54-48.5t52-48.5zm-203 530q127 0 243.5-50t200.5-134t134-200.5t50-243.5t-50-243.5T1226 336t-200.5-134T782 152t-243.5 50T338 336T204 536.5T154 780q0 203 120 368l-79 233l242-77q158 104 345 104zm0-1382q153 0 292.5 60T1315 247t161 240.5t60 292.5t-60 292.5t-161 240.5t-240.5 161t-292.5 60q-195 0-365-94L0 1574l136-405Q28 991 28 780q0-153 60-292.5T249 247T489.5 86T782 26z",fill:"currentColor"})),m.pinterest=React.createElement("svg",{"aria-hidden":"true","data-prefix":"fab","data-icon":"pinterest-p",class:"svg-inline--fa fa-pinterest-p fa-w-12",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},React.createElement("path",{fill:"currentColor",d:"M204 6.5C101.4 6.5 0 74.9 0 185.6 0 256 39.6 296 63.6 296c9.9 0 15.6-27.6 15.6-35.4 0-9.3-23.7-29.1-23.7-67.8 0-80.4 61.2-137.4 140.4-137.4 68.1 0 118.5 38.7 118.5 109.8 0 53.1-21.3 152.7-90.3 152.7-24.9 0-46.2-18-46.2-43.8 0-37.8 26.4-74.4 26.4-113.4 0-66.2-93.9-54.2-93.9 25.8 0 16.8 2.1 35.4 9.6 50.7-13.8 59.4-42 147.9-42 209.1 0 18.9 2.7 37.5 4.5 56.4 3.4 3.8 1.7 3.4 6.9 1.5 50.4-69 48.6-82.5 71.4-172.8 12.3 23.4 44.1 36 69.3 36 106.2 0 153.9-103.5 153.9-196.8C384 71.3 298.2 6.5 204 6.5z"})),m.linkedin=React.createElement("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fab","data-icon":"linkedin-in",class:"svg-inline--fa fa-linkedin-in fa-w-14",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},React.createElement("path",{fill:"currentColor",d:"M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z"})),m.email=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("path",{d:"M0 3v18h24v-18h-24zm6.623 7.929l-4.623 5.712v-9.458l4.623 3.746zm-4.141-5.929h19.035l-9.517 7.713-9.518-7.713zm5.694 7.188l3.824 3.099 3.83-3.104 5.612 6.817h-18.779l5.513-6.812zm9.208-1.264l4.616-3.741v9.348l-4.616-5.607z",fill:"currentColor"})),m.chevronRightFancy=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-chevron-right",viewBox:"0 0 16 16"},React.createElement("path",{"fill-rule":"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"}));var g=m,f=wp.element.Fragment,p=function(t){var e=t.settings,a=t.img,n=(t.effectCheck,t.hideTitle),l=t.hideDescription,o=t.hideSocial;return[React.createElement(f,null,["tilt_1","tilt_3","tilt_7"].includes(e.effect)&&React.createElement("div",{class:"tilter__deco tilter__deco--shine"},React.createElement("div",null)),["tilt_3","tilt_7"].includes(e.effect)&&React.createElement("div",{class:"tilter__deco tilter__deco--overlay"}),["tilt_1","tilt_7"].includes(e.effect)&&React.createElement("div",{class:"tilter__deco tilter__deco--lines"}),React.createElement("div",{className:"figc"},React.createElement("div",{className:"figc-inner"},"0"==e.hide_title&&!n&&React.createElement("h2",{className:"jtg-title"}," ",a.title," "),React.createElement("div",{className:["lily","sadie","ruby","bubba","dexter","chico","ming"].includes(e.effect)?"jtg-body":""},"0"==e.hide_description&&!l&&React.createElement("p",{className:"description"}," ",0!=a.description.length&&a.description," "),!o&&"1"==e.enableSocial&&React.createElement("div",{className:"jtg-social"},"1"==e.enableTwitter&&React.createElement("a",{className:"modula-icon-twitter",href:"#"}," ","$",g.twitter," "),"1"==e.enableFacebook&&React.createElement("a",{className:"modula-icon-facebook",href:"#"}," ","$",g.facebook," "),"1"==e.enableWhatsapp&&React.createElement("a",{className:"modula-icon-whatsapp",href:"#"}," ","$",g.whatsapp," "),"1"==e.enableLinkedin&&React.createElement("a",{className:"modula-icon-linkedin",href:"#"}," ","$",g.linkedin," "),"1"==e.enablePinterest&&React.createElement("a",{className:"modula-icon-pinterest",href:"#"}," ","$",g.pinterest," "),"1"==e.enableEmail&&React.createElement("a",{className:"modula-icon-email",href:"#"}," ","$",g.email," "))))))]},h=(wp.i18n.__,wp.element),v=(h.useState,h.useEffect,wp.components),y=(v.Button,v.ButtonGroup,wp.blockEditor),b=(y.MediaUpload,y.MediaPlaceholder,wp.components.withFilters("modula.ModulaGalleryImage")((function(t){var e=t.attributes,a=(e.images,e.settings),n=(e.id,e.effectCheck),l=t.img,o=t.index;t.setAttributes,t.checkHoverEffect;return[React.createElement("div",{className:"modula-item effect-".concat(a.effect),"data-width":l["data-width"]?l["data-width"]:"2","data-height":l["data-height"]?l["data-height"]:"2"},React.createElement("div",{className:"modula-item-overlay"}),React.createElement("div",{className:"modula-item-content"},React.createElement("img",{className:"modula-image pic","data-id":l.id,"data-full":l.src,"data-src":l.src,"data-valign":"middle","data-halign":"center",src:l.src}),"slider"!==a.type&&React.createElement(p,{settings:a,img:l,index:o,hideTitle:null==n||1!=n.title,hideDescription:null==n||1!=n.description,hideSocial:null==n||1!=n.social,effectCheck:n})))]}))),w=function(t){var e=t.id,a=t.settings,n="";"grid"==a.type&&"automatic"!=a.grid_type&&(n+="#jtg-".concat(e,".modula-gallery .modula-item, .modula-gallery .modula-grid-sizer { width: calc(").concat(100/a.grid_type,"% - ").concat(a.gutter-a.gutter/a.grid_type,"px) !important}")),"0"!=a.borderSize&&(n+="#jtg-".concat(e," .modula-item {\n\t\t\tborder: ").concat(a.borderSize,"px solid ").concat(a.borderColor,";\n\t\t}")),"0"!=a.borderRadius&&(n+="#jtg-".concat(e," .modula-item {\n\t\t\tborder-radius: ").concat(a.borderRadius,"px;\n\t\t}")),"0"!=a.shadowSize&&(n+="#jtg-".concat(e," .modula-item {\n\t\t\tbox-shadow: ").concat(a.shadowColor," 0px 0px ").concat(a.shadowSize,"px;\n\t\t}")),"#ffffff"!=a.socialIconColor&&(n+="#jtg-".concat(e," .modula-item .jtg-social a {\n\t\t\tcolor: ").concat(a.socialIconColor,";\n\t\t}")),"16"!=a.socialIconSize&&(n+="#jtg-".concat(e," .modula-item .jtg-social svg {\n\t\t\theight: ").concat(a.socialIconSize,"px;\n\t\t\twidth: ").concat(a.socialIconSize,"px;\n\t\t}")),"10"!=a.socialIconPadding&&(n+="#jtg-".concat(e," .modula-item .jtg-social a:not(:last-child) {\n\t\t\tmargin-right: ").concat(a.socialIconPadding,"px;\n\t\t}")),n+="#jtg-".concat(e," .modula-item .caption {\n\t\tbackground-color: ").concat(a.captionColor,";\n\t}"),""!=a.captionColor&&(n+="#jtg-".concat(e," .modula-item .figc {\n\t\t\tcolor: ").concat(a.captionColor,";\n\t\t}")),""!=a.titleFontSize&&"0"!=a.titleFontSize&&(n+="#jtg-".concat(e," .modula-item .figc .jtg-title {\n\t\t\tfont-size: ").concat(a.titleFontSize,"px;\n\t\t}")),""!=a.captionFontSize&&"0"!=a.captionFontSize&&(n+="#jtg-".concat(e," .modula-item .figc p.description {\n\t\t\tfont-size: ").concat(a.captionFontSize,"px;\n\t\t}")),n+="#jtg-".concat(e," .modula-items .figc p.description {\n\t\t\tcolor: ").concat(a.captionColor,";\n\t}"),""!=a.titleColor?n+="#jtg-".concat(e," .modula-items .figc .jtg-title {\n\t\t\tcolor: ").concat(a.titleColor,";\n\t\t}"):n+="#jtg-".concat(e," .modula-items .figc .jtg-title {\n\t\t\tcolor: ").concat(a.captionColor,";\n\t\t}"),n+="#jtg-".concat(e,".modula-gallery .modula-item > a, #jtg-").concat(e,".modula-gallery .modula-item, #jtg-").concat(e,".modula-gallery .modula-item-content > a {\n\t\tcursor: ").concat(a.cursor,";\n\t}"),"custom-grid"==a.type&&"slider"==a.type||(n+="#jtg-".concat(e," {\n\t\twidth: ").concat(a.width,";\n\t\tmargin : 0 auto;\n\t\t}"),0==t.imagesCount?n+="#jtg-".concat(e," .modula-items {\n\t\t\t\theight: 100px;\n\t\t\t}"):"grid"!=a.type&&"slider"!=a.type?n+="#jtg-".concat(e," .modula-items {\n\t\t\t\theight: ").concat(a.height,"px;\n\t\t\t}"):"slider"==a.type&&(n+="#jtg-".concat(e," .modula-items {\n\t\t\t\theight: auto;\n\t\t\t}"))),null!=a.style&&0!=a.style.length&&(n+="".concat(a.style));var l="";return""!=a.mobileTitleFontSize&&0!=a.mobileTitleFontSize&&(l+="#jtg-".concat(e," .modula-item .figc .jtg-title {\n\t\t\tfont-size: ").concat(a.mobileTitleFontSize,"px\n\t\t}")),l+="#jtg-".concat(e," .modula-items .figc p.description {\n\t\tcolor: ").concat(a.captionColor,";\n\t\tfont-size: ").concat(a.mobileCaptionFontSize,"px;\n\t}"),n+="@media screen and (max-width:480px){\n\t\t".concat(l,"\n\t\t}"),"none"==a.effect&&(n+="#jtg-".concat(e," .modula-items .modula-item:hover img {\n\t\t\topacity: 1;\n\t\t}")),n+="#jtg-".concat(e,".modula .modula-items .modula-item .modula-item-overlay, #jtg-").concat(e,".modula .modula-items .modula-item.effect-layla, #jtg-").concat(e,".modula .modula-items .modula-item.effect-ruby, #jtg-").concat(e,".modula .modula-items .modula-item.effect-bubba, #jtg-").concat(e,".modula .modula-items .modula-item.effect-sarah, #jtg-").concat(e,".modula .modula-items .modula-item.effect-milo, #jtg-").concat(e,".modula .modula-items .modula-item.effect-julia, #jtg-").concat(e,".modula .modula-items .modula-item.effect-hera, #jtg-").concat(e,".modula .modula-items .modula-item.effect-winston, #jtg-").concat(e,".modula .modula-items .modula-item.effect-selena, #jtg-").concat(e,".modula .modula-items .modula-item.effect-terry, #jtg-").concat(e,".modula .modula-items .modula-item.effect-phoebe, #jtg-").concat(e,".modula .modula-items} .modula-item.effect-apollo, #jtg-").concat(e,".modula .modula-items .modula-item.effect-steve, #jtg-").concat(e,".modula .modula-items .modula-item.effect-ming{ \n\t\tbackground-color: ").concat(a.hoverColor,";\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-oscar {\n\t\tbackground: -webkit-linear-gradient(45deg, ").concat(a.hoverColor," 0, #9b4a1b 40%, ").concat(a.hoverColor," 100%);\n\t\tbackground: linear-gradient(45deg, ").concat(a.hoverColor," 0, #9b4a1b 40%, ").concat(a.hoverColor," 100%);\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-roxy {\n\t\tbackground: -webkit-linear-gradient(45deg, ").concat(a.hoverColor," 0, #05abe0 100%);\n\t\tbackground: linear-gradient(45deg, ").concat(a.hoverColor," 0, #05abe0 100%);\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-dexter {\n\t\tbackground: -webkit-linear-gradient(top, ").concat(a.hoverColor," 0, rgba(104,60,19,1) 100%);\n\t\tbackground: linear-gradient(top, ").concat(a.hoverColor," 0, rgba(104,60,19,1) 100%);\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-jazz {\n\t\tbackground: -webkit-linear-gradient(-45deg, ").concat(a.hoverColor," 0, #f33f58 100%);\n\t\tbackground: linear-gradient(-45deg, ").concat(a.hoverColor," 0, #f33f58 100%);\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-lexi {\n\t\tbackground: -webkit-linear-gradient(-45deg, ").concat(a.hoverColor," 0, #fff 100%);\n\t\tbackground: linear-gradient(-45deg, ").concat(a.hoverColor," 0, #fff 100%);\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-duke {\n\t\tbackground: -webkit-linear-gradient(-45deg, ").concat(a.hoverColor," 0, #cc6055 100%);\n\t\tbackground: linear-gradient(-45deg, ").concat(a.hoverColor," 0, #cc6055 100%);\n\t}"),a.hoverOpacity<=100&&"none"!=a.effect&&(n+="#jtg-".concat(e,".modula .modula-items .modula-item:hover img {\n\t\t\topacity: ").concat(1-a.hoverOpacity/100," ;\n\t\t}")),"default"!=a.titleFontWeight&&(n+="#jtg-".concat(e,".modula .modula-items .modula-item .jtg-title {\n\t\t\tfont-weight : ").concat(a.titleFontWeight,";\n\t\t}")),"default"!=a.captionFontWeight&&(n+="#jtg-".concat(e,".modula .modula-items .modula-item p.description {\n\t\t\tfont-weight : ").concat(a.captionFontWeight,";\n\t\t}")),n+="#jtg-".concat(e,".modula-gallery .modula-item.effect-terry .jtg-social a:not(:last-child) {\n\t\tmargin-bottom: ").concat(a.socialIconPadding,"px;\n\t}"),"slider"==a.type&&("true"==jQuery("[aria-label=Settings]").attr("aria-expanded")?n+="#jtg-".concat(e," {\n\t\t\t\t\twidth: 800px;\n\t\t\t\t\t}"):n+="#jtg-".concat(e," {\n\t\t\twidth: 1100px;\n\t\t\t}"),n+="#jtg-".concat(e," .modula-items {\n\t\theight: auto;\n\t\t}"),n+="#jtg-".concat(e," .modula-item {\n\t\tbackground-color: transparent;\n\t\ttransform: none;\n\t\t}")),null!=a.filters&&a.filters.length>1&&(n+="#jtg-".concat(e,".modula-gallery .filters {\n\t\t\ttext-align: ").concat(a.filterTextAlignment,";\n\t\t}")),React.createElement("style",{dangerouslySetInnerHTML:{__html:"\n \t\t\t\t".concat(n,"\n \t\t\t\t")}})},j=wp.components.withFilters("modula.ModulaItemsExtraComponent")((function(t){return null}));function R(){return(R=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t}).apply(this,arguments)}wp.i18n.__;var E=wp.element,k=(E.Component,E.Fragment),x=E.useEffect,C=(E.useState,wp.components.withFilters("modula.modulaGallery")((function(t){var e=t.attributes,a=e.images,n=e.jsConfig,l=e.id,o=t.settings,c=(t.galleryId,t.checkHoverEffect),i=t.modulaRun,r=t.modulaSlickRun;x((function(){void 0!==o&&c(o.effect),"slider"!==o.type?i(n):r()}),[]);var d="modula modula-gallery ",s="modula-items";return"creative-gallery"==o.type?d+="modula-creative-gallery":"custom-grid"==o.type?d+="modula-custom-grid":"slider"==o.type?d="modula-slider":(d+="modula-columns",s+=" grid-gallery","automatic"==o.grid_type&&(s+=" justified-gallery")),[React.createElement(k,null,React.createElement(w,{id:l,settings:o}),React.createElement("div",{id:"jtg-".concat(l),className:"".concat(d," ").concat(null!=t.attributes.modulaDivClassName?t.attributes.modulaDivClassName:""),"data-config":n},"grid"==o.type&&"automatic"!=o.grid_type&&React.createElement("div",{class:"modula-grid-sizer"}," "),React.createElement(j,R({},t,{position:"top"})),React.createElement("div",{className:s},a.length>0&&React.createElement(k,null,React.createElement(k,null,a.map((function(e,a){return[React.createElement(b,R({},t,{img:e,index:a}))]}))))),React.createElement(j,R({},t,{position:"bottom"}))))]})));function _(){return(_=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t}).apply(this,arguments)}function S(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var a=[],n=!0,l=!1,o=void 0;try{for(var c,i=t[Symbol.iterator]();!(n=(c=i.next()).done)&&(a.push(c.value),!e||a.length!==e);n=!0);}catch(t){l=!0,o=t}finally{try{n||null==i.return||i.return()}finally{if(l)throw o}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return z(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return z(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function z(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,n=new Array(e);a<e;a++)n[a]=t[a];return n}var N=wp.i18n.__,T=wp.element,M=(T.Component,T.Fragment),O=T.useEffect,I=T.useState,F=wp.data.withSelect,q=wp.components,B=q.SelectControl,P=q.Button,V=q.Spinner,L=q.Toolbar,Q=q.IconButton,A=wp.editor.BlockControls,G=(0,wp.compose.compose)(F((function(t,e){return{galleries:(0,t("core").getEntityRecords)("postType","modula-gallery",{post_status:"publish",per_page:-1})||[]}})),wp.components.withFilters("modula.ModulaEdit"))((function(t){var e=t.attributes,a=t.galleries,n=t.setAttributes,l=e.id,o=e.images,c=e.status,i=e.settings,r=e.jsConfig,d=e.galleryId,s=S(I(t.attributes.align),2),m=s[0],f=s[1],p=S(I(l),2),h=p[0];p[1];O((function(){0!==l&&v(l)}),[]),O((function(){jQuery(document).on("modula_api_after_init",(function(e,a){t.setAttributes({instance:a})})),m!=t.attributes.align&&null!=t.attributes.instance&&(t.attributes.instance.onResize(t.attributes.instance),f(t.attributes.align))}));var v=function(t){jQuery.ajax({type:"POST",data:{action:"modula_get_gallery_meta",id:t,nonce:modulaVars.nonce},url:modulaVars.ajaxURL,success:function(e){return y(t,e)}})},y=function(t,e){!1!==e.success?(h==t&&null!=i||b(t),n({id:t,images:JSON.parse(e),status:"ready"})):n({id:t,status:"ready"})},b=function(t){fetch("".concat(modulaVars.restURL,"wp/v2/modula-gallery")).then((function(t){return t.json()})).then((function(e){var a=e.filter((function(e){return t==e.id}));n({status:"loading"}),jQuery.ajax({type:"POST",data:{action:"modula_get_jsconfig",nonce:modulaVars.nonce,settings:a[0].modulaSettings},url:modulaVars.ajaxURL,success:function(t){var e=Math.floor(999*Math.random());n({galleryId:e,settings:a[0].modulaSettings,jsConfig:t,status:"ready"})}})}))},w=function(){var t=[{value:0,label:N("select a gallery","modula-best-grid-gallery")}];return a.forEach((function(e){var a=e.title,n=e.id;0==a.rendered.length?t.push({value:n,label:N("Unnamed Gallery","modula-best-grid-gallery")+n}):t.push({value:n,label:a.rendered})})),t},j=React.createElement(A,null,o&&o.length>0&&React.createElement(L,null,React.createElement(Q,{label:N("Edit gallery","modula-best-grid-gallery"),icon:"edit",href:modulaVars.adminURL+"post.php?post="+l+"&action=edit",target:"_blank"})));return 0==l&&"none"===e.galleryType?[React.createElement(M,null,React.createElement("div",{className:"modula-block-preview"},React.createElement("div",{className:"modula-block-preview__content"},React.createElement("div",{className:"modula-block-preview__logo"}),React.createElement("div",{className:"modula-button-group"},a.length>0&&React.createElement(P,{className:"modula-button",target:"_blank",onClick:function(t){n({status:"ready",id:0,galleryType:"gallery"})}},N("Display An Existing Gallery","modula-best-grid-gallery"),g.chevronRightFancy),null==t.attributes.proInstalled&&React.createElement(P,{href:"https://wp-modula.com/pricing/?utm_source=modula-lite&utm_campaign=upsell",className:"modula-button-upsell",isSecondary:!0,target:"_blank"},N("Upgrade to PRO to create galleries using a preset ( fastest way )","modula-best-grid-gallery"))))))]:"loading"===c?[React.createElement(M,null,React.createElement("div",{className:"modula-block-preview"},React.createElement("div",{className:"modula-block-preview__content"},React.createElement("div",{className:"modula-block-preview__logo"}),React.createElement(V,null))))]:0==l||0===o.length?[React.createElement(M,null,React.createElement(u,_({onIdChange:function(t){return v(t)},selectOptions:w},t)),React.createElement("div",{className:"modula-block-preview"},React.createElement("div",{className:"modula-block-preview__content"},React.createElement("div",{className:"modula-block-preview__logo"}),a.length>0&&React.createElement(M,null,React.createElement(B,{key:l,value:l,options:w(),onChange:function(t){return v(parseInt(t))}}),0!=l&&React.createElement(P,{target:"_blank",href:modulaVars.adminURL+"post.php?post="+l+"&action=edit",isPrimary:!0},N("Edit Gallery"))))))]:i?[React.createElement(M,null,j,React.createElement(u,_({onIdChange:function(t){return v(t)},selectOptions:w},t)),React.createElement(C,_({},t,{settings:i,jsConfig:r,modulaRun:function(t){if(null!=t){n({status:"ready"});var e=jQuery(".modula.modula-gallery");jQuery.each(e,(function(){jQuery(this).attr("id");var e=jQuery(this).data("config");e.lazyLoad=0,null!=e&&void 0!==JSON.parse(t).type&&JSON.parse(t).type==e.type&&jQuery(this).modulaGallery(e)}))}},modulaSlickRun:function(){var t=jQuery(".modula-slider");t.length>0&&jQuery.each(t,(function(){jQuery(this).attr("id");var t=jQuery(this).data("config"),e=jQuery(this).find(".modula-slider-nav"),a=jQuery(this).find(".modula-items");if(a.slick(t.slider_settings),e.length){var n=e.data("config"),l=a.slick("slickCurrentSlide");e.on("init",(function(t,a){e.find('.slick-slide[data-slick-index="'+l+'"]').addClass("is-active")})),e.slick(n),a.on("afterChange",(function(t,a,n){e.slick("slickGoTo",n);var l='.slick-slide[data-slick-index="'+n+'"]';e.find(".slick-slide.is-active").removeClass("is-active"),e.find(l).addClass("is-active")})),e.on("click",".slick-slide",(function(t){t.preventDefault();var e=jQuery(this).data("slick-index");a.slick("slickGoTo",e)}))}}))},checkHoverEffect:function(t){jQuery.ajax({type:"POST",data:{action:"modula_check_hover_effect",nonce:modulaVars.nonce,effect:t},url:modulaVars.ajaxURL,success:function(t){n({effectCheck:JSON.parse(t)})}})},galleryId:d})))]:null}));function U(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var H=wp.i18n.__,D=wp.blocks.registerBlockType;new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.registerBlock()}var e,a,n;return e=t,(a=[{key:"registerBlock",value:function(){this.blockName="modula/gallery",this.blockAttributes={id:{type:"number",default:0},images:{type:"array",default:[]},status:{type:"string",default:"ready"},galleryId:{type:"number",default:0},defaultSettings:{type:"object",default:[]},galleryType:{type:"string",default:"none"}},D(this.blockName,{title:modulaVars.gutenbergTitle,icon:g.modula,description:H("Make your galleries stand out.","modula-best-grid-gallery"),keywords:[H("gallery"),H("modula"),H("images")],category:"common",supports:{align:!0,customClassName:!1},attributes:this.blockAttributes,edit:G,save:function(){return null}})}}])&&U(e.prototype,a),n&&U(e,n),t}())}]);
1
+ !function(t){var e={};function a(n){if(e[n])return e[n].exports;var l=e[n]={i:n,l:!1,exports:{}};return t[n].call(l.exports,l,l.exports,a),l.l=!0,l.exports}a.m=t,a.c=e,a.d=function(t,e,n){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var l in t)a.d(n,l,function(e){return t[e]}.bind(null,l));return n},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="",a(a.s=0)}([function(t,e,a){"use strict";a.r(e);wp.i18n.__;var n=wp.element,l=(n.Component,n.Fragment,n.useEffect),o=(n.useState,wp.data.withSelect,wp.components),c=(o.SelectControl,o.Button,o.Spinner,o.Toolbar,o.IconButton,wp.editor.BlockControls,wp.compose.compose,wp.components.__experimentalInputControl,function(t){var e=t.onIdChange,a=t.id,n=t.options;return l((function(){jQuery(".modula-gallery-input").selectize({valueField:"value",labelField:"label",searchField:["label","value"],create:!1,maxItems:1,placeholder:"Search for a gallery...",preload:!0,allowEmptyOptions:!0,closeAfterSelect:!0,options:n,render:{option:function(t,e){return'<div><span class="title">'+e(t.label)+'<span class="name">( #'+e(t.value)+" )</span></div>"}},load:function(t,e){if(!t.length)return e();jQuery.ajax({url:modulaVars.ajaxURL,type:"GET",data:{action:"modula_get_gallery",nonce:modulaVars.nonce,term:t},success:function(t){e(t)}})},onChange:function(t){e(t)}})}),[]),React.createElement("input",{className:"modula-gallery-input",value:"0"==a?"":a})}),i=wp.i18n.__,r=wp.element,d=(r.Component,r.Fragment),u=wp.editor.InspectorControls,s=wp.components,m=(s.SelectControl,s.Button),g=s.PanelBody,f=wp.components.withFilters("modula.ModulaInspector")((function(t){var e=t.attributes,a=(t.setAttributes,t.galleries),n=t.onIdChange,l=e.id,o=(e.currentGallery,e.currentSelectize);return React.createElement(d,null,React.createElement(u,null,React.createElement(g,{title:i("Gallery Settings","modula-best-grid-gallery"),initialOpen:!0},a.length>0&&React.createElement(d,null,React.createElement(c,{id:l,key:l,value:l,options:o,onIdChange:n}),0!=l&&React.createElement(m,{target:"_blank",href:modulaVars.adminURL+"post.php?post="+l+"&action=edit",isDefault:!0},i("Edit gallery"))))))})),p={};p.modula=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"364 242.9 312.2 357"},React.createElement("g",null,React.createElement("path",{d:"M528.1,242.9c8.5,16.9,17,33.8,25.6,50.6c13.4,26.4,26.9,52.7,39.9,79.7c-41.8-23.3-83.6-46.7-125.4-70.1 c0.3-1.9,1.7-2.6,2.7-3.5c17.7-17.7,35.4-35.4,53.1-53c1.1-1.1,2.6-2,3.1-3.7C527.4,242.9,527.8,242.9,528.1,242.9z"}),React.createElement("path",{d:"M602.3,463.3c11.3-6.9,22.6-13.9,33.9-20.8c5.5-3.4,11.1-6.7,16.5-10.3c2.2-1.4,2.9-1.1,3.5,1.5 c6.4,25.3,13,50.6,19.6,75.8c0.6,2.2,1,3.7-2.4,3.5c-46.7-2.1-93.5-4.1-140.2-6.1c-0.2,0-0.3-0.1-0.5-0.2c0.5-1.7,2.1-2,3.3-2.7 c20-12.3,39.9-24.7,60-36.8c3.4-2.1,5.1-3.7,4.8-8.5c-1.4-21.3-1.8-42.6-2.6-63.9c-0.9-24.1-1.8-48.3-2.8-72.4 c-0.2-6.1-0.2-6.1,5.5-4.6c23.8,6.2,47.6,12.5,71.5,18.5c3.9,1,4.2,1.9,2.1,5.4c-23.4,38.5-46.7,77.1-70,115.7c-1,1.7-2,3.4-3,5.1 C601.7,462.8,602,463,602.3,463.3z"}),React.createElement("path",{d:"M372.8,326.9c48,2.6,95.8,5.1,143.9,7.7c-0.9,2-2.5,2.3-3.7,3.1c-38.6,23.2-77.3,46.4-115.9,69.6c-3,1.8-4.3,2.6-5.4-1.9 c-5.9-24.9-12.2-49.7-18.3-74.6C373.1,329.6,373,328.4,372.8,326.9z"}),React.createElement("path",{d:"M517.6,599.9c-23.2-43.7-45.9-86.6-69.2-130.5c2.3,1.2,3.5,1.8,4.7,2.4c39.8,21.5,79.5,43.1,119.3,64.5 c3.2,1.7,4.1,2.5,1,5.6c-17.7,17.8-35.2,35.9-52.8,53.9C519.7,596.9,518.9,598.2,517.6,599.9z"}),React.createElement("path",{d:"M364.9,505.1c26.6-40.5,53.1-80.8,79.7-121.3c1.3,1.3,0.9,2.5,0.9,3.6c0,46-0.1,92-0.1,137.9c0,3.1-0.2,4.5-4,3.3 c-24.9-7.7-49.9-15.2-74.9-22.8C366,505.8,365.7,505.5,364.9,505.1z"}))),p.remove=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"})),p.replace=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"})),p.chevronLeft=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),p.chevronRight=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),p.twitter=React.createElement("svg",{"aria-hidden":"true","data-prefix":"fab","data-icon":"twitter",class:"svg-inline--fa fa-twitter fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},React.createElement("path",{fill:"currentColor",d:"M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"})),p.facebook=React.createElement("svg",{"aria-hidden":"true","data-prefix":"fab","data-icon":"facebook-f",class:"svg-inline--fa fa-facebook-f fa-w-9",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 264 512"},React.createElement("path",{fill:"currentColor",d:"M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229"})),p.whatsapp=React.createElement("svg",{"aria-hidden":"true",focusable:"false",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 1536 1600"},React.createElement("path",{d:"M985 878q13 0 97.5 44t89.5 53q2 5 2 15q0 33-17 76q-16 39-71 65.5T984 1158q-57 0-190-62q-98-45-170-118T476 793q-72-107-71-194v-8q3-91 74-158q24-22 52-22q6 0 18 1.5t19 1.5q19 0 26.5 6.5T610 448q8 20 33 88t25 75q0 21-34.5 57.5T599 715q0 7 5 15q34 73 102 137q56 53 151 101q12 7 22 7q15 0 54-48.5t52-48.5zm-203 530q127 0 243.5-50t200.5-134t134-200.5t50-243.5t-50-243.5T1226 336t-200.5-134T782 152t-243.5 50T338 336T204 536.5T154 780q0 203 120 368l-79 233l242-77q158 104 345 104zm0-1382q153 0 292.5 60T1315 247t161 240.5t60 292.5t-60 292.5t-161 240.5t-240.5 161t-292.5 60q-195 0-365-94L0 1574l136-405Q28 991 28 780q0-153 60-292.5T249 247T489.5 86T782 26z",fill:"currentColor"})),p.pinterest=React.createElement("svg",{"aria-hidden":"true","data-prefix":"fab","data-icon":"pinterest-p",class:"svg-inline--fa fa-pinterest-p fa-w-12",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},React.createElement("path",{fill:"currentColor",d:"M204 6.5C101.4 6.5 0 74.9 0 185.6 0 256 39.6 296 63.6 296c9.9 0 15.6-27.6 15.6-35.4 0-9.3-23.7-29.1-23.7-67.8 0-80.4 61.2-137.4 140.4-137.4 68.1 0 118.5 38.7 118.5 109.8 0 53.1-21.3 152.7-90.3 152.7-24.9 0-46.2-18-46.2-43.8 0-37.8 26.4-74.4 26.4-113.4 0-66.2-93.9-54.2-93.9 25.8 0 16.8 2.1 35.4 9.6 50.7-13.8 59.4-42 147.9-42 209.1 0 18.9 2.7 37.5 4.5 56.4 3.4 3.8 1.7 3.4 6.9 1.5 50.4-69 48.6-82.5 71.4-172.8 12.3 23.4 44.1 36 69.3 36 106.2 0 153.9-103.5 153.9-196.8C384 71.3 298.2 6.5 204 6.5z"})),p.linkedin=React.createElement("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fab","data-icon":"linkedin-in",class:"svg-inline--fa fa-linkedin-in fa-w-14",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},React.createElement("path",{fill:"currentColor",d:"M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z"})),p.email=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("path",{d:"M0 3v18h24v-18h-24zm6.623 7.929l-4.623 5.712v-9.458l4.623 3.746zm-4.141-5.929h19.035l-9.517 7.713-9.518-7.713zm5.694 7.188l3.824 3.099 3.83-3.104 5.612 6.817h-18.779l5.513-6.812zm9.208-1.264l4.616-3.741v9.348l-4.616-5.607z",fill:"currentColor"})),p.chevronRightFancy=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-chevron-right",viewBox:"0 0 16 16"},React.createElement("path",{"fill-rule":"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"}));var h=p,v=wp.element.Fragment,y=function(t){var e=t.settings,a=t.img,n=(t.effectCheck,t.hideTitle),l=t.hideDescription,o=t.hideSocial;return[React.createElement(v,null,["tilt_1","tilt_3","tilt_7"].includes(e.effect)&&React.createElement("div",{class:"tilter__deco tilter__deco--shine"},React.createElement("div",null)),["tilt_3","tilt_7"].includes(e.effect)&&React.createElement("div",{class:"tilter__deco tilter__deco--overlay"}),["tilt_1","tilt_7"].includes(e.effect)&&React.createElement("div",{class:"tilter__deco tilter__deco--lines"}),React.createElement("div",{className:"figc"},React.createElement("div",{className:"figc-inner"},"0"==e.hide_title&&!n&&React.createElement("h2",{className:"jtg-title"}," ",a.title," "),React.createElement("div",{className:["lily","sadie","ruby","bubba","dexter","chico","ming"].includes(e.effect)?"jtg-body":""},"0"==e.hide_description&&!l&&React.createElement("p",{className:"description"}," ",0!=a.description.length&&a.description," "),!o&&"1"==e.enableSocial&&React.createElement("div",{className:"jtg-social"},"1"==e.enableTwitter&&React.createElement("a",{className:"modula-icon-twitter",href:"#"}," ","$",h.twitter," "),"1"==e.enableFacebook&&React.createElement("a",{className:"modula-icon-facebook",href:"#"}," ","$",h.facebook," "),"1"==e.enableWhatsapp&&React.createElement("a",{className:"modula-icon-whatsapp",href:"#"}," ","$",h.whatsapp," "),"1"==e.enableLinkedin&&React.createElement("a",{className:"modula-icon-linkedin",href:"#"}," ","$",h.linkedin," "),"1"==e.enablePinterest&&React.createElement("a",{className:"modula-icon-pinterest",href:"#"}," ","$",h.pinterest," "),"1"==e.enableEmail&&React.createElement("a",{className:"modula-icon-email",href:"#"}," ","$",h.email," "))))))]},b=(wp.i18n.__,wp.element),w=(b.useState,b.useEffect,wp.components),j=(w.Button,w.ButtonGroup,wp.blockEditor),E=(j.MediaUpload,j.MediaPlaceholder,wp.components.withFilters("modula.ModulaGalleryImage")((function(t){var e=t.attributes,a=(e.images,e.settings),n=(e.id,e.effectCheck),l=t.img,o=t.index;t.setAttributes,t.checkHoverEffect;return[React.createElement("div",{className:"modula-item effect-".concat(a.effect),"data-width":l["data-width"]?l["data-width"]:"2","data-height":l["data-height"]?l["data-height"]:"2"},React.createElement("div",{className:"modula-item-overlay"}),React.createElement("div",{className:"modula-item-content"},React.createElement("img",{className:"modula-image pic","data-id":l.id,"data-full":l.src,"data-src":l.src,"data-valign":"middle","data-halign":"center",src:l.src}),"slider"!==a.type&&React.createElement(y,{settings:a,img:l,index:o,hideTitle:null==n||1!=n.title,hideDescription:null==n||1!=n.description,hideSocial:null==n||1!=n.social,effectCheck:n})))]}))),R=function(t){var e=t.id,a=t.settings,n="";"grid"==a.type&&"automatic"!=a.grid_type&&(n+="#jtg-".concat(e,".modula-gallery .modula-item, .modula-gallery .modula-grid-sizer { width: calc(").concat(100/a.grid_type,"% - ").concat(a.gutter-a.gutter/a.grid_type,"px) !important}")),"0"!=a.borderSize&&(n+="#jtg-".concat(e," .modula-item {\n\t\t\tborder: ").concat(a.borderSize,"px solid ").concat(a.borderColor,";\n\t\t}")),"0"!=a.borderRadius&&(n+="#jtg-".concat(e," .modula-item {\n\t\t\tborder-radius: ").concat(a.borderRadius,"px;\n\t\t}")),"0"!=a.shadowSize&&(n+="#jtg-".concat(e," .modula-item {\n\t\t\tbox-shadow: ").concat(a.shadowColor," 0px 0px ").concat(a.shadowSize,"px;\n\t\t}")),"#ffffff"!=a.socialIconColor&&(n+="#jtg-".concat(e," .modula-item .jtg-social a {\n\t\t\tcolor: ").concat(a.socialIconColor,";\n\t\t}")),"16"!=a.socialIconSize&&(n+="#jtg-".concat(e," .modula-item .jtg-social svg {\n\t\t\theight: ").concat(a.socialIconSize,"px;\n\t\t\twidth: ").concat(a.socialIconSize,"px;\n\t\t}")),"10"!=a.socialIconPadding&&(n+="#jtg-".concat(e," .modula-item .jtg-social a:not(:last-child) {\n\t\t\tmargin-right: ").concat(a.socialIconPadding,"px;\n\t\t}")),n+="#jtg-".concat(e," .modula-item .caption {\n\t\tbackground-color: ").concat(a.captionColor,";\n\t}"),""!=a.captionColor&&(n+="#jtg-".concat(e," .modula-item .figc {\n\t\t\tcolor: ").concat(a.captionColor,";\n\t\t}")),""!=a.titleFontSize&&"0"!=a.titleFontSize&&(n+="#jtg-".concat(e," .modula-item .figc .jtg-title {\n\t\t\tfont-size: ").concat(a.titleFontSize,"px;\n\t\t}")),""!=a.captionFontSize&&"0"!=a.captionFontSize&&(n+="#jtg-".concat(e," .modula-item .figc p.description {\n\t\t\tfont-size: ").concat(a.captionFontSize,"px;\n\t\t}")),n+="#jtg-".concat(e," .modula-items .figc p.description {\n\t\t\tcolor: ").concat(a.captionColor,";\n\t}"),""!=a.titleColor?n+="#jtg-".concat(e," .modula-items .figc .jtg-title {\n\t\t\tcolor: ").concat(a.titleColor,";\n\t\t}"):n+="#jtg-".concat(e," .modula-items .figc .jtg-title {\n\t\t\tcolor: ").concat(a.captionColor,";\n\t\t}"),n+="#jtg-".concat(e,".modula-gallery .modula-item > a, #jtg-").concat(e,".modula-gallery .modula-item, #jtg-").concat(e,".modula-gallery .modula-item-content > a {\n\t\tcursor: ").concat(a.cursor,";\n\t}"),"custom-grid"==a.type&&"slider"==a.type||(n+="#jtg-".concat(e," {\n\t\twidth: ").concat(a.width,";\n\t\tmargin : 0 auto;\n\t\t}"),0==t.imagesCount?n+="#jtg-".concat(e," .modula-items {\n\t\t\t\theight: 100px;\n\t\t\t}"):"grid"!=a.type&&"slider"!=a.type?n+="#jtg-".concat(e," .modula-items {\n\t\t\t\theight: ").concat(a.height,"px;\n\t\t\t}"):"slider"==a.type&&(n+="#jtg-".concat(e," .modula-items {\n\t\t\t\theight: auto;\n\t\t\t}"))),null!=a.style&&0!=a.style.length&&(n+="".concat(a.style));var l="";return""!=a.mobileTitleFontSize&&0!=a.mobileTitleFontSize&&(l+="#jtg-".concat(e," .modula-item .figc .jtg-title {\n\t\t\tfont-size: ").concat(a.mobileTitleFontSize,"px\n\t\t}")),l+="#jtg-".concat(e," .modula-items .figc p.description {\n\t\tcolor: ").concat(a.captionColor,";\n\t\tfont-size: ").concat(a.mobileCaptionFontSize,"px;\n\t}"),n+="@media screen and (max-width:480px){\n\t\t".concat(l,"\n\t\t}"),"none"==a.effect&&(n+="#jtg-".concat(e," .modula-items .modula-item:hover img {\n\t\t\topacity: 1;\n\t\t}")),n+="#jtg-".concat(e,".modula .modula-items .modula-item .modula-item-overlay, #jtg-").concat(e,".modula .modula-items .modula-item.effect-layla, #jtg-").concat(e,".modula .modula-items .modula-item.effect-ruby, #jtg-").concat(e,".modula .modula-items .modula-item.effect-bubba, #jtg-").concat(e,".modula .modula-items .modula-item.effect-sarah, #jtg-").concat(e,".modula .modula-items .modula-item.effect-milo, #jtg-").concat(e,".modula .modula-items .modula-item.effect-julia, #jtg-").concat(e,".modula .modula-items .modula-item.effect-hera, #jtg-").concat(e,".modula .modula-items .modula-item.effect-winston, #jtg-").concat(e,".modula .modula-items .modula-item.effect-selena, #jtg-").concat(e,".modula .modula-items .modula-item.effect-terry, #jtg-").concat(e,".modula .modula-items .modula-item.effect-phoebe, #jtg-").concat(e,".modula .modula-items} .modula-item.effect-apollo, #jtg-").concat(e,".modula .modula-items .modula-item.effect-steve, #jtg-").concat(e,".modula .modula-items .modula-item.effect-ming{ \n\t\tbackground-color: ").concat(a.hoverColor,";\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-oscar {\n\t\tbackground: -webkit-linear-gradient(45deg, ").concat(a.hoverColor," 0, #9b4a1b 40%, ").concat(a.hoverColor," 100%);\n\t\tbackground: linear-gradient(45deg, ").concat(a.hoverColor," 0, #9b4a1b 40%, ").concat(a.hoverColor," 100%);\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-roxy {\n\t\tbackground: -webkit-linear-gradient(45deg, ").concat(a.hoverColor," 0, #05abe0 100%);\n\t\tbackground: linear-gradient(45deg, ").concat(a.hoverColor," 0, #05abe0 100%);\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-dexter {\n\t\tbackground: -webkit-linear-gradient(top, ").concat(a.hoverColor," 0, rgba(104,60,19,1) 100%);\n\t\tbackground: linear-gradient(top, ").concat(a.hoverColor," 0, rgba(104,60,19,1) 100%);\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-jazz {\n\t\tbackground: -webkit-linear-gradient(-45deg, ").concat(a.hoverColor," 0, #f33f58 100%);\n\t\tbackground: linear-gradient(-45deg, ").concat(a.hoverColor," 0, #f33f58 100%);\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-lexi {\n\t\tbackground: -webkit-linear-gradient(-45deg, ").concat(a.hoverColor," 0, #fff 100%);\n\t\tbackground: linear-gradient(-45deg, ").concat(a.hoverColor," 0, #fff 100%);\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-duke {\n\t\tbackground: -webkit-linear-gradient(-45deg, ").concat(a.hoverColor," 0, #cc6055 100%);\n\t\tbackground: linear-gradient(-45deg, ").concat(a.hoverColor," 0, #cc6055 100%);\n\t}"),a.hoverOpacity<=100&&"none"!=a.effect&&(n+="#jtg-".concat(e,".modula .modula-items .modula-item:hover img {\n\t\t\topacity: ").concat(1-a.hoverOpacity/100," ;\n\t\t}")),"default"!=a.titleFontWeight&&(n+="#jtg-".concat(e,".modula .modula-items .modula-item .jtg-title {\n\t\t\tfont-weight : ").concat(a.titleFontWeight,";\n\t\t}")),"default"!=a.captionFontWeight&&(n+="#jtg-".concat(e,".modula .modula-items .modula-item p.description {\n\t\t\tfont-weight : ").concat(a.captionFontWeight,";\n\t\t}")),n+="#jtg-".concat(e,".modula-gallery .modula-item.effect-terry .jtg-social a:not(:last-child) {\n\t\tmargin-bottom: ").concat(a.socialIconPadding,"px;\n\t}"),"slider"==a.type&&("true"==jQuery("[aria-label=Settings]").attr("aria-expanded")?n+="#jtg-".concat(e," {\n\t\t\t\t\twidth: 800px;\n\t\t\t\t\t}"):n+="#jtg-".concat(e," {\n\t\t\twidth: 1100px;\n\t\t\t}"),n+="#jtg-".concat(e," .modula-items {\n\t\theight: auto;\n\t\t}"),n+="#jtg-".concat(e," .modula-item {\n\t\tbackground-color: transparent;\n\t\ttransform: none;\n\t\t}")),null!=a.filters&&a.filters.length>1&&(n+="#jtg-".concat(e,".modula-gallery .filters {\n\t\t\ttext-align: ").concat(a.filterTextAlignment,";\n\t\t}")),React.createElement("style",{dangerouslySetInnerHTML:{__html:"\n \t\t\t\t".concat(n,"\n \t\t\t\t")}})},k=wp.components.withFilters("modula.ModulaItemsExtraComponent")((function(t){return null}));function x(){return(x=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t}).apply(this,arguments)}wp.i18n.__;var C=wp.element,_=(C.Component,C.Fragment),S=C.useEffect,z=(C.useState,wp.components.withFilters("modula.modulaGallery")((function(t){var e=t.attributes,a=e.images,n=e.jsConfig,l=e.id,o=t.settings,c=(t.galleryId,t.checkHoverEffect),i=t.modulaRun,r=t.modulaSlickRun;S((function(){void 0!==o&&c(o.effect),"slider"!==o.type?i(n):r()}),[]);var d="modula modula-gallery ",u="modula-items";return"creative-gallery"==o.type?d+="modula-creative-gallery":"custom-grid"==o.type?d+="modula-custom-grid":"slider"==o.type?d="modula-slider":(d+="modula-columns",u+=" grid-gallery","automatic"==o.grid_type&&(u+=" justified-gallery")),[React.createElement(_,null,React.createElement(R,{id:l,settings:o}),React.createElement("div",{id:"jtg-".concat(l),className:"".concat(d," ").concat(null!=t.attributes.modulaDivClassName?t.attributes.modulaDivClassName:""),"data-config":JSON.stringify(n)},"grid"==o.type&&"automatic"!=o.grid_type&&React.createElement("div",{class:"modula-grid-sizer"}," "),React.createElement(k,x({},t,{position:"top"})),React.createElement("div",{className:u},a.length>0&&React.createElement(_,null,React.createElement(_,null,a.map((function(e,a){return[React.createElement(E,x({},t,{img:e,index:a}))]}))))),React.createElement(k,x({},t,{position:"bottom"}))))]})));function N(){return(N=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t}).apply(this,arguments)}function T(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var a=[],n=!0,l=!1,o=void 0;try{for(var c,i=t[Symbol.iterator]();!(n=(c=i.next()).done)&&(a.push(c.value),!e||a.length!==e);n=!0);}catch(t){l=!0,o=t}finally{try{n||null==i.return||i.return()}finally{if(l)throw o}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return M(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return M(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,n=new Array(e);a<e;a++)n[a]=t[a];return n}var I=wp.i18n.__,F=wp.element,O=(F.Component,F.Fragment),B=F.useEffect,q=F.useState,Q=wp.data.withSelect,V=wp.components,L=(V.SelectControl,V.Button),P=V.Spinner,A=V.Toolbar,G=V.IconButton,U=wp.editor.BlockControls,H=(0,wp.compose.compose)(Q((function(t,e){return{galleries:(0,t("core").getEntityRecords)("postType","modula-gallery",{post_status:"publish",per_page:1})||[]}})),wp.components.withFilters("modula.ModulaEdit"))((function(t){var e=t.attributes,a=t.galleries,n=t.setAttributes,l=e.id,o=e.images,i=e.status,r=e.settings,d=e.jsConfig,u=e.galleryId,s=(e.currentGallery,e.currentSelectize),m=T(q(t.attributes.align),2),g=(m[0],m[1],T(q(l),2)),p=g[0];g[1];B((function(){0!==l&&v(l)}),[]),B((function(){jQuery(document).on("modula_api_after_init",(function(e,a){t.setAttributes({instance:a})})),null!=t.attributes.instance&&null!=r&&"grid"==r.type&&t.attributes.instance.reset(t.attributes.instance)}));var v=function(t){isNaN(t)||""==t||(t=parseInt(t),wp.apiFetch({path:"wp/v2/modula-gallery/".concat(t)}).then((function(e){n({currentGallery:e}),n({currentSelectize:[{value:t,label:""===e.title.rendered?"Unnamed":e.title.rendered}]}),jQuery.ajax({type:"POST",data:{action:"modula_get_gallery_meta",id:t,nonce:modulaVars.nonce},url:modulaVars.ajaxURL,success:function(e){return y(t,e)}})})))},y=function(t,e){!1!==e.success?(p==t&&null!=r||b(t),n({id:t,images:e,status:"ready"})):n({id:t,status:"ready"})},b=function(t){fetch("".concat(modulaVars.restURL,"wp/v2/modula-gallery/").concat(t)).then((function(t){return t.json()})).then((function(t){var e=t;n({status:"loading"}),jQuery.ajax({type:"POST",data:{action:"modula_get_jsconfig",nonce:modulaVars.nonce,settings:e.modulaSettings},url:modulaVars.ajaxURL,success:function(t){var a=Math.floor(999*Math.random());n({galleryId:a,settings:e.modulaSettings,jsConfig:t,status:"ready"})}})}))},w=React.createElement(U,null,o&&o.length>0&&React.createElement(A,null,React.createElement(G,{label:I("Edit gallery","modula-best-grid-gallery"),icon:"edit",href:modulaVars.adminURL+"post.php?post="+l+"&action=edit",target:"_blank"})));return 0==l&&"none"===e.galleryType?[React.createElement(O,null,React.createElement("div",{className:"modula-block-preview"},React.createElement("div",{className:"modula-block-preview__content"},React.createElement("div",{className:"modula-block-preview__logo"}),React.createElement("div",{className:"modula-button-group"},0==a.length&&React.createElement("p",null," ",I("Sorry no galleries found","modula-best-grid-gallery")," "),a.length>0&&React.createElement(L,{className:"modula-button",target:"_blank",onClick:function(t){n({status:"ready",id:0,galleryType:"gallery"})}},I("Display An Existing Gallery","modula-best-grid-gallery"),h.chevronRightFancy),null==t.attributes.proInstalled&&a.length>0&&React.createElement(L,{href:"https://wp-modula.com/pricing/?utm_source=modula-lite&utm_campaign=upsell",className:"modula-button-upsell",isSecondary:!0,target:"_blank"},I("Upgrade to PRO to create galleries using a preset ( fastest way )","modula-best-grid-gallery"))))))]:"loading"===i?[React.createElement(O,null,React.createElement("div",{className:"modula-block-preview"},React.createElement("div",{className:"modula-block-preview__content"},React.createElement("div",{className:"modula-block-preview__logo"}),React.createElement(P,null))))]:0==l||0===o.length?[React.createElement(O,null,React.createElement(f,N({onIdChange:function(t){return v(t)},selectOptions:function(){var t=[{value:0,label:I("select a gallery","modula-best-grid-gallery")}];return a.forEach((function(e){var a=e.title,n=e.id;0==a.rendered.length?t.push({value:n,label:I("Unnamed Gallery","modula-best-grid-gallery")+n}):t.push({value:n,label:a.rendered})})),t}},t)),React.createElement("div",{className:"modula-block-preview"},React.createElement("div",{className:"modula-block-preview__content"},React.createElement("div",{className:"modula-block-preview__logo"}),a.length>0&&React.createElement(O,null,React.createElement(c,{id:l,key:l,value:l,options:s,onIdChange:v}),0!=l&&React.createElement(L,{target:"_blank",href:modulaVars.adminURL+"post.php?post="+l+"&action=edit",isPrimary:!0},I("Edit Gallery"))))))]:r?[React.createElement(O,null,w,React.createElement(f,N({onIdChange:function(t){v(t)}},t)),React.createElement(z,N({},t,{settings:r,jsConfig:d,modulaRun:function(t){if(null!=t){n({status:"ready"});var e=jQuery(".modula.modula-gallery");jQuery.each(e,(function(){jQuery(this).attr("id");var t=jQuery(this).data("config");t.lazyLoad=0,jQuery(this).modulaGallery(t)}))}},modulaSlickRun:function(){var t=jQuery(".modula-slider");t.length>0&&void 0!==jQuery.fn.slick&&jQuery.each(t,(function(){jQuery(this).attr("id");var t=jQuery(this).data("config"),e=jQuery(this).find(".modula-slider-nav"),a=jQuery(this).find(".modula-items");if(a.slick(t.slider_settings),e.length){var n=e.data("config"),l=a.slick("slickCurrentSlide");e.on("init",(function(t,a){e.find('.slick-slide[data-slick-index="'+l+'"]').addClass("is-active")})),e.slick(n),a.on("afterChange",(function(t,a,n){e.slick("slickGoTo",n);var l='.slick-slide[data-slick-index="'+n+'"]';e.find(".slick-slide.is-active").removeClass("is-active"),e.find(l).addClass("is-active")})),e.on("click",".slick-slide",(function(t){t.preventDefault();var e=jQuery(this).data("slick-index");a.slick("slickGoTo",e)}))}}))},checkHoverEffect:function(t){jQuery.ajax({type:"POST",data:{action:"modula_check_hover_effect",nonce:modulaVars.nonce,effect:t},url:modulaVars.ajaxURL,success:function(t){n({effectCheck:t})}})},galleryId:u})))]:null}));function D(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var $=wp.i18n.__,W=wp.blocks.registerBlockType;new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.registerBlock()}var e,a,n;return e=t,(a=[{key:"registerBlock",value:function(){this.blockName="modula/gallery",this.blockAttributes={id:{type:"number",default:0},images:{type:"array",default:[]},status:{type:"string",default:"ready"},galleryId:{type:"number",default:0},defaultSettings:{type:"object",default:[]},galleryType:{type:"string",default:"none"},currentGallery:{type:"object",default:{}},currentSelectize:{type:"array",default:[]}},W(this.blockName,{title:modulaVars.gutenbergTitle,icon:h.modula,description:$("Make your galleries stand out.","modula-best-grid-gallery"),keywords:[$("gallery"),$("modula"),$("images")],category:"common",supports:{align:!0,customClassName:!1},attributes:this.blockAttributes,edit:H,save:function(){return null}})}}])&&D(e.prototype,a),n&&D(e,n),t}())}]);
assets/js/admin/wp-modula-settings.js CHANGED
@@ -51,6 +51,7 @@ wp.Modula = 'undefined' === typeof( wp.Modula ) ? {} : wp.Modula;
51
  this.initSliders();
52
  this.initColorPickers();
53
  this.initCustomCSS();
 
54
 
55
  },
56
 
@@ -191,6 +192,9 @@ wp.Modula = 'undefined' === typeof( wp.Modula ) ? {} : wp.Modula;
191
  });
192
  }
193
  },
 
 
 
194
 
195
  });
196
 
51
  this.initSliders();
52
  this.initColorPickers();
53
  this.initCustomCSS();
54
+ this.expandGalleryContainer();
55
 
56
  },
57
 
192
  });
193
  }
194
  },
195
+ expandGalleryContainer: function () {
196
+ $( '#modula-preview-gallery' ).removeClass( 'closed' );
197
+ }
198
 
199
  });
200
 
assets/js/admin/wp-modula.js CHANGED
@@ -145,8 +145,8 @@ wp.Modula.upload = 'undefined' === typeof( wp.Modula.upload ) ? {} : wp.Modula.u
145
  let input = $( this ).find( 'input[type="radio"]' );
146
 
147
  if ( input.length > 0 ) {
148
- inputs.attr( 'checked', false );
149
- input.attr( 'checked', true );
150
  }
151
  } );
152
 
145
  let input = $( this ).find( 'input[type="radio"]' );
146
 
147
  if ( input.length > 0 ) {
148
+ input.prop( "checked", false );
149
+ input.prop( "checked", true );
150
  }
151
  } );
152
 
assets/js/front/fancybox.js CHANGED
@@ -5433,7 +5433,7 @@
5433
  var rawEmailMessage = (current.opts.lightboxEmailMessage.length) ? current.opts.lightboxEmailMessage : 'Here is the link to the image : %%image_link%% and this is the link to the gallery : %%gallery_link%%';
5434
  var emailMessage = rawEmailMessage.replace( /\%%gallery_link%%/g, window.location.href).replace( /\%%image_link%%/g, current.src) ;
5435
 
5436
- var text = (jQuery( current.$image ).attr( 'title' ).length) ? jQuery( current.$image ).attr( 'title' ) : '';
5437
 
5438
  if ( '' == text ) {
5439
  text = instance.$caption.text();
5433
  var rawEmailMessage = (current.opts.lightboxEmailMessage.length) ? current.opts.lightboxEmailMessage : 'Here is the link to the image : %%image_link%% and this is the link to the gallery : %%gallery_link%%';
5434
  var emailMessage = rawEmailMessage.replace( /\%%gallery_link%%/g, window.location.href).replace( /\%%image_link%%/g, current.src) ;
5435
 
5436
+ var text = ( undefined != jQuery( current.$image ).attr( 'title' ) ) ? jQuery( current.$image ).attr( 'title' ) : '';
5437
 
5438
  if ( '' == text ) {
5439
  text = instance.$caption.text();
assets/js/front/fancybox.min.js CHANGED
@@ -1 +1 @@
1
- !function(l,s,f,m){"use strict";var a,i,r,d,e,c,p,u,n,t,o,h,g;function b(t,e){var o,n,a,i=[],s=0;t&&t.isDefaultPrevented()||(t.preventDefault(),e=e||{},t&&t.data&&(e=u(t.data.options,e)),o=e.$target||f(t.currentTarget).trigger("blur"),(a=f.modulaFancybox.getInstance())&&a.$trigger&&a.$trigger.is(o)||(i=e.selector?f(e.selector):(n=o.attr("data-fancybox")||"")?(i=t.data?t.data.items:[]).length?i.filter('[data-fancybox="'+n+'"]'):f('[data-fancybox="'+n+'"]'):[o],(s=f(i).index(o))<0&&(s=0),(a=f.modulaFancybox.open(i,e,s)).$trigger=o))}l.console=l.console||{info:function(t){}},f&&(f.fn.modulaFancybox?console.info("fancyBox already initialized"):(t={closeExisting:!1,loop:!1,gutter:50,keyboard:!0,preventCaptionOverlap:!0,arrows:!0,infobar:!0,smallBtn:"auto",toolbar:"auto",buttons:["zoom","slideShow","thumbs","close"],idleTime:3,protect:!1,modal:!1,image:{preload:!1},ajax:{settings:{data:{fancybox:!0}}},iframe:{tpl:'<iframe id="modula-fancybox-frame{rnd}" name="modula-fancybox-frame{rnd}" class="modula-fancybox-iframe" allowfullscreen="allowfullscreen" allow="autoplay; fullscreen" src=""></iframe>',preload:!0,css:{},attr:{scrolling:"auto"}},video:{tpl:'<video class="modula-fancybox-video" controls controlsList="nodownload" poster="{{poster}}"><source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos, <a href="{{src}}">download</a> and watch with your favorite video player!</video>',format:"",autoStart:!0},defaultType:"image",animationEffect:"zoom",animationDuration:366,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",baseTpl:'<div class="modula-fancybox-container" role="dialog" tabindex="-1"><div class="modula-fancybox-bg"></div><div class="modula-fancybox-inner"><div class="modula-fancybox-infobar"><span data-fancybox-index></span>&nbsp;/&nbsp;<span data-fancybox-count></span></div><div class="modula-fancybox-toolbar">{{buttons}}</div><div class="modula-fancybox-navigation">{{arrows}}</div><div class="modula-fancybox-stage"></div><div class="modula-fancybox-caption"><div class="modula-fancybox-caption__body"></div></div></div></div>',spinnerTpl:'<div class="modula-fancybox-loading"></div>',errorTpl:'<div class="modula-fancybox-error"><p>{{ERROR}}</p></div>',btnTpl:{download:'<a download data-fancybox-download class="modula-fancybox-button modula-fancybox-button--download" title="{{DOWNLOAD}}" href="javascript:;"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.62 17.09V19H5.38v-1.91zm-2.97-6.96L17 11.45l-5 4.87-5-4.87 1.36-1.32 2.68 2.64V5h1.92v7.77z"/></svg></a>',zoom:'<button data-fancybox-zoom class="modula-fancybox-button modula-fancybox-button--zoom" title="{{ZOOM}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.7 17.3l-3-3a5.9 5.9 0 0 0-.6-7.6 5.9 5.9 0 0 0-8.4 0 5.9 5.9 0 0 0 0 8.4 5.9 5.9 0 0 0 7.7.7l3 3a1 1 0 0 0 1.3 0c.4-.5.4-1 0-1.5zM8.1 13.8a4 4 0 0 1 0-5.7 4 4 0 0 1 5.7 0 4 4 0 0 1 0 5.7 4 4 0 0 1-5.7 0z"/></svg></button>',close:'<button data-fancybox-close class="modula-fancybox-button modula-fancybox-button--close" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 10.6L6.6 5.2 5.2 6.6l5.4 5.4-5.4 5.4 1.4 1.4 5.4-5.4 5.4 5.4 1.4-1.4-5.4-5.4 5.4-5.4-1.4-1.4-5.4 5.4z"/></svg></button>',arrowLeft:'<button data-fancybox-prev class="modula-fancybox-button modula-fancybox-button--arrow_left" title="{{PREV}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.28 15.7l-1.34 1.37L5 12l4.94-5.07 1.34 1.38-2.68 2.72H19v1.94H8.6z"/></svg></div></button>',arrowRight:'<button data-fancybox-next class="modula-fancybox-button modula-fancybox-button--arrow_right" title="{{NEXT}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.4 12.97l-2.68 2.72 1.34 1.38L19 12l-4.94-5.07-1.34 1.38 2.68 2.72H5v1.94z"/></svg></div></button>',smallBtn:'<button type="button" data-fancybox-close class="modula-fancybox-button modula-fancybox-close-small" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" version="1" viewBox="0 0 24 24"><path d="M13 12l5-5-1-1-5 5-5-5-1 1 5 5-5 5 1 1 5-5 5 5 1-1z"/></svg></button>'},modulaShare:["facebook","twitter","pinterest","whatsapp","linkedin","email"],shareBtnTpl:{facebook:'<a class="modula-fancybox-share__button modula-fancybox-share__button--fb" href="https://www.facebook.com/sharer/sharer.php?u={{modulaShareUrl}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196" /></svg><span>Facebook</span></a>',twitter:'<a class="modula-fancybox-share__button modula-fancybox-share__button--tw" href="https://twitter.com/intent/tweet?url={{modulaShareUrl}}&text={{descr}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z" /></svg><span>Twitter</span></a>',pinterest:'<a class="modula-fancybox-share__button modula-fancybox-share__button--pt" href="https://www.pinterest.com/pin/create/button/?url={{modulaShareUrl}}&description={{descr}}&media={{media}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z" fill="#fff"/></svg><span>Pinterest</span></a>',whatsapp:'<a class="modula-fancybox-share__button modula-fancybox-share__button--wa" href="https://api.whatsapp.com/send?text={{modulaShareUrl}}&review_url=true"><svg aria-hidden="true" focusable="false" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);" preserveAspectRatio="xMidYMid meet" viewBox="0 0 1536 1600"><path d="M985 878q13 0 97.5 44t89.5 53q2 5 2 15q0 33-17 76q-16 39-71 65.5T984 1158q-57 0-190-62q-98-45-170-118T476 793q-72-107-71-194v-8q3-91 74-158q24-22 52-22q6 0 18 1.5t19 1.5q19 0 26.5 6.5T610 448q8 20 33 88t25 75q0 21-34.5 57.5T599 715q0 7 5 15q34 73 102 137q56 53 151 101q12 7 22 7q15 0 54-48.5t52-48.5zm-203 530q127 0 243.5-50t200.5-134t134-200.5t50-243.5t-50-243.5T1226 336t-200.5-134T782 152t-243.5 50T338 336T204 536.5T154 780q0 203 120 368l-79 233l242-77q158 104 345 104zm0-1382q153 0 292.5 60T1315 247t161 240.5t60 292.5t-60 292.5t-161 240.5t-240.5 161t-292.5 60q-195 0-365-94L0 1574l136-405Q28 991 28 780q0-153 60-292.5T249 247T489.5 86T782 26z" fill="currentColor"/></svg><span>WhatsApp</span></a>',linkedin:'<a class="modula-fancybox-share__button modula-fancybox-share__button--li" href="//linkedin.com/shareArticle?mini=true&url={{modulaShareUrl}}"><svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="linkedin-in" class="svg-inline--fa fa-linkedin-in fa-w-14" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z"></path></svg><span>LinkedIn</span></a>',email:'<a class="modula-fancybox-share__button modula-fancybox-share__button--email" href="mailto:?subject={{subject}}&body={{emailMessage}}"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 3v18h24v-18h-24zm6.623 7.929l-4.623 5.712v-9.458l4.623 3.746zm-4.141-5.929h19.035l-9.517 7.713-9.518-7.713zm5.694 7.188l3.824 3.099 3.83-3.104 5.612 6.817h-18.779l5.513-6.812zm9.208-1.264l4.616-3.741v9.348l-4.616-5.607z" fill="currentColor"></path></svg><span>Email</span></a>'},parentEl:"body",hideScrollbar:!0,autoFocus:!0,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:3e3},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".modula-fancybox-container",axis:"y"},wheel:"auto",onInit:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeClose:f.noop,afterClose:f.noop,onActivate:f.noop,onDeactivate:f.noop,clickContent:function(t,e){return"image"===t.type&&"zoom"},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{preventCaptionOverlap:!1,idleTime:!1,clickContent:function(t,e){return"image"===t.type&&"toggleControls"},clickSlide:function(t,e){return"image"===t.type?"toggleControls":"close"},dblclickContent:function(t,e){return"image"===t.type&&"zoom"},dblclickSlide:function(t,e){return"image"===t.type&&"zoom"}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded. <br/> Please try again later.",PLAY_START:"Start slideshow",PLAY_STOP:"Pause slideshow",FULL_SCREEN:"Full screen",THUMBS:"Thumbnails",DOWNLOAD:"Download",SHARE:"Share",ZOOM:"Zoom"},de:{CLOSE:"Schlie&szlig;en",NEXT:"Weiter",PREV:"Zur&uuml;ck",ERROR:"Die angeforderten Daten konnten nicht geladen werden. <br/> Bitte versuchen Sie es sp&auml;ter nochmal.",PLAY_START:"Diaschau starten",PLAY_STOP:"Diaschau beenden",FULL_SCREEN:"Vollbild",THUMBS:"Vorschaubilder",DOWNLOAD:"Herunterladen",SHARE:"Teilen",ZOOM:"Vergr&ouml;&szlig;ern"}}},a=f(l),i=f(s),r=0,d=l.requestAnimationFrame||l.webkitRequestAnimationFrame||l.mozRequestAnimationFrame||l.oRequestAnimationFrame||function(t){return l.setTimeout(t,1e3/60)},e=l.cancelAnimationFrame||l.webkitCancelAnimationFrame||l.mozCancelAnimationFrame||l.oCancelAnimationFrame||function(t){l.clearTimeout(t)},c=function(){var t,e=s.createElement("fakeelement"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in o)if(e.style[t]!==m)return o[t];return"transitionend"}(),p=function(t){return t&&t.length&&t[0].offsetHeight},u=function(t,e){var o=f.extend(!0,{},t,e);return f.each(e,function(t,e){f.isArray(e)&&(o[t]=e)}),o},n=function(t,e,o){var n=this;n.opts=u({index:o},f.modulaFancybox.defaults),f.isPlainObject(e)&&(n.opts=u(n.opts,e)),f.modulaFancybox.isMobile&&(n.opts=u(n.opts,n.opts.mobile)),n.id=n.opts.id||++r,n.currIndex=parseInt(n.opts.index,10)||0,n.prevIndex=null,n.prevPos=null,n.currPos=0,n.firstRun=!0,n.group=[],n.slides={},n.addContent(t),n.group.length&&n.init()},f.extend(n.prototype,{init:function(){var o=this;o.currIndex<0&&(o.currIndex=0),void 0===o.group[o.currIndex]&&jQuery.each(this.group,function(t,e){o.currIndex==parseInt(e.opts.image_id)&&(o.currIndex=t)});var e,n,a=o.group[o.currIndex].opts;a.closeExisting&&f.modulaFancybox.close(!0),f("body").addClass("modula-fancybox-active"),!f.modulaFancybox.getInstance()&&!1!==a.hideScrollbar&&!f.modulaFancybox.isMobile&&s.body.scrollHeight>l.innerHeight&&(f("head").append('<style id="modula-fancybox-style-noscroll" type="text/css">.compensate-for-scrollbar{margin-right:'+(l.innerWidth-s.documentElement.clientWidth)+"px;}</style>"),f("body").addClass("compensate-for-scrollbar")),n="",f.each(a.buttons,function(t,e){n+=a.btnTpl[e]||""}),e=f(o.translate(o,a.baseTpl.replace("{{buttons}}",n).replace("{{arrows}}",a.btnTpl.arrowLeft+a.btnTpl.arrowRight))).attr("id","modula-fancybox-container-"+o.id).addClass(a.baseClass).data("modulaFancyBox",o).appendTo(a.parentEl),o.$refs={container:e},["bg","inner","infobar","toolbar","stage","caption","navigation"].forEach(function(t){o.$refs[t]=e.find(".modula-fancybox-"+t)}),o.trigger("onInit"),o.activate(),o.jumpTo(o.currIndex)},translate:function(t,e){var o=t.opts.i18n[t.opts.lang]||t.opts.i18n.en;return e.replace(/\{\{(\w+)\}\}/g,function(t,e){return o[e]===m?t:o[e]})},addContent:function(t){var r=this,t=f.makeArray(t);f.each(t,function(t,e){var o,n,a,i={},s={};f.isPlainObject(e)?s=(i=e).opts||e:"object"===f.type(e)&&f(e).length?(s=(n=f(e)).data()||{},(s=f.extend(!0,{},s,s.options)).$orig=n,i.src=r.opts.src||s.src||n.attr("href"),i.type||i.src||(i.type="inline",i.src=e)):i={type:"html",src:e+""},i.opts=f.extend(!0,{},r.opts,s),f.isArray(s.buttons)&&(i.opts.buttons=s.buttons),f.modulaFancybox.isMobile&&i.opts.mobile&&(i.opts=u(i.opts,i.opts.mobile)),o=i.type||i.opts.type,n=i.src||"",!o&&n&&((s=n.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(o="video",i.opts.video.format||(i.opts.video.format="video/"+("ogv"===s[1]?"ogg":s[1]))):n.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?o="image":n.match(/\.(pdf)((\?|#).*)?$/i)?(o="iframe",i=f.extend(!0,i,{contentType:"pdf",opts:{iframe:{preload:!1}}})):"#"===n.charAt(0)&&(o="inline")),o?i.type=o:r.trigger("objectNeedsType",i),i.contentType||(i.contentType=-1<f.inArray(i.type,["html","inline","ajax"])?"html":i.type),i.index=r.group.length,"auto"==i.opts.smallBtn&&(i.opts.smallBtn=-1<f.inArray(i.type,["html","inline","ajax"])),"auto"===i.opts.toolbar&&(i.opts.toolbar=!i.opts.smallBtn),i.$thumb=i.opts.$thumb||null,i.opts.$trigger&&i.index===r.opts.index&&(i.$thumb=i.opts.$trigger.find("img:first"),i.$thumb.length&&(i.opts.$orig=i.opts.$trigger)),i.$thumb&&i.$thumb.length||!i.opts.$orig||(i.$thumb=i.opts.$orig.find("img:first")),i.$thumb&&!i.$thumb.length&&(i.$thumb=null),i.thumb=i.opts.thumb||(i.$thumb?i.$thumb[0].src:null),"function"===f.type(i.opts.caption)&&(i.opts.caption=i.opts.caption.apply(e,[r,i])),"function"===f.type(r.opts.caption)&&(i.opts.caption=r.opts.caption.apply(e,[r,i])),i.opts.caption instanceof f||(i.opts.caption=i.opts.caption===m?"":i.opts.caption+""),"ajax"===i.type&&1<(a=n.split(/\s+/,2)).length&&(i.src=a.shift(),i.opts.filter=a.shift()),i.opts.modal&&(i.opts=f.extend(!0,i.opts,{trapFocus:!0,infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),r.group.push(i)}),Object.keys(r.slides).length&&(r.updateControls(),(t=r.Thumbs)&&t.isActive&&(t.create(),t.focus()))},addEvents:function(){var n=this;n.removeEvents(),n.$refs.container.on("click.fb-close","[data-fancybox-close]",function(t){t.stopPropagation(),t.preventDefault(),n.close(t)}).on("touchstart.fb-prev click.fb-prev","[data-fancybox-prev]",function(t){t.stopPropagation(),t.preventDefault(),n.previous()}).on("touchstart.fb-next click.fb-next","[data-fancybox-next]",function(t){t.stopPropagation(),t.preventDefault(),n.next()}).on("click.fb","[data-fancybox-zoom]",function(t){n[n.isScaledDown()?"scaleToActual":"scaleToFit"]()}),a.on("orientationchange.fb resize.fb",function(t){t&&t.originalEvent&&"resize"===t.originalEvent.type?(n.requestId&&e(n.requestId),n.requestId=d(function(){n.update(t)})):(n.current&&"iframe"===n.current.type&&n.$refs.stage.hide(),setTimeout(function(){n.$refs.stage.show(),n.update(t)},f.modulaFancybox.isMobile?600:250))}),i.on("keydown.fb",function(t){var e=(f.modulaFancybox?f.modulaFancybox.getInstance():null).current,o=t.keyCode||t.which;if(9!=o){if(!(!e.opts.keyboard||t.ctrlKey||t.altKey||t.shiftKey||f(t.target).is("input,textarea,video,audio,select")))return 8===o||27===o?(t.preventDefault(),void n.close(t)):37===o||38===o?(t.preventDefault(),void n.previous()):39===o||40===o?(t.preventDefault(),void n.next()):void n.trigger("afterKeydown",t,o)}else e.opts.trapFocus&&n.focus(t)}),n.group[n.currIndex].opts.idleTime&&(n.idleSecondsCounter=0,i.on("mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle",function(t){n.idleSecondsCounter=0,n.isIdle&&n.showControls(),n.isIdle=!1}),n.idleInterval=l.setInterval(function(){n.idleSecondsCounter++,n.idleSecondsCounter>=n.group[n.currIndex].opts.idleTime&&!n.isDragging&&(n.isIdle=!0,n.idleSecondsCounter=0,n.hideControls())},1e3))},removeEvents:function(){a.off("orientationchange.fb resize.fb"),i.off("keydown.fb .fb-idle"),this.$refs.container.off(".fb-close .fb-prev .fb-next"),this.idleInterval&&(l.clearInterval(this.idleInterval),this.idleInterval=null)},previous:function(t){return this.jumpTo(this.currPos-1,t)},next:function(t){return this.jumpTo(this.currPos+1,t)},jumpTo:function(t,n){var e,o,a,i,s,r,l,c,d=this,u=d.group.length;if(!(d.isDragging||d.isClosing||d.isAnimating&&d.firstRun))return t=parseInt(t,10),!(!(o=(d.current||d).opts.loop)&&(t<0||u<=t))&&(e=d.firstRun=!Object.keys(d.slides).length,i=d.current,d.prevIndex=d.currIndex,d.prevPos=d.currPos,a=d.createSlide(t),1<u&&((o||a.index<u-1)&&d.createSlide(t+1),(o||0<a.index)&&d.createSlide(t-1)),d.current=a,d.currIndex=a.index,d.currPos=a.pos,d.trigger("beforeShow",e),d.updateControls(),a.forcedDuration=m,f.isNumeric(n)?a.forcedDuration=n:n=a.opts[e?"animationDuration":"transitionDuration"],n=parseInt(n,10),t=d.isMoved(a),a.$slide.addClass("modula-fancybox-slide--current"),e?(a.opts.animationEffect&&n&&d.$refs.container.css("transition-duration",n+"ms"),d.$refs.container.addClass("modula-fancybox-is-open").trigger("focus"),d.loadSlide(a)):(s=f.modulaFancybox.getTranslate(i.$slide),r=f.modulaFancybox.getTranslate(d.$refs.stage),f.each(d.slides,function(t,e){f.modulaFancybox.stop(e.$slide,!0)}),i.pos!==a.pos&&(i.isComplete=!1),i.$slide.removeClass("modula-fancybox-slide--complete modula-fancybox-slide--current"),t?(c=s.left-(i.pos*s.width+i.pos*i.opts.gutter),f.each(d.slides,function(t,e){e.$slide.removeClass("modula-fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)modula-fancybox-fx-\S+/g)||[]).join(" ")});var o=e.pos*s.width+e.pos*e.opts.gutter;f.modulaFancybox.setTranslate(e.$slide,{top:0,left:o-r.left+c}),e.pos!==a.pos&&e.$slide.addClass("modula-fancybox-slide--"+(e.pos>a.pos?"next":"previous")),p(e.$slide),f.modulaFancybox.animate(e.$slide,{top:0,left:(e.pos-a.pos)*s.width+(e.pos-a.pos)*e.opts.gutter},n,function(){e.$slide.css({transform:"",opacity:""}).removeClass("modula-fancybox-slide--next modula-fancybox-slide--previous"),e.pos===d.currPos&&d.complete()})})):n&&a.opts.transitionEffect&&(l="modula-fancybox-animated modula-fancybox-fx-"+a.opts.transitionEffect,i.$slide.addClass("modula-fancybox-slide--"+(i.pos>a.pos?"next":"previous")),f.modulaFancybox.animate(i.$slide,l,n,function(){i.$slide.removeClass(l).removeClass("modula-fancybox-slide--next modula-fancybox-slide--previous")},!1)),a.isLoaded?d.revealContent(a):d.loadSlide(a)),void d.preload("image"))},createSlide:function(t){var e,o=this,n=t%o.group.length;return n=n<0?o.group.length+n:n,!o.slides[t]&&o.group[n]&&(e=f('<div class="modula-fancybox-slide"></div>').appendTo(o.$refs.stage),o.slides[t]=f.extend(!0,{},o.group[n],{pos:t,$slide:e,isLoaded:!1}),o.updateSlide(o.slides[t])),o.slides[t]},scaleToActual:function(t,e,o){var n,a,i,s,r=this,l=r.current,c=l.$content,d=f.modulaFancybox.getTranslate(l.$slide).width,u=f.modulaFancybox.getTranslate(l.$slide).height,p=l.width,h=l.height;r.isAnimating||r.isMoved()||!c||"image"!=l.type||!l.isLoaded||l.hasError||(r.isAnimating=!0,f.modulaFancybox.stop(c),t=t===m?.5*d:t,e=e===m?.5*u:e,(n=f.modulaFancybox.getTranslate(c)).top-=f.modulaFancybox.getTranslate(l.$slide).top,n.left-=f.modulaFancybox.getTranslate(l.$slide).left,i=p/n.width,s=h/n.height,a=.5*d-.5*p,l=.5*u-.5*h,d<p&&(0<(a=n.left*i-(t*i-t))&&(a=0),a<d-p&&(a=d-p)),u<h&&(0<(l=n.top*s-(e*s-e))&&(l=0),l<u-h&&(l=u-h)),r.updateCursor(p,h),f.modulaFancybox.animate(c,{top:l,left:a,scaleX:i,scaleY:s},o||366,function(){r.isAnimating=!1}),r.SlideShow&&r.SlideShow.isActive&&r.SlideShow.stop())},scaleToFit:function(t){var e=this,o=e.current,n=o.$content;e.isAnimating||e.isMoved()||!n||"image"!=o.type||!o.isLoaded||o.hasError||(e.isAnimating=!0,f.modulaFancybox.stop(n),o=e.getFitPos(o),e.updateCursor(o.width,o.height),f.modulaFancybox.animate(n,{top:o.top,left:o.left,scaleX:o.width/n.width(),scaleY:o.height/n.height()},t||366,function(){e.isAnimating=!1}))},getFitPos:function(t){var e,o,n=t.$content,a=t.$slide,i=t.width||t.opts.width,s=t.height||t.opts.height,r={};return!!(t.isLoaded&&n&&n.length)&&(e=f.modulaFancybox.getTranslate(this.$refs.stage).width,o=f.modulaFancybox.getTranslate(this.$refs.stage).height,e-=parseFloat(a.css("paddingLeft"))+parseFloat(a.css("paddingRight"))+parseFloat(n.css("marginLeft"))+parseFloat(n.css("marginRight")),o-=parseFloat(a.css("paddingTop"))+parseFloat(a.css("paddingBottom"))+parseFloat(n.css("marginTop"))+parseFloat(n.css("marginBottom")),i&&s||(i=e,s=o),e-.5<(i*=n=Math.min(1,e/i,o/s))&&(i=e),o-.5<(s*=n)&&(s=o),"image"===t.type?(r.top=Math.floor(.5*(o-s))+parseFloat(a.css("paddingTop")),r.left=Math.floor(.5*(e-i))+parseFloat(a.css("paddingLeft"))):"video"===t.contentType&&(i/(t=t.opts.width&&t.opts.height?i/s:t.opts.ratio||16/9)<s?s=i/t:s*t<i&&(i=s*t)),r.width=i,r.height=s,r)},update:function(o){var n=this;f.each(n.slides,function(t,e){n.updateSlide(e,o)})},updateSlide:function(t,e){var o=this,n=t&&t.$content,a=t.width||t.opts.width,i=t.height||t.opts.height,s=t.$slide;o.adjustCaption(t),n&&(a||i||"video"===t.contentType)&&!t.hasError&&(f.modulaFancybox.stop(n),f.modulaFancybox.setTranslate(n,o.getFitPos(t)),t.pos===o.currPos&&(o.isAnimating=!1,o.updateCursor())),o.adjustLayout(t),s.length&&(s.trigger("refresh"),t.pos===o.currPos&&o.$refs.toolbar.add(o.$refs.navigation.find(".modula-fancybox-button--arrow_right")).toggleClass("compensate-for-scrollbar",s.get(0).scrollHeight>s.get(0).clientHeight)),o.trigger("onUpdate",t,e)},centerSlide:function(t){var e=this,o=e.current,n=o.$slide;!e.isClosing&&o&&(n.siblings().css({transform:"",opacity:""}),n.parent().children().removeClass("modula-fancybox-slide--previous modula-fancybox-slide--next"),f.modulaFancybox.animate(n,{top:0,left:0,opacity:1},t===m?0:t,function(){n.css({transform:"",opacity:""}),o.isComplete||e.complete()},!1))},isMoved:function(t){var e,o=t||this.current;return!!o&&(e=f.modulaFancybox.getTranslate(this.$refs.stage),t=f.modulaFancybox.getTranslate(o.$slide),!o.$slide.hasClass("modula-fancybox-animated")&&(.5<Math.abs(t.top-e.top)||.5<Math.abs(t.left-e.left)))},updateCursor:function(t,e){var o=this,n=o.current,a=o.$refs.container;n&&!o.isClosing&&o.Guestures&&(a.removeClass("modula-fancybox-is-zoomable modula-fancybox-can-zoomIn modula-fancybox-can-zoomOut modula-fancybox-can-swipe modula-fancybox-can-pan"),e=!!(t=o.canPan(t,e))||o.isZoomable(),a.toggleClass("modula-fancybox-is-zoomable",e),f("[data-fancybox-zoom]").prop("disabled",!e),t?a.addClass("modula-fancybox-can-pan"):e&&("zoom"===n.opts.clickContent||f.isFunction(n.opts.clickContent)&&"zoom"==n.opts.clickContent(n))?a.addClass("modula-fancybox-can-zoomIn"):n.opts.touch&&(n.opts.touch.vertical||1<o.group.length)&&"video"!==n.contentType&&a.addClass("modula-fancybox-can-swipe"))},isZoomable:function(){var t,e=this.current;if(e&&!this.isClosing&&"image"===e.type&&!e.hasError){if(!e.isLoaded)return!0;if((t=this.getFitPos(e))&&(e.width>t.width||e.height>t.height))return!0}return!1},isScaledDown:function(t,e){var o=!1,n=this.current,a=n.$content;return t!==m&&e!==m?o=t<n.width&&e<n.height:a&&(o=(o=f.modulaFancybox.getTranslate(a)).width<n.width&&o.height<n.height),o},canPan:function(t,e){var o=this.current,n=null,a=!1;return"image"===o.type&&(o.isComplete||t&&e)&&!o.hasError&&(a=this.getFitPos(o),t!==m&&e!==m?n={width:t,height:e}:o.isComplete&&(n=f.modulaFancybox.getTranslate(o.$content)),n&&a&&(a=1.5<Math.abs(n.width-a.width)||1.5<Math.abs(n.height-a.height))),a},loadSlide:function(o){var t,e,n,a=this;if(!o.isLoading&&!o.isLoaded){if(!(o.isLoading=!0)===a.trigger("beforeLoad",o))return o.isLoading=!1;switch(t=o.type,(e=o.$slide).off("refresh").trigger("onReset").addClass(o.opts.slideClass),t){case"image":a.setImage(o);break;case"iframe":a.setIframe(o);break;case"html":a.setContent(o,o.src||o.content);break;case"video":a.setContent(o,o.opts.video.tpl.replace(/\{\{src\}\}/gi,o.src).replace("{{format}}",o.opts.videoFormat||o.opts.video.format||"").replace("{{poster}}",o.thumb||""));break;case"inline":f(o.src).length?a.setContent(o,f(o.src)):a.setError(o);break;case"ajax":a.showLoading(o),n=f.ajax(f.extend({},o.opts.ajax.settings,{url:o.src,success:function(t,e){"success"===e&&a.setContent(o,t)},error:function(t,e){t&&"abort"!==e&&a.setError(o)}})),e.one("onReset",function(){n.abort()});break;default:a.setError(o)}return!0}},setImage:function(e){var t,o=this;setTimeout(function(){var t=e.$image;o.isClosing||!e.isLoading||t&&t.length&&t[0].complete||e.hasError||o.showLoading(e)},50),o.checkSrcset(e),e.$content=f('<div class="modula-fancybox-content"></div>').addClass("modula-fancybox-is-hidden").appendTo(e.$slide.addClass("modula-fancybox-slide--image")),!1!==e.opts.preload&&e.opts.width&&e.opts.height&&e.thumb&&(e.width=e.opts.width,e.height=e.opts.height,(t=s.createElement("img")).onerror=function(){f(this).remove(),e.$ghost=null},t.onload=function(){o.afterLoad(e)},e.$ghost=f(t).addClass("modula-fancybox-image").appendTo(e.$content).attr("src",e.thumb),"undifined"!=typeof e.src&&e.$ghost.attr("alt",e.alt)),o.setBigImage(e)},checkSrcset:function(t){var e,o,n,a,i=t.opts.srcset||t.opts.image.srcset;if(i){n=l.devicePixelRatio||1,a=l.innerWidth*n,(o=i.split(",").map(function(t){var n={};return t.trim().split(/\s+/).forEach(function(t,e){var o=parseInt(t.substring(0,t.length-1),10);if(0===e)return n.url=t;o&&(n.value=o,n.postfix=t[t.length-1])}),n})).sort(function(t,e){return t.value-e.value});for(var s=0;s<o.length;s++){var r=o[s];if("w"===r.postfix&&r.value>=a||"x"===r.postfix&&r.value>=n){e=r;break}}!e&&o.length&&(e=o[o.length-1]),e&&(t.src=e.url,t.width&&t.height&&"w"==e.postfix&&(t.height=t.width/t.height*e.value,t.width=e.value),t.opts.srcset=i)}},setBigImage:function(e){var o=this,t=s.createElement("img"),n=f(t);e.$image=n.one("error",function(){o.setError(e)}).one("load",function(){var t;e.$ghost||(o.resolveImageSlideSize(e,this.naturalWidth,this.naturalHeight),o.afterLoad(e)),o.isClosing||(e.opts.srcset&&((t=e.opts.sizes)&&"auto"!==t||(t=(1<e.width/e.height&&1<a.width()/a.height()?"100":Math.round(e.width/e.height*100))+"vw"),n.attr("sizes",t).attr("srcset",e.opts.srcset)),e.opts.alt&&n.attr("alt",e.opts.alt),e.opts.image_id&&n.attr("image-id",e.opts.image_id),e.$thumb&&n.attr("title",e.$thumb.find("img.pic").attr("title")),e.$ghost&&setTimeout(function(){e.$ghost&&!o.isClosing&&e.$ghost.hide()},Math.min(300,Math.max(1e3,e.height/1600))),o.hideLoading(e))}).addClass("modula-fancybox-image").attr("src",e.src).appendTo(e.$content),(t.complete||"complete"==t.readyState)&&n.naturalWidth&&n.naturalHeight?n.trigger("load"):t.error&&n.trigger("error")},resolveImageSlideSize:function(t,e,o){var n=parseInt(t.opts.width,10),a=parseInt(t.opts.height,10);t.width=e,t.height=o,0<n&&(t.width=n,t.height=Math.floor(n*o/e)),0<a&&(t.width=Math.floor(a*e/o),t.height=a)},setIframe:function(a){var i,e=this,s=a.opts.iframe,r=a.$slide;a.$content=f('<div class="modula-fancybox-content'+(s.preload?" modula-fancybox-is-hidden":"")+'"></div>').css(s.css).appendTo(r),r.addClass("modula-fancybox-slide--"+a.contentType),a.$iframe=i=f(s.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr(s.attr).appendTo(a.$content),s.preload?(e.showLoading(a),i.on("load.fb error.fb",function(t){this.isReady=1,a.$slide.trigger("refresh"),e.afterLoad(a)}),r.on("refresh.fb",function(){var t,e=a.$content,o=s.css.width,n=s.css.height;if(1===i[0].isReady){try{t=i.contents().find("body")}catch(t){}t&&t.length&&t.children().length&&(r.css("overflow","visible"),e.css({width:"100%","max-width":"100%",height:"9999px"}),o===m&&(o=Math.ceil(Math.max(t[0].clientWidth,t.outerWidth(!0)))),e.css("width",o||"").css("max-width",""),n===m&&(n=Math.ceil(Math.max(t[0].clientHeight,t.outerHeight(!0)))),e.css("height",n||""),r.css("overflow","auto")),e.removeClass("modula-fancybox-is-hidden")}})):e.afterLoad(a),i.attr("src",a.src),r.one("onReset",function(){try{f(this).find("iframe").hide().unbind().attr("src","//about:blank")}catch(t){}f(this).off("refresh.fb").empty(),a.isLoaded=!1,a.isRevealed=!1})},setContent:function(t,e){var o;this.isClosing||(this.hideLoading(t),t.$content&&f.modulaFancybox.stop(t.$content),t.$slide.empty(),(o=e)&&o.hasOwnProperty&&o instanceof f&&e.parent().length?((e.hasClass("modula-fancybox-content")||e.parent().hasClass("modula-fancybox-content"))&&e.parents(".modula-fancybox-slide").trigger("onReset"),t.$placeholder=f("<div>").hide().insertAfter(e),e.css("display","inline-block")):t.hasError||("string"===f.type(e)&&(e=f("<div>").append(f.trim(e)).contents()),t.opts.filter&&(e=f("<div>").html(e).find(t.opts.filter))),t.$slide.one("onReset",function(){f(this).find("video,audio").trigger("pause"),t.$placeholder&&(t.$placeholder.after(e.removeClass("modula-fancybox-content").hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(f(this).empty(),t.isLoaded=!1,t.isRevealed=!1)}),f(e).appendTo(t.$slide),f(e).is("video,audio")&&(f(e).addClass("modula-fancybox-video"),f(e).wrap("<div></div>"),t.contentType="video",t.opts.width=t.opts.width||f(e).attr("width"),t.opts.height=t.opts.height||f(e).attr("height")),t.$content=t.$slide.children().filter("div,form,main,video,audio,article,.modula-fancybox-content").first(),t.$content.siblings().hide(),t.$content.length||(t.$content=t.$slide.wrapInner("<div></div>").children().first()),t.$content.addClass("modula-fancybox-content"),t.$slide.addClass("modula-fancybox-slide--"+t.contentType),this.afterLoad(t))},setError:function(t){t.hasError=!0,t.$slide.trigger("onReset").removeClass("modula-fancybox-slide--"+t.contentType).addClass("modula-fancybox-slide--error"),t.contentType="html",this.setContent(t,this.translate(t,t.opts.errorTpl)),t.pos===this.currPos&&(this.isAnimating=!1)},showLoading:function(t){(t=t||this.current)&&!t.$spinner&&(t.$spinner=f(this.translate(this,this.opts.spinnerTpl)).appendTo(t.$slide).hide().fadeIn("fast"))},hideLoading:function(t){(t=t||this.current)&&t.$spinner&&(t.$spinner.stop().remove(),delete t.$spinner)},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger("afterLoad",t),e.hideLoading(t),!t.opts.smallBtn||t.$smallBtn&&t.$smallBtn.length||(t.$smallBtn=f(e.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content)),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on("contextmenu.fb",function(t){return 2==t.button&&t.preventDefault(),!0}),"image"===t.type&&f('<div class="modula-fancybox-spaceball"></div>').appendTo(t.$content)),e.adjustCaption(t),e.adjustLayout(t),t.pos===e.currPos&&e.updateCursor(),e.revealContent(t))},adjustCaption:function(t){var e=this,o=t||e.current,n=o.opts.caption,a=o.opts.preventCaptionOverlap,i=e.$refs.caption,t=!1;i.toggleClass("modula-fancybox-caption--separate",a),a&&n&&n.length&&(o.pos!==e.currPos?((i=i.clone().appendTo(i.parent())).children().eq(0).empty().html(n),t=i.outerHeight(!0),i.empty().remove()):e.$caption&&(t=e.$caption.outerHeight(!0)),o.$slide.css("padding-bottom",t||""))},adjustLayout:function(t){var e,o,n,a=t||this.current;a.isLoaded&&!0!==a.opts.disableLayoutFix&&(a.$content.css("margin-bottom",""),a.$content.outerHeight()>a.$slide.height()+.5&&(o=a.$slide[0].style["padding-bottom"],n=a.$slide.css("padding-bottom"),0<parseFloat(n)&&(t=a.$slide[0].scrollHeight,a.$slide.css("padding-bottom",0),Math.abs(t-a.$slide[0].scrollHeight)<1&&(e=n),a.$slide.css("padding-bottom",o))),a.$content.css("margin-bottom",e))},revealContent:function(t){var e,o,n,a,i=this,s=t.$slide,r=!1,l=!1,c=i.isMoved(t),d=t.isRevealed;return t.isRevealed=!0,e=t.opts[i.firstRun?"animationEffect":"transitionEffect"],n=t.opts[i.firstRun?"animationDuration":"transitionDuration"],n=parseInt(t.forcedDuration===m?n:t.forcedDuration,10),!c&&t.pos===i.currPos&&n||(e=!1),"zoom"===e&&(t.pos===i.currPos&&n&&"image"===t.type&&!t.hasError&&(l=i.getThumbPos(t))?r=i.getFitPos(t):e="fade"),"zoom"===e?(i.isAnimating=!0,r.scaleX=r.width/l.width,r.scaleY=r.height/l.height,"auto"==(a=t.opts.zoomOpacity)&&(a=.1<Math.abs(t.width/t.height-l.width/l.height)),a&&(l.opacity=.1,r.opacity=1),f.modulaFancybox.setTranslate(t.$content.removeClass("modula-fancybox-is-hidden"),l),p(t.$content),void f.modulaFancybox.animate(t.$content,r,n,function(){i.isAnimating=!1,i.complete()})):(i.updateSlide(t),e?(f.modulaFancybox.stop(s),o="modula-fancybox-slide--"+(t.pos>=i.prevPos?"next":"previous")+" modula-fancybox-animated modula-fancybox-fx-"+e,s.addClass(o).removeClass("modula-fancybox-slide--current"),t.$content.removeClass("modula-fancybox-is-hidden"),p(s),"image"!==t.type&&t.$content.hide().show(0),void f.modulaFancybox.animate(s,"modula-fancybox-slide--current",n,function(){s.removeClass(o).css({transform:"",opacity:""}),t.pos===i.currPos&&i.complete()},!0)):(t.$content.removeClass("modula-fancybox-is-hidden"),d||!c||"image"!==t.type||t.hasError||t.$content.hide().fadeIn("fast"),void(t.pos===i.currPos&&i.complete())))},getThumbPos:function(t){var e,o,n,a,i=t.$thumb;return!!(i&&(a=(n=i).find("a.tile-inner")[0])&&a.ownerDocument===s&&(f(".modula-fancybox-container").css("pointer-events","none"),n={x:a.getBoundingClientRect().left+a.offsetWidth/2,y:a.getBoundingClientRect().top+a.offsetHeight/2},a=s.elementFromPoint(n.x,n.y)===a,f(".modula-fancybox-container").css("pointer-events",""),a))&&(o=f.modulaFancybox.getTranslate(i),t=parseFloat(i.css("border-top-width")||0),n=parseFloat(i.css("border-right-width")||0),a=parseFloat(i.css("border-bottom-width")||0),i=parseFloat(i.css("border-left-width")||0),e={top:o.top+t,left:o.left+i,width:o.width-n-i,height:o.height-t-a,scaleX:1,scaleY:1},0<o.width&&0<o.height&&e)},complete:function(){var t,o=this,e=o.current,n={};!o.isMoved()&&e.isLoaded&&(e.isComplete||(e.isComplete=!0,e.$slide.siblings().trigger("onReset"),o.preload("inline"),p(e.$slide),e.$slide.addClass("modula-fancybox-slide--complete"),f.each(o.slides,function(t,e){e.pos>=o.currPos-1&&e.pos<=o.currPos+1?n[e.pos]=e:e&&(f.modulaFancybox.stop(e.$slide),e.$slide.off().remove())}),o.slides=n),o.isAnimating=!1,o.updateCursor(),o.trigger("afterShow"),e.opts.video.autoStart&&e.$slide.find("video,audio").filter(":visible:first").trigger("play").one("ended",function(){Document.exitFullscreen?Document.exitFullscreen():this.webkitExitFullscreen&&this.webkitExitFullscreen(),o.next()}),e.opts.autoFocus&&"html"===e.contentType&&((t=e.$content.find("input[autofocus]:enabled:visible:first")).length?t.trigger("focus"):o.focus(null,!0)),e.$slide.scrollTop(0).scrollLeft(0))},preload:function(t){var e,o,n=this;n.group.length<2||(o=n.slides[n.currPos+1],(e=n.slides[n.currPos-1])&&e.type===t&&n.loadSlide(e),o&&o.type===t&&n.loadSlide(o))},focus:function(t,e){var o=this,n=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"])'].join(",");o.isClosing||((e=(e=!t&&o.current&&o.current.isComplete?o.current.$slide.find("*:visible"+(e?":not(.modula-fancybox-close-small)":"")):o.$refs.container.find("*:visible")).filter(n).filter(function(){return"hidden"!==f(this).css("visibility")&&!f(this).hasClass("disabled")})).length?(n=e.index(s.activeElement),t&&t.shiftKey?(n<0||0==n)&&(t.preventDefault(),e.eq(e.length-1).trigger("focus")):(n<0||n==e.length-1)&&(t&&t.preventDefault(),e.eq(0).trigger("focus"))):o.$refs.container.trigger("focus"))},activate:function(){var e=this;f(".modula-fancybox-container").each(function(){var t=f(this).data("modulaFancyBox");t&&t.id!==e.id&&!t.isClosing&&(t.trigger("onDeactivate"),t.removeEvents(),t.isVisible=!1)}),e.isVisible=!0,(e.current||e.isIdle)&&(e.update(),e.updateControls()),e.trigger("onActivate"),e.addEvents()},close:function(t,e){function o(){l.cleanUp(t)}var n,a,i,s,r,l=this,c=l.current;return!l.isClosing&&(!(l.isClosing=!0)===l.trigger("beforeClose",t)?(l.isClosing=!1,d(function(){l.update()}),!1):(l.removeEvents(),i=c.$content,n=c.opts.animationEffect,a=f.isNumeric(e)?e:n?c.opts.animationDuration:0,c.$slide.removeClass("modula-fancybox-slide--complete modula-fancybox-slide--next modula-fancybox-slide--previous modula-fancybox-animated"),!0!==t?f.modulaFancybox.stop(c.$slide):n=!1,c.$slide.siblings().trigger("onReset").remove(),a&&l.$refs.container.removeClass("modula-fancybox-is-open").addClass("modula-fancybox-is-closing").css("transition-duration",a+"ms"),l.hideLoading(c),l.hideControls(!0),l.updateCursor(),"zoom"!==n||i&&a&&"image"===c.type&&!l.isMoved()&&!c.hasError&&(r=l.getThumbPos(c))||(n="fade"),"zoom"===n?(f.modulaFancybox.stop(i),e={top:(s=f.modulaFancybox.getTranslate(i)).top,left:s.left,scaleX:s.width/r.width,scaleY:s.height/r.height,width:r.width,height:r.height},"auto"==(s=c.opts.zoomOpacity)&&(s=.1<Math.abs(c.width/c.height-r.width/r.height)),s&&(r.opacity=0),f.modulaFancybox.setTranslate(i,e),p(i),f.modulaFancybox.animate(i,r,a,o)):n&&a?f.modulaFancybox.animate(c.$slide.addClass("modula-fancybox-slide--previous").removeClass("modula-fancybox-slide--current"),"modula-fancybox-animated modula-fancybox-fx-"+n,a,o):!0===t?setTimeout(o,a):o(),!0))},cleanUp:function(t){var e,o=this,n=o.current.opts.$orig;o.current.$slide.trigger("onReset"),o.$refs.container.empty().remove(),o.trigger("afterClose",t),o.current.opts.backFocus&&(n&&n.length&&n.is(":visible")||(n=o.$trigger),n&&n.length&&(e=l.scrollX,t=l.scrollY,n.trigger("focus"),f("html, body").scrollTop(t).scrollLeft(e))),o.current=null,(o=f.modulaFancybox.getInstance())?o.activate():(f("body").removeClass("modula-fancybox-active compensate-for-scrollbar"),f("#modula-fancybox-style-noscroll").remove())},trigger:function(t,e){var o,n=Array.prototype.slice.call(arguments,1),a=this,e=e&&e.opts?e:a.current;if(e?n.unshift(e):e=a,n.unshift(a),f.isFunction(e.opts[t])&&(o=e.opts[t].apply(e,n)),!1===o)return o;("afterClose"!==t&&a.$refs?a.$refs.container:i).trigger(t+".fb",n)},updateControls:function(){var t=this,e=t.current,o=e.index,n=t.$refs.container,a=t.$refs.caption,i=e.opts.caption;e.$slide.trigger("refresh"),i&&i.length?(t.$caption=a).children().eq(0).html(i):t.$caption=null,t.hasHiddenControls||t.isIdle||t.showControls(),n.find("[data-fancybox-count]").html(t.group.length),n.find("[data-fancybox-index]").html(o+1),n.find("[data-fancybox-prev]").prop("disabled",!e.opts.loop&&o<=0),n.find("[data-fancybox-next]").prop("disabled",!e.opts.loop&&o>=t.group.length-1),"image"===e.type?n.find("[data-fancybox-zoom]").show().end().find("[data-fancybox-download]").attr("href",e.opts.image.src||e.src).show():e.opts.toolbar&&n.find("[data-fancybox-download],[data-fancybox-zoom]").hide(),f(s.activeElement).is(":hidden,[disabled]")&&t.$refs.container.trigger("focus")},hideControls:function(t){var e=["infobar","toolbar","nav"];!t&&this.current.opts.preventCaptionOverlap||e.push("caption"),this.$refs.container.removeClass(e.map(function(t){return"modula-fancybox-show-"+t}).join(" ")),this.hasHiddenControls=!0},showControls:function(){var t=this,e=(t.current||t).opts,o=t.$refs.container;t.hasHiddenControls=!1,t.idleSecondsCounter=0,o.toggleClass("modula-fancybox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("modula-fancybox-show-infobar",!!(e.infobar&&1<t.group.length)).toggleClass("modula-fancybox-show-caption",!!t.$caption).toggleClass("modula-fancybox-show-nav",!!(e.arrows&&1<t.group.length)).toggleClass("modula-fancybox-is-modal",!!e.modal)},toggleControls:function(){this.hasHiddenControls?this.showControls():this.hideControls()}}),f.modulaFancybox={version:"3.5.7",defaults:t,getInstance:function(t){var e=f('.modula-fancybox-container:not(".modula-fancybox-is-closing"):last').data("modulaFancyBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof n&&("string"===f.type(t)?e[t].apply(e,o):"function"===f.type(t)&&t.apply(e,o),e)},open:function(t,e,o){return new n(t,e,o)},close:function(t){var e=this.getInstance();e&&(e.close(),!0===t&&this.close(t))},destroy:function(){this.close(!0),i.add("body").off("click.fb-start","**")},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:(t=s.createElement("div"),l.getComputedStyle&&l.getComputedStyle(t)&&l.getComputedStyle(t).getPropertyValue("transform")&&!(s.documentMode&&s.documentMode<11)),getTranslate:function(t){var e;return!(!t||!t.length)&&{top:(e=t[0].getBoundingClientRect()).top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css("opacity"))}},setTranslate:function(t,e){var o="",n={};if(t&&e)return e.left===m&&e.top===m||(o=(e.left===m?t.position():e).left+"px, "+(e.top===m?t.position():e).top+"px",o=this.use3d?"translate3d("+o+", 0px)":"translate("+o+")"),e.scaleX!==m&&e.scaleY!==m?o+=" scale("+e.scaleX+", "+e.scaleY+")":e.scaleX!==m&&(o+=" scaleX("+e.scaleX+")"),o.length&&(n.transform=o),e.opacity!==m&&(n.opacity=e.opacity),e.width!==m&&(n.width=e.width),e.height!==m&&(n.height=e.height),t.css(n)},animate:function(e,o,n,a,i){var s,r=this;f.isFunction(n)&&(a=n,n=null),r.stop(e),s=r.getTranslate(e),e.on(c,function(t){t&&t.originalEvent&&(!e.is(t.originalEvent.target)||"z-index"==t.originalEvent.propertyName)||(r.stop(e),f.isNumeric(n)&&e.css("transition-duration",""),f.isPlainObject(o)?o.scaleX!==m&&o.scaleY!==m&&r.setTranslate(e,{top:o.top,left:o.left,width:s.width*o.scaleX,height:s.height*o.scaleY,scaleX:1,scaleY:1}):!0!==i&&e.removeClass(o),f.isFunction(a)&&a(t))}),f.isNumeric(n)&&e.css("transition-duration",n+"ms"),f.isPlainObject(o)?(o.scaleX!==m&&o.scaleY!==m&&(delete o.width,delete o.height,e.parent().hasClass("modula-fancybox-slide--image")&&e.parent().addClass("modula-fancybox-is-scaling")),f.modulaFancybox.setTranslate(e,o)):e.addClass(o),e.data("timer",setTimeout(function(){e.trigger(c)},n+33))},stop:function(t,e){t&&t.length&&(clearTimeout(t.data("timer")),e&&t.trigger(c),t.off(c).css("transition-duration",""),t.parent().removeClass("modula-fancybox-is-scaling"))}},f.fn.modulaFancybox=function(t){var e;return(e=(t=t||{}).selector||!1)?f("body").off("click.fb-start",e).on("click.fb-start",e,{options:t},b):this.off("click.fb-start").on("click.fb-start",{items:this,options:t},b),this},i.on("click.fb-start","[data-fancybox]",b),i.on("click.fb-start","[data-fancybox-trigger]",function(t){f('[data-fancybox="'+f(this).attr("data-fancybox-trigger")+'"]').eq(f(this).attr("data-fancybox-index")||0).trigger("click.fb-start",{$trigger:f(this)})}),o=".modula-fancybox-button",h="modula-fancybox-focus",g=null,i.on("mousedown mouseup focus blur",o,function(t){switch(t.type){case"mousedown":g=f(this);break;case"mouseup":g=null;break;case"focusin":f(o).removeClass(h),f(this).is(g)||f(this).is("[disabled]")||f(this).addClass(h);break;case"focusout":f(o).removeClass(h)}})))}(window,document,jQuery),function(h){"use strict";function f(o,t,e){if(o)return e=e||"","object"===h.type(e)&&(e=h.param(e,!0)),h.each(t,function(t,e){o=o.replace("$"+t,e||"")}),e.length&&(o+=(0<o.indexOf("?")?"&":"?")+e),o}var n={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"https://www.youtube-nocookie.com/embed/$4",thumb:"https://img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12]+"").replace(/\?/,"&")+"&output="+(t[12]&&0<t[12].indexOf("layer=c")?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}};h(document).on("objectNeedsType.fb",function(t,e,a){var i,s,r,l,c,d,u=a.src||"",p=!1,o=h.extend(!0,{},n,a.opts.media);h.each(o,function(t,e){if(s=u.match(e.matcher)){if(p=e.type,d=t,c={},e.paramPlace&&s[e.paramPlace]){"?"==(l=s[e.paramPlace])[0]&&(l=l.substring(1)),l=l.split("&");for(var o=0;o<l.length;++o){var n=l[o].split("=",2);2==n.length&&(c[n[0]]=decodeURIComponent(n[1].replace(/\+/g," ")))}}return r=h.extend(!0,{},e.params,a.opts[t],c),u="function"===h.type(e.url)?e.url.call(this,s,r,a):f(e.url,s,r),i="function"===h.type(e.thumb)?e.thumb.call(this,s,r,a):f(e.thumb,s),"youtube"===t?u=u.replace(/&t=(\d+)/,function(t,e){return"&start="+e}):"vimeo"===t&&(u=u.replace("&%23","#")),!1}}),p?(a.opts.thumb||a.opts.$thumb&&a.opts.$thumb.length||(a.opts.thumb=i),"iframe"===p&&(a.opts=h.extend(!0,a.opts,{iframe:{preload:!1,attr:{scrolling:"no"}}})),h.extend(a,{type:p,src:u,origSrc:a.src,contentSource:d,contentType:"image"===p?"image":"gmap_place"==d||"gmap_search"==d?"map":"video"})):u&&(a.type=a.opts.defaultType)});var a={youtube:{src:"https://www.youtube.com/iframe_api",class:"YT",loading:!1,loaded:!1},vimeo:{src:"https://player.vimeo.com/api/player.js",class:"Vimeo",loading:!1,loaded:!1},load:function(t){var e,o=this;this[t].loaded?setTimeout(function(){o.done(t)}):this[t].loading||(this[t].loading=!0,(e=document.createElement("script")).type="text/javascript",e.src=this[t].src,"youtube"===t?window.onYouTubeIframeAPIReady=function(){o[t].loaded=!0,o.done(t)}:e.onload=function(){o[t].loaded=!0,o.done(t)},document.body.appendChild(e))},done:function(t){var e,o;"youtube"===t&&delete window.onYouTubeIframeAPIReady,(e=h.modulaFancybox.getInstance())&&(o=e.current.$content.find("iframe"),"youtube"===t&&void 0!==YT&&YT?new YT.Player(o.attr("id"),{events:{onStateChange:function(t){0==t.data&&e.next()}}}):"vimeo"===t&&void 0!==Vimeo&&Vimeo&&new Vimeo.Player(o).on("ended",function(){e.next()}))}};h(document).on({"afterShow.fb":function(t,e,o){1<e.group.length&&("youtube"===o.contentSource||"vimeo"===o.contentSource)&&a.load(o.contentSource)}})}(jQuery),function(d,l,u){"use strict";function p(t){var e,o=[];for(e in t=(t=t.originalEvent||t||d.e).touches&&t.touches.length?t.touches:t.changedTouches&&t.changedTouches.length?t.changedTouches:[t])t[e].pageX?o.push({x:t[e].pageX,y:t[e].pageY}):t[e].clientX&&o.push({x:t[e].clientX,y:t[e].clientY});return o}function h(t,e,o){return e&&t?"x"===o?t.x-e.x:"y"===o?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function c(t){if(t.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio,iframe')||u.isFunction(t.get(0).onclick)||t.data("selectable"))return 1;for(var e=0,o=t[0].attributes,n=o.length;e<n;e++)if("data-fancybox-"===o[e].nodeName.substr(0,14))return 1}function f(t){for(var e,o,n,a=!1;e=t.get(0),o=n=o=void 0,o=d.getComputedStyle(e)["overflow-y"],n=d.getComputedStyle(e)["overflow-x"],o=("scroll"===o||"auto"===o)&&e.scrollHeight>e.clientHeight,e=("scroll"===n||"auto"===n)&&e.scrollWidth>e.clientWidth,!(a=o||e)&&(t=t.parent()).length&&!t.hasClass("modula-fancybox-stage")&&!t.is("body"););return a}function o(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on("touchstart.fb.touch mousedown.fb.touch",u.proxy(e,"ontouchstart"))}var m=d.requestAnimationFrame||d.webkitRequestAnimationFrame||d.mozRequestAnimationFrame||d.oRequestAnimationFrame||function(t){return d.setTimeout(t,1e3/60)},g=d.cancelAnimationFrame||d.webkitCancelAnimationFrame||d.mozCancelAnimationFrame||d.oCancelAnimationFrame||function(t){d.clearTimeout(t)};o.prototype.destroy=function(){var t=this;t.$container.off(".fb.touch"),u(l).off(".fb.touch"),t.requestId&&(g(t.requestId),t.requestId=null),t.tapped&&(clearTimeout(t.tapped),t.tapped=null)},o.prototype.ontouchstart=function(t){var e=this,o=u(t.target),n=e.instance,a=n.current,i=a.$slide,s=a.$content,r="touchstart"==t.type;if(r&&e.$container.off("mousedown.fb.touch"),(!t.originalEvent||2!=t.originalEvent.button)&&i.length&&o.length&&!c(o)&&!c(o.parent())&&(o.is("img")||!(t.originalEvent.clientX>o[0].clientWidth+o.offset().left))){if(!a||n.isAnimating||a.$slide.hasClass("modula-fancybox-animated"))return t.stopPropagation(),void t.preventDefault();e.realPoints=e.startPoints=p(t),e.startPoints.length&&(a.touch&&t.stopPropagation(),e.startEvent=t,e.canTap=!0,e.$target=o,e.$content=s,e.opts=a.opts.touch,e.isPanning=!1,e.isSwiping=!1,e.isZooming=!1,e.isScrolling=!1,e.canPan=n.canPan(),e.startTime=(new Date).getTime(),e.distanceX=e.distanceY=e.distance=0,e.canvasWidth=Math.round(i[0].clientWidth),e.canvasHeight=Math.round(i[0].clientHeight),e.contentLastPos=null,e.contentStartPos=u.modulaFancybox.getTranslate(e.$content)||{top:0,left:0},e.sliderStartPos=u.modulaFancybox.getTranslate(i),e.stagePos=u.modulaFancybox.getTranslate(n.$refs.stage),e.sliderStartPos.top-=e.stagePos.top,e.sliderStartPos.left-=e.stagePos.left,e.contentStartPos.top-=e.stagePos.top,e.contentStartPos.left-=e.stagePos.left,u(l).off(".fb.touch").on(r?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",u.proxy(e,"ontouchend")).on(r?"touchmove.fb.touch":"mousemove.fb.touch",u.proxy(e,"ontouchmove")),u.modulaFancybox.isMobile&&l.addEventListener("scroll",e.onscroll,!0),((e.opts||e.canPan)&&(o.is(e.$stage)||e.$stage.find(o).length)||(o.is(".modula-fancybox-image")&&t.preventDefault(),u.modulaFancybox.isMobile&&o.parents(".modula-fancybox-caption").length))&&(e.isScrollable=f(o)||f(o.parent()),u.modulaFancybox.isMobile&&e.isScrollable||t.preventDefault(),1!==e.startPoints.length&&!a.hasError||(e.canPan?(u.modulaFancybox.stop(e.$content),e.isPanning=!0):e.isSwiping=!0,e.$container.addClass("modula-fancybox-is-grabbing")),2===e.startPoints.length&&"image"===a.type&&(a.isLoaded||a.$ghost)&&(e.canTap=!1,e.isSwiping=!1,e.isPanning=!1,e.isZooming=!0,u.modulaFancybox.stop(e.$content),e.centerPointStartX=.5*(e.startPoints[0].x+e.startPoints[1].x)-u(d).scrollLeft(),e.centerPointStartY=.5*(e.startPoints[0].y+e.startPoints[1].y)-u(d).scrollTop(),e.percentageOfImageAtPinchPointX=(e.centerPointStartX-e.contentStartPos.left)/e.contentStartPos.width,e.percentageOfImageAtPinchPointY=(e.centerPointStartY-e.contentStartPos.top)/e.contentStartPos.height,e.startDistanceBetweenFingers=h(e.startPoints[0],e.startPoints[1]))))}},o.prototype.onscroll=function(t){this.isScrolling=!0,l.removeEventListener("scroll",this.onscroll,!0)},o.prototype.ontouchmove=function(t){var e=this;void 0===t.originalEvent.buttons||0!==t.originalEvent.buttons?e.isScrolling?e.canTap=!1:(e.newPoints=p(t),(e.opts||e.canPan)&&e.newPoints.length&&e.newPoints.length&&(e.isSwiping&&!0===e.isSwiping||t.preventDefault(),e.distanceX=h(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=h(e.newPoints[0],e.startPoints[0],"y"),e.distance=h(e.newPoints[0],e.startPoints[0]),0<e.distance&&(e.isSwiping?e.onSwipe(t):e.isPanning?e.onPan():e.isZooming&&e.onZoom()))):e.ontouchend(t)},o.prototype.onSwipe=function(t){var a=this,i=a.instance,e=a.isSwiping,o=a.sliderStartPos.left||0;if(!0!==e)"x"==e&&(0<a.distanceX&&(a.instance.group.length<2||0===a.instance.current.index&&!a.instance.current.opts.loop)?o+=Math.pow(a.distanceX,.8):a.distanceX<0&&(a.instance.group.length<2||a.instance.current.index===a.instance.group.length-1&&!a.instance.current.opts.loop)?o-=Math.pow(-a.distanceX,.8):o+=a.distanceX),a.sliderLastPos={top:"x"==e?0:a.sliderStartPos.top+a.distanceY,left:o},a.requestId&&(g(a.requestId),a.requestId=null),a.requestId=m(function(){a.sliderLastPos&&(u.each(a.instance.slides,function(t,e){var o=e.pos-a.instance.currPos;u.modulaFancybox.setTranslate(e.$slide,{top:a.sliderLastPos.top,left:a.sliderLastPos.left+o*a.canvasWidth+o*e.opts.gutter})}),a.$container.addClass("modula-fancybox-is-sliding"))});else if(10<Math.abs(a.distance)){if(a.canTap=!1,i.group.length<2&&a.opts.vertical?a.isSwiping="y":i.isDragging||!1===a.opts.vertical||"auto"===a.opts.vertical&&800<u(d).width()?a.isSwiping="x":(o=Math.abs(180*Math.atan2(a.distanceY,a.distanceX)/Math.PI),a.isSwiping=45<o&&o<135?"y":"x"),"y"===a.isSwiping&&u.modulaFancybox.isMobile&&a.isScrollable)return void(a.isScrolling=!0);i.isDragging=a.isSwiping,a.startPoints=a.newPoints,u.each(i.slides,function(t,e){var o,n;u.modulaFancybox.stop(e.$slide),o=u.modulaFancybox.getTranslate(e.$slide),n=u.modulaFancybox.getTranslate(i.$refs.stage),e.$slide.css({transform:"",opacity:"","transition-duration":""}).removeClass("modula-fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)modula-fancybox-fx-\S+/g)||[]).join(" ")}),e.pos===i.current.pos&&(a.sliderStartPos.top=o.top-n.top,a.sliderStartPos.left=o.left-n.left),u.modulaFancybox.setTranslate(e.$slide,{top:o.top-n.top,left:o.left-n.left})}),i.SlideShow&&i.SlideShow.isActive&&i.SlideShow.stop()}},o.prototype.onPan=function(){var t=this;h(t.newPoints[0],t.realPoints[0])<(u.modulaFancybox.isMobile?10:5)?t.startPoints=t.newPoints:(t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&g(t.requestId),t.requestId=m(function(){u.modulaFancybox.setTranslate(t.$content,t.contentLastPos)}))},o.prototype.limitMovement=function(){var t=this,e=t.canvasWidth,o=t.canvasHeight,n=t.distanceX,a=t.distanceY,i=t.contentStartPos,s=i.left,r=i.top,l=i.width,c=i.height,d=e<l?s+n:s,u=r+a,t=Math.max(0,.5*e-.5*l),i=Math.max(0,.5*o-.5*c),l=Math.min(e-l,.5*e-.5*l),c=Math.min(o-c,.5*o-.5*c);return 0<n&&t<d&&(d=t-1+Math.pow(-t+s+n,.8)||0),n<0&&d<l&&(d=l+1-Math.pow(l-s-n,.8)||0),0<a&&i<u&&(u=i-1+Math.pow(-i+r+a,.8)||0),a<0&&u<c&&(u=c+1-Math.pow(c-r-a,.8)||0),{top:u,left:d}},o.prototype.limitPosition=function(t,e,o,n){var a=this.canvasWidth,i=this.canvasHeight;return t=a<o?(t=0<t?0:t)<a-o?a-o:t:Math.max(0,a/2-o/2),{top:e=i<n?(e=0<e?0:e)<i-n?i-n:e:Math.max(0,i/2-n/2),left:t}},o.prototype.onZoom=function(){var t=this,e=t.contentStartPos,o=e.width,n=e.height,a=e.left,i=e.top,s=h(t.newPoints[0],t.newPoints[1])/t.startDistanceBetweenFingers,r=Math.floor(o*s),l=Math.floor(n*s),c=(o-r)*t.percentageOfImageAtPinchPointX,e=(n-l)*t.percentageOfImageAtPinchPointY,o=(t.newPoints[0].x+t.newPoints[1].x)/2-u(d).scrollLeft(),n=(t.newPoints[0].y+t.newPoints[1].y)/2-u(d).scrollTop(),o=o-t.centerPointStartX,s={top:i+(e+(n-t.centerPointStartY)),left:a+(c+o),scaleX:s,scaleY:s};t.canTap=!1,t.newWidth=r,t.newHeight=l,t.contentLastPos=s,t.requestId&&g(t.requestId),t.requestId=m(function(){u.modulaFancybox.setTranslate(t.$content,t.contentLastPos)})},o.prototype.ontouchend=function(t){var e=this,o=e.isSwiping,n=e.isPanning,a=e.isZooming,i=e.isScrolling;if(e.endPoints=p(t),e.dMs=Math.max((new Date).getTime()-e.startTime,1),e.$container.removeClass("modula-fancybox-is-grabbing"),u(l).off(".fb.touch"),l.removeEventListener("scroll",e.onscroll,!0),e.requestId&&(g(e.requestId),e.requestId=null),e.isSwiping=!1,e.isPanning=!1,e.isZooming=!1,e.isScrolling=!1,e.instance.isDragging=!1,e.canTap)return e.onTap(t);e.speed=100,e.velocityX=e.distanceX/e.dMs*.5,e.velocityY=e.distanceY/e.dMs*.5,n?e.endPanning():a?e.endZooming():e.endSwiping(o,i)},o.prototype.endSwiping=function(t,e){var o=this,n=!1,a=o.instance.group.length,i=Math.abs(o.distanceX),i="x"==t&&1<a&&(130<o.dMs&&10<i||50<i);o.sliderLastPos=null,"y"==t&&!e&&50<Math.abs(o.distanceY)?(u.modulaFancybox.animate(o.instance.current.$slide,{top:o.sliderStartPos.top+o.distanceY+150*o.velocityY,opacity:0},200),n=o.instance.close(!0,250)):i&&0<o.distanceX?n=o.instance.previous(300):i&&o.distanceX<0&&(n=o.instance.next(300)),!1!==n||"x"!=t&&"y"!=t||o.instance.centerSlide(200),o.$container.removeClass("modula-fancybox-is-sliding")},o.prototype.endPanning=function(){var t,e,o=this;o.contentLastPos&&(e=!1===o.opts.momentum||350<o.dMs?(t=o.contentLastPos.left,o.contentLastPos.top):(t=o.contentLastPos.left+500*o.velocityX,o.contentLastPos.top+500*o.velocityY),(e=o.limitPosition(t,e,o.contentStartPos.width,o.contentStartPos.height)).width=o.contentStartPos.width,e.height=o.contentStartPos.height,u.modulaFancybox.animate(o.$content,e,366))},o.prototype.endZooming=function(){var t,e,o,n=this,a=n.instance.current,i=n.newWidth,s=n.newHeight;n.contentLastPos&&(t=n.contentLastPos.left,o={top:e=n.contentLastPos.top,left:t,width:i,height:s,scaleX:1,scaleY:1},u.modulaFancybox.setTranslate(n.$content,o),i<n.canvasWidth&&s<n.canvasHeight?n.instance.scaleToFit(150):i>a.width||s>a.height?n.instance.scaleToActual(n.centerPointStartX,n.centerPointStartY,150):(s=n.limitPosition(t,e,i,s),u.modulaFancybox.animate(n.$content,s,150)))},o.prototype.onTap=function(e){function t(t){if(t=s.opts[t],u.isFunction(t)&&(t=t.apply(i,[s,e])),t)switch(t){case"close":i.close(n.startEvent);break;case"toggleControls":i.toggleControls();break;case"next":i.next();break;case"nextOrClose":1<i.group.length?i.next():i.close(n.startEvent);break;case"zoom":"image"==s.type&&(s.isLoaded||s.$ghost)&&(i.canPan()?i.scaleToFit():i.isScaledDown()?i.scaleToActual(l,c):i.group.length<2&&i.close(n.startEvent))}}var o,n=this,a=u(e.target),i=n.instance,s=i.current,r=e&&p(e)||n.startPoints,l=r[0]?r[0].x-u(d).scrollLeft()-n.stagePos.left:0,c=r[0]?r[0].y-u(d).scrollTop()-n.stagePos.top:0;if((!e.originalEvent||2!=e.originalEvent.button)&&(a.is("img")||!(l>a[0].clientWidth+a.offset().left))){if(a.is(".modula-fancybox-bg,.modula-fancybox-inner,.modula-fancybox-outer,.modula-fancybox-container"))o="Outside";else if(a.is(".modula-fancybox-slide"))o="Slide";else{if(!i.current.$content||!i.current.$content.find(a).addBack().filter(a).length)return;o="Content"}if(n.tapped){if(clearTimeout(n.tapped),n.tapped=null,50<Math.abs(l-n.tapX)||50<Math.abs(c-n.tapY))return this;t("dblclick"+o)}else n.tapX=l,n.tapY=c,s.opts["dblclick"+o]&&s.opts["dblclick"+o]!==s.opts["click"+o]?n.tapped=setTimeout(function(){n.tapped=null,i.isAnimating||t("click"+o)},500):t("click"+o);return this}},u(l).on("onActivate.fb",function(t,e){e&&!e.Guestures&&(e.Guestures=new o(e))}).on("beforeClose.fb",function(t,e){e&&e.Guestures&&e.Guestures.destroy()})}(window,document,jQuery),function(i,s){"use strict";function o(t){this.instance=t,this.init()}s.extend(!0,s.modulaFancybox.defaults,{btnTpl:{slideShow:'<button data-fancybox-play class="modula-fancybox-button modula-fancybox-button--play" title="{{PLAY_START}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.5 5.4v13.2l11-6.6z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.33 5.75h2.2v12.5h-2.2V5.75zm5.15 0h2.2v12.5h-2.2V5.75z"/></svg></button>'},slideShow:{autoStart:!1,speed:3e3,progress:!0}}),s.extend(o.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this,e=t.instance,o=e.group[e.currIndex].opts.slideShow;t.$button=e.$refs.toolbar.find("[data-fancybox-play]").on("click",function(){t.toggle()}),e.group.length<2||!o?t.$button.hide():o.progress&&(t.$progress=s('<div class="modula-fancybox-progress"></div>').appendTo(e.$refs.inner))},set:function(t){var e=this,o=e.instance,n=o.current;n&&(!0===t||n.opts.loop||o.currIndex<o.group.length-1)?e.isActive&&"video"!==n.contentType&&(e.$progress&&s.modulaFancybox.animate(e.$progress.show(),{scaleX:1},n.opts.slideShow.speed),e.timer=setTimeout(function(){o.current.opts.loop||o.current.index!=o.group.length-1?o.next():o.jumpTo(0)},n.opts.slideShow.speed)):(e.stop(),o.idleSecondsCounter=0,o.showControls())},clear:function(){clearTimeout(this.timer),this.timer=null,this.$progress&&this.$progress.removeAttr("style").hide()},start:function(){var t=this,e=t.instance.current;e&&(t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_STOP).removeClass("modula-fancybox-button--play").addClass("modula-fancybox-button--pause"),t.isActive=!0,e.isComplete&&t.set(!0),t.instance.trigger("onSlideShowChange",!0))},stop:function(){var t=this,e=t.instance.current;t.clear(),t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_START).removeClass("modula-fancybox-button--pause").addClass("modula-fancybox-button--play"),t.isActive=!1,t.instance.trigger("onSlideShowChange",!1),t.$progress&&t.$progress.removeAttr("style").hide()},toggle:function(){this.isActive?this.stop():this.start()}}),s(i).on({"onInit.fb":function(t,e){e&&!e.SlideShow&&(e.SlideShow=new o(e))},"beforeShow.fb":function(t,e,o,n){e=e&&e.SlideShow;n?e&&o.opts.slideShow.autoStart&&e.start():e&&e.isActive&&e.clear()},"afterShow.fb":function(t,e,o){e=e&&e.SlideShow;e&&e.isActive&&e.set()},"afterKeydown.fb":function(t,e,o,n,a){e=e&&e.SlideShow;!e||!o.opts.slideShow||80!==a&&32!==a||s(i.activeElement).is("button,a,input")||(n.preventDefault(),e.toggle())},"beforeClose.fb onDeactivate.fb":function(t,e){e=e&&e.SlideShow;e&&e.stop()}}),s(i).on("visibilitychange",function(){var t=s.modulaFancybox.getInstance(),t=t&&t.SlideShow;t&&t.isActive&&(i.hidden?t.clear():t.set())})}(document,jQuery),function(i,o){"use strict";var n,a=function(){for(var t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],e={},o=0;o<t.length;o++){var n=t[o];if(n&&n[1]in i){for(var a=0;a<n.length;a++)e[t[0][a]]=n[a];return e}}return!1}();a&&(n={request:function(t){(t=t||i.documentElement)[a.requestFullscreen](t.ALLOW_KEYBOARD_INPUT)},exit:function(){i[a.exitFullscreen]()},toggle:function(t){t=t||i.documentElement,this.isFullscreen()?this.exit():this.request(t)},isFullscreen:function(){return Boolean(i[a.fullscreenElement])},enabled:function(){return Boolean(i[a.fullscreenEnabled])}},o.extend(!0,o.modulaFancybox.defaults,{btnTpl:{fullScreen:'<button data-fancybox-fullscreen class="modula-fancybox-button modula-fancybox-button--fsenter" title="{{FULL_SCREEN}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"/></svg></button>'},fullScreen:{autoStart:!1}}),o(i).on(a.fullscreenchange,function(){var t=n.isFullscreen(),e=o.modulaFancybox.getInstance();e&&(e.current&&"image"===e.current.type&&e.isAnimating&&(e.isAnimating=!1,e.update(!0,!0,0),e.isComplete||e.complete()),e.trigger("onFullscreenChange",t),e.$refs.container.toggleClass("modula-fancybox-is-fullscreen",t),e.$refs.toolbar.find("[data-fancybox-fullscreen]").toggleClass("modula-fancybox-button--fsenter",!t).toggleClass("modula-fancybox-button--fsexit",t))})),o(i).on({"onInit.fb":function(t,e){a?e&&e.group[e.currIndex].opts.fullScreen?(e.$refs.container.on("click.fb-fullscreen","[data-fancybox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),n.toggle()}),e.opts.fullScreen&&!0===e.opts.fullScreen.autoStart&&n.request(),e.FullScreen=n):e&&e.$refs.toolbar.find("[data-fancybox-fullscreen]").hide():e.$refs.toolbar.find("[data-fancybox-fullscreen]").remove()},"afterKeydown.fb":function(t,e,o,n,a){e&&e.FullScreen&&70===a&&(n.preventDefault(),e.FullScreen.toggle())},"beforeClose.fb":function(t,e){e&&e.FullScreen&&e.$refs.container.hasClass("modula-fancybox-is-fullscreen")&&n.exit()}})}(document,jQuery),function(t,i){"use strict";var s="modula-fancybox-thumbs",r=s+"-active";function n(t){this.init(t)}i.modulaFancybox.defaults=i.extend(!0,{btnTpl:{thumbs:'<button data-fancybox-thumbs class="modula-fancybox-button modula-fancybox-button--thumbs" title="{{THUMBS}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.59 14.59h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76H5.65V5.65z"/></svg></button>'},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".modula-fancybox-container",axis:"y"}},i.modulaFancybox.defaults),i.extend(n.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e=this,o=t.group,n=0;e.instance=t,e.opts=o[t.currIndex].opts.thumbs,(t.Thumbs=e).$button=t.$refs.toolbar.find("[data-fancybox-thumbs]");for(var a=0,i=o.length;a<i&&(o[a].thumb&&n++,!(1<n));a++);1<n&&e.opts?(e.$button.removeAttr("style").on("click",function(){e.toggle()}),e.isActive=!0):e.$button.hide()},create:function(){var o,t=this,e=t.instance,n=t.opts.parentEl,a=[];t.$grid||(t.$grid=i('<div class="'+s+" "+s+"-"+t.opts.axis+'"></div>').appendTo(e.$refs.container.find(n).addBack().filter(n)),t.$grid.on("click","a",function(){e.jumpTo(i(this).attr("data-index"))})),t.$list||(t.$list=i('<div class="'+s+'__list">').appendTo(t.$grid)),i.each(e.group,function(t,e){(o=e.thumb)||"image"!==e.type||(o=e.src),a.push('<a href="javascript:;" tabindex="0" data-index="'+t+'"'+(o&&o.length?' style="background-image:url('+o+')"':'class="modula-fancybox-thumbs-missing"')+"></a>")}),t.$list[0].innerHTML=a.join(""),"x"===t.opts.axis&&t.$list.width(parseInt(t.$grid.css("padding-right"),10)+e.group.length*t.$list.children().eq(0).outerWidth(!0))},focus:function(t){var e,o,n=this,a=n.$list,i=n.$grid;n.instance.current&&(o=(e=a.children().removeClass(r).filter('[data-index="'+n.instance.current.index+'"]').addClass(r)).position(),"y"===n.opts.axis&&(o.top<0||o.top>a.height()-e.outerHeight())?a.stop().animate({scrollTop:a.scrollTop()+o.top},t):"x"===n.opts.axis&&(o.left<i.scrollLeft()||o.left>i.scrollLeft()+(i.width()-e.outerWidth()))&&a.parent().stop().animate({scrollLeft:o.left},t))},update:function(){var t=this;t.instance.$refs.container.toggleClass("modula-fancybox-show-thumbs",this.isVisible),t.isVisible?(t.$grid||t.create(),t.instance.trigger("onThumbsShow"),t.focus(0)):t.$grid&&t.instance.trigger("onThumbsHide"),t.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),i(t).on({"onInit.fb":function(t,e){var o;e&&!e.Thumbs&&(o=new n(e)).isActive&&!0===o.opts.autoStart&&o.show()},"beforeShow.fb":function(t,e,o,n){e=e&&e.Thumbs;e&&e.isVisible&&e.focus(n?0:250)},"afterKeydown.fb":function(t,e,o,n,a){e=e&&e.Thumbs;e&&e.isActive&&71===a&&(n.preventDefault(),e.toggle())},"beforeClose.fb":function(t,e){e=e&&e.Thumbs;e&&e.isVisible&&!1!==e.opts.hideOnClose&&e.$grid.hide()}})}(document,jQuery),function(t,o){"use strict";o.extend(!0,o.modulaFancybox.defaults,{btnTpl:{share:'<button data-fancybox-share class="modula-fancybox-button modula-fancybox-button--share" title="{{SHARE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.55 19c1.4-8.4 9.1-9.8 11.9-9.8V5l7 7-7 6.3v-3.5c-2.8 0-10.5 2.1-11.9 4.2z"/></svg></button>'},share:{url:function(t,e){return!t.currentHash&&"inline"!==e.type&&"html"!==e.type&&(e.origSrc||e.src)||window.location}}}),o(t).on("click","[data-fancybox-share]",function(){var a,e,i=o.modulaFancybox.getInstance(),s=i.current||null,r="<div class='modula-fancybox-share'><h1>{{SHARE}}</h1><p>";s&&("function"===o.type(s.opts.share.url)&&(a=s.opts.share.url.apply(s,[i,s])),o.each(s.opts.modulaShare,function(t,e){var o=(s.opts.lightboxEmailMessage.length?s.opts.lightboxEmailMessage:"Here is the link to the image : %%image_link%% and this is the link to the gallery : %%gallery_link%%").replace(/\%%gallery_link%%/g,window.location.href).replace(/\%%image_link%%/g,s.src),n=jQuery(s.$image).attr("title").length?jQuery(s.$image).attr("title"):"";""==n&&(n=i.$caption.text()),r+=s.opts.shareBtnTpl[e].replace(/\{\{media\}\}/g,"image"===s.type?encodeURIComponent(s.src):"").replace(/\{\{modulaShareUrl\}\}/g,encodeURIComponent(a)).replace(/\{\{descr\}\}/g,encodeURIComponent(n)).replace(/\{\{subject\}\}/g,encodeURIComponent(s.opts.lightboxEmailSubject)).replace(/\{\{emailMessage\}\}/g,encodeURIComponent(o))}),r=(r+="</p><p><input class='modula-fancybox-share__input' type='text' value='{{url_raw}}' /></p></div>").replace(/\{\{url_raw\}\}/g,(e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"},String(a).replace(/[&<>"'`=\/]/g,function(t){return e[t]}))),o.modulaFancybox.open({src:i.translate(i,r),type:"html",opts:{touch:!1,animationEffect:!1,afterLoad:function(t,e){i.$refs.container.one("beforeClose.fb",function(){t.close(null,0)}),e.$content.find(".modula-fancybox-share__button").click(function(){return window.open(this.href,"Share","width=550, height=450"),!1})},mobile:{autoFocus:!1}}}))})}(document,jQuery),function(i,s,n){"use strict";function a(){var t=i.location.hash.substr(1),e=t.split("-"),o=1<e.length&&/^\+?\d+$/.test(e[e.length-1])&&parseInt(e.pop(-1),10)||1;return{hash:t,index:o<1?1:o,gallery:e.join("-")}}function e(t){""!==t.gallery&&n("[data-fancybox='"+n.escapeSelector(t.gallery)+"']").eq(t.index-1).focus().trigger("click.fb-start")}function r(t){return!!t&&(""!==(t=(t=(t.current||t).opts).hash||(t.$orig?t.$orig.data("fancybox")||t.$orig.data("fancybox-trigger"):""))&&t)}n.escapeSelector||(n.escapeSelector=function(t){return(t+"").replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t})}),n(function(){!1!==n.modulaFancybox.defaults.hash&&(n(s).on({"onInit.fb":function(t,e){!1!==e.group[e.currIndex].opts.hash&&(a(),r(e))},"beforeShow.fb":function(t,e,o,n){var a;o&&!1!==o.opts.hash&&(a=r(e))&&(e.currentHash=a+(1<e.group.length?"-"+o.opts.image_id:""),i.location.hash!=="#"+e.currentHash&&(n&&!e.origHash&&(e.origHash=i.location.hash),e.hashTimer&&clearTimeout(e.hashTimer),e.hashTimer=setTimeout(function(){"replaceState"in i.history?(i.history[n?"pushState":"replaceState"]({},s.title,i.location.pathname+i.location.search+"#"+e.currentHash),n&&(e.hasCreatedHistory=!0)):i.location.hash=e.currentHash,e.hashTimer=null},300)))},"beforeClose.fb":function(t,e,o){o&&!1!==o.opts.hash&&(clearTimeout(e.hashTimer),e.currentHash&&e.hasCreatedHistory?i.history.back():e.currentHash&&("replaceState"in i.history?i.history.replaceState({},s.title,i.location.pathname+i.location.search+(e.origHash||"")):i.location.hash=e.origHash),e.currentHash=null)}}),n(i).on("hashchange.fb",function(){var t=a(),o=null;n.each(n(".modula-fancybox-container").get().reverse(),function(t,e){e=n(e).data("modulaFancyBox");if(e&&e.currentHash)return o=e,!1}),o?o.currentHash===t.gallery+"-"+t.index||1===t.index&&o.currentHash==t.gallery||(o.currentHash=null,o.close()):""!==t.gallery&&e(t)}),setTimeout(function(){n.modulaFancybox.getInstance()||e(a())},50))})}(window,document,jQuery),function(t,e){"use strict";var a=(new Date).getTime();e(t).on({"onInit.fb":function(t,n,e){n.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){var e=n.current,o=(new Date).getTime();n.group.length<2||!1===e.opts.wheel||"auto"===e.opts.wheel&&"image"!==e.type||(t.preventDefault(),t.stopPropagation(),e.$slide.hasClass("modula-fancybox-animated")||(t=t.originalEvent||t,o-a<250||(a=o,n[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?"next":"previous"]())))})}})}(document,jQuery);
1
+ !function(l,s,f,m){"use strict";var a,i,r,d,e,c,p,u,n,t,o,h,g;function b(t,e){var o,n,a,i=[],s=0;t&&t.isDefaultPrevented()||(t.preventDefault(),e=e||{},t&&t.data&&(e=u(t.data.options,e)),o=e.$target||f(t.currentTarget).trigger("blur"),(a=f.modulaFancybox.getInstance())&&a.$trigger&&a.$trigger.is(o)||(i=e.selector?f(e.selector):(n=o.attr("data-fancybox")||"")?(i=t.data?t.data.items:[]).length?i.filter('[data-fancybox="'+n+'"]'):f('[data-fancybox="'+n+'"]'):[o],(s=f(i).index(o))<0&&(s=0),(a=f.modulaFancybox.open(i,e,s)).$trigger=o))}l.console=l.console||{info:function(t){}},f&&(f.fn.modulaFancybox?console.info("fancyBox already initialized"):(t={closeExisting:!1,loop:!1,gutter:50,keyboard:!0,preventCaptionOverlap:!0,arrows:!0,infobar:!0,smallBtn:"auto",toolbar:"auto",buttons:["zoom","slideShow","thumbs","close"],idleTime:3,protect:!1,modal:!1,image:{preload:!1},ajax:{settings:{data:{fancybox:!0}}},iframe:{tpl:'<iframe id="modula-fancybox-frame{rnd}" name="modula-fancybox-frame{rnd}" class="modula-fancybox-iframe" allowfullscreen="allowfullscreen" allow="autoplay; fullscreen" src=""></iframe>',preload:!0,css:{},attr:{scrolling:"auto"}},video:{tpl:'<video class="modula-fancybox-video" controls controlsList="nodownload" poster="{{poster}}"><source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos, <a href="{{src}}">download</a> and watch with your favorite video player!</video>',format:"",autoStart:!0},defaultType:"image",animationEffect:"zoom",animationDuration:366,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",baseTpl:'<div class="modula-fancybox-container" role="dialog" tabindex="-1"><div class="modula-fancybox-bg"></div><div class="modula-fancybox-inner"><div class="modula-fancybox-infobar"><span data-fancybox-index></span>&nbsp;/&nbsp;<span data-fancybox-count></span></div><div class="modula-fancybox-toolbar">{{buttons}}</div><div class="modula-fancybox-navigation">{{arrows}}</div><div class="modula-fancybox-stage"></div><div class="modula-fancybox-caption"><div class="modula-fancybox-caption__body"></div></div></div></div>',spinnerTpl:'<div class="modula-fancybox-loading"></div>',errorTpl:'<div class="modula-fancybox-error"><p>{{ERROR}}</p></div>',btnTpl:{download:'<a download data-fancybox-download class="modula-fancybox-button modula-fancybox-button--download" title="{{DOWNLOAD}}" href="javascript:;"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.62 17.09V19H5.38v-1.91zm-2.97-6.96L17 11.45l-5 4.87-5-4.87 1.36-1.32 2.68 2.64V5h1.92v7.77z"/></svg></a>',zoom:'<button data-fancybox-zoom class="modula-fancybox-button modula-fancybox-button--zoom" title="{{ZOOM}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.7 17.3l-3-3a5.9 5.9 0 0 0-.6-7.6 5.9 5.9 0 0 0-8.4 0 5.9 5.9 0 0 0 0 8.4 5.9 5.9 0 0 0 7.7.7l3 3a1 1 0 0 0 1.3 0c.4-.5.4-1 0-1.5zM8.1 13.8a4 4 0 0 1 0-5.7 4 4 0 0 1 5.7 0 4 4 0 0 1 0 5.7 4 4 0 0 1-5.7 0z"/></svg></button>',close:'<button data-fancybox-close class="modula-fancybox-button modula-fancybox-button--close" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 10.6L6.6 5.2 5.2 6.6l5.4 5.4-5.4 5.4 1.4 1.4 5.4-5.4 5.4 5.4 1.4-1.4-5.4-5.4 5.4-5.4-1.4-1.4-5.4 5.4z"/></svg></button>',arrowLeft:'<button data-fancybox-prev class="modula-fancybox-button modula-fancybox-button--arrow_left" title="{{PREV}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.28 15.7l-1.34 1.37L5 12l4.94-5.07 1.34 1.38-2.68 2.72H19v1.94H8.6z"/></svg></div></button>',arrowRight:'<button data-fancybox-next class="modula-fancybox-button modula-fancybox-button--arrow_right" title="{{NEXT}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.4 12.97l-2.68 2.72 1.34 1.38L19 12l-4.94-5.07-1.34 1.38 2.68 2.72H5v1.94z"/></svg></div></button>',smallBtn:'<button type="button" data-fancybox-close class="modula-fancybox-button modula-fancybox-close-small" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" version="1" viewBox="0 0 24 24"><path d="M13 12l5-5-1-1-5 5-5-5-1 1 5 5-5 5 1 1 5-5 5 5 1-1z"/></svg></button>'},modulaShare:["facebook","twitter","pinterest","whatsapp","linkedin","email"],shareBtnTpl:{facebook:'<a class="modula-fancybox-share__button modula-fancybox-share__button--fb" href="https://www.facebook.com/sharer/sharer.php?u={{modulaShareUrl}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196" /></svg><span>Facebook</span></a>',twitter:'<a class="modula-fancybox-share__button modula-fancybox-share__button--tw" href="https://twitter.com/intent/tweet?url={{modulaShareUrl}}&text={{descr}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z" /></svg><span>Twitter</span></a>',pinterest:'<a class="modula-fancybox-share__button modula-fancybox-share__button--pt" href="https://www.pinterest.com/pin/create/button/?url={{modulaShareUrl}}&description={{descr}}&media={{media}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z" fill="#fff"/></svg><span>Pinterest</span></a>',whatsapp:'<a class="modula-fancybox-share__button modula-fancybox-share__button--wa" href="https://api.whatsapp.com/send?text={{modulaShareUrl}}&review_url=true"><svg aria-hidden="true" focusable="false" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);" preserveAspectRatio="xMidYMid meet" viewBox="0 0 1536 1600"><path d="M985 878q13 0 97.5 44t89.5 53q2 5 2 15q0 33-17 76q-16 39-71 65.5T984 1158q-57 0-190-62q-98-45-170-118T476 793q-72-107-71-194v-8q3-91 74-158q24-22 52-22q6 0 18 1.5t19 1.5q19 0 26.5 6.5T610 448q8 20 33 88t25 75q0 21-34.5 57.5T599 715q0 7 5 15q34 73 102 137q56 53 151 101q12 7 22 7q15 0 54-48.5t52-48.5zm-203 530q127 0 243.5-50t200.5-134t134-200.5t50-243.5t-50-243.5T1226 336t-200.5-134T782 152t-243.5 50T338 336T204 536.5T154 780q0 203 120 368l-79 233l242-77q158 104 345 104zm0-1382q153 0 292.5 60T1315 247t161 240.5t60 292.5t-60 292.5t-161 240.5t-240.5 161t-292.5 60q-195 0-365-94L0 1574l136-405Q28 991 28 780q0-153 60-292.5T249 247T489.5 86T782 26z" fill="currentColor"/></svg><span>WhatsApp</span></a>',linkedin:'<a class="modula-fancybox-share__button modula-fancybox-share__button--li" href="//linkedin.com/shareArticle?mini=true&url={{modulaShareUrl}}"><svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="linkedin-in" class="svg-inline--fa fa-linkedin-in fa-w-14" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z"></path></svg><span>LinkedIn</span></a>',email:'<a class="modula-fancybox-share__button modula-fancybox-share__button--email" href="mailto:?subject={{subject}}&body={{emailMessage}}"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 3v18h24v-18h-24zm6.623 7.929l-4.623 5.712v-9.458l4.623 3.746zm-4.141-5.929h19.035l-9.517 7.713-9.518-7.713zm5.694 7.188l3.824 3.099 3.83-3.104 5.612 6.817h-18.779l5.513-6.812zm9.208-1.264l4.616-3.741v9.348l-4.616-5.607z" fill="currentColor"></path></svg><span>Email</span></a>'},parentEl:"body",hideScrollbar:!0,autoFocus:!0,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:3e3},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".modula-fancybox-container",axis:"y"},wheel:"auto",onInit:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeClose:f.noop,afterClose:f.noop,onActivate:f.noop,onDeactivate:f.noop,clickContent:function(t,e){return"image"===t.type&&"zoom"},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{preventCaptionOverlap:!1,idleTime:!1,clickContent:function(t,e){return"image"===t.type&&"toggleControls"},clickSlide:function(t,e){return"image"===t.type?"toggleControls":"close"},dblclickContent:function(t,e){return"image"===t.type&&"zoom"},dblclickSlide:function(t,e){return"image"===t.type&&"zoom"}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded. <br/> Please try again later.",PLAY_START:"Start slideshow",PLAY_STOP:"Pause slideshow",FULL_SCREEN:"Full screen",THUMBS:"Thumbnails",DOWNLOAD:"Download",SHARE:"Share",ZOOM:"Zoom"},de:{CLOSE:"Schlie&szlig;en",NEXT:"Weiter",PREV:"Zur&uuml;ck",ERROR:"Die angeforderten Daten konnten nicht geladen werden. <br/> Bitte versuchen Sie es sp&auml;ter nochmal.",PLAY_START:"Diaschau starten",PLAY_STOP:"Diaschau beenden",FULL_SCREEN:"Vollbild",THUMBS:"Vorschaubilder",DOWNLOAD:"Herunterladen",SHARE:"Teilen",ZOOM:"Vergr&ouml;&szlig;ern"}}},a=f(l),i=f(s),r=0,d=l.requestAnimationFrame||l.webkitRequestAnimationFrame||l.mozRequestAnimationFrame||l.oRequestAnimationFrame||function(t){return l.setTimeout(t,1e3/60)},e=l.cancelAnimationFrame||l.webkitCancelAnimationFrame||l.mozCancelAnimationFrame||l.oCancelAnimationFrame||function(t){l.clearTimeout(t)},c=function(){var t,e=s.createElement("fakeelement"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in o)if(e.style[t]!==m)return o[t];return"transitionend"}(),p=function(t){return t&&t.length&&t[0].offsetHeight},u=function(t,e){var o=f.extend(!0,{},t,e);return f.each(e,function(t,e){f.isArray(e)&&(o[t]=e)}),o},n=function(t,e,o){var n=this;n.opts=u({index:o},f.modulaFancybox.defaults),f.isPlainObject(e)&&(n.opts=u(n.opts,e)),f.modulaFancybox.isMobile&&(n.opts=u(n.opts,n.opts.mobile)),n.id=n.opts.id||++r,n.currIndex=parseInt(n.opts.index,10)||0,n.prevIndex=null,n.prevPos=null,n.currPos=0,n.firstRun=!0,n.group=[],n.slides={},n.addContent(t),n.group.length&&n.init()},f.extend(n.prototype,{init:function(){var o=this;o.currIndex<0&&(o.currIndex=0),void 0===o.group[o.currIndex]&&jQuery.each(this.group,function(t,e){o.currIndex==parseInt(e.opts.image_id)&&(o.currIndex=t)});var e,n,a=o.group[o.currIndex].opts;a.closeExisting&&f.modulaFancybox.close(!0),f("body").addClass("modula-fancybox-active"),!f.modulaFancybox.getInstance()&&!1!==a.hideScrollbar&&!f.modulaFancybox.isMobile&&s.body.scrollHeight>l.innerHeight&&(f("head").append('<style id="modula-fancybox-style-noscroll" type="text/css">.compensate-for-scrollbar{margin-right:'+(l.innerWidth-s.documentElement.clientWidth)+"px;}</style>"),f("body").addClass("compensate-for-scrollbar")),n="",f.each(a.buttons,function(t,e){n+=a.btnTpl[e]||""}),e=f(o.translate(o,a.baseTpl.replace("{{buttons}}",n).replace("{{arrows}}",a.btnTpl.arrowLeft+a.btnTpl.arrowRight))).attr("id","modula-fancybox-container-"+o.id).addClass(a.baseClass).data("modulaFancyBox",o).appendTo(a.parentEl),o.$refs={container:e},["bg","inner","infobar","toolbar","stage","caption","navigation"].forEach(function(t){o.$refs[t]=e.find(".modula-fancybox-"+t)}),o.trigger("onInit"),o.activate(),o.jumpTo(o.currIndex)},translate:function(t,e){var o=t.opts.i18n[t.opts.lang]||t.opts.i18n.en;return e.replace(/\{\{(\w+)\}\}/g,function(t,e){return o[e]===m?t:o[e]})},addContent:function(t){var r=this,t=f.makeArray(t);f.each(t,function(t,e){var o,n,a,i={},s={};f.isPlainObject(e)?s=(i=e).opts||e:"object"===f.type(e)&&f(e).length?(s=(n=f(e)).data()||{},(s=f.extend(!0,{},s,s.options)).$orig=n,i.src=r.opts.src||s.src||n.attr("href"),i.type||i.src||(i.type="inline",i.src=e)):i={type:"html",src:e+""},i.opts=f.extend(!0,{},r.opts,s),f.isArray(s.buttons)&&(i.opts.buttons=s.buttons),f.modulaFancybox.isMobile&&i.opts.mobile&&(i.opts=u(i.opts,i.opts.mobile)),o=i.type||i.opts.type,n=i.src||"",!o&&n&&((s=n.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(o="video",i.opts.video.format||(i.opts.video.format="video/"+("ogv"===s[1]?"ogg":s[1]))):n.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?o="image":n.match(/\.(pdf)((\?|#).*)?$/i)?(o="iframe",i=f.extend(!0,i,{contentType:"pdf",opts:{iframe:{preload:!1}}})):"#"===n.charAt(0)&&(o="inline")),o?i.type=o:r.trigger("objectNeedsType",i),i.contentType||(i.contentType=-1<f.inArray(i.type,["html","inline","ajax"])?"html":i.type),i.index=r.group.length,"auto"==i.opts.smallBtn&&(i.opts.smallBtn=-1<f.inArray(i.type,["html","inline","ajax"])),"auto"===i.opts.toolbar&&(i.opts.toolbar=!i.opts.smallBtn),i.$thumb=i.opts.$thumb||null,i.opts.$trigger&&i.index===r.opts.index&&(i.$thumb=i.opts.$trigger.find("img:first"),i.$thumb.length&&(i.opts.$orig=i.opts.$trigger)),i.$thumb&&i.$thumb.length||!i.opts.$orig||(i.$thumb=i.opts.$orig.find("img:first")),i.$thumb&&!i.$thumb.length&&(i.$thumb=null),i.thumb=i.opts.thumb||(i.$thumb?i.$thumb[0].src:null),"function"===f.type(i.opts.caption)&&(i.opts.caption=i.opts.caption.apply(e,[r,i])),"function"===f.type(r.opts.caption)&&(i.opts.caption=r.opts.caption.apply(e,[r,i])),i.opts.caption instanceof f||(i.opts.caption=i.opts.caption===m?"":i.opts.caption+""),"ajax"===i.type&&1<(a=n.split(/\s+/,2)).length&&(i.src=a.shift(),i.opts.filter=a.shift()),i.opts.modal&&(i.opts=f.extend(!0,i.opts,{trapFocus:!0,infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),r.group.push(i)}),Object.keys(r.slides).length&&(r.updateControls(),(t=r.Thumbs)&&t.isActive&&(t.create(),t.focus()))},addEvents:function(){var n=this;n.removeEvents(),n.$refs.container.on("click.fb-close","[data-fancybox-close]",function(t){t.stopPropagation(),t.preventDefault(),n.close(t)}).on("touchstart.fb-prev click.fb-prev","[data-fancybox-prev]",function(t){t.stopPropagation(),t.preventDefault(),n.previous()}).on("touchstart.fb-next click.fb-next","[data-fancybox-next]",function(t){t.stopPropagation(),t.preventDefault(),n.next()}).on("click.fb","[data-fancybox-zoom]",function(t){n[n.isScaledDown()?"scaleToActual":"scaleToFit"]()}),a.on("orientationchange.fb resize.fb",function(t){t&&t.originalEvent&&"resize"===t.originalEvent.type?(n.requestId&&e(n.requestId),n.requestId=d(function(){n.update(t)})):(n.current&&"iframe"===n.current.type&&n.$refs.stage.hide(),setTimeout(function(){n.$refs.stage.show(),n.update(t)},f.modulaFancybox.isMobile?600:250))}),i.on("keydown.fb",function(t){var e=(f.modulaFancybox?f.modulaFancybox.getInstance():null).current,o=t.keyCode||t.which;if(9!=o){if(!(!e.opts.keyboard||t.ctrlKey||t.altKey||t.shiftKey||f(t.target).is("input,textarea,video,audio,select")))return 8===o||27===o?(t.preventDefault(),void n.close(t)):37===o||38===o?(t.preventDefault(),void n.previous()):39===o||40===o?(t.preventDefault(),void n.next()):void n.trigger("afterKeydown",t,o)}else e.opts.trapFocus&&n.focus(t)}),n.group[n.currIndex].opts.idleTime&&(n.idleSecondsCounter=0,i.on("mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle",function(t){n.idleSecondsCounter=0,n.isIdle&&n.showControls(),n.isIdle=!1}),n.idleInterval=l.setInterval(function(){n.idleSecondsCounter++,n.idleSecondsCounter>=n.group[n.currIndex].opts.idleTime&&!n.isDragging&&(n.isIdle=!0,n.idleSecondsCounter=0,n.hideControls())},1e3))},removeEvents:function(){a.off("orientationchange.fb resize.fb"),i.off("keydown.fb .fb-idle"),this.$refs.container.off(".fb-close .fb-prev .fb-next"),this.idleInterval&&(l.clearInterval(this.idleInterval),this.idleInterval=null)},previous:function(t){return this.jumpTo(this.currPos-1,t)},next:function(t){return this.jumpTo(this.currPos+1,t)},jumpTo:function(t,n){var e,o,a,i,s,r,l,c,d=this,u=d.group.length;if(!(d.isDragging||d.isClosing||d.isAnimating&&d.firstRun))return t=parseInt(t,10),!(!(o=(d.current||d).opts.loop)&&(t<0||u<=t))&&(e=d.firstRun=!Object.keys(d.slides).length,i=d.current,d.prevIndex=d.currIndex,d.prevPos=d.currPos,a=d.createSlide(t),1<u&&((o||a.index<u-1)&&d.createSlide(t+1),(o||0<a.index)&&d.createSlide(t-1)),d.current=a,d.currIndex=a.index,d.currPos=a.pos,d.trigger("beforeShow",e),d.updateControls(),a.forcedDuration=m,f.isNumeric(n)?a.forcedDuration=n:n=a.opts[e?"animationDuration":"transitionDuration"],n=parseInt(n,10),t=d.isMoved(a),a.$slide.addClass("modula-fancybox-slide--current"),e?(a.opts.animationEffect&&n&&d.$refs.container.css("transition-duration",n+"ms"),d.$refs.container.addClass("modula-fancybox-is-open").trigger("focus"),d.loadSlide(a)):(s=f.modulaFancybox.getTranslate(i.$slide),r=f.modulaFancybox.getTranslate(d.$refs.stage),f.each(d.slides,function(t,e){f.modulaFancybox.stop(e.$slide,!0)}),i.pos!==a.pos&&(i.isComplete=!1),i.$slide.removeClass("modula-fancybox-slide--complete modula-fancybox-slide--current"),t?(c=s.left-(i.pos*s.width+i.pos*i.opts.gutter),f.each(d.slides,function(t,e){e.$slide.removeClass("modula-fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)modula-fancybox-fx-\S+/g)||[]).join(" ")});var o=e.pos*s.width+e.pos*e.opts.gutter;f.modulaFancybox.setTranslate(e.$slide,{top:0,left:o-r.left+c}),e.pos!==a.pos&&e.$slide.addClass("modula-fancybox-slide--"+(e.pos>a.pos?"next":"previous")),p(e.$slide),f.modulaFancybox.animate(e.$slide,{top:0,left:(e.pos-a.pos)*s.width+(e.pos-a.pos)*e.opts.gutter},n,function(){e.$slide.css({transform:"",opacity:""}).removeClass("modula-fancybox-slide--next modula-fancybox-slide--previous"),e.pos===d.currPos&&d.complete()})})):n&&a.opts.transitionEffect&&(l="modula-fancybox-animated modula-fancybox-fx-"+a.opts.transitionEffect,i.$slide.addClass("modula-fancybox-slide--"+(i.pos>a.pos?"next":"previous")),f.modulaFancybox.animate(i.$slide,l,n,function(){i.$slide.removeClass(l).removeClass("modula-fancybox-slide--next modula-fancybox-slide--previous")},!1)),a.isLoaded?d.revealContent(a):d.loadSlide(a)),void d.preload("image"))},createSlide:function(t){var e,o=this,n=t%o.group.length;return n=n<0?o.group.length+n:n,!o.slides[t]&&o.group[n]&&(e=f('<div class="modula-fancybox-slide"></div>').appendTo(o.$refs.stage),o.slides[t]=f.extend(!0,{},o.group[n],{pos:t,$slide:e,isLoaded:!1}),o.updateSlide(o.slides[t])),o.slides[t]},scaleToActual:function(t,e,o){var n,a,i,s,r=this,l=r.current,c=l.$content,d=f.modulaFancybox.getTranslate(l.$slide).width,u=f.modulaFancybox.getTranslate(l.$slide).height,p=l.width,h=l.height;r.isAnimating||r.isMoved()||!c||"image"!=l.type||!l.isLoaded||l.hasError||(r.isAnimating=!0,f.modulaFancybox.stop(c),t=t===m?.5*d:t,e=e===m?.5*u:e,(n=f.modulaFancybox.getTranslate(c)).top-=f.modulaFancybox.getTranslate(l.$slide).top,n.left-=f.modulaFancybox.getTranslate(l.$slide).left,i=p/n.width,s=h/n.height,a=.5*d-.5*p,l=.5*u-.5*h,d<p&&(0<(a=n.left*i-(t*i-t))&&(a=0),a<d-p&&(a=d-p)),u<h&&(0<(l=n.top*s-(e*s-e))&&(l=0),l<u-h&&(l=u-h)),r.updateCursor(p,h),f.modulaFancybox.animate(c,{top:l,left:a,scaleX:i,scaleY:s},o||366,function(){r.isAnimating=!1}),r.SlideShow&&r.SlideShow.isActive&&r.SlideShow.stop())},scaleToFit:function(t){var e=this,o=e.current,n=o.$content;e.isAnimating||e.isMoved()||!n||"image"!=o.type||!o.isLoaded||o.hasError||(e.isAnimating=!0,f.modulaFancybox.stop(n),o=e.getFitPos(o),e.updateCursor(o.width,o.height),f.modulaFancybox.animate(n,{top:o.top,left:o.left,scaleX:o.width/n.width(),scaleY:o.height/n.height()},t||366,function(){e.isAnimating=!1}))},getFitPos:function(t){var e,o,n=t.$content,a=t.$slide,i=t.width||t.opts.width,s=t.height||t.opts.height,r={};return!!(t.isLoaded&&n&&n.length)&&(e=f.modulaFancybox.getTranslate(this.$refs.stage).width,o=f.modulaFancybox.getTranslate(this.$refs.stage).height,e-=parseFloat(a.css("paddingLeft"))+parseFloat(a.css("paddingRight"))+parseFloat(n.css("marginLeft"))+parseFloat(n.css("marginRight")),o-=parseFloat(a.css("paddingTop"))+parseFloat(a.css("paddingBottom"))+parseFloat(n.css("marginTop"))+parseFloat(n.css("marginBottom")),i&&s||(i=e,s=o),e-.5<(i*=n=Math.min(1,e/i,o/s))&&(i=e),o-.5<(s*=n)&&(s=o),"image"===t.type?(r.top=Math.floor(.5*(o-s))+parseFloat(a.css("paddingTop")),r.left=Math.floor(.5*(e-i))+parseFloat(a.css("paddingLeft"))):"video"===t.contentType&&(i/(t=t.opts.width&&t.opts.height?i/s:t.opts.ratio||16/9)<s?s=i/t:s*t<i&&(i=s*t)),r.width=i,r.height=s,r)},update:function(o){var n=this;f.each(n.slides,function(t,e){n.updateSlide(e,o)})},updateSlide:function(t,e){var o=this,n=t&&t.$content,a=t.width||t.opts.width,i=t.height||t.opts.height,s=t.$slide;o.adjustCaption(t),n&&(a||i||"video"===t.contentType)&&!t.hasError&&(f.modulaFancybox.stop(n),f.modulaFancybox.setTranslate(n,o.getFitPos(t)),t.pos===o.currPos&&(o.isAnimating=!1,o.updateCursor())),o.adjustLayout(t),s.length&&(s.trigger("refresh"),t.pos===o.currPos&&o.$refs.toolbar.add(o.$refs.navigation.find(".modula-fancybox-button--arrow_right")).toggleClass("compensate-for-scrollbar",s.get(0).scrollHeight>s.get(0).clientHeight)),o.trigger("onUpdate",t,e)},centerSlide:function(t){var e=this,o=e.current,n=o.$slide;!e.isClosing&&o&&(n.siblings().css({transform:"",opacity:""}),n.parent().children().removeClass("modula-fancybox-slide--previous modula-fancybox-slide--next"),f.modulaFancybox.animate(n,{top:0,left:0,opacity:1},t===m?0:t,function(){n.css({transform:"",opacity:""}),o.isComplete||e.complete()},!1))},isMoved:function(t){var e,o=t||this.current;return!!o&&(e=f.modulaFancybox.getTranslate(this.$refs.stage),t=f.modulaFancybox.getTranslate(o.$slide),!o.$slide.hasClass("modula-fancybox-animated")&&(.5<Math.abs(t.top-e.top)||.5<Math.abs(t.left-e.left)))},updateCursor:function(t,e){var o=this,n=o.current,a=o.$refs.container;n&&!o.isClosing&&o.Guestures&&(a.removeClass("modula-fancybox-is-zoomable modula-fancybox-can-zoomIn modula-fancybox-can-zoomOut modula-fancybox-can-swipe modula-fancybox-can-pan"),e=!!(t=o.canPan(t,e))||o.isZoomable(),a.toggleClass("modula-fancybox-is-zoomable",e),f("[data-fancybox-zoom]").prop("disabled",!e),t?a.addClass("modula-fancybox-can-pan"):e&&("zoom"===n.opts.clickContent||f.isFunction(n.opts.clickContent)&&"zoom"==n.opts.clickContent(n))?a.addClass("modula-fancybox-can-zoomIn"):n.opts.touch&&(n.opts.touch.vertical||1<o.group.length)&&"video"!==n.contentType&&a.addClass("modula-fancybox-can-swipe"))},isZoomable:function(){var t,e=this.current;if(e&&!this.isClosing&&"image"===e.type&&!e.hasError){if(!e.isLoaded)return!0;if((t=this.getFitPos(e))&&(e.width>t.width||e.height>t.height))return!0}return!1},isScaledDown:function(t,e){var o=!1,n=this.current,a=n.$content;return t!==m&&e!==m?o=t<n.width&&e<n.height:a&&(o=(o=f.modulaFancybox.getTranslate(a)).width<n.width&&o.height<n.height),o},canPan:function(t,e){var o=this.current,n=null,a=!1;return"image"===o.type&&(o.isComplete||t&&e)&&!o.hasError&&(a=this.getFitPos(o),t!==m&&e!==m?n={width:t,height:e}:o.isComplete&&(n=f.modulaFancybox.getTranslate(o.$content)),n&&a&&(a=1.5<Math.abs(n.width-a.width)||1.5<Math.abs(n.height-a.height))),a},loadSlide:function(o){var t,e,n,a=this;if(!o.isLoading&&!o.isLoaded){if(!(o.isLoading=!0)===a.trigger("beforeLoad",o))return o.isLoading=!1;switch(t=o.type,(e=o.$slide).off("refresh").trigger("onReset").addClass(o.opts.slideClass),t){case"image":a.setImage(o);break;case"iframe":a.setIframe(o);break;case"html":a.setContent(o,o.src||o.content);break;case"video":a.setContent(o,o.opts.video.tpl.replace(/\{\{src\}\}/gi,o.src).replace("{{format}}",o.opts.videoFormat||o.opts.video.format||"").replace("{{poster}}",o.thumb||""));break;case"inline":f(o.src).length?a.setContent(o,f(o.src)):a.setError(o);break;case"ajax":a.showLoading(o),n=f.ajax(f.extend({},o.opts.ajax.settings,{url:o.src,success:function(t,e){"success"===e&&a.setContent(o,t)},error:function(t,e){t&&"abort"!==e&&a.setError(o)}})),e.one("onReset",function(){n.abort()});break;default:a.setError(o)}return!0}},setImage:function(e){var t,o=this;setTimeout(function(){var t=e.$image;o.isClosing||!e.isLoading||t&&t.length&&t[0].complete||e.hasError||o.showLoading(e)},50),o.checkSrcset(e),e.$content=f('<div class="modula-fancybox-content"></div>').addClass("modula-fancybox-is-hidden").appendTo(e.$slide.addClass("modula-fancybox-slide--image")),!1!==e.opts.preload&&e.opts.width&&e.opts.height&&e.thumb&&(e.width=e.opts.width,e.height=e.opts.height,(t=s.createElement("img")).onerror=function(){f(this).remove(),e.$ghost=null},t.onload=function(){o.afterLoad(e)},e.$ghost=f(t).addClass("modula-fancybox-image").appendTo(e.$content).attr("src",e.thumb),"undifined"!=typeof e.src&&e.$ghost.attr("alt",e.alt)),o.setBigImage(e)},checkSrcset:function(t){var e,o,n,a,i=t.opts.srcset||t.opts.image.srcset;if(i){n=l.devicePixelRatio||1,a=l.innerWidth*n,(o=i.split(",").map(function(t){var n={};return t.trim().split(/\s+/).forEach(function(t,e){var o=parseInt(t.substring(0,t.length-1),10);if(0===e)return n.url=t;o&&(n.value=o,n.postfix=t[t.length-1])}),n})).sort(function(t,e){return t.value-e.value});for(var s=0;s<o.length;s++){var r=o[s];if("w"===r.postfix&&r.value>=a||"x"===r.postfix&&r.value>=n){e=r;break}}!e&&o.length&&(e=o[o.length-1]),e&&(t.src=e.url,t.width&&t.height&&"w"==e.postfix&&(t.height=t.width/t.height*e.value,t.width=e.value),t.opts.srcset=i)}},setBigImage:function(e){var o=this,t=s.createElement("img"),n=f(t);e.$image=n.one("error",function(){o.setError(e)}).one("load",function(){var t;e.$ghost||(o.resolveImageSlideSize(e,this.naturalWidth,this.naturalHeight),o.afterLoad(e)),o.isClosing||(e.opts.srcset&&((t=e.opts.sizes)&&"auto"!==t||(t=(1<e.width/e.height&&1<a.width()/a.height()?"100":Math.round(e.width/e.height*100))+"vw"),n.attr("sizes",t).attr("srcset",e.opts.srcset)),e.opts.alt&&n.attr("alt",e.opts.alt),e.opts.image_id&&n.attr("image-id",e.opts.image_id),e.$thumb&&n.attr("title",e.$thumb.find("img.pic").attr("title")),e.$ghost&&setTimeout(function(){e.$ghost&&!o.isClosing&&e.$ghost.hide()},Math.min(300,Math.max(1e3,e.height/1600))),o.hideLoading(e))}).addClass("modula-fancybox-image").attr("src",e.src).appendTo(e.$content),(t.complete||"complete"==t.readyState)&&n.naturalWidth&&n.naturalHeight?n.trigger("load"):t.error&&n.trigger("error")},resolveImageSlideSize:function(t,e,o){var n=parseInt(t.opts.width,10),a=parseInt(t.opts.height,10);t.width=e,t.height=o,0<n&&(t.width=n,t.height=Math.floor(n*o/e)),0<a&&(t.width=Math.floor(a*e/o),t.height=a)},setIframe:function(a){var i,e=this,s=a.opts.iframe,r=a.$slide;a.$content=f('<div class="modula-fancybox-content'+(s.preload?" modula-fancybox-is-hidden":"")+'"></div>').css(s.css).appendTo(r),r.addClass("modula-fancybox-slide--"+a.contentType),a.$iframe=i=f(s.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr(s.attr).appendTo(a.$content),s.preload?(e.showLoading(a),i.on("load.fb error.fb",function(t){this.isReady=1,a.$slide.trigger("refresh"),e.afterLoad(a)}),r.on("refresh.fb",function(){var t,e=a.$content,o=s.css.width,n=s.css.height;if(1===i[0].isReady){try{t=i.contents().find("body")}catch(t){}t&&t.length&&t.children().length&&(r.css("overflow","visible"),e.css({width:"100%","max-width":"100%",height:"9999px"}),o===m&&(o=Math.ceil(Math.max(t[0].clientWidth,t.outerWidth(!0)))),e.css("width",o||"").css("max-width",""),n===m&&(n=Math.ceil(Math.max(t[0].clientHeight,t.outerHeight(!0)))),e.css("height",n||""),r.css("overflow","auto")),e.removeClass("modula-fancybox-is-hidden")}})):e.afterLoad(a),i.attr("src",a.src),r.one("onReset",function(){try{f(this).find("iframe").hide().unbind().attr("src","//about:blank")}catch(t){}f(this).off("refresh.fb").empty(),a.isLoaded=!1,a.isRevealed=!1})},setContent:function(t,e){var o;this.isClosing||(this.hideLoading(t),t.$content&&f.modulaFancybox.stop(t.$content),t.$slide.empty(),(o=e)&&o.hasOwnProperty&&o instanceof f&&e.parent().length?((e.hasClass("modula-fancybox-content")||e.parent().hasClass("modula-fancybox-content"))&&e.parents(".modula-fancybox-slide").trigger("onReset"),t.$placeholder=f("<div>").hide().insertAfter(e),e.css("display","inline-block")):t.hasError||("string"===f.type(e)&&(e=f("<div>").append(f.trim(e)).contents()),t.opts.filter&&(e=f("<div>").html(e).find(t.opts.filter))),t.$slide.one("onReset",function(){f(this).find("video,audio").trigger("pause"),t.$placeholder&&(t.$placeholder.after(e.removeClass("modula-fancybox-content").hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(f(this).empty(),t.isLoaded=!1,t.isRevealed=!1)}),f(e).appendTo(t.$slide),f(e).is("video,audio")&&(f(e).addClass("modula-fancybox-video"),f(e).wrap("<div></div>"),t.contentType="video",t.opts.width=t.opts.width||f(e).attr("width"),t.opts.height=t.opts.height||f(e).attr("height")),t.$content=t.$slide.children().filter("div,form,main,video,audio,article,.modula-fancybox-content").first(),t.$content.siblings().hide(),t.$content.length||(t.$content=t.$slide.wrapInner("<div></div>").children().first()),t.$content.addClass("modula-fancybox-content"),t.$slide.addClass("modula-fancybox-slide--"+t.contentType),this.afterLoad(t))},setError:function(t){t.hasError=!0,t.$slide.trigger("onReset").removeClass("modula-fancybox-slide--"+t.contentType).addClass("modula-fancybox-slide--error"),t.contentType="html",this.setContent(t,this.translate(t,t.opts.errorTpl)),t.pos===this.currPos&&(this.isAnimating=!1)},showLoading:function(t){(t=t||this.current)&&!t.$spinner&&(t.$spinner=f(this.translate(this,this.opts.spinnerTpl)).appendTo(t.$slide).hide().fadeIn("fast"))},hideLoading:function(t){(t=t||this.current)&&t.$spinner&&(t.$spinner.stop().remove(),delete t.$spinner)},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger("afterLoad",t),e.hideLoading(t),!t.opts.smallBtn||t.$smallBtn&&t.$smallBtn.length||(t.$smallBtn=f(e.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content)),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on("contextmenu.fb",function(t){return 2==t.button&&t.preventDefault(),!0}),"image"===t.type&&f('<div class="modula-fancybox-spaceball"></div>').appendTo(t.$content)),e.adjustCaption(t),e.adjustLayout(t),t.pos===e.currPos&&e.updateCursor(),e.revealContent(t))},adjustCaption:function(t){var e=this,o=t||e.current,n=o.opts.caption,a=o.opts.preventCaptionOverlap,i=e.$refs.caption,t=!1;i.toggleClass("modula-fancybox-caption--separate",a),a&&n&&n.length&&(o.pos!==e.currPos?((i=i.clone().appendTo(i.parent())).children().eq(0).empty().html(n),t=i.outerHeight(!0),i.empty().remove()):e.$caption&&(t=e.$caption.outerHeight(!0)),o.$slide.css("padding-bottom",t||""))},adjustLayout:function(t){var e,o,n,a=t||this.current;a.isLoaded&&!0!==a.opts.disableLayoutFix&&(a.$content.css("margin-bottom",""),a.$content.outerHeight()>a.$slide.height()+.5&&(o=a.$slide[0].style["padding-bottom"],n=a.$slide.css("padding-bottom"),0<parseFloat(n)&&(t=a.$slide[0].scrollHeight,a.$slide.css("padding-bottom",0),Math.abs(t-a.$slide[0].scrollHeight)<1&&(e=n),a.$slide.css("padding-bottom",o))),a.$content.css("margin-bottom",e))},revealContent:function(t){var e,o,n,a,i=this,s=t.$slide,r=!1,l=!1,c=i.isMoved(t),d=t.isRevealed;return t.isRevealed=!0,e=t.opts[i.firstRun?"animationEffect":"transitionEffect"],n=t.opts[i.firstRun?"animationDuration":"transitionDuration"],n=parseInt(t.forcedDuration===m?n:t.forcedDuration,10),!c&&t.pos===i.currPos&&n||(e=!1),"zoom"===e&&(t.pos===i.currPos&&n&&"image"===t.type&&!t.hasError&&(l=i.getThumbPos(t))?r=i.getFitPos(t):e="fade"),"zoom"===e?(i.isAnimating=!0,r.scaleX=r.width/l.width,r.scaleY=r.height/l.height,"auto"==(a=t.opts.zoomOpacity)&&(a=.1<Math.abs(t.width/t.height-l.width/l.height)),a&&(l.opacity=.1,r.opacity=1),f.modulaFancybox.setTranslate(t.$content.removeClass("modula-fancybox-is-hidden"),l),p(t.$content),void f.modulaFancybox.animate(t.$content,r,n,function(){i.isAnimating=!1,i.complete()})):(i.updateSlide(t),e?(f.modulaFancybox.stop(s),o="modula-fancybox-slide--"+(t.pos>=i.prevPos?"next":"previous")+" modula-fancybox-animated modula-fancybox-fx-"+e,s.addClass(o).removeClass("modula-fancybox-slide--current"),t.$content.removeClass("modula-fancybox-is-hidden"),p(s),"image"!==t.type&&t.$content.hide().show(0),void f.modulaFancybox.animate(s,"modula-fancybox-slide--current",n,function(){s.removeClass(o).css({transform:"",opacity:""}),t.pos===i.currPos&&i.complete()},!0)):(t.$content.removeClass("modula-fancybox-is-hidden"),d||!c||"image"!==t.type||t.hasError||t.$content.hide().fadeIn("fast"),void(t.pos===i.currPos&&i.complete())))},getThumbPos:function(t){var e,o,n,a,i=t.$thumb;return!!(i&&(a=(n=i).find("a.tile-inner")[0])&&a.ownerDocument===s&&(f(".modula-fancybox-container").css("pointer-events","none"),n={x:a.getBoundingClientRect().left+a.offsetWidth/2,y:a.getBoundingClientRect().top+a.offsetHeight/2},a=s.elementFromPoint(n.x,n.y)===a,f(".modula-fancybox-container").css("pointer-events",""),a))&&(o=f.modulaFancybox.getTranslate(i),t=parseFloat(i.css("border-top-width")||0),n=parseFloat(i.css("border-right-width")||0),a=parseFloat(i.css("border-bottom-width")||0),i=parseFloat(i.css("border-left-width")||0),e={top:o.top+t,left:o.left+i,width:o.width-n-i,height:o.height-t-a,scaleX:1,scaleY:1},0<o.width&&0<o.height&&e)},complete:function(){var t,o=this,e=o.current,n={};!o.isMoved()&&e.isLoaded&&(e.isComplete||(e.isComplete=!0,e.$slide.siblings().trigger("onReset"),o.preload("inline"),p(e.$slide),e.$slide.addClass("modula-fancybox-slide--complete"),f.each(o.slides,function(t,e){e.pos>=o.currPos-1&&e.pos<=o.currPos+1?n[e.pos]=e:e&&(f.modulaFancybox.stop(e.$slide),e.$slide.off().remove())}),o.slides=n),o.isAnimating=!1,o.updateCursor(),o.trigger("afterShow"),e.opts.video.autoStart&&e.$slide.find("video,audio").filter(":visible:first").trigger("play").one("ended",function(){Document.exitFullscreen?Document.exitFullscreen():this.webkitExitFullscreen&&this.webkitExitFullscreen(),o.next()}),e.opts.autoFocus&&"html"===e.contentType&&((t=e.$content.find("input[autofocus]:enabled:visible:first")).length?t.trigger("focus"):o.focus(null,!0)),e.$slide.scrollTop(0).scrollLeft(0))},preload:function(t){var e,o,n=this;n.group.length<2||(o=n.slides[n.currPos+1],(e=n.slides[n.currPos-1])&&e.type===t&&n.loadSlide(e),o&&o.type===t&&n.loadSlide(o))},focus:function(t,e){var o=this,n=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"])'].join(",");o.isClosing||((e=(e=!t&&o.current&&o.current.isComplete?o.current.$slide.find("*:visible"+(e?":not(.modula-fancybox-close-small)":"")):o.$refs.container.find("*:visible")).filter(n).filter(function(){return"hidden"!==f(this).css("visibility")&&!f(this).hasClass("disabled")})).length?(n=e.index(s.activeElement),t&&t.shiftKey?(n<0||0==n)&&(t.preventDefault(),e.eq(e.length-1).trigger("focus")):(n<0||n==e.length-1)&&(t&&t.preventDefault(),e.eq(0).trigger("focus"))):o.$refs.container.trigger("focus"))},activate:function(){var e=this;f(".modula-fancybox-container").each(function(){var t=f(this).data("modulaFancyBox");t&&t.id!==e.id&&!t.isClosing&&(t.trigger("onDeactivate"),t.removeEvents(),t.isVisible=!1)}),e.isVisible=!0,(e.current||e.isIdle)&&(e.update(),e.updateControls()),e.trigger("onActivate"),e.addEvents()},close:function(t,e){function o(){l.cleanUp(t)}var n,a,i,s,r,l=this,c=l.current;return!l.isClosing&&(!(l.isClosing=!0)===l.trigger("beforeClose",t)?(l.isClosing=!1,d(function(){l.update()}),!1):(l.removeEvents(),i=c.$content,n=c.opts.animationEffect,a=f.isNumeric(e)?e:n?c.opts.animationDuration:0,c.$slide.removeClass("modula-fancybox-slide--complete modula-fancybox-slide--next modula-fancybox-slide--previous modula-fancybox-animated"),!0!==t?f.modulaFancybox.stop(c.$slide):n=!1,c.$slide.siblings().trigger("onReset").remove(),a&&l.$refs.container.removeClass("modula-fancybox-is-open").addClass("modula-fancybox-is-closing").css("transition-duration",a+"ms"),l.hideLoading(c),l.hideControls(!0),l.updateCursor(),"zoom"!==n||i&&a&&"image"===c.type&&!l.isMoved()&&!c.hasError&&(r=l.getThumbPos(c))||(n="fade"),"zoom"===n?(f.modulaFancybox.stop(i),e={top:(s=f.modulaFancybox.getTranslate(i)).top,left:s.left,scaleX:s.width/r.width,scaleY:s.height/r.height,width:r.width,height:r.height},"auto"==(s=c.opts.zoomOpacity)&&(s=.1<Math.abs(c.width/c.height-r.width/r.height)),s&&(r.opacity=0),f.modulaFancybox.setTranslate(i,e),p(i),f.modulaFancybox.animate(i,r,a,o)):n&&a?f.modulaFancybox.animate(c.$slide.addClass("modula-fancybox-slide--previous").removeClass("modula-fancybox-slide--current"),"modula-fancybox-animated modula-fancybox-fx-"+n,a,o):!0===t?setTimeout(o,a):o(),!0))},cleanUp:function(t){var e,o=this,n=o.current.opts.$orig;o.current.$slide.trigger("onReset"),o.$refs.container.empty().remove(),o.trigger("afterClose",t),o.current.opts.backFocus&&(n&&n.length&&n.is(":visible")||(n=o.$trigger),n&&n.length&&(e=l.scrollX,t=l.scrollY,n.trigger("focus"),f("html, body").scrollTop(t).scrollLeft(e))),o.current=null,(o=f.modulaFancybox.getInstance())?o.activate():(f("body").removeClass("modula-fancybox-active compensate-for-scrollbar"),f("#modula-fancybox-style-noscroll").remove())},trigger:function(t,e){var o,n=Array.prototype.slice.call(arguments,1),a=this,e=e&&e.opts?e:a.current;if(e?n.unshift(e):e=a,n.unshift(a),f.isFunction(e.opts[t])&&(o=e.opts[t].apply(e,n)),!1===o)return o;("afterClose"!==t&&a.$refs?a.$refs.container:i).trigger(t+".fb",n)},updateControls:function(){var t=this,e=t.current,o=e.index,n=t.$refs.container,a=t.$refs.caption,i=e.opts.caption;e.$slide.trigger("refresh"),i&&i.length?(t.$caption=a).children().eq(0).html(i):t.$caption=null,t.hasHiddenControls||t.isIdle||t.showControls(),n.find("[data-fancybox-count]").html(t.group.length),n.find("[data-fancybox-index]").html(o+1),n.find("[data-fancybox-prev]").prop("disabled",!e.opts.loop&&o<=0),n.find("[data-fancybox-next]").prop("disabled",!e.opts.loop&&o>=t.group.length-1),"image"===e.type?n.find("[data-fancybox-zoom]").show().end().find("[data-fancybox-download]").attr("href",e.opts.image.src||e.src).show():e.opts.toolbar&&n.find("[data-fancybox-download],[data-fancybox-zoom]").hide(),f(s.activeElement).is(":hidden,[disabled]")&&t.$refs.container.trigger("focus")},hideControls:function(t){var e=["infobar","toolbar","nav"];!t&&this.current.opts.preventCaptionOverlap||e.push("caption"),this.$refs.container.removeClass(e.map(function(t){return"modula-fancybox-show-"+t}).join(" ")),this.hasHiddenControls=!0},showControls:function(){var t=this,e=(t.current||t).opts,o=t.$refs.container;t.hasHiddenControls=!1,t.idleSecondsCounter=0,o.toggleClass("modula-fancybox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("modula-fancybox-show-infobar",!!(e.infobar&&1<t.group.length)).toggleClass("modula-fancybox-show-caption",!!t.$caption).toggleClass("modula-fancybox-show-nav",!!(e.arrows&&1<t.group.length)).toggleClass("modula-fancybox-is-modal",!!e.modal)},toggleControls:function(){this.hasHiddenControls?this.showControls():this.hideControls()}}),f.modulaFancybox={version:"3.5.7",defaults:t,getInstance:function(t){var e=f('.modula-fancybox-container:not(".modula-fancybox-is-closing"):last').data("modulaFancyBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof n&&("string"===f.type(t)?e[t].apply(e,o):"function"===f.type(t)&&t.apply(e,o),e)},open:function(t,e,o){return new n(t,e,o)},close:function(t){var e=this.getInstance();e&&(e.close(),!0===t&&this.close(t))},destroy:function(){this.close(!0),i.add("body").off("click.fb-start","**")},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:(t=s.createElement("div"),l.getComputedStyle&&l.getComputedStyle(t)&&l.getComputedStyle(t).getPropertyValue("transform")&&!(s.documentMode&&s.documentMode<11)),getTranslate:function(t){var e;return!(!t||!t.length)&&{top:(e=t[0].getBoundingClientRect()).top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css("opacity"))}},setTranslate:function(t,e){var o="",n={};if(t&&e)return e.left===m&&e.top===m||(o=(e.left===m?t.position():e).left+"px, "+(e.top===m?t.position():e).top+"px",o=this.use3d?"translate3d("+o+", 0px)":"translate("+o+")"),e.scaleX!==m&&e.scaleY!==m?o+=" scale("+e.scaleX+", "+e.scaleY+")":e.scaleX!==m&&(o+=" scaleX("+e.scaleX+")"),o.length&&(n.transform=o),e.opacity!==m&&(n.opacity=e.opacity),e.width!==m&&(n.width=e.width),e.height!==m&&(n.height=e.height),t.css(n)},animate:function(e,o,n,a,i){var s,r=this;f.isFunction(n)&&(a=n,n=null),r.stop(e),s=r.getTranslate(e),e.on(c,function(t){t&&t.originalEvent&&(!e.is(t.originalEvent.target)||"z-index"==t.originalEvent.propertyName)||(r.stop(e),f.isNumeric(n)&&e.css("transition-duration",""),f.isPlainObject(o)?o.scaleX!==m&&o.scaleY!==m&&r.setTranslate(e,{top:o.top,left:o.left,width:s.width*o.scaleX,height:s.height*o.scaleY,scaleX:1,scaleY:1}):!0!==i&&e.removeClass(o),f.isFunction(a)&&a(t))}),f.isNumeric(n)&&e.css("transition-duration",n+"ms"),f.isPlainObject(o)?(o.scaleX!==m&&o.scaleY!==m&&(delete o.width,delete o.height,e.parent().hasClass("modula-fancybox-slide--image")&&e.parent().addClass("modula-fancybox-is-scaling")),f.modulaFancybox.setTranslate(e,o)):e.addClass(o),e.data("timer",setTimeout(function(){e.trigger(c)},n+33))},stop:function(t,e){t&&t.length&&(clearTimeout(t.data("timer")),e&&t.trigger(c),t.off(c).css("transition-duration",""),t.parent().removeClass("modula-fancybox-is-scaling"))}},f.fn.modulaFancybox=function(t){var e;return(e=(t=t||{}).selector||!1)?f("body").off("click.fb-start",e).on("click.fb-start",e,{options:t},b):this.off("click.fb-start").on("click.fb-start",{items:this,options:t},b),this},i.on("click.fb-start","[data-fancybox]",b),i.on("click.fb-start","[data-fancybox-trigger]",function(t){f('[data-fancybox="'+f(this).attr("data-fancybox-trigger")+'"]').eq(f(this).attr("data-fancybox-index")||0).trigger("click.fb-start",{$trigger:f(this)})}),o=".modula-fancybox-button",h="modula-fancybox-focus",g=null,i.on("mousedown mouseup focus blur",o,function(t){switch(t.type){case"mousedown":g=f(this);break;case"mouseup":g=null;break;case"focusin":f(o).removeClass(h),f(this).is(g)||f(this).is("[disabled]")||f(this).addClass(h);break;case"focusout":f(o).removeClass(h)}})))}(window,document,jQuery),function(h){"use strict";function f(o,t,e){if(o)return e=e||"","object"===h.type(e)&&(e=h.param(e,!0)),h.each(t,function(t,e){o=o.replace("$"+t,e||"")}),e.length&&(o+=(0<o.indexOf("?")?"&":"?")+e),o}var n={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"https://www.youtube-nocookie.com/embed/$4",thumb:"https://img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12]+"").replace(/\?/,"&")+"&output="+(t[12]&&0<t[12].indexOf("layer=c")?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}};h(document).on("objectNeedsType.fb",function(t,e,a){var i,s,r,l,c,d,u=a.src||"",p=!1,o=h.extend(!0,{},n,a.opts.media);h.each(o,function(t,e){if(s=u.match(e.matcher)){if(p=e.type,d=t,c={},e.paramPlace&&s[e.paramPlace]){"?"==(l=s[e.paramPlace])[0]&&(l=l.substring(1)),l=l.split("&");for(var o=0;o<l.length;++o){var n=l[o].split("=",2);2==n.length&&(c[n[0]]=decodeURIComponent(n[1].replace(/\+/g," ")))}}return r=h.extend(!0,{},e.params,a.opts[t],c),u="function"===h.type(e.url)?e.url.call(this,s,r,a):f(e.url,s,r),i="function"===h.type(e.thumb)?e.thumb.call(this,s,r,a):f(e.thumb,s),"youtube"===t?u=u.replace(/&t=(\d+)/,function(t,e){return"&start="+e}):"vimeo"===t&&(u=u.replace("&%23","#")),!1}}),p?(a.opts.thumb||a.opts.$thumb&&a.opts.$thumb.length||(a.opts.thumb=i),"iframe"===p&&(a.opts=h.extend(!0,a.opts,{iframe:{preload:!1,attr:{scrolling:"no"}}})),h.extend(a,{type:p,src:u,origSrc:a.src,contentSource:d,contentType:"image"===p?"image":"gmap_place"==d||"gmap_search"==d?"map":"video"})):u&&(a.type=a.opts.defaultType)});var a={youtube:{src:"https://www.youtube.com/iframe_api",class:"YT",loading:!1,loaded:!1},vimeo:{src:"https://player.vimeo.com/api/player.js",class:"Vimeo",loading:!1,loaded:!1},load:function(t){var e,o=this;this[t].loaded?setTimeout(function(){o.done(t)}):this[t].loading||(this[t].loading=!0,(e=document.createElement("script")).type="text/javascript",e.src=this[t].src,"youtube"===t?window.onYouTubeIframeAPIReady=function(){o[t].loaded=!0,o.done(t)}:e.onload=function(){o[t].loaded=!0,o.done(t)},document.body.appendChild(e))},done:function(t){var e,o;"youtube"===t&&delete window.onYouTubeIframeAPIReady,(e=h.modulaFancybox.getInstance())&&(o=e.current.$content.find("iframe"),"youtube"===t&&void 0!==YT&&YT?new YT.Player(o.attr("id"),{events:{onStateChange:function(t){0==t.data&&e.next()}}}):"vimeo"===t&&void 0!==Vimeo&&Vimeo&&new Vimeo.Player(o).on("ended",function(){e.next()}))}};h(document).on({"afterShow.fb":function(t,e,o){1<e.group.length&&("youtube"===o.contentSource||"vimeo"===o.contentSource)&&a.load(o.contentSource)}})}(jQuery),function(d,l,u){"use strict";function p(t){var e,o=[];for(e in t=(t=t.originalEvent||t||d.e).touches&&t.touches.length?t.touches:t.changedTouches&&t.changedTouches.length?t.changedTouches:[t])t[e].pageX?o.push({x:t[e].pageX,y:t[e].pageY}):t[e].clientX&&o.push({x:t[e].clientX,y:t[e].clientY});return o}function h(t,e,o){return e&&t?"x"===o?t.x-e.x:"y"===o?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function c(t){if(t.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio,iframe')||u.isFunction(t.get(0).onclick)||t.data("selectable"))return 1;for(var e=0,o=t[0].attributes,n=o.length;e<n;e++)if("data-fancybox-"===o[e].nodeName.substr(0,14))return 1}function f(t){for(var e,o,n,a=!1;e=t.get(0),o=n=o=void 0,o=d.getComputedStyle(e)["overflow-y"],n=d.getComputedStyle(e)["overflow-x"],o=("scroll"===o||"auto"===o)&&e.scrollHeight>e.clientHeight,e=("scroll"===n||"auto"===n)&&e.scrollWidth>e.clientWidth,!(a=o||e)&&(t=t.parent()).length&&!t.hasClass("modula-fancybox-stage")&&!t.is("body"););return a}function o(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on("touchstart.fb.touch mousedown.fb.touch",u.proxy(e,"ontouchstart"))}var m=d.requestAnimationFrame||d.webkitRequestAnimationFrame||d.mozRequestAnimationFrame||d.oRequestAnimationFrame||function(t){return d.setTimeout(t,1e3/60)},g=d.cancelAnimationFrame||d.webkitCancelAnimationFrame||d.mozCancelAnimationFrame||d.oCancelAnimationFrame||function(t){d.clearTimeout(t)};o.prototype.destroy=function(){var t=this;t.$container.off(".fb.touch"),u(l).off(".fb.touch"),t.requestId&&(g(t.requestId),t.requestId=null),t.tapped&&(clearTimeout(t.tapped),t.tapped=null)},o.prototype.ontouchstart=function(t){var e=this,o=u(t.target),n=e.instance,a=n.current,i=a.$slide,s=a.$content,r="touchstart"==t.type;if(r&&e.$container.off("mousedown.fb.touch"),(!t.originalEvent||2!=t.originalEvent.button)&&i.length&&o.length&&!c(o)&&!c(o.parent())&&(o.is("img")||!(t.originalEvent.clientX>o[0].clientWidth+o.offset().left))){if(!a||n.isAnimating||a.$slide.hasClass("modula-fancybox-animated"))return t.stopPropagation(),void t.preventDefault();e.realPoints=e.startPoints=p(t),e.startPoints.length&&(a.touch&&t.stopPropagation(),e.startEvent=t,e.canTap=!0,e.$target=o,e.$content=s,e.opts=a.opts.touch,e.isPanning=!1,e.isSwiping=!1,e.isZooming=!1,e.isScrolling=!1,e.canPan=n.canPan(),e.startTime=(new Date).getTime(),e.distanceX=e.distanceY=e.distance=0,e.canvasWidth=Math.round(i[0].clientWidth),e.canvasHeight=Math.round(i[0].clientHeight),e.contentLastPos=null,e.contentStartPos=u.modulaFancybox.getTranslate(e.$content)||{top:0,left:0},e.sliderStartPos=u.modulaFancybox.getTranslate(i),e.stagePos=u.modulaFancybox.getTranslate(n.$refs.stage),e.sliderStartPos.top-=e.stagePos.top,e.sliderStartPos.left-=e.stagePos.left,e.contentStartPos.top-=e.stagePos.top,e.contentStartPos.left-=e.stagePos.left,u(l).off(".fb.touch").on(r?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",u.proxy(e,"ontouchend")).on(r?"touchmove.fb.touch":"mousemove.fb.touch",u.proxy(e,"ontouchmove")),u.modulaFancybox.isMobile&&l.addEventListener("scroll",e.onscroll,!0),((e.opts||e.canPan)&&(o.is(e.$stage)||e.$stage.find(o).length)||(o.is(".modula-fancybox-image")&&t.preventDefault(),u.modulaFancybox.isMobile&&o.parents(".modula-fancybox-caption").length))&&(e.isScrollable=f(o)||f(o.parent()),u.modulaFancybox.isMobile&&e.isScrollable||t.preventDefault(),1!==e.startPoints.length&&!a.hasError||(e.canPan?(u.modulaFancybox.stop(e.$content),e.isPanning=!0):e.isSwiping=!0,e.$container.addClass("modula-fancybox-is-grabbing")),2===e.startPoints.length&&"image"===a.type&&(a.isLoaded||a.$ghost)&&(e.canTap=!1,e.isSwiping=!1,e.isPanning=!1,e.isZooming=!0,u.modulaFancybox.stop(e.$content),e.centerPointStartX=.5*(e.startPoints[0].x+e.startPoints[1].x)-u(d).scrollLeft(),e.centerPointStartY=.5*(e.startPoints[0].y+e.startPoints[1].y)-u(d).scrollTop(),e.percentageOfImageAtPinchPointX=(e.centerPointStartX-e.contentStartPos.left)/e.contentStartPos.width,e.percentageOfImageAtPinchPointY=(e.centerPointStartY-e.contentStartPos.top)/e.contentStartPos.height,e.startDistanceBetweenFingers=h(e.startPoints[0],e.startPoints[1]))))}},o.prototype.onscroll=function(t){this.isScrolling=!0,l.removeEventListener("scroll",this.onscroll,!0)},o.prototype.ontouchmove=function(t){var e=this;void 0===t.originalEvent.buttons||0!==t.originalEvent.buttons?e.isScrolling?e.canTap=!1:(e.newPoints=p(t),(e.opts||e.canPan)&&e.newPoints.length&&e.newPoints.length&&(e.isSwiping&&!0===e.isSwiping||t.preventDefault(),e.distanceX=h(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=h(e.newPoints[0],e.startPoints[0],"y"),e.distance=h(e.newPoints[0],e.startPoints[0]),0<e.distance&&(e.isSwiping?e.onSwipe(t):e.isPanning?e.onPan():e.isZooming&&e.onZoom()))):e.ontouchend(t)},o.prototype.onSwipe=function(t){var a=this,i=a.instance,e=a.isSwiping,o=a.sliderStartPos.left||0;if(!0!==e)"x"==e&&(0<a.distanceX&&(a.instance.group.length<2||0===a.instance.current.index&&!a.instance.current.opts.loop)?o+=Math.pow(a.distanceX,.8):a.distanceX<0&&(a.instance.group.length<2||a.instance.current.index===a.instance.group.length-1&&!a.instance.current.opts.loop)?o-=Math.pow(-a.distanceX,.8):o+=a.distanceX),a.sliderLastPos={top:"x"==e?0:a.sliderStartPos.top+a.distanceY,left:o},a.requestId&&(g(a.requestId),a.requestId=null),a.requestId=m(function(){a.sliderLastPos&&(u.each(a.instance.slides,function(t,e){var o=e.pos-a.instance.currPos;u.modulaFancybox.setTranslate(e.$slide,{top:a.sliderLastPos.top,left:a.sliderLastPos.left+o*a.canvasWidth+o*e.opts.gutter})}),a.$container.addClass("modula-fancybox-is-sliding"))});else if(10<Math.abs(a.distance)){if(a.canTap=!1,i.group.length<2&&a.opts.vertical?a.isSwiping="y":i.isDragging||!1===a.opts.vertical||"auto"===a.opts.vertical&&800<u(d).width()?a.isSwiping="x":(o=Math.abs(180*Math.atan2(a.distanceY,a.distanceX)/Math.PI),a.isSwiping=45<o&&o<135?"y":"x"),"y"===a.isSwiping&&u.modulaFancybox.isMobile&&a.isScrollable)return void(a.isScrolling=!0);i.isDragging=a.isSwiping,a.startPoints=a.newPoints,u.each(i.slides,function(t,e){var o,n;u.modulaFancybox.stop(e.$slide),o=u.modulaFancybox.getTranslate(e.$slide),n=u.modulaFancybox.getTranslate(i.$refs.stage),e.$slide.css({transform:"",opacity:"","transition-duration":""}).removeClass("modula-fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)modula-fancybox-fx-\S+/g)||[]).join(" ")}),e.pos===i.current.pos&&(a.sliderStartPos.top=o.top-n.top,a.sliderStartPos.left=o.left-n.left),u.modulaFancybox.setTranslate(e.$slide,{top:o.top-n.top,left:o.left-n.left})}),i.SlideShow&&i.SlideShow.isActive&&i.SlideShow.stop()}},o.prototype.onPan=function(){var t=this;h(t.newPoints[0],t.realPoints[0])<(u.modulaFancybox.isMobile?10:5)?t.startPoints=t.newPoints:(t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&g(t.requestId),t.requestId=m(function(){u.modulaFancybox.setTranslate(t.$content,t.contentLastPos)}))},o.prototype.limitMovement=function(){var t=this,e=t.canvasWidth,o=t.canvasHeight,n=t.distanceX,a=t.distanceY,i=t.contentStartPos,s=i.left,r=i.top,l=i.width,c=i.height,d=e<l?s+n:s,u=r+a,t=Math.max(0,.5*e-.5*l),i=Math.max(0,.5*o-.5*c),l=Math.min(e-l,.5*e-.5*l),c=Math.min(o-c,.5*o-.5*c);return 0<n&&t<d&&(d=t-1+Math.pow(-t+s+n,.8)||0),n<0&&d<l&&(d=l+1-Math.pow(l-s-n,.8)||0),0<a&&i<u&&(u=i-1+Math.pow(-i+r+a,.8)||0),a<0&&u<c&&(u=c+1-Math.pow(c-r-a,.8)||0),{top:u,left:d}},o.prototype.limitPosition=function(t,e,o,n){var a=this.canvasWidth,i=this.canvasHeight;return t=a<o?(t=0<t?0:t)<a-o?a-o:t:Math.max(0,a/2-o/2),{top:e=i<n?(e=0<e?0:e)<i-n?i-n:e:Math.max(0,i/2-n/2),left:t}},o.prototype.onZoom=function(){var t=this,e=t.contentStartPos,o=e.width,n=e.height,a=e.left,i=e.top,s=h(t.newPoints[0],t.newPoints[1])/t.startDistanceBetweenFingers,r=Math.floor(o*s),l=Math.floor(n*s),c=(o-r)*t.percentageOfImageAtPinchPointX,e=(n-l)*t.percentageOfImageAtPinchPointY,o=(t.newPoints[0].x+t.newPoints[1].x)/2-u(d).scrollLeft(),n=(t.newPoints[0].y+t.newPoints[1].y)/2-u(d).scrollTop(),o=o-t.centerPointStartX,s={top:i+(e+(n-t.centerPointStartY)),left:a+(c+o),scaleX:s,scaleY:s};t.canTap=!1,t.newWidth=r,t.newHeight=l,t.contentLastPos=s,t.requestId&&g(t.requestId),t.requestId=m(function(){u.modulaFancybox.setTranslate(t.$content,t.contentLastPos)})},o.prototype.ontouchend=function(t){var e=this,o=e.isSwiping,n=e.isPanning,a=e.isZooming,i=e.isScrolling;if(e.endPoints=p(t),e.dMs=Math.max((new Date).getTime()-e.startTime,1),e.$container.removeClass("modula-fancybox-is-grabbing"),u(l).off(".fb.touch"),l.removeEventListener("scroll",e.onscroll,!0),e.requestId&&(g(e.requestId),e.requestId=null),e.isSwiping=!1,e.isPanning=!1,e.isZooming=!1,e.isScrolling=!1,e.instance.isDragging=!1,e.canTap)return e.onTap(t);e.speed=100,e.velocityX=e.distanceX/e.dMs*.5,e.velocityY=e.distanceY/e.dMs*.5,n?e.endPanning():a?e.endZooming():e.endSwiping(o,i)},o.prototype.endSwiping=function(t,e){var o=this,n=!1,a=o.instance.group.length,i=Math.abs(o.distanceX),i="x"==t&&1<a&&(130<o.dMs&&10<i||50<i);o.sliderLastPos=null,"y"==t&&!e&&50<Math.abs(o.distanceY)?(u.modulaFancybox.animate(o.instance.current.$slide,{top:o.sliderStartPos.top+o.distanceY+150*o.velocityY,opacity:0},200),n=o.instance.close(!0,250)):i&&0<o.distanceX?n=o.instance.previous(300):i&&o.distanceX<0&&(n=o.instance.next(300)),!1!==n||"x"!=t&&"y"!=t||o.instance.centerSlide(200),o.$container.removeClass("modula-fancybox-is-sliding")},o.prototype.endPanning=function(){var t,e,o=this;o.contentLastPos&&(e=!1===o.opts.momentum||350<o.dMs?(t=o.contentLastPos.left,o.contentLastPos.top):(t=o.contentLastPos.left+500*o.velocityX,o.contentLastPos.top+500*o.velocityY),(e=o.limitPosition(t,e,o.contentStartPos.width,o.contentStartPos.height)).width=o.contentStartPos.width,e.height=o.contentStartPos.height,u.modulaFancybox.animate(o.$content,e,366))},o.prototype.endZooming=function(){var t,e,o,n=this,a=n.instance.current,i=n.newWidth,s=n.newHeight;n.contentLastPos&&(t=n.contentLastPos.left,o={top:e=n.contentLastPos.top,left:t,width:i,height:s,scaleX:1,scaleY:1},u.modulaFancybox.setTranslate(n.$content,o),i<n.canvasWidth&&s<n.canvasHeight?n.instance.scaleToFit(150):i>a.width||s>a.height?n.instance.scaleToActual(n.centerPointStartX,n.centerPointStartY,150):(s=n.limitPosition(t,e,i,s),u.modulaFancybox.animate(n.$content,s,150)))},o.prototype.onTap=function(e){function t(t){if(t=s.opts[t],u.isFunction(t)&&(t=t.apply(i,[s,e])),t)switch(t){case"close":i.close(n.startEvent);break;case"toggleControls":i.toggleControls();break;case"next":i.next();break;case"nextOrClose":1<i.group.length?i.next():i.close(n.startEvent);break;case"zoom":"image"==s.type&&(s.isLoaded||s.$ghost)&&(i.canPan()?i.scaleToFit():i.isScaledDown()?i.scaleToActual(l,c):i.group.length<2&&i.close(n.startEvent))}}var o,n=this,a=u(e.target),i=n.instance,s=i.current,r=e&&p(e)||n.startPoints,l=r[0]?r[0].x-u(d).scrollLeft()-n.stagePos.left:0,c=r[0]?r[0].y-u(d).scrollTop()-n.stagePos.top:0;if((!e.originalEvent||2!=e.originalEvent.button)&&(a.is("img")||!(l>a[0].clientWidth+a.offset().left))){if(a.is(".modula-fancybox-bg,.modula-fancybox-inner,.modula-fancybox-outer,.modula-fancybox-container"))o="Outside";else if(a.is(".modula-fancybox-slide"))o="Slide";else{if(!i.current.$content||!i.current.$content.find(a).addBack().filter(a).length)return;o="Content"}if(n.tapped){if(clearTimeout(n.tapped),n.tapped=null,50<Math.abs(l-n.tapX)||50<Math.abs(c-n.tapY))return this;t("dblclick"+o)}else n.tapX=l,n.tapY=c,s.opts["dblclick"+o]&&s.opts["dblclick"+o]!==s.opts["click"+o]?n.tapped=setTimeout(function(){n.tapped=null,i.isAnimating||t("click"+o)},500):t("click"+o);return this}},u(l).on("onActivate.fb",function(t,e){e&&!e.Guestures&&(e.Guestures=new o(e))}).on("beforeClose.fb",function(t,e){e&&e.Guestures&&e.Guestures.destroy()})}(window,document,jQuery),function(i,s){"use strict";s.extend(!0,s.modulaFancybox.defaults,{btnTpl:{slideShow:'<button data-fancybox-play class="modula-fancybox-button modula-fancybox-button--play" title="{{PLAY_START}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.5 5.4v13.2l11-6.6z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.33 5.75h2.2v12.5h-2.2V5.75zm5.15 0h2.2v12.5h-2.2V5.75z"/></svg></button>'},slideShow:{autoStart:!1,speed:3e3,progress:!0}});function o(t){this.instance=t,this.init()}s.extend(o.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this,e=t.instance,o=e.group[e.currIndex].opts.slideShow;t.$button=e.$refs.toolbar.find("[data-fancybox-play]").on("click",function(){t.toggle()}),e.group.length<2||!o?t.$button.hide():o.progress&&(t.$progress=s('<div class="modula-fancybox-progress"></div>').appendTo(e.$refs.inner))},set:function(t){var e=this,o=e.instance,n=o.current;n&&(!0===t||n.opts.loop||o.currIndex<o.group.length-1)?e.isActive&&"video"!==n.contentType&&(e.$progress&&s.modulaFancybox.animate(e.$progress.show(),{scaleX:1},n.opts.slideShow.speed),e.timer=setTimeout(function(){o.current.opts.loop||o.current.index!=o.group.length-1?o.next():o.jumpTo(0)},n.opts.slideShow.speed)):(e.stop(),o.idleSecondsCounter=0,o.showControls())},clear:function(){clearTimeout(this.timer),this.timer=null,this.$progress&&this.$progress.removeAttr("style").hide()},start:function(){var t=this,e=t.instance.current;e&&(t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_STOP).removeClass("modula-fancybox-button--play").addClass("modula-fancybox-button--pause"),t.isActive=!0,e.isComplete&&t.set(!0),t.instance.trigger("onSlideShowChange",!0))},stop:function(){var t=this,e=t.instance.current;t.clear(),t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_START).removeClass("modula-fancybox-button--pause").addClass("modula-fancybox-button--play"),t.isActive=!1,t.instance.trigger("onSlideShowChange",!1),t.$progress&&t.$progress.removeAttr("style").hide()},toggle:function(){this.isActive?this.stop():this.start()}}),s(i).on({"onInit.fb":function(t,e){e&&!e.SlideShow&&(e.SlideShow=new o(e))},"beforeShow.fb":function(t,e,o,n){e=e&&e.SlideShow;n?e&&o.opts.slideShow.autoStart&&e.start():e&&e.isActive&&e.clear()},"afterShow.fb":function(t,e,o){e=e&&e.SlideShow;e&&e.isActive&&e.set()},"afterKeydown.fb":function(t,e,o,n,a){e=e&&e.SlideShow;!e||!o.opts.slideShow||80!==a&&32!==a||s(i.activeElement).is("button,a,input")||(n.preventDefault(),e.toggle())},"beforeClose.fb onDeactivate.fb":function(t,e){e=e&&e.SlideShow;e&&e.stop()}}),s(i).on("visibilitychange",function(){var t=s.modulaFancybox.getInstance(),t=t&&t.SlideShow;t&&t.isActive&&(i.hidden?t.clear():t.set())})}(document,jQuery),function(i,o){"use strict";var n,a=function(){for(var t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],e={},o=0;o<t.length;o++){var n=t[o];if(n&&n[1]in i){for(var a=0;a<n.length;a++)e[t[0][a]]=n[a];return e}}return!1}();a&&(n={request:function(t){(t=t||i.documentElement)[a.requestFullscreen](t.ALLOW_KEYBOARD_INPUT)},exit:function(){i[a.exitFullscreen]()},toggle:function(t){t=t||i.documentElement,this.isFullscreen()?this.exit():this.request(t)},isFullscreen:function(){return Boolean(i[a.fullscreenElement])},enabled:function(){return Boolean(i[a.fullscreenEnabled])}},o.extend(!0,o.modulaFancybox.defaults,{btnTpl:{fullScreen:'<button data-fancybox-fullscreen class="modula-fancybox-button modula-fancybox-button--fsenter" title="{{FULL_SCREEN}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"/></svg></button>'},fullScreen:{autoStart:!1}}),o(i).on(a.fullscreenchange,function(){var t=n.isFullscreen(),e=o.modulaFancybox.getInstance();e&&(e.current&&"image"===e.current.type&&e.isAnimating&&(e.isAnimating=!1,e.update(!0,!0,0),e.isComplete||e.complete()),e.trigger("onFullscreenChange",t),e.$refs.container.toggleClass("modula-fancybox-is-fullscreen",t),e.$refs.toolbar.find("[data-fancybox-fullscreen]").toggleClass("modula-fancybox-button--fsenter",!t).toggleClass("modula-fancybox-button--fsexit",t))})),o(i).on({"onInit.fb":function(t,e){a?e&&e.group[e.currIndex].opts.fullScreen?(e.$refs.container.on("click.fb-fullscreen","[data-fancybox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),n.toggle()}),e.opts.fullScreen&&!0===e.opts.fullScreen.autoStart&&n.request(),e.FullScreen=n):e&&e.$refs.toolbar.find("[data-fancybox-fullscreen]").hide():e.$refs.toolbar.find("[data-fancybox-fullscreen]").remove()},"afterKeydown.fb":function(t,e,o,n,a){e&&e.FullScreen&&70===a&&(n.preventDefault(),e.FullScreen.toggle())},"beforeClose.fb":function(t,e){e&&e.FullScreen&&e.$refs.container.hasClass("modula-fancybox-is-fullscreen")&&n.exit()}})}(document,jQuery),function(t,i){"use strict";var s="modula-fancybox-thumbs",r=s+"-active";i.modulaFancybox.defaults=i.extend(!0,{btnTpl:{thumbs:'<button data-fancybox-thumbs class="modula-fancybox-button modula-fancybox-button--thumbs" title="{{THUMBS}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.59 14.59h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76H5.65V5.65z"/></svg></button>'},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".modula-fancybox-container",axis:"y"}},i.modulaFancybox.defaults);function n(t){this.init(t)}i.extend(n.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e=this,o=t.group,n=0;e.instance=t,e.opts=o[t.currIndex].opts.thumbs,(t.Thumbs=e).$button=t.$refs.toolbar.find("[data-fancybox-thumbs]");for(var a=0,i=o.length;a<i&&(o[a].thumb&&n++,!(1<n));a++);1<n&&e.opts?(e.$button.removeAttr("style").on("click",function(){e.toggle()}),e.isActive=!0):e.$button.hide()},create:function(){var o,t=this,e=t.instance,n=t.opts.parentEl,a=[];t.$grid||(t.$grid=i('<div class="'+s+" "+s+"-"+t.opts.axis+'"></div>').appendTo(e.$refs.container.find(n).addBack().filter(n)),t.$grid.on("click","a",function(){e.jumpTo(i(this).attr("data-index"))})),t.$list||(t.$list=i('<div class="'+s+'__list">').appendTo(t.$grid)),i.each(e.group,function(t,e){(o=e.thumb)||"image"!==e.type||(o=e.src),a.push('<a href="javascript:;" tabindex="0" data-index="'+t+'"'+(o&&o.length?' style="background-image:url('+o+')"':'class="modula-fancybox-thumbs-missing"')+"></a>")}),t.$list[0].innerHTML=a.join(""),"x"===t.opts.axis&&t.$list.width(parseInt(t.$grid.css("padding-right"),10)+e.group.length*t.$list.children().eq(0).outerWidth(!0))},focus:function(t){var e,o,n=this,a=n.$list,i=n.$grid;n.instance.current&&(o=(e=a.children().removeClass(r).filter('[data-index="'+n.instance.current.index+'"]').addClass(r)).position(),"y"===n.opts.axis&&(o.top<0||o.top>a.height()-e.outerHeight())?a.stop().animate({scrollTop:a.scrollTop()+o.top},t):"x"===n.opts.axis&&(o.left<i.scrollLeft()||o.left>i.scrollLeft()+(i.width()-e.outerWidth()))&&a.parent().stop().animate({scrollLeft:o.left},t))},update:function(){var t=this;t.instance.$refs.container.toggleClass("modula-fancybox-show-thumbs",this.isVisible),t.isVisible?(t.$grid||t.create(),t.instance.trigger("onThumbsShow"),t.focus(0)):t.$grid&&t.instance.trigger("onThumbsHide"),t.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),i(t).on({"onInit.fb":function(t,e){var o;e&&!e.Thumbs&&(o=new n(e)).isActive&&!0===o.opts.autoStart&&o.show()},"beforeShow.fb":function(t,e,o,n){e=e&&e.Thumbs;e&&e.isVisible&&e.focus(n?0:250)},"afterKeydown.fb":function(t,e,o,n,a){e=e&&e.Thumbs;e&&e.isActive&&71===a&&(n.preventDefault(),e.toggle())},"beforeClose.fb":function(t,e){e=e&&e.Thumbs;e&&e.isVisible&&!1!==e.opts.hideOnClose&&e.$grid.hide()}})}(document,jQuery),function(t,o){"use strict";o.extend(!0,o.modulaFancybox.defaults,{btnTpl:{share:'<button data-fancybox-share class="modula-fancybox-button modula-fancybox-button--share" title="{{SHARE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.55 19c1.4-8.4 9.1-9.8 11.9-9.8V5l7 7-7 6.3v-3.5c-2.8 0-10.5 2.1-11.9 4.2z"/></svg></button>'},share:{url:function(t,e){return!t.currentHash&&"inline"!==e.type&&"html"!==e.type&&(e.origSrc||e.src)||window.location}}}),o(t).on("click","[data-fancybox-share]",function(){var a,e,i=o.modulaFancybox.getInstance(),s=i.current||null,r="<div class='modula-fancybox-share'><h1>{{SHARE}}</h1><p>";s&&("function"===o.type(s.opts.share.url)&&(a=s.opts.share.url.apply(s,[i,s])),o.each(s.opts.modulaShare,function(t,e){var o=(s.opts.lightboxEmailMessage.length?s.opts.lightboxEmailMessage:"Here is the link to the image : %%image_link%% and this is the link to the gallery : %%gallery_link%%").replace(/\%%gallery_link%%/g,window.location.href).replace(/\%%image_link%%/g,s.src),n=null!=jQuery(s.$image).attr("title")?jQuery(s.$image).attr("title"):"";""==n&&(n=i.$caption.text()),r+=s.opts.shareBtnTpl[e].replace(/\{\{media\}\}/g,"image"===s.type?encodeURIComponent(s.src):"").replace(/\{\{modulaShareUrl\}\}/g,encodeURIComponent(a)).replace(/\{\{descr\}\}/g,encodeURIComponent(n)).replace(/\{\{subject\}\}/g,encodeURIComponent(s.opts.lightboxEmailSubject)).replace(/\{\{emailMessage\}\}/g,encodeURIComponent(o))}),r=(r+="</p><p><input class='modula-fancybox-share__input' type='text' value='{{url_raw}}' /></p></div>").replace(/\{\{url_raw\}\}/g,(e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"},String(a).replace(/[&<>"'`=\/]/g,function(t){return e[t]}))),o.modulaFancybox.open({src:i.translate(i,r),type:"html",opts:{touch:!1,animationEffect:!1,afterLoad:function(t,e){i.$refs.container.one("beforeClose.fb",function(){t.close(null,0)}),e.$content.find(".modula-fancybox-share__button").click(function(){return window.open(this.href,"Share","width=550, height=450"),!1})},mobile:{autoFocus:!1}}}))})}(document,jQuery),function(i,s,n){"use strict";function a(){var t=i.location.hash.substr(1),e=t.split("-"),o=1<e.length&&/^\+?\d+$/.test(e[e.length-1])&&parseInt(e.pop(-1),10)||1;return{hash:t,index:o<1?1:o,gallery:e.join("-")}}function e(t){""!==t.gallery&&n("[data-fancybox='"+n.escapeSelector(t.gallery)+"']").eq(t.index-1).focus().trigger("click.fb-start")}function r(t){return!!t&&(""!==(t=(t=(t.current||t).opts).hash||(t.$orig?t.$orig.data("fancybox")||t.$orig.data("fancybox-trigger"):""))&&t)}n.escapeSelector||(n.escapeSelector=function(t){return(t+"").replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t})}),n(function(){!1!==n.modulaFancybox.defaults.hash&&(n(s).on({"onInit.fb":function(t,e){!1!==e.group[e.currIndex].opts.hash&&(a(),r(e))},"beforeShow.fb":function(t,e,o,n){var a;o&&!1!==o.opts.hash&&(a=r(e))&&(e.currentHash=a+(1<e.group.length?"-"+o.opts.image_id:""),i.location.hash!=="#"+e.currentHash&&(n&&!e.origHash&&(e.origHash=i.location.hash),e.hashTimer&&clearTimeout(e.hashTimer),e.hashTimer=setTimeout(function(){"replaceState"in i.history?(i.history[n?"pushState":"replaceState"]({},s.title,i.location.pathname+i.location.search+"#"+e.currentHash),n&&(e.hasCreatedHistory=!0)):i.location.hash=e.currentHash,e.hashTimer=null},300)))},"beforeClose.fb":function(t,e,o){o&&!1!==o.opts.hash&&(clearTimeout(e.hashTimer),e.currentHash&&e.hasCreatedHistory?i.history.back():e.currentHash&&("replaceState"in i.history?i.history.replaceState({},s.title,i.location.pathname+i.location.search+(e.origHash||"")):i.location.hash=e.origHash),e.currentHash=null)}}),n(i).on("hashchange.fb",function(){var t=a(),o=null;n.each(n(".modula-fancybox-container").get().reverse(),function(t,e){e=n(e).data("modulaFancyBox");if(e&&e.currentHash)return o=e,!1}),o?o.currentHash===t.gallery+"-"+t.index||1===t.index&&o.currentHash==t.gallery||(o.currentHash=null,o.close()):""!==t.gallery&&e(t)}),setTimeout(function(){n.modulaFancybox.getInstance()||e(a())},50))})}(window,document,jQuery),function(t,e){"use strict";var a=(new Date).getTime();e(t).on({"onInit.fb":function(t,n,e){n.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){var e=n.current,o=(new Date).getTime();n.group.length<2||!1===e.opts.wheel||"auto"===e.opts.wheel&&"image"!==e.type||(t.preventDefault(),t.stopPropagation(),e.$slide.hasClass("modula-fancybox-animated")||(t=t.originalEvent||t,o-a<250||(a=o,n[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?"next":"previous"]())))})}})}(document,jQuery);
assets/js/front/isotope-packery.min.js CHANGED
@@ -1 +1 @@
1
- !function(t,i){t.Packery=t.Packery||{},t.Packery.Rect=i()}(window,function(){function a(t){for(var i in a.defaults)this[i]=a.defaults[i];for(i in t)this[i]=t[i]}a.defaults={x:0,y:0,width:0,height:0};var t=a.prototype;return t.contains=function(t){var i=t.width||0,e=t.height||0;return this.x<=t.x&&this.y<=t.y&&this.x+this.width>=t.x+i&&this.y+this.height>=t.y+e},t.overlaps=function(t){var i=this.x+this.width,e=this.y+this.height,s=t.x+t.width,h=t.y+t.height;return this.x<s&&i>t.x&&this.y<h&&e>t.y},t.getMaximalFreeRects=function(t){if(!this.overlaps(t))return!1;var i,e=[],s=this.x+this.width,h=this.y+this.height,n=t.x+t.width,r=t.y+t.height;return this.y<t.y&&(i=new a({x:this.x,y:this.y,width:this.width,height:t.y-this.y}),e.push(i)),n<s&&(i=new a({x:n,y:this.y,width:s-n,height:this.height}),e.push(i)),r<h&&(i=new a({x:this.x,y:r,width:this.width,height:h-r}),e.push(i)),this.x<t.x&&(i=new a({x:this.x,y:this.y,width:t.x-this.x,height:this.height}),e.push(i)),e},t.canFit=function(t){return this.width>=t.width&&this.height>=t.height},a}),function(t,i){(t=t.Packery=t.Packery||{}).Packer=i(t.Rect)}(window,function(i){function t(t,i,e){this.width=t||0,this.height=i||0,this.sortDirection=e||"downwardLeftToRight",this.reset()}var e=t.prototype;e.reset=function(){this.spaces=[];var t=new i({x:0,y:0,width:this.width,height:this.height});this.spaces.push(t),this.sorter=s[this.sortDirection]||s.downwardLeftToRight},e.pack=function(t){for(var i=0;i<this.spaces.length;i++){var e=this.spaces[i];if(e.canFit(t)){this.placeInSpace(t,e);break}}},e.columnPack=function(t){for(var i=0;i<this.spaces.length;i++){var e=this.spaces[i];if(e.x<=t.x&&e.x+e.width>=t.x+t.width&&e.height>=t.height-.01){t.y=e.y,this.placed(t);break}}},e.rowPack=function(t){for(var i=0;i<this.spaces.length;i++){var e=this.spaces[i];if(e.y<=t.y&&e.y+e.height>=t.y+t.height&&e.width>=t.width-.01){t.x=e.x,this.placed(t);break}}},e.placeInSpace=function(t,i){t.x=i.x,t.y=i.y,this.placed(t)},e.placed=function(t){for(var i=[],e=0;e<this.spaces.length;e++){var s=this.spaces[e],h=s.getMaximalFreeRects(t);h?i.push.apply(i,h):i.push(s)}this.spaces=i,this.mergeSortSpaces()},e.mergeSortSpaces=function(){t.mergeRects(this.spaces),this.spaces.sort(this.sorter)},e.addSpace=function(t){this.spaces.push(t),this.mergeSortSpaces()},t.mergeRects=function(t){var i=0,e=t[i];t:for(;e;){for(var s=0,h=t[i+s];h;){if(h==e)s++;else{if(h.contains(e)){t.splice(i,1),e=t[i];continue t}e.contains(h)?t.splice(i+s,1):s++}h=t[i+s]}e=t[++i]}return t};var s={downwardLeftToRight:function(t,i){return t.y-i.y||t.x-i.x},rightwardTopToBottom:function(t,i){return t.x-i.x||t.y-i.y}};return t}),function(t,i){t.Packery.Item=i(t.Outlayer,t.Packery.Rect)}(window,function(t,i){function e(){t.Item.apply(this,arguments)}var s="string"==typeof document.documentElement.style.transform?"transform":"WebkitTransform",h=e.prototype=Object.create(t.Item.prototype),n=h._create;h._create=function(){n.call(this),this.rect=new i};var r=h.moveTo;return h.moveTo=function(t,i){var e=Math.abs(this.position.x-t),s=Math.abs(this.position.y-i);this.layout.dragItemCount&&!this.isPlacing&&!this.isTransitioning&&e<1&&s<1?this.goTo(t,i):r.apply(this,arguments)},h.enablePlacing=function(){this.removeTransitionStyles(),this.isTransitioning&&s&&(this.element.style[s]="none"),this.isTransitioning=!1,this.getSize(),this.layout._setRectSize(this.element,this.rect),this.isPlacing=!0},h.disablePlacing=function(){this.isPlacing=!1},h.removeElem=function(){this.element.parentNode.removeChild(this.element),this.layout.packer.addSpace(this.rect),this.emitEvent("remove",[this])},h.showDropPlaceholder=function(){var t=this.dropPlaceholder;t||((t=this.dropPlaceholder=document.createElement("div")).className="packery-drop-placeholder",t.style.position="absolute"),t.style.width=this.size.width+"px",t.style.height=this.size.height+"px",this.positionDropPlaceholder(),this.layout.element.appendChild(t)},h.positionDropPlaceholder=function(){this.dropPlaceholder.style[s]="translate("+this.rect.x+"px, "+this.rect.y+"px)"},h.hideDropPlaceholder=function(){this.layout.element.removeChild(this.dropPlaceholder)},e}),function(t,i){t.Packery=i(t.getSize,t.Outlayer,t.Packery.Rect,t.Packery.Packer,t.Packery.Item)}(window,function(c,t,r,i,e){r.prototype.canFit=function(t){return this.width>=t.width-1&&this.height>=t.height-1};var s=t.create("packery");s.Item=e;e=s.prototype;function h(t,i){return t.position.y-i.position.y||t.position.x-i.position.x}function n(t,i){return t.position.x-i.position.x||t.position.y-i.position.y}e._create=function(){t.prototype._create.call(this),this.packer=new i,this.shiftPacker=new i,this.isEnabled=!0,this.dragItemCount=0;var e=this;this.handleDraggabilly={dragStart:function(){e.itemDragStart(this.element)},dragMove:function(){e.itemDragMove(this.element,this.position.x,this.position.y)},dragEnd:function(){e.itemDragEnd(this.element)}},this.handleUIDraggable={start:function(t,i){i&&e.itemDragStart(t.currentTarget)},drag:function(t,i){i&&e.itemDragMove(t.currentTarget,i.position.left,i.position.top)},stop:function(t,i){i&&e.itemDragEnd(t.currentTarget)}}},e._resetLayout=function(){var t,i,e;this.getSize(),this._getMeasurements(),e=this._getOption("horizontal")?(t=1/0,i=this.size.innerHeight+this.gutter,"rightwardTopToBottom"):(t=this.size.innerWidth+this.gutter,i=1/0,"downwardLeftToRight"),this.packer.width=this.shiftPacker.width=t,this.packer.height=this.shiftPacker.height=i,this.packer.sortDirection=this.shiftPacker.sortDirection=e,this.packer.reset(),this.maxY=0,this.maxX=0},e._getMeasurements=function(){this._getMeasurement("columnWidth","width"),this._getMeasurement("rowHeight","height"),this._getMeasurement("gutter","width")},e._getItemLayoutPosition=function(t){var i;return this._setRectSize(t.element,t.rect),this.isShifting||0<this.dragItemCount?(i=this._getPackMethod(),this.packer[i](t.rect)):this.packer.pack(t.rect),this._setMaxXY(t.rect),t.rect},e.shiftLayout=function(){this.isShifting=!0,this.layout(),delete this.isShifting},e._getPackMethod=function(){return this._getOption("horizontal")?"rowPack":"columnPack"},e._setMaxXY=function(t){this.maxX=Math.max(t.x+t.width,this.maxX),this.maxY=Math.max(t.y+t.height,this.maxY)},e._setRectSize=function(t,i){var e=c(t),t=e.outerWidth,e=e.outerHeight;(t||e)&&(t=this._applyGridGutter(t,this.columnWidth),e=this._applyGridGutter(e,this.rowHeight)),i.width=Math.min(t,this.packer.width),i.height=Math.min(e,this.packer.height)},e._applyGridGutter=function(t,i){if(!i)return t+this.gutter;var e=t%(i+=this.gutter);return t=Math[e&&e<1?"round":"ceil"](t/i)*i},e._getContainerSize=function(){return this._getOption("horizontal")?{width:this.maxX-this.gutter}:{height:this.maxY-this.gutter}},e._manageStamp=function(t){var i,e=this.getItem(t);i=e&&e.isPlacing?e.rect:(i=this._getElementOffset(t),new r({x:this._getOption("originLeft")?i.left:i.right,y:this._getOption("originTop")?i.top:i.bottom})),this._setRectSize(t,i),this.packer.placed(i),this._setMaxXY(i)},e.sortItemsByPosition=function(){var t=this._getOption("horizontal")?n:h;this.items.sort(t)},e.fit=function(t,i,e){t=this.getItem(t);t&&(this.stamp(t.element),t.enablePlacing(),this.updateShiftTargets(t),i=void 0===i?t.rect.x:i,e=void 0===e?t.rect.y:e,this.shift(t,i,e),this._bindFitEvents(t),t.moveTo(t.rect.x,t.rect.y),this.shiftLayout(),this.unstamp(t.element),this.sortItemsByPosition(),t.disablePlacing())},e._bindFitEvents=function(t){var i=this,e=0;function s(){2==++e&&i.dispatchEvent("fitComplete",null,[t])}t.once("layout",s),this.once("layoutComplete",s)},e.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&(this.options.shiftPercentResize?this.resizeShiftPercentLayout():this.layout())},e.needsResizeLayout=function(){var t=c(this.element),i=this._getOption("horizontal")?"innerHeight":"innerWidth";return t[i]!=this.size[i]},e.resizeShiftPercentLayout=function(){var e,i,s,t=this._getItemsForLayout(this.items),h=this._getOption("horizontal"),n=h?"y":"x",r=h?"height":"width",a=h?"rowHeight":"columnWidth",h=h?"innerHeight":"innerWidth",o=this[a];(o=o&&o+this.gutter)?(this._getMeasurements(),e=this[a]+this.gutter,t.forEach(function(t){var i=Math.round(t.rect[n]/o);t.rect[n]=i*e})):(i=c(this.element)[h]+this.gutter,s=this.packer[r],t.forEach(function(t){t.rect[n]=t.rect[n]/s*i})),this.shiftLayout()},e.itemDragStart=function(t){this.isEnabled&&(this.stamp(t),(t=this.getItem(t))&&(t.enablePlacing(),t.showDropPlaceholder(),this.dragItemCount++,this.updateShiftTargets(t)))},e.updateShiftTargets=function(t){this.shiftPacker.reset(),this._getBoundingRect();var e=this._getOption("originLeft"),s=this._getOption("originTop");this.stamps.forEach(function(t){var i=this.getItem(t);i&&i.isPlacing||(i=this._getElementOffset(t),i=new r({x:e?i.left:i.right,y:s?i.top:i.bottom}),this._setRectSize(t,i),this.shiftPacker.placed(i))},this);var o=this._getOption("horizontal"),i=o?"rowHeight":"columnWidth",c=o?"height":"width";this.shiftTargetKeys=[],this.shiftTargets=[];var g=this[i];if(g=g&&g+this.gutter)for(var i=Math.ceil(t.rect[c]/g),h=Math.floor((this.shiftPacker[c]+this.gutter)/g),u=(h-i)*g,n=0;n<h;n++)this._addShiftTarget(n*g,0,u);else u=this.shiftPacker[c]+this.gutter-t.rect[c],this._addShiftTarget(0,0,u);var t=this._getItemsForLayout(this.items),d=this._getPackMethod();t.forEach(function(t){var i=t.rect;this._setRectSize(t.element,i),this.shiftPacker[d](i),this._addShiftTarget(i.x,i.y,u);var e=o?i.x+i.width:i.x,s=o?i.y:i.y+i.height;if(this._addShiftTarget(e,s,u),g)for(var h=Math.round(i[c]/g),n=1;n<h;n++){var r=o?e:i.x+g*n,a=o?i.y+g*n:s;this._addShiftTarget(r,a,u)}},this)},e._addShiftTarget=function(t,i,e){var s=this._getOption("horizontal")?i:t;0!==s&&e<s||(s=t+","+i,-1!=this.shiftTargetKeys.indexOf(s)||(this.shiftTargetKeys.push(s),this.shiftTargets.push({x:t,y:i})))},e.shift=function(t,i,e){var h,n=1/0,r={x:i,y:e};this.shiftTargets.forEach(function(t){var i,e,s,i=(s=(e=r).x-(i=t).x,i=e.y-i.y,Math.sqrt(s*s+i*i));i<n&&(h=t,n=i)}),t.rect.x=h.x,t.rect.y=h.y};e.itemDragMove=function(t,i,e){var s,h=this.isEnabled&&this.getItem(t);function n(){s.shift(h,i,e),h.positionDropPlaceholder(),s.layout()}h&&(i-=this.size.paddingLeft,e-=this.size.paddingTop,s=this,t=new Date,this._itemDragTime&&t-this._itemDragTime<120?(clearTimeout(this.dragTimeout),this.dragTimeout=setTimeout(n,120)):(n(),this._itemDragTime=t))},e.itemDragEnd=function(t){var i,e,s=this.isEnabled&&this.getItem(t);function h(){2==++i&&(s.element.classList.remove("is-positioning-post-drag"),s.hideDropPlaceholder(),e.dispatchEvent("dragItemPositioned",null,[s]))}s&&(clearTimeout(this.dragTimeout),s.element.classList.add("is-positioning-post-drag"),i=0,e=this,s.once("layout",h),this.once("layoutComplete",h),s.moveTo(s.rect.x,s.rect.y),this.layout(),this.dragItemCount=Math.max(0,this.dragItemCount-1),this.sortItemsByPosition(),s.disablePlacing(),this.unstamp(s.element))},e.bindDraggabillyEvents=function(t){this._bindDraggabillyEvents(t,"on")},e.unbindDraggabillyEvents=function(t){this._bindDraggabillyEvents(t,"off")},e._bindDraggabillyEvents=function(t,i){var e=this.handleDraggabilly;t[i]("dragStart",e.dragStart),t[i]("dragMove",e.dragMove),t[i]("dragEnd",e.dragEnd)},e.bindUIDraggableEvents=function(t){this._bindUIDraggableEvents(t,"on")},e.unbindUIDraggableEvents=function(t){this._bindUIDraggableEvents(t,"off")},e._bindUIDraggableEvents=function(t,i){var e=this.handleUIDraggable;t[i]("dragstart",e.start)[i]("drag",e.drag)[i]("dragstop",e.stop)};var a=e.destroy;return e.destroy=function(){a.apply(this,arguments),this.isEnabled=!1},s.Rect=r,s.Packer=i,s}),function(t,i){i(t.ModulaIsotope.LayoutMode,t.Packery)}(window,function(t,i){var e,t=t.create("packery"),s=t.prototype,h={_getElementOffset:!0,_getMeasurement:!0};for(e in i.prototype)h[e]||(s[e]=i.prototype[e]);var n=s._resetLayout;s._resetLayout=function(){this.packer=this.packer||new i.Packer,this.shiftPacker=this.shiftPacker||new i.Packer,n.apply(this,arguments)};var r=s._getItemLayoutPosition;s._getItemLayoutPosition=function(t){return t.rect=t.rect||new i.Rect,r.call(this,t)};var a=s.needsResizeLayout;s.needsResizeLayout=function(){return this._getOption("horizontal")?this.needsVerticalResizeLayout():a.call(this)};var o=s._getOption;return s._getOption=function(t){return"horizontal"==t?void 0!==this.options.isHorizontal?this.options.isHorizontal:this.options.horizontal:o.apply(this.isotope,arguments)},t});
1
+ !function(t,i){t.Packery=t.Packery||{},t.Packery.Rect=i()}(window,function(){function a(t){for(var i in a.defaults)this[i]=a.defaults[i];for(i in t)this[i]=t[i]}a.defaults={x:0,y:0,width:0,height:0};var t=a.prototype;return t.contains=function(t){var i=t.width||0,e=t.height||0;return this.x<=t.x&&this.y<=t.y&&this.x+this.width>=t.x+i&&this.y+this.height>=t.y+e},t.overlaps=function(t){var i=this.x+this.width,e=this.y+this.height,s=t.x+t.width,h=t.y+t.height;return this.x<s&&i>t.x&&this.y<h&&e>t.y},t.getMaximalFreeRects=function(t){if(!this.overlaps(t))return!1;var i,e=[],s=this.x+this.width,h=this.y+this.height,n=t.x+t.width,r=t.y+t.height;return this.y<t.y&&(i=new a({x:this.x,y:this.y,width:this.width,height:t.y-this.y}),e.push(i)),n<s&&(i=new a({x:n,y:this.y,width:s-n,height:this.height}),e.push(i)),r<h&&(i=new a({x:this.x,y:r,width:this.width,height:h-r}),e.push(i)),this.x<t.x&&(i=new a({x:this.x,y:this.y,width:t.x-this.x,height:this.height}),e.push(i)),e},t.canFit=function(t){return this.width>=t.width&&this.height>=t.height},a}),function(t,i){t=t.Packery=t.Packery||{};t.Packer=i(t.Rect)}(window,function(i){function t(t,i,e){this.width=t||0,this.height=i||0,this.sortDirection=e||"downwardLeftToRight",this.reset()}var e=t.prototype;e.reset=function(){this.spaces=[];var t=new i({x:0,y:0,width:this.width,height:this.height});this.spaces.push(t),this.sorter=s[this.sortDirection]||s.downwardLeftToRight},e.pack=function(t){for(var i=0;i<this.spaces.length;i++){var e=this.spaces[i];if(e.canFit(t)){this.placeInSpace(t,e);break}}},e.columnPack=function(t){for(var i=0;i<this.spaces.length;i++){var e=this.spaces[i];if(e.x<=t.x&&e.x+e.width>=t.x+t.width&&e.height>=t.height-.01){t.y=e.y,this.placed(t);break}}},e.rowPack=function(t){for(var i=0;i<this.spaces.length;i++){var e=this.spaces[i];if(e.y<=t.y&&e.y+e.height>=t.y+t.height&&e.width>=t.width-.01){t.x=e.x,this.placed(t);break}}},e.placeInSpace=function(t,i){t.x=i.x,t.y=i.y,this.placed(t)},e.placed=function(t){for(var i=[],e=0;e<this.spaces.length;e++){var s=this.spaces[e],h=s.getMaximalFreeRects(t);h?i.push.apply(i,h):i.push(s)}this.spaces=i,this.mergeSortSpaces()},e.mergeSortSpaces=function(){t.mergeRects(this.spaces),this.spaces.sort(this.sorter)},e.addSpace=function(t){this.spaces.push(t),this.mergeSortSpaces()},t.mergeRects=function(t){var i=0,e=t[i];t:for(;e;){for(var s=0,h=t[i+s];h;){if(h==e)s++;else{if(h.contains(e)){t.splice(i,1),e=t[i];continue t}e.contains(h)?t.splice(i+s,1):s++}h=t[i+s]}e=t[++i]}return t};var s={downwardLeftToRight:function(t,i){return t.y-i.y||t.x-i.x},rightwardTopToBottom:function(t,i){return t.x-i.x||t.y-i.y}};return t}),function(t,i){t.Packery.Item=i(t.Outlayer,t.Packery.Rect)}(window,function(t,i){function e(){t.Item.apply(this,arguments)}var s="string"==typeof document.documentElement.style.transform?"transform":"WebkitTransform",h=e.prototype=Object.create(t.Item.prototype),n=h._create;h._create=function(){n.call(this),this.rect=new i};var r=h.moveTo;return h.moveTo=function(t,i){var e=Math.abs(this.position.x-t),s=Math.abs(this.position.y-i);this.layout.dragItemCount&&!this.isPlacing&&!this.isTransitioning&&e<1&&s<1?this.goTo(t,i):r.apply(this,arguments)},h.enablePlacing=function(){this.removeTransitionStyles(),this.isTransitioning&&s&&(this.element.style[s]="none"),this.isTransitioning=!1,this.getSize(),this.layout._setRectSize(this.element,this.rect),this.isPlacing=!0},h.disablePlacing=function(){this.isPlacing=!1},h.removeElem=function(){this.element.parentNode.removeChild(this.element),this.layout.packer.addSpace(this.rect),this.emitEvent("remove",[this])},h.showDropPlaceholder=function(){var t=this.dropPlaceholder;t||((t=this.dropPlaceholder=document.createElement("div")).className="packery-drop-placeholder",t.style.position="absolute"),t.style.width=this.size.width+"px",t.style.height=this.size.height+"px",this.positionDropPlaceholder(),this.layout.element.appendChild(t)},h.positionDropPlaceholder=function(){this.dropPlaceholder.style[s]="translate("+this.rect.x+"px, "+this.rect.y+"px)"},h.hideDropPlaceholder=function(){this.layout.element.removeChild(this.dropPlaceholder)},e}),function(t,i){t.Packery=i(t.getSize,t.Outlayer,t.Packery.Rect,t.Packery.Packer,t.Packery.Item)}(window,function(c,t,r,i,e){r.prototype.canFit=function(t){return this.width>=t.width-1&&this.height>=t.height-1};var s=t.create("packery");s.Item=e;e=s.prototype;function h(t,i){return t.position.y-i.position.y||t.position.x-i.position.x}function n(t,i){return t.position.x-i.position.x||t.position.y-i.position.y}e._create=function(){t.prototype._create.call(this),this.packer=new i,this.shiftPacker=new i,this.isEnabled=!0,this.dragItemCount=0;var e=this;this.handleDraggabilly={dragStart:function(){e.itemDragStart(this.element)},dragMove:function(){e.itemDragMove(this.element,this.position.x,this.position.y)},dragEnd:function(){e.itemDragEnd(this.element)}},this.handleUIDraggable={start:function(t,i){i&&e.itemDragStart(t.currentTarget)},drag:function(t,i){i&&e.itemDragMove(t.currentTarget,i.position.left,i.position.top)},stop:function(t,i){i&&e.itemDragEnd(t.currentTarget)}}},e._resetLayout=function(){var t,i,e;this.getSize(),this._getMeasurements(),e=this._getOption("horizontal")?(t=1/0,i=this.size.innerHeight+this.gutter,"rightwardTopToBottom"):(t=this.size.innerWidth+this.gutter,i=1/0,"downwardLeftToRight"),this.packer.width=this.shiftPacker.width=t,this.packer.height=this.shiftPacker.height=i,this.packer.sortDirection=this.shiftPacker.sortDirection=e,this.packer.reset(),this.maxY=0,this.maxX=0},e._getMeasurements=function(){this._getMeasurement("columnWidth","width"),this._getMeasurement("rowHeight","height"),this._getMeasurement("gutter","width")},e._getItemLayoutPosition=function(t){var i;return this._setRectSize(t.element,t.rect),this.isShifting||0<this.dragItemCount?(i=this._getPackMethod(),this.packer[i](t.rect)):this.packer.pack(t.rect),this._setMaxXY(t.rect),t.rect},e.shiftLayout=function(){this.isShifting=!0,this.layout(),delete this.isShifting},e._getPackMethod=function(){return this._getOption("horizontal")?"rowPack":"columnPack"},e._setMaxXY=function(t){this.maxX=Math.max(t.x+t.width,this.maxX),this.maxY=Math.max(t.y+t.height,this.maxY)},e._setRectSize=function(t,i){var e=c(t),t=e.outerWidth,e=e.outerHeight;(t||e)&&(t=this._applyGridGutter(t,this.columnWidth),e=this._applyGridGutter(e,this.rowHeight)),i.width=Math.min(t,this.packer.width),i.height=Math.min(e,this.packer.height)},e._applyGridGutter=function(t,i){if(!i)return t+this.gutter;var e=t%(i+=this.gutter);return t=Math[e&&e<1?"round":"ceil"](t/i)*i},e._getContainerSize=function(){return this._getOption("horizontal")?{width:this.maxX-this.gutter}:{height:this.maxY-this.gutter}},e._manageStamp=function(t){var i,e=this.getItem(t);i=e&&e.isPlacing?e.rect:(i=this._getElementOffset(t),new r({x:this._getOption("originLeft")?i.left:i.right,y:this._getOption("originTop")?i.top:i.bottom})),this._setRectSize(t,i),this.packer.placed(i),this._setMaxXY(i)},e.sortItemsByPosition=function(){var t=this._getOption("horizontal")?n:h;this.items.sort(t)},e.fit=function(t,i,e){t=this.getItem(t);t&&(this.stamp(t.element),t.enablePlacing(),this.updateShiftTargets(t),i=void 0===i?t.rect.x:i,e=void 0===e?t.rect.y:e,this.shift(t,i,e),this._bindFitEvents(t),t.moveTo(t.rect.x,t.rect.y),this.shiftLayout(),this.unstamp(t.element),this.sortItemsByPosition(),t.disablePlacing())},e._bindFitEvents=function(t){var i=this,e=0;function s(){2==++e&&i.dispatchEvent("fitComplete",null,[t])}t.once("layout",s),this.once("layoutComplete",s)},e.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&(this.options.shiftPercentResize?this.resizeShiftPercentLayout():this.layout())},e.needsResizeLayout=function(){var t=c(this.element),i=this._getOption("horizontal")?"innerHeight":"innerWidth";return t[i]!=this.size[i]},e.resizeShiftPercentLayout=function(){var e,i,s,t=this._getItemsForLayout(this.items),h=this._getOption("horizontal"),n=h?"y":"x",r=h?"height":"width",a=h?"rowHeight":"columnWidth",h=h?"innerHeight":"innerWidth",o=this[a];(o=o&&o+this.gutter)?(this._getMeasurements(),e=this[a]+this.gutter,t.forEach(function(t){var i=Math.round(t.rect[n]/o);t.rect[n]=i*e})):(i=c(this.element)[h]+this.gutter,s=this.packer[r],t.forEach(function(t){t.rect[n]=t.rect[n]/s*i})),this.shiftLayout()},e.itemDragStart=function(t){this.isEnabled&&(this.stamp(t),(t=this.getItem(t))&&(t.enablePlacing(),t.showDropPlaceholder(),this.dragItemCount++,this.updateShiftTargets(t)))},e.updateShiftTargets=function(t){this.shiftPacker.reset(),this._getBoundingRect();var e=this._getOption("originLeft"),s=this._getOption("originTop");this.stamps.forEach(function(t){var i=this.getItem(t);i&&i.isPlacing||(i=this._getElementOffset(t),i=new r({x:e?i.left:i.right,y:s?i.top:i.bottom}),this._setRectSize(t,i),this.shiftPacker.placed(i))},this);var o=this._getOption("horizontal"),i=o?"rowHeight":"columnWidth",c=o?"height":"width";this.shiftTargetKeys=[],this.shiftTargets=[];var g=this[i];if(g=g&&g+this.gutter)for(var i=Math.ceil(t.rect[c]/g),h=Math.floor((this.shiftPacker[c]+this.gutter)/g),u=(h-i)*g,n=0;n<h;n++)this._addShiftTarget(n*g,0,u);else u=this.shiftPacker[c]+this.gutter-t.rect[c],this._addShiftTarget(0,0,u);var t=this._getItemsForLayout(this.items),d=this._getPackMethod();t.forEach(function(t){var i=t.rect;this._setRectSize(t.element,i),this.shiftPacker[d](i),this._addShiftTarget(i.x,i.y,u);var e=o?i.x+i.width:i.x,s=o?i.y:i.y+i.height;if(this._addShiftTarget(e,s,u),g)for(var h=Math.round(i[c]/g),n=1;n<h;n++){var r=o?e:i.x+g*n,a=o?i.y+g*n:s;this._addShiftTarget(r,a,u)}},this)},e._addShiftTarget=function(t,i,e){var s=this._getOption("horizontal")?i:t;0!==s&&e<s||(s=t+","+i,-1!=this.shiftTargetKeys.indexOf(s)||(this.shiftTargetKeys.push(s),this.shiftTargets.push({x:t,y:i})))},e.shift=function(t,i,e){var h,n=1/0,r={x:i,y:e};this.shiftTargets.forEach(function(t){var i,e,s,i=(s=(e=r).x-(i=t).x,i=e.y-i.y,Math.sqrt(s*s+i*i));i<n&&(h=t,n=i)}),t.rect.x=h.x,t.rect.y=h.y};e.itemDragMove=function(t,i,e){var s,h=this.isEnabled&&this.getItem(t);function n(){s.shift(h,i,e),h.positionDropPlaceholder(),s.layout()}h&&(i-=this.size.paddingLeft,e-=this.size.paddingTop,s=this,t=new Date,this._itemDragTime&&t-this._itemDragTime<120?(clearTimeout(this.dragTimeout),this.dragTimeout=setTimeout(n,120)):(n(),this._itemDragTime=t))},e.itemDragEnd=function(t){var i,e,s=this.isEnabled&&this.getItem(t);function h(){2==++i&&(s.element.classList.remove("is-positioning-post-drag"),s.hideDropPlaceholder(),e.dispatchEvent("dragItemPositioned",null,[s]))}s&&(clearTimeout(this.dragTimeout),s.element.classList.add("is-positioning-post-drag"),i=0,e=this,s.once("layout",h),this.once("layoutComplete",h),s.moveTo(s.rect.x,s.rect.y),this.layout(),this.dragItemCount=Math.max(0,this.dragItemCount-1),this.sortItemsByPosition(),s.disablePlacing(),this.unstamp(s.element))},e.bindDraggabillyEvents=function(t){this._bindDraggabillyEvents(t,"on")},e.unbindDraggabillyEvents=function(t){this._bindDraggabillyEvents(t,"off")},e._bindDraggabillyEvents=function(t,i){var e=this.handleDraggabilly;t[i]("dragStart",e.dragStart),t[i]("dragMove",e.dragMove),t[i]("dragEnd",e.dragEnd)},e.bindUIDraggableEvents=function(t){this._bindUIDraggableEvents(t,"on")},e.unbindUIDraggableEvents=function(t){this._bindUIDraggableEvents(t,"off")},e._bindUIDraggableEvents=function(t,i){var e=this.handleUIDraggable;t[i]("dragstart",e.start)[i]("drag",e.drag)[i]("dragstop",e.stop)};var a=e.destroy;return e.destroy=function(){a.apply(this,arguments),this.isEnabled=!1},s.Rect=r,s.Packer=i,s}),function(t,i){i(t.ModulaIsotope.LayoutMode,t.Packery)}(window,function(t,i){var e,t=t.create("packery"),s=t.prototype,h={_getElementOffset:!0,_getMeasurement:!0};for(e in i.prototype)h[e]||(s[e]=i.prototype[e]);var n=s._resetLayout;s._resetLayout=function(){this.packer=this.packer||new i.Packer,this.shiftPacker=this.shiftPacker||new i.Packer,n.apply(this,arguments)};var r=s._getItemLayoutPosition;s._getItemLayoutPosition=function(t){return t.rect=t.rect||new i.Rect,r.call(this,t)};var a=s.needsResizeLayout;s.needsResizeLayout=function(){return this._getOption("horizontal")?this.needsVerticalResizeLayout():a.call(this)};var o=s._getOption;return s._getOption=function(t){return"horizontal"==t?void 0!==this.options.isHorizontal?this.options.isHorizontal:this.options.horizontal:o.apply(this.isotope,arguments)},t});
assets/js/front/isotope.min.js CHANGED
@@ -1 +1 @@
1
- !function(t,e){t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";var i=Array.prototype.slice,n=t.console,d=void 0===n?function(){}:function(t){n.error(t)};function o(h,u,l){(l=l||e||t.jQuery)&&(u.prototype.option||(u.prototype.option=function(t){l.isPlainObject(t)&&(this.options=l.extend(!0,this.options,t))}),l.fn[h]=function(t){if("string"!=typeof t)return a=t,this.each(function(t,e){var i=l.data(e,h);i?(i.option(a),i._init()):(i=new u(e,a),l.data(e,h,i))}),this;var n,o,s,r,a,e=i.call(arguments,1);return o=e,r="$()."+h+'("'+(n=t)+'")',(t=this).each(function(t,e){var i=l.data(e,h);i?(e=i[n])&&"_"!=n.charAt(0)?(i=e.apply(i,o),s=void 0===s?i:s):d(r+" is not a valid method"):d(h+" not initialized. Cannot call methods, i.e. "+r)}),void 0!==s?s:t},s(l))}function s(t){!t||t&&t.bridget||(t.bridget=o)}return s(e||t.jQuery),o}),function(t){function e(){}t.EvEmitter=((t=e.prototype).on=function(t,e){if(t&&e){var i=this._events=this._events||{},t=i[t]=i[t]||[];return-1==t.indexOf(e)&&t.push(e),this}},t.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this}},t.off=function(t,e){t=this._events&&this._events[t];if(t&&t.length){e=t.indexOf(e);return-1!=e&&t.splice(e,1),this}},t.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o<i.length;o++){var s=i[o];n&&n[s]&&(this.off(t,s),delete n[s]),s.apply(this,e)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e)}("undefined"!=typeof window?window:this),function(t){window.getSize=t()}(function(){"use strict";function m(t){var e=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(e)&&e}var e="undefined"==typeof console?function(){}:function(t){console.error(t)},f=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],p=f.length;function g(t){t=getComputedStyle(t);return t||e("Style returned "+t+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),t}var y,v=!1;function _(t){if(v||(v=!0,(c=document.createElement("div")).style.width="200px",c.style.padding="1px 2px 3px 4px",c.style.borderStyle="solid",c.style.borderWidth="1px 2px 3px 4px",c.style.boxSizing="border-box",(d=document.body||document.documentElement).appendChild(c),l=g(c),y=200==Math.round(m(l.width)),_.isBoxSizeOuter=y,d.removeChild(c)),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var e=g(t);if("none"==e.display)return function(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e<p;e++)t[f[e]]=0;return t}();var i={};i.width=t.offsetWidth,i.height=t.offsetHeight;for(var n=i.isBorderBox="border-box"==e.boxSizing,o=0;o<p;o++){var s=f[o],r=e[s],r=parseFloat(r);i[s]=isNaN(r)?0:r}var a=i.paddingLeft+i.paddingRight,h=i.paddingTop+i.paddingBottom,u=i.marginLeft+i.marginRight,l=i.marginTop+i.marginBottom,d=i.borderLeftWidth+i.borderRightWidth,c=i.borderTopWidth+i.borderBottomWidth,t=n&&y,n=m(e.width);!1!==n&&(i.width=n+(t?0:a+d));n=m(e.height);return!1!==n&&(i.height=n+(t?0:h+c)),i.innerWidth=i.width-(a+d),i.innerHeight=i.height-(h+c),i.outerWidth=i.width+u,i.outerHeight=i.height+l,i}}return _}),window.matchesSelector=function(){"use strict";var i=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i]+"MatchesSelector";if(t[n])return n}}();return function(t,e){return t[i](e)}}(),function(t,e){t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(i,r){var n={};n.extend=function(t,e){for(var i in e)t[i]=e[i];return t},n.modulo=function(t,e){return(t%e+e)%e};var e=Array.prototype.slice;n.makeArray=function(t){return Array.isArray(t)?t:null==t?[]:"object"==typeof t&&"number"==typeof t.length?e.call(t):[t]},n.removeFrom=function(t,e){e=t.indexOf(e);-1!=e&&t.splice(e,1)},n.getParent=function(t,e){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,r(t,e))return t},n.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},n.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},n.filterFindElements=function(t,o){t=n.makeArray(t);var s=[];return t.forEach(function(t){var e;if(e=t,"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)if(o){r(t,o)&&s.push(t);for(var i=t.querySelectorAll(o),n=0;n<i.length;n++)s.push(i[n])}else s.push(t)}),s},n.debounceMethod=function(t,e,n){n=n||100;var o=t.prototype[e],s=e+"Timeout";t.prototype[e]=function(){var t=this[s];clearTimeout(t);var e=arguments,i=this;this[s]=setTimeout(function(){o.apply(i,e),delete i[s]},n)}},n.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},n.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var u=i.console;return n.htmlInit=function(a,h){n.docReady(function(){var t=n.toDashed(h),o="data-"+t,e=document.querySelectorAll("["+o+"]"),t=document.querySelectorAll(".js-"+t),t=n.makeArray(e).concat(n.makeArray(t)),s=o+"-options",r=i.jQuery;t.forEach(function(e){var t,i=e.getAttribute(o)||e.getAttribute(s);try{t=i&&JSON.parse(i)}catch(t){return void(u&&u.error("Error parsing "+o+" on "+e.className+": "+t))}var n=new a(e,t);r&&r.data(e,h,n)})})},n}),function(t,e){t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize)}(window,function(t,e){"use strict";var i=document.documentElement.style,n="string"==typeof i.transition?"transition":"WebkitTransition",o="string"==typeof i.transform?"transform":"WebkitTransform",s={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[n],r={transform:o,transition:n,transitionDuration:n+"Duration",transitionProperty:n+"Property",transitionDelay:n+"Delay"};function a(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}t=a.prototype=Object.create(t.prototype);t.constructor=a,t._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},t.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},t.getSize=function(){this.size=e(this.element)},t.css=function(t){var e,i=this.element.style;for(e in t)i[r[e]||e]=t[e]},t.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),n=t[e?"left":"right"],o=t[i?"top":"bottom"],s=parseFloat(n),r=parseFloat(o),t=this.layout.size;-1!=n.indexOf("%")&&(s=s/100*t.width),-1!=o.indexOf("%")&&(r=r/100*t.height),s=isNaN(s)?0:s,r=isNaN(r)?0:r,s-=e?t.paddingLeft:t.paddingRight,r-=i?t.paddingTop:t.paddingBottom,this.position.x=s,this.position.y=r},t.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),o=i?"paddingLeft":"paddingRight",s=i?"left":"right",i=i?"right":"left",o=this.position.x+t[o];e[s]=this.getXValue(o),e[i]="";o=n?"paddingTop":"paddingBottom",i=n?"top":"bottom",n=n?"bottom":"top",o=this.position.y+t[o];e[i]=this.getYValue(o),e[n]="",this.css(e),this.emitEvent("layout",[this])},t.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},t.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},t._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=t==this.position.x&&e==this.position.y;this.setPosition(t,e),!o||this.isTransitioning?(i=t-i,e-=n,(n={}).transform=this.getTranslate(i,e),this.transition({to:n,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})):this.layoutPosition()},t.getTranslate=function(t,e){return"translate3d("+(t=this.layout._getOption("originLeft")?t:-t)+"px, "+(e=this.layout._getOption("originTop")?e:-e)+"px, 0)"},t.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},t.moveTo=t._transitionTo,t.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},t._nonTransition=function(t){for(var e in this.css(t.to),t.isCleaning&&this._removeStyles(t.to),t.onTransitionEnd)t.onTransitionEnd[e].call(this)},t.transition=function(t){if(parseFloat(this.layout.options.transitionDuration)){var e,i=this._transn;for(e in t.onTransitionEnd)i.onEnd[e]=t.onTransitionEnd[e];for(e in t.to)i.ingProperties[e]=!0,t.isCleaning&&(i.clean[e]=!0);t.from&&(this.css(t.from),this.element.offsetHeight,0),this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0}else this._nonTransition(t)};var h="opacity,"+o.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()});t.enableTransition=function(){var t;this.isTransitioning||(t="number"==typeof(t=this.layout.options.transitionDuration)?t+"ms":t,this.css({transitionProperty:h,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(s,this,!1))},t.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},t.onotransitionend=function(t){this.ontransitionend(t)};var u={"-webkit-transform":"transform"};t.ontransitionend=function(t){var e,i;t.target===this.element&&(e=this._transn,i=u[t.propertyName]||t.propertyName,delete e.ingProperties[i],function(t){for(var e in t)return;return 1}(e.ingProperties)&&this.disableTransition(),i in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[i]),i in e.onEnd&&(e.onEnd[i].call(this),delete e.onEnd[i]),this.emitEvent("transitionEnd",[this]))},t.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(s,this,!1),this.isTransitioning=!1},t._removeStyles=function(t){var e,i={};for(e in t)i[e]="";this.css(i)};var l={transitionProperty:"",transitionDuration:"",transitionDelay:""};return t.removeTransitionStyles=function(){this.css(l)},t.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},t.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},t.remove=function(){n&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),this.hide()):this.removeElem()},t.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},t.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},t.getHideRevealTransitionEndProperty=function(t){var e,t=this.layout.options[t];if(t.opacity)return"opacity";for(e in t)return e},t.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},t.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},t.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},a}),function(t,e){"use strict";t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,o,n,s){"use strict";function i(){}var r=t.console,a=t.jQuery,h=0,u={};function l(t,e){var i=n.getQueryElement(t);i?(this.element=i,a&&(this.$element=a(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e),e=++h,this.element.outlayerGUID=e,(u[e]=this)._create(),this._getOption("initLayout")&&this.layout()):r&&r.error("Bad element for "+this.constructor.namespace+": "+(i||t))}l.namespace="outlayer",l.Item=s,l.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var d=l.prototype;function c(t){function e(){t.apply(this,arguments)}return(e.prototype=Object.create(t.prototype)).constructor=e}n.extend(d,e.prototype),d.option=function(t){n.extend(this.options,t)},d._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},l.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},d._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle),this._getOption("resize")&&this.bindResize()},d.reloadItems=function(){this.items=this._itemize(this.element.children)},d._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0;o<e.length;o++){var s=new i(e[o],this);n.push(s)}return n},d._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},d.getItemElements=function(){return this.items.map(function(t){return t.element})},d.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),t=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},d._init=d.layout,d._resetLayout=function(){this.getSize()},d.getSize=function(){this.size=o(this.element)},d._getMeasurement=function(t,e){var i,n=this.options[t];n?("string"==typeof n?i=this.element.querySelector(n):n instanceof HTMLElement&&(i=n),this[t]=i?o(i)[e]:n):this[t]=0},d.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},d._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},d._layoutItems=function(t,i){var n;this._emitCompleteOnItems("layout",t),t&&t.length&&(n=[],t.forEach(function(t){var e=this._getItemLayoutPosition(t);e.item=t,e.isInstant=i||t.isLayoutInstant,n.push(e)},this),this._processLayoutQueue(n))},d._getItemLayoutPosition=function(){return{x:0,y:0}},d._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},d.updateStagger=function(){var t=this.options.stagger;if(null!=t)return this.stagger=function(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),t=e&&e[1],e=e&&e[2];if(!t.length)return 0;t=parseFloat(t);e=m[e]||1;return t*e}(t),this.stagger;this.stagger=0},d._positionItem=function(t,e,i,n,o){n?t.goTo(e,i):(t.stagger(o*this.stagger),t.moveTo(e,i))},d._postLayout=function(){this.resizeContainer()},d.resizeContainer=function(){var t;!this._getOption("resizeContainer")||(t=this._getContainerSize())&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))},d._getContainerSize=i,d._setContainerMeasure=function(t,e){var i;void 0!==t&&((i=this.size).isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px")},d._emitCompleteOnItems=function(e,t){var i=this;function n(){i.dispatchEvent(e+"Complete",null,[t])}var o,s=t.length;function r(){++o==s&&n()}t&&s?(o=0,t.forEach(function(t){t.once(e,r)})):n()},d.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;this.emitEvent(t,n),a&&(this.$element=this.$element||a(this.element),e?((e=a.Event(e)).type=t,this.$element.trigger(e,i)):this.$element.trigger(t,i))},d.ignore=function(t){t=this.getItem(t);t&&(t.isIgnored=!0)},d.unignore=function(t){t=this.getItem(t);t&&delete t.isIgnored},d.stamp=function(t){(t=this._find(t))&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},d.unstamp=function(t){(t=this._find(t))&&t.forEach(function(t){n.removeFrom(this.stamps,t),this.unignore(t)},this)},d._find=function(t){if(t)return"string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)},d._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},d._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},d._manageStamp=i,d._getElementOffset=function(t){var e=t.getBoundingClientRect(),i=this._boundingRect,t=o(t);return{left:e.left-i.left-t.marginLeft,top:e.top-i.top-t.marginTop,right:i.right-e.right-t.marginRight,bottom:i.bottom-e.bottom-t.marginBottom}},d.handleEvent=n.handleEvent,d.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},d.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},d.onresize=function(){this.resize()},n.debounceMethod(l,"onresize",100),d.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},d.needsResizeLayout=function(){var t=o(this.element);return this.size&&t&&t.innerWidth!==this.size.innerWidth},d.addItems=function(t){t=this._itemize(t);return t.length&&(this.items=this.items.concat(t)),t},d.appended=function(t){t=this.addItems(t);t.length&&(this.layoutItems(t,!0),this.reveal(t))},d.prepended=function(t){var e=this._itemize(t);e.length&&(t=this.items.slice(0),this.items=e.concat(t),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(t))},d.reveal=function(t){var i;this._emitCompleteOnItems("reveal",t),t&&t.length&&(i=this.updateStagger(),t.forEach(function(t,e){t.stagger(e*i),t.reveal()}))},d.hide=function(t){var i;this._emitCompleteOnItems("hide",t),t&&t.length&&(i=this.updateStagger(),t.forEach(function(t,e){t.stagger(e*i),t.hide()}))},d.revealItemElements=function(t){t=this.getItems(t);this.reveal(t)},d.hideItemElements=function(t){t=this.getItems(t);this.hide(t)},d.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},d.getItems=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){t=this.getItem(t);t&&e.push(t)},this),e},d.remove=function(t){t=this.getItems(t);this._emitCompleteOnItems("remove",t),t&&t.length&&t.forEach(function(t){t.remove(),n.removeFrom(this.items,t)},this)},d.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();t=this.element.outlayerGUID;delete u[t],delete this.element.outlayerGUID,a&&a.removeData(this.element,this.constructor.namespace)},l.data=function(t){t=(t=n.getQueryElement(t))&&t.outlayerGUID;return t&&u[t]},l.create=function(t,e){var i=c(l);return i.defaults=n.extend({},l.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},l.compatOptions),i.namespace=t,i.data=l.data,i.Item=c(s),n.htmlInit(i,t),a&&a.bridget&&a.bridget(t,i),i};var m={ms:1,s:1e3};return l.Item=s,l}),function(t,e){t.ModulaIsotope=t.ModulaIsotope||{},t.ModulaIsotope.Item=e(t.Outlayer)}(window,function(t){"use strict";function e(){t.Item.apply(this,arguments)}var i=e.prototype=Object.create(t.Item.prototype),n=i._create;i._create=function(){this.id=this.layout.itemGUID++,n.call(this),this.sortData={}},i.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t,e=this.layout.options.getSortData,i=this.layout._sorters;for(t in e){var n=i[t];this.sortData[t]=n(this.element,this)}}};var o=i.destroy;return i.destroy=function(){o.apply(this,arguments),this.css({display:""})},e}),function(t,e){t.ModulaIsotope=t.ModulaIsotope||{},t.ModulaIsotope.LayoutMode=e(t.getSize,t.Outlayer)}(window,function(e,i){"use strict";function n(t){(this.isotope=t)&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}var o=n.prototype;return["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout","_getOption"].forEach(function(t){o[t]=function(){return i.prototype[t].apply(this.isotope,arguments)}}),o.needsVerticalResizeLayout=function(){var t=e(this.isotope.element);return this.isotope.size&&t&&t.innerHeight!=this.isotope.size.innerHeight},o._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},o.getColumnWidth=function(){this.getSegmentSize("column","Width")},o.getRowHeight=function(){this.getSegmentSize("row","Height")},o.getSegmentSize=function(t,e){var i=t+e,n="outer"+e;this._getMeasurement(i,n),this[i]||(t=this.getFirstItemSize(),this[i]=t&&t[n]||this.isotope.size["inner"+e])},o.getFirstItemSize=function(){var t=this.isotope.filteredItems[0];return t&&t.element&&e(t.element)},o.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},o.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},n.modes={},n.create=function(t,e){function i(){n.apply(this,arguments)}return(i.prototype=Object.create(o)).constructor=i,e&&(i.options=e),n.modes[i.prototype.namespace=t]=i},n}),function(t,e){t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,a){var e=t.create("masonry");e.compatOptions.fitWidth="isFitWidth";t=e.prototype;return t._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},t.measureColumns=function(){this.getContainerWidth(),this.columnWidth||(i=(e=this.items[0])&&e.element,this.columnWidth=i&&a(i).outerWidth||this.containerWidth);var t=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,i=e/t,t=t-e%t,i=Math[t&&t<1?"round":"floor"](i);this.cols=Math.max(i,1)},t.getContainerWidth=function(){var t=this._getOption("fitWidth")?this.element.parentNode:this.element,t=a(t);this.containerWidth=t&&t.innerWidth},t._getItemLayoutPosition=function(t){t.getSize();for(var e=t.size.outerWidth%this.columnWidth,i=Math[e&&e<1?"round":"ceil"](t.size.outerWidth/this.columnWidth),i=Math.min(i,this.cols),n=this[this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition"](i,t),e={x:this.columnWidth*n.col,y:n.y},o=n.y+t.size.outerHeight,s=i+n.col,r=n.col;r<s;r++)this.colYs[r]=o;return e},t._getTopColPosition=function(t){var e=this._getTopColGroup(t),t=Math.min.apply(Math,e);return{col:e.indexOf(t),y:t}},t._getTopColGroup=function(t){if(t<2)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;n<i;n++)e[n]=this._getColGroupY(n,t);return e},t._getColGroupY=function(t,e){if(e<2)return this.colYs[t];e=this.colYs.slice(t,t+e);return Math.max.apply(Math,e)},t._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,i=1<t&&i+t>this.cols?0:i,e=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=e?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},t._manageStamp=function(t){var e=a(t),i=this._getElementOffset(t),n=this._getOption("originLeft")?i.left:i.right,t=n+e.outerWidth,n=Math.floor(n/this.columnWidth),n=Math.max(0,n),o=Math.floor(t/this.columnWidth);o-=t%this.columnWidth?0:1,o=Math.min(this.cols-1,o);for(var s=(this._getOption("originTop")?i.top:i.bottom)+e.outerHeight,r=n;r<=o;r++)this.colYs[r]=Math.max(s,this.colYs[r])},t._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},t._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},t.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},e}),function(t,e){e(t.ModulaIsotope.LayoutMode,t.Masonry)}(window,function(t,e){"use strict";var i,t=t.create("masonry"),n=t.prototype,o={_getElementOffset:!0,layout:!0,_getMeasurement:!0};for(i in e.prototype)o[i]||(n[i]=e.prototype[i]);var s=n.measureColumns;n.measureColumns=function(){this.items=this.isotope.filteredItems,s.call(this)};var r=n._getOption;return n._getOption=function(t){return"fitWidth"==t?void 0!==this.options.isFitWidth?this.options.isFitWidth:this.options.fitWidth:r.apply(this.isotope,arguments)},t}),function(){"use strict";var t=window.ModulaIsotope.LayoutMode.create("fitRows");(t=t.prototype)._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},t._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth+this.gutter,i=this.isotope.size.innerWidth+this.gutter;0!==this.x&&e+this.x>i&&(this.x=0,this.y=this.maxY);i={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=e,i},t._getContainerSize=function(){return{height:this.maxY}}}(),function(){"use strict";var t=window.ModulaIsotope.LayoutMode.create("vertical",{horizontalAlignment:0});(t=t.prototype)._resetLayout=function(){this.y=0},t._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},t._getContainerSize=function(){return{height:this.y}}}(),function(t,e){t.ModulaIsotope=e(t,t.Outlayer,t.getSize,t.matchesSelector,t.fizzyUIUtils,t.ModulaIsotope.Item,t.ModulaIsotope.LayoutMode)}(window,function(t,i,e,n,s,o,r){var a=t.jQuery,h=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},u=i.create("modulaisotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});u.Item=o,u.LayoutMode=r;o=u.prototype;o._create=function(){for(var t in this.itemGUID=0,this._sorters={},this._getSorters(),i.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"],r.modes)this._initLayoutMode(t)},o.reloadItems=function(){this.itemGUID=0,i.prototype.reloadItems.call(this)},o._itemize=function(){for(var t=i.prototype._itemize.apply(this,arguments),e=0;e<t.length;e++)t[e].id=this.itemGUID++;return this._updateItemsSortData(t),t},o._initLayoutMode=function(t){var e=r.modes[t],i=this.options[t]||{};this.options[t]=e.options?s.extend(e.options,i):i,this.modes[t]=new e(this)},o.layout=function(){this._isLayoutInited||!this._getOption("initLayout")?this._layout():this.arrange()},o._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},o.arrange=function(t){this.option(t),this._getIsInstant();t=this._filter(this.items);this.filteredItems=t.matches,this._bindArrangeComplete(),this._isInstant?this._noTransition(this._hideReveal,[t]):this._hideReveal(t),this._sort(),this._layout()},o._init=o.arrange,o._hideReveal=function(t){this.reveal(t.needReveal),this.hide(t.needHide)},o._getIsInstant=function(){var t=this._getOption("layoutInstant"),t=void 0!==t?t:!this._isLayoutInited;return this._isInstant=t},o._bindArrangeComplete=function(){var t,e,i,n=this;function o(){t&&e&&i&&n.dispatchEvent("arrangeComplete",null,[n.filteredItems])}this.once("layoutComplete",function(){t=!0,o()}),this.once("hideComplete",function(){e=!0,o()}),this.once("revealComplete",function(){i=!0,o()})},o._filter=function(t){for(var e=(e=this.options.filter)||"*",i=[],n=[],o=[],s=this._getFilterTest(e),r=0;r<t.length;r++){var a,h=t[r];h.isIgnored||((a=s(h))&&i.push(h),a&&h.isHidden?n.push(h):a||h.isHidden||o.push(h))}return{matches:i,needReveal:n,needHide:o}},o._getFilterTest=function(e){return a&&this.options.isJQueryFiltering?function(t){return a(t.element).is(e)}:"function"==typeof e?function(t){return e(t.element)}:function(t){return n(t.element,e)}},o.updateSortData=function(t){t=t?(t=s.makeArray(t),this.getItems(t)):this.items;this._getSorters(),this._updateItemsSortData(t)},o._getSorters=function(){var t,e=this.options.getSortData;for(t in e){var i=e[t];this._sorters[t]=l(i)}},o._updateItemsSortData=function(t){for(var e=t&&t.length,i=0;e&&i<e;i++)t[i].updateSortData()};var l=function(t){if("string"!=typeof t)return t;var e=h(t).split(" "),i=e[0],n=i.match(/^\[(.+)\]$/),o=function(e,i){if(e)return function(t){return t.getAttribute(e)};return function(t){t=t.querySelector(i);return t&&t.textContent}}(n&&n[1],i),s=u.sortDataParsers[e[1]];return t=s?function(t){return t&&s(o(t))}:function(t){return t&&o(t)}};u.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},o._sort=function(){var t,r,a;this.options.sortBy&&(t=s.makeArray(this.options.sortBy),this._getIsSameSortBy(t)||(this.sortHistory=t.concat(this.sortHistory)),r=this.sortHistory,a=this.options.sortAscending,t=function(t,e){for(var i=0;i<r.length;i++){var n=r[i],o=t.sortData[n],s=e.sortData[n];if(s<o||o<s)return(s<o?1:-1)*((void 0!==a[n]?a[n]:a)?1:-1)}return 0},this.filteredItems.sort(t))},o._getIsSameSortBy=function(t){for(var e=0;e<t.length;e++)if(t[e]!=this.sortHistory[e])return!1;return!0},o._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw new Error("No layout mode: "+t);return e.options=this.options[t],e},o._resetLayout=function(){i.prototype._resetLayout.call(this),this._mode()._resetLayout()},o._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},o._manageStamp=function(t){this._mode()._manageStamp(t)},o._getContainerSize=function(){return this._mode()._getContainerSize()},o.needsResizeLayout=function(){return this._mode().needsResizeLayout()},o.appended=function(t){t=this.addItems(t);t.length&&(t=this._filterRevealAdded(t),this.filteredItems=this.filteredItems.concat(t))},o.prepended=function(t){var e=this._itemize(t);e.length&&(this._resetLayout(),this._manageStamps(),t=this._filterRevealAdded(e),this.layoutItems(this.filteredItems),this.filteredItems=t.concat(this.filteredItems),this.items=e.concat(this.items))},o._filterRevealAdded=function(t){t=this._filter(t);return this.hide(t.needHide),this.reveal(t.matches),this.layoutItems(t.matches,!0),t.matches},o.insert=function(t){var e=this.addItems(t);if(e.length){for(var i,n=e.length,o=0;o<n;o++)i=e[o],this.element.appendChild(i.element);t=this._filter(e).matches;for(o=0;o<n;o++)e[o].isLayoutInstant=!0;for(this.arrange(),o=0;o<n;o++)delete e[o].isLayoutInstant;this.reveal(t)}};var d=o.remove;return o.remove=function(t){t=s.makeArray(t);var e=this.getItems(t);d.call(this,t);for(var i=e&&e.length,n=0;i&&n<i;n++){var o=e[n];s.removeFrom(this.filteredItems,o)}},o.shuffle=function(){for(var t=0;t<this.items.length;t++)this.items[t].sortData.random=Math.random();this.options.sortBy="random",this._sort(),this._layout()},o._noTransition=function(t,e){var i=this.options.transitionDuration;this.options.transitionDuration=0;e=t.apply(this,e);return this.options.transitionDuration=i,e},o.getFilteredItemElements=function(){return this.filteredItems.map(function(t){return t.element})},u});
1
+ !function(t,e){t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";var i=Array.prototype.slice,n=t.console,d=void 0===n?function(){}:function(t){n.error(t)};function o(h,u,l){(l=l||e||t.jQuery)&&(u.prototype.option||(u.prototype.option=function(t){l.isPlainObject(t)&&(this.options=l.extend(!0,this.options,t))}),l.fn[h]=function(t){if("string"!=typeof t)return a=t,this.each(function(t,e){var i=l.data(e,h);i?(i.option(a),i._init()):(i=new u(e,a),l.data(e,h,i))}),this;var n,o,s,r,a,e=i.call(arguments,1);return o=e,r="$()."+h+'("'+(n=t)+'")',(t=this).each(function(t,e){var i=l.data(e,h);i?(e=i[n])&&"_"!=n.charAt(0)?(i=e.apply(i,o),s=void 0===s?i:s):d(r+" is not a valid method"):d(h+" not initialized. Cannot call methods, i.e. "+r)}),void 0!==s?s:t},s(l))}function s(t){!t||t&&t.bridget||(t.bridget=o)}return s(e||t.jQuery),o}),function(t){function e(){}t.EvEmitter=((t=e.prototype).on=function(t,e){if(t&&e){var i=this._events=this._events||{},t=i[t]=i[t]||[];return-1==t.indexOf(e)&&t.push(e),this}},t.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this}},t.off=function(t,e){t=this._events&&this._events[t];if(t&&t.length){e=t.indexOf(e);return-1!=e&&t.splice(e,1),this}},t.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o<i.length;o++){var s=i[o];n&&n[s]&&(this.off(t,s),delete n[s]),s.apply(this,e)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e)}("undefined"!=typeof window?window:this),function(t){window.getSize=t()}(function(){"use strict";function m(t){var e=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(e)&&e}var e="undefined"==typeof console?function(){}:function(t){console.error(t)},f=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],p=f.length;function g(t){t=getComputedStyle(t);return t||e("Style returned "+t+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),t}var y,v=!1;function _(t){if(v||(v=!0,(c=document.createElement("div")).style.width="200px",c.style.padding="1px 2px 3px 4px",c.style.borderStyle="solid",c.style.borderWidth="1px 2px 3px 4px",c.style.boxSizing="border-box",(d=document.body||document.documentElement).appendChild(c),l=g(c),y=200==Math.round(m(l.width)),_.isBoxSizeOuter=y,d.removeChild(c)),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var e=g(t);if("none"==e.display)return function(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e<p;e++)t[f[e]]=0;return t}();var i={};i.width=t.offsetWidth,i.height=t.offsetHeight;for(var n=i.isBorderBox="border-box"==e.boxSizing,o=0;o<p;o++){var s=f[o],r=e[s],r=parseFloat(r);i[s]=isNaN(r)?0:r}var a=i.paddingLeft+i.paddingRight,h=i.paddingTop+i.paddingBottom,u=i.marginLeft+i.marginRight,l=i.marginTop+i.marginBottom,d=i.borderLeftWidth+i.borderRightWidth,c=i.borderTopWidth+i.borderBottomWidth,t=n&&y,n=m(e.width);!1!==n&&(i.width=n+(t?0:a+d));n=m(e.height);return!1!==n&&(i.height=n+(t?0:h+c)),i.innerWidth=i.width-(a+d),i.innerHeight=i.height-(h+c),i.outerWidth=i.width+u,i.outerHeight=i.height+l,i}}return _}),window.matchesSelector=function(){"use strict";var i=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i]+"MatchesSelector";if(t[n])return n}}();return function(t,e){return t[i](e)}}(),function(t,e){t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(i,r){var n={};n.extend=function(t,e){for(var i in e)t[i]=e[i];return t},n.modulo=function(t,e){return(t%e+e)%e};var e=Array.prototype.slice;n.makeArray=function(t){return Array.isArray(t)?t:null==t?[]:"object"==typeof t&&"number"==typeof t.length?e.call(t):[t]},n.removeFrom=function(t,e){e=t.indexOf(e);-1!=e&&t.splice(e,1)},n.getParent=function(t,e){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,r(t,e))return t},n.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},n.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},n.filterFindElements=function(t,o){t=n.makeArray(t);var s=[];return t.forEach(function(t){var e;if(e=t,"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)if(o){r(t,o)&&s.push(t);for(var i=t.querySelectorAll(o),n=0;n<i.length;n++)s.push(i[n])}else s.push(t)}),s},n.debounceMethod=function(t,e,n){n=n||100;var o=t.prototype[e],s=e+"Timeout";t.prototype[e]=function(){var t=this[s];clearTimeout(t);var e=arguments,i=this;this[s]=setTimeout(function(){o.apply(i,e),delete i[s]},n)}},n.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},n.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var u=i.console;return n.htmlInit=function(a,h){n.docReady(function(){var t=n.toDashed(h),o="data-"+t,e=document.querySelectorAll("["+o+"]"),t=document.querySelectorAll(".js-"+t),t=n.makeArray(e).concat(n.makeArray(t)),s=o+"-options",r=i.jQuery;t.forEach(function(e){var t,i=e.getAttribute(o)||e.getAttribute(s);try{t=i&&JSON.parse(i)}catch(t){return void(u&&u.error("Error parsing "+o+" on "+e.className+": "+t))}var n=new a(e,t);r&&r.data(e,h,n)})})},n}),function(t,e){t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize)}(window,function(t,e){"use strict";var i=document.documentElement.style,n="string"==typeof i.transition?"transition":"WebkitTransition",o="string"==typeof i.transform?"transform":"WebkitTransform",s={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[n],r={transform:o,transition:n,transitionDuration:n+"Duration",transitionProperty:n+"Property",transitionDelay:n+"Delay"};function a(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}t=a.prototype=Object.create(t.prototype);t.constructor=a,t._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},t.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},t.getSize=function(){this.size=e(this.element)},t.css=function(t){var e,i=this.element.style;for(e in t)i[r[e]||e]=t[e]},t.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),n=t[e?"left":"right"],o=t[i?"top":"bottom"],s=parseFloat(n),r=parseFloat(o),t=this.layout.size;-1!=n.indexOf("%")&&(s=s/100*t.width),-1!=o.indexOf("%")&&(r=r/100*t.height),s=isNaN(s)?0:s,r=isNaN(r)?0:r,s-=e?t.paddingLeft:t.paddingRight,r-=i?t.paddingTop:t.paddingBottom,this.position.x=s,this.position.y=r},t.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),o=i?"paddingLeft":"paddingRight",s=i?"left":"right",i=i?"right":"left",o=this.position.x+t[o];e[s]=this.getXValue(o),e[i]="";o=n?"paddingTop":"paddingBottom",i=n?"top":"bottom",n=n?"bottom":"top",o=this.position.y+t[o];e[i]=this.getYValue(o),e[n]="",this.css(e),this.emitEvent("layout",[this])},t.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},t.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},t._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=t==this.position.x&&e==this.position.y;this.setPosition(t,e),!o||this.isTransitioning?(i=t-i,e-=n,(n={}).transform=this.getTranslate(i,e),this.transition({to:n,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})):this.layoutPosition()},t.getTranslate=function(t,e){return"translate3d("+(t=this.layout._getOption("originLeft")?t:-t)+"px, "+(e=this.layout._getOption("originTop")?e:-e)+"px, 0)"},t.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},t.moveTo=t._transitionTo,t.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},t._nonTransition=function(t){for(var e in this.css(t.to),t.isCleaning&&this._removeStyles(t.to),t.onTransitionEnd)t.onTransitionEnd[e].call(this)},t.transition=function(t){if(parseFloat(this.layout.options.transitionDuration)){var e,i=this._transn;for(e in t.onTransitionEnd)i.onEnd[e]=t.onTransitionEnd[e];for(e in t.to)i.ingProperties[e]=!0,t.isCleaning&&(i.clean[e]=!0);t.from&&(this.css(t.from),this.element.offsetHeight,0),this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0}else this._nonTransition(t)};var h="opacity,"+o.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()});t.enableTransition=function(){var t;this.isTransitioning||(t="number"==typeof(t=this.layout.options.transitionDuration)?t+"ms":t,this.css({transitionProperty:h,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(s,this,!1))},t.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},t.onotransitionend=function(t){this.ontransitionend(t)};var u={"-webkit-transform":"transform"};t.ontransitionend=function(t){var e,i;t.target===this.element&&(e=this._transn,i=u[t.propertyName]||t.propertyName,delete e.ingProperties[i],function(t){for(var e in t)return;return 1}(e.ingProperties)&&this.disableTransition(),i in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[i]),i in e.onEnd&&(e.onEnd[i].call(this),delete e.onEnd[i]),this.emitEvent("transitionEnd",[this]))},t.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(s,this,!1),this.isTransitioning=!1},t._removeStyles=function(t){var e,i={};for(e in t)i[e]="";this.css(i)};var l={transitionProperty:"",transitionDuration:"",transitionDelay:""};return t.removeTransitionStyles=function(){this.css(l)},t.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},t.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},t.remove=function(){n&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),this.hide()):this.removeElem()},t.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},t.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},t.getHideRevealTransitionEndProperty=function(t){var e,t=this.layout.options[t];if(t.opacity)return"opacity";for(e in t)return e},t.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},t.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},t.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},a}),function(t,e){"use strict";t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,o,n,s){"use strict";function i(){}var r=t.console,a=t.jQuery,h=0,u={};function l(t,e){var i=n.getQueryElement(t);i?(this.element=i,a&&(this.$element=a(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e),e=++h,this.element.outlayerGUID=e,(u[e]=this)._create(),this._getOption("initLayout")&&this.layout()):r&&r.error("Bad element for "+this.constructor.namespace+": "+(i||t))}l.namespace="outlayer",l.Item=s,l.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var d=l.prototype;function c(t){function e(){t.apply(this,arguments)}return(e.prototype=Object.create(t.prototype)).constructor=e}n.extend(d,e.prototype),d.option=function(t){n.extend(this.options,t)},d._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},l.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},d._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle),this._getOption("resize")&&this.bindResize()},d.reloadItems=function(){this.items=this._itemize(this.element.children)},d._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0;o<e.length;o++){var s=new i(e[o],this);n.push(s)}return n},d._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},d.getItemElements=function(){return this.items.map(function(t){return t.element})},d.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),t=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},d._init=d.layout,d._resetLayout=function(){this.getSize()},d.getSize=function(){this.size=o(this.element)},d._getMeasurement=function(t,e){var i,n=this.options[t];n?("string"==typeof n?i=this.element.querySelector(n):n instanceof HTMLElement&&(i=n),this[t]=i?o(i)[e]:n):this[t]=0},d.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},d._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},d._layoutItems=function(t,i){var n;this._emitCompleteOnItems("layout",t),t&&t.length&&(n=[],t.forEach(function(t){var e=this._getItemLayoutPosition(t);e.item=t,e.isInstant=i||t.isLayoutInstant,n.push(e)},this),this._processLayoutQueue(n))},d._getItemLayoutPosition=function(){return{x:0,y:0}},d._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},d.updateStagger=function(){var t=this.options.stagger;if(null!=t)return this.stagger=function(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),t=e&&e[1],e=e&&e[2];if(!t.length)return 0;t=parseFloat(t);e=m[e]||1;return t*e}(t),this.stagger;this.stagger=0},d._positionItem=function(t,e,i,n,o){n?t.goTo(e,i):(t.stagger(o*this.stagger),t.moveTo(e,i))},d._postLayout=function(){this.resizeContainer()},d.resizeContainer=function(){var t;!this._getOption("resizeContainer")||(t=this._getContainerSize())&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))},d._getContainerSize=i,d._setContainerMeasure=function(t,e){var i;void 0!==t&&((i=this.size).isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px")},d._emitCompleteOnItems=function(e,t){var i=this;function n(){i.dispatchEvent(e+"Complete",null,[t])}var o,s=t.length;function r(){++o==s&&n()}t&&s?(o=0,t.forEach(function(t){t.once(e,r)})):n()},d.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;this.emitEvent(t,n),a&&(this.$element=this.$element||a(this.element),e?((e=a.Event(e)).type=t,this.$element.trigger(e,i)):this.$element.trigger(t,i))},d.ignore=function(t){t=this.getItem(t);t&&(t.isIgnored=!0)},d.unignore=function(t){t=this.getItem(t);t&&delete t.isIgnored},d.stamp=function(t){(t=this._find(t))&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},d.unstamp=function(t){(t=this._find(t))&&t.forEach(function(t){n.removeFrom(this.stamps,t),this.unignore(t)},this)},d._find=function(t){if(t)return"string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)},d._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},d._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},d._manageStamp=i,d._getElementOffset=function(t){var e=t.getBoundingClientRect(),i=this._boundingRect,t=o(t);return{left:e.left-i.left-t.marginLeft,top:e.top-i.top-t.marginTop,right:i.right-e.right-t.marginRight,bottom:i.bottom-e.bottom-t.marginBottom}},d.handleEvent=n.handleEvent,d.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},d.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},d.onresize=function(){this.resize()},n.debounceMethod(l,"onresize",100),d.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},d.needsResizeLayout=function(){var t=o(this.element);return this.size&&t&&t.innerWidth!==this.size.innerWidth},d.addItems=function(t){t=this._itemize(t);return t.length&&(this.items=this.items.concat(t)),t},d.appended=function(t){t=this.addItems(t);t.length&&(this.layoutItems(t,!0),this.reveal(t))},d.prepended=function(t){var e=this._itemize(t);e.length&&(t=this.items.slice(0),this.items=e.concat(t),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(t))},d.reveal=function(t){var i;this._emitCompleteOnItems("reveal",t),t&&t.length&&(i=this.updateStagger(),t.forEach(function(t,e){t.stagger(e*i),t.reveal()}))},d.hide=function(t){var i;this._emitCompleteOnItems("hide",t),t&&t.length&&(i=this.updateStagger(),t.forEach(function(t,e){t.stagger(e*i),t.hide()}))},d.revealItemElements=function(t){t=this.getItems(t);this.reveal(t)},d.hideItemElements=function(t){t=this.getItems(t);this.hide(t)},d.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},d.getItems=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){t=this.getItem(t);t&&e.push(t)},this),e},d.remove=function(t){t=this.getItems(t);this._emitCompleteOnItems("remove",t),t&&t.length&&t.forEach(function(t){t.remove(),n.removeFrom(this.items,t)},this)},d.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();t=this.element.outlayerGUID;delete u[t],delete this.element.outlayerGUID,a&&a.removeData(this.element,this.constructor.namespace)},l.data=function(t){t=(t=n.getQueryElement(t))&&t.outlayerGUID;return t&&u[t]},l.create=function(t,e){var i=c(l);return i.defaults=n.extend({},l.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},l.compatOptions),i.namespace=t,i.data=l.data,i.Item=c(s),n.htmlInit(i,t),a&&a.bridget&&a.bridget(t,i),i};var m={ms:1,s:1e3};return l.Item=s,l}),function(t,e){t.ModulaIsotope=t.ModulaIsotope||{},t.ModulaIsotope.Item=e(t.Outlayer)}(window,function(t){"use strict";function e(){t.Item.apply(this,arguments)}var i=e.prototype=Object.create(t.Item.prototype),n=i._create;i._create=function(){this.id=this.layout.itemGUID++,n.call(this),this.sortData={}},i.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t,e=this.layout.options.getSortData,i=this.layout._sorters;for(t in e){var n=i[t];this.sortData[t]=n(this.element,this)}}};var o=i.destroy;return i.destroy=function(){o.apply(this,arguments),this.css({display:""})},e}),function(t,e){t.ModulaIsotope=t.ModulaIsotope||{},t.ModulaIsotope.LayoutMode=e(t.getSize,t.Outlayer)}(window,function(e,i){"use strict";function n(t){(this.isotope=t)&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}var o=n.prototype;return["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout","_getOption"].forEach(function(t){o[t]=function(){return i.prototype[t].apply(this.isotope,arguments)}}),o.needsVerticalResizeLayout=function(){var t=e(this.isotope.element);return this.isotope.size&&t&&t.innerHeight!=this.isotope.size.innerHeight},o._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},o.getColumnWidth=function(){this.getSegmentSize("column","Width")},o.getRowHeight=function(){this.getSegmentSize("row","Height")},o.getSegmentSize=function(t,e){var i=t+e,n="outer"+e;this._getMeasurement(i,n),this[i]||(t=this.getFirstItemSize(),this[i]=t&&t[n]||this.isotope.size["inner"+e])},o.getFirstItemSize=function(){var t=this.isotope.filteredItems[0];return t&&t.element&&e(t.element)},o.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},o.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},n.modes={},n.create=function(t,e){function i(){n.apply(this,arguments)}return(i.prototype=Object.create(o)).constructor=i,e&&(i.options=e),n.modes[i.prototype.namespace=t]=i},n}),function(t,e){t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,a){var e=t.create("masonry");e.compatOptions.fitWidth="isFitWidth";t=e.prototype;return t._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},t.measureColumns=function(){this.getContainerWidth(),this.columnWidth||(i=(e=this.items[0])&&e.element,this.columnWidth=i&&a(i).outerWidth||this.containerWidth);var t=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,i=e/t,t=t-e%t,i=Math[t&&t<1?"round":"floor"](i);this.cols=Math.max(i,1)},t.getContainerWidth=function(){var t=this._getOption("fitWidth")?this.element.parentNode:this.element,t=a(t);this.containerWidth=t&&t.innerWidth},t._getItemLayoutPosition=function(t){t.getSize();for(var e=t.size.outerWidth%this.columnWidth,i=Math[e&&e<1?"round":"ceil"](t.size.outerWidth/this.columnWidth),i=Math.min(i,this.cols),n=this[this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition"](i,t),e={x:this.columnWidth*n.col,y:n.y},o=n.y+t.size.outerHeight,s=i+n.col,r=n.col;r<s;r++)this.colYs[r]=o;return e},t._getTopColPosition=function(t){var e=this._getTopColGroup(t),t=Math.min.apply(Math,e);return{col:e.indexOf(t),y:t}},t._getTopColGroup=function(t){if(t<2)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;n<i;n++)e[n]=this._getColGroupY(n,t);return e},t._getColGroupY=function(t,e){if(e<2)return this.colYs[t];e=this.colYs.slice(t,t+e);return Math.max.apply(Math,e)},t._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,i=1<t&&i+t>this.cols?0:i,e=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=e?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},t._manageStamp=function(t){var e=a(t),i=this._getElementOffset(t),n=this._getOption("originLeft")?i.left:i.right,t=n+e.outerWidth,n=Math.floor(n/this.columnWidth),n=Math.max(0,n),o=Math.floor(t/this.columnWidth);o-=t%this.columnWidth?0:1,o=Math.min(this.cols-1,o);for(var s=(this._getOption("originTop")?i.top:i.bottom)+e.outerHeight,r=n;r<=o;r++)this.colYs[r]=Math.max(s,this.colYs[r])},t._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},t._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},t.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},e}),function(t,e){e(t.ModulaIsotope.LayoutMode,t.Masonry)}(window,function(t,e){"use strict";var i,t=t.create("masonry"),n=t.prototype,o={_getElementOffset:!0,layout:!0,_getMeasurement:!0};for(i in e.prototype)o[i]||(n[i]=e.prototype[i]);var s=n.measureColumns;n.measureColumns=function(){this.items=this.isotope.filteredItems,s.call(this)};var r=n._getOption;return n._getOption=function(t){return"fitWidth"==t?void 0!==this.options.isFitWidth?this.options.isFitWidth:this.options.fitWidth:r.apply(this.isotope,arguments)},t}),function(){"use strict";var t=window.ModulaIsotope.LayoutMode.create("fitRows"),t=t.prototype;t._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},t._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth+this.gutter,i=this.isotope.size.innerWidth+this.gutter;0!==this.x&&e+this.x>i&&(this.x=0,this.y=this.maxY);i={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=e,i},t._getContainerSize=function(){return{height:this.maxY}}}(),function(){"use strict";var t=window.ModulaIsotope.LayoutMode.create("vertical",{horizontalAlignment:0}),t=t.prototype;t._resetLayout=function(){this.y=0},t._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},t._getContainerSize=function(){return{height:this.y}}}(),function(t,e){t.ModulaIsotope=e(t,t.Outlayer,t.getSize,t.matchesSelector,t.fizzyUIUtils,t.ModulaIsotope.Item,t.ModulaIsotope.LayoutMode)}(window,function(t,i,e,n,s,o,r){var a=t.jQuery,h=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},u=i.create("modulaisotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});u.Item=o,u.LayoutMode=r;o=u.prototype;o._create=function(){for(var t in this.itemGUID=0,this._sorters={},this._getSorters(),i.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"],r.modes)this._initLayoutMode(t)},o.reloadItems=function(){this.itemGUID=0,i.prototype.reloadItems.call(this)},o._itemize=function(){for(var t=i.prototype._itemize.apply(this,arguments),e=0;e<t.length;e++)t[e].id=this.itemGUID++;return this._updateItemsSortData(t),t},o._initLayoutMode=function(t){var e=r.modes[t],i=this.options[t]||{};this.options[t]=e.options?s.extend(e.options,i):i,this.modes[t]=new e(this)},o.layout=function(){this._isLayoutInited||!this._getOption("initLayout")?this._layout():this.arrange()},o._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},o.arrange=function(t){this.option(t),this._getIsInstant();t=this._filter(this.items);this.filteredItems=t.matches,this._bindArrangeComplete(),this._isInstant?this._noTransition(this._hideReveal,[t]):this._hideReveal(t),this._sort(),this._layout()},o._init=o.arrange,o._hideReveal=function(t){this.reveal(t.needReveal),this.hide(t.needHide)},o._getIsInstant=function(){var t=this._getOption("layoutInstant"),t=void 0!==t?t:!this._isLayoutInited;return this._isInstant=t},o._bindArrangeComplete=function(){var t,e,i,n=this;function o(){t&&e&&i&&n.dispatchEvent("arrangeComplete",null,[n.filteredItems])}this.once("layoutComplete",function(){t=!0,o()}),this.once("hideComplete",function(){e=!0,o()}),this.once("revealComplete",function(){i=!0,o()})},o._filter=function(t){for(var e=(e=this.options.filter)||"*",i=[],n=[],o=[],s=this._getFilterTest(e),r=0;r<t.length;r++){var a,h=t[r];h.isIgnored||((a=s(h))&&i.push(h),a&&h.isHidden?n.push(h):a||h.isHidden||o.push(h))}return{matches:i,needReveal:n,needHide:o}},o._getFilterTest=function(e){return a&&this.options.isJQueryFiltering?function(t){return a(t.element).is(e)}:"function"==typeof e?function(t){return e(t.element)}:function(t){return n(t.element,e)}},o.updateSortData=function(t){t=t?(t=s.makeArray(t),this.getItems(t)):this.items;this._getSorters(),this._updateItemsSortData(t)},o._getSorters=function(){var t,e=this.options.getSortData;for(t in e){var i=e[t];this._sorters[t]=l(i)}},o._updateItemsSortData=function(t){for(var e=t&&t.length,i=0;e&&i<e;i++)t[i].updateSortData()};var l=function(t){if("string"!=typeof t)return t;var e=h(t).split(" "),i=e[0],n=i.match(/^\[(.+)\]$/),o=function(e,i){if(e)return function(t){return t.getAttribute(e)};return function(t){t=t.querySelector(i);return t&&t.textContent}}(n&&n[1],i),s=u.sortDataParsers[e[1]];return t=s?function(t){return t&&s(o(t))}:function(t){return t&&o(t)}};u.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},o._sort=function(){var t,r,a;this.options.sortBy&&(t=s.makeArray(this.options.sortBy),this._getIsSameSortBy(t)||(this.sortHistory=t.concat(this.sortHistory)),r=this.sortHistory,a=this.options.sortAscending,t=function(t,e){for(var i=0;i<r.length;i++){var n=r[i],o=t.sortData[n],s=e.sortData[n];if(s<o||o<s)return(s<o?1:-1)*((void 0!==a[n]?a[n]:a)?1:-1)}return 0},this.filteredItems.sort(t))},o._getIsSameSortBy=function(t){for(var e=0;e<t.length;e++)if(t[e]!=this.sortHistory[e])return!1;return!0},o._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw new Error("No layout mode: "+t);return e.options=this.options[t],e},o._resetLayout=function(){i.prototype._resetLayout.call(this),this._mode()._resetLayout()},o._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},o._manageStamp=function(t){this._mode()._manageStamp(t)},o._getContainerSize=function(){return this._mode()._getContainerSize()},o.needsResizeLayout=function(){return this._mode().needsResizeLayout()},o.appended=function(t){t=this.addItems(t);t.length&&(t=this._filterRevealAdded(t),this.filteredItems=this.filteredItems.concat(t))},o.prepended=function(t){var e=this._itemize(t);e.length&&(this._resetLayout(),this._manageStamps(),t=this._filterRevealAdded(e),this.layoutItems(this.filteredItems),this.filteredItems=t.concat(this.filteredItems),this.items=e.concat(this.items))},o._filterRevealAdded=function(t){t=this._filter(t);return this.hide(t.needHide),this.reveal(t.matches),this.layoutItems(t.matches,!0),t.matches},o.insert=function(t){var e=this.addItems(t);if(e.length){for(var i,n=e.length,o=0;o<n;o++)i=e[o],this.element.appendChild(i.element);t=this._filter(e).matches;for(o=0;o<n;o++)e[o].isLayoutInstant=!0;for(this.arrange(),o=0;o<n;o++)delete e[o].isLayoutInstant;this.reveal(t)}};var d=o.remove;return o.remove=function(t){t=s.makeArray(t);var e=this.getItems(t);d.call(this,t);for(var i=e&&e.length,n=0;i&&n<i;n++){var o=e[n];s.removeFrom(this.filteredItems,o)}},o.shuffle=function(){for(var t=0;t<this.items.length;t++)this.items[t].sortData.random=Math.random();this.options.sortBy="random",this._sort(),this._layout()},o._noTransition=function(t,e){var i=this.options.transitionDuration;this.options.transitionDuration=0;e=t.apply(this,e);return this.options.transitionDuration=i,e},o.getFilteredItemElements=function(){return this.filteredItems.map(function(t){return t.element})},u});
assets/js/front/jquery-modula.js CHANGED
@@ -137,6 +137,13 @@ jQuery(window).on('elementor/frontend/init', function () {
137
  if (instance.isIsotope) {
138
  instance.$itemsCnt.modulaisotope('layout');
139
  }
 
 
 
 
 
 
 
140
  }
141
  });
142
 
@@ -156,6 +163,8 @@ jQuery(window).on('elementor/frontend/init', function () {
156
  // Create social links
157
  this.setupSocial();
158
 
 
 
159
  // Trigger custom gallery JS
160
  if (this.options.onComplete) {
161
  this.options.onComplete();
@@ -514,30 +523,24 @@ jQuery(window).on('elementor/frontend/init', function () {
514
  var instance = this,
515
  source = instance.$items.not('.jtg-hidden').eq(index).find('.pic'),
516
  size = {};
517
-
518
  if ('0' != instance.options.lazyLoad) {
519
  instance.placeImage(index);
520
  return;
521
  }
522
 
523
- if ('undefined' == typeof source.attr('width') && 'undefined' == typeof source.attr('height')) {
524
- var img = new Image();
525
- img.onload = function() {
526
- size = { width: this.width, height: this.height };
527
- source.data('size', size);
528
- instance.placeImage(index);
529
- };
530
-
531
- if ('undefined' != source.attr('src')) {
532
- img.src = source.attr('src');
533
-
534
- } else {
535
- img.src = source.data('src');
536
- }
537
- } else {
538
- size = { width: source.width(), height: source.height() };
539
  source.data('size', size);
540
  instance.placeImage(index);
 
 
 
 
 
 
 
541
  }
542
  };
543
 
137
  if (instance.isIsotope) {
138
  instance.$itemsCnt.modulaisotope('layout');
139
  }
140
+
141
+ if ( 'grid' == instance.options.type ) {
142
+ if ( 'automatic' == instance.options.grid_type ) {
143
+ instance.$itemsCnt.justifiedGallery();
144
+ }
145
+ }
146
+
147
  }
148
  });
149
 
163
  // Create social links
164
  this.setupSocial();
165
 
166
+ // Add init class
167
+ jQuery(instance.$element).addClass('modula-gallery-initialized');
168
  // Trigger custom gallery JS
169
  if (this.options.onComplete) {
170
  this.options.onComplete();
523
  var instance = this,
524
  source = instance.$items.not('.jtg-hidden').eq(index).find('.pic'),
525
  size = {};
526
+
527
  if ('0' != instance.options.lazyLoad) {
528
  instance.placeImage(index);
529
  return;
530
  }
531
 
532
+ var img = new Image();
533
+ img.onload = function() {
534
+ size = { width: this.width, height: this.height };
 
 
 
 
 
 
 
 
 
 
 
 
 
535
  source.data('size', size);
536
  instance.placeImage(index);
537
+ };
538
+
539
+ if ('undefined' != source.attr('src')) {
540
+ img.src = source.attr('src');
541
+
542
+ } else {
543
+ img.src = source.data('src');
544
  }
545
  };
546
 
assets/js/front/jquery-modula.min.js CHANGED
@@ -1 +1 @@
1
- function tg_getURLParameter(t){return decodeURIComponent((new RegExp("[?|&]"+t+"=([^&;]+?)(&|#|;|$)").exec(location.search)||[,""])[1].replace(/\+/g,"%20"))||null}function modulaInViewport(t){"function"==typeof jQuery&&t instanceof jQuery&&(t=t[0]);t=t.getBoundingClientRect();return t.top-jQuery(window).height()<=-100&&-400<=t.top-jQuery(window).height()||t.bottom<=jQuery(window).height()}jQuery(document).on("vc-full-width-row-single vc-full-width-row",function(t,i){0<jQuery("body").find(".modula").length&&jQuery(window).trigger("modula-update")}),jQuery(window).on("elementor/frontend/init",function(){window.elementorFrontend&&window.elementorFrontend.hooks.addAction("frontend/element_ready/global",function(t){0<jQuery("body").find(".modula").length&&jQuery(window).trigger("modula-update")})}),function(u,s,a,t){var n="modulaGallery",e={resizer:"/",keepArea:!0,type:"creative-gallery",columns:12,gutter:10,desktopGutter:10,mobileGutter:10,tabletGutter:10,enableTwitter:!1,enableFacebook:!1,enableWhatsapp:!1,enablePinterest:!1,enableLinkedin:!1,enableEmail:!1,lazyLoad:0,initLightbox:!1,lightbox:"fancybox",lightboxOpts:{},inView:!1};function h(t,i){this.element=t,this.$element=u(t),this.$itemsCnt=this.$element.find(".modula-items"),this.$items=this.$itemsCnt.find(".modula-item"),this.options=u.extend({},e,i),this._defaults=e,this._name=n,this.tiles=[],this.$tilesCnt=null,this.completed=!1,this.lastWidth=0,this.resizeTO=0,this.isIsotope=!1,this.isLazyLoaded=!0,this.init()}h.prototype.init=function(){var i=this,t=a.documentElement.clientWidth;this.options.gutter=t<=568?this.options.mobileGutter:t<=768?this.options.tabletGutter:this.options.desktopGutter,u(a).trigger("modula_api_before_init",[i]),"custom-grid"===this.options.type?this.createCustomGallery():"creative-gallery"==this.options.type?this.createGrid():"grid"==this.options.type&&("automatic"==this.options.grid_type?this.createAutoGrid():this.createColumnsGrid()),"custom-grid"===this.options.type&&u(s).height()<u("html").height()&&i.onResize(i),u(s).resize(function(){i.onResize(i)}),u(s).on("modula-update",function(){i.onResize(i)}),u(a).on("lazyloaded",function(t){t=u(t.target);"modula"==t.data("source")&&(t.data("size",{width:t.width(),height:t.height()}),(t=t.parents(".modula-item")).addClass("tg-loaded"),t=i.$items.not(".jtg-hidden").index(t),i.placeImage(t),i.isIsotope&&i.$itemsCnt.modulaisotope("layout"))}),i.options.inView&&jQuery(s).on("DOMContentLoaded load resize scroll",function(){modulaInViewport(i.$element)&&i.$element.addClass("modula-loaded-scale")}),this.setupSocial(),this.options.onComplete&&this.options.onComplete(),"fancybox"!=i.options.lightbox||i.options.initLightbox||this.initLightbox(),u(a).trigger("modula_api_after_init",[i])},h.prototype.initLightbox=function(){var e=this;e.$element.on("click",".modula-item-link:not( .modula-simple-link )",function(t){t.preventDefault();var i=u.map(e.$items,function(t){var i=jQuery(t).find(".modula-item-link:not( .modula-simple-link )"),t=jQuery(t).find(".pic");return{src:i.attr("href"),opts:{$thumb:t.parents(".modula-item"),caption:i.data("caption"),alt:t.attr("alt"),image_id:i.attr("data-image-id")}}}),t=e.$items.index(jQuery(this).parents(".modula-item"));jQuery.modulaFancybox.open(i,e.options.lightboxOpts,t)})},h.prototype.trunc=function(t){return Math.trunc?Math.trunc(t):(t=+t,isFinite(t)?t-t%1||(t<0?-0:0===t?t:0):t)},h.prototype.createCustomGallery=function(){var h,r=this,t=this.$element.find(".modula-items").width(),d=this,l=this.options.columns,i=a.documentElement.clientWidth;"1"==this.options.enableResponsive&&(i<=568?l=this.options.mobileColumns:i<=768&&(l=this.options.tabletColumns)),h=0<this.options.gutter?(t-this.options.gutter*(l-1))/l:Math.floor(t/l*1e3)/1e3,this.$items.not(".jtg-hidden").each(function(t,i){var e,o,n={},s=u(i).data("width"),a=u(i).data("height");12<s&&(s=12),"1"==d.options.enableResponsive&&(e=s,o=a,1==l?a=(s=1)*o/e:((s=Math.round(l*e/12))<1&&(s=1),(a=Math.round(s*o/e))<1&&(a=1))),n.width=h*s+d.options.gutter*(s-1),n.height=Math.round(h)*a+d.options.gutter*(a-1),u(i).data("size",n).addClass("tiled").addClass(n.width>n.height?"tile-h":"tile-v").data("position"),u(i).css(u(i).data("size")),u(i).find(".figc").css({width:u(i).data("size").width,height:u(i).data("size").height}),r.loadImage(t)});t={itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(d.options.gutter)}};this.$itemsCnt.modulaisotope(t),this.isIsotope=!0},h.prototype.createGrid=function(){var o=this;this.$itemsCnt.data("area",this.$itemsCnt.width()*this.options.height),this.lastWidth=this.$itemsCnt.width();for(var t,i=0;i<this.$items.not(".jtg-hidden").length;i++)this.tiles.push(o.getSlot());this.tiles.sort(function(t,i){return t.position-i.position}),this.$items.not(".jtg-hidden").each(function(t,i){var e=o.tiles[t];u(i).data("size",e),u(i).addClass("tiled").addClass(e.width>e.height?"tile-h":"tile-v").data("position"),u(i).css({width:e.width,height:e.height}),u(i).find(".figc").css({width:e.width,height:e.height}),o.loadImage(t)}),this.isIsotope||(t={resizesContainer:!1,itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(o.options.gutter)}},this.$itemsCnt.modulaisotope(t),this.isIsotope=!0)},h.prototype.createAutoGrid=function(){this.$itemsCnt.justifiedGallery({rowHeight:this.options.rowHeight,margins:this.options.gutter,lastRow:this.options.lastRow,captions:!1,border:0,imgSelector:".pic",cssAnimation:!0,imagesAnimationDuration:700})},h.prototype.createColumnsGrid=function(){var e=this;this.$itemsCnt.modulaisotope({itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(this.options.gutter)}}),this.$items.each(function(t,i){e.loadImage(t)}),this.isIsotope=!0},h.prototype.getSlot=function(){if(0==this.tiles.length)return o={top:0,left:0,width:this.$itemsCnt.width(),height:this.options.height,area:this.$itemsCnt.width()*this.options.height,position:0};for(var t=0,i=0;i<this.tiles.length;i++)(o=this.tiles[i]).area>this.tiles[t].area&&(t=i);var e,o={},n=this.tiles[t];return(o=n.width>n.height?(e=n.width/2*this.options.randomFactor,n.prevWidth=n.width,n.width=Math.floor(n.width/2+e*(Math.random()-.5)),{top:n.top,left:n.left+n.width+this.options.gutter,width:n.prevWidth-n.width-this.options.gutter,height:n.height}):(e=n.height/2*this.options.randomFactor,n.prevHeight=n.height,n.height=Math.floor(n.height/2+e*(Math.random()-.5)),{left:n.left,top:n.top+n.height+this.options.gutter,width:n.width,height:n.prevHeight-n.height-this.options.gutter})).area=o.width*o.height,o.position=1e3*o.top+o.left,n.position=1e3*n.top+n.left,this.tiles[t]=n,this.tiles[t].area=n.width*n.height,o},h.prototype.reset=function(){this.tiles=[],"custom-grid"===this.options.type?this.createCustomGallery():"creative-gallery"==this.options.type?this.createGrid():"grid"==this.options.type&&("automatic"==this.options.grid_type?this.createAutoGrid():this.createColumnsGrid()),this.lastWidth=this.$itemsCnt.width(),u(a).trigger("modula_api_reset",[this])},h.prototype.onResize=function(i){var t;i.lastWidth!=i.$itemsCnt.width()&&(t=a.documentElement.clientWidth,i.options.gutter=t<=568?i.options.mobileGutter:t<=768?i.options.tabletGutter:this.options.desktopGutter,clearTimeout(i.resizeTO),i.resizeTO=setTimeout(function(){var t;i.options.keepArea&&(t=i.$itemsCnt.data("area"),i.$itemsCnt.height(t/i.$itemsCnt.width())),i.reset(),i.isIsotope&&i.$itemsCnt.modulaisotope({packery:{gutter:parseInt(i.options.gutter)}}).modulaisotope("layout")},100))},h.prototype.loadImage=function(t){var i,e=this,o=e.$items.not(".jtg-hidden").eq(t).find(".pic"),n={};"0"==e.options.lazyLoad?void 0===o.attr("width")&&void 0===o.attr("height")?((i=new Image).onload=function(){n={width:this.width,height:this.height},o.data("size",n),e.placeImage(t)},"undefined"!=o.attr("src")?i.src=o.attr("src"):i.src=o.data("src")):(n={width:o.width(),height:o.height()},o.data("size",n),e.placeImage(t)):e.placeImage(t)},h.prototype.placeImage=function(t){if("grid"!=this.options.type){var i=this.$items.not(".jtg-hidden").eq(t),e=i.find(".pic"),o=i.data("size"),n=e.data("size");if(void 0!==o&&void 0!==n){o.width,o.height;var s=n.width/n.height,a=e.data("valign")?e.data("valign"):"middle",i=e.data("halign")?e.data("halign"):"center",h={top:"auto",bottom:"auto",left:"auto",right:"auto",width:"auto",height:"auto",margin:"0",maxWidth:"999em"};if(o.width*n.height/n.width>o.height)switch(h.width=o.width,h.left=0,a){case"top":h.top=0;break;case"middle":h.top=0-(o.width*(1/s)-o.height)/2;break;case"bottom":h.bottom=0}else switch(h.height=o.height,h.top=0,i){case"left":h.left=0;break;case"center":h.left=0-(o.height*s-o.width)/2;break;case"right":h.right=0}e.css(h),this.$items.not(".jtg-hidden").eq(t).addClass("tg-loaded")}}},h.prototype.setupSocial=function(){this.options.enableTwitter&&i(this.$items,this),this.options.enableFacebook&&o(this.$items,this),this.options.enablePinterest&&d(this.$items,this),this.options.enableLinkedin&&l(this.$items,this),this.options.enableWhatsapp&&r(this.$items,this),this.options.enableEmail&&p(this.$items,this)},h.prototype.destroy=function(){this.isPackeryActive&&(this.$itemsCnt.packery("destroy"),this.isPackeryActive=!1)};var i=function(t,i){t.find(".modula-icon-twitter").click(function(t){t.preventDefault();var i=u(this).parents(".modula-item").find("img.pic"),e=i.data("caption"),o=i.data("full"),t=i.attr("title"),i=a.title;return 0<t.length?i=u.trim(t):0<e.length&&(i=u.trim(e)),s.open("https://twitter.com/intent/tweet?url="+encodeURI(o)+"&text="+encodeURI(i),"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},o=function(t,i){t.find(".modula-icon-facebook").click(function(t){t.preventDefault();t="//www.facebook.com/sharer.php?u="+u(this).parents(".modula-item").find("img.pic").attr("data-full");return s.open(t,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},r=function(t,i){t.find(".modula-icon-whatsapp").click(function(t){t.preventDefault();t=u(this).parents(".modula-item").find("img.pic").attr("data-full");return s.open("https://api.whatsapp.com/send?text="+encodeURI(t)+"&preview_url=true","ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},d=function(t,i){t.find(".modula-icon-pinterest").click(function(t){t.preventDefault();var i=u(this).parents(".modula-item").find("img.pic"),e=i.data("full"),o=i.data("caption"),n=i.attr("title"),t=a.title;0<n.length?t=u.trim(n):0<o.length&&(t=u.trim(o));e="http://pinterest.com/pin/create/button/?url="+encodeURI(e)+"&description="+encodeURI(t);return 1<=i.length&&(t=i.attr("data-full"),e+="&media="+(i=t,(t=a.createElement("img")).src=i,i=t.src,t.src=null,i)),s.open(e,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},l=function(t,i){t.find(".modula-icon-linkedin").click(function(t){t.preventDefault();t=u(this).parents(".modula-item").find("img.pic").attr("data-full"),t="//linkedin.com/shareArticle?mini=true&url="+encodeURI(t);return s.open(t,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},p=function(t,n){t.find(".modula-icon-email").click(function(t){var i=encodeURI(n.options.email_subject),e=jQuery(".modula-icon-email").parents(".modula-item").find("img.pic").attr("data-full"),o=location.href,o="mailto:?subject="+i+"&body="+encodeURI(n.options.email_message.replace(/%%image_link%%/g,e).replace(/%%gallery_link%%/g,o));return s.open(o,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})};u.fn[n]=function(i){var e,o=arguments;return i===t||"object"==typeof i?this.each(function(){u.data(this,"plugin_"+n)||u.data(this,"plugin_"+n,new h(this,i))}):"string"==typeof i&&"_"!==i[0]&&"init"!==i?(this.each(function(){var t=u.data(this,"plugin_"+n);t instanceof h&&"function"==typeof t[i]&&(e=t[i].apply(t,Array.prototype.slice.call(o,1))),"destroy"===i&&u.data(this,"plugin_"+n,null)}),e!==t?e:this):void 0}}(jQuery,window,document),jQuery(document).ready(function(){var t=jQuery(".modula.modula-gallery");jQuery.each(t,function(){var t=jQuery(this).data("config");jQuery(this).modulaGallery(t)})});
1
+ function tg_getURLParameter(t){return decodeURIComponent((new RegExp("[?|&]"+t+"=([^&;]+?)(&|#|;|$)").exec(location.search)||[,""])[1].replace(/\+/g,"%20"))||null}function modulaInViewport(t){"function"==typeof jQuery&&t instanceof jQuery&&(t=t[0]);t=t.getBoundingClientRect();return t.top-jQuery(window).height()<=-100&&-400<=t.top-jQuery(window).height()||t.bottom<=jQuery(window).height()}jQuery(document).on("vc-full-width-row-single vc-full-width-row",function(t,i){0<jQuery("body").find(".modula").length&&jQuery(window).trigger("modula-update")}),jQuery(window).on("elementor/frontend/init",function(){window.elementorFrontend&&window.elementorFrontend.hooks.addAction("frontend/element_ready/global",function(t){jQuery("body").find(".modula").length})}),function(u,s,a,t){var n="modulaGallery",e={resizer:"/",keepArea:!0,type:"creative-gallery",columns:12,gutter:10,desktopGutter:10,mobileGutter:10,tabletGutter:10,enableTwitter:!1,enableFacebook:!1,enableWhatsapp:!1,enablePinterest:!1,enableLinkedin:!1,enableEmail:!1,lazyLoad:0,initLightbox:!1,lightbox:"fancybox",lightboxOpts:{},inView:!1};function h(t,i){this.element=t,this.$element=u(t),this.$itemsCnt=this.$element.find(".modula-items"),this.$items=this.$itemsCnt.find(".modula-item"),this.options=u.extend({},e,i),this._defaults=e,this._name=n,this.tiles=[],this.$tilesCnt=null,this.completed=!1,this.lastWidth=0,this.resizeTO=0,this.isIsotope=!1,this.isLazyLoaded=!0,this.init()}h.prototype.init=function(){var i=this,t=a.documentElement.clientWidth;this.options.gutter=t<=568?this.options.mobileGutter:t<=768?this.options.tabletGutter:this.options.desktopGutter,u(a).trigger("modula_api_before_init",[i]),"custom-grid"===this.options.type?this.createCustomGallery():"creative-gallery"==this.options.type?this.createGrid():"grid"==this.options.type&&("automatic"==this.options.grid_type?this.createAutoGrid():this.createColumnsGrid()),"custom-grid"===this.options.type&&u(s).height()<u("html").height()&&i.onResize(i),u(s).resize(function(){i.onResize(i)}),u(s).on("modula-update",function(){i.onResize(i)}),u(a).on("lazyloaded",function(t){t=u(t.target);"modula"==t.data("source")&&(t.data("size",{width:t.width(),height:t.height()}),(t=t.parents(".modula-item")).addClass("tg-loaded"),t=i.$items.not(".jtg-hidden").index(t),i.placeImage(t),i.isIsotope&&i.$itemsCnt.modulaisotope("layout"),"grid"==i.options.type&&"automatic"==i.options.grid_type&&i.$itemsCnt.justifiedGallery())}),i.options.inView&&jQuery(s).on("DOMContentLoaded load resize scroll",function(){modulaInViewport(i.$element)&&i.$element.addClass("modula-loaded-scale")}),this.setupSocial(),jQuery(i.$element).addClass("modula-gallery-initialized"),this.options.onComplete&&this.options.onComplete(),"fancybox"!=i.options.lightbox||i.options.initLightbox||this.initLightbox(),u(a).trigger("modula_api_after_init",[i])},h.prototype.initLightbox=function(){var e=this;e.$element.on("click",".modula-item-link:not( .modula-simple-link )",function(t){t.preventDefault();var i=u.map(e.$items,function(t){var i=jQuery(t).find(".modula-item-link:not( .modula-simple-link )"),t=jQuery(t).find(".pic");return{src:i.attr("href"),opts:{$thumb:t.parents(".modula-item"),caption:i.data("caption"),alt:t.attr("alt"),image_id:i.attr("data-image-id")}}}),t=e.$items.index(jQuery(this).parents(".modula-item"));jQuery.modulaFancybox.open(i,e.options.lightboxOpts,t)})},h.prototype.trunc=function(t){return Math.trunc?Math.trunc(t):(t=+t,isFinite(t)?t-t%1||(t<0?-0:0===t?t:0):t)},h.prototype.createCustomGallery=function(){var h,r=this,t=this.$element.find(".modula-items").width(),l=this,d=this.options.columns,i=a.documentElement.clientWidth;"1"==this.options.enableResponsive&&(i<=568?d=this.options.mobileColumns:i<=768&&(d=this.options.tabletColumns)),h=0<this.options.gutter?(t-this.options.gutter*(d-1))/d:Math.floor(t/d*1e3)/1e3,this.$items.not(".jtg-hidden").each(function(t,i){var e,o,n={},s=u(i).data("width"),a=u(i).data("height");12<s&&(s=12),"1"==l.options.enableResponsive&&(e=s,o=a,1==d?a=(s=1)*o/e:((s=Math.round(d*e/12))<1&&(s=1),(a=Math.round(s*o/e))<1&&(a=1))),n.width=h*s+l.options.gutter*(s-1),n.height=Math.round(h)*a+l.options.gutter*(a-1),u(i).data("size",n).addClass("tiled").addClass(n.width>n.height?"tile-h":"tile-v").data("position"),u(i).css(u(i).data("size")),u(i).find(".figc").css({width:u(i).data("size").width,height:u(i).data("size").height}),r.loadImage(t)});t={itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(l.options.gutter)}};this.$itemsCnt.modulaisotope(t),this.isIsotope=!0},h.prototype.createGrid=function(){var o=this;this.$itemsCnt.data("area",this.$itemsCnt.width()*this.options.height),this.lastWidth=this.$itemsCnt.width();for(var t,i=0;i<this.$items.not(".jtg-hidden").length;i++)this.tiles.push(o.getSlot());this.tiles.sort(function(t,i){return t.position-i.position}),this.$items.not(".jtg-hidden").each(function(t,i){var e=o.tiles[t];u(i).data("size",e),u(i).addClass("tiled").addClass(e.width>e.height?"tile-h":"tile-v").data("position"),u(i).css({width:e.width,height:e.height}),u(i).find(".figc").css({width:e.width,height:e.height}),o.loadImage(t)}),this.isIsotope||(t={resizesContainer:!1,itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(o.options.gutter)}},this.$itemsCnt.modulaisotope(t),this.isIsotope=!0)},h.prototype.createAutoGrid=function(){this.$itemsCnt.justifiedGallery({rowHeight:this.options.rowHeight,margins:this.options.gutter,lastRow:this.options.lastRow,captions:!1,border:0,imgSelector:".pic",cssAnimation:!0,imagesAnimationDuration:700})},h.prototype.createColumnsGrid=function(){var e=this;this.$itemsCnt.modulaisotope({itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(this.options.gutter)}}),this.$items.each(function(t,i){e.loadImage(t)}),this.isIsotope=!0},h.prototype.getSlot=function(){if(0==this.tiles.length)return o={top:0,left:0,width:this.$itemsCnt.width(),height:this.options.height,area:this.$itemsCnt.width()*this.options.height,position:0};for(var t=0,i=0;i<this.tiles.length;i++)(o=this.tiles[i]).area>this.tiles[t].area&&(t=i);var e,o={},n=this.tiles[t];return(o=n.width>n.height?(e=n.width/2*this.options.randomFactor,n.prevWidth=n.width,n.width=Math.floor(n.width/2+e*(Math.random()-.5)),{top:n.top,left:n.left+n.width+this.options.gutter,width:n.prevWidth-n.width-this.options.gutter,height:n.height}):(e=n.height/2*this.options.randomFactor,n.prevHeight=n.height,n.height=Math.floor(n.height/2+e*(Math.random()-.5)),{left:n.left,top:n.top+n.height+this.options.gutter,width:n.width,height:n.prevHeight-n.height-this.options.gutter})).area=o.width*o.height,o.position=1e3*o.top+o.left,n.position=1e3*n.top+n.left,this.tiles[t]=n,this.tiles[t].area=n.width*n.height,o},h.prototype.reset=function(){this.tiles=[],"custom-grid"===this.options.type?this.createCustomGallery():"creative-gallery"==this.options.type?this.createGrid():"grid"==this.options.type&&("automatic"==this.options.grid_type?this.createAutoGrid():this.createColumnsGrid()),this.lastWidth=this.$itemsCnt.width(),u(a).trigger("modula_api_reset",[this])},h.prototype.onResize=function(i){var t;i.lastWidth!=i.$itemsCnt.width()&&(t=a.documentElement.clientWidth,i.options.gutter=t<=568?i.options.mobileGutter:t<=768?i.options.tabletGutter:this.options.desktopGutter,clearTimeout(i.resizeTO),i.resizeTO=setTimeout(function(){var t;i.options.keepArea&&(t=i.$itemsCnt.data("area"),i.$itemsCnt.height(t/i.$itemsCnt.width())),i.reset(),i.isIsotope&&i.$itemsCnt.modulaisotope({packery:{gutter:parseInt(i.options.gutter)}}).modulaisotope("layout")},100))},h.prototype.loadImage=function(t){var i,e,o=this,n=o.$items.not(".jtg-hidden").eq(t).find(".pic");"0"==o.options.lazyLoad?((e=new Image).onload=function(){i={width:this.width,height:this.height},n.data("size",i),o.placeImage(t)},"undefined"!=n.attr("src")?e.src=n.attr("src"):e.src=n.data("src")):o.placeImage(t)},h.prototype.placeImage=function(t){if("grid"!=this.options.type){var i=this.$items.not(".jtg-hidden").eq(t),e=i.find(".pic"),o=i.data("size"),n=e.data("size");if(void 0!==o&&void 0!==n){o.width,o.height;var s=n.width/n.height,a=e.data("valign")?e.data("valign"):"middle",h=e.data("halign")?e.data("halign"):"center",i={top:"auto",bottom:"auto",left:"auto",right:"auto",width:"auto",height:"auto",margin:"0",maxWidth:"999em"};if(o.width*n.height/n.width>o.height)switch(i.width=o.width,i.left=0,a){case"top":i.top=0;break;case"middle":i.top=0-(o.width*(1/s)-o.height)/2;break;case"bottom":i.bottom=0}else switch(i.height=o.height,i.top=0,h){case"left":i.left=0;break;case"center":i.left=0-(o.height*s-o.width)/2;break;case"right":i.right=0}e.css(i),this.$items.not(".jtg-hidden").eq(t).addClass("tg-loaded")}}},h.prototype.setupSocial=function(){this.options.enableTwitter&&i(this.$items,this),this.options.enableFacebook&&o(this.$items,this),this.options.enablePinterest&&l(this.$items,this),this.options.enableLinkedin&&d(this.$items,this),this.options.enableWhatsapp&&r(this.$items,this),this.options.enableEmail&&p(this.$items,this)},h.prototype.destroy=function(){this.isPackeryActive&&(this.$itemsCnt.packery("destroy"),this.isPackeryActive=!1)};var i=function(t,i){t.find(".modula-icon-twitter").click(function(t){t.preventDefault();var i=u(this).parents(".modula-item").find("img.pic"),e=i.data("caption"),o=i.data("full"),t=i.attr("title"),i=a.title;return 0<t.length?i=u.trim(t):0<e.length&&(i=u.trim(e)),s.open("https://twitter.com/intent/tweet?url="+encodeURI(o)+"&text="+encodeURI(i),"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},o=function(t,i){t.find(".modula-icon-facebook").click(function(t){t.preventDefault();t="//www.facebook.com/sharer.php?u="+u(this).parents(".modula-item").find("img.pic").attr("data-full");return s.open(t,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},r=function(t,i){t.find(".modula-icon-whatsapp").click(function(t){t.preventDefault();t=u(this).parents(".modula-item").find("img.pic").attr("data-full");return s.open("https://api.whatsapp.com/send?text="+encodeURI(t)+"&preview_url=true","ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},l=function(t,i){t.find(".modula-icon-pinterest").click(function(t){t.preventDefault();var i=u(this).parents(".modula-item").find("img.pic"),e=i.data("full"),o=i.data("caption"),n=i.attr("title"),t=a.title;0<n.length?t=u.trim(n):0<o.length&&(t=u.trim(o));e="http://pinterest.com/pin/create/button/?url="+encodeURI(e)+"&description="+encodeURI(t);return 1<=i.length&&(t=i.attr("data-full"),e+="&media="+(i=t,(t=a.createElement("img")).src=i,i=t.src,t.src=null,i)),s.open(e,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},d=function(t,i){t.find(".modula-icon-linkedin").click(function(t){t.preventDefault();t=u(this).parents(".modula-item").find("img.pic").attr("data-full"),t="//linkedin.com/shareArticle?mini=true&url="+encodeURI(t);return s.open(t,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},p=function(t,n){t.find(".modula-icon-email").click(function(t){var i=encodeURI(n.options.email_subject),e=jQuery(".modula-icon-email").parents(".modula-item").find("img.pic").attr("data-full"),o=location.href,o="mailto:?subject="+i+"&body="+encodeURI(n.options.email_message.replace(/%%image_link%%/g,e).replace(/%%gallery_link%%/g,o));return s.open(o,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})};u.fn[n]=function(i){var e,o=arguments;return i===t||"object"==typeof i?this.each(function(){u.data(this,"plugin_"+n)||u.data(this,"plugin_"+n,new h(this,i))}):"string"==typeof i&&"_"!==i[0]&&"init"!==i?(this.each(function(){var t=u.data(this,"plugin_"+n);t instanceof h&&"function"==typeof t[i]&&(e=t[i].apply(t,Array.prototype.slice.call(o,1))),"destroy"===i&&u.data(this,"plugin_"+n,null)}),e!==t?e:this):void 0}}(jQuery,window,document),jQuery(document).ready(function(){var t=jQuery(".modula.modula-gallery");jQuery.each(t,function(){var t=jQuery(this).data("config");jQuery(this).modulaGallery(t)})});
assets/js/front/justifiedGallery.js CHANGED
@@ -1,7 +1,7 @@
1
  /*!
2
- * justifiedGallery - v3.7.0
3
  * http://miromannino.github.io/Justified-Gallery/
4
- * Copyright (c) 2018 Miro Mannino
5
  * Licensed under the MIT license.
6
  */
7
  (function (factory) {
@@ -10,13 +10,13 @@
10
  define(['jquery'], factory);
11
  } else if (typeof module === 'object' && module.exports) {
12
  // Node/CommonJS
13
- module.exports = function( root, jQuery ) {
14
- if ( jQuery === undefined ) {
15
  // require('jQuery') returns a factory that requires window to
16
  // build a jQuery instance, we normalize how we use modules
17
  // that require this pattern but the window provided is a noop
18
  // if it's defined (how jquery works)
19
- if ( typeof window !== 'undefined' ) {
20
  jQuery = require('jquery');
21
  }
22
  else {
@@ -40,23 +40,23 @@
40
  * @constructor
41
  */
42
  var JustifiedGallery = function ($gallery, settings) {
43
-
44
  this.settings = settings;
45
  this.checkSettings();
46
-
47
  this.imgAnalyzerTimeout = null;
48
  this.entries = null;
49
  this.buildingRow = {
50
- entriesBuff : [],
51
- width : 0,
52
- height : 0,
53
- aspectRatio : 0
54
  };
55
  this.lastFetchedEntry = null;
56
  this.lastAnalyzedIndex = -1;
57
  this.yield = {
58
- every : 2, // do a flush every n flushes (must be greater than 1)
59
- flushed : 0 // flushed rows without a yield
60
  };
61
  this.border = settings.border >= 0 ? settings.border : settings.margins;
62
  this.maxRowHeight = this.retrieveMaxRowHeight();
@@ -64,18 +64,18 @@
64
  this.offY = this.border;
65
  this.rows = 0;
66
  this.spinner = {
67
- phase : 0,
68
- timeSlot : 150,
69
- $el : $('<div class="spinner"><span></span><span></span><span></span></div>'),
70
- intervalId : null
71
  };
72
  this.scrollBarOn = false;
73
  this.checkWidthIntervalId = null;
74
  this.galleryWidth = $gallery.width();
75
  this.$gallery = $gallery;
76
-
77
  };
78
-
79
  /** @returns {String} the best suffix given the width and the height */
80
  JustifiedGallery.prototype.getSuffix = function (width, height) {
81
  var longestSide, i;
@@ -87,7 +87,7 @@
87
  }
88
  return this.settings.sizeRangeSuffixes[this.suffixRanges[i - 1]];
89
  };
90
-
91
  /**
92
  * Remove the suffix from the string
93
  *
@@ -96,14 +96,14 @@
96
  JustifiedGallery.prototype.removeSuffix = function (str, suffix) {
97
  return str.substring(0, str.length - suffix.length);
98
  };
99
-
100
  /**
101
  * @returns {boolean} a boolean to say if the suffix is contained in the str or not
102
  */
103
  JustifiedGallery.prototype.endsWith = function (str, suffix) {
104
  return str.indexOf(suffix, str.length - suffix.length) !== -1;
105
  };
106
-
107
  /**
108
  * Get the used suffix of a particular url
109
  *
@@ -119,7 +119,7 @@
119
  }
120
  return '';
121
  };
122
-
123
  /**
124
  * Given an image src, with the width and the height, returns the new image src with the
125
  * best suffix to show the best quality thumbnail.
@@ -128,7 +128,7 @@
128
  */
129
  JustifiedGallery.prototype.newSrc = function (imageSrc, imgWidth, imgHeight, image) {
130
  var newImageSrc;
131
-
132
  if (this.settings.thumbnailPath) {
133
  newImageSrc = this.settings.thumbnailPath(imageSrc, imgWidth, imgHeight, image);
134
  } else {
@@ -138,10 +138,10 @@
138
  newImageSrc = this.removeSuffix(newImageSrc, this.getUsedSuffix(newImageSrc));
139
  newImageSrc += this.getSuffix(imgWidth, imgHeight) + ext;
140
  }
141
-
142
  return newImageSrc;
143
  };
144
-
145
  /**
146
  * Shows the images that is in the given entry
147
  *
@@ -150,14 +150,14 @@
150
  */
151
  JustifiedGallery.prototype.showImg = function ($entry, callback) {
152
  if (this.settings.cssAnimation) {
153
- $entry.addClass('entry-visible');
154
  if (callback) callback();
155
  } else {
156
  $entry.stop().fadeTo(this.settings.imagesAnimationDuration, 1.0, callback);
157
  $entry.find(this.settings.imgSelector).stop().fadeTo(this.settings.imagesAnimationDuration, 1.0, callback);
158
  }
159
  };
160
-
161
  /**
162
  * Extract the image src form the image, looking from the 'safe-src', and if it can't be found, from the
163
  * 'src' attribute. It saves in the image data the 'jg.originalSrc' field, with the extracted src.
@@ -166,23 +166,30 @@
166
  * @returns {String} the extracted src
167
  */
168
  JustifiedGallery.prototype.extractImgSrcFromImage = function ($image) {
169
- var imageSrc = (typeof $image.data('safe-src') !== 'undefined') ? $image.data('safe-src') : $image.attr('src');
170
- $image.data('jg.originalSrc', imageSrc);
 
 
 
 
 
 
 
171
  return imageSrc;
172
  };
173
-
174
  /** @returns {jQuery} the image in the given entry */
175
  JustifiedGallery.prototype.imgFromEntry = function ($entry) {
176
  var $img = $entry.find(this.settings.imgSelector);
177
  return $img.length === 0 ? null : $img;
178
  };
179
-
180
  /** @returns {jQuery} the caption in the given entry */
181
  JustifiedGallery.prototype.captionFromEntry = function ($entry) {
182
- var $caption = $entry.find('> .caption');
183
  return $caption.length === 0 ? null : $caption;
184
  };
185
-
186
  /**
187
  * Display the entry
188
  *
@@ -198,44 +205,47 @@
198
  $entry.height(rowHeight);
199
  $entry.css('top', y);
200
  $entry.css('left', x);
201
-
202
  var $image = this.imgFromEntry($entry);
203
  if ($image !== null) {
204
  $image.css('width', imgWidth);
205
  $image.css('height', imgHeight);
206
  $image.css('margin-left', - imgWidth / 2);
207
  $image.css('margin-top', - imgHeight / 2);
208
-
209
  // Image reloading for an high quality of thumbnails
210
- var imageSrc = $image.attr('src');
211
- var newImageSrc = this.newSrc(imageSrc, imgWidth, imgHeight, $image[0]);
212
-
213
- $image.one('error', function () {
214
- $image.attr('src', $image.data('jg.originalSrc')); //revert to the original thumbnail, we got it.
215
- });
216
-
217
- var loadNewImage = function () {
218
- if (imageSrc !== newImageSrc) { //load the new image after the fadeIn
219
- $image.attr('src', newImageSrc);
 
 
 
 
 
 
 
 
 
 
 
220
  }
221
- };
222
-
223
- if ($entry.data('jg.loaded') === 'skipped') {
224
- this.onImageEvent(imageSrc, $.proxy(function() {
225
- this.showImg($entry, loadNewImage);
226
- $entry.data('jg.loaded', true);
227
- }, this));
228
- } else {
229
- this.showImg($entry, loadNewImage);
230
  }
231
-
232
  } else {
233
  this.showImg($entry);
234
  }
235
-
236
  this.displayEntryCaption($entry);
237
  };
238
-
239
  /**
240
  * Display the entry caption. If the caption element doesn't exists, it creates the caption using the 'alt'
241
  * or the 'title' attributes.
@@ -246,18 +256,18 @@
246
  var $image = this.imgFromEntry($entry);
247
  if ($image !== null && this.settings.captions) {
248
  var $imgCaption = this.captionFromEntry($entry);
249
-
250
  // Create it if it doesn't exists
251
  if ($imgCaption === null) {
252
  var caption = $image.attr('alt');
253
  if (!this.isValidCaption(caption)) caption = $entry.attr('title');
254
  if (this.isValidCaption(caption)) { // Create only we found something
255
- $imgCaption = $('<div class="caption">' + caption + '</div>');
256
  $entry.append($imgCaption);
257
  $entry.data('jg.createdCaption', true);
258
  }
259
  }
260
-
261
  // Create events (we check again the $imgCaption because it can be still inexistent)
262
  if ($imgCaption !== null) {
263
  if (!this.settings.cssAnimation) $imgCaption.stop().fadeTo(0, this.settings.captionSettings.nonVisibleOpacity);
@@ -267,7 +277,7 @@
267
  this.removeCaptionEventsHandlers($entry);
268
  }
269
  };
270
-
271
  /**
272
  * Validates the caption
273
  *
@@ -277,7 +287,7 @@
277
  JustifiedGallery.prototype.isValidCaption = function (caption) {
278
  return (typeof caption !== 'undefined' && caption.length > 0);
279
  };
280
-
281
  /**
282
  * The callback for the event 'mouseenter'. It assumes that the event currentTarget is an entry.
283
  * It shows the caption using jQuery (or using CSS if it is configured so)
@@ -287,13 +297,13 @@
287
  JustifiedGallery.prototype.onEntryMouseEnterForCaption = function (eventObject) {
288
  var $caption = this.captionFromEntry($(eventObject.currentTarget));
289
  if (this.settings.cssAnimation) {
290
- $caption.addClass('caption-visible').removeClass('caption-hidden');
291
  } else {
292
  $caption.stop().fadeTo(this.settings.captionSettings.animationDuration,
293
- this.settings.captionSettings.visibleOpacity);
294
  }
295
  };
296
-
297
  /**
298
  * The callback for the event 'mouseleave'. It assumes that the event currentTarget is an entry.
299
  * It hides the caption using jQuery (or using CSS if it is configured so)
@@ -303,13 +313,13 @@
303
  JustifiedGallery.prototype.onEntryMouseLeaveForCaption = function (eventObject) {
304
  var $caption = this.captionFromEntry($(eventObject.currentTarget));
305
  if (this.settings.cssAnimation) {
306
- $caption.removeClass('caption-visible').removeClass('caption-hidden');
307
  } else {
308
  $caption.stop().fadeTo(this.settings.captionSettings.animationDuration,
309
- this.settings.captionSettings.nonVisibleOpacity);
310
  }
311
  };
312
-
313
  /**
314
  * Add the handlers of the entry for the caption
315
  *
@@ -327,7 +337,7 @@
327
  $entry.data('jg.captionMouseEvents', captionMouseEvents);
328
  }
329
  };
330
-
331
  /**
332
  * Remove the handlers of the entry for the caption
333
  *
@@ -341,7 +351,7 @@
341
  $entry.removeData('jg.captionMouseEvents');
342
  }
343
  };
344
-
345
  /**
346
  * Clear the building row data to be used for a new row
347
  */
@@ -350,28 +360,29 @@
350
  this.buildingRow.aspectRatio = 0;
351
  this.buildingRow.width = 0;
352
  };
353
-
354
  /**
355
  * Justify the building row, preparing it to
356
  *
357
  * @param isLastRow
 
358
  * @returns a boolean to know if the row has been justified or not
359
  */
360
- JustifiedGallery.prototype.prepareBuildingRow = function (isLastRow) {
361
  var i, $entry, imgAspectRatio, newImgW, newImgH, justify = true;
362
  var minHeight = 0;
363
  var availableWidth = this.galleryWidth - 2 * this.border - (
364
- (this.buildingRow.entriesBuff.length - 1) * this.settings.margins);
365
  var rowHeight = availableWidth / this.buildingRow.aspectRatio;
366
  var defaultRowHeight = this.settings.rowHeight;
367
  var justifiable = this.buildingRow.width / availableWidth > this.settings.justifyThreshold;
368
-
369
  //Skip the last row if we can't justify it and the lastRow == 'hide'
370
- if (isLastRow && this.settings.lastRow === 'hide' && !justifiable) {
371
  for (i = 0; i < this.buildingRow.entriesBuff.length; i++) {
372
  $entry = this.buildingRow.entriesBuff[i];
373
  if (this.settings.cssAnimation)
374
- $entry.removeClass('entry-visible');
375
  else {
376
  $entry.stop().fadeTo(0, 0.1);
377
  $entry.find('> img, > a > img').fadeTo(0, 0);
@@ -379,21 +390,21 @@
379
  }
380
  return -1;
381
  }
382
-
383
  // With lastRow = nojustify, justify if is justificable (the images will not become too big)
384
  if (isLastRow && !justifiable && this.settings.lastRow !== 'justify' && this.settings.lastRow !== 'hide') {
385
  justify = false;
386
-
387
  if (this.rows > 0) {
388
  defaultRowHeight = (this.offY - this.border - this.settings.margins * this.rows) / this.rows;
389
  justify = defaultRowHeight * this.buildingRow.aspectRatio / availableWidth > this.settings.justifyThreshold;
390
  }
391
  }
392
-
393
  for (i = 0; i < this.buildingRow.entriesBuff.length; i++) {
394
  $entry = this.buildingRow.entriesBuff[i];
395
  imgAspectRatio = $entry.data('jg.width') / $entry.data('jg.height');
396
-
397
  if (justify) {
398
  newImgW = (i === this.buildingRow.entriesBuff.length - 1) ? availableWidth : rowHeight * imgAspectRatio;
399
  newImgH = rowHeight;
@@ -401,62 +412,63 @@
401
  newImgW = defaultRowHeight * imgAspectRatio;
402
  newImgH = defaultRowHeight;
403
  }
404
-
405
  availableWidth -= Math.round(newImgW);
406
  $entry.data('jg.jwidth', Math.round(newImgW));
407
  $entry.data('jg.jheight', Math.ceil(newImgH));
408
  if (i === 0 || minHeight > newImgH) minHeight = newImgH;
409
  }
410
-
411
  this.buildingRow.height = minHeight;
412
  return justify;
413
  };
414
-
415
  /**
416
  * Flush a row: justify it, modify the gallery height accordingly to the row height
417
  *
418
  * @param isLastRow
 
419
  */
420
- JustifiedGallery.prototype.flushRow = function (isLastRow) {
421
  var settings = this.settings;
422
  var $entry, buildingRowRes, offX = this.border, i;
423
-
424
- buildingRowRes = this.prepareBuildingRow(isLastRow);
425
- if (isLastRow && settings.lastRow === 'hide' && buildingRowRes === -1) {
426
  this.clearBuildingRow();
427
  return;
428
  }
429
-
430
- if(this.maxRowHeight) {
431
- if(this.maxRowHeight < this.buildingRow.height) this.buildingRow.height = this.maxRowHeight;
432
  }
433
-
434
  //Align last (unjustified) row
435
  if (isLastRow && (settings.lastRow === 'center' || settings.lastRow === 'right')) {
436
  var availableWidth = this.galleryWidth - 2 * this.border - (this.buildingRow.entriesBuff.length - 1) * settings.margins;
437
-
438
  for (i = 0; i < this.buildingRow.entriesBuff.length; i++) {
439
  $entry = this.buildingRow.entriesBuff[i];
440
  availableWidth -= $entry.data('jg.jwidth');
441
  }
442
-
443
  if (settings.lastRow === 'center')
444
- offX += availableWidth / 2;
445
  else if (settings.lastRow === 'right')
446
  offX += availableWidth;
447
  }
448
-
449
  var lastEntryIdx = this.buildingRow.entriesBuff.length - 1;
450
  for (i = 0; i <= lastEntryIdx; i++) {
451
- $entry = this.buildingRow.entriesBuff[ this.settings.rtl ? lastEntryIdx - i : i ];
452
  this.displayEntry($entry, offX, this.offY, $entry.data('jg.jwidth'), $entry.data('jg.jheight'), this.buildingRow.height);
453
  offX += $entry.data('jg.jwidth') + settings.margins;
454
  }
455
-
456
  //Gallery Height
457
  this.galleryHeightToSet = this.offY + this.buildingRow.height + this.border;
458
  this.setGalleryTempHeight(this.galleryHeightToSet + this.getSpinnerHeight());
459
-
460
  if (!isLastRow || (this.buildingRow.height <= settings.rowHeight && buildingRowRes)) {
461
  //Ready for a new row
462
  this.offY += this.buildingRow.height + settings.margins;
@@ -465,75 +477,63 @@
465
  this.settings.triggerEvent.call(this, 'jg.rowflush');
466
  }
467
  };
468
-
469
-
470
  // Scroll position not restoring: https://github.com/miromannino/Justified-Gallery/issues/221
471
  var galleryPrevStaticHeight = 0;
472
-
473
  JustifiedGallery.prototype.rememberGalleryHeight = function () {
474
  galleryPrevStaticHeight = this.$gallery.height();
475
  this.$gallery.height(galleryPrevStaticHeight);
476
  };
477
-
478
  // grow only
479
  JustifiedGallery.prototype.setGalleryTempHeight = function (height) {
480
  galleryPrevStaticHeight = Math.max(height, galleryPrevStaticHeight);
481
  this.$gallery.height(galleryPrevStaticHeight);
482
  };
483
-
484
  JustifiedGallery.prototype.setGalleryFinalHeight = function (height) {
485
  galleryPrevStaticHeight = height;
486
  this.$gallery.height(height);
487
  };
488
-
489
- /**
490
- * @returns {boolean} a boolean saying if the scrollbar is active or not
491
- */
492
- function hasScrollBar() {
493
- return $("body").height() > $(window).height();
494
- }
495
-
496
  /**
497
  * Checks the width of the gallery container, to know if a new justification is needed
498
  */
499
  JustifiedGallery.prototype.checkWidth = function () {
500
  this.checkWidthIntervalId = setInterval($.proxy(function () {
501
-
502
  // if the gallery is not currently visible, abort.
503
  if (!this.$gallery.is(":visible")) return;
504
-
505
  var galleryWidth = parseFloat(this.$gallery.width());
506
- if (hasScrollBar() === this.scrollBarOn) {
507
- if (Math.abs(galleryWidth - this.galleryWidth) > this.settings.refreshSensitivity) {
508
- this.galleryWidth = galleryWidth;
509
- this.rewind();
510
-
511
- this.rememberGalleryHeight();
512
-
513
- // Restart to analyze
514
- this.startImgAnalyzer(true);
515
- }
516
- } else {
517
- this.scrollBarOn = hasScrollBar();
518
  this.galleryWidth = galleryWidth;
 
 
 
 
 
 
519
  }
520
  }, this), this.settings.refreshTime);
521
  };
522
-
523
  /**
524
  * @returns {boolean} a boolean saying if the spinner is active or not
525
  */
526
  JustifiedGallery.prototype.isSpinnerActive = function () {
527
  return this.spinner.intervalId !== null;
528
  };
529
-
530
  /**
531
  * @returns {int} the spinner height
532
  */
533
  JustifiedGallery.prototype.getSpinnerHeight = function () {
534
  return this.spinner.$el.innerHeight();
535
  };
536
-
537
  /**
538
  * Stops the spinner animation and modify the gallery height to exclude the spinner
539
  */
@@ -543,7 +543,7 @@
543
  this.setGalleryTempHeight(this.$gallery.height() - this.getSpinnerHeight());
544
  this.spinner.$el.detach();
545
  };
546
-
547
  /**
548
  * Starts the spinner animation
549
  */
@@ -562,7 +562,7 @@
562
  spinnerContext.phase = (spinnerContext.phase + 1) % ($spinnerPoints.length * 2);
563
  }, spinnerContext.timeSlot);
564
  };
565
-
566
  /**
567
  * Rewind the image analysis to start from the first entry.
568
  */
@@ -573,7 +573,22 @@
573
  this.rows = 0;
574
  this.clearBuildingRow();
575
  };
576
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
577
  /**
578
  * Update the entries searching it from the justified gallery HTML element
579
  *
@@ -582,16 +597,17 @@
582
  */
583
  JustifiedGallery.prototype.updateEntries = function (norewind) {
584
  var newEntries;
585
-
586
  if (norewind && this.lastFetchedEntry != null) {
587
- newEntries = $(this.lastFetchedEntry).nextAll(this.settings.selector).toArray();
 
588
  } else {
589
  this.entries = [];
590
- newEntries = this.$gallery.children(this.settings.selector).toArray();
591
  }
592
-
593
  if (newEntries.length > 0) {
594
-
595
  // Sort or randomize
596
  if ($.isFunction(this.settings.sort)) {
597
  newEntries = this.sortArray(newEntries);
@@ -599,20 +615,20 @@
599
  newEntries = this.shuffleArray(newEntries);
600
  }
601
  this.lastFetchedEntry = newEntries[newEntries.length - 1];
602
-
603
  // Filter
604
  if (this.settings.filter) {
605
  newEntries = this.filterArray(newEntries);
606
  } else {
607
  this.resetFilters(newEntries);
608
  }
609
-
610
  }
611
-
612
  this.entries = this.entries.concat(newEntries);
613
  return true;
614
  };
615
-
616
  /**
617
  * Apply the entries order to the DOM, iterating the entries and appending the images
618
  *
@@ -624,7 +640,7 @@
624
  $(this).appendTo(that.$gallery);
625
  });
626
  };
627
-
628
  /**
629
  * Shuffle the array using the Fisher-Yates shuffle algorithm
630
  *
@@ -642,7 +658,7 @@
642
  this.insertToGallery(a);
643
  return a;
644
  };
645
-
646
  /**
647
  * Sort the array using settings.comparator as comparator
648
  *
@@ -654,7 +670,7 @@
654
  this.insertToGallery(a);
655
  return a;
656
  };
657
-
658
  /**
659
  * Reset the filters removing the 'jg-filtered' class from all the entries
660
  *
@@ -663,7 +679,7 @@
663
  JustifiedGallery.prototype.resetFilters = function (a) {
664
  for (var i = 0; i < a.length; i++) $(a[i]).removeClass('jg-filtered');
665
  };
666
-
667
  /**
668
  * Filter the entries considering theirs classes (if a string has been passed) or using a function for filtering.
669
  *
@@ -697,7 +713,18 @@
697
  return filteredArr;
698
  }
699
  };
700
-
 
 
 
 
 
 
 
 
 
 
 
701
  /**
702
  * Destroy the Justified Gallery instance.
703
  *
@@ -709,27 +736,33 @@
709
  */
710
  JustifiedGallery.prototype.destroy = function () {
711
  clearInterval(this.checkWidthIntervalId);
712
-
713
- $.each(this.entries, $.proxy(function(_, entry) {
 
 
714
  var $entry = $(entry);
715
-
716
  // Reset entry style
717
  $entry.css('width', '');
718
  $entry.css('height', '');
719
  $entry.css('top', '');
720
  $entry.css('left', '');
721
  $entry.data('jg.loaded', undefined);
722
- $entry.removeClass('jg-entry');
723
-
724
  // Reset image style
725
  var $img = this.imgFromEntry($entry);
726
- $img.css('width', '');
727
- $img.css('height', '');
728
- $img.css('margin-left', '');
729
- $img.css('margin-top', '');
730
- $img.attr('src', $img.data('jg.originalSrc'));
731
- $img.data('jg.originalSrc', undefined);
732
-
 
 
 
 
733
  // Remove caption
734
  this.removeCaptionEventsHandlers($entry);
735
  var $caption = this.captionFromEntry($entry);
@@ -740,14 +773,15 @@
740
  } else {
741
  if ($caption !== null) $caption.fadeTo(0, 1);
742
  }
743
-
744
  }, this));
745
-
746
  this.$gallery.css('height', '');
747
  this.$gallery.removeClass('justified-gallery');
748
  this.$gallery.data('jg.controller', undefined);
 
749
  };
750
-
751
  /**
752
  * Analyze the images and builds the rows. It returns if it found an image that is not loaded.
753
  *
@@ -758,45 +792,48 @@
758
  var $entry = $(this.entries[i]);
759
  if ($entry.data('jg.loaded') === true || $entry.data('jg.loaded') === 'skipped') {
760
  var availableWidth = this.galleryWidth - 2 * this.border - (
761
- (this.buildingRow.entriesBuff.length - 1) * this.settings.margins);
762
  var imgAspectRatio = $entry.data('jg.width') / $entry.data('jg.height');
 
 
 
 
 
 
763
  if (availableWidth / (this.buildingRow.aspectRatio + imgAspectRatio) < this.settings.rowHeight) {
764
- this.flushRow(false);
765
-
766
- if(++this.yield.flushed >= this.yield.every) {
767
  this.startImgAnalyzer(isForResize);
768
  return;
769
  }
770
  }
771
-
772
- this.buildingRow.entriesBuff.push($entry);
773
- this.buildingRow.aspectRatio += imgAspectRatio;
774
- this.buildingRow.width += imgAspectRatio * this.settings.rowHeight;
775
- this.lastAnalyzedIndex = i;
776
-
777
  } else if ($entry.data('jg.loaded') !== 'error') {
778
  return;
779
  }
780
  }
781
-
782
  // Last row flush (the row is not full)
783
- if (this.buildingRow.entriesBuff.length > 0) this.flushRow(true);
784
-
 
 
785
  if (this.isSpinnerActive()) {
786
  this.stopLoadingSpinnerAnimation();
787
  }
788
-
789
  /* Stop, if there is, the timeout to start the analyzeImages.
790
  This is because an image can be set loaded, and the timeout can be set,
791
  but this image can be analyzed yet.
792
  */
793
  this.stopImgAnalyzerStarter();
794
-
 
 
795
  //On complete callback
796
  this.settings.triggerEvent.call(this, isForResize ? 'jg.resize' : 'jg.complete');
797
- this.setGalleryFinalHeight(this.galleryHeightToSet);
798
  };
799
-
800
  /**
801
  * Stops any ImgAnalyzer starter (that has an assigned timeout)
802
  */
@@ -807,7 +844,7 @@
807
  this.imgAnalyzerTimeout = null;
808
  }
809
  };
810
-
811
  /**
812
  * Starts the image analyzer. It is not immediately called to let the browser to update the view
813
  *
@@ -820,7 +857,7 @@
820
  that.analyzeImages(isForResize);
821
  }, 0.001); // we can't start it immediately due to a IE different behaviour
822
  };
823
-
824
  /**
825
  * Checks if the image is loaded or not using another image object. We cannot use the 'complete' image property,
826
  * because some browsers, with a 404 set complete = true.
@@ -831,7 +868,7 @@
831
  */
832
  JustifiedGallery.prototype.onImageEvent = function (imageSrc, onLoad, onError) {
833
  if (!onLoad && !onError) return;
834
-
835
  var memImage = new Image();
836
  var $memImage = $(memImage);
837
  if (onLoad) {
@@ -841,14 +878,14 @@
841
  });
842
  }
843
  if (onError) {
844
- $memImage.one('error', function() {
845
  $memImage.off('load error');
846
  onError(memImage);
847
  });
848
  }
849
  memImage.src = imageSrc;
850
  };
851
-
852
  /**
853
  * Init of Justified Gallery controlled
854
  * It analyzes all the entries starting theirs loading and calling the image analyzer (that works with loaded images)
@@ -860,27 +897,29 @@
860
  var $image = that.imgFromEntry($entry);
861
 
862
  $entry.addClass('jg-entry');
863
-
864
  if ($entry.data('jg.loaded') !== true && $entry.data('jg.loaded') !== 'skipped') {
865
-
866
  // Link Rel global overwrite
867
  if (that.settings.rel !== null) $entry.attr('rel', that.settings.rel);
868
-
869
  // Link Target global overwrite
870
  if (that.settings.target !== null) $entry.attr('target', that.settings.target);
871
-
872
  if ($image !== null) {
873
-
874
  // Image src
875
  var imageSrc = that.extractImgSrcFromImage($image);
876
- $image.attr('src', imageSrc);
877
-
878
- /* If we have the height and the width, we don't wait that the image is loaded, but we start directly
879
- * with the justification */
880
- if (that.settings.waitThumbnailsLoad === false) {
881
- var width = parseFloat($image.prop('width'));
882
- var height = parseFloat($image.prop('height'));
883
 
 
 
 
 
 
 
 
 
 
884
  if (!isNaN(width) && !isNaN(height)) {
885
  $entry.data('jg.width', width);
886
  $entry.data('jg.height', height);
@@ -890,13 +929,13 @@
890
  return true; // continue
891
  }
892
  }
893
-
894
  $entry.data('jg.loaded', false);
895
  imagesToLoad = true;
896
-
897
  // Spinner start
898
  if (!that.isSpinnerActive()) that.startLoadingSpinnerAnimation();
899
-
900
  that.onImageEvent(imageSrc, function (loadImg) { // image loaded
901
  $entry.data('jg.width', loadImg.width);
902
  $entry.data('jg.height', loadImg.height);
@@ -906,21 +945,21 @@
906
  $entry.data('jg.loaded', 'error');
907
  that.startImgAnalyzer(false);
908
  });
909
-
910
  } else {
911
  $entry.data('jg.loaded', true);
912
  $entry.data('jg.width', $entry.width() | parseFloat($entry.css('width')) | 1);
913
  $entry.data('jg.height', $entry.height() | parseFloat($entry.css('height')) | 1);
914
  }
915
-
916
  }
917
-
918
  });
919
-
920
  if (!imagesToLoad && !skippedImages) this.startImgAnalyzer(false);
921
  this.checkWidth();
922
  };
923
-
924
  /**
925
  * Checks that it is a valid number. If a string is passed it is converted to a number
926
  *
@@ -931,14 +970,14 @@
931
  if ($.type(settingContainer[settingName]) === 'string') {
932
  settingContainer[settingName] = parseFloat(settingContainer[settingName]);
933
  }
934
-
935
  if ($.type(settingContainer[settingName]) === 'number') {
936
  if (isNaN(settingContainer[settingName])) throw 'invalid number for ' + settingName;
937
  } else {
938
  throw settingName + ' must be a number';
939
  }
940
  };
941
-
942
  /**
943
  * Checks the sizeRangeSuffixes and, if necessary, converts
944
  * its keys from string (e.g. old settings with 'lt100') to int.
@@ -947,13 +986,13 @@
947
  if ($.type(this.settings.sizeRangeSuffixes) !== 'object') {
948
  throw 'sizeRangeSuffixes must be defined and must be an object';
949
  }
950
-
951
  var suffixRanges = [];
952
  for (var rangeIdx in this.settings.sizeRangeSuffixes) {
953
  if (this.settings.sizeRangeSuffixes.hasOwnProperty(rangeIdx)) suffixRanges.push(rangeIdx);
954
  }
955
-
956
- var newSizeRngSuffixes = {0: ''};
957
  for (var i = 0; i < suffixRanges.length; i++) {
958
  if ($.type(suffixRanges[i]) === 'string') {
959
  try {
@@ -966,10 +1005,10 @@
966
  newSizeRngSuffixes[suffixRanges[i]] = this.settings.sizeRangeSuffixes[suffixRanges[i]];
967
  }
968
  }
969
-
970
  this.settings.sizeRangeSuffixes = newSizeRngSuffixes;
971
  };
972
-
973
  /**
974
  * check and convert the maxRowHeight setting
975
  * requires rowHeight to be already set
@@ -979,7 +1018,7 @@
979
  JustifiedGallery.prototype.retrieveMaxRowHeight = function () {
980
  var newMaxRowHeight = null;
981
  var rowHeight = this.settings.rowHeight;
982
-
983
  if ($.type(this.settings.maxRowHeight) === 'string') {
984
  if (this.settings.maxRowHeight.match(/^[0-9]+%$/)) {
985
  newMaxRowHeight = rowHeight * parseFloat(this.settings.maxRowHeight.match(/^([0-9]+)%$/)[1]) / 100;
@@ -993,26 +1032,27 @@
993
  } else {
994
  throw 'maxRowHeight must be a number or a percentage';
995
  }
996
-
997
  // check if the converted value is not a number
998
  if (isNaN(newMaxRowHeight)) throw 'invalid number for maxRowHeight';
999
-
1000
  // check values, maxRowHeight must be >= rowHeight
1001
  if (newMaxRowHeight < rowHeight) newMaxRowHeight = rowHeight;
1002
-
1003
  return newMaxRowHeight;
1004
  };
1005
-
1006
  /**
1007
  * Checks the settings
1008
  */
1009
  JustifiedGallery.prototype.checkSettings = function () {
1010
  this.checkSizeRangesSuffixes();
1011
-
1012
  this.checkOrConvertNumber(this.settings, 'rowHeight');
1013
  this.checkOrConvertNumber(this.settings, 'margins');
1014
  this.checkOrConvertNumber(this.settings, 'border');
1015
-
 
1016
  var lastRowModes = [
1017
  'justify',
1018
  'nojustify',
@@ -1024,7 +1064,7 @@
1024
  if (lastRowModes.indexOf(this.settings.lastRow) === -1) {
1025
  throw 'lastRow must be one of: ' + lastRowModes.join(', ');
1026
  }
1027
-
1028
  this.checkOrConvertNumber(this.settings, 'justifyThreshold');
1029
  if (this.settings.justifyThreshold < 0 || this.settings.justifyThreshold > 1) {
1030
  throw 'justifyThreshold must be in the interval [0,1]';
@@ -1032,38 +1072,38 @@
1032
  if ($.type(this.settings.cssAnimation) !== 'boolean') {
1033
  throw 'cssAnimation must be a boolean';
1034
  }
1035
-
1036
  if ($.type(this.settings.captions) !== 'boolean') throw 'captions must be a boolean';
1037
  this.checkOrConvertNumber(this.settings.captionSettings, 'animationDuration');
1038
-
1039
  this.checkOrConvertNumber(this.settings.captionSettings, 'visibleOpacity');
1040
  if (this.settings.captionSettings.visibleOpacity < 0 ||
1041
- this.settings.captionSettings.visibleOpacity > 1) {
1042
  throw 'captionSettings.visibleOpacity must be in the interval [0, 1]';
1043
  }
1044
-
1045
  this.checkOrConvertNumber(this.settings.captionSettings, 'nonVisibleOpacity');
1046
  if (this.settings.captionSettings.nonVisibleOpacity < 0 ||
1047
- this.settings.captionSettings.nonVisibleOpacity > 1) {
1048
  throw 'captionSettings.nonVisibleOpacity must be in the interval [0, 1]';
1049
  }
1050
-
1051
  this.checkOrConvertNumber(this.settings, 'imagesAnimationDuration');
1052
  this.checkOrConvertNumber(this.settings, 'refreshTime');
1053
  this.checkOrConvertNumber(this.settings, 'refreshSensitivity');
1054
  if ($.type(this.settings.randomize) !== 'boolean') throw 'randomize must be a boolean';
1055
  if ($.type(this.settings.selector) !== 'string') throw 'selector must be a string';
1056
-
1057
  if (this.settings.sort !== false && !$.isFunction(this.settings.sort)) {
1058
  throw 'sort must be false or a comparison function';
1059
  }
1060
-
1061
  if (this.settings.filter !== false && !$.isFunction(this.settings.filter) &&
1062
- $.type(this.settings.filter) !== 'string') {
1063
  throw 'filter must be false, a string or a filter function';
1064
  }
1065
  };
1066
-
1067
  /**
1068
  * It brings all the indexes from the sizeRangeSuffixes and it orders them. They are then sorted and returned.
1069
  * @returns {Array} sorted suffix ranges
@@ -1076,7 +1116,7 @@
1076
  suffixRanges.sort(function (a, b) { return a > b ? 1 : a < b ? -1 : 0; });
1077
  return suffixRanges;
1078
  };
1079
-
1080
  /**
1081
  * Update the existing settings only changing some of them
1082
  *
@@ -1086,16 +1126,16 @@
1086
  // In this case Justified Gallery has been called again changing only some options
1087
  this.settings = $.extend({}, this.settings, newSettings);
1088
  this.checkSettings();
1089
-
1090
  // As reported in the settings: negative value = same as margins, 0 = disabled
1091
  this.border = this.settings.border >= 0 ? this.settings.border : this.settings.margins;
1092
-
1093
  this.maxRowHeight = this.retrieveMaxRowHeight();
1094
  this.suffixRanges = this.retrieveSuffixRanges();
1095
  };
1096
-
1097
  JustifiedGallery.prototype.defaults = {
1098
- sizeRangeSuffixes: { }, /* e.g. Flickr configuration
1099
  {
1100
  100: '_t', // used when longest is less than 100px
1101
  240: '_m', // used when longest is between 101px and 240px
@@ -1110,13 +1150,14 @@
1110
  current path, width and height */
1111
  rowHeight: 120, // required? required to be > 0?
1112
  maxRowHeight: false, // false or negative value to deactivate. Positive number to express the value in pixels,
1113
- // A string '[0-9]+%' to express in percentage (e.g. 300% means that the row height
1114
- // can't exceed 3 * rowHeight)
 
1115
  margins: 1,
1116
  border: -1, // negative value = same as margins, 0 = disabled, any other value to set the border
1117
-
1118
  lastRow: 'nojustify', // … which is the same as 'left', or can be 'justify', 'center', 'right' or 'hide'
1119
-
1120
  justifyThreshold: 0.90, /* if row width / available space > 0.90 it will be always justified
1121
  * (i.e. lastRow setting is not considered) */
1122
  waitThumbnailsLoad: true,
@@ -1146,13 +1187,14 @@
1146
  - a function: invoked with arguments (entry, index, array). Return true to keep the entry, false otherwise.
1147
  It follows the specifications of the Array.prototype.filter() function of JavaScript.
1148
  */
1149
- selector: 'a, div:not(.spinner)', // The selector that is used to know what are the entries of the gallery
1150
- imgSelector: '> img, > a > img', // The selector that is used to know what are the images of each entry
1151
  triggerEvent: function (event) { // This is called to trigger events, the default behavior is to call $.trigger
1152
  this.$gallery.trigger(event); // Consider that 'this' is this set to the JustifiedGallery object, so it can
1153
  } // access to fields such as $gallery, useful to trigger events with jQuery.
1154
  };
1155
 
 
1156
  /**
1157
  * Justified Gallery plugin for jQuery
1158
  *
1
  /*!
2
+ * justifiedGallery - v3.8.1
3
  * http://miromannino.github.io/Justified-Gallery/
4
+ * Copyright (c) 2020 Miro Mannino
5
  * Licensed under the MIT license.
6
  */
7
  (function (factory) {
10
  define(['jquery'], factory);
11
  } else if (typeof module === 'object' && module.exports) {
12
  // Node/CommonJS
13
+ module.exports = function (root, jQuery) {
14
+ if (jQuery === undefined) {
15
  // require('jQuery') returns a factory that requires window to
16
  // build a jQuery instance, we normalize how we use modules
17
  // that require this pattern but the window provided is a noop
18
  // if it's defined (how jquery works)
19
+ if (typeof window !== 'undefined') {
20
  jQuery = require('jquery');
21
  }
22
  else {
40
  * @constructor
41
  */
42
  var JustifiedGallery = function ($gallery, settings) {
43
+
44
  this.settings = settings;
45
  this.checkSettings();
46
+
47
  this.imgAnalyzerTimeout = null;
48
  this.entries = null;
49
  this.buildingRow = {
50
+ entriesBuff: [],
51
+ width: 0,
52
+ height: 0,
53
+ aspectRatio: 0
54
  };
55
  this.lastFetchedEntry = null;
56
  this.lastAnalyzedIndex = -1;
57
  this.yield = {
58
+ every: 2, // do a flush every n flushes (must be greater than 1)
59
+ flushed: 0 // flushed rows without a yield
60
  };
61
  this.border = settings.border >= 0 ? settings.border : settings.margins;
62
  this.maxRowHeight = this.retrieveMaxRowHeight();
64
  this.offY = this.border;
65
  this.rows = 0;
66
  this.spinner = {
67
+ phase: 0,
68
+ timeSlot: 150,
69
+ $el: $('<div class="jg-spinner"><span></span><span></span><span></span></div>'),
70
+ intervalId: null
71
  };
72
  this.scrollBarOn = false;
73
  this.checkWidthIntervalId = null;
74
  this.galleryWidth = $gallery.width();
75
  this.$gallery = $gallery;
76
+
77
  };
78
+
79
  /** @returns {String} the best suffix given the width and the height */
80
  JustifiedGallery.prototype.getSuffix = function (width, height) {
81
  var longestSide, i;
87
  }
88
  return this.settings.sizeRangeSuffixes[this.suffixRanges[i - 1]];
89
  };
90
+
91
  /**
92
  * Remove the suffix from the string
93
  *
96
  JustifiedGallery.prototype.removeSuffix = function (str, suffix) {
97
  return str.substring(0, str.length - suffix.length);
98
  };
99
+
100
  /**
101
  * @returns {boolean} a boolean to say if the suffix is contained in the str or not
102
  */
103
  JustifiedGallery.prototype.endsWith = function (str, suffix) {
104
  return str.indexOf(suffix, str.length - suffix.length) !== -1;
105
  };
106
+
107
  /**
108
  * Get the used suffix of a particular url
109
  *
119
  }
120
  return '';
121
  };
122
+
123
  /**
124
  * Given an image src, with the width and the height, returns the new image src with the
125
  * best suffix to show the best quality thumbnail.
128
  */
129
  JustifiedGallery.prototype.newSrc = function (imageSrc, imgWidth, imgHeight, image) {
130
  var newImageSrc;
131
+
132
  if (this.settings.thumbnailPath) {
133
  newImageSrc = this.settings.thumbnailPath(imageSrc, imgWidth, imgHeight, image);
134
  } else {
138
  newImageSrc = this.removeSuffix(newImageSrc, this.getUsedSuffix(newImageSrc));
139
  newImageSrc += this.getSuffix(imgWidth, imgHeight) + ext;
140
  }
141
+
142
  return newImageSrc;
143
  };
144
+
145
  /**
146
  * Shows the images that is in the given entry
147
  *
150
  */
151
  JustifiedGallery.prototype.showImg = function ($entry, callback) {
152
  if (this.settings.cssAnimation) {
153
+ $entry.addClass('jg-entry-visible');
154
  if (callback) callback();
155
  } else {
156
  $entry.stop().fadeTo(this.settings.imagesAnimationDuration, 1.0, callback);
157
  $entry.find(this.settings.imgSelector).stop().fadeTo(this.settings.imagesAnimationDuration, 1.0, callback);
158
  }
159
  };
160
+
161
  /**
162
  * Extract the image src form the image, looking from the 'safe-src', and if it can't be found, from the
163
  * 'src' attribute. It saves in the image data the 'jg.originalSrc' field, with the extracted src.
166
  * @returns {String} the extracted src
167
  */
168
  JustifiedGallery.prototype.extractImgSrcFromImage = function ($image) {
169
+ var imageSrc = $image.data('safe-src');
170
+ var imageSrcLoc = 'data-safe-src';
171
+ if (typeof imageSrc === 'undefined') {
172
+ imageSrc = $image.attr('src');
173
+ imageSrcLoc = 'src';
174
+ }
175
+ $image.data('jg.originalSrc', imageSrc); // this is saved for the destroy method
176
+ $image.data('jg.src', imageSrc); // this will change overtime
177
+ $image.data('jg.originalSrcLoc', imageSrcLoc); // this is saved for the destroy method
178
  return imageSrc;
179
  };
180
+
181
  /** @returns {jQuery} the image in the given entry */
182
  JustifiedGallery.prototype.imgFromEntry = function ($entry) {
183
  var $img = $entry.find(this.settings.imgSelector);
184
  return $img.length === 0 ? null : $img;
185
  };
186
+
187
  /** @returns {jQuery} the caption in the given entry */
188
  JustifiedGallery.prototype.captionFromEntry = function ($entry) {
189
+ var $caption = $entry.find('> .jg-caption');
190
  return $caption.length === 0 ? null : $caption;
191
  };
192
+
193
  /**
194
  * Display the entry
195
  *
205
  $entry.height(rowHeight);
206
  $entry.css('top', y);
207
  $entry.css('left', x);
208
+
209
  var $image = this.imgFromEntry($entry);
210
  if ($image !== null) {
211
  $image.css('width', imgWidth);
212
  $image.css('height', imgHeight);
213
  $image.css('margin-left', - imgWidth / 2);
214
  $image.css('margin-top', - imgHeight / 2);
215
+
216
  // Image reloading for an high quality of thumbnails
217
+ var imageSrc = $image.data('jg.src');
218
+ if (imageSrc) {
219
+ imageSrc = this.newSrc(imageSrc, imgWidth, imgHeight, $image[0]);
220
+
221
+ $image.one('error', function () {
222
+ this.resetImgSrc($image); //revert to the original thumbnail
223
+ });
224
+
225
+ var loadNewImage = function () {
226
+ // if (imageSrc !== newImageSrc) {
227
+ $image.attr('src', imageSrc);
228
+ // }
229
+ };
230
+
231
+ if ($entry.data('jg.loaded') === 'skipped' && imageSrc) {
232
+ this.onImageEvent(imageSrc, (function() {
233
+ this.showImg($entry, loadNewImage); //load the new image after the fadeIn
234
+ $entry.data('jg.loaded', true);
235
+ }).bind(this));
236
+ } else {
237
+ this.showImg($entry, loadNewImage); //load the new image after the fadeIn
238
  }
239
+
 
 
 
 
 
 
 
 
240
  }
241
+
242
  } else {
243
  this.showImg($entry);
244
  }
245
+
246
  this.displayEntryCaption($entry);
247
  };
248
+
249
  /**
250
  * Display the entry caption. If the caption element doesn't exists, it creates the caption using the 'alt'
251
  * or the 'title' attributes.
256
  var $image = this.imgFromEntry($entry);
257
  if ($image !== null && this.settings.captions) {
258
  var $imgCaption = this.captionFromEntry($entry);
259
+
260
  // Create it if it doesn't exists
261
  if ($imgCaption === null) {
262
  var caption = $image.attr('alt');
263
  if (!this.isValidCaption(caption)) caption = $entry.attr('title');
264
  if (this.isValidCaption(caption)) { // Create only we found something
265
+ $imgCaption = $('<div class="jg-caption">' + caption + '</div>');
266
  $entry.append($imgCaption);
267
  $entry.data('jg.createdCaption', true);
268
  }
269
  }
270
+
271
  // Create events (we check again the $imgCaption because it can be still inexistent)
272
  if ($imgCaption !== null) {
273
  if (!this.settings.cssAnimation) $imgCaption.stop().fadeTo(0, this.settings.captionSettings.nonVisibleOpacity);
277
  this.removeCaptionEventsHandlers($entry);
278
  }
279
  };
280
+
281
  /**
282
  * Validates the caption
283
  *
287
  JustifiedGallery.prototype.isValidCaption = function (caption) {
288
  return (typeof caption !== 'undefined' && caption.length > 0);
289
  };
290
+
291
  /**
292
  * The callback for the event 'mouseenter'. It assumes that the event currentTarget is an entry.
293
  * It shows the caption using jQuery (or using CSS if it is configured so)
297
  JustifiedGallery.prototype.onEntryMouseEnterForCaption = function (eventObject) {
298
  var $caption = this.captionFromEntry($(eventObject.currentTarget));
299
  if (this.settings.cssAnimation) {
300
+ $caption.addClass('jg-caption-visible').removeClass('jg-caption-hidden');
301
  } else {
302
  $caption.stop().fadeTo(this.settings.captionSettings.animationDuration,
303
+ this.settings.captionSettings.visibleOpacity);
304
  }
305
  };
306
+
307
  /**
308
  * The callback for the event 'mouseleave'. It assumes that the event currentTarget is an entry.
309
  * It hides the caption using jQuery (or using CSS if it is configured so)
313
  JustifiedGallery.prototype.onEntryMouseLeaveForCaption = function (eventObject) {
314
  var $caption = this.captionFromEntry($(eventObject.currentTarget));
315
  if (this.settings.cssAnimation) {
316
+ $caption.removeClass('jg-caption-visible').removeClass('jg-caption-hidden');
317
  } else {
318
  $caption.stop().fadeTo(this.settings.captionSettings.animationDuration,
319
+ this.settings.captionSettings.nonVisibleOpacity);
320
  }
321
  };
322
+
323
  /**
324
  * Add the handlers of the entry for the caption
325
  *
337
  $entry.data('jg.captionMouseEvents', captionMouseEvents);
338
  }
339
  };
340
+
341
  /**
342
  * Remove the handlers of the entry for the caption
343
  *
351
  $entry.removeData('jg.captionMouseEvents');
352
  }
353
  };
354
+
355
  /**
356
  * Clear the building row data to be used for a new row
357
  */
360
  this.buildingRow.aspectRatio = 0;
361
  this.buildingRow.width = 0;
362
  };
363
+
364
  /**
365
  * Justify the building row, preparing it to
366
  *
367
  * @param isLastRow
368
+ * @param hiddenRow undefined or false for normal behavior. hiddenRow = true to hide the row.
369
  * @returns a boolean to know if the row has been justified or not
370
  */
371
+ JustifiedGallery.prototype.prepareBuildingRow = function (isLastRow, hiddenRow) {
372
  var i, $entry, imgAspectRatio, newImgW, newImgH, justify = true;
373
  var minHeight = 0;
374
  var availableWidth = this.galleryWidth - 2 * this.border - (
375
+ (this.buildingRow.entriesBuff.length - 1) * this.settings.margins);
376
  var rowHeight = availableWidth / this.buildingRow.aspectRatio;
377
  var defaultRowHeight = this.settings.rowHeight;
378
  var justifiable = this.buildingRow.width / availableWidth > this.settings.justifyThreshold;
379
+
380
  //Skip the last row if we can't justify it and the lastRow == 'hide'
381
+ if (hiddenRow || (isLastRow && this.settings.lastRow === 'hide' && !justifiable)) {
382
  for (i = 0; i < this.buildingRow.entriesBuff.length; i++) {
383
  $entry = this.buildingRow.entriesBuff[i];
384
  if (this.settings.cssAnimation)
385
+ $entry.removeClass('jg-entry-visible');
386
  else {
387
  $entry.stop().fadeTo(0, 0.1);
388
  $entry.find('> img, > a > img').fadeTo(0, 0);
390
  }
391
  return -1;
392
  }
393
+
394
  // With lastRow = nojustify, justify if is justificable (the images will not become too big)
395
  if (isLastRow && !justifiable && this.settings.lastRow !== 'justify' && this.settings.lastRow !== 'hide') {
396
  justify = false;
397
+
398
  if (this.rows > 0) {
399
  defaultRowHeight = (this.offY - this.border - this.settings.margins * this.rows) / this.rows;
400
  justify = defaultRowHeight * this.buildingRow.aspectRatio / availableWidth > this.settings.justifyThreshold;
401
  }
402
  }
403
+
404
  for (i = 0; i < this.buildingRow.entriesBuff.length; i++) {
405
  $entry = this.buildingRow.entriesBuff[i];
406
  imgAspectRatio = $entry.data('jg.width') / $entry.data('jg.height');
407
+
408
  if (justify) {
409
  newImgW = (i === this.buildingRow.entriesBuff.length - 1) ? availableWidth : rowHeight * imgAspectRatio;
410
  newImgH = rowHeight;
412
  newImgW = defaultRowHeight * imgAspectRatio;
413
  newImgH = defaultRowHeight;
414
  }
415
+
416
  availableWidth -= Math.round(newImgW);
417
  $entry.data('jg.jwidth', Math.round(newImgW));
418
  $entry.data('jg.jheight', Math.ceil(newImgH));
419
  if (i === 0 || minHeight > newImgH) minHeight = newImgH;
420
  }
421
+
422
  this.buildingRow.height = minHeight;
423
  return justify;
424
  };
425
+
426
  /**
427
  * Flush a row: justify it, modify the gallery height accordingly to the row height
428
  *
429
  * @param isLastRow
430
+ * @param hiddenRow undefined or false for normal behavior. hiddenRow = true to hide the row.
431
  */
432
+ JustifiedGallery.prototype.flushRow = function (isLastRow, hiddenRow) {
433
  var settings = this.settings;
434
  var $entry, buildingRowRes, offX = this.border, i;
435
+
436
+ buildingRowRes = this.prepareBuildingRow(isLastRow, hiddenRow);
437
+ if (hiddenRow || (isLastRow && settings.lastRow === 'hide' && buildingRowRes === -1)) {
438
  this.clearBuildingRow();
439
  return;
440
  }
441
+
442
+ if (this.maxRowHeight) {
443
+ if (this.maxRowHeight < this.buildingRow.height) this.buildingRow.height = this.maxRowHeight;
444
  }
445
+
446
  //Align last (unjustified) row
447
  if (isLastRow && (settings.lastRow === 'center' || settings.lastRow === 'right')) {
448
  var availableWidth = this.galleryWidth - 2 * this.border - (this.buildingRow.entriesBuff.length - 1) * settings.margins;
449
+
450
  for (i = 0; i < this.buildingRow.entriesBuff.length; i++) {
451
  $entry = this.buildingRow.entriesBuff[i];
452
  availableWidth -= $entry.data('jg.jwidth');
453
  }
454
+
455
  if (settings.lastRow === 'center')
456
+ offX += Math.round(availableWidth / 2);
457
  else if (settings.lastRow === 'right')
458
  offX += availableWidth;
459
  }
460
+
461
  var lastEntryIdx = this.buildingRow.entriesBuff.length - 1;
462
  for (i = 0; i <= lastEntryIdx; i++) {
463
+ $entry = this.buildingRow.entriesBuff[this.settings.rtl ? lastEntryIdx - i : i];
464
  this.displayEntry($entry, offX, this.offY, $entry.data('jg.jwidth'), $entry.data('jg.jheight'), this.buildingRow.height);
465
  offX += $entry.data('jg.jwidth') + settings.margins;
466
  }
467
+
468
  //Gallery Height
469
  this.galleryHeightToSet = this.offY + this.buildingRow.height + this.border;
470
  this.setGalleryTempHeight(this.galleryHeightToSet + this.getSpinnerHeight());
471
+
472
  if (!isLastRow || (this.buildingRow.height <= settings.rowHeight && buildingRowRes)) {
473
  //Ready for a new row
474
  this.offY += this.buildingRow.height + settings.margins;
477
  this.settings.triggerEvent.call(this, 'jg.rowflush');
478
  }
479
  };
480
+
481
+
482
  // Scroll position not restoring: https://github.com/miromannino/Justified-Gallery/issues/221
483
  var galleryPrevStaticHeight = 0;
484
+
485
  JustifiedGallery.prototype.rememberGalleryHeight = function () {
486
  galleryPrevStaticHeight = this.$gallery.height();
487
  this.$gallery.height(galleryPrevStaticHeight);
488
  };
489
+
490
  // grow only
491
  JustifiedGallery.prototype.setGalleryTempHeight = function (height) {
492
  galleryPrevStaticHeight = Math.max(height, galleryPrevStaticHeight);
493
  this.$gallery.height(galleryPrevStaticHeight);
494
  };
495
+
496
  JustifiedGallery.prototype.setGalleryFinalHeight = function (height) {
497
  galleryPrevStaticHeight = height;
498
  this.$gallery.height(height);
499
  };
500
+
 
 
 
 
 
 
 
501
  /**
502
  * Checks the width of the gallery container, to know if a new justification is needed
503
  */
504
  JustifiedGallery.prototype.checkWidth = function () {
505
  this.checkWidthIntervalId = setInterval($.proxy(function () {
506
+
507
  // if the gallery is not currently visible, abort.
508
  if (!this.$gallery.is(":visible")) return;
509
+
510
  var galleryWidth = parseFloat(this.$gallery.width());
511
+ if (Math.abs(galleryWidth - this.galleryWidth) > this.settings.refreshSensitivity) {
 
 
 
 
 
 
 
 
 
 
 
512
  this.galleryWidth = galleryWidth;
513
+ this.rewind();
514
+
515
+ this.rememberGalleryHeight();
516
+
517
+ // Restart to analyze
518
+ this.startImgAnalyzer(true);
519
  }
520
  }, this), this.settings.refreshTime);
521
  };
522
+
523
  /**
524
  * @returns {boolean} a boolean saying if the spinner is active or not
525
  */
526
  JustifiedGallery.prototype.isSpinnerActive = function () {
527
  return this.spinner.intervalId !== null;
528
  };
529
+
530
  /**
531
  * @returns {int} the spinner height
532
  */
533
  JustifiedGallery.prototype.getSpinnerHeight = function () {
534
  return this.spinner.$el.innerHeight();
535
  };
536
+
537
  /**
538
  * Stops the spinner animation and modify the gallery height to exclude the spinner
539
  */
543
  this.setGalleryTempHeight(this.$gallery.height() - this.getSpinnerHeight());
544
  this.spinner.$el.detach();
545
  };
546
+
547
  /**
548
  * Starts the spinner animation
549
  */
562
  spinnerContext.phase = (spinnerContext.phase + 1) % ($spinnerPoints.length * 2);
563
  }, spinnerContext.timeSlot);
564
  };
565
+
566
  /**
567
  * Rewind the image analysis to start from the first entry.
568
  */
573
  this.rows = 0;
574
  this.clearBuildingRow();
575
  };
576
+
577
+ /**
578
+ * @returns {String} `settings.selector` rejecting spinner element
579
+ */
580
+ JustifiedGallery.prototype.getSelectorWithoutSpinner = function () {
581
+ return this.settings.selector + ', div:not(.jg-spinner)';
582
+ };
583
+
584
+ /**
585
+ * @returns {Array} all entries matched by `settings.selector`
586
+ */
587
+ JustifiedGallery.prototype.getAllEntries = function () {
588
+ var selector = this.getSelectorWithoutSpinner();
589
+ return this.$gallery.children(selector).toArray();
590
+ };
591
+
592
  /**
593
  * Update the entries searching it from the justified gallery HTML element
594
  *
597
  */
598
  JustifiedGallery.prototype.updateEntries = function (norewind) {
599
  var newEntries;
600
+
601
  if (norewind && this.lastFetchedEntry != null) {
602
+ var selector = this.getSelectorWithoutSpinner();
603
+ newEntries = $(this.lastFetchedEntry).nextAll(selector).toArray();
604
  } else {
605
  this.entries = [];
606
+ newEntries = this.getAllEntries();
607
  }
608
+
609
  if (newEntries.length > 0) {
610
+
611
  // Sort or randomize
612
  if ($.isFunction(this.settings.sort)) {
613
  newEntries = this.sortArray(newEntries);
615
  newEntries = this.shuffleArray(newEntries);
616
  }
617
  this.lastFetchedEntry = newEntries[newEntries.length - 1];
618
+
619
  // Filter
620
  if (this.settings.filter) {
621
  newEntries = this.filterArray(newEntries);
622
  } else {
623
  this.resetFilters(newEntries);
624
  }
625
+
626
  }
627
+
628
  this.entries = this.entries.concat(newEntries);
629
  return true;
630
  };
631
+
632
  /**
633
  * Apply the entries order to the DOM, iterating the entries and appending the images
634
  *
640
  $(this).appendTo(that.$gallery);
641
  });
642
  };
643
+
644
  /**
645
  * Shuffle the array using the Fisher-Yates shuffle algorithm
646
  *
658
  this.insertToGallery(a);
659
  return a;
660
  };
661
+
662
  /**
663
  * Sort the array using settings.comparator as comparator
664
  *
670
  this.insertToGallery(a);
671
  return a;
672
  };
673
+
674
  /**
675
  * Reset the filters removing the 'jg-filtered' class from all the entries
676
  *
679
  JustifiedGallery.prototype.resetFilters = function (a) {
680
  for (var i = 0; i < a.length; i++) $(a[i]).removeClass('jg-filtered');
681
  };
682
+
683
  /**
684
  * Filter the entries considering theirs classes (if a string has been passed) or using a function for filtering.
685
  *
713
  return filteredArr;
714
  }
715
  };
716
+
717
+ /**
718
+ * Revert the image src to the default value.
719
+ */
720
+ JustifiedGallery.prototype.resetImgSrc = function ($img) {
721
+ if ($img.data('jg.originalSrcLoc') === 'src') {
722
+ $img.attr('src', $img.data('jg.originalSrc'));
723
+ } else {
724
+ $img.attr('src', '');
725
+ }
726
+ };
727
+
728
  /**
729
  * Destroy the Justified Gallery instance.
730
  *
736
  */
737
  JustifiedGallery.prototype.destroy = function () {
738
  clearInterval(this.checkWidthIntervalId);
739
+ this.stopImgAnalyzerStarter();
740
+
741
+ // Get fresh entries list since filtered entries are absent in `this.entries`
742
+ $.each(this.getAllEntries(), $.proxy(function (_, entry) {
743
  var $entry = $(entry);
744
+
745
  // Reset entry style
746
  $entry.css('width', '');
747
  $entry.css('height', '');
748
  $entry.css('top', '');
749
  $entry.css('left', '');
750
  $entry.data('jg.loaded', undefined);
751
+ $entry.removeClass('jg-entry jg-filtered jg-entry-visible');
752
+
753
  // Reset image style
754
  var $img = this.imgFromEntry($entry);
755
+ if ($img) {
756
+ $img.css('width', '');
757
+ $img.css('height', '');
758
+ $img.css('margin-left', '');
759
+ $img.css('margin-top', '');
760
+ this.resetImgSrc($img);
761
+ $img.data('jg.originalSrc', undefined);
762
+ $img.data('jg.originalSrcLoc', undefined);
763
+ $img.data('jg.src', undefined);
764
+ }
765
+
766
  // Remove caption
767
  this.removeCaptionEventsHandlers($entry);
768
  var $caption = this.captionFromEntry($entry);
773
  } else {
774
  if ($caption !== null) $caption.fadeTo(0, 1);
775
  }
776
+
777
  }, this));
778
+
779
  this.$gallery.css('height', '');
780
  this.$gallery.removeClass('justified-gallery');
781
  this.$gallery.data('jg.controller', undefined);
782
+ this.settings.triggerEvent.call(this, 'jg.destroy');
783
  };
784
+
785
  /**
786
  * Analyze the images and builds the rows. It returns if it found an image that is not loaded.
787
  *
792
  var $entry = $(this.entries[i]);
793
  if ($entry.data('jg.loaded') === true || $entry.data('jg.loaded') === 'skipped') {
794
  var availableWidth = this.galleryWidth - 2 * this.border - (
795
+ (this.buildingRow.entriesBuff.length - 1) * this.settings.margins);
796
  var imgAspectRatio = $entry.data('jg.width') / $entry.data('jg.height');
797
+
798
+ this.buildingRow.entriesBuff.push($entry);
799
+ this.buildingRow.aspectRatio += imgAspectRatio;
800
+ this.buildingRow.width += imgAspectRatio * this.settings.rowHeight;
801
+ this.lastAnalyzedIndex = i;
802
+
803
  if (availableWidth / (this.buildingRow.aspectRatio + imgAspectRatio) < this.settings.rowHeight) {
804
+ this.flushRow(false, this.settings.maxRowsCount > 0 && this.rows === this.settings.maxRowsCount);
805
+
806
+ if (++this.yield.flushed >= this.yield.every) {
807
  this.startImgAnalyzer(isForResize);
808
  return;
809
  }
810
  }
 
 
 
 
 
 
811
  } else if ($entry.data('jg.loaded') !== 'error') {
812
  return;
813
  }
814
  }
815
+
816
  // Last row flush (the row is not full)
817
+ if (this.buildingRow.entriesBuff.length > 0) {
818
+ this.flushRow(true, this.settings.maxRowsCount > 0 && this.rows === this.settings.maxRowsCount);
819
+ }
820
+
821
  if (this.isSpinnerActive()) {
822
  this.stopLoadingSpinnerAnimation();
823
  }
824
+
825
  /* Stop, if there is, the timeout to start the analyzeImages.
826
  This is because an image can be set loaded, and the timeout can be set,
827
  but this image can be analyzed yet.
828
  */
829
  this.stopImgAnalyzerStarter();
830
+
831
+ this.setGalleryFinalHeight(this.galleryHeightToSet);
832
+
833
  //On complete callback
834
  this.settings.triggerEvent.call(this, isForResize ? 'jg.resize' : 'jg.complete');
 
835
  };
836
+
837
  /**
838
  * Stops any ImgAnalyzer starter (that has an assigned timeout)
839
  */
844
  this.imgAnalyzerTimeout = null;
845
  }
846
  };
847
+
848
  /**
849
  * Starts the image analyzer. It is not immediately called to let the browser to update the view
850
  *
857
  that.analyzeImages(isForResize);
858
  }, 0.001); // we can't start it immediately due to a IE different behaviour
859
  };
860
+
861
  /**
862
  * Checks if the image is loaded or not using another image object. We cannot use the 'complete' image property,
863
  * because some browsers, with a 404 set complete = true.
868
  */
869
  JustifiedGallery.prototype.onImageEvent = function (imageSrc, onLoad, onError) {
870
  if (!onLoad && !onError) return;
871
+
872
  var memImage = new Image();
873
  var $memImage = $(memImage);
874
  if (onLoad) {
878
  });
879
  }
880
  if (onError) {
881
+ $memImage.one('error', function () {
882
  $memImage.off('load error');
883
  onError(memImage);
884
  });
885
  }
886
  memImage.src = imageSrc;
887
  };
888
+
889
  /**
890
  * Init of Justified Gallery controlled
891
  * It analyzes all the entries starting theirs loading and calling the image analyzer (that works with loaded images)
897
  var $image = that.imgFromEntry($entry);
898
 
899
  $entry.addClass('jg-entry');
900
+
901
  if ($entry.data('jg.loaded') !== true && $entry.data('jg.loaded') !== 'skipped') {
902
+
903
  // Link Rel global overwrite
904
  if (that.settings.rel !== null) $entry.attr('rel', that.settings.rel);
905
+
906
  // Link Target global overwrite
907
  if (that.settings.target !== null) $entry.attr('target', that.settings.target);
908
+
909
  if ($image !== null) {
910
+
911
  // Image src
912
  var imageSrc = that.extractImgSrcFromImage($image);
 
 
 
 
 
 
 
913
 
914
+ /* If we have the height and the width, we don't wait that the image is loaded,
915
+ but we start directly with the justification */
916
+ if (that.settings.waitThumbnailsLoad === false || !imageSrc) {
917
+ var width = parseFloat($image.attr('width'));
918
+ var height = parseFloat($image.attr('height'));
919
+ if ($image.prop('tagName') === 'svg') {
920
+ width = parseFloat($image[0].getBBox().width);
921
+ height = parseFloat($image[0].getBBox().height);
922
+ }
923
  if (!isNaN(width) && !isNaN(height)) {
924
  $entry.data('jg.width', width);
925
  $entry.data('jg.height', height);
929
  return true; // continue
930
  }
931
  }
932
+
933
  $entry.data('jg.loaded', false);
934
  imagesToLoad = true;
935
+
936
  // Spinner start
937
  if (!that.isSpinnerActive()) that.startLoadingSpinnerAnimation();
938
+
939
  that.onImageEvent(imageSrc, function (loadImg) { // image loaded
940
  $entry.data('jg.width', loadImg.width);
941
  $entry.data('jg.height', loadImg.height);
945
  $entry.data('jg.loaded', 'error');
946
  that.startImgAnalyzer(false);
947
  });
948
+
949
  } else {
950
  $entry.data('jg.loaded', true);
951
  $entry.data('jg.width', $entry.width() | parseFloat($entry.css('width')) | 1);
952
  $entry.data('jg.height', $entry.height() | parseFloat($entry.css('height')) | 1);
953
  }
954
+
955
  }
956
+
957
  });
958
+
959
  if (!imagesToLoad && !skippedImages) this.startImgAnalyzer(false);
960
  this.checkWidth();
961
  };
962
+
963
  /**
964
  * Checks that it is a valid number. If a string is passed it is converted to a number
965
  *
970
  if ($.type(settingContainer[settingName]) === 'string') {
971
  settingContainer[settingName] = parseFloat(settingContainer[settingName]);
972
  }
973
+
974
  if ($.type(settingContainer[settingName]) === 'number') {
975
  if (isNaN(settingContainer[settingName])) throw 'invalid number for ' + settingName;
976
  } else {
977
  throw settingName + ' must be a number';
978
  }
979
  };
980
+
981
  /**
982
  * Checks the sizeRangeSuffixes and, if necessary, converts
983
  * its keys from string (e.g. old settings with 'lt100') to int.
986
  if ($.type(this.settings.sizeRangeSuffixes) !== 'object') {
987
  throw 'sizeRangeSuffixes must be defined and must be an object';
988
  }
989
+
990
  var suffixRanges = [];
991
  for (var rangeIdx in this.settings.sizeRangeSuffixes) {
992
  if (this.settings.sizeRangeSuffixes.hasOwnProperty(rangeIdx)) suffixRanges.push(rangeIdx);
993
  }
994
+
995
+ var newSizeRngSuffixes = { 0: '' };
996
  for (var i = 0; i < suffixRanges.length; i++) {
997
  if ($.type(suffixRanges[i]) === 'string') {
998
  try {
1005
  newSizeRngSuffixes[suffixRanges[i]] = this.settings.sizeRangeSuffixes[suffixRanges[i]];
1006
  }
1007
  }
1008
+
1009
  this.settings.sizeRangeSuffixes = newSizeRngSuffixes;
1010
  };
1011
+
1012
  /**
1013
  * check and convert the maxRowHeight setting
1014
  * requires rowHeight to be already set
1018
  JustifiedGallery.prototype.retrieveMaxRowHeight = function () {
1019
  var newMaxRowHeight = null;
1020
  var rowHeight = this.settings.rowHeight;
1021
+
1022
  if ($.type(this.settings.maxRowHeight) === 'string') {
1023
  if (this.settings.maxRowHeight.match(/^[0-9]+%$/)) {
1024
  newMaxRowHeight = rowHeight * parseFloat(this.settings.maxRowHeight.match(/^([0-9]+)%$/)[1]) / 100;
1032
  } else {
1033
  throw 'maxRowHeight must be a number or a percentage';
1034
  }
1035
+
1036
  // check if the converted value is not a number
1037
  if (isNaN(newMaxRowHeight)) throw 'invalid number for maxRowHeight';
1038
+
1039
  // check values, maxRowHeight must be >= rowHeight
1040
  if (newMaxRowHeight < rowHeight) newMaxRowHeight = rowHeight;
1041
+
1042
  return newMaxRowHeight;
1043
  };
1044
+
1045
  /**
1046
  * Checks the settings
1047
  */
1048
  JustifiedGallery.prototype.checkSettings = function () {
1049
  this.checkSizeRangesSuffixes();
1050
+
1051
  this.checkOrConvertNumber(this.settings, 'rowHeight');
1052
  this.checkOrConvertNumber(this.settings, 'margins');
1053
  this.checkOrConvertNumber(this.settings, 'border');
1054
+ this.checkOrConvertNumber(this.settings, 'maxRowsCount');
1055
+
1056
  var lastRowModes = [
1057
  'justify',
1058
  'nojustify',
1064
  if (lastRowModes.indexOf(this.settings.lastRow) === -1) {
1065
  throw 'lastRow must be one of: ' + lastRowModes.join(', ');
1066
  }
1067
+
1068
  this.checkOrConvertNumber(this.settings, 'justifyThreshold');
1069
  if (this.settings.justifyThreshold < 0 || this.settings.justifyThreshold > 1) {
1070
  throw 'justifyThreshold must be in the interval [0,1]';
1072
  if ($.type(this.settings.cssAnimation) !== 'boolean') {
1073
  throw 'cssAnimation must be a boolean';
1074
  }
1075
+
1076
  if ($.type(this.settings.captions) !== 'boolean') throw 'captions must be a boolean';
1077
  this.checkOrConvertNumber(this.settings.captionSettings, 'animationDuration');
1078
+
1079
  this.checkOrConvertNumber(this.settings.captionSettings, 'visibleOpacity');
1080
  if (this.settings.captionSettings.visibleOpacity < 0 ||
1081
+ this.settings.captionSettings.visibleOpacity > 1) {
1082
  throw 'captionSettings.visibleOpacity must be in the interval [0, 1]';
1083
  }
1084
+
1085
  this.checkOrConvertNumber(this.settings.captionSettings, 'nonVisibleOpacity');
1086
  if (this.settings.captionSettings.nonVisibleOpacity < 0 ||
1087
+ this.settings.captionSettings.nonVisibleOpacity > 1) {
1088
  throw 'captionSettings.nonVisibleOpacity must be in the interval [0, 1]';
1089
  }
1090
+
1091
  this.checkOrConvertNumber(this.settings, 'imagesAnimationDuration');
1092
  this.checkOrConvertNumber(this.settings, 'refreshTime');
1093
  this.checkOrConvertNumber(this.settings, 'refreshSensitivity');
1094
  if ($.type(this.settings.randomize) !== 'boolean') throw 'randomize must be a boolean';
1095
  if ($.type(this.settings.selector) !== 'string') throw 'selector must be a string';
1096
+
1097
  if (this.settings.sort !== false && !$.isFunction(this.settings.sort)) {
1098
  throw 'sort must be false or a comparison function';
1099
  }
1100
+
1101
  if (this.settings.filter !== false && !$.isFunction(this.settings.filter) &&
1102
+ $.type(this.settings.filter) !== 'string') {
1103
  throw 'filter must be false, a string or a filter function';
1104
  }
1105
  };
1106
+
1107
  /**
1108
  * It brings all the indexes from the sizeRangeSuffixes and it orders them. They are then sorted and returned.
1109
  * @returns {Array} sorted suffix ranges
1116
  suffixRanges.sort(function (a, b) { return a > b ? 1 : a < b ? -1 : 0; });
1117
  return suffixRanges;
1118
  };
1119
+
1120
  /**
1121
  * Update the existing settings only changing some of them
1122
  *
1126
  // In this case Justified Gallery has been called again changing only some options
1127
  this.settings = $.extend({}, this.settings, newSettings);
1128
  this.checkSettings();
1129
+
1130
  // As reported in the settings: negative value = same as margins, 0 = disabled
1131
  this.border = this.settings.border >= 0 ? this.settings.border : this.settings.margins;
1132
+
1133
  this.maxRowHeight = this.retrieveMaxRowHeight();
1134
  this.suffixRanges = this.retrieveSuffixRanges();
1135
  };
1136
+
1137
  JustifiedGallery.prototype.defaults = {
1138
+ sizeRangeSuffixes: {}, /* e.g. Flickr configuration
1139
  {
1140
  100: '_t', // used when longest is less than 100px
1141
  240: '_m', // used when longest is between 101px and 240px
1150
  current path, width and height */
1151
  rowHeight: 120, // required? required to be > 0?
1152
  maxRowHeight: false, // false or negative value to deactivate. Positive number to express the value in pixels,
1153
+ // A string '[0-9]+%' to express in percentage (e.g. 300% means that the row height
1154
+ // can't exceed 3 * rowHeight)
1155
+ maxRowsCount: 0, // maximum number of rows to be displayed (0 = disabled)
1156
  margins: 1,
1157
  border: -1, // negative value = same as margins, 0 = disabled, any other value to set the border
1158
+
1159
  lastRow: 'nojustify', // … which is the same as 'left', or can be 'justify', 'center', 'right' or 'hide'
1160
+
1161
  justifyThreshold: 0.90, /* if row width / available space > 0.90 it will be always justified
1162
  * (i.e. lastRow setting is not considered) */
1163
  waitThumbnailsLoad: true,
1187
  - a function: invoked with arguments (entry, index, array). Return true to keep the entry, false otherwise.
1188
  It follows the specifications of the Array.prototype.filter() function of JavaScript.
1189
  */
1190
+ selector: 'a', // The selector that is used to know what are the entries of the gallery
1191
+ imgSelector: '> img, > a > img, > svg, > a > svg', // The selector that is used to know what are the images of each entry
1192
  triggerEvent: function (event) { // This is called to trigger events, the default behavior is to call $.trigger
1193
  this.$gallery.trigger(event); // Consider that 'this' is this set to the JustifiedGallery object, so it can
1194
  } // access to fields such as $gallery, useful to trigger events with jQuery.
1195
  };
1196
 
1197
+
1198
  /**
1199
  * Justified Gallery plugin for jQuery
1200
  *
assets/js/front/justifiedGallery.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(i),i}:e(jQuery)}(function(l){function n(t,i){this.settings=i,this.checkSettings(),this.imgAnalyzerTimeout=null,this.entries=null,this.buildingRow={entriesBuff:[],width:0,height:0,aspectRatio:0},this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.yield={every:2,flushed:0},this.border=0<=i.border?i.border:i.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges(),this.offY=this.border,this.rows=0,this.spinner={phase:0,timeSlot:150,$el:l('<div class="spinner"><span></span><span></span><span></span></div>'),intervalId:null},this.scrollBarOn=!1,this.checkWidthIntervalId=null,this.galleryWidth=t.width(),this.$gallery=t}n.prototype.getSuffix=function(t,i){for(var e=i<t?t:i,s=0;s<this.suffixRanges.length;s++)if(e<=this.suffixRanges[s])return this.settings.sizeRangeSuffixes[this.suffixRanges[s]];return this.settings.sizeRangeSuffixes[this.suffixRanges[s-1]]},n.prototype.removeSuffix=function(t,i){return t.substring(0,t.length-i.length)},n.prototype.endsWith=function(t,i){return-1!==t.indexOf(i,t.length-i.length)},n.prototype.getUsedSuffix=function(t){for(var i in this.settings.sizeRangeSuffixes)if(this.settings.sizeRangeSuffixes.hasOwnProperty(i)&&0!==this.settings.sizeRangeSuffixes[i].length&&this.endsWith(t,this.settings.sizeRangeSuffixes[i]))return this.settings.sizeRangeSuffixes[i];return""},n.prototype.newSrc=function(t,i,e,s){var n;return this.settings.thumbnailPath?n=this.settings.thumbnailPath(t,i,e,s):(s=null!==(s=t.match(this.settings.extension))?s[0]:"",n=t.replace(this.settings.extension,""),n=this.removeSuffix(n,this.getUsedSuffix(n)),n+=this.getSuffix(i,e)+s),n},n.prototype.showImg=function(t,i){this.settings.cssAnimation?(t.addClass("entry-visible"),i&&i()):(t.stop().fadeTo(this.settings.imagesAnimationDuration,1,i),t.find(this.settings.imgSelector).stop().fadeTo(this.settings.imagesAnimationDuration,1,i))},n.prototype.extractImgSrcFromImage=function(t){var i=void 0!==t.data("safe-src")?t.data("safe-src"):t.attr("src");return t.data("jg.originalSrc",i),i},n.prototype.imgFromEntry=function(t){t=t.find(this.settings.imgSelector);return 0===t.length?null:t},n.prototype.captionFromEntry=function(t){t=t.find("> .caption");return 0===t.length?null:t},n.prototype.displayEntry=function(t,i,e,s,n,r){t.width(s),t.height(r),t.css("top",e),t.css("left",i);var o,a,h,g=this.imgFromEntry(t);null!==g?(g.css("width",s),g.css("height",n),g.css("margin-left",-s/2),g.css("margin-top",-n/2),o=g.attr("src"),a=this.newSrc(o,s,n,g[0]),g.one("error",function(){g.attr("src",g.data("jg.originalSrc"))}),h=function(){o!==a&&g.attr("src",a)},"skipped"===t.data("jg.loaded")?this.onImageEvent(o,l.proxy(function(){this.showImg(t,h),t.data("jg.loaded",!0)},this)):this.showImg(t,h)):this.showImg(t),this.displayEntryCaption(t)},n.prototype.displayEntryCaption=function(t){var i,e=this.imgFromEntry(t);null!==e&&this.settings.captions?(null===(i=this.captionFromEntry(t))&&(e=e.attr("alt"),this.isValidCaption(e)||(e=t.attr("title")),this.isValidCaption(e)&&(i=l('<div class="caption">'+e+"</div>"),t.append(i),t.data("jg.createdCaption",!0))),null!==i&&(this.settings.cssAnimation||i.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity),this.addCaptionEventsHandlers(t))):this.removeCaptionEventsHandlers(t)},n.prototype.isValidCaption=function(t){return void 0!==t&&0<t.length},n.prototype.onEntryMouseEnterForCaption=function(t){t=this.captionFromEntry(l(t.currentTarget));this.settings.cssAnimation?t.addClass("caption-visible").removeClass("caption-hidden"):t.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.visibleOpacity)},n.prototype.onEntryMouseLeaveForCaption=function(t){t=this.captionFromEntry(l(t.currentTarget));this.settings.cssAnimation?t.removeClass("caption-visible").removeClass("caption-hidden"):t.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.nonVisibleOpacity)},n.prototype.addCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0===i&&(i={mouseenter:l.proxy(this.onEntryMouseEnterForCaption,this),mouseleave:l.proxy(this.onEntryMouseLeaveForCaption,this)},t.on("mouseenter",void 0,void 0,i.mouseenter),t.on("mouseleave",void 0,void 0,i.mouseleave),t.data("jg.captionMouseEvents",i))},n.prototype.removeCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0!==i&&(t.off("mouseenter",void 0,i.mouseenter),t.off("mouseleave",void 0,i.mouseleave),t.removeData("jg.captionMouseEvents"))},n.prototype.clearBuildingRow=function(){this.buildingRow.entriesBuff=[],this.buildingRow.aspectRatio=0,this.buildingRow.width=0},n.prototype.prepareBuildingRow=function(t){var i,e,s,n,r=!0,o=0,a=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,h=a/this.buildingRow.aspectRatio,g=this.settings.rowHeight,l=this.buildingRow.width/a>this.settings.justifyThreshold;if(t&&"hide"===this.settings.lastRow&&!l){for(i=0;i<this.buildingRow.entriesBuff.length;i++)e=this.buildingRow.entriesBuff[i],this.settings.cssAnimation?e.removeClass("entry-visible"):(e.stop().fadeTo(0,.1),e.find("> img, > a > img").fadeTo(0,0));return-1}for(t&&!l&&"justify"!==this.settings.lastRow&&"hide"!==this.settings.lastRow&&(r=!1,0<this.rows&&(r=(g=(this.offY-this.border-this.settings.margins*this.rows)/this.rows)*this.buildingRow.aspectRatio/a>this.settings.justifyThreshold)),i=0;i<this.buildingRow.entriesBuff.length;i++)n=(e=this.buildingRow.entriesBuff[i]).data("jg.width")/e.data("jg.height"),n=r?(s=i===this.buildingRow.entriesBuff.length-1?a:h*n,h):(s=g*n,g),a-=Math.round(s),e.data("jg.jwidth",Math.round(s)),e.data("jg.jheight",Math.ceil(n)),(0===i||n<o)&&(o=n);return this.buildingRow.height=o,r},n.prototype.flushRow=function(t){var i,e=this.settings,s=this.border,n=this.prepareBuildingRow(t);if(t&&"hide"===e.lastRow&&-1===n)this.clearBuildingRow();else{if(this.maxRowHeight&&this.maxRowHeight<this.buildingRow.height&&(this.buildingRow.height=this.maxRowHeight),t&&("center"===e.lastRow||"right"===e.lastRow)){for(var r=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*e.margins,o=0;o<this.buildingRow.entriesBuff.length;o++)r-=(i=this.buildingRow.entriesBuff[o]).data("jg.jwidth");"center"===e.lastRow?s+=r/2:"right"===e.lastRow&&(s+=r)}var a=this.buildingRow.entriesBuff.length-1;for(o=0;o<=a;o++)i=this.buildingRow.entriesBuff[this.settings.rtl?a-o:o],this.displayEntry(i,s,this.offY,i.data("jg.jwidth"),i.data("jg.jheight"),this.buildingRow.height),s+=i.data("jg.jwidth")+e.margins;this.galleryHeightToSet=this.offY+this.buildingRow.height+this.border,this.setGalleryTempHeight(this.galleryHeightToSet+this.getSpinnerHeight()),(!t||this.buildingRow.height<=e.rowHeight&&n)&&(this.offY+=this.buildingRow.height+e.margins,this.rows+=1,this.clearBuildingRow(),this.settings.triggerEvent.call(this,"jg.rowflush"))}};var i=0;function e(){return l("body").height()>l(window).height()}n.prototype.rememberGalleryHeight=function(){i=this.$gallery.height(),this.$gallery.height(i)},n.prototype.setGalleryTempHeight=function(t){i=Math.max(t,i),this.$gallery.height(i)},n.prototype.setGalleryFinalHeight=function(t){i=t,this.$gallery.height(t)},n.prototype.checkWidth=function(){this.checkWidthIntervalId=setInterval(l.proxy(function(){var t;this.$gallery.is(":visible")&&(t=parseFloat(this.$gallery.width()),e()===this.scrollBarOn?Math.abs(t-this.galleryWidth)>this.settings.refreshSensitivity&&(this.galleryWidth=t,this.rewind(),this.rememberGalleryHeight(),this.startImgAnalyzer(!0)):(this.scrollBarOn=e(),this.galleryWidth=t))},this),this.settings.refreshTime)},n.prototype.isSpinnerActive=function(){return null!==this.spinner.intervalId},n.prototype.getSpinnerHeight=function(){return this.spinner.$el.innerHeight()},n.prototype.stopLoadingSpinnerAnimation=function(){clearInterval(this.spinner.intervalId),this.spinner.intervalId=null,this.setGalleryTempHeight(this.$gallery.height()-this.getSpinnerHeight()),this.spinner.$el.detach()},n.prototype.startLoadingSpinnerAnimation=function(){var t=this.spinner,i=t.$el.find("span");clearInterval(t.intervalId),this.$gallery.append(t.$el),this.setGalleryTempHeight(this.offY+this.buildingRow.height+this.getSpinnerHeight()),t.intervalId=setInterval(function(){t.phase<i.length?i.eq(t.phase).fadeTo(t.timeSlot,1):i.eq(t.phase-i.length).fadeTo(t.timeSlot,0),t.phase=(t.phase+1)%(2*i.length)},t.timeSlot)},n.prototype.rewind=function(){this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.offY=this.border,this.rows=0,this.clearBuildingRow()},n.prototype.updateEntries=function(t){t=t&&null!=this.lastFetchedEntry?l(this.lastFetchedEntry).nextAll(this.settings.selector).toArray():(this.entries=[],this.$gallery.children(this.settings.selector).toArray());return 0<t.length&&(l.isFunction(this.settings.sort)?t=this.sortArray(t):this.settings.randomize&&(t=this.shuffleArray(t)),this.lastFetchedEntry=t[t.length-1],this.settings.filter?t=this.filterArray(t):this.resetFilters(t)),this.entries=this.entries.concat(t),!0},n.prototype.insertToGallery=function(t){var i=this;l.each(t,function(){l(this).appendTo(i.$gallery)})},n.prototype.shuffleArray=function(t){for(var i,e,s=t.length-1;0<s;s--)i=Math.floor(Math.random()*(s+1)),e=t[s],t[s]=t[i],t[i]=e;return this.insertToGallery(t),t},n.prototype.sortArray=function(t){return t.sort(this.settings.sort),this.insertToGallery(t),t},n.prototype.resetFilters=function(t){for(var i=0;i<t.length;i++)l(t[i]).removeClass("jg-filtered")},n.prototype.filterArray=function(t){var i=this.settings;if("string"===l.type(i.filter))return t.filter(function(t){t=l(t);return t.is(i.filter)?(t.removeClass("jg-filtered"),!0):(t.addClass("jg-filtered").removeClass("jg-visible"),!1)});if(l.isFunction(i.filter)){for(var e=t.filter(i.filter),s=0;s<t.length;s++)-1===e.indexOf(t[s])?l(t[s]).addClass("jg-filtered").removeClass("jg-visible"):l(t[s]).removeClass("jg-filtered");return e}},n.prototype.destroy=function(){clearInterval(this.checkWidthIntervalId),l.each(this.entries,l.proxy(function(t,i){var e=l(i);e.css("width",""),e.css("height",""),e.css("top",""),e.css("left",""),e.data("jg.loaded",void 0),e.removeClass("jg-entry");i=this.imgFromEntry(e);i.css("width",""),i.css("height",""),i.css("margin-left",""),i.css("margin-top",""),i.attr("src",i.data("jg.originalSrc")),i.data("jg.originalSrc",void 0),this.removeCaptionEventsHandlers(e);i=this.captionFromEntry(e);e.data("jg.createdCaption")?(e.data("jg.createdCaption",void 0),null!==i&&i.remove()):null!==i&&i.fadeTo(0,1)},this)),this.$gallery.css("height",""),this.$gallery.removeClass("justified-gallery"),this.$gallery.data("jg.controller",void 0)},n.prototype.analyzeImages=function(t){for(var i=this.lastAnalyzedIndex+1;i<this.entries.length;i++){var e=l(this.entries[i]);if(!0===e.data("jg.loaded")||"skipped"===e.data("jg.loaded")){var s=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,n=e.data("jg.width")/e.data("jg.height");if(s/(this.buildingRow.aspectRatio+n)<this.settings.rowHeight&&(this.flushRow(!1),++this.yield.flushed>=this.yield.every))return void this.startImgAnalyzer(t);this.buildingRow.entriesBuff.push(e),this.buildingRow.aspectRatio+=n,this.buildingRow.width+=n*this.settings.rowHeight,this.lastAnalyzedIndex=i}else if("error"!==e.data("jg.loaded"))return}0<this.buildingRow.entriesBuff.length&&this.flushRow(!0),this.isSpinnerActive()&&this.stopLoadingSpinnerAnimation(),this.stopImgAnalyzerStarter(),this.settings.triggerEvent.call(this,t?"jg.resize":"jg.complete"),this.setGalleryFinalHeight(this.galleryHeightToSet)},n.prototype.stopImgAnalyzerStarter=function(){this.yield.flushed=0,null!==this.imgAnalyzerTimeout&&(clearTimeout(this.imgAnalyzerTimeout),this.imgAnalyzerTimeout=null)},n.prototype.startImgAnalyzer=function(t){var i=this;this.stopImgAnalyzerStarter(),this.imgAnalyzerTimeout=setTimeout(function(){i.analyzeImages(t)},.001)},n.prototype.onImageEvent=function(t,i,e){var s,n;(i||e)&&(s=new Image,n=l(s),i&&n.one("load",function(){n.off("load error"),i(s)}),e&&n.one("error",function(){n.off("load error"),e(s)}),s.src=t)},n.prototype.init=function(){var r=!1,o=!1,a=this;l.each(this.entries,function(t,i){var e=l(i),s=a.imgFromEntry(e);if(e.addClass("jg-entry"),!0!==e.data("jg.loaded")&&"skipped"!==e.data("jg.loaded"))if(null!==a.settings.rel&&e.attr("rel",a.settings.rel),null!==a.settings.target&&e.attr("target",a.settings.target),null!==s){var n=a.extractImgSrcFromImage(s);if(s.attr("src",n),!1===a.settings.waitThumbnailsLoad){i=parseFloat(s.prop("width")),s=parseFloat(s.prop("height"));if(!isNaN(i)&&!isNaN(s))return e.data("jg.width",i),e.data("jg.height",s),e.data("jg.loaded","skipped"),o=!0,a.startImgAnalyzer(!1),!0}e.data("jg.loaded",!1),r=!0,a.isSpinnerActive()||a.startLoadingSpinnerAnimation(),a.onImageEvent(n,function(t){e.data("jg.width",t.width),e.data("jg.height",t.height),e.data("jg.loaded",!0),a.startImgAnalyzer(!1)},function(){e.data("jg.loaded","error"),a.startImgAnalyzer(!1)})}else e.data("jg.loaded",!0),e.data("jg.width",e.width()|parseFloat(e.css("width"))|1),e.data("jg.height",e.height()|parseFloat(e.css("height"))|1)}),r||o||this.startImgAnalyzer(!1),this.checkWidth()},n.prototype.checkOrConvertNumber=function(t,i){if("string"===l.type(t[i])&&(t[i]=parseFloat(t[i])),"number"!==l.type(t[i]))throw i+" must be a number";if(isNaN(t[i]))throw"invalid number for "+i},n.prototype.checkSizeRangesSuffixes=function(){if("object"!==l.type(this.settings.sizeRangeSuffixes))throw"sizeRangeSuffixes must be defined and must be an object";var t,i=[];for(t in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(t)&&i.push(t);for(var e={0:""},s=0;s<i.length;s++)if("string"===l.type(i[s]))try{e[parseInt(i[s].replace(/^[a-z]+/,""),10)]=this.settings.sizeRangeSuffixes[i[s]]}catch(t){throw"sizeRangeSuffixes keys must contains correct numbers ("+t+")"}else e[i[s]]=this.settings.sizeRangeSuffixes[i[s]];this.settings.sizeRangeSuffixes=e},n.prototype.retrieveMaxRowHeight=function(){var t=null,i=this.settings.rowHeight;if("string"===l.type(this.settings.maxRowHeight))t=this.settings.maxRowHeight.match(/^[0-9]+%$/)?i*parseFloat(this.settings.maxRowHeight.match(/^([0-9]+)%$/)[1])/100:parseFloat(this.settings.maxRowHeight);else{if("number"!==l.type(this.settings.maxRowHeight)){if(!1===this.settings.maxRowHeight||null==this.settings.maxRowHeight)return null;throw"maxRowHeight must be a number or a percentage"}t=this.settings.maxRowHeight}if(isNaN(t))throw"invalid number for maxRowHeight";return t<i&&(t=i),t},n.prototype.checkSettings=function(){this.checkSizeRangesSuffixes(),this.checkOrConvertNumber(this.settings,"rowHeight"),this.checkOrConvertNumber(this.settings,"margins"),this.checkOrConvertNumber(this.settings,"border");var t=["justify","nojustify","left","center","right","hide"];if(-1===t.indexOf(this.settings.lastRow))throw"lastRow must be one of: "+t.join(", ");if(this.checkOrConvertNumber(this.settings,"justifyThreshold"),this.settings.justifyThreshold<0||1<this.settings.justifyThreshold)throw"justifyThreshold must be in the interval [0,1]";if("boolean"!==l.type(this.settings.cssAnimation))throw"cssAnimation must be a boolean";if("boolean"!==l.type(this.settings.captions))throw"captions must be a boolean";if(this.checkOrConvertNumber(this.settings.captionSettings,"animationDuration"),this.checkOrConvertNumber(this.settings.captionSettings,"visibleOpacity"),this.settings.captionSettings.visibleOpacity<0||1<this.settings.captionSettings.visibleOpacity)throw"captionSettings.visibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings.captionSettings,"nonVisibleOpacity"),this.settings.captionSettings.nonVisibleOpacity<0||1<this.settings.captionSettings.nonVisibleOpacity)throw"captionSettings.nonVisibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings,"imagesAnimationDuration"),this.checkOrConvertNumber(this.settings,"refreshTime"),this.checkOrConvertNumber(this.settings,"refreshSensitivity"),"boolean"!==l.type(this.settings.randomize))throw"randomize must be a boolean";if("string"!==l.type(this.settings.selector))throw"selector must be a string";if(!1!==this.settings.sort&&!l.isFunction(this.settings.sort))throw"sort must be false or a comparison function";if(!1!==this.settings.filter&&!l.isFunction(this.settings.filter)&&"string"!==l.type(this.settings.filter))throw"filter must be false, a string or a filter function"},n.prototype.retrieveSuffixRanges=function(){var t,i=[];for(t in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(t)&&i.push(parseInt(t,10));return i.sort(function(t,i){return i<t?1:t<i?-1:0}),i},n.prototype.updateSettings=function(t){this.settings=l.extend({},this.settings,t),this.checkSettings(),this.border=0<=this.settings.border?this.settings.border:this.settings.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges()},n.prototype.defaults={sizeRangeSuffixes:{},thumbnailPath:void 0,rowHeight:120,maxRowHeight:!1,margins:1,border:-1,lastRow:"nojustify",justifyThreshold:.9,waitThumbnailsLoad:!0,captions:!0,cssAnimation:!0,imagesAnimationDuration:500,captionSettings:{animationDuration:500,visibleOpacity:.7,nonVisibleOpacity:0},rel:null,target:null,extension:/\.[^.\\/]+$/,refreshTime:200,refreshSensitivity:0,randomize:!1,rtl:!1,sort:!1,filter:!1,selector:"a, div:not(.spinner)",imgSelector:"> img, > a > img",triggerEvent:function(t){this.$gallery.trigger(t)}},l.fn.justifiedGallery=function(s){return this.each(function(t,i){var e=l(i);e.addClass("justified-gallery");i=e.data("jg.controller");if(void 0===i){if(null!=s&&"object"!==l.type(s)){if("destroy"===s)return;throw"The argument must be an object"}i=new n(e,l.extend({},n.prototype.defaults,s)),e.data("jg.controller",i)}else if("norewind"!==s){if("destroy"===s)return void i.destroy();i.updateSettings(s),i.rewind()}i.updateEntries("norewind"===s)&&i.init()})}});
1
+ !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(i),i}:e(jQuery)}(function(g){function n(t,i){this.settings=i,this.checkSettings(),this.imgAnalyzerTimeout=null,this.entries=null,this.buildingRow={entriesBuff:[],width:0,height:0,aspectRatio:0},this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.yield={every:2,flushed:0},this.border=0<=i.border?i.border:i.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges(),this.offY=this.border,this.rows=0,this.spinner={phase:0,timeSlot:150,$el:g('<div class="jg-spinner"><span></span><span></span><span></span></div>'),intervalId:null},this.scrollBarOn=!1,this.checkWidthIntervalId=null,this.galleryWidth=t.width(),this.$gallery=t}n.prototype.getSuffix=function(t,i){for(var e=i<t?t:i,s=0;s<this.suffixRanges.length;s++)if(e<=this.suffixRanges[s])return this.settings.sizeRangeSuffixes[this.suffixRanges[s]];return this.settings.sizeRangeSuffixes[this.suffixRanges[s-1]]},n.prototype.removeSuffix=function(t,i){return t.substring(0,t.length-i.length)},n.prototype.endsWith=function(t,i){return-1!==t.indexOf(i,t.length-i.length)},n.prototype.getUsedSuffix=function(t){for(var i in this.settings.sizeRangeSuffixes)if(this.settings.sizeRangeSuffixes.hasOwnProperty(i)&&0!==this.settings.sizeRangeSuffixes[i].length&&this.endsWith(t,this.settings.sizeRangeSuffixes[i]))return this.settings.sizeRangeSuffixes[i];return""},n.prototype.newSrc=function(t,i,e,s){var n;return this.settings.thumbnailPath?n=this.settings.thumbnailPath(t,i,e,s):(s=null!==(s=t.match(this.settings.extension))?s[0]:"",n=t.replace(this.settings.extension,""),n=this.removeSuffix(n,this.getUsedSuffix(n)),n+=this.getSuffix(i,e)+s),n},n.prototype.showImg=function(t,i){this.settings.cssAnimation?(t.addClass("jg-entry-visible"),i&&i()):(t.stop().fadeTo(this.settings.imagesAnimationDuration,1,i),t.find(this.settings.imgSelector).stop().fadeTo(this.settings.imagesAnimationDuration,1,i))},n.prototype.extractImgSrcFromImage=function(t){var i=t.data("safe-src"),e="data-safe-src";return void 0===i&&(i=t.attr("src"),e="src"),t.data("jg.originalSrc",i),t.data("jg.src",i),t.data("jg.originalSrcLoc",e),i},n.prototype.imgFromEntry=function(t){t=t.find(this.settings.imgSelector);return 0===t.length?null:t},n.prototype.captionFromEntry=function(t){t=t.find("> .jg-caption");return 0===t.length?null:t},n.prototype.displayEntry=function(t,i,e,s,n,r){t.width(s),t.height(r),t.css("top",e),t.css("left",i);var o,a,h=this.imgFromEntry(t);null!==h?(h.css("width",s),h.css("height",n),h.css("margin-left",-s/2),h.css("margin-top",-n/2),(o=h.data("jg.src"))&&(o=this.newSrc(o,s,n,h[0]),h.one("error",function(){this.resetImgSrc(h)}),a=function(){h.attr("src",o)},"skipped"===t.data("jg.loaded")&&o?this.onImageEvent(o,function(){this.showImg(t,a),t.data("jg.loaded",!0)}.bind(this)):this.showImg(t,a))):this.showImg(t),this.displayEntryCaption(t)},n.prototype.displayEntryCaption=function(t){var i,e=this.imgFromEntry(t);null!==e&&this.settings.captions?(null===(i=this.captionFromEntry(t))&&(e=e.attr("alt"),this.isValidCaption(e)||(e=t.attr("title")),this.isValidCaption(e)&&(i=g('<div class="jg-caption">'+e+"</div>"),t.append(i),t.data("jg.createdCaption",!0))),null!==i&&(this.settings.cssAnimation||i.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity),this.addCaptionEventsHandlers(t))):this.removeCaptionEventsHandlers(t)},n.prototype.isValidCaption=function(t){return void 0!==t&&0<t.length},n.prototype.onEntryMouseEnterForCaption=function(t){t=this.captionFromEntry(g(t.currentTarget));this.settings.cssAnimation?t.addClass("jg-caption-visible").removeClass("jg-caption-hidden"):t.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.visibleOpacity)},n.prototype.onEntryMouseLeaveForCaption=function(t){t=this.captionFromEntry(g(t.currentTarget));this.settings.cssAnimation?t.removeClass("jg-caption-visible").removeClass("jg-caption-hidden"):t.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.nonVisibleOpacity)},n.prototype.addCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0===i&&(i={mouseenter:g.proxy(this.onEntryMouseEnterForCaption,this),mouseleave:g.proxy(this.onEntryMouseLeaveForCaption,this)},t.on("mouseenter",void 0,void 0,i.mouseenter),t.on("mouseleave",void 0,void 0,i.mouseleave),t.data("jg.captionMouseEvents",i))},n.prototype.removeCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0!==i&&(t.off("mouseenter",void 0,i.mouseenter),t.off("mouseleave",void 0,i.mouseleave),t.removeData("jg.captionMouseEvents"))},n.prototype.clearBuildingRow=function(){this.buildingRow.entriesBuff=[],this.buildingRow.aspectRatio=0,this.buildingRow.width=0},n.prototype.prepareBuildingRow=function(t,i){var e,s,n,r,o=!0,a=0,h=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,g=h/this.buildingRow.aspectRatio,l=this.settings.rowHeight,u=this.buildingRow.width/h>this.settings.justifyThreshold;if(i||t&&"hide"===this.settings.lastRow&&!u){for(e=0;e<this.buildingRow.entriesBuff.length;e++)s=this.buildingRow.entriesBuff[e],this.settings.cssAnimation?s.removeClass("jg-entry-visible"):(s.stop().fadeTo(0,.1),s.find("> img, > a > img").fadeTo(0,0));return-1}for(t&&!u&&"justify"!==this.settings.lastRow&&"hide"!==this.settings.lastRow&&(o=!1,0<this.rows&&(o=(l=(this.offY-this.border-this.settings.margins*this.rows)/this.rows)*this.buildingRow.aspectRatio/h>this.settings.justifyThreshold)),e=0;e<this.buildingRow.entriesBuff.length;e++)r=(s=this.buildingRow.entriesBuff[e]).data("jg.width")/s.data("jg.height"),r=o?(n=e===this.buildingRow.entriesBuff.length-1?h:g*r,g):(n=l*r,l),h-=Math.round(n),s.data("jg.jwidth",Math.round(n)),s.data("jg.jheight",Math.ceil(r)),(0===e||r<a)&&(a=r);return this.buildingRow.height=a,o},n.prototype.flushRow=function(t,i){var e,s=this.settings,n=this.border,r=this.prepareBuildingRow(t,i);if(i||t&&"hide"===s.lastRow&&-1===r)this.clearBuildingRow();else{if(this.maxRowHeight&&this.maxRowHeight<this.buildingRow.height&&(this.buildingRow.height=this.maxRowHeight),t&&("center"===s.lastRow||"right"===s.lastRow)){for(var o=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*s.margins,a=0;a<this.buildingRow.entriesBuff.length;a++)o-=(e=this.buildingRow.entriesBuff[a]).data("jg.jwidth");"center"===s.lastRow?n+=Math.round(o/2):"right"===s.lastRow&&(n+=o)}var h=this.buildingRow.entriesBuff.length-1;for(a=0;a<=h;a++)e=this.buildingRow.entriesBuff[this.settings.rtl?h-a:a],this.displayEntry(e,n,this.offY,e.data("jg.jwidth"),e.data("jg.jheight"),this.buildingRow.height),n+=e.data("jg.jwidth")+s.margins;this.galleryHeightToSet=this.offY+this.buildingRow.height+this.border,this.setGalleryTempHeight(this.galleryHeightToSet+this.getSpinnerHeight()),(!t||this.buildingRow.height<=s.rowHeight&&r)&&(this.offY+=this.buildingRow.height+s.margins,this.rows+=1,this.clearBuildingRow(),this.settings.triggerEvent.call(this,"jg.rowflush"))}};var i=0;n.prototype.rememberGalleryHeight=function(){i=this.$gallery.height(),this.$gallery.height(i)},n.prototype.setGalleryTempHeight=function(t){i=Math.max(t,i),this.$gallery.height(i)},n.prototype.setGalleryFinalHeight=function(t){i=t,this.$gallery.height(t)},n.prototype.checkWidth=function(){this.checkWidthIntervalId=setInterval(g.proxy(function(){var t;this.$gallery.is(":visible")&&(t=parseFloat(this.$gallery.width()),Math.abs(t-this.galleryWidth)>this.settings.refreshSensitivity&&(this.galleryWidth=t,this.rewind(),this.rememberGalleryHeight(),this.startImgAnalyzer(!0)))},this),this.settings.refreshTime)},n.prototype.isSpinnerActive=function(){return null!==this.spinner.intervalId},n.prototype.getSpinnerHeight=function(){return this.spinner.$el.innerHeight()},n.prototype.stopLoadingSpinnerAnimation=function(){clearInterval(this.spinner.intervalId),this.spinner.intervalId=null,this.setGalleryTempHeight(this.$gallery.height()-this.getSpinnerHeight()),this.spinner.$el.detach()},n.prototype.startLoadingSpinnerAnimation=function(){var t=this.spinner,i=t.$el.find("span");clearInterval(t.intervalId),this.$gallery.append(t.$el),this.setGalleryTempHeight(this.offY+this.buildingRow.height+this.getSpinnerHeight()),t.intervalId=setInterval(function(){t.phase<i.length?i.eq(t.phase).fadeTo(t.timeSlot,1):i.eq(t.phase-i.length).fadeTo(t.timeSlot,0),t.phase=(t.phase+1)%(2*i.length)},t.timeSlot)},n.prototype.rewind=function(){this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.offY=this.border,this.rows=0,this.clearBuildingRow()},n.prototype.getSelectorWithoutSpinner=function(){return this.settings.selector+", div:not(.jg-spinner)"},n.prototype.getAllEntries=function(){var t=this.getSelectorWithoutSpinner();return this.$gallery.children(t).toArray()},n.prototype.updateEntries=function(t){var i;return 0<(i=t&&null!=this.lastFetchedEntry?(i=this.getSelectorWithoutSpinner(),g(this.lastFetchedEntry).nextAll(i).toArray()):(this.entries=[],this.getAllEntries())).length&&(g.isFunction(this.settings.sort)?i=this.sortArray(i):this.settings.randomize&&(i=this.shuffleArray(i)),this.lastFetchedEntry=i[i.length-1],this.settings.filter?i=this.filterArray(i):this.resetFilters(i)),this.entries=this.entries.concat(i),!0},n.prototype.insertToGallery=function(t){var i=this;g.each(t,function(){g(this).appendTo(i.$gallery)})},n.prototype.shuffleArray=function(t){for(var i,e,s=t.length-1;0<s;s--)i=Math.floor(Math.random()*(s+1)),e=t[s],t[s]=t[i],t[i]=e;return this.insertToGallery(t),t},n.prototype.sortArray=function(t){return t.sort(this.settings.sort),this.insertToGallery(t),t},n.prototype.resetFilters=function(t){for(var i=0;i<t.length;i++)g(t[i]).removeClass("jg-filtered")},n.prototype.filterArray=function(t){var i=this.settings;if("string"===g.type(i.filter))return t.filter(function(t){t=g(t);return t.is(i.filter)?(t.removeClass("jg-filtered"),!0):(t.addClass("jg-filtered").removeClass("jg-visible"),!1)});if(g.isFunction(i.filter)){for(var e=t.filter(i.filter),s=0;s<t.length;s++)-1===e.indexOf(t[s])?g(t[s]).addClass("jg-filtered").removeClass("jg-visible"):g(t[s]).removeClass("jg-filtered");return e}},n.prototype.resetImgSrc=function(t){"src"===t.data("jg.originalSrcLoc")?t.attr("src",t.data("jg.originalSrc")):t.attr("src","")},n.prototype.destroy=function(){clearInterval(this.checkWidthIntervalId),this.stopImgAnalyzerStarter(),g.each(this.getAllEntries(),g.proxy(function(t,i){var e=g(i);e.css("width",""),e.css("height",""),e.css("top",""),e.css("left",""),e.data("jg.loaded",void 0),e.removeClass("jg-entry jg-filtered jg-entry-visible");i=this.imgFromEntry(e);i&&(i.css("width",""),i.css("height",""),i.css("margin-left",""),i.css("margin-top",""),this.resetImgSrc(i),i.data("jg.originalSrc",void 0),i.data("jg.originalSrcLoc",void 0),i.data("jg.src",void 0)),this.removeCaptionEventsHandlers(e);i=this.captionFromEntry(e);e.data("jg.createdCaption")?(e.data("jg.createdCaption",void 0),null!==i&&i.remove()):null!==i&&i.fadeTo(0,1)},this)),this.$gallery.css("height",""),this.$gallery.removeClass("justified-gallery"),this.$gallery.data("jg.controller",void 0),this.settings.triggerEvent.call(this,"jg.destroy")},n.prototype.analyzeImages=function(t){for(var i=this.lastAnalyzedIndex+1;i<this.entries.length;i++){var e=g(this.entries[i]);if(!0===e.data("jg.loaded")||"skipped"===e.data("jg.loaded")){var s=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,n=e.data("jg.width")/e.data("jg.height");if(this.buildingRow.entriesBuff.push(e),this.buildingRow.aspectRatio+=n,this.buildingRow.width+=n*this.settings.rowHeight,this.lastAnalyzedIndex=i,s/(this.buildingRow.aspectRatio+n)<this.settings.rowHeight&&(this.flushRow(!1,0<this.settings.maxRowsCount&&this.rows===this.settings.maxRowsCount),++this.yield.flushed>=this.yield.every))return void this.startImgAnalyzer(t)}else if("error"!==e.data("jg.loaded"))return}0<this.buildingRow.entriesBuff.length&&this.flushRow(!0,0<this.settings.maxRowsCount&&this.rows===this.settings.maxRowsCount),this.isSpinnerActive()&&this.stopLoadingSpinnerAnimation(),this.stopImgAnalyzerStarter(),this.setGalleryFinalHeight(this.galleryHeightToSet),this.settings.triggerEvent.call(this,t?"jg.resize":"jg.complete")},n.prototype.stopImgAnalyzerStarter=function(){this.yield.flushed=0,null!==this.imgAnalyzerTimeout&&(clearTimeout(this.imgAnalyzerTimeout),this.imgAnalyzerTimeout=null)},n.prototype.startImgAnalyzer=function(t){var i=this;this.stopImgAnalyzerStarter(),this.imgAnalyzerTimeout=setTimeout(function(){i.analyzeImages(t)},.001)},n.prototype.onImageEvent=function(t,i,e){var s,n;(i||e)&&(s=new Image,n=g(s),i&&n.one("load",function(){n.off("load error"),i(s)}),e&&n.one("error",function(){n.off("load error"),e(s)}),s.src=t)},n.prototype.init=function(){var o=!1,a=!1,h=this;g.each(this.entries,function(t,i){var e=g(i),s=h.imgFromEntry(e);if(e.addClass("jg-entry"),!0!==e.data("jg.loaded")&&"skipped"!==e.data("jg.loaded"))if(null!==h.settings.rel&&e.attr("rel",h.settings.rel),null!==h.settings.target&&e.attr("target",h.settings.target),null!==s){var n=h.extractImgSrcFromImage(s);if(!1===h.settings.waitThumbnailsLoad||!n){var r=parseFloat(s.attr("width")),i=parseFloat(s.attr("height"));if("svg"===s.prop("tagName")&&(r=parseFloat(s[0].getBBox().width),i=parseFloat(s[0].getBBox().height)),!isNaN(r)&&!isNaN(i))return e.data("jg.width",r),e.data("jg.height",i),e.data("jg.loaded","skipped"),a=!0,h.startImgAnalyzer(!1),!0}e.data("jg.loaded",!1),o=!0,h.isSpinnerActive()||h.startLoadingSpinnerAnimation(),h.onImageEvent(n,function(t){e.data("jg.width",t.width),e.data("jg.height",t.height),e.data("jg.loaded",!0),h.startImgAnalyzer(!1)},function(){e.data("jg.loaded","error"),h.startImgAnalyzer(!1)})}else e.data("jg.loaded",!0),e.data("jg.width",e.width()|parseFloat(e.css("width"))|1),e.data("jg.height",e.height()|parseFloat(e.css("height"))|1)}),o||a||this.startImgAnalyzer(!1),this.checkWidth()},n.prototype.checkOrConvertNumber=function(t,i){if("string"===g.type(t[i])&&(t[i]=parseFloat(t[i])),"number"!==g.type(t[i]))throw i+" must be a number";if(isNaN(t[i]))throw"invalid number for "+i},n.prototype.checkSizeRangesSuffixes=function(){if("object"!==g.type(this.settings.sizeRangeSuffixes))throw"sizeRangeSuffixes must be defined and must be an object";var t,i=[];for(t in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(t)&&i.push(t);for(var e={0:""},s=0;s<i.length;s++)if("string"===g.type(i[s]))try{e[parseInt(i[s].replace(/^[a-z]+/,""),10)]=this.settings.sizeRangeSuffixes[i[s]]}catch(t){throw"sizeRangeSuffixes keys must contains correct numbers ("+t+")"}else e[i[s]]=this.settings.sizeRangeSuffixes[i[s]];this.settings.sizeRangeSuffixes=e},n.prototype.retrieveMaxRowHeight=function(){var t=null,i=this.settings.rowHeight;if("string"===g.type(this.settings.maxRowHeight))t=this.settings.maxRowHeight.match(/^[0-9]+%$/)?i*parseFloat(this.settings.maxRowHeight.match(/^([0-9]+)%$/)[1])/100:parseFloat(this.settings.maxRowHeight);else{if("number"!==g.type(this.settings.maxRowHeight)){if(!1===this.settings.maxRowHeight||null==this.settings.maxRowHeight)return null;throw"maxRowHeight must be a number or a percentage"}t=this.settings.maxRowHeight}if(isNaN(t))throw"invalid number for maxRowHeight";return t<i&&(t=i),t},n.prototype.checkSettings=function(){this.checkSizeRangesSuffixes(),this.checkOrConvertNumber(this.settings,"rowHeight"),this.checkOrConvertNumber(this.settings,"margins"),this.checkOrConvertNumber(this.settings,"border"),this.checkOrConvertNumber(this.settings,"maxRowsCount");var t=["justify","nojustify","left","center","right","hide"];if(-1===t.indexOf(this.settings.lastRow))throw"lastRow must be one of: "+t.join(", ");if(this.checkOrConvertNumber(this.settings,"justifyThreshold"),this.settings.justifyThreshold<0||1<this.settings.justifyThreshold)throw"justifyThreshold must be in the interval [0,1]";if("boolean"!==g.type(this.settings.cssAnimation))throw"cssAnimation must be a boolean";if("boolean"!==g.type(this.settings.captions))throw"captions must be a boolean";if(this.checkOrConvertNumber(this.settings.captionSettings,"animationDuration"),this.checkOrConvertNumber(this.settings.captionSettings,"visibleOpacity"),this.settings.captionSettings.visibleOpacity<0||1<this.settings.captionSettings.visibleOpacity)throw"captionSettings.visibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings.captionSettings,"nonVisibleOpacity"),this.settings.captionSettings.nonVisibleOpacity<0||1<this.settings.captionSettings.nonVisibleOpacity)throw"captionSettings.nonVisibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings,"imagesAnimationDuration"),this.checkOrConvertNumber(this.settings,"refreshTime"),this.checkOrConvertNumber(this.settings,"refreshSensitivity"),"boolean"!==g.type(this.settings.randomize))throw"randomize must be a boolean";if("string"!==g.type(this.settings.selector))throw"selector must be a string";if(!1!==this.settings.sort&&!g.isFunction(this.settings.sort))throw"sort must be false or a comparison function";if(!1!==this.settings.filter&&!g.isFunction(this.settings.filter)&&"string"!==g.type(this.settings.filter))throw"filter must be false, a string or a filter function"},n.prototype.retrieveSuffixRanges=function(){var t,i=[];for(t in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(t)&&i.push(parseInt(t,10));return i.sort(function(t,i){return i<t?1:t<i?-1:0}),i},n.prototype.updateSettings=function(t){this.settings=g.extend({},this.settings,t),this.checkSettings(),this.border=0<=this.settings.border?this.settings.border:this.settings.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges()},n.prototype.defaults={sizeRangeSuffixes:{},thumbnailPath:void 0,rowHeight:120,maxRowHeight:!1,maxRowsCount:0,margins:1,border:-1,lastRow:"nojustify",justifyThreshold:.9,waitThumbnailsLoad:!0,captions:!0,cssAnimation:!0,imagesAnimationDuration:500,captionSettings:{animationDuration:500,visibleOpacity:.7,nonVisibleOpacity:0},rel:null,target:null,extension:/\.[^.\\/]+$/,refreshTime:200,refreshSensitivity:0,randomize:!1,rtl:!1,sort:!1,filter:!1,selector:"a",imgSelector:"> img, > a > img, > svg, > a > svg",triggerEvent:function(t){this.$gallery.trigger(t)}},g.fn.justifiedGallery=function(s){return this.each(function(t,i){var e=g(i);e.addClass("justified-gallery");i=e.data("jg.controller");if(void 0===i){if(null!=s&&"object"!==g.type(s)){if("destroy"===s)return;throw"The argument must be an object"}i=new n(e,g.extend({},n.prototype.defaults,s)),e.data("jg.controller",i)}else if("norewind"!==s){if("destroy"===s)return void i.destroy();i.updateSettings(s),i.rewind()}i.updateEntries("norewind"===s)&&i.init()})}});
assets/js/front/lazysizes.min.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){t=t(e,e.document),e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}(window,function(a,m){"use strict";if(m.getElementsByClassName){var z,n,i,t,s,o,y=m.documentElement,r=a.Date,l=a.HTMLPictureElement,c="addEventListener",h="getAttribute",d=a[c],u=a.setTimeout,f=a.requestAnimationFrame||u,g=a.requestIdleCallback,v=/^picture$/i,p=["load","error","lazyincluded","_lazyloaded"],C={},b=Array.prototype.forEach,A=function(e,t){return C[t]||(C[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),C[t].test(e[h]("class")||"")&&C[t]},E=function(e,t){A(e,t)||e.setAttribute("class",(e[h]("class")||"").trim()+" "+t)},_=function(e,t){(t=A(e,t))&&e.setAttribute("class",(e[h]("class")||"").replace(t," "))},w=function(t,n,e){var a=e?c:"removeEventListener";e&&w(t,n),p.forEach(function(e){t[a](e,n)})},M=function(e,t,n,a,i){var s=m.createEvent("Event");return(n=n||{}).instance=ue,s.initEvent(t,!a,!i),s.detail=n,e.dispatchEvent(s),s},N=function(e,t){var n;!l&&(n=a.picturefill||z.pf)?(t&&t.src&&!e[h]("srcset")&&e.setAttribute("srcset",t.src),n({reevaluate:!0,elements:[e]})):t&&t.src&&(e.src=t.src)},x=function(e,t){return(getComputedStyle(e,null)||{})[t]},W=function(e,t,n){for(n=n||e.offsetWidth;n<z.minSize&&t&&!e._lazysizesWidth;)n=t.offsetWidth,t=t.parentNode;return n},T=(s=[],o=t=[],he._lsFlush=ye,he),e=function(n,e){return e?function(){T(n)}:function(){var e=this,t=arguments;T(function(){n.apply(e,t)})}},B=function(e){function t(){n=null,e()}var n,a,i=function(){var e=r.now()-a;e<99?u(i,99-e):(g||t)(t)};return function(){a=r.now(),n=n||u(i,99)}};!function(){var e,t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(e in z=a.lazySizesConfig||a.lazysizesConfig||{},t)e in z||(z[e]=t[e]);a.lazySizesConfig=z,u(function(){z.init&&ze()})}();var F,S,L,R,k,D,H,O,P,$,I,q,j,G,J,K,Q,U,V,X,Y,Z,ee,te,ne,ae,ie,se,oe,re,le,ce,de,ue,fe=(V=/^img$/i,X=/^iframe$/i,Y="onscroll"in a&&!/(gle|ing)bot/.test(navigator.userAgent),te=-1,j=pe,J=ee=Z=0,K=z.throttleDelay,Q=z.ricTimeout,U=g&&49<Q?function(){g(Ce,{timeout:Q}),Q!==z.ricTimeout&&(Q=z.ricTimeout)}:e(function(){u(Ce)},!0),ae=e(be),ie=function(e){ae({target:e.target})},se=e(function(e,t,n,a,i){var s,o,r,l;(r=M(e,"lazybeforeunveil",t)).defaultPrevented||(a&&(n?E(e,z.autosizesClass):e.setAttribute("sizes",a)),n=e[h](z.srcsetAttr),a=e[h](z.srcAttr),i&&(o=(s=e.parentNode)&&v.test(s.nodeName||"")),l=t.firesLoad||"src"in e&&(n||a||o),r={target:e},E(e,z.loadingClass),l&&(clearTimeout(L),L=u(ge,2500),w(e,ie,!0)),o&&b.call(s.getElementsByTagName("source"),Ae),n?e.setAttribute("srcset",n):a&&!o&&(X.test(e.nodeName)?function(t,n){try{t.contentWindow.location.replace(n)}catch(e){t.src=n}}(e,a):e.src=a),i&&(n||o)&&N(e,{src:a})),e._lazyRace&&delete e._lazyRace,_(e,z.lazyClass),T(function(){(!l||e.complete&&1<e.naturalWidth)&&(be(r),e._lazyCache=!0,u(function(){"_lazyCache"in e&&delete e._lazyCache},9))},!0)}),re=function(){var e;S||(r.now()-k<999?u(re,999):(e=B(function(){z.loadMode=3,ne()}),S=!0,z.loadMode=3,ne(),d("scroll",function(){3==z.loadMode&&(z.loadMode=2),e()},!0)))},{_:function(){k=r.now(),ue.elements=m.getElementsByClassName(z.lazyClass),F=m.getElementsByClassName(z.lazyClass+" "+z.preloadClass),d("scroll",ne,!0),d("resize",ne,!0),a.MutationObserver?new MutationObserver(ne).observe(y,{childList:!0,subtree:!0,attributes:!0}):(y[c]("DOMNodeInserted",ne,!0),y[c]("DOMAttrModified",ne,!0),setInterval(ne,999)),d("hashchange",ne,!0),["focus","mouseover","click","load","transitionend","animationend","webkitAnimationEnd"].forEach(function(e){m[c](e,ne,!0)}),/d$|^c/.test(m.readyState)?re():(d("load",re),m[c]("DOMContentLoaded",ne),u(re,2e4)),ue.elements.length?(pe(),T._lsFlush()):ne()},checkElems:ne=function(e){var t;(e=!0===e)&&(Q=33),G||(G=!0,(t=K-(r.now()-J))<0&&(t=0),e||t<9?U():u(U,t))},unveil:oe=function(e){var t,n=V.test(e.nodeName),a=n&&(e[h](z.sizesAttr)||e[h]("sizes")),i="auto"==a;(!i&&S||!n||!e[h]("src")&&!e.srcset||e.complete||A(e,z.errorClass)||!A(e,z.lazyClass))&&(t=M(e,"lazyunveilread").detail,i&&me.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,ee++,se(e,t,i,a,n))}}),me=(ce=e(function(e,t,n,a){var i,s,o;if(e._lazysizesWidth=a,a+="px",e.setAttribute("sizes",a),v.test(t.nodeName||""))for(s=0,o=(i=t.getElementsByTagName("source")).length;s<o;s++)i[s].setAttribute("sizes",a);n.detail.dataAttr||N(e,n.detail)}),{_:function(){le=m.getElementsByClassName(z.autosizesClass),d("resize",de)},checkElems:de=B(function(){var e,t=le.length;if(t)for(e=0;e<t;e++)Ee(le[e])}),updateElem:Ee}),ze=function(){ze.i||(ze.i=!0,me._(),fe._())};return ue={cfg:z,autoSizer:me,loader:fe,init:ze,uP:N,aC:E,rC:_,hC:A,fire:M,gW:W,rAF:T}}function ye(){var e=o;for(o=t.length?s:t,i=!(n=!0);e.length;)e.shift()();n=!1}function he(e,t){n&&!t?e.apply(this,arguments):(o.push(e),i||(i=!0,(m.hidden?u:f)(ye)))}function ge(e){ee--,e&&!(ee<0)&&e.target||(ee=0)}function ve(e){return null==q&&(q="hidden"==x(m.body,"visibility")),q||"hidden"!=x(e.parentNode,"visibility")&&"hidden"!=x(e,"visibility")}function pe(){var e,t,n,a,i,s,o,r,l,c,d,u,f=ue.elements;if((R=z.loadMode)&&ee<8&&(e=f.length)){for(t=0,te++,c=!z.expand||z.expand<1?500<y.clientHeight&&500<y.clientWidth?500:370:z.expand,d=(ue._defEx=c)*z.expFactor,u=z.hFac,q=null,Z<d&&ee<1&&2<te&&2<R&&!m.hidden?(Z=d,te=0):Z=1<R&&1<te&&ee<6?c:0;t<e;t++)if(f[t]&&!f[t]._lazyRace)if(Y)if((r=f[t][h]("data-expand"))&&(s=+r)||(s=Z),l!==s&&(D=innerWidth+s*u,H=innerHeight+s,o=-1*s,l=s),n=f[t].getBoundingClientRect(),(I=n.bottom)>=o&&(O=n.top)<=H&&($=n.right)>=o*u&&(P=n.left)<=D&&(I||$||P||O)&&(z.loadHidden||ve(f[t]))&&(S&&ee<3&&!r&&(R<3||te<4)||function(e,t){var n,a=e,i=ve(e);for(O-=t,I+=t,P-=t,$+=t;i&&(a=a.offsetParent)&&a!=m.body&&a!=y;)(i=0<(x(a,"opacity")||1))&&"visible"!=x(a,"overflow")&&(n=a.getBoundingClientRect(),i=$>n.left&&P<n.right&&I>n.top-1&&O<n.bottom+1);return i}(f[t],s))){if(oe(f[t]),i=!0,9<ee)break}else!i&&S&&!a&&ee<4&&te<4&&2<R&&(F[0]||z.preloadAfterLoad)&&(F[0]||!r&&(I||$||P||O||"auto"!=f[t][h](z.sizesAttr)))&&(a=F[0]||f[t]);else oe(f[t]);a&&!i&&oe(a)}}function Ce(){G=!1,J=r.now(),j()}function be(e){var t=e.target;t._lazyCache?delete t._lazyCache:(ge(e),E(t,z.loadedClass),_(t,z.loadingClass),w(t,ie),M(t,"lazyloaded"))}function Ae(e){var t,n=e[h](z.srcsetAttr);(t=z.customMedia[e[h]("data-media")||e[h]("media")])&&e.setAttribute("media",t),n&&e.setAttribute("srcset",n)}function Ee(e,t,n){var a=e.parentNode;a&&(n=W(e,a,n),(t=M(e,"lazybeforesizes",{width:n,dataAttr:!!t})).defaultPrevented||(n=t.detail.width)&&n!==e._lazysizesWidth&&ce(e,a,t,n))}});
1
+ !function(e,t){t=t(e,e.document);e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}(window,function(a,m){"use strict";if(m.getElementsByClassName){var z,n,i,t,s,o,y=m.documentElement,r=a.Date,l=a.HTMLPictureElement,c="addEventListener",h="getAttribute",d=a[c],u=a.setTimeout,f=a.requestAnimationFrame||u,g=a.requestIdleCallback,v=/^picture$/i,p=["load","error","lazyincluded","_lazyloaded"],C={},b=Array.prototype.forEach,A=function(e,t){return C[t]||(C[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),C[t].test(e[h]("class")||"")&&C[t]},E=function(e,t){A(e,t)||e.setAttribute("class",(e[h]("class")||"").trim()+" "+t)},_=function(e,t){(t=A(e,t))&&e.setAttribute("class",(e[h]("class")||"").replace(t," "))},w=function(t,n,e){var a=e?c:"removeEventListener";e&&w(t,n),p.forEach(function(e){t[a](e,n)})},M=function(e,t,n,a,i){var s=m.createEvent("Event");return(n=n||{}).instance=ue,s.initEvent(t,!a,!i),s.detail=n,e.dispatchEvent(s),s},N=function(e,t){var n;!l&&(n=a.picturefill||z.pf)?(t&&t.src&&!e[h]("srcset")&&e.setAttribute("srcset",t.src),n({reevaluate:!0,elements:[e]})):t&&t.src&&(e.src=t.src)},x=function(e,t){return(getComputedStyle(e,null)||{})[t]},W=function(e,t,n){for(n=n||e.offsetWidth;n<z.minSize&&t&&!e._lazysizesWidth;)n=t.offsetWidth,t=t.parentNode;return n},T=(s=[],o=t=[],he._lsFlush=ye,he),e=function(n,e){return e?function(){T(n)}:function(){var e=this,t=arguments;T(function(){n.apply(e,t)})}},B=function(e){function t(){n=null,e()}var n,a,i=function(){var e=r.now()-a;e<99?u(i,99-e):(g||t)(t)};return function(){a=r.now(),n=n||u(i,99)}};!function(){var e,t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(e in z=a.lazySizesConfig||a.lazysizesConfig||{},t)e in z||(z[e]=t[e]);a.lazySizesConfig=z,u(function(){z.init&&ze()})}();var F,S,L,R,k,D,H,O,P,$,I,q,j,G,J,K,Q,U,V,X,Y,Z,ee,te,ne,ae,ie,se,oe,re,le,ce,de,ue,fe=(V=/^img$/i,X=/^iframe$/i,Y="onscroll"in a&&!/(gle|ing)bot/.test(navigator.userAgent),te=-1,j=pe,J=ee=Z=0,K=z.throttleDelay,Q=z.ricTimeout,U=g&&49<Q?function(){g(Ce,{timeout:Q}),Q!==z.ricTimeout&&(Q=z.ricTimeout)}:e(function(){u(Ce)},!0),ae=e(be),ie=function(e){ae({target:e.target})},se=e(function(e,t,n,a,i){var s,o,r,l;(r=M(e,"lazybeforeunveil",t)).defaultPrevented||(a&&(n?E(e,z.autosizesClass):e.setAttribute("sizes",a)),n=e[h](z.srcsetAttr),a=e[h](z.srcAttr),i&&(o=(s=e.parentNode)&&v.test(s.nodeName||"")),l=t.firesLoad||"src"in e&&(n||a||o),r={target:e},E(e,z.loadingClass),l&&(clearTimeout(L),L=u(ge,2500),w(e,ie,!0)),o&&b.call(s.getElementsByTagName("source"),Ae),n?e.setAttribute("srcset",n):a&&!o&&(X.test(e.nodeName)?function(t,n){try{t.contentWindow.location.replace(n)}catch(e){t.src=n}}(e,a):e.src=a),i&&(n||o)&&N(e,{src:a})),e._lazyRace&&delete e._lazyRace,_(e,z.lazyClass),T(function(){(!l||e.complete&&1<e.naturalWidth)&&(be(r),e._lazyCache=!0,u(function(){"_lazyCache"in e&&delete e._lazyCache},9))},!0)}),re=function(){var e;S||(r.now()-k<999?u(re,999):(e=B(function(){z.loadMode=3,ne()}),S=!0,z.loadMode=3,ne(),d("scroll",function(){3==z.loadMode&&(z.loadMode=2),e()},!0)))},{_:function(){k=r.now(),ue.elements=m.getElementsByClassName(z.lazyClass),F=m.getElementsByClassName(z.lazyClass+" "+z.preloadClass),d("scroll",ne,!0),d("resize",ne,!0),a.MutationObserver?new MutationObserver(ne).observe(y,{childList:!0,subtree:!0,attributes:!0}):(y[c]("DOMNodeInserted",ne,!0),y[c]("DOMAttrModified",ne,!0),setInterval(ne,999)),d("hashchange",ne,!0),["focus","mouseover","click","load","transitionend","animationend","webkitAnimationEnd"].forEach(function(e){m[c](e,ne,!0)}),/d$|^c/.test(m.readyState)?re():(d("load",re),m[c]("DOMContentLoaded",ne),u(re,2e4)),ue.elements.length?(pe(),T._lsFlush()):ne()},checkElems:ne=function(e){var t;(e=!0===e)&&(Q=33),G||(G=!0,(t=K-(r.now()-J))<0&&(t=0),e||t<9?U():u(U,t))},unveil:oe=function(e){var t,n=V.test(e.nodeName),a=n&&(e[h](z.sizesAttr)||e[h]("sizes")),i="auto"==a;(!i&&S||!n||!e[h]("src")&&!e.srcset||e.complete||A(e,z.errorClass)||!A(e,z.lazyClass))&&(t=M(e,"lazyunveilread").detail,i&&me.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,ee++,se(e,t,i,a,n))}}),me=(ce=e(function(e,t,n,a){var i,s,o;if(e._lazysizesWidth=a,a+="px",e.setAttribute("sizes",a),v.test(t.nodeName||""))for(s=0,o=(i=t.getElementsByTagName("source")).length;s<o;s++)i[s].setAttribute("sizes",a);n.detail.dataAttr||N(e,n.detail)}),{_:function(){le=m.getElementsByClassName(z.autosizesClass),d("resize",de)},checkElems:de=B(function(){var e,t=le.length;if(t)for(e=0;e<t;e++)Ee(le[e])}),updateElem:Ee}),ze=function(){ze.i||(ze.i=!0,me._(),fe._())};return ue={cfg:z,autoSizer:me,loader:fe,init:ze,uP:N,aC:E,rC:_,hC:A,fire:M,gW:W,rAF:T}}function ye(){var e=o;for(o=t.length?s:t,i=!(n=!0);e.length;)e.shift()();n=!1}function he(e,t){n&&!t?e.apply(this,arguments):(o.push(e),i||(i=!0,(m.hidden?u:f)(ye)))}function ge(e){ee--,e&&!(ee<0)&&e.target||(ee=0)}function ve(e){return null==q&&(q="hidden"==x(m.body,"visibility")),q||"hidden"!=x(e.parentNode,"visibility")&&"hidden"!=x(e,"visibility")}function pe(){var e,t,n,a,i,s,o,r,l,c,d,u,f=ue.elements;if((R=z.loadMode)&&ee<8&&(e=f.length)){for(t=0,te++,c=!z.expand||z.expand<1?500<y.clientHeight&&500<y.clientWidth?500:370:z.expand,d=(ue._defEx=c)*z.expFactor,u=z.hFac,q=null,Z<d&&ee<1&&2<te&&2<R&&!m.hidden?(Z=d,te=0):Z=1<R&&1<te&&ee<6?c:0;t<e;t++)if(f[t]&&!f[t]._lazyRace)if(Y)if((r=f[t][h]("data-expand"))&&(s=+r)||(s=Z),l!==s&&(D=innerWidth+s*u,H=innerHeight+s,o=-1*s,l=s),n=f[t].getBoundingClientRect(),(I=n.bottom)>=o&&(O=n.top)<=H&&($=n.right)>=o*u&&(P=n.left)<=D&&(I||$||P||O)&&(z.loadHidden||ve(f[t]))&&(S&&ee<3&&!r&&(R<3||te<4)||function(e,t){var n,a=e,i=ve(e);for(O-=t,I+=t,P-=t,$+=t;i&&(a=a.offsetParent)&&a!=m.body&&a!=y;)(i=0<(x(a,"opacity")||1))&&"visible"!=x(a,"overflow")&&(n=a.getBoundingClientRect(),i=$>n.left&&P<n.right&&I>n.top-1&&O<n.bottom+1);return i}(f[t],s))){if(oe(f[t]),i=!0,9<ee)break}else!i&&S&&!a&&ee<4&&te<4&&2<R&&(F[0]||z.preloadAfterLoad)&&(F[0]||!r&&(I||$||P||O||"auto"!=f[t][h](z.sizesAttr)))&&(a=F[0]||f[t]);else oe(f[t]);a&&!i&&oe(a)}}function Ce(){G=!1,J=r.now(),j()}function be(e){var t=e.target;t._lazyCache?delete t._lazyCache:(ge(e),E(t,z.loadedClass),_(t,z.loadingClass),w(t,ie),M(t,"lazyloaded"))}function Ae(e){var t,n=e[h](z.srcsetAttr);(t=z.customMedia[e[h]("data-media")||e[h]("media")])&&e.setAttribute("media",t),n&&e.setAttribute("srcset",n)}function Ee(e,t,n){var a=e.parentNode;a&&(n=W(e,a,n),(t=M(e,"lazybeforesizes",{width:n,dataAttr:!!t})).defaultPrevented||(n=t.detail.width)&&n!==e._lazysizesWidth&&ce(e,a,t,n))}});
assets/js/modula-all.js CHANGED
@@ -1,6 +1,6 @@
1
- !function(t,e){t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";var i=Array.prototype.slice,n=t.console,d=void 0===n?function(){}:function(t){n.error(t)};function o(h,u,l){(l=l||e||t.jQuery)&&(u.prototype.option||(u.prototype.option=function(t){l.isPlainObject(t)&&(this.options=l.extend(!0,this.options,t))}),l.fn[h]=function(t){if("string"!=typeof t)return a=t,this.each(function(t,e){var i=l.data(e,h);i?(i.option(a),i._init()):(i=new u(e,a),l.data(e,h,i))}),this;var n,o,s,r,a,e=i.call(arguments,1);return o=e,r="$()."+h+'("'+(n=t)+'")',(t=this).each(function(t,e){var i=l.data(e,h);i?(e=i[n])&&"_"!=n.charAt(0)?(i=e.apply(i,o),s=void 0===s?i:s):d(r+" is not a valid method"):d(h+" not initialized. Cannot call methods, i.e. "+r)}),void 0!==s?s:t},s(l))}function s(t){!t||t&&t.bridget||(t.bridget=o)}return s(e||t.jQuery),o}),function(t){function e(){}t.EvEmitter=((t=e.prototype).on=function(t,e){if(t&&e){var i=this._events=this._events||{},t=i[t]=i[t]||[];return-1==t.indexOf(e)&&t.push(e),this}},t.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this}},t.off=function(t,e){t=this._events&&this._events[t];if(t&&t.length){e=t.indexOf(e);return-1!=e&&t.splice(e,1),this}},t.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o<i.length;o++){var s=i[o];n&&n[s]&&(this.off(t,s),delete n[s]),s.apply(this,e)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e)}("undefined"!=typeof window?window:this),function(t){window.getSize=t()}(function(){"use strict";function m(t){var e=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(e)&&e}var e="undefined"==typeof console?function(){}:function(t){console.error(t)},f=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],p=f.length;function g(t){t=getComputedStyle(t);return t||e("Style returned "+t+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),t}var y,v=!1;function _(t){if(v||(v=!0,(c=document.createElement("div")).style.width="200px",c.style.padding="1px 2px 3px 4px",c.style.borderStyle="solid",c.style.borderWidth="1px 2px 3px 4px",c.style.boxSizing="border-box",(d=document.body||document.documentElement).appendChild(c),l=g(c),y=200==Math.round(m(l.width)),_.isBoxSizeOuter=y,d.removeChild(c)),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var e=g(t);if("none"==e.display)return function(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e<p;e++)t[f[e]]=0;return t}();var i={};i.width=t.offsetWidth,i.height=t.offsetHeight;for(var n=i.isBorderBox="border-box"==e.boxSizing,o=0;o<p;o++){var s=f[o],r=e[s],r=parseFloat(r);i[s]=isNaN(r)?0:r}var a=i.paddingLeft+i.paddingRight,h=i.paddingTop+i.paddingBottom,u=i.marginLeft+i.marginRight,l=i.marginTop+i.marginBottom,d=i.borderLeftWidth+i.borderRightWidth,c=i.borderTopWidth+i.borderBottomWidth,t=n&&y,n=m(e.width);!1!==n&&(i.width=n+(t?0:a+d));n=m(e.height);return!1!==n&&(i.height=n+(t?0:h+c)),i.innerWidth=i.width-(a+d),i.innerHeight=i.height-(h+c),i.outerWidth=i.width+u,i.outerHeight=i.height+l,i}}return _}),window.matchesSelector=function(){"use strict";var i=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i]+"MatchesSelector";if(t[n])return n}}();return function(t,e){return t[i](e)}}(),function(t,e){t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(i,r){var n={};n.extend=function(t,e){for(var i in e)t[i]=e[i];return t},n.modulo=function(t,e){return(t%e+e)%e};var e=Array.prototype.slice;n.makeArray=function(t){return Array.isArray(t)?t:null==t?[]:"object"==typeof t&&"number"==typeof t.length?e.call(t):[t]},n.removeFrom=function(t,e){e=t.indexOf(e);-1!=e&&t.splice(e,1)},n.getParent=function(t,e){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,r(t,e))return t},n.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},n.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},n.filterFindElements=function(t,o){t=n.makeArray(t);var s=[];return t.forEach(function(t){var e;if(e=t,"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)if(o){r(t,o)&&s.push(t);for(var i=t.querySelectorAll(o),n=0;n<i.length;n++)s.push(i[n])}else s.push(t)}),s},n.debounceMethod=function(t,e,n){n=n||100;var o=t.prototype[e],s=e+"Timeout";t.prototype[e]=function(){var t=this[s];clearTimeout(t);var e=arguments,i=this;this[s]=setTimeout(function(){o.apply(i,e),delete i[s]},n)}},n.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},n.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var u=i.console;return n.htmlInit=function(a,h){n.docReady(function(){var t=n.toDashed(h),o="data-"+t,e=document.querySelectorAll("["+o+"]"),t=document.querySelectorAll(".js-"+t),t=n.makeArray(e).concat(n.makeArray(t)),s=o+"-options",r=i.jQuery;t.forEach(function(e){var t,i=e.getAttribute(o)||e.getAttribute(s);try{t=i&&JSON.parse(i)}catch(t){return void(u&&u.error("Error parsing "+o+" on "+e.className+": "+t))}var n=new a(e,t);r&&r.data(e,h,n)})})},n}),function(t,e){t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize)}(window,function(t,e){"use strict";var i=document.documentElement.style,n="string"==typeof i.transition?"transition":"WebkitTransition",o="string"==typeof i.transform?"transform":"WebkitTransform",s={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[n],r={transform:o,transition:n,transitionDuration:n+"Duration",transitionProperty:n+"Property",transitionDelay:n+"Delay"};function a(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}t=a.prototype=Object.create(t.prototype);t.constructor=a,t._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},t.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},t.getSize=function(){this.size=e(this.element)},t.css=function(t){var e,i=this.element.style;for(e in t)i[r[e]||e]=t[e]},t.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),n=t[e?"left":"right"],o=t[i?"top":"bottom"],s=parseFloat(n),r=parseFloat(o),t=this.layout.size;-1!=n.indexOf("%")&&(s=s/100*t.width),-1!=o.indexOf("%")&&(r=r/100*t.height),s=isNaN(s)?0:s,r=isNaN(r)?0:r,s-=e?t.paddingLeft:t.paddingRight,r-=i?t.paddingTop:t.paddingBottom,this.position.x=s,this.position.y=r},t.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),o=i?"paddingLeft":"paddingRight",s=i?"left":"right",i=i?"right":"left",o=this.position.x+t[o];e[s]=this.getXValue(o),e[i]="";o=n?"paddingTop":"paddingBottom",i=n?"top":"bottom",n=n?"bottom":"top",o=this.position.y+t[o];e[i]=this.getYValue(o),e[n]="",this.css(e),this.emitEvent("layout",[this])},t.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},t.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},t._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=t==this.position.x&&e==this.position.y;this.setPosition(t,e),!o||this.isTransitioning?(i=t-i,e-=n,(n={}).transform=this.getTranslate(i,e),this.transition({to:n,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})):this.layoutPosition()},t.getTranslate=function(t,e){return"translate3d("+(t=this.layout._getOption("originLeft")?t:-t)+"px, "+(e=this.layout._getOption("originTop")?e:-e)+"px, 0)"},t.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},t.moveTo=t._transitionTo,t.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},t._nonTransition=function(t){for(var e in this.css(t.to),t.isCleaning&&this._removeStyles(t.to),t.onTransitionEnd)t.onTransitionEnd[e].call(this)},t.transition=function(t){if(parseFloat(this.layout.options.transitionDuration)){var e,i=this._transn;for(e in t.onTransitionEnd)i.onEnd[e]=t.onTransitionEnd[e];for(e in t.to)i.ingProperties[e]=!0,t.isCleaning&&(i.clean[e]=!0);t.from&&(this.css(t.from),this.element.offsetHeight,0),this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0}else this._nonTransition(t)};var h="opacity,"+o.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()});t.enableTransition=function(){var t;this.isTransitioning||(t="number"==typeof(t=this.layout.options.transitionDuration)?t+"ms":t,this.css({transitionProperty:h,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(s,this,!1))},t.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},t.onotransitionend=function(t){this.ontransitionend(t)};var u={"-webkit-transform":"transform"};t.ontransitionend=function(t){var e,i;t.target===this.element&&(e=this._transn,i=u[t.propertyName]||t.propertyName,delete e.ingProperties[i],function(t){for(var e in t)return;return 1}(e.ingProperties)&&this.disableTransition(),i in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[i]),i in e.onEnd&&(e.onEnd[i].call(this),delete e.onEnd[i]),this.emitEvent("transitionEnd",[this]))},t.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(s,this,!1),this.isTransitioning=!1},t._removeStyles=function(t){var e,i={};for(e in t)i[e]="";this.css(i)};var l={transitionProperty:"",transitionDuration:"",transitionDelay:""};return t.removeTransitionStyles=function(){this.css(l)},t.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},t.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},t.remove=function(){n&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),this.hide()):this.removeElem()},t.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},t.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},t.getHideRevealTransitionEndProperty=function(t){var e,t=this.layout.options[t];if(t.opacity)return"opacity";for(e in t)return e},t.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},t.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},t.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},a}),function(t,e){"use strict";t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,o,n,s){"use strict";function i(){}var r=t.console,a=t.jQuery,h=0,u={};function l(t,e){var i=n.getQueryElement(t);i?(this.element=i,a&&(this.$element=a(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e),e=++h,this.element.outlayerGUID=e,(u[e]=this)._create(),this._getOption("initLayout")&&this.layout()):r&&r.error("Bad element for "+this.constructor.namespace+": "+(i||t))}l.namespace="outlayer",l.Item=s,l.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var d=l.prototype;function c(t){function e(){t.apply(this,arguments)}return(e.prototype=Object.create(t.prototype)).constructor=e}n.extend(d,e.prototype),d.option=function(t){n.extend(this.options,t)},d._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},l.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},d._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle),this._getOption("resize")&&this.bindResize()},d.reloadItems=function(){this.items=this._itemize(this.element.children)},d._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0;o<e.length;o++){var s=new i(e[o],this);n.push(s)}return n},d._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},d.getItemElements=function(){return this.items.map(function(t){return t.element})},d.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),t=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},d._init=d.layout,d._resetLayout=function(){this.getSize()},d.getSize=function(){this.size=o(this.element)},d._getMeasurement=function(t,e){var i,n=this.options[t];n?("string"==typeof n?i=this.element.querySelector(n):n instanceof HTMLElement&&(i=n),this[t]=i?o(i)[e]:n):this[t]=0},d.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},d._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},d._layoutItems=function(t,i){var n;this._emitCompleteOnItems("layout",t),t&&t.length&&(n=[],t.forEach(function(t){var e=this._getItemLayoutPosition(t);e.item=t,e.isInstant=i||t.isLayoutInstant,n.push(e)},this),this._processLayoutQueue(n))},d._getItemLayoutPosition=function(){return{x:0,y:0}},d._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},d.updateStagger=function(){var t=this.options.stagger;if(null!=t)return this.stagger=function(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),t=e&&e[1],e=e&&e[2];if(!t.length)return 0;t=parseFloat(t);e=m[e]||1;return t*e}(t),this.stagger;this.stagger=0},d._positionItem=function(t,e,i,n,o){n?t.goTo(e,i):(t.stagger(o*this.stagger),t.moveTo(e,i))},d._postLayout=function(){this.resizeContainer()},d.resizeContainer=function(){var t;!this._getOption("resizeContainer")||(t=this._getContainerSize())&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))},d._getContainerSize=i,d._setContainerMeasure=function(t,e){var i;void 0!==t&&((i=this.size).isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px")},d._emitCompleteOnItems=function(e,t){var i=this;function n(){i.dispatchEvent(e+"Complete",null,[t])}var o,s=t.length;function r(){++o==s&&n()}t&&s?(o=0,t.forEach(function(t){t.once(e,r)})):n()},d.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;this.emitEvent(t,n),a&&(this.$element=this.$element||a(this.element),e?((e=a.Event(e)).type=t,this.$element.trigger(e,i)):this.$element.trigger(t,i))},d.ignore=function(t){t=this.getItem(t);t&&(t.isIgnored=!0)},d.unignore=function(t){t=this.getItem(t);t&&delete t.isIgnored},d.stamp=function(t){(t=this._find(t))&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},d.unstamp=function(t){(t=this._find(t))&&t.forEach(function(t){n.removeFrom(this.stamps,t),this.unignore(t)},this)},d._find=function(t){if(t)return"string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)},d._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},d._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},d._manageStamp=i,d._getElementOffset=function(t){var e=t.getBoundingClientRect(),i=this._boundingRect,t=o(t);return{left:e.left-i.left-t.marginLeft,top:e.top-i.top-t.marginTop,right:i.right-e.right-t.marginRight,bottom:i.bottom-e.bottom-t.marginBottom}},d.handleEvent=n.handleEvent,d.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},d.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},d.onresize=function(){this.resize()},n.debounceMethod(l,"onresize",100),d.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},d.needsResizeLayout=function(){var t=o(this.element);return this.size&&t&&t.innerWidth!==this.size.innerWidth},d.addItems=function(t){t=this._itemize(t);return t.length&&(this.items=this.items.concat(t)),t},d.appended=function(t){t=this.addItems(t);t.length&&(this.layoutItems(t,!0),this.reveal(t))},d.prepended=function(t){var e=this._itemize(t);e.length&&(t=this.items.slice(0),this.items=e.concat(t),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(t))},d.reveal=function(t){var i;this._emitCompleteOnItems("reveal",t),t&&t.length&&(i=this.updateStagger(),t.forEach(function(t,e){t.stagger(e*i),t.reveal()}))},d.hide=function(t){var i;this._emitCompleteOnItems("hide",t),t&&t.length&&(i=this.updateStagger(),t.forEach(function(t,e){t.stagger(e*i),t.hide()}))},d.revealItemElements=function(t){t=this.getItems(t);this.reveal(t)},d.hideItemElements=function(t){t=this.getItems(t);this.hide(t)},d.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},d.getItems=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){t=this.getItem(t);t&&e.push(t)},this),e},d.remove=function(t){t=this.getItems(t);this._emitCompleteOnItems("remove",t),t&&t.length&&t.forEach(function(t){t.remove(),n.removeFrom(this.items,t)},this)},d.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();t=this.element.outlayerGUID;delete u[t],delete this.element.outlayerGUID,a&&a.removeData(this.element,this.constructor.namespace)},l.data=function(t){t=(t=n.getQueryElement(t))&&t.outlayerGUID;return t&&u[t]},l.create=function(t,e){var i=c(l);return i.defaults=n.extend({},l.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},l.compatOptions),i.namespace=t,i.data=l.data,i.Item=c(s),n.htmlInit(i,t),a&&a.bridget&&a.bridget(t,i),i};var m={ms:1,s:1e3};return l.Item=s,l}),function(t,e){t.ModulaIsotope=t.ModulaIsotope||{},t.ModulaIsotope.Item=e(t.Outlayer)}(window,function(t){"use strict";function e(){t.Item.apply(this,arguments)}var i=e.prototype=Object.create(t.Item.prototype),n=i._create;i._create=function(){this.id=this.layout.itemGUID++,n.call(this),this.sortData={}},i.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t,e=this.layout.options.getSortData,i=this.layout._sorters;for(t in e){var n=i[t];this.sortData[t]=n(this.element,this)}}};var o=i.destroy;return i.destroy=function(){o.apply(this,arguments),this.css({display:""})},e}),function(t,e){t.ModulaIsotope=t.ModulaIsotope||{},t.ModulaIsotope.LayoutMode=e(t.getSize,t.Outlayer)}(window,function(e,i){"use strict";function n(t){(this.isotope=t)&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}var o=n.prototype;return["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout","_getOption"].forEach(function(t){o[t]=function(){return i.prototype[t].apply(this.isotope,arguments)}}),o.needsVerticalResizeLayout=function(){var t=e(this.isotope.element);return this.isotope.size&&t&&t.innerHeight!=this.isotope.size.innerHeight},o._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},o.getColumnWidth=function(){this.getSegmentSize("column","Width")},o.getRowHeight=function(){this.getSegmentSize("row","Height")},o.getSegmentSize=function(t,e){var i=t+e,n="outer"+e;this._getMeasurement(i,n),this[i]||(t=this.getFirstItemSize(),this[i]=t&&t[n]||this.isotope.size["inner"+e])},o.getFirstItemSize=function(){var t=this.isotope.filteredItems[0];return t&&t.element&&e(t.element)},o.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},o.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},n.modes={},n.create=function(t,e){function i(){n.apply(this,arguments)}return(i.prototype=Object.create(o)).constructor=i,e&&(i.options=e),n.modes[i.prototype.namespace=t]=i},n}),function(t,e){t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,a){var e=t.create("masonry");e.compatOptions.fitWidth="isFitWidth";t=e.prototype;return t._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},t.measureColumns=function(){this.getContainerWidth(),this.columnWidth||(i=(e=this.items[0])&&e.element,this.columnWidth=i&&a(i).outerWidth||this.containerWidth);var t=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,i=e/t,t=t-e%t,i=Math[t&&t<1?"round":"floor"](i);this.cols=Math.max(i,1)},t.getContainerWidth=function(){var t=this._getOption("fitWidth")?this.element.parentNode:this.element,t=a(t);this.containerWidth=t&&t.innerWidth},t._getItemLayoutPosition=function(t){t.getSize();for(var e=t.size.outerWidth%this.columnWidth,i=Math[e&&e<1?"round":"ceil"](t.size.outerWidth/this.columnWidth),i=Math.min(i,this.cols),n=this[this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition"](i,t),e={x:this.columnWidth*n.col,y:n.y},o=n.y+t.size.outerHeight,s=i+n.col,r=n.col;r<s;r++)this.colYs[r]=o;return e},t._getTopColPosition=function(t){var e=this._getTopColGroup(t),t=Math.min.apply(Math,e);return{col:e.indexOf(t),y:t}},t._getTopColGroup=function(t){if(t<2)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;n<i;n++)e[n]=this._getColGroupY(n,t);return e},t._getColGroupY=function(t,e){if(e<2)return this.colYs[t];e=this.colYs.slice(t,t+e);return Math.max.apply(Math,e)},t._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,i=1<t&&i+t>this.cols?0:i,e=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=e?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},t._manageStamp=function(t){var e=a(t),i=this._getElementOffset(t),n=this._getOption("originLeft")?i.left:i.right,t=n+e.outerWidth,n=Math.floor(n/this.columnWidth),n=Math.max(0,n),o=Math.floor(t/this.columnWidth);o-=t%this.columnWidth?0:1,o=Math.min(this.cols-1,o);for(var s=(this._getOption("originTop")?i.top:i.bottom)+e.outerHeight,r=n;r<=o;r++)this.colYs[r]=Math.max(s,this.colYs[r])},t._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},t._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},t.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},e}),function(t,e){e(t.ModulaIsotope.LayoutMode,t.Masonry)}(window,function(t,e){"use strict";var i,t=t.create("masonry"),n=t.prototype,o={_getElementOffset:!0,layout:!0,_getMeasurement:!0};for(i in e.prototype)o[i]||(n[i]=e.prototype[i]);var s=n.measureColumns;n.measureColumns=function(){this.items=this.isotope.filteredItems,s.call(this)};var r=n._getOption;return n._getOption=function(t){return"fitWidth"==t?void 0!==this.options.isFitWidth?this.options.isFitWidth:this.options.fitWidth:r.apply(this.isotope,arguments)},t}),function(){"use strict";var t=window.ModulaIsotope.LayoutMode.create("fitRows");(t=t.prototype)._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},t._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth+this.gutter,i=this.isotope.size.innerWidth+this.gutter;0!==this.x&&e+this.x>i&&(this.x=0,this.y=this.maxY);i={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=e,i},t._getContainerSize=function(){return{height:this.maxY}}}(),function(){"use strict";var t=window.ModulaIsotope.LayoutMode.create("vertical",{horizontalAlignment:0});(t=t.prototype)._resetLayout=function(){this.y=0},t._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},t._getContainerSize=function(){return{height:this.y}}}(),function(t,e){t.ModulaIsotope=e(t,t.Outlayer,t.getSize,t.matchesSelector,t.fizzyUIUtils,t.ModulaIsotope.Item,t.ModulaIsotope.LayoutMode)}(window,function(t,i,e,n,s,o,r){var a=t.jQuery,h=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},u=i.create("modulaisotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});u.Item=o,u.LayoutMode=r;o=u.prototype;o._create=function(){for(var t in this.itemGUID=0,this._sorters={},this._getSorters(),i.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"],r.modes)this._initLayoutMode(t)},o.reloadItems=function(){this.itemGUID=0,i.prototype.reloadItems.call(this)},o._itemize=function(){for(var t=i.prototype._itemize.apply(this,arguments),e=0;e<t.length;e++)t[e].id=this.itemGUID++;return this._updateItemsSortData(t),t},o._initLayoutMode=function(t){var e=r.modes[t],i=this.options[t]||{};this.options[t]=e.options?s.extend(e.options,i):i,this.modes[t]=new e(this)},o.layout=function(){this._isLayoutInited||!this._getOption("initLayout")?this._layout():this.arrange()},o._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},o.arrange=function(t){this.option(t),this._getIsInstant();t=this._filter(this.items);this.filteredItems=t.matches,this._bindArrangeComplete(),this._isInstant?this._noTransition(this._hideReveal,[t]):this._hideReveal(t),this._sort(),this._layout()},o._init=o.arrange,o._hideReveal=function(t){this.reveal(t.needReveal),this.hide(t.needHide)},o._getIsInstant=function(){var t=this._getOption("layoutInstant"),t=void 0!==t?t:!this._isLayoutInited;return this._isInstant=t},o._bindArrangeComplete=function(){var t,e,i,n=this;function o(){t&&e&&i&&n.dispatchEvent("arrangeComplete",null,[n.filteredItems])}this.once("layoutComplete",function(){t=!0,o()}),this.once("hideComplete",function(){e=!0,o()}),this.once("revealComplete",function(){i=!0,o()})},o._filter=function(t){for(var e=(e=this.options.filter)||"*",i=[],n=[],o=[],s=this._getFilterTest(e),r=0;r<t.length;r++){var a,h=t[r];h.isIgnored||((a=s(h))&&i.push(h),a&&h.isHidden?n.push(h):a||h.isHidden||o.push(h))}return{matches:i,needReveal:n,needHide:o}},o._getFilterTest=function(e){return a&&this.options.isJQueryFiltering?function(t){return a(t.element).is(e)}:"function"==typeof e?function(t){return e(t.element)}:function(t){return n(t.element,e)}},o.updateSortData=function(t){t=t?(t=s.makeArray(t),this.getItems(t)):this.items;this._getSorters(),this._updateItemsSortData(t)},o._getSorters=function(){var t,e=this.options.getSortData;for(t in e){var i=e[t];this._sorters[t]=l(i)}},o._updateItemsSortData=function(t){for(var e=t&&t.length,i=0;e&&i<e;i++)t[i].updateSortData()};var l=function(t){if("string"!=typeof t)return t;var e=h(t).split(" "),i=e[0],n=i.match(/^\[(.+)\]$/),o=function(e,i){if(e)return function(t){return t.getAttribute(e)};return function(t){t=t.querySelector(i);return t&&t.textContent}}(n&&n[1],i),s=u.sortDataParsers[e[1]];return t=s?function(t){return t&&s(o(t))}:function(t){return t&&o(t)}};u.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},o._sort=function(){var t,r,a;this.options.sortBy&&(t=s.makeArray(this.options.sortBy),this._getIsSameSortBy(t)||(this.sortHistory=t.concat(this.sortHistory)),r=this.sortHistory,a=this.options.sortAscending,t=function(t,e){for(var i=0;i<r.length;i++){var n=r[i],o=t.sortData[n],s=e.sortData[n];if(s<o||o<s)return(s<o?1:-1)*((void 0!==a[n]?a[n]:a)?1:-1)}return 0},this.filteredItems.sort(t))},o._getIsSameSortBy=function(t){for(var e=0;e<t.length;e++)if(t[e]!=this.sortHistory[e])return!1;return!0},o._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw new Error("No layout mode: "+t);return e.options=this.options[t],e},o._resetLayout=function(){i.prototype._resetLayout.call(this),this._mode()._resetLayout()},o._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},o._manageStamp=function(t){this._mode()._manageStamp(t)},o._getContainerSize=function(){return this._mode()._getContainerSize()},o.needsResizeLayout=function(){return this._mode().needsResizeLayout()},o.appended=function(t){t=this.addItems(t);t.length&&(t=this._filterRevealAdded(t),this.filteredItems=this.filteredItems.concat(t))},o.prepended=function(t){var e=this._itemize(t);e.length&&(this._resetLayout(),this._manageStamps(),t=this._filterRevealAdded(e),this.layoutItems(this.filteredItems),this.filteredItems=t.concat(this.filteredItems),this.items=e.concat(this.items))},o._filterRevealAdded=function(t){t=this._filter(t);return this.hide(t.needHide),this.reveal(t.matches),this.layoutItems(t.matches,!0),t.matches},o.insert=function(t){var e=this.addItems(t);if(e.length){for(var i,n=e.length,o=0;o<n;o++)i=e[o],this.element.appendChild(i.element);t=this._filter(e).matches;for(o=0;o<n;o++)e[o].isLayoutInstant=!0;for(this.arrange(),o=0;o<n;o++)delete e[o].isLayoutInstant;this.reveal(t)}};var d=o.remove;return o.remove=function(t){t=s.makeArray(t);var e=this.getItems(t);d.call(this,t);for(var i=e&&e.length,n=0;i&&n<i;n++){var o=e[n];s.removeFrom(this.filteredItems,o)}},o.shuffle=function(){for(var t=0;t<this.items.length;t++)this.items[t].sortData.random=Math.random();this.options.sortBy="random",this._sort(),this._layout()},o._noTransition=function(t,e){var i=this.options.transitionDuration;this.options.transitionDuration=0;e=t.apply(this,e);return this.options.transitionDuration=i,e},o.getFilteredItemElements=function(){return this.filteredItems.map(function(t){return t.element})},u});
2
- !function(t,i){t.Packery=t.Packery||{},t.Packery.Rect=i()}(window,function(){function a(t){for(var i in a.defaults)this[i]=a.defaults[i];for(i in t)this[i]=t[i]}a.defaults={x:0,y:0,width:0,height:0};var t=a.prototype;return t.contains=function(t){var i=t.width||0,e=t.height||0;return this.x<=t.x&&this.y<=t.y&&this.x+this.width>=t.x+i&&this.y+this.height>=t.y+e},t.overlaps=function(t){var i=this.x+this.width,e=this.y+this.height,s=t.x+t.width,h=t.y+t.height;return this.x<s&&i>t.x&&this.y<h&&e>t.y},t.getMaximalFreeRects=function(t){if(!this.overlaps(t))return!1;var i,e=[],s=this.x+this.width,h=this.y+this.height,n=t.x+t.width,r=t.y+t.height;return this.y<t.y&&(i=new a({x:this.x,y:this.y,width:this.width,height:t.y-this.y}),e.push(i)),n<s&&(i=new a({x:n,y:this.y,width:s-n,height:this.height}),e.push(i)),r<h&&(i=new a({x:this.x,y:r,width:this.width,height:h-r}),e.push(i)),this.x<t.x&&(i=new a({x:this.x,y:this.y,width:t.x-this.x,height:this.height}),e.push(i)),e},t.canFit=function(t){return this.width>=t.width&&this.height>=t.height},a}),function(t,i){(t=t.Packery=t.Packery||{}).Packer=i(t.Rect)}(window,function(i){function t(t,i,e){this.width=t||0,this.height=i||0,this.sortDirection=e||"downwardLeftToRight",this.reset()}var e=t.prototype;e.reset=function(){this.spaces=[];var t=new i({x:0,y:0,width:this.width,height:this.height});this.spaces.push(t),this.sorter=s[this.sortDirection]||s.downwardLeftToRight},e.pack=function(t){for(var i=0;i<this.spaces.length;i++){var e=this.spaces[i];if(e.canFit(t)){this.placeInSpace(t,e);break}}},e.columnPack=function(t){for(var i=0;i<this.spaces.length;i++){var e=this.spaces[i];if(e.x<=t.x&&e.x+e.width>=t.x+t.width&&e.height>=t.height-.01){t.y=e.y,this.placed(t);break}}},e.rowPack=function(t){for(var i=0;i<this.spaces.length;i++){var e=this.spaces[i];if(e.y<=t.y&&e.y+e.height>=t.y+t.height&&e.width>=t.width-.01){t.x=e.x,this.placed(t);break}}},e.placeInSpace=function(t,i){t.x=i.x,t.y=i.y,this.placed(t)},e.placed=function(t){for(var i=[],e=0;e<this.spaces.length;e++){var s=this.spaces[e],h=s.getMaximalFreeRects(t);h?i.push.apply(i,h):i.push(s)}this.spaces=i,this.mergeSortSpaces()},e.mergeSortSpaces=function(){t.mergeRects(this.spaces),this.spaces.sort(this.sorter)},e.addSpace=function(t){this.spaces.push(t),this.mergeSortSpaces()},t.mergeRects=function(t){var i=0,e=t[i];t:for(;e;){for(var s=0,h=t[i+s];h;){if(h==e)s++;else{if(h.contains(e)){t.splice(i,1),e=t[i];continue t}e.contains(h)?t.splice(i+s,1):s++}h=t[i+s]}e=t[++i]}return t};var s={downwardLeftToRight:function(t,i){return t.y-i.y||t.x-i.x},rightwardTopToBottom:function(t,i){return t.x-i.x||t.y-i.y}};return t}),function(t,i){t.Packery.Item=i(t.Outlayer,t.Packery.Rect)}(window,function(t,i){function e(){t.Item.apply(this,arguments)}var s="string"==typeof document.documentElement.style.transform?"transform":"WebkitTransform",h=e.prototype=Object.create(t.Item.prototype),n=h._create;h._create=function(){n.call(this),this.rect=new i};var r=h.moveTo;return h.moveTo=function(t,i){var e=Math.abs(this.position.x-t),s=Math.abs(this.position.y-i);this.layout.dragItemCount&&!this.isPlacing&&!this.isTransitioning&&e<1&&s<1?this.goTo(t,i):r.apply(this,arguments)},h.enablePlacing=function(){this.removeTransitionStyles(),this.isTransitioning&&s&&(this.element.style[s]="none"),this.isTransitioning=!1,this.getSize(),this.layout._setRectSize(this.element,this.rect),this.isPlacing=!0},h.disablePlacing=function(){this.isPlacing=!1},h.removeElem=function(){this.element.parentNode.removeChild(this.element),this.layout.packer.addSpace(this.rect),this.emitEvent("remove",[this])},h.showDropPlaceholder=function(){var t=this.dropPlaceholder;t||((t=this.dropPlaceholder=document.createElement("div")).className="packery-drop-placeholder",t.style.position="absolute"),t.style.width=this.size.width+"px",t.style.height=this.size.height+"px",this.positionDropPlaceholder(),this.layout.element.appendChild(t)},h.positionDropPlaceholder=function(){this.dropPlaceholder.style[s]="translate("+this.rect.x+"px, "+this.rect.y+"px)"},h.hideDropPlaceholder=function(){this.layout.element.removeChild(this.dropPlaceholder)},e}),function(t,i){t.Packery=i(t.getSize,t.Outlayer,t.Packery.Rect,t.Packery.Packer,t.Packery.Item)}(window,function(c,t,r,i,e){r.prototype.canFit=function(t){return this.width>=t.width-1&&this.height>=t.height-1};var s=t.create("packery");s.Item=e;e=s.prototype;function h(t,i){return t.position.y-i.position.y||t.position.x-i.position.x}function n(t,i){return t.position.x-i.position.x||t.position.y-i.position.y}e._create=function(){t.prototype._create.call(this),this.packer=new i,this.shiftPacker=new i,this.isEnabled=!0,this.dragItemCount=0;var e=this;this.handleDraggabilly={dragStart:function(){e.itemDragStart(this.element)},dragMove:function(){e.itemDragMove(this.element,this.position.x,this.position.y)},dragEnd:function(){e.itemDragEnd(this.element)}},this.handleUIDraggable={start:function(t,i){i&&e.itemDragStart(t.currentTarget)},drag:function(t,i){i&&e.itemDragMove(t.currentTarget,i.position.left,i.position.top)},stop:function(t,i){i&&e.itemDragEnd(t.currentTarget)}}},e._resetLayout=function(){var t,i,e;this.getSize(),this._getMeasurements(),e=this._getOption("horizontal")?(t=1/0,i=this.size.innerHeight+this.gutter,"rightwardTopToBottom"):(t=this.size.innerWidth+this.gutter,i=1/0,"downwardLeftToRight"),this.packer.width=this.shiftPacker.width=t,this.packer.height=this.shiftPacker.height=i,this.packer.sortDirection=this.shiftPacker.sortDirection=e,this.packer.reset(),this.maxY=0,this.maxX=0},e._getMeasurements=function(){this._getMeasurement("columnWidth","width"),this._getMeasurement("rowHeight","height"),this._getMeasurement("gutter","width")},e._getItemLayoutPosition=function(t){var i;return this._setRectSize(t.element,t.rect),this.isShifting||0<this.dragItemCount?(i=this._getPackMethod(),this.packer[i](t.rect)):this.packer.pack(t.rect),this._setMaxXY(t.rect),t.rect},e.shiftLayout=function(){this.isShifting=!0,this.layout(),delete this.isShifting},e._getPackMethod=function(){return this._getOption("horizontal")?"rowPack":"columnPack"},e._setMaxXY=function(t){this.maxX=Math.max(t.x+t.width,this.maxX),this.maxY=Math.max(t.y+t.height,this.maxY)},e._setRectSize=function(t,i){var e=c(t),t=e.outerWidth,e=e.outerHeight;(t||e)&&(t=this._applyGridGutter(t,this.columnWidth),e=this._applyGridGutter(e,this.rowHeight)),i.width=Math.min(t,this.packer.width),i.height=Math.min(e,this.packer.height)},e._applyGridGutter=function(t,i){if(!i)return t+this.gutter;var e=t%(i+=this.gutter);return t=Math[e&&e<1?"round":"ceil"](t/i)*i},e._getContainerSize=function(){return this._getOption("horizontal")?{width:this.maxX-this.gutter}:{height:this.maxY-this.gutter}},e._manageStamp=function(t){var i,e=this.getItem(t);i=e&&e.isPlacing?e.rect:(i=this._getElementOffset(t),new r({x:this._getOption("originLeft")?i.left:i.right,y:this._getOption("originTop")?i.top:i.bottom})),this._setRectSize(t,i),this.packer.placed(i),this._setMaxXY(i)},e.sortItemsByPosition=function(){var t=this._getOption("horizontal")?n:h;this.items.sort(t)},e.fit=function(t,i,e){t=this.getItem(t);t&&(this.stamp(t.element),t.enablePlacing(),this.updateShiftTargets(t),i=void 0===i?t.rect.x:i,e=void 0===e?t.rect.y:e,this.shift(t,i,e),this._bindFitEvents(t),t.moveTo(t.rect.x,t.rect.y),this.shiftLayout(),this.unstamp(t.element),this.sortItemsByPosition(),t.disablePlacing())},e._bindFitEvents=function(t){var i=this,e=0;function s(){2==++e&&i.dispatchEvent("fitComplete",null,[t])}t.once("layout",s),this.once("layoutComplete",s)},e.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&(this.options.shiftPercentResize?this.resizeShiftPercentLayout():this.layout())},e.needsResizeLayout=function(){var t=c(this.element),i=this._getOption("horizontal")?"innerHeight":"innerWidth";return t[i]!=this.size[i]},e.resizeShiftPercentLayout=function(){var e,i,s,t=this._getItemsForLayout(this.items),h=this._getOption("horizontal"),n=h?"y":"x",r=h?"height":"width",a=h?"rowHeight":"columnWidth",h=h?"innerHeight":"innerWidth",o=this[a];(o=o&&o+this.gutter)?(this._getMeasurements(),e=this[a]+this.gutter,t.forEach(function(t){var i=Math.round(t.rect[n]/o);t.rect[n]=i*e})):(i=c(this.element)[h]+this.gutter,s=this.packer[r],t.forEach(function(t){t.rect[n]=t.rect[n]/s*i})),this.shiftLayout()},e.itemDragStart=function(t){this.isEnabled&&(this.stamp(t),(t=this.getItem(t))&&(t.enablePlacing(),t.showDropPlaceholder(),this.dragItemCount++,this.updateShiftTargets(t)))},e.updateShiftTargets=function(t){this.shiftPacker.reset(),this._getBoundingRect();var e=this._getOption("originLeft"),s=this._getOption("originTop");this.stamps.forEach(function(t){var i=this.getItem(t);i&&i.isPlacing||(i=this._getElementOffset(t),i=new r({x:e?i.left:i.right,y:s?i.top:i.bottom}),this._setRectSize(t,i),this.shiftPacker.placed(i))},this);var o=this._getOption("horizontal"),i=o?"rowHeight":"columnWidth",c=o?"height":"width";this.shiftTargetKeys=[],this.shiftTargets=[];var g=this[i];if(g=g&&g+this.gutter)for(var i=Math.ceil(t.rect[c]/g),h=Math.floor((this.shiftPacker[c]+this.gutter)/g),u=(h-i)*g,n=0;n<h;n++)this._addShiftTarget(n*g,0,u);else u=this.shiftPacker[c]+this.gutter-t.rect[c],this._addShiftTarget(0,0,u);var t=this._getItemsForLayout(this.items),d=this._getPackMethod();t.forEach(function(t){var i=t.rect;this._setRectSize(t.element,i),this.shiftPacker[d](i),this._addShiftTarget(i.x,i.y,u);var e=o?i.x+i.width:i.x,s=o?i.y:i.y+i.height;if(this._addShiftTarget(e,s,u),g)for(var h=Math.round(i[c]/g),n=1;n<h;n++){var r=o?e:i.x+g*n,a=o?i.y+g*n:s;this._addShiftTarget(r,a,u)}},this)},e._addShiftTarget=function(t,i,e){var s=this._getOption("horizontal")?i:t;0!==s&&e<s||(s=t+","+i,-1!=this.shiftTargetKeys.indexOf(s)||(this.shiftTargetKeys.push(s),this.shiftTargets.push({x:t,y:i})))},e.shift=function(t,i,e){var h,n=1/0,r={x:i,y:e};this.shiftTargets.forEach(function(t){var i,e,s,i=(s=(e=r).x-(i=t).x,i=e.y-i.y,Math.sqrt(s*s+i*i));i<n&&(h=t,n=i)}),t.rect.x=h.x,t.rect.y=h.y};e.itemDragMove=function(t,i,e){var s,h=this.isEnabled&&this.getItem(t);function n(){s.shift(h,i,e),h.positionDropPlaceholder(),s.layout()}h&&(i-=this.size.paddingLeft,e-=this.size.paddingTop,s=this,t=new Date,this._itemDragTime&&t-this._itemDragTime<120?(clearTimeout(this.dragTimeout),this.dragTimeout=setTimeout(n,120)):(n(),this._itemDragTime=t))},e.itemDragEnd=function(t){var i,e,s=this.isEnabled&&this.getItem(t);function h(){2==++i&&(s.element.classList.remove("is-positioning-post-drag"),s.hideDropPlaceholder(),e.dispatchEvent("dragItemPositioned",null,[s]))}s&&(clearTimeout(this.dragTimeout),s.element.classList.add("is-positioning-post-drag"),i=0,e=this,s.once("layout",h),this.once("layoutComplete",h),s.moveTo(s.rect.x,s.rect.y),this.layout(),this.dragItemCount=Math.max(0,this.dragItemCount-1),this.sortItemsByPosition(),s.disablePlacing(),this.unstamp(s.element))},e.bindDraggabillyEvents=function(t){this._bindDraggabillyEvents(t,"on")},e.unbindDraggabillyEvents=function(t){this._bindDraggabillyEvents(t,"off")},e._bindDraggabillyEvents=function(t,i){var e=this.handleDraggabilly;t[i]("dragStart",e.dragStart),t[i]("dragMove",e.dragMove),t[i]("dragEnd",e.dragEnd)},e.bindUIDraggableEvents=function(t){this._bindUIDraggableEvents(t,"on")},e.unbindUIDraggableEvents=function(t){this._bindUIDraggableEvents(t,"off")},e._bindUIDraggableEvents=function(t,i){var e=this.handleUIDraggable;t[i]("dragstart",e.start)[i]("drag",e.drag)[i]("dragstop",e.stop)};var a=e.destroy;return e.destroy=function(){a.apply(this,arguments),this.isEnabled=!1},s.Rect=r,s.Packer=i,s}),function(t,i){i(t.ModulaIsotope.LayoutMode,t.Packery)}(window,function(t,i){var e,t=t.create("packery"),s=t.prototype,h={_getElementOffset:!0,_getMeasurement:!0};for(e in i.prototype)h[e]||(s[e]=i.prototype[e]);var n=s._resetLayout;s._resetLayout=function(){this.packer=this.packer||new i.Packer,this.shiftPacker=this.shiftPacker||new i.Packer,n.apply(this,arguments)};var r=s._getItemLayoutPosition;s._getItemLayoutPosition=function(t){return t.rect=t.rect||new i.Rect,r.call(this,t)};var a=s.needsResizeLayout;s.needsResizeLayout=function(){return this._getOption("horizontal")?this.needsVerticalResizeLayout():a.call(this)};var o=s._getOption;return s._getOption=function(t){return"horizontal"==t?void 0!==this.options.isHorizontal?this.options.isHorizontal:this.options.horizontal:o.apply(this.isotope,arguments)},t});
3
- !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(i),i}:e(jQuery)}(function(l){function n(t,i){this.settings=i,this.checkSettings(),this.imgAnalyzerTimeout=null,this.entries=null,this.buildingRow={entriesBuff:[],width:0,height:0,aspectRatio:0},this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.yield={every:2,flushed:0},this.border=0<=i.border?i.border:i.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges(),this.offY=this.border,this.rows=0,this.spinner={phase:0,timeSlot:150,$el:l('<div class="spinner"><span></span><span></span><span></span></div>'),intervalId:null},this.scrollBarOn=!1,this.checkWidthIntervalId=null,this.galleryWidth=t.width(),this.$gallery=t}n.prototype.getSuffix=function(t,i){for(var e=i<t?t:i,s=0;s<this.suffixRanges.length;s++)if(e<=this.suffixRanges[s])return this.settings.sizeRangeSuffixes[this.suffixRanges[s]];return this.settings.sizeRangeSuffixes[this.suffixRanges[s-1]]},n.prototype.removeSuffix=function(t,i){return t.substring(0,t.length-i.length)},n.prototype.endsWith=function(t,i){return-1!==t.indexOf(i,t.length-i.length)},n.prototype.getUsedSuffix=function(t){for(var i in this.settings.sizeRangeSuffixes)if(this.settings.sizeRangeSuffixes.hasOwnProperty(i)&&0!==this.settings.sizeRangeSuffixes[i].length&&this.endsWith(t,this.settings.sizeRangeSuffixes[i]))return this.settings.sizeRangeSuffixes[i];return""},n.prototype.newSrc=function(t,i,e,s){var n;return this.settings.thumbnailPath?n=this.settings.thumbnailPath(t,i,e,s):(s=null!==(s=t.match(this.settings.extension))?s[0]:"",n=t.replace(this.settings.extension,""),n=this.removeSuffix(n,this.getUsedSuffix(n)),n+=this.getSuffix(i,e)+s),n},n.prototype.showImg=function(t,i){this.settings.cssAnimation?(t.addClass("entry-visible"),i&&i()):(t.stop().fadeTo(this.settings.imagesAnimationDuration,1,i),t.find(this.settings.imgSelector).stop().fadeTo(this.settings.imagesAnimationDuration,1,i))},n.prototype.extractImgSrcFromImage=function(t){var i=void 0!==t.data("safe-src")?t.data("safe-src"):t.attr("src");return t.data("jg.originalSrc",i),i},n.prototype.imgFromEntry=function(t){t=t.find(this.settings.imgSelector);return 0===t.length?null:t},n.prototype.captionFromEntry=function(t){t=t.find("> .caption");return 0===t.length?null:t},n.prototype.displayEntry=function(t,i,e,s,n,r){t.width(s),t.height(r),t.css("top",e),t.css("left",i);var o,a,h,g=this.imgFromEntry(t);null!==g?(g.css("width",s),g.css("height",n),g.css("margin-left",-s/2),g.css("margin-top",-n/2),o=g.attr("src"),a=this.newSrc(o,s,n,g[0]),g.one("error",function(){g.attr("src",g.data("jg.originalSrc"))}),h=function(){o!==a&&g.attr("src",a)},"skipped"===t.data("jg.loaded")?this.onImageEvent(o,l.proxy(function(){this.showImg(t,h),t.data("jg.loaded",!0)},this)):this.showImg(t,h)):this.showImg(t),this.displayEntryCaption(t)},n.prototype.displayEntryCaption=function(t){var i,e=this.imgFromEntry(t);null!==e&&this.settings.captions?(null===(i=this.captionFromEntry(t))&&(e=e.attr("alt"),this.isValidCaption(e)||(e=t.attr("title")),this.isValidCaption(e)&&(i=l('<div class="caption">'+e+"</div>"),t.append(i),t.data("jg.createdCaption",!0))),null!==i&&(this.settings.cssAnimation||i.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity),this.addCaptionEventsHandlers(t))):this.removeCaptionEventsHandlers(t)},n.prototype.isValidCaption=function(t){return void 0!==t&&0<t.length},n.prototype.onEntryMouseEnterForCaption=function(t){t=this.captionFromEntry(l(t.currentTarget));this.settings.cssAnimation?t.addClass("caption-visible").removeClass("caption-hidden"):t.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.visibleOpacity)},n.prototype.onEntryMouseLeaveForCaption=function(t){t=this.captionFromEntry(l(t.currentTarget));this.settings.cssAnimation?t.removeClass("caption-visible").removeClass("caption-hidden"):t.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.nonVisibleOpacity)},n.prototype.addCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0===i&&(i={mouseenter:l.proxy(this.onEntryMouseEnterForCaption,this),mouseleave:l.proxy(this.onEntryMouseLeaveForCaption,this)},t.on("mouseenter",void 0,void 0,i.mouseenter),t.on("mouseleave",void 0,void 0,i.mouseleave),t.data("jg.captionMouseEvents",i))},n.prototype.removeCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0!==i&&(t.off("mouseenter",void 0,i.mouseenter),t.off("mouseleave",void 0,i.mouseleave),t.removeData("jg.captionMouseEvents"))},n.prototype.clearBuildingRow=function(){this.buildingRow.entriesBuff=[],this.buildingRow.aspectRatio=0,this.buildingRow.width=0},n.prototype.prepareBuildingRow=function(t){var i,e,s,n,r=!0,o=0,a=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,h=a/this.buildingRow.aspectRatio,g=this.settings.rowHeight,l=this.buildingRow.width/a>this.settings.justifyThreshold;if(t&&"hide"===this.settings.lastRow&&!l){for(i=0;i<this.buildingRow.entriesBuff.length;i++)e=this.buildingRow.entriesBuff[i],this.settings.cssAnimation?e.removeClass("entry-visible"):(e.stop().fadeTo(0,.1),e.find("> img, > a > img").fadeTo(0,0));return-1}for(t&&!l&&"justify"!==this.settings.lastRow&&"hide"!==this.settings.lastRow&&(r=!1,0<this.rows&&(r=(g=(this.offY-this.border-this.settings.margins*this.rows)/this.rows)*this.buildingRow.aspectRatio/a>this.settings.justifyThreshold)),i=0;i<this.buildingRow.entriesBuff.length;i++)n=(e=this.buildingRow.entriesBuff[i]).data("jg.width")/e.data("jg.height"),n=r?(s=i===this.buildingRow.entriesBuff.length-1?a:h*n,h):(s=g*n,g),a-=Math.round(s),e.data("jg.jwidth",Math.round(s)),e.data("jg.jheight",Math.ceil(n)),(0===i||n<o)&&(o=n);return this.buildingRow.height=o,r},n.prototype.flushRow=function(t){var i,e=this.settings,s=this.border,n=this.prepareBuildingRow(t);if(t&&"hide"===e.lastRow&&-1===n)this.clearBuildingRow();else{if(this.maxRowHeight&&this.maxRowHeight<this.buildingRow.height&&(this.buildingRow.height=this.maxRowHeight),t&&("center"===e.lastRow||"right"===e.lastRow)){for(var r=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*e.margins,o=0;o<this.buildingRow.entriesBuff.length;o++)r-=(i=this.buildingRow.entriesBuff[o]).data("jg.jwidth");"center"===e.lastRow?s+=r/2:"right"===e.lastRow&&(s+=r)}var a=this.buildingRow.entriesBuff.length-1;for(o=0;o<=a;o++)i=this.buildingRow.entriesBuff[this.settings.rtl?a-o:o],this.displayEntry(i,s,this.offY,i.data("jg.jwidth"),i.data("jg.jheight"),this.buildingRow.height),s+=i.data("jg.jwidth")+e.margins;this.galleryHeightToSet=this.offY+this.buildingRow.height+this.border,this.setGalleryTempHeight(this.galleryHeightToSet+this.getSpinnerHeight()),(!t||this.buildingRow.height<=e.rowHeight&&n)&&(this.offY+=this.buildingRow.height+e.margins,this.rows+=1,this.clearBuildingRow(),this.settings.triggerEvent.call(this,"jg.rowflush"))}};var i=0;function e(){return l("body").height()>l(window).height()}n.prototype.rememberGalleryHeight=function(){i=this.$gallery.height(),this.$gallery.height(i)},n.prototype.setGalleryTempHeight=function(t){i=Math.max(t,i),this.$gallery.height(i)},n.prototype.setGalleryFinalHeight=function(t){i=t,this.$gallery.height(t)},n.prototype.checkWidth=function(){this.checkWidthIntervalId=setInterval(l.proxy(function(){var t;this.$gallery.is(":visible")&&(t=parseFloat(this.$gallery.width()),e()===this.scrollBarOn?Math.abs(t-this.galleryWidth)>this.settings.refreshSensitivity&&(this.galleryWidth=t,this.rewind(),this.rememberGalleryHeight(),this.startImgAnalyzer(!0)):(this.scrollBarOn=e(),this.galleryWidth=t))},this),this.settings.refreshTime)},n.prototype.isSpinnerActive=function(){return null!==this.spinner.intervalId},n.prototype.getSpinnerHeight=function(){return this.spinner.$el.innerHeight()},n.prototype.stopLoadingSpinnerAnimation=function(){clearInterval(this.spinner.intervalId),this.spinner.intervalId=null,this.setGalleryTempHeight(this.$gallery.height()-this.getSpinnerHeight()),this.spinner.$el.detach()},n.prototype.startLoadingSpinnerAnimation=function(){var t=this.spinner,i=t.$el.find("span");clearInterval(t.intervalId),this.$gallery.append(t.$el),this.setGalleryTempHeight(this.offY+this.buildingRow.height+this.getSpinnerHeight()),t.intervalId=setInterval(function(){t.phase<i.length?i.eq(t.phase).fadeTo(t.timeSlot,1):i.eq(t.phase-i.length).fadeTo(t.timeSlot,0),t.phase=(t.phase+1)%(2*i.length)},t.timeSlot)},n.prototype.rewind=function(){this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.offY=this.border,this.rows=0,this.clearBuildingRow()},n.prototype.updateEntries=function(t){t=t&&null!=this.lastFetchedEntry?l(this.lastFetchedEntry).nextAll(this.settings.selector).toArray():(this.entries=[],this.$gallery.children(this.settings.selector).toArray());return 0<t.length&&(l.isFunction(this.settings.sort)?t=this.sortArray(t):this.settings.randomize&&(t=this.shuffleArray(t)),this.lastFetchedEntry=t[t.length-1],this.settings.filter?t=this.filterArray(t):this.resetFilters(t)),this.entries=this.entries.concat(t),!0},n.prototype.insertToGallery=function(t){var i=this;l.each(t,function(){l(this).appendTo(i.$gallery)})},n.prototype.shuffleArray=function(t){for(var i,e,s=t.length-1;0<s;s--)i=Math.floor(Math.random()*(s+1)),e=t[s],t[s]=t[i],t[i]=e;return this.insertToGallery(t),t},n.prototype.sortArray=function(t){return t.sort(this.settings.sort),this.insertToGallery(t),t},n.prototype.resetFilters=function(t){for(var i=0;i<t.length;i++)l(t[i]).removeClass("jg-filtered")},n.prototype.filterArray=function(t){var i=this.settings;if("string"===l.type(i.filter))return t.filter(function(t){t=l(t);return t.is(i.filter)?(t.removeClass("jg-filtered"),!0):(t.addClass("jg-filtered").removeClass("jg-visible"),!1)});if(l.isFunction(i.filter)){for(var e=t.filter(i.filter),s=0;s<t.length;s++)-1===e.indexOf(t[s])?l(t[s]).addClass("jg-filtered").removeClass("jg-visible"):l(t[s]).removeClass("jg-filtered");return e}},n.prototype.destroy=function(){clearInterval(this.checkWidthIntervalId),l.each(this.entries,l.proxy(function(t,i){var e=l(i);e.css("width",""),e.css("height",""),e.css("top",""),e.css("left",""),e.data("jg.loaded",void 0),e.removeClass("jg-entry");i=this.imgFromEntry(e);i.css("width",""),i.css("height",""),i.css("margin-left",""),i.css("margin-top",""),i.attr("src",i.data("jg.originalSrc")),i.data("jg.originalSrc",void 0),this.removeCaptionEventsHandlers(e);i=this.captionFromEntry(e);e.data("jg.createdCaption")?(e.data("jg.createdCaption",void 0),null!==i&&i.remove()):null!==i&&i.fadeTo(0,1)},this)),this.$gallery.css("height",""),this.$gallery.removeClass("justified-gallery"),this.$gallery.data("jg.controller",void 0)},n.prototype.analyzeImages=function(t){for(var i=this.lastAnalyzedIndex+1;i<this.entries.length;i++){var e=l(this.entries[i]);if(!0===e.data("jg.loaded")||"skipped"===e.data("jg.loaded")){var s=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,n=e.data("jg.width")/e.data("jg.height");if(s/(this.buildingRow.aspectRatio+n)<this.settings.rowHeight&&(this.flushRow(!1),++this.yield.flushed>=this.yield.every))return void this.startImgAnalyzer(t);this.buildingRow.entriesBuff.push(e),this.buildingRow.aspectRatio+=n,this.buildingRow.width+=n*this.settings.rowHeight,this.lastAnalyzedIndex=i}else if("error"!==e.data("jg.loaded"))return}0<this.buildingRow.entriesBuff.length&&this.flushRow(!0),this.isSpinnerActive()&&this.stopLoadingSpinnerAnimation(),this.stopImgAnalyzerStarter(),this.settings.triggerEvent.call(this,t?"jg.resize":"jg.complete"),this.setGalleryFinalHeight(this.galleryHeightToSet)},n.prototype.stopImgAnalyzerStarter=function(){this.yield.flushed=0,null!==this.imgAnalyzerTimeout&&(clearTimeout(this.imgAnalyzerTimeout),this.imgAnalyzerTimeout=null)},n.prototype.startImgAnalyzer=function(t){var i=this;this.stopImgAnalyzerStarter(),this.imgAnalyzerTimeout=setTimeout(function(){i.analyzeImages(t)},.001)},n.prototype.onImageEvent=function(t,i,e){var s,n;(i||e)&&(s=new Image,n=l(s),i&&n.one("load",function(){n.off("load error"),i(s)}),e&&n.one("error",function(){n.off("load error"),e(s)}),s.src=t)},n.prototype.init=function(){var r=!1,o=!1,a=this;l.each(this.entries,function(t,i){var e=l(i),s=a.imgFromEntry(e);if(e.addClass("jg-entry"),!0!==e.data("jg.loaded")&&"skipped"!==e.data("jg.loaded"))if(null!==a.settings.rel&&e.attr("rel",a.settings.rel),null!==a.settings.target&&e.attr("target",a.settings.target),null!==s){var n=a.extractImgSrcFromImage(s);if(s.attr("src",n),!1===a.settings.waitThumbnailsLoad){i=parseFloat(s.prop("width")),s=parseFloat(s.prop("height"));if(!isNaN(i)&&!isNaN(s))return e.data("jg.width",i),e.data("jg.height",s),e.data("jg.loaded","skipped"),o=!0,a.startImgAnalyzer(!1),!0}e.data("jg.loaded",!1),r=!0,a.isSpinnerActive()||a.startLoadingSpinnerAnimation(),a.onImageEvent(n,function(t){e.data("jg.width",t.width),e.data("jg.height",t.height),e.data("jg.loaded",!0),a.startImgAnalyzer(!1)},function(){e.data("jg.loaded","error"),a.startImgAnalyzer(!1)})}else e.data("jg.loaded",!0),e.data("jg.width",e.width()|parseFloat(e.css("width"))|1),e.data("jg.height",e.height()|parseFloat(e.css("height"))|1)}),r||o||this.startImgAnalyzer(!1),this.checkWidth()},n.prototype.checkOrConvertNumber=function(t,i){if("string"===l.type(t[i])&&(t[i]=parseFloat(t[i])),"number"!==l.type(t[i]))throw i+" must be a number";if(isNaN(t[i]))throw"invalid number for "+i},n.prototype.checkSizeRangesSuffixes=function(){if("object"!==l.type(this.settings.sizeRangeSuffixes))throw"sizeRangeSuffixes must be defined and must be an object";var t,i=[];for(t in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(t)&&i.push(t);for(var e={0:""},s=0;s<i.length;s++)if("string"===l.type(i[s]))try{e[parseInt(i[s].replace(/^[a-z]+/,""),10)]=this.settings.sizeRangeSuffixes[i[s]]}catch(t){throw"sizeRangeSuffixes keys must contains correct numbers ("+t+")"}else e[i[s]]=this.settings.sizeRangeSuffixes[i[s]];this.settings.sizeRangeSuffixes=e},n.prototype.retrieveMaxRowHeight=function(){var t=null,i=this.settings.rowHeight;if("string"===l.type(this.settings.maxRowHeight))t=this.settings.maxRowHeight.match(/^[0-9]+%$/)?i*parseFloat(this.settings.maxRowHeight.match(/^([0-9]+)%$/)[1])/100:parseFloat(this.settings.maxRowHeight);else{if("number"!==l.type(this.settings.maxRowHeight)){if(!1===this.settings.maxRowHeight||null==this.settings.maxRowHeight)return null;throw"maxRowHeight must be a number or a percentage"}t=this.settings.maxRowHeight}if(isNaN(t))throw"invalid number for maxRowHeight";return t<i&&(t=i),t},n.prototype.checkSettings=function(){this.checkSizeRangesSuffixes(),this.checkOrConvertNumber(this.settings,"rowHeight"),this.checkOrConvertNumber(this.settings,"margins"),this.checkOrConvertNumber(this.settings,"border");var t=["justify","nojustify","left","center","right","hide"];if(-1===t.indexOf(this.settings.lastRow))throw"lastRow must be one of: "+t.join(", ");if(this.checkOrConvertNumber(this.settings,"justifyThreshold"),this.settings.justifyThreshold<0||1<this.settings.justifyThreshold)throw"justifyThreshold must be in the interval [0,1]";if("boolean"!==l.type(this.settings.cssAnimation))throw"cssAnimation must be a boolean";if("boolean"!==l.type(this.settings.captions))throw"captions must be a boolean";if(this.checkOrConvertNumber(this.settings.captionSettings,"animationDuration"),this.checkOrConvertNumber(this.settings.captionSettings,"visibleOpacity"),this.settings.captionSettings.visibleOpacity<0||1<this.settings.captionSettings.visibleOpacity)throw"captionSettings.visibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings.captionSettings,"nonVisibleOpacity"),this.settings.captionSettings.nonVisibleOpacity<0||1<this.settings.captionSettings.nonVisibleOpacity)throw"captionSettings.nonVisibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings,"imagesAnimationDuration"),this.checkOrConvertNumber(this.settings,"refreshTime"),this.checkOrConvertNumber(this.settings,"refreshSensitivity"),"boolean"!==l.type(this.settings.randomize))throw"randomize must be a boolean";if("string"!==l.type(this.settings.selector))throw"selector must be a string";if(!1!==this.settings.sort&&!l.isFunction(this.settings.sort))throw"sort must be false or a comparison function";if(!1!==this.settings.filter&&!l.isFunction(this.settings.filter)&&"string"!==l.type(this.settings.filter))throw"filter must be false, a string or a filter function"},n.prototype.retrieveSuffixRanges=function(){var t,i=[];for(t in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(t)&&i.push(parseInt(t,10));return i.sort(function(t,i){return i<t?1:t<i?-1:0}),i},n.prototype.updateSettings=function(t){this.settings=l.extend({},this.settings,t),this.checkSettings(),this.border=0<=this.settings.border?this.settings.border:this.settings.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges()},n.prototype.defaults={sizeRangeSuffixes:{},thumbnailPath:void 0,rowHeight:120,maxRowHeight:!1,margins:1,border:-1,lastRow:"nojustify",justifyThreshold:.9,waitThumbnailsLoad:!0,captions:!0,cssAnimation:!0,imagesAnimationDuration:500,captionSettings:{animationDuration:500,visibleOpacity:.7,nonVisibleOpacity:0},rel:null,target:null,extension:/\.[^.\\/]+$/,refreshTime:200,refreshSensitivity:0,randomize:!1,rtl:!1,sort:!1,filter:!1,selector:"a, div:not(.spinner)",imgSelector:"> img, > a > img",triggerEvent:function(t){this.$gallery.trigger(t)}},l.fn.justifiedGallery=function(s){return this.each(function(t,i){var e=l(i);e.addClass("justified-gallery");i=e.data("jg.controller");if(void 0===i){if(null!=s&&"object"!==l.type(s)){if("destroy"===s)return;throw"The argument must be an object"}i=new n(e,l.extend({},n.prototype.defaults,s)),e.data("jg.controller",i)}else if("norewind"!==s){if("destroy"===s)return void i.destroy();i.updateSettings(s),i.rewind()}i.updateEntries("norewind"===s)&&i.init()})}});
4
- !function(l,s,f,m){"use strict";var a,i,r,d,e,c,p,u,n,t,o,h,g;function b(t,e){var o,n,a,i=[],s=0;t&&t.isDefaultPrevented()||(t.preventDefault(),e=e||{},t&&t.data&&(e=u(t.data.options,e)),o=e.$target||f(t.currentTarget).trigger("blur"),(a=f.modulaFancybox.getInstance())&&a.$trigger&&a.$trigger.is(o)||(i=e.selector?f(e.selector):(n=o.attr("data-fancybox")||"")?(i=t.data?t.data.items:[]).length?i.filter('[data-fancybox="'+n+'"]'):f('[data-fancybox="'+n+'"]'):[o],(s=f(i).index(o))<0&&(s=0),(a=f.modulaFancybox.open(i,e,s)).$trigger=o))}l.console=l.console||{info:function(t){}},f&&(f.fn.modulaFancybox?console.info("fancyBox already initialized"):(t={closeExisting:!1,loop:!1,gutter:50,keyboard:!0,preventCaptionOverlap:!0,arrows:!0,infobar:!0,smallBtn:"auto",toolbar:"auto",buttons:["zoom","slideShow","thumbs","close"],idleTime:3,protect:!1,modal:!1,image:{preload:!1},ajax:{settings:{data:{fancybox:!0}}},iframe:{tpl:'<iframe id="modula-fancybox-frame{rnd}" name="modula-fancybox-frame{rnd}" class="modula-fancybox-iframe" allowfullscreen="allowfullscreen" allow="autoplay; fullscreen" src=""></iframe>',preload:!0,css:{},attr:{scrolling:"auto"}},video:{tpl:'<video class="modula-fancybox-video" controls controlsList="nodownload" poster="{{poster}}"><source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos, <a href="{{src}}">download</a> and watch with your favorite video player!</video>',format:"",autoStart:!0},defaultType:"image",animationEffect:"zoom",animationDuration:366,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",baseTpl:'<div class="modula-fancybox-container" role="dialog" tabindex="-1"><div class="modula-fancybox-bg"></div><div class="modula-fancybox-inner"><div class="modula-fancybox-infobar"><span data-fancybox-index></span>&nbsp;/&nbsp;<span data-fancybox-count></span></div><div class="modula-fancybox-toolbar">{{buttons}}</div><div class="modula-fancybox-navigation">{{arrows}}</div><div class="modula-fancybox-stage"></div><div class="modula-fancybox-caption"><div class="modula-fancybox-caption__body"></div></div></div></div>',spinnerTpl:'<div class="modula-fancybox-loading"></div>',errorTpl:'<div class="modula-fancybox-error"><p>{{ERROR}}</p></div>',btnTpl:{download:'<a download data-fancybox-download class="modula-fancybox-button modula-fancybox-button--download" title="{{DOWNLOAD}}" href="javascript:;"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.62 17.09V19H5.38v-1.91zm-2.97-6.96L17 11.45l-5 4.87-5-4.87 1.36-1.32 2.68 2.64V5h1.92v7.77z"/></svg></a>',zoom:'<button data-fancybox-zoom class="modula-fancybox-button modula-fancybox-button--zoom" title="{{ZOOM}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.7 17.3l-3-3a5.9 5.9 0 0 0-.6-7.6 5.9 5.9 0 0 0-8.4 0 5.9 5.9 0 0 0 0 8.4 5.9 5.9 0 0 0 7.7.7l3 3a1 1 0 0 0 1.3 0c.4-.5.4-1 0-1.5zM8.1 13.8a4 4 0 0 1 0-5.7 4 4 0 0 1 5.7 0 4 4 0 0 1 0 5.7 4 4 0 0 1-5.7 0z"/></svg></button>',close:'<button data-fancybox-close class="modula-fancybox-button modula-fancybox-button--close" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 10.6L6.6 5.2 5.2 6.6l5.4 5.4-5.4 5.4 1.4 1.4 5.4-5.4 5.4 5.4 1.4-1.4-5.4-5.4 5.4-5.4-1.4-1.4-5.4 5.4z"/></svg></button>',arrowLeft:'<button data-fancybox-prev class="modula-fancybox-button modula-fancybox-button--arrow_left" title="{{PREV}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.28 15.7l-1.34 1.37L5 12l4.94-5.07 1.34 1.38-2.68 2.72H19v1.94H8.6z"/></svg></div></button>',arrowRight:'<button data-fancybox-next class="modula-fancybox-button modula-fancybox-button--arrow_right" title="{{NEXT}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.4 12.97l-2.68 2.72 1.34 1.38L19 12l-4.94-5.07-1.34 1.38 2.68 2.72H5v1.94z"/></svg></div></button>',smallBtn:'<button type="button" data-fancybox-close class="modula-fancybox-button modula-fancybox-close-small" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" version="1" viewBox="0 0 24 24"><path d="M13 12l5-5-1-1-5 5-5-5-1 1 5 5-5 5 1 1 5-5 5 5 1-1z"/></svg></button>'},modulaShare:["facebook","twitter","pinterest","whatsapp","linkedin","email"],shareBtnTpl:{facebook:'<a class="modula-fancybox-share__button modula-fancybox-share__button--fb" href="https://www.facebook.com/sharer/sharer.php?u={{modulaShareUrl}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196" /></svg><span>Facebook</span></a>',twitter:'<a class="modula-fancybox-share__button modula-fancybox-share__button--tw" href="https://twitter.com/intent/tweet?url={{modulaShareUrl}}&text={{descr}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z" /></svg><span>Twitter</span></a>',pinterest:'<a class="modula-fancybox-share__button modula-fancybox-share__button--pt" href="https://www.pinterest.com/pin/create/button/?url={{modulaShareUrl}}&description={{descr}}&media={{media}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z" fill="#fff"/></svg><span>Pinterest</span></a>',whatsapp:'<a class="modula-fancybox-share__button modula-fancybox-share__button--wa" href="https://api.whatsapp.com/send?text={{modulaShareUrl}}&review_url=true"><svg aria-hidden="true" focusable="false" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);" preserveAspectRatio="xMidYMid meet" viewBox="0 0 1536 1600"><path d="M985 878q13 0 97.5 44t89.5 53q2 5 2 15q0 33-17 76q-16 39-71 65.5T984 1158q-57 0-190-62q-98-45-170-118T476 793q-72-107-71-194v-8q3-91 74-158q24-22 52-22q6 0 18 1.5t19 1.5q19 0 26.5 6.5T610 448q8 20 33 88t25 75q0 21-34.5 57.5T599 715q0 7 5 15q34 73 102 137q56 53 151 101q12 7 22 7q15 0 54-48.5t52-48.5zm-203 530q127 0 243.5-50t200.5-134t134-200.5t50-243.5t-50-243.5T1226 336t-200.5-134T782 152t-243.5 50T338 336T204 536.5T154 780q0 203 120 368l-79 233l242-77q158 104 345 104zm0-1382q153 0 292.5 60T1315 247t161 240.5t60 292.5t-60 292.5t-161 240.5t-240.5 161t-292.5 60q-195 0-365-94L0 1574l136-405Q28 991 28 780q0-153 60-292.5T249 247T489.5 86T782 26z" fill="currentColor"/></svg><span>WhatsApp</span></a>',linkedin:'<a class="modula-fancybox-share__button modula-fancybox-share__button--li" href="//linkedin.com/shareArticle?mini=true&url={{modulaShareUrl}}"><svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="linkedin-in" class="svg-inline--fa fa-linkedin-in fa-w-14" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z"></path></svg><span>LinkedIn</span></a>',email:'<a class="modula-fancybox-share__button modula-fancybox-share__button--email" href="mailto:?subject={{subject}}&body={{emailMessage}}"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 3v18h24v-18h-24zm6.623 7.929l-4.623 5.712v-9.458l4.623 3.746zm-4.141-5.929h19.035l-9.517 7.713-9.518-7.713zm5.694 7.188l3.824 3.099 3.83-3.104 5.612 6.817h-18.779l5.513-6.812zm9.208-1.264l4.616-3.741v9.348l-4.616-5.607z" fill="currentColor"></path></svg><span>Email</span></a>'},parentEl:"body",hideScrollbar:!0,autoFocus:!0,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:3e3},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".modula-fancybox-container",axis:"y"},wheel:"auto",onInit:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeClose:f.noop,afterClose:f.noop,onActivate:f.noop,onDeactivate:f.noop,clickContent:function(t,e){return"image"===t.type&&"zoom"},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{preventCaptionOverlap:!1,idleTime:!1,clickContent:function(t,e){return"image"===t.type&&"toggleControls"},clickSlide:function(t,e){return"image"===t.type?"toggleControls":"close"},dblclickContent:function(t,e){return"image"===t.type&&"zoom"},dblclickSlide:function(t,e){return"image"===t.type&&"zoom"}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded. <br/> Please try again later.",PLAY_START:"Start slideshow",PLAY_STOP:"Pause slideshow",FULL_SCREEN:"Full screen",THUMBS:"Thumbnails",DOWNLOAD:"Download",SHARE:"Share",ZOOM:"Zoom"},de:{CLOSE:"Schlie&szlig;en",NEXT:"Weiter",PREV:"Zur&uuml;ck",ERROR:"Die angeforderten Daten konnten nicht geladen werden. <br/> Bitte versuchen Sie es sp&auml;ter nochmal.",PLAY_START:"Diaschau starten",PLAY_STOP:"Diaschau beenden",FULL_SCREEN:"Vollbild",THUMBS:"Vorschaubilder",DOWNLOAD:"Herunterladen",SHARE:"Teilen",ZOOM:"Vergr&ouml;&szlig;ern"}}},a=f(l),i=f(s),r=0,d=l.requestAnimationFrame||l.webkitRequestAnimationFrame||l.mozRequestAnimationFrame||l.oRequestAnimationFrame||function(t){return l.setTimeout(t,1e3/60)},e=l.cancelAnimationFrame||l.webkitCancelAnimationFrame||l.mozCancelAnimationFrame||l.oCancelAnimationFrame||function(t){l.clearTimeout(t)},c=function(){var t,e=s.createElement("fakeelement"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in o)if(e.style[t]!==m)return o[t];return"transitionend"}(),p=function(t){return t&&t.length&&t[0].offsetHeight},u=function(t,e){var o=f.extend(!0,{},t,e);return f.each(e,function(t,e){f.isArray(e)&&(o[t]=e)}),o},n=function(t,e,o){var n=this;n.opts=u({index:o},f.modulaFancybox.defaults),f.isPlainObject(e)&&(n.opts=u(n.opts,e)),f.modulaFancybox.isMobile&&(n.opts=u(n.opts,n.opts.mobile)),n.id=n.opts.id||++r,n.currIndex=parseInt(n.opts.index,10)||0,n.prevIndex=null,n.prevPos=null,n.currPos=0,n.firstRun=!0,n.group=[],n.slides={},n.addContent(t),n.group.length&&n.init()},f.extend(n.prototype,{init:function(){var o=this;o.currIndex<0&&(o.currIndex=0),void 0===o.group[o.currIndex]&&jQuery.each(this.group,function(t,e){o.currIndex==parseInt(e.opts.image_id)&&(o.currIndex=t)});var e,n,a=o.group[o.currIndex].opts;a.closeExisting&&f.modulaFancybox.close(!0),f("body").addClass("modula-fancybox-active"),!f.modulaFancybox.getInstance()&&!1!==a.hideScrollbar&&!f.modulaFancybox.isMobile&&s.body.scrollHeight>l.innerHeight&&(f("head").append('<style id="modula-fancybox-style-noscroll" type="text/css">.compensate-for-scrollbar{margin-right:'+(l.innerWidth-s.documentElement.clientWidth)+"px;}</style>"),f("body").addClass("compensate-for-scrollbar")),n="",f.each(a.buttons,function(t,e){n+=a.btnTpl[e]||""}),e=f(o.translate(o,a.baseTpl.replace("{{buttons}}",n).replace("{{arrows}}",a.btnTpl.arrowLeft+a.btnTpl.arrowRight))).attr("id","modula-fancybox-container-"+o.id).addClass(a.baseClass).data("modulaFancyBox",o).appendTo(a.parentEl),o.$refs={container:e},["bg","inner","infobar","toolbar","stage","caption","navigation"].forEach(function(t){o.$refs[t]=e.find(".modula-fancybox-"+t)}),o.trigger("onInit"),o.activate(),o.jumpTo(o.currIndex)},translate:function(t,e){var o=t.opts.i18n[t.opts.lang]||t.opts.i18n.en;return e.replace(/\{\{(\w+)\}\}/g,function(t,e){return o[e]===m?t:o[e]})},addContent:function(t){var r=this,t=f.makeArray(t);f.each(t,function(t,e){var o,n,a,i={},s={};f.isPlainObject(e)?s=(i=e).opts||e:"object"===f.type(e)&&f(e).length?(s=(n=f(e)).data()||{},(s=f.extend(!0,{},s,s.options)).$orig=n,i.src=r.opts.src||s.src||n.attr("href"),i.type||i.src||(i.type="inline",i.src=e)):i={type:"html",src:e+""},i.opts=f.extend(!0,{},r.opts,s),f.isArray(s.buttons)&&(i.opts.buttons=s.buttons),f.modulaFancybox.isMobile&&i.opts.mobile&&(i.opts=u(i.opts,i.opts.mobile)),o=i.type||i.opts.type,n=i.src||"",!o&&n&&((s=n.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(o="video",i.opts.video.format||(i.opts.video.format="video/"+("ogv"===s[1]?"ogg":s[1]))):n.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?o="image":n.match(/\.(pdf)((\?|#).*)?$/i)?(o="iframe",i=f.extend(!0,i,{contentType:"pdf",opts:{iframe:{preload:!1}}})):"#"===n.charAt(0)&&(o="inline")),o?i.type=o:r.trigger("objectNeedsType",i),i.contentType||(i.contentType=-1<f.inArray(i.type,["html","inline","ajax"])?"html":i.type),i.index=r.group.length,"auto"==i.opts.smallBtn&&(i.opts.smallBtn=-1<f.inArray(i.type,["html","inline","ajax"])),"auto"===i.opts.toolbar&&(i.opts.toolbar=!i.opts.smallBtn),i.$thumb=i.opts.$thumb||null,i.opts.$trigger&&i.index===r.opts.index&&(i.$thumb=i.opts.$trigger.find("img:first"),i.$thumb.length&&(i.opts.$orig=i.opts.$trigger)),i.$thumb&&i.$thumb.length||!i.opts.$orig||(i.$thumb=i.opts.$orig.find("img:first")),i.$thumb&&!i.$thumb.length&&(i.$thumb=null),i.thumb=i.opts.thumb||(i.$thumb?i.$thumb[0].src:null),"function"===f.type(i.opts.caption)&&(i.opts.caption=i.opts.caption.apply(e,[r,i])),"function"===f.type(r.opts.caption)&&(i.opts.caption=r.opts.caption.apply(e,[r,i])),i.opts.caption instanceof f||(i.opts.caption=i.opts.caption===m?"":i.opts.caption+""),"ajax"===i.type&&1<(a=n.split(/\s+/,2)).length&&(i.src=a.shift(),i.opts.filter=a.shift()),i.opts.modal&&(i.opts=f.extend(!0,i.opts,{trapFocus:!0,infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),r.group.push(i)}),Object.keys(r.slides).length&&(r.updateControls(),(t=r.Thumbs)&&t.isActive&&(t.create(),t.focus()))},addEvents:function(){var n=this;n.removeEvents(),n.$refs.container.on("click.fb-close","[data-fancybox-close]",function(t){t.stopPropagation(),t.preventDefault(),n.close(t)}).on("touchstart.fb-prev click.fb-prev","[data-fancybox-prev]",function(t){t.stopPropagation(),t.preventDefault(),n.previous()}).on("touchstart.fb-next click.fb-next","[data-fancybox-next]",function(t){t.stopPropagation(),t.preventDefault(),n.next()}).on("click.fb","[data-fancybox-zoom]",function(t){n[n.isScaledDown()?"scaleToActual":"scaleToFit"]()}),a.on("orientationchange.fb resize.fb",function(t){t&&t.originalEvent&&"resize"===t.originalEvent.type?(n.requestId&&e(n.requestId),n.requestId=d(function(){n.update(t)})):(n.current&&"iframe"===n.current.type&&n.$refs.stage.hide(),setTimeout(function(){n.$refs.stage.show(),n.update(t)},f.modulaFancybox.isMobile?600:250))}),i.on("keydown.fb",function(t){var e=(f.modulaFancybox?f.modulaFancybox.getInstance():null).current,o=t.keyCode||t.which;if(9!=o){if(!(!e.opts.keyboard||t.ctrlKey||t.altKey||t.shiftKey||f(t.target).is("input,textarea,video,audio,select")))return 8===o||27===o?(t.preventDefault(),void n.close(t)):37===o||38===o?(t.preventDefault(),void n.previous()):39===o||40===o?(t.preventDefault(),void n.next()):void n.trigger("afterKeydown",t,o)}else e.opts.trapFocus&&n.focus(t)}),n.group[n.currIndex].opts.idleTime&&(n.idleSecondsCounter=0,i.on("mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle",function(t){n.idleSecondsCounter=0,n.isIdle&&n.showControls(),n.isIdle=!1}),n.idleInterval=l.setInterval(function(){n.idleSecondsCounter++,n.idleSecondsCounter>=n.group[n.currIndex].opts.idleTime&&!n.isDragging&&(n.isIdle=!0,n.idleSecondsCounter=0,n.hideControls())},1e3))},removeEvents:function(){a.off("orientationchange.fb resize.fb"),i.off("keydown.fb .fb-idle"),this.$refs.container.off(".fb-close .fb-prev .fb-next"),this.idleInterval&&(l.clearInterval(this.idleInterval),this.idleInterval=null)},previous:function(t){return this.jumpTo(this.currPos-1,t)},next:function(t){return this.jumpTo(this.currPos+1,t)},jumpTo:function(t,n){var e,o,a,i,s,r,l,c,d=this,u=d.group.length;if(!(d.isDragging||d.isClosing||d.isAnimating&&d.firstRun))return t=parseInt(t,10),!(!(o=(d.current||d).opts.loop)&&(t<0||u<=t))&&(e=d.firstRun=!Object.keys(d.slides).length,i=d.current,d.prevIndex=d.currIndex,d.prevPos=d.currPos,a=d.createSlide(t),1<u&&((o||a.index<u-1)&&d.createSlide(t+1),(o||0<a.index)&&d.createSlide(t-1)),d.current=a,d.currIndex=a.index,d.currPos=a.pos,d.trigger("beforeShow",e),d.updateControls(),a.forcedDuration=m,f.isNumeric(n)?a.forcedDuration=n:n=a.opts[e?"animationDuration":"transitionDuration"],n=parseInt(n,10),t=d.isMoved(a),a.$slide.addClass("modula-fancybox-slide--current"),e?(a.opts.animationEffect&&n&&d.$refs.container.css("transition-duration",n+"ms"),d.$refs.container.addClass("modula-fancybox-is-open").trigger("focus"),d.loadSlide(a)):(s=f.modulaFancybox.getTranslate(i.$slide),r=f.modulaFancybox.getTranslate(d.$refs.stage),f.each(d.slides,function(t,e){f.modulaFancybox.stop(e.$slide,!0)}),i.pos!==a.pos&&(i.isComplete=!1),i.$slide.removeClass("modula-fancybox-slide--complete modula-fancybox-slide--current"),t?(c=s.left-(i.pos*s.width+i.pos*i.opts.gutter),f.each(d.slides,function(t,e){e.$slide.removeClass("modula-fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)modula-fancybox-fx-\S+/g)||[]).join(" ")});var o=e.pos*s.width+e.pos*e.opts.gutter;f.modulaFancybox.setTranslate(e.$slide,{top:0,left:o-r.left+c}),e.pos!==a.pos&&e.$slide.addClass("modula-fancybox-slide--"+(e.pos>a.pos?"next":"previous")),p(e.$slide),f.modulaFancybox.animate(e.$slide,{top:0,left:(e.pos-a.pos)*s.width+(e.pos-a.pos)*e.opts.gutter},n,function(){e.$slide.css({transform:"",opacity:""}).removeClass("modula-fancybox-slide--next modula-fancybox-slide--previous"),e.pos===d.currPos&&d.complete()})})):n&&a.opts.transitionEffect&&(l="modula-fancybox-animated modula-fancybox-fx-"+a.opts.transitionEffect,i.$slide.addClass("modula-fancybox-slide--"+(i.pos>a.pos?"next":"previous")),f.modulaFancybox.animate(i.$slide,l,n,function(){i.$slide.removeClass(l).removeClass("modula-fancybox-slide--next modula-fancybox-slide--previous")},!1)),a.isLoaded?d.revealContent(a):d.loadSlide(a)),void d.preload("image"))},createSlide:function(t){var e,o=this,n=t%o.group.length;return n=n<0?o.group.length+n:n,!o.slides[t]&&o.group[n]&&(e=f('<div class="modula-fancybox-slide"></div>').appendTo(o.$refs.stage),o.slides[t]=f.extend(!0,{},o.group[n],{pos:t,$slide:e,isLoaded:!1}),o.updateSlide(o.slides[t])),o.slides[t]},scaleToActual:function(t,e,o){var n,a,i,s,r=this,l=r.current,c=l.$content,d=f.modulaFancybox.getTranslate(l.$slide).width,u=f.modulaFancybox.getTranslate(l.$slide).height,p=l.width,h=l.height;r.isAnimating||r.isMoved()||!c||"image"!=l.type||!l.isLoaded||l.hasError||(r.isAnimating=!0,f.modulaFancybox.stop(c),t=t===m?.5*d:t,e=e===m?.5*u:e,(n=f.modulaFancybox.getTranslate(c)).top-=f.modulaFancybox.getTranslate(l.$slide).top,n.left-=f.modulaFancybox.getTranslate(l.$slide).left,i=p/n.width,s=h/n.height,a=.5*d-.5*p,l=.5*u-.5*h,d<p&&(0<(a=n.left*i-(t*i-t))&&(a=0),a<d-p&&(a=d-p)),u<h&&(0<(l=n.top*s-(e*s-e))&&(l=0),l<u-h&&(l=u-h)),r.updateCursor(p,h),f.modulaFancybox.animate(c,{top:l,left:a,scaleX:i,scaleY:s},o||366,function(){r.isAnimating=!1}),r.SlideShow&&r.SlideShow.isActive&&r.SlideShow.stop())},scaleToFit:function(t){var e=this,o=e.current,n=o.$content;e.isAnimating||e.isMoved()||!n||"image"!=o.type||!o.isLoaded||o.hasError||(e.isAnimating=!0,f.modulaFancybox.stop(n),o=e.getFitPos(o),e.updateCursor(o.width,o.height),f.modulaFancybox.animate(n,{top:o.top,left:o.left,scaleX:o.width/n.width(),scaleY:o.height/n.height()},t||366,function(){e.isAnimating=!1}))},getFitPos:function(t){var e,o,n=t.$content,a=t.$slide,i=t.width||t.opts.width,s=t.height||t.opts.height,r={};return!!(t.isLoaded&&n&&n.length)&&(e=f.modulaFancybox.getTranslate(this.$refs.stage).width,o=f.modulaFancybox.getTranslate(this.$refs.stage).height,e-=parseFloat(a.css("paddingLeft"))+parseFloat(a.css("paddingRight"))+parseFloat(n.css("marginLeft"))+parseFloat(n.css("marginRight")),o-=parseFloat(a.css("paddingTop"))+parseFloat(a.css("paddingBottom"))+parseFloat(n.css("marginTop"))+parseFloat(n.css("marginBottom")),i&&s||(i=e,s=o),e-.5<(i*=n=Math.min(1,e/i,o/s))&&(i=e),o-.5<(s*=n)&&(s=o),"image"===t.type?(r.top=Math.floor(.5*(o-s))+parseFloat(a.css("paddingTop")),r.left=Math.floor(.5*(e-i))+parseFloat(a.css("paddingLeft"))):"video"===t.contentType&&(i/(t=t.opts.width&&t.opts.height?i/s:t.opts.ratio||16/9)<s?s=i/t:s*t<i&&(i=s*t)),r.width=i,r.height=s,r)},update:function(o){var n=this;f.each(n.slides,function(t,e){n.updateSlide(e,o)})},updateSlide:function(t,e){var o=this,n=t&&t.$content,a=t.width||t.opts.width,i=t.height||t.opts.height,s=t.$slide;o.adjustCaption(t),n&&(a||i||"video"===t.contentType)&&!t.hasError&&(f.modulaFancybox.stop(n),f.modulaFancybox.setTranslate(n,o.getFitPos(t)),t.pos===o.currPos&&(o.isAnimating=!1,o.updateCursor())),o.adjustLayout(t),s.length&&(s.trigger("refresh"),t.pos===o.currPos&&o.$refs.toolbar.add(o.$refs.navigation.find(".modula-fancybox-button--arrow_right")).toggleClass("compensate-for-scrollbar",s.get(0).scrollHeight>s.get(0).clientHeight)),o.trigger("onUpdate",t,e)},centerSlide:function(t){var e=this,o=e.current,n=o.$slide;!e.isClosing&&o&&(n.siblings().css({transform:"",opacity:""}),n.parent().children().removeClass("modula-fancybox-slide--previous modula-fancybox-slide--next"),f.modulaFancybox.animate(n,{top:0,left:0,opacity:1},t===m?0:t,function(){n.css({transform:"",opacity:""}),o.isComplete||e.complete()},!1))},isMoved:function(t){var e,o=t||this.current;return!!o&&(e=f.modulaFancybox.getTranslate(this.$refs.stage),t=f.modulaFancybox.getTranslate(o.$slide),!o.$slide.hasClass("modula-fancybox-animated")&&(.5<Math.abs(t.top-e.top)||.5<Math.abs(t.left-e.left)))},updateCursor:function(t,e){var o=this,n=o.current,a=o.$refs.container;n&&!o.isClosing&&o.Guestures&&(a.removeClass("modula-fancybox-is-zoomable modula-fancybox-can-zoomIn modula-fancybox-can-zoomOut modula-fancybox-can-swipe modula-fancybox-can-pan"),e=!!(t=o.canPan(t,e))||o.isZoomable(),a.toggleClass("modula-fancybox-is-zoomable",e),f("[data-fancybox-zoom]").prop("disabled",!e),t?a.addClass("modula-fancybox-can-pan"):e&&("zoom"===n.opts.clickContent||f.isFunction(n.opts.clickContent)&&"zoom"==n.opts.clickContent(n))?a.addClass("modula-fancybox-can-zoomIn"):n.opts.touch&&(n.opts.touch.vertical||1<o.group.length)&&"video"!==n.contentType&&a.addClass("modula-fancybox-can-swipe"))},isZoomable:function(){var t,e=this.current;if(e&&!this.isClosing&&"image"===e.type&&!e.hasError){if(!e.isLoaded)return!0;if((t=this.getFitPos(e))&&(e.width>t.width||e.height>t.height))return!0}return!1},isScaledDown:function(t,e){var o=!1,n=this.current,a=n.$content;return t!==m&&e!==m?o=t<n.width&&e<n.height:a&&(o=(o=f.modulaFancybox.getTranslate(a)).width<n.width&&o.height<n.height),o},canPan:function(t,e){var o=this.current,n=null,a=!1;return"image"===o.type&&(o.isComplete||t&&e)&&!o.hasError&&(a=this.getFitPos(o),t!==m&&e!==m?n={width:t,height:e}:o.isComplete&&(n=f.modulaFancybox.getTranslate(o.$content)),n&&a&&(a=1.5<Math.abs(n.width-a.width)||1.5<Math.abs(n.height-a.height))),a},loadSlide:function(o){var t,e,n,a=this;if(!o.isLoading&&!o.isLoaded){if(!(o.isLoading=!0)===a.trigger("beforeLoad",o))return o.isLoading=!1;switch(t=o.type,(e=o.$slide).off("refresh").trigger("onReset").addClass(o.opts.slideClass),t){case"image":a.setImage(o);break;case"iframe":a.setIframe(o);break;case"html":a.setContent(o,o.src||o.content);break;case"video":a.setContent(o,o.opts.video.tpl.replace(/\{\{src\}\}/gi,o.src).replace("{{format}}",o.opts.videoFormat||o.opts.video.format||"").replace("{{poster}}",o.thumb||""));break;case"inline":f(o.src).length?a.setContent(o,f(o.src)):a.setError(o);break;case"ajax":a.showLoading(o),n=f.ajax(f.extend({},o.opts.ajax.settings,{url:o.src,success:function(t,e){"success"===e&&a.setContent(o,t)},error:function(t,e){t&&"abort"!==e&&a.setError(o)}})),e.one("onReset",function(){n.abort()});break;default:a.setError(o)}return!0}},setImage:function(e){var t,o=this;setTimeout(function(){var t=e.$image;o.isClosing||!e.isLoading||t&&t.length&&t[0].complete||e.hasError||o.showLoading(e)},50),o.checkSrcset(e),e.$content=f('<div class="modula-fancybox-content"></div>').addClass("modula-fancybox-is-hidden").appendTo(e.$slide.addClass("modula-fancybox-slide--image")),!1!==e.opts.preload&&e.opts.width&&e.opts.height&&e.thumb&&(e.width=e.opts.width,e.height=e.opts.height,(t=s.createElement("img")).onerror=function(){f(this).remove(),e.$ghost=null},t.onload=function(){o.afterLoad(e)},e.$ghost=f(t).addClass("modula-fancybox-image").appendTo(e.$content).attr("src",e.thumb),"undifined"!=typeof e.src&&e.$ghost.attr("alt",e.alt)),o.setBigImage(e)},checkSrcset:function(t){var e,o,n,a,i=t.opts.srcset||t.opts.image.srcset;if(i){n=l.devicePixelRatio||1,a=l.innerWidth*n,(o=i.split(",").map(function(t){var n={};return t.trim().split(/\s+/).forEach(function(t,e){var o=parseInt(t.substring(0,t.length-1),10);if(0===e)return n.url=t;o&&(n.value=o,n.postfix=t[t.length-1])}),n})).sort(function(t,e){return t.value-e.value});for(var s=0;s<o.length;s++){var r=o[s];if("w"===r.postfix&&r.value>=a||"x"===r.postfix&&r.value>=n){e=r;break}}!e&&o.length&&(e=o[o.length-1]),e&&(t.src=e.url,t.width&&t.height&&"w"==e.postfix&&(t.height=t.width/t.height*e.value,t.width=e.value),t.opts.srcset=i)}},setBigImage:function(e){var o=this,t=s.createElement("img"),n=f(t);e.$image=n.one("error",function(){o.setError(e)}).one("load",function(){var t;e.$ghost||(o.resolveImageSlideSize(e,this.naturalWidth,this.naturalHeight),o.afterLoad(e)),o.isClosing||(e.opts.srcset&&((t=e.opts.sizes)&&"auto"!==t||(t=(1<e.width/e.height&&1<a.width()/a.height()?"100":Math.round(e.width/e.height*100))+"vw"),n.attr("sizes",t).attr("srcset",e.opts.srcset)),e.opts.alt&&n.attr("alt",e.opts.alt),e.opts.image_id&&n.attr("image-id",e.opts.image_id),e.$thumb&&n.attr("title",e.$thumb.find("img.pic").attr("title")),e.$ghost&&setTimeout(function(){e.$ghost&&!o.isClosing&&e.$ghost.hide()},Math.min(300,Math.max(1e3,e.height/1600))),o.hideLoading(e))}).addClass("modula-fancybox-image").attr("src",e.src).appendTo(e.$content),(t.complete||"complete"==t.readyState)&&n.naturalWidth&&n.naturalHeight?n.trigger("load"):t.error&&n.trigger("error")},resolveImageSlideSize:function(t,e,o){var n=parseInt(t.opts.width,10),a=parseInt(t.opts.height,10);t.width=e,t.height=o,0<n&&(t.width=n,t.height=Math.floor(n*o/e)),0<a&&(t.width=Math.floor(a*e/o),t.height=a)},setIframe:function(a){var i,e=this,s=a.opts.iframe,r=a.$slide;a.$content=f('<div class="modula-fancybox-content'+(s.preload?" modula-fancybox-is-hidden":"")+'"></div>').css(s.css).appendTo(r),r.addClass("modula-fancybox-slide--"+a.contentType),a.$iframe=i=f(s.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr(s.attr).appendTo(a.$content),s.preload?(e.showLoading(a),i.on("load.fb error.fb",function(t){this.isReady=1,a.$slide.trigger("refresh"),e.afterLoad(a)}),r.on("refresh.fb",function(){var t,e=a.$content,o=s.css.width,n=s.css.height;if(1===i[0].isReady){try{t=i.contents().find("body")}catch(t){}t&&t.length&&t.children().length&&(r.css("overflow","visible"),e.css({width:"100%","max-width":"100%",height:"9999px"}),o===m&&(o=Math.ceil(Math.max(t[0].clientWidth,t.outerWidth(!0)))),e.css("width",o||"").css("max-width",""),n===m&&(n=Math.ceil(Math.max(t[0].clientHeight,t.outerHeight(!0)))),e.css("height",n||""),r.css("overflow","auto")),e.removeClass("modula-fancybox-is-hidden")}})):e.afterLoad(a),i.attr("src",a.src),r.one("onReset",function(){try{f(this).find("iframe").hide().unbind().attr("src","//about:blank")}catch(t){}f(this).off("refresh.fb").empty(),a.isLoaded=!1,a.isRevealed=!1})},setContent:function(t,e){var o;this.isClosing||(this.hideLoading(t),t.$content&&f.modulaFancybox.stop(t.$content),t.$slide.empty(),(o=e)&&o.hasOwnProperty&&o instanceof f&&e.parent().length?((e.hasClass("modula-fancybox-content")||e.parent().hasClass("modula-fancybox-content"))&&e.parents(".modula-fancybox-slide").trigger("onReset"),t.$placeholder=f("<div>").hide().insertAfter(e),e.css("display","inline-block")):t.hasError||("string"===f.type(e)&&(e=f("<div>").append(f.trim(e)).contents()),t.opts.filter&&(e=f("<div>").html(e).find(t.opts.filter))),t.$slide.one("onReset",function(){f(this).find("video,audio").trigger("pause"),t.$placeholder&&(t.$placeholder.after(e.removeClass("modula-fancybox-content").hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(f(this).empty(),t.isLoaded=!1,t.isRevealed=!1)}),f(e).appendTo(t.$slide),f(e).is("video,audio")&&(f(e).addClass("modula-fancybox-video"),f(e).wrap("<div></div>"),t.contentType="video",t.opts.width=t.opts.width||f(e).attr("width"),t.opts.height=t.opts.height||f(e).attr("height")),t.$content=t.$slide.children().filter("div,form,main,video,audio,article,.modula-fancybox-content").first(),t.$content.siblings().hide(),t.$content.length||(t.$content=t.$slide.wrapInner("<div></div>").children().first()),t.$content.addClass("modula-fancybox-content"),t.$slide.addClass("modula-fancybox-slide--"+t.contentType),this.afterLoad(t))},setError:function(t){t.hasError=!0,t.$slide.trigger("onReset").removeClass("modula-fancybox-slide--"+t.contentType).addClass("modula-fancybox-slide--error"),t.contentType="html",this.setContent(t,this.translate(t,t.opts.errorTpl)),t.pos===this.currPos&&(this.isAnimating=!1)},showLoading:function(t){(t=t||this.current)&&!t.$spinner&&(t.$spinner=f(this.translate(this,this.opts.spinnerTpl)).appendTo(t.$slide).hide().fadeIn("fast"))},hideLoading:function(t){(t=t||this.current)&&t.$spinner&&(t.$spinner.stop().remove(),delete t.$spinner)},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger("afterLoad",t),e.hideLoading(t),!t.opts.smallBtn||t.$smallBtn&&t.$smallBtn.length||(t.$smallBtn=f(e.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content)),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on("contextmenu.fb",function(t){return 2==t.button&&t.preventDefault(),!0}),"image"===t.type&&f('<div class="modula-fancybox-spaceball"></div>').appendTo(t.$content)),e.adjustCaption(t),e.adjustLayout(t),t.pos===e.currPos&&e.updateCursor(),e.revealContent(t))},adjustCaption:function(t){var e=this,o=t||e.current,n=o.opts.caption,a=o.opts.preventCaptionOverlap,i=e.$refs.caption,t=!1;i.toggleClass("modula-fancybox-caption--separate",a),a&&n&&n.length&&(o.pos!==e.currPos?((i=i.clone().appendTo(i.parent())).children().eq(0).empty().html(n),t=i.outerHeight(!0),i.empty().remove()):e.$caption&&(t=e.$caption.outerHeight(!0)),o.$slide.css("padding-bottom",t||""))},adjustLayout:function(t){var e,o,n,a=t||this.current;a.isLoaded&&!0!==a.opts.disableLayoutFix&&(a.$content.css("margin-bottom",""),a.$content.outerHeight()>a.$slide.height()+.5&&(o=a.$slide[0].style["padding-bottom"],n=a.$slide.css("padding-bottom"),0<parseFloat(n)&&(t=a.$slide[0].scrollHeight,a.$slide.css("padding-bottom",0),Math.abs(t-a.$slide[0].scrollHeight)<1&&(e=n),a.$slide.css("padding-bottom",o))),a.$content.css("margin-bottom",e))},revealContent:function(t){var e,o,n,a,i=this,s=t.$slide,r=!1,l=!1,c=i.isMoved(t),d=t.isRevealed;return t.isRevealed=!0,e=t.opts[i.firstRun?"animationEffect":"transitionEffect"],n=t.opts[i.firstRun?"animationDuration":"transitionDuration"],n=parseInt(t.forcedDuration===m?n:t.forcedDuration,10),!c&&t.pos===i.currPos&&n||(e=!1),"zoom"===e&&(t.pos===i.currPos&&n&&"image"===t.type&&!t.hasError&&(l=i.getThumbPos(t))?r=i.getFitPos(t):e="fade"),"zoom"===e?(i.isAnimating=!0,r.scaleX=r.width/l.width,r.scaleY=r.height/l.height,"auto"==(a=t.opts.zoomOpacity)&&(a=.1<Math.abs(t.width/t.height-l.width/l.height)),a&&(l.opacity=.1,r.opacity=1),f.modulaFancybox.setTranslate(t.$content.removeClass("modula-fancybox-is-hidden"),l),p(t.$content),void f.modulaFancybox.animate(t.$content,r,n,function(){i.isAnimating=!1,i.complete()})):(i.updateSlide(t),e?(f.modulaFancybox.stop(s),o="modula-fancybox-slide--"+(t.pos>=i.prevPos?"next":"previous")+" modula-fancybox-animated modula-fancybox-fx-"+e,s.addClass(o).removeClass("modula-fancybox-slide--current"),t.$content.removeClass("modula-fancybox-is-hidden"),p(s),"image"!==t.type&&t.$content.hide().show(0),void f.modulaFancybox.animate(s,"modula-fancybox-slide--current",n,function(){s.removeClass(o).css({transform:"",opacity:""}),t.pos===i.currPos&&i.complete()},!0)):(t.$content.removeClass("modula-fancybox-is-hidden"),d||!c||"image"!==t.type||t.hasError||t.$content.hide().fadeIn("fast"),void(t.pos===i.currPos&&i.complete())))},getThumbPos:function(t){var e,o,n,a,i=t.$thumb;return!!(i&&(a=(n=i).find("a.tile-inner")[0])&&a.ownerDocument===s&&(f(".modula-fancybox-container").css("pointer-events","none"),n={x:a.getBoundingClientRect().left+a.offsetWidth/2,y:a.getBoundingClientRect().top+a.offsetHeight/2},a=s.elementFromPoint(n.x,n.y)===a,f(".modula-fancybox-container").css("pointer-events",""),a))&&(o=f.modulaFancybox.getTranslate(i),t=parseFloat(i.css("border-top-width")||0),n=parseFloat(i.css("border-right-width")||0),a=parseFloat(i.css("border-bottom-width")||0),i=parseFloat(i.css("border-left-width")||0),e={top:o.top+t,left:o.left+i,width:o.width-n-i,height:o.height-t-a,scaleX:1,scaleY:1},0<o.width&&0<o.height&&e)},complete:function(){var t,o=this,e=o.current,n={};!o.isMoved()&&e.isLoaded&&(e.isComplete||(e.isComplete=!0,e.$slide.siblings().trigger("onReset"),o.preload("inline"),p(e.$slide),e.$slide.addClass("modula-fancybox-slide--complete"),f.each(o.slides,function(t,e){e.pos>=o.currPos-1&&e.pos<=o.currPos+1?n[e.pos]=e:e&&(f.modulaFancybox.stop(e.$slide),e.$slide.off().remove())}),o.slides=n),o.isAnimating=!1,o.updateCursor(),o.trigger("afterShow"),e.opts.video.autoStart&&e.$slide.find("video,audio").filter(":visible:first").trigger("play").one("ended",function(){Document.exitFullscreen?Document.exitFullscreen():this.webkitExitFullscreen&&this.webkitExitFullscreen(),o.next()}),e.opts.autoFocus&&"html"===e.contentType&&((t=e.$content.find("input[autofocus]:enabled:visible:first")).length?t.trigger("focus"):o.focus(null,!0)),e.$slide.scrollTop(0).scrollLeft(0))},preload:function(t){var e,o,n=this;n.group.length<2||(o=n.slides[n.currPos+1],(e=n.slides[n.currPos-1])&&e.type===t&&n.loadSlide(e),o&&o.type===t&&n.loadSlide(o))},focus:function(t,e){var o=this,n=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"])'].join(",");o.isClosing||((e=(e=!t&&o.current&&o.current.isComplete?o.current.$slide.find("*:visible"+(e?":not(.modula-fancybox-close-small)":"")):o.$refs.container.find("*:visible")).filter(n).filter(function(){return"hidden"!==f(this).css("visibility")&&!f(this).hasClass("disabled")})).length?(n=e.index(s.activeElement),t&&t.shiftKey?(n<0||0==n)&&(t.preventDefault(),e.eq(e.length-1).trigger("focus")):(n<0||n==e.length-1)&&(t&&t.preventDefault(),e.eq(0).trigger("focus"))):o.$refs.container.trigger("focus"))},activate:function(){var e=this;f(".modula-fancybox-container").each(function(){var t=f(this).data("modulaFancyBox");t&&t.id!==e.id&&!t.isClosing&&(t.trigger("onDeactivate"),t.removeEvents(),t.isVisible=!1)}),e.isVisible=!0,(e.current||e.isIdle)&&(e.update(),e.updateControls()),e.trigger("onActivate"),e.addEvents()},close:function(t,e){function o(){l.cleanUp(t)}var n,a,i,s,r,l=this,c=l.current;return!l.isClosing&&(!(l.isClosing=!0)===l.trigger("beforeClose",t)?(l.isClosing=!1,d(function(){l.update()}),!1):(l.removeEvents(),i=c.$content,n=c.opts.animationEffect,a=f.isNumeric(e)?e:n?c.opts.animationDuration:0,c.$slide.removeClass("modula-fancybox-slide--complete modula-fancybox-slide--next modula-fancybox-slide--previous modula-fancybox-animated"),!0!==t?f.modulaFancybox.stop(c.$slide):n=!1,c.$slide.siblings().trigger("onReset").remove(),a&&l.$refs.container.removeClass("modula-fancybox-is-open").addClass("modula-fancybox-is-closing").css("transition-duration",a+"ms"),l.hideLoading(c),l.hideControls(!0),l.updateCursor(),"zoom"!==n||i&&a&&"image"===c.type&&!l.isMoved()&&!c.hasError&&(r=l.getThumbPos(c))||(n="fade"),"zoom"===n?(f.modulaFancybox.stop(i),e={top:(s=f.modulaFancybox.getTranslate(i)).top,left:s.left,scaleX:s.width/r.width,scaleY:s.height/r.height,width:r.width,height:r.height},"auto"==(s=c.opts.zoomOpacity)&&(s=.1<Math.abs(c.width/c.height-r.width/r.height)),s&&(r.opacity=0),f.modulaFancybox.setTranslate(i,e),p(i),f.modulaFancybox.animate(i,r,a,o)):n&&a?f.modulaFancybox.animate(c.$slide.addClass("modula-fancybox-slide--previous").removeClass("modula-fancybox-slide--current"),"modula-fancybox-animated modula-fancybox-fx-"+n,a,o):!0===t?setTimeout(o,a):o(),!0))},cleanUp:function(t){var e,o=this,n=o.current.opts.$orig;o.current.$slide.trigger("onReset"),o.$refs.container.empty().remove(),o.trigger("afterClose",t),o.current.opts.backFocus&&(n&&n.length&&n.is(":visible")||(n=o.$trigger),n&&n.length&&(e=l.scrollX,t=l.scrollY,n.trigger("focus"),f("html, body").scrollTop(t).scrollLeft(e))),o.current=null,(o=f.modulaFancybox.getInstance())?o.activate():(f("body").removeClass("modula-fancybox-active compensate-for-scrollbar"),f("#modula-fancybox-style-noscroll").remove())},trigger:function(t,e){var o,n=Array.prototype.slice.call(arguments,1),a=this,e=e&&e.opts?e:a.current;if(e?n.unshift(e):e=a,n.unshift(a),f.isFunction(e.opts[t])&&(o=e.opts[t].apply(e,n)),!1===o)return o;("afterClose"!==t&&a.$refs?a.$refs.container:i).trigger(t+".fb",n)},updateControls:function(){var t=this,e=t.current,o=e.index,n=t.$refs.container,a=t.$refs.caption,i=e.opts.caption;e.$slide.trigger("refresh"),i&&i.length?(t.$caption=a).children().eq(0).html(i):t.$caption=null,t.hasHiddenControls||t.isIdle||t.showControls(),n.find("[data-fancybox-count]").html(t.group.length),n.find("[data-fancybox-index]").html(o+1),n.find("[data-fancybox-prev]").prop("disabled",!e.opts.loop&&o<=0),n.find("[data-fancybox-next]").prop("disabled",!e.opts.loop&&o>=t.group.length-1),"image"===e.type?n.find("[data-fancybox-zoom]").show().end().find("[data-fancybox-download]").attr("href",e.opts.image.src||e.src).show():e.opts.toolbar&&n.find("[data-fancybox-download],[data-fancybox-zoom]").hide(),f(s.activeElement).is(":hidden,[disabled]")&&t.$refs.container.trigger("focus")},hideControls:function(t){var e=["infobar","toolbar","nav"];!t&&this.current.opts.preventCaptionOverlap||e.push("caption"),this.$refs.container.removeClass(e.map(function(t){return"modula-fancybox-show-"+t}).join(" ")),this.hasHiddenControls=!0},showControls:function(){var t=this,e=(t.current||t).opts,o=t.$refs.container;t.hasHiddenControls=!1,t.idleSecondsCounter=0,o.toggleClass("modula-fancybox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("modula-fancybox-show-infobar",!!(e.infobar&&1<t.group.length)).toggleClass("modula-fancybox-show-caption",!!t.$caption).toggleClass("modula-fancybox-show-nav",!!(e.arrows&&1<t.group.length)).toggleClass("modula-fancybox-is-modal",!!e.modal)},toggleControls:function(){this.hasHiddenControls?this.showControls():this.hideControls()}}),f.modulaFancybox={version:"3.5.7",defaults:t,getInstance:function(t){var e=f('.modula-fancybox-container:not(".modula-fancybox-is-closing"):last').data("modulaFancyBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof n&&("string"===f.type(t)?e[t].apply(e,o):"function"===f.type(t)&&t.apply(e,o),e)},open:function(t,e,o){return new n(t,e,o)},close:function(t){var e=this.getInstance();e&&(e.close(),!0===t&&this.close(t))},destroy:function(){this.close(!0),i.add("body").off("click.fb-start","**")},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:(t=s.createElement("div"),l.getComputedStyle&&l.getComputedStyle(t)&&l.getComputedStyle(t).getPropertyValue("transform")&&!(s.documentMode&&s.documentMode<11)),getTranslate:function(t){var e;return!(!t||!t.length)&&{top:(e=t[0].getBoundingClientRect()).top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css("opacity"))}},setTranslate:function(t,e){var o="",n={};if(t&&e)return e.left===m&&e.top===m||(o=(e.left===m?t.position():e).left+"px, "+(e.top===m?t.position():e).top+"px",o=this.use3d?"translate3d("+o+", 0px)":"translate("+o+")"),e.scaleX!==m&&e.scaleY!==m?o+=" scale("+e.scaleX+", "+e.scaleY+")":e.scaleX!==m&&(o+=" scaleX("+e.scaleX+")"),o.length&&(n.transform=o),e.opacity!==m&&(n.opacity=e.opacity),e.width!==m&&(n.width=e.width),e.height!==m&&(n.height=e.height),t.css(n)},animate:function(e,o,n,a,i){var s,r=this;f.isFunction(n)&&(a=n,n=null),r.stop(e),s=r.getTranslate(e),e.on(c,function(t){t&&t.originalEvent&&(!e.is(t.originalEvent.target)||"z-index"==t.originalEvent.propertyName)||(r.stop(e),f.isNumeric(n)&&e.css("transition-duration",""),f.isPlainObject(o)?o.scaleX!==m&&o.scaleY!==m&&r.setTranslate(e,{top:o.top,left:o.left,width:s.width*o.scaleX,height:s.height*o.scaleY,scaleX:1,scaleY:1}):!0!==i&&e.removeClass(o),f.isFunction(a)&&a(t))}),f.isNumeric(n)&&e.css("transition-duration",n+"ms"),f.isPlainObject(o)?(o.scaleX!==m&&o.scaleY!==m&&(delete o.width,delete o.height,e.parent().hasClass("modula-fancybox-slide--image")&&e.parent().addClass("modula-fancybox-is-scaling")),f.modulaFancybox.setTranslate(e,o)):e.addClass(o),e.data("timer",setTimeout(function(){e.trigger(c)},n+33))},stop:function(t,e){t&&t.length&&(clearTimeout(t.data("timer")),e&&t.trigger(c),t.off(c).css("transition-duration",""),t.parent().removeClass("modula-fancybox-is-scaling"))}},f.fn.modulaFancybox=function(t){var e;return(e=(t=t||{}).selector||!1)?f("body").off("click.fb-start",e).on("click.fb-start",e,{options:t},b):this.off("click.fb-start").on("click.fb-start",{items:this,options:t},b),this},i.on("click.fb-start","[data-fancybox]",b),i.on("click.fb-start","[data-fancybox-trigger]",function(t){f('[data-fancybox="'+f(this).attr("data-fancybox-trigger")+'"]').eq(f(this).attr("data-fancybox-index")||0).trigger("click.fb-start",{$trigger:f(this)})}),o=".modula-fancybox-button",h="modula-fancybox-focus",g=null,i.on("mousedown mouseup focus blur",o,function(t){switch(t.type){case"mousedown":g=f(this);break;case"mouseup":g=null;break;case"focusin":f(o).removeClass(h),f(this).is(g)||f(this).is("[disabled]")||f(this).addClass(h);break;case"focusout":f(o).removeClass(h)}})))}(window,document,jQuery),function(h){"use strict";function f(o,t,e){if(o)return e=e||"","object"===h.type(e)&&(e=h.param(e,!0)),h.each(t,function(t,e){o=o.replace("$"+t,e||"")}),e.length&&(o+=(0<o.indexOf("?")?"&":"?")+e),o}var n={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"https://www.youtube-nocookie.com/embed/$4",thumb:"https://img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12]+"").replace(/\?/,"&")+"&output="+(t[12]&&0<t[12].indexOf("layer=c")?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}};h(document).on("objectNeedsType.fb",function(t,e,a){var i,s,r,l,c,d,u=a.src||"",p=!1,o=h.extend(!0,{},n,a.opts.media);h.each(o,function(t,e){if(s=u.match(e.matcher)){if(p=e.type,d=t,c={},e.paramPlace&&s[e.paramPlace]){"?"==(l=s[e.paramPlace])[0]&&(l=l.substring(1)),l=l.split("&");for(var o=0;o<l.length;++o){var n=l[o].split("=",2);2==n.length&&(c[n[0]]=decodeURIComponent(n[1].replace(/\+/g," ")))}}return r=h.extend(!0,{},e.params,a.opts[t],c),u="function"===h.type(e.url)?e.url.call(this,s,r,a):f(e.url,s,r),i="function"===h.type(e.thumb)?e.thumb.call(this,s,r,a):f(e.thumb,s),"youtube"===t?u=u.replace(/&t=(\d+)/,function(t,e){return"&start="+e}):"vimeo"===t&&(u=u.replace("&%23","#")),!1}}),p?(a.opts.thumb||a.opts.$thumb&&a.opts.$thumb.length||(a.opts.thumb=i),"iframe"===p&&(a.opts=h.extend(!0,a.opts,{iframe:{preload:!1,attr:{scrolling:"no"}}})),h.extend(a,{type:p,src:u,origSrc:a.src,contentSource:d,contentType:"image"===p?"image":"gmap_place"==d||"gmap_search"==d?"map":"video"})):u&&(a.type=a.opts.defaultType)});var a={youtube:{src:"https://www.youtube.com/iframe_api",class:"YT",loading:!1,loaded:!1},vimeo:{src:"https://player.vimeo.com/api/player.js",class:"Vimeo",loading:!1,loaded:!1},load:function(t){var e,o=this;this[t].loaded?setTimeout(function(){o.done(t)}):this[t].loading||(this[t].loading=!0,(e=document.createElement("script")).type="text/javascript",e.src=this[t].src,"youtube"===t?window.onYouTubeIframeAPIReady=function(){o[t].loaded=!0,o.done(t)}:e.onload=function(){o[t].loaded=!0,o.done(t)},document.body.appendChild(e))},done:function(t){var e,o;"youtube"===t&&delete window.onYouTubeIframeAPIReady,(e=h.modulaFancybox.getInstance())&&(o=e.current.$content.find("iframe"),"youtube"===t&&void 0!==YT&&YT?new YT.Player(o.attr("id"),{events:{onStateChange:function(t){0==t.data&&e.next()}}}):"vimeo"===t&&void 0!==Vimeo&&Vimeo&&new Vimeo.Player(o).on("ended",function(){e.next()}))}};h(document).on({"afterShow.fb":function(t,e,o){1<e.group.length&&("youtube"===o.contentSource||"vimeo"===o.contentSource)&&a.load(o.contentSource)}})}(jQuery),function(d,l,u){"use strict";function p(t){var e,o=[];for(e in t=(t=t.originalEvent||t||d.e).touches&&t.touches.length?t.touches:t.changedTouches&&t.changedTouches.length?t.changedTouches:[t])t[e].pageX?o.push({x:t[e].pageX,y:t[e].pageY}):t[e].clientX&&o.push({x:t[e].clientX,y:t[e].clientY});return o}function h(t,e,o){return e&&t?"x"===o?t.x-e.x:"y"===o?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function c(t){if(t.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio,iframe')||u.isFunction(t.get(0).onclick)||t.data("selectable"))return 1;for(var e=0,o=t[0].attributes,n=o.length;e<n;e++)if("data-fancybox-"===o[e].nodeName.substr(0,14))return 1}function f(t){for(var e,o,n,a=!1;e=t.get(0),o=n=o=void 0,o=d.getComputedStyle(e)["overflow-y"],n=d.getComputedStyle(e)["overflow-x"],o=("scroll"===o||"auto"===o)&&e.scrollHeight>e.clientHeight,e=("scroll"===n||"auto"===n)&&e.scrollWidth>e.clientWidth,!(a=o||e)&&(t=t.parent()).length&&!t.hasClass("modula-fancybox-stage")&&!t.is("body"););return a}function o(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on("touchstart.fb.touch mousedown.fb.touch",u.proxy(e,"ontouchstart"))}var m=d.requestAnimationFrame||d.webkitRequestAnimationFrame||d.mozRequestAnimationFrame||d.oRequestAnimationFrame||function(t){return d.setTimeout(t,1e3/60)},g=d.cancelAnimationFrame||d.webkitCancelAnimationFrame||d.mozCancelAnimationFrame||d.oCancelAnimationFrame||function(t){d.clearTimeout(t)};o.prototype.destroy=function(){var t=this;t.$container.off(".fb.touch"),u(l).off(".fb.touch"),t.requestId&&(g(t.requestId),t.requestId=null),t.tapped&&(clearTimeout(t.tapped),t.tapped=null)},o.prototype.ontouchstart=function(t){var e=this,o=u(t.target),n=e.instance,a=n.current,i=a.$slide,s=a.$content,r="touchstart"==t.type;if(r&&e.$container.off("mousedown.fb.touch"),(!t.originalEvent||2!=t.originalEvent.button)&&i.length&&o.length&&!c(o)&&!c(o.parent())&&(o.is("img")||!(t.originalEvent.clientX>o[0].clientWidth+o.offset().left))){if(!a||n.isAnimating||a.$slide.hasClass("modula-fancybox-animated"))return t.stopPropagation(),void t.preventDefault();e.realPoints=e.startPoints=p(t),e.startPoints.length&&(a.touch&&t.stopPropagation(),e.startEvent=t,e.canTap=!0,e.$target=o,e.$content=s,e.opts=a.opts.touch,e.isPanning=!1,e.isSwiping=!1,e.isZooming=!1,e.isScrolling=!1,e.canPan=n.canPan(),e.startTime=(new Date).getTime(),e.distanceX=e.distanceY=e.distance=0,e.canvasWidth=Math.round(i[0].clientWidth),e.canvasHeight=Math.round(i[0].clientHeight),e.contentLastPos=null,e.contentStartPos=u.modulaFancybox.getTranslate(e.$content)||{top:0,left:0},e.sliderStartPos=u.modulaFancybox.getTranslate(i),e.stagePos=u.modulaFancybox.getTranslate(n.$refs.stage),e.sliderStartPos.top-=e.stagePos.top,e.sliderStartPos.left-=e.stagePos.left,e.contentStartPos.top-=e.stagePos.top,e.contentStartPos.left-=e.stagePos.left,u(l).off(".fb.touch").on(r?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",u.proxy(e,"ontouchend")).on(r?"touchmove.fb.touch":"mousemove.fb.touch",u.proxy(e,"ontouchmove")),u.modulaFancybox.isMobile&&l.addEventListener("scroll",e.onscroll,!0),((e.opts||e.canPan)&&(o.is(e.$stage)||e.$stage.find(o).length)||(o.is(".modula-fancybox-image")&&t.preventDefault(),u.modulaFancybox.isMobile&&o.parents(".modula-fancybox-caption").length))&&(e.isScrollable=f(o)||f(o.parent()),u.modulaFancybox.isMobile&&e.isScrollable||t.preventDefault(),1!==e.startPoints.length&&!a.hasError||(e.canPan?(u.modulaFancybox.stop(e.$content),e.isPanning=!0):e.isSwiping=!0,e.$container.addClass("modula-fancybox-is-grabbing")),2===e.startPoints.length&&"image"===a.type&&(a.isLoaded||a.$ghost)&&(e.canTap=!1,e.isSwiping=!1,e.isPanning=!1,e.isZooming=!0,u.modulaFancybox.stop(e.$content),e.centerPointStartX=.5*(e.startPoints[0].x+e.startPoints[1].x)-u(d).scrollLeft(),e.centerPointStartY=.5*(e.startPoints[0].y+e.startPoints[1].y)-u(d).scrollTop(),e.percentageOfImageAtPinchPointX=(e.centerPointStartX-e.contentStartPos.left)/e.contentStartPos.width,e.percentageOfImageAtPinchPointY=(e.centerPointStartY-e.contentStartPos.top)/e.contentStartPos.height,e.startDistanceBetweenFingers=h(e.startPoints[0],e.startPoints[1]))))}},o.prototype.onscroll=function(t){this.isScrolling=!0,l.removeEventListener("scroll",this.onscroll,!0)},o.prototype.ontouchmove=function(t){var e=this;void 0===t.originalEvent.buttons||0!==t.originalEvent.buttons?e.isScrolling?e.canTap=!1:(e.newPoints=p(t),(e.opts||e.canPan)&&e.newPoints.length&&e.newPoints.length&&(e.isSwiping&&!0===e.isSwiping||t.preventDefault(),e.distanceX=h(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=h(e.newPoints[0],e.startPoints[0],"y"),e.distance=h(e.newPoints[0],e.startPoints[0]),0<e.distance&&(e.isSwiping?e.onSwipe(t):e.isPanning?e.onPan():e.isZooming&&e.onZoom()))):e.ontouchend(t)},o.prototype.onSwipe=function(t){var a=this,i=a.instance,e=a.isSwiping,o=a.sliderStartPos.left||0;if(!0!==e)"x"==e&&(0<a.distanceX&&(a.instance.group.length<2||0===a.instance.current.index&&!a.instance.current.opts.loop)?o+=Math.pow(a.distanceX,.8):a.distanceX<0&&(a.instance.group.length<2||a.instance.current.index===a.instance.group.length-1&&!a.instance.current.opts.loop)?o-=Math.pow(-a.distanceX,.8):o+=a.distanceX),a.sliderLastPos={top:"x"==e?0:a.sliderStartPos.top+a.distanceY,left:o},a.requestId&&(g(a.requestId),a.requestId=null),a.requestId=m(function(){a.sliderLastPos&&(u.each(a.instance.slides,function(t,e){var o=e.pos-a.instance.currPos;u.modulaFancybox.setTranslate(e.$slide,{top:a.sliderLastPos.top,left:a.sliderLastPos.left+o*a.canvasWidth+o*e.opts.gutter})}),a.$container.addClass("modula-fancybox-is-sliding"))});else if(10<Math.abs(a.distance)){if(a.canTap=!1,i.group.length<2&&a.opts.vertical?a.isSwiping="y":i.isDragging||!1===a.opts.vertical||"auto"===a.opts.vertical&&800<u(d).width()?a.isSwiping="x":(o=Math.abs(180*Math.atan2(a.distanceY,a.distanceX)/Math.PI),a.isSwiping=45<o&&o<135?"y":"x"),"y"===a.isSwiping&&u.modulaFancybox.isMobile&&a.isScrollable)return void(a.isScrolling=!0);i.isDragging=a.isSwiping,a.startPoints=a.newPoints,u.each(i.slides,function(t,e){var o,n;u.modulaFancybox.stop(e.$slide),o=u.modulaFancybox.getTranslate(e.$slide),n=u.modulaFancybox.getTranslate(i.$refs.stage),e.$slide.css({transform:"",opacity:"","transition-duration":""}).removeClass("modula-fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)modula-fancybox-fx-\S+/g)||[]).join(" ")}),e.pos===i.current.pos&&(a.sliderStartPos.top=o.top-n.top,a.sliderStartPos.left=o.left-n.left),u.modulaFancybox.setTranslate(e.$slide,{top:o.top-n.top,left:o.left-n.left})}),i.SlideShow&&i.SlideShow.isActive&&i.SlideShow.stop()}},o.prototype.onPan=function(){var t=this;h(t.newPoints[0],t.realPoints[0])<(u.modulaFancybox.isMobile?10:5)?t.startPoints=t.newPoints:(t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&g(t.requestId),t.requestId=m(function(){u.modulaFancybox.setTranslate(t.$content,t.contentLastPos)}))},o.prototype.limitMovement=function(){var t=this,e=t.canvasWidth,o=t.canvasHeight,n=t.distanceX,a=t.distanceY,i=t.contentStartPos,s=i.left,r=i.top,l=i.width,c=i.height,d=e<l?s+n:s,u=r+a,t=Math.max(0,.5*e-.5*l),i=Math.max(0,.5*o-.5*c),l=Math.min(e-l,.5*e-.5*l),c=Math.min(o-c,.5*o-.5*c);return 0<n&&t<d&&(d=t-1+Math.pow(-t+s+n,.8)||0),n<0&&d<l&&(d=l+1-Math.pow(l-s-n,.8)||0),0<a&&i<u&&(u=i-1+Math.pow(-i+r+a,.8)||0),a<0&&u<c&&(u=c+1-Math.pow(c-r-a,.8)||0),{top:u,left:d}},o.prototype.limitPosition=function(t,e,o,n){var a=this.canvasWidth,i=this.canvasHeight;return t=a<o?(t=0<t?0:t)<a-o?a-o:t:Math.max(0,a/2-o/2),{top:e=i<n?(e=0<e?0:e)<i-n?i-n:e:Math.max(0,i/2-n/2),left:t}},o.prototype.onZoom=function(){var t=this,e=t.contentStartPos,o=e.width,n=e.height,a=e.left,i=e.top,s=h(t.newPoints[0],t.newPoints[1])/t.startDistanceBetweenFingers,r=Math.floor(o*s),l=Math.floor(n*s),c=(o-r)*t.percentageOfImageAtPinchPointX,e=(n-l)*t.percentageOfImageAtPinchPointY,o=(t.newPoints[0].x+t.newPoints[1].x)/2-u(d).scrollLeft(),n=(t.newPoints[0].y+t.newPoints[1].y)/2-u(d).scrollTop(),o=o-t.centerPointStartX,s={top:i+(e+(n-t.centerPointStartY)),left:a+(c+o),scaleX:s,scaleY:s};t.canTap=!1,t.newWidth=r,t.newHeight=l,t.contentLastPos=s,t.requestId&&g(t.requestId),t.requestId=m(function(){u.modulaFancybox.setTranslate(t.$content,t.contentLastPos)})},o.prototype.ontouchend=function(t){var e=this,o=e.isSwiping,n=e.isPanning,a=e.isZooming,i=e.isScrolling;if(e.endPoints=p(t),e.dMs=Math.max((new Date).getTime()-e.startTime,1),e.$container.removeClass("modula-fancybox-is-grabbing"),u(l).off(".fb.touch"),l.removeEventListener("scroll",e.onscroll,!0),e.requestId&&(g(e.requestId),e.requestId=null),e.isSwiping=!1,e.isPanning=!1,e.isZooming=!1,e.isScrolling=!1,e.instance.isDragging=!1,e.canTap)return e.onTap(t);e.speed=100,e.velocityX=e.distanceX/e.dMs*.5,e.velocityY=e.distanceY/e.dMs*.5,n?e.endPanning():a?e.endZooming():e.endSwiping(o,i)},o.prototype.endSwiping=function(t,e){var o=this,n=!1,a=o.instance.group.length,i=Math.abs(o.distanceX),i="x"==t&&1<a&&(130<o.dMs&&10<i||50<i);o.sliderLastPos=null,"y"==t&&!e&&50<Math.abs(o.distanceY)?(u.modulaFancybox.animate(o.instance.current.$slide,{top:o.sliderStartPos.top+o.distanceY+150*o.velocityY,opacity:0},200),n=o.instance.close(!0,250)):i&&0<o.distanceX?n=o.instance.previous(300):i&&o.distanceX<0&&(n=o.instance.next(300)),!1!==n||"x"!=t&&"y"!=t||o.instance.centerSlide(200),o.$container.removeClass("modula-fancybox-is-sliding")},o.prototype.endPanning=function(){var t,e,o=this;o.contentLastPos&&(e=!1===o.opts.momentum||350<o.dMs?(t=o.contentLastPos.left,o.contentLastPos.top):(t=o.contentLastPos.left+500*o.velocityX,o.contentLastPos.top+500*o.velocityY),(e=o.limitPosition(t,e,o.contentStartPos.width,o.contentStartPos.height)).width=o.contentStartPos.width,e.height=o.contentStartPos.height,u.modulaFancybox.animate(o.$content,e,366))},o.prototype.endZooming=function(){var t,e,o,n=this,a=n.instance.current,i=n.newWidth,s=n.newHeight;n.contentLastPos&&(t=n.contentLastPos.left,o={top:e=n.contentLastPos.top,left:t,width:i,height:s,scaleX:1,scaleY:1},u.modulaFancybox.setTranslate(n.$content,o),i<n.canvasWidth&&s<n.canvasHeight?n.instance.scaleToFit(150):i>a.width||s>a.height?n.instance.scaleToActual(n.centerPointStartX,n.centerPointStartY,150):(s=n.limitPosition(t,e,i,s),u.modulaFancybox.animate(n.$content,s,150)))},o.prototype.onTap=function(e){function t(t){if(t=s.opts[t],u.isFunction(t)&&(t=t.apply(i,[s,e])),t)switch(t){case"close":i.close(n.startEvent);break;case"toggleControls":i.toggleControls();break;case"next":i.next();break;case"nextOrClose":1<i.group.length?i.next():i.close(n.startEvent);break;case"zoom":"image"==s.type&&(s.isLoaded||s.$ghost)&&(i.canPan()?i.scaleToFit():i.isScaledDown()?i.scaleToActual(l,c):i.group.length<2&&i.close(n.startEvent))}}var o,n=this,a=u(e.target),i=n.instance,s=i.current,r=e&&p(e)||n.startPoints,l=r[0]?r[0].x-u(d).scrollLeft()-n.stagePos.left:0,c=r[0]?r[0].y-u(d).scrollTop()-n.stagePos.top:0;if((!e.originalEvent||2!=e.originalEvent.button)&&(a.is("img")||!(l>a[0].clientWidth+a.offset().left))){if(a.is(".modula-fancybox-bg,.modula-fancybox-inner,.modula-fancybox-outer,.modula-fancybox-container"))o="Outside";else if(a.is(".modula-fancybox-slide"))o="Slide";else{if(!i.current.$content||!i.current.$content.find(a).addBack().filter(a).length)return;o="Content"}if(n.tapped){if(clearTimeout(n.tapped),n.tapped=null,50<Math.abs(l-n.tapX)||50<Math.abs(c-n.tapY))return this;t("dblclick"+o)}else n.tapX=l,n.tapY=c,s.opts["dblclick"+o]&&s.opts["dblclick"+o]!==s.opts["click"+o]?n.tapped=setTimeout(function(){n.tapped=null,i.isAnimating||t("click"+o)},500):t("click"+o);return this}},u(l).on("onActivate.fb",function(t,e){e&&!e.Guestures&&(e.Guestures=new o(e))}).on("beforeClose.fb",function(t,e){e&&e.Guestures&&e.Guestures.destroy()})}(window,document,jQuery),function(i,s){"use strict";function o(t){this.instance=t,this.init()}s.extend(!0,s.modulaFancybox.defaults,{btnTpl:{slideShow:'<button data-fancybox-play class="modula-fancybox-button modula-fancybox-button--play" title="{{PLAY_START}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.5 5.4v13.2l11-6.6z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.33 5.75h2.2v12.5h-2.2V5.75zm5.15 0h2.2v12.5h-2.2V5.75z"/></svg></button>'},slideShow:{autoStart:!1,speed:3e3,progress:!0}}),s.extend(o.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this,e=t.instance,o=e.group[e.currIndex].opts.slideShow;t.$button=e.$refs.toolbar.find("[data-fancybox-play]").on("click",function(){t.toggle()}),e.group.length<2||!o?t.$button.hide():o.progress&&(t.$progress=s('<div class="modula-fancybox-progress"></div>').appendTo(e.$refs.inner))},set:function(t){var e=this,o=e.instance,n=o.current;n&&(!0===t||n.opts.loop||o.currIndex<o.group.length-1)?e.isActive&&"video"!==n.contentType&&(e.$progress&&s.modulaFancybox.animate(e.$progress.show(),{scaleX:1},n.opts.slideShow.speed),e.timer=setTimeout(function(){o.current.opts.loop||o.current.index!=o.group.length-1?o.next():o.jumpTo(0)},n.opts.slideShow.speed)):(e.stop(),o.idleSecondsCounter=0,o.showControls())},clear:function(){clearTimeout(this.timer),this.timer=null,this.$progress&&this.$progress.removeAttr("style").hide()},start:function(){var t=this,e=t.instance.current;e&&(t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_STOP).removeClass("modula-fancybox-button--play").addClass("modula-fancybox-button--pause"),t.isActive=!0,e.isComplete&&t.set(!0),t.instance.trigger("onSlideShowChange",!0))},stop:function(){var t=this,e=t.instance.current;t.clear(),t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_START).removeClass("modula-fancybox-button--pause").addClass("modula-fancybox-button--play"),t.isActive=!1,t.instance.trigger("onSlideShowChange",!1),t.$progress&&t.$progress.removeAttr("style").hide()},toggle:function(){this.isActive?this.stop():this.start()}}),s(i).on({"onInit.fb":function(t,e){e&&!e.SlideShow&&(e.SlideShow=new o(e))},"beforeShow.fb":function(t,e,o,n){e=e&&e.SlideShow;n?e&&o.opts.slideShow.autoStart&&e.start():e&&e.isActive&&e.clear()},"afterShow.fb":function(t,e,o){e=e&&e.SlideShow;e&&e.isActive&&e.set()},"afterKeydown.fb":function(t,e,o,n,a){e=e&&e.SlideShow;!e||!o.opts.slideShow||80!==a&&32!==a||s(i.activeElement).is("button,a,input")||(n.preventDefault(),e.toggle())},"beforeClose.fb onDeactivate.fb":function(t,e){e=e&&e.SlideShow;e&&e.stop()}}),s(i).on("visibilitychange",function(){var t=s.modulaFancybox.getInstance(),t=t&&t.SlideShow;t&&t.isActive&&(i.hidden?t.clear():t.set())})}(document,jQuery),function(i,o){"use strict";var n,a=function(){for(var t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],e={},o=0;o<t.length;o++){var n=t[o];if(n&&n[1]in i){for(var a=0;a<n.length;a++)e[t[0][a]]=n[a];return e}}return!1}();a&&(n={request:function(t){(t=t||i.documentElement)[a.requestFullscreen](t.ALLOW_KEYBOARD_INPUT)},exit:function(){i[a.exitFullscreen]()},toggle:function(t){t=t||i.documentElement,this.isFullscreen()?this.exit():this.request(t)},isFullscreen:function(){return Boolean(i[a.fullscreenElement])},enabled:function(){return Boolean(i[a.fullscreenEnabled])}},o.extend(!0,o.modulaFancybox.defaults,{btnTpl:{fullScreen:'<button data-fancybox-fullscreen class="modula-fancybox-button modula-fancybox-button--fsenter" title="{{FULL_SCREEN}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"/></svg></button>'},fullScreen:{autoStart:!1}}),o(i).on(a.fullscreenchange,function(){var t=n.isFullscreen(),e=o.modulaFancybox.getInstance();e&&(e.current&&"image"===e.current.type&&e.isAnimating&&(e.isAnimating=!1,e.update(!0,!0,0),e.isComplete||e.complete()),e.trigger("onFullscreenChange",t),e.$refs.container.toggleClass("modula-fancybox-is-fullscreen",t),e.$refs.toolbar.find("[data-fancybox-fullscreen]").toggleClass("modula-fancybox-button--fsenter",!t).toggleClass("modula-fancybox-button--fsexit",t))})),o(i).on({"onInit.fb":function(t,e){a?e&&e.group[e.currIndex].opts.fullScreen?(e.$refs.container.on("click.fb-fullscreen","[data-fancybox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),n.toggle()}),e.opts.fullScreen&&!0===e.opts.fullScreen.autoStart&&n.request(),e.FullScreen=n):e&&e.$refs.toolbar.find("[data-fancybox-fullscreen]").hide():e.$refs.toolbar.find("[data-fancybox-fullscreen]").remove()},"afterKeydown.fb":function(t,e,o,n,a){e&&e.FullScreen&&70===a&&(n.preventDefault(),e.FullScreen.toggle())},"beforeClose.fb":function(t,e){e&&e.FullScreen&&e.$refs.container.hasClass("modula-fancybox-is-fullscreen")&&n.exit()}})}(document,jQuery),function(t,i){"use strict";var s="modula-fancybox-thumbs",r=s+"-active";function n(t){this.init(t)}i.modulaFancybox.defaults=i.extend(!0,{btnTpl:{thumbs:'<button data-fancybox-thumbs class="modula-fancybox-button modula-fancybox-button--thumbs" title="{{THUMBS}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.59 14.59h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76H5.65V5.65z"/></svg></button>'},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".modula-fancybox-container",axis:"y"}},i.modulaFancybox.defaults),i.extend(n.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e=this,o=t.group,n=0;e.instance=t,e.opts=o[t.currIndex].opts.thumbs,(t.Thumbs=e).$button=t.$refs.toolbar.find("[data-fancybox-thumbs]");for(var a=0,i=o.length;a<i&&(o[a].thumb&&n++,!(1<n));a++);1<n&&e.opts?(e.$button.removeAttr("style").on("click",function(){e.toggle()}),e.isActive=!0):e.$button.hide()},create:function(){var o,t=this,e=t.instance,n=t.opts.parentEl,a=[];t.$grid||(t.$grid=i('<div class="'+s+" "+s+"-"+t.opts.axis+'"></div>').appendTo(e.$refs.container.find(n).addBack().filter(n)),t.$grid.on("click","a",function(){e.jumpTo(i(this).attr("data-index"))})),t.$list||(t.$list=i('<div class="'+s+'__list">').appendTo(t.$grid)),i.each(e.group,function(t,e){(o=e.thumb)||"image"!==e.type||(o=e.src),a.push('<a href="javascript:;" tabindex="0" data-index="'+t+'"'+(o&&o.length?' style="background-image:url('+o+')"':'class="modula-fancybox-thumbs-missing"')+"></a>")}),t.$list[0].innerHTML=a.join(""),"x"===t.opts.axis&&t.$list.width(parseInt(t.$grid.css("padding-right"),10)+e.group.length*t.$list.children().eq(0).outerWidth(!0))},focus:function(t){var e,o,n=this,a=n.$list,i=n.$grid;n.instance.current&&(o=(e=a.children().removeClass(r).filter('[data-index="'+n.instance.current.index+'"]').addClass(r)).position(),"y"===n.opts.axis&&(o.top<0||o.top>a.height()-e.outerHeight())?a.stop().animate({scrollTop:a.scrollTop()+o.top},t):"x"===n.opts.axis&&(o.left<i.scrollLeft()||o.left>i.scrollLeft()+(i.width()-e.outerWidth()))&&a.parent().stop().animate({scrollLeft:o.left},t))},update:function(){var t=this;t.instance.$refs.container.toggleClass("modula-fancybox-show-thumbs",this.isVisible),t.isVisible?(t.$grid||t.create(),t.instance.trigger("onThumbsShow"),t.focus(0)):t.$grid&&t.instance.trigger("onThumbsHide"),t.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),i(t).on({"onInit.fb":function(t,e){var o;e&&!e.Thumbs&&(o=new n(e)).isActive&&!0===o.opts.autoStart&&o.show()},"beforeShow.fb":function(t,e,o,n){e=e&&e.Thumbs;e&&e.isVisible&&e.focus(n?0:250)},"afterKeydown.fb":function(t,e,o,n,a){e=e&&e.Thumbs;e&&e.isActive&&71===a&&(n.preventDefault(),e.toggle())},"beforeClose.fb":function(t,e){e=e&&e.Thumbs;e&&e.isVisible&&!1!==e.opts.hideOnClose&&e.$grid.hide()}})}(document,jQuery),function(t,o){"use strict";o.extend(!0,o.modulaFancybox.defaults,{btnTpl:{share:'<button data-fancybox-share class="modula-fancybox-button modula-fancybox-button--share" title="{{SHARE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.55 19c1.4-8.4 9.1-9.8 11.9-9.8V5l7 7-7 6.3v-3.5c-2.8 0-10.5 2.1-11.9 4.2z"/></svg></button>'},share:{url:function(t,e){return!t.currentHash&&"inline"!==e.type&&"html"!==e.type&&(e.origSrc||e.src)||window.location}}}),o(t).on("click","[data-fancybox-share]",function(){var a,e,i=o.modulaFancybox.getInstance(),s=i.current||null,r="<div class='modula-fancybox-share'><h1>{{SHARE}}</h1><p>";s&&("function"===o.type(s.opts.share.url)&&(a=s.opts.share.url.apply(s,[i,s])),o.each(s.opts.modulaShare,function(t,e){var o=(s.opts.lightboxEmailMessage.length?s.opts.lightboxEmailMessage:"Here is the link to the image : %%image_link%% and this is the link to the gallery : %%gallery_link%%").replace(/\%%gallery_link%%/g,window.location.href).replace(/\%%image_link%%/g,s.src),n=jQuery(s.$image).attr("title").length?jQuery(s.$image).attr("title"):"";""==n&&(n=i.$caption.text()),r+=s.opts.shareBtnTpl[e].replace(/\{\{media\}\}/g,"image"===s.type?encodeURIComponent(s.src):"").replace(/\{\{modulaShareUrl\}\}/g,encodeURIComponent(a)).replace(/\{\{descr\}\}/g,encodeURIComponent(n)).replace(/\{\{subject\}\}/g,encodeURIComponent(s.opts.lightboxEmailSubject)).replace(/\{\{emailMessage\}\}/g,encodeURIComponent(o))}),r=(r+="</p><p><input class='modula-fancybox-share__input' type='text' value='{{url_raw}}' /></p></div>").replace(/\{\{url_raw\}\}/g,(e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"},String(a).replace(/[&<>"'`=\/]/g,function(t){return e[t]}))),o.modulaFancybox.open({src:i.translate(i,r),type:"html",opts:{touch:!1,animationEffect:!1,afterLoad:function(t,e){i.$refs.container.one("beforeClose.fb",function(){t.close(null,0)}),e.$content.find(".modula-fancybox-share__button").click(function(){return window.open(this.href,"Share","width=550, height=450"),!1})},mobile:{autoFocus:!1}}}))})}(document,jQuery),function(i,s,n){"use strict";function a(){var t=i.location.hash.substr(1),e=t.split("-"),o=1<e.length&&/^\+?\d+$/.test(e[e.length-1])&&parseInt(e.pop(-1),10)||1;return{hash:t,index:o<1?1:o,gallery:e.join("-")}}function e(t){""!==t.gallery&&n("[data-fancybox='"+n.escapeSelector(t.gallery)+"']").eq(t.index-1).focus().trigger("click.fb-start")}function r(t){return!!t&&(""!==(t=(t=(t.current||t).opts).hash||(t.$orig?t.$orig.data("fancybox")||t.$orig.data("fancybox-trigger"):""))&&t)}n.escapeSelector||(n.escapeSelector=function(t){return(t+"").replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t})}),n(function(){!1!==n.modulaFancybox.defaults.hash&&(n(s).on({"onInit.fb":function(t,e){!1!==e.group[e.currIndex].opts.hash&&(a(),r(e))},"beforeShow.fb":function(t,e,o,n){var a;o&&!1!==o.opts.hash&&(a=r(e))&&(e.currentHash=a+(1<e.group.length?"-"+o.opts.image_id:""),i.location.hash!=="#"+e.currentHash&&(n&&!e.origHash&&(e.origHash=i.location.hash),e.hashTimer&&clearTimeout(e.hashTimer),e.hashTimer=setTimeout(function(){"replaceState"in i.history?(i.history[n?"pushState":"replaceState"]({},s.title,i.location.pathname+i.location.search+"#"+e.currentHash),n&&(e.hasCreatedHistory=!0)):i.location.hash=e.currentHash,e.hashTimer=null},300)))},"beforeClose.fb":function(t,e,o){o&&!1!==o.opts.hash&&(clearTimeout(e.hashTimer),e.currentHash&&e.hasCreatedHistory?i.history.back():e.currentHash&&("replaceState"in i.history?i.history.replaceState({},s.title,i.location.pathname+i.location.search+(e.origHash||"")):i.location.hash=e.origHash),e.currentHash=null)}}),n(i).on("hashchange.fb",function(){var t=a(),o=null;n.each(n(".modula-fancybox-container").get().reverse(),function(t,e){e=n(e).data("modulaFancyBox");if(e&&e.currentHash)return o=e,!1}),o?o.currentHash===t.gallery+"-"+t.index||1===t.index&&o.currentHash==t.gallery||(o.currentHash=null,o.close()):""!==t.gallery&&e(t)}),setTimeout(function(){n.modulaFancybox.getInstance()||e(a())},50))})}(window,document,jQuery),function(t,e){"use strict";var a=(new Date).getTime();e(t).on({"onInit.fb":function(t,n,e){n.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){var e=n.current,o=(new Date).getTime();n.group.length<2||!1===e.opts.wheel||"auto"===e.opts.wheel&&"image"!==e.type||(t.preventDefault(),t.stopPropagation(),e.$slide.hasClass("modula-fancybox-animated")||(t=t.originalEvent||t,o-a<250||(a=o,n[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?"next":"previous"]())))})}})}(document,jQuery);
5
- !function(e,t){t=t(e,e.document),e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}(window,function(a,m){"use strict";if(m.getElementsByClassName){var z,n,i,t,s,o,y=m.documentElement,r=a.Date,l=a.HTMLPictureElement,c="addEventListener",h="getAttribute",d=a[c],u=a.setTimeout,f=a.requestAnimationFrame||u,g=a.requestIdleCallback,v=/^picture$/i,p=["load","error","lazyincluded","_lazyloaded"],C={},b=Array.prototype.forEach,A=function(e,t){return C[t]||(C[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),C[t].test(e[h]("class")||"")&&C[t]},E=function(e,t){A(e,t)||e.setAttribute("class",(e[h]("class")||"").trim()+" "+t)},_=function(e,t){(t=A(e,t))&&e.setAttribute("class",(e[h]("class")||"").replace(t," "))},w=function(t,n,e){var a=e?c:"removeEventListener";e&&w(t,n),p.forEach(function(e){t[a](e,n)})},M=function(e,t,n,a,i){var s=m.createEvent("Event");return(n=n||{}).instance=ue,s.initEvent(t,!a,!i),s.detail=n,e.dispatchEvent(s),s},N=function(e,t){var n;!l&&(n=a.picturefill||z.pf)?(t&&t.src&&!e[h]("srcset")&&e.setAttribute("srcset",t.src),n({reevaluate:!0,elements:[e]})):t&&t.src&&(e.src=t.src)},x=function(e,t){return(getComputedStyle(e,null)||{})[t]},W=function(e,t,n){for(n=n||e.offsetWidth;n<z.minSize&&t&&!e._lazysizesWidth;)n=t.offsetWidth,t=t.parentNode;return n},T=(s=[],o=t=[],he._lsFlush=ye,he),e=function(n,e){return e?function(){T(n)}:function(){var e=this,t=arguments;T(function(){n.apply(e,t)})}},B=function(e){function t(){n=null,e()}var n,a,i=function(){var e=r.now()-a;e<99?u(i,99-e):(g||t)(t)};return function(){a=r.now(),n=n||u(i,99)}};!function(){var e,t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(e in z=a.lazySizesConfig||a.lazysizesConfig||{},t)e in z||(z[e]=t[e]);a.lazySizesConfig=z,u(function(){z.init&&ze()})}();var F,S,L,R,k,D,H,O,P,$,I,q,j,G,J,K,Q,U,V,X,Y,Z,ee,te,ne,ae,ie,se,oe,re,le,ce,de,ue,fe=(V=/^img$/i,X=/^iframe$/i,Y="onscroll"in a&&!/(gle|ing)bot/.test(navigator.userAgent),te=-1,j=pe,J=ee=Z=0,K=z.throttleDelay,Q=z.ricTimeout,U=g&&49<Q?function(){g(Ce,{timeout:Q}),Q!==z.ricTimeout&&(Q=z.ricTimeout)}:e(function(){u(Ce)},!0),ae=e(be),ie=function(e){ae({target:e.target})},se=e(function(e,t,n,a,i){var s,o,r,l;(r=M(e,"lazybeforeunveil",t)).defaultPrevented||(a&&(n?E(e,z.autosizesClass):e.setAttribute("sizes",a)),n=e[h](z.srcsetAttr),a=e[h](z.srcAttr),i&&(o=(s=e.parentNode)&&v.test(s.nodeName||"")),l=t.firesLoad||"src"in e&&(n||a||o),r={target:e},E(e,z.loadingClass),l&&(clearTimeout(L),L=u(ge,2500),w(e,ie,!0)),o&&b.call(s.getElementsByTagName("source"),Ae),n?e.setAttribute("srcset",n):a&&!o&&(X.test(e.nodeName)?function(t,n){try{t.contentWindow.location.replace(n)}catch(e){t.src=n}}(e,a):e.src=a),i&&(n||o)&&N(e,{src:a})),e._lazyRace&&delete e._lazyRace,_(e,z.lazyClass),T(function(){(!l||e.complete&&1<e.naturalWidth)&&(be(r),e._lazyCache=!0,u(function(){"_lazyCache"in e&&delete e._lazyCache},9))},!0)}),re=function(){var e;S||(r.now()-k<999?u(re,999):(e=B(function(){z.loadMode=3,ne()}),S=!0,z.loadMode=3,ne(),d("scroll",function(){3==z.loadMode&&(z.loadMode=2),e()},!0)))},{_:function(){k=r.now(),ue.elements=m.getElementsByClassName(z.lazyClass),F=m.getElementsByClassName(z.lazyClass+" "+z.preloadClass),d("scroll",ne,!0),d("resize",ne,!0),a.MutationObserver?new MutationObserver(ne).observe(y,{childList:!0,subtree:!0,attributes:!0}):(y[c]("DOMNodeInserted",ne,!0),y[c]("DOMAttrModified",ne,!0),setInterval(ne,999)),d("hashchange",ne,!0),["focus","mouseover","click","load","transitionend","animationend","webkitAnimationEnd"].forEach(function(e){m[c](e,ne,!0)}),/d$|^c/.test(m.readyState)?re():(d("load",re),m[c]("DOMContentLoaded",ne),u(re,2e4)),ue.elements.length?(pe(),T._lsFlush()):ne()},checkElems:ne=function(e){var t;(e=!0===e)&&(Q=33),G||(G=!0,(t=K-(r.now()-J))<0&&(t=0),e||t<9?U():u(U,t))},unveil:oe=function(e){var t,n=V.test(e.nodeName),a=n&&(e[h](z.sizesAttr)||e[h]("sizes")),i="auto"==a;(!i&&S||!n||!e[h]("src")&&!e.srcset||e.complete||A(e,z.errorClass)||!A(e,z.lazyClass))&&(t=M(e,"lazyunveilread").detail,i&&me.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,ee++,se(e,t,i,a,n))}}),me=(ce=e(function(e,t,n,a){var i,s,o;if(e._lazysizesWidth=a,a+="px",e.setAttribute("sizes",a),v.test(t.nodeName||""))for(s=0,o=(i=t.getElementsByTagName("source")).length;s<o;s++)i[s].setAttribute("sizes",a);n.detail.dataAttr||N(e,n.detail)}),{_:function(){le=m.getElementsByClassName(z.autosizesClass),d("resize",de)},checkElems:de=B(function(){var e,t=le.length;if(t)for(e=0;e<t;e++)Ee(le[e])}),updateElem:Ee}),ze=function(){ze.i||(ze.i=!0,me._(),fe._())};return ue={cfg:z,autoSizer:me,loader:fe,init:ze,uP:N,aC:E,rC:_,hC:A,fire:M,gW:W,rAF:T}}function ye(){var e=o;for(o=t.length?s:t,i=!(n=!0);e.length;)e.shift()();n=!1}function he(e,t){n&&!t?e.apply(this,arguments):(o.push(e),i||(i=!0,(m.hidden?u:f)(ye)))}function ge(e){ee--,e&&!(ee<0)&&e.target||(ee=0)}function ve(e){return null==q&&(q="hidden"==x(m.body,"visibility")),q||"hidden"!=x(e.parentNode,"visibility")&&"hidden"!=x(e,"visibility")}function pe(){var e,t,n,a,i,s,o,r,l,c,d,u,f=ue.elements;if((R=z.loadMode)&&ee<8&&(e=f.length)){for(t=0,te++,c=!z.expand||z.expand<1?500<y.clientHeight&&500<y.clientWidth?500:370:z.expand,d=(ue._defEx=c)*z.expFactor,u=z.hFac,q=null,Z<d&&ee<1&&2<te&&2<R&&!m.hidden?(Z=d,te=0):Z=1<R&&1<te&&ee<6?c:0;t<e;t++)if(f[t]&&!f[t]._lazyRace)if(Y)if((r=f[t][h]("data-expand"))&&(s=+r)||(s=Z),l!==s&&(D=innerWidth+s*u,H=innerHeight+s,o=-1*s,l=s),n=f[t].getBoundingClientRect(),(I=n.bottom)>=o&&(O=n.top)<=H&&($=n.right)>=o*u&&(P=n.left)<=D&&(I||$||P||O)&&(z.loadHidden||ve(f[t]))&&(S&&ee<3&&!r&&(R<3||te<4)||function(e,t){var n,a=e,i=ve(e);for(O-=t,I+=t,P-=t,$+=t;i&&(a=a.offsetParent)&&a!=m.body&&a!=y;)(i=0<(x(a,"opacity")||1))&&"visible"!=x(a,"overflow")&&(n=a.getBoundingClientRect(),i=$>n.left&&P<n.right&&I>n.top-1&&O<n.bottom+1);return i}(f[t],s))){if(oe(f[t]),i=!0,9<ee)break}else!i&&S&&!a&&ee<4&&te<4&&2<R&&(F[0]||z.preloadAfterLoad)&&(F[0]||!r&&(I||$||P||O||"auto"!=f[t][h](z.sizesAttr)))&&(a=F[0]||f[t]);else oe(f[t]);a&&!i&&oe(a)}}function Ce(){G=!1,J=r.now(),j()}function be(e){var t=e.target;t._lazyCache?delete t._lazyCache:(ge(e),E(t,z.loadedClass),_(t,z.loadingClass),w(t,ie),M(t,"lazyloaded"))}function Ae(e){var t,n=e[h](z.srcsetAttr);(t=z.customMedia[e[h]("data-media")||e[h]("media")])&&e.setAttribute("media",t),n&&e.setAttribute("srcset",n)}function Ee(e,t,n){var a=e.parentNode;a&&(n=W(e,a,n),(t=M(e,"lazybeforesizes",{width:n,dataAttr:!!t})).defaultPrevented||(n=t.detail.width)&&n!==e._lazysizesWidth&&ce(e,a,t,n))}});
6
- function tg_getURLParameter(t){return decodeURIComponent((new RegExp("[?|&]"+t+"=([^&;]+?)(&|#|;|$)").exec(location.search)||[,""])[1].replace(/\+/g,"%20"))||null}function modulaInViewport(t){"function"==typeof jQuery&&t instanceof jQuery&&(t=t[0]);t=t.getBoundingClientRect();return t.top-jQuery(window).height()<=-100&&-400<=t.top-jQuery(window).height()||t.bottom<=jQuery(window).height()}jQuery(document).on("vc-full-width-row-single vc-full-width-row",function(t,i){0<jQuery("body").find(".modula").length&&jQuery(window).trigger("modula-update")}),jQuery(window).on("elementor/frontend/init",function(){window.elementorFrontend&&window.elementorFrontend.hooks.addAction("frontend/element_ready/global",function(t){0<jQuery("body").find(".modula").length&&jQuery(window).trigger("modula-update")})}),function(u,s,a,t){var n="modulaGallery",e={resizer:"/",keepArea:!0,type:"creative-gallery",columns:12,gutter:10,desktopGutter:10,mobileGutter:10,tabletGutter:10,enableTwitter:!1,enableFacebook:!1,enableWhatsapp:!1,enablePinterest:!1,enableLinkedin:!1,enableEmail:!1,lazyLoad:0,initLightbox:!1,lightbox:"fancybox",lightboxOpts:{},inView:!1};function h(t,i){this.element=t,this.$element=u(t),this.$itemsCnt=this.$element.find(".modula-items"),this.$items=this.$itemsCnt.find(".modula-item"),this.options=u.extend({},e,i),this._defaults=e,this._name=n,this.tiles=[],this.$tilesCnt=null,this.completed=!1,this.lastWidth=0,this.resizeTO=0,this.isIsotope=!1,this.isLazyLoaded=!0,this.init()}h.prototype.init=function(){var i=this,t=a.documentElement.clientWidth;this.options.gutter=t<=568?this.options.mobileGutter:t<=768?this.options.tabletGutter:this.options.desktopGutter,u(a).trigger("modula_api_before_init",[i]),"custom-grid"===this.options.type?this.createCustomGallery():"creative-gallery"==this.options.type?this.createGrid():"grid"==this.options.type&&("automatic"==this.options.grid_type?this.createAutoGrid():this.createColumnsGrid()),"custom-grid"===this.options.type&&u(s).height()<u("html").height()&&i.onResize(i),u(s).resize(function(){i.onResize(i)}),u(s).on("modula-update",function(){i.onResize(i)}),u(a).on("lazyloaded",function(t){t=u(t.target);"modula"==t.data("source")&&(t.data("size",{width:t.width(),height:t.height()}),(t=t.parents(".modula-item")).addClass("tg-loaded"),t=i.$items.not(".jtg-hidden").index(t),i.placeImage(t),i.isIsotope&&i.$itemsCnt.modulaisotope("layout"))}),i.options.inView&&jQuery(s).on("DOMContentLoaded load resize scroll",function(){modulaInViewport(i.$element)&&i.$element.addClass("modula-loaded-scale")}),this.setupSocial(),this.options.onComplete&&this.options.onComplete(),"fancybox"!=i.options.lightbox||i.options.initLightbox||this.initLightbox(),u(a).trigger("modula_api_after_init",[i])},h.prototype.initLightbox=function(){var e=this;e.$element.on("click",".modula-item-link:not( .modula-simple-link )",function(t){t.preventDefault();var i=u.map(e.$items,function(t){var i=jQuery(t).find(".modula-item-link:not( .modula-simple-link )"),t=jQuery(t).find(".pic");return{src:i.attr("href"),opts:{$thumb:t.parents(".modula-item"),caption:i.data("caption"),alt:t.attr("alt"),image_id:i.attr("data-image-id")}}}),t=e.$items.index(jQuery(this).parents(".modula-item"));jQuery.modulaFancybox.open(i,e.options.lightboxOpts,t)})},h.prototype.trunc=function(t){return Math.trunc?Math.trunc(t):(t=+t,isFinite(t)?t-t%1||(t<0?-0:0===t?t:0):t)},h.prototype.createCustomGallery=function(){var h,r=this,t=this.$element.find(".modula-items").width(),d=this,l=this.options.columns,i=a.documentElement.clientWidth;"1"==this.options.enableResponsive&&(i<=568?l=this.options.mobileColumns:i<=768&&(l=this.options.tabletColumns)),h=0<this.options.gutter?(t-this.options.gutter*(l-1))/l:Math.floor(t/l*1e3)/1e3,this.$items.not(".jtg-hidden").each(function(t,i){var e,o,n={},s=u(i).data("width"),a=u(i).data("height");12<s&&(s=12),"1"==d.options.enableResponsive&&(e=s,o=a,1==l?a=(s=1)*o/e:((s=Math.round(l*e/12))<1&&(s=1),(a=Math.round(s*o/e))<1&&(a=1))),n.width=h*s+d.options.gutter*(s-1),n.height=Math.round(h)*a+d.options.gutter*(a-1),u(i).data("size",n).addClass("tiled").addClass(n.width>n.height?"tile-h":"tile-v").data("position"),u(i).css(u(i).data("size")),u(i).find(".figc").css({width:u(i).data("size").width,height:u(i).data("size").height}),r.loadImage(t)});t={itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(d.options.gutter)}};this.$itemsCnt.modulaisotope(t),this.isIsotope=!0},h.prototype.createGrid=function(){var o=this;this.$itemsCnt.data("area",this.$itemsCnt.width()*this.options.height),this.lastWidth=this.$itemsCnt.width();for(var t,i=0;i<this.$items.not(".jtg-hidden").length;i++)this.tiles.push(o.getSlot());this.tiles.sort(function(t,i){return t.position-i.position}),this.$items.not(".jtg-hidden").each(function(t,i){var e=o.tiles[t];u(i).data("size",e),u(i).addClass("tiled").addClass(e.width>e.height?"tile-h":"tile-v").data("position"),u(i).css({width:e.width,height:e.height}),u(i).find(".figc").css({width:e.width,height:e.height}),o.loadImage(t)}),this.isIsotope||(t={resizesContainer:!1,itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(o.options.gutter)}},this.$itemsCnt.modulaisotope(t),this.isIsotope=!0)},h.prototype.createAutoGrid=function(){this.$itemsCnt.justifiedGallery({rowHeight:this.options.rowHeight,margins:this.options.gutter,lastRow:this.options.lastRow,captions:!1,border:0,imgSelector:".pic",cssAnimation:!0,imagesAnimationDuration:700})},h.prototype.createColumnsGrid=function(){var e=this;this.$itemsCnt.modulaisotope({itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(this.options.gutter)}}),this.$items.each(function(t,i){e.loadImage(t)}),this.isIsotope=!0},h.prototype.getSlot=function(){if(0==this.tiles.length)return o={top:0,left:0,width:this.$itemsCnt.width(),height:this.options.height,area:this.$itemsCnt.width()*this.options.height,position:0};for(var t=0,i=0;i<this.tiles.length;i++)(o=this.tiles[i]).area>this.tiles[t].area&&(t=i);var e,o={},n=this.tiles[t];return(o=n.width>n.height?(e=n.width/2*this.options.randomFactor,n.prevWidth=n.width,n.width=Math.floor(n.width/2+e*(Math.random()-.5)),{top:n.top,left:n.left+n.width+this.options.gutter,width:n.prevWidth-n.width-this.options.gutter,height:n.height}):(e=n.height/2*this.options.randomFactor,n.prevHeight=n.height,n.height=Math.floor(n.height/2+e*(Math.random()-.5)),{left:n.left,top:n.top+n.height+this.options.gutter,width:n.width,height:n.prevHeight-n.height-this.options.gutter})).area=o.width*o.height,o.position=1e3*o.top+o.left,n.position=1e3*n.top+n.left,this.tiles[t]=n,this.tiles[t].area=n.width*n.height,o},h.prototype.reset=function(){this.tiles=[],"custom-grid"===this.options.type?this.createCustomGallery():"creative-gallery"==this.options.type?this.createGrid():"grid"==this.options.type&&("automatic"==this.options.grid_type?this.createAutoGrid():this.createColumnsGrid()),this.lastWidth=this.$itemsCnt.width(),u(a).trigger("modula_api_reset",[this])},h.prototype.onResize=function(i){var t;i.lastWidth!=i.$itemsCnt.width()&&(t=a.documentElement.clientWidth,i.options.gutter=t<=568?i.options.mobileGutter:t<=768?i.options.tabletGutter:this.options.desktopGutter,clearTimeout(i.resizeTO),i.resizeTO=setTimeout(function(){var t;i.options.keepArea&&(t=i.$itemsCnt.data("area"),i.$itemsCnt.height(t/i.$itemsCnt.width())),i.reset(),i.isIsotope&&i.$itemsCnt.modulaisotope({packery:{gutter:parseInt(i.options.gutter)}}).modulaisotope("layout")},100))},h.prototype.loadImage=function(t){var i,e=this,o=e.$items.not(".jtg-hidden").eq(t).find(".pic"),n={};"0"==e.options.lazyLoad?void 0===o.attr("width")&&void 0===o.attr("height")?((i=new Image).onload=function(){n={width:this.width,height:this.height},o.data("size",n),e.placeImage(t)},"undefined"!=o.attr("src")?i.src=o.attr("src"):i.src=o.data("src")):(n={width:o.width(),height:o.height()},o.data("size",n),e.placeImage(t)):e.placeImage(t)},h.prototype.placeImage=function(t){if("grid"!=this.options.type){var i=this.$items.not(".jtg-hidden").eq(t),e=i.find(".pic"),o=i.data("size"),n=e.data("size");if(void 0!==o&&void 0!==n){o.width,o.height;var s=n.width/n.height,a=e.data("valign")?e.data("valign"):"middle",i=e.data("halign")?e.data("halign"):"center",h={top:"auto",bottom:"auto",left:"auto",right:"auto",width:"auto",height:"auto",margin:"0",maxWidth:"999em"};if(o.width*n.height/n.width>o.height)switch(h.width=o.width,h.left=0,a){case"top":h.top=0;break;case"middle":h.top=0-(o.width*(1/s)-o.height)/2;break;case"bottom":h.bottom=0}else switch(h.height=o.height,h.top=0,i){case"left":h.left=0;break;case"center":h.left=0-(o.height*s-o.width)/2;break;case"right":h.right=0}e.css(h),this.$items.not(".jtg-hidden").eq(t).addClass("tg-loaded")}}},h.prototype.setupSocial=function(){this.options.enableTwitter&&i(this.$items,this),this.options.enableFacebook&&o(this.$items,this),this.options.enablePinterest&&d(this.$items,this),this.options.enableLinkedin&&l(this.$items,this),this.options.enableWhatsapp&&r(this.$items,this),this.options.enableEmail&&p(this.$items,this)},h.prototype.destroy=function(){this.isPackeryActive&&(this.$itemsCnt.packery("destroy"),this.isPackeryActive=!1)};var i=function(t,i){t.find(".modula-icon-twitter").click(function(t){t.preventDefault();var i=u(this).parents(".modula-item").find("img.pic"),e=i.data("caption"),o=i.data("full"),t=i.attr("title"),i=a.title;return 0<t.length?i=u.trim(t):0<e.length&&(i=u.trim(e)),s.open("https://twitter.com/intent/tweet?url="+encodeURI(o)+"&text="+encodeURI(i),"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},o=function(t,i){t.find(".modula-icon-facebook").click(function(t){t.preventDefault();t="//www.facebook.com/sharer.php?u="+u(this).parents(".modula-item").find("img.pic").attr("data-full");return s.open(t,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},r=function(t,i){t.find(".modula-icon-whatsapp").click(function(t){t.preventDefault();t=u(this).parents(".modula-item").find("img.pic").attr("data-full");return s.open("https://api.whatsapp.com/send?text="+encodeURI(t)+"&preview_url=true","ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},d=function(t,i){t.find(".modula-icon-pinterest").click(function(t){t.preventDefault();var i=u(this).parents(".modula-item").find("img.pic"),e=i.data("full"),o=i.data("caption"),n=i.attr("title"),t=a.title;0<n.length?t=u.trim(n):0<o.length&&(t=u.trim(o));e="http://pinterest.com/pin/create/button/?url="+encodeURI(e)+"&description="+encodeURI(t);return 1<=i.length&&(t=i.attr("data-full"),e+="&media="+(i=t,(t=a.createElement("img")).src=i,i=t.src,t.src=null,i)),s.open(e,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},l=function(t,i){t.find(".modula-icon-linkedin").click(function(t){t.preventDefault();t=u(this).parents(".modula-item").find("img.pic").attr("data-full"),t="//linkedin.com/shareArticle?mini=true&url="+encodeURI(t);return s.open(t,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},p=function(t,n){t.find(".modula-icon-email").click(function(t){var i=encodeURI(n.options.email_subject),e=jQuery(".modula-icon-email").parents(".modula-item").find("img.pic").attr("data-full"),o=location.href,o="mailto:?subject="+i+"&body="+encodeURI(n.options.email_message.replace(/%%image_link%%/g,e).replace(/%%gallery_link%%/g,o));return s.open(o,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})};u.fn[n]=function(i){var e,o=arguments;return i===t||"object"==typeof i?this.each(function(){u.data(this,"plugin_"+n)||u.data(this,"plugin_"+n,new h(this,i))}):"string"==typeof i&&"_"!==i[0]&&"init"!==i?(this.each(function(){var t=u.data(this,"plugin_"+n);t instanceof h&&"function"==typeof t[i]&&(e=t[i].apply(t,Array.prototype.slice.call(o,1))),"destroy"===i&&u.data(this,"plugin_"+n,null)}),e!==t?e:this):void 0}}(jQuery,window,document),jQuery(document).ready(function(){var t=jQuery(".modula.modula-gallery");jQuery.each(t,function(){var t=jQuery(this).data("config");jQuery(this).modulaGallery(t)})});
1
+ !function(t,e){t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";var i=Array.prototype.slice,n=t.console,d=void 0===n?function(){}:function(t){n.error(t)};function o(h,u,l){(l=l||e||t.jQuery)&&(u.prototype.option||(u.prototype.option=function(t){l.isPlainObject(t)&&(this.options=l.extend(!0,this.options,t))}),l.fn[h]=function(t){if("string"!=typeof t)return a=t,this.each(function(t,e){var i=l.data(e,h);i?(i.option(a),i._init()):(i=new u(e,a),l.data(e,h,i))}),this;var n,o,s,r,a,e=i.call(arguments,1);return o=e,r="$()."+h+'("'+(n=t)+'")',(t=this).each(function(t,e){var i=l.data(e,h);i?(e=i[n])&&"_"!=n.charAt(0)?(i=e.apply(i,o),s=void 0===s?i:s):d(r+" is not a valid method"):d(h+" not initialized. Cannot call methods, i.e. "+r)}),void 0!==s?s:t},s(l))}function s(t){!t||t&&t.bridget||(t.bridget=o)}return s(e||t.jQuery),o}),function(t){function e(){}t.EvEmitter=((t=e.prototype).on=function(t,e){if(t&&e){var i=this._events=this._events||{},t=i[t]=i[t]||[];return-1==t.indexOf(e)&&t.push(e),this}},t.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this}},t.off=function(t,e){t=this._events&&this._events[t];if(t&&t.length){e=t.indexOf(e);return-1!=e&&t.splice(e,1),this}},t.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],o=0;o<i.length;o++){var s=i[o];n&&n[s]&&(this.off(t,s),delete n[s]),s.apply(this,e)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e)}("undefined"!=typeof window?window:this),function(t){window.getSize=t()}(function(){"use strict";function m(t){var e=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(e)&&e}var e="undefined"==typeof console?function(){}:function(t){console.error(t)},f=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],p=f.length;function g(t){t=getComputedStyle(t);return t||e("Style returned "+t+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),t}var y,v=!1;function _(t){if(v||(v=!0,(c=document.createElement("div")).style.width="200px",c.style.padding="1px 2px 3px 4px",c.style.borderStyle="solid",c.style.borderWidth="1px 2px 3px 4px",c.style.boxSizing="border-box",(d=document.body||document.documentElement).appendChild(c),l=g(c),y=200==Math.round(m(l.width)),_.isBoxSizeOuter=y,d.removeChild(c)),"string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var e=g(t);if("none"==e.display)return function(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e<p;e++)t[f[e]]=0;return t}();var i={};i.width=t.offsetWidth,i.height=t.offsetHeight;for(var n=i.isBorderBox="border-box"==e.boxSizing,o=0;o<p;o++){var s=f[o],r=e[s],r=parseFloat(r);i[s]=isNaN(r)?0:r}var a=i.paddingLeft+i.paddingRight,h=i.paddingTop+i.paddingBottom,u=i.marginLeft+i.marginRight,l=i.marginTop+i.marginBottom,d=i.borderLeftWidth+i.borderRightWidth,c=i.borderTopWidth+i.borderBottomWidth,t=n&&y,n=m(e.width);!1!==n&&(i.width=n+(t?0:a+d));n=m(e.height);return!1!==n&&(i.height=n+(t?0:h+c)),i.innerWidth=i.width-(a+d),i.innerHeight=i.height-(h+c),i.outerWidth=i.width+u,i.outerHeight=i.height+l,i}}return _}),window.matchesSelector=function(){"use strict";var i=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i]+"MatchesSelector";if(t[n])return n}}();return function(t,e){return t[i](e)}}(),function(t,e){t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(i,r){var n={};n.extend=function(t,e){for(var i in e)t[i]=e[i];return t},n.modulo=function(t,e){return(t%e+e)%e};var e=Array.prototype.slice;n.makeArray=function(t){return Array.isArray(t)?t:null==t?[]:"object"==typeof t&&"number"==typeof t.length?e.call(t):[t]},n.removeFrom=function(t,e){e=t.indexOf(e);-1!=e&&t.splice(e,1)},n.getParent=function(t,e){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,r(t,e))return t},n.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},n.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},n.filterFindElements=function(t,o){t=n.makeArray(t);var s=[];return t.forEach(function(t){var e;if(e=t,"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)if(o){r(t,o)&&s.push(t);for(var i=t.querySelectorAll(o),n=0;n<i.length;n++)s.push(i[n])}else s.push(t)}),s},n.debounceMethod=function(t,e,n){n=n||100;var o=t.prototype[e],s=e+"Timeout";t.prototype[e]=function(){var t=this[s];clearTimeout(t);var e=arguments,i=this;this[s]=setTimeout(function(){o.apply(i,e),delete i[s]},n)}},n.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},n.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var u=i.console;return n.htmlInit=function(a,h){n.docReady(function(){var t=n.toDashed(h),o="data-"+t,e=document.querySelectorAll("["+o+"]"),t=document.querySelectorAll(".js-"+t),t=n.makeArray(e).concat(n.makeArray(t)),s=o+"-options",r=i.jQuery;t.forEach(function(e){var t,i=e.getAttribute(o)||e.getAttribute(s);try{t=i&&JSON.parse(i)}catch(t){return void(u&&u.error("Error parsing "+o+" on "+e.className+": "+t))}var n=new a(e,t);r&&r.data(e,h,n)})})},n}),function(t,e){t.Outlayer={},t.Outlayer.Item=e(t.EvEmitter,t.getSize)}(window,function(t,e){"use strict";var i=document.documentElement.style,n="string"==typeof i.transition?"transition":"WebkitTransition",o="string"==typeof i.transform?"transform":"WebkitTransform",s={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[n],r={transform:o,transition:n,transitionDuration:n+"Duration",transitionProperty:n+"Property",transitionDelay:n+"Delay"};function a(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}t=a.prototype=Object.create(t.prototype);t.constructor=a,t._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},t.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},t.getSize=function(){this.size=e(this.element)},t.css=function(t){var e,i=this.element.style;for(e in t)i[r[e]||e]=t[e]},t.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),n=t[e?"left":"right"],o=t[i?"top":"bottom"],s=parseFloat(n),r=parseFloat(o),t=this.layout.size;-1!=n.indexOf("%")&&(s=s/100*t.width),-1!=o.indexOf("%")&&(r=r/100*t.height),s=isNaN(s)?0:s,r=isNaN(r)?0:r,s-=e?t.paddingLeft:t.paddingRight,r-=i?t.paddingTop:t.paddingBottom,this.position.x=s,this.position.y=r},t.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),o=i?"paddingLeft":"paddingRight",s=i?"left":"right",i=i?"right":"left",o=this.position.x+t[o];e[s]=this.getXValue(o),e[i]="";o=n?"paddingTop":"paddingBottom",i=n?"top":"bottom",n=n?"bottom":"top",o=this.position.y+t[o];e[i]=this.getYValue(o),e[n]="",this.css(e),this.emitEvent("layout",[this])},t.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},t.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},t._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,o=t==this.position.x&&e==this.position.y;this.setPosition(t,e),!o||this.isTransitioning?(i=t-i,e-=n,(n={}).transform=this.getTranslate(i,e),this.transition({to:n,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})):this.layoutPosition()},t.getTranslate=function(t,e){return"translate3d("+(t=this.layout._getOption("originLeft")?t:-t)+"px, "+(e=this.layout._getOption("originTop")?e:-e)+"px, 0)"},t.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},t.moveTo=t._transitionTo,t.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},t._nonTransition=function(t){for(var e in this.css(t.to),t.isCleaning&&this._removeStyles(t.to),t.onTransitionEnd)t.onTransitionEnd[e].call(this)},t.transition=function(t){if(parseFloat(this.layout.options.transitionDuration)){var e,i=this._transn;for(e in t.onTransitionEnd)i.onEnd[e]=t.onTransitionEnd[e];for(e in t.to)i.ingProperties[e]=!0,t.isCleaning&&(i.clean[e]=!0);t.from&&(this.css(t.from),this.element.offsetHeight,0),this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0}else this._nonTransition(t)};var h="opacity,"+o.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()});t.enableTransition=function(){var t;this.isTransitioning||(t="number"==typeof(t=this.layout.options.transitionDuration)?t+"ms":t,this.css({transitionProperty:h,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(s,this,!1))},t.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},t.onotransitionend=function(t){this.ontransitionend(t)};var u={"-webkit-transform":"transform"};t.ontransitionend=function(t){var e,i;t.target===this.element&&(e=this._transn,i=u[t.propertyName]||t.propertyName,delete e.ingProperties[i],function(t){for(var e in t)return;return 1}(e.ingProperties)&&this.disableTransition(),i in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[i]),i in e.onEnd&&(e.onEnd[i].call(this),delete e.onEnd[i]),this.emitEvent("transitionEnd",[this]))},t.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(s,this,!1),this.isTransitioning=!1},t._removeStyles=function(t){var e,i={};for(e in t)i[e]="";this.css(i)};var l={transitionProperty:"",transitionDuration:"",transitionDelay:""};return t.removeTransitionStyles=function(){this.css(l)},t.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},t.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},t.remove=function(){n&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),this.hide()):this.removeElem()},t.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},t.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},t.getHideRevealTransitionEndProperty=function(t){var e,t=this.layout.options[t];if(t.opacity)return"opacity";for(e in t)return e},t.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},t.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},t.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},a}),function(t,e){"use strict";t.Outlayer=e(t,t.EvEmitter,t.getSize,t.fizzyUIUtils,t.Outlayer.Item)}(window,function(t,e,o,n,s){"use strict";function i(){}var r=t.console,a=t.jQuery,h=0,u={};function l(t,e){var i=n.getQueryElement(t);i?(this.element=i,a&&(this.$element=a(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e),e=++h,this.element.outlayerGUID=e,(u[e]=this)._create(),this._getOption("initLayout")&&this.layout()):r&&r.error("Bad element for "+this.constructor.namespace+": "+(i||t))}l.namespace="outlayer",l.Item=s,l.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var d=l.prototype;function c(t){function e(){t.apply(this,arguments)}return(e.prototype=Object.create(t.prototype)).constructor=e}n.extend(d,e.prototype),d.option=function(t){n.extend(this.options,t)},d._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},l.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},d._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle),this._getOption("resize")&&this.bindResize()},d.reloadItems=function(){this.items=this._itemize(this.element.children)},d._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],o=0;o<e.length;o++){var s=new i(e[o],this);n.push(s)}return n},d._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},d.getItemElements=function(){return this.items.map(function(t){return t.element})},d.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),t=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},d._init=d.layout,d._resetLayout=function(){this.getSize()},d.getSize=function(){this.size=o(this.element)},d._getMeasurement=function(t,e){var i,n=this.options[t];n?("string"==typeof n?i=this.element.querySelector(n):n instanceof HTMLElement&&(i=n),this[t]=i?o(i)[e]:n):this[t]=0},d.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},d._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},d._layoutItems=function(t,i){var n;this._emitCompleteOnItems("layout",t),t&&t.length&&(n=[],t.forEach(function(t){var e=this._getItemLayoutPosition(t);e.item=t,e.isInstant=i||t.isLayoutInstant,n.push(e)},this),this._processLayoutQueue(n))},d._getItemLayoutPosition=function(){return{x:0,y:0}},d._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},d.updateStagger=function(){var t=this.options.stagger;if(null!=t)return this.stagger=function(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),t=e&&e[1],e=e&&e[2];if(!t.length)return 0;t=parseFloat(t);e=m[e]||1;return t*e}(t),this.stagger;this.stagger=0},d._positionItem=function(t,e,i,n,o){n?t.goTo(e,i):(t.stagger(o*this.stagger),t.moveTo(e,i))},d._postLayout=function(){this.resizeContainer()},d.resizeContainer=function(){var t;!this._getOption("resizeContainer")||(t=this._getContainerSize())&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))},d._getContainerSize=i,d._setContainerMeasure=function(t,e){var i;void 0!==t&&((i=this.size).isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px")},d._emitCompleteOnItems=function(e,t){var i=this;function n(){i.dispatchEvent(e+"Complete",null,[t])}var o,s=t.length;function r(){++o==s&&n()}t&&s?(o=0,t.forEach(function(t){t.once(e,r)})):n()},d.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;this.emitEvent(t,n),a&&(this.$element=this.$element||a(this.element),e?((e=a.Event(e)).type=t,this.$element.trigger(e,i)):this.$element.trigger(t,i))},d.ignore=function(t){t=this.getItem(t);t&&(t.isIgnored=!0)},d.unignore=function(t){t=this.getItem(t);t&&delete t.isIgnored},d.stamp=function(t){(t=this._find(t))&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},d.unstamp=function(t){(t=this._find(t))&&t.forEach(function(t){n.removeFrom(this.stamps,t),this.unignore(t)},this)},d._find=function(t){if(t)return"string"==typeof t&&(t=this.element.querySelectorAll(t)),t=n.makeArray(t)},d._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},d._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},d._manageStamp=i,d._getElementOffset=function(t){var e=t.getBoundingClientRect(),i=this._boundingRect,t=o(t);return{left:e.left-i.left-t.marginLeft,top:e.top-i.top-t.marginTop,right:i.right-e.right-t.marginRight,bottom:i.bottom-e.bottom-t.marginBottom}},d.handleEvent=n.handleEvent,d.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},d.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},d.onresize=function(){this.resize()},n.debounceMethod(l,"onresize",100),d.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},d.needsResizeLayout=function(){var t=o(this.element);return this.size&&t&&t.innerWidth!==this.size.innerWidth},d.addItems=function(t){t=this._itemize(t);return t.length&&(this.items=this.items.concat(t)),t},d.appended=function(t){t=this.addItems(t);t.length&&(this.layoutItems(t,!0),this.reveal(t))},d.prepended=function(t){var e=this._itemize(t);e.length&&(t=this.items.slice(0),this.items=e.concat(t),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(t))},d.reveal=function(t){var i;this._emitCompleteOnItems("reveal",t),t&&t.length&&(i=this.updateStagger(),t.forEach(function(t,e){t.stagger(e*i),t.reveal()}))},d.hide=function(t){var i;this._emitCompleteOnItems("hide",t),t&&t.length&&(i=this.updateStagger(),t.forEach(function(t,e){t.stagger(e*i),t.hide()}))},d.revealItemElements=function(t){t=this.getItems(t);this.reveal(t)},d.hideItemElements=function(t){t=this.getItems(t);this.hide(t)},d.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},d.getItems=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){t=this.getItem(t);t&&e.push(t)},this),e},d.remove=function(t){t=this.getItems(t);this._emitCompleteOnItems("remove",t),t&&t.length&&t.forEach(function(t){t.remove(),n.removeFrom(this.items,t)},this)},d.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();t=this.element.outlayerGUID;delete u[t],delete this.element.outlayerGUID,a&&a.removeData(this.element,this.constructor.namespace)},l.data=function(t){t=(t=n.getQueryElement(t))&&t.outlayerGUID;return t&&u[t]},l.create=function(t,e){var i=c(l);return i.defaults=n.extend({},l.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},l.compatOptions),i.namespace=t,i.data=l.data,i.Item=c(s),n.htmlInit(i,t),a&&a.bridget&&a.bridget(t,i),i};var m={ms:1,s:1e3};return l.Item=s,l}),function(t,e){t.ModulaIsotope=t.ModulaIsotope||{},t.ModulaIsotope.Item=e(t.Outlayer)}(window,function(t){"use strict";function e(){t.Item.apply(this,arguments)}var i=e.prototype=Object.create(t.Item.prototype),n=i._create;i._create=function(){this.id=this.layout.itemGUID++,n.call(this),this.sortData={}},i.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t,e=this.layout.options.getSortData,i=this.layout._sorters;for(t in e){var n=i[t];this.sortData[t]=n(this.element,this)}}};var o=i.destroy;return i.destroy=function(){o.apply(this,arguments),this.css({display:""})},e}),function(t,e){t.ModulaIsotope=t.ModulaIsotope||{},t.ModulaIsotope.LayoutMode=e(t.getSize,t.Outlayer)}(window,function(e,i){"use strict";function n(t){(this.isotope=t)&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}var o=n.prototype;return["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout","_getOption"].forEach(function(t){o[t]=function(){return i.prototype[t].apply(this.isotope,arguments)}}),o.needsVerticalResizeLayout=function(){var t=e(this.isotope.element);return this.isotope.size&&t&&t.innerHeight!=this.isotope.size.innerHeight},o._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},o.getColumnWidth=function(){this.getSegmentSize("column","Width")},o.getRowHeight=function(){this.getSegmentSize("row","Height")},o.getSegmentSize=function(t,e){var i=t+e,n="outer"+e;this._getMeasurement(i,n),this[i]||(t=this.getFirstItemSize(),this[i]=t&&t[n]||this.isotope.size["inner"+e])},o.getFirstItemSize=function(){var t=this.isotope.filteredItems[0];return t&&t.element&&e(t.element)},o.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},o.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},n.modes={},n.create=function(t,e){function i(){n.apply(this,arguments)}return(i.prototype=Object.create(o)).constructor=i,e&&(i.options=e),n.modes[i.prototype.namespace=t]=i},n}),function(t,e){t.Masonry=e(t.Outlayer,t.getSize)}(window,function(t,a){var e=t.create("masonry");e.compatOptions.fitWidth="isFitWidth";t=e.prototype;return t._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},t.measureColumns=function(){this.getContainerWidth(),this.columnWidth||(i=(e=this.items[0])&&e.element,this.columnWidth=i&&a(i).outerWidth||this.containerWidth);var t=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,i=e/t,t=t-e%t,i=Math[t&&t<1?"round":"floor"](i);this.cols=Math.max(i,1)},t.getContainerWidth=function(){var t=this._getOption("fitWidth")?this.element.parentNode:this.element,t=a(t);this.containerWidth=t&&t.innerWidth},t._getItemLayoutPosition=function(t){t.getSize();for(var e=t.size.outerWidth%this.columnWidth,i=Math[e&&e<1?"round":"ceil"](t.size.outerWidth/this.columnWidth),i=Math.min(i,this.cols),n=this[this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition"](i,t),e={x:this.columnWidth*n.col,y:n.y},o=n.y+t.size.outerHeight,s=i+n.col,r=n.col;r<s;r++)this.colYs[r]=o;return e},t._getTopColPosition=function(t){var e=this._getTopColGroup(t),t=Math.min.apply(Math,e);return{col:e.indexOf(t),y:t}},t._getTopColGroup=function(t){if(t<2)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;n<i;n++)e[n]=this._getColGroupY(n,t);return e},t._getColGroupY=function(t,e){if(e<2)return this.colYs[t];e=this.colYs.slice(t,t+e);return Math.max.apply(Math,e)},t._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,i=1<t&&i+t>this.cols?0:i,e=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=e?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},t._manageStamp=function(t){var e=a(t),i=this._getElementOffset(t),n=this._getOption("originLeft")?i.left:i.right,t=n+e.outerWidth,n=Math.floor(n/this.columnWidth),n=Math.max(0,n),o=Math.floor(t/this.columnWidth);o-=t%this.columnWidth?0:1,o=Math.min(this.cols-1,o);for(var s=(this._getOption("originTop")?i.top:i.bottom)+e.outerHeight,r=n;r<=o;r++)this.colYs[r]=Math.max(s,this.colYs[r])},t._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},t._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},t.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},e}),function(t,e){e(t.ModulaIsotope.LayoutMode,t.Masonry)}(window,function(t,e){"use strict";var i,t=t.create("masonry"),n=t.prototype,o={_getElementOffset:!0,layout:!0,_getMeasurement:!0};for(i in e.prototype)o[i]||(n[i]=e.prototype[i]);var s=n.measureColumns;n.measureColumns=function(){this.items=this.isotope.filteredItems,s.call(this)};var r=n._getOption;return n._getOption=function(t){return"fitWidth"==t?void 0!==this.options.isFitWidth?this.options.isFitWidth:this.options.fitWidth:r.apply(this.isotope,arguments)},t}),function(){"use strict";var t=window.ModulaIsotope.LayoutMode.create("fitRows"),t=t.prototype;t._resetLayout=function(){this.x=0,this.y=0,this.maxY=0,this._getMeasurement("gutter","outerWidth")},t._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth+this.gutter,i=this.isotope.size.innerWidth+this.gutter;0!==this.x&&e+this.x>i&&(this.x=0,this.y=this.maxY);i={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=e,i},t._getContainerSize=function(){return{height:this.maxY}}}(),function(){"use strict";var t=window.ModulaIsotope.LayoutMode.create("vertical",{horizontalAlignment:0}),t=t.prototype;t._resetLayout=function(){this.y=0},t._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},t._getContainerSize=function(){return{height:this.y}}}(),function(t,e){t.ModulaIsotope=e(t,t.Outlayer,t.getSize,t.matchesSelector,t.fizzyUIUtils,t.ModulaIsotope.Item,t.ModulaIsotope.LayoutMode)}(window,function(t,i,e,n,s,o,r){var a=t.jQuery,h=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},u=i.create("modulaisotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});u.Item=o,u.LayoutMode=r;o=u.prototype;o._create=function(){for(var t in this.itemGUID=0,this._sorters={},this._getSorters(),i.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"],r.modes)this._initLayoutMode(t)},o.reloadItems=function(){this.itemGUID=0,i.prototype.reloadItems.call(this)},o._itemize=function(){for(var t=i.prototype._itemize.apply(this,arguments),e=0;e<t.length;e++)t[e].id=this.itemGUID++;return this._updateItemsSortData(t),t},o._initLayoutMode=function(t){var e=r.modes[t],i=this.options[t]||{};this.options[t]=e.options?s.extend(e.options,i):i,this.modes[t]=new e(this)},o.layout=function(){this._isLayoutInited||!this._getOption("initLayout")?this._layout():this.arrange()},o._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},o.arrange=function(t){this.option(t),this._getIsInstant();t=this._filter(this.items);this.filteredItems=t.matches,this._bindArrangeComplete(),this._isInstant?this._noTransition(this._hideReveal,[t]):this._hideReveal(t),this._sort(),this._layout()},o._init=o.arrange,o._hideReveal=function(t){this.reveal(t.needReveal),this.hide(t.needHide)},o._getIsInstant=function(){var t=this._getOption("layoutInstant"),t=void 0!==t?t:!this._isLayoutInited;return this._isInstant=t},o._bindArrangeComplete=function(){var t,e,i,n=this;function o(){t&&e&&i&&n.dispatchEvent("arrangeComplete",null,[n.filteredItems])}this.once("layoutComplete",function(){t=!0,o()}),this.once("hideComplete",function(){e=!0,o()}),this.once("revealComplete",function(){i=!0,o()})},o._filter=function(t){for(var e=(e=this.options.filter)||"*",i=[],n=[],o=[],s=this._getFilterTest(e),r=0;r<t.length;r++){var a,h=t[r];h.isIgnored||((a=s(h))&&i.push(h),a&&h.isHidden?n.push(h):a||h.isHidden||o.push(h))}return{matches:i,needReveal:n,needHide:o}},o._getFilterTest=function(e){return a&&this.options.isJQueryFiltering?function(t){return a(t.element).is(e)}:"function"==typeof e?function(t){return e(t.element)}:function(t){return n(t.element,e)}},o.updateSortData=function(t){t=t?(t=s.makeArray(t),this.getItems(t)):this.items;this._getSorters(),this._updateItemsSortData(t)},o._getSorters=function(){var t,e=this.options.getSortData;for(t in e){var i=e[t];this._sorters[t]=l(i)}},o._updateItemsSortData=function(t){for(var e=t&&t.length,i=0;e&&i<e;i++)t[i].updateSortData()};var l=function(t){if("string"!=typeof t)return t;var e=h(t).split(" "),i=e[0],n=i.match(/^\[(.+)\]$/),o=function(e,i){if(e)return function(t){return t.getAttribute(e)};return function(t){t=t.querySelector(i);return t&&t.textContent}}(n&&n[1],i),s=u.sortDataParsers[e[1]];return t=s?function(t){return t&&s(o(t))}:function(t){return t&&o(t)}};u.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},o._sort=function(){var t,r,a;this.options.sortBy&&(t=s.makeArray(this.options.sortBy),this._getIsSameSortBy(t)||(this.sortHistory=t.concat(this.sortHistory)),r=this.sortHistory,a=this.options.sortAscending,t=function(t,e){for(var i=0;i<r.length;i++){var n=r[i],o=t.sortData[n],s=e.sortData[n];if(s<o||o<s)return(s<o?1:-1)*((void 0!==a[n]?a[n]:a)?1:-1)}return 0},this.filteredItems.sort(t))},o._getIsSameSortBy=function(t){for(var e=0;e<t.length;e++)if(t[e]!=this.sortHistory[e])return!1;return!0},o._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw new Error("No layout mode: "+t);return e.options=this.options[t],e},o._resetLayout=function(){i.prototype._resetLayout.call(this),this._mode()._resetLayout()},o._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},o._manageStamp=function(t){this._mode()._manageStamp(t)},o._getContainerSize=function(){return this._mode()._getContainerSize()},o.needsResizeLayout=function(){return this._mode().needsResizeLayout()},o.appended=function(t){t=this.addItems(t);t.length&&(t=this._filterRevealAdded(t),this.filteredItems=this.filteredItems.concat(t))},o.prepended=function(t){var e=this._itemize(t);e.length&&(this._resetLayout(),this._manageStamps(),t=this._filterRevealAdded(e),this.layoutItems(this.filteredItems),this.filteredItems=t.concat(this.filteredItems),this.items=e.concat(this.items))},o._filterRevealAdded=function(t){t=this._filter(t);return this.hide(t.needHide),this.reveal(t.matches),this.layoutItems(t.matches,!0),t.matches},o.insert=function(t){var e=this.addItems(t);if(e.length){for(var i,n=e.length,o=0;o<n;o++)i=e[o],this.element.appendChild(i.element);t=this._filter(e).matches;for(o=0;o<n;o++)e[o].isLayoutInstant=!0;for(this.arrange(),o=0;o<n;o++)delete e[o].isLayoutInstant;this.reveal(t)}};var d=o.remove;return o.remove=function(t){t=s.makeArray(t);var e=this.getItems(t);d.call(this,t);for(var i=e&&e.length,n=0;i&&n<i;n++){var o=e[n];s.removeFrom(this.filteredItems,o)}},o.shuffle=function(){for(var t=0;t<this.items.length;t++)this.items[t].sortData.random=Math.random();this.options.sortBy="random",this._sort(),this._layout()},o._noTransition=function(t,e){var i=this.options.transitionDuration;this.options.transitionDuration=0;e=t.apply(this,e);return this.options.transitionDuration=i,e},o.getFilteredItemElements=function(){return this.filteredItems.map(function(t){return t.element})},u});
2
+ !function(t,i){t.Packery=t.Packery||{},t.Packery.Rect=i()}(window,function(){function a(t){for(var i in a.defaults)this[i]=a.defaults[i];for(i in t)this[i]=t[i]}a.defaults={x:0,y:0,width:0,height:0};var t=a.prototype;return t.contains=function(t){var i=t.width||0,e=t.height||0;return this.x<=t.x&&this.y<=t.y&&this.x+this.width>=t.x+i&&this.y+this.height>=t.y+e},t.overlaps=function(t){var i=this.x+this.width,e=this.y+this.height,s=t.x+t.width,h=t.y+t.height;return this.x<s&&i>t.x&&this.y<h&&e>t.y},t.getMaximalFreeRects=function(t){if(!this.overlaps(t))return!1;var i,e=[],s=this.x+this.width,h=this.y+this.height,n=t.x+t.width,r=t.y+t.height;return this.y<t.y&&(i=new a({x:this.x,y:this.y,width:this.width,height:t.y-this.y}),e.push(i)),n<s&&(i=new a({x:n,y:this.y,width:s-n,height:this.height}),e.push(i)),r<h&&(i=new a({x:this.x,y:r,width:this.width,height:h-r}),e.push(i)),this.x<t.x&&(i=new a({x:this.x,y:this.y,width:t.x-this.x,height:this.height}),e.push(i)),e},t.canFit=function(t){return this.width>=t.width&&this.height>=t.height},a}),function(t,i){t=t.Packery=t.Packery||{};t.Packer=i(t.Rect)}(window,function(i){function t(t,i,e){this.width=t||0,this.height=i||0,this.sortDirection=e||"downwardLeftToRight",this.reset()}var e=t.prototype;e.reset=function(){this.spaces=[];var t=new i({x:0,y:0,width:this.width,height:this.height});this.spaces.push(t),this.sorter=s[this.sortDirection]||s.downwardLeftToRight},e.pack=function(t){for(var i=0;i<this.spaces.length;i++){var e=this.spaces[i];if(e.canFit(t)){this.placeInSpace(t,e);break}}},e.columnPack=function(t){for(var i=0;i<this.spaces.length;i++){var e=this.spaces[i];if(e.x<=t.x&&e.x+e.width>=t.x+t.width&&e.height>=t.height-.01){t.y=e.y,this.placed(t);break}}},e.rowPack=function(t){for(var i=0;i<this.spaces.length;i++){var e=this.spaces[i];if(e.y<=t.y&&e.y+e.height>=t.y+t.height&&e.width>=t.width-.01){t.x=e.x,this.placed(t);break}}},e.placeInSpace=function(t,i){t.x=i.x,t.y=i.y,this.placed(t)},e.placed=function(t){for(var i=[],e=0;e<this.spaces.length;e++){var s=this.spaces[e],h=s.getMaximalFreeRects(t);h?i.push.apply(i,h):i.push(s)}this.spaces=i,this.mergeSortSpaces()},e.mergeSortSpaces=function(){t.mergeRects(this.spaces),this.spaces.sort(this.sorter)},e.addSpace=function(t){this.spaces.push(t),this.mergeSortSpaces()},t.mergeRects=function(t){var i=0,e=t[i];t:for(;e;){for(var s=0,h=t[i+s];h;){if(h==e)s++;else{if(h.contains(e)){t.splice(i,1),e=t[i];continue t}e.contains(h)?t.splice(i+s,1):s++}h=t[i+s]}e=t[++i]}return t};var s={downwardLeftToRight:function(t,i){return t.y-i.y||t.x-i.x},rightwardTopToBottom:function(t,i){return t.x-i.x||t.y-i.y}};return t}),function(t,i){t.Packery.Item=i(t.Outlayer,t.Packery.Rect)}(window,function(t,i){function e(){t.Item.apply(this,arguments)}var s="string"==typeof document.documentElement.style.transform?"transform":"WebkitTransform",h=e.prototype=Object.create(t.Item.prototype),n=h._create;h._create=function(){n.call(this),this.rect=new i};var r=h.moveTo;return h.moveTo=function(t,i){var e=Math.abs(this.position.x-t),s=Math.abs(this.position.y-i);this.layout.dragItemCount&&!this.isPlacing&&!this.isTransitioning&&e<1&&s<1?this.goTo(t,i):r.apply(this,arguments)},h.enablePlacing=function(){this.removeTransitionStyles(),this.isTransitioning&&s&&(this.element.style[s]="none"),this.isTransitioning=!1,this.getSize(),this.layout._setRectSize(this.element,this.rect),this.isPlacing=!0},h.disablePlacing=function(){this.isPlacing=!1},h.removeElem=function(){this.element.parentNode.removeChild(this.element),this.layout.packer.addSpace(this.rect),this.emitEvent("remove",[this])},h.showDropPlaceholder=function(){var t=this.dropPlaceholder;t||((t=this.dropPlaceholder=document.createElement("div")).className="packery-drop-placeholder",t.style.position="absolute"),t.style.width=this.size.width+"px",t.style.height=this.size.height+"px",this.positionDropPlaceholder(),this.layout.element.appendChild(t)},h.positionDropPlaceholder=function(){this.dropPlaceholder.style[s]="translate("+this.rect.x+"px, "+this.rect.y+"px)"},h.hideDropPlaceholder=function(){this.layout.element.removeChild(this.dropPlaceholder)},e}),function(t,i){t.Packery=i(t.getSize,t.Outlayer,t.Packery.Rect,t.Packery.Packer,t.Packery.Item)}(window,function(c,t,r,i,e){r.prototype.canFit=function(t){return this.width>=t.width-1&&this.height>=t.height-1};var s=t.create("packery");s.Item=e;e=s.prototype;function h(t,i){return t.position.y-i.position.y||t.position.x-i.position.x}function n(t,i){return t.position.x-i.position.x||t.position.y-i.position.y}e._create=function(){t.prototype._create.call(this),this.packer=new i,this.shiftPacker=new i,this.isEnabled=!0,this.dragItemCount=0;var e=this;this.handleDraggabilly={dragStart:function(){e.itemDragStart(this.element)},dragMove:function(){e.itemDragMove(this.element,this.position.x,this.position.y)},dragEnd:function(){e.itemDragEnd(this.element)}},this.handleUIDraggable={start:function(t,i){i&&e.itemDragStart(t.currentTarget)},drag:function(t,i){i&&e.itemDragMove(t.currentTarget,i.position.left,i.position.top)},stop:function(t,i){i&&e.itemDragEnd(t.currentTarget)}}},e._resetLayout=function(){var t,i,e;this.getSize(),this._getMeasurements(),e=this._getOption("horizontal")?(t=1/0,i=this.size.innerHeight+this.gutter,"rightwardTopToBottom"):(t=this.size.innerWidth+this.gutter,i=1/0,"downwardLeftToRight"),this.packer.width=this.shiftPacker.width=t,this.packer.height=this.shiftPacker.height=i,this.packer.sortDirection=this.shiftPacker.sortDirection=e,this.packer.reset(),this.maxY=0,this.maxX=0},e._getMeasurements=function(){this._getMeasurement("columnWidth","width"),this._getMeasurement("rowHeight","height"),this._getMeasurement("gutter","width")},e._getItemLayoutPosition=function(t){var i;return this._setRectSize(t.element,t.rect),this.isShifting||0<this.dragItemCount?(i=this._getPackMethod(),this.packer[i](t.rect)):this.packer.pack(t.rect),this._setMaxXY(t.rect),t.rect},e.shiftLayout=function(){this.isShifting=!0,this.layout(),delete this.isShifting},e._getPackMethod=function(){return this._getOption("horizontal")?"rowPack":"columnPack"},e._setMaxXY=function(t){this.maxX=Math.max(t.x+t.width,this.maxX),this.maxY=Math.max(t.y+t.height,this.maxY)},e._setRectSize=function(t,i){var e=c(t),t=e.outerWidth,e=e.outerHeight;(t||e)&&(t=this._applyGridGutter(t,this.columnWidth),e=this._applyGridGutter(e,this.rowHeight)),i.width=Math.min(t,this.packer.width),i.height=Math.min(e,this.packer.height)},e._applyGridGutter=function(t,i){if(!i)return t+this.gutter;var e=t%(i+=this.gutter);return t=Math[e&&e<1?"round":"ceil"](t/i)*i},e._getContainerSize=function(){return this._getOption("horizontal")?{width:this.maxX-this.gutter}:{height:this.maxY-this.gutter}},e._manageStamp=function(t){var i,e=this.getItem(t);i=e&&e.isPlacing?e.rect:(i=this._getElementOffset(t),new r({x:this._getOption("originLeft")?i.left:i.right,y:this._getOption("originTop")?i.top:i.bottom})),this._setRectSize(t,i),this.packer.placed(i),this._setMaxXY(i)},e.sortItemsByPosition=function(){var t=this._getOption("horizontal")?n:h;this.items.sort(t)},e.fit=function(t,i,e){t=this.getItem(t);t&&(this.stamp(t.element),t.enablePlacing(),this.updateShiftTargets(t),i=void 0===i?t.rect.x:i,e=void 0===e?t.rect.y:e,this.shift(t,i,e),this._bindFitEvents(t),t.moveTo(t.rect.x,t.rect.y),this.shiftLayout(),this.unstamp(t.element),this.sortItemsByPosition(),t.disablePlacing())},e._bindFitEvents=function(t){var i=this,e=0;function s(){2==++e&&i.dispatchEvent("fitComplete",null,[t])}t.once("layout",s),this.once("layoutComplete",s)},e.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&(this.options.shiftPercentResize?this.resizeShiftPercentLayout():this.layout())},e.needsResizeLayout=function(){var t=c(this.element),i=this._getOption("horizontal")?"innerHeight":"innerWidth";return t[i]!=this.size[i]},e.resizeShiftPercentLayout=function(){var e,i,s,t=this._getItemsForLayout(this.items),h=this._getOption("horizontal"),n=h?"y":"x",r=h?"height":"width",a=h?"rowHeight":"columnWidth",h=h?"innerHeight":"innerWidth",o=this[a];(o=o&&o+this.gutter)?(this._getMeasurements(),e=this[a]+this.gutter,t.forEach(function(t){var i=Math.round(t.rect[n]/o);t.rect[n]=i*e})):(i=c(this.element)[h]+this.gutter,s=this.packer[r],t.forEach(function(t){t.rect[n]=t.rect[n]/s*i})),this.shiftLayout()},e.itemDragStart=function(t){this.isEnabled&&(this.stamp(t),(t=this.getItem(t))&&(t.enablePlacing(),t.showDropPlaceholder(),this.dragItemCount++,this.updateShiftTargets(t)))},e.updateShiftTargets=function(t){this.shiftPacker.reset(),this._getBoundingRect();var e=this._getOption("originLeft"),s=this._getOption("originTop");this.stamps.forEach(function(t){var i=this.getItem(t);i&&i.isPlacing||(i=this._getElementOffset(t),i=new r({x:e?i.left:i.right,y:s?i.top:i.bottom}),this._setRectSize(t,i),this.shiftPacker.placed(i))},this);var o=this._getOption("horizontal"),i=o?"rowHeight":"columnWidth",c=o?"height":"width";this.shiftTargetKeys=[],this.shiftTargets=[];var g=this[i];if(g=g&&g+this.gutter)for(var i=Math.ceil(t.rect[c]/g),h=Math.floor((this.shiftPacker[c]+this.gutter)/g),u=(h-i)*g,n=0;n<h;n++)this._addShiftTarget(n*g,0,u);else u=this.shiftPacker[c]+this.gutter-t.rect[c],this._addShiftTarget(0,0,u);var t=this._getItemsForLayout(this.items),d=this._getPackMethod();t.forEach(function(t){var i=t.rect;this._setRectSize(t.element,i),this.shiftPacker[d](i),this._addShiftTarget(i.x,i.y,u);var e=o?i.x+i.width:i.x,s=o?i.y:i.y+i.height;if(this._addShiftTarget(e,s,u),g)for(var h=Math.round(i[c]/g),n=1;n<h;n++){var r=o?e:i.x+g*n,a=o?i.y+g*n:s;this._addShiftTarget(r,a,u)}},this)},e._addShiftTarget=function(t,i,e){var s=this._getOption("horizontal")?i:t;0!==s&&e<s||(s=t+","+i,-1!=this.shiftTargetKeys.indexOf(s)||(this.shiftTargetKeys.push(s),this.shiftTargets.push({x:t,y:i})))},e.shift=function(t,i,e){var h,n=1/0,r={x:i,y:e};this.shiftTargets.forEach(function(t){var i,e,s,i=(s=(e=r).x-(i=t).x,i=e.y-i.y,Math.sqrt(s*s+i*i));i<n&&(h=t,n=i)}),t.rect.x=h.x,t.rect.y=h.y};e.itemDragMove=function(t,i,e){var s,h=this.isEnabled&&this.getItem(t);function n(){s.shift(h,i,e),h.positionDropPlaceholder(),s.layout()}h&&(i-=this.size.paddingLeft,e-=this.size.paddingTop,s=this,t=new Date,this._itemDragTime&&t-this._itemDragTime<120?(clearTimeout(this.dragTimeout),this.dragTimeout=setTimeout(n,120)):(n(),this._itemDragTime=t))},e.itemDragEnd=function(t){var i,e,s=this.isEnabled&&this.getItem(t);function h(){2==++i&&(s.element.classList.remove("is-positioning-post-drag"),s.hideDropPlaceholder(),e.dispatchEvent("dragItemPositioned",null,[s]))}s&&(clearTimeout(this.dragTimeout),s.element.classList.add("is-positioning-post-drag"),i=0,e=this,s.once("layout",h),this.once("layoutComplete",h),s.moveTo(s.rect.x,s.rect.y),this.layout(),this.dragItemCount=Math.max(0,this.dragItemCount-1),this.sortItemsByPosition(),s.disablePlacing(),this.unstamp(s.element))},e.bindDraggabillyEvents=function(t){this._bindDraggabillyEvents(t,"on")},e.unbindDraggabillyEvents=function(t){this._bindDraggabillyEvents(t,"off")},e._bindDraggabillyEvents=function(t,i){var e=this.handleDraggabilly;t[i]("dragStart",e.dragStart),t[i]("dragMove",e.dragMove),t[i]("dragEnd",e.dragEnd)},e.bindUIDraggableEvents=function(t){this._bindUIDraggableEvents(t,"on")},e.unbindUIDraggableEvents=function(t){this._bindUIDraggableEvents(t,"off")},e._bindUIDraggableEvents=function(t,i){var e=this.handleUIDraggable;t[i]("dragstart",e.start)[i]("drag",e.drag)[i]("dragstop",e.stop)};var a=e.destroy;return e.destroy=function(){a.apply(this,arguments),this.isEnabled=!1},s.Rect=r,s.Packer=i,s}),function(t,i){i(t.ModulaIsotope.LayoutMode,t.Packery)}(window,function(t,i){var e,t=t.create("packery"),s=t.prototype,h={_getElementOffset:!0,_getMeasurement:!0};for(e in i.prototype)h[e]||(s[e]=i.prototype[e]);var n=s._resetLayout;s._resetLayout=function(){this.packer=this.packer||new i.Packer,this.shiftPacker=this.shiftPacker||new i.Packer,n.apply(this,arguments)};var r=s._getItemLayoutPosition;s._getItemLayoutPosition=function(t){return t.rect=t.rect||new i.Rect,r.call(this,t)};var a=s.needsResizeLayout;s.needsResizeLayout=function(){return this._getOption("horizontal")?this.needsVerticalResizeLayout():a.call(this)};var o=s._getOption;return s._getOption=function(t){return"horizontal"==t?void 0!==this.options.isHorizontal?this.options.isHorizontal:this.options.horizontal:o.apply(this.isotope,arguments)},t});
3
+ !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(i),i}:e(jQuery)}(function(g){function n(t,i){this.settings=i,this.checkSettings(),this.imgAnalyzerTimeout=null,this.entries=null,this.buildingRow={entriesBuff:[],width:0,height:0,aspectRatio:0},this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.yield={every:2,flushed:0},this.border=0<=i.border?i.border:i.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges(),this.offY=this.border,this.rows=0,this.spinner={phase:0,timeSlot:150,$el:g('<div class="jg-spinner"><span></span><span></span><span></span></div>'),intervalId:null},this.scrollBarOn=!1,this.checkWidthIntervalId=null,this.galleryWidth=t.width(),this.$gallery=t}n.prototype.getSuffix=function(t,i){for(var e=i<t?t:i,s=0;s<this.suffixRanges.length;s++)if(e<=this.suffixRanges[s])return this.settings.sizeRangeSuffixes[this.suffixRanges[s]];return this.settings.sizeRangeSuffixes[this.suffixRanges[s-1]]},n.prototype.removeSuffix=function(t,i){return t.substring(0,t.length-i.length)},n.prototype.endsWith=function(t,i){return-1!==t.indexOf(i,t.length-i.length)},n.prototype.getUsedSuffix=function(t){for(var i in this.settings.sizeRangeSuffixes)if(this.settings.sizeRangeSuffixes.hasOwnProperty(i)&&0!==this.settings.sizeRangeSuffixes[i].length&&this.endsWith(t,this.settings.sizeRangeSuffixes[i]))return this.settings.sizeRangeSuffixes[i];return""},n.prototype.newSrc=function(t,i,e,s){var n;return this.settings.thumbnailPath?n=this.settings.thumbnailPath(t,i,e,s):(s=null!==(s=t.match(this.settings.extension))?s[0]:"",n=t.replace(this.settings.extension,""),n=this.removeSuffix(n,this.getUsedSuffix(n)),n+=this.getSuffix(i,e)+s),n},n.prototype.showImg=function(t,i){this.settings.cssAnimation?(t.addClass("jg-entry-visible"),i&&i()):(t.stop().fadeTo(this.settings.imagesAnimationDuration,1,i),t.find(this.settings.imgSelector).stop().fadeTo(this.settings.imagesAnimationDuration,1,i))},n.prototype.extractImgSrcFromImage=function(t){var i=t.data("safe-src"),e="data-safe-src";return void 0===i&&(i=t.attr("src"),e="src"),t.data("jg.originalSrc",i),t.data("jg.src",i),t.data("jg.originalSrcLoc",e),i},n.prototype.imgFromEntry=function(t){t=t.find(this.settings.imgSelector);return 0===t.length?null:t},n.prototype.captionFromEntry=function(t){t=t.find("> .jg-caption");return 0===t.length?null:t},n.prototype.displayEntry=function(t,i,e,s,n,r){t.width(s),t.height(r),t.css("top",e),t.css("left",i);var o,a,h=this.imgFromEntry(t);null!==h?(h.css("width",s),h.css("height",n),h.css("margin-left",-s/2),h.css("margin-top",-n/2),(o=h.data("jg.src"))&&(o=this.newSrc(o,s,n,h[0]),h.one("error",function(){this.resetImgSrc(h)}),a=function(){h.attr("src",o)},"skipped"===t.data("jg.loaded")&&o?this.onImageEvent(o,function(){this.showImg(t,a),t.data("jg.loaded",!0)}.bind(this)):this.showImg(t,a))):this.showImg(t),this.displayEntryCaption(t)},n.prototype.displayEntryCaption=function(t){var i,e=this.imgFromEntry(t);null!==e&&this.settings.captions?(null===(i=this.captionFromEntry(t))&&(e=e.attr("alt"),this.isValidCaption(e)||(e=t.attr("title")),this.isValidCaption(e)&&(i=g('<div class="jg-caption">'+e+"</div>"),t.append(i),t.data("jg.createdCaption",!0))),null!==i&&(this.settings.cssAnimation||i.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity),this.addCaptionEventsHandlers(t))):this.removeCaptionEventsHandlers(t)},n.prototype.isValidCaption=function(t){return void 0!==t&&0<t.length},n.prototype.onEntryMouseEnterForCaption=function(t){t=this.captionFromEntry(g(t.currentTarget));this.settings.cssAnimation?t.addClass("jg-caption-visible").removeClass("jg-caption-hidden"):t.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.visibleOpacity)},n.prototype.onEntryMouseLeaveForCaption=function(t){t=this.captionFromEntry(g(t.currentTarget));this.settings.cssAnimation?t.removeClass("jg-caption-visible").removeClass("jg-caption-hidden"):t.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.nonVisibleOpacity)},n.prototype.addCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0===i&&(i={mouseenter:g.proxy(this.onEntryMouseEnterForCaption,this),mouseleave:g.proxy(this.onEntryMouseLeaveForCaption,this)},t.on("mouseenter",void 0,void 0,i.mouseenter),t.on("mouseleave",void 0,void 0,i.mouseleave),t.data("jg.captionMouseEvents",i))},n.prototype.removeCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0!==i&&(t.off("mouseenter",void 0,i.mouseenter),t.off("mouseleave",void 0,i.mouseleave),t.removeData("jg.captionMouseEvents"))},n.prototype.clearBuildingRow=function(){this.buildingRow.entriesBuff=[],this.buildingRow.aspectRatio=0,this.buildingRow.width=0},n.prototype.prepareBuildingRow=function(t,i){var e,s,n,r,o=!0,a=0,h=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,g=h/this.buildingRow.aspectRatio,l=this.settings.rowHeight,u=this.buildingRow.width/h>this.settings.justifyThreshold;if(i||t&&"hide"===this.settings.lastRow&&!u){for(e=0;e<this.buildingRow.entriesBuff.length;e++)s=this.buildingRow.entriesBuff[e],this.settings.cssAnimation?s.removeClass("jg-entry-visible"):(s.stop().fadeTo(0,.1),s.find("> img, > a > img").fadeTo(0,0));return-1}for(t&&!u&&"justify"!==this.settings.lastRow&&"hide"!==this.settings.lastRow&&(o=!1,0<this.rows&&(o=(l=(this.offY-this.border-this.settings.margins*this.rows)/this.rows)*this.buildingRow.aspectRatio/h>this.settings.justifyThreshold)),e=0;e<this.buildingRow.entriesBuff.length;e++)r=(s=this.buildingRow.entriesBuff[e]).data("jg.width")/s.data("jg.height"),r=o?(n=e===this.buildingRow.entriesBuff.length-1?h:g*r,g):(n=l*r,l),h-=Math.round(n),s.data("jg.jwidth",Math.round(n)),s.data("jg.jheight",Math.ceil(r)),(0===e||r<a)&&(a=r);return this.buildingRow.height=a,o},n.prototype.flushRow=function(t,i){var e,s=this.settings,n=this.border,r=this.prepareBuildingRow(t,i);if(i||t&&"hide"===s.lastRow&&-1===r)this.clearBuildingRow();else{if(this.maxRowHeight&&this.maxRowHeight<this.buildingRow.height&&(this.buildingRow.height=this.maxRowHeight),t&&("center"===s.lastRow||"right"===s.lastRow)){for(var o=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*s.margins,a=0;a<this.buildingRow.entriesBuff.length;a++)o-=(e=this.buildingRow.entriesBuff[a]).data("jg.jwidth");"center"===s.lastRow?n+=Math.round(o/2):"right"===s.lastRow&&(n+=o)}var h=this.buildingRow.entriesBuff.length-1;for(a=0;a<=h;a++)e=this.buildingRow.entriesBuff[this.settings.rtl?h-a:a],this.displayEntry(e,n,this.offY,e.data("jg.jwidth"),e.data("jg.jheight"),this.buildingRow.height),n+=e.data("jg.jwidth")+s.margins;this.galleryHeightToSet=this.offY+this.buildingRow.height+this.border,this.setGalleryTempHeight(this.galleryHeightToSet+this.getSpinnerHeight()),(!t||this.buildingRow.height<=s.rowHeight&&r)&&(this.offY+=this.buildingRow.height+s.margins,this.rows+=1,this.clearBuildingRow(),this.settings.triggerEvent.call(this,"jg.rowflush"))}};var i=0;n.prototype.rememberGalleryHeight=function(){i=this.$gallery.height(),this.$gallery.height(i)},n.prototype.setGalleryTempHeight=function(t){i=Math.max(t,i),this.$gallery.height(i)},n.prototype.setGalleryFinalHeight=function(t){i=t,this.$gallery.height(t)},n.prototype.checkWidth=function(){this.checkWidthIntervalId=setInterval(g.proxy(function(){var t;this.$gallery.is(":visible")&&(t=parseFloat(this.$gallery.width()),Math.abs(t-this.galleryWidth)>this.settings.refreshSensitivity&&(this.galleryWidth=t,this.rewind(),this.rememberGalleryHeight(),this.startImgAnalyzer(!0)))},this),this.settings.refreshTime)},n.prototype.isSpinnerActive=function(){return null!==this.spinner.intervalId},n.prototype.getSpinnerHeight=function(){return this.spinner.$el.innerHeight()},n.prototype.stopLoadingSpinnerAnimation=function(){clearInterval(this.spinner.intervalId),this.spinner.intervalId=null,this.setGalleryTempHeight(this.$gallery.height()-this.getSpinnerHeight()),this.spinner.$el.detach()},n.prototype.startLoadingSpinnerAnimation=function(){var t=this.spinner,i=t.$el.find("span");clearInterval(t.intervalId),this.$gallery.append(t.$el),this.setGalleryTempHeight(this.offY+this.buildingRow.height+this.getSpinnerHeight()),t.intervalId=setInterval(function(){t.phase<i.length?i.eq(t.phase).fadeTo(t.timeSlot,1):i.eq(t.phase-i.length).fadeTo(t.timeSlot,0),t.phase=(t.phase+1)%(2*i.length)},t.timeSlot)},n.prototype.rewind=function(){this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.offY=this.border,this.rows=0,this.clearBuildingRow()},n.prototype.getSelectorWithoutSpinner=function(){return this.settings.selector+", div:not(.jg-spinner)"},n.prototype.getAllEntries=function(){var t=this.getSelectorWithoutSpinner();return this.$gallery.children(t).toArray()},n.prototype.updateEntries=function(t){var i;return 0<(i=t&&null!=this.lastFetchedEntry?(i=this.getSelectorWithoutSpinner(),g(this.lastFetchedEntry).nextAll(i).toArray()):(this.entries=[],this.getAllEntries())).length&&(g.isFunction(this.settings.sort)?i=this.sortArray(i):this.settings.randomize&&(i=this.shuffleArray(i)),this.lastFetchedEntry=i[i.length-1],this.settings.filter?i=this.filterArray(i):this.resetFilters(i)),this.entries=this.entries.concat(i),!0},n.prototype.insertToGallery=function(t){var i=this;g.each(t,function(){g(this).appendTo(i.$gallery)})},n.prototype.shuffleArray=function(t){for(var i,e,s=t.length-1;0<s;s--)i=Math.floor(Math.random()*(s+1)),e=t[s],t[s]=t[i],t[i]=e;return this.insertToGallery(t),t},n.prototype.sortArray=function(t){return t.sort(this.settings.sort),this.insertToGallery(t),t},n.prototype.resetFilters=function(t){for(var i=0;i<t.length;i++)g(t[i]).removeClass("jg-filtered")},n.prototype.filterArray=function(t){var i=this.settings;if("string"===g.type(i.filter))return t.filter(function(t){t=g(t);return t.is(i.filter)?(t.removeClass("jg-filtered"),!0):(t.addClass("jg-filtered").removeClass("jg-visible"),!1)});if(g.isFunction(i.filter)){for(var e=t.filter(i.filter),s=0;s<t.length;s++)-1===e.indexOf(t[s])?g(t[s]).addClass("jg-filtered").removeClass("jg-visible"):g(t[s]).removeClass("jg-filtered");return e}},n.prototype.resetImgSrc=function(t){"src"===t.data("jg.originalSrcLoc")?t.attr("src",t.data("jg.originalSrc")):t.attr("src","")},n.prototype.destroy=function(){clearInterval(this.checkWidthIntervalId),this.stopImgAnalyzerStarter(),g.each(this.getAllEntries(),g.proxy(function(t,i){var e=g(i);e.css("width",""),e.css("height",""),e.css("top",""),e.css("left",""),e.data("jg.loaded",void 0),e.removeClass("jg-entry jg-filtered jg-entry-visible");i=this.imgFromEntry(e);i&&(i.css("width",""),i.css("height",""),i.css("margin-left",""),i.css("margin-top",""),this.resetImgSrc(i),i.data("jg.originalSrc",void 0),i.data("jg.originalSrcLoc",void 0),i.data("jg.src",void 0)),this.removeCaptionEventsHandlers(e);i=this.captionFromEntry(e);e.data("jg.createdCaption")?(e.data("jg.createdCaption",void 0),null!==i&&i.remove()):null!==i&&i.fadeTo(0,1)},this)),this.$gallery.css("height",""),this.$gallery.removeClass("justified-gallery"),this.$gallery.data("jg.controller",void 0),this.settings.triggerEvent.call(this,"jg.destroy")},n.prototype.analyzeImages=function(t){for(var i=this.lastAnalyzedIndex+1;i<this.entries.length;i++){var e=g(this.entries[i]);if(!0===e.data("jg.loaded")||"skipped"===e.data("jg.loaded")){var s=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,n=e.data("jg.width")/e.data("jg.height");if(this.buildingRow.entriesBuff.push(e),this.buildingRow.aspectRatio+=n,this.buildingRow.width+=n*this.settings.rowHeight,this.lastAnalyzedIndex=i,s/(this.buildingRow.aspectRatio+n)<this.settings.rowHeight&&(this.flushRow(!1,0<this.settings.maxRowsCount&&this.rows===this.settings.maxRowsCount),++this.yield.flushed>=this.yield.every))return void this.startImgAnalyzer(t)}else if("error"!==e.data("jg.loaded"))return}0<this.buildingRow.entriesBuff.length&&this.flushRow(!0,0<this.settings.maxRowsCount&&this.rows===this.settings.maxRowsCount),this.isSpinnerActive()&&this.stopLoadingSpinnerAnimation(),this.stopImgAnalyzerStarter(),this.setGalleryFinalHeight(this.galleryHeightToSet),this.settings.triggerEvent.call(this,t?"jg.resize":"jg.complete")},n.prototype.stopImgAnalyzerStarter=function(){this.yield.flushed=0,null!==this.imgAnalyzerTimeout&&(clearTimeout(this.imgAnalyzerTimeout),this.imgAnalyzerTimeout=null)},n.prototype.startImgAnalyzer=function(t){var i=this;this.stopImgAnalyzerStarter(),this.imgAnalyzerTimeout=setTimeout(function(){i.analyzeImages(t)},.001)},n.prototype.onImageEvent=function(t,i,e){var s,n;(i||e)&&(s=new Image,n=g(s),i&&n.one("load",function(){n.off("load error"),i(s)}),e&&n.one("error",function(){n.off("load error"),e(s)}),s.src=t)},n.prototype.init=function(){var o=!1,a=!1,h=this;g.each(this.entries,function(t,i){var e=g(i),s=h.imgFromEntry(e);if(e.addClass("jg-entry"),!0!==e.data("jg.loaded")&&"skipped"!==e.data("jg.loaded"))if(null!==h.settings.rel&&e.attr("rel",h.settings.rel),null!==h.settings.target&&e.attr("target",h.settings.target),null!==s){var n=h.extractImgSrcFromImage(s);if(!1===h.settings.waitThumbnailsLoad||!n){var r=parseFloat(s.attr("width")),i=parseFloat(s.attr("height"));if("svg"===s.prop("tagName")&&(r=parseFloat(s[0].getBBox().width),i=parseFloat(s[0].getBBox().height)),!isNaN(r)&&!isNaN(i))return e.data("jg.width",r),e.data("jg.height",i),e.data("jg.loaded","skipped"),a=!0,h.startImgAnalyzer(!1),!0}e.data("jg.loaded",!1),o=!0,h.isSpinnerActive()||h.startLoadingSpinnerAnimation(),h.onImageEvent(n,function(t){e.data("jg.width",t.width),e.data("jg.height",t.height),e.data("jg.loaded",!0),h.startImgAnalyzer(!1)},function(){e.data("jg.loaded","error"),h.startImgAnalyzer(!1)})}else e.data("jg.loaded",!0),e.data("jg.width",e.width()|parseFloat(e.css("width"))|1),e.data("jg.height",e.height()|parseFloat(e.css("height"))|1)}),o||a||this.startImgAnalyzer(!1),this.checkWidth()},n.prototype.checkOrConvertNumber=function(t,i){if("string"===g.type(t[i])&&(t[i]=parseFloat(t[i])),"number"!==g.type(t[i]))throw i+" must be a number";if(isNaN(t[i]))throw"invalid number for "+i},n.prototype.checkSizeRangesSuffixes=function(){if("object"!==g.type(this.settings.sizeRangeSuffixes))throw"sizeRangeSuffixes must be defined and must be an object";var t,i=[];for(t in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(t)&&i.push(t);for(var e={0:""},s=0;s<i.length;s++)if("string"===g.type(i[s]))try{e[parseInt(i[s].replace(/^[a-z]+/,""),10)]=this.settings.sizeRangeSuffixes[i[s]]}catch(t){throw"sizeRangeSuffixes keys must contains correct numbers ("+t+")"}else e[i[s]]=this.settings.sizeRangeSuffixes[i[s]];this.settings.sizeRangeSuffixes=e},n.prototype.retrieveMaxRowHeight=function(){var t=null,i=this.settings.rowHeight;if("string"===g.type(this.settings.maxRowHeight))t=this.settings.maxRowHeight.match(/^[0-9]+%$/)?i*parseFloat(this.settings.maxRowHeight.match(/^([0-9]+)%$/)[1])/100:parseFloat(this.settings.maxRowHeight);else{if("number"!==g.type(this.settings.maxRowHeight)){if(!1===this.settings.maxRowHeight||null==this.settings.maxRowHeight)return null;throw"maxRowHeight must be a number or a percentage"}t=this.settings.maxRowHeight}if(isNaN(t))throw"invalid number for maxRowHeight";return t<i&&(t=i),t},n.prototype.checkSettings=function(){this.checkSizeRangesSuffixes(),this.checkOrConvertNumber(this.settings,"rowHeight"),this.checkOrConvertNumber(this.settings,"margins"),this.checkOrConvertNumber(this.settings,"border"),this.checkOrConvertNumber(this.settings,"maxRowsCount");var t=["justify","nojustify","left","center","right","hide"];if(-1===t.indexOf(this.settings.lastRow))throw"lastRow must be one of: "+t.join(", ");if(this.checkOrConvertNumber(this.settings,"justifyThreshold"),this.settings.justifyThreshold<0||1<this.settings.justifyThreshold)throw"justifyThreshold must be in the interval [0,1]";if("boolean"!==g.type(this.settings.cssAnimation))throw"cssAnimation must be a boolean";if("boolean"!==g.type(this.settings.captions))throw"captions must be a boolean";if(this.checkOrConvertNumber(this.settings.captionSettings,"animationDuration"),this.checkOrConvertNumber(this.settings.captionSettings,"visibleOpacity"),this.settings.captionSettings.visibleOpacity<0||1<this.settings.captionSettings.visibleOpacity)throw"captionSettings.visibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings.captionSettings,"nonVisibleOpacity"),this.settings.captionSettings.nonVisibleOpacity<0||1<this.settings.captionSettings.nonVisibleOpacity)throw"captionSettings.nonVisibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings,"imagesAnimationDuration"),this.checkOrConvertNumber(this.settings,"refreshTime"),this.checkOrConvertNumber(this.settings,"refreshSensitivity"),"boolean"!==g.type(this.settings.randomize))throw"randomize must be a boolean";if("string"!==g.type(this.settings.selector))throw"selector must be a string";if(!1!==this.settings.sort&&!g.isFunction(this.settings.sort))throw"sort must be false or a comparison function";if(!1!==this.settings.filter&&!g.isFunction(this.settings.filter)&&"string"!==g.type(this.settings.filter))throw"filter must be false, a string or a filter function"},n.prototype.retrieveSuffixRanges=function(){var t,i=[];for(t in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(t)&&i.push(parseInt(t,10));return i.sort(function(t,i){return i<t?1:t<i?-1:0}),i},n.prototype.updateSettings=function(t){this.settings=g.extend({},this.settings,t),this.checkSettings(),this.border=0<=this.settings.border?this.settings.border:this.settings.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges()},n.prototype.defaults={sizeRangeSuffixes:{},thumbnailPath:void 0,rowHeight:120,maxRowHeight:!1,maxRowsCount:0,margins:1,border:-1,lastRow:"nojustify",justifyThreshold:.9,waitThumbnailsLoad:!0,captions:!0,cssAnimation:!0,imagesAnimationDuration:500,captionSettings:{animationDuration:500,visibleOpacity:.7,nonVisibleOpacity:0},rel:null,target:null,extension:/\.[^.\\/]+$/,refreshTime:200,refreshSensitivity:0,randomize:!1,rtl:!1,sort:!1,filter:!1,selector:"a",imgSelector:"> img, > a > img, > svg, > a > svg",triggerEvent:function(t){this.$gallery.trigger(t)}},g.fn.justifiedGallery=function(s){return this.each(function(t,i){var e=g(i);e.addClass("justified-gallery");i=e.data("jg.controller");if(void 0===i){if(null!=s&&"object"!==g.type(s)){if("destroy"===s)return;throw"The argument must be an object"}i=new n(e,g.extend({},n.prototype.defaults,s)),e.data("jg.controller",i)}else if("norewind"!==s){if("destroy"===s)return void i.destroy();i.updateSettings(s),i.rewind()}i.updateEntries("norewind"===s)&&i.init()})}});
4
+ !function(l,s,f,m){"use strict";var a,i,r,d,e,c,p,u,n,t,o,h,g;function b(t,e){var o,n,a,i=[],s=0;t&&t.isDefaultPrevented()||(t.preventDefault(),e=e||{},t&&t.data&&(e=u(t.data.options,e)),o=e.$target||f(t.currentTarget).trigger("blur"),(a=f.modulaFancybox.getInstance())&&a.$trigger&&a.$trigger.is(o)||(i=e.selector?f(e.selector):(n=o.attr("data-fancybox")||"")?(i=t.data?t.data.items:[]).length?i.filter('[data-fancybox="'+n+'"]'):f('[data-fancybox="'+n+'"]'):[o],(s=f(i).index(o))<0&&(s=0),(a=f.modulaFancybox.open(i,e,s)).$trigger=o))}l.console=l.console||{info:function(t){}},f&&(f.fn.modulaFancybox?console.info("fancyBox already initialized"):(t={closeExisting:!1,loop:!1,gutter:50,keyboard:!0,preventCaptionOverlap:!0,arrows:!0,infobar:!0,smallBtn:"auto",toolbar:"auto",buttons:["zoom","slideShow","thumbs","close"],idleTime:3,protect:!1,modal:!1,image:{preload:!1},ajax:{settings:{data:{fancybox:!0}}},iframe:{tpl:'<iframe id="modula-fancybox-frame{rnd}" name="modula-fancybox-frame{rnd}" class="modula-fancybox-iframe" allowfullscreen="allowfullscreen" allow="autoplay; fullscreen" src=""></iframe>',preload:!0,css:{},attr:{scrolling:"auto"}},video:{tpl:'<video class="modula-fancybox-video" controls controlsList="nodownload" poster="{{poster}}"><source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos, <a href="{{src}}">download</a> and watch with your favorite video player!</video>',format:"",autoStart:!0},defaultType:"image",animationEffect:"zoom",animationDuration:366,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",baseTpl:'<div class="modula-fancybox-container" role="dialog" tabindex="-1"><div class="modula-fancybox-bg"></div><div class="modula-fancybox-inner"><div class="modula-fancybox-infobar"><span data-fancybox-index></span>&nbsp;/&nbsp;<span data-fancybox-count></span></div><div class="modula-fancybox-toolbar">{{buttons}}</div><div class="modula-fancybox-navigation">{{arrows}}</div><div class="modula-fancybox-stage"></div><div class="modula-fancybox-caption"><div class="modula-fancybox-caption__body"></div></div></div></div>',spinnerTpl:'<div class="modula-fancybox-loading"></div>',errorTpl:'<div class="modula-fancybox-error"><p>{{ERROR}}</p></div>',btnTpl:{download:'<a download data-fancybox-download class="modula-fancybox-button modula-fancybox-button--download" title="{{DOWNLOAD}}" href="javascript:;"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.62 17.09V19H5.38v-1.91zm-2.97-6.96L17 11.45l-5 4.87-5-4.87 1.36-1.32 2.68 2.64V5h1.92v7.77z"/></svg></a>',zoom:'<button data-fancybox-zoom class="modula-fancybox-button modula-fancybox-button--zoom" title="{{ZOOM}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.7 17.3l-3-3a5.9 5.9 0 0 0-.6-7.6 5.9 5.9 0 0 0-8.4 0 5.9 5.9 0 0 0 0 8.4 5.9 5.9 0 0 0 7.7.7l3 3a1 1 0 0 0 1.3 0c.4-.5.4-1 0-1.5zM8.1 13.8a4 4 0 0 1 0-5.7 4 4 0 0 1 5.7 0 4 4 0 0 1 0 5.7 4 4 0 0 1-5.7 0z"/></svg></button>',close:'<button data-fancybox-close class="modula-fancybox-button modula-fancybox-button--close" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 10.6L6.6 5.2 5.2 6.6l5.4 5.4-5.4 5.4 1.4 1.4 5.4-5.4 5.4 5.4 1.4-1.4-5.4-5.4 5.4-5.4-1.4-1.4-5.4 5.4z"/></svg></button>',arrowLeft:'<button data-fancybox-prev class="modula-fancybox-button modula-fancybox-button--arrow_left" title="{{PREV}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.28 15.7l-1.34 1.37L5 12l4.94-5.07 1.34 1.38-2.68 2.72H19v1.94H8.6z"/></svg></div></button>',arrowRight:'<button data-fancybox-next class="modula-fancybox-button modula-fancybox-button--arrow_right" title="{{NEXT}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.4 12.97l-2.68 2.72 1.34 1.38L19 12l-4.94-5.07-1.34 1.38 2.68 2.72H5v1.94z"/></svg></div></button>',smallBtn:'<button type="button" data-fancybox-close class="modula-fancybox-button modula-fancybox-close-small" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" version="1" viewBox="0 0 24 24"><path d="M13 12l5-5-1-1-5 5-5-5-1 1 5 5-5 5 1 1 5-5 5 5 1-1z"/></svg></button>'},modulaShare:["facebook","twitter","pinterest","whatsapp","linkedin","email"],shareBtnTpl:{facebook:'<a class="modula-fancybox-share__button modula-fancybox-share__button--fb" href="https://www.facebook.com/sharer/sharer.php?u={{modulaShareUrl}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196" /></svg><span>Facebook</span></a>',twitter:'<a class="modula-fancybox-share__button modula-fancybox-share__button--tw" href="https://twitter.com/intent/tweet?url={{modulaShareUrl}}&text={{descr}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z" /></svg><span>Twitter</span></a>',pinterest:'<a class="modula-fancybox-share__button modula-fancybox-share__button--pt" href="https://www.pinterest.com/pin/create/button/?url={{modulaShareUrl}}&description={{descr}}&media={{media}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z" fill="#fff"/></svg><span>Pinterest</span></a>',whatsapp:'<a class="modula-fancybox-share__button modula-fancybox-share__button--wa" href="https://api.whatsapp.com/send?text={{modulaShareUrl}}&review_url=true"><svg aria-hidden="true" focusable="false" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);" preserveAspectRatio="xMidYMid meet" viewBox="0 0 1536 1600"><path d="M985 878q13 0 97.5 44t89.5 53q2 5 2 15q0 33-17 76q-16 39-71 65.5T984 1158q-57 0-190-62q-98-45-170-118T476 793q-72-107-71-194v-8q3-91 74-158q24-22 52-22q6 0 18 1.5t19 1.5q19 0 26.5 6.5T610 448q8 20 33 88t25 75q0 21-34.5 57.5T599 715q0 7 5 15q34 73 102 137q56 53 151 101q12 7 22 7q15 0 54-48.5t52-48.5zm-203 530q127 0 243.5-50t200.5-134t134-200.5t50-243.5t-50-243.5T1226 336t-200.5-134T782 152t-243.5 50T338 336T204 536.5T154 780q0 203 120 368l-79 233l242-77q158 104 345 104zm0-1382q153 0 292.5 60T1315 247t161 240.5t60 292.5t-60 292.5t-161 240.5t-240.5 161t-292.5 60q-195 0-365-94L0 1574l136-405Q28 991 28 780q0-153 60-292.5T249 247T489.5 86T782 26z" fill="currentColor"/></svg><span>WhatsApp</span></a>',linkedin:'<a class="modula-fancybox-share__button modula-fancybox-share__button--li" href="//linkedin.com/shareArticle?mini=true&url={{modulaShareUrl}}"><svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="linkedin-in" class="svg-inline--fa fa-linkedin-in fa-w-14" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z"></path></svg><span>LinkedIn</span></a>',email:'<a class="modula-fancybox-share__button modula-fancybox-share__button--email" href="mailto:?subject={{subject}}&body={{emailMessage}}"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 3v18h24v-18h-24zm6.623 7.929l-4.623 5.712v-9.458l4.623 3.746zm-4.141-5.929h19.035l-9.517 7.713-9.518-7.713zm5.694 7.188l3.824 3.099 3.83-3.104 5.612 6.817h-18.779l5.513-6.812zm9.208-1.264l4.616-3.741v9.348l-4.616-5.607z" fill="currentColor"></path></svg><span>Email</span></a>'},parentEl:"body",hideScrollbar:!0,autoFocus:!0,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:3e3},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".modula-fancybox-container",axis:"y"},wheel:"auto",onInit:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeClose:f.noop,afterClose:f.noop,onActivate:f.noop,onDeactivate:f.noop,clickContent:function(t,e){return"image"===t.type&&"zoom"},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{preventCaptionOverlap:!1,idleTime:!1,clickContent:function(t,e){return"image"===t.type&&"toggleControls"},clickSlide:function(t,e){return"image"===t.type?"toggleControls":"close"},dblclickContent:function(t,e){return"image"===t.type&&"zoom"},dblclickSlide:function(t,e){return"image"===t.type&&"zoom"}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded. <br/> Please try again later.",PLAY_START:"Start slideshow",PLAY_STOP:"Pause slideshow",FULL_SCREEN:"Full screen",THUMBS:"Thumbnails",DOWNLOAD:"Download",SHARE:"Share",ZOOM:"Zoom"},de:{CLOSE:"Schlie&szlig;en",NEXT:"Weiter",PREV:"Zur&uuml;ck",ERROR:"Die angeforderten Daten konnten nicht geladen werden. <br/> Bitte versuchen Sie es sp&auml;ter nochmal.",PLAY_START:"Diaschau starten",PLAY_STOP:"Diaschau beenden",FULL_SCREEN:"Vollbild",THUMBS:"Vorschaubilder",DOWNLOAD:"Herunterladen",SHARE:"Teilen",ZOOM:"Vergr&ouml;&szlig;ern"}}},a=f(l),i=f(s),r=0,d=l.requestAnimationFrame||l.webkitRequestAnimationFrame||l.mozRequestAnimationFrame||l.oRequestAnimationFrame||function(t){return l.setTimeout(t,1e3/60)},e=l.cancelAnimationFrame||l.webkitCancelAnimationFrame||l.mozCancelAnimationFrame||l.oCancelAnimationFrame||function(t){l.clearTimeout(t)},c=function(){var t,e=s.createElement("fakeelement"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in o)if(e.style[t]!==m)return o[t];return"transitionend"}(),p=function(t){return t&&t.length&&t[0].offsetHeight},u=function(t,e){var o=f.extend(!0,{},t,e);return f.each(e,function(t,e){f.isArray(e)&&(o[t]=e)}),o},n=function(t,e,o){var n=this;n.opts=u({index:o},f.modulaFancybox.defaults),f.isPlainObject(e)&&(n.opts=u(n.opts,e)),f.modulaFancybox.isMobile&&(n.opts=u(n.opts,n.opts.mobile)),n.id=n.opts.id||++r,n.currIndex=parseInt(n.opts.index,10)||0,n.prevIndex=null,n.prevPos=null,n.currPos=0,n.firstRun=!0,n.group=[],n.slides={},n.addContent(t),n.group.length&&n.init()},f.extend(n.prototype,{init:function(){var o=this;o.currIndex<0&&(o.currIndex=0),void 0===o.group[o.currIndex]&&jQuery.each(this.group,function(t,e){o.currIndex==parseInt(e.opts.image_id)&&(o.currIndex=t)});var e,n,a=o.group[o.currIndex].opts;a.closeExisting&&f.modulaFancybox.close(!0),f("body").addClass("modula-fancybox-active"),!f.modulaFancybox.getInstance()&&!1!==a.hideScrollbar&&!f.modulaFancybox.isMobile&&s.body.scrollHeight>l.innerHeight&&(f("head").append('<style id="modula-fancybox-style-noscroll" type="text/css">.compensate-for-scrollbar{margin-right:'+(l.innerWidth-s.documentElement.clientWidth)+"px;}</style>"),f("body").addClass("compensate-for-scrollbar")),n="",f.each(a.buttons,function(t,e){n+=a.btnTpl[e]||""}),e=f(o.translate(o,a.baseTpl.replace("{{buttons}}",n).replace("{{arrows}}",a.btnTpl.arrowLeft+a.btnTpl.arrowRight))).attr("id","modula-fancybox-container-"+o.id).addClass(a.baseClass).data("modulaFancyBox",o).appendTo(a.parentEl),o.$refs={container:e},["bg","inner","infobar","toolbar","stage","caption","navigation"].forEach(function(t){o.$refs[t]=e.find(".modula-fancybox-"+t)}),o.trigger("onInit"),o.activate(),o.jumpTo(o.currIndex)},translate:function(t,e){var o=t.opts.i18n[t.opts.lang]||t.opts.i18n.en;return e.replace(/\{\{(\w+)\}\}/g,function(t,e){return o[e]===m?t:o[e]})},addContent:function(t){var r=this,t=f.makeArray(t);f.each(t,function(t,e){var o,n,a,i={},s={};f.isPlainObject(e)?s=(i=e).opts||e:"object"===f.type(e)&&f(e).length?(s=(n=f(e)).data()||{},(s=f.extend(!0,{},s,s.options)).$orig=n,i.src=r.opts.src||s.src||n.attr("href"),i.type||i.src||(i.type="inline",i.src=e)):i={type:"html",src:e+""},i.opts=f.extend(!0,{},r.opts,s),f.isArray(s.buttons)&&(i.opts.buttons=s.buttons),f.modulaFancybox.isMobile&&i.opts.mobile&&(i.opts=u(i.opts,i.opts.mobile)),o=i.type||i.opts.type,n=i.src||"",!o&&n&&((s=n.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(o="video",i.opts.video.format||(i.opts.video.format="video/"+("ogv"===s[1]?"ogg":s[1]))):n.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?o="image":n.match(/\.(pdf)((\?|#).*)?$/i)?(o="iframe",i=f.extend(!0,i,{contentType:"pdf",opts:{iframe:{preload:!1}}})):"#"===n.charAt(0)&&(o="inline")),o?i.type=o:r.trigger("objectNeedsType",i),i.contentType||(i.contentType=-1<f.inArray(i.type,["html","inline","ajax"])?"html":i.type),i.index=r.group.length,"auto"==i.opts.smallBtn&&(i.opts.smallBtn=-1<f.inArray(i.type,["html","inline","ajax"])),"auto"===i.opts.toolbar&&(i.opts.toolbar=!i.opts.smallBtn),i.$thumb=i.opts.$thumb||null,i.opts.$trigger&&i.index===r.opts.index&&(i.$thumb=i.opts.$trigger.find("img:first"),i.$thumb.length&&(i.opts.$orig=i.opts.$trigger)),i.$thumb&&i.$thumb.length||!i.opts.$orig||(i.$thumb=i.opts.$orig.find("img:first")),i.$thumb&&!i.$thumb.length&&(i.$thumb=null),i.thumb=i.opts.thumb||(i.$thumb?i.$thumb[0].src:null),"function"===f.type(i.opts.caption)&&(i.opts.caption=i.opts.caption.apply(e,[r,i])),"function"===f.type(r.opts.caption)&&(i.opts.caption=r.opts.caption.apply(e,[r,i])),i.opts.caption instanceof f||(i.opts.caption=i.opts.caption===m?"":i.opts.caption+""),"ajax"===i.type&&1<(a=n.split(/\s+/,2)).length&&(i.src=a.shift(),i.opts.filter=a.shift()),i.opts.modal&&(i.opts=f.extend(!0,i.opts,{trapFocus:!0,infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),r.group.push(i)}),Object.keys(r.slides).length&&(r.updateControls(),(t=r.Thumbs)&&t.isActive&&(t.create(),t.focus()))},addEvents:function(){var n=this;n.removeEvents(),n.$refs.container.on("click.fb-close","[data-fancybox-close]",function(t){t.stopPropagation(),t.preventDefault(),n.close(t)}).on("touchstart.fb-prev click.fb-prev","[data-fancybox-prev]",function(t){t.stopPropagation(),t.preventDefault(),n.previous()}).on("touchstart.fb-next click.fb-next","[data-fancybox-next]",function(t){t.stopPropagation(),t.preventDefault(),n.next()}).on("click.fb","[data-fancybox-zoom]",function(t){n[n.isScaledDown()?"scaleToActual":"scaleToFit"]()}),a.on("orientationchange.fb resize.fb",function(t){t&&t.originalEvent&&"resize"===t.originalEvent.type?(n.requestId&&e(n.requestId),n.requestId=d(function(){n.update(t)})):(n.current&&"iframe"===n.current.type&&n.$refs.stage.hide(),setTimeout(function(){n.$refs.stage.show(),n.update(t)},f.modulaFancybox.isMobile?600:250))}),i.on("keydown.fb",function(t){var e=(f.modulaFancybox?f.modulaFancybox.getInstance():null).current,o=t.keyCode||t.which;if(9!=o){if(!(!e.opts.keyboard||t.ctrlKey||t.altKey||t.shiftKey||f(t.target).is("input,textarea,video,audio,select")))return 8===o||27===o?(t.preventDefault(),void n.close(t)):37===o||38===o?(t.preventDefault(),void n.previous()):39===o||40===o?(t.preventDefault(),void n.next()):void n.trigger("afterKeydown",t,o)}else e.opts.trapFocus&&n.focus(t)}),n.group[n.currIndex].opts.idleTime&&(n.idleSecondsCounter=0,i.on("mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle",function(t){n.idleSecondsCounter=0,n.isIdle&&n.showControls(),n.isIdle=!1}),n.idleInterval=l.setInterval(function(){n.idleSecondsCounter++,n.idleSecondsCounter>=n.group[n.currIndex].opts.idleTime&&!n.isDragging&&(n.isIdle=!0,n.idleSecondsCounter=0,n.hideControls())},1e3))},removeEvents:function(){a.off("orientationchange.fb resize.fb"),i.off("keydown.fb .fb-idle"),this.$refs.container.off(".fb-close .fb-prev .fb-next"),this.idleInterval&&(l.clearInterval(this.idleInterval),this.idleInterval=null)},previous:function(t){return this.jumpTo(this.currPos-1,t)},next:function(t){return this.jumpTo(this.currPos+1,t)},jumpTo:function(t,n){var e,o,a,i,s,r,l,c,d=this,u=d.group.length;if(!(d.isDragging||d.isClosing||d.isAnimating&&d.firstRun))return t=parseInt(t,10),!(!(o=(d.current||d).opts.loop)&&(t<0||u<=t))&&(e=d.firstRun=!Object.keys(d.slides).length,i=d.current,d.prevIndex=d.currIndex,d.prevPos=d.currPos,a=d.createSlide(t),1<u&&((o||a.index<u-1)&&d.createSlide(t+1),(o||0<a.index)&&d.createSlide(t-1)),d.current=a,d.currIndex=a.index,d.currPos=a.pos,d.trigger("beforeShow",e),d.updateControls(),a.forcedDuration=m,f.isNumeric(n)?a.forcedDuration=n:n=a.opts[e?"animationDuration":"transitionDuration"],n=parseInt(n,10),t=d.isMoved(a),a.$slide.addClass("modula-fancybox-slide--current"),e?(a.opts.animationEffect&&n&&d.$refs.container.css("transition-duration",n+"ms"),d.$refs.container.addClass("modula-fancybox-is-open").trigger("focus"),d.loadSlide(a)):(s=f.modulaFancybox.getTranslate(i.$slide),r=f.modulaFancybox.getTranslate(d.$refs.stage),f.each(d.slides,function(t,e){f.modulaFancybox.stop(e.$slide,!0)}),i.pos!==a.pos&&(i.isComplete=!1),i.$slide.removeClass("modula-fancybox-slide--complete modula-fancybox-slide--current"),t?(c=s.left-(i.pos*s.width+i.pos*i.opts.gutter),f.each(d.slides,function(t,e){e.$slide.removeClass("modula-fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)modula-fancybox-fx-\S+/g)||[]).join(" ")});var o=e.pos*s.width+e.pos*e.opts.gutter;f.modulaFancybox.setTranslate(e.$slide,{top:0,left:o-r.left+c}),e.pos!==a.pos&&e.$slide.addClass("modula-fancybox-slide--"+(e.pos>a.pos?"next":"previous")),p(e.$slide),f.modulaFancybox.animate(e.$slide,{top:0,left:(e.pos-a.pos)*s.width+(e.pos-a.pos)*e.opts.gutter},n,function(){e.$slide.css({transform:"",opacity:""}).removeClass("modula-fancybox-slide--next modula-fancybox-slide--previous"),e.pos===d.currPos&&d.complete()})})):n&&a.opts.transitionEffect&&(l="modula-fancybox-animated modula-fancybox-fx-"+a.opts.transitionEffect,i.$slide.addClass("modula-fancybox-slide--"+(i.pos>a.pos?"next":"previous")),f.modulaFancybox.animate(i.$slide,l,n,function(){i.$slide.removeClass(l).removeClass("modula-fancybox-slide--next modula-fancybox-slide--previous")},!1)),a.isLoaded?d.revealContent(a):d.loadSlide(a)),void d.preload("image"))},createSlide:function(t){var e,o=this,n=t%o.group.length;return n=n<0?o.group.length+n:n,!o.slides[t]&&o.group[n]&&(e=f('<div class="modula-fancybox-slide"></div>').appendTo(o.$refs.stage),o.slides[t]=f.extend(!0,{},o.group[n],{pos:t,$slide:e,isLoaded:!1}),o.updateSlide(o.slides[t])),o.slides[t]},scaleToActual:function(t,e,o){var n,a,i,s,r=this,l=r.current,c=l.$content,d=f.modulaFancybox.getTranslate(l.$slide).width,u=f.modulaFancybox.getTranslate(l.$slide).height,p=l.width,h=l.height;r.isAnimating||r.isMoved()||!c||"image"!=l.type||!l.isLoaded||l.hasError||(r.isAnimating=!0,f.modulaFancybox.stop(c),t=t===m?.5*d:t,e=e===m?.5*u:e,(n=f.modulaFancybox.getTranslate(c)).top-=f.modulaFancybox.getTranslate(l.$slide).top,n.left-=f.modulaFancybox.getTranslate(l.$slide).left,i=p/n.width,s=h/n.height,a=.5*d-.5*p,l=.5*u-.5*h,d<p&&(0<(a=n.left*i-(t*i-t))&&(a=0),a<d-p&&(a=d-p)),u<h&&(0<(l=n.top*s-(e*s-e))&&(l=0),l<u-h&&(l=u-h)),r.updateCursor(p,h),f.modulaFancybox.animate(c,{top:l,left:a,scaleX:i,scaleY:s},o||366,function(){r.isAnimating=!1}),r.SlideShow&&r.SlideShow.isActive&&r.SlideShow.stop())},scaleToFit:function(t){var e=this,o=e.current,n=o.$content;e.isAnimating||e.isMoved()||!n||"image"!=o.type||!o.isLoaded||o.hasError||(e.isAnimating=!0,f.modulaFancybox.stop(n),o=e.getFitPos(o),e.updateCursor(o.width,o.height),f.modulaFancybox.animate(n,{top:o.top,left:o.left,scaleX:o.width/n.width(),scaleY:o.height/n.height()},t||366,function(){e.isAnimating=!1}))},getFitPos:function(t){var e,o,n=t.$content,a=t.$slide,i=t.width||t.opts.width,s=t.height||t.opts.height,r={};return!!(t.isLoaded&&n&&n.length)&&(e=f.modulaFancybox.getTranslate(this.$refs.stage).width,o=f.modulaFancybox.getTranslate(this.$refs.stage).height,e-=parseFloat(a.css("paddingLeft"))+parseFloat(a.css("paddingRight"))+parseFloat(n.css("marginLeft"))+parseFloat(n.css("marginRight")),o-=parseFloat(a.css("paddingTop"))+parseFloat(a.css("paddingBottom"))+parseFloat(n.css("marginTop"))+parseFloat(n.css("marginBottom")),i&&s||(i=e,s=o),e-.5<(i*=n=Math.min(1,e/i,o/s))&&(i=e),o-.5<(s*=n)&&(s=o),"image"===t.type?(r.top=Math.floor(.5*(o-s))+parseFloat(a.css("paddingTop")),r.left=Math.floor(.5*(e-i))+parseFloat(a.css("paddingLeft"))):"video"===t.contentType&&(i/(t=t.opts.width&&t.opts.height?i/s:t.opts.ratio||16/9)<s?s=i/t:s*t<i&&(i=s*t)),r.width=i,r.height=s,r)},update:function(o){var n=this;f.each(n.slides,function(t,e){n.updateSlide(e,o)})},updateSlide:function(t,e){var o=this,n=t&&t.$content,a=t.width||t.opts.width,i=t.height||t.opts.height,s=t.$slide;o.adjustCaption(t),n&&(a||i||"video"===t.contentType)&&!t.hasError&&(f.modulaFancybox.stop(n),f.modulaFancybox.setTranslate(n,o.getFitPos(t)),t.pos===o.currPos&&(o.isAnimating=!1,o.updateCursor())),o.adjustLayout(t),s.length&&(s.trigger("refresh"),t.pos===o.currPos&&o.$refs.toolbar.add(o.$refs.navigation.find(".modula-fancybox-button--arrow_right")).toggleClass("compensate-for-scrollbar",s.get(0).scrollHeight>s.get(0).clientHeight)),o.trigger("onUpdate",t,e)},centerSlide:function(t){var e=this,o=e.current,n=o.$slide;!e.isClosing&&o&&(n.siblings().css({transform:"",opacity:""}),n.parent().children().removeClass("modula-fancybox-slide--previous modula-fancybox-slide--next"),f.modulaFancybox.animate(n,{top:0,left:0,opacity:1},t===m?0:t,function(){n.css({transform:"",opacity:""}),o.isComplete||e.complete()},!1))},isMoved:function(t){var e,o=t||this.current;return!!o&&(e=f.modulaFancybox.getTranslate(this.$refs.stage),t=f.modulaFancybox.getTranslate(o.$slide),!o.$slide.hasClass("modula-fancybox-animated")&&(.5<Math.abs(t.top-e.top)||.5<Math.abs(t.left-e.left)))},updateCursor:function(t,e){var o=this,n=o.current,a=o.$refs.container;n&&!o.isClosing&&o.Guestures&&(a.removeClass("modula-fancybox-is-zoomable modula-fancybox-can-zoomIn modula-fancybox-can-zoomOut modula-fancybox-can-swipe modula-fancybox-can-pan"),e=!!(t=o.canPan(t,e))||o.isZoomable(),a.toggleClass("modula-fancybox-is-zoomable",e),f("[data-fancybox-zoom]").prop("disabled",!e),t?a.addClass("modula-fancybox-can-pan"):e&&("zoom"===n.opts.clickContent||f.isFunction(n.opts.clickContent)&&"zoom"==n.opts.clickContent(n))?a.addClass("modula-fancybox-can-zoomIn"):n.opts.touch&&(n.opts.touch.vertical||1<o.group.length)&&"video"!==n.contentType&&a.addClass("modula-fancybox-can-swipe"))},isZoomable:function(){var t,e=this.current;if(e&&!this.isClosing&&"image"===e.type&&!e.hasError){if(!e.isLoaded)return!0;if((t=this.getFitPos(e))&&(e.width>t.width||e.height>t.height))return!0}return!1},isScaledDown:function(t,e){var o=!1,n=this.current,a=n.$content;return t!==m&&e!==m?o=t<n.width&&e<n.height:a&&(o=(o=f.modulaFancybox.getTranslate(a)).width<n.width&&o.height<n.height),o},canPan:function(t,e){var o=this.current,n=null,a=!1;return"image"===o.type&&(o.isComplete||t&&e)&&!o.hasError&&(a=this.getFitPos(o),t!==m&&e!==m?n={width:t,height:e}:o.isComplete&&(n=f.modulaFancybox.getTranslate(o.$content)),n&&a&&(a=1.5<Math.abs(n.width-a.width)||1.5<Math.abs(n.height-a.height))),a},loadSlide:function(o){var t,e,n,a=this;if(!o.isLoading&&!o.isLoaded){if(!(o.isLoading=!0)===a.trigger("beforeLoad",o))return o.isLoading=!1;switch(t=o.type,(e=o.$slide).off("refresh").trigger("onReset").addClass(o.opts.slideClass),t){case"image":a.setImage(o);break;case"iframe":a.setIframe(o);break;case"html":a.setContent(o,o.src||o.content);break;case"video":a.setContent(o,o.opts.video.tpl.replace(/\{\{src\}\}/gi,o.src).replace("{{format}}",o.opts.videoFormat||o.opts.video.format||"").replace("{{poster}}",o.thumb||""));break;case"inline":f(o.src).length?a.setContent(o,f(o.src)):a.setError(o);break;case"ajax":a.showLoading(o),n=f.ajax(f.extend({},o.opts.ajax.settings,{url:o.src,success:function(t,e){"success"===e&&a.setContent(o,t)},error:function(t,e){t&&"abort"!==e&&a.setError(o)}})),e.one("onReset",function(){n.abort()});break;default:a.setError(o)}return!0}},setImage:function(e){var t,o=this;setTimeout(function(){var t=e.$image;o.isClosing||!e.isLoading||t&&t.length&&t[0].complete||e.hasError||o.showLoading(e)},50),o.checkSrcset(e),e.$content=f('<div class="modula-fancybox-content"></div>').addClass("modula-fancybox-is-hidden").appendTo(e.$slide.addClass("modula-fancybox-slide--image")),!1!==e.opts.preload&&e.opts.width&&e.opts.height&&e.thumb&&(e.width=e.opts.width,e.height=e.opts.height,(t=s.createElement("img")).onerror=function(){f(this).remove(),e.$ghost=null},t.onload=function(){o.afterLoad(e)},e.$ghost=f(t).addClass("modula-fancybox-image").appendTo(e.$content).attr("src",e.thumb),"undifined"!=typeof e.src&&e.$ghost.attr("alt",e.alt)),o.setBigImage(e)},checkSrcset:function(t){var e,o,n,a,i=t.opts.srcset||t.opts.image.srcset;if(i){n=l.devicePixelRatio||1,a=l.innerWidth*n,(o=i.split(",").map(function(t){var n={};return t.trim().split(/\s+/).forEach(function(t,e){var o=parseInt(t.substring(0,t.length-1),10);if(0===e)return n.url=t;o&&(n.value=o,n.postfix=t[t.length-1])}),n})).sort(function(t,e){return t.value-e.value});for(var s=0;s<o.length;s++){var r=o[s];if("w"===r.postfix&&r.value>=a||"x"===r.postfix&&r.value>=n){e=r;break}}!e&&o.length&&(e=o[o.length-1]),e&&(t.src=e.url,t.width&&t.height&&"w"==e.postfix&&(t.height=t.width/t.height*e.value,t.width=e.value),t.opts.srcset=i)}},setBigImage:function(e){var o=this,t=s.createElement("img"),n=f(t);e.$image=n.one("error",function(){o.setError(e)}).one("load",function(){var t;e.$ghost||(o.resolveImageSlideSize(e,this.naturalWidth,this.naturalHeight),o.afterLoad(e)),o.isClosing||(e.opts.srcset&&((t=e.opts.sizes)&&"auto"!==t||(t=(1<e.width/e.height&&1<a.width()/a.height()?"100":Math.round(e.width/e.height*100))+"vw"),n.attr("sizes",t).attr("srcset",e.opts.srcset)),e.opts.alt&&n.attr("alt",e.opts.alt),e.opts.image_id&&n.attr("image-id",e.opts.image_id),e.$thumb&&n.attr("title",e.$thumb.find("img.pic").attr("title")),e.$ghost&&setTimeout(function(){e.$ghost&&!o.isClosing&&e.$ghost.hide()},Math.min(300,Math.max(1e3,e.height/1600))),o.hideLoading(e))}).addClass("modula-fancybox-image").attr("src",e.src).appendTo(e.$content),(t.complete||"complete"==t.readyState)&&n.naturalWidth&&n.naturalHeight?n.trigger("load"):t.error&&n.trigger("error")},resolveImageSlideSize:function(t,e,o){var n=parseInt(t.opts.width,10),a=parseInt(t.opts.height,10);t.width=e,t.height=o,0<n&&(t.width=n,t.height=Math.floor(n*o/e)),0<a&&(t.width=Math.floor(a*e/o),t.height=a)},setIframe:function(a){var i,e=this,s=a.opts.iframe,r=a.$slide;a.$content=f('<div class="modula-fancybox-content'+(s.preload?" modula-fancybox-is-hidden":"")+'"></div>').css(s.css).appendTo(r),r.addClass("modula-fancybox-slide--"+a.contentType),a.$iframe=i=f(s.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr(s.attr).appendTo(a.$content),s.preload?(e.showLoading(a),i.on("load.fb error.fb",function(t){this.isReady=1,a.$slide.trigger("refresh"),e.afterLoad(a)}),r.on("refresh.fb",function(){var t,e=a.$content,o=s.css.width,n=s.css.height;if(1===i[0].isReady){try{t=i.contents().find("body")}catch(t){}t&&t.length&&t.children().length&&(r.css("overflow","visible"),e.css({width:"100%","max-width":"100%",height:"9999px"}),o===m&&(o=Math.ceil(Math.max(t[0].clientWidth,t.outerWidth(!0)))),e.css("width",o||"").css("max-width",""),n===m&&(n=Math.ceil(Math.max(t[0].clientHeight,t.outerHeight(!0)))),e.css("height",n||""),r.css("overflow","auto")),e.removeClass("modula-fancybox-is-hidden")}})):e.afterLoad(a),i.attr("src",a.src),r.one("onReset",function(){try{f(this).find("iframe").hide().unbind().attr("src","//about:blank")}catch(t){}f(this).off("refresh.fb").empty(),a.isLoaded=!1,a.isRevealed=!1})},setContent:function(t,e){var o;this.isClosing||(this.hideLoading(t),t.$content&&f.modulaFancybox.stop(t.$content),t.$slide.empty(),(o=e)&&o.hasOwnProperty&&o instanceof f&&e.parent().length?((e.hasClass("modula-fancybox-content")||e.parent().hasClass("modula-fancybox-content"))&&e.parents(".modula-fancybox-slide").trigger("onReset"),t.$placeholder=f("<div>").hide().insertAfter(e),e.css("display","inline-block")):t.hasError||("string"===f.type(e)&&(e=f("<div>").append(f.trim(e)).contents()),t.opts.filter&&(e=f("<div>").html(e).find(t.opts.filter))),t.$slide.one("onReset",function(){f(this).find("video,audio").trigger("pause"),t.$placeholder&&(t.$placeholder.after(e.removeClass("modula-fancybox-content").hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(f(this).empty(),t.isLoaded=!1,t.isRevealed=!1)}),f(e).appendTo(t.$slide),f(e).is("video,audio")&&(f(e).addClass("modula-fancybox-video"),f(e).wrap("<div></div>"),t.contentType="video",t.opts.width=t.opts.width||f(e).attr("width"),t.opts.height=t.opts.height||f(e).attr("height")),t.$content=t.$slide.children().filter("div,form,main,video,audio,article,.modula-fancybox-content").first(),t.$content.siblings().hide(),t.$content.length||(t.$content=t.$slide.wrapInner("<div></div>").children().first()),t.$content.addClass("modula-fancybox-content"),t.$slide.addClass("modula-fancybox-slide--"+t.contentType),this.afterLoad(t))},setError:function(t){t.hasError=!0,t.$slide.trigger("onReset").removeClass("modula-fancybox-slide--"+t.contentType).addClass("modula-fancybox-slide--error"),t.contentType="html",this.setContent(t,this.translate(t,t.opts.errorTpl)),t.pos===this.currPos&&(this.isAnimating=!1)},showLoading:function(t){(t=t||this.current)&&!t.$spinner&&(t.$spinner=f(this.translate(this,this.opts.spinnerTpl)).appendTo(t.$slide).hide().fadeIn("fast"))},hideLoading:function(t){(t=t||this.current)&&t.$spinner&&(t.$spinner.stop().remove(),delete t.$spinner)},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger("afterLoad",t),e.hideLoading(t),!t.opts.smallBtn||t.$smallBtn&&t.$smallBtn.length||(t.$smallBtn=f(e.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content)),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on("contextmenu.fb",function(t){return 2==t.button&&t.preventDefault(),!0}),"image"===t.type&&f('<div class="modula-fancybox-spaceball"></div>').appendTo(t.$content)),e.adjustCaption(t),e.adjustLayout(t),t.pos===e.currPos&&e.updateCursor(),e.revealContent(t))},adjustCaption:function(t){var e=this,o=t||e.current,n=o.opts.caption,a=o.opts.preventCaptionOverlap,i=e.$refs.caption,t=!1;i.toggleClass("modula-fancybox-caption--separate",a),a&&n&&n.length&&(o.pos!==e.currPos?((i=i.clone().appendTo(i.parent())).children().eq(0).empty().html(n),t=i.outerHeight(!0),i.empty().remove()):e.$caption&&(t=e.$caption.outerHeight(!0)),o.$slide.css("padding-bottom",t||""))},adjustLayout:function(t){var e,o,n,a=t||this.current;a.isLoaded&&!0!==a.opts.disableLayoutFix&&(a.$content.css("margin-bottom",""),a.$content.outerHeight()>a.$slide.height()+.5&&(o=a.$slide[0].style["padding-bottom"],n=a.$slide.css("padding-bottom"),0<parseFloat(n)&&(t=a.$slide[0].scrollHeight,a.$slide.css("padding-bottom",0),Math.abs(t-a.$slide[0].scrollHeight)<1&&(e=n),a.$slide.css("padding-bottom",o))),a.$content.css("margin-bottom",e))},revealContent:function(t){var e,o,n,a,i=this,s=t.$slide,r=!1,l=!1,c=i.isMoved(t),d=t.isRevealed;return t.isRevealed=!0,e=t.opts[i.firstRun?"animationEffect":"transitionEffect"],n=t.opts[i.firstRun?"animationDuration":"transitionDuration"],n=parseInt(t.forcedDuration===m?n:t.forcedDuration,10),!c&&t.pos===i.currPos&&n||(e=!1),"zoom"===e&&(t.pos===i.currPos&&n&&"image"===t.type&&!t.hasError&&(l=i.getThumbPos(t))?r=i.getFitPos(t):e="fade"),"zoom"===e?(i.isAnimating=!0,r.scaleX=r.width/l.width,r.scaleY=r.height/l.height,"auto"==(a=t.opts.zoomOpacity)&&(a=.1<Math.abs(t.width/t.height-l.width/l.height)),a&&(l.opacity=.1,r.opacity=1),f.modulaFancybox.setTranslate(t.$content.removeClass("modula-fancybox-is-hidden"),l),p(t.$content),void f.modulaFancybox.animate(t.$content,r,n,function(){i.isAnimating=!1,i.complete()})):(i.updateSlide(t),e?(f.modulaFancybox.stop(s),o="modula-fancybox-slide--"+(t.pos>=i.prevPos?"next":"previous")+" modula-fancybox-animated modula-fancybox-fx-"+e,s.addClass(o).removeClass("modula-fancybox-slide--current"),t.$content.removeClass("modula-fancybox-is-hidden"),p(s),"image"!==t.type&&t.$content.hide().show(0),void f.modulaFancybox.animate(s,"modula-fancybox-slide--current",n,function(){s.removeClass(o).css({transform:"",opacity:""}),t.pos===i.currPos&&i.complete()},!0)):(t.$content.removeClass("modula-fancybox-is-hidden"),d||!c||"image"!==t.type||t.hasError||t.$content.hide().fadeIn("fast"),void(t.pos===i.currPos&&i.complete())))},getThumbPos:function(t){var e,o,n,a,i=t.$thumb;return!!(i&&(a=(n=i).find("a.tile-inner")[0])&&a.ownerDocument===s&&(f(".modula-fancybox-container").css("pointer-events","none"),n={x:a.getBoundingClientRect().left+a.offsetWidth/2,y:a.getBoundingClientRect().top+a.offsetHeight/2},a=s.elementFromPoint(n.x,n.y)===a,f(".modula-fancybox-container").css("pointer-events",""),a))&&(o=f.modulaFancybox.getTranslate(i),t=parseFloat(i.css("border-top-width")||0),n=parseFloat(i.css("border-right-width")||0),a=parseFloat(i.css("border-bottom-width")||0),i=parseFloat(i.css("border-left-width")||0),e={top:o.top+t,left:o.left+i,width:o.width-n-i,height:o.height-t-a,scaleX:1,scaleY:1},0<o.width&&0<o.height&&e)},complete:function(){var t,o=this,e=o.current,n={};!o.isMoved()&&e.isLoaded&&(e.isComplete||(e.isComplete=!0,e.$slide.siblings().trigger("onReset"),o.preload("inline"),p(e.$slide),e.$slide.addClass("modula-fancybox-slide--complete"),f.each(o.slides,function(t,e){e.pos>=o.currPos-1&&e.pos<=o.currPos+1?n[e.pos]=e:e&&(f.modulaFancybox.stop(e.$slide),e.$slide.off().remove())}),o.slides=n),o.isAnimating=!1,o.updateCursor(),o.trigger("afterShow"),e.opts.video.autoStart&&e.$slide.find("video,audio").filter(":visible:first").trigger("play").one("ended",function(){Document.exitFullscreen?Document.exitFullscreen():this.webkitExitFullscreen&&this.webkitExitFullscreen(),o.next()}),e.opts.autoFocus&&"html"===e.contentType&&((t=e.$content.find("input[autofocus]:enabled:visible:first")).length?t.trigger("focus"):o.focus(null,!0)),e.$slide.scrollTop(0).scrollLeft(0))},preload:function(t){var e,o,n=this;n.group.length<2||(o=n.slides[n.currPos+1],(e=n.slides[n.currPos-1])&&e.type===t&&n.loadSlide(e),o&&o.type===t&&n.loadSlide(o))},focus:function(t,e){var o=this,n=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"])'].join(",");o.isClosing||((e=(e=!t&&o.current&&o.current.isComplete?o.current.$slide.find("*:visible"+(e?":not(.modula-fancybox-close-small)":"")):o.$refs.container.find("*:visible")).filter(n).filter(function(){return"hidden"!==f(this).css("visibility")&&!f(this).hasClass("disabled")})).length?(n=e.index(s.activeElement),t&&t.shiftKey?(n<0||0==n)&&(t.preventDefault(),e.eq(e.length-1).trigger("focus")):(n<0||n==e.length-1)&&(t&&t.preventDefault(),e.eq(0).trigger("focus"))):o.$refs.container.trigger("focus"))},activate:function(){var e=this;f(".modula-fancybox-container").each(function(){var t=f(this).data("modulaFancyBox");t&&t.id!==e.id&&!t.isClosing&&(t.trigger("onDeactivate"),t.removeEvents(),t.isVisible=!1)}),e.isVisible=!0,(e.current||e.isIdle)&&(e.update(),e.updateControls()),e.trigger("onActivate"),e.addEvents()},close:function(t,e){function o(){l.cleanUp(t)}var n,a,i,s,r,l=this,c=l.current;return!l.isClosing&&(!(l.isClosing=!0)===l.trigger("beforeClose",t)?(l.isClosing=!1,d(function(){l.update()}),!1):(l.removeEvents(),i=c.$content,n=c.opts.animationEffect,a=f.isNumeric(e)?e:n?c.opts.animationDuration:0,c.$slide.removeClass("modula-fancybox-slide--complete modula-fancybox-slide--next modula-fancybox-slide--previous modula-fancybox-animated"),!0!==t?f.modulaFancybox.stop(c.$slide):n=!1,c.$slide.siblings().trigger("onReset").remove(),a&&l.$refs.container.removeClass("modula-fancybox-is-open").addClass("modula-fancybox-is-closing").css("transition-duration",a+"ms"),l.hideLoading(c),l.hideControls(!0),l.updateCursor(),"zoom"!==n||i&&a&&"image"===c.type&&!l.isMoved()&&!c.hasError&&(r=l.getThumbPos(c))||(n="fade"),"zoom"===n?(f.modulaFancybox.stop(i),e={top:(s=f.modulaFancybox.getTranslate(i)).top,left:s.left,scaleX:s.width/r.width,scaleY:s.height/r.height,width:r.width,height:r.height},"auto"==(s=c.opts.zoomOpacity)&&(s=.1<Math.abs(c.width/c.height-r.width/r.height)),s&&(r.opacity=0),f.modulaFancybox.setTranslate(i,e),p(i),f.modulaFancybox.animate(i,r,a,o)):n&&a?f.modulaFancybox.animate(c.$slide.addClass("modula-fancybox-slide--previous").removeClass("modula-fancybox-slide--current"),"modula-fancybox-animated modula-fancybox-fx-"+n,a,o):!0===t?setTimeout(o,a):o(),!0))},cleanUp:function(t){var e,o=this,n=o.current.opts.$orig;o.current.$slide.trigger("onReset"),o.$refs.container.empty().remove(),o.trigger("afterClose",t),o.current.opts.backFocus&&(n&&n.length&&n.is(":visible")||(n=o.$trigger),n&&n.length&&(e=l.scrollX,t=l.scrollY,n.trigger("focus"),f("html, body").scrollTop(t).scrollLeft(e))),o.current=null,(o=f.modulaFancybox.getInstance())?o.activate():(f("body").removeClass("modula-fancybox-active compensate-for-scrollbar"),f("#modula-fancybox-style-noscroll").remove())},trigger:function(t,e){var o,n=Array.prototype.slice.call(arguments,1),a=this,e=e&&e.opts?e:a.current;if(e?n.unshift(e):e=a,n.unshift(a),f.isFunction(e.opts[t])&&(o=e.opts[t].apply(e,n)),!1===o)return o;("afterClose"!==t&&a.$refs?a.$refs.container:i).trigger(t+".fb",n)},updateControls:function(){var t=this,e=t.current,o=e.index,n=t.$refs.container,a=t.$refs.caption,i=e.opts.caption;e.$slide.trigger("refresh"),i&&i.length?(t.$caption=a).children().eq(0).html(i):t.$caption=null,t.hasHiddenControls||t.isIdle||t.showControls(),n.find("[data-fancybox-count]").html(t.group.length),n.find("[data-fancybox-index]").html(o+1),n.find("[data-fancybox-prev]").prop("disabled",!e.opts.loop&&o<=0),n.find("[data-fancybox-next]").prop("disabled",!e.opts.loop&&o>=t.group.length-1),"image"===e.type?n.find("[data-fancybox-zoom]").show().end().find("[data-fancybox-download]").attr("href",e.opts.image.src||e.src).show():e.opts.toolbar&&n.find("[data-fancybox-download],[data-fancybox-zoom]").hide(),f(s.activeElement).is(":hidden,[disabled]")&&t.$refs.container.trigger("focus")},hideControls:function(t){var e=["infobar","toolbar","nav"];!t&&this.current.opts.preventCaptionOverlap||e.push("caption"),this.$refs.container.removeClass(e.map(function(t){return"modula-fancybox-show-"+t}).join(" ")),this.hasHiddenControls=!0},showControls:function(){var t=this,e=(t.current||t).opts,o=t.$refs.container;t.hasHiddenControls=!1,t.idleSecondsCounter=0,o.toggleClass("modula-fancybox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("modula-fancybox-show-infobar",!!(e.infobar&&1<t.group.length)).toggleClass("modula-fancybox-show-caption",!!t.$caption).toggleClass("modula-fancybox-show-nav",!!(e.arrows&&1<t.group.length)).toggleClass("modula-fancybox-is-modal",!!e.modal)},toggleControls:function(){this.hasHiddenControls?this.showControls():this.hideControls()}}),f.modulaFancybox={version:"3.5.7",defaults:t,getInstance:function(t){var e=f('.modula-fancybox-container:not(".modula-fancybox-is-closing"):last').data("modulaFancyBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof n&&("string"===f.type(t)?e[t].apply(e,o):"function"===f.type(t)&&t.apply(e,o),e)},open:function(t,e,o){return new n(t,e,o)},close:function(t){var e=this.getInstance();e&&(e.close(),!0===t&&this.close(t))},destroy:function(){this.close(!0),i.add("body").off("click.fb-start","**")},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:(t=s.createElement("div"),l.getComputedStyle&&l.getComputedStyle(t)&&l.getComputedStyle(t).getPropertyValue("transform")&&!(s.documentMode&&s.documentMode<11)),getTranslate:function(t){var e;return!(!t||!t.length)&&{top:(e=t[0].getBoundingClientRect()).top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css("opacity"))}},setTranslate:function(t,e){var o="",n={};if(t&&e)return e.left===m&&e.top===m||(o=(e.left===m?t.position():e).left+"px, "+(e.top===m?t.position():e).top+"px",o=this.use3d?"translate3d("+o+", 0px)":"translate("+o+")"),e.scaleX!==m&&e.scaleY!==m?o+=" scale("+e.scaleX+", "+e.scaleY+")":e.scaleX!==m&&(o+=" scaleX("+e.scaleX+")"),o.length&&(n.transform=o),e.opacity!==m&&(n.opacity=e.opacity),e.width!==m&&(n.width=e.width),e.height!==m&&(n.height=e.height),t.css(n)},animate:function(e,o,n,a,i){var s,r=this;f.isFunction(n)&&(a=n,n=null),r.stop(e),s=r.getTranslate(e),e.on(c,function(t){t&&t.originalEvent&&(!e.is(t.originalEvent.target)||"z-index"==t.originalEvent.propertyName)||(r.stop(e),f.isNumeric(n)&&e.css("transition-duration",""),f.isPlainObject(o)?o.scaleX!==m&&o.scaleY!==m&&r.setTranslate(e,{top:o.top,left:o.left,width:s.width*o.scaleX,height:s.height*o.scaleY,scaleX:1,scaleY:1}):!0!==i&&e.removeClass(o),f.isFunction(a)&&a(t))}),f.isNumeric(n)&&e.css("transition-duration",n+"ms"),f.isPlainObject(o)?(o.scaleX!==m&&o.scaleY!==m&&(delete o.width,delete o.height,e.parent().hasClass("modula-fancybox-slide--image")&&e.parent().addClass("modula-fancybox-is-scaling")),f.modulaFancybox.setTranslate(e,o)):e.addClass(o),e.data("timer",setTimeout(function(){e.trigger(c)},n+33))},stop:function(t,e){t&&t.length&&(clearTimeout(t.data("timer")),e&&t.trigger(c),t.off(c).css("transition-duration",""),t.parent().removeClass("modula-fancybox-is-scaling"))}},f.fn.modulaFancybox=function(t){var e;return(e=(t=t||{}).selector||!1)?f("body").off("click.fb-start",e).on("click.fb-start",e,{options:t},b):this.off("click.fb-start").on("click.fb-start",{items:this,options:t},b),this},i.on("click.fb-start","[data-fancybox]",b),i.on("click.fb-start","[data-fancybox-trigger]",function(t){f('[data-fancybox="'+f(this).attr("data-fancybox-trigger")+'"]').eq(f(this).attr("data-fancybox-index")||0).trigger("click.fb-start",{$trigger:f(this)})}),o=".modula-fancybox-button",h="modula-fancybox-focus",g=null,i.on("mousedown mouseup focus blur",o,function(t){switch(t.type){case"mousedown":g=f(this);break;case"mouseup":g=null;break;case"focusin":f(o).removeClass(h),f(this).is(g)||f(this).is("[disabled]")||f(this).addClass(h);break;case"focusout":f(o).removeClass(h)}})))}(window,document,jQuery),function(h){"use strict";function f(o,t,e){if(o)return e=e||"","object"===h.type(e)&&(e=h.param(e,!0)),h.each(t,function(t,e){o=o.replace("$"+t,e||"")}),e.length&&(o+=(0<o.indexOf("?")?"&":"?")+e),o}var n={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"https://www.youtube-nocookie.com/embed/$4",thumb:"https://img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12]+"").replace(/\?/,"&")+"&output="+(t[12]&&0<t[12].indexOf("layer=c")?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}};h(document).on("objectNeedsType.fb",function(t,e,a){var i,s,r,l,c,d,u=a.src||"",p=!1,o=h.extend(!0,{},n,a.opts.media);h.each(o,function(t,e){if(s=u.match(e.matcher)){if(p=e.type,d=t,c={},e.paramPlace&&s[e.paramPlace]){"?"==(l=s[e.paramPlace])[0]&&(l=l.substring(1)),l=l.split("&");for(var o=0;o<l.length;++o){var n=l[o].split("=",2);2==n.length&&(c[n[0]]=decodeURIComponent(n[1].replace(/\+/g," ")))}}return r=h.extend(!0,{},e.params,a.opts[t],c),u="function"===h.type(e.url)?e.url.call(this,s,r,a):f(e.url,s,r),i="function"===h.type(e.thumb)?e.thumb.call(this,s,r,a):f(e.thumb,s),"youtube"===t?u=u.replace(/&t=(\d+)/,function(t,e){return"&start="+e}):"vimeo"===t&&(u=u.replace("&%23","#")),!1}}),p?(a.opts.thumb||a.opts.$thumb&&a.opts.$thumb.length||(a.opts.thumb=i),"iframe"===p&&(a.opts=h.extend(!0,a.opts,{iframe:{preload:!1,attr:{scrolling:"no"}}})),h.extend(a,{type:p,src:u,origSrc:a.src,contentSource:d,contentType:"image"===p?"image":"gmap_place"==d||"gmap_search"==d?"map":"video"})):u&&(a.type=a.opts.defaultType)});var a={youtube:{src:"https://www.youtube.com/iframe_api",class:"YT",loading:!1,loaded:!1},vimeo:{src:"https://player.vimeo.com/api/player.js",class:"Vimeo",loading:!1,loaded:!1},load:function(t){var e,o=this;this[t].loaded?setTimeout(function(){o.done(t)}):this[t].loading||(this[t].loading=!0,(e=document.createElement("script")).type="text/javascript",e.src=this[t].src,"youtube"===t?window.onYouTubeIframeAPIReady=function(){o[t].loaded=!0,o.done(t)}:e.onload=function(){o[t].loaded=!0,o.done(t)},document.body.appendChild(e))},done:function(t){var e,o;"youtube"===t&&delete window.onYouTubeIframeAPIReady,(e=h.modulaFancybox.getInstance())&&(o=e.current.$content.find("iframe"),"youtube"===t&&void 0!==YT&&YT?new YT.Player(o.attr("id"),{events:{onStateChange:function(t){0==t.data&&e.next()}}}):"vimeo"===t&&void 0!==Vimeo&&Vimeo&&new Vimeo.Player(o).on("ended",function(){e.next()}))}};h(document).on({"afterShow.fb":function(t,e,o){1<e.group.length&&("youtube"===o.contentSource||"vimeo"===o.contentSource)&&a.load(o.contentSource)}})}(jQuery),function(d,l,u){"use strict";function p(t){var e,o=[];for(e in t=(t=t.originalEvent||t||d.e).touches&&t.touches.length?t.touches:t.changedTouches&&t.changedTouches.length?t.changedTouches:[t])t[e].pageX?o.push({x:t[e].pageX,y:t[e].pageY}):t[e].clientX&&o.push({x:t[e].clientX,y:t[e].clientY});return o}function h(t,e,o){return e&&t?"x"===o?t.x-e.x:"y"===o?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function c(t){if(t.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio,iframe')||u.isFunction(t.get(0).onclick)||t.data("selectable"))return 1;for(var e=0,o=t[0].attributes,n=o.length;e<n;e++)if("data-fancybox-"===o[e].nodeName.substr(0,14))return 1}function f(t){for(var e,o,n,a=!1;e=t.get(0),o=n=o=void 0,o=d.getComputedStyle(e)["overflow-y"],n=d.getComputedStyle(e)["overflow-x"],o=("scroll"===o||"auto"===o)&&e.scrollHeight>e.clientHeight,e=("scroll"===n||"auto"===n)&&e.scrollWidth>e.clientWidth,!(a=o||e)&&(t=t.parent()).length&&!t.hasClass("modula-fancybox-stage")&&!t.is("body"););return a}function o(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on("touchstart.fb.touch mousedown.fb.touch",u.proxy(e,"ontouchstart"))}var m=d.requestAnimationFrame||d.webkitRequestAnimationFrame||d.mozRequestAnimationFrame||d.oRequestAnimationFrame||function(t){return d.setTimeout(t,1e3/60)},g=d.cancelAnimationFrame||d.webkitCancelAnimationFrame||d.mozCancelAnimationFrame||d.oCancelAnimationFrame||function(t){d.clearTimeout(t)};o.prototype.destroy=function(){var t=this;t.$container.off(".fb.touch"),u(l).off(".fb.touch"),t.requestId&&(g(t.requestId),t.requestId=null),t.tapped&&(clearTimeout(t.tapped),t.tapped=null)},o.prototype.ontouchstart=function(t){var e=this,o=u(t.target),n=e.instance,a=n.current,i=a.$slide,s=a.$content,r="touchstart"==t.type;if(r&&e.$container.off("mousedown.fb.touch"),(!t.originalEvent||2!=t.originalEvent.button)&&i.length&&o.length&&!c(o)&&!c(o.parent())&&(o.is("img")||!(t.originalEvent.clientX>o[0].clientWidth+o.offset().left))){if(!a||n.isAnimating||a.$slide.hasClass("modula-fancybox-animated"))return t.stopPropagation(),void t.preventDefault();e.realPoints=e.startPoints=p(t),e.startPoints.length&&(a.touch&&t.stopPropagation(),e.startEvent=t,e.canTap=!0,e.$target=o,e.$content=s,e.opts=a.opts.touch,e.isPanning=!1,e.isSwiping=!1,e.isZooming=!1,e.isScrolling=!1,e.canPan=n.canPan(),e.startTime=(new Date).getTime(),e.distanceX=e.distanceY=e.distance=0,e.canvasWidth=Math.round(i[0].clientWidth),e.canvasHeight=Math.round(i[0].clientHeight),e.contentLastPos=null,e.contentStartPos=u.modulaFancybox.getTranslate(e.$content)||{top:0,left:0},e.sliderStartPos=u.modulaFancybox.getTranslate(i),e.stagePos=u.modulaFancybox.getTranslate(n.$refs.stage),e.sliderStartPos.top-=e.stagePos.top,e.sliderStartPos.left-=e.stagePos.left,e.contentStartPos.top-=e.stagePos.top,e.contentStartPos.left-=e.stagePos.left,u(l).off(".fb.touch").on(r?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",u.proxy(e,"ontouchend")).on(r?"touchmove.fb.touch":"mousemove.fb.touch",u.proxy(e,"ontouchmove")),u.modulaFancybox.isMobile&&l.addEventListener("scroll",e.onscroll,!0),((e.opts||e.canPan)&&(o.is(e.$stage)||e.$stage.find(o).length)||(o.is(".modula-fancybox-image")&&t.preventDefault(),u.modulaFancybox.isMobile&&o.parents(".modula-fancybox-caption").length))&&(e.isScrollable=f(o)||f(o.parent()),u.modulaFancybox.isMobile&&e.isScrollable||t.preventDefault(),1!==e.startPoints.length&&!a.hasError||(e.canPan?(u.modulaFancybox.stop(e.$content),e.isPanning=!0):e.isSwiping=!0,e.$container.addClass("modula-fancybox-is-grabbing")),2===e.startPoints.length&&"image"===a.type&&(a.isLoaded||a.$ghost)&&(e.canTap=!1,e.isSwiping=!1,e.isPanning=!1,e.isZooming=!0,u.modulaFancybox.stop(e.$content),e.centerPointStartX=.5*(e.startPoints[0].x+e.startPoints[1].x)-u(d).scrollLeft(),e.centerPointStartY=.5*(e.startPoints[0].y+e.startPoints[1].y)-u(d).scrollTop(),e.percentageOfImageAtPinchPointX=(e.centerPointStartX-e.contentStartPos.left)/e.contentStartPos.width,e.percentageOfImageAtPinchPointY=(e.centerPointStartY-e.contentStartPos.top)/e.contentStartPos.height,e.startDistanceBetweenFingers=h(e.startPoints[0],e.startPoints[1]))))}},o.prototype.onscroll=function(t){this.isScrolling=!0,l.removeEventListener("scroll",this.onscroll,!0)},o.prototype.ontouchmove=function(t){var e=this;void 0===t.originalEvent.buttons||0!==t.originalEvent.buttons?e.isScrolling?e.canTap=!1:(e.newPoints=p(t),(e.opts||e.canPan)&&e.newPoints.length&&e.newPoints.length&&(e.isSwiping&&!0===e.isSwiping||t.preventDefault(),e.distanceX=h(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=h(e.newPoints[0],e.startPoints[0],"y"),e.distance=h(e.newPoints[0],e.startPoints[0]),0<e.distance&&(e.isSwiping?e.onSwipe(t):e.isPanning?e.onPan():e.isZooming&&e.onZoom()))):e.ontouchend(t)},o.prototype.onSwipe=function(t){var a=this,i=a.instance,e=a.isSwiping,o=a.sliderStartPos.left||0;if(!0!==e)"x"==e&&(0<a.distanceX&&(a.instance.group.length<2||0===a.instance.current.index&&!a.instance.current.opts.loop)?o+=Math.pow(a.distanceX,.8):a.distanceX<0&&(a.instance.group.length<2||a.instance.current.index===a.instance.group.length-1&&!a.instance.current.opts.loop)?o-=Math.pow(-a.distanceX,.8):o+=a.distanceX),a.sliderLastPos={top:"x"==e?0:a.sliderStartPos.top+a.distanceY,left:o},a.requestId&&(g(a.requestId),a.requestId=null),a.requestId=m(function(){a.sliderLastPos&&(u.each(a.instance.slides,function(t,e){var o=e.pos-a.instance.currPos;u.modulaFancybox.setTranslate(e.$slide,{top:a.sliderLastPos.top,left:a.sliderLastPos.left+o*a.canvasWidth+o*e.opts.gutter})}),a.$container.addClass("modula-fancybox-is-sliding"))});else if(10<Math.abs(a.distance)){if(a.canTap=!1,i.group.length<2&&a.opts.vertical?a.isSwiping="y":i.isDragging||!1===a.opts.vertical||"auto"===a.opts.vertical&&800<u(d).width()?a.isSwiping="x":(o=Math.abs(180*Math.atan2(a.distanceY,a.distanceX)/Math.PI),a.isSwiping=45<o&&o<135?"y":"x"),"y"===a.isSwiping&&u.modulaFancybox.isMobile&&a.isScrollable)return void(a.isScrolling=!0);i.isDragging=a.isSwiping,a.startPoints=a.newPoints,u.each(i.slides,function(t,e){var o,n;u.modulaFancybox.stop(e.$slide),o=u.modulaFancybox.getTranslate(e.$slide),n=u.modulaFancybox.getTranslate(i.$refs.stage),e.$slide.css({transform:"",opacity:"","transition-duration":""}).removeClass("modula-fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)modula-fancybox-fx-\S+/g)||[]).join(" ")}),e.pos===i.current.pos&&(a.sliderStartPos.top=o.top-n.top,a.sliderStartPos.left=o.left-n.left),u.modulaFancybox.setTranslate(e.$slide,{top:o.top-n.top,left:o.left-n.left})}),i.SlideShow&&i.SlideShow.isActive&&i.SlideShow.stop()}},o.prototype.onPan=function(){var t=this;h(t.newPoints[0],t.realPoints[0])<(u.modulaFancybox.isMobile?10:5)?t.startPoints=t.newPoints:(t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&g(t.requestId),t.requestId=m(function(){u.modulaFancybox.setTranslate(t.$content,t.contentLastPos)}))},o.prototype.limitMovement=function(){var t=this,e=t.canvasWidth,o=t.canvasHeight,n=t.distanceX,a=t.distanceY,i=t.contentStartPos,s=i.left,r=i.top,l=i.width,c=i.height,d=e<l?s+n:s,u=r+a,t=Math.max(0,.5*e-.5*l),i=Math.max(0,.5*o-.5*c),l=Math.min(e-l,.5*e-.5*l),c=Math.min(o-c,.5*o-.5*c);return 0<n&&t<d&&(d=t-1+Math.pow(-t+s+n,.8)||0),n<0&&d<l&&(d=l+1-Math.pow(l-s-n,.8)||0),0<a&&i<u&&(u=i-1+Math.pow(-i+r+a,.8)||0),a<0&&u<c&&(u=c+1-Math.pow(c-r-a,.8)||0),{top:u,left:d}},o.prototype.limitPosition=function(t,e,o,n){var a=this.canvasWidth,i=this.canvasHeight;return t=a<o?(t=0<t?0:t)<a-o?a-o:t:Math.max(0,a/2-o/2),{top:e=i<n?(e=0<e?0:e)<i-n?i-n:e:Math.max(0,i/2-n/2),left:t}},o.prototype.onZoom=function(){var t=this,e=t.contentStartPos,o=e.width,n=e.height,a=e.left,i=e.top,s=h(t.newPoints[0],t.newPoints[1])/t.startDistanceBetweenFingers,r=Math.floor(o*s),l=Math.floor(n*s),c=(o-r)*t.percentageOfImageAtPinchPointX,e=(n-l)*t.percentageOfImageAtPinchPointY,o=(t.newPoints[0].x+t.newPoints[1].x)/2-u(d).scrollLeft(),n=(t.newPoints[0].y+t.newPoints[1].y)/2-u(d).scrollTop(),o=o-t.centerPointStartX,s={top:i+(e+(n-t.centerPointStartY)),left:a+(c+o),scaleX:s,scaleY:s};t.canTap=!1,t.newWidth=r,t.newHeight=l,t.contentLastPos=s,t.requestId&&g(t.requestId),t.requestId=m(function(){u.modulaFancybox.setTranslate(t.$content,t.contentLastPos)})},o.prototype.ontouchend=function(t){var e=this,o=e.isSwiping,n=e.isPanning,a=e.isZooming,i=e.isScrolling;if(e.endPoints=p(t),e.dMs=Math.max((new Date).getTime()-e.startTime,1),e.$container.removeClass("modula-fancybox-is-grabbing"),u(l).off(".fb.touch"),l.removeEventListener("scroll",e.onscroll,!0),e.requestId&&(g(e.requestId),e.requestId=null),e.isSwiping=!1,e.isPanning=!1,e.isZooming=!1,e.isScrolling=!1,e.instance.isDragging=!1,e.canTap)return e.onTap(t);e.speed=100,e.velocityX=e.distanceX/e.dMs*.5,e.velocityY=e.distanceY/e.dMs*.5,n?e.endPanning():a?e.endZooming():e.endSwiping(o,i)},o.prototype.endSwiping=function(t,e){var o=this,n=!1,a=o.instance.group.length,i=Math.abs(o.distanceX),i="x"==t&&1<a&&(130<o.dMs&&10<i||50<i);o.sliderLastPos=null,"y"==t&&!e&&50<Math.abs(o.distanceY)?(u.modulaFancybox.animate(o.instance.current.$slide,{top:o.sliderStartPos.top+o.distanceY+150*o.velocityY,opacity:0},200),n=o.instance.close(!0,250)):i&&0<o.distanceX?n=o.instance.previous(300):i&&o.distanceX<0&&(n=o.instance.next(300)),!1!==n||"x"!=t&&"y"!=t||o.instance.centerSlide(200),o.$container.removeClass("modula-fancybox-is-sliding")},o.prototype.endPanning=function(){var t,e,o=this;o.contentLastPos&&(e=!1===o.opts.momentum||350<o.dMs?(t=o.contentLastPos.left,o.contentLastPos.top):(t=o.contentLastPos.left+500*o.velocityX,o.contentLastPos.top+500*o.velocityY),(e=o.limitPosition(t,e,o.contentStartPos.width,o.contentStartPos.height)).width=o.contentStartPos.width,e.height=o.contentStartPos.height,u.modulaFancybox.animate(o.$content,e,366))},o.prototype.endZooming=function(){var t,e,o,n=this,a=n.instance.current,i=n.newWidth,s=n.newHeight;n.contentLastPos&&(t=n.contentLastPos.left,o={top:e=n.contentLastPos.top,left:t,width:i,height:s,scaleX:1,scaleY:1},u.modulaFancybox.setTranslate(n.$content,o),i<n.canvasWidth&&s<n.canvasHeight?n.instance.scaleToFit(150):i>a.width||s>a.height?n.instance.scaleToActual(n.centerPointStartX,n.centerPointStartY,150):(s=n.limitPosition(t,e,i,s),u.modulaFancybox.animate(n.$content,s,150)))},o.prototype.onTap=function(e){function t(t){if(t=s.opts[t],u.isFunction(t)&&(t=t.apply(i,[s,e])),t)switch(t){case"close":i.close(n.startEvent);break;case"toggleControls":i.toggleControls();break;case"next":i.next();break;case"nextOrClose":1<i.group.length?i.next():i.close(n.startEvent);break;case"zoom":"image"==s.type&&(s.isLoaded||s.$ghost)&&(i.canPan()?i.scaleToFit():i.isScaledDown()?i.scaleToActual(l,c):i.group.length<2&&i.close(n.startEvent))}}var o,n=this,a=u(e.target),i=n.instance,s=i.current,r=e&&p(e)||n.startPoints,l=r[0]?r[0].x-u(d).scrollLeft()-n.stagePos.left:0,c=r[0]?r[0].y-u(d).scrollTop()-n.stagePos.top:0;if((!e.originalEvent||2!=e.originalEvent.button)&&(a.is("img")||!(l>a[0].clientWidth+a.offset().left))){if(a.is(".modula-fancybox-bg,.modula-fancybox-inner,.modula-fancybox-outer,.modula-fancybox-container"))o="Outside";else if(a.is(".modula-fancybox-slide"))o="Slide";else{if(!i.current.$content||!i.current.$content.find(a).addBack().filter(a).length)return;o="Content"}if(n.tapped){if(clearTimeout(n.tapped),n.tapped=null,50<Math.abs(l-n.tapX)||50<Math.abs(c-n.tapY))return this;t("dblclick"+o)}else n.tapX=l,n.tapY=c,s.opts["dblclick"+o]&&s.opts["dblclick"+o]!==s.opts["click"+o]?n.tapped=setTimeout(function(){n.tapped=null,i.isAnimating||t("click"+o)},500):t("click"+o);return this}},u(l).on("onActivate.fb",function(t,e){e&&!e.Guestures&&(e.Guestures=new o(e))}).on("beforeClose.fb",function(t,e){e&&e.Guestures&&e.Guestures.destroy()})}(window,document,jQuery),function(i,s){"use strict";s.extend(!0,s.modulaFancybox.defaults,{btnTpl:{slideShow:'<button data-fancybox-play class="modula-fancybox-button modula-fancybox-button--play" title="{{PLAY_START}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.5 5.4v13.2l11-6.6z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.33 5.75h2.2v12.5h-2.2V5.75zm5.15 0h2.2v12.5h-2.2V5.75z"/></svg></button>'},slideShow:{autoStart:!1,speed:3e3,progress:!0}});function o(t){this.instance=t,this.init()}s.extend(o.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this,e=t.instance,o=e.group[e.currIndex].opts.slideShow;t.$button=e.$refs.toolbar.find("[data-fancybox-play]").on("click",function(){t.toggle()}),e.group.length<2||!o?t.$button.hide():o.progress&&(t.$progress=s('<div class="modula-fancybox-progress"></div>').appendTo(e.$refs.inner))},set:function(t){var e=this,o=e.instance,n=o.current;n&&(!0===t||n.opts.loop||o.currIndex<o.group.length-1)?e.isActive&&"video"!==n.contentType&&(e.$progress&&s.modulaFancybox.animate(e.$progress.show(),{scaleX:1},n.opts.slideShow.speed),e.timer=setTimeout(function(){o.current.opts.loop||o.current.index!=o.group.length-1?o.next():o.jumpTo(0)},n.opts.slideShow.speed)):(e.stop(),o.idleSecondsCounter=0,o.showControls())},clear:function(){clearTimeout(this.timer),this.timer=null,this.$progress&&this.$progress.removeAttr("style").hide()},start:function(){var t=this,e=t.instance.current;e&&(t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_STOP).removeClass("modula-fancybox-button--play").addClass("modula-fancybox-button--pause"),t.isActive=!0,e.isComplete&&t.set(!0),t.instance.trigger("onSlideShowChange",!0))},stop:function(){var t=this,e=t.instance.current;t.clear(),t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_START).removeClass("modula-fancybox-button--pause").addClass("modula-fancybox-button--play"),t.isActive=!1,t.instance.trigger("onSlideShowChange",!1),t.$progress&&t.$progress.removeAttr("style").hide()},toggle:function(){this.isActive?this.stop():this.start()}}),s(i).on({"onInit.fb":function(t,e){e&&!e.SlideShow&&(e.SlideShow=new o(e))},"beforeShow.fb":function(t,e,o,n){e=e&&e.SlideShow;n?e&&o.opts.slideShow.autoStart&&e.start():e&&e.isActive&&e.clear()},"afterShow.fb":function(t,e,o){e=e&&e.SlideShow;e&&e.isActive&&e.set()},"afterKeydown.fb":function(t,e,o,n,a){e=e&&e.SlideShow;!e||!o.opts.slideShow||80!==a&&32!==a||s(i.activeElement).is("button,a,input")||(n.preventDefault(),e.toggle())},"beforeClose.fb onDeactivate.fb":function(t,e){e=e&&e.SlideShow;e&&e.stop()}}),s(i).on("visibilitychange",function(){var t=s.modulaFancybox.getInstance(),t=t&&t.SlideShow;t&&t.isActive&&(i.hidden?t.clear():t.set())})}(document,jQuery),function(i,o){"use strict";var n,a=function(){for(var t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],e={},o=0;o<t.length;o++){var n=t[o];if(n&&n[1]in i){for(var a=0;a<n.length;a++)e[t[0][a]]=n[a];return e}}return!1}();a&&(n={request:function(t){(t=t||i.documentElement)[a.requestFullscreen](t.ALLOW_KEYBOARD_INPUT)},exit:function(){i[a.exitFullscreen]()},toggle:function(t){t=t||i.documentElement,this.isFullscreen()?this.exit():this.request(t)},isFullscreen:function(){return Boolean(i[a.fullscreenElement])},enabled:function(){return Boolean(i[a.fullscreenEnabled])}},o.extend(!0,o.modulaFancybox.defaults,{btnTpl:{fullScreen:'<button data-fancybox-fullscreen class="modula-fancybox-button modula-fancybox-button--fsenter" title="{{FULL_SCREEN}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"/></svg></button>'},fullScreen:{autoStart:!1}}),o(i).on(a.fullscreenchange,function(){var t=n.isFullscreen(),e=o.modulaFancybox.getInstance();e&&(e.current&&"image"===e.current.type&&e.isAnimating&&(e.isAnimating=!1,e.update(!0,!0,0),e.isComplete||e.complete()),e.trigger("onFullscreenChange",t),e.$refs.container.toggleClass("modula-fancybox-is-fullscreen",t),e.$refs.toolbar.find("[data-fancybox-fullscreen]").toggleClass("modula-fancybox-button--fsenter",!t).toggleClass("modula-fancybox-button--fsexit",t))})),o(i).on({"onInit.fb":function(t,e){a?e&&e.group[e.currIndex].opts.fullScreen?(e.$refs.container.on("click.fb-fullscreen","[data-fancybox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),n.toggle()}),e.opts.fullScreen&&!0===e.opts.fullScreen.autoStart&&n.request(),e.FullScreen=n):e&&e.$refs.toolbar.find("[data-fancybox-fullscreen]").hide():e.$refs.toolbar.find("[data-fancybox-fullscreen]").remove()},"afterKeydown.fb":function(t,e,o,n,a){e&&e.FullScreen&&70===a&&(n.preventDefault(),e.FullScreen.toggle())},"beforeClose.fb":function(t,e){e&&e.FullScreen&&e.$refs.container.hasClass("modula-fancybox-is-fullscreen")&&n.exit()}})}(document,jQuery),function(t,i){"use strict";var s="modula-fancybox-thumbs",r=s+"-active";i.modulaFancybox.defaults=i.extend(!0,{btnTpl:{thumbs:'<button data-fancybox-thumbs class="modula-fancybox-button modula-fancybox-button--thumbs" title="{{THUMBS}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.59 14.59h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76H5.65V5.65z"/></svg></button>'},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".modula-fancybox-container",axis:"y"}},i.modulaFancybox.defaults);function n(t){this.init(t)}i.extend(n.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e=this,o=t.group,n=0;e.instance=t,e.opts=o[t.currIndex].opts.thumbs,(t.Thumbs=e).$button=t.$refs.toolbar.find("[data-fancybox-thumbs]");for(var a=0,i=o.length;a<i&&(o[a].thumb&&n++,!(1<n));a++);1<n&&e.opts?(e.$button.removeAttr("style").on("click",function(){e.toggle()}),e.isActive=!0):e.$button.hide()},create:function(){var o,t=this,e=t.instance,n=t.opts.parentEl,a=[];t.$grid||(t.$grid=i('<div class="'+s+" "+s+"-"+t.opts.axis+'"></div>').appendTo(e.$refs.container.find(n).addBack().filter(n)),t.$grid.on("click","a",function(){e.jumpTo(i(this).attr("data-index"))})),t.$list||(t.$list=i('<div class="'+s+'__list">').appendTo(t.$grid)),i.each(e.group,function(t,e){(o=e.thumb)||"image"!==e.type||(o=e.src),a.push('<a href="javascript:;" tabindex="0" data-index="'+t+'"'+(o&&o.length?' style="background-image:url('+o+')"':'class="modula-fancybox-thumbs-missing"')+"></a>")}),t.$list[0].innerHTML=a.join(""),"x"===t.opts.axis&&t.$list.width(parseInt(t.$grid.css("padding-right"),10)+e.group.length*t.$list.children().eq(0).outerWidth(!0))},focus:function(t){var e,o,n=this,a=n.$list,i=n.$grid;n.instance.current&&(o=(e=a.children().removeClass(r).filter('[data-index="'+n.instance.current.index+'"]').addClass(r)).position(),"y"===n.opts.axis&&(o.top<0||o.top>a.height()-e.outerHeight())?a.stop().animate({scrollTop:a.scrollTop()+o.top},t):"x"===n.opts.axis&&(o.left<i.scrollLeft()||o.left>i.scrollLeft()+(i.width()-e.outerWidth()))&&a.parent().stop().animate({scrollLeft:o.left},t))},update:function(){var t=this;t.instance.$refs.container.toggleClass("modula-fancybox-show-thumbs",this.isVisible),t.isVisible?(t.$grid||t.create(),t.instance.trigger("onThumbsShow"),t.focus(0)):t.$grid&&t.instance.trigger("onThumbsHide"),t.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),i(t).on({"onInit.fb":function(t,e){var o;e&&!e.Thumbs&&(o=new n(e)).isActive&&!0===o.opts.autoStart&&o.show()},"beforeShow.fb":function(t,e,o,n){e=e&&e.Thumbs;e&&e.isVisible&&e.focus(n?0:250)},"afterKeydown.fb":function(t,e,o,n,a){e=e&&e.Thumbs;e&&e.isActive&&71===a&&(n.preventDefault(),e.toggle())},"beforeClose.fb":function(t,e){e=e&&e.Thumbs;e&&e.isVisible&&!1!==e.opts.hideOnClose&&e.$grid.hide()}})}(document,jQuery),function(t,o){"use strict";o.extend(!0,o.modulaFancybox.defaults,{btnTpl:{share:'<button data-fancybox-share class="modula-fancybox-button modula-fancybox-button--share" title="{{SHARE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.55 19c1.4-8.4 9.1-9.8 11.9-9.8V5l7 7-7 6.3v-3.5c-2.8 0-10.5 2.1-11.9 4.2z"/></svg></button>'},share:{url:function(t,e){return!t.currentHash&&"inline"!==e.type&&"html"!==e.type&&(e.origSrc||e.src)||window.location}}}),o(t).on("click","[data-fancybox-share]",function(){var a,e,i=o.modulaFancybox.getInstance(),s=i.current||null,r="<div class='modula-fancybox-share'><h1>{{SHARE}}</h1><p>";s&&("function"===o.type(s.opts.share.url)&&(a=s.opts.share.url.apply(s,[i,s])),o.each(s.opts.modulaShare,function(t,e){var o=(s.opts.lightboxEmailMessage.length?s.opts.lightboxEmailMessage:"Here is the link to the image : %%image_link%% and this is the link to the gallery : %%gallery_link%%").replace(/\%%gallery_link%%/g,window.location.href).replace(/\%%image_link%%/g,s.src),n=null!=jQuery(s.$image).attr("title")?jQuery(s.$image).attr("title"):"";""==n&&(n=i.$caption.text()),r+=s.opts.shareBtnTpl[e].replace(/\{\{media\}\}/g,"image"===s.type?encodeURIComponent(s.src):"").replace(/\{\{modulaShareUrl\}\}/g,encodeURIComponent(a)).replace(/\{\{descr\}\}/g,encodeURIComponent(n)).replace(/\{\{subject\}\}/g,encodeURIComponent(s.opts.lightboxEmailSubject)).replace(/\{\{emailMessage\}\}/g,encodeURIComponent(o))}),r=(r+="</p><p><input class='modula-fancybox-share__input' type='text' value='{{url_raw}}' /></p></div>").replace(/\{\{url_raw\}\}/g,(e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"},String(a).replace(/[&<>"'`=\/]/g,function(t){return e[t]}))),o.modulaFancybox.open({src:i.translate(i,r),type:"html",opts:{touch:!1,animationEffect:!1,afterLoad:function(t,e){i.$refs.container.one("beforeClose.fb",function(){t.close(null,0)}),e.$content.find(".modula-fancybox-share__button").click(function(){return window.open(this.href,"Share","width=550, height=450"),!1})},mobile:{autoFocus:!1}}}))})}(document,jQuery),function(i,s,n){"use strict";function a(){var t=i.location.hash.substr(1),e=t.split("-"),o=1<e.length&&/^\+?\d+$/.test(e[e.length-1])&&parseInt(e.pop(-1),10)||1;return{hash:t,index:o<1?1:o,gallery:e.join("-")}}function e(t){""!==t.gallery&&n("[data-fancybox='"+n.escapeSelector(t.gallery)+"']").eq(t.index-1).focus().trigger("click.fb-start")}function r(t){return!!t&&(""!==(t=(t=(t.current||t).opts).hash||(t.$orig?t.$orig.data("fancybox")||t.$orig.data("fancybox-trigger"):""))&&t)}n.escapeSelector||(n.escapeSelector=function(t){return(t+"").replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t})}),n(function(){!1!==n.modulaFancybox.defaults.hash&&(n(s).on({"onInit.fb":function(t,e){!1!==e.group[e.currIndex].opts.hash&&(a(),r(e))},"beforeShow.fb":function(t,e,o,n){var a;o&&!1!==o.opts.hash&&(a=r(e))&&(e.currentHash=a+(1<e.group.length?"-"+o.opts.image_id:""),i.location.hash!=="#"+e.currentHash&&(n&&!e.origHash&&(e.origHash=i.location.hash),e.hashTimer&&clearTimeout(e.hashTimer),e.hashTimer=setTimeout(function(){"replaceState"in i.history?(i.history[n?"pushState":"replaceState"]({},s.title,i.location.pathname+i.location.search+"#"+e.currentHash),n&&(e.hasCreatedHistory=!0)):i.location.hash=e.currentHash,e.hashTimer=null},300)))},"beforeClose.fb":function(t,e,o){o&&!1!==o.opts.hash&&(clearTimeout(e.hashTimer),e.currentHash&&e.hasCreatedHistory?i.history.back():e.currentHash&&("replaceState"in i.history?i.history.replaceState({},s.title,i.location.pathname+i.location.search+(e.origHash||"")):i.location.hash=e.origHash),e.currentHash=null)}}),n(i).on("hashchange.fb",function(){var t=a(),o=null;n.each(n(".modula-fancybox-container").get().reverse(),function(t,e){e=n(e).data("modulaFancyBox");if(e&&e.currentHash)return o=e,!1}),o?o.currentHash===t.gallery+"-"+t.index||1===t.index&&o.currentHash==t.gallery||(o.currentHash=null,o.close()):""!==t.gallery&&e(t)}),setTimeout(function(){n.modulaFancybox.getInstance()||e(a())},50))})}(window,document,jQuery),function(t,e){"use strict";var a=(new Date).getTime();e(t).on({"onInit.fb":function(t,n,e){n.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){var e=n.current,o=(new Date).getTime();n.group.length<2||!1===e.opts.wheel||"auto"===e.opts.wheel&&"image"!==e.type||(t.preventDefault(),t.stopPropagation(),e.$slide.hasClass("modula-fancybox-animated")||(t=t.originalEvent||t,o-a<250||(a=o,n[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?"next":"previous"]())))})}})}(document,jQuery);
5
+ !function(e,t){t=t(e,e.document);e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}(window,function(a,m){"use strict";if(m.getElementsByClassName){var z,n,i,t,s,o,y=m.documentElement,r=a.Date,l=a.HTMLPictureElement,c="addEventListener",h="getAttribute",d=a[c],u=a.setTimeout,f=a.requestAnimationFrame||u,g=a.requestIdleCallback,v=/^picture$/i,p=["load","error","lazyincluded","_lazyloaded"],C={},b=Array.prototype.forEach,A=function(e,t){return C[t]||(C[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),C[t].test(e[h]("class")||"")&&C[t]},E=function(e,t){A(e,t)||e.setAttribute("class",(e[h]("class")||"").trim()+" "+t)},_=function(e,t){(t=A(e,t))&&e.setAttribute("class",(e[h]("class")||"").replace(t," "))},w=function(t,n,e){var a=e?c:"removeEventListener";e&&w(t,n),p.forEach(function(e){t[a](e,n)})},M=function(e,t,n,a,i){var s=m.createEvent("Event");return(n=n||{}).instance=ue,s.initEvent(t,!a,!i),s.detail=n,e.dispatchEvent(s),s},N=function(e,t){var n;!l&&(n=a.picturefill||z.pf)?(t&&t.src&&!e[h]("srcset")&&e.setAttribute("srcset",t.src),n({reevaluate:!0,elements:[e]})):t&&t.src&&(e.src=t.src)},x=function(e,t){return(getComputedStyle(e,null)||{})[t]},W=function(e,t,n){for(n=n||e.offsetWidth;n<z.minSize&&t&&!e._lazysizesWidth;)n=t.offsetWidth,t=t.parentNode;return n},T=(s=[],o=t=[],he._lsFlush=ye,he),e=function(n,e){return e?function(){T(n)}:function(){var e=this,t=arguments;T(function(){n.apply(e,t)})}},B=function(e){function t(){n=null,e()}var n,a,i=function(){var e=r.now()-a;e<99?u(i,99-e):(g||t)(t)};return function(){a=r.now(),n=n||u(i,99)}};!function(){var e,t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(e in z=a.lazySizesConfig||a.lazysizesConfig||{},t)e in z||(z[e]=t[e]);a.lazySizesConfig=z,u(function(){z.init&&ze()})}();var F,S,L,R,k,D,H,O,P,$,I,q,j,G,J,K,Q,U,V,X,Y,Z,ee,te,ne,ae,ie,se,oe,re,le,ce,de,ue,fe=(V=/^img$/i,X=/^iframe$/i,Y="onscroll"in a&&!/(gle|ing)bot/.test(navigator.userAgent),te=-1,j=pe,J=ee=Z=0,K=z.throttleDelay,Q=z.ricTimeout,U=g&&49<Q?function(){g(Ce,{timeout:Q}),Q!==z.ricTimeout&&(Q=z.ricTimeout)}:e(function(){u(Ce)},!0),ae=e(be),ie=function(e){ae({target:e.target})},se=e(function(e,t,n,a,i){var s,o,r,l;(r=M(e,"lazybeforeunveil",t)).defaultPrevented||(a&&(n?E(e,z.autosizesClass):e.setAttribute("sizes",a)),n=e[h](z.srcsetAttr),a=e[h](z.srcAttr),i&&(o=(s=e.parentNode)&&v.test(s.nodeName||"")),l=t.firesLoad||"src"in e&&(n||a||o),r={target:e},E(e,z.loadingClass),l&&(clearTimeout(L),L=u(ge,2500),w(e,ie,!0)),o&&b.call(s.getElementsByTagName("source"),Ae),n?e.setAttribute("srcset",n):a&&!o&&(X.test(e.nodeName)?function(t,n){try{t.contentWindow.location.replace(n)}catch(e){t.src=n}}(e,a):e.src=a),i&&(n||o)&&N(e,{src:a})),e._lazyRace&&delete e._lazyRace,_(e,z.lazyClass),T(function(){(!l||e.complete&&1<e.naturalWidth)&&(be(r),e._lazyCache=!0,u(function(){"_lazyCache"in e&&delete e._lazyCache},9))},!0)}),re=function(){var e;S||(r.now()-k<999?u(re,999):(e=B(function(){z.loadMode=3,ne()}),S=!0,z.loadMode=3,ne(),d("scroll",function(){3==z.loadMode&&(z.loadMode=2),e()},!0)))},{_:function(){k=r.now(),ue.elements=m.getElementsByClassName(z.lazyClass),F=m.getElementsByClassName(z.lazyClass+" "+z.preloadClass),d("scroll",ne,!0),d("resize",ne,!0),a.MutationObserver?new MutationObserver(ne).observe(y,{childList:!0,subtree:!0,attributes:!0}):(y[c]("DOMNodeInserted",ne,!0),y[c]("DOMAttrModified",ne,!0),setInterval(ne,999)),d("hashchange",ne,!0),["focus","mouseover","click","load","transitionend","animationend","webkitAnimationEnd"].forEach(function(e){m[c](e,ne,!0)}),/d$|^c/.test(m.readyState)?re():(d("load",re),m[c]("DOMContentLoaded",ne),u(re,2e4)),ue.elements.length?(pe(),T._lsFlush()):ne()},checkElems:ne=function(e){var t;(e=!0===e)&&(Q=33),G||(G=!0,(t=K-(r.now()-J))<0&&(t=0),e||t<9?U():u(U,t))},unveil:oe=function(e){var t,n=V.test(e.nodeName),a=n&&(e[h](z.sizesAttr)||e[h]("sizes")),i="auto"==a;(!i&&S||!n||!e[h]("src")&&!e.srcset||e.complete||A(e,z.errorClass)||!A(e,z.lazyClass))&&(t=M(e,"lazyunveilread").detail,i&&me.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,ee++,se(e,t,i,a,n))}}),me=(ce=e(function(e,t,n,a){var i,s,o;if(e._lazysizesWidth=a,a+="px",e.setAttribute("sizes",a),v.test(t.nodeName||""))for(s=0,o=(i=t.getElementsByTagName("source")).length;s<o;s++)i[s].setAttribute("sizes",a);n.detail.dataAttr||N(e,n.detail)}),{_:function(){le=m.getElementsByClassName(z.autosizesClass),d("resize",de)},checkElems:de=B(function(){var e,t=le.length;if(t)for(e=0;e<t;e++)Ee(le[e])}),updateElem:Ee}),ze=function(){ze.i||(ze.i=!0,me._(),fe._())};return ue={cfg:z,autoSizer:me,loader:fe,init:ze,uP:N,aC:E,rC:_,hC:A,fire:M,gW:W,rAF:T}}function ye(){var e=o;for(o=t.length?s:t,i=!(n=!0);e.length;)e.shift()();n=!1}function he(e,t){n&&!t?e.apply(this,arguments):(o.push(e),i||(i=!0,(m.hidden?u:f)(ye)))}function ge(e){ee--,e&&!(ee<0)&&e.target||(ee=0)}function ve(e){return null==q&&(q="hidden"==x(m.body,"visibility")),q||"hidden"!=x(e.parentNode,"visibility")&&"hidden"!=x(e,"visibility")}function pe(){var e,t,n,a,i,s,o,r,l,c,d,u,f=ue.elements;if((R=z.loadMode)&&ee<8&&(e=f.length)){for(t=0,te++,c=!z.expand||z.expand<1?500<y.clientHeight&&500<y.clientWidth?500:370:z.expand,d=(ue._defEx=c)*z.expFactor,u=z.hFac,q=null,Z<d&&ee<1&&2<te&&2<R&&!m.hidden?(Z=d,te=0):Z=1<R&&1<te&&ee<6?c:0;t<e;t++)if(f[t]&&!f[t]._lazyRace)if(Y)if((r=f[t][h]("data-expand"))&&(s=+r)||(s=Z),l!==s&&(D=innerWidth+s*u,H=innerHeight+s,o=-1*s,l=s),n=f[t].getBoundingClientRect(),(I=n.bottom)>=o&&(O=n.top)<=H&&($=n.right)>=o*u&&(P=n.left)<=D&&(I||$||P||O)&&(z.loadHidden||ve(f[t]))&&(S&&ee<3&&!r&&(R<3||te<4)||function(e,t){var n,a=e,i=ve(e);for(O-=t,I+=t,P-=t,$+=t;i&&(a=a.offsetParent)&&a!=m.body&&a!=y;)(i=0<(x(a,"opacity")||1))&&"visible"!=x(a,"overflow")&&(n=a.getBoundingClientRect(),i=$>n.left&&P<n.right&&I>n.top-1&&O<n.bottom+1);return i}(f[t],s))){if(oe(f[t]),i=!0,9<ee)break}else!i&&S&&!a&&ee<4&&te<4&&2<R&&(F[0]||z.preloadAfterLoad)&&(F[0]||!r&&(I||$||P||O||"auto"!=f[t][h](z.sizesAttr)))&&(a=F[0]||f[t]);else oe(f[t]);a&&!i&&oe(a)}}function Ce(){G=!1,J=r.now(),j()}function be(e){var t=e.target;t._lazyCache?delete t._lazyCache:(ge(e),E(t,z.loadedClass),_(t,z.loadingClass),w(t,ie),M(t,"lazyloaded"))}function Ae(e){var t,n=e[h](z.srcsetAttr);(t=z.customMedia[e[h]("data-media")||e[h]("media")])&&e.setAttribute("media",t),n&&e.setAttribute("srcset",n)}function Ee(e,t,n){var a=e.parentNode;a&&(n=W(e,a,n),(t=M(e,"lazybeforesizes",{width:n,dataAttr:!!t})).defaultPrevented||(n=t.detail.width)&&n!==e._lazysizesWidth&&ce(e,a,t,n))}});
6
+ function tg_getURLParameter(t){return decodeURIComponent((new RegExp("[?|&]"+t+"=([^&;]+?)(&|#|;|$)").exec(location.search)||[,""])[1].replace(/\+/g,"%20"))||null}function modulaInViewport(t){"function"==typeof jQuery&&t instanceof jQuery&&(t=t[0]);t=t.getBoundingClientRect();return t.top-jQuery(window).height()<=-100&&-400<=t.top-jQuery(window).height()||t.bottom<=jQuery(window).height()}jQuery(document).on("vc-full-width-row-single vc-full-width-row",function(t,i){0<jQuery("body").find(".modula").length&&jQuery(window).trigger("modula-update")}),jQuery(window).on("elementor/frontend/init",function(){window.elementorFrontend&&window.elementorFrontend.hooks.addAction("frontend/element_ready/global",function(t){jQuery("body").find(".modula").length})}),function(u,s,a,t){var n="modulaGallery",e={resizer:"/",keepArea:!0,type:"creative-gallery",columns:12,gutter:10,desktopGutter:10,mobileGutter:10,tabletGutter:10,enableTwitter:!1,enableFacebook:!1,enableWhatsapp:!1,enablePinterest:!1,enableLinkedin:!1,enableEmail:!1,lazyLoad:0,initLightbox:!1,lightbox:"fancybox",lightboxOpts:{},inView:!1};function h(t,i){this.element=t,this.$element=u(t),this.$itemsCnt=this.$element.find(".modula-items"),this.$items=this.$itemsCnt.find(".modula-item"),this.options=u.extend({},e,i),this._defaults=e,this._name=n,this.tiles=[],this.$tilesCnt=null,this.completed=!1,this.lastWidth=0,this.resizeTO=0,this.isIsotope=!1,this.isLazyLoaded=!0,this.init()}h.prototype.init=function(){var i=this,t=a.documentElement.clientWidth;this.options.gutter=t<=568?this.options.mobileGutter:t<=768?this.options.tabletGutter:this.options.desktopGutter,u(a).trigger("modula_api_before_init",[i]),"custom-grid"===this.options.type?this.createCustomGallery():"creative-gallery"==this.options.type?this.createGrid():"grid"==this.options.type&&("automatic"==this.options.grid_type?this.createAutoGrid():this.createColumnsGrid()),"custom-grid"===this.options.type&&u(s).height()<u("html").height()&&i.onResize(i),u(s).resize(function(){i.onResize(i)}),u(s).on("modula-update",function(){i.onResize(i)}),u(a).on("lazyloaded",function(t){t=u(t.target);"modula"==t.data("source")&&(t.data("size",{width:t.width(),height:t.height()}),(t=t.parents(".modula-item")).addClass("tg-loaded"),t=i.$items.not(".jtg-hidden").index(t),i.placeImage(t),i.isIsotope&&i.$itemsCnt.modulaisotope("layout"),"grid"==i.options.type&&"automatic"==i.options.grid_type&&i.$itemsCnt.justifiedGallery())}),i.options.inView&&jQuery(s).on("DOMContentLoaded load resize scroll",function(){modulaInViewport(i.$element)&&i.$element.addClass("modula-loaded-scale")}),this.setupSocial(),jQuery(i.$element).addClass("modula-gallery-initialized"),this.options.onComplete&&this.options.onComplete(),"fancybox"!=i.options.lightbox||i.options.initLightbox||this.initLightbox(),u(a).trigger("modula_api_after_init",[i])},h.prototype.initLightbox=function(){var e=this;e.$element.on("click",".modula-item-link:not( .modula-simple-link )",function(t){t.preventDefault();var i=u.map(e.$items,function(t){var i=jQuery(t).find(".modula-item-link:not( .modula-simple-link )"),t=jQuery(t).find(".pic");return{src:i.attr("href"),opts:{$thumb:t.parents(".modula-item"),caption:i.data("caption"),alt:t.attr("alt"),image_id:i.attr("data-image-id")}}}),t=e.$items.index(jQuery(this).parents(".modula-item"));jQuery.modulaFancybox.open(i,e.options.lightboxOpts,t)})},h.prototype.trunc=function(t){return Math.trunc?Math.trunc(t):(t=+t,isFinite(t)?t-t%1||(t<0?-0:0===t?t:0):t)},h.prototype.createCustomGallery=function(){var h,r=this,t=this.$element.find(".modula-items").width(),l=this,d=this.options.columns,i=a.documentElement.clientWidth;"1"==this.options.enableResponsive&&(i<=568?d=this.options.mobileColumns:i<=768&&(d=this.options.tabletColumns)),h=0<this.options.gutter?(t-this.options.gutter*(d-1))/d:Math.floor(t/d*1e3)/1e3,this.$items.not(".jtg-hidden").each(function(t,i){var e,o,n={},s=u(i).data("width"),a=u(i).data("height");12<s&&(s=12),"1"==l.options.enableResponsive&&(e=s,o=a,1==d?a=(s=1)*o/e:((s=Math.round(d*e/12))<1&&(s=1),(a=Math.round(s*o/e))<1&&(a=1))),n.width=h*s+l.options.gutter*(s-1),n.height=Math.round(h)*a+l.options.gutter*(a-1),u(i).data("size",n).addClass("tiled").addClass(n.width>n.height?"tile-h":"tile-v").data("position"),u(i).css(u(i).data("size")),u(i).find(".figc").css({width:u(i).data("size").width,height:u(i).data("size").height}),r.loadImage(t)});t={itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(l.options.gutter)}};this.$itemsCnt.modulaisotope(t),this.isIsotope=!0},h.prototype.createGrid=function(){var o=this;this.$itemsCnt.data("area",this.$itemsCnt.width()*this.options.height),this.lastWidth=this.$itemsCnt.width();for(var t,i=0;i<this.$items.not(".jtg-hidden").length;i++)this.tiles.push(o.getSlot());this.tiles.sort(function(t,i){return t.position-i.position}),this.$items.not(".jtg-hidden").each(function(t,i){var e=o.tiles[t];u(i).data("size",e),u(i).addClass("tiled").addClass(e.width>e.height?"tile-h":"tile-v").data("position"),u(i).css({width:e.width,height:e.height}),u(i).find(".figc").css({width:e.width,height:e.height}),o.loadImage(t)}),this.isIsotope||(t={resizesContainer:!1,itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(o.options.gutter)}},this.$itemsCnt.modulaisotope(t),this.isIsotope=!0)},h.prototype.createAutoGrid=function(){this.$itemsCnt.justifiedGallery({rowHeight:this.options.rowHeight,margins:this.options.gutter,lastRow:this.options.lastRow,captions:!1,border:0,imgSelector:".pic",cssAnimation:!0,imagesAnimationDuration:700})},h.prototype.createColumnsGrid=function(){var e=this;this.$itemsCnt.modulaisotope({itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(this.options.gutter)}}),this.$items.each(function(t,i){e.loadImage(t)}),this.isIsotope=!0},h.prototype.getSlot=function(){if(0==this.tiles.length)return o={top:0,left:0,width:this.$itemsCnt.width(),height:this.options.height,area:this.$itemsCnt.width()*this.options.height,position:0};for(var t=0,i=0;i<this.tiles.length;i++)(o=this.tiles[i]).area>this.tiles[t].area&&(t=i);var e,o={},n=this.tiles[t];return(o=n.width>n.height?(e=n.width/2*this.options.randomFactor,n.prevWidth=n.width,n.width=Math.floor(n.width/2+e*(Math.random()-.5)),{top:n.top,left:n.left+n.width+this.options.gutter,width:n.prevWidth-n.width-this.options.gutter,height:n.height}):(e=n.height/2*this.options.randomFactor,n.prevHeight=n.height,n.height=Math.floor(n.height/2+e*(Math.random()-.5)),{left:n.left,top:n.top+n.height+this.options.gutter,width:n.width,height:n.prevHeight-n.height-this.options.gutter})).area=o.width*o.height,o.position=1e3*o.top+o.left,n.position=1e3*n.top+n.left,this.tiles[t]=n,this.tiles[t].area=n.width*n.height,o},h.prototype.reset=function(){this.tiles=[],"custom-grid"===this.options.type?this.createCustomGallery():"creative-gallery"==this.options.type?this.createGrid():"grid"==this.options.type&&("automatic"==this.options.grid_type?this.createAutoGrid():this.createColumnsGrid()),this.lastWidth=this.$itemsCnt.width(),u(a).trigger("modula_api_reset",[this])},h.prototype.onResize=function(i){var t;i.lastWidth!=i.$itemsCnt.width()&&(t=a.documentElement.clientWidth,i.options.gutter=t<=568?i.options.mobileGutter:t<=768?i.options.tabletGutter:this.options.desktopGutter,clearTimeout(i.resizeTO),i.resizeTO=setTimeout(function(){var t;i.options.keepArea&&(t=i.$itemsCnt.data("area"),i.$itemsCnt.height(t/i.$itemsCnt.width())),i.reset(),i.isIsotope&&i.$itemsCnt.modulaisotope({packery:{gutter:parseInt(i.options.gutter)}}).modulaisotope("layout")},100))},h.prototype.loadImage=function(t){var i,e,o=this,n=o.$items.not(".jtg-hidden").eq(t).find(".pic");"0"==o.options.lazyLoad?((e=new Image).onload=function(){i={width:this.width,height:this.height},n.data("size",i),o.placeImage(t)},"undefined"!=n.attr("src")?e.src=n.attr("src"):e.src=n.data("src")):o.placeImage(t)},h.prototype.placeImage=function(t){if("grid"!=this.options.type){var i=this.$items.not(".jtg-hidden").eq(t),e=i.find(".pic"),o=i.data("size"),n=e.data("size");if(void 0!==o&&void 0!==n){o.width,o.height;var s=n.width/n.height,a=e.data("valign")?e.data("valign"):"middle",h=e.data("halign")?e.data("halign"):"center",i={top:"auto",bottom:"auto",left:"auto",right:"auto",width:"auto",height:"auto",margin:"0",maxWidth:"999em"};if(o.width*n.height/n.width>o.height)switch(i.width=o.width,i.left=0,a){case"top":i.top=0;break;case"middle":i.top=0-(o.width*(1/s)-o.height)/2;break;case"bottom":i.bottom=0}else switch(i.height=o.height,i.top=0,h){case"left":i.left=0;break;case"center":i.left=0-(o.height*s-o.width)/2;break;case"right":i.right=0}e.css(i),this.$items.not(".jtg-hidden").eq(t).addClass("tg-loaded")}}},h.prototype.setupSocial=function(){this.options.enableTwitter&&i(this.$items,this),this.options.enableFacebook&&o(this.$items,this),this.options.enablePinterest&&l(this.$items,this),this.options.enableLinkedin&&d(this.$items,this),this.options.enableWhatsapp&&r(this.$items,this),this.options.enableEmail&&p(this.$items,this)},h.prototype.destroy=function(){this.isPackeryActive&&(this.$itemsCnt.packery("destroy"),this.isPackeryActive=!1)};var i=function(t,i){t.find(".modula-icon-twitter").click(function(t){t.preventDefault();var i=u(this).parents(".modula-item").find("img.pic"),e=i.data("caption"),o=i.data("full"),t=i.attr("title"),i=a.title;return 0<t.length?i=u.trim(t):0<e.length&&(i=u.trim(e)),s.open("https://twitter.com/intent/tweet?url="+encodeURI(o)+"&text="+encodeURI(i),"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},o=function(t,i){t.find(".modula-icon-facebook").click(function(t){t.preventDefault();t="//www.facebook.com/sharer.php?u="+u(this).parents(".modula-item").find("img.pic").attr("data-full");return s.open(t,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},r=function(t,i){t.find(".modula-icon-whatsapp").click(function(t){t.preventDefault();t=u(this).parents(".modula-item").find("img.pic").attr("data-full");return s.open("https://api.whatsapp.com/send?text="+encodeURI(t)+"&preview_url=true","ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},l=function(t,i){t.find(".modula-icon-pinterest").click(function(t){t.preventDefault();var i=u(this).parents(".modula-item").find("img.pic"),e=i.data("full"),o=i.data("caption"),n=i.attr("title"),t=a.title;0<n.length?t=u.trim(n):0<o.length&&(t=u.trim(o));e="http://pinterest.com/pin/create/button/?url="+encodeURI(e)+"&description="+encodeURI(t);return 1<=i.length&&(t=i.attr("data-full"),e+="&media="+(i=t,(t=a.createElement("img")).src=i,i=t.src,t.src=null,i)),s.open(e,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},d=function(t,i){t.find(".modula-icon-linkedin").click(function(t){t.preventDefault();t=u(this).parents(".modula-item").find("img.pic").attr("data-full"),t="//linkedin.com/shareArticle?mini=true&url="+encodeURI(t);return s.open(t,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},p=function(t,n){t.find(".modula-icon-email").click(function(t){var i=encodeURI(n.options.email_subject),e=jQuery(".modula-icon-email").parents(".modula-item").find("img.pic").attr("data-full"),o=location.href,o="mailto:?subject="+i+"&body="+encodeURI(n.options.email_message.replace(/%%image_link%%/g,e).replace(/%%gallery_link%%/g,o));return s.open(o,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})};u.fn[n]=function(i){var e,o=arguments;return i===t||"object"==typeof i?this.each(function(){u.data(this,"plugin_"+n)||u.data(this,"plugin_"+n,new h(this,i))}):"string"==typeof i&&"_"!==i[0]&&"init"!==i?(this.each(function(){var t=u.data(this,"plugin_"+n);t instanceof h&&"function"==typeof t[i]&&(e=t[i].apply(t,Array.prototype.slice.call(o,1))),"destroy"===i&&u.data(this,"plugin_"+n,null)}),e!==t?e:this):void 0}}(jQuery,window,document),jQuery(document).ready(function(){var t=jQuery(".modula.modula-gallery");jQuery.each(t,function(){var t=jQuery(this).data("config");jQuery(this).modulaGallery(t)})});
assets/js/modula-justified-wf.js CHANGED
@@ -1,3 +1,3 @@
1
- !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(i),i}:e(jQuery)}(function(l){function n(t,i){this.settings=i,this.checkSettings(),this.imgAnalyzerTimeout=null,this.entries=null,this.buildingRow={entriesBuff:[],width:0,height:0,aspectRatio:0},this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.yield={every:2,flushed:0},this.border=0<=i.border?i.border:i.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges(),this.offY=this.border,this.rows=0,this.spinner={phase:0,timeSlot:150,$el:l('<div class="spinner"><span></span><span></span><span></span></div>'),intervalId:null},this.scrollBarOn=!1,this.checkWidthIntervalId=null,this.galleryWidth=t.width(),this.$gallery=t}n.prototype.getSuffix=function(t,i){for(var e=i<t?t:i,s=0;s<this.suffixRanges.length;s++)if(e<=this.suffixRanges[s])return this.settings.sizeRangeSuffixes[this.suffixRanges[s]];return this.settings.sizeRangeSuffixes[this.suffixRanges[s-1]]},n.prototype.removeSuffix=function(t,i){return t.substring(0,t.length-i.length)},n.prototype.endsWith=function(t,i){return-1!==t.indexOf(i,t.length-i.length)},n.prototype.getUsedSuffix=function(t){for(var i in this.settings.sizeRangeSuffixes)if(this.settings.sizeRangeSuffixes.hasOwnProperty(i)&&0!==this.settings.sizeRangeSuffixes[i].length&&this.endsWith(t,this.settings.sizeRangeSuffixes[i]))return this.settings.sizeRangeSuffixes[i];return""},n.prototype.newSrc=function(t,i,e,s){var n;return this.settings.thumbnailPath?n=this.settings.thumbnailPath(t,i,e,s):(s=null!==(s=t.match(this.settings.extension))?s[0]:"",n=t.replace(this.settings.extension,""),n=this.removeSuffix(n,this.getUsedSuffix(n)),n+=this.getSuffix(i,e)+s),n},n.prototype.showImg=function(t,i){this.settings.cssAnimation?(t.addClass("entry-visible"),i&&i()):(t.stop().fadeTo(this.settings.imagesAnimationDuration,1,i),t.find(this.settings.imgSelector).stop().fadeTo(this.settings.imagesAnimationDuration,1,i))},n.prototype.extractImgSrcFromImage=function(t){var i=void 0!==t.data("safe-src")?t.data("safe-src"):t.attr("src");return t.data("jg.originalSrc",i),i},n.prototype.imgFromEntry=function(t){t=t.find(this.settings.imgSelector);return 0===t.length?null:t},n.prototype.captionFromEntry=function(t){t=t.find("> .caption");return 0===t.length?null:t},n.prototype.displayEntry=function(t,i,e,s,n,r){t.width(s),t.height(r),t.css("top",e),t.css("left",i);var o,a,h,g=this.imgFromEntry(t);null!==g?(g.css("width",s),g.css("height",n),g.css("margin-left",-s/2),g.css("margin-top",-n/2),o=g.attr("src"),a=this.newSrc(o,s,n,g[0]),g.one("error",function(){g.attr("src",g.data("jg.originalSrc"))}),h=function(){o!==a&&g.attr("src",a)},"skipped"===t.data("jg.loaded")?this.onImageEvent(o,l.proxy(function(){this.showImg(t,h),t.data("jg.loaded",!0)},this)):this.showImg(t,h)):this.showImg(t),this.displayEntryCaption(t)},n.prototype.displayEntryCaption=function(t){var i,e=this.imgFromEntry(t);null!==e&&this.settings.captions?(null===(i=this.captionFromEntry(t))&&(e=e.attr("alt"),this.isValidCaption(e)||(e=t.attr("title")),this.isValidCaption(e)&&(i=l('<div class="caption">'+e+"</div>"),t.append(i),t.data("jg.createdCaption",!0))),null!==i&&(this.settings.cssAnimation||i.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity),this.addCaptionEventsHandlers(t))):this.removeCaptionEventsHandlers(t)},n.prototype.isValidCaption=function(t){return void 0!==t&&0<t.length},n.prototype.onEntryMouseEnterForCaption=function(t){t=this.captionFromEntry(l(t.currentTarget));this.settings.cssAnimation?t.addClass("caption-visible").removeClass("caption-hidden"):t.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.visibleOpacity)},n.prototype.onEntryMouseLeaveForCaption=function(t){t=this.captionFromEntry(l(t.currentTarget));this.settings.cssAnimation?t.removeClass("caption-visible").removeClass("caption-hidden"):t.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.nonVisibleOpacity)},n.prototype.addCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0===i&&(i={mouseenter:l.proxy(this.onEntryMouseEnterForCaption,this),mouseleave:l.proxy(this.onEntryMouseLeaveForCaption,this)},t.on("mouseenter",void 0,void 0,i.mouseenter),t.on("mouseleave",void 0,void 0,i.mouseleave),t.data("jg.captionMouseEvents",i))},n.prototype.removeCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0!==i&&(t.off("mouseenter",void 0,i.mouseenter),t.off("mouseleave",void 0,i.mouseleave),t.removeData("jg.captionMouseEvents"))},n.prototype.clearBuildingRow=function(){this.buildingRow.entriesBuff=[],this.buildingRow.aspectRatio=0,this.buildingRow.width=0},n.prototype.prepareBuildingRow=function(t){var i,e,s,n,r=!0,o=0,a=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,h=a/this.buildingRow.aspectRatio,g=this.settings.rowHeight,l=this.buildingRow.width/a>this.settings.justifyThreshold;if(t&&"hide"===this.settings.lastRow&&!l){for(i=0;i<this.buildingRow.entriesBuff.length;i++)e=this.buildingRow.entriesBuff[i],this.settings.cssAnimation?e.removeClass("entry-visible"):(e.stop().fadeTo(0,.1),e.find("> img, > a > img").fadeTo(0,0));return-1}for(t&&!l&&"justify"!==this.settings.lastRow&&"hide"!==this.settings.lastRow&&(r=!1,0<this.rows&&(r=(g=(this.offY-this.border-this.settings.margins*this.rows)/this.rows)*this.buildingRow.aspectRatio/a>this.settings.justifyThreshold)),i=0;i<this.buildingRow.entriesBuff.length;i++)n=(e=this.buildingRow.entriesBuff[i]).data("jg.width")/e.data("jg.height"),n=r?(s=i===this.buildingRow.entriesBuff.length-1?a:h*n,h):(s=g*n,g),a-=Math.round(s),e.data("jg.jwidth",Math.round(s)),e.data("jg.jheight",Math.ceil(n)),(0===i||n<o)&&(o=n);return this.buildingRow.height=o,r},n.prototype.flushRow=function(t){var i,e=this.settings,s=this.border,n=this.prepareBuildingRow(t);if(t&&"hide"===e.lastRow&&-1===n)this.clearBuildingRow();else{if(this.maxRowHeight&&this.maxRowHeight<this.buildingRow.height&&(this.buildingRow.height=this.maxRowHeight),t&&("center"===e.lastRow||"right"===e.lastRow)){for(var r=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*e.margins,o=0;o<this.buildingRow.entriesBuff.length;o++)r-=(i=this.buildingRow.entriesBuff[o]).data("jg.jwidth");"center"===e.lastRow?s+=r/2:"right"===e.lastRow&&(s+=r)}var a=this.buildingRow.entriesBuff.length-1;for(o=0;o<=a;o++)i=this.buildingRow.entriesBuff[this.settings.rtl?a-o:o],this.displayEntry(i,s,this.offY,i.data("jg.jwidth"),i.data("jg.jheight"),this.buildingRow.height),s+=i.data("jg.jwidth")+e.margins;this.galleryHeightToSet=this.offY+this.buildingRow.height+this.border,this.setGalleryTempHeight(this.galleryHeightToSet+this.getSpinnerHeight()),(!t||this.buildingRow.height<=e.rowHeight&&n)&&(this.offY+=this.buildingRow.height+e.margins,this.rows+=1,this.clearBuildingRow(),this.settings.triggerEvent.call(this,"jg.rowflush"))}};var i=0;function e(){return l("body").height()>l(window).height()}n.prototype.rememberGalleryHeight=function(){i=this.$gallery.height(),this.$gallery.height(i)},n.prototype.setGalleryTempHeight=function(t){i=Math.max(t,i),this.$gallery.height(i)},n.prototype.setGalleryFinalHeight=function(t){i=t,this.$gallery.height(t)},n.prototype.checkWidth=function(){this.checkWidthIntervalId=setInterval(l.proxy(function(){var t;this.$gallery.is(":visible")&&(t=parseFloat(this.$gallery.width()),e()===this.scrollBarOn?Math.abs(t-this.galleryWidth)>this.settings.refreshSensitivity&&(this.galleryWidth=t,this.rewind(),this.rememberGalleryHeight(),this.startImgAnalyzer(!0)):(this.scrollBarOn=e(),this.galleryWidth=t))},this),this.settings.refreshTime)},n.prototype.isSpinnerActive=function(){return null!==this.spinner.intervalId},n.prototype.getSpinnerHeight=function(){return this.spinner.$el.innerHeight()},n.prototype.stopLoadingSpinnerAnimation=function(){clearInterval(this.spinner.intervalId),this.spinner.intervalId=null,this.setGalleryTempHeight(this.$gallery.height()-this.getSpinnerHeight()),this.spinner.$el.detach()},n.prototype.startLoadingSpinnerAnimation=function(){var t=this.spinner,i=t.$el.find("span");clearInterval(t.intervalId),this.$gallery.append(t.$el),this.setGalleryTempHeight(this.offY+this.buildingRow.height+this.getSpinnerHeight()),t.intervalId=setInterval(function(){t.phase<i.length?i.eq(t.phase).fadeTo(t.timeSlot,1):i.eq(t.phase-i.length).fadeTo(t.timeSlot,0),t.phase=(t.phase+1)%(2*i.length)},t.timeSlot)},n.prototype.rewind=function(){this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.offY=this.border,this.rows=0,this.clearBuildingRow()},n.prototype.updateEntries=function(t){t=t&&null!=this.lastFetchedEntry?l(this.lastFetchedEntry).nextAll(this.settings.selector).toArray():(this.entries=[],this.$gallery.children(this.settings.selector).toArray());return 0<t.length&&(l.isFunction(this.settings.sort)?t=this.sortArray(t):this.settings.randomize&&(t=this.shuffleArray(t)),this.lastFetchedEntry=t[t.length-1],this.settings.filter?t=this.filterArray(t):this.resetFilters(t)),this.entries=this.entries.concat(t),!0},n.prototype.insertToGallery=function(t){var i=this;l.each(t,function(){l(this).appendTo(i.$gallery)})},n.prototype.shuffleArray=function(t){for(var i,e,s=t.length-1;0<s;s--)i=Math.floor(Math.random()*(s+1)),e=t[s],t[s]=t[i],t[i]=e;return this.insertToGallery(t),t},n.prototype.sortArray=function(t){return t.sort(this.settings.sort),this.insertToGallery(t),t},n.prototype.resetFilters=function(t){for(var i=0;i<t.length;i++)l(t[i]).removeClass("jg-filtered")},n.prototype.filterArray=function(t){var i=this.settings;if("string"===l.type(i.filter))return t.filter(function(t){t=l(t);return t.is(i.filter)?(t.removeClass("jg-filtered"),!0):(t.addClass("jg-filtered").removeClass("jg-visible"),!1)});if(l.isFunction(i.filter)){for(var e=t.filter(i.filter),s=0;s<t.length;s++)-1===e.indexOf(t[s])?l(t[s]).addClass("jg-filtered").removeClass("jg-visible"):l(t[s]).removeClass("jg-filtered");return e}},n.prototype.destroy=function(){clearInterval(this.checkWidthIntervalId),l.each(this.entries,l.proxy(function(t,i){var e=l(i);e.css("width",""),e.css("height",""),e.css("top",""),e.css("left",""),e.data("jg.loaded",void 0),e.removeClass("jg-entry");i=this.imgFromEntry(e);i.css("width",""),i.css("height",""),i.css("margin-left",""),i.css("margin-top",""),i.attr("src",i.data("jg.originalSrc")),i.data("jg.originalSrc",void 0),this.removeCaptionEventsHandlers(e);i=this.captionFromEntry(e);e.data("jg.createdCaption")?(e.data("jg.createdCaption",void 0),null!==i&&i.remove()):null!==i&&i.fadeTo(0,1)},this)),this.$gallery.css("height",""),this.$gallery.removeClass("justified-gallery"),this.$gallery.data("jg.controller",void 0)},n.prototype.analyzeImages=function(t){for(var i=this.lastAnalyzedIndex+1;i<this.entries.length;i++){var e=l(this.entries[i]);if(!0===e.data("jg.loaded")||"skipped"===e.data("jg.loaded")){var s=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,n=e.data("jg.width")/e.data("jg.height");if(s/(this.buildingRow.aspectRatio+n)<this.settings.rowHeight&&(this.flushRow(!1),++this.yield.flushed>=this.yield.every))return void this.startImgAnalyzer(t);this.buildingRow.entriesBuff.push(e),this.buildingRow.aspectRatio+=n,this.buildingRow.width+=n*this.settings.rowHeight,this.lastAnalyzedIndex=i}else if("error"!==e.data("jg.loaded"))return}0<this.buildingRow.entriesBuff.length&&this.flushRow(!0),this.isSpinnerActive()&&this.stopLoadingSpinnerAnimation(),this.stopImgAnalyzerStarter(),this.settings.triggerEvent.call(this,t?"jg.resize":"jg.complete"),this.setGalleryFinalHeight(this.galleryHeightToSet)},n.prototype.stopImgAnalyzerStarter=function(){this.yield.flushed=0,null!==this.imgAnalyzerTimeout&&(clearTimeout(this.imgAnalyzerTimeout),this.imgAnalyzerTimeout=null)},n.prototype.startImgAnalyzer=function(t){var i=this;this.stopImgAnalyzerStarter(),this.imgAnalyzerTimeout=setTimeout(function(){i.analyzeImages(t)},.001)},n.prototype.onImageEvent=function(t,i,e){var s,n;(i||e)&&(s=new Image,n=l(s),i&&n.one("load",function(){n.off("load error"),i(s)}),e&&n.one("error",function(){n.off("load error"),e(s)}),s.src=t)},n.prototype.init=function(){var r=!1,o=!1,a=this;l.each(this.entries,function(t,i){var e=l(i),s=a.imgFromEntry(e);if(e.addClass("jg-entry"),!0!==e.data("jg.loaded")&&"skipped"!==e.data("jg.loaded"))if(null!==a.settings.rel&&e.attr("rel",a.settings.rel),null!==a.settings.target&&e.attr("target",a.settings.target),null!==s){var n=a.extractImgSrcFromImage(s);if(s.attr("src",n),!1===a.settings.waitThumbnailsLoad){i=parseFloat(s.prop("width")),s=parseFloat(s.prop("height"));if(!isNaN(i)&&!isNaN(s))return e.data("jg.width",i),e.data("jg.height",s),e.data("jg.loaded","skipped"),o=!0,a.startImgAnalyzer(!1),!0}e.data("jg.loaded",!1),r=!0,a.isSpinnerActive()||a.startLoadingSpinnerAnimation(),a.onImageEvent(n,function(t){e.data("jg.width",t.width),e.data("jg.height",t.height),e.data("jg.loaded",!0),a.startImgAnalyzer(!1)},function(){e.data("jg.loaded","error"),a.startImgAnalyzer(!1)})}else e.data("jg.loaded",!0),e.data("jg.width",e.width()|parseFloat(e.css("width"))|1),e.data("jg.height",e.height()|parseFloat(e.css("height"))|1)}),r||o||this.startImgAnalyzer(!1),this.checkWidth()},n.prototype.checkOrConvertNumber=function(t,i){if("string"===l.type(t[i])&&(t[i]=parseFloat(t[i])),"number"!==l.type(t[i]))throw i+" must be a number";if(isNaN(t[i]))throw"invalid number for "+i},n.prototype.checkSizeRangesSuffixes=function(){if("object"!==l.type(this.settings.sizeRangeSuffixes))throw"sizeRangeSuffixes must be defined and must be an object";var t,i=[];for(t in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(t)&&i.push(t);for(var e={0:""},s=0;s<i.length;s++)if("string"===l.type(i[s]))try{e[parseInt(i[s].replace(/^[a-z]+/,""),10)]=this.settings.sizeRangeSuffixes[i[s]]}catch(t){throw"sizeRangeSuffixes keys must contains correct numbers ("+t+")"}else e[i[s]]=this.settings.sizeRangeSuffixes[i[s]];this.settings.sizeRangeSuffixes=e},n.prototype.retrieveMaxRowHeight=function(){var t=null,i=this.settings.rowHeight;if("string"===l.type(this.settings.maxRowHeight))t=this.settings.maxRowHeight.match(/^[0-9]+%$/)?i*parseFloat(this.settings.maxRowHeight.match(/^([0-9]+)%$/)[1])/100:parseFloat(this.settings.maxRowHeight);else{if("number"!==l.type(this.settings.maxRowHeight)){if(!1===this.settings.maxRowHeight||null==this.settings.maxRowHeight)return null;throw"maxRowHeight must be a number or a percentage"}t=this.settings.maxRowHeight}if(isNaN(t))throw"invalid number for maxRowHeight";return t<i&&(t=i),t},n.prototype.checkSettings=function(){this.checkSizeRangesSuffixes(),this.checkOrConvertNumber(this.settings,"rowHeight"),this.checkOrConvertNumber(this.settings,"margins"),this.checkOrConvertNumber(this.settings,"border");var t=["justify","nojustify","left","center","right","hide"];if(-1===t.indexOf(this.settings.lastRow))throw"lastRow must be one of: "+t.join(", ");if(this.checkOrConvertNumber(this.settings,"justifyThreshold"),this.settings.justifyThreshold<0||1<this.settings.justifyThreshold)throw"justifyThreshold must be in the interval [0,1]";if("boolean"!==l.type(this.settings.cssAnimation))throw"cssAnimation must be a boolean";if("boolean"!==l.type(this.settings.captions))throw"captions must be a boolean";if(this.checkOrConvertNumber(this.settings.captionSettings,"animationDuration"),this.checkOrConvertNumber(this.settings.captionSettings,"visibleOpacity"),this.settings.captionSettings.visibleOpacity<0||1<this.settings.captionSettings.visibleOpacity)throw"captionSettings.visibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings.captionSettings,"nonVisibleOpacity"),this.settings.captionSettings.nonVisibleOpacity<0||1<this.settings.captionSettings.nonVisibleOpacity)throw"captionSettings.nonVisibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings,"imagesAnimationDuration"),this.checkOrConvertNumber(this.settings,"refreshTime"),this.checkOrConvertNumber(this.settings,"refreshSensitivity"),"boolean"!==l.type(this.settings.randomize))throw"randomize must be a boolean";if("string"!==l.type(this.settings.selector))throw"selector must be a string";if(!1!==this.settings.sort&&!l.isFunction(this.settings.sort))throw"sort must be false or a comparison function";if(!1!==this.settings.filter&&!l.isFunction(this.settings.filter)&&"string"!==l.type(this.settings.filter))throw"filter must be false, a string or a filter function"},n.prototype.retrieveSuffixRanges=function(){var t,i=[];for(t in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(t)&&i.push(parseInt(t,10));return i.sort(function(t,i){return i<t?1:t<i?-1:0}),i},n.prototype.updateSettings=function(t){this.settings=l.extend({},this.settings,t),this.checkSettings(),this.border=0<=this.settings.border?this.settings.border:this.settings.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges()},n.prototype.defaults={sizeRangeSuffixes:{},thumbnailPath:void 0,rowHeight:120,maxRowHeight:!1,margins:1,border:-1,lastRow:"nojustify",justifyThreshold:.9,waitThumbnailsLoad:!0,captions:!0,cssAnimation:!0,imagesAnimationDuration:500,captionSettings:{animationDuration:500,visibleOpacity:.7,nonVisibleOpacity:0},rel:null,target:null,extension:/\.[^.\\/]+$/,refreshTime:200,refreshSensitivity:0,randomize:!1,rtl:!1,sort:!1,filter:!1,selector:"a, div:not(.spinner)",imgSelector:"> img, > a > img",triggerEvent:function(t){this.$gallery.trigger(t)}},l.fn.justifiedGallery=function(s){return this.each(function(t,i){var e=l(i);e.addClass("justified-gallery");i=e.data("jg.controller");if(void 0===i){if(null!=s&&"object"!==l.type(s)){if("destroy"===s)return;throw"The argument must be an object"}i=new n(e,l.extend({},n.prototype.defaults,s)),e.data("jg.controller",i)}else if("norewind"!==s){if("destroy"===s)return void i.destroy();i.updateSettings(s),i.rewind()}i.updateEntries("norewind"===s)&&i.init()})}});
2
- !function(e,t){t=t(e,e.document),e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}(window,function(a,m){"use strict";if(m.getElementsByClassName){var z,n,i,t,s,o,y=m.documentElement,r=a.Date,l=a.HTMLPictureElement,c="addEventListener",h="getAttribute",d=a[c],u=a.setTimeout,f=a.requestAnimationFrame||u,g=a.requestIdleCallback,v=/^picture$/i,p=["load","error","lazyincluded","_lazyloaded"],C={},b=Array.prototype.forEach,A=function(e,t){return C[t]||(C[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),C[t].test(e[h]("class")||"")&&C[t]},E=function(e,t){A(e,t)||e.setAttribute("class",(e[h]("class")||"").trim()+" "+t)},_=function(e,t){(t=A(e,t))&&e.setAttribute("class",(e[h]("class")||"").replace(t," "))},w=function(t,n,e){var a=e?c:"removeEventListener";e&&w(t,n),p.forEach(function(e){t[a](e,n)})},M=function(e,t,n,a,i){var s=m.createEvent("Event");return(n=n||{}).instance=ue,s.initEvent(t,!a,!i),s.detail=n,e.dispatchEvent(s),s},N=function(e,t){var n;!l&&(n=a.picturefill||z.pf)?(t&&t.src&&!e[h]("srcset")&&e.setAttribute("srcset",t.src),n({reevaluate:!0,elements:[e]})):t&&t.src&&(e.src=t.src)},x=function(e,t){return(getComputedStyle(e,null)||{})[t]},W=function(e,t,n){for(n=n||e.offsetWidth;n<z.minSize&&t&&!e._lazysizesWidth;)n=t.offsetWidth,t=t.parentNode;return n},T=(s=[],o=t=[],he._lsFlush=ye,he),e=function(n,e){return e?function(){T(n)}:function(){var e=this,t=arguments;T(function(){n.apply(e,t)})}},B=function(e){function t(){n=null,e()}var n,a,i=function(){var e=r.now()-a;e<99?u(i,99-e):(g||t)(t)};return function(){a=r.now(),n=n||u(i,99)}};!function(){var e,t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(e in z=a.lazySizesConfig||a.lazysizesConfig||{},t)e in z||(z[e]=t[e]);a.lazySizesConfig=z,u(function(){z.init&&ze()})}();var F,S,L,R,k,D,H,O,P,$,I,q,j,G,J,K,Q,U,V,X,Y,Z,ee,te,ne,ae,ie,se,oe,re,le,ce,de,ue,fe=(V=/^img$/i,X=/^iframe$/i,Y="onscroll"in a&&!/(gle|ing)bot/.test(navigator.userAgent),te=-1,j=pe,J=ee=Z=0,K=z.throttleDelay,Q=z.ricTimeout,U=g&&49<Q?function(){g(Ce,{timeout:Q}),Q!==z.ricTimeout&&(Q=z.ricTimeout)}:e(function(){u(Ce)},!0),ae=e(be),ie=function(e){ae({target:e.target})},se=e(function(e,t,n,a,i){var s,o,r,l;(r=M(e,"lazybeforeunveil",t)).defaultPrevented||(a&&(n?E(e,z.autosizesClass):e.setAttribute("sizes",a)),n=e[h](z.srcsetAttr),a=e[h](z.srcAttr),i&&(o=(s=e.parentNode)&&v.test(s.nodeName||"")),l=t.firesLoad||"src"in e&&(n||a||o),r={target:e},E(e,z.loadingClass),l&&(clearTimeout(L),L=u(ge,2500),w(e,ie,!0)),o&&b.call(s.getElementsByTagName("source"),Ae),n?e.setAttribute("srcset",n):a&&!o&&(X.test(e.nodeName)?function(t,n){try{t.contentWindow.location.replace(n)}catch(e){t.src=n}}(e,a):e.src=a),i&&(n||o)&&N(e,{src:a})),e._lazyRace&&delete e._lazyRace,_(e,z.lazyClass),T(function(){(!l||e.complete&&1<e.naturalWidth)&&(be(r),e._lazyCache=!0,u(function(){"_lazyCache"in e&&delete e._lazyCache},9))},!0)}),re=function(){var e;S||(r.now()-k<999?u(re,999):(e=B(function(){z.loadMode=3,ne()}),S=!0,z.loadMode=3,ne(),d("scroll",function(){3==z.loadMode&&(z.loadMode=2),e()},!0)))},{_:function(){k=r.now(),ue.elements=m.getElementsByClassName(z.lazyClass),F=m.getElementsByClassName(z.lazyClass+" "+z.preloadClass),d("scroll",ne,!0),d("resize",ne,!0),a.MutationObserver?new MutationObserver(ne).observe(y,{childList:!0,subtree:!0,attributes:!0}):(y[c]("DOMNodeInserted",ne,!0),y[c]("DOMAttrModified",ne,!0),setInterval(ne,999)),d("hashchange",ne,!0),["focus","mouseover","click","load","transitionend","animationend","webkitAnimationEnd"].forEach(function(e){m[c](e,ne,!0)}),/d$|^c/.test(m.readyState)?re():(d("load",re),m[c]("DOMContentLoaded",ne),u(re,2e4)),ue.elements.length?(pe(),T._lsFlush()):ne()},checkElems:ne=function(e){var t;(e=!0===e)&&(Q=33),G||(G=!0,(t=K-(r.now()-J))<0&&(t=0),e||t<9?U():u(U,t))},unveil:oe=function(e){var t,n=V.test(e.nodeName),a=n&&(e[h](z.sizesAttr)||e[h]("sizes")),i="auto"==a;(!i&&S||!n||!e[h]("src")&&!e.srcset||e.complete||A(e,z.errorClass)||!A(e,z.lazyClass))&&(t=M(e,"lazyunveilread").detail,i&&me.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,ee++,se(e,t,i,a,n))}}),me=(ce=e(function(e,t,n,a){var i,s,o;if(e._lazysizesWidth=a,a+="px",e.setAttribute("sizes",a),v.test(t.nodeName||""))for(s=0,o=(i=t.getElementsByTagName("source")).length;s<o;s++)i[s].setAttribute("sizes",a);n.detail.dataAttr||N(e,n.detail)}),{_:function(){le=m.getElementsByClassName(z.autosizesClass),d("resize",de)},checkElems:de=B(function(){var e,t=le.length;if(t)for(e=0;e<t;e++)Ee(le[e])}),updateElem:Ee}),ze=function(){ze.i||(ze.i=!0,me._(),fe._())};return ue={cfg:z,autoSizer:me,loader:fe,init:ze,uP:N,aC:E,rC:_,hC:A,fire:M,gW:W,rAF:T}}function ye(){var e=o;for(o=t.length?s:t,i=!(n=!0);e.length;)e.shift()();n=!1}function he(e,t){n&&!t?e.apply(this,arguments):(o.push(e),i||(i=!0,(m.hidden?u:f)(ye)))}function ge(e){ee--,e&&!(ee<0)&&e.target||(ee=0)}function ve(e){return null==q&&(q="hidden"==x(m.body,"visibility")),q||"hidden"!=x(e.parentNode,"visibility")&&"hidden"!=x(e,"visibility")}function pe(){var e,t,n,a,i,s,o,r,l,c,d,u,f=ue.elements;if((R=z.loadMode)&&ee<8&&(e=f.length)){for(t=0,te++,c=!z.expand||z.expand<1?500<y.clientHeight&&500<y.clientWidth?500:370:z.expand,d=(ue._defEx=c)*z.expFactor,u=z.hFac,q=null,Z<d&&ee<1&&2<te&&2<R&&!m.hidden?(Z=d,te=0):Z=1<R&&1<te&&ee<6?c:0;t<e;t++)if(f[t]&&!f[t]._lazyRace)if(Y)if((r=f[t][h]("data-expand"))&&(s=+r)||(s=Z),l!==s&&(D=innerWidth+s*u,H=innerHeight+s,o=-1*s,l=s),n=f[t].getBoundingClientRect(),(I=n.bottom)>=o&&(O=n.top)<=H&&($=n.right)>=o*u&&(P=n.left)<=D&&(I||$||P||O)&&(z.loadHidden||ve(f[t]))&&(S&&ee<3&&!r&&(R<3||te<4)||function(e,t){var n,a=e,i=ve(e);for(O-=t,I+=t,P-=t,$+=t;i&&(a=a.offsetParent)&&a!=m.body&&a!=y;)(i=0<(x(a,"opacity")||1))&&"visible"!=x(a,"overflow")&&(n=a.getBoundingClientRect(),i=$>n.left&&P<n.right&&I>n.top-1&&O<n.bottom+1);return i}(f[t],s))){if(oe(f[t]),i=!0,9<ee)break}else!i&&S&&!a&&ee<4&&te<4&&2<R&&(F[0]||z.preloadAfterLoad)&&(F[0]||!r&&(I||$||P||O||"auto"!=f[t][h](z.sizesAttr)))&&(a=F[0]||f[t]);else oe(f[t]);a&&!i&&oe(a)}}function Ce(){G=!1,J=r.now(),j()}function be(e){var t=e.target;t._lazyCache?delete t._lazyCache:(ge(e),E(t,z.loadedClass),_(t,z.loadingClass),w(t,ie),M(t,"lazyloaded"))}function Ae(e){var t,n=e[h](z.srcsetAttr);(t=z.customMedia[e[h]("data-media")||e[h]("media")])&&e.setAttribute("media",t),n&&e.setAttribute("srcset",n)}function Ee(e,t,n){var a=e.parentNode;a&&(n=W(e,a,n),(t=M(e,"lazybeforesizes",{width:n,dataAttr:!!t})).defaultPrevented||(n=t.detail.width)&&n!==e._lazysizesWidth&&ce(e,a,t,n))}});
3
- function tg_getURLParameter(t){return decodeURIComponent((new RegExp("[?|&]"+t+"=([^&;]+?)(&|#|;|$)").exec(location.search)||[,""])[1].replace(/\+/g,"%20"))||null}function modulaInViewport(t){"function"==typeof jQuery&&t instanceof jQuery&&(t=t[0]);t=t.getBoundingClientRect();return t.top-jQuery(window).height()<=-100&&-400<=t.top-jQuery(window).height()||t.bottom<=jQuery(window).height()}jQuery(document).on("vc-full-width-row-single vc-full-width-row",function(t,i){0<jQuery("body").find(".modula").length&&jQuery(window).trigger("modula-update")}),jQuery(window).on("elementor/frontend/init",function(){window.elementorFrontend&&window.elementorFrontend.hooks.addAction("frontend/element_ready/global",function(t){0<jQuery("body").find(".modula").length&&jQuery(window).trigger("modula-update")})}),function(u,s,a,t){var n="modulaGallery",e={resizer:"/",keepArea:!0,type:"creative-gallery",columns:12,gutter:10,desktopGutter:10,mobileGutter:10,tabletGutter:10,enableTwitter:!1,enableFacebook:!1,enableWhatsapp:!1,enablePinterest:!1,enableLinkedin:!1,enableEmail:!1,lazyLoad:0,initLightbox:!1,lightbox:"fancybox",lightboxOpts:{},inView:!1};function h(t,i){this.element=t,this.$element=u(t),this.$itemsCnt=this.$element.find(".modula-items"),this.$items=this.$itemsCnt.find(".modula-item"),this.options=u.extend({},e,i),this._defaults=e,this._name=n,this.tiles=[],this.$tilesCnt=null,this.completed=!1,this.lastWidth=0,this.resizeTO=0,this.isIsotope=!1,this.isLazyLoaded=!0,this.init()}h.prototype.init=function(){var i=this,t=a.documentElement.clientWidth;this.options.gutter=t<=568?this.options.mobileGutter:t<=768?this.options.tabletGutter:this.options.desktopGutter,u(a).trigger("modula_api_before_init",[i]),"custom-grid"===this.options.type?this.createCustomGallery():"creative-gallery"==this.options.type?this.createGrid():"grid"==this.options.type&&("automatic"==this.options.grid_type?this.createAutoGrid():this.createColumnsGrid()),"custom-grid"===this.options.type&&u(s).height()<u("html").height()&&i.onResize(i),u(s).resize(function(){i.onResize(i)}),u(s).on("modula-update",function(){i.onResize(i)}),u(a).on("lazyloaded",function(t){t=u(t.target);"modula"==t.data("source")&&(t.data("size",{width:t.width(),height:t.height()}),(t=t.parents(".modula-item")).addClass("tg-loaded"),t=i.$items.not(".jtg-hidden").index(t),i.placeImage(t),i.isIsotope&&i.$itemsCnt.modulaisotope("layout"))}),i.options.inView&&jQuery(s).on("DOMContentLoaded load resize scroll",function(){modulaInViewport(i.$element)&&i.$element.addClass("modula-loaded-scale")}),this.setupSocial(),this.options.onComplete&&this.options.onComplete(),"fancybox"!=i.options.lightbox||i.options.initLightbox||this.initLightbox(),u(a).trigger("modula_api_after_init",[i])},h.prototype.initLightbox=function(){var e=this;e.$element.on("click",".modula-item-link:not( .modula-simple-link )",function(t){t.preventDefault();var i=u.map(e.$items,function(t){var i=jQuery(t).find(".modula-item-link:not( .modula-simple-link )"),t=jQuery(t).find(".pic");return{src:i.attr("href"),opts:{$thumb:t.parents(".modula-item"),caption:i.data("caption"),alt:t.attr("alt"),image_id:i.attr("data-image-id")}}}),t=e.$items.index(jQuery(this).parents(".modula-item"));jQuery.modulaFancybox.open(i,e.options.lightboxOpts,t)})},h.prototype.trunc=function(t){return Math.trunc?Math.trunc(t):(t=+t,isFinite(t)?t-t%1||(t<0?-0:0===t?t:0):t)},h.prototype.createCustomGallery=function(){var h,r=this,t=this.$element.find(".modula-items").width(),d=this,l=this.options.columns,i=a.documentElement.clientWidth;"1"==this.options.enableResponsive&&(i<=568?l=this.options.mobileColumns:i<=768&&(l=this.options.tabletColumns)),h=0<this.options.gutter?(t-this.options.gutter*(l-1))/l:Math.floor(t/l*1e3)/1e3,this.$items.not(".jtg-hidden").each(function(t,i){var e,o,n={},s=u(i).data("width"),a=u(i).data("height");12<s&&(s=12),"1"==d.options.enableResponsive&&(e=s,o=a,1==l?a=(s=1)*o/e:((s=Math.round(l*e/12))<1&&(s=1),(a=Math.round(s*o/e))<1&&(a=1))),n.width=h*s+d.options.gutter*(s-1),n.height=Math.round(h)*a+d.options.gutter*(a-1),u(i).data("size",n).addClass("tiled").addClass(n.width>n.height?"tile-h":"tile-v").data("position"),u(i).css(u(i).data("size")),u(i).find(".figc").css({width:u(i).data("size").width,height:u(i).data("size").height}),r.loadImage(t)});t={itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(d.options.gutter)}};this.$itemsCnt.modulaisotope(t),this.isIsotope=!0},h.prototype.createGrid=function(){var o=this;this.$itemsCnt.data("area",this.$itemsCnt.width()*this.options.height),this.lastWidth=this.$itemsCnt.width();for(var t,i=0;i<this.$items.not(".jtg-hidden").length;i++)this.tiles.push(o.getSlot());this.tiles.sort(function(t,i){return t.position-i.position}),this.$items.not(".jtg-hidden").each(function(t,i){var e=o.tiles[t];u(i).data("size",e),u(i).addClass("tiled").addClass(e.width>e.height?"tile-h":"tile-v").data("position"),u(i).css({width:e.width,height:e.height}),u(i).find(".figc").css({width:e.width,height:e.height}),o.loadImage(t)}),this.isIsotope||(t={resizesContainer:!1,itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(o.options.gutter)}},this.$itemsCnt.modulaisotope(t),this.isIsotope=!0)},h.prototype.createAutoGrid=function(){this.$itemsCnt.justifiedGallery({rowHeight:this.options.rowHeight,margins:this.options.gutter,lastRow:this.options.lastRow,captions:!1,border:0,imgSelector:".pic",cssAnimation:!0,imagesAnimationDuration:700})},h.prototype.createColumnsGrid=function(){var e=this;this.$itemsCnt.modulaisotope({itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(this.options.gutter)}}),this.$items.each(function(t,i){e.loadImage(t)}),this.isIsotope=!0},h.prototype.getSlot=function(){if(0==this.tiles.length)return o={top:0,left:0,width:this.$itemsCnt.width(),height:this.options.height,area:this.$itemsCnt.width()*this.options.height,position:0};for(var t=0,i=0;i<this.tiles.length;i++)(o=this.tiles[i]).area>this.tiles[t].area&&(t=i);var e,o={},n=this.tiles[t];return(o=n.width>n.height?(e=n.width/2*this.options.randomFactor,n.prevWidth=n.width,n.width=Math.floor(n.width/2+e*(Math.random()-.5)),{top:n.top,left:n.left+n.width+this.options.gutter,width:n.prevWidth-n.width-this.options.gutter,height:n.height}):(e=n.height/2*this.options.randomFactor,n.prevHeight=n.height,n.height=Math.floor(n.height/2+e*(Math.random()-.5)),{left:n.left,top:n.top+n.height+this.options.gutter,width:n.width,height:n.prevHeight-n.height-this.options.gutter})).area=o.width*o.height,o.position=1e3*o.top+o.left,n.position=1e3*n.top+n.left,this.tiles[t]=n,this.tiles[t].area=n.width*n.height,o},h.prototype.reset=function(){this.tiles=[],"custom-grid"===this.options.type?this.createCustomGallery():"creative-gallery"==this.options.type?this.createGrid():"grid"==this.options.type&&("automatic"==this.options.grid_type?this.createAutoGrid():this.createColumnsGrid()),this.lastWidth=this.$itemsCnt.width(),u(a).trigger("modula_api_reset",[this])},h.prototype.onResize=function(i){var t;i.lastWidth!=i.$itemsCnt.width()&&(t=a.documentElement.clientWidth,i.options.gutter=t<=568?i.options.mobileGutter:t<=768?i.options.tabletGutter:this.options.desktopGutter,clearTimeout(i.resizeTO),i.resizeTO=setTimeout(function(){var t;i.options.keepArea&&(t=i.$itemsCnt.data("area"),i.$itemsCnt.height(t/i.$itemsCnt.width())),i.reset(),i.isIsotope&&i.$itemsCnt.modulaisotope({packery:{gutter:parseInt(i.options.gutter)}}).modulaisotope("layout")},100))},h.prototype.loadImage=function(t){var i,e=this,o=e.$items.not(".jtg-hidden").eq(t).find(".pic"),n={};"0"==e.options.lazyLoad?void 0===o.attr("width")&&void 0===o.attr("height")?((i=new Image).onload=function(){n={width:this.width,height:this.height},o.data("size",n),e.placeImage(t)},"undefined"!=o.attr("src")?i.src=o.attr("src"):i.src=o.data("src")):(n={width:o.width(),height:o.height()},o.data("size",n),e.placeImage(t)):e.placeImage(t)},h.prototype.placeImage=function(t){if("grid"!=this.options.type){var i=this.$items.not(".jtg-hidden").eq(t),e=i.find(".pic"),o=i.data("size"),n=e.data("size");if(void 0!==o&&void 0!==n){o.width,o.height;var s=n.width/n.height,a=e.data("valign")?e.data("valign"):"middle",i=e.data("halign")?e.data("halign"):"center",h={top:"auto",bottom:"auto",left:"auto",right:"auto",width:"auto",height:"auto",margin:"0",maxWidth:"999em"};if(o.width*n.height/n.width>o.height)switch(h.width=o.width,h.left=0,a){case"top":h.top=0;break;case"middle":h.top=0-(o.width*(1/s)-o.height)/2;break;case"bottom":h.bottom=0}else switch(h.height=o.height,h.top=0,i){case"left":h.left=0;break;case"center":h.left=0-(o.height*s-o.width)/2;break;case"right":h.right=0}e.css(h),this.$items.not(".jtg-hidden").eq(t).addClass("tg-loaded")}}},h.prototype.setupSocial=function(){this.options.enableTwitter&&i(this.$items,this),this.options.enableFacebook&&o(this.$items,this),this.options.enablePinterest&&d(this.$items,this),this.options.enableLinkedin&&l(this.$items,this),this.options.enableWhatsapp&&r(this.$items,this),this.options.enableEmail&&p(this.$items,this)},h.prototype.destroy=function(){this.isPackeryActive&&(this.$itemsCnt.packery("destroy"),this.isPackeryActive=!1)};var i=function(t,i){t.find(".modula-icon-twitter").click(function(t){t.preventDefault();var i=u(this).parents(".modula-item").find("img.pic"),e=i.data("caption"),o=i.data("full"),t=i.attr("title"),i=a.title;return 0<t.length?i=u.trim(t):0<e.length&&(i=u.trim(e)),s.open("https://twitter.com/intent/tweet?url="+encodeURI(o)+"&text="+encodeURI(i),"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},o=function(t,i){t.find(".modula-icon-facebook").click(function(t){t.preventDefault();t="//www.facebook.com/sharer.php?u="+u(this).parents(".modula-item").find("img.pic").attr("data-full");return s.open(t,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},r=function(t,i){t.find(".modula-icon-whatsapp").click(function(t){t.preventDefault();t=u(this).parents(".modula-item").find("img.pic").attr("data-full");return s.open("https://api.whatsapp.com/send?text="+encodeURI(t)+"&preview_url=true","ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},d=function(t,i){t.find(".modula-icon-pinterest").click(function(t){t.preventDefault();var i=u(this).parents(".modula-item").find("img.pic"),e=i.data("full"),o=i.data("caption"),n=i.attr("title"),t=a.title;0<n.length?t=u.trim(n):0<o.length&&(t=u.trim(o));e="http://pinterest.com/pin/create/button/?url="+encodeURI(e)+"&description="+encodeURI(t);return 1<=i.length&&(t=i.attr("data-full"),e+="&media="+(i=t,(t=a.createElement("img")).src=i,i=t.src,t.src=null,i)),s.open(e,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},l=function(t,i){t.find(".modula-icon-linkedin").click(function(t){t.preventDefault();t=u(this).parents(".modula-item").find("img.pic").attr("data-full"),t="//linkedin.com/shareArticle?mini=true&url="+encodeURI(t);return s.open(t,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},p=function(t,n){t.find(".modula-icon-email").click(function(t){var i=encodeURI(n.options.email_subject),e=jQuery(".modula-icon-email").parents(".modula-item").find("img.pic").attr("data-full"),o=location.href,o="mailto:?subject="+i+"&body="+encodeURI(n.options.email_message.replace(/%%image_link%%/g,e).replace(/%%gallery_link%%/g,o));return s.open(o,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})};u.fn[n]=function(i){var e,o=arguments;return i===t||"object"==typeof i?this.each(function(){u.data(this,"plugin_"+n)||u.data(this,"plugin_"+n,new h(this,i))}):"string"==typeof i&&"_"!==i[0]&&"init"!==i?(this.each(function(){var t=u.data(this,"plugin_"+n);t instanceof h&&"function"==typeof t[i]&&(e=t[i].apply(t,Array.prototype.slice.call(o,1))),"destroy"===i&&u.data(this,"plugin_"+n,null)}),e!==t?e:this):void 0}}(jQuery,window,document),jQuery(document).ready(function(){var t=jQuery(".modula.modula-gallery");jQuery.each(t,function(){var t=jQuery(this).data("config");jQuery(this).modulaGallery(t)})});
1
+ !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(i),i}:e(jQuery)}(function(g){function n(t,i){this.settings=i,this.checkSettings(),this.imgAnalyzerTimeout=null,this.entries=null,this.buildingRow={entriesBuff:[],width:0,height:0,aspectRatio:0},this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.yield={every:2,flushed:0},this.border=0<=i.border?i.border:i.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges(),this.offY=this.border,this.rows=0,this.spinner={phase:0,timeSlot:150,$el:g('<div class="jg-spinner"><span></span><span></span><span></span></div>'),intervalId:null},this.scrollBarOn=!1,this.checkWidthIntervalId=null,this.galleryWidth=t.width(),this.$gallery=t}n.prototype.getSuffix=function(t,i){for(var e=i<t?t:i,s=0;s<this.suffixRanges.length;s++)if(e<=this.suffixRanges[s])return this.settings.sizeRangeSuffixes[this.suffixRanges[s]];return this.settings.sizeRangeSuffixes[this.suffixRanges[s-1]]},n.prototype.removeSuffix=function(t,i){return t.substring(0,t.length-i.length)},n.prototype.endsWith=function(t,i){return-1!==t.indexOf(i,t.length-i.length)},n.prototype.getUsedSuffix=function(t){for(var i in this.settings.sizeRangeSuffixes)if(this.settings.sizeRangeSuffixes.hasOwnProperty(i)&&0!==this.settings.sizeRangeSuffixes[i].length&&this.endsWith(t,this.settings.sizeRangeSuffixes[i]))return this.settings.sizeRangeSuffixes[i];return""},n.prototype.newSrc=function(t,i,e,s){var n;return this.settings.thumbnailPath?n=this.settings.thumbnailPath(t,i,e,s):(s=null!==(s=t.match(this.settings.extension))?s[0]:"",n=t.replace(this.settings.extension,""),n=this.removeSuffix(n,this.getUsedSuffix(n)),n+=this.getSuffix(i,e)+s),n},n.prototype.showImg=function(t,i){this.settings.cssAnimation?(t.addClass("jg-entry-visible"),i&&i()):(t.stop().fadeTo(this.settings.imagesAnimationDuration,1,i),t.find(this.settings.imgSelector).stop().fadeTo(this.settings.imagesAnimationDuration,1,i))},n.prototype.extractImgSrcFromImage=function(t){var i=t.data("safe-src"),e="data-safe-src";return void 0===i&&(i=t.attr("src"),e="src"),t.data("jg.originalSrc",i),t.data("jg.src",i),t.data("jg.originalSrcLoc",e),i},n.prototype.imgFromEntry=function(t){t=t.find(this.settings.imgSelector);return 0===t.length?null:t},n.prototype.captionFromEntry=function(t){t=t.find("> .jg-caption");return 0===t.length?null:t},n.prototype.displayEntry=function(t,i,e,s,n,r){t.width(s),t.height(r),t.css("top",e),t.css("left",i);var o,a,h=this.imgFromEntry(t);null!==h?(h.css("width",s),h.css("height",n),h.css("margin-left",-s/2),h.css("margin-top",-n/2),(o=h.data("jg.src"))&&(o=this.newSrc(o,s,n,h[0]),h.one("error",function(){this.resetImgSrc(h)}),a=function(){h.attr("src",o)},"skipped"===t.data("jg.loaded")&&o?this.onImageEvent(o,function(){this.showImg(t,a),t.data("jg.loaded",!0)}.bind(this)):this.showImg(t,a))):this.showImg(t),this.displayEntryCaption(t)},n.prototype.displayEntryCaption=function(t){var i,e=this.imgFromEntry(t);null!==e&&this.settings.captions?(null===(i=this.captionFromEntry(t))&&(e=e.attr("alt"),this.isValidCaption(e)||(e=t.attr("title")),this.isValidCaption(e)&&(i=g('<div class="jg-caption">'+e+"</div>"),t.append(i),t.data("jg.createdCaption",!0))),null!==i&&(this.settings.cssAnimation||i.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity),this.addCaptionEventsHandlers(t))):this.removeCaptionEventsHandlers(t)},n.prototype.isValidCaption=function(t){return void 0!==t&&0<t.length},n.prototype.onEntryMouseEnterForCaption=function(t){t=this.captionFromEntry(g(t.currentTarget));this.settings.cssAnimation?t.addClass("jg-caption-visible").removeClass("jg-caption-hidden"):t.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.visibleOpacity)},n.prototype.onEntryMouseLeaveForCaption=function(t){t=this.captionFromEntry(g(t.currentTarget));this.settings.cssAnimation?t.removeClass("jg-caption-visible").removeClass("jg-caption-hidden"):t.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.nonVisibleOpacity)},n.prototype.addCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0===i&&(i={mouseenter:g.proxy(this.onEntryMouseEnterForCaption,this),mouseleave:g.proxy(this.onEntryMouseLeaveForCaption,this)},t.on("mouseenter",void 0,void 0,i.mouseenter),t.on("mouseleave",void 0,void 0,i.mouseleave),t.data("jg.captionMouseEvents",i))},n.prototype.removeCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0!==i&&(t.off("mouseenter",void 0,i.mouseenter),t.off("mouseleave",void 0,i.mouseleave),t.removeData("jg.captionMouseEvents"))},n.prototype.clearBuildingRow=function(){this.buildingRow.entriesBuff=[],this.buildingRow.aspectRatio=0,this.buildingRow.width=0},n.prototype.prepareBuildingRow=function(t,i){var e,s,n,r,o=!0,a=0,h=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,g=h/this.buildingRow.aspectRatio,l=this.settings.rowHeight,u=this.buildingRow.width/h>this.settings.justifyThreshold;if(i||t&&"hide"===this.settings.lastRow&&!u){for(e=0;e<this.buildingRow.entriesBuff.length;e++)s=this.buildingRow.entriesBuff[e],this.settings.cssAnimation?s.removeClass("jg-entry-visible"):(s.stop().fadeTo(0,.1),s.find("> img, > a > img").fadeTo(0,0));return-1}for(t&&!u&&"justify"!==this.settings.lastRow&&"hide"!==this.settings.lastRow&&(o=!1,0<this.rows&&(o=(l=(this.offY-this.border-this.settings.margins*this.rows)/this.rows)*this.buildingRow.aspectRatio/h>this.settings.justifyThreshold)),e=0;e<this.buildingRow.entriesBuff.length;e++)r=(s=this.buildingRow.entriesBuff[e]).data("jg.width")/s.data("jg.height"),r=o?(n=e===this.buildingRow.entriesBuff.length-1?h:g*r,g):(n=l*r,l),h-=Math.round(n),s.data("jg.jwidth",Math.round(n)),s.data("jg.jheight",Math.ceil(r)),(0===e||r<a)&&(a=r);return this.buildingRow.height=a,o},n.prototype.flushRow=function(t,i){var e,s=this.settings,n=this.border,r=this.prepareBuildingRow(t,i);if(i||t&&"hide"===s.lastRow&&-1===r)this.clearBuildingRow();else{if(this.maxRowHeight&&this.maxRowHeight<this.buildingRow.height&&(this.buildingRow.height=this.maxRowHeight),t&&("center"===s.lastRow||"right"===s.lastRow)){for(var o=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*s.margins,a=0;a<this.buildingRow.entriesBuff.length;a++)o-=(e=this.buildingRow.entriesBuff[a]).data("jg.jwidth");"center"===s.lastRow?n+=Math.round(o/2):"right"===s.lastRow&&(n+=o)}var h=this.buildingRow.entriesBuff.length-1;for(a=0;a<=h;a++)e=this.buildingRow.entriesBuff[this.settings.rtl?h-a:a],this.displayEntry(e,n,this.offY,e.data("jg.jwidth"),e.data("jg.jheight"),this.buildingRow.height),n+=e.data("jg.jwidth")+s.margins;this.galleryHeightToSet=this.offY+this.buildingRow.height+this.border,this.setGalleryTempHeight(this.galleryHeightToSet+this.getSpinnerHeight()),(!t||this.buildingRow.height<=s.rowHeight&&r)&&(this.offY+=this.buildingRow.height+s.margins,this.rows+=1,this.clearBuildingRow(),this.settings.triggerEvent.call(this,"jg.rowflush"))}};var i=0;n.prototype.rememberGalleryHeight=function(){i=this.$gallery.height(),this.$gallery.height(i)},n.prototype.setGalleryTempHeight=function(t){i=Math.max(t,i),this.$gallery.height(i)},n.prototype.setGalleryFinalHeight=function(t){i=t,this.$gallery.height(t)},n.prototype.checkWidth=function(){this.checkWidthIntervalId=setInterval(g.proxy(function(){var t;this.$gallery.is(":visible")&&(t=parseFloat(this.$gallery.width()),Math.abs(t-this.galleryWidth)>this.settings.refreshSensitivity&&(this.galleryWidth=t,this.rewind(),this.rememberGalleryHeight(),this.startImgAnalyzer(!0)))},this),this.settings.refreshTime)},n.prototype.isSpinnerActive=function(){return null!==this.spinner.intervalId},n.prototype.getSpinnerHeight=function(){return this.spinner.$el.innerHeight()},n.prototype.stopLoadingSpinnerAnimation=function(){clearInterval(this.spinner.intervalId),this.spinner.intervalId=null,this.setGalleryTempHeight(this.$gallery.height()-this.getSpinnerHeight()),this.spinner.$el.detach()},n.prototype.startLoadingSpinnerAnimation=function(){var t=this.spinner,i=t.$el.find("span");clearInterval(t.intervalId),this.$gallery.append(t.$el),this.setGalleryTempHeight(this.offY+this.buildingRow.height+this.getSpinnerHeight()),t.intervalId=setInterval(function(){t.phase<i.length?i.eq(t.phase).fadeTo(t.timeSlot,1):i.eq(t.phase-i.length).fadeTo(t.timeSlot,0),t.phase=(t.phase+1)%(2*i.length)},t.timeSlot)},n.prototype.rewind=function(){this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.offY=this.border,this.rows=0,this.clearBuildingRow()},n.prototype.getSelectorWithoutSpinner=function(){return this.settings.selector+", div:not(.jg-spinner)"},n.prototype.getAllEntries=function(){var t=this.getSelectorWithoutSpinner();return this.$gallery.children(t).toArray()},n.prototype.updateEntries=function(t){var i;return 0<(i=t&&null!=this.lastFetchedEntry?(i=this.getSelectorWithoutSpinner(),g(this.lastFetchedEntry).nextAll(i).toArray()):(this.entries=[],this.getAllEntries())).length&&(g.isFunction(this.settings.sort)?i=this.sortArray(i):this.settings.randomize&&(i=this.shuffleArray(i)),this.lastFetchedEntry=i[i.length-1],this.settings.filter?i=this.filterArray(i):this.resetFilters(i)),this.entries=this.entries.concat(i),!0},n.prototype.insertToGallery=function(t){var i=this;g.each(t,function(){g(this).appendTo(i.$gallery)})},n.prototype.shuffleArray=function(t){for(var i,e,s=t.length-1;0<s;s--)i=Math.floor(Math.random()*(s+1)),e=t[s],t[s]=t[i],t[i]=e;return this.insertToGallery(t),t},n.prototype.sortArray=function(t){return t.sort(this.settings.sort),this.insertToGallery(t),t},n.prototype.resetFilters=function(t){for(var i=0;i<t.length;i++)g(t[i]).removeClass("jg-filtered")},n.prototype.filterArray=function(t){var i=this.settings;if("string"===g.type(i.filter))return t.filter(function(t){t=g(t);return t.is(i.filter)?(t.removeClass("jg-filtered"),!0):(t.addClass("jg-filtered").removeClass("jg-visible"),!1)});if(g.isFunction(i.filter)){for(var e=t.filter(i.filter),s=0;s<t.length;s++)-1===e.indexOf(t[s])?g(t[s]).addClass("jg-filtered").removeClass("jg-visible"):g(t[s]).removeClass("jg-filtered");return e}},n.prototype.resetImgSrc=function(t){"src"===t.data("jg.originalSrcLoc")?t.attr("src",t.data("jg.originalSrc")):t.attr("src","")},n.prototype.destroy=function(){clearInterval(this.checkWidthIntervalId),this.stopImgAnalyzerStarter(),g.each(this.getAllEntries(),g.proxy(function(t,i){var e=g(i);e.css("width",""),e.css("height",""),e.css("top",""),e.css("left",""),e.data("jg.loaded",void 0),e.removeClass("jg-entry jg-filtered jg-entry-visible");i=this.imgFromEntry(e);i&&(i.css("width",""),i.css("height",""),i.css("margin-left",""),i.css("margin-top",""),this.resetImgSrc(i),i.data("jg.originalSrc",void 0),i.data("jg.originalSrcLoc",void 0),i.data("jg.src",void 0)),this.removeCaptionEventsHandlers(e);i=this.captionFromEntry(e);e.data("jg.createdCaption")?(e.data("jg.createdCaption",void 0),null!==i&&i.remove()):null!==i&&i.fadeTo(0,1)},this)),this.$gallery.css("height",""),this.$gallery.removeClass("justified-gallery"),this.$gallery.data("jg.controller",void 0),this.settings.triggerEvent.call(this,"jg.destroy")},n.prototype.analyzeImages=function(t){for(var i=this.lastAnalyzedIndex+1;i<this.entries.length;i++){var e=g(this.entries[i]);if(!0===e.data("jg.loaded")||"skipped"===e.data("jg.loaded")){var s=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,n=e.data("jg.width")/e.data("jg.height");if(this.buildingRow.entriesBuff.push(e),this.buildingRow.aspectRatio+=n,this.buildingRow.width+=n*this.settings.rowHeight,this.lastAnalyzedIndex=i,s/(this.buildingRow.aspectRatio+n)<this.settings.rowHeight&&(this.flushRow(!1,0<this.settings.maxRowsCount&&this.rows===this.settings.maxRowsCount),++this.yield.flushed>=this.yield.every))return void this.startImgAnalyzer(t)}else if("error"!==e.data("jg.loaded"))return}0<this.buildingRow.entriesBuff.length&&this.flushRow(!0,0<this.settings.maxRowsCount&&this.rows===this.settings.maxRowsCount),this.isSpinnerActive()&&this.stopLoadingSpinnerAnimation(),this.stopImgAnalyzerStarter(),this.setGalleryFinalHeight(this.galleryHeightToSet),this.settings.triggerEvent.call(this,t?"jg.resize":"jg.complete")},n.prototype.stopImgAnalyzerStarter=function(){this.yield.flushed=0,null!==this.imgAnalyzerTimeout&&(clearTimeout(this.imgAnalyzerTimeout),this.imgAnalyzerTimeout=null)},n.prototype.startImgAnalyzer=function(t){var i=this;this.stopImgAnalyzerStarter(),this.imgAnalyzerTimeout=setTimeout(function(){i.analyzeImages(t)},.001)},n.prototype.onImageEvent=function(t,i,e){var s,n;(i||e)&&(s=new Image,n=g(s),i&&n.one("load",function(){n.off("load error"),i(s)}),e&&n.one("error",function(){n.off("load error"),e(s)}),s.src=t)},n.prototype.init=function(){var o=!1,a=!1,h=this;g.each(this.entries,function(t,i){var e=g(i),s=h.imgFromEntry(e);if(e.addClass("jg-entry"),!0!==e.data("jg.loaded")&&"skipped"!==e.data("jg.loaded"))if(null!==h.settings.rel&&e.attr("rel",h.settings.rel),null!==h.settings.target&&e.attr("target",h.settings.target),null!==s){var n=h.extractImgSrcFromImage(s);if(!1===h.settings.waitThumbnailsLoad||!n){var r=parseFloat(s.attr("width")),i=parseFloat(s.attr("height"));if("svg"===s.prop("tagName")&&(r=parseFloat(s[0].getBBox().width),i=parseFloat(s[0].getBBox().height)),!isNaN(r)&&!isNaN(i))return e.data("jg.width",r),e.data("jg.height",i),e.data("jg.loaded","skipped"),a=!0,h.startImgAnalyzer(!1),!0}e.data("jg.loaded",!1),o=!0,h.isSpinnerActive()||h.startLoadingSpinnerAnimation(),h.onImageEvent(n,function(t){e.data("jg.width",t.width),e.data("jg.height",t.height),e.data("jg.loaded",!0),h.startImgAnalyzer(!1)},function(){e.data("jg.loaded","error"),h.startImgAnalyzer(!1)})}else e.data("jg.loaded",!0),e.data("jg.width",e.width()|parseFloat(e.css("width"))|1),e.data("jg.height",e.height()|parseFloat(e.css("height"))|1)}),o||a||this.startImgAnalyzer(!1),this.checkWidth()},n.prototype.checkOrConvertNumber=function(t,i){if("string"===g.type(t[i])&&(t[i]=parseFloat(t[i])),"number"!==g.type(t[i]))throw i+" must be a number";if(isNaN(t[i]))throw"invalid number for "+i},n.prototype.checkSizeRangesSuffixes=function(){if("object"!==g.type(this.settings.sizeRangeSuffixes))throw"sizeRangeSuffixes must be defined and must be an object";var t,i=[];for(t in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(t)&&i.push(t);for(var e={0:""},s=0;s<i.length;s++)if("string"===g.type(i[s]))try{e[parseInt(i[s].replace(/^[a-z]+/,""),10)]=this.settings.sizeRangeSuffixes[i[s]]}catch(t){throw"sizeRangeSuffixes keys must contains correct numbers ("+t+")"}else e[i[s]]=this.settings.sizeRangeSuffixes[i[s]];this.settings.sizeRangeSuffixes=e},n.prototype.retrieveMaxRowHeight=function(){var t=null,i=this.settings.rowHeight;if("string"===g.type(this.settings.maxRowHeight))t=this.settings.maxRowHeight.match(/^[0-9]+%$/)?i*parseFloat(this.settings.maxRowHeight.match(/^([0-9]+)%$/)[1])/100:parseFloat(this.settings.maxRowHeight);else{if("number"!==g.type(this.settings.maxRowHeight)){if(!1===this.settings.maxRowHeight||null==this.settings.maxRowHeight)return null;throw"maxRowHeight must be a number or a percentage"}t=this.settings.maxRowHeight}if(isNaN(t))throw"invalid number for maxRowHeight";return t<i&&(t=i),t},n.prototype.checkSettings=function(){this.checkSizeRangesSuffixes(),this.checkOrConvertNumber(this.settings,"rowHeight"),this.checkOrConvertNumber(this.settings,"margins"),this.checkOrConvertNumber(this.settings,"border"),this.checkOrConvertNumber(this.settings,"maxRowsCount");var t=["justify","nojustify","left","center","right","hide"];if(-1===t.indexOf(this.settings.lastRow))throw"lastRow must be one of: "+t.join(", ");if(this.checkOrConvertNumber(this.settings,"justifyThreshold"),this.settings.justifyThreshold<0||1<this.settings.justifyThreshold)throw"justifyThreshold must be in the interval [0,1]";if("boolean"!==g.type(this.settings.cssAnimation))throw"cssAnimation must be a boolean";if("boolean"!==g.type(this.settings.captions))throw"captions must be a boolean";if(this.checkOrConvertNumber(this.settings.captionSettings,"animationDuration"),this.checkOrConvertNumber(this.settings.captionSettings,"visibleOpacity"),this.settings.captionSettings.visibleOpacity<0||1<this.settings.captionSettings.visibleOpacity)throw"captionSettings.visibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings.captionSettings,"nonVisibleOpacity"),this.settings.captionSettings.nonVisibleOpacity<0||1<this.settings.captionSettings.nonVisibleOpacity)throw"captionSettings.nonVisibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings,"imagesAnimationDuration"),this.checkOrConvertNumber(this.settings,"refreshTime"),this.checkOrConvertNumber(this.settings,"refreshSensitivity"),"boolean"!==g.type(this.settings.randomize))throw"randomize must be a boolean";if("string"!==g.type(this.settings.selector))throw"selector must be a string";if(!1!==this.settings.sort&&!g.isFunction(this.settings.sort))throw"sort must be false or a comparison function";if(!1!==this.settings.filter&&!g.isFunction(this.settings.filter)&&"string"!==g.type(this.settings.filter))throw"filter must be false, a string or a filter function"},n.prototype.retrieveSuffixRanges=function(){var t,i=[];for(t in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(t)&&i.push(parseInt(t,10));return i.sort(function(t,i){return i<t?1:t<i?-1:0}),i},n.prototype.updateSettings=function(t){this.settings=g.extend({},this.settings,t),this.checkSettings(),this.border=0<=this.settings.border?this.settings.border:this.settings.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges()},n.prototype.defaults={sizeRangeSuffixes:{},thumbnailPath:void 0,rowHeight:120,maxRowHeight:!1,maxRowsCount:0,margins:1,border:-1,lastRow:"nojustify",justifyThreshold:.9,waitThumbnailsLoad:!0,captions:!0,cssAnimation:!0,imagesAnimationDuration:500,captionSettings:{animationDuration:500,visibleOpacity:.7,nonVisibleOpacity:0},rel:null,target:null,extension:/\.[^.\\/]+$/,refreshTime:200,refreshSensitivity:0,randomize:!1,rtl:!1,sort:!1,filter:!1,selector:"a",imgSelector:"> img, > a > img, > svg, > a > svg",triggerEvent:function(t){this.$gallery.trigger(t)}},g.fn.justifiedGallery=function(s){return this.each(function(t,i){var e=g(i);e.addClass("justified-gallery");i=e.data("jg.controller");if(void 0===i){if(null!=s&&"object"!==g.type(s)){if("destroy"===s)return;throw"The argument must be an object"}i=new n(e,g.extend({},n.prototype.defaults,s)),e.data("jg.controller",i)}else if("norewind"!==s){if("destroy"===s)return void i.destroy();i.updateSettings(s),i.rewind()}i.updateEntries("norewind"===s)&&i.init()})}});
2
+ !function(e,t){t=t(e,e.document);e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}(window,function(a,m){"use strict";if(m.getElementsByClassName){var z,n,i,t,s,o,y=m.documentElement,r=a.Date,l=a.HTMLPictureElement,c="addEventListener",h="getAttribute",d=a[c],u=a.setTimeout,f=a.requestAnimationFrame||u,g=a.requestIdleCallback,v=/^picture$/i,p=["load","error","lazyincluded","_lazyloaded"],C={},b=Array.prototype.forEach,A=function(e,t){return C[t]||(C[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")),C[t].test(e[h]("class")||"")&&C[t]},E=function(e,t){A(e,t)||e.setAttribute("class",(e[h]("class")||"").trim()+" "+t)},_=function(e,t){(t=A(e,t))&&e.setAttribute("class",(e[h]("class")||"").replace(t," "))},w=function(t,n,e){var a=e?c:"removeEventListener";e&&w(t,n),p.forEach(function(e){t[a](e,n)})},M=function(e,t,n,a,i){var s=m.createEvent("Event");return(n=n||{}).instance=ue,s.initEvent(t,!a,!i),s.detail=n,e.dispatchEvent(s),s},N=function(e,t){var n;!l&&(n=a.picturefill||z.pf)?(t&&t.src&&!e[h]("srcset")&&e.setAttribute("srcset",t.src),n({reevaluate:!0,elements:[e]})):t&&t.src&&(e.src=t.src)},x=function(e,t){return(getComputedStyle(e,null)||{})[t]},W=function(e,t,n){for(n=n||e.offsetWidth;n<z.minSize&&t&&!e._lazysizesWidth;)n=t.offsetWidth,t=t.parentNode;return n},T=(s=[],o=t=[],he._lsFlush=ye,he),e=function(n,e){return e?function(){T(n)}:function(){var e=this,t=arguments;T(function(){n.apply(e,t)})}},B=function(e){function t(){n=null,e()}var n,a,i=function(){var e=r.now()-a;e<99?u(i,99-e):(g||t)(t)};return function(){a=r.now(),n=n||u(i,99)}};!function(){var e,t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};for(e in z=a.lazySizesConfig||a.lazysizesConfig||{},t)e in z||(z[e]=t[e]);a.lazySizesConfig=z,u(function(){z.init&&ze()})}();var F,S,L,R,k,D,H,O,P,$,I,q,j,G,J,K,Q,U,V,X,Y,Z,ee,te,ne,ae,ie,se,oe,re,le,ce,de,ue,fe=(V=/^img$/i,X=/^iframe$/i,Y="onscroll"in a&&!/(gle|ing)bot/.test(navigator.userAgent),te=-1,j=pe,J=ee=Z=0,K=z.throttleDelay,Q=z.ricTimeout,U=g&&49<Q?function(){g(Ce,{timeout:Q}),Q!==z.ricTimeout&&(Q=z.ricTimeout)}:e(function(){u(Ce)},!0),ae=e(be),ie=function(e){ae({target:e.target})},se=e(function(e,t,n,a,i){var s,o,r,l;(r=M(e,"lazybeforeunveil",t)).defaultPrevented||(a&&(n?E(e,z.autosizesClass):e.setAttribute("sizes",a)),n=e[h](z.srcsetAttr),a=e[h](z.srcAttr),i&&(o=(s=e.parentNode)&&v.test(s.nodeName||"")),l=t.firesLoad||"src"in e&&(n||a||o),r={target:e},E(e,z.loadingClass),l&&(clearTimeout(L),L=u(ge,2500),w(e,ie,!0)),o&&b.call(s.getElementsByTagName("source"),Ae),n?e.setAttribute("srcset",n):a&&!o&&(X.test(e.nodeName)?function(t,n){try{t.contentWindow.location.replace(n)}catch(e){t.src=n}}(e,a):e.src=a),i&&(n||o)&&N(e,{src:a})),e._lazyRace&&delete e._lazyRace,_(e,z.lazyClass),T(function(){(!l||e.complete&&1<e.naturalWidth)&&(be(r),e._lazyCache=!0,u(function(){"_lazyCache"in e&&delete e._lazyCache},9))},!0)}),re=function(){var e;S||(r.now()-k<999?u(re,999):(e=B(function(){z.loadMode=3,ne()}),S=!0,z.loadMode=3,ne(),d("scroll",function(){3==z.loadMode&&(z.loadMode=2),e()},!0)))},{_:function(){k=r.now(),ue.elements=m.getElementsByClassName(z.lazyClass),F=m.getElementsByClassName(z.lazyClass+" "+z.preloadClass),d("scroll",ne,!0),d("resize",ne,!0),a.MutationObserver?new MutationObserver(ne).observe(y,{childList:!0,subtree:!0,attributes:!0}):(y[c]("DOMNodeInserted",ne,!0),y[c]("DOMAttrModified",ne,!0),setInterval(ne,999)),d("hashchange",ne,!0),["focus","mouseover","click","load","transitionend","animationend","webkitAnimationEnd"].forEach(function(e){m[c](e,ne,!0)}),/d$|^c/.test(m.readyState)?re():(d("load",re),m[c]("DOMContentLoaded",ne),u(re,2e4)),ue.elements.length?(pe(),T._lsFlush()):ne()},checkElems:ne=function(e){var t;(e=!0===e)&&(Q=33),G||(G=!0,(t=K-(r.now()-J))<0&&(t=0),e||t<9?U():u(U,t))},unveil:oe=function(e){var t,n=V.test(e.nodeName),a=n&&(e[h](z.sizesAttr)||e[h]("sizes")),i="auto"==a;(!i&&S||!n||!e[h]("src")&&!e.srcset||e.complete||A(e,z.errorClass)||!A(e,z.lazyClass))&&(t=M(e,"lazyunveilread").detail,i&&me.updateElem(e,!0,e.offsetWidth),e._lazyRace=!0,ee++,se(e,t,i,a,n))}}),me=(ce=e(function(e,t,n,a){var i,s,o;if(e._lazysizesWidth=a,a+="px",e.setAttribute("sizes",a),v.test(t.nodeName||""))for(s=0,o=(i=t.getElementsByTagName("source")).length;s<o;s++)i[s].setAttribute("sizes",a);n.detail.dataAttr||N(e,n.detail)}),{_:function(){le=m.getElementsByClassName(z.autosizesClass),d("resize",de)},checkElems:de=B(function(){var e,t=le.length;if(t)for(e=0;e<t;e++)Ee(le[e])}),updateElem:Ee}),ze=function(){ze.i||(ze.i=!0,me._(),fe._())};return ue={cfg:z,autoSizer:me,loader:fe,init:ze,uP:N,aC:E,rC:_,hC:A,fire:M,gW:W,rAF:T}}function ye(){var e=o;for(o=t.length?s:t,i=!(n=!0);e.length;)e.shift()();n=!1}function he(e,t){n&&!t?e.apply(this,arguments):(o.push(e),i||(i=!0,(m.hidden?u:f)(ye)))}function ge(e){ee--,e&&!(ee<0)&&e.target||(ee=0)}function ve(e){return null==q&&(q="hidden"==x(m.body,"visibility")),q||"hidden"!=x(e.parentNode,"visibility")&&"hidden"!=x(e,"visibility")}function pe(){var e,t,n,a,i,s,o,r,l,c,d,u,f=ue.elements;if((R=z.loadMode)&&ee<8&&(e=f.length)){for(t=0,te++,c=!z.expand||z.expand<1?500<y.clientHeight&&500<y.clientWidth?500:370:z.expand,d=(ue._defEx=c)*z.expFactor,u=z.hFac,q=null,Z<d&&ee<1&&2<te&&2<R&&!m.hidden?(Z=d,te=0):Z=1<R&&1<te&&ee<6?c:0;t<e;t++)if(f[t]&&!f[t]._lazyRace)if(Y)if((r=f[t][h]("data-expand"))&&(s=+r)||(s=Z),l!==s&&(D=innerWidth+s*u,H=innerHeight+s,o=-1*s,l=s),n=f[t].getBoundingClientRect(),(I=n.bottom)>=o&&(O=n.top)<=H&&($=n.right)>=o*u&&(P=n.left)<=D&&(I||$||P||O)&&(z.loadHidden||ve(f[t]))&&(S&&ee<3&&!r&&(R<3||te<4)||function(e,t){var n,a=e,i=ve(e);for(O-=t,I+=t,P-=t,$+=t;i&&(a=a.offsetParent)&&a!=m.body&&a!=y;)(i=0<(x(a,"opacity")||1))&&"visible"!=x(a,"overflow")&&(n=a.getBoundingClientRect(),i=$>n.left&&P<n.right&&I>n.top-1&&O<n.bottom+1);return i}(f[t],s))){if(oe(f[t]),i=!0,9<ee)break}else!i&&S&&!a&&ee<4&&te<4&&2<R&&(F[0]||z.preloadAfterLoad)&&(F[0]||!r&&(I||$||P||O||"auto"!=f[t][h](z.sizesAttr)))&&(a=F[0]||f[t]);else oe(f[t]);a&&!i&&oe(a)}}function Ce(){G=!1,J=r.now(),j()}function be(e){var t=e.target;t._lazyCache?delete t._lazyCache:(ge(e),E(t,z.loadedClass),_(t,z.loadingClass),w(t,ie),M(t,"lazyloaded"))}function Ae(e){var t,n=e[h](z.srcsetAttr);(t=z.customMedia[e[h]("data-media")||e[h]("media")])&&e.setAttribute("media",t),n&&e.setAttribute("srcset",n)}function Ee(e,t,n){var a=e.parentNode;a&&(n=W(e,a,n),(t=M(e,"lazybeforesizes",{width:n,dataAttr:!!t})).defaultPrevented||(n=t.detail.width)&&n!==e._lazysizesWidth&&ce(e,a,t,n))}});
3
+ function tg_getURLParameter(t){return decodeURIComponent((new RegExp("[?|&]"+t+"=([^&;]+?)(&|#|;|$)").exec(location.search)||[,""])[1].replace(/\+/g,"%20"))||null}function modulaInViewport(t){"function"==typeof jQuery&&t instanceof jQuery&&(t=t[0]);t=t.getBoundingClientRect();return t.top-jQuery(window).height()<=-100&&-400<=t.top-jQuery(window).height()||t.bottom<=jQuery(window).height()}jQuery(document).on("vc-full-width-row-single vc-full-width-row",function(t,i){0<jQuery("body").find(".modula").length&&jQuery(window).trigger("modula-update")}),jQuery(window).on("elementor/frontend/init",function(){window.elementorFrontend&&window.elementorFrontend.hooks.addAction("frontend/element_ready/global",function(t){jQuery("body").find(".modula").length})}),function(u,s,a,t){var n="modulaGallery",e={resizer:"/",keepArea:!0,type:"creative-gallery",columns:12,gutter:10,desktopGutter:10,mobileGutter:10,tabletGutter:10,enableTwitter:!1,enableFacebook:!1,enableWhatsapp:!1,enablePinterest:!1,enableLinkedin:!1,enableEmail:!1,lazyLoad:0,initLightbox:!1,lightbox:"fancybox",lightboxOpts:{},inView:!1};function h(t,i){this.element=t,this.$element=u(t),this.$itemsCnt=this.$element.find(".modula-items"),this.$items=this.$itemsCnt.find(".modula-item"),this.options=u.extend({},e,i),this._defaults=e,this._name=n,this.tiles=[],this.$tilesCnt=null,this.completed=!1,this.lastWidth=0,this.resizeTO=0,this.isIsotope=!1,this.isLazyLoaded=!0,this.init()}h.prototype.init=function(){var i=this,t=a.documentElement.clientWidth;this.options.gutter=t<=568?this.options.mobileGutter:t<=768?this.options.tabletGutter:this.options.desktopGutter,u(a).trigger("modula_api_before_init",[i]),"custom-grid"===this.options.type?this.createCustomGallery():"creative-gallery"==this.options.type?this.createGrid():"grid"==this.options.type&&("automatic"==this.options.grid_type?this.createAutoGrid():this.createColumnsGrid()),"custom-grid"===this.options.type&&u(s).height()<u("html").height()&&i.onResize(i),u(s).resize(function(){i.onResize(i)}),u(s).on("modula-update",function(){i.onResize(i)}),u(a).on("lazyloaded",function(t){t=u(t.target);"modula"==t.data("source")&&(t.data("size",{width:t.width(),height:t.height()}),(t=t.parents(".modula-item")).addClass("tg-loaded"),t=i.$items.not(".jtg-hidden").index(t),i.placeImage(t),i.isIsotope&&i.$itemsCnt.modulaisotope("layout"),"grid"==i.options.type&&"automatic"==i.options.grid_type&&i.$itemsCnt.justifiedGallery())}),i.options.inView&&jQuery(s).on("DOMContentLoaded load resize scroll",function(){modulaInViewport(i.$element)&&i.$element.addClass("modula-loaded-scale")}),this.setupSocial(),jQuery(i.$element).addClass("modula-gallery-initialized"),this.options.onComplete&&this.options.onComplete(),"fancybox"!=i.options.lightbox||i.options.initLightbox||this.initLightbox(),u(a).trigger("modula_api_after_init",[i])},h.prototype.initLightbox=function(){var e=this;e.$element.on("click",".modula-item-link:not( .modula-simple-link )",function(t){t.preventDefault();var i=u.map(e.$items,function(t){var i=jQuery(t).find(".modula-item-link:not( .modula-simple-link )"),t=jQuery(t).find(".pic");return{src:i.attr("href"),opts:{$thumb:t.parents(".modula-item"),caption:i.data("caption"),alt:t.attr("alt"),image_id:i.attr("data-image-id")}}}),t=e.$items.index(jQuery(this).parents(".modula-item"));jQuery.modulaFancybox.open(i,e.options.lightboxOpts,t)})},h.prototype.trunc=function(t){return Math.trunc?Math.trunc(t):(t=+t,isFinite(t)?t-t%1||(t<0?-0:0===t?t:0):t)},h.prototype.createCustomGallery=function(){var h,r=this,t=this.$element.find(".modula-items").width(),l=this,d=this.options.columns,i=a.documentElement.clientWidth;"1"==this.options.enableResponsive&&(i<=568?d=this.options.mobileColumns:i<=768&&(d=this.options.tabletColumns)),h=0<this.options.gutter?(t-this.options.gutter*(d-1))/d:Math.floor(t/d*1e3)/1e3,this.$items.not(".jtg-hidden").each(function(t,i){var e,o,n={},s=u(i).data("width"),a=u(i).data("height");12<s&&(s=12),"1"==l.options.enableResponsive&&(e=s,o=a,1==d?a=(s=1)*o/e:((s=Math.round(d*e/12))<1&&(s=1),(a=Math.round(s*o/e))<1&&(a=1))),n.width=h*s+l.options.gutter*(s-1),n.height=Math.round(h)*a+l.options.gutter*(a-1),u(i).data("size",n).addClass("tiled").addClass(n.width>n.height?"tile-h":"tile-v").data("position"),u(i).css(u(i).data("size")),u(i).find(".figc").css({width:u(i).data("size").width,height:u(i).data("size").height}),r.loadImage(t)});t={itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(l.options.gutter)}};this.$itemsCnt.modulaisotope(t),this.isIsotope=!0},h.prototype.createGrid=function(){var o=this;this.$itemsCnt.data("area",this.$itemsCnt.width()*this.options.height),this.lastWidth=this.$itemsCnt.width();for(var t,i=0;i<this.$items.not(".jtg-hidden").length;i++)this.tiles.push(o.getSlot());this.tiles.sort(function(t,i){return t.position-i.position}),this.$items.not(".jtg-hidden").each(function(t,i){var e=o.tiles[t];u(i).data("size",e),u(i).addClass("tiled").addClass(e.width>e.height?"tile-h":"tile-v").data("position"),u(i).css({width:e.width,height:e.height}),u(i).find(".figc").css({width:e.width,height:e.height}),o.loadImage(t)}),this.isIsotope||(t={resizesContainer:!1,itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(o.options.gutter)}},this.$itemsCnt.modulaisotope(t),this.isIsotope=!0)},h.prototype.createAutoGrid=function(){this.$itemsCnt.justifiedGallery({rowHeight:this.options.rowHeight,margins:this.options.gutter,lastRow:this.options.lastRow,captions:!1,border:0,imgSelector:".pic",cssAnimation:!0,imagesAnimationDuration:700})},h.prototype.createColumnsGrid=function(){var e=this;this.$itemsCnt.modulaisotope({itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(this.options.gutter)}}),this.$items.each(function(t,i){e.loadImage(t)}),this.isIsotope=!0},h.prototype.getSlot=function(){if(0==this.tiles.length)return o={top:0,left:0,width:this.$itemsCnt.width(),height:this.options.height,area:this.$itemsCnt.width()*this.options.height,position:0};for(var t=0,i=0;i<this.tiles.length;i++)(o=this.tiles[i]).area>this.tiles[t].area&&(t=i);var e,o={},n=this.tiles[t];return(o=n.width>n.height?(e=n.width/2*this.options.randomFactor,n.prevWidth=n.width,n.width=Math.floor(n.width/2+e*(Math.random()-.5)),{top:n.top,left:n.left+n.width+this.options.gutter,width:n.prevWidth-n.width-this.options.gutter,height:n.height}):(e=n.height/2*this.options.randomFactor,n.prevHeight=n.height,n.height=Math.floor(n.height/2+e*(Math.random()-.5)),{left:n.left,top:n.top+n.height+this.options.gutter,width:n.width,height:n.prevHeight-n.height-this.options.gutter})).area=o.width*o.height,o.position=1e3*o.top+o.left,n.position=1e3*n.top+n.left,this.tiles[t]=n,this.tiles[t].area=n.width*n.height,o},h.prototype.reset=function(){this.tiles=[],"custom-grid"===this.options.type?this.createCustomGallery():"creative-gallery"==this.options.type?this.createGrid():"grid"==this.options.type&&("automatic"==this.options.grid_type?this.createAutoGrid():this.createColumnsGrid()),this.lastWidth=this.$itemsCnt.width(),u(a).trigger("modula_api_reset",[this])},h.prototype.onResize=function(i){var t;i.lastWidth!=i.$itemsCnt.width()&&(t=a.documentElement.clientWidth,i.options.gutter=t<=568?i.options.mobileGutter:t<=768?i.options.tabletGutter:this.options.desktopGutter,clearTimeout(i.resizeTO),i.resizeTO=setTimeout(function(){var t;i.options.keepArea&&(t=i.$itemsCnt.data("area"),i.$itemsCnt.height(t/i.$itemsCnt.width())),i.reset(),i.isIsotope&&i.$itemsCnt.modulaisotope({packery:{gutter:parseInt(i.options.gutter)}}).modulaisotope("layout")},100))},h.prototype.loadImage=function(t){var i,e,o=this,n=o.$items.not(".jtg-hidden").eq(t).find(".pic");"0"==o.options.lazyLoad?((e=new Image).onload=function(){i={width:this.width,height:this.height},n.data("size",i),o.placeImage(t)},"undefined"!=n.attr("src")?e.src=n.attr("src"):e.src=n.data("src")):o.placeImage(t)},h.prototype.placeImage=function(t){if("grid"!=this.options.type){var i=this.$items.not(".jtg-hidden").eq(t),e=i.find(".pic"),o=i.data("size"),n=e.data("size");if(void 0!==o&&void 0!==n){o.width,o.height;var s=n.width/n.height,a=e.data("valign")?e.data("valign"):"middle",h=e.data("halign")?e.data("halign"):"center",i={top:"auto",bottom:"auto",left:"auto",right:"auto",width:"auto",height:"auto",margin:"0",maxWidth:"999em"};if(o.width*n.height/n.width>o.height)switch(i.width=o.width,i.left=0,a){case"top":i.top=0;break;case"middle":i.top=0-(o.width*(1/s)-o.height)/2;break;case"bottom":i.bottom=0}else switch(i.height=o.height,i.top=0,h){case"left":i.left=0;break;case"center":i.left=0-(o.height*s-o.width)/2;break;case"right":i.right=0}e.css(i),this.$items.not(".jtg-hidden").eq(t).addClass("tg-loaded")}}},h.prototype.setupSocial=function(){this.options.enableTwitter&&i(this.$items,this),this.options.enableFacebook&&o(this.$items,this),this.options.enablePinterest&&l(this.$items,this),this.options.enableLinkedin&&d(this.$items,this),this.options.enableWhatsapp&&r(this.$items,this),this.options.enableEmail&&p(this.$items,this)},h.prototype.destroy=function(){this.isPackeryActive&&(this.$itemsCnt.packery("destroy"),this.isPackeryActive=!1)};var i=function(t,i){t.find(".modula-icon-twitter").click(function(t){t.preventDefault();var i=u(this).parents(".modula-item").find("img.pic"),e=i.data("caption"),o=i.data("full"),t=i.attr("title"),i=a.title;return 0<t.length?i=u.trim(t):0<e.length&&(i=u.trim(e)),s.open("https://twitter.com/intent/tweet?url="+encodeURI(o)+"&text="+encodeURI(i),"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},o=function(t,i){t.find(".modula-icon-facebook").click(function(t){t.preventDefault();t="//www.facebook.com/sharer.php?u="+u(this).parents(".modula-item").find("img.pic").attr("data-full");return s.open(t,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},r=function(t,i){t.find(".modula-icon-whatsapp").click(function(t){t.preventDefault();t=u(this).parents(".modula-item").find("img.pic").attr("data-full");return s.open("https://api.whatsapp.com/send?text="+encodeURI(t)+"&preview_url=true","ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},l=function(t,i){t.find(".modula-icon-pinterest").click(function(t){t.preventDefault();var i=u(this).parents(".modula-item").find("img.pic"),e=i.data("full"),o=i.data("caption"),n=i.attr("title"),t=a.title;0<n.length?t=u.trim(n):0<o.length&&(t=u.trim(o));e="http://pinterest.com/pin/create/button/?url="+encodeURI(e)+"&description="+encodeURI(t);return 1<=i.length&&(t=i.attr("data-full"),e+="&media="+(i=t,(t=a.createElement("img")).src=i,i=t.src,t.src=null,i)),s.open(e,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},d=function(t,i){t.find(".modula-icon-linkedin").click(function(t){t.preventDefault();t=u(this).parents(".modula-item").find("img.pic").attr("data-full"),t="//linkedin.com/shareArticle?mini=true&url="+encodeURI(t);return s.open(t,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},p=function(t,n){t.find(".modula-icon-email").click(function(t){var i=encodeURI(n.options.email_subject),e=jQuery(".modula-icon-email").parents(".modula-item").find("img.pic").attr("data-full"),o=location.href,o="mailto:?subject="+i+"&body="+encodeURI(n.options.email_message.replace(/%%image_link%%/g,e).replace(/%%gallery_link%%/g,o));return s.open(o,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})};u.fn[n]=function(i){var e,o=arguments;return i===t||"object"==typeof i?this.each(function(){u.data(this,"plugin_"+n)||u.data(this,"plugin_"+n,new h(this,i))}):"string"==typeof i&&"_"!==i[0]&&"init"!==i?(this.each(function(){var t=u.data(this,"plugin_"+n);t instanceof h&&"function"==typeof t[i]&&(e=t[i].apply(t,Array.prototype.slice.call(o,1))),"destroy"===i&&u.data(this,"plugin_"+n,null)}),e!==t?e:this):void 0}}(jQuery,window,document),jQuery(document).ready(function(){var t=jQuery(".modula.modula-gallery");jQuery.each(t,function(){var t=jQuery(this).data("config");jQuery(this).modulaGallery(t)})});
assets/js/modula-justified-wfl.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(i),i}:e(jQuery)}(function(l){function n(t,i){this.settings=i,this.checkSettings(),this.imgAnalyzerTimeout=null,this.entries=null,this.buildingRow={entriesBuff:[],width:0,height:0,aspectRatio:0},this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.yield={every:2,flushed:0},this.border=0<=i.border?i.border:i.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges(),this.offY=this.border,this.rows=0,this.spinner={phase:0,timeSlot:150,$el:l('<div class="spinner"><span></span><span></span><span></span></div>'),intervalId:null},this.scrollBarOn=!1,this.checkWidthIntervalId=null,this.galleryWidth=t.width(),this.$gallery=t}n.prototype.getSuffix=function(t,i){for(var e=i<t?t:i,s=0;s<this.suffixRanges.length;s++)if(e<=this.suffixRanges[s])return this.settings.sizeRangeSuffixes[this.suffixRanges[s]];return this.settings.sizeRangeSuffixes[this.suffixRanges[s-1]]},n.prototype.removeSuffix=function(t,i){return t.substring(0,t.length-i.length)},n.prototype.endsWith=function(t,i){return-1!==t.indexOf(i,t.length-i.length)},n.prototype.getUsedSuffix=function(t){for(var i in this.settings.sizeRangeSuffixes)if(this.settings.sizeRangeSuffixes.hasOwnProperty(i)&&0!==this.settings.sizeRangeSuffixes[i].length&&this.endsWith(t,this.settings.sizeRangeSuffixes[i]))return this.settings.sizeRangeSuffixes[i];return""},n.prototype.newSrc=function(t,i,e,s){var n;return this.settings.thumbnailPath?n=this.settings.thumbnailPath(t,i,e,s):(s=null!==(s=t.match(this.settings.extension))?s[0]:"",n=t.replace(this.settings.extension,""),n=this.removeSuffix(n,this.getUsedSuffix(n)),n+=this.getSuffix(i,e)+s),n},n.prototype.showImg=function(t,i){this.settings.cssAnimation?(t.addClass("entry-visible"),i&&i()):(t.stop().fadeTo(this.settings.imagesAnimationDuration,1,i),t.find(this.settings.imgSelector).stop().fadeTo(this.settings.imagesAnimationDuration,1,i))},n.prototype.extractImgSrcFromImage=function(t){var i=void 0!==t.data("safe-src")?t.data("safe-src"):t.attr("src");return t.data("jg.originalSrc",i),i},n.prototype.imgFromEntry=function(t){t=t.find(this.settings.imgSelector);return 0===t.length?null:t},n.prototype.captionFromEntry=function(t){t=t.find("> .caption");return 0===t.length?null:t},n.prototype.displayEntry=function(t,i,e,s,n,r){t.width(s),t.height(r),t.css("top",e),t.css("left",i);var o,a,h,g=this.imgFromEntry(t);null!==g?(g.css("width",s),g.css("height",n),g.css("margin-left",-s/2),g.css("margin-top",-n/2),o=g.attr("src"),a=this.newSrc(o,s,n,g[0]),g.one("error",function(){g.attr("src",g.data("jg.originalSrc"))}),h=function(){o!==a&&g.attr("src",a)},"skipped"===t.data("jg.loaded")?this.onImageEvent(o,l.proxy(function(){this.showImg(t,h),t.data("jg.loaded",!0)},this)):this.showImg(t,h)):this.showImg(t),this.displayEntryCaption(t)},n.prototype.displayEntryCaption=function(t){var i,e=this.imgFromEntry(t);null!==e&&this.settings.captions?(null===(i=this.captionFromEntry(t))&&(e=e.attr("alt"),this.isValidCaption(e)||(e=t.attr("title")),this.isValidCaption(e)&&(i=l('<div class="caption">'+e+"</div>"),t.append(i),t.data("jg.createdCaption",!0))),null!==i&&(this.settings.cssAnimation||i.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity),this.addCaptionEventsHandlers(t))):this.removeCaptionEventsHandlers(t)},n.prototype.isValidCaption=function(t){return void 0!==t&&0<t.length},n.prototype.onEntryMouseEnterForCaption=function(t){t=this.captionFromEntry(l(t.currentTarget));this.settings.cssAnimation?t.addClass("caption-visible").removeClass("caption-hidden"):t.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.visibleOpacity)},n.prototype.onEntryMouseLeaveForCaption=function(t){t=this.captionFromEntry(l(t.currentTarget));this.settings.cssAnimation?t.removeClass("caption-visible").removeClass("caption-hidden"):t.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.nonVisibleOpacity)},n.prototype.addCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0===i&&(i={mouseenter:l.proxy(this.onEntryMouseEnterForCaption,this),mouseleave:l.proxy(this.onEntryMouseLeaveForCaption,this)},t.on("mouseenter",void 0,void 0,i.mouseenter),t.on("mouseleave",void 0,void 0,i.mouseleave),t.data("jg.captionMouseEvents",i))},n.prototype.removeCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0!==i&&(t.off("mouseenter",void 0,i.mouseenter),t.off("mouseleave",void 0,i.mouseleave),t.removeData("jg.captionMouseEvents"))},n.prototype.clearBuildingRow=function(){this.buildingRow.entriesBuff=[],this.buildingRow.aspectRatio=0,this.buildingRow.width=0},n.prototype.prepareBuildingRow=function(t){var i,e,s,n,r=!0,o=0,a=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,h=a/this.buildingRow.aspectRatio,g=this.settings.rowHeight,l=this.buildingRow.width/a>this.settings.justifyThreshold;if(t&&"hide"===this.settings.lastRow&&!l){for(i=0;i<this.buildingRow.entriesBuff.length;i++)e=this.buildingRow.entriesBuff[i],this.settings.cssAnimation?e.removeClass("entry-visible"):(e.stop().fadeTo(0,.1),e.find("> img, > a > img").fadeTo(0,0));return-1}for(t&&!l&&"justify"!==this.settings.lastRow&&"hide"!==this.settings.lastRow&&(r=!1,0<this.rows&&(r=(g=(this.offY-this.border-this.settings.margins*this.rows)/this.rows)*this.buildingRow.aspectRatio/a>this.settings.justifyThreshold)),i=0;i<this.buildingRow.entriesBuff.length;i++)n=(e=this.buildingRow.entriesBuff[i]).data("jg.width")/e.data("jg.height"),n=r?(s=i===this.buildingRow.entriesBuff.length-1?a:h*n,h):(s=g*n,g),a-=Math.round(s),e.data("jg.jwidth",Math.round(s)),e.data("jg.jheight",Math.ceil(n)),(0===i||n<o)&&(o=n);return this.buildingRow.height=o,r},n.prototype.flushRow=function(t){var i,e=this.settings,s=this.border,n=this.prepareBuildingRow(t);if(t&&"hide"===e.lastRow&&-1===n)this.clearBuildingRow();else{if(this.maxRowHeight&&this.maxRowHeight<this.buildingRow.height&&(this.buildingRow.height=this.maxRowHeight),t&&("center"===e.lastRow||"right"===e.lastRow)){for(var r=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*e.margins,o=0;o<this.buildingRow.entriesBuff.length;o++)r-=(i=this.buildingRow.entriesBuff[o]).data("jg.jwidth");"center"===e.lastRow?s+=r/2:"right"===e.lastRow&&(s+=r)}var a=this.buildingRow.entriesBuff.length-1;for(o=0;o<=a;o++)i=this.buildingRow.entriesBuff[this.settings.rtl?a-o:o],this.displayEntry(i,s,this.offY,i.data("jg.jwidth"),i.data("jg.jheight"),this.buildingRow.height),s+=i.data("jg.jwidth")+e.margins;this.galleryHeightToSet=this.offY+this.buildingRow.height+this.border,this.setGalleryTempHeight(this.galleryHeightToSet+this.getSpinnerHeight()),(!t||this.buildingRow.height<=e.rowHeight&&n)&&(this.offY+=this.buildingRow.height+e.margins,this.rows+=1,this.clearBuildingRow(),this.settings.triggerEvent.call(this,"jg.rowflush"))}};var i=0;function e(){return l("body").height()>l(window).height()}n.prototype.rememberGalleryHeight=function(){i=this.$gallery.height(),this.$gallery.height(i)},n.prototype.setGalleryTempHeight=function(t){i=Math.max(t,i),this.$gallery.height(i)},n.prototype.setGalleryFinalHeight=function(t){i=t,this.$gallery.height(t)},n.prototype.checkWidth=function(){this.checkWidthIntervalId=setInterval(l.proxy(function(){var t;this.$gallery.is(":visible")&&(t=parseFloat(this.$gallery.width()),e()===this.scrollBarOn?Math.abs(t-this.galleryWidth)>this.settings.refreshSensitivity&&(this.galleryWidth=t,this.rewind(),this.rememberGalleryHeight(),this.startImgAnalyzer(!0)):(this.scrollBarOn=e(),this.galleryWidth=t))},this),this.settings.refreshTime)},n.prototype.isSpinnerActive=function(){return null!==this.spinner.intervalId},n.prototype.getSpinnerHeight=function(){return this.spinner.$el.innerHeight()},n.prototype.stopLoadingSpinnerAnimation=function(){clearInterval(this.spinner.intervalId),this.spinner.intervalId=null,this.setGalleryTempHeight(this.$gallery.height()-this.getSpinnerHeight()),this.spinner.$el.detach()},n.prototype.startLoadingSpinnerAnimation=function(){var t=this.spinner,i=t.$el.find("span");clearInterval(t.intervalId),this.$gallery.append(t.$el),this.setGalleryTempHeight(this.offY+this.buildingRow.height+this.getSpinnerHeight()),t.intervalId=setInterval(function(){t.phase<i.length?i.eq(t.phase).fadeTo(t.timeSlot,1):i.eq(t.phase-i.length).fadeTo(t.timeSlot,0),t.phase=(t.phase+1)%(2*i.length)},t.timeSlot)},n.prototype.rewind=function(){this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.offY=this.border,this.rows=0,this.clearBuildingRow()},n.prototype.updateEntries=function(t){t=t&&null!=this.lastFetchedEntry?l(this.lastFetchedEntry).nextAll(this.settings.selector).toArray():(this.entries=[],this.$gallery.children(this.settings.selector).toArray());return 0<t.length&&(l.isFunction(this.settings.sort)?t=this.sortArray(t):this.settings.randomize&&(t=this.shuffleArray(t)),this.lastFetchedEntry=t[t.length-1],this.settings.filter?t=this.filterArray(t):this.resetFilters(t)),this.entries=this.entries.concat(t),!0},n.prototype.insertToGallery=function(t){var i=this;l.each(t,function(){l(this).appendTo(i.$gallery)})},n.prototype.shuffleArray=function(t){for(var i,e,s=t.length-1;0<s;s--)i=Math.floor(Math.random()*(s+1)),e=t[s],t[s]=t[i],t[i]=e;return this.insertToGallery(t),t},n.prototype.sortArray=function(t){return t.sort(this.settings.sort),this.insertToGallery(t),t},n.prototype.resetFilters=function(t){for(var i=0;i<t.length;i++)l(t[i]).removeClass("jg-filtered")},n.prototype.filterArray=function(t){var i=this.settings;if("string"===l.type(i.filter))return t.filter(function(t){t=l(t);return t.is(i.filter)?(t.removeClass("jg-filtered"),!0):(t.addClass("jg-filtered").removeClass("jg-visible"),!1)});if(l.isFunction(i.filter)){for(var e=t.filter(i.filter),s=0;s<t.length;s++)-1===e.indexOf(t[s])?l(t[s]).addClass("jg-filtered").removeClass("jg-visible"):l(t[s]).removeClass("jg-filtered");return e}},n.prototype.destroy=function(){clearInterval(this.checkWidthIntervalId),l.each(this.entries,l.proxy(function(t,i){var e=l(i);e.css("width",""),e.css("height",""),e.css("top",""),e.css("left",""),e.data("jg.loaded",void 0),e.removeClass("jg-entry");i=this.imgFromEntry(e);i.css("width",""),i.css("height",""),i.css("margin-left",""),i.css("margin-top",""),i.attr("src",i.data("jg.originalSrc")),i.data("jg.originalSrc",void 0),this.removeCaptionEventsHandlers(e);i=this.captionFromEntry(e);e.data("jg.createdCaption")?(e.data("jg.createdCaption",void 0),null!==i&&i.remove()):null!==i&&i.fadeTo(0,1)},this)),this.$gallery.css("height",""),this.$gallery.removeClass("justified-gallery"),this.$gallery.data("jg.controller",void 0)},n.prototype.analyzeImages=function(t){for(var i=this.lastAnalyzedIndex+1;i<this.entries.length;i++){var e=l(this.entries[i]);if(!0===e.data("jg.loaded")||"skipped"===e.data("jg.loaded")){var s=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,n=e.data("jg.width")/e.data("jg.height");if(s/(this.buildingRow.aspectRatio+n)<this.settings.rowHeight&&(this.flushRow(!1),++this.yield.flushed>=this.yield.every))return void this.startImgAnalyzer(t);this.buildingRow.entriesBuff.push(e),this.buildingRow.aspectRatio+=n,this.buildingRow.width+=n*this.settings.rowHeight,this.lastAnalyzedIndex=i}else if("error"!==e.data("jg.loaded"))return}0<this.buildingRow.entriesBuff.length&&this.flushRow(!0),this.isSpinnerActive()&&this.stopLoadingSpinnerAnimation(),this.stopImgAnalyzerStarter(),this.settings.triggerEvent.call(this,t?"jg.resize":"jg.complete"),this.setGalleryFinalHeight(this.galleryHeightToSet)},n.prototype.stopImgAnalyzerStarter=function(){this.yield.flushed=0,null!==this.imgAnalyzerTimeout&&(clearTimeout(this.imgAnalyzerTimeout),this.imgAnalyzerTimeout=null)},n.prototype.startImgAnalyzer=function(t){var i=this;this.stopImgAnalyzerStarter(),this.imgAnalyzerTimeout=setTimeout(function(){i.analyzeImages(t)},.001)},n.prototype.onImageEvent=function(t,i,e){var s,n;(i||e)&&(s=new Image,n=l(s),i&&n.one("load",function(){n.off("load error"),i(s)}),e&&n.one("error",function(){n.off("load error"),e(s)}),s.src=t)},n.prototype.init=function(){var r=!1,o=!1,a=this;l.each(this.entries,function(t,i){var e=l(i),s=a.imgFromEntry(e);if(e.addClass("jg-entry"),!0!==e.data("jg.loaded")&&"skipped"!==e.data("jg.loaded"))if(null!==a.settings.rel&&e.attr("rel",a.settings.rel),null!==a.settings.target&&e.attr("target",a.settings.target),null!==s){var n=a.extractImgSrcFromImage(s);if(s.attr("src",n),!1===a.settings.waitThumbnailsLoad){i=parseFloat(s.prop("width")),s=parseFloat(s.prop("height"));if(!isNaN(i)&&!isNaN(s))return e.data("jg.width",i),e.data("jg.height",s),e.data("jg.loaded","skipped"),o=!0,a.startImgAnalyzer(!1),!0}e.data("jg.loaded",!1),r=!0,a.isSpinnerActive()||a.startLoadingSpinnerAnimation(),a.onImageEvent(n,function(t){e.data("jg.width",t.width),e.data("jg.height",t.height),e.data("jg.loaded",!0),a.startImgAnalyzer(!1)},function(){e.data("jg.loaded","error"),a.startImgAnalyzer(!1)})}else e.data("jg.loaded",!0),e.data("jg.width",e.width()|parseFloat(e.css("width"))|1),e.data("jg.height",e.height()|parseFloat(e.css("height"))|1)}),r||o||this.startImgAnalyzer(!1),this.checkWidth()},n.prototype.checkOrConvertNumber=function(t,i){if("string"===l.type(t[i])&&(t[i]=parseFloat(t[i])),"number"!==l.type(t[i]))throw i+" must be a number";if(isNaN(t[i]))throw"invalid number for "+i},n.prototype.checkSizeRangesSuffixes=function(){if("object"!==l.type(this.settings.sizeRangeSuffixes))throw"sizeRangeSuffixes must be defined and must be an object";var t,i=[];for(t in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(t)&&i.push(t);for(var e={0:""},s=0;s<i.length;s++)if("string"===l.type(i[s]))try{e[parseInt(i[s].replace(/^[a-z]+/,""),10)]=this.settings.sizeRangeSuffixes[i[s]]}catch(t){throw"sizeRangeSuffixes keys must contains correct numbers ("+t+")"}else e[i[s]]=this.settings.sizeRangeSuffixes[i[s]];this.settings.sizeRangeSuffixes=e},n.prototype.retrieveMaxRowHeight=function(){var t=null,i=this.settings.rowHeight;if("string"===l.type(this.settings.maxRowHeight))t=this.settings.maxRowHeight.match(/^[0-9]+%$/)?i*parseFloat(this.settings.maxRowHeight.match(/^([0-9]+)%$/)[1])/100:parseFloat(this.settings.maxRowHeight);else{if("number"!==l.type(this.settings.maxRowHeight)){if(!1===this.settings.maxRowHeight||null==this.settings.maxRowHeight)return null;throw"maxRowHeight must be a number or a percentage"}t=this.settings.maxRowHeight}if(isNaN(t))throw"invalid number for maxRowHeight";return t<i&&(t=i),t},n.prototype.checkSettings=function(){this.checkSizeRangesSuffixes(),this.checkOrConvertNumber(this.settings,"rowHeight"),this.checkOrConvertNumber(this.settings,"margins"),this.checkOrConvertNumber(this.settings,"border");var t=["justify","nojustify","left","center","right","hide"];if(-1===t.indexOf(this.settings.lastRow))throw"lastRow must be one of: "+t.join(", ");if(this.checkOrConvertNumber(this.settings,"justifyThreshold"),this.settings.justifyThreshold<0||1<this.settings.justifyThreshold)throw"justifyThreshold must be in the interval [0,1]";if("boolean"!==l.type(this.settings.cssAnimation))throw"cssAnimation must be a boolean";if("boolean"!==l.type(this.settings.captions))throw"captions must be a boolean";if(this.checkOrConvertNumber(this.settings.captionSettings,"animationDuration"),this.checkOrConvertNumber(this.settings.captionSettings,"visibleOpacity"),this.settings.captionSettings.visibleOpacity<0||1<this.settings.captionSettings.visibleOpacity)throw"captionSettings.visibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings.captionSettings,"nonVisibleOpacity"),this.settings.captionSettings.nonVisibleOpacity<0||1<this.settings.captionSettings.nonVisibleOpacity)throw"captionSettings.nonVisibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings,"imagesAnimationDuration"),this.checkOrConvertNumber(this.settings,"refreshTime"),this.checkOrConvertNumber(this.settings,"refreshSensitivity"),"boolean"!==l.type(this.settings.randomize))throw"randomize must be a boolean";if("string"!==l.type(this.settings.selector))throw"selector must be a string";if(!1!==this.settings.sort&&!l.isFunction(this.settings.sort))throw"sort must be false or a comparison function";if(!1!==this.settings.filter&&!l.isFunction(this.settings.filter)&&"string"!==l.type(this.settings.filter))throw"filter must be false, a string or a filter function"},n.prototype.retrieveSuffixRanges=function(){var t,i=[];for(t in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(t)&&i.push(parseInt(t,10));return i.sort(function(t,i){return i<t?1:t<i?-1:0}),i},n.prototype.updateSettings=function(t){this.settings=l.extend({},this.settings,t),this.checkSettings(),this.border=0<=this.settings.border?this.settings.border:this.settings.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges()},n.prototype.defaults={sizeRangeSuffixes:{},thumbnailPath:void 0,rowHeight:120,maxRowHeight:!1,margins:1,border:-1,lastRow:"nojustify",justifyThreshold:.9,waitThumbnailsLoad:!0,captions:!0,cssAnimation:!0,imagesAnimationDuration:500,captionSettings:{animationDuration:500,visibleOpacity:.7,nonVisibleOpacity:0},rel:null,target:null,extension:/\.[^.\\/]+$/,refreshTime:200,refreshSensitivity:0,randomize:!1,rtl:!1,sort:!1,filter:!1,selector:"a, div:not(.spinner)",imgSelector:"> img, > a > img",triggerEvent:function(t){this.$gallery.trigger(t)}},l.fn.justifiedGallery=function(s){return this.each(function(t,i){var e=l(i);e.addClass("justified-gallery");i=e.data("jg.controller");if(void 0===i){if(null!=s&&"object"!==l.type(s)){if("destroy"===s)return;throw"The argument must be an object"}i=new n(e,l.extend({},n.prototype.defaults,s)),e.data("jg.controller",i)}else if("norewind"!==s){if("destroy"===s)return void i.destroy();i.updateSettings(s),i.rewind()}i.updateEntries("norewind"===s)&&i.init()})}});
2
- function tg_getURLParameter(t){return decodeURIComponent((new RegExp("[?|&]"+t+"=([^&;]+?)(&|#|;|$)").exec(location.search)||[,""])[1].replace(/\+/g,"%20"))||null}function modulaInViewport(t){"function"==typeof jQuery&&t instanceof jQuery&&(t=t[0]);t=t.getBoundingClientRect();return t.top-jQuery(window).height()<=-100&&-400<=t.top-jQuery(window).height()||t.bottom<=jQuery(window).height()}jQuery(document).on("vc-full-width-row-single vc-full-width-row",function(t,i){0<jQuery("body").find(".modula").length&&jQuery(window).trigger("modula-update")}),jQuery(window).on("elementor/frontend/init",function(){window.elementorFrontend&&window.elementorFrontend.hooks.addAction("frontend/element_ready/global",function(t){0<jQuery("body").find(".modula").length&&jQuery(window).trigger("modula-update")})}),function(u,s,a,t){var n="modulaGallery",e={resizer:"/",keepArea:!0,type:"creative-gallery",columns:12,gutter:10,desktopGutter:10,mobileGutter:10,tabletGutter:10,enableTwitter:!1,enableFacebook:!1,enableWhatsapp:!1,enablePinterest:!1,enableLinkedin:!1,enableEmail:!1,lazyLoad:0,initLightbox:!1,lightbox:"fancybox",lightboxOpts:{},inView:!1};function h(t,i){this.element=t,this.$element=u(t),this.$itemsCnt=this.$element.find(".modula-items"),this.$items=this.$itemsCnt.find(".modula-item"),this.options=u.extend({},e,i),this._defaults=e,this._name=n,this.tiles=[],this.$tilesCnt=null,this.completed=!1,this.lastWidth=0,this.resizeTO=0,this.isIsotope=!1,this.isLazyLoaded=!0,this.init()}h.prototype.init=function(){var i=this,t=a.documentElement.clientWidth;this.options.gutter=t<=568?this.options.mobileGutter:t<=768?this.options.tabletGutter:this.options.desktopGutter,u(a).trigger("modula_api_before_init",[i]),"custom-grid"===this.options.type?this.createCustomGallery():"creative-gallery"==this.options.type?this.createGrid():"grid"==this.options.type&&("automatic"==this.options.grid_type?this.createAutoGrid():this.createColumnsGrid()),"custom-grid"===this.options.type&&u(s).height()<u("html").height()&&i.onResize(i),u(s).resize(function(){i.onResize(i)}),u(s).on("modula-update",function(){i.onResize(i)}),u(a).on("lazyloaded",function(t){t=u(t.target);"modula"==t.data("source")&&(t.data("size",{width:t.width(),height:t.height()}),(t=t.parents(".modula-item")).addClass("tg-loaded"),t=i.$items.not(".jtg-hidden").index(t),i.placeImage(t),i.isIsotope&&i.$itemsCnt.modulaisotope("layout"))}),i.options.inView&&jQuery(s).on("DOMContentLoaded load resize scroll",function(){modulaInViewport(i.$element)&&i.$element.addClass("modula-loaded-scale")}),this.setupSocial(),this.options.onComplete&&this.options.onComplete(),"fancybox"!=i.options.lightbox||i.options.initLightbox||this.initLightbox(),u(a).trigger("modula_api_after_init",[i])},h.prototype.initLightbox=function(){var e=this;e.$element.on("click",".modula-item-link:not( .modula-simple-link )",function(t){t.preventDefault();var i=u.map(e.$items,function(t){var i=jQuery(t).find(".modula-item-link:not( .modula-simple-link )"),t=jQuery(t).find(".pic");return{src:i.attr("href"),opts:{$thumb:t.parents(".modula-item"),caption:i.data("caption"),alt:t.attr("alt"),image_id:i.attr("data-image-id")}}}),t=e.$items.index(jQuery(this).parents(".modula-item"));jQuery.modulaFancybox.open(i,e.options.lightboxOpts,t)})},h.prototype.trunc=function(t){return Math.trunc?Math.trunc(t):(t=+t,isFinite(t)?t-t%1||(t<0?-0:0===t?t:0):t)},h.prototype.createCustomGallery=function(){var h,r=this,t=this.$element.find(".modula-items").width(),d=this,l=this.options.columns,i=a.documentElement.clientWidth;"1"==this.options.enableResponsive&&(i<=568?l=this.options.mobileColumns:i<=768&&(l=this.options.tabletColumns)),h=0<this.options.gutter?(t-this.options.gutter*(l-1))/l:Math.floor(t/l*1e3)/1e3,this.$items.not(".jtg-hidden").each(function(t,i){var e,o,n={},s=u(i).data("width"),a=u(i).data("height");12<s&&(s=12),"1"==d.options.enableResponsive&&(e=s,o=a,1==l?a=(s=1)*o/e:((s=Math.round(l*e/12))<1&&(s=1),(a=Math.round(s*o/e))<1&&(a=1))),n.width=h*s+d.options.gutter*(s-1),n.height=Math.round(h)*a+d.options.gutter*(a-1),u(i).data("size",n).addClass("tiled").addClass(n.width>n.height?"tile-h":"tile-v").data("position"),u(i).css(u(i).data("size")),u(i).find(".figc").css({width:u(i).data("size").width,height:u(i).data("size").height}),r.loadImage(t)});t={itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(d.options.gutter)}};this.$itemsCnt.modulaisotope(t),this.isIsotope=!0},h.prototype.createGrid=function(){var o=this;this.$itemsCnt.data("area",this.$itemsCnt.width()*this.options.height),this.lastWidth=this.$itemsCnt.width();for(var t,i=0;i<this.$items.not(".jtg-hidden").length;i++)this.tiles.push(o.getSlot());this.tiles.sort(function(t,i){return t.position-i.position}),this.$items.not(".jtg-hidden").each(function(t,i){var e=o.tiles[t];u(i).data("size",e),u(i).addClass("tiled").addClass(e.width>e.height?"tile-h":"tile-v").data("position"),u(i).css({width:e.width,height:e.height}),u(i).find(".figc").css({width:e.width,height:e.height}),o.loadImage(t)}),this.isIsotope||(t={resizesContainer:!1,itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(o.options.gutter)}},this.$itemsCnt.modulaisotope(t),this.isIsotope=!0)},h.prototype.createAutoGrid=function(){this.$itemsCnt.justifiedGallery({rowHeight:this.options.rowHeight,margins:this.options.gutter,lastRow:this.options.lastRow,captions:!1,border:0,imgSelector:".pic",cssAnimation:!0,imagesAnimationDuration:700})},h.prototype.createColumnsGrid=function(){var e=this;this.$itemsCnt.modulaisotope({itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(this.options.gutter)}}),this.$items.each(function(t,i){e.loadImage(t)}),this.isIsotope=!0},h.prototype.getSlot=function(){if(0==this.tiles.length)return o={top:0,left:0,width:this.$itemsCnt.width(),height:this.options.height,area:this.$itemsCnt.width()*this.options.height,position:0};for(var t=0,i=0;i<this.tiles.length;i++)(o=this.tiles[i]).area>this.tiles[t].area&&(t=i);var e,o={},n=this.tiles[t];return(o=n.width>n.height?(e=n.width/2*this.options.randomFactor,n.prevWidth=n.width,n.width=Math.floor(n.width/2+e*(Math.random()-.5)),{top:n.top,left:n.left+n.width+this.options.gutter,width:n.prevWidth-n.width-this.options.gutter,height:n.height}):(e=n.height/2*this.options.randomFactor,n.prevHeight=n.height,n.height=Math.floor(n.height/2+e*(Math.random()-.5)),{left:n.left,top:n.top+n.height+this.options.gutter,width:n.width,height:n.prevHeight-n.height-this.options.gutter})).area=o.width*o.height,o.position=1e3*o.top+o.left,n.position=1e3*n.top+n.left,this.tiles[t]=n,this.tiles[t].area=n.width*n.height,o},h.prototype.reset=function(){this.tiles=[],"custom-grid"===this.options.type?this.createCustomGallery():"creative-gallery"==this.options.type?this.createGrid():"grid"==this.options.type&&("automatic"==this.options.grid_type?this.createAutoGrid():this.createColumnsGrid()),this.lastWidth=this.$itemsCnt.width(),u(a).trigger("modula_api_reset",[this])},h.prototype.onResize=function(i){var t;i.lastWidth!=i.$itemsCnt.width()&&(t=a.documentElement.clientWidth,i.options.gutter=t<=568?i.options.mobileGutter:t<=768?i.options.tabletGutter:this.options.desktopGutter,clearTimeout(i.resizeTO),i.resizeTO=setTimeout(function(){var t;i.options.keepArea&&(t=i.$itemsCnt.data("area"),i.$itemsCnt.height(t/i.$itemsCnt.width())),i.reset(),i.isIsotope&&i.$itemsCnt.modulaisotope({packery:{gutter:parseInt(i.options.gutter)}}).modulaisotope("layout")},100))},h.prototype.loadImage=function(t){var i,e=this,o=e.$items.not(".jtg-hidden").eq(t).find(".pic"),n={};"0"==e.options.lazyLoad?void 0===o.attr("width")&&void 0===o.attr("height")?((i=new Image).onload=function(){n={width:this.width,height:this.height},o.data("size",n),e.placeImage(t)},"undefined"!=o.attr("src")?i.src=o.attr("src"):i.src=o.data("src")):(n={width:o.width(),height:o.height()},o.data("size",n),e.placeImage(t)):e.placeImage(t)},h.prototype.placeImage=function(t){if("grid"!=this.options.type){var i=this.$items.not(".jtg-hidden").eq(t),e=i.find(".pic"),o=i.data("size"),n=e.data("size");if(void 0!==o&&void 0!==n){o.width,o.height;var s=n.width/n.height,a=e.data("valign")?e.data("valign"):"middle",i=e.data("halign")?e.data("halign"):"center",h={top:"auto",bottom:"auto",left:"auto",right:"auto",width:"auto",height:"auto",margin:"0",maxWidth:"999em"};if(o.width*n.height/n.width>o.height)switch(h.width=o.width,h.left=0,a){case"top":h.top=0;break;case"middle":h.top=0-(o.width*(1/s)-o.height)/2;break;case"bottom":h.bottom=0}else switch(h.height=o.height,h.top=0,i){case"left":h.left=0;break;case"center":h.left=0-(o.height*s-o.width)/2;break;case"right":h.right=0}e.css(h),this.$items.not(".jtg-hidden").eq(t).addClass("tg-loaded")}}},h.prototype.setupSocial=function(){this.options.enableTwitter&&i(this.$items,this),this.options.enableFacebook&&o(this.$items,this),this.options.enablePinterest&&d(this.$items,this),this.options.enableLinkedin&&l(this.$items,this),this.options.enableWhatsapp&&r(this.$items,this),this.options.enableEmail&&p(this.$items,this)},h.prototype.destroy=function(){this.isPackeryActive&&(this.$itemsCnt.packery("destroy"),this.isPackeryActive=!1)};var i=function(t,i){t.find(".modula-icon-twitter").click(function(t){t.preventDefault();var i=u(this).parents(".modula-item").find("img.pic"),e=i.data("caption"),o=i.data("full"),t=i.attr("title"),i=a.title;return 0<t.length?i=u.trim(t):0<e.length&&(i=u.trim(e)),s.open("https://twitter.com/intent/tweet?url="+encodeURI(o)+"&text="+encodeURI(i),"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},o=function(t,i){t.find(".modula-icon-facebook").click(function(t){t.preventDefault();t="//www.facebook.com/sharer.php?u="+u(this).parents(".modula-item").find("img.pic").attr("data-full");return s.open(t,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},r=function(t,i){t.find(".modula-icon-whatsapp").click(function(t){t.preventDefault();t=u(this).parents(".modula-item").find("img.pic").attr("data-full");return s.open("https://api.whatsapp.com/send?text="+encodeURI(t)+"&preview_url=true","ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},d=function(t,i){t.find(".modula-icon-pinterest").click(function(t){t.preventDefault();var i=u(this).parents(".modula-item").find("img.pic"),e=i.data("full"),o=i.data("caption"),n=i.attr("title"),t=a.title;0<n.length?t=u.trim(n):0<o.length&&(t=u.trim(o));e="http://pinterest.com/pin/create/button/?url="+encodeURI(e)+"&description="+encodeURI(t);return 1<=i.length&&(t=i.attr("data-full"),e+="&media="+(i=t,(t=a.createElement("img")).src=i,i=t.src,t.src=null,i)),s.open(e,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},l=function(t,i){t.find(".modula-icon-linkedin").click(function(t){t.preventDefault();t=u(this).parents(".modula-item").find("img.pic").attr("data-full"),t="//linkedin.com/shareArticle?mini=true&url="+encodeURI(t);return s.open(t,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},p=function(t,n){t.find(".modula-icon-email").click(function(t){var i=encodeURI(n.options.email_subject),e=jQuery(".modula-icon-email").parents(".modula-item").find("img.pic").attr("data-full"),o=location.href,o="mailto:?subject="+i+"&body="+encodeURI(n.options.email_message.replace(/%%image_link%%/g,e).replace(/%%gallery_link%%/g,o));return s.open(o,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})};u.fn[n]=function(i){var e,o=arguments;return i===t||"object"==typeof i?this.each(function(){u.data(this,"plugin_"+n)||u.data(this,"plugin_"+n,new h(this,i))}):"string"==typeof i&&"_"!==i[0]&&"init"!==i?(this.each(function(){var t=u.data(this,"plugin_"+n);t instanceof h&&"function"==typeof t[i]&&(e=t[i].apply(t,Array.prototype.slice.call(o,1))),"destroy"===i&&u.data(this,"plugin_"+n,null)}),e!==t?e:this):void 0}}(jQuery,window,document),jQuery(document).ready(function(){var t=jQuery(".modula.modula-gallery");jQuery.each(t,function(){var t=jQuery(this).data("config");jQuery(this).modulaGallery(t)})});
1
+ !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(i),i}:e(jQuery)}(function(g){function n(t,i){this.settings=i,this.checkSettings(),this.imgAnalyzerTimeout=null,this.entries=null,this.buildingRow={entriesBuff:[],width:0,height:0,aspectRatio:0},this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.yield={every:2,flushed:0},this.border=0<=i.border?i.border:i.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges(),this.offY=this.border,this.rows=0,this.spinner={phase:0,timeSlot:150,$el:g('<div class="jg-spinner"><span></span><span></span><span></span></div>'),intervalId:null},this.scrollBarOn=!1,this.checkWidthIntervalId=null,this.galleryWidth=t.width(),this.$gallery=t}n.prototype.getSuffix=function(t,i){for(var e=i<t?t:i,s=0;s<this.suffixRanges.length;s++)if(e<=this.suffixRanges[s])return this.settings.sizeRangeSuffixes[this.suffixRanges[s]];return this.settings.sizeRangeSuffixes[this.suffixRanges[s-1]]},n.prototype.removeSuffix=function(t,i){return t.substring(0,t.length-i.length)},n.prototype.endsWith=function(t,i){return-1!==t.indexOf(i,t.length-i.length)},n.prototype.getUsedSuffix=function(t){for(var i in this.settings.sizeRangeSuffixes)if(this.settings.sizeRangeSuffixes.hasOwnProperty(i)&&0!==this.settings.sizeRangeSuffixes[i].length&&this.endsWith(t,this.settings.sizeRangeSuffixes[i]))return this.settings.sizeRangeSuffixes[i];return""},n.prototype.newSrc=function(t,i,e,s){var n;return this.settings.thumbnailPath?n=this.settings.thumbnailPath(t,i,e,s):(s=null!==(s=t.match(this.settings.extension))?s[0]:"",n=t.replace(this.settings.extension,""),n=this.removeSuffix(n,this.getUsedSuffix(n)),n+=this.getSuffix(i,e)+s),n},n.prototype.showImg=function(t,i){this.settings.cssAnimation?(t.addClass("jg-entry-visible"),i&&i()):(t.stop().fadeTo(this.settings.imagesAnimationDuration,1,i),t.find(this.settings.imgSelector).stop().fadeTo(this.settings.imagesAnimationDuration,1,i))},n.prototype.extractImgSrcFromImage=function(t){var i=t.data("safe-src"),e="data-safe-src";return void 0===i&&(i=t.attr("src"),e="src"),t.data("jg.originalSrc",i),t.data("jg.src",i),t.data("jg.originalSrcLoc",e),i},n.prototype.imgFromEntry=function(t){t=t.find(this.settings.imgSelector);return 0===t.length?null:t},n.prototype.captionFromEntry=function(t){t=t.find("> .jg-caption");return 0===t.length?null:t},n.prototype.displayEntry=function(t,i,e,s,n,r){t.width(s),t.height(r),t.css("top",e),t.css("left",i);var o,a,h=this.imgFromEntry(t);null!==h?(h.css("width",s),h.css("height",n),h.css("margin-left",-s/2),h.css("margin-top",-n/2),(o=h.data("jg.src"))&&(o=this.newSrc(o,s,n,h[0]),h.one("error",function(){this.resetImgSrc(h)}),a=function(){h.attr("src",o)},"skipped"===t.data("jg.loaded")&&o?this.onImageEvent(o,function(){this.showImg(t,a),t.data("jg.loaded",!0)}.bind(this)):this.showImg(t,a))):this.showImg(t),this.displayEntryCaption(t)},n.prototype.displayEntryCaption=function(t){var i,e=this.imgFromEntry(t);null!==e&&this.settings.captions?(null===(i=this.captionFromEntry(t))&&(e=e.attr("alt"),this.isValidCaption(e)||(e=t.attr("title")),this.isValidCaption(e)&&(i=g('<div class="jg-caption">'+e+"</div>"),t.append(i),t.data("jg.createdCaption",!0))),null!==i&&(this.settings.cssAnimation||i.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity),this.addCaptionEventsHandlers(t))):this.removeCaptionEventsHandlers(t)},n.prototype.isValidCaption=function(t){return void 0!==t&&0<t.length},n.prototype.onEntryMouseEnterForCaption=function(t){t=this.captionFromEntry(g(t.currentTarget));this.settings.cssAnimation?t.addClass("jg-caption-visible").removeClass("jg-caption-hidden"):t.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.visibleOpacity)},n.prototype.onEntryMouseLeaveForCaption=function(t){t=this.captionFromEntry(g(t.currentTarget));this.settings.cssAnimation?t.removeClass("jg-caption-visible").removeClass("jg-caption-hidden"):t.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.nonVisibleOpacity)},n.prototype.addCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0===i&&(i={mouseenter:g.proxy(this.onEntryMouseEnterForCaption,this),mouseleave:g.proxy(this.onEntryMouseLeaveForCaption,this)},t.on("mouseenter",void 0,void 0,i.mouseenter),t.on("mouseleave",void 0,void 0,i.mouseleave),t.data("jg.captionMouseEvents",i))},n.prototype.removeCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0!==i&&(t.off("mouseenter",void 0,i.mouseenter),t.off("mouseleave",void 0,i.mouseleave),t.removeData("jg.captionMouseEvents"))},n.prototype.clearBuildingRow=function(){this.buildingRow.entriesBuff=[],this.buildingRow.aspectRatio=0,this.buildingRow.width=0},n.prototype.prepareBuildingRow=function(t,i){var e,s,n,r,o=!0,a=0,h=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,g=h/this.buildingRow.aspectRatio,l=this.settings.rowHeight,u=this.buildingRow.width/h>this.settings.justifyThreshold;if(i||t&&"hide"===this.settings.lastRow&&!u){for(e=0;e<this.buildingRow.entriesBuff.length;e++)s=this.buildingRow.entriesBuff[e],this.settings.cssAnimation?s.removeClass("jg-entry-visible"):(s.stop().fadeTo(0,.1),s.find("> img, > a > img").fadeTo(0,0));return-1}for(t&&!u&&"justify"!==this.settings.lastRow&&"hide"!==this.settings.lastRow&&(o=!1,0<this.rows&&(o=(l=(this.offY-this.border-this.settings.margins*this.rows)/this.rows)*this.buildingRow.aspectRatio/h>this.settings.justifyThreshold)),e=0;e<this.buildingRow.entriesBuff.length;e++)r=(s=this.buildingRow.entriesBuff[e]).data("jg.width")/s.data("jg.height"),r=o?(n=e===this.buildingRow.entriesBuff.length-1?h:g*r,g):(n=l*r,l),h-=Math.round(n),s.data("jg.jwidth",Math.round(n)),s.data("jg.jheight",Math.ceil(r)),(0===e||r<a)&&(a=r);return this.buildingRow.height=a,o},n.prototype.flushRow=function(t,i){var e,s=this.settings,n=this.border,r=this.prepareBuildingRow(t,i);if(i||t&&"hide"===s.lastRow&&-1===r)this.clearBuildingRow();else{if(this.maxRowHeight&&this.maxRowHeight<this.buildingRow.height&&(this.buildingRow.height=this.maxRowHeight),t&&("center"===s.lastRow||"right"===s.lastRow)){for(var o=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*s.margins,a=0;a<this.buildingRow.entriesBuff.length;a++)o-=(e=this.buildingRow.entriesBuff[a]).data("jg.jwidth");"center"===s.lastRow?n+=Math.round(o/2):"right"===s.lastRow&&(n+=o)}var h=this.buildingRow.entriesBuff.length-1;for(a=0;a<=h;a++)e=this.buildingRow.entriesBuff[this.settings.rtl?h-a:a],this.displayEntry(e,n,this.offY,e.data("jg.jwidth"),e.data("jg.jheight"),this.buildingRow.height),n+=e.data("jg.jwidth")+s.margins;this.galleryHeightToSet=this.offY+this.buildingRow.height+this.border,this.setGalleryTempHeight(this.galleryHeightToSet+this.getSpinnerHeight()),(!t||this.buildingRow.height<=s.rowHeight&&r)&&(this.offY+=this.buildingRow.height+s.margins,this.rows+=1,this.clearBuildingRow(),this.settings.triggerEvent.call(this,"jg.rowflush"))}};var i=0;n.prototype.rememberGalleryHeight=function(){i=this.$gallery.height(),this.$gallery.height(i)},n.prototype.setGalleryTempHeight=function(t){i=Math.max(t,i),this.$gallery.height(i)},n.prototype.setGalleryFinalHeight=function(t){i=t,this.$gallery.height(t)},n.prototype.checkWidth=function(){this.checkWidthIntervalId=setInterval(g.proxy(function(){var t;this.$gallery.is(":visible")&&(t=parseFloat(this.$gallery.width()),Math.abs(t-this.galleryWidth)>this.settings.refreshSensitivity&&(this.galleryWidth=t,this.rewind(),this.rememberGalleryHeight(),this.startImgAnalyzer(!0)))},this),this.settings.refreshTime)},n.prototype.isSpinnerActive=function(){return null!==this.spinner.intervalId},n.prototype.getSpinnerHeight=function(){return this.spinner.$el.innerHeight()},n.prototype.stopLoadingSpinnerAnimation=function(){clearInterval(this.spinner.intervalId),this.spinner.intervalId=null,this.setGalleryTempHeight(this.$gallery.height()-this.getSpinnerHeight()),this.spinner.$el.detach()},n.prototype.startLoadingSpinnerAnimation=function(){var t=this.spinner,i=t.$el.find("span");clearInterval(t.intervalId),this.$gallery.append(t.$el),this.setGalleryTempHeight(this.offY+this.buildingRow.height+this.getSpinnerHeight()),t.intervalId=setInterval(function(){t.phase<i.length?i.eq(t.phase).fadeTo(t.timeSlot,1):i.eq(t.phase-i.length).fadeTo(t.timeSlot,0),t.phase=(t.phase+1)%(2*i.length)},t.timeSlot)},n.prototype.rewind=function(){this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.offY=this.border,this.rows=0,this.clearBuildingRow()},n.prototype.getSelectorWithoutSpinner=function(){return this.settings.selector+", div:not(.jg-spinner)"},n.prototype.getAllEntries=function(){var t=this.getSelectorWithoutSpinner();return this.$gallery.children(t).toArray()},n.prototype.updateEntries=function(t){var i;return 0<(i=t&&null!=this.lastFetchedEntry?(i=this.getSelectorWithoutSpinner(),g(this.lastFetchedEntry).nextAll(i).toArray()):(this.entries=[],this.getAllEntries())).length&&(g.isFunction(this.settings.sort)?i=this.sortArray(i):this.settings.randomize&&(i=this.shuffleArray(i)),this.lastFetchedEntry=i[i.length-1],this.settings.filter?i=this.filterArray(i):this.resetFilters(i)),this.entries=this.entries.concat(i),!0},n.prototype.insertToGallery=function(t){var i=this;g.each(t,function(){g(this).appendTo(i.$gallery)})},n.prototype.shuffleArray=function(t){for(var i,e,s=t.length-1;0<s;s--)i=Math.floor(Math.random()*(s+1)),e=t[s],t[s]=t[i],t[i]=e;return this.insertToGallery(t),t},n.prototype.sortArray=function(t){return t.sort(this.settings.sort),this.insertToGallery(t),t},n.prototype.resetFilters=function(t){for(var i=0;i<t.length;i++)g(t[i]).removeClass("jg-filtered")},n.prototype.filterArray=function(t){var i=this.settings;if("string"===g.type(i.filter))return t.filter(function(t){t=g(t);return t.is(i.filter)?(t.removeClass("jg-filtered"),!0):(t.addClass("jg-filtered").removeClass("jg-visible"),!1)});if(g.isFunction(i.filter)){for(var e=t.filter(i.filter),s=0;s<t.length;s++)-1===e.indexOf(t[s])?g(t[s]).addClass("jg-filtered").removeClass("jg-visible"):g(t[s]).removeClass("jg-filtered");return e}},n.prototype.resetImgSrc=function(t){"src"===t.data("jg.originalSrcLoc")?t.attr("src",t.data("jg.originalSrc")):t.attr("src","")},n.prototype.destroy=function(){clearInterval(this.checkWidthIntervalId),this.stopImgAnalyzerStarter(),g.each(this.getAllEntries(),g.proxy(function(t,i){var e=g(i);e.css("width",""),e.css("height",""),e.css("top",""),e.css("left",""),e.data("jg.loaded",void 0),e.removeClass("jg-entry jg-filtered jg-entry-visible");i=this.imgFromEntry(e);i&&(i.css("width",""),i.css("height",""),i.css("margin-left",""),i.css("margin-top",""),this.resetImgSrc(i),i.data("jg.originalSrc",void 0),i.data("jg.originalSrcLoc",void 0),i.data("jg.src",void 0)),this.removeCaptionEventsHandlers(e);i=this.captionFromEntry(e);e.data("jg.createdCaption")?(e.data("jg.createdCaption",void 0),null!==i&&i.remove()):null!==i&&i.fadeTo(0,1)},this)),this.$gallery.css("height",""),this.$gallery.removeClass("justified-gallery"),this.$gallery.data("jg.controller",void 0),this.settings.triggerEvent.call(this,"jg.destroy")},n.prototype.analyzeImages=function(t){for(var i=this.lastAnalyzedIndex+1;i<this.entries.length;i++){var e=g(this.entries[i]);if(!0===e.data("jg.loaded")||"skipped"===e.data("jg.loaded")){var s=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,n=e.data("jg.width")/e.data("jg.height");if(this.buildingRow.entriesBuff.push(e),this.buildingRow.aspectRatio+=n,this.buildingRow.width+=n*this.settings.rowHeight,this.lastAnalyzedIndex=i,s/(this.buildingRow.aspectRatio+n)<this.settings.rowHeight&&(this.flushRow(!1,0<this.settings.maxRowsCount&&this.rows===this.settings.maxRowsCount),++this.yield.flushed>=this.yield.every))return void this.startImgAnalyzer(t)}else if("error"!==e.data("jg.loaded"))return}0<this.buildingRow.entriesBuff.length&&this.flushRow(!0,0<this.settings.maxRowsCount&&this.rows===this.settings.maxRowsCount),this.isSpinnerActive()&&this.stopLoadingSpinnerAnimation(),this.stopImgAnalyzerStarter(),this.setGalleryFinalHeight(this.galleryHeightToSet),this.settings.triggerEvent.call(this,t?"jg.resize":"jg.complete")},n.prototype.stopImgAnalyzerStarter=function(){this.yield.flushed=0,null!==this.imgAnalyzerTimeout&&(clearTimeout(this.imgAnalyzerTimeout),this.imgAnalyzerTimeout=null)},n.prototype.startImgAnalyzer=function(t){var i=this;this.stopImgAnalyzerStarter(),this.imgAnalyzerTimeout=setTimeout(function(){i.analyzeImages(t)},.001)},n.prototype.onImageEvent=function(t,i,e){var s,n;(i||e)&&(s=new Image,n=g(s),i&&n.one("load",function(){n.off("load error"),i(s)}),e&&n.one("error",function(){n.off("load error"),e(s)}),s.src=t)},n.prototype.init=function(){var o=!1,a=!1,h=this;g.each(this.entries,function(t,i){var e=g(i),s=h.imgFromEntry(e);if(e.addClass("jg-entry"),!0!==e.data("jg.loaded")&&"skipped"!==e.data("jg.loaded"))if(null!==h.settings.rel&&e.attr("rel",h.settings.rel),null!==h.settings.target&&e.attr("target",h.settings.target),null!==s){var n=h.extractImgSrcFromImage(s);if(!1===h.settings.waitThumbnailsLoad||!n){var r=parseFloat(s.attr("width")),i=parseFloat(s.attr("height"));if("svg"===s.prop("tagName")&&(r=parseFloat(s[0].getBBox().width),i=parseFloat(s[0].getBBox().height)),!isNaN(r)&&!isNaN(i))return e.data("jg.width",r),e.data("jg.height",i),e.data("jg.loaded","skipped"),a=!0,h.startImgAnalyzer(!1),!0}e.data("jg.loaded",!1),o=!0,h.isSpinnerActive()||h.startLoadingSpinnerAnimation(),h.onImageEvent(n,function(t){e.data("jg.width",t.width),e.data("jg.height",t.height),e.data("jg.loaded",!0),h.startImgAnalyzer(!1)},function(){e.data("jg.loaded","error"),h.startImgAnalyzer(!1)})}else e.data("jg.loaded",!0),e.data("jg.width",e.width()|parseFloat(e.css("width"))|1),e.data("jg.height",e.height()|parseFloat(e.css("height"))|1)}),o||a||this.startImgAnalyzer(!1),this.checkWidth()},n.prototype.checkOrConvertNumber=function(t,i){if("string"===g.type(t[i])&&(t[i]=parseFloat(t[i])),"number"!==g.type(t[i]))throw i+" must be a number";if(isNaN(t[i]))throw"invalid number for "+i},n.prototype.checkSizeRangesSuffixes=function(){if("object"!==g.type(this.settings.sizeRangeSuffixes))throw"sizeRangeSuffixes must be defined and must be an object";var t,i=[];for(t in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(t)&&i.push(t);for(var e={0:""},s=0;s<i.length;s++)if("string"===g.type(i[s]))try{e[parseInt(i[s].replace(/^[a-z]+/,""),10)]=this.settings.sizeRangeSuffixes[i[s]]}catch(t){throw"sizeRangeSuffixes keys must contains correct numbers ("+t+")"}else e[i[s]]=this.settings.sizeRangeSuffixes[i[s]];this.settings.sizeRangeSuffixes=e},n.prototype.retrieveMaxRowHeight=function(){var t=null,i=this.settings.rowHeight;if("string"===g.type(this.settings.maxRowHeight))t=this.settings.maxRowHeight.match(/^[0-9]+%$/)?i*parseFloat(this.settings.maxRowHeight.match(/^([0-9]+)%$/)[1])/100:parseFloat(this.settings.maxRowHeight);else{if("number"!==g.type(this.settings.maxRowHeight)){if(!1===this.settings.maxRowHeight||null==this.settings.maxRowHeight)return null;throw"maxRowHeight must be a number or a percentage"}t=this.settings.maxRowHeight}if(isNaN(t))throw"invalid number for maxRowHeight";return t<i&&(t=i),t},n.prototype.checkSettings=function(){this.checkSizeRangesSuffixes(),this.checkOrConvertNumber(this.settings,"rowHeight"),this.checkOrConvertNumber(this.settings,"margins"),this.checkOrConvertNumber(this.settings,"border"),this.checkOrConvertNumber(this.settings,"maxRowsCount");var t=["justify","nojustify","left","center","right","hide"];if(-1===t.indexOf(this.settings.lastRow))throw"lastRow must be one of: "+t.join(", ");if(this.checkOrConvertNumber(this.settings,"justifyThreshold"),this.settings.justifyThreshold<0||1<this.settings.justifyThreshold)throw"justifyThreshold must be in the interval [0,1]";if("boolean"!==g.type(this.settings.cssAnimation))throw"cssAnimation must be a boolean";if("boolean"!==g.type(this.settings.captions))throw"captions must be a boolean";if(this.checkOrConvertNumber(this.settings.captionSettings,"animationDuration"),this.checkOrConvertNumber(this.settings.captionSettings,"visibleOpacity"),this.settings.captionSettings.visibleOpacity<0||1<this.settings.captionSettings.visibleOpacity)throw"captionSettings.visibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings.captionSettings,"nonVisibleOpacity"),this.settings.captionSettings.nonVisibleOpacity<0||1<this.settings.captionSettings.nonVisibleOpacity)throw"captionSettings.nonVisibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings,"imagesAnimationDuration"),this.checkOrConvertNumber(this.settings,"refreshTime"),this.checkOrConvertNumber(this.settings,"refreshSensitivity"),"boolean"!==g.type(this.settings.randomize))throw"randomize must be a boolean";if("string"!==g.type(this.settings.selector))throw"selector must be a string";if(!1!==this.settings.sort&&!g.isFunction(this.settings.sort))throw"sort must be false or a comparison function";if(!1!==this.settings.filter&&!g.isFunction(this.settings.filter)&&"string"!==g.type(this.settings.filter))throw"filter must be false, a string or a filter function"},n.prototype.retrieveSuffixRanges=function(){var t,i=[];for(t in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(t)&&i.push(parseInt(t,10));return i.sort(function(t,i){return i<t?1:t<i?-1:0}),i},n.prototype.updateSettings=function(t){this.settings=g.extend({},this.settings,t),this.checkSettings(),this.border=0<=this.settings.border?this.settings.border:this.settings.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges()},n.prototype.defaults={sizeRangeSuffixes:{},thumbnailPath:void 0,rowHeight:120,maxRowHeight:!1,maxRowsCount:0,margins:1,border:-1,lastRow:"nojustify",justifyThreshold:.9,waitThumbnailsLoad:!0,captions:!0,cssAnimation:!0,imagesAnimationDuration:500,captionSettings:{animationDuration:500,visibleOpacity:.7,nonVisibleOpacity:0},rel:null,target:null,extension:/\.[^.\\/]+$/,refreshTime:200,refreshSensitivity:0,randomize:!1,rtl:!1,sort:!1,filter:!1,selector:"a",imgSelector:"> img, > a > img, > svg, > a > svg",triggerEvent:function(t){this.$gallery.trigger(t)}},g.fn.justifiedGallery=function(s){return this.each(function(t,i){var e=g(i);e.addClass("justified-gallery");i=e.data("jg.controller");if(void 0===i){if(null!=s&&"object"!==g.type(s)){if("destroy"===s)return;throw"The argument must be an object"}i=new n(e,g.extend({},n.prototype.defaults,s)),e.data("jg.controller",i)}else if("norewind"!==s){if("destroy"===s)return void i.destroy();i.updateSettings(s),i.rewind()}i.updateEntries("norewind"===s)&&i.init()})}});
2
+ function tg_getURLParameter(t){return decodeURIComponent((new RegExp("[?|&]"+t+"=([^&;]+?)(&|#|;|$)").exec(location.search)||[,""])[1].replace(/\+/g,"%20"))||null}function modulaInViewport(t){"function"==typeof jQuery&&t instanceof jQuery&&(t=t[0]);t=t.getBoundingClientRect();return t.top-jQuery(window).height()<=-100&&-400<=t.top-jQuery(window).height()||t.bottom<=jQuery(window).height()}jQuery(document).on("vc-full-width-row-single vc-full-width-row",function(t,i){0<jQuery("body").find(".modula").length&&jQuery(window).trigger("modula-update")}),jQuery(window).on("elementor/frontend/init",function(){window.elementorFrontend&&window.elementorFrontend.hooks.addAction("frontend/element_ready/global",function(t){jQuery("body").find(".modula").length})}),function(u,s,a,t){var n="modulaGallery",e={resizer:"/",keepArea:!0,type:"creative-gallery",columns:12,gutter:10,desktopGutter:10,mobileGutter:10,tabletGutter:10,enableTwitter:!1,enableFacebook:!1,enableWhatsapp:!1,enablePinterest:!1,enableLinkedin:!1,enableEmail:!1,lazyLoad:0,initLightbox:!1,lightbox:"fancybox",lightboxOpts:{},inView:!1};function h(t,i){this.element=t,this.$element=u(t),this.$itemsCnt=this.$element.find(".modula-items"),this.$items=this.$itemsCnt.find(".modula-item"),this.options=u.extend({},e,i),this._defaults=e,this._name=n,this.tiles=[],this.$tilesCnt=null,this.completed=!1,this.lastWidth=0,this.resizeTO=0,this.isIsotope=!1,this.isLazyLoaded=!0,this.init()}h.prototype.init=function(){var i=this,t=a.documentElement.clientWidth;this.options.gutter=t<=568?this.options.mobileGutter:t<=768?this.options.tabletGutter:this.options.desktopGutter,u(a).trigger("modula_api_before_init",[i]),"custom-grid"===this.options.type?this.createCustomGallery():"creative-gallery"==this.options.type?this.createGrid():"grid"==this.options.type&&("automatic"==this.options.grid_type?this.createAutoGrid():this.createColumnsGrid()),"custom-grid"===this.options.type&&u(s).height()<u("html").height()&&i.onResize(i),u(s).resize(function(){i.onResize(i)}),u(s).on("modula-update",function(){i.onResize(i)}),u(a).on("lazyloaded",function(t){t=u(t.target);"modula"==t.data("source")&&(t.data("size",{width:t.width(),height:t.height()}),(t=t.parents(".modula-item")).addClass("tg-loaded"),t=i.$items.not(".jtg-hidden").index(t),i.placeImage(t),i.isIsotope&&i.$itemsCnt.modulaisotope("layout"),"grid"==i.options.type&&"automatic"==i.options.grid_type&&i.$itemsCnt.justifiedGallery())}),i.options.inView&&jQuery(s).on("DOMContentLoaded load resize scroll",function(){modulaInViewport(i.$element)&&i.$element.addClass("modula-loaded-scale")}),this.setupSocial(),jQuery(i.$element).addClass("modula-gallery-initialized"),this.options.onComplete&&this.options.onComplete(),"fancybox"!=i.options.lightbox||i.options.initLightbox||this.initLightbox(),u(a).trigger("modula_api_after_init",[i])},h.prototype.initLightbox=function(){var e=this;e.$element.on("click",".modula-item-link:not( .modula-simple-link )",function(t){t.preventDefault();var i=u.map(e.$items,function(t){var i=jQuery(t).find(".modula-item-link:not( .modula-simple-link )"),t=jQuery(t).find(".pic");return{src:i.attr("href"),opts:{$thumb:t.parents(".modula-item"),caption:i.data("caption"),alt:t.attr("alt"),image_id:i.attr("data-image-id")}}}),t=e.$items.index(jQuery(this).parents(".modula-item"));jQuery.modulaFancybox.open(i,e.options.lightboxOpts,t)})},h.prototype.trunc=function(t){return Math.trunc?Math.trunc(t):(t=+t,isFinite(t)?t-t%1||(t<0?-0:0===t?t:0):t)},h.prototype.createCustomGallery=function(){var h,r=this,t=this.$element.find(".modula-items").width(),l=this,d=this.options.columns,i=a.documentElement.clientWidth;"1"==this.options.enableResponsive&&(i<=568?d=this.options.mobileColumns:i<=768&&(d=this.options.tabletColumns)),h=0<this.options.gutter?(t-this.options.gutter*(d-1))/d:Math.floor(t/d*1e3)/1e3,this.$items.not(".jtg-hidden").each(function(t,i){var e,o,n={},s=u(i).data("width"),a=u(i).data("height");12<s&&(s=12),"1"==l.options.enableResponsive&&(e=s,o=a,1==d?a=(s=1)*o/e:((s=Math.round(d*e/12))<1&&(s=1),(a=Math.round(s*o/e))<1&&(a=1))),n.width=h*s+l.options.gutter*(s-1),n.height=Math.round(h)*a+l.options.gutter*(a-1),u(i).data("size",n).addClass("tiled").addClass(n.width>n.height?"tile-h":"tile-v").data("position"),u(i).css(u(i).data("size")),u(i).find(".figc").css({width:u(i).data("size").width,height:u(i).data("size").height}),r.loadImage(t)});t={itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(l.options.gutter)}};this.$itemsCnt.modulaisotope(t),this.isIsotope=!0},h.prototype.createGrid=function(){var o=this;this.$itemsCnt.data("area",this.$itemsCnt.width()*this.options.height),this.lastWidth=this.$itemsCnt.width();for(var t,i=0;i<this.$items.not(".jtg-hidden").length;i++)this.tiles.push(o.getSlot());this.tiles.sort(function(t,i){return t.position-i.position}),this.$items.not(".jtg-hidden").each(function(t,i){var e=o.tiles[t];u(i).data("size",e),u(i).addClass("tiled").addClass(e.width>e.height?"tile-h":"tile-v").data("position"),u(i).css({width:e.width,height:e.height}),u(i).find(".figc").css({width:e.width,height:e.height}),o.loadImage(t)}),this.isIsotope||(t={resizesContainer:!1,itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(o.options.gutter)}},this.$itemsCnt.modulaisotope(t),this.isIsotope=!0)},h.prototype.createAutoGrid=function(){this.$itemsCnt.justifiedGallery({rowHeight:this.options.rowHeight,margins:this.options.gutter,lastRow:this.options.lastRow,captions:!1,border:0,imgSelector:".pic",cssAnimation:!0,imagesAnimationDuration:700})},h.prototype.createColumnsGrid=function(){var e=this;this.$itemsCnt.modulaisotope({itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(this.options.gutter)}}),this.$items.each(function(t,i){e.loadImage(t)}),this.isIsotope=!0},h.prototype.getSlot=function(){if(0==this.tiles.length)return o={top:0,left:0,width:this.$itemsCnt.width(),height:this.options.height,area:this.$itemsCnt.width()*this.options.height,position:0};for(var t=0,i=0;i<this.tiles.length;i++)(o=this.tiles[i]).area>this.tiles[t].area&&(t=i);var e,o={},n=this.tiles[t];return(o=n.width>n.height?(e=n.width/2*this.options.randomFactor,n.prevWidth=n.width,n.width=Math.floor(n.width/2+e*(Math.random()-.5)),{top:n.top,left:n.left+n.width+this.options.gutter,width:n.prevWidth-n.width-this.options.gutter,height:n.height}):(e=n.height/2*this.options.randomFactor,n.prevHeight=n.height,n.height=Math.floor(n.height/2+e*(Math.random()-.5)),{left:n.left,top:n.top+n.height+this.options.gutter,width:n.width,height:n.prevHeight-n.height-this.options.gutter})).area=o.width*o.height,o.position=1e3*o.top+o.left,n.position=1e3*n.top+n.left,this.tiles[t]=n,this.tiles[t].area=n.width*n.height,o},h.prototype.reset=function(){this.tiles=[],"custom-grid"===this.options.type?this.createCustomGallery():"creative-gallery"==this.options.type?this.createGrid():"grid"==this.options.type&&("automatic"==this.options.grid_type?this.createAutoGrid():this.createColumnsGrid()),this.lastWidth=this.$itemsCnt.width(),u(a).trigger("modula_api_reset",[this])},h.prototype.onResize=function(i){var t;i.lastWidth!=i.$itemsCnt.width()&&(t=a.documentElement.clientWidth,i.options.gutter=t<=568?i.options.mobileGutter:t<=768?i.options.tabletGutter:this.options.desktopGutter,clearTimeout(i.resizeTO),i.resizeTO=setTimeout(function(){var t;i.options.keepArea&&(t=i.$itemsCnt.data("area"),i.$itemsCnt.height(t/i.$itemsCnt.width())),i.reset(),i.isIsotope&&i.$itemsCnt.modulaisotope({packery:{gutter:parseInt(i.options.gutter)}}).modulaisotope("layout")},100))},h.prototype.loadImage=function(t){var i,e,o=this,n=o.$items.not(".jtg-hidden").eq(t).find(".pic");"0"==o.options.lazyLoad?((e=new Image).onload=function(){i={width:this.width,height:this.height},n.data("size",i),o.placeImage(t)},"undefined"!=n.attr("src")?e.src=n.attr("src"):e.src=n.data("src")):o.placeImage(t)},h.prototype.placeImage=function(t){if("grid"!=this.options.type){var i=this.$items.not(".jtg-hidden").eq(t),e=i.find(".pic"),o=i.data("size"),n=e.data("size");if(void 0!==o&&void 0!==n){o.width,o.height;var s=n.width/n.height,a=e.data("valign")?e.data("valign"):"middle",h=e.data("halign")?e.data("halign"):"center",i={top:"auto",bottom:"auto",left:"auto",right:"auto",width:"auto",height:"auto",margin:"0",maxWidth:"999em"};if(o.width*n.height/n.width>o.height)switch(i.width=o.width,i.left=0,a){case"top":i.top=0;break;case"middle":i.top=0-(o.width*(1/s)-o.height)/2;break;case"bottom":i.bottom=0}else switch(i.height=o.height,i.top=0,h){case"left":i.left=0;break;case"center":i.left=0-(o.height*s-o.width)/2;break;case"right":i.right=0}e.css(i),this.$items.not(".jtg-hidden").eq(t).addClass("tg-loaded")}}},h.prototype.setupSocial=function(){this.options.enableTwitter&&i(this.$items,this),this.options.enableFacebook&&o(this.$items,this),this.options.enablePinterest&&l(this.$items,this),this.options.enableLinkedin&&d(this.$items,this),this.options.enableWhatsapp&&r(this.$items,this),this.options.enableEmail&&p(this.$items,this)},h.prototype.destroy=function(){this.isPackeryActive&&(this.$itemsCnt.packery("destroy"),this.isPackeryActive=!1)};var i=function(t,i){t.find(".modula-icon-twitter").click(function(t){t.preventDefault();var i=u(this).parents(".modula-item").find("img.pic"),e=i.data("caption"),o=i.data("full"),t=i.attr("title"),i=a.title;return 0<t.length?i=u.trim(t):0<e.length&&(i=u.trim(e)),s.open("https://twitter.com/intent/tweet?url="+encodeURI(o)+"&text="+encodeURI(i),"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},o=function(t,i){t.find(".modula-icon-facebook").click(function(t){t.preventDefault();t="//www.facebook.com/sharer.php?u="+u(this).parents(".modula-item").find("img.pic").attr("data-full");return s.open(t,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},r=function(t,i){t.find(".modula-icon-whatsapp").click(function(t){t.preventDefault();t=u(this).parents(".modula-item").find("img.pic").attr("data-full");return s.open("https://api.whatsapp.com/send?text="+encodeURI(t)+"&preview_url=true","ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},l=function(t,i){t.find(".modula-icon-pinterest").click(function(t){t.preventDefault();var i=u(this).parents(".modula-item").find("img.pic"),e=i.data("full"),o=i.data("caption"),n=i.attr("title"),t=a.title;0<n.length?t=u.trim(n):0<o.length&&(t=u.trim(o));e="http://pinterest.com/pin/create/button/?url="+encodeURI(e)+"&description="+encodeURI(t);return 1<=i.length&&(t=i.attr("data-full"),e+="&media="+(i=t,(t=a.createElement("img")).src=i,i=t.src,t.src=null,i)),s.open(e,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},d=function(t,i){t.find(".modula-icon-linkedin").click(function(t){t.preventDefault();t=u(this).parents(".modula-item").find("img.pic").attr("data-full"),t="//linkedin.com/shareArticle?mini=true&url="+encodeURI(t);return s.open(t,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},p=function(t,n){t.find(".modula-icon-email").click(function(t){var i=encodeURI(n.options.email_subject),e=jQuery(".modula-icon-email").parents(".modula-item").find("img.pic").attr("data-full"),o=location.href,o="mailto:?subject="+i+"&body="+encodeURI(n.options.email_message.replace(/%%image_link%%/g,e).replace(/%%gallery_link%%/g,o));return s.open(o,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})};u.fn[n]=function(i){var e,o=arguments;return i===t||"object"==typeof i?this.each(function(){u.data(this,"plugin_"+n)||u.data(this,"plugin_"+n,new h(this,i))}):"string"==typeof i&&"_"!==i[0]&&"init"!==i?(this.each(function(){var t=u.data(this,"plugin_"+n);t instanceof h&&"function"==typeof t[i]&&(e=t[i].apply(t,Array.prototype.slice.call(o,1))),"destroy"===i&&u.data(this,"plugin_"+n,null)}),e!==t?e:this):void 0}}(jQuery,window,document),jQuery(document).ready(function(){var t=jQuery(".modula.modula-gallery");jQuery.each(t,function(){var t=jQuery(this).data("config");jQuery(this).modulaGallery(t)})});
assets/js/modula-justified-wl.js CHANGED
@@ -1,3 +1,3 @@
1
- !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(i),i}:e(jQuery)}(function(l){function n(t,i){this.settings=i,this.checkSettings(),this.imgAnalyzerTimeout=null,this.entries=null,this.buildingRow={entriesBuff:[],width:0,height:0,aspectRatio:0},this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.yield={every:2,flushed:0},this.border=0<=i.border?i.border:i.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges(),this.offY=this.border,this.rows=0,this.spinner={phase:0,timeSlot:150,$el:l('<div class="spinner"><span></span><span></span><span></span></div>'),intervalId:null},this.scrollBarOn=!1,this.checkWidthIntervalId=null,this.galleryWidth=t.width(),this.$gallery=t}n.prototype.getSuffix=function(t,i){for(var e=i<t?t:i,s=0;s<this.suffixRanges.length;s++)if(e<=this.suffixRanges[s])return this.settings.sizeRangeSuffixes[this.suffixRanges[s]];return this.settings.sizeRangeSuffixes[this.suffixRanges[s-1]]},n.prototype.removeSuffix=function(t,i){return t.substring(0,t.length-i.length)},n.prototype.endsWith=function(t,i){return-1!==t.indexOf(i,t.length-i.length)},n.prototype.getUsedSuffix=function(t){for(var i in this.settings.sizeRangeSuffixes)if(this.settings.sizeRangeSuffixes.hasOwnProperty(i)&&0!==this.settings.sizeRangeSuffixes[i].length&&this.endsWith(t,this.settings.sizeRangeSuffixes[i]))return this.settings.sizeRangeSuffixes[i];return""},n.prototype.newSrc=function(t,i,e,s){var n;return this.settings.thumbnailPath?n=this.settings.thumbnailPath(t,i,e,s):(s=null!==(s=t.match(this.settings.extension))?s[0]:"",n=t.replace(this.settings.extension,""),n=this.removeSuffix(n,this.getUsedSuffix(n)),n+=this.getSuffix(i,e)+s),n},n.prototype.showImg=function(t,i){this.settings.cssAnimation?(t.addClass("entry-visible"),i&&i()):(t.stop().fadeTo(this.settings.imagesAnimationDuration,1,i),t.find(this.settings.imgSelector).stop().fadeTo(this.settings.imagesAnimationDuration,1,i))},n.prototype.extractImgSrcFromImage=function(t){var i=void 0!==t.data("safe-src")?t.data("safe-src"):t.attr("src");return t.data("jg.originalSrc",i),i},n.prototype.imgFromEntry=function(t){t=t.find(this.settings.imgSelector);return 0===t.length?null:t},n.prototype.captionFromEntry=function(t){t=t.find("> .caption");return 0===t.length?null:t},n.prototype.displayEntry=function(t,i,e,s,n,r){t.width(s),t.height(r),t.css("top",e),t.css("left",i);var o,a,h,g=this.imgFromEntry(t);null!==g?(g.css("width",s),g.css("height",n),g.css("margin-left",-s/2),g.css("margin-top",-n/2),o=g.attr("src"),a=this.newSrc(o,s,n,g[0]),g.one("error",function(){g.attr("src",g.data("jg.originalSrc"))}),h=function(){o!==a&&g.attr("src",a)},"skipped"===t.data("jg.loaded")?this.onImageEvent(o,l.proxy(function(){this.showImg(t,h),t.data("jg.loaded",!0)},this)):this.showImg(t,h)):this.showImg(t),this.displayEntryCaption(t)},n.prototype.displayEntryCaption=function(t){var i,e=this.imgFromEntry(t);null!==e&&this.settings.captions?(null===(i=this.captionFromEntry(t))&&(e=e.attr("alt"),this.isValidCaption(e)||(e=t.attr("title")),this.isValidCaption(e)&&(i=l('<div class="caption">'+e+"</div>"),t.append(i),t.data("jg.createdCaption",!0))),null!==i&&(this.settings.cssAnimation||i.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity),this.addCaptionEventsHandlers(t))):this.removeCaptionEventsHandlers(t)},n.prototype.isValidCaption=function(t){return void 0!==t&&0<t.length},n.prototype.onEntryMouseEnterForCaption=function(t){t=this.captionFromEntry(l(t.currentTarget));this.settings.cssAnimation?t.addClass("caption-visible").removeClass("caption-hidden"):t.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.visibleOpacity)},n.prototype.onEntryMouseLeaveForCaption=function(t){t=this.captionFromEntry(l(t.currentTarget));this.settings.cssAnimation?t.removeClass("caption-visible").removeClass("caption-hidden"):t.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.nonVisibleOpacity)},n.prototype.addCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0===i&&(i={mouseenter:l.proxy(this.onEntryMouseEnterForCaption,this),mouseleave:l.proxy(this.onEntryMouseLeaveForCaption,this)},t.on("mouseenter",void 0,void 0,i.mouseenter),t.on("mouseleave",void 0,void 0,i.mouseleave),t.data("jg.captionMouseEvents",i))},n.prototype.removeCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0!==i&&(t.off("mouseenter",void 0,i.mouseenter),t.off("mouseleave",void 0,i.mouseleave),t.removeData("jg.captionMouseEvents"))},n.prototype.clearBuildingRow=function(){this.buildingRow.entriesBuff=[],this.buildingRow.aspectRatio=0,this.buildingRow.width=0},n.prototype.prepareBuildingRow=function(t){var i,e,s,n,r=!0,o=0,a=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,h=a/this.buildingRow.aspectRatio,g=this.settings.rowHeight,l=this.buildingRow.width/a>this.settings.justifyThreshold;if(t&&"hide"===this.settings.lastRow&&!l){for(i=0;i<this.buildingRow.entriesBuff.length;i++)e=this.buildingRow.entriesBuff[i],this.settings.cssAnimation?e.removeClass("entry-visible"):(e.stop().fadeTo(0,.1),e.find("> img, > a > img").fadeTo(0,0));return-1}for(t&&!l&&"justify"!==this.settings.lastRow&&"hide"!==this.settings.lastRow&&(r=!1,0<this.rows&&(r=(g=(this.offY-this.border-this.settings.margins*this.rows)/this.rows)*this.buildingRow.aspectRatio/a>this.settings.justifyThreshold)),i=0;i<this.buildingRow.entriesBuff.length;i++)n=(e=this.buildingRow.entriesBuff[i]).data("jg.width")/e.data("jg.height"),n=r?(s=i===this.buildingRow.entriesBuff.length-1?a:h*n,h):(s=g*n,g),a-=Math.round(s),e.data("jg.jwidth",Math.round(s)),e.data("jg.jheight",Math.ceil(n)),(0===i||n<o)&&(o=n);return this.buildingRow.height=o,r},n.prototype.flushRow=function(t){var i,e=this.settings,s=this.border,n=this.prepareBuildingRow(t);if(t&&"hide"===e.lastRow&&-1===n)this.clearBuildingRow();else{if(this.maxRowHeight&&this.maxRowHeight<this.buildingRow.height&&(this.buildingRow.height=this.maxRowHeight),t&&("center"===e.lastRow||"right"===e.lastRow)){for(var r=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*e.margins,o=0;o<this.buildingRow.entriesBuff.length;o++)r-=(i=this.buildingRow.entriesBuff[o]).data("jg.jwidth");"center"===e.lastRow?s+=r/2:"right"===e.lastRow&&(s+=r)}var a=this.buildingRow.entriesBuff.length-1;for(o=0;o<=a;o++)i=this.buildingRow.entriesBuff[this.settings.rtl?a-o:o],this.displayEntry(i,s,this.offY,i.data("jg.jwidth"),i.data("jg.jheight"),this.buildingRow.height),s+=i.data("jg.jwidth")+e.margins;this.galleryHeightToSet=this.offY+this.buildingRow.height+this.border,this.setGalleryTempHeight(this.galleryHeightToSet+this.getSpinnerHeight()),(!t||this.buildingRow.height<=e.rowHeight&&n)&&(this.offY+=this.buildingRow.height+e.margins,this.rows+=1,this.clearBuildingRow(),this.settings.triggerEvent.call(this,"jg.rowflush"))}};var i=0;function e(){return l("body").height()>l(window).height()}n.prototype.rememberGalleryHeight=function(){i=this.$gallery.height(),this.$gallery.height(i)},n.prototype.setGalleryTempHeight=function(t){i=Math.max(t,i),this.$gallery.height(i)},n.prototype.setGalleryFinalHeight=function(t){i=t,this.$gallery.height(t)},n.prototype.checkWidth=function(){this.checkWidthIntervalId=setInterval(l.proxy(function(){var t;this.$gallery.is(":visible")&&(t=parseFloat(this.$gallery.width()),e()===this.scrollBarOn?Math.abs(t-this.galleryWidth)>this.settings.refreshSensitivity&&(this.galleryWidth=t,this.rewind(),this.rememberGalleryHeight(),this.startImgAnalyzer(!0)):(this.scrollBarOn=e(),this.galleryWidth=t))},this),this.settings.refreshTime)},n.prototype.isSpinnerActive=function(){return null!==this.spinner.intervalId},n.prototype.getSpinnerHeight=function(){return this.spinner.$el.innerHeight()},n.prototype.stopLoadingSpinnerAnimation=function(){clearInterval(this.spinner.intervalId),this.spinner.intervalId=null,this.setGalleryTempHeight(this.$gallery.height()-this.getSpinnerHeight()),this.spinner.$el.detach()},n.prototype.startLoadingSpinnerAnimation=function(){var t=this.spinner,i=t.$el.find("span");clearInterval(t.intervalId),this.$gallery.append(t.$el),this.setGalleryTempHeight(this.offY+this.buildingRow.height+this.getSpinnerHeight()),t.intervalId=setInterval(function(){t.phase<i.length?i.eq(t.phase).fadeTo(t.timeSlot,1):i.eq(t.phase-i.length).fadeTo(t.timeSlot,0),t.phase=(t.phase+1)%(2*i.length)},t.timeSlot)},n.prototype.rewind=function(){this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.offY=this.border,this.rows=0,this.clearBuildingRow()},n.prototype.updateEntries=function(t){t=t&&null!=this.lastFetchedEntry?l(this.lastFetchedEntry).nextAll(this.settings.selector).toArray():(this.entries=[],this.$gallery.children(this.settings.selector).toArray());return 0<t.length&&(l.isFunction(this.settings.sort)?t=this.sortArray(t):this.settings.randomize&&(t=this.shuffleArray(t)),this.lastFetchedEntry=t[t.length-1],this.settings.filter?t=this.filterArray(t):this.resetFilters(t)),this.entries=this.entries.concat(t),!0},n.prototype.insertToGallery=function(t){var i=this;l.each(t,function(){l(this).appendTo(i.$gallery)})},n.prototype.shuffleArray=function(t){for(var i,e,s=t.length-1;0<s;s--)i=Math.floor(Math.random()*(s+1)),e=t[s],t[s]=t[i],t[i]=e;return this.insertToGallery(t),t},n.prototype.sortArray=function(t){return t.sort(this.settings.sort),this.insertToGallery(t),t},n.prototype.resetFilters=function(t){for(var i=0;i<t.length;i++)l(t[i]).removeClass("jg-filtered")},n.prototype.filterArray=function(t){var i=this.settings;if("string"===l.type(i.filter))return t.filter(function(t){t=l(t);return t.is(i.filter)?(t.removeClass("jg-filtered"),!0):(t.addClass("jg-filtered").removeClass("jg-visible"),!1)});if(l.isFunction(i.filter)){for(var e=t.filter(i.filter),s=0;s<t.length;s++)-1===e.indexOf(t[s])?l(t[s]).addClass("jg-filtered").removeClass("jg-visible"):l(t[s]).removeClass("jg-filtered");return e}},n.prototype.destroy=function(){clearInterval(this.checkWidthIntervalId),l.each(this.entries,l.proxy(function(t,i){var e=l(i);e.css("width",""),e.css("height",""),e.css("top",""),e.css("left",""),e.data("jg.loaded",void 0),e.removeClass("jg-entry");i=this.imgFromEntry(e);i.css("width",""),i.css("height",""),i.css("margin-left",""),i.css("margin-top",""),i.attr("src",i.data("jg.originalSrc")),i.data("jg.originalSrc",void 0),this.removeCaptionEventsHandlers(e);i=this.captionFromEntry(e);e.data("jg.createdCaption")?(e.data("jg.createdCaption",void 0),null!==i&&i.remove()):null!==i&&i.fadeTo(0,1)},this)),this.$gallery.css("height",""),this.$gallery.removeClass("justified-gallery"),this.$gallery.data("jg.controller",void 0)},n.prototype.analyzeImages=function(t){for(var i=this.lastAnalyzedIndex+1;i<this.entries.length;i++){var e=l(this.entries[i]);if(!0===e.data("jg.loaded")||"skipped"===e.data("jg.loaded")){var s=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,n=e.data("jg.width")/e.data("jg.height");if(s/(this.buildingRow.aspectRatio+n)<this.settings.rowHeight&&(this.flushRow(!1),++this.yield.flushed>=this.yield.every))return void this.startImgAnalyzer(t);this.buildingRow.entriesBuff.push(e),this.buildingRow.aspectRatio+=n,this.buildingRow.width+=n*this.settings.rowHeight,this.lastAnalyzedIndex=i}else if("error"!==e.data("jg.loaded"))return}0<this.buildingRow.entriesBuff.length&&this.flushRow(!0),this.isSpinnerActive()&&this.stopLoadingSpinnerAnimation(),this.stopImgAnalyzerStarter(),this.settings.triggerEvent.call(this,t?"jg.resize":"jg.complete"),this.setGalleryFinalHeight(this.galleryHeightToSet)},n.prototype.stopImgAnalyzerStarter=function(){this.yield.flushed=0,null!==this.imgAnalyzerTimeout&&(clearTimeout(this.imgAnalyzerTimeout),this.imgAnalyzerTimeout=null)},n.prototype.startImgAnalyzer=function(t){var i=this;this.stopImgAnalyzerStarter(),this.imgAnalyzerTimeout=setTimeout(function(){i.analyzeImages(t)},.001)},n.prototype.onImageEvent=function(t,i,e){var s,n;(i||e)&&(s=new Image,n=l(s),i&&n.one("load",function(){n.off("load error"),i(s)}),e&&n.one("error",function(){n.off("load error"),e(s)}),s.src=t)},n.prototype.init=function(){var r=!1,o=!1,a=this;l.each(this.entries,function(t,i){var e=l(i),s=a.imgFromEntry(e);if(e.addClass("jg-entry"),!0!==e.data("jg.loaded")&&"skipped"!==e.data("jg.loaded"))if(null!==a.settings.rel&&e.attr("rel",a.settings.rel),null!==a.settings.target&&e.attr("target",a.settings.target),null!==s){var n=a.extractImgSrcFromImage(s);if(s.attr("src",n),!1===a.settings.waitThumbnailsLoad){i=parseFloat(s.prop("width")),s=parseFloat(s.prop("height"));if(!isNaN(i)&&!isNaN(s))return e.data("jg.width",i),e.data("jg.height",s),e.data("jg.loaded","skipped"),o=!0,a.startImgAnalyzer(!1),!0}e.data("jg.loaded",!1),r=!0,a.isSpinnerActive()||a.startLoadingSpinnerAnimation(),a.onImageEvent(n,function(t){e.data("jg.width",t.width),e.data("jg.height",t.height),e.data("jg.loaded",!0),a.startImgAnalyzer(!1)},function(){e.data("jg.loaded","error"),a.startImgAnalyzer(!1)})}else e.data("jg.loaded",!0),e.data("jg.width",e.width()|parseFloat(e.css("width"))|1),e.data("jg.height",e.height()|parseFloat(e.css("height"))|1)}),r||o||this.startImgAnalyzer(!1),this.checkWidth()},n.prototype.checkOrConvertNumber=function(t,i){if("string"===l.type(t[i])&&(t[i]=parseFloat(t[i])),"number"!==l.type(t[i]))throw i+" must be a number";if(isNaN(t[i]))throw"invalid number for "+i},n.prototype.checkSizeRangesSuffixes=function(){if("object"!==l.type(this.settings.sizeRangeSuffixes))throw"sizeRangeSuffixes must be defined and must be an object";var t,i=[];for(t in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(t)&&i.push(t);for(var e={0:""},s=0;s<i.length;s++)if("string"===l.type(i[s]))try{e[parseInt(i[s].replace(/^[a-z]+/,""),10)]=this.settings.sizeRangeSuffixes[i[s]]}catch(t){throw"sizeRangeSuffixes keys must contains correct numbers ("+t+")"}else e[i[s]]=this.settings.sizeRangeSuffixes[i[s]];this.settings.sizeRangeSuffixes=e},n.prototype.retrieveMaxRowHeight=function(){var t=null,i=this.settings.rowHeight;if("string"===l.type(this.settings.maxRowHeight))t=this.settings.maxRowHeight.match(/^[0-9]+%$/)?i*parseFloat(this.settings.maxRowHeight.match(/^([0-9]+)%$/)[1])/100:parseFloat(this.settings.maxRowHeight);else{if("number"!==l.type(this.settings.maxRowHeight)){if(!1===this.settings.maxRowHeight||null==this.settings.maxRowHeight)return null;throw"maxRowHeight must be a number or a percentage"}t=this.settings.maxRowHeight}if(isNaN(t))throw"invalid number for maxRowHeight";return t<i&&(t=i),t},n.prototype.checkSettings=function(){this.checkSizeRangesSuffixes(),this.checkOrConvertNumber(this.settings,"rowHeight"),this.checkOrConvertNumber(this.settings,"margins"),this.checkOrConvertNumber(this.settings,"border");var t=["justify","nojustify","left","center","right","hide"];if(-1===t.indexOf(this.settings.lastRow))throw"lastRow must be one of: "+t.join(", ");if(this.checkOrConvertNumber(this.settings,"justifyThreshold"),this.settings.justifyThreshold<0||1<this.settings.justifyThreshold)throw"justifyThreshold must be in the interval [0,1]";if("boolean"!==l.type(this.settings.cssAnimation))throw"cssAnimation must be a boolean";if("boolean"!==l.type(this.settings.captions))throw"captions must be a boolean";if(this.checkOrConvertNumber(this.settings.captionSettings,"animationDuration"),this.checkOrConvertNumber(this.settings.captionSettings,"visibleOpacity"),this.settings.captionSettings.visibleOpacity<0||1<this.settings.captionSettings.visibleOpacity)throw"captionSettings.visibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings.captionSettings,"nonVisibleOpacity"),this.settings.captionSettings.nonVisibleOpacity<0||1<this.settings.captionSettings.nonVisibleOpacity)throw"captionSettings.nonVisibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings,"imagesAnimationDuration"),this.checkOrConvertNumber(this.settings,"refreshTime"),this.checkOrConvertNumber(this.settings,"refreshSensitivity"),"boolean"!==l.type(this.settings.randomize))throw"randomize must be a boolean";if("string"!==l.type(this.settings.selector))throw"selector must be a string";if(!1!==this.settings.sort&&!l.isFunction(this.settings.sort))throw"sort must be false or a comparison function";if(!1!==this.settings.filter&&!l.isFunction(this.settings.filter)&&"string"!==l.type(this.settings.filter))throw"filter must be false, a string or a filter function"},n.prototype.retrieveSuffixRanges=function(){var t,i=[];for(t in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(t)&&i.push(parseInt(t,10));return i.sort(function(t,i){return i<t?1:t<i?-1:0}),i},n.prototype.updateSettings=function(t){this.settings=l.extend({},this.settings,t),this.checkSettings(),this.border=0<=this.settings.border?this.settings.border:this.settings.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges()},n.prototype.defaults={sizeRangeSuffixes:{},thumbnailPath:void 0,rowHeight:120,maxRowHeight:!1,margins:1,border:-1,lastRow:"nojustify",justifyThreshold:.9,waitThumbnailsLoad:!0,captions:!0,cssAnimation:!0,imagesAnimationDuration:500,captionSettings:{animationDuration:500,visibleOpacity:.7,nonVisibleOpacity:0},rel:null,target:null,extension:/\.[^.\\/]+$/,refreshTime:200,refreshSensitivity:0,randomize:!1,rtl:!1,sort:!1,filter:!1,selector:"a, div:not(.spinner)",imgSelector:"> img, > a > img",triggerEvent:function(t){this.$gallery.trigger(t)}},l.fn.justifiedGallery=function(s){return this.each(function(t,i){var e=l(i);e.addClass("justified-gallery");i=e.data("jg.controller");if(void 0===i){if(null!=s&&"object"!==l.type(s)){if("destroy"===s)return;throw"The argument must be an object"}i=new n(e,l.extend({},n.prototype.defaults,s)),e.data("jg.controller",i)}else if("norewind"!==s){if("destroy"===s)return void i.destroy();i.updateSettings(s),i.rewind()}i.updateEntries("norewind"===s)&&i.init()})}});
2
- !function(l,s,f,m){"use strict";var a,i,r,d,e,c,p,u,n,t,o,h,g;function b(t,e){var o,n,a,i=[],s=0;t&&t.isDefaultPrevented()||(t.preventDefault(),e=e||{},t&&t.data&&(e=u(t.data.options,e)),o=e.$target||f(t.currentTarget).trigger("blur"),(a=f.modulaFancybox.getInstance())&&a.$trigger&&a.$trigger.is(o)||(i=e.selector?f(e.selector):(n=o.attr("data-fancybox")||"")?(i=t.data?t.data.items:[]).length?i.filter('[data-fancybox="'+n+'"]'):f('[data-fancybox="'+n+'"]'):[o],(s=f(i).index(o))<0&&(s=0),(a=f.modulaFancybox.open(i,e,s)).$trigger=o))}l.console=l.console||{info:function(t){}},f&&(f.fn.modulaFancybox?console.info("fancyBox already initialized"):(t={closeExisting:!1,loop:!1,gutter:50,keyboard:!0,preventCaptionOverlap:!0,arrows:!0,infobar:!0,smallBtn:"auto",toolbar:"auto",buttons:["zoom","slideShow","thumbs","close"],idleTime:3,protect:!1,modal:!1,image:{preload:!1},ajax:{settings:{data:{fancybox:!0}}},iframe:{tpl:'<iframe id="modula-fancybox-frame{rnd}" name="modula-fancybox-frame{rnd}" class="modula-fancybox-iframe" allowfullscreen="allowfullscreen" allow="autoplay; fullscreen" src=""></iframe>',preload:!0,css:{},attr:{scrolling:"auto"}},video:{tpl:'<video class="modula-fancybox-video" controls controlsList="nodownload" poster="{{poster}}"><source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos, <a href="{{src}}">download</a> and watch with your favorite video player!</video>',format:"",autoStart:!0},defaultType:"image",animationEffect:"zoom",animationDuration:366,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",baseTpl:'<div class="modula-fancybox-container" role="dialog" tabindex="-1"><div class="modula-fancybox-bg"></div><div class="modula-fancybox-inner"><div class="modula-fancybox-infobar"><span data-fancybox-index></span>&nbsp;/&nbsp;<span data-fancybox-count></span></div><div class="modula-fancybox-toolbar">{{buttons}}</div><div class="modula-fancybox-navigation">{{arrows}}</div><div class="modula-fancybox-stage"></div><div class="modula-fancybox-caption"><div class="modula-fancybox-caption__body"></div></div></div></div>',spinnerTpl:'<div class="modula-fancybox-loading"></div>',errorTpl:'<div class="modula-fancybox-error"><p>{{ERROR}}</p></div>',btnTpl:{download:'<a download data-fancybox-download class="modula-fancybox-button modula-fancybox-button--download" title="{{DOWNLOAD}}" href="javascript:;"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.62 17.09V19H5.38v-1.91zm-2.97-6.96L17 11.45l-5 4.87-5-4.87 1.36-1.32 2.68 2.64V5h1.92v7.77z"/></svg></a>',zoom:'<button data-fancybox-zoom class="modula-fancybox-button modula-fancybox-button--zoom" title="{{ZOOM}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.7 17.3l-3-3a5.9 5.9 0 0 0-.6-7.6 5.9 5.9 0 0 0-8.4 0 5.9 5.9 0 0 0 0 8.4 5.9 5.9 0 0 0 7.7.7l3 3a1 1 0 0 0 1.3 0c.4-.5.4-1 0-1.5zM8.1 13.8a4 4 0 0 1 0-5.7 4 4 0 0 1 5.7 0 4 4 0 0 1 0 5.7 4 4 0 0 1-5.7 0z"/></svg></button>',close:'<button data-fancybox-close class="modula-fancybox-button modula-fancybox-button--close" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 10.6L6.6 5.2 5.2 6.6l5.4 5.4-5.4 5.4 1.4 1.4 5.4-5.4 5.4 5.4 1.4-1.4-5.4-5.4 5.4-5.4-1.4-1.4-5.4 5.4z"/></svg></button>',arrowLeft:'<button data-fancybox-prev class="modula-fancybox-button modula-fancybox-button--arrow_left" title="{{PREV}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.28 15.7l-1.34 1.37L5 12l4.94-5.07 1.34 1.38-2.68 2.72H19v1.94H8.6z"/></svg></div></button>',arrowRight:'<button data-fancybox-next class="modula-fancybox-button modula-fancybox-button--arrow_right" title="{{NEXT}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.4 12.97l-2.68 2.72 1.34 1.38L19 12l-4.94-5.07-1.34 1.38 2.68 2.72H5v1.94z"/></svg></div></button>',smallBtn:'<button type="button" data-fancybox-close class="modula-fancybox-button modula-fancybox-close-small" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" version="1" viewBox="0 0 24 24"><path d="M13 12l5-5-1-1-5 5-5-5-1 1 5 5-5 5 1 1 5-5 5 5 1-1z"/></svg></button>'},modulaShare:["facebook","twitter","pinterest","whatsapp","linkedin","email"],shareBtnTpl:{facebook:'<a class="modula-fancybox-share__button modula-fancybox-share__button--fb" href="https://www.facebook.com/sharer/sharer.php?u={{modulaShareUrl}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196" /></svg><span>Facebook</span></a>',twitter:'<a class="modula-fancybox-share__button modula-fancybox-share__button--tw" href="https://twitter.com/intent/tweet?url={{modulaShareUrl}}&text={{descr}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z" /></svg><span>Twitter</span></a>',pinterest:'<a class="modula-fancybox-share__button modula-fancybox-share__button--pt" href="https://www.pinterest.com/pin/create/button/?url={{modulaShareUrl}}&description={{descr}}&media={{media}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z" fill="#fff"/></svg><span>Pinterest</span></a>',whatsapp:'<a class="modula-fancybox-share__button modula-fancybox-share__button--wa" href="https://api.whatsapp.com/send?text={{modulaShareUrl}}&review_url=true"><svg aria-hidden="true" focusable="false" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);" preserveAspectRatio="xMidYMid meet" viewBox="0 0 1536 1600"><path d="M985 878q13 0 97.5 44t89.5 53q2 5 2 15q0 33-17 76q-16 39-71 65.5T984 1158q-57 0-190-62q-98-45-170-118T476 793q-72-107-71-194v-8q3-91 74-158q24-22 52-22q6 0 18 1.5t19 1.5q19 0 26.5 6.5T610 448q8 20 33 88t25 75q0 21-34.5 57.5T599 715q0 7 5 15q34 73 102 137q56 53 151 101q12 7 22 7q15 0 54-48.5t52-48.5zm-203 530q127 0 243.5-50t200.5-134t134-200.5t50-243.5t-50-243.5T1226 336t-200.5-134T782 152t-243.5 50T338 336T204 536.5T154 780q0 203 120 368l-79 233l242-77q158 104 345 104zm0-1382q153 0 292.5 60T1315 247t161 240.5t60 292.5t-60 292.5t-161 240.5t-240.5 161t-292.5 60q-195 0-365-94L0 1574l136-405Q28 991 28 780q0-153 60-292.5T249 247T489.5 86T782 26z" fill="currentColor"/></svg><span>WhatsApp</span></a>',linkedin:'<a class="modula-fancybox-share__button modula-fancybox-share__button--li" href="//linkedin.com/shareArticle?mini=true&url={{modulaShareUrl}}"><svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="linkedin-in" class="svg-inline--fa fa-linkedin-in fa-w-14" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z"></path></svg><span>LinkedIn</span></a>',email:'<a class="modula-fancybox-share__button modula-fancybox-share__button--email" href="mailto:?subject={{subject}}&body={{emailMessage}}"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 3v18h24v-18h-24zm6.623 7.929l-4.623 5.712v-9.458l4.623 3.746zm-4.141-5.929h19.035l-9.517 7.713-9.518-7.713zm5.694 7.188l3.824 3.099 3.83-3.104 5.612 6.817h-18.779l5.513-6.812zm9.208-1.264l4.616-3.741v9.348l-4.616-5.607z" fill="currentColor"></path></svg><span>Email</span></a>'},parentEl:"body",hideScrollbar:!0,autoFocus:!0,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:3e3},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".modula-fancybox-container",axis:"y"},wheel:"auto",onInit:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeClose:f.noop,afterClose:f.noop,onActivate:f.noop,onDeactivate:f.noop,clickContent:function(t,e){return"image"===t.type&&"zoom"},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{preventCaptionOverlap:!1,idleTime:!1,clickContent:function(t,e){return"image"===t.type&&"toggleControls"},clickSlide:function(t,e){return"image"===t.type?"toggleControls":"close"},dblclickContent:function(t,e){return"image"===t.type&&"zoom"},dblclickSlide:function(t,e){return"image"===t.type&&"zoom"}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded. <br/> Please try again later.",PLAY_START:"Start slideshow",PLAY_STOP:"Pause slideshow",FULL_SCREEN:"Full screen",THUMBS:"Thumbnails",DOWNLOAD:"Download",SHARE:"Share",ZOOM:"Zoom"},de:{CLOSE:"Schlie&szlig;en",NEXT:"Weiter",PREV:"Zur&uuml;ck",ERROR:"Die angeforderten Daten konnten nicht geladen werden. <br/> Bitte versuchen Sie es sp&auml;ter nochmal.",PLAY_START:"Diaschau starten",PLAY_STOP:"Diaschau beenden",FULL_SCREEN:"Vollbild",THUMBS:"Vorschaubilder",DOWNLOAD:"Herunterladen",SHARE:"Teilen",ZOOM:"Vergr&ouml;&szlig;ern"}}},a=f(l),i=f(s),r=0,d=l.requestAnimationFrame||l.webkitRequestAnimationFrame||l.mozRequestAnimationFrame||l.oRequestAnimationFrame||function(t){return l.setTimeout(t,1e3/60)},e=l.cancelAnimationFrame||l.webkitCancelAnimationFrame||l.mozCancelAnimationFrame||l.oCancelAnimationFrame||function(t){l.clearTimeout(t)},c=function(){var t,e=s.createElement("fakeelement"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in o)if(e.style[t]!==m)return o[t];return"transitionend"}(),p=function(t){return t&&t.length&&t[0].offsetHeight},u=function(t,e){var o=f.extend(!0,{},t,e);return f.each(e,function(t,e){f.isArray(e)&&(o[t]=e)}),o},n=function(t,e,o){var n=this;n.opts=u({index:o},f.modulaFancybox.defaults),f.isPlainObject(e)&&(n.opts=u(n.opts,e)),f.modulaFancybox.isMobile&&(n.opts=u(n.opts,n.opts.mobile)),n.id=n.opts.id||++r,n.currIndex=parseInt(n.opts.index,10)||0,n.prevIndex=null,n.prevPos=null,n.currPos=0,n.firstRun=!0,n.group=[],n.slides={},n.addContent(t),n.group.length&&n.init()},f.extend(n.prototype,{init:function(){var o=this;o.currIndex<0&&(o.currIndex=0),void 0===o.group[o.currIndex]&&jQuery.each(this.group,function(t,e){o.currIndex==parseInt(e.opts.image_id)&&(o.currIndex=t)});var e,n,a=o.group[o.currIndex].opts;a.closeExisting&&f.modulaFancybox.close(!0),f("body").addClass("modula-fancybox-active"),!f.modulaFancybox.getInstance()&&!1!==a.hideScrollbar&&!f.modulaFancybox.isMobile&&s.body.scrollHeight>l.innerHeight&&(f("head").append('<style id="modula-fancybox-style-noscroll" type="text/css">.compensate-for-scrollbar{margin-right:'+(l.innerWidth-s.documentElement.clientWidth)+"px;}</style>"),f("body").addClass("compensate-for-scrollbar")),n="",f.each(a.buttons,function(t,e){n+=a.btnTpl[e]||""}),e=f(o.translate(o,a.baseTpl.replace("{{buttons}}",n).replace("{{arrows}}",a.btnTpl.arrowLeft+a.btnTpl.arrowRight))).attr("id","modula-fancybox-container-"+o.id).addClass(a.baseClass).data("modulaFancyBox",o).appendTo(a.parentEl),o.$refs={container:e},["bg","inner","infobar","toolbar","stage","caption","navigation"].forEach(function(t){o.$refs[t]=e.find(".modula-fancybox-"+t)}),o.trigger("onInit"),o.activate(),o.jumpTo(o.currIndex)},translate:function(t,e){var o=t.opts.i18n[t.opts.lang]||t.opts.i18n.en;return e.replace(/\{\{(\w+)\}\}/g,function(t,e){return o[e]===m?t:o[e]})},addContent:function(t){var r=this,t=f.makeArray(t);f.each(t,function(t,e){var o,n,a,i={},s={};f.isPlainObject(e)?s=(i=e).opts||e:"object"===f.type(e)&&f(e).length?(s=(n=f(e)).data()||{},(s=f.extend(!0,{},s,s.options)).$orig=n,i.src=r.opts.src||s.src||n.attr("href"),i.type||i.src||(i.type="inline",i.src=e)):i={type:"html",src:e+""},i.opts=f.extend(!0,{},r.opts,s),f.isArray(s.buttons)&&(i.opts.buttons=s.buttons),f.modulaFancybox.isMobile&&i.opts.mobile&&(i.opts=u(i.opts,i.opts.mobile)),o=i.type||i.opts.type,n=i.src||"",!o&&n&&((s=n.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(o="video",i.opts.video.format||(i.opts.video.format="video/"+("ogv"===s[1]?"ogg":s[1]))):n.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?o="image":n.match(/\.(pdf)((\?|#).*)?$/i)?(o="iframe",i=f.extend(!0,i,{contentType:"pdf",opts:{iframe:{preload:!1}}})):"#"===n.charAt(0)&&(o="inline")),o?i.type=o:r.trigger("objectNeedsType",i),i.contentType||(i.contentType=-1<f.inArray(i.type,["html","inline","ajax"])?"html":i.type),i.index=r.group.length,"auto"==i.opts.smallBtn&&(i.opts.smallBtn=-1<f.inArray(i.type,["html","inline","ajax"])),"auto"===i.opts.toolbar&&(i.opts.toolbar=!i.opts.smallBtn),i.$thumb=i.opts.$thumb||null,i.opts.$trigger&&i.index===r.opts.index&&(i.$thumb=i.opts.$trigger.find("img:first"),i.$thumb.length&&(i.opts.$orig=i.opts.$trigger)),i.$thumb&&i.$thumb.length||!i.opts.$orig||(i.$thumb=i.opts.$orig.find("img:first")),i.$thumb&&!i.$thumb.length&&(i.$thumb=null),i.thumb=i.opts.thumb||(i.$thumb?i.$thumb[0].src:null),"function"===f.type(i.opts.caption)&&(i.opts.caption=i.opts.caption.apply(e,[r,i])),"function"===f.type(r.opts.caption)&&(i.opts.caption=r.opts.caption.apply(e,[r,i])),i.opts.caption instanceof f||(i.opts.caption=i.opts.caption===m?"":i.opts.caption+""),"ajax"===i.type&&1<(a=n.split(/\s+/,2)).length&&(i.src=a.shift(),i.opts.filter=a.shift()),i.opts.modal&&(i.opts=f.extend(!0,i.opts,{trapFocus:!0,infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),r.group.push(i)}),Object.keys(r.slides).length&&(r.updateControls(),(t=r.Thumbs)&&t.isActive&&(t.create(),t.focus()))},addEvents:function(){var n=this;n.removeEvents(),n.$refs.container.on("click.fb-close","[data-fancybox-close]",function(t){t.stopPropagation(),t.preventDefault(),n.close(t)}).on("touchstart.fb-prev click.fb-prev","[data-fancybox-prev]",function(t){t.stopPropagation(),t.preventDefault(),n.previous()}).on("touchstart.fb-next click.fb-next","[data-fancybox-next]",function(t){t.stopPropagation(),t.preventDefault(),n.next()}).on("click.fb","[data-fancybox-zoom]",function(t){n[n.isScaledDown()?"scaleToActual":"scaleToFit"]()}),a.on("orientationchange.fb resize.fb",function(t){t&&t.originalEvent&&"resize"===t.originalEvent.type?(n.requestId&&e(n.requestId),n.requestId=d(function(){n.update(t)})):(n.current&&"iframe"===n.current.type&&n.$refs.stage.hide(),setTimeout(function(){n.$refs.stage.show(),n.update(t)},f.modulaFancybox.isMobile?600:250))}),i.on("keydown.fb",function(t){var e=(f.modulaFancybox?f.modulaFancybox.getInstance():null).current,o=t.keyCode||t.which;if(9!=o){if(!(!e.opts.keyboard||t.ctrlKey||t.altKey||t.shiftKey||f(t.target).is("input,textarea,video,audio,select")))return 8===o||27===o?(t.preventDefault(),void n.close(t)):37===o||38===o?(t.preventDefault(),void n.previous()):39===o||40===o?(t.preventDefault(),void n.next()):void n.trigger("afterKeydown",t,o)}else e.opts.trapFocus&&n.focus(t)}),n.group[n.currIndex].opts.idleTime&&(n.idleSecondsCounter=0,i.on("mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle",function(t){n.idleSecondsCounter=0,n.isIdle&&n.showControls(),n.isIdle=!1}),n.idleInterval=l.setInterval(function(){n.idleSecondsCounter++,n.idleSecondsCounter>=n.group[n.currIndex].opts.idleTime&&!n.isDragging&&(n.isIdle=!0,n.idleSecondsCounter=0,n.hideControls())},1e3))},removeEvents:function(){a.off("orientationchange.fb resize.fb"),i.off("keydown.fb .fb-idle"),this.$refs.container.off(".fb-close .fb-prev .fb-next"),this.idleInterval&&(l.clearInterval(this.idleInterval),this.idleInterval=null)},previous:function(t){return this.jumpTo(this.currPos-1,t)},next:function(t){return this.jumpTo(this.currPos+1,t)},jumpTo:function(t,n){var e,o,a,i,s,r,l,c,d=this,u=d.group.length;if(!(d.isDragging||d.isClosing||d.isAnimating&&d.firstRun))return t=parseInt(t,10),!(!(o=(d.current||d).opts.loop)&&(t<0||u<=t))&&(e=d.firstRun=!Object.keys(d.slides).length,i=d.current,d.prevIndex=d.currIndex,d.prevPos=d.currPos,a=d.createSlide(t),1<u&&((o||a.index<u-1)&&d.createSlide(t+1),(o||0<a.index)&&d.createSlide(t-1)),d.current=a,d.currIndex=a.index,d.currPos=a.pos,d.trigger("beforeShow",e),d.updateControls(),a.forcedDuration=m,f.isNumeric(n)?a.forcedDuration=n:n=a.opts[e?"animationDuration":"transitionDuration"],n=parseInt(n,10),t=d.isMoved(a),a.$slide.addClass("modula-fancybox-slide--current"),e?(a.opts.animationEffect&&n&&d.$refs.container.css("transition-duration",n+"ms"),d.$refs.container.addClass("modula-fancybox-is-open").trigger("focus"),d.loadSlide(a)):(s=f.modulaFancybox.getTranslate(i.$slide),r=f.modulaFancybox.getTranslate(d.$refs.stage),f.each(d.slides,function(t,e){f.modulaFancybox.stop(e.$slide,!0)}),i.pos!==a.pos&&(i.isComplete=!1),i.$slide.removeClass("modula-fancybox-slide--complete modula-fancybox-slide--current"),t?(c=s.left-(i.pos*s.width+i.pos*i.opts.gutter),f.each(d.slides,function(t,e){e.$slide.removeClass("modula-fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)modula-fancybox-fx-\S+/g)||[]).join(" ")});var o=e.pos*s.width+e.pos*e.opts.gutter;f.modulaFancybox.setTranslate(e.$slide,{top:0,left:o-r.left+c}),e.pos!==a.pos&&e.$slide.addClass("modula-fancybox-slide--"+(e.pos>a.pos?"next":"previous")),p(e.$slide),f.modulaFancybox.animate(e.$slide,{top:0,left:(e.pos-a.pos)*s.width+(e.pos-a.pos)*e.opts.gutter},n,function(){e.$slide.css({transform:"",opacity:""}).removeClass("modula-fancybox-slide--next modula-fancybox-slide--previous"),e.pos===d.currPos&&d.complete()})})):n&&a.opts.transitionEffect&&(l="modula-fancybox-animated modula-fancybox-fx-"+a.opts.transitionEffect,i.$slide.addClass("modula-fancybox-slide--"+(i.pos>a.pos?"next":"previous")),f.modulaFancybox.animate(i.$slide,l,n,function(){i.$slide.removeClass(l).removeClass("modula-fancybox-slide--next modula-fancybox-slide--previous")},!1)),a.isLoaded?d.revealContent(a):d.loadSlide(a)),void d.preload("image"))},createSlide:function(t){var e,o=this,n=t%o.group.length;return n=n<0?o.group.length+n:n,!o.slides[t]&&o.group[n]&&(e=f('<div class="modula-fancybox-slide"></div>').appendTo(o.$refs.stage),o.slides[t]=f.extend(!0,{},o.group[n],{pos:t,$slide:e,isLoaded:!1}),o.updateSlide(o.slides[t])),o.slides[t]},scaleToActual:function(t,e,o){var n,a,i,s,r=this,l=r.current,c=l.$content,d=f.modulaFancybox.getTranslate(l.$slide).width,u=f.modulaFancybox.getTranslate(l.$slide).height,p=l.width,h=l.height;r.isAnimating||r.isMoved()||!c||"image"!=l.type||!l.isLoaded||l.hasError||(r.isAnimating=!0,f.modulaFancybox.stop(c),t=t===m?.5*d:t,e=e===m?.5*u:e,(n=f.modulaFancybox.getTranslate(c)).top-=f.modulaFancybox.getTranslate(l.$slide).top,n.left-=f.modulaFancybox.getTranslate(l.$slide).left,i=p/n.width,s=h/n.height,a=.5*d-.5*p,l=.5*u-.5*h,d<p&&(0<(a=n.left*i-(t*i-t))&&(a=0),a<d-p&&(a=d-p)),u<h&&(0<(l=n.top*s-(e*s-e))&&(l=0),l<u-h&&(l=u-h)),r.updateCursor(p,h),f.modulaFancybox.animate(c,{top:l,left:a,scaleX:i,scaleY:s},o||366,function(){r.isAnimating=!1}),r.SlideShow&&r.SlideShow.isActive&&r.SlideShow.stop())},scaleToFit:function(t){var e=this,o=e.current,n=o.$content;e.isAnimating||e.isMoved()||!n||"image"!=o.type||!o.isLoaded||o.hasError||(e.isAnimating=!0,f.modulaFancybox.stop(n),o=e.getFitPos(o),e.updateCursor(o.width,o.height),f.modulaFancybox.animate(n,{top:o.top,left:o.left,scaleX:o.width/n.width(),scaleY:o.height/n.height()},t||366,function(){e.isAnimating=!1}))},getFitPos:function(t){var e,o,n=t.$content,a=t.$slide,i=t.width||t.opts.width,s=t.height||t.opts.height,r={};return!!(t.isLoaded&&n&&n.length)&&(e=f.modulaFancybox.getTranslate(this.$refs.stage).width,o=f.modulaFancybox.getTranslate(this.$refs.stage).height,e-=parseFloat(a.css("paddingLeft"))+parseFloat(a.css("paddingRight"))+parseFloat(n.css("marginLeft"))+parseFloat(n.css("marginRight")),o-=parseFloat(a.css("paddingTop"))+parseFloat(a.css("paddingBottom"))+parseFloat(n.css("marginTop"))+parseFloat(n.css("marginBottom")),i&&s||(i=e,s=o),e-.5<(i*=n=Math.min(1,e/i,o/s))&&(i=e),o-.5<(s*=n)&&(s=o),"image"===t.type?(r.top=Math.floor(.5*(o-s))+parseFloat(a.css("paddingTop")),r.left=Math.floor(.5*(e-i))+parseFloat(a.css("paddingLeft"))):"video"===t.contentType&&(i/(t=t.opts.width&&t.opts.height?i/s:t.opts.ratio||16/9)<s?s=i/t:s*t<i&&(i=s*t)),r.width=i,r.height=s,r)},update:function(o){var n=this;f.each(n.slides,function(t,e){n.updateSlide(e,o)})},updateSlide:function(t,e){var o=this,n=t&&t.$content,a=t.width||t.opts.width,i=t.height||t.opts.height,s=t.$slide;o.adjustCaption(t),n&&(a||i||"video"===t.contentType)&&!t.hasError&&(f.modulaFancybox.stop(n),f.modulaFancybox.setTranslate(n,o.getFitPos(t)),t.pos===o.currPos&&(o.isAnimating=!1,o.updateCursor())),o.adjustLayout(t),s.length&&(s.trigger("refresh"),t.pos===o.currPos&&o.$refs.toolbar.add(o.$refs.navigation.find(".modula-fancybox-button--arrow_right")).toggleClass("compensate-for-scrollbar",s.get(0).scrollHeight>s.get(0).clientHeight)),o.trigger("onUpdate",t,e)},centerSlide:function(t){var e=this,o=e.current,n=o.$slide;!e.isClosing&&o&&(n.siblings().css({transform:"",opacity:""}),n.parent().children().removeClass("modula-fancybox-slide--previous modula-fancybox-slide--next"),f.modulaFancybox.animate(n,{top:0,left:0,opacity:1},t===m?0:t,function(){n.css({transform:"",opacity:""}),o.isComplete||e.complete()},!1))},isMoved:function(t){var e,o=t||this.current;return!!o&&(e=f.modulaFancybox.getTranslate(this.$refs.stage),t=f.modulaFancybox.getTranslate(o.$slide),!o.$slide.hasClass("modula-fancybox-animated")&&(.5<Math.abs(t.top-e.top)||.5<Math.abs(t.left-e.left)))},updateCursor:function(t,e){var o=this,n=o.current,a=o.$refs.container;n&&!o.isClosing&&o.Guestures&&(a.removeClass("modula-fancybox-is-zoomable modula-fancybox-can-zoomIn modula-fancybox-can-zoomOut modula-fancybox-can-swipe modula-fancybox-can-pan"),e=!!(t=o.canPan(t,e))||o.isZoomable(),a.toggleClass("modula-fancybox-is-zoomable",e),f("[data-fancybox-zoom]").prop("disabled",!e),t?a.addClass("modula-fancybox-can-pan"):e&&("zoom"===n.opts.clickContent||f.isFunction(n.opts.clickContent)&&"zoom"==n.opts.clickContent(n))?a.addClass("modula-fancybox-can-zoomIn"):n.opts.touch&&(n.opts.touch.vertical||1<o.group.length)&&"video"!==n.contentType&&a.addClass("modula-fancybox-can-swipe"))},isZoomable:function(){var t,e=this.current;if(e&&!this.isClosing&&"image"===e.type&&!e.hasError){if(!e.isLoaded)return!0;if((t=this.getFitPos(e))&&(e.width>t.width||e.height>t.height))return!0}return!1},isScaledDown:function(t,e){var o=!1,n=this.current,a=n.$content;return t!==m&&e!==m?o=t<n.width&&e<n.height:a&&(o=(o=f.modulaFancybox.getTranslate(a)).width<n.width&&o.height<n.height),o},canPan:function(t,e){var o=this.current,n=null,a=!1;return"image"===o.type&&(o.isComplete||t&&e)&&!o.hasError&&(a=this.getFitPos(o),t!==m&&e!==m?n={width:t,height:e}:o.isComplete&&(n=f.modulaFancybox.getTranslate(o.$content)),n&&a&&(a=1.5<Math.abs(n.width-a.width)||1.5<Math.abs(n.height-a.height))),a},loadSlide:function(o){var t,e,n,a=this;if(!o.isLoading&&!o.isLoaded){if(!(o.isLoading=!0)===a.trigger("beforeLoad",o))return o.isLoading=!1;switch(t=o.type,(e=o.$slide).off("refresh").trigger("onReset").addClass(o.opts.slideClass),t){case"image":a.setImage(o);break;case"iframe":a.setIframe(o);break;case"html":a.setContent(o,o.src||o.content);break;case"video":a.setContent(o,o.opts.video.tpl.replace(/\{\{src\}\}/gi,o.src).replace("{{format}}",o.opts.videoFormat||o.opts.video.format||"").replace("{{poster}}",o.thumb||""));break;case"inline":f(o.src).length?a.setContent(o,f(o.src)):a.setError(o);break;case"ajax":a.showLoading(o),n=f.ajax(f.extend({},o.opts.ajax.settings,{url:o.src,success:function(t,e){"success"===e&&a.setContent(o,t)},error:function(t,e){t&&"abort"!==e&&a.setError(o)}})),e.one("onReset",function(){n.abort()});break;default:a.setError(o)}return!0}},setImage:function(e){var t,o=this;setTimeout(function(){var t=e.$image;o.isClosing||!e.isLoading||t&&t.length&&t[0].complete||e.hasError||o.showLoading(e)},50),o.checkSrcset(e),e.$content=f('<div class="modula-fancybox-content"></div>').addClass("modula-fancybox-is-hidden").appendTo(e.$slide.addClass("modula-fancybox-slide--image")),!1!==e.opts.preload&&e.opts.width&&e.opts.height&&e.thumb&&(e.width=e.opts.width,e.height=e.opts.height,(t=s.createElement("img")).onerror=function(){f(this).remove(),e.$ghost=null},t.onload=function(){o.afterLoad(e)},e.$ghost=f(t).addClass("modula-fancybox-image").appendTo(e.$content).attr("src",e.thumb),"undifined"!=typeof e.src&&e.$ghost.attr("alt",e.alt)),o.setBigImage(e)},checkSrcset:function(t){var e,o,n,a,i=t.opts.srcset||t.opts.image.srcset;if(i){n=l.devicePixelRatio||1,a=l.innerWidth*n,(o=i.split(",").map(function(t){var n={};return t.trim().split(/\s+/).forEach(function(t,e){var o=parseInt(t.substring(0,t.length-1),10);if(0===e)return n.url=t;o&&(n.value=o,n.postfix=t[t.length-1])}),n})).sort(function(t,e){return t.value-e.value});for(var s=0;s<o.length;s++){var r=o[s];if("w"===r.postfix&&r.value>=a||"x"===r.postfix&&r.value>=n){e=r;break}}!e&&o.length&&(e=o[o.length-1]),e&&(t.src=e.url,t.width&&t.height&&"w"==e.postfix&&(t.height=t.width/t.height*e.value,t.width=e.value),t.opts.srcset=i)}},setBigImage:function(e){var o=this,t=s.createElement("img"),n=f(t);e.$image=n.one("error",function(){o.setError(e)}).one("load",function(){var t;e.$ghost||(o.resolveImageSlideSize(e,this.naturalWidth,this.naturalHeight),o.afterLoad(e)),o.isClosing||(e.opts.srcset&&((t=e.opts.sizes)&&"auto"!==t||(t=(1<e.width/e.height&&1<a.width()/a.height()?"100":Math.round(e.width/e.height*100))+"vw"),n.attr("sizes",t).attr("srcset",e.opts.srcset)),e.opts.alt&&n.attr("alt",e.opts.alt),e.opts.image_id&&n.attr("image-id",e.opts.image_id),e.$thumb&&n.attr("title",e.$thumb.find("img.pic").attr("title")),e.$ghost&&setTimeout(function(){e.$ghost&&!o.isClosing&&e.$ghost.hide()},Math.min(300,Math.max(1e3,e.height/1600))),o.hideLoading(e))}).addClass("modula-fancybox-image").attr("src",e.src).appendTo(e.$content),(t.complete||"complete"==t.readyState)&&n.naturalWidth&&n.naturalHeight?n.trigger("load"):t.error&&n.trigger("error")},resolveImageSlideSize:function(t,e,o){var n=parseInt(t.opts.width,10),a=parseInt(t.opts.height,10);t.width=e,t.height=o,0<n&&(t.width=n,t.height=Math.floor(n*o/e)),0<a&&(t.width=Math.floor(a*e/o),t.height=a)},setIframe:function(a){var i,e=this,s=a.opts.iframe,r=a.$slide;a.$content=f('<div class="modula-fancybox-content'+(s.preload?" modula-fancybox-is-hidden":"")+'"></div>').css(s.css).appendTo(r),r.addClass("modula-fancybox-slide--"+a.contentType),a.$iframe=i=f(s.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr(s.attr).appendTo(a.$content),s.preload?(e.showLoading(a),i.on("load.fb error.fb",function(t){this.isReady=1,a.$slide.trigger("refresh"),e.afterLoad(a)}),r.on("refresh.fb",function(){var t,e=a.$content,o=s.css.width,n=s.css.height;if(1===i[0].isReady){try{t=i.contents().find("body")}catch(t){}t&&t.length&&t.children().length&&(r.css("overflow","visible"),e.css({width:"100%","max-width":"100%",height:"9999px"}),o===m&&(o=Math.ceil(Math.max(t[0].clientWidth,t.outerWidth(!0)))),e.css("width",o||"").css("max-width",""),n===m&&(n=Math.ceil(Math.max(t[0].clientHeight,t.outerHeight(!0)))),e.css("height",n||""),r.css("overflow","auto")),e.removeClass("modula-fancybox-is-hidden")}})):e.afterLoad(a),i.attr("src",a.src),r.one("onReset",function(){try{f(this).find("iframe").hide().unbind().attr("src","//about:blank")}catch(t){}f(this).off("refresh.fb").empty(),a.isLoaded=!1,a.isRevealed=!1})},setContent:function(t,e){var o;this.isClosing||(this.hideLoading(t),t.$content&&f.modulaFancybox.stop(t.$content),t.$slide.empty(),(o=e)&&o.hasOwnProperty&&o instanceof f&&e.parent().length?((e.hasClass("modula-fancybox-content")||e.parent().hasClass("modula-fancybox-content"))&&e.parents(".modula-fancybox-slide").trigger("onReset"),t.$placeholder=f("<div>").hide().insertAfter(e),e.css("display","inline-block")):t.hasError||("string"===f.type(e)&&(e=f("<div>").append(f.trim(e)).contents()),t.opts.filter&&(e=f("<div>").html(e).find(t.opts.filter))),t.$slide.one("onReset",function(){f(this).find("video,audio").trigger("pause"),t.$placeholder&&(t.$placeholder.after(e.removeClass("modula-fancybox-content").hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(f(this).empty(),t.isLoaded=!1,t.isRevealed=!1)}),f(e).appendTo(t.$slide),f(e).is("video,audio")&&(f(e).addClass("modula-fancybox-video"),f(e).wrap("<div></div>"),t.contentType="video",t.opts.width=t.opts.width||f(e).attr("width"),t.opts.height=t.opts.height||f(e).attr("height")),t.$content=t.$slide.children().filter("div,form,main,video,audio,article,.modula-fancybox-content").first(),t.$content.siblings().hide(),t.$content.length||(t.$content=t.$slide.wrapInner("<div></div>").children().first()),t.$content.addClass("modula-fancybox-content"),t.$slide.addClass("modula-fancybox-slide--"+t.contentType),this.afterLoad(t))},setError:function(t){t.hasError=!0,t.$slide.trigger("onReset").removeClass("modula-fancybox-slide--"+t.contentType).addClass("modula-fancybox-slide--error"),t.contentType="html",this.setContent(t,this.translate(t,t.opts.errorTpl)),t.pos===this.currPos&&(this.isAnimating=!1)},showLoading:function(t){(t=t||this.current)&&!t.$spinner&&(t.$spinner=f(this.translate(this,this.opts.spinnerTpl)).appendTo(t.$slide).hide().fadeIn("fast"))},hideLoading:function(t){(t=t||this.current)&&t.$spinner&&(t.$spinner.stop().remove(),delete t.$spinner)},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger("afterLoad",t),e.hideLoading(t),!t.opts.smallBtn||t.$smallBtn&&t.$smallBtn.length||(t.$smallBtn=f(e.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content)),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on("contextmenu.fb",function(t){return 2==t.button&&t.preventDefault(),!0}),"image"===t.type&&f('<div class="modula-fancybox-spaceball"></div>').appendTo(t.$content)),e.adjustCaption(t),e.adjustLayout(t),t.pos===e.currPos&&e.updateCursor(),e.revealContent(t))},adjustCaption:function(t){var e=this,o=t||e.current,n=o.opts.caption,a=o.opts.preventCaptionOverlap,i=e.$refs.caption,t=!1;i.toggleClass("modula-fancybox-caption--separate",a),a&&n&&n.length&&(o.pos!==e.currPos?((i=i.clone().appendTo(i.parent())).children().eq(0).empty().html(n),t=i.outerHeight(!0),i.empty().remove()):e.$caption&&(t=e.$caption.outerHeight(!0)),o.$slide.css("padding-bottom",t||""))},adjustLayout:function(t){var e,o,n,a=t||this.current;a.isLoaded&&!0!==a.opts.disableLayoutFix&&(a.$content.css("margin-bottom",""),a.$content.outerHeight()>a.$slide.height()+.5&&(o=a.$slide[0].style["padding-bottom"],n=a.$slide.css("padding-bottom"),0<parseFloat(n)&&(t=a.$slide[0].scrollHeight,a.$slide.css("padding-bottom",0),Math.abs(t-a.$slide[0].scrollHeight)<1&&(e=n),a.$slide.css("padding-bottom",o))),a.$content.css("margin-bottom",e))},revealContent:function(t){var e,o,n,a,i=this,s=t.$slide,r=!1,l=!1,c=i.isMoved(t),d=t.isRevealed;return t.isRevealed=!0,e=t.opts[i.firstRun?"animationEffect":"transitionEffect"],n=t.opts[i.firstRun?"animationDuration":"transitionDuration"],n=parseInt(t.forcedDuration===m?n:t.forcedDuration,10),!c&&t.pos===i.currPos&&n||(e=!1),"zoom"===e&&(t.pos===i.currPos&&n&&"image"===t.type&&!t.hasError&&(l=i.getThumbPos(t))?r=i.getFitPos(t):e="fade"),"zoom"===e?(i.isAnimating=!0,r.scaleX=r.width/l.width,r.scaleY=r.height/l.height,"auto"==(a=t.opts.zoomOpacity)&&(a=.1<Math.abs(t.width/t.height-l.width/l.height)),a&&(l.opacity=.1,r.opacity=1),f.modulaFancybox.setTranslate(t.$content.removeClass("modula-fancybox-is-hidden"),l),p(t.$content),void f.modulaFancybox.animate(t.$content,r,n,function(){i.isAnimating=!1,i.complete()})):(i.updateSlide(t),e?(f.modulaFancybox.stop(s),o="modula-fancybox-slide--"+(t.pos>=i.prevPos?"next":"previous")+" modula-fancybox-animated modula-fancybox-fx-"+e,s.addClass(o).removeClass("modula-fancybox-slide--current"),t.$content.removeClass("modula-fancybox-is-hidden"),p(s),"image"!==t.type&&t.$content.hide().show(0),void f.modulaFancybox.animate(s,"modula-fancybox-slide--current",n,function(){s.removeClass(o).css({transform:"",opacity:""}),t.pos===i.currPos&&i.complete()},!0)):(t.$content.removeClass("modula-fancybox-is-hidden"),d||!c||"image"!==t.type||t.hasError||t.$content.hide().fadeIn("fast"),void(t.pos===i.currPos&&i.complete())))},getThumbPos:function(t){var e,o,n,a,i=t.$thumb;return!!(i&&(a=(n=i).find("a.tile-inner")[0])&&a.ownerDocument===s&&(f(".modula-fancybox-container").css("pointer-events","none"),n={x:a.getBoundingClientRect().left+a.offsetWidth/2,y:a.getBoundingClientRect().top+a.offsetHeight/2},a=s.elementFromPoint(n.x,n.y)===a,f(".modula-fancybox-container").css("pointer-events",""),a))&&(o=f.modulaFancybox.getTranslate(i),t=parseFloat(i.css("border-top-width")||0),n=parseFloat(i.css("border-right-width")||0),a=parseFloat(i.css("border-bottom-width")||0),i=parseFloat(i.css("border-left-width")||0),e={top:o.top+t,left:o.left+i,width:o.width-n-i,height:o.height-t-a,scaleX:1,scaleY:1},0<o.width&&0<o.height&&e)},complete:function(){var t,o=this,e=o.current,n={};!o.isMoved()&&e.isLoaded&&(e.isComplete||(e.isComplete=!0,e.$slide.siblings().trigger("onReset"),o.preload("inline"),p(e.$slide),e.$slide.addClass("modula-fancybox-slide--complete"),f.each(o.slides,function(t,e){e.pos>=o.currPos-1&&e.pos<=o.currPos+1?n[e.pos]=e:e&&(f.modulaFancybox.stop(e.$slide),e.$slide.off().remove())}),o.slides=n),o.isAnimating=!1,o.updateCursor(),o.trigger("afterShow"),e.opts.video.autoStart&&e.$slide.find("video,audio").filter(":visible:first").trigger("play").one("ended",function(){Document.exitFullscreen?Document.exitFullscreen():this.webkitExitFullscreen&&this.webkitExitFullscreen(),o.next()}),e.opts.autoFocus&&"html"===e.contentType&&((t=e.$content.find("input[autofocus]:enabled:visible:first")).length?t.trigger("focus"):o.focus(null,!0)),e.$slide.scrollTop(0).scrollLeft(0))},preload:function(t){var e,o,n=this;n.group.length<2||(o=n.slides[n.currPos+1],(e=n.slides[n.currPos-1])&&e.type===t&&n.loadSlide(e),o&&o.type===t&&n.loadSlide(o))},focus:function(t,e){var o=this,n=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"])'].join(",");o.isClosing||((e=(e=!t&&o.current&&o.current.isComplete?o.current.$slide.find("*:visible"+(e?":not(.modula-fancybox-close-small)":"")):o.$refs.container.find("*:visible")).filter(n).filter(function(){return"hidden"!==f(this).css("visibility")&&!f(this).hasClass("disabled")})).length?(n=e.index(s.activeElement),t&&t.shiftKey?(n<0||0==n)&&(t.preventDefault(),e.eq(e.length-1).trigger("focus")):(n<0||n==e.length-1)&&(t&&t.preventDefault(),e.eq(0).trigger("focus"))):o.$refs.container.trigger("focus"))},activate:function(){var e=this;f(".modula-fancybox-container").each(function(){var t=f(this).data("modulaFancyBox");t&&t.id!==e.id&&!t.isClosing&&(t.trigger("onDeactivate"),t.removeEvents(),t.isVisible=!1)}),e.isVisible=!0,(e.current||e.isIdle)&&(e.update(),e.updateControls()),e.trigger("onActivate"),e.addEvents()},close:function(t,e){function o(){l.cleanUp(t)}var n,a,i,s,r,l=this,c=l.current;return!l.isClosing&&(!(l.isClosing=!0)===l.trigger("beforeClose",t)?(l.isClosing=!1,d(function(){l.update()}),!1):(l.removeEvents(),i=c.$content,n=c.opts.animationEffect,a=f.isNumeric(e)?e:n?c.opts.animationDuration:0,c.$slide.removeClass("modula-fancybox-slide--complete modula-fancybox-slide--next modula-fancybox-slide--previous modula-fancybox-animated"),!0!==t?f.modulaFancybox.stop(c.$slide):n=!1,c.$slide.siblings().trigger("onReset").remove(),a&&l.$refs.container.removeClass("modula-fancybox-is-open").addClass("modula-fancybox-is-closing").css("transition-duration",a+"ms"),l.hideLoading(c),l.hideControls(!0),l.updateCursor(),"zoom"!==n||i&&a&&"image"===c.type&&!l.isMoved()&&!c.hasError&&(r=l.getThumbPos(c))||(n="fade"),"zoom"===n?(f.modulaFancybox.stop(i),e={top:(s=f.modulaFancybox.getTranslate(i)).top,left:s.left,scaleX:s.width/r.width,scaleY:s.height/r.height,width:r.width,height:r.height},"auto"==(s=c.opts.zoomOpacity)&&(s=.1<Math.abs(c.width/c.height-r.width/r.height)),s&&(r.opacity=0),f.modulaFancybox.setTranslate(i,e),p(i),f.modulaFancybox.animate(i,r,a,o)):n&&a?f.modulaFancybox.animate(c.$slide.addClass("modula-fancybox-slide--previous").removeClass("modula-fancybox-slide--current"),"modula-fancybox-animated modula-fancybox-fx-"+n,a,o):!0===t?setTimeout(o,a):o(),!0))},cleanUp:function(t){var e,o=this,n=o.current.opts.$orig;o.current.$slide.trigger("onReset"),o.$refs.container.empty().remove(),o.trigger("afterClose",t),o.current.opts.backFocus&&(n&&n.length&&n.is(":visible")||(n=o.$trigger),n&&n.length&&(e=l.scrollX,t=l.scrollY,n.trigger("focus"),f("html, body").scrollTop(t).scrollLeft(e))),o.current=null,(o=f.modulaFancybox.getInstance())?o.activate():(f("body").removeClass("modula-fancybox-active compensate-for-scrollbar"),f("#modula-fancybox-style-noscroll").remove())},trigger:function(t,e){var o,n=Array.prototype.slice.call(arguments,1),a=this,e=e&&e.opts?e:a.current;if(e?n.unshift(e):e=a,n.unshift(a),f.isFunction(e.opts[t])&&(o=e.opts[t].apply(e,n)),!1===o)return o;("afterClose"!==t&&a.$refs?a.$refs.container:i).trigger(t+".fb",n)},updateControls:function(){var t=this,e=t.current,o=e.index,n=t.$refs.container,a=t.$refs.caption,i=e.opts.caption;e.$slide.trigger("refresh"),i&&i.length?(t.$caption=a).children().eq(0).html(i):t.$caption=null,t.hasHiddenControls||t.isIdle||t.showControls(),n.find("[data-fancybox-count]").html(t.group.length),n.find("[data-fancybox-index]").html(o+1),n.find("[data-fancybox-prev]").prop("disabled",!e.opts.loop&&o<=0),n.find("[data-fancybox-next]").prop("disabled",!e.opts.loop&&o>=t.group.length-1),"image"===e.type?n.find("[data-fancybox-zoom]").show().end().find("[data-fancybox-download]").attr("href",e.opts.image.src||e.src).show():e.opts.toolbar&&n.find("[data-fancybox-download],[data-fancybox-zoom]").hide(),f(s.activeElement).is(":hidden,[disabled]")&&t.$refs.container.trigger("focus")},hideControls:function(t){var e=["infobar","toolbar","nav"];!t&&this.current.opts.preventCaptionOverlap||e.push("caption"),this.$refs.container.removeClass(e.map(function(t){return"modula-fancybox-show-"+t}).join(" ")),this.hasHiddenControls=!0},showControls:function(){var t=this,e=(t.current||t).opts,o=t.$refs.container;t.hasHiddenControls=!1,t.idleSecondsCounter=0,o.toggleClass("modula-fancybox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("modula-fancybox-show-infobar",!!(e.infobar&&1<t.group.length)).toggleClass("modula-fancybox-show-caption",!!t.$caption).toggleClass("modula-fancybox-show-nav",!!(e.arrows&&1<t.group.length)).toggleClass("modula-fancybox-is-modal",!!e.modal)},toggleControls:function(){this.hasHiddenControls?this.showControls():this.hideControls()}}),f.modulaFancybox={version:"3.5.7",defaults:t,getInstance:function(t){var e=f('.modula-fancybox-container:not(".modula-fancybox-is-closing"):last').data("modulaFancyBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof n&&("string"===f.type(t)?e[t].apply(e,o):"function"===f.type(t)&&t.apply(e,o),e)},open:function(t,e,o){return new n(t,e,o)},close:function(t){var e=this.getInstance();e&&(e.close(),!0===t&&this.close(t))},destroy:function(){this.close(!0),i.add("body").off("click.fb-start","**")},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:(t=s.createElement("div"),l.getComputedStyle&&l.getComputedStyle(t)&&l.getComputedStyle(t).getPropertyValue("transform")&&!(s.documentMode&&s.documentMode<11)),getTranslate:function(t){var e;return!(!t||!t.length)&&{top:(e=t[0].getBoundingClientRect()).top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css("opacity"))}},setTranslate:function(t,e){var o="",n={};if(t&&e)return e.left===m&&e.top===m||(o=(e.left===m?t.position():e).left+"px, "+(e.top===m?t.position():e).top+"px",o=this.use3d?"translate3d("+o+", 0px)":"translate("+o+")"),e.scaleX!==m&&e.scaleY!==m?o+=" scale("+e.scaleX+", "+e.scaleY+")":e.scaleX!==m&&(o+=" scaleX("+e.scaleX+")"),o.length&&(n.transform=o),e.opacity!==m&&(n.opacity=e.opacity),e.width!==m&&(n.width=e.width),e.height!==m&&(n.height=e.height),t.css(n)},animate:function(e,o,n,a,i){var s,r=this;f.isFunction(n)&&(a=n,n=null),r.stop(e),s=r.getTranslate(e),e.on(c,function(t){t&&t.originalEvent&&(!e.is(t.originalEvent.target)||"z-index"==t.originalEvent.propertyName)||(r.stop(e),f.isNumeric(n)&&e.css("transition-duration",""),f.isPlainObject(o)?o.scaleX!==m&&o.scaleY!==m&&r.setTranslate(e,{top:o.top,left:o.left,width:s.width*o.scaleX,height:s.height*o.scaleY,scaleX:1,scaleY:1}):!0!==i&&e.removeClass(o),f.isFunction(a)&&a(t))}),f.isNumeric(n)&&e.css("transition-duration",n+"ms"),f.isPlainObject(o)?(o.scaleX!==m&&o.scaleY!==m&&(delete o.width,delete o.height,e.parent().hasClass("modula-fancybox-slide--image")&&e.parent().addClass("modula-fancybox-is-scaling")),f.modulaFancybox.setTranslate(e,o)):e.addClass(o),e.data("timer",setTimeout(function(){e.trigger(c)},n+33))},stop:function(t,e){t&&t.length&&(clearTimeout(t.data("timer")),e&&t.trigger(c),t.off(c).css("transition-duration",""),t.parent().removeClass("modula-fancybox-is-scaling"))}},f.fn.modulaFancybox=function(t){var e;return(e=(t=t||{}).selector||!1)?f("body").off("click.fb-start",e).on("click.fb-start",e,{options:t},b):this.off("click.fb-start").on("click.fb-start",{items:this,options:t},b),this},i.on("click.fb-start","[data-fancybox]",b),i.on("click.fb-start","[data-fancybox-trigger]",function(t){f('[data-fancybox="'+f(this).attr("data-fancybox-trigger")+'"]').eq(f(this).attr("data-fancybox-index")||0).trigger("click.fb-start",{$trigger:f(this)})}),o=".modula-fancybox-button",h="modula-fancybox-focus",g=null,i.on("mousedown mouseup focus blur",o,function(t){switch(t.type){case"mousedown":g=f(this);break;case"mouseup":g=null;break;case"focusin":f(o).removeClass(h),f(this).is(g)||f(this).is("[disabled]")||f(this).addClass(h);break;case"focusout":f(o).removeClass(h)}})))}(window,document,jQuery),function(h){"use strict";function f(o,t,e){if(o)return e=e||"","object"===h.type(e)&&(e=h.param(e,!0)),h.each(t,function(t,e){o=o.replace("$"+t,e||"")}),e.length&&(o+=(0<o.indexOf("?")?"&":"?")+e),o}var n={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"https://www.youtube-nocookie.com/embed/$4",thumb:"https://img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12]+"").replace(/\?/,"&")+"&output="+(t[12]&&0<t[12].indexOf("layer=c")?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}};h(document).on("objectNeedsType.fb",function(t,e,a){var i,s,r,l,c,d,u=a.src||"",p=!1,o=h.extend(!0,{},n,a.opts.media);h.each(o,function(t,e){if(s=u.match(e.matcher)){if(p=e.type,d=t,c={},e.paramPlace&&s[e.paramPlace]){"?"==(l=s[e.paramPlace])[0]&&(l=l.substring(1)),l=l.split("&");for(var o=0;o<l.length;++o){var n=l[o].split("=",2);2==n.length&&(c[n[0]]=decodeURIComponent(n[1].replace(/\+/g," ")))}}return r=h.extend(!0,{},e.params,a.opts[t],c),u="function"===h.type(e.url)?e.url.call(this,s,r,a):f(e.url,s,r),i="function"===h.type(e.thumb)?e.thumb.call(this,s,r,a):f(e.thumb,s),"youtube"===t?u=u.replace(/&t=(\d+)/,function(t,e){return"&start="+e}):"vimeo"===t&&(u=u.replace("&%23","#")),!1}}),p?(a.opts.thumb||a.opts.$thumb&&a.opts.$thumb.length||(a.opts.thumb=i),"iframe"===p&&(a.opts=h.extend(!0,a.opts,{iframe:{preload:!1,attr:{scrolling:"no"}}})),h.extend(a,{type:p,src:u,origSrc:a.src,contentSource:d,contentType:"image"===p?"image":"gmap_place"==d||"gmap_search"==d?"map":"video"})):u&&(a.type=a.opts.defaultType)});var a={youtube:{src:"https://www.youtube.com/iframe_api",class:"YT",loading:!1,loaded:!1},vimeo:{src:"https://player.vimeo.com/api/player.js",class:"Vimeo",loading:!1,loaded:!1},load:function(t){var e,o=this;this[t].loaded?setTimeout(function(){o.done(t)}):this[t].loading||(this[t].loading=!0,(e=document.createElement("script")).type="text/javascript",e.src=this[t].src,"youtube"===t?window.onYouTubeIframeAPIReady=function(){o[t].loaded=!0,o.done(t)}:e.onload=function(){o[t].loaded=!0,o.done(t)},document.body.appendChild(e))},done:function(t){var e,o;"youtube"===t&&delete window.onYouTubeIframeAPIReady,(e=h.modulaFancybox.getInstance())&&(o=e.current.$content.find("iframe"),"youtube"===t&&void 0!==YT&&YT?new YT.Player(o.attr("id"),{events:{onStateChange:function(t){0==t.data&&e.next()}}}):"vimeo"===t&&void 0!==Vimeo&&Vimeo&&new Vimeo.Player(o).on("ended",function(){e.next()}))}};h(document).on({"afterShow.fb":function(t,e,o){1<e.group.length&&("youtube"===o.contentSource||"vimeo"===o.contentSource)&&a.load(o.contentSource)}})}(jQuery),function(d,l,u){"use strict";function p(t){var e,o=[];for(e in t=(t=t.originalEvent||t||d.e).touches&&t.touches.length?t.touches:t.changedTouches&&t.changedTouches.length?t.changedTouches:[t])t[e].pageX?o.push({x:t[e].pageX,y:t[e].pageY}):t[e].clientX&&o.push({x:t[e].clientX,y:t[e].clientY});return o}function h(t,e,o){return e&&t?"x"===o?t.x-e.x:"y"===o?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function c(t){if(t.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio,iframe')||u.isFunction(t.get(0).onclick)||t.data("selectable"))return 1;for(var e=0,o=t[0].attributes,n=o.length;e<n;e++)if("data-fancybox-"===o[e].nodeName.substr(0,14))return 1}function f(t){for(var e,o,n,a=!1;e=t.get(0),o=n=o=void 0,o=d.getComputedStyle(e)["overflow-y"],n=d.getComputedStyle(e)["overflow-x"],o=("scroll"===o||"auto"===o)&&e.scrollHeight>e.clientHeight,e=("scroll"===n||"auto"===n)&&e.scrollWidth>e.clientWidth,!(a=o||e)&&(t=t.parent()).length&&!t.hasClass("modula-fancybox-stage")&&!t.is("body"););return a}function o(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on("touchstart.fb.touch mousedown.fb.touch",u.proxy(e,"ontouchstart"))}var m=d.requestAnimationFrame||d.webkitRequestAnimationFrame||d.mozRequestAnimationFrame||d.oRequestAnimationFrame||function(t){return d.setTimeout(t,1e3/60)},g=d.cancelAnimationFrame||d.webkitCancelAnimationFrame||d.mozCancelAnimationFrame||d.oCancelAnimationFrame||function(t){d.clearTimeout(t)};o.prototype.destroy=function(){var t=this;t.$container.off(".fb.touch"),u(l).off(".fb.touch"),t.requestId&&(g(t.requestId),t.requestId=null),t.tapped&&(clearTimeout(t.tapped),t.tapped=null)},o.prototype.ontouchstart=function(t){var e=this,o=u(t.target),n=e.instance,a=n.current,i=a.$slide,s=a.$content,r="touchstart"==t.type;if(r&&e.$container.off("mousedown.fb.touch"),(!t.originalEvent||2!=t.originalEvent.button)&&i.length&&o.length&&!c(o)&&!c(o.parent())&&(o.is("img")||!(t.originalEvent.clientX>o[0].clientWidth+o.offset().left))){if(!a||n.isAnimating||a.$slide.hasClass("modula-fancybox-animated"))return t.stopPropagation(),void t.preventDefault();e.realPoints=e.startPoints=p(t),e.startPoints.length&&(a.touch&&t.stopPropagation(),e.startEvent=t,e.canTap=!0,e.$target=o,e.$content=s,e.opts=a.opts.touch,e.isPanning=!1,e.isSwiping=!1,e.isZooming=!1,e.isScrolling=!1,e.canPan=n.canPan(),e.startTime=(new Date).getTime(),e.distanceX=e.distanceY=e.distance=0,e.canvasWidth=Math.round(i[0].clientWidth),e.canvasHeight=Math.round(i[0].clientHeight),e.contentLastPos=null,e.contentStartPos=u.modulaFancybox.getTranslate(e.$content)||{top:0,left:0},e.sliderStartPos=u.modulaFancybox.getTranslate(i),e.stagePos=u.modulaFancybox.getTranslate(n.$refs.stage),e.sliderStartPos.top-=e.stagePos.top,e.sliderStartPos.left-=e.stagePos.left,e.contentStartPos.top-=e.stagePos.top,e.contentStartPos.left-=e.stagePos.left,u(l).off(".fb.touch").on(r?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",u.proxy(e,"ontouchend")).on(r?"touchmove.fb.touch":"mousemove.fb.touch",u.proxy(e,"ontouchmove")),u.modulaFancybox.isMobile&&l.addEventListener("scroll",e.onscroll,!0),((e.opts||e.canPan)&&(o.is(e.$stage)||e.$stage.find(o).length)||(o.is(".modula-fancybox-image")&&t.preventDefault(),u.modulaFancybox.isMobile&&o.parents(".modula-fancybox-caption").length))&&(e.isScrollable=f(o)||f(o.parent()),u.modulaFancybox.isMobile&&e.isScrollable||t.preventDefault(),1!==e.startPoints.length&&!a.hasError||(e.canPan?(u.modulaFancybox.stop(e.$content),e.isPanning=!0):e.isSwiping=!0,e.$container.addClass("modula-fancybox-is-grabbing")),2===e.startPoints.length&&"image"===a.type&&(a.isLoaded||a.$ghost)&&(e.canTap=!1,e.isSwiping=!1,e.isPanning=!1,e.isZooming=!0,u.modulaFancybox.stop(e.$content),e.centerPointStartX=.5*(e.startPoints[0].x+e.startPoints[1].x)-u(d).scrollLeft(),e.centerPointStartY=.5*(e.startPoints[0].y+e.startPoints[1].y)-u(d).scrollTop(),e.percentageOfImageAtPinchPointX=(e.centerPointStartX-e.contentStartPos.left)/e.contentStartPos.width,e.percentageOfImageAtPinchPointY=(e.centerPointStartY-e.contentStartPos.top)/e.contentStartPos.height,e.startDistanceBetweenFingers=h(e.startPoints[0],e.startPoints[1]))))}},o.prototype.onscroll=function(t){this.isScrolling=!0,l.removeEventListener("scroll",this.onscroll,!0)},o.prototype.ontouchmove=function(t){var e=this;void 0===t.originalEvent.buttons||0!==t.originalEvent.buttons?e.isScrolling?e.canTap=!1:(e.newPoints=p(t),(e.opts||e.canPan)&&e.newPoints.length&&e.newPoints.length&&(e.isSwiping&&!0===e.isSwiping||t.preventDefault(),e.distanceX=h(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=h(e.newPoints[0],e.startPoints[0],"y"),e.distance=h(e.newPoints[0],e.startPoints[0]),0<e.distance&&(e.isSwiping?e.onSwipe(t):e.isPanning?e.onPan():e.isZooming&&e.onZoom()))):e.ontouchend(t)},o.prototype.onSwipe=function(t){var a=this,i=a.instance,e=a.isSwiping,o=a.sliderStartPos.left||0;if(!0!==e)"x"==e&&(0<a.distanceX&&(a.instance.group.length<2||0===a.instance.current.index&&!a.instance.current.opts.loop)?o+=Math.pow(a.distanceX,.8):a.distanceX<0&&(a.instance.group.length<2||a.instance.current.index===a.instance.group.length-1&&!a.instance.current.opts.loop)?o-=Math.pow(-a.distanceX,.8):o+=a.distanceX),a.sliderLastPos={top:"x"==e?0:a.sliderStartPos.top+a.distanceY,left:o},a.requestId&&(g(a.requestId),a.requestId=null),a.requestId=m(function(){a.sliderLastPos&&(u.each(a.instance.slides,function(t,e){var o=e.pos-a.instance.currPos;u.modulaFancybox.setTranslate(e.$slide,{top:a.sliderLastPos.top,left:a.sliderLastPos.left+o*a.canvasWidth+o*e.opts.gutter})}),a.$container.addClass("modula-fancybox-is-sliding"))});else if(10<Math.abs(a.distance)){if(a.canTap=!1,i.group.length<2&&a.opts.vertical?a.isSwiping="y":i.isDragging||!1===a.opts.vertical||"auto"===a.opts.vertical&&800<u(d).width()?a.isSwiping="x":(o=Math.abs(180*Math.atan2(a.distanceY,a.distanceX)/Math.PI),a.isSwiping=45<o&&o<135?"y":"x"),"y"===a.isSwiping&&u.modulaFancybox.isMobile&&a.isScrollable)return void(a.isScrolling=!0);i.isDragging=a.isSwiping,a.startPoints=a.newPoints,u.each(i.slides,function(t,e){var o,n;u.modulaFancybox.stop(e.$slide),o=u.modulaFancybox.getTranslate(e.$slide),n=u.modulaFancybox.getTranslate(i.$refs.stage),e.$slide.css({transform:"",opacity:"","transition-duration":""}).removeClass("modula-fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)modula-fancybox-fx-\S+/g)||[]).join(" ")}),e.pos===i.current.pos&&(a.sliderStartPos.top=o.top-n.top,a.sliderStartPos.left=o.left-n.left),u.modulaFancybox.setTranslate(e.$slide,{top:o.top-n.top,left:o.left-n.left})}),i.SlideShow&&i.SlideShow.isActive&&i.SlideShow.stop()}},o.prototype.onPan=function(){var t=this;h(t.newPoints[0],t.realPoints[0])<(u.modulaFancybox.isMobile?10:5)?t.startPoints=t.newPoints:(t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&g(t.requestId),t.requestId=m(function(){u.modulaFancybox.setTranslate(t.$content,t.contentLastPos)}))},o.prototype.limitMovement=function(){var t=this,e=t.canvasWidth,o=t.canvasHeight,n=t.distanceX,a=t.distanceY,i=t.contentStartPos,s=i.left,r=i.top,l=i.width,c=i.height,d=e<l?s+n:s,u=r+a,t=Math.max(0,.5*e-.5*l),i=Math.max(0,.5*o-.5*c),l=Math.min(e-l,.5*e-.5*l),c=Math.min(o-c,.5*o-.5*c);return 0<n&&t<d&&(d=t-1+Math.pow(-t+s+n,.8)||0),n<0&&d<l&&(d=l+1-Math.pow(l-s-n,.8)||0),0<a&&i<u&&(u=i-1+Math.pow(-i+r+a,.8)||0),a<0&&u<c&&(u=c+1-Math.pow(c-r-a,.8)||0),{top:u,left:d}},o.prototype.limitPosition=function(t,e,o,n){var a=this.canvasWidth,i=this.canvasHeight;return t=a<o?(t=0<t?0:t)<a-o?a-o:t:Math.max(0,a/2-o/2),{top:e=i<n?(e=0<e?0:e)<i-n?i-n:e:Math.max(0,i/2-n/2),left:t}},o.prototype.onZoom=function(){var t=this,e=t.contentStartPos,o=e.width,n=e.height,a=e.left,i=e.top,s=h(t.newPoints[0],t.newPoints[1])/t.startDistanceBetweenFingers,r=Math.floor(o*s),l=Math.floor(n*s),c=(o-r)*t.percentageOfImageAtPinchPointX,e=(n-l)*t.percentageOfImageAtPinchPointY,o=(t.newPoints[0].x+t.newPoints[1].x)/2-u(d).scrollLeft(),n=(t.newPoints[0].y+t.newPoints[1].y)/2-u(d).scrollTop(),o=o-t.centerPointStartX,s={top:i+(e+(n-t.centerPointStartY)),left:a+(c+o),scaleX:s,scaleY:s};t.canTap=!1,t.newWidth=r,t.newHeight=l,t.contentLastPos=s,t.requestId&&g(t.requestId),t.requestId=m(function(){u.modulaFancybox.setTranslate(t.$content,t.contentLastPos)})},o.prototype.ontouchend=function(t){var e=this,o=e.isSwiping,n=e.isPanning,a=e.isZooming,i=e.isScrolling;if(e.endPoints=p(t),e.dMs=Math.max((new Date).getTime()-e.startTime,1),e.$container.removeClass("modula-fancybox-is-grabbing"),u(l).off(".fb.touch"),l.removeEventListener("scroll",e.onscroll,!0),e.requestId&&(g(e.requestId),e.requestId=null),e.isSwiping=!1,e.isPanning=!1,e.isZooming=!1,e.isScrolling=!1,e.instance.isDragging=!1,e.canTap)return e.onTap(t);e.speed=100,e.velocityX=e.distanceX/e.dMs*.5,e.velocityY=e.distanceY/e.dMs*.5,n?e.endPanning():a?e.endZooming():e.endSwiping(o,i)},o.prototype.endSwiping=function(t,e){var o=this,n=!1,a=o.instance.group.length,i=Math.abs(o.distanceX),i="x"==t&&1<a&&(130<o.dMs&&10<i||50<i);o.sliderLastPos=null,"y"==t&&!e&&50<Math.abs(o.distanceY)?(u.modulaFancybox.animate(o.instance.current.$slide,{top:o.sliderStartPos.top+o.distanceY+150*o.velocityY,opacity:0},200),n=o.instance.close(!0,250)):i&&0<o.distanceX?n=o.instance.previous(300):i&&o.distanceX<0&&(n=o.instance.next(300)),!1!==n||"x"!=t&&"y"!=t||o.instance.centerSlide(200),o.$container.removeClass("modula-fancybox-is-sliding")},o.prototype.endPanning=function(){var t,e,o=this;o.contentLastPos&&(e=!1===o.opts.momentum||350<o.dMs?(t=o.contentLastPos.left,o.contentLastPos.top):(t=o.contentLastPos.left+500*o.velocityX,o.contentLastPos.top+500*o.velocityY),(e=o.limitPosition(t,e,o.contentStartPos.width,o.contentStartPos.height)).width=o.contentStartPos.width,e.height=o.contentStartPos.height,u.modulaFancybox.animate(o.$content,e,366))},o.prototype.endZooming=function(){var t,e,o,n=this,a=n.instance.current,i=n.newWidth,s=n.newHeight;n.contentLastPos&&(t=n.contentLastPos.left,o={top:e=n.contentLastPos.top,left:t,width:i,height:s,scaleX:1,scaleY:1},u.modulaFancybox.setTranslate(n.$content,o),i<n.canvasWidth&&s<n.canvasHeight?n.instance.scaleToFit(150):i>a.width||s>a.height?n.instance.scaleToActual(n.centerPointStartX,n.centerPointStartY,150):(s=n.limitPosition(t,e,i,s),u.modulaFancybox.animate(n.$content,s,150)))},o.prototype.onTap=function(e){function t(t){if(t=s.opts[t],u.isFunction(t)&&(t=t.apply(i,[s,e])),t)switch(t){case"close":i.close(n.startEvent);break;case"toggleControls":i.toggleControls();break;case"next":i.next();break;case"nextOrClose":1<i.group.length?i.next():i.close(n.startEvent);break;case"zoom":"image"==s.type&&(s.isLoaded||s.$ghost)&&(i.canPan()?i.scaleToFit():i.isScaledDown()?i.scaleToActual(l,c):i.group.length<2&&i.close(n.startEvent))}}var o,n=this,a=u(e.target),i=n.instance,s=i.current,r=e&&p(e)||n.startPoints,l=r[0]?r[0].x-u(d).scrollLeft()-n.stagePos.left:0,c=r[0]?r[0].y-u(d).scrollTop()-n.stagePos.top:0;if((!e.originalEvent||2!=e.originalEvent.button)&&(a.is("img")||!(l>a[0].clientWidth+a.offset().left))){if(a.is(".modula-fancybox-bg,.modula-fancybox-inner,.modula-fancybox-outer,.modula-fancybox-container"))o="Outside";else if(a.is(".modula-fancybox-slide"))o="Slide";else{if(!i.current.$content||!i.current.$content.find(a).addBack().filter(a).length)return;o="Content"}if(n.tapped){if(clearTimeout(n.tapped),n.tapped=null,50<Math.abs(l-n.tapX)||50<Math.abs(c-n.tapY))return this;t("dblclick"+o)}else n.tapX=l,n.tapY=c,s.opts["dblclick"+o]&&s.opts["dblclick"+o]!==s.opts["click"+o]?n.tapped=setTimeout(function(){n.tapped=null,i.isAnimating||t("click"+o)},500):t("click"+o);return this}},u(l).on("onActivate.fb",function(t,e){e&&!e.Guestures&&(e.Guestures=new o(e))}).on("beforeClose.fb",function(t,e){e&&e.Guestures&&e.Guestures.destroy()})}(window,document,jQuery),function(i,s){"use strict";function o(t){this.instance=t,this.init()}s.extend(!0,s.modulaFancybox.defaults,{btnTpl:{slideShow:'<button data-fancybox-play class="modula-fancybox-button modula-fancybox-button--play" title="{{PLAY_START}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6.5 5.4v13.2l11-6.6z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.33 5.75h2.2v12.5h-2.2V5.75zm5.15 0h2.2v12.5h-2.2V5.75z"/></svg></button>'},slideShow:{autoStart:!1,speed:3e3,progress:!0}}),s.extend(o.prototype,{timer:null,isActive:!1,$button:null,init:function(){var t=this,e=t.instance,o=e.group[e.currIndex].opts.slideShow;t.$button=e.$refs.toolbar.find("[data-fancybox-play]").on("click",function(){t.toggle()}),e.group.length<2||!o?t.$button.hide():o.progress&&(t.$progress=s('<div class="modula-fancybox-progress"></div>').appendTo(e.$refs.inner))},set:function(t){var e=this,o=e.instance,n=o.current;n&&(!0===t||n.opts.loop||o.currIndex<o.group.length-1)?e.isActive&&"video"!==n.contentType&&(e.$progress&&s.modulaFancybox.animate(e.$progress.show(),{scaleX:1},n.opts.slideShow.speed),e.timer=setTimeout(function(){o.current.opts.loop||o.current.index!=o.group.length-1?o.next():o.jumpTo(0)},n.opts.slideShow.speed)):(e.stop(),o.idleSecondsCounter=0,o.showControls())},clear:function(){clearTimeout(this.timer),this.timer=null,this.$progress&&this.$progress.removeAttr("style").hide()},start:function(){var t=this,e=t.instance.current;e&&(t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_STOP).removeClass("modula-fancybox-button--play").addClass("modula-fancybox-button--pause"),t.isActive=!0,e.isComplete&&t.set(!0),t.instance.trigger("onSlideShowChange",!0))},stop:function(){var t=this,e=t.instance.current;t.clear(),t.$button.attr("title",(e.opts.i18n[e.opts.lang]||e.opts.i18n.en).PLAY_START).removeClass("modula-fancybox-button--pause").addClass("modula-fancybox-button--play"),t.isActive=!1,t.instance.trigger("onSlideShowChange",!1),t.$progress&&t.$progress.removeAttr("style").hide()},toggle:function(){this.isActive?this.stop():this.start()}}),s(i).on({"onInit.fb":function(t,e){e&&!e.SlideShow&&(e.SlideShow=new o(e))},"beforeShow.fb":function(t,e,o,n){e=e&&e.SlideShow;n?e&&o.opts.slideShow.autoStart&&e.start():e&&e.isActive&&e.clear()},"afterShow.fb":function(t,e,o){e=e&&e.SlideShow;e&&e.isActive&&e.set()},"afterKeydown.fb":function(t,e,o,n,a){e=e&&e.SlideShow;!e||!o.opts.slideShow||80!==a&&32!==a||s(i.activeElement).is("button,a,input")||(n.preventDefault(),e.toggle())},"beforeClose.fb onDeactivate.fb":function(t,e){e=e&&e.SlideShow;e&&e.stop()}}),s(i).on("visibilitychange",function(){var t=s.modulaFancybox.getInstance(),t=t&&t.SlideShow;t&&t.isActive&&(i.hidden?t.clear():t.set())})}(document,jQuery),function(i,o){"use strict";var n,a=function(){for(var t=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],e={},o=0;o<t.length;o++){var n=t[o];if(n&&n[1]in i){for(var a=0;a<n.length;a++)e[t[0][a]]=n[a];return e}}return!1}();a&&(n={request:function(t){(t=t||i.documentElement)[a.requestFullscreen](t.ALLOW_KEYBOARD_INPUT)},exit:function(){i[a.exitFullscreen]()},toggle:function(t){t=t||i.documentElement,this.isFullscreen()?this.exit():this.request(t)},isFullscreen:function(){return Boolean(i[a.fullscreenElement])},enabled:function(){return Boolean(i[a.fullscreenEnabled])}},o.extend(!0,o.modulaFancybox.defaults,{btnTpl:{fullScreen:'<button data-fancybox-fullscreen class="modula-fancybox-button modula-fancybox-button--fsenter" title="{{FULL_SCREEN}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/></svg><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 16h3v3h2v-5H5zm3-8H5v2h5V5H8zm6 11h2v-3h3v-2h-5zm2-11V5h-2v5h5V8z"/></svg></button>'},fullScreen:{autoStart:!1}}),o(i).on(a.fullscreenchange,function(){var t=n.isFullscreen(),e=o.modulaFancybox.getInstance();e&&(e.current&&"image"===e.current.type&&e.isAnimating&&(e.isAnimating=!1,e.update(!0,!0,0),e.isComplete||e.complete()),e.trigger("onFullscreenChange",t),e.$refs.container.toggleClass("modula-fancybox-is-fullscreen",t),e.$refs.toolbar.find("[data-fancybox-fullscreen]").toggleClass("modula-fancybox-button--fsenter",!t).toggleClass("modula-fancybox-button--fsexit",t))})),o(i).on({"onInit.fb":function(t,e){a?e&&e.group[e.currIndex].opts.fullScreen?(e.$refs.container.on("click.fb-fullscreen","[data-fancybox-fullscreen]",function(t){t.stopPropagation(),t.preventDefault(),n.toggle()}),e.opts.fullScreen&&!0===e.opts.fullScreen.autoStart&&n.request(),e.FullScreen=n):e&&e.$refs.toolbar.find("[data-fancybox-fullscreen]").hide():e.$refs.toolbar.find("[data-fancybox-fullscreen]").remove()},"afterKeydown.fb":function(t,e,o,n,a){e&&e.FullScreen&&70===a&&(n.preventDefault(),e.FullScreen.toggle())},"beforeClose.fb":function(t,e){e&&e.FullScreen&&e.$refs.container.hasClass("modula-fancybox-is-fullscreen")&&n.exit()}})}(document,jQuery),function(t,i){"use strict";var s="modula-fancybox-thumbs",r=s+"-active";function n(t){this.init(t)}i.modulaFancybox.defaults=i.extend(!0,{btnTpl:{thumbs:'<button data-fancybox-thumbs class="modula-fancybox-button modula-fancybox-button--thumbs" title="{{THUMBS}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14.59 14.59h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76h-3.76v-3.76zm-4.47 0h3.76v3.76H5.65v-3.76zm8.94-4.47h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76h-3.76V5.65zm-4.47 0h3.76v3.76H5.65V5.65z"/></svg></button>'},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".modula-fancybox-container",axis:"y"}},i.modulaFancybox.defaults),i.extend(n.prototype,{$button:null,$grid:null,$list:null,isVisible:!1,isActive:!1,init:function(t){var e=this,o=t.group,n=0;e.instance=t,e.opts=o[t.currIndex].opts.thumbs,(t.Thumbs=e).$button=t.$refs.toolbar.find("[data-fancybox-thumbs]");for(var a=0,i=o.length;a<i&&(o[a].thumb&&n++,!(1<n));a++);1<n&&e.opts?(e.$button.removeAttr("style").on("click",function(){e.toggle()}),e.isActive=!0):e.$button.hide()},create:function(){var o,t=this,e=t.instance,n=t.opts.parentEl,a=[];t.$grid||(t.$grid=i('<div class="'+s+" "+s+"-"+t.opts.axis+'"></div>').appendTo(e.$refs.container.find(n).addBack().filter(n)),t.$grid.on("click","a",function(){e.jumpTo(i(this).attr("data-index"))})),t.$list||(t.$list=i('<div class="'+s+'__list">').appendTo(t.$grid)),i.each(e.group,function(t,e){(o=e.thumb)||"image"!==e.type||(o=e.src),a.push('<a href="javascript:;" tabindex="0" data-index="'+t+'"'+(o&&o.length?' style="background-image:url('+o+')"':'class="modula-fancybox-thumbs-missing"')+"></a>")}),t.$list[0].innerHTML=a.join(""),"x"===t.opts.axis&&t.$list.width(parseInt(t.$grid.css("padding-right"),10)+e.group.length*t.$list.children().eq(0).outerWidth(!0))},focus:function(t){var e,o,n=this,a=n.$list,i=n.$grid;n.instance.current&&(o=(e=a.children().removeClass(r).filter('[data-index="'+n.instance.current.index+'"]').addClass(r)).position(),"y"===n.opts.axis&&(o.top<0||o.top>a.height()-e.outerHeight())?a.stop().animate({scrollTop:a.scrollTop()+o.top},t):"x"===n.opts.axis&&(o.left<i.scrollLeft()||o.left>i.scrollLeft()+(i.width()-e.outerWidth()))&&a.parent().stop().animate({scrollLeft:o.left},t))},update:function(){var t=this;t.instance.$refs.container.toggleClass("modula-fancybox-show-thumbs",this.isVisible),t.isVisible?(t.$grid||t.create(),t.instance.trigger("onThumbsShow"),t.focus(0)):t.$grid&&t.instance.trigger("onThumbsHide"),t.instance.update()},hide:function(){this.isVisible=!1,this.update()},show:function(){this.isVisible=!0,this.update()},toggle:function(){this.isVisible=!this.isVisible,this.update()}}),i(t).on({"onInit.fb":function(t,e){var o;e&&!e.Thumbs&&(o=new n(e)).isActive&&!0===o.opts.autoStart&&o.show()},"beforeShow.fb":function(t,e,o,n){e=e&&e.Thumbs;e&&e.isVisible&&e.focus(n?0:250)},"afterKeydown.fb":function(t,e,o,n,a){e=e&&e.Thumbs;e&&e.isActive&&71===a&&(n.preventDefault(),e.toggle())},"beforeClose.fb":function(t,e){e=e&&e.Thumbs;e&&e.isVisible&&!1!==e.opts.hideOnClose&&e.$grid.hide()}})}(document,jQuery),function(t,o){"use strict";o.extend(!0,o.modulaFancybox.defaults,{btnTpl:{share:'<button data-fancybox-share class="modula-fancybox-button modula-fancybox-button--share" title="{{SHARE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.55 19c1.4-8.4 9.1-9.8 11.9-9.8V5l7 7-7 6.3v-3.5c-2.8 0-10.5 2.1-11.9 4.2z"/></svg></button>'},share:{url:function(t,e){return!t.currentHash&&"inline"!==e.type&&"html"!==e.type&&(e.origSrc||e.src)||window.location}}}),o(t).on("click","[data-fancybox-share]",function(){var a,e,i=o.modulaFancybox.getInstance(),s=i.current||null,r="<div class='modula-fancybox-share'><h1>{{SHARE}}</h1><p>";s&&("function"===o.type(s.opts.share.url)&&(a=s.opts.share.url.apply(s,[i,s])),o.each(s.opts.modulaShare,function(t,e){var o=(s.opts.lightboxEmailMessage.length?s.opts.lightboxEmailMessage:"Here is the link to the image : %%image_link%% and this is the link to the gallery : %%gallery_link%%").replace(/\%%gallery_link%%/g,window.location.href).replace(/\%%image_link%%/g,s.src),n=jQuery(s.$image).attr("title").length?jQuery(s.$image).attr("title"):"";""==n&&(n=i.$caption.text()),r+=s.opts.shareBtnTpl[e].replace(/\{\{media\}\}/g,"image"===s.type?encodeURIComponent(s.src):"").replace(/\{\{modulaShareUrl\}\}/g,encodeURIComponent(a)).replace(/\{\{descr\}\}/g,encodeURIComponent(n)).replace(/\{\{subject\}\}/g,encodeURIComponent(s.opts.lightboxEmailSubject)).replace(/\{\{emailMessage\}\}/g,encodeURIComponent(o))}),r=(r+="</p><p><input class='modula-fancybox-share__input' type='text' value='{{url_raw}}' /></p></div>").replace(/\{\{url_raw\}\}/g,(e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"},String(a).replace(/[&<>"'`=\/]/g,function(t){return e[t]}))),o.modulaFancybox.open({src:i.translate(i,r),type:"html",opts:{touch:!1,animationEffect:!1,afterLoad:function(t,e){i.$refs.container.one("beforeClose.fb",function(){t.close(null,0)}),e.$content.find(".modula-fancybox-share__button").click(function(){return window.open(this.href,"Share","width=550, height=450"),!1})},mobile:{autoFocus:!1}}}))})}(document,jQuery),function(i,s,n){"use strict";function a(){var t=i.location.hash.substr(1),e=t.split("-"),o=1<e.length&&/^\+?\d+$/.test(e[e.length-1])&&parseInt(e.pop(-1),10)||1;return{hash:t,index:o<1?1:o,gallery:e.join("-")}}function e(t){""!==t.gallery&&n("[data-fancybox='"+n.escapeSelector(t.gallery)+"']").eq(t.index-1).focus().trigger("click.fb-start")}function r(t){return!!t&&(""!==(t=(t=(t.current||t).opts).hash||(t.$orig?t.$orig.data("fancybox")||t.$orig.data("fancybox-trigger"):""))&&t)}n.escapeSelector||(n.escapeSelector=function(t){return(t+"").replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t})}),n(function(){!1!==n.modulaFancybox.defaults.hash&&(n(s).on({"onInit.fb":function(t,e){!1!==e.group[e.currIndex].opts.hash&&(a(),r(e))},"beforeShow.fb":function(t,e,o,n){var a;o&&!1!==o.opts.hash&&(a=r(e))&&(e.currentHash=a+(1<e.group.length?"-"+o.opts.image_id:""),i.location.hash!=="#"+e.currentHash&&(n&&!e.origHash&&(e.origHash=i.location.hash),e.hashTimer&&clearTimeout(e.hashTimer),e.hashTimer=setTimeout(function(){"replaceState"in i.history?(i.history[n?"pushState":"replaceState"]({},s.title,i.location.pathname+i.location.search+"#"+e.currentHash),n&&(e.hasCreatedHistory=!0)):i.location.hash=e.currentHash,e.hashTimer=null},300)))},"beforeClose.fb":function(t,e,o){o&&!1!==o.opts.hash&&(clearTimeout(e.hashTimer),e.currentHash&&e.hasCreatedHistory?i.history.back():e.currentHash&&("replaceState"in i.history?i.history.replaceState({},s.title,i.location.pathname+i.location.search+(e.origHash||"")):i.location.hash=e.origHash),e.currentHash=null)}}),n(i).on("hashchange.fb",function(){var t=a(),o=null;n.each(n(".modula-fancybox-container").get().reverse(),function(t,e){e=n(e).data("modulaFancyBox");if(e&&e.currentHash)return o=e,!1}),o?o.currentHash===t.gallery+"-"+t.index||1===t.index&&o.currentHash==t.gallery||(o.currentHash=null,o.close()):""!==t.gallery&&e(t)}),setTimeout(function(){n.modulaFancybox.getInstance()||e(a())},50))})}(window,document,jQuery),function(t,e){"use strict";var a=(new Date).getTime();e(t).on({"onInit.fb":function(t,n,e){n.$refs.stage.on("mousewheel DOMMouseScroll wheel MozMousePixelScroll",function(t){var e=n.current,o=(new Date).getTime();n.group.length<2||!1===e.opts.wheel||"auto"===e.opts.wheel&&"image"!==e.type||(t.preventDefault(),t.stopPropagation(),e.$slide.hasClass("modula-fancybox-animated")||(t=t.originalEvent||t,o-a<250||(a=o,n[(-t.deltaY||-t.deltaX||t.wheelDelta||-t.detail)<0?"next":"previous"]())))})}})}(document,jQuery);
3
- function tg_getURLParameter(t){return decodeURIComponent((new RegExp("[?|&]"+t+"=([^&;]+?)(&|#|;|$)").exec(location.search)||[,""])[1].replace(/\+/g,"%20"))||null}function modulaInViewport(t){"function"==typeof jQuery&&t instanceof jQuery&&(t=t[0]);t=t.getBoundingClientRect();return t.top-jQuery(window).height()<=-100&&-400<=t.top-jQuery(window).height()||t.bottom<=jQuery(window).height()}jQuery(document).on("vc-full-width-row-single vc-full-width-row",function(t,i){0<jQuery("body").find(".modula").length&&jQuery(window).trigger("modula-update")}),jQuery(window).on("elementor/frontend/init",function(){window.elementorFrontend&&window.elementorFrontend.hooks.addAction("frontend/element_ready/global",function(t){0<jQuery("body").find(".modula").length&&jQuery(window).trigger("modula-update")})}),function(u,s,a,t){var n="modulaGallery",e={resizer:"/",keepArea:!0,type:"creative-gallery",columns:12,gutter:10,desktopGutter:10,mobileGutter:10,tabletGutter:10,enableTwitter:!1,enableFacebook:!1,enableWhatsapp:!1,enablePinterest:!1,enableLinkedin:!1,enableEmail:!1,lazyLoad:0,initLightbox:!1,lightbox:"fancybox",lightboxOpts:{},inView:!1};function h(t,i){this.element=t,this.$element=u(t),this.$itemsCnt=this.$element.find(".modula-items"),this.$items=this.$itemsCnt.find(".modula-item"),this.options=u.extend({},e,i),this._defaults=e,this._name=n,this.tiles=[],this.$tilesCnt=null,this.completed=!1,this.lastWidth=0,this.resizeTO=0,this.isIsotope=!1,this.isLazyLoaded=!0,this.init()}h.prototype.init=function(){var i=this,t=a.documentElement.clientWidth;this.options.gutter=t<=568?this.options.mobileGutter:t<=768?this.options.tabletGutter:this.options.desktopGutter,u(a).trigger("modula_api_before_init",[i]),"custom-grid"===this.options.type?this.createCustomGallery():"creative-gallery"==this.options.type?this.createGrid():"grid"==this.options.type&&("automatic"==this.options.grid_type?this.createAutoGrid():this.createColumnsGrid()),"custom-grid"===this.options.type&&u(s).height()<u("html").height()&&i.onResize(i),u(s).resize(function(){i.onResize(i)}),u(s).on("modula-update",function(){i.onResize(i)}),u(a).on("lazyloaded",function(t){t=u(t.target);"modula"==t.data("source")&&(t.data("size",{width:t.width(),height:t.height()}),(t=t.parents(".modula-item")).addClass("tg-loaded"),t=i.$items.not(".jtg-hidden").index(t),i.placeImage(t),i.isIsotope&&i.$itemsCnt.modulaisotope("layout"))}),i.options.inView&&jQuery(s).on("DOMContentLoaded load resize scroll",function(){modulaInViewport(i.$element)&&i.$element.addClass("modula-loaded-scale")}),this.setupSocial(),this.options.onComplete&&this.options.onComplete(),"fancybox"!=i.options.lightbox||i.options.initLightbox||this.initLightbox(),u(a).trigger("modula_api_after_init",[i])},h.prototype.initLightbox=function(){var e=this;e.$element.on("click",".modula-item-link:not( .modula-simple-link )",function(t){t.preventDefault();var i=u.map(e.$items,function(t){var i=jQuery(t).find(".modula-item-link:not( .modula-simple-link )"),t=jQuery(t).find(".pic");return{src:i.attr("href"),opts:{$thumb:t.parents(".modula-item"),caption:i.data("caption"),alt:t.attr("alt"),image_id:i.attr("data-image-id")}}}),t=e.$items.index(jQuery(this).parents(".modula-item"));jQuery.modulaFancybox.open(i,e.options.lightboxOpts,t)})},h.prototype.trunc=function(t){return Math.trunc?Math.trunc(t):(t=+t,isFinite(t)?t-t%1||(t<0?-0:0===t?t:0):t)},h.prototype.createCustomGallery=function(){var h,r=this,t=this.$element.find(".modula-items").width(),d=this,l=this.options.columns,i=a.documentElement.clientWidth;"1"==this.options.enableResponsive&&(i<=568?l=this.options.mobileColumns:i<=768&&(l=this.options.tabletColumns)),h=0<this.options.gutter?(t-this.options.gutter*(l-1))/l:Math.floor(t/l*1e3)/1e3,this.$items.not(".jtg-hidden").each(function(t,i){var e,o,n={},s=u(i).data("width"),a=u(i).data("height");12<s&&(s=12),"1"==d.options.enableResponsive&&(e=s,o=a,1==l?a=(s=1)*o/e:((s=Math.round(l*e/12))<1&&(s=1),(a=Math.round(s*o/e))<1&&(a=1))),n.width=h*s+d.options.gutter*(s-1),n.height=Math.round(h)*a+d.options.gutter*(a-1),u(i).data("size",n).addClass("tiled").addClass(n.width>n.height?"tile-h":"tile-v").data("position"),u(i).css(u(i).data("size")),u(i).find(".figc").css({width:u(i).data("size").width,height:u(i).data("size").height}),r.loadImage(t)});t={itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(d.options.gutter)}};this.$itemsCnt.modulaisotope(t),this.isIsotope=!0},h.prototype.createGrid=function(){var o=this;this.$itemsCnt.data("area",this.$itemsCnt.width()*this.options.height),this.lastWidth=this.$itemsCnt.width();for(var t,i=0;i<this.$items.not(".jtg-hidden").length;i++)this.tiles.push(o.getSlot());this.tiles.sort(function(t,i){return t.position-i.position}),this.$items.not(".jtg-hidden").each(function(t,i){var e=o.tiles[t];u(i).data("size",e),u(i).addClass("tiled").addClass(e.width>e.height?"tile-h":"tile-v").data("position"),u(i).css({width:e.width,height:e.height}),u(i).find(".figc").css({width:e.width,height:e.height}),o.loadImage(t)}),this.isIsotope||(t={resizesContainer:!1,itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(o.options.gutter)}},this.$itemsCnt.modulaisotope(t),this.isIsotope=!0)},h.prototype.createAutoGrid=function(){this.$itemsCnt.justifiedGallery({rowHeight:this.options.rowHeight,margins:this.options.gutter,lastRow:this.options.lastRow,captions:!1,border:0,imgSelector:".pic",cssAnimation:!0,imagesAnimationDuration:700})},h.prototype.createColumnsGrid=function(){var e=this;this.$itemsCnt.modulaisotope({itemSelector:".modula-item",layoutMode:"packery",packery:{gutter:parseInt(this.options.gutter)}}),this.$items.each(function(t,i){e.loadImage(t)}),this.isIsotope=!0},h.prototype.getSlot=function(){if(0==this.tiles.length)return o={top:0,left:0,width:this.$itemsCnt.width(),height:this.options.height,area:this.$itemsCnt.width()*this.options.height,position:0};for(var t=0,i=0;i<this.tiles.length;i++)(o=this.tiles[i]).area>this.tiles[t].area&&(t=i);var e,o={},n=this.tiles[t];return(o=n.width>n.height?(e=n.width/2*this.options.randomFactor,n.prevWidth=n.width,n.width=Math.floor(n.width/2+e*(Math.random()-.5)),{top:n.top,left:n.left+n.width+this.options.gutter,width:n.prevWidth-n.width-this.options.gutter,height:n.height}):(e=n.height/2*this.options.randomFactor,n.prevHeight=n.height,n.height=Math.floor(n.height/2+e*(Math.random()-.5)),{left:n.left,top:n.top+n.height+this.options.gutter,width:n.width,height:n.prevHeight-n.height-this.options.gutter})).area=o.width*o.height,o.position=1e3*o.top+o.left,n.position=1e3*n.top+n.left,this.tiles[t]=n,this.tiles[t].area=n.width*n.height,o},h.prototype.reset=function(){this.tiles=[],"custom-grid"===this.options.type?this.createCustomGallery():"creative-gallery"==this.options.type?this.createGrid():"grid"==this.options.type&&("automatic"==this.options.grid_type?this.createAutoGrid():this.createColumnsGrid()),this.lastWidth=this.$itemsCnt.width(),u(a).trigger("modula_api_reset",[this])},h.prototype.onResize=function(i){var t;i.lastWidth!=i.$itemsCnt.width()&&(t=a.documentElement.clientWidth,i.options.gutter=t<=568?i.options.mobileGutter:t<=768?i.options.tabletGutter:this.options.desktopGutter,clearTimeout(i.resizeTO),i.resizeTO=setTimeout(function(){var t;i.options.keepArea&&(t=i.$itemsCnt.data("area"),i.$itemsCnt.height(t/i.$itemsCnt.width())),i.reset(),i.isIsotope&&i.$itemsCnt.modulaisotope({packery:{gutter:parseInt(i.options.gutter)}}).modulaisotope("layout")},100))},h.prototype.loadImage=function(t){var i,e=this,o=e.$items.not(".jtg-hidden").eq(t).find(".pic"),n={};"0"==e.options.lazyLoad?void 0===o.attr("width")&&void 0===o.attr("height")?((i=new Image).onload=function(){n={width:this.width,height:this.height},o.data("size",n),e.placeImage(t)},"undefined"!=o.attr("src")?i.src=o.attr("src"):i.src=o.data("src")):(n={width:o.width(),height:o.height()},o.data("size",n),e.placeImage(t)):e.placeImage(t)},h.prototype.placeImage=function(t){if("grid"!=this.options.type){var i=this.$items.not(".jtg-hidden").eq(t),e=i.find(".pic"),o=i.data("size"),n=e.data("size");if(void 0!==o&&void 0!==n){o.width,o.height;var s=n.width/n.height,a=e.data("valign")?e.data("valign"):"middle",i=e.data("halign")?e.data("halign"):"center",h={top:"auto",bottom:"auto",left:"auto",right:"auto",width:"auto",height:"auto",margin:"0",maxWidth:"999em"};if(o.width*n.height/n.width>o.height)switch(h.width=o.width,h.left=0,a){case"top":h.top=0;break;case"middle":h.top=0-(o.width*(1/s)-o.height)/2;break;case"bottom":h.bottom=0}else switch(h.height=o.height,h.top=0,i){case"left":h.left=0;break;case"center":h.left=0-(o.height*s-o.width)/2;break;case"right":h.right=0}e.css(h),this.$items.not(".jtg-hidden").eq(t).addClass("tg-loaded")}}},h.prototype.setupSocial=function(){this.options.enableTwitter&&i(this.$items,this),this.options.enableFacebook&&o(this.$items,this),this.options.enablePinterest&&d(this.$items,this),this.options.enableLinkedin&&l(this.$items,this),this.options.enableWhatsapp&&r(this.$items,this),this.options.enableEmail&&p(this.$items,this)},h.prototype.destroy=function(){this.isPackeryActive&&(this.$itemsCnt.packery("destroy"),this.isPackeryActive=!1)};var i=function(t,i){t.find(".modula-icon-twitter").click(function(t){t.preventDefault();var i=u(this).parents(".modula-item").find("img.pic"),e=i.data("caption"),o=i.data("full"),t=i.attr("title"),i=a.title;return 0<t.length?i=u.trim(t):0<e.length&&(i=u.trim(e)),s.open("https://twitter.com/intent/tweet?url="+encodeURI(o)+"&text="+encodeURI(i),"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},o=function(t,i){t.find(".modula-icon-facebook").click(function(t){t.preventDefault();t="//www.facebook.com/sharer.php?u="+u(this).parents(".modula-item").find("img.pic").attr("data-full");return s.open(t,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},r=function(t,i){t.find(".modula-icon-whatsapp").click(function(t){t.preventDefault();t=u(this).parents(".modula-item").find("img.pic").attr("data-full");return s.open("https://api.whatsapp.com/send?text="+encodeURI(t)+"&preview_url=true","ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},d=function(t,i){t.find(".modula-icon-pinterest").click(function(t){t.preventDefault();var i=u(this).parents(".modula-item").find("img.pic"),e=i.data("full"),o=i.data("caption"),n=i.attr("title"),t=a.title;0<n.length?t=u.trim(n):0<o.length&&(t=u.trim(o));e="http://pinterest.com/pin/create/button/?url="+encodeURI(e)+"&description="+encodeURI(t);return 1<=i.length&&(t=i.attr("data-full"),e+="&media="+(i=t,(t=a.createElement("img")).src=i,i=t.src,t.src=null,i)),s.open(e,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},l=function(t,i){t.find(".modula-icon-linkedin").click(function(t){t.preventDefault();t=u(this).parents(".modula-item").find("img.pic").attr("data-full"),t="//linkedin.com/shareArticle?mini=true&url="+encodeURI(t);return s.open(t,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},p=function(t,n){t.find(".modula-icon-email").click(function(t){var i=encodeURI(n.options.email_subject),e=jQuery(".modula-icon-email").parents(".modula-item").find("img.pic").attr("data-full"),o=location.href,o="mailto:?subject="+i+"&body="+encodeURI(n.options.email_message.replace(/%%image_link%%/g,e).replace(/%%gallery_link%%/g,o));return s.open(o,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})};u.fn[n]=function(i){var e,o=arguments;return i===t||"object"==typeof i?this.each(function(){u.data(this,"plugin_"+n)||u.data(this,"plugin_"+n,new h(this,i))}):"string"==typeof i&&"_"!==i[0]&&"init"!==i?(this.each(function(){var t=u.data(this,"plugin_"+n);t instanceof h&&"function"==typeof t[i]&&(e=t[i].apply(t,Array.prototype.slice.call(o,1))),"destroy"===i&&u.data(this,"plugin_"+n,null)}),e!==t?e:this):void 0}}(jQuery,window,document),jQuery(document).ready(function(){var t=jQuery(".modula.modula-gallery");jQuery.each(t,function(){var t=jQuery(this).data("config");jQuery(this).modulaGallery(t)})});
1
+ !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,i){return void 0===i&&(i="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(i),i}:e(jQuery)}(function(g){function n(t,i){this.settings=i,this.checkSettings(),this.imgAnalyzerTimeout=null,this.entries=null,this.buildingRow={entriesBuff:[],width:0,height:0,aspectRatio:0},this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.yield={every:2,flushed:0},this.border=0<=i.border?i.border:i.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges(),this.offY=this.border,this.rows=0,this.spinner={phase:0,timeSlot:150,$el:g('<div class="jg-spinner"><span></span><span></span><span></span></div>'),intervalId:null},this.scrollBarOn=!1,this.checkWidthIntervalId=null,this.galleryWidth=t.width(),this.$gallery=t}n.prototype.getSuffix=function(t,i){for(var e=i<t?t:i,s=0;s<this.suffixRanges.length;s++)if(e<=this.suffixRanges[s])return this.settings.sizeRangeSuffixes[this.suffixRanges[s]];return this.settings.sizeRangeSuffixes[this.suffixRanges[s-1]]},n.prototype.removeSuffix=function(t,i){return t.substring(0,t.length-i.length)},n.prototype.endsWith=function(t,i){return-1!==t.indexOf(i,t.length-i.length)},n.prototype.getUsedSuffix=function(t){for(var i in this.settings.sizeRangeSuffixes)if(this.settings.sizeRangeSuffixes.hasOwnProperty(i)&&0!==this.settings.sizeRangeSuffixes[i].length&&this.endsWith(t,this.settings.sizeRangeSuffixes[i]))return this.settings.sizeRangeSuffixes[i];return""},n.prototype.newSrc=function(t,i,e,s){var n;return this.settings.thumbnailPath?n=this.settings.thumbnailPath(t,i,e,s):(s=null!==(s=t.match(this.settings.extension))?s[0]:"",n=t.replace(this.settings.extension,""),n=this.removeSuffix(n,this.getUsedSuffix(n)),n+=this.getSuffix(i,e)+s),n},n.prototype.showImg=function(t,i){this.settings.cssAnimation?(t.addClass("jg-entry-visible"),i&&i()):(t.stop().fadeTo(this.settings.imagesAnimationDuration,1,i),t.find(this.settings.imgSelector).stop().fadeTo(this.settings.imagesAnimationDuration,1,i))},n.prototype.extractImgSrcFromImage=function(t){var i=t.data("safe-src"),e="data-safe-src";return void 0===i&&(i=t.attr("src"),e="src"),t.data("jg.originalSrc",i),t.data("jg.src",i),t.data("jg.originalSrcLoc",e),i},n.prototype.imgFromEntry=function(t){t=t.find(this.settings.imgSelector);return 0===t.length?null:t},n.prototype.captionFromEntry=function(t){t=t.find("> .jg-caption");return 0===t.length?null:t},n.prototype.displayEntry=function(t,i,e,s,n,r){t.width(s),t.height(r),t.css("top",e),t.css("left",i);var o,a,h=this.imgFromEntry(t);null!==h?(h.css("width",s),h.css("height",n),h.css("margin-left",-s/2),h.css("margin-top",-n/2),(o=h.data("jg.src"))&&(o=this.newSrc(o,s,n,h[0]),h.one("error",function(){this.resetImgSrc(h)}),a=function(){h.attr("src",o)},"skipped"===t.data("jg.loaded")&&o?this.onImageEvent(o,function(){this.showImg(t,a),t.data("jg.loaded",!0)}.bind(this)):this.showImg(t,a))):this.showImg(t),this.displayEntryCaption(t)},n.prototype.displayEntryCaption=function(t){var i,e=this.imgFromEntry(t);null!==e&&this.settings.captions?(null===(i=this.captionFromEntry(t))&&(e=e.attr("alt"),this.isValidCaption(e)||(e=t.attr("title")),this.isValidCaption(e)&&(i=g('<div class="jg-caption">'+e+"</div>"),t.append(i),t.data("jg.createdCaption",!0))),null!==i&&(this.settings.cssAnimation||i.stop().fadeTo(0,this.settings.captionSettings.nonVisibleOpacity),this.addCaptionEventsHandlers(t))):this.removeCaptionEventsHandlers(t)},n.prototype.isValidCaption=function(t){return void 0!==t&&0<t.length},n.prototype.onEntryMouseEnterForCaption=function(t){t=this.captionFromEntry(g(t.currentTarget));this.settings.cssAnimation?t.addClass("jg-caption-visible").removeClass("jg-caption-hidden"):t.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.visibleOpacity)},n.prototype.onEntryMouseLeaveForCaption=function(t){t=this.captionFromEntry(g(t.currentTarget));this.settings.cssAnimation?t.removeClass("jg-caption-visible").removeClass("jg-caption-hidden"):t.stop().fadeTo(this.settings.captionSettings.animationDuration,this.settings.captionSettings.nonVisibleOpacity)},n.prototype.addCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0===i&&(i={mouseenter:g.proxy(this.onEntryMouseEnterForCaption,this),mouseleave:g.proxy(this.onEntryMouseLeaveForCaption,this)},t.on("mouseenter",void 0,void 0,i.mouseenter),t.on("mouseleave",void 0,void 0,i.mouseleave),t.data("jg.captionMouseEvents",i))},n.prototype.removeCaptionEventsHandlers=function(t){var i=t.data("jg.captionMouseEvents");void 0!==i&&(t.off("mouseenter",void 0,i.mouseenter),t.off("mouseleave",void 0,i.mouseleave),t.removeData("jg.captionMouseEvents"))},n.prototype.clearBuildingRow=function(){this.buildingRow.entriesBuff=[],this.buildingRow.aspectRatio=0,this.buildingRow.width=0},n.prototype.prepareBuildingRow=function(t,i){var e,s,n,r,o=!0,a=0,h=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,g=h/this.buildingRow.aspectRatio,l=this.settings.rowHeight,u=this.buildingRow.width/h>this.settings.justifyThreshold;if(i||t&&"hide"===this.settings.lastRow&&!u){for(e=0;e<this.buildingRow.entriesBuff.length;e++)s=this.buildingRow.entriesBuff[e],this.settings.cssAnimation?s.removeClass("jg-entry-visible"):(s.stop().fadeTo(0,.1),s.find("> img, > a > img").fadeTo(0,0));return-1}for(t&&!u&&"justify"!==this.settings.lastRow&&"hide"!==this.settings.lastRow&&(o=!1,0<this.rows&&(o=(l=(this.offY-this.border-this.settings.margins*this.rows)/this.rows)*this.buildingRow.aspectRatio/h>this.settings.justifyThreshold)),e=0;e<this.buildingRow.entriesBuff.length;e++)r=(s=this.buildingRow.entriesBuff[e]).data("jg.width")/s.data("jg.height"),r=o?(n=e===this.buildingRow.entriesBuff.length-1?h:g*r,g):(n=l*r,l),h-=Math.round(n),s.data("jg.jwidth",Math.round(n)),s.data("jg.jheight",Math.ceil(r)),(0===e||r<a)&&(a=r);return this.buildingRow.height=a,o},n.prototype.flushRow=function(t,i){var e,s=this.settings,n=this.border,r=this.prepareBuildingRow(t,i);if(i||t&&"hide"===s.lastRow&&-1===r)this.clearBuildingRow();else{if(this.maxRowHeight&&this.maxRowHeight<this.buildingRow.height&&(this.buildingRow.height=this.maxRowHeight),t&&("center"===s.lastRow||"right"===s.lastRow)){for(var o=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*s.margins,a=0;a<this.buildingRow.entriesBuff.length;a++)o-=(e=this.buildingRow.entriesBuff[a]).data("jg.jwidth");"center"===s.lastRow?n+=Math.round(o/2):"right"===s.lastRow&&(n+=o)}var h=this.buildingRow.entriesBuff.length-1;for(a=0;a<=h;a++)e=this.buildingRow.entriesBuff[this.settings.rtl?h-a:a],this.displayEntry(e,n,this.offY,e.data("jg.jwidth"),e.data("jg.jheight"),this.buildingRow.height),n+=e.data("jg.jwidth")+s.margins;this.galleryHeightToSet=this.offY+this.buildingRow.height+this.border,this.setGalleryTempHeight(this.galleryHeightToSet+this.getSpinnerHeight()),(!t||this.buildingRow.height<=s.rowHeight&&r)&&(this.offY+=this.buildingRow.height+s.margins,this.rows+=1,this.clearBuildingRow(),this.settings.triggerEvent.call(this,"jg.rowflush"))}};var i=0;n.prototype.rememberGalleryHeight=function(){i=this.$gallery.height(),this.$gallery.height(i)},n.prototype.setGalleryTempHeight=function(t){i=Math.max(t,i),this.$gallery.height(i)},n.prototype.setGalleryFinalHeight=function(t){i=t,this.$gallery.height(t)},n.prototype.checkWidth=function(){this.checkWidthIntervalId=setInterval(g.proxy(function(){var t;this.$gallery.is(":visible")&&(t=parseFloat(this.$gallery.width()),Math.abs(t-this.galleryWidth)>this.settings.refreshSensitivity&&(this.galleryWidth=t,this.rewind(),this.rememberGalleryHeight(),this.startImgAnalyzer(!0)))},this),this.settings.refreshTime)},n.prototype.isSpinnerActive=function(){return null!==this.spinner.intervalId},n.prototype.getSpinnerHeight=function(){return this.spinner.$el.innerHeight()},n.prototype.stopLoadingSpinnerAnimation=function(){clearInterval(this.spinner.intervalId),this.spinner.intervalId=null,this.setGalleryTempHeight(this.$gallery.height()-this.getSpinnerHeight()),this.spinner.$el.detach()},n.prototype.startLoadingSpinnerAnimation=function(){var t=this.spinner,i=t.$el.find("span");clearInterval(t.intervalId),this.$gallery.append(t.$el),this.setGalleryTempHeight(this.offY+this.buildingRow.height+this.getSpinnerHeight()),t.intervalId=setInterval(function(){t.phase<i.length?i.eq(t.phase).fadeTo(t.timeSlot,1):i.eq(t.phase-i.length).fadeTo(t.timeSlot,0),t.phase=(t.phase+1)%(2*i.length)},t.timeSlot)},n.prototype.rewind=function(){this.lastFetchedEntry=null,this.lastAnalyzedIndex=-1,this.offY=this.border,this.rows=0,this.clearBuildingRow()},n.prototype.getSelectorWithoutSpinner=function(){return this.settings.selector+", div:not(.jg-spinner)"},n.prototype.getAllEntries=function(){var t=this.getSelectorWithoutSpinner();return this.$gallery.children(t).toArray()},n.prototype.updateEntries=function(t){var i;return 0<(i=t&&null!=this.lastFetchedEntry?(i=this.getSelectorWithoutSpinner(),g(this.lastFetchedEntry).nextAll(i).toArray()):(this.entries=[],this.getAllEntries())).length&&(g.isFunction(this.settings.sort)?i=this.sortArray(i):this.settings.randomize&&(i=this.shuffleArray(i)),this.lastFetchedEntry=i[i.length-1],this.settings.filter?i=this.filterArray(i):this.resetFilters(i)),this.entries=this.entries.concat(i),!0},n.prototype.insertToGallery=function(t){var i=this;g.each(t,function(){g(this).appendTo(i.$gallery)})},n.prototype.shuffleArray=function(t){for(var i,e,s=t.length-1;0<s;s--)i=Math.floor(Math.random()*(s+1)),e=t[s],t[s]=t[i],t[i]=e;return this.insertToGallery(t),t},n.prototype.sortArray=function(t){return t.sort(this.settings.sort),this.insertToGallery(t),t},n.prototype.resetFilters=function(t){for(var i=0;i<t.length;i++)g(t[i]).removeClass("jg-filtered")},n.prototype.filterArray=function(t){var i=this.settings;if("string"===g.type(i.filter))return t.filter(function(t){t=g(t);return t.is(i.filter)?(t.removeClass("jg-filtered"),!0):(t.addClass("jg-filtered").removeClass("jg-visible"),!1)});if(g.isFunction(i.filter)){for(var e=t.filter(i.filter),s=0;s<t.length;s++)-1===e.indexOf(t[s])?g(t[s]).addClass("jg-filtered").removeClass("jg-visible"):g(t[s]).removeClass("jg-filtered");return e}},n.prototype.resetImgSrc=function(t){"src"===t.data("jg.originalSrcLoc")?t.attr("src",t.data("jg.originalSrc")):t.attr("src","")},n.prototype.destroy=function(){clearInterval(this.checkWidthIntervalId),this.stopImgAnalyzerStarter(),g.each(this.getAllEntries(),g.proxy(function(t,i){var e=g(i);e.css("width",""),e.css("height",""),e.css("top",""),e.css("left",""),e.data("jg.loaded",void 0),e.removeClass("jg-entry jg-filtered jg-entry-visible");i=this.imgFromEntry(e);i&&(i.css("width",""),i.css("height",""),i.css("margin-left",""),i.css("margin-top",""),this.resetImgSrc(i),i.data("jg.originalSrc",void 0),i.data("jg.originalSrcLoc",void 0),i.data("jg.src",void 0)),this.removeCaptionEventsHandlers(e);i=this.captionFromEntry(e);e.data("jg.createdCaption")?(e.data("jg.createdCaption",void 0),null!==i&&i.remove()):null!==i&&i.fadeTo(0,1)},this)),this.$gallery.css("height",""),this.$gallery.removeClass("justified-gallery"),this.$gallery.data("jg.controller",void 0),this.settings.triggerEvent.call(this,"jg.destroy")},n.prototype.analyzeImages=function(t){for(var i=this.lastAnalyzedIndex+1;i<this.entries.length;i++){var e=g(this.entries[i]);if(!0===e.data("jg.loaded")||"skipped"===e.data("jg.loaded")){var s=this.galleryWidth-2*this.border-(this.buildingRow.entriesBuff.length-1)*this.settings.margins,n=e.data("jg.width")/e.data("jg.height");if(this.buildingRow.entriesBuff.push(e),this.buildingRow.aspectRatio+=n,this.buildingRow.width+=n*this.settings.rowHeight,this.lastAnalyzedIndex=i,s/(this.buildingRow.aspectRatio+n)<this.settings.rowHeight&&(this.flushRow(!1,0<this.settings.maxRowsCount&&this.rows===this.settings.maxRowsCount),++this.yield.flushed>=this.yield.every))return void this.startImgAnalyzer(t)}else if("error"!==e.data("jg.loaded"))return}0<this.buildingRow.entriesBuff.length&&this.flushRow(!0,0<this.settings.maxRowsCount&&this.rows===this.settings.maxRowsCount),this.isSpinnerActive()&&this.stopLoadingSpinnerAnimation(),this.stopImgAnalyzerStarter(),this.setGalleryFinalHeight(this.galleryHeightToSet),this.settings.triggerEvent.call(this,t?"jg.resize":"jg.complete")},n.prototype.stopImgAnalyzerStarter=function(){this.yield.flushed=0,null!==this.imgAnalyzerTimeout&&(clearTimeout(this.imgAnalyzerTimeout),this.imgAnalyzerTimeout=null)},n.prototype.startImgAnalyzer=function(t){var i=this;this.stopImgAnalyzerStarter(),this.imgAnalyzerTimeout=setTimeout(function(){i.analyzeImages(t)},.001)},n.prototype.onImageEvent=function(t,i,e){var s,n;(i||e)&&(s=new Image,n=g(s),i&&n.one("load",function(){n.off("load error"),i(s)}),e&&n.one("error",function(){n.off("load error"),e(s)}),s.src=t)},n.prototype.init=function(){var o=!1,a=!1,h=this;g.each(this.entries,function(t,i){var e=g(i),s=h.imgFromEntry(e);if(e.addClass("jg-entry"),!0!==e.data("jg.loaded")&&"skipped"!==e.data("jg.loaded"))if(null!==h.settings.rel&&e.attr("rel",h.settings.rel),null!==h.settings.target&&e.attr("target",h.settings.target),null!==s){var n=h.extractImgSrcFromImage(s);if(!1===h.settings.waitThumbnailsLoad||!n){var r=parseFloat(s.attr("width")),i=parseFloat(s.attr("height"));if("svg"===s.prop("tagName")&&(r=parseFloat(s[0].getBBox().width),i=parseFloat(s[0].getBBox().height)),!isNaN(r)&&!isNaN(i))return e.data("jg.width",r),e.data("jg.height",i),e.data("jg.loaded","skipped"),a=!0,h.startImgAnalyzer(!1),!0}e.data("jg.loaded",!1),o=!0,h.isSpinnerActive()||h.startLoadingSpinnerAnimation(),h.onImageEvent(n,function(t){e.data("jg.width",t.width),e.data("jg.height",t.height),e.data("jg.loaded",!0),h.startImgAnalyzer(!1)},function(){e.data("jg.loaded","error"),h.startImgAnalyzer(!1)})}else e.data("jg.loaded",!0),e.data("jg.width",e.width()|parseFloat(e.css("width"))|1),e.data("jg.height",e.height()|parseFloat(e.css("height"))|1)}),o||a||this.startImgAnalyzer(!1),this.checkWidth()},n.prototype.checkOrConvertNumber=function(t,i){if("string"===g.type(t[i])&&(t[i]=parseFloat(t[i])),"number"!==g.type(t[i]))throw i+" must be a number";if(isNaN(t[i]))throw"invalid number for "+i},n.prototype.checkSizeRangesSuffixes=function(){if("object"!==g.type(this.settings.sizeRangeSuffixes))throw"sizeRangeSuffixes must be defined and must be an object";var t,i=[];for(t in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(t)&&i.push(t);for(var e={0:""},s=0;s<i.length;s++)if("string"===g.type(i[s]))try{e[parseInt(i[s].replace(/^[a-z]+/,""),10)]=this.settings.sizeRangeSuffixes[i[s]]}catch(t){throw"sizeRangeSuffixes keys must contains correct numbers ("+t+")"}else e[i[s]]=this.settings.sizeRangeSuffixes[i[s]];this.settings.sizeRangeSuffixes=e},n.prototype.retrieveMaxRowHeight=function(){var t=null,i=this.settings.rowHeight;if("string"===g.type(this.settings.maxRowHeight))t=this.settings.maxRowHeight.match(/^[0-9]+%$/)?i*parseFloat(this.settings.maxRowHeight.match(/^([0-9]+)%$/)[1])/100:parseFloat(this.settings.maxRowHeight);else{if("number"!==g.type(this.settings.maxRowHeight)){if(!1===this.settings.maxRowHeight||null==this.settings.maxRowHeight)return null;throw"maxRowHeight must be a number or a percentage"}t=this.settings.maxRowHeight}if(isNaN(t))throw"invalid number for maxRowHeight";return t<i&&(t=i),t},n.prototype.checkSettings=function(){this.checkSizeRangesSuffixes(),this.checkOrConvertNumber(this.settings,"rowHeight"),this.checkOrConvertNumber(this.settings,"margins"),this.checkOrConvertNumber(this.settings,"border"),this.checkOrConvertNumber(this.settings,"maxRowsCount");var t=["justify","nojustify","left","center","right","hide"];if(-1===t.indexOf(this.settings.lastRow))throw"lastRow must be one of: "+t.join(", ");if(this.checkOrConvertNumber(this.settings,"justifyThreshold"),this.settings.justifyThreshold<0||1<this.settings.justifyThreshold)throw"justifyThreshold must be in the interval [0,1]";if("boolean"!==g.type(this.settings.cssAnimation))throw"cssAnimation must be a boolean";if("boolean"!==g.type(this.settings.captions))throw"captions must be a boolean";if(this.checkOrConvertNumber(this.settings.captionSettings,"animationDuration"),this.checkOrConvertNumber(this.settings.captionSettings,"visibleOpacity"),this.settings.captionSettings.visibleOpacity<0||1<this.settings.captionSettings.visibleOpacity)throw"captionSettings.visibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings.captionSettings,"nonVisibleOpacity"),this.settings.captionSettings.nonVisibleOpacity<0||1<this.settings.captionSettings.nonVisibleOpacity)throw"captionSettings.nonVisibleOpacity must be in the interval [0, 1]";if(this.checkOrConvertNumber(this.settings,"imagesAnimationDuration"),this.checkOrConvertNumber(this.settings,"refreshTime"),this.checkOrConvertNumber(this.settings,"refreshSensitivity"),"boolean"!==g.type(this.settings.randomize))throw"randomize must be a boolean";if("string"!==g.type(this.settings.selector))throw"selector must be a string";if(!1!==this.settings.sort&&!g.isFunction(this.settings.sort))throw"sort must be false or a comparison function";if(!1!==this.settings.filter&&!g.isFunction(this.settings.filter)&&"string"!==g.type(this.settings.filter))throw"filter must be false, a string or a filter function"},n.prototype.retrieveSuffixRanges=function(){var t,i=[];for(t in this.settings.sizeRangeSuffixes)this.settings.sizeRangeSuffixes.hasOwnProperty(t)&&i.push(parseInt(t,10));return i.sort(function(t,i){return i<t?1:t<i?-1:0}),i},n.prototype.updateSettings=function(t){this.settings=g.extend({},this.settings,t),this.checkSettings(),this.border=0<=this.settings.border?this.settings.border:this.settings.margins,this.maxRowHeight=this.retrieveMaxRowHeight(),this.suffixRanges=this.retrieveSuffixRanges()},n.prototype.defaults={sizeRangeSuffixes:{},thumbnailPath:void 0,rowHeight:120,maxRowHeight:!1,maxRowsCount:0,margins:1,border:-1,lastRow:"nojustify",justifyThreshold:.9,waitThumbnailsLoad:!0,captions:!0,cssAnimation:!0,imagesAnimationDuration:500,captionSettings:{animationDuration:500,visibleOpacity:.7,nonVisibleOpacity:0},rel:null,target:null,extension:/\.[^.\\/]+$/,refreshTime:200,refreshSensitivity:0,randomize:!1,rtl:!1,sort:!1,filter:!1,selector:"a",imgSelector:"> img, > a > img, > svg, > a > svg",triggerEvent:function(t){this.$gallery.trigger(t)}},g.fn.justifiedGallery=function(s){return this.each(function(t,i){var e=g(i);e.addClass("justified-gallery");i=e.data("jg.controller");if(void 0===i){if(null!=s&&"object"!==g.type(s)){if("destroy"===s)return;throw"The argument must be an object"}i=new n(e,g.extend({},n.prototype.defaults,s)),e.data("jg.controller",i)}else if("norewind"!==s){if("destroy"===s)return void i.destroy();i.updateSettings(s),i.rewind()}i.updateEntries("norewind"===s)&&i.init()})}});
2
+ !function(l,s,f,m){"use strict";var a,i,r,d,e,c,p,u,n,t,o,h,g;function b(t,e){var o,n,a,i=[],s=0;t&&t.isDefaultPrevented()||(t.preventDefault(),e=e||{},t&&t.data&&(e=u(t.data.options,e)),o=e.$target||f(t.currentTarget).trigger("blur"),(a=f.modulaFancybox.getInstance())&&a.$trigger&&a.$trigger.is(o)||(i=e.selector?f(e.selector):(n=o.attr("data-fancybox")||"")?(i=t.data?t.data.items:[]).length?i.filter('[data-fancybox="'+n+'"]'):f('[data-fancybox="'+n+'"]'):[o],(s=f(i).index(o))<0&&(s=0),(a=f.modulaFancybox.open(i,e,s)).$trigger=o))}l.console=l.console||{info:function(t){}},f&&(f.fn.modulaFancybox?console.info("fancyBox already initialized"):(t={closeExisting:!1,loop:!1,gutter:50,keyboard:!0,preventCaptionOverlap:!0,arrows:!0,infobar:!0,smallBtn:"auto",toolbar:"auto",buttons:["zoom","slideShow","thumbs","close"],idleTime:3,protect:!1,modal:!1,image:{preload:!1},ajax:{settings:{data:{fancybox:!0}}},iframe:{tpl:'<iframe id="modula-fancybox-frame{rnd}" name="modula-fancybox-frame{rnd}" class="modula-fancybox-iframe" allowfullscreen="allowfullscreen" allow="autoplay; fullscreen" src=""></iframe>',preload:!0,css:{},attr:{scrolling:"auto"}},video:{tpl:'<video class="modula-fancybox-video" controls controlsList="nodownload" poster="{{poster}}"><source src="{{src}}" type="{{format}}" />Sorry, your browser doesn\'t support embedded videos, <a href="{{src}}">download</a> and watch with your favorite video player!</video>',format:"",autoStart:!0},defaultType:"image",animationEffect:"zoom",animationDuration:366,zoomOpacity:"auto",transitionEffect:"fade",transitionDuration:366,slideClass:"",baseClass:"",baseTpl:'<div class="modula-fancybox-container" role="dialog" tabindex="-1"><div class="modula-fancybox-bg"></div><div class="modula-fancybox-inner"><div class="modula-fancybox-infobar"><span data-fancybox-index></span>&nbsp;/&nbsp;<span data-fancybox-count></span></div><div class="modula-fancybox-toolbar">{{buttons}}</div><div class="modula-fancybox-navigation">{{arrows}}</div><div class="modula-fancybox-stage"></div><div class="modula-fancybox-caption"><div class="modula-fancybox-caption__body"></div></div></div></div>',spinnerTpl:'<div class="modula-fancybox-loading"></div>',errorTpl:'<div class="modula-fancybox-error"><p>{{ERROR}}</p></div>',btnTpl:{download:'<a download data-fancybox-download class="modula-fancybox-button modula-fancybox-button--download" title="{{DOWNLOAD}}" href="javascript:;"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.62 17.09V19H5.38v-1.91zm-2.97-6.96L17 11.45l-5 4.87-5-4.87 1.36-1.32 2.68 2.64V5h1.92v7.77z"/></svg></a>',zoom:'<button data-fancybox-zoom class="modula-fancybox-button modula-fancybox-button--zoom" title="{{ZOOM}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.7 17.3l-3-3a5.9 5.9 0 0 0-.6-7.6 5.9 5.9 0 0 0-8.4 0 5.9 5.9 0 0 0 0 8.4 5.9 5.9 0 0 0 7.7.7l3 3a1 1 0 0 0 1.3 0c.4-.5.4-1 0-1.5zM8.1 13.8a4 4 0 0 1 0-5.7 4 4 0 0 1 5.7 0 4 4 0 0 1 0 5.7 4 4 0 0 1-5.7 0z"/></svg></button>',close:'<button data-fancybox-close class="modula-fancybox-button modula-fancybox-button--close" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 10.6L6.6 5.2 5.2 6.6l5.4 5.4-5.4 5.4 1.4 1.4 5.4-5.4 5.4 5.4 1.4-1.4-5.4-5.4 5.4-5.4-1.4-1.4-5.4 5.4z"/></svg></button>',arrowLeft:'<button data-fancybox-prev class="modula-fancybox-button modula-fancybox-button--arrow_left" title="{{PREV}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.28 15.7l-1.34 1.37L5 12l4.94-5.07 1.34 1.38-2.68 2.72H19v1.94H8.6z"/></svg></div></button>',arrowRight:'<button data-fancybox-next class="modula-fancybox-button modula-fancybox-button--arrow_right" title="{{NEXT}}"><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.4 12.97l-2.68 2.72 1.34 1.38L19 12l-4.94-5.07-1.34 1.38 2.68 2.72H5v1.94z"/></svg></div></button>',smallBtn:'<button type="button" data-fancybox-close class="modula-fancybox-button modula-fancybox-close-small" title="{{CLOSE}}"><svg xmlns="http://www.w3.org/2000/svg" version="1" viewBox="0 0 24 24"><path d="M13 12l5-5-1-1-5 5-5-5-1 1 5 5-5 5 1 1 5-5 5 5 1-1z"/></svg></button>'},modulaShare:["facebook","twitter","pinterest","whatsapp","linkedin","email"],shareBtnTpl:{facebook:'<a class="modula-fancybox-share__button modula-fancybox-share__button--fb" href="https://www.facebook.com/sharer/sharer.php?u={{modulaShareUrl}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m287 456v-299c0-21 6-35 35-35h38v-63c-7-1-29-3-55-3-54 0-91 33-91 94v306m143-254h-205v72h196" /></svg><span>Facebook</span></a>',twitter:'<a class="modula-fancybox-share__button modula-fancybox-share__button--tw" href="https://twitter.com/intent/tweet?url={{modulaShareUrl}}&text={{descr}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m456 133c-14 7-31 11-47 13 17-10 30-27 37-46-15 10-34 16-52 20-61-62-157-7-141 75-68-3-129-35-169-85-22 37-11 86 26 109-13 0-26-4-37-9 0 39 28 72 65 80-12 3-25 4-37 2 10 33 41 57 77 57-42 30-77 38-122 34 170 111 378-32 359-208 16-11 30-25 41-42z" /></svg><span>Twitter</span></a>',pinterest:'<a class="modula-fancybox-share__button modula-fancybox-share__button--pt" href="https://www.pinterest.com/pin/create/button/?url={{modulaShareUrl}}&description={{descr}}&media={{media}}"><svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m265 56c-109 0-164 78-164 144 0 39 15 74 47 87 5 2 10 0 12-5l4-19c2-6 1-8-3-13-9-11-15-25-15-45 0-58 43-110 113-110 62 0 96 38 96 88 0 67-30 122-73 122-24 0-42-19-36-44 6-29 20-60 20-81 0-19-10-35-31-35-25 0-44 26-44 60 0 21 7 36 7 36l-30 125c-8 37-1 83 0 87 0 3 4 4 5 2 2-3 32-39 42-75l16-64c8 16 31 29 56 29 74 0 124-67 124-157 0-69-58-132-146-132z" fill="#fff"/></svg><span>Pinterest</span></a>',whatsapp:'<a class="modula-fancybox-share__button modula-fancybox-share__button--wa" href="https://api.whatsapp.com/send?text={{modulaShareUrl}}&review_url=true"><svg aria-hidden="true" focusable="false" style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);" preserveAspectRatio="xMidYMid meet" viewBox="0 0 1536 1600"><path d="M985 878q13 0 97.5 44t89.5 53q2 5 2 15q0 33-17 76q-16 39-71 65.5T984 1158q-57 0-190-62q-98-45-170-118T476 793q-72-107-71-194v-8q3-91 74-158q24-22 52-22q6 0 18 1.5t19 1.5q19 0 26.5 6.5T610 448q8 20 33 88t25 75q0 21-34.5 57.5T599 715q0 7 5 15q34 73 102 137q56 53 151 101q12 7 22 7q15 0 54-48.5t52-48.5zm-203 530q127 0 243.5-50t200.5-134t134-200.5t50-243.5t-50-243.5T1226 336t-200.5-134T782 152t-243.5 50T338 336T204 536.5T154 780q0 203 120 368l-79 233l242-77q158 104 345 104zm0-1382q153 0 292.5 60T1315 247t161 240.5t60 292.5t-60 292.5t-161 240.5t-240.5 161t-292.5 60q-195 0-365-94L0 1574l136-405Q28 991 28 780q0-153 60-292.5T249 247T489.5 86T782 26z" fill="currentColor"/></svg><span>WhatsApp</span></a>',linkedin:'<a class="modula-fancybox-share__button modula-fancybox-share__button--li" href="//linkedin.com/shareArticle?mini=true&url={{modulaShareUrl}}"><svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="linkedin-in" class="svg-inline--fa fa-linkedin-in fa-w-14" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z"></path></svg><span>LinkedIn</span></a>',email:'<a class="modula-fancybox-share__button modula-fancybox-share__button--email" href="mailto:?subject={{subject}}&body={{emailMessage}}"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 3v18h24v-18h-24zm6.623 7.929l-4.623 5.712v-9.458l4.623 3.746zm-4.141-5.929h19.035l-9.517 7.713-9.518-7.713zm5.694 7.188l3.824 3.099 3.83-3.104 5.612 6.817h-18.779l5.513-6.812zm9.208-1.264l4.616-3.741v9.348l-4.616-5.607z" fill="currentColor"></path></svg><span>Email</span></a>'},parentEl:"body",hideScrollbar:!0,autoFocus:!0,backFocus:!0,trapFocus:!0,fullScreen:{autoStart:!1},touch:{vertical:!0,momentum:!0},hash:null,media:{},slideShow:{autoStart:!1,speed:3e3},thumbs:{autoStart:!1,hideOnClose:!0,parentEl:".modula-fancybox-container",axis:"y"},wheel:"auto",onInit:f.noop,beforeLoad:f.noop,afterLoad:f.noop,beforeShow:f.noop,afterShow:f.noop,beforeClose:f.noop,afterClose:f.noop,onActivate:f.noop,onDeactivate:f.noop,clickContent:function(t,e){return"image"===t.type&&"zoom"},clickSlide:"close",clickOutside:"close",dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1,mobile:{preventCaptionOverlap:!1,idleTime:!1,clickContent:function(t,e){return"image"===t.type&&"toggleControls"},clickSlide:function(t,e){return"image"===t.type?"toggleControls":"close"},dblclickContent:function(t,e){return"image"===t.type&&"zoom"},dblclickSlide:function(t,e){return"image"===t.type&&"zoom"}},lang:"en",i18n:{en:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",ERROR:"The requested content cannot be loaded. <br/> Please try again later.",PLAY_START:"Start slideshow",PLAY_STOP:"Pause slideshow",FULL_SCREEN:"Full screen",THUMBS:"Thumbnails",DOWNLOAD:"Download",SHARE:"Share",ZOOM:"Zoom"},de:{CLOSE:"Schlie&szlig;en",NEXT:"Weiter",PREV:"Zur&uuml;ck",ERROR:"Die angeforderten Daten konnten nicht geladen werden. <br/> Bitte versuchen Sie es sp&auml;ter nochmal.",PLAY_START:"Diaschau starten",PLAY_STOP:"Diaschau beenden",FULL_SCREEN:"Vollbild",THUMBS:"Vorschaubilder",DOWNLOAD:"Herunterladen",SHARE:"Teilen",ZOOM:"Vergr&ouml;&szlig;ern"}}},a=f(l),i=f(s),r=0,d=l.requestAnimationFrame||l.webkitRequestAnimationFrame||l.mozRequestAnimationFrame||l.oRequestAnimationFrame||function(t){return l.setTimeout(t,1e3/60)},e=l.cancelAnimationFrame||l.webkitCancelAnimationFrame||l.mozCancelAnimationFrame||l.oCancelAnimationFrame||function(t){l.clearTimeout(t)},c=function(){var t,e=s.createElement("fakeelement"),o={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in o)if(e.style[t]!==m)return o[t];return"transitionend"}(),p=function(t){return t&&t.length&&t[0].offsetHeight},u=function(t,e){var o=f.extend(!0,{},t,e);return f.each(e,function(t,e){f.isArray(e)&&(o[t]=e)}),o},n=function(t,e,o){var n=this;n.opts=u({index:o},f.modulaFancybox.defaults),f.isPlainObject(e)&&(n.opts=u(n.opts,e)),f.modulaFancybox.isMobile&&(n.opts=u(n.opts,n.opts.mobile)),n.id=n.opts.id||++r,n.currIndex=parseInt(n.opts.index,10)||0,n.prevIndex=null,n.prevPos=null,n.currPos=0,n.firstRun=!0,n.group=[],n.slides={},n.addContent(t),n.group.length&&n.init()},f.extend(n.prototype,{init:function(){var o=this;o.currIndex<0&&(o.currIndex=0),void 0===o.group[o.currIndex]&&jQuery.each(this.group,function(t,e){o.currIndex==parseInt(e.opts.image_id)&&(o.currIndex=t)});var e,n,a=o.group[o.currIndex].opts;a.closeExisting&&f.modulaFancybox.close(!0),f("body").addClass("modula-fancybox-active"),!f.modulaFancybox.getInstance()&&!1!==a.hideScrollbar&&!f.modulaFancybox.isMobile&&s.body.scrollHeight>l.innerHeight&&(f("head").append('<style id="modula-fancybox-style-noscroll" type="text/css">.compensate-for-scrollbar{margin-right:'+(l.innerWidth-s.documentElement.clientWidth)+"px;}</style>"),f("body").addClass("compensate-for-scrollbar")),n="",f.each(a.buttons,function(t,e){n+=a.btnTpl[e]||""}),e=f(o.translate(o,a.baseTpl.replace("{{buttons}}",n).replace("{{arrows}}",a.btnTpl.arrowLeft+a.btnTpl.arrowRight))).attr("id","modula-fancybox-container-"+o.id).addClass(a.baseClass).data("modulaFancyBox",o).appendTo(a.parentEl),o.$refs={container:e},["bg","inner","infobar","toolbar","stage","caption","navigation"].forEach(function(t){o.$refs[t]=e.find(".modula-fancybox-"+t)}),o.trigger("onInit"),o.activate(),o.jumpTo(o.currIndex)},translate:function(t,e){var o=t.opts.i18n[t.opts.lang]||t.opts.i18n.en;return e.replace(/\{\{(\w+)\}\}/g,function(t,e){return o[e]===m?t:o[e]})},addContent:function(t){var r=this,t=f.makeArray(t);f.each(t,function(t,e){var o,n,a,i={},s={};f.isPlainObject(e)?s=(i=e).opts||e:"object"===f.type(e)&&f(e).length?(s=(n=f(e)).data()||{},(s=f.extend(!0,{},s,s.options)).$orig=n,i.src=r.opts.src||s.src||n.attr("href"),i.type||i.src||(i.type="inline",i.src=e)):i={type:"html",src:e+""},i.opts=f.extend(!0,{},r.opts,s),f.isArray(s.buttons)&&(i.opts.buttons=s.buttons),f.modulaFancybox.isMobile&&i.opts.mobile&&(i.opts=u(i.opts,i.opts.mobile)),o=i.type||i.opts.type,n=i.src||"",!o&&n&&((s=n.match(/\.(mp4|mov|ogv|webm)((\?|#).*)?$/i))?(o="video",i.opts.video.format||(i.opts.video.format="video/"+("ogv"===s[1]?"ogg":s[1]))):n.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i)?o="image":n.match(/\.(pdf)((\?|#).*)?$/i)?(o="iframe",i=f.extend(!0,i,{contentType:"pdf",opts:{iframe:{preload:!1}}})):"#"===n.charAt(0)&&(o="inline")),o?i.type=o:r.trigger("objectNeedsType",i),i.contentType||(i.contentType=-1<f.inArray(i.type,["html","inline","ajax"])?"html":i.type),i.index=r.group.length,"auto"==i.opts.smallBtn&&(i.opts.smallBtn=-1<f.inArray(i.type,["html","inline","ajax"])),"auto"===i.opts.toolbar&&(i.opts.toolbar=!i.opts.smallBtn),i.$thumb=i.opts.$thumb||null,i.opts.$trigger&&i.index===r.opts.index&&(i.$thumb=i.opts.$trigger.find("img:first"),i.$thumb.length&&(i.opts.$orig=i.opts.$trigger)),i.$thumb&&i.$thumb.length||!i.opts.$orig||(i.$thumb=i.opts.$orig.find("img:first")),i.$thumb&&!i.$thumb.length&&(i.$thumb=null),i.thumb=i.opts.thumb||(i.$thumb?i.$thumb[0].src:null),"function"===f.type(i.opts.caption)&&(i.opts.caption=i.opts.caption.apply(e,[r,i])),"function"===f.type(r.opts.caption)&&(i.opts.caption=r.opts.caption.apply(e,[r,i])),i.opts.caption instanceof f||(i.opts.caption=i.opts.caption===m?"":i.opts.caption+""),"ajax"===i.type&&1<(a=n.split(/\s+/,2)).length&&(i.src=a.shift(),i.opts.filter=a.shift()),i.opts.modal&&(i.opts=f.extend(!0,i.opts,{trapFocus:!0,infobar:0,toolbar:0,smallBtn:0,keyboard:0,slideShow:0,fullScreen:0,thumbs:0,touch:0,clickContent:!1,clickSlide:!1,clickOutside:!1,dblclickContent:!1,dblclickSlide:!1,dblclickOutside:!1})),r.group.push(i)}),Object.keys(r.slides).length&&(r.updateControls(),(t=r.Thumbs)&&t.isActive&&(t.create(),t.focus()))},addEvents:function(){var n=this;n.removeEvents(),n.$refs.container.on("click.fb-close","[data-fancybox-close]",function(t){t.stopPropagation(),t.preventDefault(),n.close(t)}).on("touchstart.fb-prev click.fb-prev","[data-fancybox-prev]",function(t){t.stopPropagation(),t.preventDefault(),n.previous()}).on("touchstart.fb-next click.fb-next","[data-fancybox-next]",function(t){t.stopPropagation(),t.preventDefault(),n.next()}).on("click.fb","[data-fancybox-zoom]",function(t){n[n.isScaledDown()?"scaleToActual":"scaleToFit"]()}),a.on("orientationchange.fb resize.fb",function(t){t&&t.originalEvent&&"resize"===t.originalEvent.type?(n.requestId&&e(n.requestId),n.requestId=d(function(){n.update(t)})):(n.current&&"iframe"===n.current.type&&n.$refs.stage.hide(),setTimeout(function(){n.$refs.stage.show(),n.update(t)},f.modulaFancybox.isMobile?600:250))}),i.on("keydown.fb",function(t){var e=(f.modulaFancybox?f.modulaFancybox.getInstance():null).current,o=t.keyCode||t.which;if(9!=o){if(!(!e.opts.keyboard||t.ctrlKey||t.altKey||t.shiftKey||f(t.target).is("input,textarea,video,audio,select")))return 8===o||27===o?(t.preventDefault(),void n.close(t)):37===o||38===o?(t.preventDefault(),void n.previous()):39===o||40===o?(t.preventDefault(),void n.next()):void n.trigger("afterKeydown",t,o)}else e.opts.trapFocus&&n.focus(t)}),n.group[n.currIndex].opts.idleTime&&(n.idleSecondsCounter=0,i.on("mousemove.fb-idle mouseleave.fb-idle mousedown.fb-idle touchstart.fb-idle touchmove.fb-idle scroll.fb-idle keydown.fb-idle",function(t){n.idleSecondsCounter=0,n.isIdle&&n.showControls(),n.isIdle=!1}),n.idleInterval=l.setInterval(function(){n.idleSecondsCounter++,n.idleSecondsCounter>=n.group[n.currIndex].opts.idleTime&&!n.isDragging&&(n.isIdle=!0,n.idleSecondsCounter=0,n.hideControls())},1e3))},removeEvents:function(){a.off("orientationchange.fb resize.fb"),i.off("keydown.fb .fb-idle"),this.$refs.container.off(".fb-close .fb-prev .fb-next"),this.idleInterval&&(l.clearInterval(this.idleInterval),this.idleInterval=null)},previous:function(t){return this.jumpTo(this.currPos-1,t)},next:function(t){return this.jumpTo(this.currPos+1,t)},jumpTo:function(t,n){var e,o,a,i,s,r,l,c,d=this,u=d.group.length;if(!(d.isDragging||d.isClosing||d.isAnimating&&d.firstRun))return t=parseInt(t,10),!(!(o=(d.current||d).opts.loop)&&(t<0||u<=t))&&(e=d.firstRun=!Object.keys(d.slides).length,i=d.current,d.prevIndex=d.currIndex,d.prevPos=d.currPos,a=d.createSlide(t),1<u&&((o||a.index<u-1)&&d.createSlide(t+1),(o||0<a.index)&&d.createSlide(t-1)),d.current=a,d.currIndex=a.index,d.currPos=a.pos,d.trigger("beforeShow",e),d.updateControls(),a.forcedDuration=m,f.isNumeric(n)?a.forcedDuration=n:n=a.opts[e?"animationDuration":"transitionDuration"],n=parseInt(n,10),t=d.isMoved(a),a.$slide.addClass("modula-fancybox-slide--current"),e?(a.opts.animationEffect&&n&&d.$refs.container.css("transition-duration",n+"ms"),d.$refs.container.addClass("modula-fancybox-is-open").trigger("focus"),d.loadSlide(a)):(s=f.modulaFancybox.getTranslate(i.$slide),r=f.modulaFancybox.getTranslate(d.$refs.stage),f.each(d.slides,function(t,e){f.modulaFancybox.stop(e.$slide,!0)}),i.pos!==a.pos&&(i.isComplete=!1),i.$slide.removeClass("modula-fancybox-slide--complete modula-fancybox-slide--current"),t?(c=s.left-(i.pos*s.width+i.pos*i.opts.gutter),f.each(d.slides,function(t,e){e.$slide.removeClass("modula-fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)modula-fancybox-fx-\S+/g)||[]).join(" ")});var o=e.pos*s.width+e.pos*e.opts.gutter;f.modulaFancybox.setTranslate(e.$slide,{top:0,left:o-r.left+c}),e.pos!==a.pos&&e.$slide.addClass("modula-fancybox-slide--"+(e.pos>a.pos?"next":"previous")),p(e.$slide),f.modulaFancybox.animate(e.$slide,{top:0,left:(e.pos-a.pos)*s.width+(e.pos-a.pos)*e.opts.gutter},n,function(){e.$slide.css({transform:"",opacity:""}).removeClass("modula-fancybox-slide--next modula-fancybox-slide--previous"),e.pos===d.currPos&&d.complete()})})):n&&a.opts.transitionEffect&&(l="modula-fancybox-animated modula-fancybox-fx-"+a.opts.transitionEffect,i.$slide.addClass("modula-fancybox-slide--"+(i.pos>a.pos?"next":"previous")),f.modulaFancybox.animate(i.$slide,l,n,function(){i.$slide.removeClass(l).removeClass("modula-fancybox-slide--next modula-fancybox-slide--previous")},!1)),a.isLoaded?d.revealContent(a):d.loadSlide(a)),void d.preload("image"))},createSlide:function(t){var e,o=this,n=t%o.group.length;return n=n<0?o.group.length+n:n,!o.slides[t]&&o.group[n]&&(e=f('<div class="modula-fancybox-slide"></div>').appendTo(o.$refs.stage),o.slides[t]=f.extend(!0,{},o.group[n],{pos:t,$slide:e,isLoaded:!1}),o.updateSlide(o.slides[t])),o.slides[t]},scaleToActual:function(t,e,o){var n,a,i,s,r=this,l=r.current,c=l.$content,d=f.modulaFancybox.getTranslate(l.$slide).width,u=f.modulaFancybox.getTranslate(l.$slide).height,p=l.width,h=l.height;r.isAnimating||r.isMoved()||!c||"image"!=l.type||!l.isLoaded||l.hasError||(r.isAnimating=!0,f.modulaFancybox.stop(c),t=t===m?.5*d:t,e=e===m?.5*u:e,(n=f.modulaFancybox.getTranslate(c)).top-=f.modulaFancybox.getTranslate(l.$slide).top,n.left-=f.modulaFancybox.getTranslate(l.$slide).left,i=p/n.width,s=h/n.height,a=.5*d-.5*p,l=.5*u-.5*h,d<p&&(0<(a=n.left*i-(t*i-t))&&(a=0),a<d-p&&(a=d-p)),u<h&&(0<(l=n.top*s-(e*s-e))&&(l=0),l<u-h&&(l=u-h)),r.updateCursor(p,h),f.modulaFancybox.animate(c,{top:l,left:a,scaleX:i,scaleY:s},o||366,function(){r.isAnimating=!1}),r.SlideShow&&r.SlideShow.isActive&&r.SlideShow.stop())},scaleToFit:function(t){var e=this,o=e.current,n=o.$content;e.isAnimating||e.isMoved()||!n||"image"!=o.type||!o.isLoaded||o.hasError||(e.isAnimating=!0,f.modulaFancybox.stop(n),o=e.getFitPos(o),e.updateCursor(o.width,o.height),f.modulaFancybox.animate(n,{top:o.top,left:o.left,scaleX:o.width/n.width(),scaleY:o.height/n.height()},t||366,function(){e.isAnimating=!1}))},getFitPos:function(t){var e,o,n=t.$content,a=t.$slide,i=t.width||t.opts.width,s=t.height||t.opts.height,r={};return!!(t.isLoaded&&n&&n.length)&&(e=f.modulaFancybox.getTranslate(this.$refs.stage).width,o=f.modulaFancybox.getTranslate(this.$refs.stage).height,e-=parseFloat(a.css("paddingLeft"))+parseFloat(a.css("paddingRight"))+parseFloat(n.css("marginLeft"))+parseFloat(n.css("marginRight")),o-=parseFloat(a.css("paddingTop"))+parseFloat(a.css("paddingBottom"))+parseFloat(n.css("marginTop"))+parseFloat(n.css("marginBottom")),i&&s||(i=e,s=o),e-.5<(i*=n=Math.min(1,e/i,o/s))&&(i=e),o-.5<(s*=n)&&(s=o),"image"===t.type?(r.top=Math.floor(.5*(o-s))+parseFloat(a.css("paddingTop")),r.left=Math.floor(.5*(e-i))+parseFloat(a.css("paddingLeft"))):"video"===t.contentType&&(i/(t=t.opts.width&&t.opts.height?i/s:t.opts.ratio||16/9)<s?s=i/t:s*t<i&&(i=s*t)),r.width=i,r.height=s,r)},update:function(o){var n=this;f.each(n.slides,function(t,e){n.updateSlide(e,o)})},updateSlide:function(t,e){var o=this,n=t&&t.$content,a=t.width||t.opts.width,i=t.height||t.opts.height,s=t.$slide;o.adjustCaption(t),n&&(a||i||"video"===t.contentType)&&!t.hasError&&(f.modulaFancybox.stop(n),f.modulaFancybox.setTranslate(n,o.getFitPos(t)),t.pos===o.currPos&&(o.isAnimating=!1,o.updateCursor())),o.adjustLayout(t),s.length&&(s.trigger("refresh"),t.pos===o.currPos&&o.$refs.toolbar.add(o.$refs.navigation.find(".modula-fancybox-button--arrow_right")).toggleClass("compensate-for-scrollbar",s.get(0).scrollHeight>s.get(0).clientHeight)),o.trigger("onUpdate",t,e)},centerSlide:function(t){var e=this,o=e.current,n=o.$slide;!e.isClosing&&o&&(n.siblings().css({transform:"",opacity:""}),n.parent().children().removeClass("modula-fancybox-slide--previous modula-fancybox-slide--next"),f.modulaFancybox.animate(n,{top:0,left:0,opacity:1},t===m?0:t,function(){n.css({transform:"",opacity:""}),o.isComplete||e.complete()},!1))},isMoved:function(t){var e,o=t||this.current;return!!o&&(e=f.modulaFancybox.getTranslate(this.$refs.stage),t=f.modulaFancybox.getTranslate(o.$slide),!o.$slide.hasClass("modula-fancybox-animated")&&(.5<Math.abs(t.top-e.top)||.5<Math.abs(t.left-e.left)))},updateCursor:function(t,e){var o=this,n=o.current,a=o.$refs.container;n&&!o.isClosing&&o.Guestures&&(a.removeClass("modula-fancybox-is-zoomable modula-fancybox-can-zoomIn modula-fancybox-can-zoomOut modula-fancybox-can-swipe modula-fancybox-can-pan"),e=!!(t=o.canPan(t,e))||o.isZoomable(),a.toggleClass("modula-fancybox-is-zoomable",e),f("[data-fancybox-zoom]").prop("disabled",!e),t?a.addClass("modula-fancybox-can-pan"):e&&("zoom"===n.opts.clickContent||f.isFunction(n.opts.clickContent)&&"zoom"==n.opts.clickContent(n))?a.addClass("modula-fancybox-can-zoomIn"):n.opts.touch&&(n.opts.touch.vertical||1<o.group.length)&&"video"!==n.contentType&&a.addClass("modula-fancybox-can-swipe"))},isZoomable:function(){var t,e=this.current;if(e&&!this.isClosing&&"image"===e.type&&!e.hasError){if(!e.isLoaded)return!0;if((t=this.getFitPos(e))&&(e.width>t.width||e.height>t.height))return!0}return!1},isScaledDown:function(t,e){var o=!1,n=this.current,a=n.$content;return t!==m&&e!==m?o=t<n.width&&e<n.height:a&&(o=(o=f.modulaFancybox.getTranslate(a)).width<n.width&&o.height<n.height),o},canPan:function(t,e){var o=this.current,n=null,a=!1;return"image"===o.type&&(o.isComplete||t&&e)&&!o.hasError&&(a=this.getFitPos(o),t!==m&&e!==m?n={width:t,height:e}:o.isComplete&&(n=f.modulaFancybox.getTranslate(o.$content)),n&&a&&(a=1.5<Math.abs(n.width-a.width)||1.5<Math.abs(n.height-a.height))),a},loadSlide:function(o){var t,e,n,a=this;if(!o.isLoading&&!o.isLoaded){if(!(o.isLoading=!0)===a.trigger("beforeLoad",o))return o.isLoading=!1;switch(t=o.type,(e=o.$slide).off("refresh").trigger("onReset").addClass(o.opts.slideClass),t){case"image":a.setImage(o);break;case"iframe":a.setIframe(o);break;case"html":a.setContent(o,o.src||o.content);break;case"video":a.setContent(o,o.opts.video.tpl.replace(/\{\{src\}\}/gi,o.src).replace("{{format}}",o.opts.videoFormat||o.opts.video.format||"").replace("{{poster}}",o.thumb||""));break;case"inline":f(o.src).length?a.setContent(o,f(o.src)):a.setError(o);break;case"ajax":a.showLoading(o),n=f.ajax(f.extend({},o.opts.ajax.settings,{url:o.src,success:function(t,e){"success"===e&&a.setContent(o,t)},error:function(t,e){t&&"abort"!==e&&a.setError(o)}})),e.one("onReset",function(){n.abort()});break;default:a.setError(o)}return!0}},setImage:function(e){var t,o=this;setTimeout(function(){var t=e.$image;o.isClosing||!e.isLoading||t&&t.length&&t[0].complete||e.hasError||o.showLoading(e)},50),o.checkSrcset(e),e.$content=f('<div class="modula-fancybox-content"></div>').addClass("modula-fancybox-is-hidden").appendTo(e.$slide.addClass("modula-fancybox-slide--image")),!1!==e.opts.preload&&e.opts.width&&e.opts.height&&e.thumb&&(e.width=e.opts.width,e.height=e.opts.height,(t=s.createElement("img")).onerror=function(){f(this).remove(),e.$ghost=null},t.onload=function(){o.afterLoad(e)},e.$ghost=f(t).addClass("modula-fancybox-image").appendTo(e.$content).attr("src",e.thumb),"undifined"!=typeof e.src&&e.$ghost.attr("alt",e.alt)),o.setBigImage(e)},checkSrcset:function(t){var e,o,n,a,i=t.opts.srcset||t.opts.image.srcset;if(i){n=l.devicePixelRatio||1,a=l.innerWidth*n,(o=i.split(",").map(function(t){var n={};return t.trim().split(/\s+/).forEach(function(t,e){var o=parseInt(t.substring(0,t.length-1),10);if(0===e)return n.url=t;o&&(n.value=o,n.postfix=t[t.length-1])}),n})).sort(function(t,e){return t.value-e.value});for(var s=0;s<o.length;s++){var r=o[s];if("w"===r.postfix&&r.value>=a||"x"===r.postfix&&r.value>=n){e=r;break}}!e&&o.length&&(e=o[o.length-1]),e&&(t.src=e.url,t.width&&t.height&&"w"==e.postfix&&(t.height=t.width/t.height*e.value,t.width=e.value),t.opts.srcset=i)}},setBigImage:function(e){var o=this,t=s.createElement("img"),n=f(t);e.$image=n.one("error",function(){o.setError(e)}).one("load",function(){var t;e.$ghost||(o.resolveImageSlideSize(e,this.naturalWidth,this.naturalHeight),o.afterLoad(e)),o.isClosing||(e.opts.srcset&&((t=e.opts.sizes)&&"auto"!==t||(t=(1<e.width/e.height&&1<a.width()/a.height()?"100":Math.round(e.width/e.height*100))+"vw"),n.attr("sizes",t).attr("srcset",e.opts.srcset)),e.opts.alt&&n.attr("alt",e.opts.alt),e.opts.image_id&&n.attr("image-id",e.opts.image_id),e.$thumb&&n.attr("title",e.$thumb.find("img.pic").attr("title")),e.$ghost&&setTimeout(function(){e.$ghost&&!o.isClosing&&e.$ghost.hide()},Math.min(300,Math.max(1e3,e.height/1600))),o.hideLoading(e))}).addClass("modula-fancybox-image").attr("src",e.src).appendTo(e.$content),(t.complete||"complete"==t.readyState)&&n.naturalWidth&&n.naturalHeight?n.trigger("load"):t.error&&n.trigger("error")},resolveImageSlideSize:function(t,e,o){var n=parseInt(t.opts.width,10),a=parseInt(t.opts.height,10);t.width=e,t.height=o,0<n&&(t.width=n,t.height=Math.floor(n*o/e)),0<a&&(t.width=Math.floor(a*e/o),t.height=a)},setIframe:function(a){var i,e=this,s=a.opts.iframe,r=a.$slide;a.$content=f('<div class="modula-fancybox-content'+(s.preload?" modula-fancybox-is-hidden":"")+'"></div>').css(s.css).appendTo(r),r.addClass("modula-fancybox-slide--"+a.contentType),a.$iframe=i=f(s.tpl.replace(/\{rnd\}/g,(new Date).getTime())).attr(s.attr).appendTo(a.$content),s.preload?(e.showLoading(a),i.on("load.fb error.fb",function(t){this.isReady=1,a.$slide.trigger("refresh"),e.afterLoad(a)}),r.on("refresh.fb",function(){var t,e=a.$content,o=s.css.width,n=s.css.height;if(1===i[0].isReady){try{t=i.contents().find("body")}catch(t){}t&&t.length&&t.children().length&&(r.css("overflow","visible"),e.css({width:"100%","max-width":"100%",height:"9999px"}),o===m&&(o=Math.ceil(Math.max(t[0].clientWidth,t.outerWidth(!0)))),e.css("width",o||"").css("max-width",""),n===m&&(n=Math.ceil(Math.max(t[0].clientHeight,t.outerHeight(!0)))),e.css("height",n||""),r.css("overflow","auto")),e.removeClass("modula-fancybox-is-hidden")}})):e.afterLoad(a),i.attr("src",a.src),r.one("onReset",function(){try{f(this).find("iframe").hide().unbind().attr("src","//about:blank")}catch(t){}f(this).off("refresh.fb").empty(),a.isLoaded=!1,a.isRevealed=!1})},setContent:function(t,e){var o;this.isClosing||(this.hideLoading(t),t.$content&&f.modulaFancybox.stop(t.$content),t.$slide.empty(),(o=e)&&o.hasOwnProperty&&o instanceof f&&e.parent().length?((e.hasClass("modula-fancybox-content")||e.parent().hasClass("modula-fancybox-content"))&&e.parents(".modula-fancybox-slide").trigger("onReset"),t.$placeholder=f("<div>").hide().insertAfter(e),e.css("display","inline-block")):t.hasError||("string"===f.type(e)&&(e=f("<div>").append(f.trim(e)).contents()),t.opts.filter&&(e=f("<div>").html(e).find(t.opts.filter))),t.$slide.one("onReset",function(){f(this).find("video,audio").trigger("pause"),t.$placeholder&&(t.$placeholder.after(e.removeClass("modula-fancybox-content").hide()).remove(),t.$placeholder=null),t.$smallBtn&&(t.$smallBtn.remove(),t.$smallBtn=null),t.hasError||(f(this).empty(),t.isLoaded=!1,t.isRevealed=!1)}),f(e).appendTo(t.$slide),f(e).is("video,audio")&&(f(e).addClass("modula-fancybox-video"),f(e).wrap("<div></div>"),t.contentType="video",t.opts.width=t.opts.width||f(e).attr("width"),t.opts.height=t.opts.height||f(e).attr("height")),t.$content=t.$slide.children().filter("div,form,main,video,audio,article,.modula-fancybox-content").first(),t.$content.siblings().hide(),t.$content.length||(t.$content=t.$slide.wrapInner("<div></div>").children().first()),t.$content.addClass("modula-fancybox-content"),t.$slide.addClass("modula-fancybox-slide--"+t.contentType),this.afterLoad(t))},setError:function(t){t.hasError=!0,t.$slide.trigger("onReset").removeClass("modula-fancybox-slide--"+t.contentType).addClass("modula-fancybox-slide--error"),t.contentType="html",this.setContent(t,this.translate(t,t.opts.errorTpl)),t.pos===this.currPos&&(this.isAnimating=!1)},showLoading:function(t){(t=t||this.current)&&!t.$spinner&&(t.$spinner=f(this.translate(this,this.opts.spinnerTpl)).appendTo(t.$slide).hide().fadeIn("fast"))},hideLoading:function(t){(t=t||this.current)&&t.$spinner&&(t.$spinner.stop().remove(),delete t.$spinner)},afterLoad:function(t){var e=this;e.isClosing||(t.isLoading=!1,t.isLoaded=!0,e.trigger("afterLoad",t),e.hideLoading(t),!t.opts.smallBtn||t.$smallBtn&&t.$smallBtn.length||(t.$smallBtn=f(e.translate(t,t.opts.btnTpl.smallBtn)).appendTo(t.$content)),t.opts.protect&&t.$content&&!t.hasError&&(t.$content.on("contextmenu.fb",function(t){return 2==t.button&&t.preventDefault(),!0}),"image"===t.type&&f('<div class="modula-fancybox-spaceball"></div>').appendTo(t.$content)),e.adjustCaption(t),e.adjustLayout(t),t.pos===e.currPos&&e.updateCursor(),e.revealContent(t))},adjustCaption:function(t){var e=this,o=t||e.current,n=o.opts.caption,a=o.opts.preventCaptionOverlap,i=e.$refs.caption,t=!1;i.toggleClass("modula-fancybox-caption--separate",a),a&&n&&n.length&&(o.pos!==e.currPos?((i=i.clone().appendTo(i.parent())).children().eq(0).empty().html(n),t=i.outerHeight(!0),i.empty().remove()):e.$caption&&(t=e.$caption.outerHeight(!0)),o.$slide.css("padding-bottom",t||""))},adjustLayout:function(t){var e,o,n,a=t||this.current;a.isLoaded&&!0!==a.opts.disableLayoutFix&&(a.$content.css("margin-bottom",""),a.$content.outerHeight()>a.$slide.height()+.5&&(o=a.$slide[0].style["padding-bottom"],n=a.$slide.css("padding-bottom"),0<parseFloat(n)&&(t=a.$slide[0].scrollHeight,a.$slide.css("padding-bottom",0),Math.abs(t-a.$slide[0].scrollHeight)<1&&(e=n),a.$slide.css("padding-bottom",o))),a.$content.css("margin-bottom",e))},revealContent:function(t){var e,o,n,a,i=this,s=t.$slide,r=!1,l=!1,c=i.isMoved(t),d=t.isRevealed;return t.isRevealed=!0,e=t.opts[i.firstRun?"animationEffect":"transitionEffect"],n=t.opts[i.firstRun?"animationDuration":"transitionDuration"],n=parseInt(t.forcedDuration===m?n:t.forcedDuration,10),!c&&t.pos===i.currPos&&n||(e=!1),"zoom"===e&&(t.pos===i.currPos&&n&&"image"===t.type&&!t.hasError&&(l=i.getThumbPos(t))?r=i.getFitPos(t):e="fade"),"zoom"===e?(i.isAnimating=!0,r.scaleX=r.width/l.width,r.scaleY=r.height/l.height,"auto"==(a=t.opts.zoomOpacity)&&(a=.1<Math.abs(t.width/t.height-l.width/l.height)),a&&(l.opacity=.1,r.opacity=1),f.modulaFancybox.setTranslate(t.$content.removeClass("modula-fancybox-is-hidden"),l),p(t.$content),void f.modulaFancybox.animate(t.$content,r,n,function(){i.isAnimating=!1,i.complete()})):(i.updateSlide(t),e?(f.modulaFancybox.stop(s),o="modula-fancybox-slide--"+(t.pos>=i.prevPos?"next":"previous")+" modula-fancybox-animated modula-fancybox-fx-"+e,s.addClass(o).removeClass("modula-fancybox-slide--current"),t.$content.removeClass("modula-fancybox-is-hidden"),p(s),"image"!==t.type&&t.$content.hide().show(0),void f.modulaFancybox.animate(s,"modula-fancybox-slide--current",n,function(){s.removeClass(o).css({transform:"",opacity:""}),t.pos===i.currPos&&i.complete()},!0)):(t.$content.removeClass("modula-fancybox-is-hidden"),d||!c||"image"!==t.type||t.hasError||t.$content.hide().fadeIn("fast"),void(t.pos===i.currPos&&i.complete())))},getThumbPos:function(t){var e,o,n,a,i=t.$thumb;return!!(i&&(a=(n=i).find("a.tile-inner")[0])&&a.ownerDocument===s&&(f(".modula-fancybox-container").css("pointer-events","none"),n={x:a.getBoundingClientRect().left+a.offsetWidth/2,y:a.getBoundingClientRect().top+a.offsetHeight/2},a=s.elementFromPoint(n.x,n.y)===a,f(".modula-fancybox-container").css("pointer-events",""),a))&&(o=f.modulaFancybox.getTranslate(i),t=parseFloat(i.css("border-top-width")||0),n=parseFloat(i.css("border-right-width")||0),a=parseFloat(i.css("border-bottom-width")||0),i=parseFloat(i.css("border-left-width")||0),e={top:o.top+t,left:o.left+i,width:o.width-n-i,height:o.height-t-a,scaleX:1,scaleY:1},0<o.width&&0<o.height&&e)},complete:function(){var t,o=this,e=o.current,n={};!o.isMoved()&&e.isLoaded&&(e.isComplete||(e.isComplete=!0,e.$slide.siblings().trigger("onReset"),o.preload("inline"),p(e.$slide),e.$slide.addClass("modula-fancybox-slide--complete"),f.each(o.slides,function(t,e){e.pos>=o.currPos-1&&e.pos<=o.currPos+1?n[e.pos]=e:e&&(f.modulaFancybox.stop(e.$slide),e.$slide.off().remove())}),o.slides=n),o.isAnimating=!1,o.updateCursor(),o.trigger("afterShow"),e.opts.video.autoStart&&e.$slide.find("video,audio").filter(":visible:first").trigger("play").one("ended",function(){Document.exitFullscreen?Document.exitFullscreen():this.webkitExitFullscreen&&this.webkitExitFullscreen(),o.next()}),e.opts.autoFocus&&"html"===e.contentType&&((t=e.$content.find("input[autofocus]:enabled:visible:first")).length?t.trigger("focus"):o.focus(null,!0)),e.$slide.scrollTop(0).scrollLeft(0))},preload:function(t){var e,o,n=this;n.group.length<2||(o=n.slides[n.currPos+1],(e=n.slides[n.currPos-1])&&e.type===t&&n.loadSlide(e),o&&o.type===t&&n.loadSlide(o))},focus:function(t,e){var o=this,n=["a[href]","area[href]",'input:not([disabled]):not([type="hidden"]):not([aria-hidden])',"select:not([disabled]):not([aria-hidden])","textarea:not([disabled]):not([aria-hidden])","button:not([disabled]):not([aria-hidden])","iframe","object","embed","video","audio","[contenteditable]",'[tabindex]:not([tabindex^="-"])'].join(",");o.isClosing||((e=(e=!t&&o.current&&o.current.isComplete?o.current.$slide.find("*:visible"+(e?":not(.modula-fancybox-close-small)":"")):o.$refs.container.find("*:visible")).filter(n).filter(function(){return"hidden"!==f(this).css("visibility")&&!f(this).hasClass("disabled")})).length?(n=e.index(s.activeElement),t&&t.shiftKey?(n<0||0==n)&&(t.preventDefault(),e.eq(e.length-1).trigger("focus")):(n<0||n==e.length-1)&&(t&&t.preventDefault(),e.eq(0).trigger("focus"))):o.$refs.container.trigger("focus"))},activate:function(){var e=this;f(".modula-fancybox-container").each(function(){var t=f(this).data("modulaFancyBox");t&&t.id!==e.id&&!t.isClosing&&(t.trigger("onDeactivate"),t.removeEvents(),t.isVisible=!1)}),e.isVisible=!0,(e.current||e.isIdle)&&(e.update(),e.updateControls()),e.trigger("onActivate"),e.addEvents()},close:function(t,e){function o(){l.cleanUp(t)}var n,a,i,s,r,l=this,c=l.current;return!l.isClosing&&(!(l.isClosing=!0)===l.trigger("beforeClose",t)?(l.isClosing=!1,d(function(){l.update()}),!1):(l.removeEvents(),i=c.$content,n=c.opts.animationEffect,a=f.isNumeric(e)?e:n?c.opts.animationDuration:0,c.$slide.removeClass("modula-fancybox-slide--complete modula-fancybox-slide--next modula-fancybox-slide--previous modula-fancybox-animated"),!0!==t?f.modulaFancybox.stop(c.$slide):n=!1,c.$slide.siblings().trigger("onReset").remove(),a&&l.$refs.container.removeClass("modula-fancybox-is-open").addClass("modula-fancybox-is-closing").css("transition-duration",a+"ms"),l.hideLoading(c),l.hideControls(!0),l.updateCursor(),"zoom"!==n||i&&a&&"image"===c.type&&!l.isMoved()&&!c.hasError&&(r=l.getThumbPos(c))||(n="fade"),"zoom"===n?(f.modulaFancybox.stop(i),e={top:(s=f.modulaFancybox.getTranslate(i)).top,left:s.left,scaleX:s.width/r.width,scaleY:s.height/r.height,width:r.width,height:r.height},"auto"==(s=c.opts.zoomOpacity)&&(s=.1<Math.abs(c.width/c.height-r.width/r.height)),s&&(r.opacity=0),f.modulaFancybox.setTranslate(i,e),p(i),f.modulaFancybox.animate(i,r,a,o)):n&&a?f.modulaFancybox.animate(c.$slide.addClass("modula-fancybox-slide--previous").removeClass("modula-fancybox-slide--current"),"modula-fancybox-animated modula-fancybox-fx-"+n,a,o):!0===t?setTimeout(o,a):o(),!0))},cleanUp:function(t){var e,o=this,n=o.current.opts.$orig;o.current.$slide.trigger("onReset"),o.$refs.container.empty().remove(),o.trigger("afterClose",t),o.current.opts.backFocus&&(n&&n.length&&n.is(":visible")||(n=o.$trigger),n&&n.length&&(e=l.scrollX,t=l.scrollY,n.trigger("focus"),f("html, body").scrollTop(t).scrollLeft(e))),o.current=null,(o=f.modulaFancybox.getInstance())?o.activate():(f("body").removeClass("modula-fancybox-active compensate-for-scrollbar"),f("#modula-fancybox-style-noscroll").remove())},trigger:function(t,e){var o,n=Array.prototype.slice.call(arguments,1),a=this,e=e&&e.opts?e:a.current;if(e?n.unshift(e):e=a,n.unshift(a),f.isFunction(e.opts[t])&&(o=e.opts[t].apply(e,n)),!1===o)return o;("afterClose"!==t&&a.$refs?a.$refs.container:i).trigger(t+".fb",n)},updateControls:function(){var t=this,e=t.current,o=e.index,n=t.$refs.container,a=t.$refs.caption,i=e.opts.caption;e.$slide.trigger("refresh"),i&&i.length?(t.$caption=a).children().eq(0).html(i):t.$caption=null,t.hasHiddenControls||t.isIdle||t.showControls(),n.find("[data-fancybox-count]").html(t.group.length),n.find("[data-fancybox-index]").html(o+1),n.find("[data-fancybox-prev]").prop("disabled",!e.opts.loop&&o<=0),n.find("[data-fancybox-next]").prop("disabled",!e.opts.loop&&o>=t.group.length-1),"image"===e.type?n.find("[data-fancybox-zoom]").show().end().find("[data-fancybox-download]").attr("href",e.opts.image.src||e.src).show():e.opts.toolbar&&n.find("[data-fancybox-download],[data-fancybox-zoom]").hide(),f(s.activeElement).is(":hidden,[disabled]")&&t.$refs.container.trigger("focus")},hideControls:function(t){var e=["infobar","toolbar","nav"];!t&&this.current.opts.preventCaptionOverlap||e.push("caption"),this.$refs.container.removeClass(e.map(function(t){return"modula-fancybox-show-"+t}).join(" ")),this.hasHiddenControls=!0},showControls:function(){var t=this,e=(t.current||t).opts,o=t.$refs.container;t.hasHiddenControls=!1,t.idleSecondsCounter=0,o.toggleClass("modula-fancybox-show-toolbar",!(!e.toolbar||!e.buttons)).toggleClass("modula-fancybox-show-infobar",!!(e.infobar&&1<t.group.length)).toggleClass("modula-fancybox-show-caption",!!t.$caption).toggleClass("modula-fancybox-show-nav",!!(e.arrows&&1<t.group.length)).toggleClass("modula-fancybox-is-modal",!!e.modal)},toggleControls:function(){this.hasHiddenControls?this.showControls():this.hideControls()}}),f.modulaFancybox={version:"3.5.7",defaults:t,getInstance:function(t){var e=f('.modula-fancybox-container:not(".modula-fancybox-is-closing"):last').data("modulaFancyBox"),o=Array.prototype.slice.call(arguments,1);return e instanceof n&&("string"===f.type(t)?e[t].apply(e,o):"function"===f.type(t)&&t.apply(e,o),e)},open:function(t,e,o){return new n(t,e,o)},close:function(t){var e=this.getInstance();e&&(e.close(),!0===t&&this.close(t))},destroy:function(){this.close(!0),i.add("body").off("click.fb-start","**")},isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),use3d:(t=s.createElement("div"),l.getComputedStyle&&l.getComputedStyle(t)&&l.getComputedStyle(t).getPropertyValue("transform")&&!(s.documentMode&&s.documentMode<11)),getTranslate:function(t){var e;return!(!t||!t.length)&&{top:(e=t[0].getBoundingClientRect()).top||0,left:e.left||0,width:e.width,height:e.height,opacity:parseFloat(t.css("opacity"))}},setTranslate:function(t,e){var o="",n={};if(t&&e)return e.left===m&&e.top===m||(o=(e.left===m?t.position():e).left+"px, "+(e.top===m?t.position():e).top+"px",o=this.use3d?"translate3d("+o+", 0px)":"translate("+o+")"),e.scaleX!==m&&e.scaleY!==m?o+=" scale("+e.scaleX+", "+e.scaleY+")":e.scaleX!==m&&(o+=" scaleX("+e.scaleX+")"),o.length&&(n.transform=o),e.opacity!==m&&(n.opacity=e.opacity),e.width!==m&&(n.width=e.width),e.height!==m&&(n.height=e.height),t.css(n)},animate:function(e,o,n,a,i){var s,r=this;f.isFunction(n)&&(a=n,n=null),r.stop(e),s=r.getTranslate(e),e.on(c,function(t){t&&t.originalEvent&&(!e.is(t.originalEvent.target)||"z-index"==t.originalEvent.propertyName)||(r.stop(e),f.isNumeric(n)&&e.css("transition-duration",""),f.isPlainObject(o)?o.scaleX!==m&&o.scaleY!==m&&r.setTranslate(e,{top:o.top,left:o.left,width:s.width*o.scaleX,height:s.height*o.scaleY,scaleX:1,scaleY:1}):!0!==i&&e.removeClass(o),f.isFunction(a)&&a(t))}),f.isNumeric(n)&&e.css("transition-duration",n+"ms"),f.isPlainObject(o)?(o.scaleX!==m&&o.scaleY!==m&&(delete o.width,delete o.height,e.parent().hasClass("modula-fancybox-slide--image")&&e.parent().addClass("modula-fancybox-is-scaling")),f.modulaFancybox.setTranslate(e,o)):e.addClass(o),e.data("timer",setTimeout(function(){e.trigger(c)},n+33))},stop:function(t,e){t&&t.length&&(clearTimeout(t.data("timer")),e&&t.trigger(c),t.off(c).css("transition-duration",""),t.parent().removeClass("modula-fancybox-is-scaling"))}},f.fn.modulaFancybox=function(t){var e;return(e=(t=t||{}).selector||!1)?f("body").off("click.fb-start",e).on("click.fb-start",e,{options:t},b):this.off("click.fb-start").on("click.fb-start",{items:this,options:t},b),this},i.on("click.fb-start","[data-fancybox]",b),i.on("click.fb-start","[data-fancybox-trigger]",function(t){f('[data-fancybox="'+f(this).attr("data-fancybox-trigger")+'"]').eq(f(this).attr("data-fancybox-index")||0).trigger("click.fb-start",{$trigger:f(this)})}),o=".modula-fancybox-button",h="modula-fancybox-focus",g=null,i.on("mousedown mouseup focus blur",o,function(t){switch(t.type){case"mousedown":g=f(this);break;case"mouseup":g=null;break;case"focusin":f(o).removeClass(h),f(this).is(g)||f(this).is("[disabled]")||f(this).addClass(h);break;case"focusout":f(o).removeClass(h)}})))}(window,document,jQuery),function(h){"use strict";function f(o,t,e){if(o)return e=e||"","object"===h.type(e)&&(e=h.param(e,!0)),h.each(t,function(t,e){o=o.replace("$"+t,e||"")}),e.length&&(o+=(0<o.indexOf("?")?"&":"?")+e),o}var n={youtube:{matcher:/(youtube\.com|youtu\.be|youtube\-nocookie\.com)\/(watch\?(.*&)?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*))(.*)/i,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramPlace:8,type:"iframe",url:"https://www.youtube-nocookie.com/embed/$4",thumb:"https://img.youtube.com/vi/$4/hqdefault.jpg"},vimeo:{matcher:/^.+vimeo.com\/(.*\/)?([\d]+)(.*)?/,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},paramPlace:3,type:"iframe",url:"//player.vimeo.com/video/$2"},instagram:{matcher:/(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i,type:"image",url:"//$1/p/$2/media/?size=l"},gmap_place:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(((maps\/(place\/(.*)\/)?\@(.*),(\d+.?\d+?)z))|(\?ll=))(.*)?/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/?ll="+(t[9]?t[9]+"&z="+Math.floor(t[10])+(t[12]?t[12].replace(/^\//,"&"):""):t[12]+"").replace(/\?/,"&")+"&output="+(t[12]&&0<t[12].indexOf("layer=c")?"svembed":"embed")}},gmap_search:{matcher:/(maps\.)?google\.([a-z]{2,3}(\.[a-z]{2})?)\/(maps\/search\/)(.*)/i,type:"iframe",url:function(t){return"//maps.google."+t[2]+"/maps?q="+t[5].replace("query=","q=").replace("api=1","")+"&output=embed"}}};h(document).on("objectNeedsType.fb",function(t,e,a){var i,s,r,l,c,d,u=a.src||"",p=!1,o=h.extend(!0,{},n,a.opts.media);h.each(o,function(t,e){if(s=u.match(e.matcher)){if(p=e.type,d=t,c={},e.paramPlace&&s[e.paramPlace]){"?"==(l=s[e.paramPlace])[0]&&(l=l.substring(1)),l=l.split("&");for(var o=0;o<l.length;++o){var n=l[o].split("=",2);2==n.length&&(c[n[0]]=decodeURIComponent(n[1].replace(/\+/g," ")))}}return r=h.extend(!0,{},e.params,a.opts[t],c),u="function"===h.type(e.url)?e.url.call(this,s,r,a):f(e.url,s,r),i="function"===h.type(e.thumb)?e.thumb.call(this,s,r,a):f(e.thumb,s),"youtube"===t?u=u.replace(/&t=(\d+)/,function(t,e){return"&start="+e}):"vimeo"===t&&(u=u.replace("&%23","#")),!1}}),p?(a.opts.thumb||a.opts.$thumb&&a.opts.$thumb.length||(a.opts.thumb=i),"iframe"===p&&(a.opts=h.extend(!0,a.opts,{iframe:{preload:!1,attr:{scrolling:"no"}}})),h.extend(a,{type:p,src:u,origSrc:a.src,contentSource:d,contentType:"image"===p?"image":"gmap_place"==d||"gmap_search"==d?"map":"video"})):u&&(a.type=a.opts.defaultType)});var a={youtube:{src:"https://www.youtube.com/iframe_api",class:"YT",loading:!1,loaded:!1},vimeo:{src:"https://player.vimeo.com/api/player.js",class:"Vimeo",loading:!1,loaded:!1},load:function(t){var e,o=this;this[t].loaded?setTimeout(function(){o.done(t)}):this[t].loading||(this[t].loading=!0,(e=document.createElement("script")).type="text/javascript",e.src=this[t].src,"youtube"===t?window.onYouTubeIframeAPIReady=function(){o[t].loaded=!0,o.done(t)}:e.onload=function(){o[t].loaded=!0,o.done(t)},document.body.appendChild(e))},done:function(t){var e,o;"youtube"===t&&delete window.onYouTubeIframeAPIReady,(e=h.modulaFancybox.getInstance())&&(o=e.current.$content.find("iframe"),"youtube"===t&&void 0!==YT&&YT?new YT.Player(o.attr("id"),{events:{onStateChange:function(t){0==t.data&&e.next()}}}):"vimeo"===t&&void 0!==Vimeo&&Vimeo&&new Vimeo.Player(o).on("ended",function(){e.next()}))}};h(document).on({"afterShow.fb":function(t,e,o){1<e.group.length&&("youtube"===o.contentSource||"vimeo"===o.contentSource)&&a.load(o.contentSource)}})}(jQuery),function(d,l,u){"use strict";function p(t){var e,o=[];for(e in t=(t=t.originalEvent||t||d.e).touches&&t.touches.length?t.touches:t.changedTouches&&t.changedTouches.length?t.changedTouches:[t])t[e].pageX?o.push({x:t[e].pageX,y:t[e].pageY}):t[e].clientX&&o.push({x:t[e].clientX,y:t[e].clientY});return o}function h(t,e,o){return e&&t?"x"===o?t.x-e.x:"y"===o?t.y-e.y:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function c(t){if(t.is('a,area,button,[role="button"],input,label,select,summary,textarea,video,audio,iframe')||u.isFunction(t.get(0).onclick)||t.data("selectable"))return 1;for(var e=0,o=t[0].attributes,n=o.length;e<n;e++)if("data-fancybox-"===o[e].nodeName.substr(0,14))return 1}function f(t){for(var e,o,n,a=!1;e=t.get(0),o=n=o=void 0,o=d.getComputedStyle(e)["overflow-y"],n=d.getComputedStyle(e)["overflow-x"],o=("scroll"===o||"auto"===o)&&e.scrollHeight>e.clientHeight,e=("scroll"===n||"auto"===n)&&e.scrollWidth>e.clientWidth,!(a=o||e)&&(t=t.parent()).length&&!t.hasClass("modula-fancybox-stage")&&!t.is("body"););return a}function o(t){var e=this;e.instance=t,e.$bg=t.$refs.bg,e.$stage=t.$refs.stage,e.$container=t.$refs.container,e.destroy(),e.$container.on("touchstart.fb.touch mousedown.fb.touch",u.proxy(e,"ontouchstart"))}var m=d.requestAnimationFrame||d.webkitRequestAnimationFrame||d.mozRequestAnimationFrame||d.oRequestAnimationFrame||function(t){return d.setTimeout(t,1e3/60)},g=d.cancelAnimationFrame||d.webkitCancelAnimationFrame||d.mozCancelAnimationFrame||d.oCancelAnimationFrame||function(t){d.clearTimeout(t)};o.prototype.destroy=function(){var t=this;t.$container.off(".fb.touch"),u(l).off(".fb.touch"),t.requestId&&(g(t.requestId),t.requestId=null),t.tapped&&(clearTimeout(t.tapped),t.tapped=null)},o.prototype.ontouchstart=function(t){var e=this,o=u(t.target),n=e.instance,a=n.current,i=a.$slide,s=a.$content,r="touchstart"==t.type;if(r&&e.$container.off("mousedown.fb.touch"),(!t.originalEvent||2!=t.originalEvent.button)&&i.length&&o.length&&!c(o)&&!c(o.parent())&&(o.is("img")||!(t.originalEvent.clientX>o[0].clientWidth+o.offset().left))){if(!a||n.isAnimating||a.$slide.hasClass("modula-fancybox-animated"))return t.stopPropagation(),void t.preventDefault();e.realPoints=e.startPoints=p(t),e.startPoints.length&&(a.touch&&t.stopPropagation(),e.startEvent=t,e.canTap=!0,e.$target=o,e.$content=s,e.opts=a.opts.touch,e.isPanning=!1,e.isSwiping=!1,e.isZooming=!1,e.isScrolling=!1,e.canPan=n.canPan(),e.startTime=(new Date).getTime(),e.distanceX=e.distanceY=e.distance=0,e.canvasWidth=Math.round(i[0].clientWidth),e.canvasHeight=Math.round(i[0].clientHeight),e.contentLastPos=null,e.contentStartPos=u.modulaFancybox.getTranslate(e.$content)||{top:0,left:0},e.sliderStartPos=u.modulaFancybox.getTranslate(i),e.stagePos=u.modulaFancybox.getTranslate(n.$refs.stage),e.sliderStartPos.top-=e.stagePos.top,e.sliderStartPos.left-=e.stagePos.left,e.contentStartPos.top-=e.stagePos.top,e.contentStartPos.left-=e.stagePos.left,u(l).off(".fb.touch").on(r?"touchend.fb.touch touchcancel.fb.touch":"mouseup.fb.touch mouseleave.fb.touch",u.proxy(e,"ontouchend")).on(r?"touchmove.fb.touch":"mousemove.fb.touch",u.proxy(e,"ontouchmove")),u.modulaFancybox.isMobile&&l.addEventListener("scroll",e.onscroll,!0),((e.opts||e.canPan)&&(o.is(e.$stage)||e.$stage.find(o).length)||(o.is(".modula-fancybox-image")&&t.preventDefault(),u.modulaFancybox.isMobile&&o.parents(".modula-fancybox-caption").length))&&(e.isScrollable=f(o)||f(o.parent()),u.modulaFancybox.isMobile&&e.isScrollable||t.preventDefault(),1!==e.startPoints.length&&!a.hasError||(e.canPan?(u.modulaFancybox.stop(e.$content),e.isPanning=!0):e.isSwiping=!0,e.$container.addClass("modula-fancybox-is-grabbing")),2===e.startPoints.length&&"image"===a.type&&(a.isLoaded||a.$ghost)&&(e.canTap=!1,e.isSwiping=!1,e.isPanning=!1,e.isZooming=!0,u.modulaFancybox.stop(e.$content),e.centerPointStartX=.5*(e.startPoints[0].x+e.startPoints[1].x)-u(d).scrollLeft(),e.centerPointStartY=.5*(e.startPoints[0].y+e.startPoints[1].y)-u(d).scrollTop(),e.percentageOfImageAtPinchPointX=(e.centerPointStartX-e.contentStartPos.left)/e.contentStartPos.width,e.percentageOfImageAtPinchPointY=(e.centerPointStartY-e.contentStartPos.top)/e.contentStartPos.height,e.startDistanceBetweenFingers=h(e.startPoints[0],e.startPoints[1]))))}},o.prototype.onscroll=function(t){this.isScrolling=!0,l.removeEventListener("scroll",this.onscroll,!0)},o.prototype.ontouchmove=function(t){var e=this;void 0===t.originalEvent.buttons||0!==t.originalEvent.buttons?e.isScrolling?e.canTap=!1:(e.newPoints=p(t),(e.opts||e.canPan)&&e.newPoints.length&&e.newPoints.length&&(e.isSwiping&&!0===e.isSwiping||t.preventDefault(),e.distanceX=h(e.newPoints[0],e.startPoints[0],"x"),e.distanceY=h(e.newPoints[0],e.startPoints[0],"y"),e.distance=h(e.newPoints[0],e.startPoints[0]),0<e.distance&&(e.isSwiping?e.onSwipe(t):e.isPanning?e.onPan():e.isZooming&&e.onZoom()))):e.ontouchend(t)},o.prototype.onSwipe=function(t){var a=this,i=a.instance,e=a.isSwiping,o=a.sliderStartPos.left||0;if(!0!==e)"x"==e&&(0<a.distanceX&&(a.instance.group.length<2||0===a.instance.current.index&&!a.instance.current.opts.loop)?o+=Math.pow(a.distanceX,.8):a.distanceX<0&&(a.instance.group.length<2||a.instance.current.index===a.instance.group.length-1&&!a.instance.current.opts.loop)?o-=Math.pow(-a.distanceX,.8):o+=a.distanceX),a.sliderLastPos={top:"x"==e?0:a.sliderStartPos.top+a.distanceY,left:o},a.requestId&&(g(a.requestId),a.requestId=null),a.requestId=m(function(){a.sliderLastPos&&(u.each(a.instance.slides,function(t,e){var o=e.pos-a.instance.currPos;u.modulaFancybox.setTranslate(e.$slide,{top:a.sliderLastPos.top,left:a.sliderLastPos.left+o*a.canvasWidth+o*e.opts.gutter})}),a.$container.addClass("modula-fancybox-is-sliding"))});else if(10<Math.abs(a.distance)){if(a.canTap=!1,i.group.length<2&&a.opts.vertical?a.isSwiping="y":i.isDragging||!1===a.opts.vertical||"auto"===a.opts.vertical&&800<u(d).width()?a.isSwiping="x":(o=Math.abs(180*Math.atan2(a.distanceY,a.distanceX)/Math.PI),a.isSwiping=45<o&&o<135?"y":"x"),"y"===a.isSwiping&&u.modulaFancybox.isMobile&&a.isScrollable)return void(a.isScrolling=!0);i.isDragging=a.isSwiping,a.startPoints=a.newPoints,u.each(i.slides,function(t,e){var o,n;u.modulaFancybox.stop(e.$slide),o=u.modulaFancybox.getTranslate(e.$slide),n=u.modulaFancybox.getTranslate(i.$refs.stage),e.$slide.css({transform:"",opacity:"","transition-duration":""}).removeClass("modula-fancybox-animated").removeClass(function(t,e){return(e.match(/(^|\s)modula-fancybox-fx-\S+/g)||[]).join(" ")}),e.pos===i.current.pos&&(a.sliderStartPos.top=o.top-n.top,a.sliderStartPos.left=o.left-n.left),u.modulaFancybox.setTranslate(e.$slide,{top:o.top-n.top,left:o.left-n.left})}),i.SlideShow&&i.SlideShow.isActive&&i.SlideShow.stop()}},o.prototype.onPan=function(){var t=this;h(t.newPoints[0],t.realPoints[0])<(u.modulaFancybox.isMobile?10:5)?t.startPoints=t.newPoints:(t.canTap=!1,t.contentLastPos=t.limitMovement(),t.requestId&&g(t.requestId),t.requestId=m(function(){u.modulaFancybox.setTranslate(t.$content,t.contentLastPos)}))},o.prototype.limitMovement=function(){var t=this,e=t.canvasWidth,o=t.canvasHeight,n=t.distanceX,a=t.distanceY,i=t.contentStartPos,s=i.left,r=i.top,l=i.width,c=i.height,d=e<l?s+n:s,u=r+a,t=Math.max(0,.5*e-.5*l),i=Math.max(0,.5*o-.5*c),l=Math.min(e-l,.5*e-.5*l),c=Math.min(o-c,.5*o-.5*c);return 0<n&&t<d&&(d=t-1+Math.pow(-t+s+n,.8)||0),n<0&&d<l&&(d=l+1-Math.pow(l-s-n,.8)||0),0<a&&i<u&&(u=i-1+Math.pow(-i+r+a,.8)||0),a<0&&u<c&&(u=c+1-Math.pow(c-r-a,.8)||0),{top:u,left:d}},o.prototype.limitPosition=function(t,e,o,n){var a=this.canvasWidth,i=this.canvasHeight;return t=a<o?(t=0<t?0:t)<a-o?a-o:t:Math.max(0,a/2-o/2),{top:e=i<n?(e=0<e?0:e)<i-n?i-n:e:Math.max(0,i/2-n/2),left:t}},o.prototype.onZoom=function(){var t=this,e=t.contentStartPos,o=e.width,n=e.height,a=e.left,i=e.top,s=h(t.newPoints[0],t.newPoints[1])/t.startDistanceBetweenFingers,r=Math.floor(o*s),l=Math.floor(n*s),c=(o-r)*t.percentageOfImageAtPinchPointX,e=(n-l)*t.percent