Gmedia Photo Gallery - Version 1.16.7

Version Description

Download this release

Release Info

Developer pasyuk
Plugin Icon 128x128 Gmedia Photo Gallery
Version 1.16.7
Comparing to
See all releases

Code changes from version 1.16.6 to 1.16.7

admin/assets/css/gmedia.admin.css CHANGED
@@ -739,6 +739,18 @@ p.thumbnail.gmedia-related-image img.gmedia-thumb {
739
  .term_id {
740
  font-size:80%;
741
  }
 
 
 
 
 
 
 
 
 
 
 
 
742
  #gm-list-table .hidden {
743
  display:none !important;
744
  visibility:hidden !important;
739
  .term_id {
740
  font-size:80%;
741
  }
742
+ .term_date {
743
+ font-size:80%;
744
+ }
745
+ .term_date:empty {
746
+ display: none;
747
+ }
748
+ .term_date:before {
749
+ content: '[';
750
+ }
751
+ .term_date:after {
752
+ content: ']';
753
+ }
754
  #gm-list-table .hidden {
755
  display:none !important;
756
  visibility:hidden !important;
admin/pages/galleries/tpl/modal-build-query.php CHANGED
@@ -53,10 +53,12 @@ global $user_ID, $gmDB, $gmCore
53
  }
54
  $gm_album_terms = array_merge(array($no_term), $gm_album_terms);
55
  $query_gmedia_albums = array();
56
- if(!empty($query_data['album__in'])) {
 
57
  $query_gmedia_albums = wp_parse_id_list($query_data['album__in']);
58
- } elseif(!empty($query_data['album__not_in'])) {
59
  $query_gmedia_albums = wp_parse_id_list($query_data['album__not_in']);
 
60
  }
61
  ?>
62
  <label><?php _e('Albums', 'grand-media'); ?> </label>
@@ -66,7 +68,24 @@ global $user_ID, $gmDB, $gmCore
66
  <input id="query_album__" name="album__in" data-include="album__in" data-exclude="album__not_in" class="form-control gm-selectize input-sm" value="<?php echo implode(',', $query_gmedia_albums) ?>" placeholder="<?php esc_attr_e(__('Any Album...', 'grand-media')); ?>"/>
67
  </div>
68
  <div class="col-xs-4">
69
- <div class="checkbox"><label><input class="query_switch" data-target="query_album__" type="checkbox"<?php echo (empty($query_data['album__in']) && !empty($query_data['album__not_in']))? ' checked="checked"' : ''; ?> /> <?php _e('Exclude selected Albums', 'grand-media'); ?></label></div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  </div>
71
  </div>
72
  </div>
53
  }
54
  $gm_album_terms = array_merge(array($no_term), $gm_album_terms);
55
  $query_gmedia_albums = array();
56
+ $exclude_albums = false;
57
+ if(!empty($query_data['album__in']) || (is_string($query_data['album__in']) && '0' === $query_data['album__in'])) {
58
  $query_gmedia_albums = wp_parse_id_list($query_data['album__in']);
59
+ } elseif(!empty($query_data['album__not_in']) || (is_string($query_data['album__not_in']) && '0' === $query_data['album__not_in'])) {
60
  $query_gmedia_albums = wp_parse_id_list($query_data['album__not_in']);
61
+ $exclude_albums = true;
62
  }
63
  ?>
64
  <label><?php _e('Albums', 'grand-media'); ?> </label>
68
  <input id="query_album__" name="album__in" data-include="album__in" data-exclude="album__not_in" class="form-control gm-selectize input-sm" value="<?php echo implode(',', $query_gmedia_albums) ?>" placeholder="<?php esc_attr_e(__('Any Album...', 'grand-media')); ?>"/>
69
  </div>
70
  <div class="col-xs-4">
71
+ <div class="checkbox"><label><input class="query_switch" data-target="query_album__" type="checkbox"<?php echo $exclude_albums? ' checked="checked"' : ''; ?> /> <?php _e('Exclude selected Albums', 'grand-media'); ?></label></div>
72
+ </div>
73
+ </div>
74
+ <div class="row">
75
+ <div class="col-xs-8">
76
+ <?php _e('To show all albums just select `No Album` in dropdown above then tick `Exclude selected Albums`, so it exclude all images without Album and show other images.', 'grand-media'); ?>
77
+ </div>
78
+ <div class="col-xs-4">
79
+ <label><?php _e('Albums Order', 'grand-media'); ?> </label>
80
+ <select name="albums_order" class="form-control input-sm">
81
+ <option <?php selected($query_data['albums_order'], ''); ?> value=""><?php _e('No Order'); ?></option>
82
+ <option <?php selected($query_data['albums_order'], 'id'); ?> value="id"><?php _e('By ID (ASC)'); ?></option>
83
+ <option <?php selected($query_data['albums_order'], 'id_desc'); ?> value="desc"><?php _e('By ID (DESC)'); ?></option>
84
+ <option <?php selected($query_data['albums_order'], 'name'); ?> value="name"><?php _e('By Name (ASC)'); ?></option>
85
+ <option <?php selected($query_data['albums_order'], 'name_desc'); ?> value="name_desc"><?php _e('By Name (DESC)'); ?></option>
86
+ <option <?php selected($query_data['albums_order'], 'date'); ?> value="date"><?php _e('By Date (ASC)'); ?></option>
87
+ <option <?php selected($query_data['albums_order'], 'date_desc'); ?> value="date_desc"><?php _e('By Date (DESC)'); ?></option>
88
+ </select>
89
  </div>
90
  </div>
91
  </div>
admin/pages/terms/tpl/album-list-item.php CHANGED
@@ -28,7 +28,7 @@ if(!defined('ABSPATH')) {
28
  echo '(' . __('no author', 'grand-media') . ')';
29
  }
30
  ?></span>
31
- <br/><span class="term_id">ID: <?php echo $item->term_id; ?></span>
32
 
33
  <div class="object-actions">
34
  <?php $action_links = gmedia_term_item_actions($item);
28
  echo '(' . __('no author', 'grand-media') . ')';
29
  }
30
  ?></span>
31
+ <br/><span class="term_id">ID: <?php echo $item->term_id; ?></span> <date class="term_date"><?php echo $item->post_date; ?></date>
32
 
33
  <div class="object-actions">
34
  <?php $action_links = gmedia_term_item_actions($item);
grand-media.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Gmedia Gallery
4
  * Plugin URI: http://wordpress.org/extend/plugins/grand-media/
5
  * Description: Gmedia Gallery - powerful media library plugin for creating beautiful galleries and managing files.
6
- * Version: 1.16.6
7
  * Author: Rattus
8
  * Author URI: https://codeasily.com/
9
  * Requires at least: 3.7
@@ -42,7 +42,7 @@ if ( ! class_exists( 'Gmedia' ) ) {
42
  */
43
  class Gmedia {
44
 
45
- var $version = '1.16.6';
46
  var $dbversion = '1.8.0';
47
  var $minium_WP = '3.7';
48
  var $options = '';
3
  * Plugin Name: Gmedia Gallery
4
  * Plugin URI: http://wordpress.org/extend/plugins/grand-media/
5
  * Description: Gmedia Gallery - powerful media library plugin for creating beautiful galleries and managing files.
6
+ * Version: 1.16.7
7
  * Author: Rattus
8
  * Author URI: https://codeasily.com/
9
  * Requires at least: 3.7
42
  */
43
  class Gmedia {
44
 
45
+ var $version = '1.16.7';
46
  var $dbversion = '1.8.0';
47
  var $minium_WP = '3.7';
48
  var $options = '';
inc/db.connect.php CHANGED
@@ -1817,7 +1817,21 @@ class GmediaDB{
1817
  function gmedias_album_stuff(&$q){
1818
  global $wpdb;
1819
 
1820
- if(isset($q['album_name']) && !empty($q['album_name'])){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1821
  $q['album_name'] = "'" . esc_sql($q['album_name']) . "'";
1822
  $alb = $wpdb->get_var("
1823
  SELECT term_id
@@ -1868,7 +1882,15 @@ class GmediaDB{
1868
  $q['album__in'] = wp_parse_id_list($q['album__in']);
1869
  $without_album = in_array(0, $q['album__in'])? true : false;
1870
  if(isset($q['album__status'])){
1871
- $q['album__in'] = $this->get_terms('gmedia_album', array('fields' => 'ids', 'orderby' => 'include', 'include' => $q['album__in'], 'status' => $q['album__status']));
 
 
 
 
 
 
 
 
1872
  }
1873
  if($without_album){
1874
  $q['album__in'] = array_filter($q['album__in']);
@@ -1885,9 +1907,9 @@ class GmediaDB{
1885
  if(in_array(0, $q['album__not_in'])){
1886
  $q['album__not_in'] = array_filter($q['album__not_in']);
1887
  if(isset($q['album__status'])){
1888
- $q['album__in'] = array_diff($this->get_terms('gmedia_album', array('fields' => 'ids', 'status' => $q['album__status'])), $q['album__not_in']);
1889
  } else{
1890
- $q['album__in'] = array_diff($this->get_terms('gmedia_album', array('fields' => 'ids')), $q['album__not_in']);
1891
  }
1892
  $q['within_album'] = true;
1893
  if(!empty($q['album__not_in'])){
@@ -1896,6 +1918,25 @@ class GmediaDB{
1896
  $q['album__not_in'] = array();
1897
  }
1898
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1899
  }
1900
 
1901
  /**
1817
  function gmedias_album_stuff(&$q){
1818
  global $wpdb;
1819
 
1820
+ $date_order = false;
1821
+ if ( ! empty( $q['albums_order'] ) ) {
1822
+ $order_by = explode( '_', $q['albums_order'] );
1823
+ $albums_orderby = $order_by[0];
1824
+ if ( 'date' === $albums_orderby ) {
1825
+ $albums_orderby = 'id';
1826
+ $date_order = true;
1827
+ }
1828
+ $albums_order = ( isset( $order_by[1] ) && 'desc' === $order_by[1] ) ? 'DESC' : 'ASC';
1829
+ } else {
1830
+ $albums_orderby = 'include';
1831
+ $albums_order = 'ASC';
1832
+ }
1833
+
1834
+ if(isset($q['album_name']) && !empty($q['album_name'])){
1835
  $q['album_name'] = "'" . esc_sql($q['album_name']) . "'";
1836
  $alb = $wpdb->get_var("
1837
  SELECT term_id
1882
  $q['album__in'] = wp_parse_id_list($q['album__in']);
1883
  $without_album = in_array(0, $q['album__in'])? true : false;
1884
  if(isset($q['album__status'])){
1885
+ $q['album__in'] = $this->get_terms('gmedia_album', array('fields' => 'ids', 'orderby' => $albums_orderby, 'order' => $albums_order, 'include' => $q['album__in'], 'status' => $q['album__status']));
1886
+ } elseif('include' !== $albums_orderby && 'id' !== $albums_orderby) {
1887
+ $q['album__in'] = $this->get_terms('gmedia_album', array('fields' => 'ids', 'orderby' => $albums_orderby, 'order' => $albums_order, 'include' => $q['album__in']));
1888
+ } elseif('id' === $albums_orderby) {
1889
+ if('ASC' === $albums_order) {
1890
+ sort( $q['album__in'] );
1891
+ } else {
1892
+ rsort( $q['album__in'] );
1893
+ }
1894
  }
1895
  if($without_album){
1896
  $q['album__in'] = array_filter($q['album__in']);
1907
  if(in_array(0, $q['album__not_in'])){
1908
  $q['album__not_in'] = array_filter($q['album__not_in']);
1909
  if(isset($q['album__status'])){
1910
+ $q['album__in'] = array_diff($this->get_terms('gmedia_album', array('fields' => 'ids', 'orderby' => $albums_orderby, 'order' => $albums_order, 'status' => $q['album__status'])), $q['album__not_in']);
1911
  } else{
1912
+ $q['album__in'] = array_diff($this->get_terms('gmedia_album', array('fields' => 'ids', 'orderby' => $albums_orderby, 'order' => $albums_order)), $q['album__not_in']);
1913
  }
1914
  $q['within_album'] = true;
1915
  if(!empty($q['album__not_in'])){
1918
  $q['album__not_in'] = array();
1919
  }
1920
  }
1921
+
1922
+ if ( $date_order && ! empty( $q['album__in'] ) ) {
1923
+ $gmedia_albums = get_posts( array(
1924
+ 'posts_per_page' => -1,
1925
+ 'post_type' => 'gmedia_album',
1926
+ 'post_status' => 'any',
1927
+ 'order_by' => 'post_date',
1928
+ 'order' => $albums_order,
1929
+ 'meta_key' => '_gmedia_term_ID',
1930
+ 'meta_compare' => 'IN',
1931
+ 'meta_value' => $q['album__in'],
1932
+ 'suppress_filters' => true,
1933
+ ) );
1934
+ $alb_in_by_date = array();
1935
+ foreach ( $gmedia_albums as $gm_alb ) {
1936
+ $alb_in_by_date[] = (int) get_post_meta( $gm_alb->ID, '_gmedia_term_ID', true );
1937
+ }
1938
+ $q['album__in'] = array_unique( array_merge( $alb_in_by_date, $q['album__in'] ) );
1939
+ }
1940
  }
1941
 
1942
  /**
inc/functions.php CHANGED
@@ -253,6 +253,8 @@ function gmedia_term_item_more_data(&$item){
253
  $item->post_link = (string) get_permalink($item->meta['_post_ID'][0]);
254
  }
255
  }
 
 
256
  }
257
  }
258
  $item->cloud_link = $gmCore->gmcloudlink($item->term_id, $item->taxterm);
253
  $item->post_link = (string) get_permalink($item->meta['_post_ID'][0]);
254
  }
255
  }
256
+ } else {
257
+ $item->post_date = '';
258
  }
259
  }
260
  $item->cloud_link = $gmCore->gmcloudlink($item->term_id, $item->taxterm);
module/amron/index.php CHANGED
@@ -3,7 +3,7 @@ $module_info = array(
3
  'base' => 'amron',
4
  'name' => 'amron',
5
  'title' => 'Amron',
6
- 'version' => '3.0',
7
  'author' => 'GalleryCreator',
8
  'description' => 'Responsive AJAX Gallery with Masonry layout. The gallery is completely customisable, resizable and is compatible with all browsers and devices (iPhone, iPad and Android smartphones). Required Gmedia Gallery plugin v1.14+',
9
  'type' => 'gallery',
3
  'base' => 'amron',
4
  'name' => 'amron',
5
  'title' => 'Amron',
6
+ 'version' => '3.1',
7
  'author' => 'GalleryCreator',
8
  'description' => 'Responsive AJAX Gallery with Masonry layout. The gallery is completely customisable, resizable and is compatible with all browsers and devices (iPhone, iPad and Android smartphones). Required Gmedia Gallery plugin v1.14+',
9
  'type' => 'gallery',
module/amron/js/script.js CHANGED
@@ -1 +1 @@
1
- !function(e){var t={};function i(o){if(t[o])return t[o].exports;var a=t[o]={i:o,l:!1,exports:{}};return e[o].call(a.exports,a,a.exports,i),a.l=!0,a.exports}i.m=e,i.c=t,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(o,a,function(t){return e[t]}.bind(null,a));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=17)}([function(e,t,i){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=function(e,t){var i=e[1]||"",o=e[3];if(!o)return i;if(t&&"function"==typeof btoa){var a=(s=o,r=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(l," */")),n=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot).concat(e," */")}));return[i].concat(n).concat([a]).join("\n")}var s,r,l;return[i].join("\n")}(t,e);return t[2]?"@media ".concat(t[2],"{").concat(i,"}"):i})).join("")},t.i=function(e,i){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},a=0;a<this.length;a++){var n=this[a][0];null!=n&&(o[n]=!0)}for(var s=0;s<e.length;s++){var r=e[s];null!=r[0]&&o[r[0]]||(i&&!r[2]?r[2]=i:i&&(r[2]="(".concat(r[2],") and (").concat(i,")")),t.push(r))}},t}},function(e,t,i){var o,a,n={},s=(o=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===a&&(a=o.apply(this,arguments)),a}),r=function(e,t){return t?t.querySelector(e):document.querySelector(e)},l=function(e){var t={};return function(e,i){if("function"==typeof e)return e();if(void 0===t[e]){var o=r.call(this,e,i);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}}(),c=null,d=0,h=[],m=i(4);function u(e,t){for(var i=0;i<e.length;i++){var o=e[i],a=n[o.id];if(a){a.refs++;for(var s=0;s<a.parts.length;s++)a.parts[s](o.parts[s]);for(;s<o.parts.length;s++)a.parts.push(y(o.parts[s],t))}else{var r=[];for(s=0;s<o.parts.length;s++)r.push(y(o.parts[s],t));n[o.id]={id:o.id,refs:1,parts:r}}}}function p(e,t){for(var i=[],o={},a=0;a<e.length;a++){var n=e[a],s=t.base?n[0]+t.base:n[0],r={css:n[1],media:n[2],sourceMap:n[3]};o[s]?o[s].parts.push(r):i.push(o[s]={id:s,parts:[r]})}return i}function g(e,t){var i=l(e.insertInto);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var o=h[h.length-1];if("top"===e.insertAt)o?o.nextSibling?i.insertBefore(t,o.nextSibling):i.appendChild(t):i.insertBefore(t,i.firstChild),h.push(t);else if("bottom"===e.insertAt)i.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var a=l(e.insertAt.before,i);i.insertBefore(t,a)}}function v(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=h.indexOf(e);t>=0&&h.splice(t,1)}function f(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var o=function(){0;return i.nc}();o&&(e.attrs.nonce=o)}return w(t,e.attrs),g(e,t),t}function w(e,t){Object.keys(t).forEach((function(i){e.setAttribute(i,t[i])}))}function y(e,t){var i,o,a,n;if(t.transform&&e.css){if(!(n="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=n}if(t.singleton){var s=d++;i=c||(c=f(t)),o=C.bind(null,i,s,!1),a=C.bind(null,i,s,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(i=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",w(t,e.attrs),g(e,t),t}(t),o=T.bind(null,i,t),a=function(){v(i),i.href&&URL.revokeObjectURL(i.href)}):(i=f(t),o=k.bind(null,i),a=function(){v(i)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else a()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=s()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var i=p(e,t);return u(i,t),function(e){for(var o=[],a=0;a<i.length;a++){var s=i[a];(r=n[s.id]).refs--,o.push(r)}e&&u(p(e,t),t);for(a=0;a<o.length;a++){var r;if(0===(r=o[a]).refs){for(var l=0;l<r.parts.length;l++)r.parts[l]();delete n[r.id]}}}};var b,x=(b=[],function(e,t){return b[e]=t,b.filter(Boolean).join("\n")});function C(e,t,i,o){var a=i?"":o.css;if(e.styleSheet)e.styleSheet.cssText=x(t,a);else{var n=document.createTextNode(a),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(n,s[t]):e.appendChild(n)}}function k(e,t){var i=t.css,o=t.media;if(o&&e.setAttribute("media",o),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}function T(e,t,i){var o=i.css,a=i.sourceMap,n=void 0===t.convertToAbsoluteUrls&&a;(t.convertToAbsoluteUrls||n)&&(o=m(o)),a&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */");var s=new Blob([o],{type:"text/css"}),r=e.href;e.href=URL.createObjectURL(s),r&&URL.revokeObjectURL(r)}},function(e,t,i){var o=i(3);"string"==typeof o&&(o=[[e.i,o,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};i(1)(o,a);o.locals&&(e.exports=o.locals)},function(e,t,i){(e.exports=i(0)(!1)).push([e.i,".amron_module *{box-sizing:border-box !important}.gmedia-amron-collection-tags-cloud{position:relative;display:block;margin-top:10px;margin-bottom:2px;text-align:center}.gmedia-amron-collection-tags-cloud ul{margin:0 !important;padding:0 !important;list-style:none}.gmedia-amron-collection-tags-cloud ul li::before{display:none}.gmedia-amron-collection-tags-cloud ul li{display:inline-block;max-width:200px;padding:5px 8px !important;margin:3px !important;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:15px !important;border-radius:2px;text-decoration:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;transition:0.3s}.gmedia-amron-masonry-collection{position:relative;width:100%;min-height:200px;overflow:hidden;transition:transform 0.5s;z-index:2}.gmedia-amron-masonry-collection .gmedia-amron-content{position:relative;width:100%}.gmedia-amron-masonry-collection .gmedia-amron-content .gmedia-amron-collection-column{position:relative;float:left}.gmedia-amron-masonry-collection .gmedia-amron-header{position:relative;width:100%}.gmedia-amron-masonry-collection .gmedia-amron-header .gmedia-amron-navi{position:relative;width:100%;overflow:hidden}.gmedia-amron-masonry-collection .gmedia-amron-header .gmedia-amron-term-title{position:relative;display:inline-block;font-size:28px;line-height:34px}.gmedia-amron-masonry-collection .gmedia-amron-header .gmedia-amron-back-button{position:relative;float:left;margin:0 10px 0 0;width:54px;height:34px;border-radius:2px;cursor:pointer}.gmedia-amron-masonry-collection .gmedia-amron-header .gmedia-amron-back-button svg{width:100%;height:100%;vertical-align:baseline !important}.gmedia-amron-masonry-thumb-pint{position:relative;width:100%;opacity:0;transition:opacity 0.45s;float:left;box-sizing:border-box !important}.gmedia-amron-masonry-thumb-pint .gmedia-amron-image-holder{position:relative;width:100%;overflow:hidden}.gmedia-amron-masonry-thumb-pint .gmedia-amron-image-holder.gmedia-hover .gmedia-amron-zoom{transform:translateX(-10%)}.gmedia-amron-masonry-thumb-pint .gmedia-amron-image-holder.gmedia-hover img{transform:scale(1.1)}.gmedia-amron-masonry-thumb-pint .gmedia-amron-image-over{position:absolute;top:0;width:100%;height:100%;transition:opacity 0.5s;opacity:0}.gmedia-amron-masonry-thumb-pint .gmedia-amron-image-over.gmedia-hover{opacity:1}.gmedia-amron-masonry-thumb-pint .gmedia-amron-zoom{position:absolute;width:50px;height:50px;padding:15px !important;right:0;bottom:4px;transform:translateX(100%);margin:auto;cursor:pointer;transition:transform 0.2s}.gmedia-amron-masonry-thumb-pint .gmedia-amron-zoom.media{width:40px;height:40px;background-color:rgba(255,255,255,0.5);border-radius:50%;padding:5px !important;transform:translateX(-10%)}.gmedia-amron-masonry-thumb-pint .gmedia-amron-zoom.media svg{stroke:none}.gmedia-amron-masonry-thumb-pint .gmedia-amron-zoom svg{width:100%;height:100%;stroke:white;vertical-align:baseline !important}.gmedia-amron-masonry-thumb-pint img{display:block;border:0 !important;margin:0 !important;padding:0 !important;max-height:none !important;max-width:none !important;min-height:0 !important;min-width:0 !important;width:100% !important;height:auto !important;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:0.5s ease-out 0s;opacity:0}.gmedia-amron-masonry-thumb-pint .gmedia-amron-item-content{position:relative;display:block;padding:7px 20px !important;text-align:left;background-color:white;overflow:hidden;width:100%;z-index:1;box-sizing:border-box}.gmedia-amron-masonry-thumb-pint .gmedia-amron-item-title{position:relative;margin:10px 0 5px;display:block;font-size:18px;line-height:1.1;letter-spacing:1px;font-weight:600}.gmedia-amron-masonry-thumb-pint .gmedia-amron-item-description{position:relative;display:block;margin:10px 0;padding:0;font-size:13px}.gmedia-amron-masonry-thumb-pint .gmedia-amron-item-read-more{text-decoration:none;box-shadow:none;position:relative;cursor:pointer;font-size:10px;border-radius:2px;text-transform:uppercase;line-height:38px;padding:0 15px;font-weight:700;letter-spacing:1px;color:white;display:inline-block;background-color:rgba(0,0,0,0.59);transition:0.5s}.gmedia-amron-masonry-thumb-pint a:hover,.gmedia-amron-masonry-thumb-pint a:visited,.gmedia-amron-masonry-thumb-pint a:link,.gmedia-amron-masonry-thumb-pint a:active{text-decoration:none;box-shadow:none}.gmedia-amron-masonry-thumb-pint .gmedia-amron-item-menu-holder{position:relative;display:block;width:100%;margin:15px 0;overflow:hidden;text-align:right}.gmedia-amron-masonry-thumb-pint .gmedia-amron-item-menu-holder .gmedia-amron-items-buttons{position:relative;padding:9px;width:36px;height:36px;cursor:pointer;float:right;transition:.5s;box-sizing:border-box;margin:0 1px;border-radius:2px}.gmedia-amron-masonry-thumb-pint .gmedia-amron-item-menu-holder .gmedia-amron-items-buttons svg{width:100%;height:100%;transition:fill .2s;vertical-align:baseline !important}\n",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var i=t.protocol+"//"+t.host,o=i+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var a,n=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(n)?e:(a=0===n.indexOf("//")?n:0===n.indexOf("/")?i+n:o+n.replace(/^\.\//,""),"url("+JSON.stringify(a)+")")}))}},function(e,t,i){var o=i(6);"string"==typeof o&&(o=[[e.i,o,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};i(1)(o,a);o.locals&&(e.exports=o.locals)},function(e,t,i){(e.exports=i(0)(!1)).push([e.i,".gmedia-preloader{min-height:inherit;position:absolute;top:0;left:0;bottom:0;right:0;overflow:hidden;z-index:100}.gmedia-preloader .c-spinner{animation:1s spinner linear infinite}@keyframes spinner{0%{transform:rotate(-360deg)}100%{transform:rotate(0deg)}}@keyframes _spinner{to{transform:rotate(-1440deg)}}@keyframes gmFadeIn{from{opacity:0}to{opacity:1}}\n",""])},function(e,t,i){var o=i(8);"string"==typeof o&&(o=[[e.i,o,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};i(1)(o,a);o.locals&&(e.exports=o.locals)},function(e,t,i){(e.exports=i(0)(!1)).push([e.i,".gmedia-slider-view{position:absolute;overflow:hidden;left:0;right:0;top:0;bottom:0}.gmedia-slider-view *{box-sizing:border-box !important;line-height:1.4}.gmedia-slider-view .gmedia-slider-hints{position:absolute;display:inline-block;padding:5px 10px;font-size:12px;line-height:normal;background-color:rgba(0,0,0,0.8);color:white;transform:translateY(-100%);border-radius:2px;transition:.4s}.gmedia-slider-view.gmedia-slider-activate{pointer-events:auto;visibility:visible;opacity:1}.gmedia-slider-view .gmedia-slider-bg{width:100%;height:100%;transform:translateZ(0)}.gmedia-slider-view .gmedia-slider-wrap{position:absolute;user-select:none;width:100%;top:0;bottom:0}.gmedia-slider-view .miniScreen{margin-top:0;margin-bottom:0}.gmedia-slider-view .gmedia-slider-next-prev-button{position:absolute;width:45px;height:40px;top:50%;margin:0 10px;padding:0;cursor:pointer;transition:transform .5s ease-out;border-radius:2px}.gmedia-slider-view .gmedia-slider-next-prev-button.next-prev-button-mini-screen{display:none}.gmedia-slider-view .gmedia-slider-next-prev-button svg{width:100%;height:100%;vertical-align:baseline !important}.gmedia-slider-page-view{position:absolute;display:block;transform:translate3d(0px, 0px, 0px);width:100%;top:0;bottom:0;left:0;-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden;-moz-user-select:none;-ms-user-select:none}.gmedia-slider-page-view .gmedia-slider-page-inner{position:absolute;display:block;left:0;top:0;bottom:0;width:100%;overflow:hidden;transform:translate3d(0, 0, 0);backface-visibility:hidden;-webkit-backface-visibility:hidden;-webkit-transform-origin:left top;transform-origin:left top;user-select:none}.gmedia-slider-page-view .gmedia-slider-page-inner img{-webkit-backface-visibility:hidden;backface-visibility:hidden;position:absolute !important;display:block !important;border:none !important;max-width:none !important;opacity:0;padding:0 !important;margin:0 !important;transition:.35s ease-out;user-select:none}.gmedia-slider-page-view .gmedia-slider-page-inner img.onLoad{opacity:1}.gmedia-slider-page-view .gmedia-slider-page-inner.video-play img{visibility:hidden}.gmedia-slider-page-view .gmedia-slider-page-inner .video-wrap{position:absolute;display:block;border:none}.gmedia-slider-page-view .gmedia-slider-page-inner .video-wrap iframe{width:100% !important;height:100% !important;top:0;left:0}.gmedia-slider-page-view .gmedia-slider-page-icon-holder{position:absolute;width:140px;height:140px;border-radius:50%;background-color:rgba(255,255,255,0.6);transform:translateY(-50%) translateX(-50%);left:50%;top:50%;padding:30px;visibility:hidden;will-change:transform;cursor:pointer}.gmedia-slider-page-view .gmedia-slider-page-icon-holder svg{width:100%;height:100%;fill:rgba(0,0,0,0.4)}.gmedia-slider-page-view.info-icon .gmedia-slider-page-icon-holder{visibility:visible}@keyframes rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.gmWrapRotate{animation-name:rotate;animation-duration:2s;animation-iteration-count:infinite;animation-timing-function:linear}\n",""])},function(e,t,i){var o=i(10);"string"==typeof o&&(o=[[e.i,o,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};i(1)(o,a);o.locals&&(e.exports=o.locals)},function(e,t,i){(e.exports=i(0)(!1)).push([e.i,".gmedia-item-menu-view{position:relative;overflow:hidden;float:left}.gmedia-item-menu-view.gmedia-item-menu-type-ultrabox{display:flex;flex-direction:row;flex-wrap:wrap;margin-right:5px}.gmedia-item-menu-view.gmedia-item-menu-type-ultrabox .gmedia-item-menu-button{padding:3px;width:43px;height:43px;margin:0 5px;border-radius:2px}.gmedia-item-menu-view.gmedia-item-menu-type-lightbox .gmedia-item-menu-button{margin:2px}.gmedia-item-menu-view.gmedia-item-menu-type-thumb .gmedia-item-menu-button{margin:1px}.gmedia-item-menu-view .gmedia-item-menu-button{position:relative;padding:9px;width:38px;height:38px;cursor:pointer;float:left;transition:background-color .2s, transform .4s ease-out;border-radius:2px}.gmedia-item-menu-view .gmedia-item-menu-button svg{width:100%;height:100%;fill:inherit;transition:fill .2s, transform .4s ease-out;vertical-align:baseline !important}\n",""])},function(e,t,i){var o=i(12);"string"==typeof o&&(o=[[e.i,o,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};i(1)(o,a);o.locals&&(e.exports=o.locals)},function(e,t,i){(e.exports=i(0)(!1)).push([e.i,".gmedia-scroll-bar-wrap{position:relative;flex:none;width:490px;height:50px;margin:5px 0;overflow:hidden}.gmedia-scroll-bar-wrap .gmedia-scroll-bar-view{position:absolute}.gmedia-scroll-bar-wrap .gmedia-scroll-bar-view .gmedia-scroll-bar-item{position:absolute;height:50px;width:70px;overflow:hidden}.gmedia-scroll-bar-wrap .gmedia-scroll-bar-view .gmedia-scroll-bar-item .gmedia-scroll-bar-item-bg{position:absolute;left:3px;right:3px;top:3px;bottom:3px;background-position:center;-webkit-background-size:cover;background-size:cover;background-repeat:no-repeat;-webkit-backface-visibility:hidden;backface-visibility:hidden}.gmedia-scroll-bar-wrap .gmedia-scroll-bar-view .gmedia-scroll-bar-item .gmedia-scroll-bar-item-hover{position:absolute;opacity:0;transition:opacity .2s;pointer-events:none;top:0;left:0;right:0;bottom:0;border-style:solid;border-width:3px;border-color:#fff}.gmedia-scroll-bar-wrap .gmedia-scroll-bar-view .gmedia-scroll-bar-item .gmedia-scroll-bar-item-link{position:absolute;width:34px;height:34px;padding:6px;border-radius:50%;left:50%;top:50%;transform:translateY(-50%) translateX(-50%)}.gmedia-scroll-bar-wrap .gmedia-scroll-bar-view .gmedia-scroll-bar-item .gmedia-scroll-bar-item-link svg{width:100%;height:100%;fill:rgba(0,0,0,0.58);vertical-align:baseline !important}.gmedia-scroll-bar-wrap .gmedia-scroll-bar-view .gmedia-scroll-bar-item .gmedia-scroll-bar-item-link.rotate svg{animation:1s spinner linear infinite}.gm_grabbable{cursor:move;cursor:grab;cursor:-moz-grab;cursor:-webkit-grab}.gm_grabbable:active{cursor:grabbing;cursor:-moz-grabbing;cursor:-webkit-grabbing}\n",""])},function(e,t,i){var o=i(14);"string"==typeof o&&(o=[[e.i,o,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};i(1)(o,a);o.locals&&(e.exports=o.locals)},function(e,t,i){(e.exports=i(0)(!1)).push([e.i,".gmedia-lightbox-b-view{position:fixed;z-index:99999;left:0;right:0;top:0;bottom:0;visibility:hidden;opacity:0;-ms-touch-action:none;touch-action:none;-webkit-text-size-adjust:100%;font-family:Arial, Helvetica, sans-serif;-webkit-transition:opacity .4s ease;transition:opacity .4s ease, visibility .4s ease}.gmedia-lightbox-b-view *{box-sizing:border-box !important;line-height:1.4}.gmedia-lightbox-b-view.gmedia-lightbox-b-activate{pointer-events:auto;visibility:visible;opacity:1}.gmedia-lightbox-b-view .gmedia-lightbox-b-bg{width:100%;height:100%;transform:translateZ(0)}.gmedia-lightbox-b-view .gmedia-lightbox-b-content{position:absolute;top:0;left:0;width:100%;height:100%}.gmedia-lightbox-b-view .gmedia-lightbox-b-header{position:absolute;padding:5px;left:0;top:0;width:100%;display:flex;flex-wrap:wrap;transform:translateY(-100%);transition:transform .4s ease-out}.gmedia-lightbox-b-view .gmedia-lightbox-b-header *{user-select:none;-moz-user-select:none;-webkit-user-select:none}.gmedia-lightbox-b-view .gmedia-lightbox-b-header.gmedia-show{transform:translateY(0%)}.gmedia-lightbox-b-view .gmedia-lightbox-b-footer{user-select:none;position:absolute;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;padding:0 10px;left:0;bottom:0;width:100%;transform:translateY(100%);transition:transform .4s ease-out}.gmedia-lightbox-b-view .gmedia-lightbox-b-footer.gmedia-show{transform:translateY(0%)}.gmedia-lightbox-b-view .gmedia-lightbox-b-footer.gmedia-lightbox-b-touch-device .gmedia-lightbox-b-caption-wrap{border-radius:2px;padding:0;margin:0}.gmedia-lightbox-b-view .gmedia-lightbox-b-footer .gmedia-lightbox-b-caption-wrap{border-radius:2px;padding:3px 10px;margin:2px}.gmedia-lightbox-b-view .gmedia-lightbox-b-description-wrap{flex:none;width:400px;max-width:100%;padding:0 5px;height:100%}.gmedia-lightbox-b-view .gmedia-lightbox-b-description-wrap a{cursor:pointer}.gmedia-lightbox-b-view .gmedia-lightbox-b-description-wrap a:hover,.gmedia-lightbox-b-view .gmedia-lightbox-b-description-wrap a:visited,.gmedia-lightbox-b-view .gmedia-lightbox-b-description-wrap a:link,.gmedia-lightbox-b-view .gmedia-lightbox-b-description-wrap a:active{text-decoration:none;box-shadow:none}.gmedia-lightbox-b-view .gmedia-lightbox-b-item-title{text-rendering:auto;color:#fff;font-size:18px;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.3;box-sizing:content-box;letter-spacing:0;margin-top:1px;margin-bottom:3px;text-decoration:none !important;box-shadow:none !important}.gmedia-lightbox-b-view .gmedia-lightbox-b-item-description{color:#969696;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}.gmedia-lightbox-b-view .gmedia-lightbox-b-free-space{flex:auto}.gmedia-lightbox-b-view .gmedia-lightbox-b-caption-play-wrap{display:flex;align-items:center}.gmedia-lightbox-b-view .gmedia-lightbox-b-caption-play-wrap .gmedia-lightbox-b-autoplay-wrap{margin-left:15px}.gmedia-lightbox-b-view .gmedia-lightbox-b-caption-wrap{position:relative;flex:none;font-size:13px;line-height:22px;font-weight:400;color:white;display:inline-block}.gmedia-lightbox-b-view .gmedia-lightbox-b-caption-current{position:relative;display:inline-block}.gmedia-lightbox-b-view .gmedia-lightbox-b-caption-delimiter{position:relative;display:inline-block;padding:0 3px}.gmedia-lightbox-b-view .gmedia-lightbox-b-caption-all{position:relative;display:inline-block}.gmedia-lightbox-b-view .gmedia-lightbox-b-autoplay-wrap{position:relative;opacity:0;height:22px;transition:opacity .4s}.gmedia-lightbox-b-view .gmedia-lightbox-b-info-wrap{position:relative;flex:none;min-height:30px;padding:0 10px}.gmedia-lightbox-b-view .gmedia-lightbox-b-item-menu-wrap{position:relative;flex:none;min-width:40px;overflow:hidden}\n",""])},function(e,t,i){var o=i(16);"string"==typeof o&&(o=[[e.i,o,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};i(1)(o,a);o.locals&&(e.exports=o.locals)},function(e,t,i){(e.exports=i(0)(!1)).push([e.i,".gmedia-modal-window{position:fixed;-webkit-backface-visibility:hidden;backface-visibility:hidden;top:0;left:0;right:0;bottom:0;overflow:hidden;opacity:0;will-change:opacity;transition:opacity .4s;text-align:center}.gmedia-modal-window *{box-sizing:border-box}.gmedia-modal-window .gmedia-modal-flex{display:inline-block;width:0;height:100%;vertical-align:middle}.gmedia-modal-window .gmedia-modal-close-button{position:absolute;width:100%;height:100%;z-index:-100;will-change:opacity}.gmedia-item-info-bar{font-size:14px;line-height:1.3;margin:0 10px;padding-bottom:10px;max-width:720px;min-width:260px;background-color:white;border-radius:2px;box-shadow:0 8px 16px rgba(0,0,0,0.15);vertical-align:middle;display:inline-block;will-change:transform}.gmedia-item-info-bar .gmedia-item-info-close-button{position:absolute;margin:10px;width:24px;height:24px;cursor:pointer;right:0}.gmedia-item-info-bar .gmedia-item-info-close-button svg{width:100%;height:100%;vertical-align:baseline !important}.gmedia-item-info-bar .gmedia-item-info-description-wrap{min-width:200px;min-height:44px;padding:10px 20px 0 20px;float:left;text-align:left;font-size:1em}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-item-title{font-size:130%;font-weight:600}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-item-description{font-size:80%;font-weight:400}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-terms-list{list-style:none;margin:0;overflow:hidden;padding:0}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-terms-list.gmedia-item-info-tags-ul{font-size:1rem !important;line-height:1.4 !important;margin-bottom:0 !important;margin-left:0 !important}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-terms-list.gmedia-item-info-tags-ul li{border-radius:3px;display:inline-block;height:26px;line-height:26px;padding:0 20px 0 23px;position:relative;margin:0 7px 10px 0;text-decoration:none;cursor:pointer;transition:.3s}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-meta-exif-value{line-height:1.9;display:inline-block}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-meta-exif-separator{display:inline-block;font-size:100%;margin:0 2px;opacity:.4}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-item-date{font-size:100%;line-height:1.9}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-item-date .gmedia-item-info-item-meta-key{float:left;width:40%;min-width:80px}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-item-date .gmedia-item-info-item-meta-value{float:left;white-space:nowrap;text-transform:capitalize}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-likes-view-com{position:relative;min-width:60px;min-height:40px;border:1px solid;border-color:rgba(0,0,0,0.18);border-radius:2px;background-color:#fafafa;padding:4px;margin:0 1%;text-align:center;display:inline-block}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-likes-view-com svg{display:inline-block;width:24px;height:24px;vertical-align:baseline !important}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-likes-view-com .gmedia-item-info-counter-text{font-size:15px;line-height:1}.gmedia-item-info-bar .gmedia-item-info-terms-title{display:inline-block;line-height:26px;padding:0 20px 0 3px;position:relative;text-decoration:none}.gmedia-item-share-bar{font-size:14px;line-height:1.3;margin:0 10px;padding-bottom:10px;max-width:480px;min-width:260px;background-color:white;border-radius:2px;box-shadow:0 8px 16px rgba(0,0,0,0.15);vertical-align:middle;display:inline-block;will-change:transform}.gmedia-item-share-bar .gmedia-item-share-close-button{position:absolute;margin:10px;width:24px;height:24px;cursor:pointer;right:0}.gmedia-item-share-bar .gmedia-item-share-close-button svg{width:100%;height:100%;vertical-align:baseline !important}.gmedia-item-share-bar .gmedia-item-share-description-wrap{min-width:270px;min-height:44px;padding:10px 20px 0 20px;float:left;text-align:left}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-title{display:block;font-size:130%;font-weight:600;line-height:1.3}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-button-wrap{position:relative;display:inline-block;padding:0 4px;min-width:130px;width:50%;height:42px}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-button-wrap .gmedia-item-share-item-button{border:1px solid;border-color:rgba(0,0,0,0.18);cursor:pointer;width:100%;height:100%;border-radius:2px;background-color:#fafafa;transition:.4s}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-button-wrap .gmedia-item-share-item-button svg{width:40px;height:40px;float:left;vertical-align:baseline !important}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-button-wrap .gmedia-item-share-item-button .gmedia-item-share-button-title{white-space:nowrap;position:absolute;left:30px;right:0;font-size:15px;font-weight:400;line-height:41px;text-align:center;opacity:0.7;transition:opacity .4s}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-button-wrap .gmedia-item-share-item-button:hover{box-shadow:0 1px 4px rgba(0,0,0,0.2)}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-button-wrap .gmedia-item-share-item-button:hover .gmedia-item-share-button-title{opacity:1}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-button-wrap .gmedia-item-share-item-copy-link{background-color:#fafafa;border:solid 1px rgba(0,0,0,0.17);width:100%;height:100%;border-radius:2px;overflow:hidden;position:relative;cursor:pointer;transition:.4s}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-button-wrap .gmedia-item-share-item-copy-link .gmedia-item-share-button-title{position:absolute;white-space:nowrap;line-height:41px;left:41px;right:10px;overflow:hidden;opacity:.7;transition:.4s}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-button-wrap .gmedia-item-share-item-copy-link svg{width:40px;height:40px;padding:4px;float:left;transition:fill .4s;vertical-align:baseline !important}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-button-wrap .gmedia-item-share-item-copy-link:hover{box-shadow:0 1px 4px rgba(0,0,0,0.2)}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-button-wrap .gmedia-item-share-item-copy-link:hover .gmedia-item-share-button-title{opacity:1}\n",""])},function(e,t,i){"use strict";i.r(t);i(2),i(5);function o(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function a(e,t,i){return t&&o(e.prototype,t),i&&o(e,i),e}var n=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var t=this;this.mouseDetected=!1,this.mouseMoveHandler=function(){return function(e){window.removeEventListener("mousedown",t.mouseMoveHandler,!1),window.removeEventListener("touchstart",t.mouseMoveHandler,!1),"touchstart"===e.type?(e.stopPropagation(),t.mouseDetected=!1):t.mouseDetected=!0}},window.addEventListener("mousedown",this.mouseMoveHandler,!1),window.addEventListener("touchstart",this.mouseMoveHandler,!1)}return a(e,null,[{key:"ICONS",get:function(){return{MAXIMIZE_SVG:'<svg fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/></svg>',NOTE_SVG:'<svg version="1.1" viewBox="0 0 58 94" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M37.992,0h-8.021v65.358c-4.435-1.706-10.174-1.73-15.835,0.328C3.994,69.377-2.049,78.355,0.638,85.736 c2.688,7.383,13.088,10.374,23.229,6.683c8.614-3.134,14.249-10.082,14.111-16.626l0.014-53.451 c13.986,2.204,14.943,19.884,13.268,24.842c-0.636,1.879,0.484,3.286,2.598,0C68.938,23.726,37.992,13.376,37.992,0z"/></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></svg>',VIMEO_SVG:'<svg enable-background="new 0 0 56.693 56.693" height="56.693px" id="Layer_1" version="1.1" viewBox="-5 -5 66.693 66.693" width="56.693px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M3.602,22.974l2.01,2.636c0,0,4.146-3.267,5.528-1.634c1.382,1.634,6.656,21.357,8.417,24.997 c1.537,3.192,5.777,7.413,10.426,4.397c4.646-3.014,20.098-16.205,22.863-31.781c2.764-15.574-18.594-12.313-20.854,1.256 c5.652-3.395,8.671,1.38,5.778,6.784c-2.889,5.399-5.527,8.921-6.908,8.921c-1.379,0-2.441-3.612-4.021-9.928 c-1.635-6.53-1.624-18.291-8.416-16.958C12.019,12.921,3.602,22.974,3.602,22.974z"/></svg>',YOU_TUBE_SVG:'<svg data-name="Layer 21" height="24" id="Layer_21" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><title/><path d="M21.80731,7.805a2.79915,2.79915,0,0,0-2.54907-2.53906C17.69061,5.13586,15.36707,5,12.50012,5c-3.45251,0-6.05865.14105-7.74353.27332A2.79932,2.79932,0,0,0,2.1925,7.815C2.08936,8.90021,2,10.33344,2,12.0423c0,1.66632.08862,3.07422.19128,4.14594a2.79852,2.79852,0,0,0,2.56384,2.53833C6.43994,18.85883,9.04657,19,12.50012,19c2.86694,0,5.19049-.13586,6.75812-.266a2.799,2.799,0,0,0,2.54907-2.539C21.91052,15.11548,22,13.69189,22,12S21.91052,8.88452,21.80731,7.805ZM9.77594,14.93878V9.06122L15.574,12Z"/></svg>',BOOKMARK_SVG:'<svg height="1792" viewBox="0 0 1792 1792" width="1792" xmlns="http://www.w3.org/2000/svg"><path d="M1420 128q23 0 44 9 33 13 52.5 41t19.5 62v1289q0 34-19.5 62t-52.5 41q-19 8-44 8-48 0-83-32l-441-424-441 424q-36 33-83 33-23 0-44-9-33-13-52.5-41t-19.5-62v-1289q0-34 19.5-62t52.5-41q21-9 44-9h1048z"/></svg>',HEART_SVG:'<svg enable-background="new 0 0 51 46" height="46px" id="Layer_1" version="1.1" viewBox="0 0 51 46" width="51px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M46.188,4.101c-5.529-5.53-14.495-5.53-20.023,0L25.39,4.875l-0.996-0.774c-5.529-5.53-14.715-5.53-20.245,0 C-1.38,9.63-1.27,18.595,4.26,24.125l18.753,18.643c0.671,0.671,1.4,1.258,2.376,1.766c0.76-0.508,1.483-1.095,2.155-1.766 l18.643-18.643C51.717,18.595,51.717,9.63,46.188,4.101z""/></svg>',HEART_2_SVG:'<svg enable-background="new 0 0 24 24" id="Layer_1" version="1.0" viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M16.4,6c2,0,3.6,1.6,3.6,3.6c0,2-3.9,6.4-8,9.8c-4.1-3.5-8-7.9-8-9.8C4,7.6,5.6,6,7.6,6C10,6,12,9,12,9S13.9,6,16.4,6 M16.4,4C14.6,4,13,4.9,12,6.3C11,4.9,9.4,4,7.6,4C4.5,4,2,6.5,2,9.6C2,14,12,22,12,22s10-8,10-12.4C22,6.5,19.5,4,16.4,4L16.4,4z"/></svg>',COMENTS_SVG:'<svg style="enable-background:new 0 0 24 24;" version="1.1" viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="info"/><g id="icons"><path d="M20,1H4C1.8,1,0,2.8,0,5v10c0,2.2,1.8,4,4,4v3c0,0.9,1.1,1.3,1.7,0.7L9.4,19H20c2.2,0,4-1.8,4-4V5 C24,2.8,22.2,1,20,1z M14,13H8c-0.6,0-1-0.4-1-1c0-0.6,0.4-1,1-1h6c0.6,0,1,0.4,1,1C15,12.6,14.6,13,14,13z M16,9H8 C7.4,9,7,8.6,7,8c0-0.6,0.4-1,1-1h8c0.6,0,1,0.4,1,1C17,8.6,16.6,9,16,9z" id="message"/></g></svg>',COMENTS_2_SVG:'<svg enable-background="new 0 0 64 64" height="64px" id="Layer_1" version="1.1" viewBox="0 0 64 64" width="64px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M47.964,8.127H16.036c-4.4,0-8,3.6-8,8v20.977c0,4.4,3.6,8,8,8h7.397v10.768l13.333-10.768h11.197c4.4,0,8-3.6,8-8V16.127 C55.964,11.727,52.364,8.127,47.964,8.127z M50.964,37.104c0,1.626-1.374,3-3,3H36.767H35l-1.375,1.11l-5.191,4.193v-0.303v-5h-5 h-7.397c-1.626,0-3-1.374-3-3V16.127c0-1.626,1.374-3,3-3h31.928c1.626,0,3,1.374,3,3V37.104z"/><circle cx="21.743" cy="26.617" r="2.913"/><circle cx="32" cy="26.617" r="2.913"/><circle cx="42.256" cy="26.617" r="2.913"/></g></svg>',INFO_SVG:'<svg height="100px" id="Capa_1" style="enable-background:new 0 0 46 100;" version="1.1" viewBox="0 0 46 100" width="46px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M35.162,0c6.696,0,10.043,4.567,10.043,9.789c0,6.522-5.814,12.555-13.391,12.555c-6.344,0-10.045-3.752-9.869-9.947 C21.945,7.176,26.35,0,35.162,0z M14.543,100c-5.287,0-9.164-3.262-5.463-17.615l6.07-25.457c1.057-4.077,1.23-5.707,0-5.707 c-1.588,0-8.451,2.816-12.51,5.59L0,52.406C12.863,41.48,27.662,35.072,34.004,35.072c5.285,0,6.168,6.361,3.525,16.148 L30.58,77.98c-1.234,4.729-0.703,6.359,0.527,6.359c1.586,0,6.787-1.963,11.896-6.041L46,82.377C33.488,95.1,19.83,100,14.543,100z "/></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></svg>',DOWNLOAD_SVG:'<svg version="1.1" viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="info"/><g id="icons"><g id="save"><path d="M11.2,16.6c0.4,0.5,1.2,0.5,1.6,0l6-6.3C19.3,9.8,18.8,9,18,9h-4c0,0,0.2-4.6,0-7c-0.1-1.1-0.9-2-2-2c-1.1,0-1.9,0.9-2,2 c-0.2,2.3,0,7,0,7H6c-0.8,0-1.3,0.8-0.8,1.4L11.2,16.6z"/><path d="M19,19H5c-1.1,0-2,0.9-2,2v0c0,0.6,0.4,1,1,1h16c0.6,0,1-0.4,1-1v0C21,19.9,20.1,19,19,19z"/></g></g></svg>',DOWNLOAD_2_SVG:'<svg enable-background="new 0 0 64 64" height="64px" id="Layer_1" version="1.1" viewBox="0 0 64 64" width="64px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M40.001,36.254c0,3.299-2.673,5.971-5.97,5.971H29.97c-3.297,0-5.97-2.672-5.97-5.971H8v17c0,2.209,1.791,4,4,4h40 c2.209,0,4-1.791,4-4v-17H40.001z"/><path d="M31.916,33.246l7.608-7.452c0.747-0.733,0.506-1.327-0.543-1.327h-4.565V9.246c0-1.381-1.119-2.5-2.5-2.5 s-2.5,1.119-2.5,2.5v15.221h-4.565c-1.05,0-1.291,0.595-0.542,1.327L31.916,33.246z"/></g></svg>',LINK_SVG:'<svg height="1792" viewBox="0 0 1792 1792" width="1792" xmlns="http://www.w3.org/2000/svg"><path d="M1520 1216q0-40-28-68l-208-208q-28-28-68-28-42 0-72 32 3 3 19 18.5t21.5 21.5 15 19 13 25.5 3.5 27.5q0 40-28 68t-68 28q-15 0-27.5-3.5t-25.5-13-19-15-21.5-21.5-18.5-19q-33 31-33 73 0 40 28 68l206 207q27 27 68 27 40 0 68-26l147-146q28-28 28-67zm-703-705q0-40-28-68l-206-207q-28-28-68-28-39 0-68 27l-147 146q-28 28-28 67 0 40 28 68l208 208q27 27 68 27 42 0 72-31-3-3-19-18.5t-21.5-21.5-15-19-13-25.5-3.5-27.5q0-40 28-68t68-28q15 0 27.5 3.5t25.5 13 19 15 21.5 21.5 18.5 19q33-31 33-73zm895 705q0 120-85 203l-147 146q-83 83-203 83-121 0-204-85l-206-207q-83-83-83-203 0-123 88-209l-88-88q-86 88-208 88-120 0-204-84l-208-208q-84-84-84-204t85-203l147-146q83-83 203-83 121 0 204 85l206 207q83 83 83 203 0 123-88 209l88 88q86-88 208-88 120 0 204 84l208 208q84 84 84 204z"/></svg>',LINK_2_SVG:'<svg data-name="Layer 21" height="24" id="Layer_21" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><title/><path d="M9.87012,5.541l4.26953,4.26953a2.02108,2.02108,0,0,1,0,2.855l-1.42383,1.42285,1.41406,1.415,1.42383-1.42334a4.02449,4.02449,0,0,0,0-5.68359L11.28418,4.127a4.01858,4.01858,0,0,0-5.68359,0L4.17676,5.55029a4.02212,4.02212,0,0,0,0,5.68311L5.59082,9.81934a2.02108,2.02108,0,0,1,0-2.855L7.01465,5.541A2.06778,2.06778,0,0,1,9.87012,5.541Z"/><path d="M19.82324,12.666l-1.41406,1.41406a2.02108,2.02108,0,0,1,0,2.855L16.98535,18.3584a2.06778,2.06778,0,0,1-2.85547,0L9.86035,14.08887a2.02108,2.02108,0,0,1,0-2.855L11.28418,9.811,9.87012,8.396,8.44629,9.81934a4.02449,4.02449,0,0,0,0,5.68359l4.26953,4.26953a4.01917,4.01917,0,0,0,5.68359.00049l1.42383-1.42334A4.02449,4.02449,0,0,0,19.82324,12.666Z"/></svg>',SHARE_SVG:'<svg height="1792" viewBox="0 0 1792 1792" width="1792" xmlns="http://www.w3.org/2000/svg"><path d="M1344 1024q133 0 226.5 93.5t93.5 226.5-93.5 226.5-226.5 93.5-226.5-93.5-93.5-226.5q0-12 2-34l-360-180q-92 86-218 86-133 0-226.5-93.5t-93.5-226.5 93.5-226.5 226.5-93.5q126 0 218 86l360-180q-2-22-2-34 0-133 93.5-226.5t226.5-93.5 226.5 93.5 93.5 226.5-93.5 226.5-226.5 93.5q-126 0-218-86l-360 180q2 22 2 34t-2 34l360 180q92-86 218-86z"/></svg>',SHARE_2_SVG:'<svg enable-background="new 0 0 64 64" height="64px" id="Layer_1" version="1.1" viewBox="0 0 64 64" width="64px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M48,39.26c-2.377,0-4.515,1-6.033,2.596L24.23,33.172c0.061-0.408,0.103-0.821,0.103-1.246c0-0.414-0.04-0.818-0.098-1.215 l17.711-8.589c1.519,1.609,3.667,2.619,6.054,2.619c4.602,0,8.333-3.731,8.333-8.333c0-4.603-3.731-8.333-8.333-8.333 s-8.333,3.73-8.333,8.333c0,0.414,0.04,0.817,0.098,1.215l-17.711,8.589c-1.519-1.609-3.666-2.619-6.054-2.619 c-4.603,0-8.333,3.731-8.333,8.333c0,4.603,3.73,8.333,8.333,8.333c2.377,0,4.515-1,6.033-2.596l17.737,8.684 c-0.061,0.407-0.103,0.821-0.103,1.246c0,4.603,3.731,8.333,8.333,8.333s8.333-3.73,8.333-8.333C56.333,42.99,52.602,39.26,48,39.26 z"/></svg>',FULL_SCREEN_SVG:'<svg height="14px" version="1.1" viewBox="0 0 14 14" width="14px" xmlns="http://www.w3.org/2000/svg" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" xmlns:xlink="http://www.w3.org/1999/xlink"><title/><desc/><defs/><g fill-rule="evenodd" id="Page-1" stroke="none" stroke-width="1"><g transform="translate(-215.000000, -257.000000)"><g id="fullscreen" transform="translate(215.000000, 257.000000)"><path d="M2,9 L0,9 L0,14 L5,14 L5,12 L2,12 L2,9 L2,9 Z M0,5 L2,5 L2,2 L5,2 L5,0 L0,0 L0,5 L0,5 Z M12,12 L9,12 L9,14 L14,14 L14,9 L12,9 L12,12 L12,12 Z M9,0 L9,2 L12,2 L12,5 L14,5 L14,0 L9,0 L9,0 Z" id="Shape"/></g></g></g></svg>',NORMAL_SCREEN_SVG:'<svg height="14px" version="1.1" viewBox="0 0 14 14" width="14px" xmlns="http://www.w3.org/2000/svg" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" xmlns:xlink="http://www.w3.org/1999/xlink"><g fill-rule="evenodd" stroke="none" stroke-width="1"><g id="Core" transform="translate(-257.000000, -257.000000)"><g id="fullscreen-exit" transform="translate(257.000000, 257.000000)"><path d="M0,11 L3,11 L3,14 L5,14 L5,9 L0,9 L0,11 L0,11 Z M3,3 L0,3 L0,5 L5,5 L5,0 L3,0 L3,3 L3,3 Z M9,14 L11,14 L11,11 L14,11 L14,9 L9,9 L9,14 L9,14 Z M11,3 L11,0 L9,0 L9,5 L14,5 L14,3 L11,3 L11,3 Z" id="Shape"/></g></g></g></svg>',CLOSE_SVG:'<svg height="512px" id="Layer_1" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M437.5,386.6L306.9,256l130.6-130.6c14.1-14.1,14.1-36.8,0-50.9c-14.1-14.1-36.8-14.1-50.9,0L256,205.1L125.4,74.5 c-14.1-14.1-36.8-14.1-50.9,0c-14.1,14.1-14.1,36.8,0,50.9L205.1,256L74.5,386.6c-14.1,14.1-14.1,36.8,0,50.9 c14.1,14.1,36.8,14.1,50.9,0L256,306.9l130.6,130.6c14.1,14.1,36.8,14.1,50.9,0C451.5,423.4,451.5,400.6,437.5,386.6z"/></svg>',VIEW_SVG:'<svg enable-background="new 0 0 167 93" height="93px" id="Layer_1" version="1.1" viewBox="0 0 167 93" width="167px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M83.25,29.25c-9.649,0-17.5,7.851-17.5,17.5s7.851,17.5,17.5,17.5s17.5-7.851,17.5-17.5 S92.899,29.25,83.25,29.25z"/><path d="M83.25,0.75c-45.84,0-83,46-83,46s37.16,46,83,46s83-46,83-46S129.09,0.75,83.25,0.75z M83.25,81.25 c-19.054,0-34.5-15.445-34.5-34.5c0-19.054,15.446-34.5,34.5-34.5s34.5,15.446,34.5,34.5C117.75,65.805,102.304,81.25,83.25,81.25z "/></g></svg>',FB_SVG_COLOR:'<svg version="1.1" viewBox="0 0 32 32" width="32" height="32" aria-hidden="false"><path d="M27.6 3h-23.2c-.8 0-1.4.6-1.4 1.4v23.1c0 .9.6 1.5 1.4 1.5h12.5v-10.1h-3.4v-3.9h3.4v-2.9c0-3.4 2.1-5.2 5-5.2 1.4 0 2.7.1 3 .2v3.5h-2.1c-1.6 0-1.9.8-1.9 1.9v2.5h3.9l-.5 3.9h-3.4v10.1h6.6c.8 0 1.4-.6 1.4-1.4v-23.2c.1-.8-.5-1.4-1.3-1.4z"></path></svg>',FB_SVG:'<svg enable-background="new 0 0 32 32" version="1.1" viewBox="0 0 32 32" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Flat_copy"><path d="M11.848,32h6.612V15.998h4.411l0.584-5.514H18.46l0.007-2.761c0-1.437,0.137-2.209,2.2-2.209h2.757V0h-4.412 c-5.299,0-7.164,2.675-7.164,7.174v3.311H8.545v5.515h3.303V32z"/></g></svg>',TW_SVG:'<svg version="1.1" viewBox="0 0 32 32" width="32" height="32" aria-hidden="false"><path d="M30 7.3c-1 .5-2.1.8-3.3.9 1.2-.7 2.1-1.8 2.5-3.2-1.1.7-2.3 1.1-3.6 1.4-1-1.1-2.5-1.8-4.2-1.8-3.2 0-5.7 2.6-5.7 5.7 0 .5.1.9.1 1.3-4.8-.2-9-2.5-11.8-6-.5.9-.8 1.9-.8 3 0 2 1 3.8 2.6 4.8-.9 0-1.8-.3-2.6-.7v.1c0 2.8 2 5.1 4.6 5.6-.5.1-1 .2-1.5.2-.4 0-.7 0-1.1-.1.7 2.3 2.9 3.9 5.4 4-2 1.5-4.4 2.5-7.1 2.5-.5 0-.9 0-1.4-.1 2.5 1.6 5.6 2.6 8.8 2.6 10.6 0 16.3-8.8 16.3-16.3v-.7c1.1-1 2-2 2.8-3.2z"></path></svg>',PIN_SVG:'<svg version="1.1" viewBox="0 0 32 32" width="32" height="32" aria-hidden="false"><path d="M16 3c-7.2 0-13 5.8-13 13 0 5.5 3.4 10.2 8.3 12.1-.1-1-.2-2.6 0-3.7.2-1 1.5-6.5 1.5-6.5s-.4-.8-.4-1.9c0-1.8 1-3.2 2.4-3.2 1.1 0 1.6.8 1.6 1.8 0 1.1-.7 2.8-1.1 4.3-.3 1.3.6 2.3 1.9 2.3 2.3 0 4.1-2.4 4.1-6 0-3.1-2.2-5.3-5.4-5.3-3.7 0-5.9 2.8-5.9 5.6 0 1.1.4 2.3 1 3 .1.1.1.2.1.4-.1.4-.3 1.3-.4 1.5-.1.2-.2.3-.4.2-1.6-.8-2.6-3.1-2.6-5 0-4.1 3-7.9 8.6-7.9 4.5 0 8 3.2 8 7.5 0 4.5-2.8 8.1-6.7 8.1-1.3 0-2.6-.7-3-1.5 0 0-.7 2.5-.8 3.1-.3 1.1-1.1 2.5-1.6 3.4 1.2.4 2.5.6 3.8.6 7.2 0 13-5.8 13-13 0-7.1-5.8-12.9-13-12.9z"></path></svg>',ZOOM_IN_SVG:'<svg enable-background="new 0 0 512 512" height="512px" id="Layer_1" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M497.913,497.914c-18.782,18.781-49.226,18.781-68.008,0l-84.862-84.864c-34.89,22.366-76.131,35.718-120.66,35.718 C100.468,448.768,0,348.314,0,224.384C0,100.454,100.468,0,224.383,0c123.931,0,224.384,100.453,224.384,224.384 c0,44.529-13.353,85.771-35.718,120.675l84.863,84.849C516.695,448.689,516.695,479.131,497.913,497.914z M224.383,64.11 c-88.511,0-160.274,71.763-160.274,160.274c0,88.526,71.764,160.274,160.274,160.274c88.526,0,160.273-71.748,160.273-160.274 C384.656,135.873,312.909,64.11,224.383,64.11z M256.438,320.548h-64.108v-64.109H128.22V192.33h64.109v-64.11h64.108v64.11h64.11 v64.109h-64.11V320.548z"/></svg>',ZOOM_OUT_SVG:'<svg enable-background="new 0 0 512 512" height="512px" id="Layer_1" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><g><path d="M497.913,429.906l-84.863-84.848c22.365-34.903,35.718-76.146,35.718-120.676C448.768,100.453,348.314,0,224.383,0 C100.468,0,0,100.453,0,224.384s100.468,224.384,224.383,224.384c44.529,0,85.771-13.352,120.66-35.718l84.862,84.864 c18.782,18.781,49.226,18.781,68.008,0C516.695,479.131,516.695,448.689,497.913,429.906z M224.383,384.658 c-88.511,0-160.274-71.748-160.274-160.274c0-88.511,71.764-160.274,160.274-160.274c88.526,0,160.273,71.763,160.273,160.274 C384.656,312.91,312.909,384.658,224.383,384.658z M128.219,256.438h192.329v-64.109H128.219V256.438z"/></g></g></svg>',PLAY_SVG:'<svg height="512px" id="Layer_1" enable-background:new 0 0 512 512 version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M405.2,232.9L126.8,67.2c-3.4-2-6.9-3.2-10.9-3.2c-10.9,0-19.8,9-19.8,20H96v344h0.1c0,11,8.9,20,19.8,20 c4.1,0,7.5-1.4,11.2-3.4l278.1-165.5c6.6-5.5,10.8-13.8,10.8-23.1C416,246.7,411.8,238.5,405.2,232.9z"/></svg>',PAUSE_SVG:'<svg height="512px" id="Layer_1" enable-background:new 0 0 512 512 version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M224,435.8V76.1c0-6.7-5.4-12.1-12.2-12.1h-71.6c-6.8,0-12.2,5.4-12.2,12.1v359.7c0,6.7,5.4,12.2,12.2,12.2h71.6 C218.6,448,224,442.6,224,435.8z"/><path d="M371.8,64h-71.6c-6.7,0-12.2,5.4-12.2,12.1v359.7c0,6.7,5.4,12.2,12.2,12.2h71.6c6.7,0,12.2-5.4,12.2-12.2V76.1 C384,69.4,378.6,64,371.8,64z"/></g></svg>'}}}]),a(e,null,[{key:"moduleSettings",value:function(e){return window[e]&&window[e].settings?window[e].settings:null}},{key:"requestAnimationFrame",value:function(e){return(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame)(e)}},{key:"cancelAnimationFrame",value:function(e){(window.cancelAnimationFrame||window.mozCancelAnimationFrame)(e)}},{key:"whichTransitionEventEnd",value:function(){var e=document.createElement("fakeelement"),t={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"},i=Object.keys(t);for(var o in i)if(void 0!==e.style[o])return t[o]}},{key:"copyProperties",value:function(e,t){for(var i=Object.keys(e),o=0;o<i.length;o+=1){var a=i[o];t[a]=e[a]}}},{key:"shuffle",value:function(e){for(var t,i,o=e.length;0!==o;)i=Math.floor(Math.random()*o),t=e[o-=1],e[o]=e[i],e[i]=t;return e}},{key:"Rect",value:function(e,t,i,o){return{x:e,y:t,width:i,height:o}}},{key:"Size",value:function(e,t){return{width:e,height:t}}},{key:"Point",value:function(e,t){return{x:e,y:t}}},{key:"findHighestZIndex",value:function(e){for(var t,i=99999,o=0;o<e.childNodes.length;o+=1){var a=e.childNodes[o];1===a.nodeType&&"SCRIPT"!==a.nodeName&&(t=document.defaultView.getComputedStyle(a,null).getPropertyValue("z-index")),t>i&&"auto"!==t&&(i=parseInt(t,10))}return i}},{key:"timeConverter",value:function(e){var t=new Date(1e3*e),i=new Date,o=new Date(Date.now()-864e5),a=t.getFullYear(),n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t.getMonth()],s=t.getDate(),r=t.getHours(),l=t.getMinutes();return t.setHours(0,0,0,0)===i.setHours(0,0,0,0)?"Today, ".concat(r,":").concat(l):t.setHours(0,0,0,0)===o.setHours(0,0,0,0)?"Yesterday, ".concat(r,":").concat(l):a===(new Date).getFullYear()?"".concat(s," ").concat(n,", ").concat(a):"".concat(s," ").concat(n," ").concat(a)}},{key:"createPreloaderView",value:function(e){var t=0,i=document.createElement("div");i.className="gmedia-preloader";var o=document.createElement("div");o.style.position="absolute",o.style.width="".concat(8,"px"),o.style.height="".concat(8,"px"),o.style.margin="".concat(-4,"px"),o.style.left="50%",o.style.top="50%",o.style.borderRadius="50%",o.style.backgroundColor=e,i.appendChild(o);var a=document.createElement("div");a.className="c-spinner",a.style.position="absolute",a.style.width="".concat(36,"px"),a.style.height="".concat(36,"px"),a.style.margin="".concat(-18,"px"),a.style.left="50%",a.style.top="50%";for(var n=0;n<8;n+=1){var s=document.createElement("div");s.style.position="absolute",s.style.top="50%",s.style.left="50%",s.style.marginTop="".concat(-4,"px"),s.style.marginLeft="".concat(-4,"px"),s.style.width="".concat(8,"px"),s.style.height="".concat(8,"px"),s.style.backgroundColor=e,s.style.borderRadius="100%",s.style.transform="rotate(".concat(t,"deg) translate(").concat(18,"px)"),t+=45,a.appendChild(s)}return i.appendChild(a),i}},{key:"trace",value:function(e){if(1!==arguments.length){for(var t="",i=0;i<arguments.length;i++){var o=arguments[i];t+="".concat(o," , ")}t=t.slice(0,-2),console.log(t)}else console.log(e)}},{key:"preventDefaultForScrollKeys",value:function(e){return!{37:1,38:1,39:1,40:1}[e.keyCode]||(e.preventDefault(),!1)}},{key:"preventDefault",value:function(e){(e=e||window.event).preventDefault&&e.preventDefault(),e.returnValue=!1}},{key:"disableBodyScroll",value:function(){document.getElementsByTagName("html")[0].classList.add("gmedia_PopUpActive")}},{key:"enableBodyScroll",value:function(){document.getElementsByTagName("html")[0].classList.remove("gmedia_PopUpActive")}},{key:"disableBodyScrollSlider",value:function(){if(window.addEventListener){var t=e.passiveListener,i=e.preventDefault;window.addEventListener("wheel",i,t),window.addEventListener("mousewheel",i,t),window.addEventListener("touchmove",i,t)}document.onkeydown=e.preventDefaultForScrollKeys}},{key:"enableBodyScrollSlider",value:function(){if(window.removeEventListener){var t=e.passiveListener,i=e.preventDefault;window.removeEventListener("wheel",i,t),window.removeEventListener("mousewheel",i,t),window.removeEventListener("touchmove",i,t)}document.onkeydown=null}},{key:"collapseElementsInElemt",value:function(e,t){for(var i=[],o=0;o<e.childNodes.length;o+=1){var a={},n=e.childNodes[o];1===n.nodeType&&"SCRIPT"!==n.nodeName&&n!==t&&(a.element=n,a.height=null,a.overflow=null,""!==n.style.height&&(a.height=n.style.height),""!==n.style.overflow&&(a.overflow=n.style.overflow),i.push(a),n.style.overflow="hidden",n.style.height="0")}return i}},{key:"recoverElements",value:function(e){if(0!==e.length)for(var t=0;t<e.length;t+=1){var i=e[t].element;i&&(e[t].overflow?i.style.overflow=e[t].overflow:i.style.removeProperty("overflow"),e[t].height?i.style.height=e[t].height:i.style.removeProperty("height"))}}},{key:"hexToRgbaStrin",value:function(e,t){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,i,o){return t+t+i+i+o+o}));var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return i?"rgba(".concat(parseInt(i[1],16),",").concat(parseInt(i[2],16),",").concat(parseInt(i[3],16),",").concat(t,")"):null}},{key:"getFrameForBoxWithMode",value:function(e,t,i){var o=e.width,a=e.height,n=t.width,s=t.height,r=1,l=1,c=1;i?(r=n/o,l=s/a,c=Math.max(r,l)):(r=n/o,l=s/a,c=(c=Math.min(r,l))>1?1:c);var d=Math.round(o*c),h=Math.round(a*c),m=Math.round((n-d)/2),u=Math.round((s-h)/2);return this.Rect(m,u,d,h)}},{key:"getItemFrameByIndexForBox",value:function(e,t,i,o,a,n){var s=1;n&&(s=n);var r=a=Math.min(t,a),l=Math.floor(t/a),c=(r=l>1?(t-(l-1)*i)/l:t)*s,d=Math.ceil((e+1)/l)-1,h=d*(c+o),m=(e-d*l)*(r+i);return this.Rect(m,h,r,c)}},{key:"fadeOut",value:function(e,t,i){i||(i=500);var o=Math.sqrt,a=(new Date).getTime();!function n(){var s=(new Date).getTime()-a,r=s/i;if(r<1){var l=1-o(r);e.style.opacity=String(l),setTimeout(n,Math.min(25,i-s))}else e.style.opacity="0",t&&t()}()}},{key:"ellipsizeTextBoxToLine",value:function(e,t){e.innerHTML=e.textContent||e.innerText||"";var i=e.innerHTML,o=e.innerHTML.split(" ");e.innerHTML=o[0].substring(0,3);var a=e.clientHeight*t;for(e.innerHTML=i;e.clientHeight>a;)o.pop(),e.innerHTML="".concat(o.join(" ")," ...")}},{key:"ellipsizeTextBox",value:function(e){e.innerHTML=e.textContent||e.innerText||"";for(var t=e.innerHTML.split(" ");e.scrollHeight>e.offsetHeight;)t.pop(),e.innerHTML="".concat(t.join(" ")," ...")}},{key:"scrollToY",value:function(e,t){var i,o=window.pageYOffset,a=Math.PI/(t/15),n=o/2,s=0,r=setInterval((function(){window.pageYOffset>e?(s+=1,i=n-n*Math.cos(s*a),window.scrollTo(0,o-i)):clearInterval(r)}),15)}},{key:"toggleFullScreen",value:function(e){var t=document.webkitIsFullScreen||document.mozFullScreen||!1;e.requestFullScreen=e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||function(){return!1},document.cancelFullScreen=document.cancelFullScreen||document.webkitCancelFullScreen||document.mozCancelFullScreen||function(){return!1},t?document.cancelFullScreen():e.requestFullScreen()}},{key:"CacheItemsList",value:function(){var e={};function t(o){!e.itemsList||e.cached===e.itemsList.length&&!e.amount||e.amount&&e.cached>=e.amount||(e.amount&&(e.amount=Math.min(e.amount,e.itemsList.length)),e.currentItem=e.itemsList[o].webView,e.lastIndex=o,e.currentItem.complete?(e.cached+=1,t(e.lastIndex+1>=e.itemsList.length?0:e.lastIndex+1)):e.currentItem.addEventListener("load",i,!1))}function i(){e.cached+=1,t(e.lastIndex+1>=e.itemsList.length?0:e.lastIndex+1)}return e.cached=0,e.itemsList=void 0,e.currentItem=void 0,e.amount=void 0,e.lastIndex=void 0,e.init=function(o,a,n){e.currentItem&&e.currentItem.removeEventListener("load",i,!1),e.amount=n,e.cached=0,e.currentItem=void 0,e.lastIndex=a,e.itemsList=o,void 0===a&&(a=0),t(a)},e.status=function(){return{list:e.itemsList,index:e.lastIndex}},e}},{key:"GMEventsManager",value:function(){return{listenerSet:{},addGMEventListener:function(e,t,i){this.listenerSet[e]||(this.listenerSet[e]=[]);var o={};o.listener=t,o.handler=i,this.listenerSet[e].push(o)},removeGMEventListener:function(e,t,i){if(this.listenerSet[e])for(var o=0;o<this.listenerSet[e].length;o+=1)this.listenerSet[e][o].listener===t&&this.listenerSet[e][o].handler===i&&(this.listenerSet[e].splice(o,1),o=this.listenerSet[e].length)},dispatchGMEvent:function(e){if(this.listenerSet[e.type])for(var t=this.listenerSet[e.type],i=0;i<t.length;i+=1){var o=t[i];o&&o.listener&&"function"==typeof o.listener[o.handler]&&o.listener[o.handler](e)}}}}},{key:"GMEvent",value:function(e,t,i){var o={};return o.type=e,o.params=i,o.target=t,o}},{key:"request",value:function(t,i,o,a){var n=new XMLHttpRequest;n.open("POST",this.moduleSettings(i.appName).appApi,!0),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.setRequestHeader("Access-Control-Allow-Headers","Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With"),n.onreadystatechange=function(){4===this.readyState&&(200!==this.status?o&&e.moduleSettings(i.appName).appEventManager.dispatchGMEvent(e.GMEvent(o,i,{error:this.statusText,params:a})):o&&e.moduleSettings(i.appName).appEventManager.dispatchGMEvent(e.GMEvent(o,i,{data:this.responseText,params:a})))},n.onerror=function(){!0===confirm("Failed to load resource: The network connection was lost. Let's try again?")&&e.request(t,i,o,a)};try{n.send(t),e.moduleSettings(i.appName).appEventManager.dispatchGMEvent(e.GMEvent("REQUEST_START",i,null))}catch(t){e.trace(t)}}},{key:"Item",value:function(t,i){var o={get webView(){return this.webImg.src?o.webImg:(this.webImg.src=this.itemViewSrc,this.webImg)}};if(e.copyProperties(t,o),o.appName=i,o.idPrefix=void 0,o.webImg=new Image,o.webImgFrame=e.Rect(0,0,0,0),o.webImg.addEventListener("load",(function(){this.classList.add("onLoad")}),!1),o.link&&""!==o.link){var a,n,s,r=o.link;r.match(/youtu\.be/i)||r.match(/youtube\.com/i)?(n=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/,(s=r.match(n))&&11===s[7].length&&(a=s[7]),void 0!==a&&(o.mime_type="video/youtube",o.videoId=a,o.link=void 0)):r.match(/vimeo\.com/i)&&(n=/(www\.)?vimeo.com\/(\d+)($|\/)/,(s=r.match(n))&&(a=s[2]),void 0!==a&&(o.mime_type="video/vimeo",o.videoId=a,o.link=void 0))}return"audio/mpeg"===o.mime_type&&(o.type="audio"),"image"===o.mime_type.split("/")[0]&&(o.type="image"),"video"===o.mime_type.split("/")[0]&&(o.type="video"),o.hasTag=function(e){if("all"===e)return!0;if(!o.tags||0===o.tags.length)return!1;for(var t=0;t<o.tags.length;t+=1){if(o.tags[t].term_id===e)return!0}return!1},o.itemViewSrc=o.meta?o.meta.web?o.meta.web.link:o.meta.original?o.meta.original.link:o.meta.thumb?o.meta.thumb.link:null:null,o.itemViewThumbSrc=o.meta?o.meta.thumb?o.meta.thumb.link:o.meta.web?o.meta.web.link:null:null,o.itemViewSize=o.meta?o.meta.web?e.Size(o.meta.web.width,o.meta.web.height):o.meta.original?e.Size(o.meta.original.width,o.meta.original.height):e.Size(300,300):e.Size(300,300),o.itemViewThumbSize=o.meta?o.meta.thumb?e.Size(o.meta.thumb.width,o.meta.thumb.height):o.meta.web?e.Size(o.meta.web.width,o.meta.web.height):e.Size(300,300):e.Size(300,300),o}},{key:"Term",value:function(t,i){var o={set gmedia__in(e){this.query_Pr&&(this.query_Pr.gmedia__in=e.toString(),this.gmedia_in_Pr=e,this.count=e.length,"myCollection"===this.taxonomy&&this.query_Pr&&(this.sharelink="".concat(self.moduleSettings(i).post_url,"/?").concat(self.moduleSettings(i).galleryID,"[gmedia__in]=").concat(this.query_Pr.gmedia__in)))},get gmedia__in(){return this.gmedia_in_Pr},get taxony_type(){var e;switch(this.taxonomy){case"gmedia_album":e="albums";break;case"gmedia_category":e="categories";break;case"gmedia_tag":e="tags";break;case"myCollection":e="gmedia__in";break;default:e=null}return e},get term_id(){return"myCollection"===this.taxonomy?"".concat(this.taxony_type,"-").concat(this.gmedia__in.toString()):this.term_id_Pr},set term_id(e){this.term_id_Pr=e},get query(){var e,t;if("myCollection"===this.taxonomy)return t={orderby:"gmedia__in",order:"ASC",gmedia__in:this.gmedia_in_Pr.toString()};switch(this.taxonomy){case"gmedia_album":e="album__in";break;case"gmedia_category":e="category__in";break;case"gmedia_tag":e="tag__in"}return(t={per_page:0,admin:!1,page:1})[e]=[this.term_id],t}};if(e.copyProperties(t,o),t.term_id&&(o.term_id_Pr=t.term_id),o.appName=i,o.key=void 0,o.gmedia_in_Pr=[],o.meta){var a=e.Meta(o.meta,o.appName);o.meta=a}return"gmedia_tag"===o.taxonomy&&(o.name="#".concat(o.name)),"myCollection"===o.taxonomy&&o.query_Pr&&(o.gmedia__in=o.query_Pr.gmedia__in.split(",")),o}},{key:"termDataByQueryNameId",value:function(e,t,i){if(!e.gmedia__in)return null;var o=e.gmedia__in.split(",").length,a=e.orderby,n=e.order;return{count:o,name:t,meta:{_order:n,_orderby:a,order:n,orderby:a},taxonomy:"myCollection",term_id:i,_query:e}}},{key:"termsListFromAppQuery",value:function(e){var t,i=[];if(e.album__in){var o=e.album__in.split(",");for(t in o)Object.prototype.hasOwnProperty.call(o,t)&&i.push({taxonomy_type:"albums",term_id:o[t]})}if(e.category__in){var a=e.category__in.split(",");for(t in a)Object.prototype.hasOwnProperty.call(a,t)&&i.push({taxonomy_type:"categories",term_id:a[t]})}if(e.tag__in){var n=e.tag__in.split(",");for(t in n)Object.prototype.hasOwnProperty.call(n,t)&&i.push({taxonomy_type:"tags",term_id:n[t]})}return i.length>0?i:void 0}},{key:"Meta",value:function(t,i){var o={};return e.copyProperties(t,o),o.appName=i,o._cover&&(o._cover=e.Item(t._cover,o.appName)),o.cover=o._cover?o._cover:null,o}},{key:"passiveListener",get:function(){var e=!1;try{var t={get:function(){e=!0}},i=Object.defineProperty({},"passive",t);window.addEventListener("testPassive",null,i),window.removeEventListener("testPassive",null,i)}catch(e){}return!!e&&{passive:!1,capture:!1}}},{key:"Device",get:function(){var e=window,t=e.navigator.userAgent,i={ios:!1,android:!1,androidChrome:!1,desktop:!1,windows:!1,iphone:!1,ipod:!1,ipad:!1,cordova:e.cordova||e.phonegap,phonegap:e.cordova||e.phonegap,browser:{ie11:!1}},o=t.match(/(Windows Phone);?[\s\/]+([\d.]+)?/),a=t.match(/(Android);?[\s\/]+([\d.]+)?/),n=t.match(/(iPad).*OS\s([\d_]+)/),s=t.match(/(iPod)(.*OS\s([\d_]+))?/),r=!n&&t.match(/(iPhone\sOS|iOS)\s([\d_]+)/);if(o&&(i.os="windows",i.osVersion=o[2],i.windows=!0),a&&!o&&(i.os="android",i.osVersion=a[2],i.android=!0,i.androidChrome=t.toLowerCase().indexOf("chrome")>=0),(n||r||s)&&(i.os="ios",i.ios=!0),r&&!s&&(i.osVersion=r[2].replace(/_/g,"."),i.iphone=!0),n&&(i.osVersion=n[2].replace(/_/g,"."),i.ipad=!0),s&&(i.osVersion=s[3]?s[3].replace(/_/g,"."):null,i.iphone=!0),i.ios&&i.osVersion&&t.indexOf("Version/")>=0&&"10"===i.osVersion.split(".")[0]&&(i.osVersion=t.toLowerCase().split("version/")[1].split(" ")[0]),i.desktop=!(i.os||i.android||i.webView),i.webView=(r||n||s)&&t.match(/.*AppleWebKit(?!.*Safari)/i),i.os&&"ios"===i.os){var l=i.osVersion.split("."),c=document.querySelector('meta[name="viewport"]');i.minimalUi=!i.webView&&(s||r)&&(1*l[0]==7?1*l[1]>=1:1*l[0]>7)&&c&&c.getAttribute("content").indexOf("minimal-ui")>=0}return i.pixelRatio=e.devicePixelRatio||1,window.navigator.userAgent.indexOf("Trident/7.0")>-1&&(i.browser.ie11=!0),i}},{key:"isTouchDevice",get:function(){return navigator.maxTouchPoints||"ontouchstart"in window}},{key:"getScrollbarWidth",get:function(){var e=document.createElement("div");e.style.visibility="hidden",e.style.width="100px",e.style.msOverflowStyle="scrollbar",document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var i=document.createElement("div");i.style.width="100%",e.appendChild(i);var o=i.offsetWidth;return e.parentNode.removeChild(e),t-o}},{key:"hasScrollbar",get:function(){if("number"==typeof window.innerWidth)return window.innerWidth>document.documentElement.clientWidth;var e,t,i=document.documentElement||document.body;void 0!==i.currentStyle&&(e=i.currentStyle.overflow),e=e||window.getComputedStyle(i,"").overflow,void 0!==i.currentStyle&&(t=i.currentStyle.overflowY),t=t||window.getComputedStyle(i,"").overflowY;var o=i.scrollHeight>i.clientHeight,a=/^(visible|auto)$/.test(e)||/^(visible|auto)$/.test(t);return o&&a||("scroll"===e||"scroll"===t)}},{key:"miniScreen",get:function(){return window.screen.height<500||window.screen.width<500}},{key:"youTubeCode",get:function(){return'<iframe src="https://www.youtube.com/embed/%id%?rel=0&showinfo=0&autoplay=1&wmode=transparent" frameborder="no" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'}},{key:"vimeoCode",get:function(){return'<iframe src="https://player.vimeo.com/video/%id%?byline=0&portrait=0&autoplay=1&transparent=0" frameborder="no" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'}},{key:"isFullscreen",get:function(){return document.webkitIsFullScreen||document.mozFullScreen||!1}}]),e}();i(7);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t,i){return t&&r(e.prototype,t),i&&r(e,i),e}var c=function(){function e(t){s(this,e),this.delegate=t,this.item=void 0,this.id=void 0,this.appName=t.appName,this.itemIndex=void 0,this.iconSet=t.iconSet,this.positionIndex=0,this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.itemInner=document.createElement("div"),this.itemInner.className="".concat(e.classPref,"inner"),this.view.appendChild(this.itemInner),this.iconHolder=document.createElement("div"),this.iconHolder.className="".concat(e.classPref,"icon-holder"),this.preloader=n.createPreloaderView(this.delegate.params.preloaderColor),this.preloader.style.display="none",this.view.appendChild(this.preloader),this.view.appendChild(this.iconHolder),this.size=n.Size(0,0),this.imgSize=n.Size(0,0),this.imageFramePr=n.Rect(0,0,0,0),this.imageFrameFF=n.Rect(0,0,0,0),this.imageScaledFF=!1,this.width=0,this.height=0,this.maxXoffset=0,this.maxYoffset=0,this.MaxScale=4,this.imgScale=1,this.imgScaleFF=1,this.scale=1,this.newScale=1,this.newScaleMW=1,this.viewTranslatePr=n.Point(0,0),this.origin=n.Point(0,0),this.boundingBox=void 0,this.boundingBoxScale=void 0,this.animaSliderRender=void 0,this.speedX=0,this.speedY=0,this.oldX=0,this.newX=0,this.oldY=0,this.newY=0,this.draging=!1,this.isBlockDraging=!1,this.isBlockDragingMem=!1,this.startScale=void 0,this.startGlobalPoint=void 0,this.startDistForZoom=void 0}return l(e,null,[{key:"classPref",get:function(){return"gmedia-slider-page-"}}]),l(e,[{key:"initByItem",value:function(e){if(this.id!==e.ID){var t=this;switch(this.item=e,this.id=e.ID,1!==this.scale&&(this.scale=1,this.viewTranslate=n.Point(0,0)),this.itemInner.firstChild&&this.itemInner.removeChild(this.itemInner.firstChild),this.itemInner.appendChild(e.webView),this.itemImg=e.webView,e.webView.complete?(this.imgSize.width=this.itemImg.naturalWidth,this.imgSize.height=this.itemImg.naturalHeight,this.isInScale&&this.normalize(),this.fit(!1)):(this.preloader.style.display="block",e.webView.addEventListener("load",(function(){t.preloader.style.display="none",t.imgSize.width=this.naturalWidth,t.imgSize.height=this.naturalHeight,t.isInScale&&t.normalize(),t.fit(!1)}),!1)),e.type){case"audio":this.iconHolder.innerHTML=this.iconSet.NOTE_SVG,this.view.classList.add("info-icon");break;case"video":this.view.classList.add("info-icon"),this.iconHolder.innerHTML=this.iconSet.PLAY_SVG,this.iconHolder.firstChild.style.marginLeft="7px";break;default:this.view.classList.remove("info-icon")}}}},{key:"resize",value:function(e){this.size=e,this.posX=this.positionIndex,this.isInScale&&this.normalize(),this.fit(!0)}},{key:"fit",value:function(){if(this.itemImg){var e=this.delegate.params.xOffset,t=0,i=n.getFrameForBoxWithMode(this.imgSize,n.Size(this.size.width-2*e,this.size.height-2*t),!1,!1);i.x+=e,i.y+=t,this.imageFrameFF=i,t=this.delegate.params.yOffset,(i=n.getFrameForBoxWithMode(this.imgSize,n.Size(this.size.width-2*e,this.size.height-2*t),!1,!1)).x+=e,i.y+=t,this.imageFrameNF=i,this.imgScale=Math.min(this.imgSize.width/i.width,this.MaxScale),this.imgScaleFF=this.imageFrameFF.height/i.height,"video"!==this.item.type&&(this.delegate.FF_Mode?(this.imageFrame=this.imageFrameFF,i=this.imageFrameFF,this.imageScaledFF=!0):(this.imageFrame=this.imageFrameNF,i=this.imageFrameNF,this.imageScaledFF=!1)),this.item.webImgFrame.x!==i.x||this.item.webImgFrame.y!==i.y||this.item.webImgFrame.width!==i.width||this.item.webImgFrame.height!==i.height?(this.imageFrame=i,this.item.webImgFrame=i):this.imageFramePr=i,this.videoWrap&&(this.videoWrapFrame=i)}}},{key:"checkOffset",value:function(e,t){var i=this.imageScaledFF?this.imageFrameFF:this.imageFrame;if(t!==this.boundingBoxScale){var o=i.width*(t||1),a=i.height*(t||1),s=i.x*(t||1),r=i.y*(t||1);this.boundingBox={left:o>this.size.width?-s:(this.size.width-this.size.width*t)/2,top:a>this.size.height?-r:(this.size.height-this.size.height*t)/2,right:o>this.size.width?this.size.width-(s+o):(this.size.width-this.size.width*t)/2,bottom:a>this.size.height?this.size.height-(r+a):(this.size.height-this.size.height*t)/2},this.boundingBoxScale=t}var l=e.x>this.boundingBox.left?this.boundingBox.left:e.x;l=l<this.boundingBox.right?this.boundingBox.right:l;var c=e.y>this.boundingBox.top?this.boundingBox.top:e.y;return c=c<this.boundingBox.bottom?this.boundingBox.bottom:c,n.Point(l,c)}},{key:"isPointInItem",value:function(e){var t=this.viewTranslate.x+this.size.width/2*this.newScale-this.imageFrame.width/2*this.newScale,i=t+this.imageFrame.width*this.newScale,o=this.size.height/2*this.newScale+this.viewTranslate.y-this.imageFrame.height/2*this.newScale*this.newScale,a=o+this.imageFrame.height*this.scale*this.newScale;return e.x>t&&e.x<i&&e.y>o&&e.y<a}},{key:"normalize",value:function(e){n.cancelAnimationFrame(this.animaSliderRender),e?this.renderTransformTo(n.Point(0,0),1):(this.scale=1,this.newScale=1,this.newScaleMW=1,this.viewTranslate=n.Point(0,0),this.origin=n.Point(0,0))}},{key:"zoomIn",value:function(e,t){if("audio"!==this.item.type&&"video"!==this.item.type){n.cancelAnimationFrame(this.animaSliderRender);var i=t.x-this.viewTranslate.x,o=t.y-this.viewTranslate.y,a=i/this.scale,s=o/this.scale,r=t.x-a*e,l=t.y-s*e,c=n.Point(r,l);this.renderTransformTo(this.checkOffset(c,e),e)}}},{key:"zoomByScaleIter",value:function(e,t){if("audio"!==this.item.type&&"video"!==this.item.type){var i=e<0?1.065:.935;n.cancelAnimationFrame(this.animaSliderRender),this.newScale*i>this.MaxScale&&(i=this.MaxScale/this.newScale),this.newScale*i<1&&(i=1/this.newScale),this.newScale*=i,this.origin=n.Point(t.x-i*(t.x-this.origin.x),t.y-i*(t.y-this.origin.y)),this.renderTransformTo(this.checkOffset(this.origin,this.newScale),this.newScale)}}},{key:"zoomByScaleDeltaToPoint",value:function(e,t){if("audio"!==this.item.type&&"video"!==this.item.type){var i;n.cancelAnimationFrame(this.animaSliderRender);var o=e/this.startDistForZoom,a=0;(i=this.startDistForZoom/this.startScale*o/(this.startDistForZoom/this.startScale)*this.startScale)>this.MaxScale&&(a=.8*-(i-this.MaxScale)),i+=a;var s=this.startGlobalPoint.x-this.startTranslate.x,r=this.startGlobalPoint.y-this.startTranslate.y,l=s/this.newScale,c=r/this.newScale,d=this.startGlobalPoint.x-l*i,h=this.startGlobalPoint.y-c*i,m=n.Point(d-t.x,h-t.y);this.scale=i,this.newScale=i,this.viewTranslate=m,this.startTranslate=n.Point(d,h)}}},{key:"renderTransformTo",value:function(e,t){var i=this;n.cancelAnimationFrame(i.animaSliderRender),this.origin=e,this.newScale=t;var o=0,a=0,s=0,r=.05,l=.1;i.animaSliderRender=n.requestAnimationFrame((function c(){o=o*r+(e.x-i.viewTranslate.x)*l,a=a*r+(e.y-i.viewTranslate.y)*l,t&&(s=s*r+.1*(t-i.scale));var d=i.viewTranslate.x;d+=o;var h=i.viewTranslate.y;h+=a,t&&(i.scale+=s),i.viewTranslate=n.Point(d,h),Math.abs(o)<.02&&Math.abs(a)<.02&&Math.abs(s)<.02?(n.cancelAnimationFrame(i.animaSliderRender),t&&(i.scale=t),i.viewTranslate=n.Point(e.x,e.y)):i.animaSliderRender=n.requestAnimationFrame(c)}))}},{key:"renderGlidingTransform",value:function(){var e=this;n.cancelAnimationFrame(e.animaSliderRender);var t=.95,i=.95;e.animaSliderRender=n.requestAnimationFrame((function o(){e.speedX*=t,e.speedY*=i;var a=e.viewTranslate.x;a+=e.speedX;var s=e.viewTranslate.y;if(s+=e.speedY,a>e.boundingBox.left||a<e.boundingBox.right){e.speedX*=-1;var r=a<e.boundingBox.right?e.boundingBox.right:a;a=a>e.boundingBox.left?e.boundingBox.left:r,a+=e.speedX,t=.75}if(s>e.boundingBox.top||s<e.boundingBox.bottom){e.speedY*=-1;var l=s<e.boundingBox.bottom?e.boundingBox.bottom:s;s=s>e.boundingBox.top?e.boundingBox.top:l,s+=e.speedY,i=.75}e.origin=n.Point(a,s),e.viewTranslate=n.Point(a,s),Math.abs(e.speedX)<.02&&Math.abs(e.speedY)<.02?(n.cancelAnimationFrame(e.animaSliderRender),e.speedX=0,e.speedY=0):e.animaSliderRender=n.requestAnimationFrame(o)}))}},{key:"renderStretchstretchTransform",value:function(){var e=this;n.cancelAnimationFrame(e.animaSliderRender);var t=this.checkOffset(n.Point(e.viewTranslate.x+e.speedX,e.viewTranslate.y+e.speedY),e.scale),i=.2,o=.15,a=0,s=0;e.animaSliderRender=n.requestAnimationFrame((function r(){a=a*i+(t.x-e.viewTranslate.x)*o,s=s*i+(t.y-e.viewTranslate.y)*o;var l=e.viewTranslate.x+a,c=e.viewTranslate.y+s;e.viewTranslate=n.Point(l,c),Math.abs(a)<.02&&Math.abs(s)<.02?(n.cancelAnimationFrame(e.animaSliderRender),e.viewTranslate=t):e.animaSliderRender=n.requestAnimationFrame(r)}))}},{key:"startDrag",value:function(e,t){n.cancelAnimationFrame(this.animaSliderRender),"audio"!==this.item.type&&"video"!==this.item.type&&(this.startDistForZoom=t,this.startGlobalPoint=e,this.startTranslate=this.viewTranslate,this.speedX=0,this.speedY=0,this.newX=this.viewTranslate.x,this.newY=this.viewTranslate.y,this.startScale=this.scale)}},{key:"stopDrag",value:function(){if("audio"!==this.item.type&&"video"!==this.item.type){if(this.isInScale)if(this.scale<1)this.normalize(!0);else if(this.scale>this.MaxScale)this.zoomIn(this.MaxScale,this.startGlobalPoint);else{var e=this.checkOffset(this.origin,this.newScale);this.isBlockDraging=e.x!==this.origin.x||e.y!==this.origin.y,this.isBlockDraging&&this.renderStretchstretchTransform()}this.draging&&(this.isBlockDraging?this.renderStretchstretchTransform():this.renderGlidingTransform(),this.draging=!1)}}},{key:"dragin",value:function(e){if("audio"===this.item.type||"video"===this.item.type)return!1;var t=this.startTranslate.x-e.x,i=this.startTranslate.y-e.y,o=this.checkOffset(n.Point(t,i),this.newScale);this.isBlockDraging=o.x!==t||o.y!==i,t-=.7*(t-o.x),i-=.7*(i-o.y);return this.oldX=this.newX,this.newX=t,this.speedX=.7*(this.newX-this.oldX),this.oldY=this.newY,this.newY=i,this.speedY=.7*(this.newY-this.oldY),this.origin=n.Point(t,i),this.viewTranslate=n.Point(t,i),this.draging=!0,!0}},{key:"action",value:function(e){if(this.item)switch(e){case"click":if("video"===this.item.type)return this.videoWrap?(this.removeVideoContent(),"videoStop"):(this.view.classList.add("video-play"),this.view.classList.remove("info-icon"),this.addVideoContent(),"videoPlay");if("audio"===this.item.type)return this.tryPlayOrPauseMp3(),"audioPlay";break;case"removeSubContent":if("video"===this.item.type)return this.removeVideoContent(),"videoStop";"audio"===this.item.type&&this.audioPlayer&&!this.audioPlayer.paused&&(this.audioPlayer.pause(),this.iconHolder.firstChild.classList.remove("gmWrapRotate"));break;default:return}}},{key:"addVideoContent",value:function(){var e=this.item.mime_type.split("/")[1];if(e)switch(this.videoWrap||(this.videoWrap=document.createElement("div"),this.videoWrap.className="video-wrap",this.videoWrapFrame=this.imageFrame,this.itemInner.appendChild(this.videoWrap)),e){case"youtube":this.videoWrap.innerHTML=n.youTubeCode.replace("%id%",this.item.videoId);break;case"vimeo":this.videoWrap.innerHTML=n.vimeoCode.replace("%id%",this.item.videoId)}}},{key:"removeVideoContent",value:function(){this.videoWrap&&(this.view.classList.remove("video-play"),this.videoWrap.parentNode&&this.videoWrap.parentNode.removeChild(this.videoWrap),this.videoWrap=void 0,this.view.classList.remove("video-play"),"image"!==this.item.type&&this.view.classList.add("info-icon"))}},{key:"tryPlayOrPauseMp3",value:function(){if("audio"===this.item.type){if(!this.audioPlayer){if(!document.getElementById("gmAudioPlayer"))return;this.audioPlayer=document.getElementById("gmAudioPlayer")}this.audioPlayer.src===this.item.url?this.audioPlayer.paused?(this.audioPlayer.play(),this.iconHolder.firstChild.classList.add("gmWrapRotate")):(this.audioPlayer.pause(),this.iconHolder.firstChild.classList.remove("gmWrapRotate")):(this.audioPlayer.src=this.item.url,this.audioPlayer.play(),this.iconHolder.firstChild.classList.add("gmWrapRotate"))}}},{key:"posX",set:function(e){this.view.style.left="".concat(this.size.width*e,"px"),this.positionIndex=e}},{key:"imageFrame",set:function(e){this.itemImg.style.left="".concat(e.x,"px"),this.itemImg.style.top="".concat(e.y,"px"),this.itemImg.style.width="".concat(e.width,"px"),this.itemImg.style.height="".concat(e.height,"px"),this.imageFramePr=e},get:function(){return this.imageFramePr}},{key:"videoWrapFrame",set:function(e){this.videoWrap.style.width="".concat(e.width,"px"),this.videoWrap.style.height="".concat(e.height,"px"),this.videoWrap.style.left="".concat(e.x,"px"),this.videoWrap.style.top="".concat(e.y,"px")}},{key:"isInScale",get:function(){return 1!==this.newScale||0!==this.origin.x||0!==this.origin.y}},{key:"viewTranslate",set:function(e){this.viewTranslatePr=e,this.itemInner.style.transform="matrix(".concat(this.scale,", 0, 0, \n ").concat(this.scale,", ").concat(e.x,", ").concat(e.y,")")},get:function(){return this.viewTranslatePr}},{key:"isSubContentActiv",get:function(){return!!this.videoWrap}}]),e}(),d=function(){function e(t,i){s(this,e),this.delegate=t,this.iconSet=e.ICONS,this.params=e.CONFIG,n.copyProperties(i,this.params),this.appName=this.delegate.appName,this.cacherItemsList=n.moduleSettings(this.appName).cacheItemsList,this.id="".concat(this.appName,"_vitSlider_"),this.itemsList=void 0,this.visibleBounds=n.Rect(0,0,0,0),this.isControllsShow=!1,this.isZooming=!1,this.needHideControlls=!1,this.naviButtonsStatus=void 0,this.firsrTap=void 0,this.removing=!1,this.createlayoutDelay=void 0,this.intitByTermDelay=void 0,this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.view.id="".concat(this.id,"main"),this.resizeDelay=void 0,this.size=n.Size(0,0);var o=document.createElement("div");o.className="".concat(e.classPref,"bg"),this.background=o,this.background.style.backgroundColor=this.params.backgroundColor,this.view.appendChild(o),this.sliderPages=[],this.dragging=!1,this.zoomingDrag=!1,this.speedX=0,this.speedY=0,this.scrollViewTranslateXPr=0,this.scrollViewTranslateYPr=0,this.startDragHandler=void 0,this.currentItemIndex=void 0,this.startItemIndex=0,this.items=[],this.itemsAmount=0,this.itemNumPr=void 0,this.pageInFocus=void 0,this.pageInFocusPrev=void 0,this.zoomingPage=void 0,this.FF_Mode=!1,this.mouseWheelMode=!1,this.animaSliderRender=void 0,this.slider=document.createElement("div"),this.slider.className="".concat(e.classPref,"wrap"),this.view.appendChild(this.slider)}return l(e,null,[{key:"classPref",get:function(){return"gmedia-slider-"}},{key:"ICONS",get:function(){return{PLAY_SVG:'<svg version="1.1" viewBox="0 0 50 60" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M48.479,27.435L5.672,0.915C2.553-1.132,0,0.374,0,4.261v51.48c0,3.885,2.553,5.391,5.672,3.346l42.807-26.52 c0,0,1.521-1.07,1.521-2.566S48.479,27.435,48.479,27.435z"/></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></svg>',NOTE_SVG:'<svg version="1.1" viewBox="0 0 58 94" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M37.992,0h-8.021v65.358c-4.435-1.706-10.174-1.73-15.835,0.328C3.994,69.377-2.049,78.355,0.638,85.736 c2.688,7.383,13.088,10.374,23.229,6.683c8.614-3.134,14.249-10.082,14.111-16.626l0.014-53.451 c13.986,2.204,14.943,19.884,13.268,24.842c-0.636,1.879,0.484,3.286,2.598,0C68.938,23.726,37.992,13.376,37.992,0z"/></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></svg>',NEXT_ARR:'<svg height="512px" id="Layer_1" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><polygon points="160,115.4 180.7,96 352,256 180.7,416 160,396.7 310.5,256 "/></svg>',PREV_ARR:'<svg height="512px" id="Layer_1" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><polygon points="352,115.4 331.3,96 160,256 331.3,416 352,396.7 201.5,256 "/></svg>'}}},{key:"EVENTS",get:function(){return{COLLECTION_DATA_REDY:"COLLECTION_DATA_REDY",UPDATE_CONTROLS:"UPDATE_CONTROLS",ZOOM:"ZOOM",REMOVE_LIGHTBOX:"REMOVE_LIGHTBOX"}}},{key:"CONFIG",get:function(){return{preloaderColor:"#494949",backgroundColor:"rgba(0,0,0,1)",navigationIconColor:"rgba(255,255,255,1)",navigationColor:"rgba(0,0,0,0.8)",zoom:!0,mouseWheel:!0,fit:!1,xOffset:2,yOffset:0,canRemoved:!1,trLin:"bit",tv:void 0,copyR_Alert:"Hello, this photo is mine!"}}}]),l(e,[{key:"copyRight",value:function(){var t,i=this;return function(o){if(!n.Device.ios||"mouseup"!==o.type){var a,s;o.changedTouches&&o.changedTouches[0]?(a=o.changedTouches[0].pageX,s=o.changedTouches[0].pageY):(a=o.pageX,s=o.pageY),a-=i.viewOfsetX,s-=i.viewOfsetY;var r=i.itemsList[i.itemIndex];if(r.webView&&r.webView===o.target){o.preventDefault();var l=document.getElementById("gm_copyr");l&&(clearTimeout(t),l.parentNode.removeChild(l),l=null),(l=document.createElement("div")).id="gm_copyr",l.className="".concat(e.classPref,"hints"),l.innerHTML=r.user&&r.user.displayname?"Hey, this photo is &#169;".concat(r.user.displayname):i.params.copyR_Alert,l.style.top="".concat(s,"px"),l.style.left="".concat(a,"px"),i.view.appendChild(l),t=setTimeout((function(){l.parentNode.removeChild(l)}),1e3)}}}}},{key:"initByStage",value:function(e){e.appendChild(this.view),this.copyR=this.copyRight(),document.addEventListener("contextmenu",this.copyR,!1),this.createControlls()}},{key:"addToStage",value:function(){var t=this,i=document.getElementsByTagName("body")[0];this.view.style.zIndex=n.findHighestZIndex(i)+1,n.disableBodyScrollSlider(),document.addEventListener("contextmenu",t.copyR,!1),i.appendChild(this.view),setTimeout((function(){t.view.classList.add("".concat(e.classPref,"activate"))}),30)}},{key:"intitByTerm",value:function(t,i){i&&(this.startItemId=i),this.term=t;var o=this;n.moduleSettings(o.appName).appEventManager.addGMEventListener(e.EVENTS.COLLECTION_DATA_REDY,o,"dataLoaded"),this.intitByTermDelay=setTimeout((function(){o.showPreloader(!0),n.request(JSON.stringify({library:t.query}),o,e.EVENTS.COLLECTION_DATA_REDY)}),300)}},{key:"dataLoaded",value:function(e){var t=e.params.data;if(t){try{var i=JSON.parse(t);i.data&&this.addItemsToCollection(i.data)}catch(e){n.trace(e)}this.showPreloader(!1)}}},{key:"addItemsToCollection",value:function(e){for(var t=[],i=0,o=0;o<e.length;o+=1){var a=n.Item(e[o],this.appName);this.startItemId&&a.ID===this.startItemId&&(i=o),t.push(a)}this.term.itemsList=t,this.initByList(this.term.itemsList,i)}},{key:"initByList",value:function(e,t){if(e&&e.length>0){var i=this;this.currentItemIndex=t&&0!==t?0:void 0,this.startItemIndex=t||0,this.itemsList=e,this.createlayoutDelay=setTimeout((function(){i.createLayout()}),100)}}},{key:"prepareToRemove",value:function(){if(!this.removing){clearTimeout(this.createlayoutDelay),clearTimeout(this.intitByTermDelay);var t=this.scrollViewTranslateY/(this.size.height/2);if(this.pageInFocus&&this.pageInFocus.isSubContentActiv&&t<.2)"videoStop"===this.pageInFocus.action("click")&&(this.switchShowControlls(),this.needHideControlls=!this.isControllsShow);else{if(this.removing=!0,this.cacherItemsList.init(),n.moduleSettings(this.appName).appEventManager.removeGMEventListener(e.EVENTS.COLLECTION_DATA_REDY,this,"dataLoaded"),this.view.removeEventListener("wheel",this.handlerMWheel,!1),document.removeEventListener("contextmenu",this.copyR,!1),document.getElementById("gmAudioPlayer"))document.getElementById("gmAudioPlayer").pause();n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.REMOVE_LIGHTBOX,this,{}))}}}},{key:"remoteControl",value:function(t){if(this.startDragHandler||"esc"===t)switch(t){case"prev":n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{draging:!0})),this.gotoPrev();break;case"next":n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{draging:!0})),this.gotoNext();break;case"space":this.switchShowControlls(),this.needHideControlls=!this.isControllsShow;break;case"esc":this.prepareToRemove();break;case"zoom":this.zoomSwitch()}}},{key:"showPreloader",value:function(e){var t;if(e){if(document.getElementById("".concat(this.appName,"slider_preloader")))return;(t=n.createPreloaderView(this.params.preloaderColor)).id="".concat(this.appName,"slider_preloader"),this.view.appendChild(t)}else(t=document.getElementById("".concat(this.appName,"slider_preloader")))&&n.fadeOut(t,(function(){t&&t.parentNode&&t.parentNode.removeChild(t)}),500)}},{key:"createLayout",value:function(){var t=this;this.itemsAmount=this.itemsList.length,this.size=n.Size(t.view.clientWidth,t.view.clientHeight),n.miniScreen&&this.slider.classList.add("miniScreen"),t.size.width<500&&(this.prevButton.classList.add("next-prev-button-mini-screen"),this.nextButton.classList.add("next-prev-button-mini-screen")),this.initSlider(),t.size.height<700&&this.slider.classList.add("miniScreen"),this.params.mouseWheel&&this.view.addEventListener("wheel",t.mouseWheelHandler(),!1),setTimeout((function(){t.showControlls(!0),n.moduleSettings(t.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.UPDATE_CONTROLS,t,{status:"ready"}))}),500)}},{key:"initSlider",value:function(){var e,t=0;if(0===this.sliderPages.length)for(t=0;t<3;t+=1)e=new c(this),this.slider.appendChild(e.view),this.sliderPages.push(e),e.resize(this.size);var i=this.itemsAmount>2?-1:0;for(t=0;t<3;t+=1)(e=this.sliderPages[t]).posX=i,e.itemIndex=void 0,i+=1;this.startDragHandler?this.gotoPageByNum(0):(this.startDragHandler=this.startDrag(),n.isTouchDevice&&(this.slider.addEventListener("touchstart",this.startDragHandler,n.passiveListener),window.addEventListener("touchmove",(function(){}),n.passiveListener)),this.slider.addEventListener("mousedown",this.startDragHandler,!1),this.gotoPageByNum(this.startItemIndex))}},{key:"sliderVerticalRender",value:function(){var e=1-Math.abs(this.scrollViewTranslateY)/(this.size.height/2);this.background.style.opacity=e,this.needHideControlls||(e<.8?this.showControlls(!1):this.showControlls(!0))}},{key:"tryOpenItemID",value:function(e){for(var t=0;t<this.itemsList.length;t+=1){if(this.itemsList[t].ID===e)return this.gotoPageByNum(t),!0}return!1}},{key:"gotoPageByNum",value:function(e){if((this.itemIndex||0===this.itemIndex)&&this.currentItemIndex){var t=this.itemIndex-e;this.gotoPageByIndex(this.currentItemIndex-t)}else this.gotoPageByIndex(e,!0)}},{key:"gotoNext",value:function(){this.gotoPageByIndex(this.currentItemIndex+1)}},{key:"gotoPrev",value:function(){this.gotoPageByIndex(this.currentItemIndex-1)}},{key:"renderTransformTo",value:function(e){var t=this;n.cancelAnimationFrame(t.animaSliderRender);var i=5*t.speedX,o=5*t.speedY,a=.2,s=.15;t.animaSliderRender=n.requestAnimationFrame((function r(){i=i*a+(e.x-t.scrollViewTranslateX)*s,o=o*a+(e.y-t.scrollViewTranslateY)*s,t.scrollViewTranslateX+=i,t.scrollViewTranslateY+=o,Math.abs(i)<1&&Math.abs(o)<1&&(t.dragging=!1),Math.abs(i)<.1&&Math.abs(o)<.1?(n.cancelAnimationFrame(t.animaSliderRender),t.scrollViewTranslateX=e.x,t.scrollViewTranslateY=e.y,t.sliderTransitionComplete({target:t.slider})):t.animaSliderRender=n.requestAnimationFrame(r)}))}},{key:"gotoPageByIndex",value:function(e,t){this.itemsAmount<3&&(e=Math.max(0,e),e=Math.min(this.itemsAmount-1,e)),Math.abs(this.currentItemIndex-e)>2&&(t=!0);var i=-e*this.size.width;t?(this.scrollViewTranslateX=i,this.sliderTransitionComplete({target:this.slider})):this.renderTransformTo(n.Point(i,this.scrollViewTranslateY))}},{key:"pageRenderByIndex",value:function(e){if(this.currentItemIndex!==e){void 0!==this.pageInFocus&&(this.pageInFocusPrev=this.pageInFocus,this.pageInFocus.isInScale&&(this.zoomingPage=this.pageInFocus));var t=0;if(this.itemsAmount<3){for(t=0;t<this.itemsAmount;t+=1)this.sliderPages[t].initByItem(this.itemsList[t]);return this.pageInFocus=this.sliderPages[e],this.currentItemIndex=e,void(this.itemIndex=e)}var i=(e+1)%3;i<0&&(i+=3);var o=i-1>=0?i-1:2,a=i+1<3?i+1:0,n=[o,i,a],s=[e-1,e,e+1];for(t=0;t<n.length;t+=1){this.sliderPages[n[t]].posX=s[t]}this.currentItemIndex=e,this.pageInFocus=this.sliderPages[i],this.itemIndex=e<0?this.itemsAmount+(e%this.itemsAmount==0?-this.itemsAmount:e%this.itemsAmount):e%this.itemsAmount,this.sliderPages[i].initByItem(this.itemsList[this.itemIndex]),this.sliderPages[a].initByItem(this.itemIndex+1<this.itemsAmount?this.itemsList[this.itemIndex+1]:this.itemsList[0]),this.sliderPages[o].initByItem(this.itemIndex-1<0?this.itemsList[this.itemsAmount-1]:this.itemsList[this.itemIndex-1])}}},{key:"sliderTransitionComplete",value:function(e){if(e.target===this.slider){var t=this.cacherItemsList.status();(t.list!==this.itemsList||t.list===this.itemsList&&this.itemIndex>=t.index)&&this.cacherItemsList.init(this.itemsList,this.itemIndex,5),void 0!==this.pageInFocusPrev&&this.pageInFocusPrev.action("removeSubContent"),void 0!==this.zoomingPage&&this.zoomingPage!==this.pageInFocus&&this.zoomingPage.normalize()}}},{key:"mouseWheelHandler",value:function(){var e,t=this,i=0,o=0;return t.handlerMWheel=function(a){if(!1!==t.mouseWheelMode){a.stopPropagation(),a.preventDefault();var s=n.Point(0,0);if("deltaX"in a)1===a.deltaMode?(s.x=18*a.deltaX,s.y=18*a.deltaY):(s.x=a.deltaX,s.y=a.deltaY);else if("wheelDelta"in a)a.wheelDeltaX&&(s.x=-.16*a.wheelDeltaX),a.wheelDeltaY?s.y=-.16*a.wheelDeltaY:s.y=-.16*a.wheelDelta;else{if(!("detail"in a))return;s.y=a.detail}var r=t.size.width/2,l=t.size.height/2;a.pageX&&(r=a.pageX,l=a.pageY),r-=t.viewOfsetX,l-=t.viewOfsetY,t.dragging||(e!==t.pageInFocus&&(e=void 0),t.zoomingPage&&t.zoomingPage!==t.pageInFocus&&(t.zoomingPage.normalize(),t.zoomingPage=void 0),e||(t.needHideControlls=t.isControllsShow,e=t.pageInFocus,t.zoomingPage=t.pageInFocus),r===i&&l===o||(e.startDrag(n.Point(r,l)),i=r,o=l),e.zoomByScaleIter(s.y,n.Point(r,l)),e.isInScale?t.showControlls(!1):(t.showControlls(t.needHideControlls),e=void 0))}},t.handlerMWheel}},{key:"zoomSwitch",value:function(){var e=n.Point(this.view.clientWidth/2,this.view.clientHeight/2);this.secondClick(e)}},{key:"fitMode",value:function(e){this.params.fit&&(this.FF_Mode=e);for(var t=0;t<this.sliderPages.length;t+=1)this.sliderPages[t].fit(!0)}},{key:"firstClick",value:function(e){if(this.pageInFocus.isPointInItem(e))if(this.pageInFocus.isInScale)this.pageInFocus.normalize(!0),this.zoomingPage=void 0,this.showControlls(this.needHideControlls);else switch(this.pageInFocus.action("click")){case"audioPlay":break;case"videoPlay":this.showControlls(!1),this.needHideControlls=!this.isControllsShow;break;case"videoStop":this.switchShowControlls(),this.needHideControlls=!this.isControllsShow;break;default:this.fitMode(this.isControllsShow),this.switchShowControlls(),this.needHideControlls=!this.isControllsShow}else this.params.canRemoved?this.prepareToRemove():this.params.canRemoved||this.pageInFocus&&this.pageInFocus.isSubContentActiv&&"videoStop"===this.pageInFocus.action("click")&&(this.switchShowControlls(),this.needHideControlls=!this.isControllsShow)}},{key:"secondClick",value:function(e){if(this.params.zoom&&this.pageInFocus.isPointInItem(e))if(this.pageInFocus.isInScale)this.pageInFocus.normalize(!0),this.zoomingPage=void 0,this.showControlls(this.needHideControlls);else{if(this.zoomingPage&&this.zoomingPage.normalize(),this.zoomingPage=this.pageInFocus,this.zoomingPage.zoomIn(Math.abs(this.zoomingPage.imgScale-1)<.3?1.5:this.zoomingPage.imgScale,e),!this.zoomingPage.isInScale)return;this.needHideControlls=this.isControllsShow,this.showControlls(!1)}}},{key:"doubleClickController",value:function(e){if(!n.Device.ios||"mouseup"!==e.type){var t,i;e.changedTouches&&e.changedTouches[0]?(t=e.changedTouches[0].pageX,i=e.changedTouches[0].pageY):(t=e.pageX,i=e.pageY),t-=this.viewOfsetX,i-=this.viewOfsetY;var o=this;if(this.firsrTap)return clearTimeout(this.firsrTap),this.firsrTap=void 0,void this.secondClick(n.Point(t,i));this.firsrTap=setTimeout((function(){o.firsrTap=void 0,o.firstClick(n.Point(t,i))}),300)}}},{key:"startDrag",value:function(){var t,i,o,a,s,r,l,c,d,h=this,m=4,u=!0,p=45,g=h.viewOfsetY,v=h.viewOfsetX,f=0,w=0,y=0;function b(e){var t,c,d,b,x;if(e.originalEvent&&(e=e.originalEvent),e.touches?!h.dragging&&e.touches.length>1?h.params.zoom&&(l=!0,t=e.touches[0].pageX,c=e.touches[0].pageY,d=e.touches[1].pageX,b=e.touches[1].pageY,x=Math.hypot(t-d,c-b),t+=(d-t)/2,c+=(b-c)/2):(l=!1,t=e.touches[0].pageX,c=e.touches[0].pageY):(t=e.pageX,c=e.pageY),t-=v,c-=g,!(n.Device.ios&&i<=20)){var C,k;if(void 0===r)u&&c===o||!u&&t===i?r=!1:(C=180*Math.atan2(Math.abs(c-o),Math.abs(t-i))/Math.PI,r=u?C>45:90-C>p);if(!h.dragging&&h.zoomingPage){e.preventDefault();var T=Math.abs(i-t)>m?i-t:0,E=Math.abs(o-c)>m?o-c:0;return(T||E)&&(h.zoomingDrag=!0),void(l?h.pageInFocus.zoomByScaleDeltaToPoint(x,n.Point(T,E),n.Point(t,c)):h.zoomingPage&&h.zoomingPage.dragin(n.Point(T,E)))}r?(f=0,(k=Math.abs(o-c)>m?o-c:0)&&(h.dragging=!0),h.params.canRemoved&&(h.scrollViewTranslateY=s-k)):(e.preventDefault(),h.transition=!0,(k=Math.abs(i-t)>m?i-t:0)&&(h.dragging=!0),h.scrollViewTranslateX=a-k,w=y,y=h.scrollViewTranslateX,f=y-w)}}function x(e){if(r=void 0,n.isTouchDevice&&(document.removeEventListener("touchmove",b,n.passiveListener),document.removeEventListener("touchend",x,n.passiveListener)),document.removeEventListener("mousemove",b,!1),document.removeEventListener("mouseup",x,!1),document.removeEventListener("oncontextmenu",x,!1),h.dragging||l||h.zoomingDrag){if(h.zoomingPage&&(h.zoomingPage.stopDrag(),l=!1),!h.zoomingPage)if(Math.abs(h.scrollViewTranslateY)<m){var i=h.currentItemIndex,o=n.isTouchDevice?7:1;Math.abs(f)>o&&t===h.currentItemIndex&&(i=f>0?i-1:i+1),h.speedX=f,h.scrollViewTranslateY=0,h.gotoPageByIndex(i)}else{var a=h.scrollViewTranslateY/(h.size.height/2);Math.abs(a)>.2?h.prepareToRemove():h.renderTransformTo(n.Point(h.scrollViewTranslateX,0))}this.dragging=!1}else h.doubleClickController(e);h.zoomingDrag=!1,d=e.type}return function(r){var m,u,p,C;"mousedown"===r.type&&"touchend"===d||(h.zoomingPage=h.pageInFocus.isInScale?h.pageInFocus:void 0,n.cancelAnimationFrame(h.animaSliderRender),t=h.currentItemIndex,r.originalEvent&&(r=r.originalEvent),n.isTouchDevice||r.preventDefault(),r.button&&0!==r.button||(r.touches?!h.dragging&&r.touches.length>1?(l=!0,m=r.touches[0].pageX,u=r.touches[0].pageY,p=r.touches[1].pageX,C=r.touches[1].pageY,c=Math.hypot(m-p,u-C),m+=(p-m)/2,u+=(C-u)/2,h.zoomingPage=h.pageInFocus,h.needHideControlls=h.isControllsShow,h.showControlls(!1)):(m=r.touches[0].pageX,u=r.touches[0].pageY):(m=r.pageX,u=r.pageY),m-=v,u-=g,h.speedX=0,h.speedY=0,f=0,w=0,y=h.scrollViewTranslateX,i=m,o=u,a=h.scrollViewTranslateX,s=h.scrollViewTranslateY,n.moduleSettings(h.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.UPDATE_CONTROLS,h,{draging:!0})),h.zoomingPage&&h.zoomingPage.startDrag(n.Point(i,o),c),n.isTouchDevice&&(document.addEventListener("touchmove",b,n.passiveListener),document.addEventListener("touchend",x,n.passiveListener)),document.addEventListener("mousemove",b,!1),document.addEventListener("mouseup",x,!1),document.addEventListener("oncontextmenu",x,!1)))}}},{key:"createControlls",value:function(){var t=this;function i(e){e.style.backgroundColor=t.params.navigationIconColor,e.childNodes[0].style.fill=t.params.navigationColor}function o(e){e.style.backgroundColor=t.params.navigationColor,e.childNodes[0].style.fill=t.params.navigationIconColor}this.prevButton=document.createElement("div"),this.prevButton.className="".concat(e.classPref,"next-prev-button"),this.prevButton.style.left="".concat(0,"px"),this.prevButton.style.transform="translate(-150%, -50%)",this.prevButton.style.backgroundColor=t.params.navigationColor,this.prevButton.style.visibility="hidden",this.prevButton.innerHTML=e.ICONS.PREV_ARR,this.prevButton.childNodes[0].style.fill=t.params.navigationIconColor,this.prevButton.onmouseover=function(){i(this)},this.prevButton.onmouseout=function(){o(this)},this.prevButton.onclick=function(){n.moduleSettings(t.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.UPDATE_CONTROLS,t,{draging:!0})),t.gotoPrev(),n.Device.desktop||o(this)},this.view.appendChild(this.prevButton),this.nextButton=document.createElement("div"),this.nextButton.className="".concat(e.classPref,"next-prev-button"),this.nextButton.style.backgroundColor=t.params.navigationColor,this.nextButton.style.right="0px",this.nextButton.style.transform="translate(150%, -50%)",this.nextButton.style.visibility="hidden",this.nextButton.innerHTML=e.ICONS.NEXT_ARR,this.nextButton.childNodes[0].style.fill=t.params.navigationIconColor,this.nextButton.onmouseover=function(){i(this)},this.nextButton.onmouseout=function(){o(this)},this.nextButton.onclick=function(){n.moduleSettings(t.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.UPDATE_CONTROLS,t,{draging:!0})),t.gotoNext(),n.Device.desktop||o(this)},this.view.appendChild(this.nextButton)}},{key:"switchShowControlls",value:function(){this.showControlls(!this.isControllsShow)}},{key:"showHideNaviButton",value:function(e){if(this.naviButtonsStatus!==e){switch(e){case"show":if(this.isZoom)return;this.prevButton.style.transform="translate(0%, -50%)",this.nextButton.style.transform="translate(0%, -50%)";break;case"hide":this.prevButton.style.transform="translate(-150%, -50%)",this.nextButton.style.transform="translate(150%, -50%)"}this.naviButtonsStatus=e}}},{key:"showControlls",value:function(t){this.isZooming!==this.isZoom&&(this.isZooming=this.isZoom,n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{zoom:this.isZoom?"zoomIn":"zoomOut"})),this.isZoom?this.showHideNaviButton("hide"):this.showHideNaviButton("show")),this.isControllsShow!==t&&(t?(n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{controls:"show"})),this.showHideNaviButton("show")):n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{controls:"hide"})),this.isControllsShow=t)}},{key:"updateControlls",value:function(){this.itemsAmount<3?(0===this.itemIndex?this.prevButton.style.visibility="hidden":this.prevButton.style.visibility="visible",this.itemIndex===this.itemsAmount-1?this.nextButton.style.visibility="hidden":this.nextButton.style.visibility="visible",1===this.itemsAmount&&(this.prevButton.style.visibility="hidden",this.nextButton.style.visibility="hidden")):(this.prevButton.style.visibility="visible",this.nextButton.style.visibility="visible");var t=this.itemsList[this.itemIndex];t&&n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{item:t,itemIndex:this.itemIndex}))}},{key:"resizeHandler",value:function(e){var t=this;this.resizeDelay&&clearTimeout(this.resizeDelay),n.cancelAnimationFrame(this.animaSliderRender),this.resizeDelay=setTimeout((function(){if(t.size=e,t.size.height<410&&(t.showControlls(!1,!0),t.needHideControlls=!0),t.size.width<500?(t.prevButton.classList.add("next-prev-button-mini-screen"),t.nextButton.classList.add("next-prev-button-mini-screen")):(t.prevButton.classList.remove("next-prev-button-mini-screen"),t.nextButton.classList.remove("next-prev-button-mini-screen")),0!==t.sliderPages.length){for(var i=0;i<t.sliderPages.length;i+=1)t.sliderPages[i].resize(t.size);t.gotoPageByIndex(t.currentItemIndex,!0),t.showControlls(!0)}}),70)}},{key:"viewOfsetY",get:function(){return this.view.getBoundingClientRect().top-document.body.getBoundingClientRect().top}},{key:"viewOfsetX",get:function(){return this.view.getBoundingClientRect().left-document.body.getBoundingClientRect().left}},{key:"itemIndex",set:function(e){this.itemNumPr=e,this.updateControlls()},get:function(){return this.itemNumPr}},{key:"scrollViewTranslateY",set:function(e){this.scrollViewTranslateYPr=e,this.slider.style.transform="translate3d(".concat(this.scrollViewTranslateX,"px,").concat(e,"px, 0px"),0!==e&&this.sliderVerticalRender()},get:function(){return this.scrollViewTranslateYPr}},{key:"scrollViewTranslateX",set:function(e){this.scrollViewTranslateXPr=e,this.slider.style.transform="translate3d(".concat(e,"px,").concat(this.scrollViewTranslateY,"px, 0px"),this.pageRenderByIndex(-Math.round(e/this.size.width))},get:function(){return this.scrollViewTranslateXPr}},{key:"isZoom",get:function(){return!!this.pageInFocus&&this.pageInFocus.isInScale}}]),e}();i(9);function h(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function m(e,t,i){return t&&h(e.prototype,t),i&&h(e,i),e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=function e(t,i,o,a,n,s,r){u(this,e);var l=document.createElement("div");return l.className=t,l.dataset.type=o,l.innerHTML=i,l.style.backgroundColor=a,l.style.order=r,l.style.fill=n,l.addEventListener("click",s,!1),l.addEventListener("mouseenter",s,!1),l.addEventListener("mouseleave",s,!1),l},g=function(){function e(t,i,o){u(this,e);var a=this;this.appName=t.appName;var s=e.MENU_TYPE,r=e.CONFIG;function l(e){"like"===e.dataset.type&&e.dataset.like||("bookmark"===e.dataset.type&&e.dataset.bookmark?e.style.backgroundColor=a.backgroundColor:(e.style.backgroundColor=a.backgroundColor,e.style.fill=a.iconColor))}function c(t){if("click"===t.type){var i=a.item;if(!i)return;var o={};switch(o.type=this.dataset.type,o.item=i,this.dataset.type){case"like":case"bookmark":case"fullscreen":l(this)}n.Device.desktop||l(this),n.moduleSettings(a.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.ITEM_MENU_ACTION,a,o))}else"mouseenter"===t.type?"bookmark"===(s=this).dataset.type&&s.dataset.bookmark?s.style.backgroundColor=a.backgroundColorOver:(s.style.backgroundColor=a.backgroundColorOver,s.style.fill=a.iconColorOver):"mouseleave"===t.type&&l(this);var s}n.copyProperties(o,r),this.delegate=t,this.item=void 0,this.lightbox=i===s.LIGHTBOX,this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.view.classList.add(i),this.backgroundColor=r.backgroundColor,this.backgroundColorOver=r.backgroundColorOver,this.iconColor=r.iconColor,this.iconColorOver=r.iconColorOver,r.link&&(this.linkButton=new p("".concat(e.classPref,"button"),i===s.ULTRABOX?n.ICONS.LINK_2_SVG:n.ICONS.LINK_SVG,"link",this.backgroundColor,this.iconColor,c,i===s.ULTRABOX?6:0),this.view.appendChild(this.linkButton)),r.play&&(this.playButton=new p("".concat(e.classPref,"button"),n.ICONS.PLAY_SVG,"play",this.backgroundColor,this.iconColor,c,1),this.view.appendChild(this.playButton)),r.zoom&&(this.zoomButton=new p("".concat(e.classPref,"button"),n.ICONS.ZOOM_IN_SVG,"zoom",this.backgroundColor,this.iconColor,c,2),this.view.appendChild(this.zoomButton)),r.info&&(this.infoButton=new p("".concat(e.classPref,"button"),n.ICONS.INFO_SVG,"info",this.backgroundColor,this.iconColor,c,i===s.ULTRABOX?5:3),this.view.appendChild(this.infoButton)),r.discuss&&(this.commentsButton=new p("".concat(e.classPref,"button"),i===s.ULTRABOX?n.ICONS.COMENTS_2_SVG:n.ICONS.COMENTS_SVG,"coments",this.backgroundColor,this.iconColor,c,(s.ULTRABOX,4)),this.view.appendChild(this.commentsButton)),r.download&&(this.downloadButton=new p("".concat(e.classPref,"button"),i===s.ULTRABOX?n.ICONS.DOWNLOAD_2_SVG:n.ICONS.DOWNLOAD_SVG,"download",this.backgroundColor,this.iconColor,c,i===s.ULTRABOX?3:5),this.view.appendChild(this.downloadButton)),r.share&&(this.shareButton=new p("".concat(e.classPref,"button"),i===s.ULTRABOX?n.ICONS.SHARE_2_SVG:n.ICONS.SHARE_SVG,"share",this.backgroundColor,this.iconColor,c,i===s.ULTRABOX?2:6),this.view.appendChild(this.shareButton)),r.bookmark&&(this.bookMarkButton=new p("".concat(e.classPref,"button"),n.ICONS.BOOKMARK_SVG,"bookmark",this.backgroundColor,this.iconColor,c),this.view.appendChild(this.bookMarkButton)),r.like&&(this.likeButton=new p("".concat(e.classPref,"button"),i===s.ULTRABOX?n.ICONS.HEART_2_SVG:n.ICONS.HEART_SVG,"like",this.backgroundColor,this.iconColor,c,i===s.ULTRABOX?1:7),this.view.appendChild(this.likeButton)),r.fulscreen&&(this.fullscreenButton=new p("".concat(e.classPref,"button"),n.ICONS.FULL_SCREEN_SVG,"fullscreen",this.backgroundColor,this.iconColor,c,i===s.ULTRABOX?6:8),this.view.appendChild(this.fullscreenButton)),r.close&&(this.closeButton=new p("".concat(e.classPref,"button"),n.ICONS.CLOSE_SVG,"close",this.backgroundColor,this.iconColor,c,9),this.view.appendChild(this.closeButton))}return m(e,null,[{key:"classPref",get:function(){return"gmedia-item-menu-"}},{key:"EVENTS",get:function(){return{ITEM_MENU_ACTION:"ITEM_MENU_ACTION"}}},{key:"MENU_TYPE",get:function(){return{THUMB:"".concat(e.classPref,"type-thumb"),LIGHTBOX:"".concat(e.classPref,"type-lightbox"),ULTRABOX:"".concat(e.classPref,"type-ultrabox")}}},{key:"CONFIG",get:function(){return{linkTargetWindow:"_self",backgroundColor:"rgb(0,0,0)",backgroundColorOver:"rgb(255,255,255)",iconColor:"rgb(255,255,255)",iconColorOver:"rgb(0,0,0)",link:!1,play:!1,zoom:!1,info:!1,discuss:!1,download:!1,share:!1,like:!1,bookmark:!1,fulscreen:!1,close:!1}}}]),m(e,[{key:"updateForItem",value:function(e){if(this.item=e,this.zoomButton&&("image"!==e.type?this.zoomButtonStatus("desable"):this.zoomButtonStatus("zoomOut")),this.likeButton&&this.delegate.likesSet&&(this.delegate.likesSet[e.ID]?(this.likeButton.style.fill="red",this.likeButton.style.cursor="default",this.likeButton.style.pointerEvents="none",this.likeButton.setAttribute("data-like",e.ID)):(this.likeButton.style.fill=this.iconColor,this.likeButton.style.cursor="pointer",this.likeButton.style.pointerEvents="all",this.likeButton.removeAttribute("data-like"))),this.bookMarkButton&&(this.delegate.is_containIdInBookmarkSet(this.item.ID)||0===this.delegate.is_containIdInBookmarkSet(this.item.ID)?(this.bookMarkButton.setAttribute("data-bookmark",e.ID),this.bookMarkButton.style.fill="red"):(this.bookMarkButton.removeAttribute("data-bookmark"),this.bookMarkButton.style.fill=this.iconColor)),this.linkButton&&(e.link?(this.linkButton.style.display="block",this.linkButton.style.opacity="1",this.linkButton.style.cursor="pointer",this.linkButton.style.pointerEvents="all"):(this.linkButton.style.opacity="0",this.linkButton.style.display="none",this.linkButton.style.cursor="default",this.linkButton.style.pointerEvents="none")),this.commentsButton)switch(e.comment_status){case"open":this.commentsButton.style.display=null;break;case"closed":this.commentsButton.style.display="none"}}},{key:"zoomButtonStatus",value:function(e){if(this.zoomButton&&this.zoomStatus!==e){switch(e){case"desable":this.zoomButton.innerHTML=n.ICONS.ZOOM_IN_SVG,this.zoomButton.style.pointerEvents="none",this.zoomButton.style.opacity=.4;break;case"zoomOut":this.zoomButton.innerHTML=n.ICONS.ZOOM_IN_SVG,this.zoomButton.style.pointerEvents="auto",this.zoomButton.style.opacity=1;break;case"zoomIn":this.zoomButton.innerHTML=n.ICONS.ZOOM_OUT_SVG,this.zoomButton.style.pointerEvents="auto",this.zoomButton.style.opacity=1}this.zoomStatus=e}}},{key:"playButtonStatus",value:function(e){if(this.playButton&&this.playStatus!==e){switch(e){case"play":this.playButton.innerHTML=n.ICONS.PAUSE_SVG;break;case"stop":this.playButton.innerHTML=n.ICONS.PLAY_SVG}this.playStatus=e}}},{key:"resizeHandler",value:function(){var e=document.webkitIsFullScreen||document.mozFullScreen||!1;this.fullscreenButton&&(this.fullscreenButton.innerHTML=e?n.ICONS.NORMAL_SCREEN_SVG:n.ICONS.FULL_SCREEN_SVG,this.fullscreenButton.style.fill=this.iconColor)}}]),e}();i(11);function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function w(e,t,i){return t&&f(e.prototype,t),i&&f(e,i),e}var y=function(){function e(t){v(this,e);var i=this;function o(e){switch(e.type){case"mouseenter":i.selector.style.opacity="1";break;case"mouseleave":i.selectedPr||(i.selector.style.opacity="0")}}this.delegate=t,this.appName=t.appName,this.item=void 0,this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"item"),this.bgImg=document.createElement("div"),this.bgImg.className="".concat(e.classPref,"item-bg"),this.view.appendChild(this.bgImg),this.imgSRC=void 0,this.selector=document.createElement("div"),this.selector.className="".concat(e.classPref,"item-hover"),this.selector.style.borderColor=this.delegate.config.itemBgColor,this.view.appendChild(this.selector),this.selectedPr=!1,this.view.addEventListener("mouseenter",o,!1),this.view.addEventListener("mouseleave",o,!1)}return w(e,null,[{key:"classPref",get:function(){return"gmedia-scroll-bar-"}}]),w(e,[{key:"initByItem",value:function(t){if(this.item=t,this.imgSRC=t.itemViewThumbSrc,this.bgImg.style.backgroundImage="url(".concat(this.imgSRC,")"),this.type=t.type,"audio"===this.type||"video"===this.type){switch(this.hover=document.createElement("div"),this.hover.className="".concat(e.classPref,"item-link"),this.hover.style.backgroundColor=this.delegate.config.itemBgColor,this.type){case"audio":this.hover.innerHTML=n.ICONS.NOTE_SVG;break;case"video":"vimeo"===this.item.mime_type.split("/")[1]?this.hover.innerHTML=n.ICONS.VIMEO_SVG:this.hover.innerHTML=n.ICONS.YOU_TUBE_SVG}this.view.appendChild(this.hover)}}},{key:"select",value:function(e){this.selector.style.opacity=e?"1":"0",this.selectedPr=e}}]),e}(),b=function(){function e(t,i){v(this,e),this.delegate=t,this.config=e.CONFIG,n.copyProperties(i,this.config),this.appName=t.appName,this.itemsList=[],this.thumbSize=n.Size(70,50),this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"wrap"),this.scrollView=document.createElement("div"),this.scrollView.className="".concat(e.classPref,"view"),this.scrollView.style.width="0px",this.view.appendChild(this.scrollView),this.thumbsList=[],this.itemsInStageCount=0,this.scrollWidthPr=0,this.viewCompleted=!1,this.dragging=!1,this.scrollViewTranslateX=0,this.startDragHandler=void 0,this.animationRender=void 0,this.speedX=0,this.activIndex=void 0,this.activAudioIndex=void 0}return w(e,null,[{key:"classPref",get:function(){return"gmedia-scroll-bar-"}},{key:"CONFIG",get:function(){return{itemBgColor:"rgba(255,255,255,0.6)"}}},{key:"EVENTS",get:function(){return{ITEMS_SCROLL_BAR_ITEM_ACTION:"ITEMS_SCROLL_BAR_ITEM_ACTION"}}}]),w(e,[{key:"initByItemslist",value:function(e){this.itemsList=e;var t=new y(this);this.scrollView.appendChild(t.view),this.thumbSize.width=t.view.clientWidth,this.thumbSize.height=t.view.clientHeight,this.scrollView.removeChild(t.view),this.prepare(),this.scrollWidthPr=this.thumbSize.width*this.itemsList.length,this.scrollView.style.width="".concat(this.scrollWidthPr+5,"px"),this.scrollViewTranslateX=0,this.updateView()}},{key:"addThumbByIndex",value:function(t){if(!this.thumbsList[t]){var i=this,o=new y(this);this.thumbsList[t]=o,this.itemsInStageCount+=1,n.isTouchDevice&&o.view.addEventListener("touchend",a,!1),o.view.addEventListener("mouseup",a,!1),o.view.style.left="".concat(this.thumbSize.width*t,"px"),this.scrollView.appendChild(o.view),o.initByItem(this.itemsList[t]),o.view.dataset.gmIndex=t}function a(t){"touchend"!==t.type&&"mouseup"!==t.type||i.dragging||(i.delegate.slider&&n.moduleSettings(i.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.ITEMS_SCROLL_BAR_ITEM_ACTION,i,{action:"click",index:parseInt(this.dataset.gmIndex)})),i.startDragHandler&&i.startDragHandler())}}},{key:"changeAudioStatusForIndex",value:function(e,t){var i=this.thumbsList[e];!this.activAudioIndex&&0!==this.activAudioIndex||e===this.activAudioIndex||(this.thumbsList[this.activAudioIndex].musicIdentifireStatus="ended"),i.musicIdentifireStatus=t.type,this.activAudioIndex=e}},{key:"prepare",value:function(){this.scrollWidthPr=0,this.scrollView.style.transform="translateX(0px)",this.scrollView.style.width="0px",this.scrollViewTranslateXPr=0}},{key:"resizeHandler",value:function(){this.updateView()}},{key:"selectThumbByIndex",value:function(e){if(void 0!==e&&0!==this.itemsList.length){var t;if((this.activIndex||0===this.activIndex)&&(t=this.thumbsList[this.activIndex])&&t.select(!1),this.thumbsList[e]||this.addThumbByIndex(e),t=this.thumbsList[e]){t.select(!0);var i=this.thumbSize.width*e,o=i+this.scrollViewTranslateX,a=o+this.thumbSize.width;(o<0||a<0)&&this.renderTransformTo(n.Point(-i,0)),(o>this.view.clientWidth||a>this.view.clientWidth)&&this.renderTransformTo(n.Point(this.view.clientWidth-this.thumbSize.width-i,0)),this.scrollWidthPr>this.view.clientWidth&&(this.scrollViewTranslateX=Math.max(this.scrollViewTranslateX,-(this.scrollWidthPr-this.view.clientWidth)))}this.activIndex=e}}},{key:"updateView",value:function(){if(this.selectThumbByIndex(this.activIndex),this.view.clientWidth/this.scrollWidthPr<1){if(this.scrollViewTranslateX=this.scrollViewTranslateXPr,this.viewCompleted)return;this.scrollView.classList.add("gm_grabbable"),this.startDragHandler=this.startDrag(),n.isTouchDevice&&this.scrollView.addEventListener("touchstart",this.startDragHandler,n.passiveListener),this.scrollView.addEventListener("mousedown",this.startDragHandler,!1),this.viewCompleted=!0}else{if(this.scrollView.classList.remove("gm_grabbable"),this.scrollViewTranslateX=(this.view.clientWidth-this.scrollWidthPr)/2,!this.viewCompleted)return;n.isTouchDevice&&this.scrollView.removeEventListener("touchstart",this.startDragHandler,n.passiveListener),this.scrollView.removeEventListener("mousedown",this.startDragHandler,!1),this.viewCompleted=!1}}},{key:"renderTransformTo",value:function(e){var t=this;n.cancelAnimationFrame(t.animationRender);var i=0,o=.2,a=.1;t.animationRender=requestAnimationFrame((function n(){i=i*o+(e.x-t.scrollViewTranslateX)*a,t.scrollViewTranslateX+=i,Math.abs(i)<.04?(cancelAnimationFrame(t.animationRender),t.scrollViewTranslateX=e.x):t.animationRender=requestAnimationFrame(n)}))}},{key:"startDrag",value:function(){var e,t,i=this,o=5*i.speedX,a=0,s=0,r=.95,l=1;function c(){return-i.scrollWidthPr+i.view.clientWidth}function d(){if(i.scrollViewTranslateX>0?o=.2*o+.1*(0-i.scrollViewTranslateX):i.scrollViewTranslateX<c()?o=.2*o+.1*(c()-i.scrollViewTranslateX):o*=r,i.scrollViewTranslateX+=o,Math.abs(o)<.4){n.cancelAnimationFrame(i.animationRender),i.speedX=o;var e=o<0?Math.max(Math.ceil(-i.scrollViewTranslateXPr/i.thumbSize.width),0):Math.max(Math.floor(-i.scrollViewTranslateXPr/i.thumbSize.width),0);i.renderTransformTo(n.Point(Math.max(c(),-e*i.thumbSize.width),0))}else i.animationRender=requestAnimationFrame(d)}function h(n){var r;n.preventDefault(),r=n.touches&&n.touches[0]?n.touches[0].pageX:n.pageX;var c=e-r;c&&(i.dragging=!0),i.scrollViewTranslateX=t-c,a=s,s=i.scrollViewTranslateX,o=(s-a)*l}function m(e){e.preventDefault(),i.scrollView.style.transition=null,n.isTouchDevice&&(document.removeEventListener("touchmove",h,n.passiveListener),document.removeEventListener("touchend",m,n.passiveListener),document.removeEventListener("touchcancel",m,!1)),document.removeEventListener("mousemove",h,!1),document.removeEventListener("mouseup",m,!1),document.removeEventListener("oncontextmenu",m,!1),(0!==o||i.scrollViewTranslateX>0||i.scrollViewTranslateX<c())&&(i.animationRender=requestAnimationFrame(d)),i.dragging=!1}return function(a){if(!a)return o=0,t=i.scrollViewTranslateX,void n.cancelAnimationFrame(i.animationRender);var r;(n.isTtouchDevice||a.preventDefault(),a.button&&0!==a.button)||(o=0,s=i.scrollViewTranslateX,r=a.touches&&a.touches[0]?a.touches[0].pageX:a.pageX,e=r,t=i.scrollViewTranslateX,n.cancelAnimationFrame(i.animationRender),n.isTouchDevice&&(document.addEventListener("touchmove",h,n.passiveListener),document.addEventListener("touchend",m,n.passiveListener),document.addEventListener("touchcancel",m,!1)),document.addEventListener("mousemove",h,!1),document.addEventListener("mouseup",m,!1),document.addEventListener("oncontextmenu",m,!1))}}},{key:"size",set:function(e){var t=Math.floor(e.width/this.thumbSize.width);if(t<3)this.view.style.width="0";else{var i=Math.min(t,this.itemsList.length)*this.thumbSize.width;this.view.style.width="".concat(i,"px"),e.height&&(this.view.style.height="".concat(this.thumbSize.height,"px")),this.resizeHandler()}}},{key:"scrollViewTranslateX",set:function(e){if(this.scrollViewTranslateXPr=e,this.scrollView.style.transform="translateX(".concat(e,"px)"),this.itemsList.length!==this.itemsInStageCount)for(var t=Math.max(Math.floor(-e/this.thumbSize.width),0),i=Math.min(t+Math.ceil(this.view.clientWidth/this.thumbSize.width),this.itemsList.length-1),o=t;o<=i;o+=1)this.addThumbByIndex(o)},get:function(){return this.scrollViewTranslateXPr}}]),e}();i(13);function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function k(e,t,i){return t&&C(e.prototype,t),i&&C(e,i),e}var T=function(){function e(t,i){x(this,e),this.delegate=t,this.appName=t.appName,this.config=e.CONFIG,n.copyProperties(i,this.config);this.view=document.createElement("div"),this.view.className="gmedia-lightbox-b-autoplay-wrap",this.view.innerHTML='<svg class="gmedia_progress-radial" width="22px" height="22px" viewBox="0 0 100 100" shape-rendering="geometricPrecision"><defs><mask id="circle_mask" x="0" y="0" width="100" height="100" maskUnits="userSpaceOnUse"><circle cx="50" cy="50" r="51" stroke-width="0" fill="black" opacity="1"/><circle cx="50" cy="50" r="50" stroke-width="0" fill="white" opacity="1"/><circle class="gmedia_progress-radial-mask-inner" cx="50" cy="50" r="40" stroke-width="0" fill="black" opacity="1"/></mask></defs><g mask="url(#circle_mask)"><circle class="gmedia_progress-radial-track" cx="50" cy="50" r="50" stroke-width="0" opacity="1"/><path class="gmedia_progress-radial-bar" transform="translate(50, 50)"d="M 0 0"></path></g></svg>',this.bar=this.view.getElementsByClassName("gmedia_progress-radial-bar")[0],this.bar.style.fill=this.config.autoPlayColor,this.view.getElementsByClassName("gmedia_progress-radial-track")[0].style.fill=this.config.autoPlayBgColor,this.animRatio=25,this.counter=0,this.durationCount=25*this.config.slideshowDelay,this.interval=void 0,this.anPart=0,this.status=void 0}return k(e,null,[{key:"CONFIG",get:function(){return{autoPlayBgColor:"rgba(255,255,255, 0.3)",autoPlayColor:"rgba(255,255,255, 1)",slideshowDelay:8}}},{key:"EVENTS",get:function(){return{NEXT_SLIDE:"NEXT_SLIDE",PLAY:"PLAY"}}}]),k(e,[{key:"drawProgress",value:function(t){if(!isNaN(t)){t=e.clamp(parseFloat(t),0,1);var i=e.clamp(360*t,0,359.99999),o=i*Math.PI/180,a=51*Math.sin(o),n=-51*Math.cos(o),s=i>180?1:0,r="M 0 0 v -%@ A %@ %@ 1 ".replace(/%@/gi,51),l="".concat(r+s," 1 ").concat(a," ").concat(n," z");this.bar.setAttribute("d",l)}}},{key:"switch",value:function(){"play"===this.status?this.clear():this.start()}},{key:"start",value:function(){var t=this;this.view.style.opacity=1;var i=1/this.durationCount;this.interval=setInterval((function(){t.counter+=1,t.counter>=t.durationCount&&(clearInterval(t.interval),n.moduleSettings(t.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.NEXT_SLIDE,t,{})),t.counter=0,t.start()),t.drawProgress(i*t.counter)}),1e3/this.animRatio),"play"!==this.status&&(this.status="play",n.moduleSettings(t.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.PLAY,t,{status:this.status})))}},{key:"pause",value:function(){clearInterval(this.interval),this.status="pause"}},{key:"clear",value:function(){clearInterval(this.interval),this.counter=0,this.drawProgress(0),this.view.style.opacity=0,this.status="stop",n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.PLAY,this,{status:this.status}))}}],[{key:"clamp",value:function(e,t,i){return Math.max(t,Math.min(i,e))}}]),e}(),E=function(){function e(t,i){x(this,e),this.delegate=t,this.config=e.CONFIG,n.copyProperties(i,this.config),this.appName=t.appName,this.headerFooterStatus=void 0,this.headerStatus=void 0,this.mouseMovingTimer=void 0,this.resizeDelay=void 0,this.size=n.Size(0,0),this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.view.id="".concat(this.appName,"_lightbox"),n.Device.desktop||(this.view.style.height="100%");var o=document.createElement("div");o.className="".concat(e.classPref,"bg"),this.background=o,this.view.appendChild(o),this.content=document.createElement("div"),this.content.className="".concat(e.classPref,"content");var a=d.CONFIG;a.backgroundColor=this.config.backgroundColor,a.preloaderColor=this.config.preloaderColor,a.navigationColor=this.config.sliderNavigationColor,a.navigationIconColor=this.config.sliderNavigationIconColor,a.fit=!0;var s=this.config.thumbBarEnable?60:this.config.headerFooterHeight;a.yOffset=n.miniScreen?0:s,a.canRemoved=!0,a.copyR_Alert=this.config.copyR_Alert,a.zoom=this.config.zoom,n.moduleSettings(this.appName).appEventManager.addGMEventListener(d.EVENTS.UPDATE_CONTROLS,this,"updateViewControls"),n.moduleSettings(this.appName).appEventManager.addGMEventListener(d.EVENTS.REMOVE_LIGHTBOX,this,"prepareToRemove"),n.moduleSettings(this.appName).appEventManager.addGMEventListener(T.EVENTS.PLAY,this,"slideShowSwitchHandler"),n.moduleSettings(this.appName).appEventManager.addGMEventListener(T.EVENTS.NEXT_SLIDE,this,"slideshowHandler"),n.moduleSettings(this.appName).appEventManager.addGMEventListener(b.EVENTS.ITEMS_SCROLL_BAR_ITEM_ACTION,this,"scrollBarHandler"),this.slider=new d(this,a),this.slider.initByStage(this.content),this.slider.mouseWheelMode=this.config.zoom,this.view.appendChild(this.content),this.header=document.createElement("div"),this.header.className="".concat(e.classPref,"header"),this.header.style.backgroundImage="linear-gradient(0deg,rgba(0,0,0,0),".concat(this.config.headerFooterColor,")"),this.view.appendChild(this.header),this.footer=document.createElement("div"),this.footer.className="".concat(e.classPref,"footer"),this.footer.style.minHeight="".concat(this.config.headerFooterHeight,"px"),n.isTouchDevice&&this.footer.classList.add("".concat(e.classPref,"touch-device")),n.miniScreen&&(this.footer.style.backgroundImage="linear-gradient(0deg,".concat(this.config.headerFooterColor,",rgba(0,0,0,0))")),this.view.appendChild(this.footer),this.infoBar1=document.createElement("div"),this.infoBar1.className="".concat(e.classPref,"info-wrap"),this.header.appendChild(this.infoBar1),this.config.itemTitleEnable&&(this.itemTitle=document.createElement("div"),this.itemTitle.className="".concat(e.classPref,"item-title"),this.itemTitle.style.fontSize="".concat(this.config.itemTitleFontSize,"px"),this.itemTitle.style.color=this.config.itemTitleTextColor,this.infoBar1.appendChild(this.itemTitle));var r=document.createElement("div");r.className="".concat(e.classPref,"caption-wrap"),r.style.color=this.config.itemCounterColor,this.config.thumbBarEnable||n.isTouchDevice||(r.style.backgroundColor=this.config.headerFooterColor),this.item_current_info=document.createElement("div"),this.item_current_info.className="".concat(e.classPref,"caption-current"),r.appendChild(this.item_current_info);var l=document.createElement("div");l.className="".concat(e.classPref,"caption-delimiter"),l.style.opacity=.7,l.textContent="/",r.appendChild(l),this.items_amount_info=document.createElement("div"),this.items_amount_info.className="".concat(e.classPref,"caption-all"),r.appendChild(this.items_amount_info),this.counter=r;var c=document.createElement("div");if(c.className="".concat(e.classPref,"caption-play-wrap"),c.appendChild(r),this.infoBar1.appendChild(c),this.config.thumbBarEnable){var h=b.CONFIG;h.itemBgColor=this.config.thumbBarHoverColor,this.thumbsBar=new b(this,h),this.footer.appendChild(this.thumbsBar.view),n.isTouchDevice&&this.footer.appendChild(c)}else this.footer.appendChild(c);if(n.Device.desktop&&this.config.slideshowEneble){var m=T.CONFIG;m.autoPlayBgColor=this.config.slideshowIndicatorColorBg,m.autoPlayColor=this.config.slideshowIndicatorColor,m.slideshowDelay=this.config.slideshowTimer,this.autoPlay=new T(this,m),this.config.thumbBarEnable?c.appendChild(this.autoPlay.view):this.infoBar1.appendChild(this.autoPlay.view)}var u=document.createElement("div");n.isTouchDevice&&(u.style.width="100%"),u.className="".concat(e.classPref,"free-space"),this.header.appendChild(u),this.itemMenuWrap=document.createElement("div"),this.itemMenuWrap.className="".concat(e.classPref,"item-menu-wrap"),this.header.appendChild(this.itemMenuWrap);var p=g.CONFIG;p.link=!0,p.play=n.Device.desktop&&this.config.slideshowEneble,p.zoom=n.Device.desktop&&this.config.zoom,p.discuss=this.config.discuss,p.info=this.config.itemInfoEnable,p.share=this.config.itemShare,p.download=this.config.itemDownload,p.like=this.config.itemLike,p.close=n.Device.desktop,p.fulscreen=!n.Device.ios,p.backgroundColor=this.config.menuBackgroundColor,p.backgroundColorOver=this.config.menuBackgroundColorOver,p.iconColor=this.config.menuIconColor,p.iconColorOver=this.config.menuIconColorOver,this.itemMenu=new g(this,g.MENU_TYPE.LIGHTBOX,p),this.itemMenuWrap.appendChild(this.itemMenu.view),n.moduleSettings(this.appName).appEventManager.addGMEventListener(g.EVENTS.ITEM_MENU_ACTION,this,"itemMenuActionHandler"),this.addToStage()}return k(e,null,[{key:"classPref",get:function(){return"gmedia-lightbox-b-"}},{key:"EVENTS",get:function(){return{NEED_MODAL:"NEED_MODAL",REMOVE_LIGHTBOX:"REMOVE_LIGHTBOX",FULLSCREEN_SWITCH:"FULLSCREEN_SWITCH"}}},{key:"CONFIG",get:function(){return{backgroundColor:"rgba(0,0,0,0.8)",preloaderColor:"#494949",headerFooterHeight:40,headerFooterColor:"rgba(0,0,0,1)",sliderNavigationColor:"rgba(0,0,0,0.8)",sliderNavigationIconColor:"rgba(255,255,255,1)",itemCounterColor:"rgba(255,255,255,1)",itemTitleEnable:!0,itemTitleFontSize:18,itemTitleTextColor:"rgba(255,255,255,1)",thumbBarEnable:!0,thumbBarHoverColor:"rgba(255,255,255,1)",itemInfoEnable:!0,itemLike:!0,itemShare:!0,itemDownload:!0,zoom:!0,discuss:!0,menuBackgroundColor:"rgb(0,0,0)",menuBackgroundColorOver:"rgb(255,255,255)",menuIconColor:"rgb(255,255,255)",menuIconColorOver:"rgb(0,0,0)",slideshowEneble:!0,slideshowTimer:8,slideshowAutoPlay:!1,slideshowIndicatorColorBg:"rgba(255,255,255,0.7)",slideshowIndicatorColor:"rgba(255,255,255,1)",copyR_Alert:"Hello, this photo is mine!"}}}]),k(e,[{key:"itemMenuActionHandler",value:function(t){var i=t.params.item,o=t.params.type;if(i&&o){var a,s,r={};switch(r.item=i,o){case"info":r.type="info",n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.NEED_MODAL,this,r)),n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(T.EVENTS.PLAY,this,{action:"stop"}));break;case"link":i.link&&window.open(i.link,this.config.linkTargetWindow);break;case"like":this.delegate.likeItem=i,this.itemMenu.updateForItem(i);break;case"bookmark":this.delegate.bookmarkItem=i,this.itemMenu.updateForItem(i);break;case"share":r.type="share",n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.NEED_MODAL,this,r)),n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(T.EVENTS.PLAY,this,{action:"stop"}));break;case"zoom":"function"==typeof this.sliderZoomSwitch&&this.sliderZoomSwitch();break;case"close":this.prepareToRemove();break;case"play":n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(T.EVENTS.PLAY,this,{}));break;case"download":a=i.url,(s=document.createElement("A")).href=a,s.download=a.substr(a.lastIndexOf("/")+1),document.body.appendChild(s),s.click(),document.body.removeChild(s);break;case"coments":"open"===i.comment_status&&(a="".concat(i.sharelink,"/#comments"),window.open(a,"_self"));break;case"fullscreen":n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.FULLSCREEN_SWITCH,this,{}))}}}},{key:"sliderZoomSwitch",value:function(){this.slider&&this.slider.remoteControl("zoom")}},{key:"slideShowSwitchHandler",value:function(e){if(this.autoPlay)if(e.params.action)switch(e.params.action){case"play":this.autoPlay.start();break;case"stop":this.autoPlay.clear()}else e.params.status?this.itemMenu&&this.itemMenu.playButtonStatus(e.params.status):this.autoPlay.switch()}},{key:"slideshowHandler",value:function(){this.slider&&this.slider.gotoNext()}},{key:"scrollBarHandler",value:function(e){if(this.slider&&e.params&&e.params.action&&(e.params.index||0===e.params.index))switch(e.params.action){case"click":this.slider.gotoPageByIndex(e.params.index)}}},{key:"keydownHandler",value:function(){var e=this;return e.handlerKB=function(t){if(e.delegate.modal)e.delegate.modal.prepareToRemove();else switch(t.keyCode){case 37:e.slider.remoteControl("prev");break;case 39:e.slider.remoteControl("next");break;case 32:n.preventDefault(t),e.slider.remoteControl("space");break;case 27:e.slider.prepareToRemove()}},e.handlerKB}},{key:"addToStage",value:function(){var t=this,i=document.getElementsByTagName("body")[0];this.view.style.zIndex=n.findHighestZIndex(i)+1,n.disableBodyScrollSlider(),document.addEventListener("keydown",t.keydownHandler(),!0),n.moduleSettings(this.appName).appEventManager.addGMEventListener(g.EVENTS.CLOSE,this,"prepareToRemove"),i.appendChild(this.view),setTimeout((function(){t.view.classList.add("".concat(e.classPref,"activate"))}),30)}},{key:"initByList",value:function(e,t){e&&e.length>0&&(this.currentItemIndex=t&&0!==t?0:void 0,this.startItemIndex=t||0,this.itemsList=e,this.thumbsBar&&this.thumbsBar.initByItemslist(this.itemsList),this.slider.initByList(this.itemsList,this.startItemIndex),this.resizeHandler())}},{key:"prepareToRemove",value:function(){if(!this.removing){if(this.removing=!0,this.slider.prepareToRemove(),document.removeEventListener("keydown",this.handlerKB,!0),n.enableBodyScrollSlider(),this.view.classList.remove("".concat(e.classPref,"activate")),document.getElementById("gmediaAudioPlayer"))document.getElementById("gmediaAudioPlayer").pause();n.moduleSettings(this.appName).appEventManager.removeGMEventListener(g.EVENTS.ITEM_MENU_ACTION,this,"itemMenuActionHandler"),n.moduleSettings(this.appName).appEventManager.removeGMEventListener(g.EVENTS.CLOSE,this,"prepareToRemove"),n.moduleSettings(this.appName).appEventManager.removeGMEventListener(d.EVENTS.UPDATE_CONTROLS,this,"updateViewControls"),n.moduleSettings(this.appName).appEventManager.removeGMEventListener(d.EVENTS.REMOVE_LIGHTBOX,this,"prepareToRemove"),n.moduleSettings(this.appName).appEventManager.removeGMEventListener(T.EVENTS.PLAY,this,"slideShowSwitchHandler"),n.moduleSettings(this.appName).appEventManager.removeGMEventListener(T.EVENTS.NEXT_SLIDE,this,"slideshowHandler"),n.moduleSettings(this.appName).appEventManager.removeGMEventListener(b.EVENTS.ITEMS_SCROLL_BAR_ITEM_ACTION,this,"scrollBarHandler"),n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.REMOVE_LIGHTBOX,this))}}},{key:"mouseMoveHandler",value:function(){var e=this;"hide"===this.headerFooterStatus?(clearTimeout(this.mouseMovingTimer),"show"!==this.headerStatus&&(this.header.classList.add("gmedia-show"),this.headerStatus="show",this.slider&&this.slider.showHideNaviButton("show")),this.mouseMovingTimer=setTimeout((function(){e.header.classList.remove("gmedia-show"),e.slider&&e.slider.showHideNaviButton("hide"),e.headerStatus="hide"}),3e3)):(clearTimeout(this.mouseMovingTimer),"show"!==this.headerStatus&&(this.header.classList.add("gmedia-show"),this.headerStatus="show",this.slider&&this.slider.showHideNaviButton("show")))}},{key:"updateViewControls",value:function(e){var t=this;if(e.params.draging&&n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(T.EVENTS.PLAY,this,{action:"stop"})),e.params.zoom&&(n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(T.EVENTS.PLAY,this,{action:"stop"})),this.itemMenu&&this.itemMenu.zoomButtonStatus(e.params.zoom)),e.params.controls)switch(n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(T.EVENTS.PLAY,this,{action:"stop"})),this.headerFooterStatus=e.params.controls,this.mouseMoveHandler(),e.params.controls){case"show":n.miniScreen&&this.header.classList.add("gmedia-show"),this.footer.classList.add("gmedia-show");break;case"hide":n.miniScreen&&this.header.classList.remove("gmedia-show"),this.footer.classList.remove("gmedia-show")}if((e.params.itemIndex||0===e.params.itemIndex)&&(this.item_current_info.innerHTML=e.params.itemIndex+1,this.items_amount_info.innerHTML=this.itemsList.length,this.thumbsBar&&this.thumbsBar.selectThumbByIndex(e.params.itemIndex)),e.params.item&&(this.currentItem=e.params.item,this.delegate.viewItem=this.currentItem,this.itemTitle&&(this.itemTitle.innerHTML=e.params.item.title),this.itemMenu&&this.itemMenu.updateForItem(e.params.item)),e.params.status)switch(e.params.status){case"ready":this.autoPlay&&this.config.slideshowAutoPlay&&!this.startItem&&this.autoPlay.start(),this.view.addEventListener("mousemove",(function(e){t.mouseMoveHandler(e)}),!1)}}},{key:"resizeHandler",value:function(){if(this.view.clientWidth<360?(this.autoPlay&&(this.autoPlay.view.style.display="none"),(this.descriptionWrap||this.thumbsBar)&&(this.counter.style.display="none")):(this.autoPlay&&(this.autoPlay.view.style.display=null),this.counter.style.display=null),this.itemMenu&&this.itemMenu.resizeHandler(),this.thumbsBar){var e=this.footer.clientWidth;this.thumbsBar.size=n.Size(e,0)}this.slider&&this.slider.resizeHandler(n.Size(this.view.clientWidth,this.view.clientHeight))}},{key:"likeItem",set:function(e){this.delegate.likeItem=e}},{key:"likesSet",get:function(){return this.delegate.likesSet}}]),e}();i(15);function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function N(e,t,i){return t&&L(e.prototype,t),i&&L(e,i),e}var I=function(){function e(t,i){S(this,e),this.appName=t,this.modal=i;var o=document.createElement("div");o.className="".concat(e.clessPref,"bar"),o.style.backgroundColor=i.colors.pageBgColor,o.style.color=i.colors.modalInfoBoxTitleTextColor;var a=document.createElement("div");a.className="".concat(e.clessPref,"close-button"),a.innerHTML=n.ICONS.CLOSE_SVG,a.childNodes[0].style.fill=i.colors.modalInfoBoxTitleTextColor,n.isTouchDevice&&a.addEventListener("touchend",(function(){i.dragging||i.prepareToRemove()}),!1),a.addEventListener("click",(function(){i.prepareToRemove()}),!1),o.appendChild(a),this.view=o}return N(e,null,[{key:"clessPref",get:function(){return"gmedia-item-info-"}},{key:"EVENTS",get:function(){return{NEED_NEW_COLLECTION:"NEED_NEW_COLLECTION"}}}]),N(e,[{key:"item",set:function(t){var i,o=this.view,a=this.modal,s=this,r="";function l(){if(!a.dragging){var t=this.dataset.termId,i=this.dataset.taxonomy;n.moduleSettings(s.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.NEED_NEW_COLLECTION,s,{term_id:[t],taxonomy:i}))}}if(r+='<div class="'.concat(e.clessPref,'item-title" style="color:\n ').concat(a.colors.modalInfoBoxTitleTextColor,'">').concat(t.title,"<br>"),t.description&&""!==t.description?r+='<div class="'.concat(e.clessPref,'item-description" style="color:\n ').concat(a.colors.modalInfoBoxTextColor,'">').concat(t.description,"</div></div>"):r+="</div>",""!==r&&((i=document.createElement("div")).className="".concat(e.clessPref,"description-wrap"),i.style.float="none",i.style.marginRight="41px",i.innerHTML=r,o.appendChild(i)),a.config.infoBarTerms){var c=document.createElement("div");if(c.className="".concat(e.clessPref,"description-wrap"),c.style.float="none",c.style.minHeight="0",c.style.color=n.hexToRgbaStrin(this.modal.colors.modalInfoBoxTextColor,1),o.appendChild(c),t.albums&&t.albums.length>0){var d=document.createElement("ul");d.className="".concat(e.clessPref,"terms-list"),d.classList.add("".concat(e.clessPref,"tags-ul"));var h=document.createElement("li");h.className="".concat(e.clessPref,"terms-title"),h.innerHTML="Albums:",d.appendChild(h);for(var m=0;m<t.albums.length;m+=1){var u=document.createElement("li");u.className="".concat(e.clessPref,"album"),u.innerHTML=t.albums[m].name,u.style.color=this.modal.colors.infoBarTermsTitleColor,u.style.backgroundColor=this.modal.colors.infoBarTermsBackgroundColorAlbums,u.onmouseover=function(){this.style.color=s.modal.colors.infoBarTermsBackgroundColorAlbums,this.style.backgroundColor=s.modal.colors.infoBarTermsTitleColor},u.onmouseout=function(){this.style.color=s.modal.colors.infoBarTermsTitleColor,this.style.backgroundColor=s.modal.colors.infoBarTermsBackgroundColorAlbums},u.dataset.termId=t.albums[m].term_id,u.dataset.taxonomy="album__in",u.addEventListener("mouseup",l,!1),n.isTouchDevice&&u.addEventListener("touchend",l,!1),d.appendChild(u)}c.appendChild(d)}if(t.categories&&t.categories.length>0){var p=document.createElement("ul");p.className="".concat(e.clessPref,"terms-list"),p.classList.add("".concat(e.clessPref,"tags-ul"));var g=document.createElement("li");g.className="".concat(e.clessPref,"terms-title"),g.innerHTML="Categories:",p.appendChild(g);for(var v=0;v<t.categories.length;v+=1){var f=document.createElement("li");f.className="".concat(e.clessPref,"category"),f.innerHTML=t.categories[v].title,f.style.color=s.modal.colors.infoBarTermsTitleColor,f.style.backgroundColor=s.modal.colors.infoBarTermsBackgroundColorCategories,f.onmouseover=function(){this.style.color=s.modal.colors.infoBarTermsBackgroundColorCategories,this.style.backgroundColor=s.modal.colors.infoBarTermsTitleColor},f.onmouseout=function(){this.style.color=s.modal.colors.infoBarTermsTitleColor,this.style.backgroundColor=s.modal.colors.infoBarTermsBackgroundColorCategories},f.addEventListener("mouseup",l,!1),n.isTouchDevice&&f.addEventListener("touchend",l,!1),f.dataset.termId=t.categories[v].term_id,f.dataset.taxonomy="category__in",p.appendChild(f)}c.appendChild(p)}if(t.tags&&t.tags.length>0){var w=document.createElement("ul");w.className="".concat(e.clessPref,"terms-list"),w.classList.add("".concat(e.clessPref,"tags-ul"));var y=document.createElement("li");y.className="".concat(e.clessPref,"terms-title"),y.innerHTML="Tags:",w.appendChild(y);for(var b=0;b<t.tags.length;b+=1){var x=document.createElement("li");x.className="".concat(e.clessPref,"tags"),x.innerHTML=t.tags[b].name,x.style.color=s.modal.colors.infoBarTermsTitleColor,x.style.backgroundColor=s.modal.colors.infoBarTermsBackgroundColorTags,x.onmouseover=function(){this.style.color=s.modal.colors.infoBarTermsBackgroundColorTags,this.style.backgroundColor=s.modal.colors.infoBarTermsTitleColor},x.onmouseout=function(){this.style.color=s.modal.colors.infoBarTermsTitleColor,this.style.backgroundColor=s.modal.colors.infoBarTermsBackgroundColorTags},x.addEventListener("mouseup",l,!1),n.isTouchDevice&&x.addEventListener("touchend",l,!1),x.dataset.termId=t.tags[b].term_id,x.dataset.taxonomy="tag__in",w.appendChild(x)}c.appendChild(w)}}if(a.config.infoBarExifEnable){var C="";if(t.meta.data){t.meta.data&&t.meta.data.model&&(C+='<div class="'.concat(e.clessPref,'meta-exif-value">').concat(t.meta.data.model,"</div></br>"));var k=[];t.meta.data&&t.meta.data.focallength&&k.push('<div class="'.concat(e.clessPref,'meta-exif-value">').concat(t.meta.data.focallength,"</div>")),t.meta.data&&t.meta.data.aperture&&k.push('<div class="'.concat(e.clessPref,'meta-exif-value">').concat(t.meta.data.aperture,"</div>")),t.meta.data&&t.meta.data.exposure&&k.push('<div class="'.concat(e.clessPref,'meta-exif-value">').concat(t.meta.data.exposure,"</div>")),t.meta.data&&t.meta.data.iso&&k.push('<div class="'.concat(e.clessPref,'meta-exif-value">').concat(t.meta.data.iso,"</div>"));for(var T=0;T<k.length;T+=1)C+=k[T],T<k.length-1&&(C+='<div class="'.concat(e.clessPref,'meta-exif-separator"> / </div>'));""!==C&&((i=document.createElement("div")).className="".concat(e.clessPref,"description-wrap"),i.style.color=n.hexToRgbaStrin(s.modal.colors.modalInfoBoxTextColor,1),i.innerHTML=C,o.appendChild(i))}}if(a.config.infoBarCountersEnable){(i=document.createElement("div")).className="".concat(e.clessPref,"description-wrap"),i.style.color=a.colors.modalInfoBoxTextColor,i.style.minWidth="240px";var E=document.createElement("div");E.className="".concat(e.clessPref,"likes-view-com"),E.innerHTML="".concat(n.ICONS.VIEW_SVG,'<div class="').concat(e.clessPref,'counter-text">').concat(t.meta.views?t.meta.views:0,"</div>"),E.getElementsByTagName("svg")[0].style.fill=a.colors.modalInfoBoxTitleTextColor,i.appendChild(E);var S=document.createElement("div");S.className="".concat(e.clessPref,"likes-view-com"),S.innerHTML="".concat(n.ICONS.HEART_SVG,'<div class="').concat(e.clessPref,'counter-text">').concat(t.meta.likes?t.meta.likes:0,"</div>"),S.getElementsByTagName("svg")[0].style.fill=a.colors.modalInfoBoxTitleTextColor,i.appendChild(S);var L=document.createElement("div");L.className="".concat(e.clessPref,"likes-view-com"),L.innerHTML="".concat(n.ICONS.COMENTS_SVG,'<div class="').concat(e.clessPref,'counter-text">').concat(t.meta.comment_count?t.comment_count:0,"</div>"),L.getElementsByTagName("svg")[0].style.fill=n.hexToRgbaStrin(a.colors.modalInfoBoxTitleTextColor,1),i.appendChild(L),o.appendChild(i)}if(a.config.infoBarDateInfoEnable){(i=document.createElement("div")).className="".concat(e.clessPref,"description-wrap"),i.style.color=a.colors.modalInfoBoxTextColor;var N="";if(N+='<div class="'.concat(e.clessPref,'item-meta-key">Upload:</div>\n <div class="').concat(e.clessPref,'item-meta-value">').concat(n.timeConverter(t.date),"</div></br>"),t.meta.data&&t.meta.data.created_timestamp)N+='<div class="'.concat(e.clessPref,'item-meta-key">Taken:</div>\n <div class="').concat(e.clessPref,'item-meta-value">').concat(n.timeConverter(t.meta.data.created_timestamp),"</div></br>");i.innerHTML='<div class="'.concat(e.clessPref,'item-date">').concat(N,"</div>"),""!==N&&o.appendChild(i)}}}]),e}(),B=function(){function e(t,i){S(this,e),this.appName=t,this.modal=i;var o=document.createElement("div");o.className="".concat(e.clessPref,"bar"),o.style.backgroundColor=i.colors.pageBgColor,o.style.color=i.colors.modalInfoBoxTitleTextColor;var a=document.createElement("div");a.className="".concat(e.clessPref,"close-button"),a.innerHTML=n.ICONS.CLOSE_SVG,a.childNodes[0].style.fill=i.colors.modalInfoBoxTitleTextColor,n.isTouchDevice&&a.addEventListener("touchend",(function(){i.dragging||i.prepareToRemove()}),n.passiveListener),a.addEventListener("click",(function(){i.prepareToRemove()}),!1),o.appendChild(a),this.view=o}return N(e,null,[{key:"clessPref",get:function(){return"gmedia-item-share-"}}]),N(e,[{key:"item",set:function(t){var i=this.view,o=this.modal,a=t.sharelink,s="";if(""!==(s+='<div class="'.concat(e.clessPref,'item-title" style="color: \'\n ').concat(o.colors.modalInfoBoxTitleTextColor,"'\">").concat(t.title,"</div>"))){var r=document.createElement("div");r.className="".concat(e.clessPref,"description-wrap"),r.style.float="none",r.style.marginRight="41px",r.innerHTML=s,i.appendChild(r)}var l=document.createElement("div");l.className="".concat(e.clessPref,"description-wrap"),l.style.float="none",l.style.padding="0px 20px",i.appendChild(l);var c=!1;function d(){if(!o.dragging){var e,i,n=this.getAttribute("type"),s=(window.screen.width-600)/2,r="menubar=no,toolbar=no,resizable=yes,scrollbars=yes, top=".concat(200,",\n left=").concat(s,", height=450,width=600");switch(n){case"copy":e=document.getElementById("gmSH_title_copy"),i=this.getElementsByTagName("svg")[0],c&&window.open(a,"_blank"),window.getSelection().selectAllChildren(e);try{document.execCommand("copy")&&(window.getSelection().removeAllRanges(),i.style.fill="green",e.style.color="green",c=!0)}catch(e){window.open(a,"_blank")}break;case"facebook":window.open("https://www.facebook.com/share.php?u=".concat(a),"",r);break;case"twitter":window.open("https://twitter.com/intent/tweet?text=".concat(encodeURI(t.title),"&url=").concat(a),"",r);break;case"pinterest":window.open("http://www.pinterest.com/pin/create/button/?url=".concat(a,"&media=").concat(t.url,"\n &description=").concat(encodeURI(t.title)),"",r)}}}var h=document.createElement("div");h.dataset.type="facebook",h.className="".concat(e.clessPref,"item-button-wrap"),h.id="gmedia_share_fb";var m=document.createElement("div");m.className="".concat(e.clessPref,"item-button"),m.innerHTML="".concat(n.ICONS.FB_SVG_COLOR,'\n <div class="').concat(e.clessPref,'button-title" style="color: #3b5998">Facebook</div>'),m.getElementsByTagName("svg")[0].style.fill="#3b5998",h.appendChild(m),h.addEventListener("mouseup",d,!1),n.isTouchDevice&&h.addEventListener("touchend",d,!1),l.appendChild(h),(h=document.createElement("div")).setAttribute("type","twitter"),h.className="".concat(e.clessPref,"item-button-wrap"),h.id="gmedia_share_tw",(m=document.createElement("div")).className="".concat(e.clessPref,"item-button"),m.innerHTML="".concat(n.ICONS.TW_SVG,'\n <div class="').concat(e.clessPref,'button-title" style="color: #00aced">Twitter</div>'),m.getElementsByTagName("svg")[0].style.fill="#00aced",h.appendChild(m),h.addEventListener("mouseup",d,!1),n.isTouchDevice&&h.addEventListener("touchend",d,!1),l.appendChild(h),(h=document.createElement("div")).setAttribute("type","pinterest"),h.className="".concat(e.clessPref,"item-button-wrap"),h.id="gmedia_share_pin",(m=document.createElement("div")).className="".concat(e.clessPref,"item-button"),m.innerHTML="".concat(n.ICONS.PIN_SVG,'\n <div class="').concat(e.clessPref,'button-title" style="color: #cc2127">Pinterest</div>'),m.getElementsByTagName("svg")[0].style.fill="#cc2127",h.appendChild(m),h.addEventListener("mouseup",d,!1),n.isTouchDevice&&h.addEventListener("touchend",d,!1),l.appendChild(h),(h=document.createElement("div")).setAttribute("type","copy"),h.className="".concat(e.clessPref,"item-button-wrap"),h.id="gmedia_share_link",(m=document.createElement("div")).className="".concat(e.clessPref,"item-copy-link"),m.innerHTML="".concat(n.ICONS.LINK_SVG,'\n <div id="gmSH_title_copy" class="').concat(e.clessPref,'button-title" style="color: #7d7d7d">').concat(a,"</div>"),m.getElementsByTagName("svg")[0].style.fill="#7d7d7d",h.appendChild(m),h.addEventListener("mouseup",d,!1),n.isTouchDevice&&h.addEventListener("touchend",d,!1),l.appendChild(h),i.appendChild(l)}}]),e}(),M=function(){function e(t,i,o){var a=this;S(this,e),this.colors=e.COLOR,n.copyProperties(i,this.colors),this.config=e.CONFIG,n.copyProperties(o,this.config),this.iconsSet=e.ICONS,this.passiveListener=n.passiveListener,this.type=void 0,this.delegate=t,this.appName=t.appName,this.view=document.createElement("div"),this.view.className="".concat(e.clessPref,"window"),this.stageFixedMode=!1,this.closeButton=document.createElement("div"),this.closeButton.className="".concat(e.clessPref,"close-button"),this.closeButton.style.backgroundColor=this.colors.backgroundColor,this.view.addEventListener("click",(function(e){e.target!==a.view&&e.target!==a.closeButton||a.prepareToRemove(e)}),n.passiveListener),this.view.appendChild(this.closeButton);var s=document.createElement("div");s.className="".concat(e.clessPref,"flex"),this.view.appendChild(s),this.scrollView=void 0,this.dragging=!1,this.scrollViewTranslateYPr=0,this.startDragHandler=void 0,this.viewCompleted=!1,this.initForStage(this.config.parentDiv,this.config.fixedMode)}return N(e,null,[{key:"clessPref",get:function(){return"gmedia-modal-"}},{key:"EVENTS",get:function(){return{ITEM_MENU_ACTION:"ITEM_MENU_ACTION"}}},{key:"TYPE",get:function(){return{INFO_BAR:"INFO_BAR",SHARE_BAR:"SHARE_BAR"}}},{key:"CONFIG",get:function(){return{parentDiv:void 0,fixedMode:!1,infoBarDateInfoEnable:!0,infoBarExifEnable:!0,infoBarCountersEnable:!0,infoBarTerms:!1,shareTitle:"Share"}}},{key:"COLOR",get:function(){return{backgroundColor:"rgba(0,0,0,0.8)",buttonBackgroundColor:"rgba(0,0,0,0)",buttonIconColor:"white",pageBgColor:"rgb(230,230,230)",modalInfoBoxTitleTextColor:"black",modalInfoBoxTextColor:"black",infoBarTermsTitleColor:"rgba(255,255,255,1)",infoBarTermsBackgroundColorAlbums:"red",infoBarTermsBackgroundColorCategories:"orange",infoBarTermsBackgroundColorTags:"green"}}}]),N(e,[{key:"getPageByType",value:function(t){var i;switch(t){case e.TYPE.INFO_BAR:i=new I(this.appName,this);break;case e.TYPE.SHARE_BAR:i=new B(this.appName,this)}return i}},{key:"initForStage",value:function(t,i){var o=this;t.appendChild(this.view),this.view.style.zIndex=n.findHighestZIndex(t)+1,i?(n.disableBodyScrollSlider(),this.view.classList.add("".concat(e.clessPref,"fixed-modal")),this.stageFixedMode=!0,document.addEventListener("keydown",o.keydownHandler(),!1)):this.stageFixedMode=!1,setTimeout((function(){o.view.style.opacity="1"}),30)}},{key:"addToStage",value:function(){var e=this,t=document.getElementsByTagName("body")[0];this.view.style.zIndex=n.findHighestZIndex(t)+1,n.disableBodyScrollSlider(),this.delegate.slider?this.delegate.slider.view.appendChild(this.view):t.appendChild(this.view),setTimeout((function(){e.view.style.opacity="1"}),30),document.addEventListener("keydown",e.keydownHandler(),!1)}},{key:"prepareToRemove",value:function(){var e=this;e.view.style.opacity="0",this.stageFixedMode&&(document.removeEventListener("keydown",this.handlerKB,!1),n.enableBodyScrollSlider()),setTimeout((function(){e.view&&e.view.parentNode&&e.view.parentNode.removeChild(e.view),delete e.view,e.delegate.deleteModal()}),400)}},{key:"keydownHandler",value:function(){var e=this;return e.handlerKB=function(t){switch(t.keyCode){case 27:e.prepareToRemove()}},e.handlerKB}},{key:"pushPage",value:function(e){this.viewCompleted=!1,this.scrollView&&this.scrollView.parentNode&&this.scrollView.parentNode.removeChild(this.scrollView),this.view.appendChild(e),this.scrollView=e,this.updateControlls()}},{key:"updateControlls",value:function(){this.scrollView&&(this.viewCompleted||(this.startDragHandler=this.startDrag(),this.scrollView.addEventListener("touchstart",this.startDragHandler,this.passiveListener),this.scrollView.addEventListener("mousedown",this.startDragHandler,!1),this.viewCompleted=!0))}},{key:"startDrag",value:function(){var e,t,i=this,o=0,a=0,s=0,r=0,l=.95,c=1,d=n.requestAnimationFrame,h=n.cancelAnimationFrame;function m(){i.scrollViewTranslateY>0?a=.2*a+.1*(0-i.scrollViewTranslateY):i.scrollViewTranslateY<i.bottom?a=.2*a+.1*(i.bottom-i.scrollViewTranslateY):a*=l,i.scrollViewTranslateY+=a,Math.abs(a)<.04?(i.dragging=!1,h(t)):t=d(m)}function u(t){var n=null;t.originalEvent&&(t=t.originalEvent),t.preventDefault(),n=t.touches&&t.touches[0]?t.touches[0].pageY:t.pageY;var l=e-n;l&&(i.dragging=!0),i.scrollViewTranslateY=o-l,s=r,r=i.scrollViewTranslateY,a=(r-s)*c}function p(e){if(e.preventDefault(),i.scrollView.style.transition="none",n.isTouchDevice&&(document.removeEventListener("touchmove",u,i.passiveListener),document.removeEventListener("touchend",p,i.passiveListener)),document.removeEventListener("mousemove",u,!1),document.removeEventListener("mouseup",p,!1),document.removeEventListener("oncontextmenu",p,!1),i.bottom<=0){if(i.scrollViewTranslateY<i.bottom-50||i.scrollViewTranslateY>50)return void i.prepareToRemove()}else if(i.scrollViewTranslateY<-50||i.scrollViewTranslateY>50)return void i.prepareToRemove();(0!==a||i.scrollViewTranslateY>0||i.scrollViewTranslateY<i.bottom)&&i.dragging&&(t=d(m))}return function(s){if(!s)return a=0,o=i.scrollViewTranslateY,void h(t);var l;(n.isTouchDevice||s.preventDefault(),s.originalEvent&&(s=s.originalEvent),s.button&&0!==s.button)||(a=0,r=i.scrollViewTranslateY,l=s.touches&&s.touches[0]?s.touches[0].pageY:s.pageY,e=l,o=i.scrollViewTranslateY,h(t),n.isTouchDevice&&(document.addEventListener("touchmove",u,i.passiveListener),document.addEventListener("touchend",p,i.passiveListener)),document.addEventListener("mousemove",u,!1),document.addEventListener("mouseup",p,!1),document.addEventListener("oncontextmenu",p,!1))}}},{key:"bottom",get:function(){return this.view.clientHeight-this.scrollView.clientHeight-20}},{key:"scrollViewTranslateY",set:function(e){this.scrollViewTranslateYPr=e,this.scrollView.style.transform="translateY(".concat(e,"px)");var t=Math.max(n.moduleSettings(this.appName).modalBgAlpha-Math.abs(e/200),0);this.closeButton.style.opacity=t},get:function(){return this.scrollViewTranslateYPr}}]),e}();function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function P(e,t){return!t||"object"!==_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function O(e,t,i){return(O="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var o=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=z(e)););return e}(e,t);if(o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(i):a.value}})(e,t,i||e)}function z(e){return(z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function V(e,t){return(V=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function R(e,t,i){return t&&H(e.prototype,t),i&&H(e,i),e}!function(){console.log("%c Gmedia Gallery Amron v.3.0","background: #222; color: #bada55");var e="gmedia-amron-",t=n.trace,i=n.moduleSettings,o={REQUEST_START:"REQUEST_START",COLLECTION_DATA_REDY:"COLLECTION_DATA_REDY",COUNTERS_UPDATED:"COUNTERS_UPDATED",NEED_MODAL:"NEED_MODAL",NEED_LIGHTBOX:"NEED_LIGHTBOX",REMOVE_LIGHTBOX:"REMOVE_LIGHTBOX",NEED_NEW_COLLECTION:"NEED_NEW_COLLECTION",NEED_PREV_COLLECTION:"NEED_PREV_COLLECTION",NEED_NEW_COLLECTION_BY_TERM:"NEED_NEW_COLLECTION_BY_TERM",FULLSCREEN_SWITCH:"FULLSCREEN_SWITCH"},a=function(){function t(i){A(this,t),this.delegate=i,this.appName=i.appName,this.id="".concat(this.appName,"_tag_"),this.view=document.createElement("div"),this.view.className="".concat(e,"collection-tags-cloud"),this.list=document.createElement("ul"),this.view.appendChild(this.list)}return R(t,[{key:"updateView",value:function(){var e=this.delegate.tagsCloud,t=[],o=[];for(var a in e)"0"!==a&&t.push(e[a].toLowerCase());t.sort(),t.splice(0,0,e[0].toLowerCase());for(var n=0;n<t.length;n++)for(var s in e)if(e[s].toLowerCase()!==t[n]);else{var r=this.createTag(s,e[s]);o.push(r),this.list.appendChild(r),delete e[s]}this.selectedTag=document.getElementById(this.id+this.delegate.filtredById),this.selectedTag.style.backgroundColor=i(this.appName).tagCloudTextColor,this.selectedTag.style.color=i(this.appName).tagCloudBgColor,this.selectedTag.style.cursor="default"}},{key:"createTag",value:function(e,t){var o=this;function a(e){var t=this.id.split("_")[this.id.split("_").length-1];if(o.selectedTag!==this)switch(e.type){case"click":o.selectedTag=document.getElementById(o.id+o.delegate.filtredById),o.selectedTag.style.color=i(o.appName).tagCloudTextColor,o.selectedTag.style.backgroundColor=i(o.appName).tagCloudBgColor,o.selectedTag.style.cursor="pointer",o.delegate.filtred(t),o.selectedTag=document.getElementById(o.id+o.delegate.filtredById),o.selectedTag.style.cursor="default";break;case"mouseenter":this.style.backgroundColor=i(o.appName).tagCloudTextColor,this.style.color=i(o.appName).tagCloudBgColor;break;case"mouseleave":if(this===o.selectedTag)return;this.style.color=i(o.appName).tagCloudTextColor,this.style.backgroundColor=i(o.appName).tagCloudBgColor}}var n=document.createElement("li");return n.appendChild(document.createTextNode(t)),n.id=this.id+e,n.style.color=i(this.appName).tagCloudTextColor,n.style.backgroundColor=i(this.appName).tagCloudBgColor,n.addEventListener("click",a,!1),n.addEventListener("mouseenter",a,!1),n.addEventListener("mouseleave",a,!1),n}}]),t}(),s=function(){function t(o,a){A(this,t),this.delegate=o,this.appName=o.appName,this.index=a,this.view=document.createElement("div"),this.view.className="".concat(e,"masonry-thumb-pint"),this.view.style.padding="".concat(i(this.appName).thumbSpacing/2,"px"),this.imageHolder=document.createElement("div"),this.imageHolder.className="".concat(e,"image-holder"),this.view.appendChild(this.imageHolder),this.sizePr=n.Size(1,1),this.item=void 0,this.imageRetio=1,this.opacityDelay=void 0,this.displayPr="none"}return R(t,[{key:"init",value:function(){var t=this.delegate.itemsList[this.index];this.item=t;var o=this.delegate.itemWidth;this.type=t.type,this.itemViewSrc=!1,this.img=new Image;var a,s=this;if(this.img.onload=function(){this.setAttribute("alt",t.title),s.view.clientWidth/this.naturalWidth>1.1&&t.itemViewSrc&&!s.itemViewSrc&&(this.src=t.itemViewSrc,s.itemViewSrc=!0),s.imageHolder.style.minHeight=null,this.style.opacity="1"},this.imageHolder.appendChild(this.img),i(this.appName).lightBoxEnable){(a=document.createElement("div")).className="".concat(e,"image-over"),a.style.backgroundColor=i(this.appName).collectionThumbHoverColor,this.imageHolder.appendChild(a);var r=document.createElement("div");switch(r.className="".concat(e,"zoom"),this.item.type){case"video":"vimeo"===this.item.mime_type.split("/")[1]?(r.classList.add("media"),r.innerHTML=n.ICONS.VIMEO_SVG,r.firstChild.style.fill="#00adef"):(r.classList.add("media"),r.innerHTML=n.ICONS.YOU_TUBE_SVG,r.firstChild.style.fill="#e02f2f");break;case"audio":r.classList.add("media"),r.innerHTML=n.ICONS.NOTE_SVG,r.firstChild.style.fill="#7a7a7a";break;default:r.innerHTML=n.ICONS.MAXIMIZE_SVG}this.imageHolder.appendChild(r)}function l(e){if(i(s.appName).lightBoxEnable)switch(e.type){case"mouseenter":this.classList.add("gmedia-hover"),a&&a.classList.add("gmedia-hover");break;case"mouseleave":this.classList.remove("gmedia-hover"),a&&a.classList.remove("gmedia-hover");break;case"click":this.classList.remove("gmedia-hover"),a&&a.classList.remove("gmedia-hover"),s.delegate.itemAction(s.index,"lightBox")}}this.imageHolder.addEventListener("mouseenter",l,!1),this.imageHolder.addEventListener("mouseleave",l,!1),this.imageHolder.addEventListener("click",l,!1),o/t.itemViewThumbSize.width>1.1?this.img.src=t.itemViewSrc:this.img.src=t.itemViewThumbSrc,this.imageRetio=t.itemViewSize.height/t.itemViewSize.width,this.imageHolder.style.minHeight="".concat(this.imageRetio*o,"px");var c,d=document.createElement("div");if(d.className="".concat(e,"item-content"),d.style.backgroundColor=i(this.appName).collectionThumbContentBGColor,this.view.appendChild(d),i(this.appName).collectionThumbTitleShow&&t.title&&""!==t.title&&((c=document.createElement("div")).className="".concat(e,"item-title"),c.style.fontSize="".concat(i(this.appName).collectionThumbFontSize,"px"),c.style.color=i(this.appName).collectionThumbTitleColor,c.innerHTML=t.title,d.appendChild(c)),i(this.appName).collectionThumbDescriptionShow&&t.description&&""!==t.description){var h=document.createElement("div");h.className="".concat(e,"item-description"),h.style.fontSize="".concat(i(this.appName).collectionThumbDescriptionFontSize,"px"),h.style.color=i(this.appName).collectionThumbDescriptionColor,h.innerHTML=t.description,d.appendChild(h)}var m=document.createElement("div");m.className="".concat(e,"item-menu-holder");var u=i(this.appName).collectionThumbSubMenuIconColor,p=i(this.appName).collectionThumbSubMenuBackgroundColor,g=i(this.appName).collectionThumbSubMenuBackgroundColorOver,v=i(this.appName).collectionThumbSubMenuIconHoverColor;function f(e){e.classList.remove("gmedia-hover"),"like"===e.getAttribute("type")&&e.getAttribute("like")||"bookmark"===e.getAttribute("type")&&e.getAttribute("mark")?e.style.backgroundColor=p:(e.style.backgroundColor=p,e.childNodes[0].style.fill=u)}if(t.link){var w=document.createElement("a");w.className="".concat(e,"item-read-more"),w.innerHTML=i(this.appName).collectionReadMoreButtonLabel,w.style.backgroundColor=i(this.appName).collectionReadMoreButtonBGColor,w.style.color=i(this.appName).collectionReadMoreButtonLabelColor,w.setAttribute("target",i(this.appName).linkTargetWindow),w.setAttribute("href",t.link),w.onmouseenter=function(){this.style.backgroundColor=i(s.appName).collectionReadMoreButtonBGColorHover,this.style.color=i(s.appName).collectionReadMoreButtonLabelColorHover},w.onmouseleave=function(){this.style.backgroundColor=i(s.appName).collectionReadMoreButtonBGColor,this.style.color=i(s.appName).collectionReadMoreButtonLabelColor},w.addEventListener("click",(function(e){if("click"===e.type){if(!t)return;s.delegate.itemAction(s.index,this.getAttribute("type")),n.miniScreen&&f(this)}else"mouseenter"===e.type?((i=this).classList.add("gmedia-hover"),i.style.backgroundColor=g,"bookmark"===i.getAttribute("type")&&i.getAttribute("mark")||(i.childNodes[0].style.fill=v)):"mouseleave"===e.type&&f(this);var i}),!1),m.appendChild(w)}m.childNodes.length>0&&d.appendChild(m)}},{key:"resize",value:function(){return this.view.clientHeight}},{key:"updateSomeData",value:function(){}},{key:"mark",set:function(e){this.bookmarkButton&&(e?(this.bookmarkButton.getElementsByTagName("svg")[0].style.fill="red",this.bookmarkButton.setAttribute("mark","true")):(this.bookmarkButton.getElementsByTagName("svg")[0].style.fill=this.bookmarkButton.classList.contains("gmedia-hover")?i(this.appName).collectionThumbSubMenuIconHoverColor:i(this.appName).collectionThumbSubMenuIconColor,this.bookmarkButton.removeAttribute("mark")))},get:function(){return!!this.bookmarkButton}},{key:"like",set:function(e){this.likeButton&&(e?(this.likeButton.getElementsByTagName("svg")[0].style.fill="red",this.likeButton.style.cursor="default",this.likeButton.style.pointerEvents="none",this.likeButton.setAttribute("like","true")):(this.likeButton.childNodes[0].style.fill=this.iconColor,this.likeButton.style.cursor="pointer",this.likeButton.style.pointerEvents="all",this.likeButton.removeAttribute("like")))},get:function(){return!!this.likeButton}},{key:"visibility",set:function(e){this.view.style.visibility=e}},{key:"display",set:function(e){"none"===e&&clearTimeout(this.opacityDelay),this.view.style.display=e,this.displayPr=e},get:function(){return this.displayPr}},{key:"opacity",set:function(e){var t=this;e.delay?this.opacityDelay=setTimeout((function(){t.view.style.opacity=e.opacity}),e.delay):(clearTimeout(this.opacityDelay),t.view.style.opacity=e.opacity)}}]),t}(),r=function(t){function o(t,a){var n;return A(this,o),(n=P(this,z(o).call(this,t,a))).view.className="".concat(e,"masonry-collection"),n.header.style.padding="0 ".concat(i(a).thumbSpacing/2,"px"),n.content.style.paddingBottom="".concat(i(a).thumbSpacing,"px"),n.columnsArr=[],n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&V(e,t)}(o,t),R(o,[{key:"updateViewByData",value:function(){if(this.itemsList)for(var e=0;e<this.itemsList.length;e++){var t=new s(this,e);this.itemsList[e].view=t,t.init()}i(this.appName).tagsFilter&&this.updateTagsCloud(),this.createLayout()}},{key:"createLayout",value:function(){O(z(o.prototype),"createLayout",this).call(this),this.createColumns(),this.addPageToStage()}},{key:"updateLayout",value:function(){if(!1!==this.createColumns()){this.removePresentedItems();for(var e=0;e<this.presentedList.length;e++)this.arangeItemToColum(this.presentedList[e])}else this.presentedList&&this.presentedList[0]&&"none"===this.presentedList[0].display&&this.showPresentedItems()}},{key:"createColumns",value:function(){var t=Math.floor(this.content.clientWidth/Math.min(this.content.clientWidth,i(this.appName).collectionThumbRecomendedWidth));if(this.columnsArr.length!==t){for(var o=0;o<this.columnsArr.length;o++)this.content.removeChild(this.columnsArr[o]);this.columnsArr=[];for(var a=0;a<t;a++){var n=document.createElement("div");n.className="".concat(e,"collection-column"),n.style.width="".concat(100/t,"%"),this.columnsArr.push(n),this.content.appendChild(n)}return!0}return!1}},{key:"scrollHandlerFunction",value:function(){var e=this;return function(){e.bottomSpace<200&&e.addPageToStage()}}},{key:"addPageToStage",value:function(){void 0===this.cureantPage&&(this.cureantPage=0),clearTimeout(this.layoutSizerDelay);var e=Math.ceil(this.filteredCollection.length/this.page_Amount);if(!(this.cureantPage>=e)){for(var t=this.cureantPage*this.page_Amount,i=Math.min(t+this.page_Amount,this.filteredCollection.length),o=1,a=t;a<i;a++){var n=this.filteredCollection[a].view;n.index=a,n.opacity={opacity:0,delay:0},this.addItemToStage(n),n.opacity={opacity:1,delay:100*o},o+=1}this.cureantPage+=1;var s=this;this.layoutSizerDelay=setTimeout((function(){s.bottomSpace<200&&s.addPageToStage()}),1e3)}}},{key:"getColumWithMinHeight",value:function(){for(var e=this.columnsArr[0].clientHeight,t=0,i=1;i<this.columnsArr.length;i++)e!==Math.min(e,this.columnsArr[i].clientHeight)&&(e=Math.min(e,this.columnsArr[i].clientHeight),t=i);return t}},{key:"arangeItemToColum",value:function(e){var t=e.view;this.columnsArr[this.getColumWithMinHeight()].appendChild(t),e.display="block"}},{key:"addItemToStage",value:function(e){this.arangeItemToColum(e),this.presentedList.push(e)}},{key:"bottomSpace",get:function(){var e=this.content.getBoundingClientRect(),t=window.innerHeight;return e.bottom-t}},{key:"itemWidth",get:function(){var e=Math.floor(this.content.clientWidth/i(this.appName).collectionThumbRecomendedWidth);return this.content.clientWidth/e}}]),o}(function(){function s(t,o){A(this,s),this.delegate=t,this.appName=o,this.properties=void 0,this.itemsList=[],this.filteredList=[],this.presentedList=[],this.page_Amount=0,this.cureantPage=void 0,this.scrollHandler=void 0,this.terms=[],this.term=void 0,this.tagsCloud=i(this.appName).tagsFilter?{0:i(this.appName).tagCloudAll}:void 0,this.filterPr=0,this.view=document.createElement("div"),this.header=document.createElement("div"),this.headerNavi=document.createElement("div"),this.content=document.createElement("div"),this.footer=document.createElement("div"),this.tagsCloudView=void 0,this.header.className="".concat(e,"header"),this.content.className="".concat(e,"content"),this.footer.className="".concat(e,"footer"),this.headerNavi.className="".concat(e,"navi"),this.header.appendChild(this.headerNavi),this.view.appendChild(this.header),this.view.appendChild(this.content),this.view.appendChild(this.footer),this.resizeTimeOut=void 0,this.viewWidth=0}return R(s,[{key:"init",value:function(){this.showPreloader(!0)}},{key:"startRequest",value:function(e){this.query=e,this.query.per_page=0,this.query.page=1,i(this.appName).appEventManager.addGMEventListener(o.COLLECTION_DATA_REDY,this,"dataLoaded"),n.request(JSON.stringify({library:this.query}),this,o.COLLECTION_DATA_REDY)}},{key:"showPreloader",value:function(e){var t,o=this;if(e){if(document.getElementById("".concat(this.appName,"_preloader")))return;(t=n.createPreloaderView(n.hexToRgbaStrin(i(this.appName).collectionPreloaderColor,.7))).id="".concat(this.appName,"_preloader"),this.view.appendChild(t)}else document.getElementById("".concat(this.appName,"_preloader"))&&(t=document.getElementById("".concat(this.appName,"_preloader")),n.fadeOut(t,(function(){o.view&&o.view.removeChild(t)}),500))}},{key:"dataLoaded",value:function(e){var o=e.params.data;if(o){try{var a=JSON.parse(o);a.data&&(this.addItemsToCollection(a.data),this.trySortItemsByTerms()),i(this.appName).lightBoxEnable&&this.delegate.startItem&&this.tryOpenLightboxForID(this.delegate.startItem)}catch(e){t(e)}this.showPreloader(!1),this.itemsList&&this.updateViewByData()}}},{key:"tryOpenLightboxForID",value:function(e){for(var t=0;t<this.filteredCollection.length;t++){var a=this.filteredCollection[t];e===parseInt(a.ID)&&(i(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(o.NEED_LIGHTBOX,this,{collection:this,index:t})),t=this.filteredCollection.length)}}},{key:"createTermsCollectionAndUpdateProperties",value:function(e){this.properties||(this.properties={});var t=this,i=[];function o(e){var o={};for(var a in e)if(e[a]){var s=n.Term(e[a],t.appName);if(o[s.term_id]=s,s.itemsList=[],t.itemsList)for(var r=0;r<t.itemsList.length;r++){var l=t.itemsList[r];if(l[s.taxonomy_type]){var c=l[s.taxonomy_type];for(var d in c)c[d].term_id===s.term_id&&(s.itemsList.push(l),i.push(l),t.itemsList.splice(r,1),r-=1)}}return o}}for(var a in this.terms=[],e)!e[a]||"album__in"!==a&&"category__in"!==a&&"tag__in"!==a?this.properties[a]=e[a]:this.terms.push(o(e[a]));this.itemsList=i.concat(this.itemsList)}},{key:"addItemsToCollection",value:function(e){for(var t=0;t<e.length;t++){var i=n.Item(e[t],this.appName);if(i.index=this.itemsList.length+t,i.tags&&i.tags.length>0)for(var o=0;o<i.tags.length;o++){var a=i.tags[o];this.tagsCloud&&(this.tagsCloud[a.term_id]=a.name)}this.itemsList.push(i)}}},{key:"trySortItemsByTerms",value:function(){if(this.queryTermsList=n.termsListFromAppQuery(this.query),this.itemsList&&this.queryTermsList){for(var e=[],t=0;t<this.queryTermsList.length;t++)for(var i=this.queryTermsList[t],o=0;o<this.itemsList.length;o++){var a=this.itemsList[o];if(a[i.taxonomy_type]){var s=a[i.taxonomy_type];for(var r in s)s[r].term_id===i.term_id&&(e.push(a),this.itemsList.splice(o,1),o-=1)}}this.itemsList=e.concat(this.itemsList)}}},{key:"itemAction",value:function(e,t){if(!this.dragging){var a,s=this.filteredCollection[e];switch(t){case"lightBox":i(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(o.NEED_LIGHTBOX,this,{collection:this,index:e}));break;case"share":i(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(o.NEED_MODAL,this,{type:"share",item:s}));break;case"link":s.link&&window.open(s.link,i(this.appName).linkTargetWindow);break;case"coments":a="".concat(s.sharelink,"/#comments"),window.open(a,i(this.appName).linkTargetWindow);break;case"like":this.delegate.likeItem=s;break;case"bookmark":this.delegate.bookmarkItem=s}}}},{key:"refteshDataInItem",value:function(){for(var e=0;e<this.filteredCollection.length;e++){this.filteredCollection[e].view.updateSomeData()}}},{key:"activate",value:function(){this.updateLayout(),this.scrollHandler=this.scrollHandlerFunction(),this.scrollHandler&&window.addEventListener("scroll",this.scrollHandler,!1)}},{key:"deactivate",value:function(){i(this.appName).appEventManager.removeGMEventListener(o.COLLECTION_DATA_REDY,this,"dataLoaded"),window.removeEventListener("scroll",this.scrollHandler,!1),this.scrollHandler=void 0}},{key:"removeItemViewFormStage",value:function(){this.removePresentedItems(),this.presentedList=[],this.cureantPage=void 0}},{key:"removePresentedItems",value:function(){for(var e=0;e<this.presentedList.length;e++)this.presentedList[e].display="none"}},{key:"showPresentedItems",value:function(){for(var e=0;e<this.presentedList.length;e++)this.presentedList[e].display="block"}},{key:"createLayout",value:function(){this.scrollHandler||(this.scrollHandler=this.scrollHandlerFunction(),this.scrollHandler&&window.addEventListener("scroll",this.scrollHandler,!1)),this.page_Amount=Math.min(20,this.filteredCollection.length)}},{key:"scrollHandlerFunction",value:function(){return!1}},{key:"resize",value:function(){var e=this;clearTimeout(this.resizeTimeOut),n.is_touch_device?this.resizeTimeOut=setTimeout((function(){e.resizeDelay()}),150):this.resizeDelay()}},{key:"resizeDelay",value:function(){this.viewWidth!==this.view.clientWidth&&(this.updateLayout(),this.viewWidth=this.view.clientWidth)}},{key:"filtred",value:function(e){window.removeEventListener("scroll",this.scrollHandler,!1),this.scrollHandler=void 0,this.removeItemViewFormStage(),this.filtredById=e,this.createLayout()}},{key:"updateTagsCloud",value:function(){0!==this.filteredCollection.length&&(this.tagsCloudView||(this.tagsCloudView=new a(this),this.header.appendChild(this.tagsCloudView.view)),this.tagsCloud&&this.tagsCloudView.updateView())}},{key:"filtredById",set:function(e){if(this.itemsList&&(this.filteredList=[],this.filterPr=e,0!==e))for(var t=0;t<this.itemsList.length;t++){var i=this.itemsList[t];i.hasTag(e)&&this.filteredList.push(i)}},get:function(){return this.filterPr}},{key:"filteredCollection",get:function(){return this.filteredList.length>0?this.filteredList:this.itemsList}}]),s}()),l=function(){function e(t,o,a){if(A(this,e),n.copyProperties(t,this),this.appApi){this.appName=o,this.appDiv=a,this.modal=void 0;var s=this.settings;if(s&&(i(this.appName).appApi=this.appApi,i(this.appName).post_url=s.post_url,i(this.appName).galleryID="gm".concat(a.getAttribute("data-gmid")),i(this.appName).appEventManager=n.GMEventsManager(),i(this.appName).cacheItemsList=n.CacheItemsList(),i(this.appName).key=!0,i(this.appName).lightBoxEnable="1"===s.lightBoxEnable,i(this.appName).thumbSpacing=parseInt(s.thumbSpacing),i(this.appName).collectionPreloaderColor="#".concat(s.collectionPreloaderColor),i(this.appName).linkTargetWindow=s.linkTargetWindow,i(this.appName).infoBarTermsClickNewPageEnable="1"===s.infoBarTermsClickNewPageEnable,i(this.appName).tagsFilter="1"===s.tagsFilter,i(this.appName).tagCloudAll=s.tagCloudAll,i(this.appName).tagCloudTextColor="#".concat(s.tagCloudTextColor),i(this.appName).tagCloudBgColor="#".concat(s.tagCloudBgColor),i(this.appName).collectionThumbRecomendedWidth=parseInt(s.collectionThumbRecomendedWidth),i(this.appName).collectionThumbHoverColor=s.collectionThumbHoverColor,i(this.appName).collectionThumbContentBGColor="rgba(245,245,245,1)",i(this.appName).collectionThumbTitleShow="1"===s.collectionThumbTitleShow,i(this.appName).collectionThumbTitleColor=s.collectionThumbTitleColor,i(this.appName).collectionThumbFontSize=parseInt(s.collectionThumbFontSize),i(this.appName).collectionThumbDescriptionShow="1"===s.collectionThumbDescriptionShow,i(this.appName).collectionThumbDescriptionColor=s.collectionThumbDescriptionColor,i(this.appName).collectionThumbDescriptionFontSize=parseInt(s.collectionThumbDescriptionFontSize),i(this.appName).collectionThumbSubMenuBackgroundColor=s.collectionThumbSubMenuBackgroundColor,i(this.appName).collectionThumbSubMenuBackgroundColorOver=s.collectionThumbSubMenuBackgroundColorOver,i(this.appName).collectionThumbSubMenuIconColor=s.collectionThumbSubMenuIconColor,i(this.appName).collectionThumbSubMenuIconHoverColor=s.collectionThumbSubMenuIconHoverColor,i(this.appName).collectionReadMoreButtonBGColor=s.collectionReadMoreButtonBGColor,i(this.appName).collectionReadMoreButtonLabelColor=s.collectionReadMoreButtonLabelColor,i(this.appName).collectionReadMoreButtonBGColorHover=s.collectionReadMoreButtonBGColorHover,i(this.appName).collectionReadMoreButtonLabelColorHover=s.collectionReadMoreButtonLabelColorHover,i(this.appName).collectionReadMoreButtonLabel=s.collectionReadMoreButtonLabel,i(this.appName).modaBgColor=s.modaBgColor,i(this.appName).modalInfoBoxBgColor=s.modalInfoBoxBgColor,i(this.appName).modalInfoBoxTitleTextColor="#".concat(s.modalInfoBoxTitleTextColor),i(this.appName).modalInfoBoxTextColor="#".concat(s.modalInfoBoxTextColor),i(this.appName).infoBarCountersEnable="1"===s.infoBarCountersEnable,i(this.appName).infoBarDateInfoEnable="1"===s.infoBarDateInfoEnable,i(this.appName).shareTitlePlaceHolder=s.shareTitlePlaceHolder,i(this.appName).sliderThumbBarEnable="1"===s.sliderThumbBarEnable,i(this.appName).sliderThumbBarHoverColor=s.sliderThumbBarHoverColor,i(this.appName).sliderPreloaderColor="#".concat(s.sliderPreloaderColor),i(this.appName).sliderBgColor=s.sliderBgColor,i(this.appName).sliderHeaderFooterBgColor="#".concat(s.sliderHeaderFooterBgColor),i(this.appName).sliderNavigationColor=s.sliderNavigationColor,i(this.appName).sliderNavigationIconColor=s.sliderNavigationIconColor,i(this.appName).sliderItemTitleFontSize=parseInt(s.sliderItemTitleFontSize),i(this.appName).sliderItemTitleTextColor="#".concat(s.sliderItemTitleTextColor),i(this.appName).sliderThumbSubMenuBackgroundColor=s.sliderThumbSubMenuBackgroundColor,i(this.appName).sliderThumbSubMenuBackgroundColorOver=s.sliderThumbSubMenuBackgroundColorOver,i(this.appName).sliderThumbSubMenuIconColor=s.sliderThumbSubMenuIconColor,i(this.appName).sliderThumbSubMenuIconHoverColor=s.sliderThumbSubMenuIconHoverColor,i(this.appName).sliderInfoEnable="1"===s.sliderInfoEnable,i(this.appName).sliderItemDownload="1"===s.sliderItemDownload,i(this.appName).sliderItemDiscuss="1"===s.sliderItemDiscuss,i(this.appName).sliderSocialShareEnabled="1"===s.sliderSocialShareEnabled,i(this.appName).sliderLikesEnabled="1"===s.sliderLikesEnabled),this.audioPlayer=void 0,this.bookmarkStatusShow=i(this.appName).bookmarkShowState,i){this.currentLocation=void 0,this.collections=[],this.terms={},this.appDiv.style.position="relative",this.appDiv.style.height="auto",this.appDivWidth=this.appDiv.clientWidth;var l=new r(this,this.appName);this.collections.push(l),this.appDiv.appendChild(l.view),l.init(),this.startApp()}}}return R(e,[{key:"startApp",value:function(){var e=this;i(this.appName).appEventManager.addGMEventListener(o.NEED_NEW_COLLECTION,this,"pushNewCollectionByTermID"),i(this.appName).appEventManager.addGMEventListener(o.NEED_NEW_COLLECTION_BY_TERM,this,"pushNewCollectionByTerm"),i(this.appName).appEventManager.addGMEventListener(o.NEED_MODAL,this,"createModal"),i(this.appName).lightBoxEnable&&(i(this.appName).appEventManager.addGMEventListener(o.NEED_LIGHTBOX,this,"createLightbox"),i(this.appName).appEventManager.addGMEventListener(o.REMOVE_LIGHTBOX,this,"removeLightbox"),i(this.appName).appEventManager.addGMEventListener(o.FULLSCREEN_SWITCH,this,"fullscreenSwitch")),this.viewsSet={},i(this.appName).appEventManager.addGMEventListener(o.COUNTERS_UPDATED,this,"itemsCountersUpdateHandler"),this.likesSet={},window.localStorage.getItem("gm_likesSet")&&(this.likesSet=JSON.parse(window.localStorage.getItem("gm_likesSet"))),window.addEventListener("resize",(function(){e.windowResizeHandler(e)})),this.popstateHandler=function(){(e.modal&&e.modal.prepareToRemove(),e.lightbox)?e.lightbox.prepareToRemove():e.collections.length>0&&e.collections[e.collections.length-1]&&e.itemFromHash&&e.collections[e.collections.length-1].tryOpenLightboxForID(e.itemFromHash)},window.addEventListener("popstate",this.popstateHandler,!1),this.itemFromHash&&(this.startItem=this.itemFromHash,window.history.replaceState(null,null,window.location.pathname+window.location.search)),this.appQuery&&(this.createAudioPlayer(),this.collections[0].startRequest(this.appQuery))}},{key:"itemHash",value:function(e){return"#".concat(this.appName,"-").concat(e.ID)}},{key:"addCollectioByQuery",value:function(e){var t=0;if(this.modal&&(this.modal.prepareToRemove(),t=500),this.lightbox&&(this.lightbox.prepareToRemove(),t=500),this.collections.length>0&&this.collections[this.collections.length-1]){var i=this.collections[this.collections.length-1];i.deactivate(),i.view.parentNode&&this.appDiv.removeChild(i.view)}if(document.body.scrollTop>this.appDiv.getBoundingClientRect().top){var o=document.body.getBoundingClientRect(),a=this.appDiv.getBoundingClientRect().top-o.top-(n.isTouchDevice?0:50);n.scrollToY(a,500)}var s=this;!e.s&&this.searchForm&&this.searchForm.clear(),setTimeout((function(){var t=new r(s,s.appName,e);s.collections.push(t),s.appDiv.appendChild(t.view),t.init()}),t)}},{key:"pushNewCollectionByTerm",value:function(e){if(e.params||e.params.term){var t=e.params.term;t.sharelink&&window.open(t.sharelink,"_self")}}},{key:"termLinkForTerm",value:function(e,t){return"".concat(i(this.appName).post_url,"/?").concat(i(this.appName).galleryID,"[").concat(t,"]=").concat(e)}},{key:"pushNewCollectionByTermID",value:function(e){if(e.params||e.params.term_id||!e.params.taxonomy){var t=e.params.term_id,i=e.params.taxonomy,o=this.termLinkForTerm(t,i);window.open(o,"_self")}}},{key:"itemsCountersUpdate",value:function(){if(this.viewsSet){var e=[];for(var t in this.viewsSet)this.viewsSet[t]&&e.push(t);if(e.length>0){var i={likes:[],views:e},a=JSON.stringify({counter:i});n.request(a,this,o.COUNTERS_UPDATED),this.viewsSet={}}}}},{key:"itemsCountersUpdateHandler",value:function(){window.localStorage.setItem("gm_likesSet",JSON.stringify(this.likesSet))}},{key:"createLightbox",value:function(e){if(e.params||e.params.collection){var t=e.params.collection,o=e.params.index,a=t.filteredCollection[o];this.lightbox&&this.lightbox.prepareToRemove(),window.localStorage.getItem("gm_likesSet")&&(this.likesSet=JSON.parse(window.localStorage.getItem("gm_likesSet")));var n=E.CONFIG;n.backgroundColor=i(this.appName).sliderBgColor,n.headerFooterColor=i(this.appName).sliderHeaderFooterBgColor,n.preloaderColor=i(this.appName).sliderPreloaderColor,n.sliderNavigationColor=i(this.appName).sliderNavigationColor,n.sliderNavigationIconColor=i(this.appName).sliderNavigationIconColor,n.itemTitleEnable=!0,n.itemTitleFontSize=i(this.appName).sliderItemTitleFontSize,n.itemTitleTextColor=i(this.appName).sliderItemTitleTextColor,n.thumbBarEnable=!0,n.zoom=!0,n.itemInfoEnable=i(this.appName).sliderInfoEnable,n.itemShare=i(this.appName).sliderSocialShareEnabled,n.itemDownload=i(this.appName).sliderItemDownload,n.itemLike=i(this.appName).sliderLikesEnabled,n.discuss=i(this.appName).sliderItemDiscuss,n.menuBackgroundColor=i(this.appName).sliderThumbSubMenuBackgroundColor,n.menuBackgroundColorOver=i(this.appName).sliderThumbSubMenuBackgroundColorOver,n.menuIconColor=i(this.appName).sliderThumbSubMenuIconColor,n.menuIconColorOver=i(this.appName).sliderThumbSubMenuIconHoverColor,n.slideshowEneble=!0,n.slideshowIndicatorColor="rgba(255,255,255,1)",n.slideshowIndicatorColorBg="rgba(255,255,255,0.6)",n.slideshowTimer=8,this.lightbox=new E(this,n),this.lightbox.initByList(t.filteredCollection,o);var s=this.itemHash(a);window.location.hash!==s&&window.history.pushState(null,null,s)}}},{key:"updateItemLink",value:function(e){window.history.replaceState(null,null,this.itemHash(e))}},{key:"removeLightbox",value:function(e){if(e.target===this.lightbox){var t=this,i=e.target;setTimeout((function(){i.view&&i.view.parentNode&&i.view.parentNode.removeChild(i.view),t.lightbox&&(t.lightbox=void 0)}),100),this.itemsCountersUpdate(),this.itemFromHash&&window.history.back()}}},{key:"createModal",value:function(e){if(e.params.type&&e.params.item){var t,o=e.params.item,a=M.COLOR;a.backgroundColor=i(this.appName).modaBgColor,a.buttonIconColor=i(this.appName).modalInfoBoxTitleTextColor,a.pageBgColor=i(this.appName).modalInfoBoxBgColor,a.modalInfoBoxTitleTextColor=i(this.appName).modalInfoBoxTitleTextColor,a.modalInfoBoxTextColor=i(this.appName).modalInfoBoxTextColor;var n=M.CONFIG;n.infoBarDateInfoEnable=i(this.appName).infoBarDateInfoEnable,n.infoBarExifEnable=!0,n.infoBarCountersEnable=i(this.appName).infoBarCountersEnable,n.infoBarTerms=!0;var s=document.getElementsByTagName("body")[0];switch(n.parentDiv=this.lightbox?this.lightbox.view:s,n.fixedMode=!this.lightbox,this.modal||(this.modal=new M(this,a,n)),e.params.type){case"share":t=this.modal.getPageByType(M.TYPE.SHARE_BAR);break;case"info":t=this.modal.getPageByType(M.TYPE.INFO_BAR)}t.item=o,this.modal.pushPage(t.view)}}},{key:"deleteModal",value:function(){this.modal&&delete this.modal}},{key:"fullscreenSwitch",value:function(){var e=this.lightbox.view;e&&(n.toggleFullScreen(e),this.windowResizeHandler())}},{key:"windowResizeHandler",value:function(){this.bookmarkBox&&this.collectionTranslateY!==this.bookmarkBox.height&&(this.collectionTranslateY=this.bookmarkBox.height,this.showBookmarkInfo(this.bookmarkStatusShow)),this.collections.length>0&&this.collections[this.collections.length-1].resize(),this.lightbox&&this.lightbox.resizeHandler()}},{key:"createAudioPlayer",value:function(){var e,t=this;function i(e){t.slider&&t.slider.audioPlayerHandler(e)}null!=(e=document.getElementById("gmAudioPlayer")?document.getElementById("gmAudioPlayer"):new Audio)&&e.canPlayType&&e.canPlayType("audio/mpeg")&&(e.id="gmAudioPlayer",e.setAttribute("type","audio/mpeg"),e.setAttribute("codecs","mp3"),this.audioPlayer=e,this.appDiv.appendChild(this.audioPlayer),e.addEventListener("ended",i,!1),e.addEventListener("pause",i,!1),e.addEventListener("play",i,!1),e.addEventListener("durationchange",i,!1))}},{key:"itemFromHash",get:function(){var e,t=window.location.hash.indexOf(this.appName);return t+1&&(e=window.location.hash.substr(t).split("-").length>=2?parseInt(window.location.hash.substr(t).split("-")[1]):void 0),e}},{key:"likeItem",set:function(e){if(e){e.meta.likes||(e.meta.likes=0),e.meta.likes=parseInt(e.meta.likes)+1,e.view&&e.view.like&&(e.view.like=!0);var t=e.ID;if(!this.likesSet[t]){this.likesSet[t]="like",this.viewsSet[t]&&delete this.viewsSet[t];var i={likes:[t],views:[t]},a=JSON.stringify({counter:i});n.request(a,this,o.COUNTERS_UPDATED),window.localStorage.setItem("gm_likesSet",JSON.stringify(this.likesSet))}}}},{key:"viewItem",set:function(e){var t=e.ID;this.updateItemLink(e),this.viewsSet[t]="view"}}]),e}();!function(){for(var e=document.body.getElementsByClassName("amron_module"),t=0;t<e.length;t++){var i=e[t].id;window[i]=new l(window[i],i,e[t])}}()}()}]);
1
+ !function(e){var t={};function i(o){if(t[o])return t[o].exports;var a=t[o]={i:o,l:!1,exports:{}};return e[o].call(a.exports,a,a.exports,i),a.l=!0,a.exports}i.m=e,i.c=t,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(o,a,function(t){return e[t]}.bind(null,a));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=17)}([function(e,t,i){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=function(e,t){var i=e[1]||"",o=e[3];if(!o)return i;if(t&&"function"==typeof btoa){var a=(s=o,r=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(l," */")),n=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot).concat(e," */")}));return[i].concat(n).concat([a]).join("\n")}var s,r,l;return[i].join("\n")}(t,e);return t[2]?"@media ".concat(t[2],"{").concat(i,"}"):i})).join("")},t.i=function(e,i){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},a=0;a<this.length;a++){var n=this[a][0];null!=n&&(o[n]=!0)}for(var s=0;s<e.length;s++){var r=e[s];null!=r[0]&&o[r[0]]||(i&&!r[2]?r[2]=i:i&&(r[2]="(".concat(r[2],") and (").concat(i,")")),t.push(r))}},t}},function(e,t,i){var o,a,n={},s=(o=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===a&&(a=o.apply(this,arguments)),a}),r=function(e,t){return t?t.querySelector(e):document.querySelector(e)},l=function(e){var t={};return function(e,i){if("function"==typeof e)return e();if(void 0===t[e]){var o=r.call(this,e,i);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}t[e]=o}return t[e]}}(),c=null,d=0,h=[],m=i(4);function u(e,t){for(var i=0;i<e.length;i++){var o=e[i],a=n[o.id];if(a){a.refs++;for(var s=0;s<a.parts.length;s++)a.parts[s](o.parts[s]);for(;s<o.parts.length;s++)a.parts.push(y(o.parts[s],t))}else{var r=[];for(s=0;s<o.parts.length;s++)r.push(y(o.parts[s],t));n[o.id]={id:o.id,refs:1,parts:r}}}}function p(e,t){for(var i=[],o={},a=0;a<e.length;a++){var n=e[a],s=t.base?n[0]+t.base:n[0],r={css:n[1],media:n[2],sourceMap:n[3]};o[s]?o[s].parts.push(r):i.push(o[s]={id:s,parts:[r]})}return i}function g(e,t){var i=l(e.insertInto);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var o=h[h.length-1];if("top"===e.insertAt)o?o.nextSibling?i.insertBefore(t,o.nextSibling):i.appendChild(t):i.insertBefore(t,i.firstChild),h.push(t);else if("bottom"===e.insertAt)i.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var a=l(e.insertAt.before,i);i.insertBefore(t,a)}}function v(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=h.indexOf(e);t>=0&&h.splice(t,1)}function f(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var o=function(){0;return i.nc}();o&&(e.attrs.nonce=o)}return w(t,e.attrs),g(e,t),t}function w(e,t){Object.keys(t).forEach((function(i){e.setAttribute(i,t[i])}))}function y(e,t){var i,o,a,n;if(t.transform&&e.css){if(!(n="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=n}if(t.singleton){var s=d++;i=c||(c=f(t)),o=C.bind(null,i,s,!1),a=C.bind(null,i,s,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(i=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",w(t,e.attrs),g(e,t),t}(t),o=T.bind(null,i,t),a=function(){v(i),i.href&&URL.revokeObjectURL(i.href)}):(i=f(t),o=k.bind(null,i),a=function(){v(i)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else a()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=s()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var i=p(e,t);return u(i,t),function(e){for(var o=[],a=0;a<i.length;a++){var s=i[a];(r=n[s.id]).refs--,o.push(r)}e&&u(p(e,t),t);for(a=0;a<o.length;a++){var r;if(0===(r=o[a]).refs){for(var l=0;l<r.parts.length;l++)r.parts[l]();delete n[r.id]}}}};var b,x=(b=[],function(e,t){return b[e]=t,b.filter(Boolean).join("\n")});function C(e,t,i,o){var a=i?"":o.css;if(e.styleSheet)e.styleSheet.cssText=x(t,a);else{var n=document.createTextNode(a),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(n,s[t]):e.appendChild(n)}}function k(e,t){var i=t.css,o=t.media;if(o&&e.setAttribute("media",o),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}function T(e,t,i){var o=i.css,a=i.sourceMap,n=void 0===t.convertToAbsoluteUrls&&a;(t.convertToAbsoluteUrls||n)&&(o=m(o)),a&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */");var s=new Blob([o],{type:"text/css"}),r=e.href;e.href=URL.createObjectURL(s),r&&URL.revokeObjectURL(r)}},function(e,t,i){var o=i(3);"string"==typeof o&&(o=[[e.i,o,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};i(1)(o,a);o.locals&&(e.exports=o.locals)},function(e,t,i){(e.exports=i(0)(!1)).push([e.i,".amron_module *{box-sizing:border-box !important}.gmedia-amron-collection-tags-cloud{position:relative;display:block;margin-top:10px;margin-bottom:2px;text-align:center}.gmedia-amron-collection-tags-cloud ul{margin:0 !important;padding:0 !important;list-style:none}.gmedia-amron-collection-tags-cloud ul li::before{display:none}.gmedia-amron-collection-tags-cloud ul li{display:inline-block;max-width:200px;padding:5px 8px !important;margin:3px !important;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:15px !important;border-radius:2px;text-decoration:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;transition:0.3s}.gmedia-amron-masonry-collection{position:relative;width:100%;min-height:200px;overflow:hidden;transition:transform 0.5s;z-index:2}.gmedia-amron-masonry-collection .gmedia-amron-content{position:relative;width:100%}.gmedia-amron-masonry-collection .gmedia-amron-content .gmedia-amron-collection-column{position:relative;float:left}.gmedia-amron-masonry-collection .gmedia-amron-header{position:relative;width:100%}.gmedia-amron-masonry-collection .gmedia-amron-header .gmedia-amron-navi{position:relative;width:100%;overflow:hidden}.gmedia-amron-masonry-collection .gmedia-amron-header .gmedia-amron-term-title{position:relative;display:inline-block;font-size:28px;line-height:34px}.gmedia-amron-masonry-collection .gmedia-amron-header .gmedia-amron-back-button{position:relative;float:left;margin:0 10px 0 0;width:54px;height:34px;border-radius:2px;cursor:pointer}.gmedia-amron-masonry-collection .gmedia-amron-header .gmedia-amron-back-button svg{width:100%;height:100%;vertical-align:baseline !important}.gmedia-amron-masonry-thumb-pint{position:relative;width:100%;opacity:0;transition:opacity 0.45s;float:left;box-sizing:border-box !important}.gmedia-amron-masonry-thumb-pint .gmedia-amron-image-holder{position:relative;width:100%;overflow:hidden}.gmedia-amron-masonry-thumb-pint .gmedia-amron-image-holder.gmedia-hover .gmedia-amron-zoom{transform:translateX(-10%)}.gmedia-amron-masonry-thumb-pint .gmedia-amron-image-holder.gmedia-hover img{transform:scale(1.1)}.gmedia-amron-masonry-thumb-pint .gmedia-amron-image-over{position:absolute;top:0;width:100%;height:100%;transition:opacity 0.5s;opacity:0}.gmedia-amron-masonry-thumb-pint .gmedia-amron-image-over.gmedia-hover{opacity:1}.gmedia-amron-masonry-thumb-pint .gmedia-amron-zoom{position:absolute;width:50px;height:50px;padding:15px !important;right:0;bottom:4px;transform:translateX(100%);margin:auto;cursor:pointer;transition:transform 0.2s}.gmedia-amron-masonry-thumb-pint .gmedia-amron-zoom.media{width:40px;height:40px;background-color:rgba(255,255,255,0.5);border-radius:50%;padding:5px !important;transform:translateX(-10%)}.gmedia-amron-masonry-thumb-pint .gmedia-amron-zoom.media svg{stroke:none}.gmedia-amron-masonry-thumb-pint .gmedia-amron-zoom svg{width:100%;height:100%;stroke:white;vertical-align:baseline !important}.gmedia-amron-masonry-thumb-pint img{display:block;border:0 !important;margin:0 !important;padding:0 !important;max-height:none !important;max-width:none !important;min-height:0 !important;min-width:0 !important;width:100% !important;height:auto !important;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:0.5s ease-out 0s;opacity:0}.gmedia-amron-masonry-thumb-pint .gmedia-amron-item-content{position:relative;display:block;padding:7px 20px !important;text-align:left;background-color:white;overflow:hidden;width:100%;z-index:1;box-sizing:border-box}.gmedia-amron-masonry-thumb-pint .gmedia-amron-item-title{position:relative;margin:10px 0 5px;display:block;font-size:18px;line-height:1.1;letter-spacing:1px;font-weight:600}.gmedia-amron-masonry-thumb-pint .gmedia-amron-item-description{position:relative;display:block;margin:10px 0;padding:0;font-size:13px}.gmedia-amron-masonry-thumb-pint .gmedia-amron-item-read-more{text-decoration:none;box-shadow:none;position:relative;cursor:pointer;font-size:10px;border-radius:2px;text-transform:uppercase;line-height:38px;padding:0 15px;font-weight:700;letter-spacing:1px;color:white;display:inline-block;background-color:rgba(0,0,0,0.59);transition:0.5s}.gmedia-amron-masonry-thumb-pint a:hover,.gmedia-amron-masonry-thumb-pint a:visited,.gmedia-amron-masonry-thumb-pint a:link,.gmedia-amron-masonry-thumb-pint a:active{text-decoration:none;box-shadow:none}.gmedia-amron-masonry-thumb-pint .gmedia-amron-item-menu-holder{position:relative;display:block;width:100%;margin:15px 0;overflow:hidden;text-align:right}.gmedia-amron-masonry-thumb-pint .gmedia-amron-item-menu-holder .gmedia-amron-items-buttons{position:relative;padding:9px;width:36px;height:36px;cursor:pointer;float:right;transition:.5s;box-sizing:border-box;margin:0 1px;border-radius:2px}.gmedia-amron-masonry-thumb-pint .gmedia-amron-item-menu-holder .gmedia-amron-items-buttons svg{width:100%;height:100%;transition:fill .2s;vertical-align:baseline !important}\n",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var i=t.protocol+"//"+t.host,o=i+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var a,n=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(n)?e:(a=0===n.indexOf("//")?n:0===n.indexOf("/")?i+n:o+n.replace(/^\.\//,""),"url("+JSON.stringify(a)+")")}))}},function(e,t,i){var o=i(6);"string"==typeof o&&(o=[[e.i,o,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};i(1)(o,a);o.locals&&(e.exports=o.locals)},function(e,t,i){(e.exports=i(0)(!1)).push([e.i,".gmedia-preloader{min-height:inherit;position:absolute;top:0;left:0;bottom:0;right:0;overflow:hidden;z-index:100}.gmedia-preloader .c-spinner{animation:1s spinner linear infinite}@keyframes spinner{0%{transform:rotate(-360deg)}100%{transform:rotate(0deg)}}@keyframes _spinner{to{transform:rotate(-1440deg)}}@keyframes gmFadeIn{from{opacity:0}to{opacity:1}}\n",""])},function(e,t,i){var o=i(8);"string"==typeof o&&(o=[[e.i,o,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};i(1)(o,a);o.locals&&(e.exports=o.locals)},function(e,t,i){(e.exports=i(0)(!1)).push([e.i,".gmedia-slider-view{position:absolute;overflow:hidden;left:0;right:0;top:0;bottom:0}.gmedia-slider-view *{box-sizing:border-box !important;line-height:1.4}.gmedia-slider-view .gmedia-slider-hints{position:absolute;display:inline-block;padding:5px 10px;font-size:12px;line-height:normal;background-color:rgba(0,0,0,0.8);color:white;transform:translateY(-100%);border-radius:2px;transition:.4s}.gmedia-slider-view.gmedia-slider-activate{pointer-events:auto;visibility:visible;opacity:1}.gmedia-slider-view .gmedia-slider-bg{width:100%;height:100%;transform:translateZ(0)}.gmedia-slider-view .gmedia-slider-wrap{position:absolute;user-select:none;width:100%;top:0;bottom:0}.gmedia-slider-view .miniScreen{margin-top:0;margin-bottom:0}.gmedia-slider-view .gmedia-slider-next-prev-button{position:absolute;width:45px;height:40px;top:50%;margin:0 10px;padding:0;cursor:pointer;transition:transform .5s ease-out;border-radius:2px}.gmedia-slider-view .gmedia-slider-next-prev-button.next-prev-button-mini-screen{display:none}.gmedia-slider-view .gmedia-slider-next-prev-button svg{width:100%;height:100%;vertical-align:baseline !important}.gmedia-slider-page-view{position:absolute;display:block;transform:translate3d(0px, 0px, 0px);width:100%;top:0;bottom:0;left:0;-webkit-backface-visibility:hidden;backface-visibility:hidden;overflow:hidden;-moz-user-select:none;-ms-user-select:none}.gmedia-slider-page-view .gmedia-slider-page-inner{position:absolute;display:block;left:0;top:0;bottom:0;width:100%;overflow:hidden;transform:translate3d(0, 0, 0);backface-visibility:hidden;-webkit-backface-visibility:hidden;-webkit-transform-origin:left top;transform-origin:left top;user-select:none}.gmedia-slider-page-view .gmedia-slider-page-inner img{-webkit-backface-visibility:hidden;backface-visibility:hidden;position:absolute !important;display:block !important;border:none !important;max-width:none !important;opacity:0;padding:0 !important;margin:0 !important;transition:.35s ease-out;user-select:none}.gmedia-slider-page-view .gmedia-slider-page-inner img.onLoad{opacity:1}.gmedia-slider-page-view .gmedia-slider-page-inner.video-play img{visibility:hidden}.gmedia-slider-page-view .gmedia-slider-page-inner .video-wrap{position:absolute;display:block;border:none}.gmedia-slider-page-view .gmedia-slider-page-inner .video-wrap iframe{width:100% !important;height:100% !important;top:0;left:0}.gmedia-slider-page-view .gmedia-slider-page-icon-holder{position:absolute;width:140px;height:140px;border-radius:50%;background-color:rgba(255,255,255,0.6);transform:translateY(-50%) translateX(-50%);left:50%;top:50%;padding:30px;visibility:hidden;will-change:transform;cursor:pointer}.gmedia-slider-page-view .gmedia-slider-page-icon-holder svg{width:100%;height:100%;fill:rgba(0,0,0,0.4)}.gmedia-slider-page-view.info-icon .gmedia-slider-page-icon-holder{visibility:visible}@keyframes rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.gmWrapRotate{animation-name:rotate;animation-duration:2s;animation-iteration-count:infinite;animation-timing-function:linear}\n",""])},function(e,t,i){var o=i(10);"string"==typeof o&&(o=[[e.i,o,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};i(1)(o,a);o.locals&&(e.exports=o.locals)},function(e,t,i){(e.exports=i(0)(!1)).push([e.i,".gmedia-item-menu-view{position:relative;overflow:hidden;float:left}.gmedia-item-menu-view.gmedia-item-menu-type-ultrabox{display:flex;flex-direction:row;flex-wrap:wrap;margin-right:5px}.gmedia-item-menu-view.gmedia-item-menu-type-ultrabox .gmedia-item-menu-button{padding:3px;width:43px;height:43px;margin:0 5px;border-radius:2px}.gmedia-item-menu-view.gmedia-item-menu-type-lightbox .gmedia-item-menu-button{margin:2px}.gmedia-item-menu-view.gmedia-item-menu-type-thumb .gmedia-item-menu-button{margin:1px}.gmedia-item-menu-view .gmedia-item-menu-button{position:relative;padding:9px;width:38px;height:38px;cursor:pointer;float:left;transition:background-color .2s, transform .4s ease-out;border-radius:2px}.gmedia-item-menu-view .gmedia-item-menu-button svg{width:100%;height:100%;fill:inherit;transition:fill .2s, transform .4s ease-out;vertical-align:baseline !important}\n",""])},function(e,t,i){var o=i(12);"string"==typeof o&&(o=[[e.i,o,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};i(1)(o,a);o.locals&&(e.exports=o.locals)},function(e,t,i){(e.exports=i(0)(!1)).push([e.i,".gmedia-scroll-bar-wrap{position:relative;flex:none;width:490px;height:50px;margin:5px 0;overflow:hidden}.gmedia-scroll-bar-wrap .gmedia-scroll-bar-view{position:absolute}.gmedia-scroll-bar-wrap .gmedia-scroll-bar-view .gmedia-scroll-bar-item{position:absolute;height:50px;width:70px;overflow:hidden}.gmedia-scroll-bar-wrap .gmedia-scroll-bar-view .gmedia-scroll-bar-item .gmedia-scroll-bar-item-bg{position:absolute;left:3px;right:3px;top:3px;bottom:3px;background-position:center;-webkit-background-size:cover;background-size:cover;background-repeat:no-repeat;-webkit-backface-visibility:hidden;backface-visibility:hidden}.gmedia-scroll-bar-wrap .gmedia-scroll-bar-view .gmedia-scroll-bar-item .gmedia-scroll-bar-item-hover{position:absolute;opacity:0;transition:opacity .2s;pointer-events:none;top:0;left:0;right:0;bottom:0;border-style:solid;border-width:3px;border-color:#fff}.gmedia-scroll-bar-wrap .gmedia-scroll-bar-view .gmedia-scroll-bar-item .gmedia-scroll-bar-item-link{position:absolute;width:34px;height:34px;padding:6px;border-radius:50%;left:50%;top:50%;transform:translateY(-50%) translateX(-50%)}.gmedia-scroll-bar-wrap .gmedia-scroll-bar-view .gmedia-scroll-bar-item .gmedia-scroll-bar-item-link svg{width:100%;height:100%;fill:rgba(0,0,0,0.58);vertical-align:baseline !important}.gmedia-scroll-bar-wrap .gmedia-scroll-bar-view .gmedia-scroll-bar-item .gmedia-scroll-bar-item-link.rotate svg{animation:1s spinner linear infinite}.gm_grabbable{cursor:move;cursor:grab;cursor:-moz-grab;cursor:-webkit-grab}.gm_grabbable:active{cursor:grabbing;cursor:-moz-grabbing;cursor:-webkit-grabbing}\n",""])},function(e,t,i){var o=i(14);"string"==typeof o&&(o=[[e.i,o,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};i(1)(o,a);o.locals&&(e.exports=o.locals)},function(e,t,i){(e.exports=i(0)(!1)).push([e.i,".gmedia-lightbox-b-view{position:fixed;z-index:99999;left:0;right:0;top:0;bottom:0;visibility:hidden;opacity:0;-ms-touch-action:none;touch-action:none;-webkit-text-size-adjust:100%;font-family:Arial, Helvetica, sans-serif;-webkit-transition:opacity .4s ease;transition:opacity .4s ease, visibility .4s ease}.gmedia-lightbox-b-view *{box-sizing:border-box !important;line-height:1.4}.gmedia-lightbox-b-view.gmedia-lightbox-b-activate{pointer-events:auto;visibility:visible;opacity:1}.gmedia-lightbox-b-view .gmedia-lightbox-b-bg{width:100%;height:100%;transform:translateZ(0)}.gmedia-lightbox-b-view .gmedia-lightbox-b-content{position:absolute;top:0;left:0;width:100%;height:100%}.gmedia-lightbox-b-view .gmedia-lightbox-b-header{position:absolute;padding:5px;left:0;top:0;width:100%;display:flex;flex-wrap:wrap;transform:translateY(-100%);transition:transform .4s ease-out}.gmedia-lightbox-b-view .gmedia-lightbox-b-header *{user-select:none;-moz-user-select:none;-webkit-user-select:none}.gmedia-lightbox-b-view .gmedia-lightbox-b-header.gmedia-show{transform:translateY(0%)}.gmedia-lightbox-b-view .gmedia-lightbox-b-footer{user-select:none;position:absolute;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;padding:0 10px;left:0;bottom:0;width:100%;transform:translateY(100%);transition:transform .4s ease-out}.gmedia-lightbox-b-view .gmedia-lightbox-b-footer.gmedia-show{transform:translateY(0%)}.gmedia-lightbox-b-view .gmedia-lightbox-b-footer.gmedia-lightbox-b-touch-device .gmedia-lightbox-b-caption-wrap{border-radius:2px;padding:0;margin:0}.gmedia-lightbox-b-view .gmedia-lightbox-b-footer .gmedia-lightbox-b-caption-wrap{border-radius:2px;padding:3px 10px;margin:2px}.gmedia-lightbox-b-view .gmedia-lightbox-b-description-wrap{flex:none;width:400px;max-width:100%;padding:0 5px;height:100%}.gmedia-lightbox-b-view .gmedia-lightbox-b-description-wrap a{cursor:pointer}.gmedia-lightbox-b-view .gmedia-lightbox-b-description-wrap a:hover,.gmedia-lightbox-b-view .gmedia-lightbox-b-description-wrap a:visited,.gmedia-lightbox-b-view .gmedia-lightbox-b-description-wrap a:link,.gmedia-lightbox-b-view .gmedia-lightbox-b-description-wrap a:active{text-decoration:none;box-shadow:none}.gmedia-lightbox-b-view .gmedia-lightbox-b-item-title{text-rendering:auto;color:#fff;font-size:18px;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.3;box-sizing:content-box;letter-spacing:0;margin-top:1px;margin-bottom:3px;text-decoration:none !important;box-shadow:none !important}.gmedia-lightbox-b-view .gmedia-lightbox-b-item-description{color:#969696;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}.gmedia-lightbox-b-view .gmedia-lightbox-b-free-space{flex:auto}.gmedia-lightbox-b-view .gmedia-lightbox-b-caption-play-wrap{display:flex;align-items:center}.gmedia-lightbox-b-view .gmedia-lightbox-b-caption-play-wrap .gmedia-lightbox-b-autoplay-wrap{margin-left:15px}.gmedia-lightbox-b-view .gmedia-lightbox-b-caption-wrap{position:relative;flex:none;font-size:13px;line-height:22px;font-weight:400;color:white;display:inline-block}.gmedia-lightbox-b-view .gmedia-lightbox-b-caption-current{position:relative;display:inline-block}.gmedia-lightbox-b-view .gmedia-lightbox-b-caption-delimiter{position:relative;display:inline-block;padding:0 3px}.gmedia-lightbox-b-view .gmedia-lightbox-b-caption-all{position:relative;display:inline-block}.gmedia-lightbox-b-view .gmedia-lightbox-b-autoplay-wrap{position:relative;opacity:0;height:22px;transition:opacity .4s}.gmedia-lightbox-b-view .gmedia-lightbox-b-info-wrap{position:relative;flex:none;min-height:30px;padding:0 10px}.gmedia-lightbox-b-view .gmedia-lightbox-b-item-menu-wrap{position:relative;flex:none;min-width:40px;overflow:hidden}\n",""])},function(e,t,i){var o=i(16);"string"==typeof o&&(o=[[e.i,o,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};i(1)(o,a);o.locals&&(e.exports=o.locals)},function(e,t,i){(e.exports=i(0)(!1)).push([e.i,".gmedia-modal-window{position:fixed;-webkit-backface-visibility:hidden;backface-visibility:hidden;top:0;left:0;right:0;bottom:0;overflow:hidden;opacity:0;will-change:opacity;transition:opacity .4s;text-align:center}.gmedia-modal-window *{box-sizing:border-box}.gmedia-modal-window .gmedia-modal-flex{display:inline-block;width:0;height:100%;vertical-align:middle}.gmedia-modal-window .gmedia-modal-close-button{position:absolute;width:100%;height:100%;z-index:-100;will-change:opacity}.gmedia-item-info-bar{font-size:14px;line-height:1.3;margin:0 10px;padding-bottom:10px;max-width:720px;min-width:260px;background-color:white;border-radius:2px;box-shadow:0 8px 16px rgba(0,0,0,0.15);vertical-align:middle;display:inline-block;will-change:transform}.gmedia-item-info-bar .gmedia-item-info-close-button{position:absolute;margin:10px;width:24px;height:24px;cursor:pointer;right:0}.gmedia-item-info-bar .gmedia-item-info-close-button svg{width:100%;height:100%;vertical-align:baseline !important}.gmedia-item-info-bar .gmedia-item-info-description-wrap{min-width:200px;min-height:44px;padding:10px 20px 0 20px;float:left;text-align:left;font-size:1em}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-item-title{font-size:130%;font-weight:600}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-item-description{font-size:80%;font-weight:400}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-terms-list{list-style:none;margin:0;overflow:hidden;padding:0}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-terms-list.gmedia-item-info-tags-ul{font-size:1rem !important;line-height:1.4 !important;margin-bottom:0 !important;margin-left:0 !important}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-terms-list.gmedia-item-info-tags-ul li{border-radius:3px;display:inline-block;height:26px;line-height:26px;padding:0 20px 0 23px;position:relative;margin:0 7px 10px 0;text-decoration:none;cursor:pointer;transition:.3s}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-meta-exif-value{line-height:1.9;display:inline-block}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-meta-exif-separator{display:inline-block;font-size:100%;margin:0 2px;opacity:.4}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-item-date{font-size:100%;line-height:1.9}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-item-date .gmedia-item-info-item-meta-key{float:left;width:40%;min-width:80px}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-item-date .gmedia-item-info-item-meta-value{float:left;white-space:nowrap;text-transform:capitalize}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-likes-view-com{position:relative;min-width:60px;min-height:40px;border:1px solid;border-color:rgba(0,0,0,0.18);border-radius:2px;background-color:#fafafa;padding:4px;margin:0 1%;text-align:center;display:inline-block}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-likes-view-com svg{display:inline-block;width:24px;height:24px;vertical-align:baseline !important}.gmedia-item-info-bar .gmedia-item-info-description-wrap .gmedia-item-info-likes-view-com .gmedia-item-info-counter-text{font-size:15px;line-height:1}.gmedia-item-info-bar .gmedia-item-info-terms-title{display:inline-block;line-height:26px;padding:0 20px 0 3px;position:relative;text-decoration:none}.gmedia-item-share-bar{font-size:14px;line-height:1.3;margin:0 10px;padding-bottom:10px;max-width:480px;min-width:260px;background-color:white;border-radius:2px;box-shadow:0 8px 16px rgba(0,0,0,0.15);vertical-align:middle;display:inline-block;will-change:transform}.gmedia-item-share-bar .gmedia-item-share-close-button{position:absolute;margin:10px;width:24px;height:24px;cursor:pointer;right:0}.gmedia-item-share-bar .gmedia-item-share-close-button svg{width:100%;height:100%;vertical-align:baseline !important}.gmedia-item-share-bar .gmedia-item-share-description-wrap{min-width:270px;min-height:44px;padding:10px 20px 0 20px;float:left;text-align:left}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-title{display:block;font-size:130%;font-weight:600;line-height:1.3}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-button-wrap{position:relative;display:inline-block;padding:0 4px;min-width:130px;width:50%;height:42px}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-button-wrap .gmedia-item-share-item-button{border:1px solid;border-color:rgba(0,0,0,0.18);cursor:pointer;width:100%;height:100%;border-radius:2px;background-color:#fafafa;transition:.4s}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-button-wrap .gmedia-item-share-item-button svg{width:40px;height:40px;float:left;vertical-align:baseline !important}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-button-wrap .gmedia-item-share-item-button .gmedia-item-share-button-title{white-space:nowrap;position:absolute;left:30px;right:0;font-size:15px;font-weight:400;line-height:41px;text-align:center;opacity:0.7;transition:opacity .4s}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-button-wrap .gmedia-item-share-item-button:hover{box-shadow:0 1px 4px rgba(0,0,0,0.2)}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-button-wrap .gmedia-item-share-item-button:hover .gmedia-item-share-button-title{opacity:1}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-button-wrap .gmedia-item-share-item-copy-link{background-color:#fafafa;border:solid 1px rgba(0,0,0,0.17);width:100%;height:100%;border-radius:2px;overflow:hidden;position:relative;cursor:pointer;transition:.4s}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-button-wrap .gmedia-item-share-item-copy-link .gmedia-item-share-button-title{position:absolute;white-space:nowrap;line-height:41px;left:41px;right:10px;overflow:hidden;opacity:.7;transition:.4s}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-button-wrap .gmedia-item-share-item-copy-link svg{width:40px;height:40px;padding:4px;float:left;transition:fill .4s;vertical-align:baseline !important}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-button-wrap .gmedia-item-share-item-copy-link:hover{box-shadow:0 1px 4px rgba(0,0,0,0.2)}.gmedia-item-share-bar .gmedia-item-share-description-wrap .gmedia-item-share-item-button-wrap .gmedia-item-share-item-copy-link:hover .gmedia-item-share-button-title{opacity:1}\n",""])},function(e,t,i){"use strict";i.r(t);i(2),i(5);function o(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function a(e,t,i){return t&&o(e.prototype,t),i&&o(e,i),e}var n=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var t=this;this.mouseDetected=!1,this.mouseMoveHandler=function(){return function(e){window.removeEventListener("mousedown",t.mouseMoveHandler,!1),window.removeEventListener("touchstart",t.mouseMoveHandler,!1),"touchstart"===e.type?(e.stopPropagation(),t.mouseDetected=!1):t.mouseDetected=!0}},window.addEventListener("mousedown",this.mouseMoveHandler,!1),window.addEventListener("touchstart",this.mouseMoveHandler,!1)}return a(e,null,[{key:"ICONS",get:function(){return{MAXIMIZE_SVG:'<svg fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/></svg>',NOTE_SVG:'<svg version="1.1" viewBox="0 0 58 94" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M37.992,0h-8.021v65.358c-4.435-1.706-10.174-1.73-15.835,0.328C3.994,69.377-2.049,78.355,0.638,85.736 c2.688,7.383,13.088,10.374,23.229,6.683c8.614-3.134,14.249-10.082,14.111-16.626l0.014-53.451 c13.986,2.204,14.943,19.884,13.268,24.842c-0.636,1.879,0.484,3.286,2.598,0C68.938,23.726,37.992,13.376,37.992,0z"/></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></svg>',VIMEO_SVG:'<svg enable-background="new 0 0 56.693 56.693" height="56.693px" id="Layer_1" version="1.1" viewBox="-5 -5 66.693 66.693" width="56.693px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M3.602,22.974l2.01,2.636c0,0,4.146-3.267,5.528-1.634c1.382,1.634,6.656,21.357,8.417,24.997 c1.537,3.192,5.777,7.413,10.426,4.397c4.646-3.014,20.098-16.205,22.863-31.781c2.764-15.574-18.594-12.313-20.854,1.256 c5.652-3.395,8.671,1.38,5.778,6.784c-2.889,5.399-5.527,8.921-6.908,8.921c-1.379,0-2.441-3.612-4.021-9.928 c-1.635-6.53-1.624-18.291-8.416-16.958C12.019,12.921,3.602,22.974,3.602,22.974z"/></svg>',YOU_TUBE_SVG:'<svg data-name="Layer 21" height="24" id="Layer_21" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><title/><path d="M21.80731,7.805a2.79915,2.79915,0,0,0-2.54907-2.53906C17.69061,5.13586,15.36707,5,12.50012,5c-3.45251,0-6.05865.14105-7.74353.27332A2.79932,2.79932,0,0,0,2.1925,7.815C2.08936,8.90021,2,10.33344,2,12.0423c0,1.66632.08862,3.07422.19128,4.14594a2.79852,2.79852,0,0,0,2.56384,2.53833C6.43994,18.85883,9.04657,19,12.50012,19c2.86694,0,5.19049-.13586,6.75812-.266a2.799,2.799,0,0,0,2.54907-2.539C21.91052,15.11548,22,13.69189,22,12S21.91052,8.88452,21.80731,7.805ZM9.77594,14.93878V9.06122L15.574,12Z"/></svg>',BOOKMARK_SVG:'<svg height="1792" viewBox="0 0 1792 1792" width="1792" xmlns="http://www.w3.org/2000/svg"><path d="M1420 128q23 0 44 9 33 13 52.5 41t19.5 62v1289q0 34-19.5 62t-52.5 41q-19 8-44 8-48 0-83-32l-441-424-441 424q-36 33-83 33-23 0-44-9-33-13-52.5-41t-19.5-62v-1289q0-34 19.5-62t52.5-41q21-9 44-9h1048z"/></svg>',HEART_SVG:'<svg enable-background="new 0 0 51 46" height="46px" id="Layer_1" version="1.1" viewBox="0 0 51 46" width="51px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M46.188,4.101c-5.529-5.53-14.495-5.53-20.023,0L25.39,4.875l-0.996-0.774c-5.529-5.53-14.715-5.53-20.245,0 C-1.38,9.63-1.27,18.595,4.26,24.125l18.753,18.643c0.671,0.671,1.4,1.258,2.376,1.766c0.76-0.508,1.483-1.095,2.155-1.766 l18.643-18.643C51.717,18.595,51.717,9.63,46.188,4.101z""/></svg>',HEART_2_SVG:'<svg enable-background="new 0 0 24 24" id="Layer_1" version="1.0" viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M16.4,6c2,0,3.6,1.6,3.6,3.6c0,2-3.9,6.4-8,9.8c-4.1-3.5-8-7.9-8-9.8C4,7.6,5.6,6,7.6,6C10,6,12,9,12,9S13.9,6,16.4,6 M16.4,4C14.6,4,13,4.9,12,6.3C11,4.9,9.4,4,7.6,4C4.5,4,2,6.5,2,9.6C2,14,12,22,12,22s10-8,10-12.4C22,6.5,19.5,4,16.4,4L16.4,4z"/></svg>',COMENTS_SVG:'<svg style="enable-background:new 0 0 24 24;" version="1.1" viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="info"/><g id="icons"><path d="M20,1H4C1.8,1,0,2.8,0,5v10c0,2.2,1.8,4,4,4v3c0,0.9,1.1,1.3,1.7,0.7L9.4,19H20c2.2,0,4-1.8,4-4V5 C24,2.8,22.2,1,20,1z M14,13H8c-0.6,0-1-0.4-1-1c0-0.6,0.4-1,1-1h6c0.6,0,1,0.4,1,1C15,12.6,14.6,13,14,13z M16,9H8 C7.4,9,7,8.6,7,8c0-0.6,0.4-1,1-1h8c0.6,0,1,0.4,1,1C17,8.6,16.6,9,16,9z" id="message"/></g></svg>',COMENTS_2_SVG:'<svg enable-background="new 0 0 64 64" height="64px" id="Layer_1" version="1.1" viewBox="0 0 64 64" width="64px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M47.964,8.127H16.036c-4.4,0-8,3.6-8,8v20.977c0,4.4,3.6,8,8,8h7.397v10.768l13.333-10.768h11.197c4.4,0,8-3.6,8-8V16.127 C55.964,11.727,52.364,8.127,47.964,8.127z M50.964,37.104c0,1.626-1.374,3-3,3H36.767H35l-1.375,1.11l-5.191,4.193v-0.303v-5h-5 h-7.397c-1.626,0-3-1.374-3-3V16.127c0-1.626,1.374-3,3-3h31.928c1.626,0,3,1.374,3,3V37.104z"/><circle cx="21.743" cy="26.617" r="2.913"/><circle cx="32" cy="26.617" r="2.913"/><circle cx="42.256" cy="26.617" r="2.913"/></g></svg>',INFO_SVG:'<svg height="100px" id="Capa_1" style="enable-background:new 0 0 46 100;" version="1.1" viewBox="0 0 46 100" width="46px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M35.162,0c6.696,0,10.043,4.567,10.043,9.789c0,6.522-5.814,12.555-13.391,12.555c-6.344,0-10.045-3.752-9.869-9.947 C21.945,7.176,26.35,0,35.162,0z M14.543,100c-5.287,0-9.164-3.262-5.463-17.615l6.07-25.457c1.057-4.077,1.23-5.707,0-5.707 c-1.588,0-8.451,2.816-12.51,5.59L0,52.406C12.863,41.48,27.662,35.072,34.004,35.072c5.285,0,6.168,6.361,3.525,16.148 L30.58,77.98c-1.234,4.729-0.703,6.359,0.527,6.359c1.586,0,6.787-1.963,11.896-6.041L46,82.377C33.488,95.1,19.83,100,14.543,100z "/></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></svg>',DOWNLOAD_SVG:'<svg version="1.1" viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="info"/><g id="icons"><g id="save"><path d="M11.2,16.6c0.4,0.5,1.2,0.5,1.6,0l6-6.3C19.3,9.8,18.8,9,18,9h-4c0,0,0.2-4.6,0-7c-0.1-1.1-0.9-2-2-2c-1.1,0-1.9,0.9-2,2 c-0.2,2.3,0,7,0,7H6c-0.8,0-1.3,0.8-0.8,1.4L11.2,16.6z"/><path d="M19,19H5c-1.1,0-2,0.9-2,2v0c0,0.6,0.4,1,1,1h16c0.6,0,1-0.4,1-1v0C21,19.9,20.1,19,19,19z"/></g></g></svg>',DOWNLOAD_2_SVG:'<svg enable-background="new 0 0 64 64" height="64px" id="Layer_1" version="1.1" viewBox="0 0 64 64" width="64px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M40.001,36.254c0,3.299-2.673,5.971-5.97,5.971H29.97c-3.297,0-5.97-2.672-5.97-5.971H8v17c0,2.209,1.791,4,4,4h40 c2.209,0,4-1.791,4-4v-17H40.001z"/><path d="M31.916,33.246l7.608-7.452c0.747-0.733,0.506-1.327-0.543-1.327h-4.565V9.246c0-1.381-1.119-2.5-2.5-2.5 s-2.5,1.119-2.5,2.5v15.221h-4.565c-1.05,0-1.291,0.595-0.542,1.327L31.916,33.246z"/></g></svg>',LINK_SVG:'<svg height="1792" viewBox="0 0 1792 1792" width="1792" xmlns="http://www.w3.org/2000/svg"><path d="M1520 1216q0-40-28-68l-208-208q-28-28-68-28-42 0-72 32 3 3 19 18.5t21.5 21.5 15 19 13 25.5 3.5 27.5q0 40-28 68t-68 28q-15 0-27.5-3.5t-25.5-13-19-15-21.5-21.5-18.5-19q-33 31-33 73 0 40 28 68l206 207q27 27 68 27 40 0 68-26l147-146q28-28 28-67zm-703-705q0-40-28-68l-206-207q-28-28-68-28-39 0-68 27l-147 146q-28 28-28 67 0 40 28 68l208 208q27 27 68 27 42 0 72-31-3-3-19-18.5t-21.5-21.5-15-19-13-25.5-3.5-27.5q0-40 28-68t68-28q15 0 27.5 3.5t25.5 13 19 15 21.5 21.5 18.5 19q33-31 33-73zm895 705q0 120-85 203l-147 146q-83 83-203 83-121 0-204-85l-206-207q-83-83-83-203 0-123 88-209l-88-88q-86 88-208 88-120 0-204-84l-208-208q-84-84-84-204t85-203l147-146q83-83 203-83 121 0 204 85l206 207q83 83 83 203 0 123-88 209l88 88q86-88 208-88 120 0 204 84l208 208q84 84 84 204z"/></svg>',LINK_2_SVG:'<svg data-name="Layer 21" height="24" id="Layer_21" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><title/><path d="M9.87012,5.541l4.26953,4.26953a2.02108,2.02108,0,0,1,0,2.855l-1.42383,1.42285,1.41406,1.415,1.42383-1.42334a4.02449,4.02449,0,0,0,0-5.68359L11.28418,4.127a4.01858,4.01858,0,0,0-5.68359,0L4.17676,5.55029a4.02212,4.02212,0,0,0,0,5.68311L5.59082,9.81934a2.02108,2.02108,0,0,1,0-2.855L7.01465,5.541A2.06778,2.06778,0,0,1,9.87012,5.541Z"/><path d="M19.82324,12.666l-1.41406,1.41406a2.02108,2.02108,0,0,1,0,2.855L16.98535,18.3584a2.06778,2.06778,0,0,1-2.85547,0L9.86035,14.08887a2.02108,2.02108,0,0,1,0-2.855L11.28418,9.811,9.87012,8.396,8.44629,9.81934a4.02449,4.02449,0,0,0,0,5.68359l4.26953,4.26953a4.01917,4.01917,0,0,0,5.68359.00049l1.42383-1.42334A4.02449,4.02449,0,0,0,19.82324,12.666Z"/></svg>',SHARE_SVG:'<svg height="1792" viewBox="0 0 1792 1792" width="1792" xmlns="http://www.w3.org/2000/svg"><path d="M1344 1024q133 0 226.5 93.5t93.5 226.5-93.5 226.5-226.5 93.5-226.5-93.5-93.5-226.5q0-12 2-34l-360-180q-92 86-218 86-133 0-226.5-93.5t-93.5-226.5 93.5-226.5 226.5-93.5q126 0 218 86l360-180q-2-22-2-34 0-133 93.5-226.5t226.5-93.5 226.5 93.5 93.5 226.5-93.5 226.5-226.5 93.5q-126 0-218-86l-360 180q2 22 2 34t-2 34l360 180q92-86 218-86z"/></svg>',SHARE_2_SVG:'<svg enable-background="new 0 0 64 64" height="64px" id="Layer_1" version="1.1" viewBox="0 0 64 64" width="64px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M48,39.26c-2.377,0-4.515,1-6.033,2.596L24.23,33.172c0.061-0.408,0.103-0.821,0.103-1.246c0-0.414-0.04-0.818-0.098-1.215 l17.711-8.589c1.519,1.609,3.667,2.619,6.054,2.619c4.602,0,8.333-3.731,8.333-8.333c0-4.603-3.731-8.333-8.333-8.333 s-8.333,3.73-8.333,8.333c0,0.414,0.04,0.817,0.098,1.215l-17.711,8.589c-1.519-1.609-3.666-2.619-6.054-2.619 c-4.603,0-8.333,3.731-8.333,8.333c0,4.603,3.73,8.333,8.333,8.333c2.377,0,4.515-1,6.033-2.596l17.737,8.684 c-0.061,0.407-0.103,0.821-0.103,1.246c0,4.603,3.731,8.333,8.333,8.333s8.333-3.73,8.333-8.333C56.333,42.99,52.602,39.26,48,39.26 z"/></svg>',FULL_SCREEN_SVG:'<svg height="14px" version="1.1" viewBox="0 0 14 14" width="14px" xmlns="http://www.w3.org/2000/svg" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" xmlns:xlink="http://www.w3.org/1999/xlink"><title/><desc/><defs/><g fill-rule="evenodd" id="Page-1" stroke="none" stroke-width="1"><g transform="translate(-215.000000, -257.000000)"><g id="fullscreen" transform="translate(215.000000, 257.000000)"><path d="M2,9 L0,9 L0,14 L5,14 L5,12 L2,12 L2,9 L2,9 Z M0,5 L2,5 L2,2 L5,2 L5,0 L0,0 L0,5 L0,5 Z M12,12 L9,12 L9,14 L14,14 L14,9 L12,9 L12,12 L12,12 Z M9,0 L9,2 L12,2 L12,5 L14,5 L14,0 L9,0 L9,0 Z" id="Shape"/></g></g></g></svg>',NORMAL_SCREEN_SVG:'<svg height="14px" version="1.1" viewBox="0 0 14 14" width="14px" xmlns="http://www.w3.org/2000/svg" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" xmlns:xlink="http://www.w3.org/1999/xlink"><g fill-rule="evenodd" stroke="none" stroke-width="1"><g id="Core" transform="translate(-257.000000, -257.000000)"><g id="fullscreen-exit" transform="translate(257.000000, 257.000000)"><path d="M0,11 L3,11 L3,14 L5,14 L5,9 L0,9 L0,11 L0,11 Z M3,3 L0,3 L0,5 L5,5 L5,0 L3,0 L3,3 L3,3 Z M9,14 L11,14 L11,11 L14,11 L14,9 L9,9 L9,14 L9,14 Z M11,3 L11,0 L9,0 L9,5 L14,5 L14,3 L11,3 L11,3 Z" id="Shape"/></g></g></g></svg>',CLOSE_SVG:'<svg height="512px" id="Layer_1" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M437.5,386.6L306.9,256l130.6-130.6c14.1-14.1,14.1-36.8,0-50.9c-14.1-14.1-36.8-14.1-50.9,0L256,205.1L125.4,74.5 c-14.1-14.1-36.8-14.1-50.9,0c-14.1,14.1-14.1,36.8,0,50.9L205.1,256L74.5,386.6c-14.1,14.1-14.1,36.8,0,50.9 c14.1,14.1,36.8,14.1,50.9,0L256,306.9l130.6,130.6c14.1,14.1,36.8,14.1,50.9,0C451.5,423.4,451.5,400.6,437.5,386.6z"/></svg>',VIEW_SVG:'<svg enable-background="new 0 0 167 93" height="93px" id="Layer_1" version="1.1" viewBox="0 0 167 93" width="167px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M83.25,29.25c-9.649,0-17.5,7.851-17.5,17.5s7.851,17.5,17.5,17.5s17.5-7.851,17.5-17.5 S92.899,29.25,83.25,29.25z"/><path d="M83.25,0.75c-45.84,0-83,46-83,46s37.16,46,83,46s83-46,83-46S129.09,0.75,83.25,0.75z M83.25,81.25 c-19.054,0-34.5-15.445-34.5-34.5c0-19.054,15.446-34.5,34.5-34.5s34.5,15.446,34.5,34.5C117.75,65.805,102.304,81.25,83.25,81.25z "/></g></svg>',FB_SVG_COLOR:'<svg version="1.1" viewBox="0 0 32 32" width="32" height="32" aria-hidden="false"><path d="M27.6 3h-23.2c-.8 0-1.4.6-1.4 1.4v23.1c0 .9.6 1.5 1.4 1.5h12.5v-10.1h-3.4v-3.9h3.4v-2.9c0-3.4 2.1-5.2 5-5.2 1.4 0 2.7.1 3 .2v3.5h-2.1c-1.6 0-1.9.8-1.9 1.9v2.5h3.9l-.5 3.9h-3.4v10.1h6.6c.8 0 1.4-.6 1.4-1.4v-23.2c.1-.8-.5-1.4-1.3-1.4z"></path></svg>',FB_SVG:'<svg enable-background="new 0 0 32 32" version="1.1" viewBox="0 0 32 32" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Flat_copy"><path d="M11.848,32h6.612V15.998h4.411l0.584-5.514H18.46l0.007-2.761c0-1.437,0.137-2.209,2.2-2.209h2.757V0h-4.412 c-5.299,0-7.164,2.675-7.164,7.174v3.311H8.545v5.515h3.303V32z"/></g></svg>',TW_SVG:'<svg version="1.1" viewBox="0 0 32 32" width="32" height="32" aria-hidden="false"><path d="M30 7.3c-1 .5-2.1.8-3.3.9 1.2-.7 2.1-1.8 2.5-3.2-1.1.7-2.3 1.1-3.6 1.4-1-1.1-2.5-1.8-4.2-1.8-3.2 0-5.7 2.6-5.7 5.7 0 .5.1.9.1 1.3-4.8-.2-9-2.5-11.8-6-.5.9-.8 1.9-.8 3 0 2 1 3.8 2.6 4.8-.9 0-1.8-.3-2.6-.7v.1c0 2.8 2 5.1 4.6 5.6-.5.1-1 .2-1.5.2-.4 0-.7 0-1.1-.1.7 2.3 2.9 3.9 5.4 4-2 1.5-4.4 2.5-7.1 2.5-.5 0-.9 0-1.4-.1 2.5 1.6 5.6 2.6 8.8 2.6 10.6 0 16.3-8.8 16.3-16.3v-.7c1.1-1 2-2 2.8-3.2z"></path></svg>',PIN_SVG:'<svg version="1.1" viewBox="0 0 32 32" width="32" height="32" aria-hidden="false"><path d="M16 3c-7.2 0-13 5.8-13 13 0 5.5 3.4 10.2 8.3 12.1-.1-1-.2-2.6 0-3.7.2-1 1.5-6.5 1.5-6.5s-.4-.8-.4-1.9c0-1.8 1-3.2 2.4-3.2 1.1 0 1.6.8 1.6 1.8 0 1.1-.7 2.8-1.1 4.3-.3 1.3.6 2.3 1.9 2.3 2.3 0 4.1-2.4 4.1-6 0-3.1-2.2-5.3-5.4-5.3-3.7 0-5.9 2.8-5.9 5.6 0 1.1.4 2.3 1 3 .1.1.1.2.1.4-.1.4-.3 1.3-.4 1.5-.1.2-.2.3-.4.2-1.6-.8-2.6-3.1-2.6-5 0-4.1 3-7.9 8.6-7.9 4.5 0 8 3.2 8 7.5 0 4.5-2.8 8.1-6.7 8.1-1.3 0-2.6-.7-3-1.5 0 0-.7 2.5-.8 3.1-.3 1.1-1.1 2.5-1.6 3.4 1.2.4 2.5.6 3.8.6 7.2 0 13-5.8 13-13 0-7.1-5.8-12.9-13-12.9z"></path></svg>',ZOOM_IN_SVG:'<svg enable-background="new 0 0 512 512" height="512px" id="Layer_1" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M497.913,497.914c-18.782,18.781-49.226,18.781-68.008,0l-84.862-84.864c-34.89,22.366-76.131,35.718-120.66,35.718 C100.468,448.768,0,348.314,0,224.384C0,100.454,100.468,0,224.383,0c123.931,0,224.384,100.453,224.384,224.384 c0,44.529-13.353,85.771-35.718,120.675l84.863,84.849C516.695,448.689,516.695,479.131,497.913,497.914z M224.383,64.11 c-88.511,0-160.274,71.763-160.274,160.274c0,88.526,71.764,160.274,160.274,160.274c88.526,0,160.273-71.748,160.273-160.274 C384.656,135.873,312.909,64.11,224.383,64.11z M256.438,320.548h-64.108v-64.109H128.22V192.33h64.109v-64.11h64.108v64.11h64.11 v64.109h-64.11V320.548z"/></svg>',ZOOM_OUT_SVG:'<svg enable-background="new 0 0 512 512" height="512px" id="Layer_1" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><g><path d="M497.913,429.906l-84.863-84.848c22.365-34.903,35.718-76.146,35.718-120.676C448.768,100.453,348.314,0,224.383,0 C100.468,0,0,100.453,0,224.384s100.468,224.384,224.383,224.384c44.529,0,85.771-13.352,120.66-35.718l84.862,84.864 c18.782,18.781,49.226,18.781,68.008,0C516.695,479.131,516.695,448.689,497.913,429.906z M224.383,384.658 c-88.511,0-160.274-71.748-160.274-160.274c0-88.511,71.764-160.274,160.274-160.274c88.526,0,160.273,71.763,160.273,160.274 C384.656,312.91,312.909,384.658,224.383,384.658z M128.219,256.438h192.329v-64.109H128.219V256.438z"/></g></g></svg>',PLAY_SVG:'<svg height="512px" id="Layer_1" enable-background:new 0 0 512 512 version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M405.2,232.9L126.8,67.2c-3.4-2-6.9-3.2-10.9-3.2c-10.9,0-19.8,9-19.8,20H96v344h0.1c0,11,8.9,20,19.8,20 c4.1,0,7.5-1.4,11.2-3.4l278.1-165.5c6.6-5.5,10.8-13.8,10.8-23.1C416,246.7,411.8,238.5,405.2,232.9z"/></svg>',PAUSE_SVG:'<svg height="512px" id="Layer_1" enable-background:new 0 0 512 512 version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M224,435.8V76.1c0-6.7-5.4-12.1-12.2-12.1h-71.6c-6.8,0-12.2,5.4-12.2,12.1v359.7c0,6.7,5.4,12.2,12.2,12.2h71.6 C218.6,448,224,442.6,224,435.8z"/><path d="M371.8,64h-71.6c-6.7,0-12.2,5.4-12.2,12.1v359.7c0,6.7,5.4,12.2,12.2,12.2h71.6c6.7,0,12.2-5.4,12.2-12.2V76.1 C384,69.4,378.6,64,371.8,64z"/></g></svg>'}}}]),a(e,null,[{key:"moduleSettings",value:function(e){return window[e]&&window[e].settings?window[e].settings:null}},{key:"requestAnimationFrame",value:function(e){return(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame)(e)}},{key:"cancelAnimationFrame",value:function(e){(window.cancelAnimationFrame||window.mozCancelAnimationFrame)(e)}},{key:"whichTransitionEventEnd",value:function(){var e=document.createElement("fakeelement"),t={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"},i=Object.keys(t);for(var o in i)if(void 0!==e.style[o])return t[o]}},{key:"copyProperties",value:function(e,t){for(var i=Object.keys(e),o=0;o<i.length;o+=1){var a=i[o];t[a]=e[a]}}},{key:"shuffle",value:function(e){for(var t,i,o=e.length;0!==o;)i=Math.floor(Math.random()*o),t=e[o-=1],e[o]=e[i],e[i]=t;return e}},{key:"Rect",value:function(e,t,i,o){return{x:e,y:t,width:i,height:o}}},{key:"Size",value:function(e,t){return{width:e,height:t}}},{key:"Point",value:function(e,t){return{x:e,y:t}}},{key:"findHighestZIndex",value:function(e){for(var t,i=99999,o=0;o<e.childNodes.length;o+=1){var a=e.childNodes[o];1===a.nodeType&&"SCRIPT"!==a.nodeName&&(t=document.defaultView.getComputedStyle(a,null).getPropertyValue("z-index")),t>i&&"auto"!==t&&(i=parseInt(t,10))}return i}},{key:"timeConverter",value:function(e){var t=new Date(1e3*e),i=new Date,o=new Date(Date.now()-864e5),a=t.getFullYear(),n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t.getMonth()],s=t.getDate(),r=t.getHours(),l=t.getMinutes();return t.setHours(0,0,0,0)===i.setHours(0,0,0,0)?"Today, ".concat(r,":").concat(l):t.setHours(0,0,0,0)===o.setHours(0,0,0,0)?"Yesterday, ".concat(r,":").concat(l):a===(new Date).getFullYear()?"".concat(s," ").concat(n,", ").concat(a):"".concat(s," ").concat(n," ").concat(a)}},{key:"createPreloaderView",value:function(e){var t=0,i=document.createElement("div");i.className="gmedia-preloader";var o=document.createElement("div");o.style.position="absolute",o.style.width="".concat(8,"px"),o.style.height="".concat(8,"px"),o.style.margin="".concat(-4,"px"),o.style.left="50%",o.style.top="50%",o.style.borderRadius="50%",o.style.backgroundColor=e,i.appendChild(o);var a=document.createElement("div");a.className="c-spinner",a.style.position="absolute",a.style.width="".concat(36,"px"),a.style.height="".concat(36,"px"),a.style.margin="".concat(-18,"px"),a.style.left="50%",a.style.top="50%";for(var n=0;n<8;n+=1){var s=document.createElement("div");s.style.position="absolute",s.style.top="50%",s.style.left="50%",s.style.marginTop="".concat(-4,"px"),s.style.marginLeft="".concat(-4,"px"),s.style.width="".concat(8,"px"),s.style.height="".concat(8,"px"),s.style.backgroundColor=e,s.style.borderRadius="100%",s.style.transform="rotate(".concat(t,"deg) translate(").concat(18,"px)"),t+=45,a.appendChild(s)}return i.appendChild(a),i}},{key:"trace",value:function(e){if(1!==arguments.length){for(var t="",i=0;i<arguments.length;i++){var o=arguments[i];t+="".concat(o," , ")}t=t.slice(0,-2),console.log(t)}else console.log(e)}},{key:"preventDefaultForScrollKeys",value:function(e){return!{37:1,38:1,39:1,40:1}[e.keyCode]||(e.preventDefault(),!1)}},{key:"preventDefault",value:function(e){(e=e||window.event).preventDefault&&e.preventDefault(),e.returnValue=!1}},{key:"disableBodyScroll",value:function(){document.getElementsByTagName("html")[0].classList.add("gmedia_PopUpActive")}},{key:"enableBodyScroll",value:function(){document.getElementsByTagName("html")[0].classList.remove("gmedia_PopUpActive")}},{key:"disableBodyScrollSlider",value:function(){if(window.addEventListener){var t=e.passiveListener,i=e.preventDefault;window.addEventListener("wheel",i,t),window.addEventListener("mousewheel",i,t),window.addEventListener("touchmove",i,t)}document.onkeydown=e.preventDefaultForScrollKeys}},{key:"enableBodyScrollSlider",value:function(){if(window.removeEventListener){var t=e.passiveListener,i=e.preventDefault;window.removeEventListener("wheel",i,t),window.removeEventListener("mousewheel",i,t),window.removeEventListener("touchmove",i,t)}document.onkeydown=null}},{key:"collapseElementsInElemt",value:function(e,t){for(var i=[],o=0;o<e.childNodes.length;o+=1){var a={},n=e.childNodes[o];1===n.nodeType&&"SCRIPT"!==n.nodeName&&n!==t&&(a.element=n,a.height=null,a.overflow=null,""!==n.style.height&&(a.height=n.style.height),""!==n.style.overflow&&(a.overflow=n.style.overflow),i.push(a),n.style.overflow="hidden",n.style.height="0")}return i}},{key:"recoverElements",value:function(e){if(0!==e.length)for(var t=0;t<e.length;t+=1){var i=e[t].element;i&&(e[t].overflow?i.style.overflow=e[t].overflow:i.style.removeProperty("overflow"),e[t].height?i.style.height=e[t].height:i.style.removeProperty("height"))}}},{key:"hexToRgbaStrin",value:function(e,t){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,i,o){return t+t+i+i+o+o}));var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return i?"rgba(".concat(parseInt(i[1],16),",").concat(parseInt(i[2],16),",").concat(parseInt(i[3],16),",").concat(t,")"):null}},{key:"getFrameForBoxWithMode",value:function(e,t,i){var o=e.width,a=e.height,n=t.width,s=t.height,r=1,l=1,c=1;i?(r=n/o,l=s/a,c=Math.max(r,l)):(r=n/o,l=s/a,c=(c=Math.min(r,l))>1?1:c);var d=Math.round(o*c),h=Math.round(a*c),m=Math.round((n-d)/2),u=Math.round((s-h)/2);return this.Rect(m,u,d,h)}},{key:"getItemFrameByIndexForBox",value:function(e,t,i,o,a,n){var s=1;n&&(s=n);var r=a=Math.min(t,a),l=Math.floor(t/a),c=(r=l>1?(t-(l-1)*i)/l:t)*s,d=Math.ceil((e+1)/l)-1,h=d*(c+o),m=(e-d*l)*(r+i);return this.Rect(m,h,r,c)}},{key:"fadeOut",value:function(e,t,i){i||(i=500);var o=Math.sqrt,a=(new Date).getTime();!function n(){var s=(new Date).getTime()-a,r=s/i;if(r<1){var l=1-o(r);e.style.opacity=String(l),setTimeout(n,Math.min(25,i-s))}else e.style.opacity="0",t&&t()}()}},{key:"ellipsizeTextBoxToLine",value:function(e,t){e.innerHTML=e.textContent||e.innerText||"";var i=e.innerHTML,o=e.innerHTML.split(" ");e.innerHTML=o[0].substring(0,3);var a=e.clientHeight*t;for(e.innerHTML=i;e.clientHeight>a;)o.pop(),e.innerHTML="".concat(o.join(" ")," ...")}},{key:"ellipsizeTextBox",value:function(e){e.innerHTML=e.textContent||e.innerText||"";for(var t=e.innerHTML.split(" ");e.scrollHeight>e.offsetHeight;)t.pop(),e.innerHTML="".concat(t.join(" ")," ...")}},{key:"scrollToY",value:function(e,t){var i,o=window.pageYOffset,a=Math.PI/(t/15),n=o/2,s=0,r=setInterval((function(){window.pageYOffset>e?(s+=1,i=n-n*Math.cos(s*a),window.scrollTo(0,o-i)):clearInterval(r)}),15)}},{key:"toggleFullScreen",value:function(e){var t=document.webkitIsFullScreen||document.mozFullScreen||!1;e.requestFullScreen=e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||function(){return!1},document.cancelFullScreen=document.cancelFullScreen||document.webkitCancelFullScreen||document.mozCancelFullScreen||function(){return!1},t?document.cancelFullScreen():e.requestFullScreen()}},{key:"CacheItemsList",value:function(){var e={};function t(o){!e.itemsList||e.cached===e.itemsList.length&&!e.amount||e.amount&&e.cached>=e.amount||(e.amount&&(e.amount=Math.min(e.amount,e.itemsList.length)),e.currentItem=e.itemsList[o].webView,e.lastIndex=o,e.currentItem.complete?(e.cached+=1,t(e.lastIndex+1>=e.itemsList.length?0:e.lastIndex+1)):e.currentItem.addEventListener("load",i,!1))}function i(){e.cached+=1,t(e.lastIndex+1>=e.itemsList.length?0:e.lastIndex+1)}return e.cached=0,e.itemsList=void 0,e.currentItem=void 0,e.amount=void 0,e.lastIndex=void 0,e.init=function(o,a,n){e.currentItem&&e.currentItem.removeEventListener("load",i,!1),e.amount=n,e.cached=0,e.currentItem=void 0,e.lastIndex=a,e.itemsList=o,void 0===a&&(a=0),t(a)},e.status=function(){return{list:e.itemsList,index:e.lastIndex}},e}},{key:"GMEventsManager",value:function(){return{listenerSet:{},addGMEventListener:function(e,t,i){this.listenerSet[e]||(this.listenerSet[e]=[]);var o={};o.listener=t,o.handler=i,this.listenerSet[e].push(o)},removeGMEventListener:function(e,t,i){if(this.listenerSet[e])for(var o=0;o<this.listenerSet[e].length;o+=1)this.listenerSet[e][o].listener===t&&this.listenerSet[e][o].handler===i&&(this.listenerSet[e].splice(o,1),o=this.listenerSet[e].length)},dispatchGMEvent:function(e){if(this.listenerSet[e.type])for(var t=this.listenerSet[e.type],i=0;i<t.length;i+=1){var o=t[i];o&&o.listener&&"function"==typeof o.listener[o.handler]&&o.listener[o.handler](e)}}}}},{key:"GMEvent",value:function(e,t,i){var o={};return o.type=e,o.params=i,o.target=t,o}},{key:"request",value:function(t,i,o,a){var n=new XMLHttpRequest;n.open("POST",this.moduleSettings(i.appName).appApi,!0),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.setRequestHeader("Access-Control-Allow-Headers","Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With"),n.onreadystatechange=function(){4===this.readyState&&(200!==this.status?o&&e.moduleSettings(i.appName).appEventManager.dispatchGMEvent(e.GMEvent(o,i,{error:this.statusText,params:a})):o&&e.moduleSettings(i.appName).appEventManager.dispatchGMEvent(e.GMEvent(o,i,{data:this.responseText,params:a})))},n.onerror=function(){!0===confirm("Failed to load resource: The network connection was lost. Let's try again?")&&e.request(t,i,o,a)};try{n.send(t),e.moduleSettings(i.appName).appEventManager.dispatchGMEvent(e.GMEvent("REQUEST_START",i,null))}catch(t){e.trace(t)}}},{key:"Item",value:function(t,i){var o={get webView(){return this.webImg.src?o.webImg:(this.webImg.src=this.itemViewSrc,this.webImg)}};if(e.copyProperties(t,o),o.appName=i,o.idPrefix=void 0,o.webImg=new Image,o.webImgFrame=e.Rect(0,0,0,0),o.webImg.addEventListener("load",(function(){this.classList.add("onLoad")}),!1),o.link&&""!==o.link){var a,n,s,r=o.link;r.match(/youtu\.be/i)||r.match(/youtube\.com/i)?(n=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/,(s=r.match(n))&&11===s[7].length&&(a=s[7]),void 0!==a&&(o.mime_type="video/youtube",o.videoId=a,o.link=void 0)):r.match(/vimeo\.com/i)&&(n=/(www\.)?vimeo.com\/(\d+)($|\/)/,(s=r.match(n))&&(a=s[2]),void 0!==a&&(o.mime_type="video/vimeo",o.videoId=a,o.link=void 0))}return"audio/mpeg"===o.mime_type&&(o.type="audio"),"image"===o.mime_type.split("/")[0]&&(o.type="image"),"video"===o.mime_type.split("/")[0]&&(o.type="video"),o.hasTag=function(e){if("all"===e)return!0;if(!o.tags||0===o.tags.length)return!1;for(var t=0;t<o.tags.length;t+=1){if(o.tags[t].term_id===e)return!0}return!1},o.itemViewSrc=o.meta?o.meta.web?o.meta.web.link:o.meta.original?o.meta.original.link:o.meta.thumb?o.meta.thumb.link:null:null,o.itemViewThumbSrc=o.meta?o.meta.thumb?o.meta.thumb.link:o.meta.web?o.meta.web.link:null:null,o.itemViewSize=o.meta?o.meta.web?e.Size(o.meta.web.width,o.meta.web.height):o.meta.original?e.Size(o.meta.original.width,o.meta.original.height):e.Size(300,300):e.Size(300,300),o.itemViewThumbSize=o.meta?o.meta.thumb?e.Size(o.meta.thumb.width,o.meta.thumb.height):o.meta.web?e.Size(o.meta.web.width,o.meta.web.height):e.Size(300,300):e.Size(300,300),o}},{key:"Term",value:function(t,i){var o={set gmedia__in(e){this.query_Pr&&(this.query_Pr.gmedia__in=e.toString(),this.gmedia_in_Pr=e,this.count=e.length,"myCollection"===this.taxonomy&&this.query_Pr&&(this.sharelink="".concat(self.moduleSettings(i).post_url,"/?").concat(self.moduleSettings(i).galleryID,"[gmedia__in]=").concat(this.query_Pr.gmedia__in)))},get gmedia__in(){return this.gmedia_in_Pr},get taxony_type(){var e;switch(this.taxonomy){case"gmedia_album":e="albums";break;case"gmedia_category":e="categories";break;case"gmedia_tag":e="tags";break;case"myCollection":e="gmedia__in";break;default:e=null}return e},get term_id(){return"myCollection"===this.taxonomy?"".concat(this.taxony_type,"-").concat(this.gmedia__in.toString()):this.term_id_Pr},set term_id(e){this.term_id_Pr=e},get query(){var e,t;if("myCollection"===this.taxonomy)return t={orderby:"gmedia__in",order:"ASC",gmedia__in:this.gmedia_in_Pr.toString()};switch(this.taxonomy){case"gmedia_album":e="album__in";break;case"gmedia_category":e="category__in";break;case"gmedia_tag":e="tag__in"}return(t={per_page:0,admin:!1,page:1})[e]=[this.term_id],t}};if(e.copyProperties(t,o),t.term_id&&(o.term_id_Pr=t.term_id),o.appName=i,o.key=void 0,o.gmedia_in_Pr=[],o.meta){var a=e.Meta(o.meta,o.appName);o.meta=a}return"gmedia_tag"===o.taxonomy&&(o.name="#".concat(o.name)),"myCollection"===o.taxonomy&&o.query_Pr&&(o.gmedia__in=o.query_Pr.gmedia__in.split(",")),o}},{key:"termDataByQueryNameId",value:function(e,t,i){if(!e.gmedia__in)return null;var o=e.gmedia__in.split(",").length,a=e.orderby,n=e.order;return{count:o,name:t,meta:{_order:n,_orderby:a,order:n,orderby:a},taxonomy:"myCollection",term_id:i,_query:e}}},{key:"termsListFromAppQuery",value:function(e){var t,i=[];if(e.album__in){var o=e.album__in.split(",");for(t in o)Object.prototype.hasOwnProperty.call(o,t)&&i.push({taxonomy_type:"albums",term_id:o[t]})}if(e.category__in){var a=e.category__in.split(",");for(t in a)Object.prototype.hasOwnProperty.call(a,t)&&i.push({taxonomy_type:"categories",term_id:a[t]})}if(e.tag__in){var n=e.tag__in.split(",");for(t in n)Object.prototype.hasOwnProperty.call(n,t)&&i.push({taxonomy_type:"tags",term_id:n[t]})}return i.length>0?i:void 0}},{key:"Meta",value:function(t,i){var o={};return e.copyProperties(t,o),o.appName=i,o._cover&&(o._cover=e.Item(t._cover,o.appName)),o.cover=o._cover?o._cover:null,o}},{key:"passiveListener",get:function(){var e=!1;try{var t={get:function(){e=!0}},i=Object.defineProperty({},"passive",t);window.addEventListener("testPassive",null,i),window.removeEventListener("testPassive",null,i)}catch(e){}return!!e&&{passive:!1,capture:!1}}},{key:"Device",get:function(){var e=window,t=e.navigator.userAgent,i={ios:!1,android:!1,androidChrome:!1,desktop:!1,windows:!1,iphone:!1,ipod:!1,ipad:!1,cordova:e.cordova||e.phonegap,phonegap:e.cordova||e.phonegap,browser:{ie11:!1}},o=t.match(/(Windows Phone);?[\s\/]+([\d.]+)?/),a=t.match(/(Android);?[\s\/]+([\d.]+)?/),n=t.match(/(iPad).*OS\s([\d_]+)/),s=t.match(/(iPod)(.*OS\s([\d_]+))?/),r=!n&&t.match(/(iPhone\sOS|iOS)\s([\d_]+)/);if(o&&(i.os="windows",i.osVersion=o[2],i.windows=!0),a&&!o&&(i.os="android",i.osVersion=a[2],i.android=!0,i.androidChrome=t.toLowerCase().indexOf("chrome")>=0),(n||r||s)&&(i.os="ios",i.ios=!0),r&&!s&&(i.osVersion=r[2].replace(/_/g,"."),i.iphone=!0),n&&(i.osVersion=n[2].replace(/_/g,"."),i.ipad=!0),s&&(i.osVersion=s[3]?s[3].replace(/_/g,"."):null,i.iphone=!0),i.ios&&i.osVersion&&t.indexOf("Version/")>=0&&"10"===i.osVersion.split(".")[0]&&(i.osVersion=t.toLowerCase().split("version/")[1].split(" ")[0]),i.desktop=!(i.os||i.android||i.webView),i.webView=(r||n||s)&&t.match(/.*AppleWebKit(?!.*Safari)/i),i.os&&"ios"===i.os){var l=i.osVersion.split("."),c=document.querySelector('meta[name="viewport"]');i.minimalUi=!i.webView&&(s||r)&&(1*l[0]==7?1*l[1]>=1:1*l[0]>7)&&c&&c.getAttribute("content").indexOf("minimal-ui")>=0}return i.pixelRatio=e.devicePixelRatio||1,window.navigator.userAgent.indexOf("Trident/7.0")>-1&&(i.browser.ie11=!0),i}},{key:"isTouchDevice",get:function(){return navigator.maxTouchPoints||"ontouchstart"in window}},{key:"getScrollbarWidth",get:function(){var e=document.createElement("div");e.style.visibility="hidden",e.style.width="100px",e.style.msOverflowStyle="scrollbar",document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var i=document.createElement("div");i.style.width="100%",e.appendChild(i);var o=i.offsetWidth;return e.parentNode.removeChild(e),t-o}},{key:"hasScrollbar",get:function(){if("number"==typeof window.innerWidth)return window.innerWidth>document.documentElement.clientWidth;var e,t,i=document.documentElement||document.body;void 0!==i.currentStyle&&(e=i.currentStyle.overflow),e=e||window.getComputedStyle(i,"").overflow,void 0!==i.currentStyle&&(t=i.currentStyle.overflowY),t=t||window.getComputedStyle(i,"").overflowY;var o=i.scrollHeight>i.clientHeight,a=/^(visible|auto)$/.test(e)||/^(visible|auto)$/.test(t);return o&&a||("scroll"===e||"scroll"===t)}},{key:"miniScreen",get:function(){return window.screen.height<500||window.screen.width<500}},{key:"youTubeCode",get:function(){return'<iframe src="https://www.youtube.com/embed/%id%?autoplay=1&rel=0&showinfo=0&wmode=transparent" allow="autoplay" frameborder="0" allowfullscreen></iframe>'}},{key:"vimeoCode",get:function(){return'<iframe src="https://player.vimeo.com/video/%id%?autoplay=1&byline=0&portrait=0&transparent=0" frameborder=“0” allowfullscreen allow=autoplay></iframe>'}},{key:"isFullscreen",get:function(){return document.webkitIsFullScreen||document.mozFullScreen||!1}}]),e}();i(7);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t,i){return t&&r(e.prototype,t),i&&r(e,i),e}var c=function(){function e(t){s(this,e),this.delegate=t,this.item=void 0,this.id=void 0,this.appName=t.appName,this.itemIndex=void 0,this.iconSet=t.iconSet,this.positionIndex=0,this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.itemInner=document.createElement("div"),this.itemInner.className="".concat(e.classPref,"inner"),this.view.appendChild(this.itemInner),this.iconHolder=document.createElement("div"),this.iconHolder.className="".concat(e.classPref,"icon-holder"),this.preloader=n.createPreloaderView(this.delegate.params.preloaderColor),this.preloader.style.display="none",this.view.appendChild(this.preloader),this.view.appendChild(this.iconHolder),this.size=n.Size(0,0),this.imgSize=n.Size(0,0),this.imageFramePr=n.Rect(0,0,0,0),this.imageFrameFF=n.Rect(0,0,0,0),this.imageScaledFF=!1,this.width=0,this.height=0,this.maxXoffset=0,this.maxYoffset=0,this.MaxScale=4,this.imgScale=1,this.imgScaleFF=1,this.scale=1,this.newScale=1,this.newScaleMW=1,this.viewTranslatePr=n.Point(0,0),this.origin=n.Point(0,0),this.boundingBox=void 0,this.boundingBoxScale=void 0,this.animaSliderRender=void 0,this.speedX=0,this.speedY=0,this.oldX=0,this.newX=0,this.oldY=0,this.newY=0,this.draging=!1,this.isBlockDraging=!1,this.isBlockDragingMem=!1,this.startScale=void 0,this.startGlobalPoint=void 0,this.startDistForZoom=void 0}return l(e,null,[{key:"classPref",get:function(){return"gmedia-slider-page-"}}]),l(e,[{key:"initByItem",value:function(e){if(this.id!==e.ID){var t=this;switch(this.item=e,this.id=e.ID,1!==this.scale&&(this.scale=1,this.viewTranslate=n.Point(0,0)),this.itemInner.firstChild&&this.itemInner.removeChild(this.itemInner.firstChild),this.itemInner.appendChild(e.webView),this.itemImg=e.webView,e.webView.complete?(this.imgSize.width=this.itemImg.naturalWidth,this.imgSize.height=this.itemImg.naturalHeight,this.isInScale&&this.normalize(),this.fit(!1)):(this.preloader.style.display="block",e.webView.addEventListener("load",(function(){t.preloader.style.display="none",t.imgSize.width=this.naturalWidth,t.imgSize.height=this.naturalHeight,t.isInScale&&t.normalize(),t.fit(!1)}),!1)),e.type){case"audio":this.iconHolder.innerHTML=this.iconSet.NOTE_SVG,this.view.classList.add("info-icon");break;case"video":this.view.classList.add("info-icon"),this.iconHolder.innerHTML=this.iconSet.PLAY_SVG,this.iconHolder.firstChild.style.marginLeft="7px";break;default:this.view.classList.remove("info-icon")}}}},{key:"resize",value:function(e){this.size=e,this.posX=this.positionIndex,this.isInScale&&this.normalize(),this.fit(!0)}},{key:"fit",value:function(){if(this.itemImg){var e=this.delegate.params.xOffset,t=0,i=n.getFrameForBoxWithMode(this.imgSize,n.Size(this.size.width-2*e,this.size.height-2*t),!1,!1);i.x+=e,i.y+=t,this.imageFrameFF=i,t=this.delegate.params.yOffset,(i=n.getFrameForBoxWithMode(this.imgSize,n.Size(this.size.width-2*e,this.size.height-2*t),!1,!1)).x+=e,i.y+=t,this.imageFrameNF=i,this.imgScale=Math.min(this.imgSize.width/i.width,this.MaxScale),this.imgScaleFF=this.imageFrameFF.height/i.height,"video"!==this.item.type&&(this.delegate.FF_Mode?(this.imageFrame=this.imageFrameFF,i=this.imageFrameFF,this.imageScaledFF=!0):(this.imageFrame=this.imageFrameNF,i=this.imageFrameNF,this.imageScaledFF=!1)),this.item.webImgFrame.x!==i.x||this.item.webImgFrame.y!==i.y||this.item.webImgFrame.width!==i.width||this.item.webImgFrame.height!==i.height?(this.imageFrame=i,this.item.webImgFrame=i):this.imageFramePr=i,this.videoWrap&&(this.videoWrapFrame=i)}}},{key:"checkOffset",value:function(e,t){var i=this.imageScaledFF?this.imageFrameFF:this.imageFrame;if(t!==this.boundingBoxScale){var o=i.width*(t||1),a=i.height*(t||1),s=i.x*(t||1),r=i.y*(t||1);this.boundingBox={left:o>this.size.width?-s:(this.size.width-this.size.width*t)/2,top:a>this.size.height?-r:(this.size.height-this.size.height*t)/2,right:o>this.size.width?this.size.width-(s+o):(this.size.width-this.size.width*t)/2,bottom:a>this.size.height?this.size.height-(r+a):(this.size.height-this.size.height*t)/2},this.boundingBoxScale=t}var l=e.x>this.boundingBox.left?this.boundingBox.left:e.x;l=l<this.boundingBox.right?this.boundingBox.right:l;var c=e.y>this.boundingBox.top?this.boundingBox.top:e.y;return c=c<this.boundingBox.bottom?this.boundingBox.bottom:c,n.Point(l,c)}},{key:"isPointInItem",value:function(e){var t=this.viewTranslate.x+this.size.width/2*this.newScale-this.imageFrame.width/2*this.newScale,i=t+this.imageFrame.width*this.newScale,o=this.size.height/2*this.newScale+this.viewTranslate.y-this.imageFrame.height/2*this.newScale*this.newScale,a=o+this.imageFrame.height*this.scale*this.newScale;return e.x>t&&e.x<i&&e.y>o&&e.y<a}},{key:"normalize",value:function(e){n.cancelAnimationFrame(this.animaSliderRender),e?this.renderTransformTo(n.Point(0,0),1):(this.scale=1,this.newScale=1,this.newScaleMW=1,this.viewTranslate=n.Point(0,0),this.origin=n.Point(0,0))}},{key:"zoomIn",value:function(e,t){if("audio"!==this.item.type&&"video"!==this.item.type){n.cancelAnimationFrame(this.animaSliderRender);var i=t.x-this.viewTranslate.x,o=t.y-this.viewTranslate.y,a=i/this.scale,s=o/this.scale,r=t.x-a*e,l=t.y-s*e,c=n.Point(r,l);this.renderTransformTo(this.checkOffset(c,e),e)}}},{key:"zoomByScaleIter",value:function(e,t){if("audio"!==this.item.type&&"video"!==this.item.type){var i=e<0?1.065:.935;n.cancelAnimationFrame(this.animaSliderRender),this.newScale*i>this.MaxScale&&(i=this.MaxScale/this.newScale),this.newScale*i<1&&(i=1/this.newScale),this.newScale*=i,this.origin=n.Point(t.x-i*(t.x-this.origin.x),t.y-i*(t.y-this.origin.y)),this.renderTransformTo(this.checkOffset(this.origin,this.newScale),this.newScale)}}},{key:"zoomByScaleDeltaToPoint",value:function(e,t){if("audio"!==this.item.type&&"video"!==this.item.type){var i;n.cancelAnimationFrame(this.animaSliderRender);var o=e/this.startDistForZoom,a=0;(i=this.startDistForZoom/this.startScale*o/(this.startDistForZoom/this.startScale)*this.startScale)>this.MaxScale&&(a=.8*-(i-this.MaxScale)),i+=a;var s=this.startGlobalPoint.x-this.startTranslate.x,r=this.startGlobalPoint.y-this.startTranslate.y,l=s/this.newScale,c=r/this.newScale,d=this.startGlobalPoint.x-l*i,h=this.startGlobalPoint.y-c*i,m=n.Point(d-t.x,h-t.y);this.scale=i,this.newScale=i,this.viewTranslate=m,this.startTranslate=n.Point(d,h)}}},{key:"renderTransformTo",value:function(e,t){var i=this;n.cancelAnimationFrame(i.animaSliderRender),this.origin=e,this.newScale=t;var o=0,a=0,s=0,r=.05,l=.1;i.animaSliderRender=n.requestAnimationFrame((function c(){o=o*r+(e.x-i.viewTranslate.x)*l,a=a*r+(e.y-i.viewTranslate.y)*l,t&&(s=s*r+.1*(t-i.scale));var d=i.viewTranslate.x;d+=o;var h=i.viewTranslate.y;h+=a,t&&(i.scale+=s),i.viewTranslate=n.Point(d,h),Math.abs(o)<.02&&Math.abs(a)<.02&&Math.abs(s)<.02?(n.cancelAnimationFrame(i.animaSliderRender),t&&(i.scale=t),i.viewTranslate=n.Point(e.x,e.y)):i.animaSliderRender=n.requestAnimationFrame(c)}))}},{key:"renderGlidingTransform",value:function(){var e=this;n.cancelAnimationFrame(e.animaSliderRender);var t=.95,i=.95;e.animaSliderRender=n.requestAnimationFrame((function o(){e.speedX*=t,e.speedY*=i;var a=e.viewTranslate.x;a+=e.speedX;var s=e.viewTranslate.y;if(s+=e.speedY,a>e.boundingBox.left||a<e.boundingBox.right){e.speedX*=-1;var r=a<e.boundingBox.right?e.boundingBox.right:a;a=a>e.boundingBox.left?e.boundingBox.left:r,a+=e.speedX,t=.75}if(s>e.boundingBox.top||s<e.boundingBox.bottom){e.speedY*=-1;var l=s<e.boundingBox.bottom?e.boundingBox.bottom:s;s=s>e.boundingBox.top?e.boundingBox.top:l,s+=e.speedY,i=.75}e.origin=n.Point(a,s),e.viewTranslate=n.Point(a,s),Math.abs(e.speedX)<.02&&Math.abs(e.speedY)<.02?(n.cancelAnimationFrame(e.animaSliderRender),e.speedX=0,e.speedY=0):e.animaSliderRender=n.requestAnimationFrame(o)}))}},{key:"renderStretchstretchTransform",value:function(){var e=this;n.cancelAnimationFrame(e.animaSliderRender);var t=this.checkOffset(n.Point(e.viewTranslate.x+e.speedX,e.viewTranslate.y+e.speedY),e.scale),i=.2,o=.15,a=0,s=0;e.animaSliderRender=n.requestAnimationFrame((function r(){a=a*i+(t.x-e.viewTranslate.x)*o,s=s*i+(t.y-e.viewTranslate.y)*o;var l=e.viewTranslate.x+a,c=e.viewTranslate.y+s;e.viewTranslate=n.Point(l,c),Math.abs(a)<.02&&Math.abs(s)<.02?(n.cancelAnimationFrame(e.animaSliderRender),e.viewTranslate=t):e.animaSliderRender=n.requestAnimationFrame(r)}))}},{key:"startDrag",value:function(e,t){n.cancelAnimationFrame(this.animaSliderRender),"audio"!==this.item.type&&"video"!==this.item.type&&(this.startDistForZoom=t,this.startGlobalPoint=e,this.startTranslate=this.viewTranslate,this.speedX=0,this.speedY=0,this.newX=this.viewTranslate.x,this.newY=this.viewTranslate.y,this.startScale=this.scale)}},{key:"stopDrag",value:function(){if("audio"!==this.item.type&&"video"!==this.item.type){if(this.isInScale)if(this.scale<1)this.normalize(!0);else if(this.scale>this.MaxScale)this.zoomIn(this.MaxScale,this.startGlobalPoint);else{var e=this.checkOffset(this.origin,this.newScale);this.isBlockDraging=e.x!==this.origin.x||e.y!==this.origin.y,this.isBlockDraging&&this.renderStretchstretchTransform()}this.draging&&(this.isBlockDraging?this.renderStretchstretchTransform():this.renderGlidingTransform(),this.draging=!1)}}},{key:"dragin",value:function(e){if("audio"===this.item.type||"video"===this.item.type)return!1;var t=this.startTranslate.x-e.x,i=this.startTranslate.y-e.y,o=this.checkOffset(n.Point(t,i),this.newScale);this.isBlockDraging=o.x!==t||o.y!==i,t-=.7*(t-o.x),i-=.7*(i-o.y);return this.oldX=this.newX,this.newX=t,this.speedX=.7*(this.newX-this.oldX),this.oldY=this.newY,this.newY=i,this.speedY=.7*(this.newY-this.oldY),this.origin=n.Point(t,i),this.viewTranslate=n.Point(t,i),this.draging=!0,!0}},{key:"action",value:function(e){if(this.item)switch(e){case"click":if("video"===this.item.type)return this.videoWrap?(this.removeVideoContent(),"videoStop"):(this.view.classList.add("video-play"),this.view.classList.remove("info-icon"),this.addVideoContent(),"videoPlay");if("audio"===this.item.type)return this.tryPlayOrPauseMp3(),"audioPlay";break;case"removeSubContent":if("video"===this.item.type)return this.removeVideoContent(),"videoStop";"audio"===this.item.type&&this.audioPlayer&&!this.audioPlayer.paused&&(this.audioPlayer.pause(),this.iconHolder.firstChild.classList.remove("gmWrapRotate"));break;default:return}}},{key:"addVideoContent",value:function(){var e=this.item.mime_type.split("/")[1];if(e)switch(this.videoWrap||(this.videoWrap=document.createElement("div"),this.videoWrap.className="video-wrap",this.videoWrapFrame=this.imageFrame,this.itemInner.appendChild(this.videoWrap)),e){case"youtube":this.videoWrap.innerHTML=n.youTubeCode.replace("%id%",this.item.videoId);break;case"vimeo":this.videoWrap.innerHTML=n.vimeoCode.replace("%id%",this.item.videoId)}}},{key:"removeVideoContent",value:function(){this.videoWrap&&(this.view.classList.remove("video-play"),this.videoWrap.parentNode&&this.videoWrap.parentNode.removeChild(this.videoWrap),this.videoWrap=void 0,this.view.classList.remove("video-play"),"image"!==this.item.type&&this.view.classList.add("info-icon"))}},{key:"tryPlayOrPauseMp3",value:function(){if("audio"===this.item.type){if(!this.audioPlayer){if(!document.getElementById("gmAudioPlayer"))return;this.audioPlayer=document.getElementById("gmAudioPlayer")}this.audioPlayer.src===this.item.url?this.audioPlayer.paused?(this.audioPlayer.play(),this.iconHolder.firstChild.classList.add("gmWrapRotate")):(this.audioPlayer.pause(),this.iconHolder.firstChild.classList.remove("gmWrapRotate")):(this.audioPlayer.src=this.item.url,this.audioPlayer.play(),this.iconHolder.firstChild.classList.add("gmWrapRotate"))}}},{key:"posX",set:function(e){this.view.style.left="".concat(this.size.width*e,"px"),this.positionIndex=e}},{key:"imageFrame",set:function(e){this.itemImg.style.left="".concat(e.x,"px"),this.itemImg.style.top="".concat(e.y,"px"),this.itemImg.style.width="".concat(e.width,"px"),this.itemImg.style.height="".concat(e.height,"px"),this.imageFramePr=e},get:function(){return this.imageFramePr}},{key:"videoWrapFrame",set:function(e){this.videoWrap.style.width="".concat(e.width,"px"),this.videoWrap.style.height="".concat(e.height,"px"),this.videoWrap.style.left="".concat(e.x,"px"),this.videoWrap.style.top="".concat(e.y,"px")}},{key:"isInScale",get:function(){return 1!==this.newScale||0!==this.origin.x||0!==this.origin.y}},{key:"viewTranslate",set:function(e){this.viewTranslatePr=e,this.itemInner.style.transform="matrix(".concat(this.scale,", 0, 0, \n ").concat(this.scale,", ").concat(e.x,", ").concat(e.y,")")},get:function(){return this.viewTranslatePr}},{key:"isSubContentActiv",get:function(){return!!this.videoWrap}}]),e}(),d=function(){function e(t,i){s(this,e),this.delegate=t,this.iconSet=e.ICONS,this.params=e.CONFIG,n.copyProperties(i,this.params),this.appName=this.delegate.appName,this.cacherItemsList=n.moduleSettings(this.appName).cacheItemsList,this.id="".concat(this.appName,"_vitSlider_"),this.itemsList=void 0,this.visibleBounds=n.Rect(0,0,0,0),this.isControllsShow=!1,this.isZooming=!1,this.needHideControlls=!1,this.naviButtonsStatus=void 0,this.firsrTap=void 0,this.removing=!1,this.createlayoutDelay=void 0,this.intitByTermDelay=void 0,this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.view.id="".concat(this.id,"main"),this.resizeDelay=void 0,this.size=n.Size(0,0);var o=document.createElement("div");o.className="".concat(e.classPref,"bg"),this.background=o,this.background.style.backgroundColor=this.params.backgroundColor,this.view.appendChild(o),this.sliderPages=[],this.dragging=!1,this.zoomingDrag=!1,this.speedX=0,this.speedY=0,this.scrollViewTranslateXPr=0,this.scrollViewTranslateYPr=0,this.startDragHandler=void 0,this.currentItemIndex=void 0,this.startItemIndex=0,this.items=[],this.itemsAmount=0,this.itemNumPr=void 0,this.pageInFocus=void 0,this.pageInFocusPrev=void 0,this.zoomingPage=void 0,this.FF_Mode=!1,this.mouseWheelMode=!1,this.animaSliderRender=void 0,this.slider=document.createElement("div"),this.slider.className="".concat(e.classPref,"wrap"),this.view.appendChild(this.slider)}return l(e,null,[{key:"classPref",get:function(){return"gmedia-slider-"}},{key:"ICONS",get:function(){return{PLAY_SVG:'<svg version="1.1" viewBox="0 0 50 60" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M48.479,27.435L5.672,0.915C2.553-1.132,0,0.374,0,4.261v51.48c0,3.885,2.553,5.391,5.672,3.346l42.807-26.52 c0,0,1.521-1.07,1.521-2.566S48.479,27.435,48.479,27.435z"/></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></svg>',NOTE_SVG:'<svg version="1.1" viewBox="0 0 58 94" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M37.992,0h-8.021v65.358c-4.435-1.706-10.174-1.73-15.835,0.328C3.994,69.377-2.049,78.355,0.638,85.736 c2.688,7.383,13.088,10.374,23.229,6.683c8.614-3.134,14.249-10.082,14.111-16.626l0.014-53.451 c13.986,2.204,14.943,19.884,13.268,24.842c-0.636,1.879,0.484,3.286,2.598,0C68.938,23.726,37.992,13.376,37.992,0z"/></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></svg>',NEXT_ARR:'<svg height="512px" id="Layer_1" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><polygon points="160,115.4 180.7,96 352,256 180.7,416 160,396.7 310.5,256 "/></svg>',PREV_ARR:'<svg height="512px" id="Layer_1" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><polygon points="352,115.4 331.3,96 160,256 331.3,416 352,396.7 201.5,256 "/></svg>'}}},{key:"EVENTS",get:function(){return{COLLECTION_DATA_REDY:"COLLECTION_DATA_REDY",UPDATE_CONTROLS:"UPDATE_CONTROLS",ZOOM:"ZOOM",REMOVE_LIGHTBOX:"REMOVE_LIGHTBOX"}}},{key:"CONFIG",get:function(){return{preloaderColor:"#494949",backgroundColor:"rgba(0,0,0,1)",navigationIconColor:"rgba(255,255,255,1)",navigationColor:"rgba(0,0,0,0.8)",zoom:!0,mouseWheel:!0,fit:!1,xOffset:2,yOffset:0,canRemoved:!1,trLin:"bit",tv:void 0,copyR_Alert:"Hello, this photo is mine!"}}}]),l(e,[{key:"copyRight",value:function(){var t,i=this;return function(o){if(!n.Device.ios||"mouseup"!==o.type){var a,s;o.changedTouches&&o.changedTouches[0]?(a=o.changedTouches[0].pageX,s=o.changedTouches[0].pageY):(a=o.pageX,s=o.pageY),a-=i.viewOfsetX,s-=i.viewOfsetY;var r=i.itemsList[i.itemIndex];if(r.webView&&r.webView===o.target){o.preventDefault();var l=document.getElementById("gm_copyr");l&&(clearTimeout(t),l.parentNode.removeChild(l),l=null),(l=document.createElement("div")).id="gm_copyr",l.className="".concat(e.classPref,"hints"),l.innerHTML=r.user&&r.user.displayname?"Hey, this photo is &#169;".concat(r.user.displayname):i.params.copyR_Alert,l.style.top="".concat(s,"px"),l.style.left="".concat(a,"px"),i.view.appendChild(l),t=setTimeout((function(){l.parentNode.removeChild(l)}),1e3)}}}}},{key:"initByStage",value:function(e){e.appendChild(this.view),this.copyR=this.copyRight(),document.addEventListener("contextmenu",this.copyR,!1),this.createControlls()}},{key:"addToStage",value:function(){var t=this,i=document.getElementsByTagName("body")[0];this.view.style.zIndex=n.findHighestZIndex(i)+1,n.disableBodyScrollSlider(),document.addEventListener("contextmenu",t.copyR,!1),i.appendChild(this.view),setTimeout((function(){t.view.classList.add("".concat(e.classPref,"activate"))}),30)}},{key:"intitByTerm",value:function(t,i){i&&(this.startItemId=i),this.term=t;var o=this;n.moduleSettings(o.appName).appEventManager.addGMEventListener(e.EVENTS.COLLECTION_DATA_REDY,o,"dataLoaded"),this.intitByTermDelay=setTimeout((function(){o.showPreloader(!0),n.request(JSON.stringify({library:t.query}),o,e.EVENTS.COLLECTION_DATA_REDY)}),300)}},{key:"dataLoaded",value:function(e){var t=e.params.data;if(t){try{var i=JSON.parse(t);i.data&&this.addItemsToCollection(i.data)}catch(e){n.trace(e)}this.showPreloader(!1)}}},{key:"addItemsToCollection",value:function(e){for(var t=[],i=0,o=0;o<e.length;o+=1){var a=n.Item(e[o],this.appName);this.startItemId&&a.ID===this.startItemId&&(i=o),t.push(a)}this.term.itemsList=t,this.initByList(this.term.itemsList,i)}},{key:"initByList",value:function(e,t){if(e&&e.length>0){var i=this;this.currentItemIndex=t&&0!==t?0:void 0,this.startItemIndex=t||0,this.itemsList=e,this.createlayoutDelay=setTimeout((function(){i.createLayout()}),100)}}},{key:"prepareToRemove",value:function(){if(!this.removing){clearTimeout(this.createlayoutDelay),clearTimeout(this.intitByTermDelay);var t=this.scrollViewTranslateY/(this.size.height/2);if(this.pageInFocus&&this.pageInFocus.isSubContentActiv&&t<.2)"videoStop"===this.pageInFocus.action("click")&&(this.switchShowControlls(),this.needHideControlls=!this.isControllsShow);else{if(this.removing=!0,this.cacherItemsList.init(),n.moduleSettings(this.appName).appEventManager.removeGMEventListener(e.EVENTS.COLLECTION_DATA_REDY,this,"dataLoaded"),this.view.removeEventListener("wheel",this.handlerMWheel,!1),document.removeEventListener("contextmenu",this.copyR,!1),document.getElementById("gmAudioPlayer"))document.getElementById("gmAudioPlayer").pause();n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.REMOVE_LIGHTBOX,this,{}))}}}},{key:"remoteControl",value:function(t){if(this.startDragHandler||"esc"===t)switch(t){case"prev":n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{draging:!0})),this.gotoPrev();break;case"next":n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{draging:!0})),this.gotoNext();break;case"space":this.switchShowControlls(),this.needHideControlls=!this.isControllsShow;break;case"esc":this.prepareToRemove();break;case"zoom":this.zoomSwitch()}}},{key:"showPreloader",value:function(e){var t;if(e){if(document.getElementById("".concat(this.appName,"slider_preloader")))return;(t=n.createPreloaderView(this.params.preloaderColor)).id="".concat(this.appName,"slider_preloader"),this.view.appendChild(t)}else(t=document.getElementById("".concat(this.appName,"slider_preloader")))&&n.fadeOut(t,(function(){t&&t.parentNode&&t.parentNode.removeChild(t)}),500)}},{key:"createLayout",value:function(){var t=this;this.itemsAmount=this.itemsList.length,this.size=n.Size(t.view.clientWidth,t.view.clientHeight),n.miniScreen&&this.slider.classList.add("miniScreen"),t.size.width<500&&(this.prevButton.classList.add("next-prev-button-mini-screen"),this.nextButton.classList.add("next-prev-button-mini-screen")),this.initSlider(),t.size.height<700&&this.slider.classList.add("miniScreen"),this.params.mouseWheel&&this.view.addEventListener("wheel",t.mouseWheelHandler(),!1),setTimeout((function(){t.showControlls(!0),n.moduleSettings(t.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.UPDATE_CONTROLS,t,{status:"ready"}))}),500)}},{key:"initSlider",value:function(){var e,t=0;if(0===this.sliderPages.length)for(t=0;t<3;t+=1)e=new c(this),this.slider.appendChild(e.view),this.sliderPages.push(e),e.resize(this.size);var i=this.itemsAmount>2?-1:0;for(t=0;t<3;t+=1)(e=this.sliderPages[t]).posX=i,e.itemIndex=void 0,i+=1;this.startDragHandler?this.gotoPageByNum(0):(this.startDragHandler=this.startDrag(),n.isTouchDevice&&(this.slider.addEventListener("touchstart",this.startDragHandler,n.passiveListener),window.addEventListener("touchmove",(function(){}),n.passiveListener)),this.slider.addEventListener("mousedown",this.startDragHandler,!1),this.gotoPageByNum(this.startItemIndex))}},{key:"sliderVerticalRender",value:function(){var e=1-Math.abs(this.scrollViewTranslateY)/(this.size.height/2);this.background.style.opacity=e,this.needHideControlls||(e<.8?this.showControlls(!1):this.showControlls(!0))}},{key:"tryOpenItemID",value:function(e){for(var t=0;t<this.itemsList.length;t+=1){if(this.itemsList[t].ID===e)return this.gotoPageByNum(t),!0}return!1}},{key:"gotoPageByNum",value:function(e){if((this.itemIndex||0===this.itemIndex)&&this.currentItemIndex){var t=this.itemIndex-e;this.gotoPageByIndex(this.currentItemIndex-t)}else this.gotoPageByIndex(e,!0)}},{key:"gotoNext",value:function(){this.gotoPageByIndex(this.currentItemIndex+1)}},{key:"gotoPrev",value:function(){this.gotoPageByIndex(this.currentItemIndex-1)}},{key:"renderTransformTo",value:function(e){var t=this;n.cancelAnimationFrame(t.animaSliderRender);var i=5*t.speedX,o=5*t.speedY,a=.2,s=.15;t.animaSliderRender=n.requestAnimationFrame((function r(){i=i*a+(e.x-t.scrollViewTranslateX)*s,o=o*a+(e.y-t.scrollViewTranslateY)*s,t.scrollViewTranslateX+=i,t.scrollViewTranslateY+=o,Math.abs(i)<1&&Math.abs(o)<1&&(t.dragging=!1),Math.abs(i)<.1&&Math.abs(o)<.1?(n.cancelAnimationFrame(t.animaSliderRender),t.scrollViewTranslateX=e.x,t.scrollViewTranslateY=e.y,t.sliderTransitionComplete({target:t.slider})):t.animaSliderRender=n.requestAnimationFrame(r)}))}},{key:"gotoPageByIndex",value:function(e,t){this.itemsAmount<3&&(e=Math.max(0,e),e=Math.min(this.itemsAmount-1,e)),Math.abs(this.currentItemIndex-e)>2&&(t=!0);var i=-e*this.size.width;t?(this.scrollViewTranslateX=i,this.sliderTransitionComplete({target:this.slider})):this.renderTransformTo(n.Point(i,this.scrollViewTranslateY))}},{key:"pageRenderByIndex",value:function(e){if(this.currentItemIndex!==e){void 0!==this.pageInFocus&&(this.pageInFocusPrev=this.pageInFocus,this.pageInFocus.isInScale&&(this.zoomingPage=this.pageInFocus));var t=0;if(this.itemsAmount<3){for(t=0;t<this.itemsAmount;t+=1)this.sliderPages[t].initByItem(this.itemsList[t]);return this.pageInFocus=this.sliderPages[e],this.currentItemIndex=e,void(this.itemIndex=e)}var i=(e+1)%3;i<0&&(i+=3);var o=i-1>=0?i-1:2,a=i+1<3?i+1:0,n=[o,i,a],s=[e-1,e,e+1];for(t=0;t<n.length;t+=1){this.sliderPages[n[t]].posX=s[t]}this.currentItemIndex=e,this.pageInFocus=this.sliderPages[i],this.itemIndex=e<0?this.itemsAmount+(e%this.itemsAmount==0?-this.itemsAmount:e%this.itemsAmount):e%this.itemsAmount,this.sliderPages[i].initByItem(this.itemsList[this.itemIndex]),this.sliderPages[a].initByItem(this.itemIndex+1<this.itemsAmount?this.itemsList[this.itemIndex+1]:this.itemsList[0]),this.sliderPages[o].initByItem(this.itemIndex-1<0?this.itemsList[this.itemsAmount-1]:this.itemsList[this.itemIndex-1])}}},{key:"sliderTransitionComplete",value:function(e){if(e.target===this.slider){var t=this.cacherItemsList.status();(t.list!==this.itemsList||t.list===this.itemsList&&this.itemIndex>=t.index)&&this.cacherItemsList.init(this.itemsList,this.itemIndex,5),void 0!==this.pageInFocusPrev&&this.pageInFocusPrev.action("removeSubContent"),void 0!==this.zoomingPage&&this.zoomingPage!==this.pageInFocus&&this.zoomingPage.normalize()}}},{key:"mouseWheelHandler",value:function(){var e,t=this,i=0,o=0;return t.handlerMWheel=function(a){if(!1!==t.mouseWheelMode){a.stopPropagation(),a.preventDefault();var s=n.Point(0,0);if("deltaX"in a)1===a.deltaMode?(s.x=18*a.deltaX,s.y=18*a.deltaY):(s.x=a.deltaX,s.y=a.deltaY);else if("wheelDelta"in a)a.wheelDeltaX&&(s.x=-.16*a.wheelDeltaX),a.wheelDeltaY?s.y=-.16*a.wheelDeltaY:s.y=-.16*a.wheelDelta;else{if(!("detail"in a))return;s.y=a.detail}var r=t.size.width/2,l=t.size.height/2;a.pageX&&(r=a.pageX,l=a.pageY),r-=t.viewOfsetX,l-=t.viewOfsetY,t.dragging||(e!==t.pageInFocus&&(e=void 0),t.zoomingPage&&t.zoomingPage!==t.pageInFocus&&(t.zoomingPage.normalize(),t.zoomingPage=void 0),e||(t.needHideControlls=t.isControllsShow,e=t.pageInFocus,t.zoomingPage=t.pageInFocus),r===i&&l===o||(e.startDrag(n.Point(r,l)),i=r,o=l),e.zoomByScaleIter(s.y,n.Point(r,l)),e.isInScale?t.showControlls(!1):(t.showControlls(t.needHideControlls),e=void 0))}},t.handlerMWheel}},{key:"zoomSwitch",value:function(){var e=n.Point(this.view.clientWidth/2,this.view.clientHeight/2);this.secondClick(e)}},{key:"fitMode",value:function(e){this.params.fit&&(this.FF_Mode=e);for(var t=0;t<this.sliderPages.length;t+=1)this.sliderPages[t].fit(!0)}},{key:"firstClick",value:function(e){if(this.pageInFocus.isPointInItem(e))if(this.pageInFocus.isInScale)this.pageInFocus.normalize(!0),this.zoomingPage=void 0,this.showControlls(this.needHideControlls);else switch(this.pageInFocus.action("click")){case"audioPlay":break;case"videoPlay":this.showControlls(!1),this.needHideControlls=!this.isControllsShow;break;case"videoStop":this.switchShowControlls(),this.needHideControlls=!this.isControllsShow;break;default:this.fitMode(this.isControllsShow),this.switchShowControlls(),this.needHideControlls=!this.isControllsShow}else this.params.canRemoved?this.prepareToRemove():this.params.canRemoved||this.pageInFocus&&this.pageInFocus.isSubContentActiv&&"videoStop"===this.pageInFocus.action("click")&&(this.switchShowControlls(),this.needHideControlls=!this.isControllsShow)}},{key:"secondClick",value:function(e){if(this.params.zoom&&this.pageInFocus.isPointInItem(e))if(this.pageInFocus.isInScale)this.pageInFocus.normalize(!0),this.zoomingPage=void 0,this.showControlls(this.needHideControlls);else{if(this.zoomingPage&&this.zoomingPage.normalize(),this.zoomingPage=this.pageInFocus,this.zoomingPage.zoomIn(Math.abs(this.zoomingPage.imgScale-1)<.3?1.5:this.zoomingPage.imgScale,e),!this.zoomingPage.isInScale)return;this.needHideControlls=this.isControllsShow,this.showControlls(!1)}}},{key:"doubleClickController",value:function(e){if(!n.Device.ios||"mouseup"!==e.type){var t,i;e.changedTouches&&e.changedTouches[0]?(t=e.changedTouches[0].pageX,i=e.changedTouches[0].pageY):(t=e.pageX,i=e.pageY),t-=this.viewOfsetX,i-=this.viewOfsetY;var o=this;if(this.firsrTap)return clearTimeout(this.firsrTap),this.firsrTap=void 0,void this.secondClick(n.Point(t,i));this.firsrTap=setTimeout((function(){o.firsrTap=void 0,o.firstClick(n.Point(t,i))}),300)}}},{key:"startDrag",value:function(){var t,i,o,a,s,r,l,c,d,h=this,m=4,u=!0,p=45,g=h.viewOfsetY,v=h.viewOfsetX,f=0,w=0,y=0;function b(e){var t,c,d,b,x;if(e.originalEvent&&(e=e.originalEvent),e.touches?!h.dragging&&e.touches.length>1?h.params.zoom&&(l=!0,t=e.touches[0].pageX,c=e.touches[0].pageY,d=e.touches[1].pageX,b=e.touches[1].pageY,x=Math.hypot(t-d,c-b),t+=(d-t)/2,c+=(b-c)/2):(l=!1,t=e.touches[0].pageX,c=e.touches[0].pageY):(t=e.pageX,c=e.pageY),t-=v,c-=g,!(n.Device.ios&&i<=20)){var C,k;if(void 0===r)u&&c===o||!u&&t===i?r=!1:(C=180*Math.atan2(Math.abs(c-o),Math.abs(t-i))/Math.PI,r=u?C>45:90-C>p);if(!h.dragging&&h.zoomingPage){e.preventDefault();var T=Math.abs(i-t)>m?i-t:0,E=Math.abs(o-c)>m?o-c:0;return(T||E)&&(h.zoomingDrag=!0),void(l?h.pageInFocus.zoomByScaleDeltaToPoint(x,n.Point(T,E),n.Point(t,c)):h.zoomingPage&&h.zoomingPage.dragin(n.Point(T,E)))}r?(f=0,(k=Math.abs(o-c)>m?o-c:0)&&(h.dragging=!0),h.params.canRemoved&&(h.scrollViewTranslateY=s-k)):(e.preventDefault(),h.transition=!0,(k=Math.abs(i-t)>m?i-t:0)&&(h.dragging=!0),h.scrollViewTranslateX=a-k,w=y,y=h.scrollViewTranslateX,f=y-w)}}function x(e){if(r=void 0,n.isTouchDevice&&(document.removeEventListener("touchmove",b,n.passiveListener),document.removeEventListener("touchend",x,n.passiveListener)),document.removeEventListener("mousemove",b,!1),document.removeEventListener("mouseup",x,!1),document.removeEventListener("oncontextmenu",x,!1),h.dragging||l||h.zoomingDrag){if(h.zoomingPage&&(h.zoomingPage.stopDrag(),l=!1),!h.zoomingPage)if(Math.abs(h.scrollViewTranslateY)<m){var i=h.currentItemIndex,o=n.isTouchDevice?7:1;Math.abs(f)>o&&t===h.currentItemIndex&&(i=f>0?i-1:i+1),h.speedX=f,h.scrollViewTranslateY=0,h.gotoPageByIndex(i)}else{var a=h.scrollViewTranslateY/(h.size.height/2);Math.abs(a)>.2?h.prepareToRemove():h.renderTransformTo(n.Point(h.scrollViewTranslateX,0))}this.dragging=!1}else h.doubleClickController(e);h.zoomingDrag=!1,d=e.type}return function(r){var m,u,p,C;"mousedown"===r.type&&"touchend"===d||(h.zoomingPage=h.pageInFocus.isInScale?h.pageInFocus:void 0,n.cancelAnimationFrame(h.animaSliderRender),t=h.currentItemIndex,r.originalEvent&&(r=r.originalEvent),n.isTouchDevice||r.preventDefault(),r.button&&0!==r.button||(r.touches?!h.dragging&&r.touches.length>1?(l=!0,m=r.touches[0].pageX,u=r.touches[0].pageY,p=r.touches[1].pageX,C=r.touches[1].pageY,c=Math.hypot(m-p,u-C),m+=(p-m)/2,u+=(C-u)/2,h.zoomingPage=h.pageInFocus,h.needHideControlls=h.isControllsShow,h.showControlls(!1)):(m=r.touches[0].pageX,u=r.touches[0].pageY):(m=r.pageX,u=r.pageY),m-=v,u-=g,h.speedX=0,h.speedY=0,f=0,w=0,y=h.scrollViewTranslateX,i=m,o=u,a=h.scrollViewTranslateX,s=h.scrollViewTranslateY,n.moduleSettings(h.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.UPDATE_CONTROLS,h,{draging:!0})),h.zoomingPage&&h.zoomingPage.startDrag(n.Point(i,o),c),n.isTouchDevice&&(document.addEventListener("touchmove",b,n.passiveListener),document.addEventListener("touchend",x,n.passiveListener)),document.addEventListener("mousemove",b,!1),document.addEventListener("mouseup",x,!1),document.addEventListener("oncontextmenu",x,!1)))}}},{key:"createControlls",value:function(){var t=this;function i(e){e.style.backgroundColor=t.params.navigationIconColor,e.childNodes[0].style.fill=t.params.navigationColor}function o(e){e.style.backgroundColor=t.params.navigationColor,e.childNodes[0].style.fill=t.params.navigationIconColor}this.prevButton=document.createElement("div"),this.prevButton.className="".concat(e.classPref,"next-prev-button"),this.prevButton.style.left="".concat(0,"px"),this.prevButton.style.transform="translate(-150%, -50%)",this.prevButton.style.backgroundColor=t.params.navigationColor,this.prevButton.style.visibility="hidden",this.prevButton.innerHTML=e.ICONS.PREV_ARR,this.prevButton.childNodes[0].style.fill=t.params.navigationIconColor,this.prevButton.onmouseover=function(){i(this)},this.prevButton.onmouseout=function(){o(this)},this.prevButton.onclick=function(){n.moduleSettings(t.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.UPDATE_CONTROLS,t,{draging:!0})),t.gotoPrev(),n.Device.desktop||o(this)},this.view.appendChild(this.prevButton),this.nextButton=document.createElement("div"),this.nextButton.className="".concat(e.classPref,"next-prev-button"),this.nextButton.style.backgroundColor=t.params.navigationColor,this.nextButton.style.right="0px",this.nextButton.style.transform="translate(150%, -50%)",this.nextButton.style.visibility="hidden",this.nextButton.innerHTML=e.ICONS.NEXT_ARR,this.nextButton.childNodes[0].style.fill=t.params.navigationIconColor,this.nextButton.onmouseover=function(){i(this)},this.nextButton.onmouseout=function(){o(this)},this.nextButton.onclick=function(){n.moduleSettings(t.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.UPDATE_CONTROLS,t,{draging:!0})),t.gotoNext(),n.Device.desktop||o(this)},this.view.appendChild(this.nextButton)}},{key:"switchShowControlls",value:function(){this.showControlls(!this.isControllsShow)}},{key:"showHideNaviButton",value:function(e){if(this.naviButtonsStatus!==e){switch(e){case"show":if(this.isZoom)return;this.prevButton.style.transform="translate(0%, -50%)",this.nextButton.style.transform="translate(0%, -50%)";break;case"hide":this.prevButton.style.transform="translate(-150%, -50%)",this.nextButton.style.transform="translate(150%, -50%)"}this.naviButtonsStatus=e}}},{key:"showControlls",value:function(t){this.isZooming!==this.isZoom&&(this.isZooming=this.isZoom,n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{zoom:this.isZoom?"zoomIn":"zoomOut"})),this.isZoom?this.showHideNaviButton("hide"):this.showHideNaviButton("show")),this.isControllsShow!==t&&(t?(n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{controls:"show"})),this.showHideNaviButton("show")):n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{controls:"hide"})),this.isControllsShow=t)}},{key:"updateControlls",value:function(){this.itemsAmount<3?(0===this.itemIndex?this.prevButton.style.visibility="hidden":this.prevButton.style.visibility="visible",this.itemIndex===this.itemsAmount-1?this.nextButton.style.visibility="hidden":this.nextButton.style.visibility="visible",1===this.itemsAmount&&(this.prevButton.style.visibility="hidden",this.nextButton.style.visibility="hidden")):(this.prevButton.style.visibility="visible",this.nextButton.style.visibility="visible");var t=this.itemsList[this.itemIndex];t&&n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{item:t,itemIndex:this.itemIndex}))}},{key:"resizeHandler",value:function(e){var t=this;this.resizeDelay&&clearTimeout(this.resizeDelay),n.cancelAnimationFrame(this.animaSliderRender),this.resizeDelay=setTimeout((function(){if(t.size=e,t.size.height<410&&(t.showControlls(!1,!0),t.needHideControlls=!0),t.size.width<500?(t.prevButton.classList.add("next-prev-button-mini-screen"),t.nextButton.classList.add("next-prev-button-mini-screen")):(t.prevButton.classList.remove("next-prev-button-mini-screen"),t.nextButton.classList.remove("next-prev-button-mini-screen")),0!==t.sliderPages.length){for(var i=0;i<t.sliderPages.length;i+=1)t.sliderPages[i].resize(t.size);t.gotoPageByIndex(t.currentItemIndex,!0),t.showControlls(!0)}}),70)}},{key:"viewOfsetY",get:function(){return this.view.getBoundingClientRect().top-document.body.getBoundingClientRect().top}},{key:"viewOfsetX",get:function(){return this.view.getBoundingClientRect().left-document.body.getBoundingClientRect().left}},{key:"itemIndex",set:function(e){this.itemNumPr=e,this.updateControlls()},get:function(){return this.itemNumPr}},{key:"scrollViewTranslateY",set:function(e){this.scrollViewTranslateYPr=e,this.slider.style.transform="translate3d(".concat(this.scrollViewTranslateX,"px,").concat(e,"px, 0px"),0!==e&&this.sliderVerticalRender()},get:function(){return this.scrollViewTranslateYPr}},{key:"scrollViewTranslateX",set:function(e){this.scrollViewTranslateXPr=e,this.slider.style.transform="translate3d(".concat(e,"px,").concat(this.scrollViewTranslateY,"px, 0px"),this.pageRenderByIndex(-Math.round(e/this.size.width))},get:function(){return this.scrollViewTranslateXPr}},{key:"isZoom",get:function(){return!!this.pageInFocus&&this.pageInFocus.isInScale}}]),e}();i(9);function h(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function m(e,t,i){return t&&h(e.prototype,t),i&&h(e,i),e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var p=function e(t,i,o,a,n,s,r){u(this,e);var l=document.createElement("div");return l.className=t,l.dataset.type=o,l.innerHTML=i,l.style.backgroundColor=a,l.style.order=r,l.style.fill=n,l.addEventListener("click",s,!1),l.addEventListener("mouseenter",s,!1),l.addEventListener("mouseleave",s,!1),l},g=function(){function e(t,i,o){u(this,e);var a=this;this.appName=t.appName;var s=e.MENU_TYPE,r=e.CONFIG;function l(e){"like"===e.dataset.type&&e.dataset.like||("bookmark"===e.dataset.type&&e.dataset.bookmark?e.style.backgroundColor=a.backgroundColor:(e.style.backgroundColor=a.backgroundColor,e.style.fill=a.iconColor))}function c(t){if("click"===t.type){var i=a.item;if(!i)return;var o={};switch(o.type=this.dataset.type,o.item=i,this.dataset.type){case"like":case"bookmark":case"fullscreen":l(this)}n.Device.desktop||l(this),n.moduleSettings(a.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.ITEM_MENU_ACTION,a,o))}else"mouseenter"===t.type?"bookmark"===(s=this).dataset.type&&s.dataset.bookmark?s.style.backgroundColor=a.backgroundColorOver:(s.style.backgroundColor=a.backgroundColorOver,s.style.fill=a.iconColorOver):"mouseleave"===t.type&&l(this);var s}n.copyProperties(o,r),this.delegate=t,this.item=void 0,this.lightbox=i===s.LIGHTBOX,this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.view.classList.add(i),this.backgroundColor=r.backgroundColor,this.backgroundColorOver=r.backgroundColorOver,this.iconColor=r.iconColor,this.iconColorOver=r.iconColorOver,r.link&&(this.linkButton=new p("".concat(e.classPref,"button"),i===s.ULTRABOX?n.ICONS.LINK_2_SVG:n.ICONS.LINK_SVG,"link",this.backgroundColor,this.iconColor,c,i===s.ULTRABOX?6:0),this.view.appendChild(this.linkButton)),r.play&&(this.playButton=new p("".concat(e.classPref,"button"),n.ICONS.PLAY_SVG,"play",this.backgroundColor,this.iconColor,c,1),this.view.appendChild(this.playButton)),r.zoom&&(this.zoomButton=new p("".concat(e.classPref,"button"),n.ICONS.ZOOM_IN_SVG,"zoom",this.backgroundColor,this.iconColor,c,2),this.view.appendChild(this.zoomButton)),r.info&&(this.infoButton=new p("".concat(e.classPref,"button"),n.ICONS.INFO_SVG,"info",this.backgroundColor,this.iconColor,c,i===s.ULTRABOX?5:3),this.view.appendChild(this.infoButton)),r.discuss&&(this.commentsButton=new p("".concat(e.classPref,"button"),i===s.ULTRABOX?n.ICONS.COMENTS_2_SVG:n.ICONS.COMENTS_SVG,"coments",this.backgroundColor,this.iconColor,c,(s.ULTRABOX,4)),this.view.appendChild(this.commentsButton)),r.download&&(this.downloadButton=new p("".concat(e.classPref,"button"),i===s.ULTRABOX?n.ICONS.DOWNLOAD_2_SVG:n.ICONS.DOWNLOAD_SVG,"download",this.backgroundColor,this.iconColor,c,i===s.ULTRABOX?3:5),this.view.appendChild(this.downloadButton)),r.share&&(this.shareButton=new p("".concat(e.classPref,"button"),i===s.ULTRABOX?n.ICONS.SHARE_2_SVG:n.ICONS.SHARE_SVG,"share",this.backgroundColor,this.iconColor,c,i===s.ULTRABOX?2:6),this.view.appendChild(this.shareButton)),r.bookmark&&(this.bookMarkButton=new p("".concat(e.classPref,"button"),n.ICONS.BOOKMARK_SVG,"bookmark",this.backgroundColor,this.iconColor,c),this.view.appendChild(this.bookMarkButton)),r.like&&(this.likeButton=new p("".concat(e.classPref,"button"),i===s.ULTRABOX?n.ICONS.HEART_2_SVG:n.ICONS.HEART_SVG,"like",this.backgroundColor,this.iconColor,c,i===s.ULTRABOX?1:7),this.view.appendChild(this.likeButton)),r.fulscreen&&(this.fullscreenButton=new p("".concat(e.classPref,"button"),n.ICONS.FULL_SCREEN_SVG,"fullscreen",this.backgroundColor,this.iconColor,c,i===s.ULTRABOX?6:8),this.view.appendChild(this.fullscreenButton)),r.close&&(this.closeButton=new p("".concat(e.classPref,"button"),n.ICONS.CLOSE_SVG,"close",this.backgroundColor,this.iconColor,c,9),this.view.appendChild(this.closeButton))}return m(e,null,[{key:"classPref",get:function(){return"gmedia-item-menu-"}},{key:"EVENTS",get:function(){return{ITEM_MENU_ACTION:"ITEM_MENU_ACTION"}}},{key:"MENU_TYPE",get:function(){return{THUMB:"".concat(e.classPref,"type-thumb"),LIGHTBOX:"".concat(e.classPref,"type-lightbox"),ULTRABOX:"".concat(e.classPref,"type-ultrabox")}}},{key:"CONFIG",get:function(){return{linkTargetWindow:"_self",backgroundColor:"rgb(0,0,0)",backgroundColorOver:"rgb(255,255,255)",iconColor:"rgb(255,255,255)",iconColorOver:"rgb(0,0,0)",link:!1,play:!1,zoom:!1,info:!1,discuss:!1,download:!1,share:!1,like:!1,bookmark:!1,fulscreen:!1,close:!1}}}]),m(e,[{key:"updateForItem",value:function(e){if(this.item=e,this.zoomButton&&("image"!==e.type?this.zoomButtonStatus("desable"):this.zoomButtonStatus("zoomOut")),this.likeButton&&this.delegate.likesSet&&(this.delegate.likesSet[e.ID]?(this.likeButton.style.fill="red",this.likeButton.style.cursor="default",this.likeButton.style.pointerEvents="none",this.likeButton.setAttribute("data-like",e.ID)):(this.likeButton.style.fill=this.iconColor,this.likeButton.style.cursor="pointer",this.likeButton.style.pointerEvents="all",this.likeButton.removeAttribute("data-like"))),this.bookMarkButton&&(this.delegate.is_containIdInBookmarkSet(this.item.ID)||0===this.delegate.is_containIdInBookmarkSet(this.item.ID)?(this.bookMarkButton.setAttribute("data-bookmark",e.ID),this.bookMarkButton.style.fill="red"):(this.bookMarkButton.removeAttribute("data-bookmark"),this.bookMarkButton.style.fill=this.iconColor)),this.linkButton&&(e.link?(this.linkButton.style.display="block",this.linkButton.style.opacity="1",this.linkButton.style.cursor="pointer",this.linkButton.style.pointerEvents="all"):(this.linkButton.style.opacity="0",this.linkButton.style.display="none",this.linkButton.style.cursor="default",this.linkButton.style.pointerEvents="none")),this.commentsButton)switch(e.comment_status){case"open":this.commentsButton.style.display=null;break;case"closed":this.commentsButton.style.display="none"}}},{key:"zoomButtonStatus",value:function(e){if(this.zoomButton&&this.zoomStatus!==e){switch(e){case"desable":this.zoomButton.innerHTML=n.ICONS.ZOOM_IN_SVG,this.zoomButton.style.pointerEvents="none",this.zoomButton.style.opacity=.4;break;case"zoomOut":this.zoomButton.innerHTML=n.ICONS.ZOOM_IN_SVG,this.zoomButton.style.pointerEvents="auto",this.zoomButton.style.opacity=1;break;case"zoomIn":this.zoomButton.innerHTML=n.ICONS.ZOOM_OUT_SVG,this.zoomButton.style.pointerEvents="auto",this.zoomButton.style.opacity=1}this.zoomStatus=e}}},{key:"playButtonStatus",value:function(e){if(this.playButton&&this.playStatus!==e){switch(e){case"play":this.playButton.innerHTML=n.ICONS.PAUSE_SVG;break;case"stop":this.playButton.innerHTML=n.ICONS.PLAY_SVG}this.playStatus=e}}},{key:"resizeHandler",value:function(){var e=document.webkitIsFullScreen||document.mozFullScreen||!1;this.fullscreenButton&&(this.fullscreenButton.innerHTML=e?n.ICONS.NORMAL_SCREEN_SVG:n.ICONS.FULL_SCREEN_SVG,this.fullscreenButton.style.fill=this.iconColor)}}]),e}();i(11);function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function w(e,t,i){return t&&f(e.prototype,t),i&&f(e,i),e}var y=function(){function e(t){v(this,e);var i=this;function o(e){switch(e.type){case"mouseenter":i.selector.style.opacity="1";break;case"mouseleave":i.selectedPr||(i.selector.style.opacity="0")}}this.delegate=t,this.appName=t.appName,this.item=void 0,this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"item"),this.bgImg=document.createElement("div"),this.bgImg.className="".concat(e.classPref,"item-bg"),this.view.appendChild(this.bgImg),this.imgSRC=void 0,this.selector=document.createElement("div"),this.selector.className="".concat(e.classPref,"item-hover"),this.selector.style.borderColor=this.delegate.config.itemBgColor,this.view.appendChild(this.selector),this.selectedPr=!1,this.view.addEventListener("mouseenter",o,!1),this.view.addEventListener("mouseleave",o,!1)}return w(e,null,[{key:"classPref",get:function(){return"gmedia-scroll-bar-"}}]),w(e,[{key:"initByItem",value:function(t){if(this.item=t,this.imgSRC=t.itemViewThumbSrc,this.bgImg.style.backgroundImage="url(".concat(this.imgSRC,")"),this.type=t.type,"audio"===this.type||"video"===this.type){switch(this.hover=document.createElement("div"),this.hover.className="".concat(e.classPref,"item-link"),this.hover.style.backgroundColor=this.delegate.config.itemBgColor,this.type){case"audio":this.hover.innerHTML=n.ICONS.NOTE_SVG;break;case"video":"vimeo"===this.item.mime_type.split("/")[1]?this.hover.innerHTML=n.ICONS.VIMEO_SVG:this.hover.innerHTML=n.ICONS.YOU_TUBE_SVG}this.view.appendChild(this.hover)}}},{key:"select",value:function(e){this.selector.style.opacity=e?"1":"0",this.selectedPr=e}}]),e}(),b=function(){function e(t,i){v(this,e),this.delegate=t,this.config=e.CONFIG,n.copyProperties(i,this.config),this.appName=t.appName,this.itemsList=[],this.thumbSize=n.Size(70,50),this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"wrap"),this.scrollView=document.createElement("div"),this.scrollView.className="".concat(e.classPref,"view"),this.scrollView.style.width="0px",this.view.appendChild(this.scrollView),this.thumbsList=[],this.itemsInStageCount=0,this.scrollWidthPr=0,this.viewCompleted=!1,this.dragging=!1,this.scrollViewTranslateX=0,this.startDragHandler=void 0,this.animationRender=void 0,this.speedX=0,this.activIndex=void 0,this.activAudioIndex=void 0}return w(e,null,[{key:"classPref",get:function(){return"gmedia-scroll-bar-"}},{key:"CONFIG",get:function(){return{itemBgColor:"rgba(255,255,255,0.6)"}}},{key:"EVENTS",get:function(){return{ITEMS_SCROLL_BAR_ITEM_ACTION:"ITEMS_SCROLL_BAR_ITEM_ACTION"}}}]),w(e,[{key:"initByItemslist",value:function(e){this.itemsList=e;var t=new y(this);this.scrollView.appendChild(t.view),this.thumbSize.width=t.view.clientWidth,this.thumbSize.height=t.view.clientHeight,this.scrollView.removeChild(t.view),this.prepare(),this.scrollWidthPr=this.thumbSize.width*this.itemsList.length,this.scrollView.style.width="".concat(this.scrollWidthPr+5,"px"),this.scrollViewTranslateX=0,this.updateView()}},{key:"addThumbByIndex",value:function(t){if(!this.thumbsList[t]){var i=this,o=new y(this);this.thumbsList[t]=o,this.itemsInStageCount+=1,n.isTouchDevice&&o.view.addEventListener("touchend",a,!1),o.view.addEventListener("mouseup",a,!1),o.view.style.left="".concat(this.thumbSize.width*t,"px"),this.scrollView.appendChild(o.view),o.initByItem(this.itemsList[t]),o.view.dataset.gmIndex=t}function a(t){"touchend"!==t.type&&"mouseup"!==t.type||i.dragging||(i.delegate.slider&&n.moduleSettings(i.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.ITEMS_SCROLL_BAR_ITEM_ACTION,i,{action:"click",index:parseInt(this.dataset.gmIndex)})),i.startDragHandler&&i.startDragHandler())}}},{key:"changeAudioStatusForIndex",value:function(e,t){var i=this.thumbsList[e];!this.activAudioIndex&&0!==this.activAudioIndex||e===this.activAudioIndex||(this.thumbsList[this.activAudioIndex].musicIdentifireStatus="ended"),i.musicIdentifireStatus=t.type,this.activAudioIndex=e}},{key:"prepare",value:function(){this.scrollWidthPr=0,this.scrollView.style.transform="translateX(0px)",this.scrollView.style.width="0px",this.scrollViewTranslateXPr=0}},{key:"resizeHandler",value:function(){this.updateView()}},{key:"selectThumbByIndex",value:function(e){if(void 0!==e&&0!==this.itemsList.length){var t;if((this.activIndex||0===this.activIndex)&&(t=this.thumbsList[this.activIndex])&&t.select(!1),this.thumbsList[e]||this.addThumbByIndex(e),t=this.thumbsList[e]){t.select(!0);var i=this.thumbSize.width*e,o=i+this.scrollViewTranslateX,a=o+this.thumbSize.width;(o<0||a<0)&&this.renderTransformTo(n.Point(-i,0)),(o>this.view.clientWidth||a>this.view.clientWidth)&&this.renderTransformTo(n.Point(this.view.clientWidth-this.thumbSize.width-i,0)),this.scrollWidthPr>this.view.clientWidth&&(this.scrollViewTranslateX=Math.max(this.scrollViewTranslateX,-(this.scrollWidthPr-this.view.clientWidth)))}this.activIndex=e}}},{key:"updateView",value:function(){if(this.selectThumbByIndex(this.activIndex),this.view.clientWidth/this.scrollWidthPr<1){if(this.scrollViewTranslateX=this.scrollViewTranslateXPr,this.viewCompleted)return;this.scrollView.classList.add("gm_grabbable"),this.startDragHandler=this.startDrag(),n.isTouchDevice&&this.scrollView.addEventListener("touchstart",this.startDragHandler,n.passiveListener),this.scrollView.addEventListener("mousedown",this.startDragHandler,!1),this.viewCompleted=!0}else{if(this.scrollView.classList.remove("gm_grabbable"),this.scrollViewTranslateX=(this.view.clientWidth-this.scrollWidthPr)/2,!this.viewCompleted)return;n.isTouchDevice&&this.scrollView.removeEventListener("touchstart",this.startDragHandler,n.passiveListener),this.scrollView.removeEventListener("mousedown",this.startDragHandler,!1),this.viewCompleted=!1}}},{key:"renderTransformTo",value:function(e){var t=this;n.cancelAnimationFrame(t.animationRender);var i=0,o=.2,a=.1;t.animationRender=requestAnimationFrame((function n(){i=i*o+(e.x-t.scrollViewTranslateX)*a,t.scrollViewTranslateX+=i,Math.abs(i)<.04?(cancelAnimationFrame(t.animationRender),t.scrollViewTranslateX=e.x):t.animationRender=requestAnimationFrame(n)}))}},{key:"startDrag",value:function(){var e,t,i=this,o=5*i.speedX,a=0,s=0,r=.95,l=1;function c(){return-i.scrollWidthPr+i.view.clientWidth}function d(){if(i.scrollViewTranslateX>0?o=.2*o+.1*(0-i.scrollViewTranslateX):i.scrollViewTranslateX<c()?o=.2*o+.1*(c()-i.scrollViewTranslateX):o*=r,i.scrollViewTranslateX+=o,Math.abs(o)<.4){n.cancelAnimationFrame(i.animationRender),i.speedX=o;var e=o<0?Math.max(Math.ceil(-i.scrollViewTranslateXPr/i.thumbSize.width),0):Math.max(Math.floor(-i.scrollViewTranslateXPr/i.thumbSize.width),0);i.renderTransformTo(n.Point(Math.max(c(),-e*i.thumbSize.width),0))}else i.animationRender=requestAnimationFrame(d)}function h(n){var r;n.preventDefault(),r=n.touches&&n.touches[0]?n.touches[0].pageX:n.pageX;var c=e-r;c&&(i.dragging=!0),i.scrollViewTranslateX=t-c,a=s,s=i.scrollViewTranslateX,o=(s-a)*l}function m(e){e.preventDefault(),i.scrollView.style.transition=null,n.isTouchDevice&&(document.removeEventListener("touchmove",h,n.passiveListener),document.removeEventListener("touchend",m,n.passiveListener),document.removeEventListener("touchcancel",m,!1)),document.removeEventListener("mousemove",h,!1),document.removeEventListener("mouseup",m,!1),document.removeEventListener("oncontextmenu",m,!1),(0!==o||i.scrollViewTranslateX>0||i.scrollViewTranslateX<c())&&(i.animationRender=requestAnimationFrame(d)),i.dragging=!1}return function(a){if(!a)return o=0,t=i.scrollViewTranslateX,void n.cancelAnimationFrame(i.animationRender);var r;(n.isTtouchDevice||a.preventDefault(),a.button&&0!==a.button)||(o=0,s=i.scrollViewTranslateX,r=a.touches&&a.touches[0]?a.touches[0].pageX:a.pageX,e=r,t=i.scrollViewTranslateX,n.cancelAnimationFrame(i.animationRender),n.isTouchDevice&&(document.addEventListener("touchmove",h,n.passiveListener),document.addEventListener("touchend",m,n.passiveListener),document.addEventListener("touchcancel",m,!1)),document.addEventListener("mousemove",h,!1),document.addEventListener("mouseup",m,!1),document.addEventListener("oncontextmenu",m,!1))}}},{key:"size",set:function(e){var t=Math.floor(e.width/this.thumbSize.width);if(t<3)this.view.style.width="0";else{var i=Math.min(t,this.itemsList.length)*this.thumbSize.width;this.view.style.width="".concat(i,"px"),e.height&&(this.view.style.height="".concat(this.thumbSize.height,"px")),this.resizeHandler()}}},{key:"scrollViewTranslateX",set:function(e){if(this.scrollViewTranslateXPr=e,this.scrollView.style.transform="translateX(".concat(e,"px)"),this.itemsList.length!==this.itemsInStageCount)for(var t=Math.max(Math.floor(-e/this.thumbSize.width),0),i=Math.min(t+Math.ceil(this.view.clientWidth/this.thumbSize.width),this.itemsList.length-1),o=t;o<=i;o+=1)this.addThumbByIndex(o)},get:function(){return this.scrollViewTranslateXPr}}]),e}();i(13);function x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function k(e,t,i){return t&&C(e.prototype,t),i&&C(e,i),e}var T=function(){function e(t,i){x(this,e),this.delegate=t,this.appName=t.appName,this.config=e.CONFIG,n.copyProperties(i,this.config);this.view=document.createElement("div"),this.view.className="gmedia-lightbox-b-autoplay-wrap",this.view.innerHTML='<svg class="gmedia_progress-radial" width="22px" height="22px" viewBox="0 0 100 100" shape-rendering="geometricPrecision"><defs><mask id="circle_mask" x="0" y="0" width="100" height="100" maskUnits="userSpaceOnUse"><circle cx="50" cy="50" r="51" stroke-width="0" fill="black" opacity="1"/><circle cx="50" cy="50" r="50" stroke-width="0" fill="white" opacity="1"/><circle class="gmedia_progress-radial-mask-inner" cx="50" cy="50" r="40" stroke-width="0" fill="black" opacity="1"/></mask></defs><g mask="url(#circle_mask)"><circle class="gmedia_progress-radial-track" cx="50" cy="50" r="50" stroke-width="0" opacity="1"/><path class="gmedia_progress-radial-bar" transform="translate(50, 50)"d="M 0 0"></path></g></svg>',this.bar=this.view.getElementsByClassName("gmedia_progress-radial-bar")[0],this.bar.style.fill=this.config.autoPlayColor,this.view.getElementsByClassName("gmedia_progress-radial-track")[0].style.fill=this.config.autoPlayBgColor,this.animRatio=25,this.counter=0,this.durationCount=25*this.config.slideshowDelay,this.interval=void 0,this.anPart=0,this.status=void 0}return k(e,null,[{key:"CONFIG",get:function(){return{autoPlayBgColor:"rgba(255,255,255, 0.3)",autoPlayColor:"rgba(255,255,255, 1)",slideshowDelay:8}}},{key:"EVENTS",get:function(){return{NEXT_SLIDE:"NEXT_SLIDE",PLAY:"PLAY"}}}]),k(e,[{key:"drawProgress",value:function(t){if(!isNaN(t)){t=e.clamp(parseFloat(t),0,1);var i=e.clamp(360*t,0,359.99999),o=i*Math.PI/180,a=51*Math.sin(o),n=-51*Math.cos(o),s=i>180?1:0,r="M 0 0 v -%@ A %@ %@ 1 ".replace(/%@/gi,51),l="".concat(r+s," 1 ").concat(a," ").concat(n," z");this.bar.setAttribute("d",l)}}},{key:"switch",value:function(){"play"===this.status?this.clear():this.start()}},{key:"start",value:function(){var t=this;this.view.style.opacity=1;var i=1/this.durationCount;this.interval=setInterval((function(){t.counter+=1,t.counter>=t.durationCount&&(clearInterval(t.interval),n.moduleSettings(t.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.NEXT_SLIDE,t,{})),t.counter=0,t.start()),t.drawProgress(i*t.counter)}),1e3/this.animRatio),"play"!==this.status&&(this.status="play",n.moduleSettings(t.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.PLAY,t,{status:this.status})))}},{key:"pause",value:function(){clearInterval(this.interval),this.status="pause"}},{key:"clear",value:function(){clearInterval(this.interval),this.counter=0,this.drawProgress(0),this.view.style.opacity=0,this.status="stop",n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.PLAY,this,{status:this.status}))}}],[{key:"clamp",value:function(e,t,i){return Math.max(t,Math.min(i,e))}}]),e}(),E=function(){function e(t,i){x(this,e),this.delegate=t,this.config=e.CONFIG,n.copyProperties(i,this.config),this.appName=t.appName,this.headerFooterStatus=void 0,this.headerStatus=void 0,this.mouseMovingTimer=void 0,this.resizeDelay=void 0,this.size=n.Size(0,0),this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.view.id="".concat(this.appName,"_lightbox"),n.Device.desktop||(this.view.style.height="100%");var o=document.createElement("div");o.className="".concat(e.classPref,"bg"),this.background=o,this.view.appendChild(o),this.content=document.createElement("div"),this.content.className="".concat(e.classPref,"content");var a=d.CONFIG;a.backgroundColor=this.config.backgroundColor,a.preloaderColor=this.config.preloaderColor,a.navigationColor=this.config.sliderNavigationColor,a.navigationIconColor=this.config.sliderNavigationIconColor,a.fit=!0;var s=this.config.thumbBarEnable?60:this.config.headerFooterHeight;a.yOffset=n.miniScreen?0:s,a.canRemoved=!0,a.copyR_Alert=this.config.copyR_Alert,a.zoom=this.config.zoom,n.moduleSettings(this.appName).appEventManager.addGMEventListener(d.EVENTS.UPDATE_CONTROLS,this,"updateViewControls"),n.moduleSettings(this.appName).appEventManager.addGMEventListener(d.EVENTS.REMOVE_LIGHTBOX,this,"prepareToRemove"),n.moduleSettings(this.appName).appEventManager.addGMEventListener(T.EVENTS.PLAY,this,"slideShowSwitchHandler"),n.moduleSettings(this.appName).appEventManager.addGMEventListener(T.EVENTS.NEXT_SLIDE,this,"slideshowHandler"),n.moduleSettings(this.appName).appEventManager.addGMEventListener(b.EVENTS.ITEMS_SCROLL_BAR_ITEM_ACTION,this,"scrollBarHandler"),this.slider=new d(this,a),this.slider.initByStage(this.content),this.slider.mouseWheelMode=this.config.zoom,this.view.appendChild(this.content),this.header=document.createElement("div"),this.header.className="".concat(e.classPref,"header"),this.header.style.backgroundImage="linear-gradient(0deg,rgba(0,0,0,0),".concat(this.config.headerFooterColor,")"),this.view.appendChild(this.header),this.footer=document.createElement("div"),this.footer.className="".concat(e.classPref,"footer"),this.footer.style.minHeight="".concat(this.config.headerFooterHeight,"px"),n.isTouchDevice&&this.footer.classList.add("".concat(e.classPref,"touch-device")),n.miniScreen&&(this.footer.style.backgroundImage="linear-gradient(0deg,".concat(this.config.headerFooterColor,",rgba(0,0,0,0))")),this.view.appendChild(this.footer),this.infoBar1=document.createElement("div"),this.infoBar1.className="".concat(e.classPref,"info-wrap"),this.header.appendChild(this.infoBar1),this.config.itemTitleEnable&&(this.itemTitle=document.createElement("div"),this.itemTitle.className="".concat(e.classPref,"item-title"),this.itemTitle.style.fontSize="".concat(this.config.itemTitleFontSize,"px"),this.itemTitle.style.color=this.config.itemTitleTextColor,this.infoBar1.appendChild(this.itemTitle));var r=document.createElement("div");r.className="".concat(e.classPref,"caption-wrap"),r.style.color=this.config.itemCounterColor,this.config.thumbBarEnable||n.isTouchDevice||(r.style.backgroundColor=this.config.headerFooterColor),this.item_current_info=document.createElement("div"),this.item_current_info.className="".concat(e.classPref,"caption-current"),r.appendChild(this.item_current_info);var l=document.createElement("div");l.className="".concat(e.classPref,"caption-delimiter"),l.style.opacity=.7,l.textContent="/",r.appendChild(l),this.items_amount_info=document.createElement("div"),this.items_amount_info.className="".concat(e.classPref,"caption-all"),r.appendChild(this.items_amount_info),this.counter=r;var c=document.createElement("div");if(c.className="".concat(e.classPref,"caption-play-wrap"),c.appendChild(r),this.infoBar1.appendChild(c),this.config.thumbBarEnable){var h=b.CONFIG;h.itemBgColor=this.config.thumbBarHoverColor,this.thumbsBar=new b(this,h),this.footer.appendChild(this.thumbsBar.view),n.isTouchDevice&&this.footer.appendChild(c)}else this.footer.appendChild(c);if(n.Device.desktop&&this.config.slideshowEneble){var m=T.CONFIG;m.autoPlayBgColor=this.config.slideshowIndicatorColorBg,m.autoPlayColor=this.config.slideshowIndicatorColor,m.slideshowDelay=this.config.slideshowTimer,this.autoPlay=new T(this,m),this.config.thumbBarEnable?c.appendChild(this.autoPlay.view):this.infoBar1.appendChild(this.autoPlay.view)}var u=document.createElement("div");n.isTouchDevice&&(u.style.width="100%"),u.className="".concat(e.classPref,"free-space"),this.header.appendChild(u),this.itemMenuWrap=document.createElement("div"),this.itemMenuWrap.className="".concat(e.classPref,"item-menu-wrap"),this.header.appendChild(this.itemMenuWrap);var p=g.CONFIG;p.link=!0,p.play=n.Device.desktop&&this.config.slideshowEneble,p.zoom=n.Device.desktop&&this.config.zoom,p.discuss=this.config.discuss,p.info=this.config.itemInfoEnable,p.share=this.config.itemShare,p.download=this.config.itemDownload,p.like=this.config.itemLike,p.close=n.Device.desktop,p.fulscreen=!n.Device.ios,p.backgroundColor=this.config.menuBackgroundColor,p.backgroundColorOver=this.config.menuBackgroundColorOver,p.iconColor=this.config.menuIconColor,p.iconColorOver=this.config.menuIconColorOver,this.itemMenu=new g(this,g.MENU_TYPE.LIGHTBOX,p),this.itemMenuWrap.appendChild(this.itemMenu.view),n.moduleSettings(this.appName).appEventManager.addGMEventListener(g.EVENTS.ITEM_MENU_ACTION,this,"itemMenuActionHandler"),this.addToStage()}return k(e,null,[{key:"classPref",get:function(){return"gmedia-lightbox-b-"}},{key:"EVENTS",get:function(){return{NEED_MODAL:"NEED_MODAL",REMOVE_LIGHTBOX:"REMOVE_LIGHTBOX",FULLSCREEN_SWITCH:"FULLSCREEN_SWITCH"}}},{key:"CONFIG",get:function(){return{backgroundColor:"rgba(0,0,0,0.8)",preloaderColor:"#494949",headerFooterHeight:40,headerFooterColor:"rgba(0,0,0,1)",sliderNavigationColor:"rgba(0,0,0,0.8)",sliderNavigationIconColor:"rgba(255,255,255,1)",itemCounterColor:"rgba(255,255,255,1)",itemTitleEnable:!0,itemTitleFontSize:18,itemTitleTextColor:"rgba(255,255,255,1)",thumbBarEnable:!0,thumbBarHoverColor:"rgba(255,255,255,1)",itemInfoEnable:!0,itemLike:!0,itemShare:!0,itemDownload:!0,zoom:!0,discuss:!0,menuBackgroundColor:"rgb(0,0,0)",menuBackgroundColorOver:"rgb(255,255,255)",menuIconColor:"rgb(255,255,255)",menuIconColorOver:"rgb(0,0,0)",slideshowEneble:!0,slideshowTimer:8,slideshowAutoPlay:!1,slideshowIndicatorColorBg:"rgba(255,255,255,0.7)",slideshowIndicatorColor:"rgba(255,255,255,1)",copyR_Alert:"Hello, this photo is mine!"}}}]),k(e,[{key:"itemMenuActionHandler",value:function(t){var i=t.params.item,o=t.params.type;if(i&&o){var a,s,r={};switch(r.item=i,o){case"info":r.type="info",n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.NEED_MODAL,this,r)),n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(T.EVENTS.PLAY,this,{action:"stop"}));break;case"link":i.link&&window.open(i.link,this.config.linkTargetWindow);break;case"like":this.delegate.likeItem=i,this.itemMenu.updateForItem(i);break;case"bookmark":this.delegate.bookmarkItem=i,this.itemMenu.updateForItem(i);break;case"share":r.type="share",n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.NEED_MODAL,this,r)),n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(T.EVENTS.PLAY,this,{action:"stop"}));break;case"zoom":"function"==typeof this.sliderZoomSwitch&&this.sliderZoomSwitch();break;case"close":this.prepareToRemove();break;case"play":n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(T.EVENTS.PLAY,this,{}));break;case"download":a=i.url,(s=document.createElement("A")).href=a,s.download=a.substr(a.lastIndexOf("/")+1),document.body.appendChild(s),s.click(),document.body.removeChild(s);break;case"coments":"open"===i.comment_status&&(a="".concat(i.sharelink,"/#comments"),window.open(a,"_self"));break;case"fullscreen":n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.FULLSCREEN_SWITCH,this,{}))}}}},{key:"sliderZoomSwitch",value:function(){this.slider&&this.slider.remoteControl("zoom")}},{key:"slideShowSwitchHandler",value:function(e){if(this.autoPlay)if(e.params.action)switch(e.params.action){case"play":this.autoPlay.start();break;case"stop":this.autoPlay.clear()}else e.params.status?this.itemMenu&&this.itemMenu.playButtonStatus(e.params.status):this.autoPlay.switch()}},{key:"slideshowHandler",value:function(){this.slider&&this.slider.gotoNext()}},{key:"scrollBarHandler",value:function(e){if(this.slider&&e.params&&e.params.action&&(e.params.index||0===e.params.index))switch(e.params.action){case"click":this.slider.gotoPageByIndex(e.params.index)}}},{key:"keydownHandler",value:function(){var e=this;return e.handlerKB=function(t){if(e.delegate.modal)e.delegate.modal.prepareToRemove();else switch(t.keyCode){case 37:e.slider.remoteControl("prev");break;case 39:e.slider.remoteControl("next");break;case 32:n.preventDefault(t),e.slider.remoteControl("space");break;case 27:e.slider.prepareToRemove()}},e.handlerKB}},{key:"addToStage",value:function(){var t=this,i=document.getElementsByTagName("body")[0];this.view.style.zIndex=n.findHighestZIndex(i)+1,n.disableBodyScrollSlider(),document.addEventListener("keydown",t.keydownHandler(),!0),n.moduleSettings(this.appName).appEventManager.addGMEventListener(g.EVENTS.CLOSE,this,"prepareToRemove"),i.appendChild(this.view),setTimeout((function(){t.view.classList.add("".concat(e.classPref,"activate"))}),30)}},{key:"initByList",value:function(e,t){e&&e.length>0&&(this.currentItemIndex=t&&0!==t?0:void 0,this.startItemIndex=t||0,this.itemsList=e,this.thumbsBar&&this.thumbsBar.initByItemslist(this.itemsList),this.slider.initByList(this.itemsList,this.startItemIndex),this.resizeHandler())}},{key:"prepareToRemove",value:function(){if(!this.removing){if(this.removing=!0,this.slider.prepareToRemove(),document.removeEventListener("keydown",this.handlerKB,!0),n.enableBodyScrollSlider(),this.view.classList.remove("".concat(e.classPref,"activate")),document.getElementById("gmediaAudioPlayer"))document.getElementById("gmediaAudioPlayer").pause();n.moduleSettings(this.appName).appEventManager.removeGMEventListener(g.EVENTS.ITEM_MENU_ACTION,this,"itemMenuActionHandler"),n.moduleSettings(this.appName).appEventManager.removeGMEventListener(g.EVENTS.CLOSE,this,"prepareToRemove"),n.moduleSettings(this.appName).appEventManager.removeGMEventListener(d.EVENTS.UPDATE_CONTROLS,this,"updateViewControls"),n.moduleSettings(this.appName).appEventManager.removeGMEventListener(d.EVENTS.REMOVE_LIGHTBOX,this,"prepareToRemove"),n.moduleSettings(this.appName).appEventManager.removeGMEventListener(T.EVENTS.PLAY,this,"slideShowSwitchHandler"),n.moduleSettings(this.appName).appEventManager.removeGMEventListener(T.EVENTS.NEXT_SLIDE,this,"slideshowHandler"),n.moduleSettings(this.appName).appEventManager.removeGMEventListener(b.EVENTS.ITEMS_SCROLL_BAR_ITEM_ACTION,this,"scrollBarHandler"),n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.REMOVE_LIGHTBOX,this))}}},{key:"mouseMoveHandler",value:function(){var e=this;"hide"===this.headerFooterStatus?(clearTimeout(this.mouseMovingTimer),"show"!==this.headerStatus&&(this.header.classList.add("gmedia-show"),this.headerStatus="show",this.slider&&this.slider.showHideNaviButton("show")),this.mouseMovingTimer=setTimeout((function(){e.header.classList.remove("gmedia-show"),e.slider&&e.slider.showHideNaviButton("hide"),e.headerStatus="hide"}),3e3)):(clearTimeout(this.mouseMovingTimer),"show"!==this.headerStatus&&(this.header.classList.add("gmedia-show"),this.headerStatus="show",this.slider&&this.slider.showHideNaviButton("show")))}},{key:"updateViewControls",value:function(e){var t=this;if(e.params.draging&&n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(T.EVENTS.PLAY,this,{action:"stop"})),e.params.zoom&&(n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(T.EVENTS.PLAY,this,{action:"stop"})),this.itemMenu&&this.itemMenu.zoomButtonStatus(e.params.zoom)),e.params.controls)switch(n.moduleSettings(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(T.EVENTS.PLAY,this,{action:"stop"})),this.headerFooterStatus=e.params.controls,this.mouseMoveHandler(),e.params.controls){case"show":n.miniScreen&&this.header.classList.add("gmedia-show"),this.footer.classList.add("gmedia-show");break;case"hide":n.miniScreen&&this.header.classList.remove("gmedia-show"),this.footer.classList.remove("gmedia-show")}if((e.params.itemIndex||0===e.params.itemIndex)&&(this.item_current_info.innerHTML=e.params.itemIndex+1,this.items_amount_info.innerHTML=this.itemsList.length,this.thumbsBar&&this.thumbsBar.selectThumbByIndex(e.params.itemIndex)),e.params.item&&(this.currentItem=e.params.item,this.delegate.viewItem=this.currentItem,this.itemTitle&&(this.itemTitle.innerHTML=e.params.item.title),this.itemMenu&&this.itemMenu.updateForItem(e.params.item)),e.params.status)switch(e.params.status){case"ready":this.autoPlay&&this.config.slideshowAutoPlay&&!this.startItem&&this.autoPlay.start(),this.view.addEventListener("mousemove",(function(e){t.mouseMoveHandler(e)}),!1)}}},{key:"resizeHandler",value:function(){if(this.view.clientWidth<360?(this.autoPlay&&(this.autoPlay.view.style.display="none"),(this.descriptionWrap||this.thumbsBar)&&(this.counter.style.display="none")):(this.autoPlay&&(this.autoPlay.view.style.display=null),this.counter.style.display=null),this.itemMenu&&this.itemMenu.resizeHandler(),this.thumbsBar){var e=this.footer.clientWidth;this.thumbsBar.size=n.Size(e,0)}this.slider&&this.slider.resizeHandler(n.Size(this.view.clientWidth,this.view.clientHeight))}},{key:"likeItem",set:function(e){this.delegate.likeItem=e}},{key:"likesSet",get:function(){return this.delegate.likesSet}}]),e}();i(15);function S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function N(e,t,i){return t&&L(e.prototype,t),i&&L(e,i),e}var I=function(){function e(t,i){S(this,e),this.appName=t,this.modal=i;var o=document.createElement("div");o.className="".concat(e.clessPref,"bar"),o.style.backgroundColor=i.colors.pageBgColor,o.style.color=i.colors.modalInfoBoxTitleTextColor;var a=document.createElement("div");a.className="".concat(e.clessPref,"close-button"),a.innerHTML=n.ICONS.CLOSE_SVG,a.childNodes[0].style.fill=i.colors.modalInfoBoxTitleTextColor,n.isTouchDevice&&a.addEventListener("touchend",(function(){i.dragging||i.prepareToRemove()}),!1),a.addEventListener("click",(function(){i.prepareToRemove()}),!1),o.appendChild(a),this.view=o}return N(e,null,[{key:"clessPref",get:function(){return"gmedia-item-info-"}},{key:"EVENTS",get:function(){return{NEED_NEW_COLLECTION:"NEED_NEW_COLLECTION"}}}]),N(e,[{key:"item",set:function(t){var i,o=this.view,a=this.modal,s=this,r="";function l(){if(!a.dragging){var t=this.dataset.termId,i=this.dataset.taxonomy;n.moduleSettings(s.appName).appEventManager.dispatchGMEvent(n.GMEvent(e.EVENTS.NEED_NEW_COLLECTION,s,{term_id:[t],taxonomy:i}))}}if(r+='<div class="'.concat(e.clessPref,'item-title" style="color:\n ').concat(a.colors.modalInfoBoxTitleTextColor,'">').concat(t.title,"<br>"),t.description&&""!==t.description?r+='<div class="'.concat(e.clessPref,'item-description" style="color:\n ').concat(a.colors.modalInfoBoxTextColor,'">').concat(t.description,"</div></div>"):r+="</div>",""!==r&&((i=document.createElement("div")).className="".concat(e.clessPref,"description-wrap"),i.style.float="none",i.style.marginRight="41px",i.innerHTML=r,o.appendChild(i)),a.config.infoBarTerms){var c=document.createElement("div");if(c.className="".concat(e.clessPref,"description-wrap"),c.style.float="none",c.style.minHeight="0",c.style.color=n.hexToRgbaStrin(this.modal.colors.modalInfoBoxTextColor,1),o.appendChild(c),t.albums&&t.albums.length>0){var d=document.createElement("ul");d.className="".concat(e.clessPref,"terms-list"),d.classList.add("".concat(e.clessPref,"tags-ul"));var h=document.createElement("li");h.className="".concat(e.clessPref,"terms-title"),h.innerHTML="Albums:",d.appendChild(h);for(var m=0;m<t.albums.length;m+=1){var u=document.createElement("li");u.className="".concat(e.clessPref,"album"),u.innerHTML=t.albums[m].name,u.style.color=this.modal.colors.infoBarTermsTitleColor,u.style.backgroundColor=this.modal.colors.infoBarTermsBackgroundColorAlbums,u.onmouseover=function(){this.style.color=s.modal.colors.infoBarTermsBackgroundColorAlbums,this.style.backgroundColor=s.modal.colors.infoBarTermsTitleColor},u.onmouseout=function(){this.style.color=s.modal.colors.infoBarTermsTitleColor,this.style.backgroundColor=s.modal.colors.infoBarTermsBackgroundColorAlbums},u.dataset.termId=t.albums[m].term_id,u.dataset.taxonomy="album__in",u.addEventListener("mouseup",l,!1),n.isTouchDevice&&u.addEventListener("touchend",l,!1),d.appendChild(u)}c.appendChild(d)}if(t.categories&&t.categories.length>0){var p=document.createElement("ul");p.className="".concat(e.clessPref,"terms-list"),p.classList.add("".concat(e.clessPref,"tags-ul"));var g=document.createElement("li");g.className="".concat(e.clessPref,"terms-title"),g.innerHTML="Categories:",p.appendChild(g);for(var v=0;v<t.categories.length;v+=1){var f=document.createElement("li");f.className="".concat(e.clessPref,"category"),f.innerHTML=t.categories[v].title,f.style.color=s.modal.colors.infoBarTermsTitleColor,f.style.backgroundColor=s.modal.colors.infoBarTermsBackgroundColorCategories,f.onmouseover=function(){this.style.color=s.modal.colors.infoBarTermsBackgroundColorCategories,this.style.backgroundColor=s.modal.colors.infoBarTermsTitleColor},f.onmouseout=function(){this.style.color=s.modal.colors.infoBarTermsTitleColor,this.style.backgroundColor=s.modal.colors.infoBarTermsBackgroundColorCategories},f.addEventListener("mouseup",l,!1),n.isTouchDevice&&f.addEventListener("touchend",l,!1),f.dataset.termId=t.categories[v].term_id,f.dataset.taxonomy="category__in",p.appendChild(f)}c.appendChild(p)}if(t.tags&&t.tags.length>0){var w=document.createElement("ul");w.className="".concat(e.clessPref,"terms-list"),w.classList.add("".concat(e.clessPref,"tags-ul"));var y=document.createElement("li");y.className="".concat(e.clessPref,"terms-title"),y.innerHTML="Tags:",w.appendChild(y);for(var b=0;b<t.tags.length;b+=1){var x=document.createElement("li");x.className="".concat(e.clessPref,"tags"),x.innerHTML=t.tags[b].name,x.style.color=s.modal.colors.infoBarTermsTitleColor,x.style.backgroundColor=s.modal.colors.infoBarTermsBackgroundColorTags,x.onmouseover=function(){this.style.color=s.modal.colors.infoBarTermsBackgroundColorTags,this.style.backgroundColor=s.modal.colors.infoBarTermsTitleColor},x.onmouseout=function(){this.style.color=s.modal.colors.infoBarTermsTitleColor,this.style.backgroundColor=s.modal.colors.infoBarTermsBackgroundColorTags},x.addEventListener("mouseup",l,!1),n.isTouchDevice&&x.addEventListener("touchend",l,!1),x.dataset.termId=t.tags[b].term_id,x.dataset.taxonomy="tag__in",w.appendChild(x)}c.appendChild(w)}}if(a.config.infoBarExifEnable){var C="";if(t.meta.data){t.meta.data&&t.meta.data.model&&(C+='<div class="'.concat(e.clessPref,'meta-exif-value">').concat(t.meta.data.model,"</div></br>"));var k=[];t.meta.data&&t.meta.data.focallength&&k.push('<div class="'.concat(e.clessPref,'meta-exif-value">').concat(t.meta.data.focallength,"</div>")),t.meta.data&&t.meta.data.aperture&&k.push('<div class="'.concat(e.clessPref,'meta-exif-value">').concat(t.meta.data.aperture,"</div>")),t.meta.data&&t.meta.data.exposure&&k.push('<div class="'.concat(e.clessPref,'meta-exif-value">').concat(t.meta.data.exposure,"</div>")),t.meta.data&&t.meta.data.iso&&k.push('<div class="'.concat(e.clessPref,'meta-exif-value">').concat(t.meta.data.iso,"</div>"));for(var T=0;T<k.length;T+=1)C+=k[T],T<k.length-1&&(C+='<div class="'.concat(e.clessPref,'meta-exif-separator"> / </div>'));""!==C&&((i=document.createElement("div")).className="".concat(e.clessPref,"description-wrap"),i.style.color=n.hexToRgbaStrin(s.modal.colors.modalInfoBoxTextColor,1),i.innerHTML=C,o.appendChild(i))}}if(a.config.infoBarCountersEnable){(i=document.createElement("div")).className="".concat(e.clessPref,"description-wrap"),i.style.color=a.colors.modalInfoBoxTextColor,i.style.minWidth="240px";var E=document.createElement("div");E.className="".concat(e.clessPref,"likes-view-com"),E.innerHTML="".concat(n.ICONS.VIEW_SVG,'<div class="').concat(e.clessPref,'counter-text">').concat(t.meta.views?t.meta.views:0,"</div>"),E.getElementsByTagName("svg")[0].style.fill=a.colors.modalInfoBoxTitleTextColor,i.appendChild(E);var S=document.createElement("div");S.className="".concat(e.clessPref,"likes-view-com"),S.innerHTML="".concat(n.ICONS.HEART_SVG,'<div class="').concat(e.clessPref,'counter-text">').concat(t.meta.likes?t.meta.likes:0,"</div>"),S.getElementsByTagName("svg")[0].style.fill=a.colors.modalInfoBoxTitleTextColor,i.appendChild(S);var L=document.createElement("div");L.className="".concat(e.clessPref,"likes-view-com"),L.innerHTML="".concat(n.ICONS.COMENTS_SVG,'<div class="').concat(e.clessPref,'counter-text">').concat(t.meta.comment_count?t.comment_count:0,"</div>"),L.getElementsByTagName("svg")[0].style.fill=n.hexToRgbaStrin(a.colors.modalInfoBoxTitleTextColor,1),i.appendChild(L),o.appendChild(i)}if(a.config.infoBarDateInfoEnable){(i=document.createElement("div")).className="".concat(e.clessPref,"description-wrap"),i.style.color=a.colors.modalInfoBoxTextColor;var N="";if(N+='<div class="'.concat(e.clessPref,'item-meta-key">Upload:</div>\n <div class="').concat(e.clessPref,'item-meta-value">').concat(n.timeConverter(t.date),"</div></br>"),t.meta.data&&t.meta.data.created_timestamp)N+='<div class="'.concat(e.clessPref,'item-meta-key">Taken:</div>\n <div class="').concat(e.clessPref,'item-meta-value">').concat(n.timeConverter(t.meta.data.created_timestamp),"</div></br>");i.innerHTML='<div class="'.concat(e.clessPref,'item-date">').concat(N,"</div>"),""!==N&&o.appendChild(i)}}}]),e}(),B=function(){function e(t,i){S(this,e),this.appName=t,this.modal=i;var o=document.createElement("div");o.className="".concat(e.clessPref,"bar"),o.style.backgroundColor=i.colors.pageBgColor,o.style.color=i.colors.modalInfoBoxTitleTextColor;var a=document.createElement("div");a.className="".concat(e.clessPref,"close-button"),a.innerHTML=n.ICONS.CLOSE_SVG,a.childNodes[0].style.fill=i.colors.modalInfoBoxTitleTextColor,n.isTouchDevice&&a.addEventListener("touchend",(function(){i.dragging||i.prepareToRemove()}),n.passiveListener),a.addEventListener("click",(function(){i.prepareToRemove()}),!1),o.appendChild(a),this.view=o}return N(e,null,[{key:"clessPref",get:function(){return"gmedia-item-share-"}}]),N(e,[{key:"item",set:function(t){var i=this.view,o=this.modal,a=t.sharelink,s="";if(""!==(s+='<div class="'.concat(e.clessPref,'item-title" style="color: \'\n ').concat(o.colors.modalInfoBoxTitleTextColor,"'\">").concat(t.title,"</div>"))){var r=document.createElement("div");r.className="".concat(e.clessPref,"description-wrap"),r.style.float="none",r.style.marginRight="41px",r.innerHTML=s,i.appendChild(r)}var l=document.createElement("div");l.className="".concat(e.clessPref,"description-wrap"),l.style.float="none",l.style.padding="0px 20px",i.appendChild(l);var c=!1;function d(){if(!o.dragging){var e,i,n=this.getAttribute("type"),s=(window.screen.width-600)/2,r="menubar=no,toolbar=no,resizable=yes,scrollbars=yes, top=".concat(200,",\n left=").concat(s,", height=450,width=600");switch(n){case"copy":e=document.getElementById("gmSH_title_copy"),i=this.getElementsByTagName("svg")[0],c&&window.open(a,"_blank"),window.getSelection().selectAllChildren(e);try{document.execCommand("copy")&&(window.getSelection().removeAllRanges(),i.style.fill="green",e.style.color="green",c=!0)}catch(e){window.open(a,"_blank")}break;case"facebook":window.open("https://www.facebook.com/share.php?u=".concat(a),"",r);break;case"twitter":window.open("https://twitter.com/intent/tweet?text=".concat(encodeURI(t.title),"&url=").concat(a),"",r);break;case"pinterest":window.open("http://www.pinterest.com/pin/create/button/?url=".concat(a,"&media=").concat(t.url,"\n &description=").concat(encodeURI(t.title)),"",r)}}}var h=document.createElement("div");h.dataset.type="facebook",h.className="".concat(e.clessPref,"item-button-wrap"),h.id="gmedia_share_fb";var m=document.createElement("div");m.className="".concat(e.clessPref,"item-button"),m.innerHTML="".concat(n.ICONS.FB_SVG_COLOR,'\n <div class="').concat(e.clessPref,'button-title" style="color: #3b5998">Facebook</div>'),m.getElementsByTagName("svg")[0].style.fill="#3b5998",h.appendChild(m),h.addEventListener("mouseup",d,!1),n.isTouchDevice&&h.addEventListener("touchend",d,!1),l.appendChild(h),(h=document.createElement("div")).setAttribute("type","twitter"),h.className="".concat(e.clessPref,"item-button-wrap"),h.id="gmedia_share_tw",(m=document.createElement("div")).className="".concat(e.clessPref,"item-button"),m.innerHTML="".concat(n.ICONS.TW_SVG,'\n <div class="').concat(e.clessPref,'button-title" style="color: #00aced">Twitter</div>'),m.getElementsByTagName("svg")[0].style.fill="#00aced",h.appendChild(m),h.addEventListener("mouseup",d,!1),n.isTouchDevice&&h.addEventListener("touchend",d,!1),l.appendChild(h),(h=document.createElement("div")).setAttribute("type","pinterest"),h.className="".concat(e.clessPref,"item-button-wrap"),h.id="gmedia_share_pin",(m=document.createElement("div")).className="".concat(e.clessPref,"item-button"),m.innerHTML="".concat(n.ICONS.PIN_SVG,'\n <div class="').concat(e.clessPref,'button-title" style="color: #cc2127">Pinterest</div>'),m.getElementsByTagName("svg")[0].style.fill="#cc2127",h.appendChild(m),h.addEventListener("mouseup",d,!1),n.isTouchDevice&&h.addEventListener("touchend",d,!1),l.appendChild(h),(h=document.createElement("div")).setAttribute("type","copy"),h.className="".concat(e.clessPref,"item-button-wrap"),h.id="gmedia_share_link",(m=document.createElement("div")).className="".concat(e.clessPref,"item-copy-link"),m.innerHTML="".concat(n.ICONS.LINK_SVG,'\n <div id="gmSH_title_copy" class="').concat(e.clessPref,'button-title" style="color: #7d7d7d">').concat(a,"</div>"),m.getElementsByTagName("svg")[0].style.fill="#7d7d7d",h.appendChild(m),h.addEventListener("mouseup",d,!1),n.isTouchDevice&&h.addEventListener("touchend",d,!1),l.appendChild(h),i.appendChild(l)}}]),e}(),M=function(){function e(t,i,o){var a=this;S(this,e),this.colors=e.COLOR,n.copyProperties(i,this.colors),this.config=e.CONFIG,n.copyProperties(o,this.config),this.iconsSet=e.ICONS,this.passiveListener=n.passiveListener,this.type=void 0,this.delegate=t,this.appName=t.appName,this.view=document.createElement("div"),this.view.className="".concat(e.clessPref,"window"),this.stageFixedMode=!1,this.closeButton=document.createElement("div"),this.closeButton.className="".concat(e.clessPref,"close-button"),this.closeButton.style.backgroundColor=this.colors.backgroundColor,this.view.addEventListener("click",(function(e){e.target!==a.view&&e.target!==a.closeButton||a.prepareToRemove(e)}),n.passiveListener),this.view.appendChild(this.closeButton);var s=document.createElement("div");s.className="".concat(e.clessPref,"flex"),this.view.appendChild(s),this.scrollView=void 0,this.dragging=!1,this.scrollViewTranslateYPr=0,this.startDragHandler=void 0,this.viewCompleted=!1,this.initForStage(this.config.parentDiv,this.config.fixedMode)}return N(e,null,[{key:"clessPref",get:function(){return"gmedia-modal-"}},{key:"EVENTS",get:function(){return{ITEM_MENU_ACTION:"ITEM_MENU_ACTION"}}},{key:"TYPE",get:function(){return{INFO_BAR:"INFO_BAR",SHARE_BAR:"SHARE_BAR"}}},{key:"CONFIG",get:function(){return{parentDiv:void 0,fixedMode:!1,infoBarDateInfoEnable:!0,infoBarExifEnable:!0,infoBarCountersEnable:!0,infoBarTerms:!1,shareTitle:"Share"}}},{key:"COLOR",get:function(){return{backgroundColor:"rgba(0,0,0,0.8)",buttonBackgroundColor:"rgba(0,0,0,0)",buttonIconColor:"white",pageBgColor:"rgb(230,230,230)",modalInfoBoxTitleTextColor:"black",modalInfoBoxTextColor:"black",infoBarTermsTitleColor:"rgba(255,255,255,1)",infoBarTermsBackgroundColorAlbums:"red",infoBarTermsBackgroundColorCategories:"orange",infoBarTermsBackgroundColorTags:"green"}}}]),N(e,[{key:"getPageByType",value:function(t){var i;switch(t){case e.TYPE.INFO_BAR:i=new I(this.appName,this);break;case e.TYPE.SHARE_BAR:i=new B(this.appName,this)}return i}},{key:"initForStage",value:function(t,i){var o=this;t.appendChild(this.view),this.view.style.zIndex=n.findHighestZIndex(t)+1,i?(n.disableBodyScrollSlider(),this.view.classList.add("".concat(e.clessPref,"fixed-modal")),this.stageFixedMode=!0,document.addEventListener("keydown",o.keydownHandler(),!1)):this.stageFixedMode=!1,setTimeout((function(){o.view.style.opacity="1"}),30)}},{key:"addToStage",value:function(){var e=this,t=document.getElementsByTagName("body")[0];this.view.style.zIndex=n.findHighestZIndex(t)+1,n.disableBodyScrollSlider(),this.delegate.slider?this.delegate.slider.view.appendChild(this.view):t.appendChild(this.view),setTimeout((function(){e.view.style.opacity="1"}),30),document.addEventListener("keydown",e.keydownHandler(),!1)}},{key:"prepareToRemove",value:function(){var e=this;e.view.style.opacity="0",this.stageFixedMode&&(document.removeEventListener("keydown",this.handlerKB,!1),n.enableBodyScrollSlider()),setTimeout((function(){e.view&&e.view.parentNode&&e.view.parentNode.removeChild(e.view),delete e.view,e.delegate.deleteModal()}),400)}},{key:"keydownHandler",value:function(){var e=this;return e.handlerKB=function(t){switch(t.keyCode){case 27:e.prepareToRemove()}},e.handlerKB}},{key:"pushPage",value:function(e){this.viewCompleted=!1,this.scrollView&&this.scrollView.parentNode&&this.scrollView.parentNode.removeChild(this.scrollView),this.view.appendChild(e),this.scrollView=e,this.updateControlls()}},{key:"updateControlls",value:function(){this.scrollView&&(this.viewCompleted||(this.startDragHandler=this.startDrag(),this.scrollView.addEventListener("touchstart",this.startDragHandler,this.passiveListener),this.scrollView.addEventListener("mousedown",this.startDragHandler,!1),this.viewCompleted=!0))}},{key:"startDrag",value:function(){var e,t,i=this,o=0,a=0,s=0,r=0,l=.95,c=1,d=n.requestAnimationFrame,h=n.cancelAnimationFrame;function m(){i.scrollViewTranslateY>0?a=.2*a+.1*(0-i.scrollViewTranslateY):i.scrollViewTranslateY<i.bottom?a=.2*a+.1*(i.bottom-i.scrollViewTranslateY):a*=l,i.scrollViewTranslateY+=a,Math.abs(a)<.04?(i.dragging=!1,h(t)):t=d(m)}function u(t){var n=null;t.originalEvent&&(t=t.originalEvent),t.preventDefault(),n=t.touches&&t.touches[0]?t.touches[0].pageY:t.pageY;var l=e-n;l&&(i.dragging=!0),i.scrollViewTranslateY=o-l,s=r,r=i.scrollViewTranslateY,a=(r-s)*c}function p(e){if(e.preventDefault(),i.scrollView.style.transition="none",n.isTouchDevice&&(document.removeEventListener("touchmove",u,i.passiveListener),document.removeEventListener("touchend",p,i.passiveListener)),document.removeEventListener("mousemove",u,!1),document.removeEventListener("mouseup",p,!1),document.removeEventListener("oncontextmenu",p,!1),i.bottom<=0){if(i.scrollViewTranslateY<i.bottom-50||i.scrollViewTranslateY>50)return void i.prepareToRemove()}else if(i.scrollViewTranslateY<-50||i.scrollViewTranslateY>50)return void i.prepareToRemove();(0!==a||i.scrollViewTranslateY>0||i.scrollViewTranslateY<i.bottom)&&i.dragging&&(t=d(m))}return function(s){if(!s)return a=0,o=i.scrollViewTranslateY,void h(t);var l;(n.isTouchDevice||s.preventDefault(),s.originalEvent&&(s=s.originalEvent),s.button&&0!==s.button)||(a=0,r=i.scrollViewTranslateY,l=s.touches&&s.touches[0]?s.touches[0].pageY:s.pageY,e=l,o=i.scrollViewTranslateY,h(t),n.isTouchDevice&&(document.addEventListener("touchmove",u,i.passiveListener),document.addEventListener("touchend",p,i.passiveListener)),document.addEventListener("mousemove",u,!1),document.addEventListener("mouseup",p,!1),document.addEventListener("oncontextmenu",p,!1))}}},{key:"bottom",get:function(){return this.view.clientHeight-this.scrollView.clientHeight-20}},{key:"scrollViewTranslateY",set:function(e){this.scrollViewTranslateYPr=e,this.scrollView.style.transform="translateY(".concat(e,"px)");var t=Math.max(n.moduleSettings(this.appName).modalBgAlpha-Math.abs(e/200),0);this.closeButton.style.opacity=t},get:function(){return this.scrollViewTranslateYPr}}]),e}();function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function P(e,t){return!t||"object"!==_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function O(e,t,i){return(O="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var o=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=z(e)););return e}(e,t);if(o){var a=Object.getOwnPropertyDescriptor(o,t);return a.get?a.get.call(i):a.value}})(e,t,i||e)}function z(e){return(z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function V(e,t){return(V=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function R(e,t,i){return t&&H(e.prototype,t),i&&H(e,i),e}!function(){console.log("%c Gmedia Gallery Amron v.3.1","background: #222; color: #bada55");var e="gmedia-amron-",t=n.trace,i=n.moduleSettings,o={REQUEST_START:"REQUEST_START",COLLECTION_DATA_REDY:"COLLECTION_DATA_REDY",COUNTERS_UPDATED:"COUNTERS_UPDATED",NEED_MODAL:"NEED_MODAL",NEED_LIGHTBOX:"NEED_LIGHTBOX",REMOVE_LIGHTBOX:"REMOVE_LIGHTBOX",NEED_NEW_COLLECTION:"NEED_NEW_COLLECTION",NEED_PREV_COLLECTION:"NEED_PREV_COLLECTION",NEED_NEW_COLLECTION_BY_TERM:"NEED_NEW_COLLECTION_BY_TERM",FULLSCREEN_SWITCH:"FULLSCREEN_SWITCH"},a=function(){function t(i){A(this,t),this.delegate=i,this.appName=i.appName,this.id="".concat(this.appName,"_tag_"),this.view=document.createElement("div"),this.view.className="".concat(e,"collection-tags-cloud"),this.list=document.createElement("ul"),this.view.appendChild(this.list)}return R(t,[{key:"updateView",value:function(){var e=this.delegate.tagsCloud,t=[],o=[];for(var a in e)"0"!==a&&t.push(e[a].toLowerCase());t.sort(),t.splice(0,0,e[0].toLowerCase());for(var n=0;n<t.length;n++)for(var s in e)if(e[s].toLowerCase()!==t[n]);else{var r=this.createTag(s,e[s]);o.push(r),this.list.appendChild(r),delete e[s]}this.selectedTag=document.getElementById(this.id+this.delegate.filtredById),this.selectedTag.style.backgroundColor=i(this.appName).tagCloudTextColor,this.selectedTag.style.color=i(this.appName).tagCloudBgColor,this.selectedTag.style.cursor="default"}},{key:"createTag",value:function(e,t){var o=this;function a(e){var t=this.id.split("_")[this.id.split("_").length-1];if(o.selectedTag!==this)switch(e.type){case"click":o.selectedTag=document.getElementById(o.id+o.delegate.filtredById),o.selectedTag.style.color=i(o.appName).tagCloudTextColor,o.selectedTag.style.backgroundColor=i(o.appName).tagCloudBgColor,o.selectedTag.style.cursor="pointer",o.delegate.filtred(t),o.selectedTag=document.getElementById(o.id+o.delegate.filtredById),o.selectedTag.style.cursor="default";break;case"mouseenter":this.style.backgroundColor=i(o.appName).tagCloudTextColor,this.style.color=i(o.appName).tagCloudBgColor;break;case"mouseleave":if(this===o.selectedTag)return;this.style.color=i(o.appName).tagCloudTextColor,this.style.backgroundColor=i(o.appName).tagCloudBgColor}}var n=document.createElement("li");return n.appendChild(document.createTextNode(t)),n.id=this.id+e,n.style.color=i(this.appName).tagCloudTextColor,n.style.backgroundColor=i(this.appName).tagCloudBgColor,n.addEventListener("click",a,!1),n.addEventListener("mouseenter",a,!1),n.addEventListener("mouseleave",a,!1),n}}]),t}(),s=function(){function t(o,a){A(this,t),this.delegate=o,this.appName=o.appName,this.index=a,this.view=document.createElement("div"),this.view.className="".concat(e,"masonry-thumb-pint"),this.view.style.padding="".concat(i(this.appName).thumbSpacing/2,"px"),this.imageHolder=document.createElement("div"),this.imageHolder.className="".concat(e,"image-holder"),this.view.appendChild(this.imageHolder),this.sizePr=n.Size(1,1),this.item=void 0,this.imageRetio=1,this.opacityDelay=void 0,this.displayPr="none"}return R(t,[{key:"init",value:function(){var t=this.delegate.itemsList[this.index];this.item=t;var o=this.delegate.itemWidth;this.type=t.type,this.itemViewSrc=!1,this.img=new Image;var a,s=this;if(this.img.onload=function(){this.setAttribute("alt",t.title),s.view.clientWidth/this.naturalWidth>1.1&&t.itemViewSrc&&!s.itemViewSrc&&(this.src=t.itemViewSrc,s.itemViewSrc=!0),s.imageHolder.style.minHeight=null,this.style.opacity="1"},this.imageHolder.appendChild(this.img),i(this.appName).lightBoxEnable){(a=document.createElement("div")).className="".concat(e,"image-over"),a.style.backgroundColor=i(this.appName).collectionThumbHoverColor,this.imageHolder.appendChild(a);var r=document.createElement("div");switch(r.className="".concat(e,"zoom"),this.item.type){case"video":"vimeo"===this.item.mime_type.split("/")[1]?(r.classList.add("media"),r.innerHTML=n.ICONS.VIMEO_SVG,r.firstChild.style.fill="#00adef"):(r.classList.add("media"),r.innerHTML=n.ICONS.YOU_TUBE_SVG,r.firstChild.style.fill="#e02f2f");break;case"audio":r.classList.add("media"),r.innerHTML=n.ICONS.NOTE_SVG,r.firstChild.style.fill="#7a7a7a";break;default:r.innerHTML=n.ICONS.MAXIMIZE_SVG}this.imageHolder.appendChild(r)}function l(e){if(i(s.appName).lightBoxEnable)switch(e.type){case"mouseenter":this.classList.add("gmedia-hover"),a&&a.classList.add("gmedia-hover");break;case"mouseleave":this.classList.remove("gmedia-hover"),a&&a.classList.remove("gmedia-hover");break;case"click":this.classList.remove("gmedia-hover"),a&&a.classList.remove("gmedia-hover"),s.delegate.itemAction(s.index,"lightBox")}}this.imageHolder.addEventListener("mouseenter",l,!1),this.imageHolder.addEventListener("mouseleave",l,!1),this.imageHolder.addEventListener("click",l,!1),o/t.itemViewThumbSize.width>1.1?this.img.src=t.itemViewSrc:this.img.src=t.itemViewThumbSrc,this.imageRetio=t.itemViewSize.height/t.itemViewSize.width,this.imageHolder.style.minHeight="".concat(this.imageRetio*o,"px");var c,d=document.createElement("div");if(d.className="".concat(e,"item-content"),d.style.backgroundColor=i(this.appName).collectionThumbContentBGColor,this.view.appendChild(d),i(this.appName).collectionThumbTitleShow&&t.title&&""!==t.title&&((c=document.createElement("div")).className="".concat(e,"item-title"),c.style.fontSize="".concat(i(this.appName).collectionThumbFontSize,"px"),c.style.color=i(this.appName).collectionThumbTitleColor,c.innerHTML=t.title,d.appendChild(c)),i(this.appName).collectionThumbDescriptionShow&&t.description&&""!==t.description){var h=document.createElement("div");h.className="".concat(e,"item-description"),h.style.fontSize="".concat(i(this.appName).collectionThumbDescriptionFontSize,"px"),h.style.color=i(this.appName).collectionThumbDescriptionColor,h.innerHTML=t.description,d.appendChild(h)}var m=document.createElement("div");m.className="".concat(e,"item-menu-holder");var u=i(this.appName).collectionThumbSubMenuIconColor,p=i(this.appName).collectionThumbSubMenuBackgroundColor,g=i(this.appName).collectionThumbSubMenuBackgroundColorOver,v=i(this.appName).collectionThumbSubMenuIconHoverColor;function f(e){e.classList.remove("gmedia-hover"),"like"===e.getAttribute("type")&&e.getAttribute("like")||"bookmark"===e.getAttribute("type")&&e.getAttribute("mark")?e.style.backgroundColor=p:(e.style.backgroundColor=p,e.childNodes[0].style.fill=u)}if(t.link){var w=document.createElement("a");w.className="".concat(e,"item-read-more"),w.innerHTML=i(this.appName).collectionReadMoreButtonLabel,w.style.backgroundColor=i(this.appName).collectionReadMoreButtonBGColor,w.style.color=i(this.appName).collectionReadMoreButtonLabelColor,w.setAttribute("target",i(this.appName).linkTargetWindow),w.setAttribute("href",t.link),w.onmouseenter=function(){this.style.backgroundColor=i(s.appName).collectionReadMoreButtonBGColorHover,this.style.color=i(s.appName).collectionReadMoreButtonLabelColorHover},w.onmouseleave=function(){this.style.backgroundColor=i(s.appName).collectionReadMoreButtonBGColor,this.style.color=i(s.appName).collectionReadMoreButtonLabelColor},w.addEventListener("click",(function(e){if("click"===e.type){if(!t)return;s.delegate.itemAction(s.index,this.getAttribute("type")),n.miniScreen&&f(this)}else"mouseenter"===e.type?((i=this).classList.add("gmedia-hover"),i.style.backgroundColor=g,"bookmark"===i.getAttribute("type")&&i.getAttribute("mark")||(i.childNodes[0].style.fill=v)):"mouseleave"===e.type&&f(this);var i}),!1),m.appendChild(w)}m.childNodes.length>0&&d.appendChild(m)}},{key:"resize",value:function(){return this.view.clientHeight}},{key:"updateSomeData",value:function(){}},{key:"mark",set:function(e){this.bookmarkButton&&(e?(this.bookmarkButton.getElementsByTagName("svg")[0].style.fill="red",this.bookmarkButton.setAttribute("mark","true")):(this.bookmarkButton.getElementsByTagName("svg")[0].style.fill=this.bookmarkButton.classList.contains("gmedia-hover")?i(this.appName).collectionThumbSubMenuIconHoverColor:i(this.appName).collectionThumbSubMenuIconColor,this.bookmarkButton.removeAttribute("mark")))},get:function(){return!!this.bookmarkButton}},{key:"like",set:function(e){this.likeButton&&(e?(this.likeButton.getElementsByTagName("svg")[0].style.fill="red",this.likeButton.style.cursor="default",this.likeButton.style.pointerEvents="none",this.likeButton.setAttribute("like","true")):(this.likeButton.childNodes[0].style.fill=this.iconColor,this.likeButton.style.cursor="pointer",this.likeButton.style.pointerEvents="all",this.likeButton.removeAttribute("like")))},get:function(){return!!this.likeButton}},{key:"visibility",set:function(e){this.view.style.visibility=e}},{key:"display",set:function(e){"none"===e&&clearTimeout(this.opacityDelay),this.view.style.display=e,this.displayPr=e},get:function(){return this.displayPr}},{key:"opacity",set:function(e){var t=this;e.delay?this.opacityDelay=setTimeout((function(){t.view.style.opacity=e.opacity}),e.delay):(clearTimeout(this.opacityDelay),t.view.style.opacity=e.opacity)}}]),t}(),r=function(t){function o(t,a){var n;return A(this,o),(n=P(this,z(o).call(this,t,a))).view.className="".concat(e,"masonry-collection"),n.header.style.padding="0 ".concat(i(a).thumbSpacing/2,"px"),n.content.style.paddingBottom="".concat(i(a).thumbSpacing,"px"),n.columnsArr=[],n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&V(e,t)}(o,t),R(o,[{key:"updateViewByData",value:function(){if(this.itemsList)for(var e=0;e<this.itemsList.length;e++){var t=new s(this,e);this.itemsList[e].view=t,t.init()}i(this.appName).tagsFilter&&this.updateTagsCloud(),this.createLayout()}},{key:"createLayout",value:function(){O(z(o.prototype),"createLayout",this).call(this),this.createColumns(),this.addPageToStage()}},{key:"updateLayout",value:function(){if(!1!==this.createColumns()){this.removePresentedItems();for(var e=0;e<this.presentedList.length;e++)this.arangeItemToColum(this.presentedList[e])}else this.presentedList&&this.presentedList[0]&&"none"===this.presentedList[0].display&&this.showPresentedItems()}},{key:"createColumns",value:function(){var t=Math.floor(this.content.clientWidth/Math.min(this.content.clientWidth,i(this.appName).collectionThumbRecomendedWidth));if(this.columnsArr.length!==t){for(var o=0;o<this.columnsArr.length;o++)this.content.removeChild(this.columnsArr[o]);this.columnsArr=[];for(var a=0;a<t;a++){var n=document.createElement("div");n.className="".concat(e,"collection-column"),n.style.width="".concat(100/t,"%"),this.columnsArr.push(n),this.content.appendChild(n)}return!0}return!1}},{key:"scrollHandlerFunction",value:function(){var e=this;return function(){e.bottomSpace<200&&e.addPageToStage()}}},{key:"addPageToStage",value:function(){void 0===this.cureantPage&&(this.cureantPage=0),clearTimeout(this.layoutSizerDelay);var e=Math.ceil(this.filteredCollection.length/this.page_Amount);if(!(this.cureantPage>=e)){for(var t=this.cureantPage*this.page_Amount,i=Math.min(t+this.page_Amount,this.filteredCollection.length),o=1,a=t;a<i;a++){var n=this.filteredCollection[a].view;n.index=a,n.opacity={opacity:0,delay:0},this.addItemToStage(n),n.opacity={opacity:1,delay:100*o},o+=1}this.cureantPage+=1;var s=this;this.layoutSizerDelay=setTimeout((function(){s.bottomSpace<200&&s.addPageToStage()}),1e3)}}},{key:"getColumWithMinHeight",value:function(){for(var e=this.columnsArr[0].clientHeight,t=0,i=1;i<this.columnsArr.length;i++)e!==Math.min(e,this.columnsArr[i].clientHeight)&&(e=Math.min(e,this.columnsArr[i].clientHeight),t=i);return t}},{key:"arangeItemToColum",value:function(e){var t=e.view;this.columnsArr[this.getColumWithMinHeight()].appendChild(t),e.display="block"}},{key:"addItemToStage",value:function(e){this.arangeItemToColum(e),this.presentedList.push(e)}},{key:"bottomSpace",get:function(){var e=this.content.getBoundingClientRect(),t=window.innerHeight;return e.bottom-t}},{key:"itemWidth",get:function(){var e=Math.floor(this.content.clientWidth/i(this.appName).collectionThumbRecomendedWidth);return this.content.clientWidth/e}}]),o}(function(){function s(t,o){A(this,s),this.delegate=t,this.appName=o,this.properties=void 0,this.itemsList=[],this.filteredList=[],this.presentedList=[],this.page_Amount=0,this.cureantPage=void 0,this.scrollHandler=void 0,this.terms=[],this.term=void 0,this.tagsCloud=i(this.appName).tagsFilter?{0:i(this.appName).tagCloudAll}:void 0,this.filterPr=0,this.view=document.createElement("div"),this.header=document.createElement("div"),this.headerNavi=document.createElement("div"),this.content=document.createElement("div"),this.footer=document.createElement("div"),this.tagsCloudView=void 0,this.header.className="".concat(e,"header"),this.content.className="".concat(e,"content"),this.footer.className="".concat(e,"footer"),this.headerNavi.className="".concat(e,"navi"),this.header.appendChild(this.headerNavi),this.view.appendChild(this.header),this.view.appendChild(this.content),this.view.appendChild(this.footer),this.resizeTimeOut=void 0,this.viewWidth=0}return R(s,[{key:"init",value:function(){this.showPreloader(!0)}},{key:"startRequest",value:function(e){this.query=e,this.query.per_page=0,this.query.page=1,i(this.appName).appEventManager.addGMEventListener(o.COLLECTION_DATA_REDY,this,"dataLoaded"),n.request(JSON.stringify({library:this.query}),this,o.COLLECTION_DATA_REDY)}},{key:"showPreloader",value:function(e){var t,o=this;if(e){if(document.getElementById("".concat(this.appName,"_preloader")))return;(t=n.createPreloaderView(n.hexToRgbaStrin(i(this.appName).collectionPreloaderColor,.7))).id="".concat(this.appName,"_preloader"),this.view.appendChild(t)}else document.getElementById("".concat(this.appName,"_preloader"))&&(t=document.getElementById("".concat(this.appName,"_preloader")),n.fadeOut(t,(function(){o.view&&o.view.removeChild(t)}),500))}},{key:"dataLoaded",value:function(e){var o=e.params.data;if(o){try{var a=JSON.parse(o);a.data&&(this.addItemsToCollection(a.data),this.trySortItemsByTerms()),i(this.appName).lightBoxEnable&&this.delegate.startItem&&this.tryOpenLightboxForID(this.delegate.startItem)}catch(e){t(e)}this.showPreloader(!1),this.itemsList&&this.updateViewByData()}}},{key:"tryOpenLightboxForID",value:function(e){for(var t=0;t<this.filteredCollection.length;t++){var a=this.filteredCollection[t];e===parseInt(a.ID)&&(i(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(o.NEED_LIGHTBOX,this,{collection:this,index:t})),t=this.filteredCollection.length)}}},{key:"createTermsCollectionAndUpdateProperties",value:function(e){this.properties||(this.properties={});var t=this,i=[];function o(e){var o={};for(var a in e)if(e[a]){var s=n.Term(e[a],t.appName);if(o[s.term_id]=s,s.itemsList=[],t.itemsList)for(var r=0;r<t.itemsList.length;r++){var l=t.itemsList[r];if(l[s.taxonomy_type]){var c=l[s.taxonomy_type];for(var d in c)c[d].term_id===s.term_id&&(s.itemsList.push(l),i.push(l),t.itemsList.splice(r,1),r-=1)}}return o}}for(var a in this.terms=[],e)!e[a]||"album__in"!==a&&"category__in"!==a&&"tag__in"!==a?this.properties[a]=e[a]:this.terms.push(o(e[a]));this.itemsList=i.concat(this.itemsList)}},{key:"addItemsToCollection",value:function(e){for(var t=0;t<e.length;t++){var i=n.Item(e[t],this.appName);if(i.index=this.itemsList.length+t,i.tags&&i.tags.length>0)for(var o=0;o<i.tags.length;o++){var a=i.tags[o];this.tagsCloud&&(this.tagsCloud[a.term_id]=a.name)}this.itemsList.push(i)}}},{key:"trySortItemsByTerms",value:function(){if(this.queryTermsList=n.termsListFromAppQuery(this.query),this.itemsList&&this.queryTermsList){for(var e=[],t=0;t<this.queryTermsList.length;t++)for(var i=this.queryTermsList[t],o=0;o<this.itemsList.length;o++){var a=this.itemsList[o];if(a[i.taxonomy_type]){var s=a[i.taxonomy_type];for(var r in s)s[r].term_id===i.term_id&&(e.push(a),this.itemsList.splice(o,1),o-=1)}}this.itemsList=e.concat(this.itemsList)}}},{key:"itemAction",value:function(e,t){if(!this.dragging){var a,s=this.filteredCollection[e];switch(t){case"lightBox":i(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(o.NEED_LIGHTBOX,this,{collection:this,index:e}));break;case"share":i(this.appName).appEventManager.dispatchGMEvent(n.GMEvent(o.NEED_MODAL,this,{type:"share",item:s}));break;case"link":s.link&&window.open(s.link,i(this.appName).linkTargetWindow);break;case"coments":a="".concat(s.sharelink,"/#comments"),window.open(a,i(this.appName).linkTargetWindow);break;case"like":this.delegate.likeItem=s;break;case"bookmark":this.delegate.bookmarkItem=s}}}},{key:"refteshDataInItem",value:function(){for(var e=0;e<this.filteredCollection.length;e++){this.filteredCollection[e].view.updateSomeData()}}},{key:"activate",value:function(){this.updateLayout(),this.scrollHandler=this.scrollHandlerFunction(),this.scrollHandler&&window.addEventListener("scroll",this.scrollHandler,!1)}},{key:"deactivate",value:function(){i(this.appName).appEventManager.removeGMEventListener(o.COLLECTION_DATA_REDY,this,"dataLoaded"),window.removeEventListener("scroll",this.scrollHandler,!1),this.scrollHandler=void 0}},{key:"removeItemViewFormStage",value:function(){this.removePresentedItems(),this.presentedList=[],this.cureantPage=void 0}},{key:"removePresentedItems",value:function(){for(var e=0;e<this.presentedList.length;e++)this.presentedList[e].display="none"}},{key:"showPresentedItems",value:function(){for(var e=0;e<this.presentedList.length;e++)this.presentedList[e].display="block"}},{key:"createLayout",value:function(){this.scrollHandler||(this.scrollHandler=this.scrollHandlerFunction(),this.scrollHandler&&window.addEventListener("scroll",this.scrollHandler,!1)),this.page_Amount=Math.min(20,this.filteredCollection.length)}},{key:"scrollHandlerFunction",value:function(){return!1}},{key:"resize",value:function(){var e=this;clearTimeout(this.resizeTimeOut),n.isTouchDevice?this.resizeTimeOut=setTimeout((function(){e.resizeDelay()}),150):this.resizeDelay()}},{key:"resizeDelay",value:function(){this.viewWidth!==this.view.clientWidth&&(this.updateLayout(),this.viewWidth=this.view.clientWidth)}},{key:"filtred",value:function(e){window.removeEventListener("scroll",this.scrollHandler,!1),this.scrollHandler=void 0,this.removeItemViewFormStage(),this.filtredById=e,this.createLayout()}},{key:"updateTagsCloud",value:function(){0!==this.filteredCollection.length&&(this.tagsCloudView||(this.tagsCloudView=new a(this),this.header.appendChild(this.tagsCloudView.view)),this.tagsCloud&&this.tagsCloudView.updateView())}},{key:"filtredById",set:function(e){if(this.itemsList&&(this.filteredList=[],this.filterPr=e,0!==e))for(var t=0;t<this.itemsList.length;t++){var i=this.itemsList[t];i.hasTag(e)&&this.filteredList.push(i)}},get:function(){return this.filterPr}},{key:"filteredCollection",get:function(){return this.filteredList.length>0?this.filteredList:this.itemsList}}]),s}()),l=function(){function e(t,o,a){if(A(this,e),n.copyProperties(t,this),this.appApi){this.appName=o,this.appDiv=a,this.modal=void 0;var s=this.settings;if(s&&(i(this.appName).appApi=this.appApi,i(this.appName).post_url=s.post_url,i(this.appName).galleryID="gm".concat(a.getAttribute("data-gmid")),i(this.appName).appEventManager=n.GMEventsManager(),i(this.appName).cacheItemsList=n.CacheItemsList(),i(this.appName).key=!0,i(this.appName).lightBoxEnable="1"===s.lightBoxEnable,i(this.appName).thumbSpacing=parseInt(s.thumbSpacing),i(this.appName).collectionPreloaderColor="#".concat(s.collectionPreloaderColor),i(this.appName).linkTargetWindow=s.linkTargetWindow,i(this.appName).infoBarTermsClickNewPageEnable="1"===s.infoBarTermsClickNewPageEnable,i(this.appName).tagsFilter="1"===s.tagsFilter,i(this.appName).tagCloudAll=s.tagCloudAll,i(this.appName).tagCloudTextColor="#".concat(s.tagCloudTextColor),i(this.appName).tagCloudBgColor="#".concat(s.tagCloudBgColor),i(this.appName).collectionThumbRecomendedWidth=parseInt(s.collectionThumbRecomendedWidth),i(this.appName).collectionThumbHoverColor=s.collectionThumbHoverColor,i(this.appName).collectionThumbContentBGColor="rgba(245,245,245,1)",i(this.appName).collectionThumbTitleShow="1"===s.collectionThumbTitleShow,i(this.appName).collectionThumbTitleColor=s.collectionThumbTitleColor,i(this.appName).collectionThumbFontSize=parseInt(s.collectionThumbFontSize),i(this.appName).collectionThumbDescriptionShow="1"===s.collectionThumbDescriptionShow,i(this.appName).collectionThumbDescriptionColor=s.collectionThumbDescriptionColor,i(this.appName).collectionThumbDescriptionFontSize=parseInt(s.collectionThumbDescriptionFontSize),i(this.appName).collectionThumbSubMenuBackgroundColor=s.collectionThumbSubMenuBackgroundColor,i(this.appName).collectionThumbSubMenuBackgroundColorOver=s.collectionThumbSubMenuBackgroundColorOver,i(this.appName).collectionThumbSubMenuIconColor=s.collectionThumbSubMenuIconColor,i(this.appName).collectionThumbSubMenuIconHoverColor=s.collectionThumbSubMenuIconHoverColor,i(this.appName).collectionReadMoreButtonBGColor=s.collectionReadMoreButtonBGColor,i(this.appName).collectionReadMoreButtonLabelColor=s.collectionReadMoreButtonLabelColor,i(this.appName).collectionReadMoreButtonBGColorHover=s.collectionReadMoreButtonBGColorHover,i(this.appName).collectionReadMoreButtonLabelColorHover=s.collectionReadMoreButtonLabelColorHover,i(this.appName).collectionReadMoreButtonLabel=s.collectionReadMoreButtonLabel,i(this.appName).modaBgColor=s.modaBgColor,i(this.appName).modalInfoBoxBgColor=s.modalInfoBoxBgColor,i(this.appName).modalInfoBoxTitleTextColor="#".concat(s.modalInfoBoxTitleTextColor),i(this.appName).modalInfoBoxTextColor="#".concat(s.modalInfoBoxTextColor),i(this.appName).infoBarCountersEnable="1"===s.infoBarCountersEnable,i(this.appName).infoBarDateInfoEnable="1"===s.infoBarDateInfoEnable,i(this.appName).shareTitlePlaceHolder=s.shareTitlePlaceHolder,i(this.appName).sliderThumbBarEnable="1"===s.sliderThumbBarEnable,i(this.appName).sliderThumbBarHoverColor=s.sliderThumbBarHoverColor,i(this.appName).sliderPreloaderColor="#".concat(s.sliderPreloaderColor),i(this.appName).sliderBgColor=s.sliderBgColor,i(this.appName).sliderHeaderFooterBgColor="#".concat(s.sliderHeaderFooterBgColor),i(this.appName).sliderNavigationColor=s.sliderNavigationColor,i(this.appName).sliderNavigationIconColor=s.sliderNavigationIconColor,i(this.appName).sliderItemTitleFontSize=parseInt(s.sliderItemTitleFontSize),i(this.appName).sliderItemTitleTextColor="#".concat(s.sliderItemTitleTextColor),i(this.appName).sliderThumbSubMenuBackgroundColor=s.sliderThumbSubMenuBackgroundColor,i(this.appName).sliderThumbSubMenuBackgroundColorOver=s.sliderThumbSubMenuBackgroundColorOver,i(this.appName).sliderThumbSubMenuIconColor=s.sliderThumbSubMenuIconColor,i(this.appName).sliderThumbSubMenuIconHoverColor=s.sliderThumbSubMenuIconHoverColor,i(this.appName).sliderInfoEnable="1"===s.sliderInfoEnable,i(this.appName).sliderItemDownload="1"===s.sliderItemDownload,i(this.appName).sliderItemDiscuss="1"===s.sliderItemDiscuss,i(this.appName).sliderSocialShareEnabled="1"===s.sliderSocialShareEnabled,i(this.appName).sliderLikesEnabled="1"===s.sliderLikesEnabled),this.audioPlayer=void 0,this.bookmarkStatusShow=i(this.appName).bookmarkShowState,i){this.currentLocation=void 0,this.collections=[],this.terms={},this.appDiv.style.position="relative",this.appDiv.style.height="auto",this.appDivWidth=this.appDiv.clientWidth;var l=new r(this,this.appName);this.collections.push(l),this.appDiv.appendChild(l.view),l.init(),this.startApp()}}}return R(e,[{key:"startApp",value:function(){var e=this;i(this.appName).appEventManager.addGMEventListener(o.NEED_NEW_COLLECTION,this,"pushNewCollectionByTermID"),i(this.appName).appEventManager.addGMEventListener(o.NEED_NEW_COLLECTION_BY_TERM,this,"pushNewCollectionByTerm"),i(this.appName).appEventManager.addGMEventListener(o.NEED_MODAL,this,"createModal"),i(this.appName).lightBoxEnable&&(i(this.appName).appEventManager.addGMEventListener(o.NEED_LIGHTBOX,this,"createLightbox"),i(this.appName).appEventManager.addGMEventListener(o.REMOVE_LIGHTBOX,this,"removeLightbox"),i(this.appName).appEventManager.addGMEventListener(o.FULLSCREEN_SWITCH,this,"fullscreenSwitch")),this.viewsSet={},i(this.appName).appEventManager.addGMEventListener(o.COUNTERS_UPDATED,this,"itemsCountersUpdateHandler"),this.likesSet={},window.localStorage.getItem("gm_likesSet")&&(this.likesSet=JSON.parse(window.localStorage.getItem("gm_likesSet"))),window.addEventListener("resize",(function(){e.windowResizeHandler(e)})),this.popstateHandler=function(){(e.modal&&e.modal.prepareToRemove(),e.lightbox)?e.lightbox.prepareToRemove():e.collections.length>0&&e.collections[e.collections.length-1]&&e.itemFromHash&&e.collections[e.collections.length-1].tryOpenLightboxForID(e.itemFromHash)},window.addEventListener("popstate",this.popstateHandler,!1),this.itemFromHash&&(this.startItem=this.itemFromHash,window.history.replaceState(null,null,window.location.pathname+window.location.search)),this.appQuery&&(this.createAudioPlayer(),this.collections[0].startRequest(this.appQuery))}},{key:"itemHash",value:function(e){return"#".concat(this.appName,"-").concat(e.ID)}},{key:"addCollectioByQuery",value:function(e){var t=0;if(this.modal&&(this.modal.prepareToRemove(),t=500),this.lightbox&&(this.lightbox.prepareToRemove(),t=500),this.collections.length>0&&this.collections[this.collections.length-1]){var i=this.collections[this.collections.length-1];i.deactivate(),i.view.parentNode&&this.appDiv.removeChild(i.view)}if(document.body.scrollTop>this.appDiv.getBoundingClientRect().top){var o=document.body.getBoundingClientRect(),a=this.appDiv.getBoundingClientRect().top-o.top-(n.isTouchDevice?0:50);n.scrollToY(a,500)}var s=this;!e.s&&this.searchForm&&this.searchForm.clear(),setTimeout((function(){var t=new r(s,s.appName,e);s.collections.push(t),s.appDiv.appendChild(t.view),t.init()}),t)}},{key:"pushNewCollectionByTerm",value:function(e){if(e.params||e.params.term){var t=e.params.term;t.sharelink&&window.open(t.sharelink,"_self")}}},{key:"termLinkForTerm",value:function(e,t){return"".concat(i(this.appName).post_url,"/?").concat(i(this.appName).galleryID,"[").concat(t,"]=").concat(e)}},{key:"pushNewCollectionByTermID",value:function(e){if(e.params||e.params.term_id||!e.params.taxonomy){var t=e.params.term_id,i=e.params.taxonomy,o=this.termLinkForTerm(t,i);window.open(o,"_self")}}},{key:"itemsCountersUpdate",value:function(){if(this.viewsSet){var e=[];for(var t in this.viewsSet)this.viewsSet[t]&&e.push(t);if(e.length>0){var i={likes:[],views:e},a=JSON.stringify({counter:i});n.request(a,this,o.COUNTERS_UPDATED),this.viewsSet={}}}}},{key:"itemsCountersUpdateHandler",value:function(){window.localStorage.setItem("gm_likesSet",JSON.stringify(this.likesSet))}},{key:"createLightbox",value:function(e){if(e.params||e.params.collection){var t=e.params.collection,o=e.params.index,a=t.filteredCollection[o];this.lightbox&&this.lightbox.prepareToRemove(),window.localStorage.getItem("gm_likesSet")&&(this.likesSet=JSON.parse(window.localStorage.getItem("gm_likesSet")));var n=E.CONFIG;n.backgroundColor=i(this.appName).sliderBgColor,n.headerFooterColor=i(this.appName).sliderHeaderFooterBgColor,n.preloaderColor=i(this.appName).sliderPreloaderColor,n.sliderNavigationColor=i(this.appName).sliderNavigationColor,n.sliderNavigationIconColor=i(this.appName).sliderNavigationIconColor,n.itemTitleEnable=!0,n.itemTitleFontSize=i(this.appName).sliderItemTitleFontSize,n.itemTitleTextColor=i(this.appName).sliderItemTitleTextColor,n.thumbBarEnable=!0,n.zoom=!0,n.itemInfoEnable=i(this.appName).sliderInfoEnable,n.itemShare=i(this.appName).sliderSocialShareEnabled,n.itemDownload=i(this.appName).sliderItemDownload,n.itemLike=i(this.appName).sliderLikesEnabled,n.discuss=i(this.appName).sliderItemDiscuss,n.menuBackgroundColor=i(this.appName).sliderThumbSubMenuBackgroundColor,n.menuBackgroundColorOver=i(this.appName).sliderThumbSubMenuBackgroundColorOver,n.menuIconColor=i(this.appName).sliderThumbSubMenuIconColor,n.menuIconColorOver=i(this.appName).sliderThumbSubMenuIconHoverColor,n.slideshowEneble=!0,n.slideshowIndicatorColor="rgba(255,255,255,1)",n.slideshowIndicatorColorBg="rgba(255,255,255,0.6)",n.slideshowTimer=8,this.lightbox=new E(this,n),this.lightbox.initByList(t.filteredCollection,o);var s=this.itemHash(a);window.location.hash!==s&&window.history.pushState(null,null,s)}}},{key:"updateItemLink",value:function(e){window.history.replaceState(null,null,this.itemHash(e))}},{key:"removeLightbox",value:function(e){if(e.target===this.lightbox){var t=this,i=e.target;setTimeout((function(){i.view&&i.view.parentNode&&i.view.parentNode.removeChild(i.view),t.lightbox&&(t.lightbox=void 0)}),100),this.itemsCountersUpdate(),this.itemFromHash&&window.history.back()}}},{key:"createModal",value:function(e){if(e.params.type&&e.params.item){var t,o=e.params.item,a=M.COLOR;a.backgroundColor=i(this.appName).modaBgColor,a.buttonIconColor=i(this.appName).modalInfoBoxTitleTextColor,a.pageBgColor=i(this.appName).modalInfoBoxBgColor,a.modalInfoBoxTitleTextColor=i(this.appName).modalInfoBoxTitleTextColor,a.modalInfoBoxTextColor=i(this.appName).modalInfoBoxTextColor;var n=M.CONFIG;n.infoBarDateInfoEnable=i(this.appName).infoBarDateInfoEnable,n.infoBarExifEnable=!0,n.infoBarCountersEnable=i(this.appName).infoBarCountersEnable,n.infoBarTerms=!0;var s=document.getElementsByTagName("body")[0];switch(n.parentDiv=this.lightbox?this.lightbox.view:s,n.fixedMode=!this.lightbox,this.modal||(this.modal=new M(this,a,n)),e.params.type){case"share":t=this.modal.getPageByType(M.TYPE.SHARE_BAR);break;case"info":t=this.modal.getPageByType(M.TYPE.INFO_BAR)}t.item=o,this.modal.pushPage(t.view)}}},{key:"deleteModal",value:function(){this.modal&&delete this.modal}},{key:"fullscreenSwitch",value:function(){var e=this.lightbox.view;e&&(n.toggleFullScreen(e),this.windowResizeHandler())}},{key:"windowResizeHandler",value:function(){this.bookmarkBox&&this.collectionTranslateY!==this.bookmarkBox.height&&(this.collectionTranslateY=this.bookmarkBox.height,this.showBookmarkInfo(this.bookmarkStatusShow)),this.collections.length>0&&this.collections[this.collections.length-1].resize(),this.lightbox&&this.lightbox.resizeHandler()}},{key:"createAudioPlayer",value:function(){var e,t=this;function i(e){t.slider&&t.slider.audioPlayerHandler(e)}null!=(e=document.getElementById("gmAudioPlayer")?document.getElementById("gmAudioPlayer"):new Audio)&&e.canPlayType&&e.canPlayType("audio/mpeg")&&(e.id="gmAudioPlayer",e.setAttribute("type","audio/mpeg"),e.setAttribute("codecs","mp3"),this.audioPlayer=e,this.appDiv.appendChild(this.audioPlayer),e.addEventListener("ended",i,!1),e.addEventListener("pause",i,!1),e.addEventListener("play",i,!1),e.addEventListener("durationchange",i,!1))}},{key:"itemFromHash",get:function(){var e,t=window.location.hash.indexOf(this.appName);return t+1&&(e=window.location.hash.substr(t).split("-").length>=2?parseInt(window.location.hash.substr(t).split("-")[1]):void 0),e}},{key:"likeItem",set:function(e){if(e){e.meta.likes||(e.meta.likes=0),e.meta.likes=parseInt(e.meta.likes)+1,e.view&&e.view.like&&(e.view.like=!0);var t=e.ID;if(!this.likesSet[t]){this.likesSet[t]="like",this.viewsSet[t]&&delete this.viewsSet[t];var i={likes:[t],views:[t]},a=JSON.stringify({counter:i});n.request(a,this,o.COUNTERS_UPDATED),window.localStorage.setItem("gm_likesSet",JSON.stringify(this.likesSet))}}}},{key:"viewItem",set:function(e){var t=e.ID;this.updateItemLink(e),this.viewsSet[t]="view"}}]),e}();!function(){for(var e=document.body.getElementsByClassName("amron_module"),t=0;t<e.length;t++){var i=e[t].id;window[i]=new l(window[i],i,e[t])}}()}()}]);
readme.txt CHANGED
@@ -134,6 +134,10 @@ Use [Gmedia Support Forum](https://codeasily.com/community/forum/gmedia-gallery-
134
  = Modules Updated =
135
  * Go to Gmedia Modules page and update installed premium modules to latest versions
136
 
 
 
 
 
137
  = v1.16.6 =
138
  * Updated Amron module.
139
  * Small fixes.
134
  = Modules Updated =
135
  * Go to Gmedia Modules page and update installed premium modules to latest versions
136
 
137
+ = v1.16.7 =
138
+ * Updated Amron module.
139
+ * Added Albums Order option in Build Query popup.
140
+
141
  = v1.16.6 =
142
  * Updated Amron module.
143
  * Small fixes.