File: //var/www/wp-content/plugins/simply-gallery-block/blocks/skins/pgc_sgb_justified.js
(()=>{var t={7157:()=>{},6378:()=>{},9966:()=>{},7412:()=>{},6550:()=>{},7625:()=>{},7336:()=>{},2113:()=>{},2775:()=>{},5072:t=>{"use strict";var e=[];function i(t){for(var i=-1,a=0;a<e.length;a++)if(e[a].identifier===t){i=a;break}return i}function a(t,a){for(var s={},o=[],r=0;r<t.length;r++){var l=t[r],h=a.base?l[0]+a.base:l[0],c=s[h]||0,d="".concat(h," ").concat(c);s[h]=c+1;var u=i(d),g={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==u)e[u].references++,e[u].updater(g);else{var m=n(g,a);a.byIndex=r,e.splice(r,0,{identifier:d,updater:m,references:1})}o.push(d)}return o}function n(t,e){var i=e.domAPI(e);return i.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;i.update(t=e)}else i.remove()}}t.exports=function(t,n){var s=a(t=t||[],n=n||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var r=i(s[o]);e[r].references--}for(var l=a(t,n),h=0;h<s.length;h++){var c=i(s[h]);0===e[c].references&&(e[c].updater(),e.splice(c,1))}s=l}}},7659:t=>{"use strict";var e={};t.exports=function(t,i){var a=function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}(t);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(i)}},540:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},5056:(t,e,i)=>{"use strict";t.exports=function(t){var e=i.nc;e&&t.setAttribute("nonce",e)}},7825:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(i){!function(t,e,i){var a="";i.supports&&(a+="@supports (".concat(i.supports,") {")),i.media&&(a+="@media ".concat(i.media," {"));var n=void 0!==i.layer;n&&(a+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),a+=i.css,n&&(a+="}"),i.media&&(a+="}"),i.supports&&(a+="}");var s=i.sourceMap;s&&"undefined"!=typeof btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(a,t,e.options)}(e,t,i)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},1113:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function i(a){var n=e[a];if(void 0!==n)return n.exports;var s=e[a]={exports:{}};return t[a](s,s.exports,i),s.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var a in e)i.o(e,a)&&!i.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.nc=void 0,(()=>{"use strict";var t=i(5072),e=i.n(t),a=i(7825),n=i.n(a),s=i(7659),o=i.n(s),r=i(5056),l=i.n(r),h=i(540),c=i.n(h),d=i(1113),u=i.n(d),g=i(2113),m=i.n(g),v={};function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function y(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,f(a.key),a)}}function f(t){var e=function(t){if("object"!=p(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=p(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==p(e)?e:e+""}v.styleTagTransform=u(),v.setAttributes=l(),v.insert=o().bind(null,"head"),v.domAPI=n(),v.insertStyleElement=c(),e()(m(),v),m()&&m().locals&&m().locals;var b=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var e=this;this.mouseDetected=!1,this.mouseMoveHandler=function(){return function(t){window.removeEventListener("mousedown",e.mouseMoveHandler,!1),window.removeEventListener("touchstart",e.mouseMoveHandler,!1),"touchstart"===t.type?(t.stopPropagation(),e.mouseDetected=!1):e.mouseDetected=!0}},window.addEventListener("mousedown",this.mouseMoveHandler,!1),window.addEventListener("touchstart",this.mouseMoveHandler,!1)}return e=t,i=[{key:"ClassPref",get:function(){return"pgc-rev-utils-"}},{key:"ICONS",get:function(){return{MORE_SVG:'<svg height="48" viewBox="0 0 48 48" width="48"><path d="M0 0h48v48h-48z" fill="none"/><path d="M12 20c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm24 0c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm-12 0c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4z"/></svg>',ARR_DOWN_SVG:'<svg height="48" viewBox="0 0 48 48" width="48"><path d="M14.83 16.42l9.17 9.17 9.17-9.17 2.83 2.83-12 12-12-12z"/><path d="M0-.75h48v48h-48z" fill="none"/></svg>',ZOOM_SVG:'<svg enable-background="new 0 0 32 32" id="Glyph" viewBox="0 0 32 32"><path d="M27.414,24.586l-5.077-5.077C23.386,17.928,24,16.035,24,14c0-5.514-4.486-10-10-10S4,8.486,4,14 s4.486,10,10,10c2.035,0,3.928-0.614,5.509-1.663l5.077,5.077c0.78,0.781,2.048,0.781,2.828,0 C28.195,26.633,28.195,25.367,27.414,24.586z M7,14c0-3.86,3.14-7,7-7s7,3.14,7,7s-3.14,7-7,7S7,17.86,7,14z" id="XMLID_223_"/></svg>',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"><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 viewBox="0 0 58 94"><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" viewBox="-5 -5 66.693 66.693" width="56.693px"><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"><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"><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" viewBox="0 0 51 46" width="51px"><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" viewBox="0 0 24 24"><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;" viewBox="0 0 24 24"><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" viewBox="0 0 64 64" width="64px"><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;" viewBox="0 0 46 100" width="46px"><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 viewBox="0 0 24 24"><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" viewBox="0 0 64 64" width="64px"><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"><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"><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"><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" viewBox="0 0 64 64" width="64px"><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" viewBox="0 0 14 14" width="14px"><title/><desc/><defs/><g fill-rule="evenodd" id="Page-1" stroke="none" stroke-width="1"><g transform="translate(-215.000000, -257.000000)"><g 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" viewBox="0 0 14 14" width="14px"><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" viewBox="0 0 512 512" width="512px"><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" viewBox="0 0 167 93" width="167px"><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 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" viewBox="0 0 32 32"><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 xmlns="http://www.w3.org/2000/svg" width="1200" height="1227" viewBox="0 0 1200 1227" fill="none"><g><path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"/></g></svg>',PIN_SVG:'<svg 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>',NEXT_ARR:'<svg height="512px" viewBox="0 0 512 512" width="512px"><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" viewBox="0 0 512 512" width="512px"><polygon points="352,115.4 331.3,96 160,256 331.3,416 352,396.7 201.5,256 "/></svg>',ZOOM_IN_SVG:'<svg enable-background="new 0 0 512 512" height="512px" viewBox="0 0 512 512" width="512px"><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" viewBox="0 0 512 512" width="512px"><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" enable-background:new 0 0 512 512 viewBox="0 0 512 512" width="512px"><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" enable-background:new 0 0 512 512 viewBox="0 0 512 512" width="512px"><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>',USER_SVG:'<svg viewBox="0 0 24 24"><g id="info"/><g id="icons"><path d="M12,0C5.4,0,0,5.4,0,12c0,6.6,5.4,12,12,12s12-5.4,12-12C24,5.4,18.6,0,12,0z M12,4c2.2,0,4,2.2,4,5s-1.8,5-4,5 s-4-2.2-4-5S9.8,4,12,4z M18.6,19.5C16.9,21,14.5,22,12,22s-4.9-1-6.6-2.5c-0.4-0.4-0.5-1-0.1-1.4c1.1-1.3,2.6-2.2,4.2-2.7 c0.8,0.4,1.6,0.6,2.5,0.6s1.7-0.2,2.5-0.6c1.7,0.5,3.1,1.4,4.2,2.7C19.1,18.5,19.1,19.1,18.6,19.5z" id="user2"/></g></svg>',ATTENTION_SVG:'<svg enable-background="new 0 0 91.8 92.6" viewBox="0 0 91.8 92.6"><path d="M45.9,3.6c-23.5,0-42.5,19-42.5,42.5c0,23.5,19,42.5,42.5,42.5c23.5,0,42.5-19,42.5-42.5 C88.4,22.7,69.4,3.6,45.9,3.6z M43.7,21.1h4.3c0.5,0,0.9,0.4,0.9,0.9l-0.6,34.5c0,0.5-0.4,0.9-0.9,0.9h-3c-0.5,0-0.9-0.4-0.9-0.9 L42.8,22C42.8,21.5,43.2,21.1,43.7,21.1z M48.6,71.2c-0.8,0.8-1.7,1.1-2.7,1.1c-1,0-1.9-0.3-2.6-1c-0.8-0.7-1.3-1.8-1.3-2.9 c0-1,0.4-1.9,1.1-2.7c0.7-0.8,1.8-1.2,2.9-1.2c1.2,0,2.2,0.5,3,1.4c0.5,0.6,0.8,1.3,0.9,2.1C49.9,69.3,49.5,70.3,48.6,71.2z"/></svg>',POST_TYPE:'<svg height="1792" viewBox="0 0 1792 1792" width="1792"><path d="M1596 380q28 28 48 76t20 88v1152q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1600q0-40 28-68t68-28h896q40 0 88 20t76 48zm-444-244v376h376q-10-29-22-41l-313-313q-12-12-41-22zm384 1528v-1024h-416q-40 0-68-28t-28-68v-416h-768v1536h1280zm-1024-864q0-14 9-23t23-9h704q14 0 23 9t9 23v64q0 14-9 23t-23 9h-704q-14 0-23-9t-9-23v-64zm736 224q14 0 23 9t9 23v64q0 14-9 23t-23 9h-704q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h704zm0 256q14 0 23 9t9 23v64q0 14-9 23t-23 9h-704q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h704z"/></svg>',VIDEO_TYPE:'<svg height="1792" viewBox="0 0 1792 1792" width="1792"><path d="M1596 380q28 28 48 76t20 88v1152q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1600q0-40 28-68t68-28h896q40 0 88 20t76 48zm-444-244v376h376q-10-29-22-41l-313-313q-12-12-41-22zm384 1528v-1024h-416q-40 0-68-28t-28-68v-416h-768v1536h1280zm-640-896q52 0 90 38t38 90v384q0 52-38 90t-90 38h-384q-52 0-90-38t-38-90v-384q0-52 38-90t90-38h384zm492 2q20 8 20 30v576q0 22-20 30-8 2-12 2-14 0-23-9l-265-266v-90l265-266q9-9 23-9 4 0 12 2z"/></svg>',AUDIO_TYPE:'<svg height="1792" viewBox="0 0 1792 1792" width="1792"><path d="M1596 380q28 28 48 76t20 88v1152q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1600q0-40 28-68t68-28h896q40 0 88 20t76 48zm-444-244v376h376q-10-29-22-41l-313-313q-12-12-41-22zm384 1528v-1024h-416q-40 0-68-28t-28-68v-416h-768v1536h1280zm-788-814q20 8 20 30v544q0 22-20 30-8 2-12 2-12 0-23-9l-166-167h-131q-14 0-23-9t-9-23v-192q0-14 9-23t23-9h131l166-167q16-15 35-7zm417 689q31 0 50-24 129-159 129-363t-129-363q-16-21-43-24t-47 14q-21 17-23.5 43.5t14.5 47.5q100 123 100 282t-100 282q-17 21-14.5 47.5t23.5 42.5q18 15 40 15zm-211-148q27 0 47-20 87-93 87-219t-87-219q-18-19-45-20t-46 17-20 44.5 18 46.5q52 57 52 131t-52 131q-19 20-18 46.5t20 44.5q20 17 44 17z"/></svg>',GRID_SVG:'<svg height="32" viewBox="0 0 32 32" width="32"><path d=" M2 2 L10 2 L10 10 L2 10z M12 2 L20 2 L20 10 L12 10z M22 2 L30 2 L30 10 L22 10z M2 12 L10 12 L10 20 L2 20z M12 12 L20 12 L20 20 L12 20z M22 12 L30 12 L30 20 L22 20z M2 22 L10 22 L10 30 L2 30z M12 22 L20 22 L20 30 L12 30z M22 22 L30 22 L30 30 L22 30z "/></svg>',SHOP_SVG:'<svg xmlns= height="24" viewBox="0 0 24 24" width="24"><circle cx="8" cy="21" r="3"></circle><circle cx="20" cy="21" r="3"></circle><path d="M5.67,6H23l-1.68,8.39a2,2,0,0,1-2,1.61H8.75a2,2,0,0,1-2-1.74L5.23,2.74A2,2,0,0,0,3.25,1H1"></path></svg>',EXPAND_SVG:'<svg enable-background="new 0 0 2048 2048" height="2048px" viewBox="0.0 0 1536.0 2048" width="1536.0px"><path d="M755,1184c0,8.667-3.333,16.333-10,23l-332,332l144,144c12.667,12.667,19,27.667,19,45s-6.333,32.333-19,45 s-27.667,19-45,19H64c-17.333,0-32.333-6.333-45-19s-19-27.667-19-45v-448c0-17.333,6.333-32.333,19-45s27.667-19,45-19 s32.333,6.333,45,19l144,144l332-332c6.667-6.667,14.333-10,23-10s16.333,3.333,23,10l114,114 C751.667,1167.667,755,1175.333,755,1184z M1536,320v448c0,17.333-6.333,32.333-19,45s-27.667,19-45,19s-32.333-6.333-45-19 l-144-144l-332,332c-6.667,6.667-14.333,10-23,10s-16.333-3.333-23-10L791,887c-6.667-6.667-10-14.333-10-23s3.333-16.333,10-23 l332-332L979,365c-12.667-12.667-19-27.667-19-45s6.333-32.333,19-45s27.667-19,45-19h448c17.333,0,32.333,6.333,45,19 S1536,302.667,1536,320z"/></svg>',REDUCE_SVG:'<svg enable-background="new 0 0 2048 2048" height="2048px" viewBox="13.0 0 1510.0 2048" width="1510.0px"><path d="M768,1088v448c0,17.333-6.333,32.333-19,45s-27.667,19-45,19s-32.333-6.333-45-19l-144-144l-332,332 c-6.667,6.667-14.333,10-23,10s-16.333-3.333-23-10L23,1655c-6.667-6.667-10-14.333-10-23s3.333-16.333,10-23l332-332l-144-144 c-12.667-12.667-19-27.667-19-45s6.333-32.333,19-45s27.667-19,45-19h448c17.333,0,32.333,6.333,45,19S768,1070.667,768,1088z M1523,416c0,8.667-3.333,16.333-10,23l-332,332l144,144c12.667,12.667,19,27.667,19,45s-6.333,32.333-19,45s-27.667,19-45,19H832 c-17.333,0-32.333-6.333-45-19s-19-27.667-19-45V512c0-17.333,6.333-32.333,19-45s27.667-19,45-19s32.333,6.333,45,19l144,144 l332-332c6.667-6.667,14.333-10,23-10s16.333,3.333,23,10l114,114C1519.667,399.667,1523,407.333,1523,416z"/></svg>'}}},{key:"createPreloaderView",value:function(e){var i=0,a=document.createElement("div");a.className="".concat(t.ClassPref,"preloader");var n=document.createElement("div");n.className="".concat(t.ClassPref,"static"),n.style.width="".concat(8,"px"),n.style.height="".concat(8,"px"),n.style.margin="".concat(-4,"px"),n.style.backgroundColor=e,a.appendChild(n);var s=document.createElement("div");s.className="".concat(t.ClassPref,"spinner"),s.style.position="absolute",s.style.width="".concat(36,"px"),s.style.height="".concat(36,"px"),s.style.margin="".concat(-18,"px");for(var o=0;o<8;o+=1){var r=document.createElement("div");r.className="".concat(t.ClassPref,"point"),r.style.marginTop="".concat(-4,"px"),r.style.marginLeft="".concat(-4,"px"),r.style.width="".concat(8,"px"),r.style.height="".concat(8,"px"),r.style.backgroundColor=e,r.style.transform="rotate(".concat(i,"deg) translate(").concat(18,"px)"),i+=45,s.appendChild(r)}return a.appendChild(s),a}},{key:"passiveListener",get:function(){var t=!1;try{var e={get:function(){t=!0}},i=Object.defineProperty({},"passive",e);window.addEventListener("testPassive",null,i),window.removeEventListener("testPassive",null,i)}catch(t){}return!!t&&{passive:!1,capture:!1}}},{key:"requestAnimationFrame",value:function(t){return(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame)(t)}},{key:"cancelAnimationFrame",value:function(t){(window.cancelAnimationFrame||window.mozCancelAnimationFrame)(t)}},{key:"whichTransitionEventEnd",value:function(){var t=document.createElement("fakeelement"),e={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"},i=Object.keys(e);for(var a in i)if(void 0!==t.style[a])return e[a]}},{key:"Device",get:function(){var t=window,e=t.navigator.userAgent,i={ios:!1,android:!1,androidChrome:!1,desktop:!1,windows:!1,iphone:!1,ipod:!1,ipad:!1,cordova:t.cordova||t.phonegap,phonegap:t.cordova||t.phonegap,browser:{ie11:!1}},a=e.match(/(Windows Phone);?[\s\/]+([\d.]+)?/),n=e.match(/(Android);?[\s\/]+([\d.]+)?/),s=e.match(/(iPad).*OS\s([\d_]+)/),o=e.match(/(iPod)(.*OS\s([\d_]+))?/),r=!s&&e.match(/(iPhone\sOS|iOS)\s([\d_]+)/);if(a&&(i.os="windows",i.osVersion=a[2],i.windows=!0),n&&!a&&(i.os="android",i.osVersion=n[2],i.android=!0,i.androidChrome=e.toLowerCase().indexOf("chrome")>=0),(s||r||o)&&(i.os="ios",i.ios=!0),r&&!o&&(i.osVersion=r[2].replace(/_/g,"."),i.iphone=!0),s&&(i.osVersion=s[2].replace(/_/g,"."),i.ipad=!0),o&&(i.osVersion=o[3]?o[3].replace(/_/g,"."):null,i.iphone=!0),i.ios&&i.osVersion&&e.indexOf("Version/")>=0&&"10"===i.osVersion.split(".")[0]&&(i.osVersion=e.toLowerCase().split("version/")[1].split(" ")[0]),i.desktop=!(i.os||i.android||i.webView),i.webView=(r||s||o)&&e.match(/.*AppleWebKit(?!.*Safari)/i),i.os&&"ios"===i.os){var l=i.osVersion.split("."),h=document.querySelector('meta[name="viewport"]');i.minimalUi=!i.webView&&(o||r)&&(1*l[0]==7?1*l[1]>=1:1*l[0]>7)&&h&&h.getAttribute("content").indexOf("minimal-ui")>=0}i.pixelRatio=t.devicePixelRatio||1,e.indexOf("Trident/7.0")>-1&&(i.browser.ie11=!0);var c=e.indexOf("Chrome")>-1;i.browser.explorer=e.indexOf("MSIE")>-1,i.browser.firefox=e.indexOf("Firefox")>-1;var d=e.indexOf("Safari")>-1,u=e.toLowerCase().indexOf("op")>-1;return i.browser.opera=u,i.browser.chrome=(!c||!u)&&c,i.browser.safari=(!c||!d)&&d,i}},{key:"preloadedAttributForVideo",get:function(){return t.Device.browser.safari?"auto":"metadata"}},{key:"isTouchDevice",get:function(){try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}}},{key:"isiPpad",get:function(){return 768===window.screen.height&&1024===window.screen.width||1024===window.screen.height&&768===window.screen.width||1366===window.screen.height&&1024===window.screen.width||1024===window.screen.height&&1366===window.screen.width}},{key:"getScrollbarWidth",get:function(){var t=document.createElement("div");t.style.visibility="hidden",t.style.width="100px",t.style.msOverflowStyle="scrollbar",document.body.appendChild(t);var e=t.offsetWidth;t.style.overflow="scroll";var i=document.createElement("div");i.style.width="100%",t.appendChild(i);var a=i.offsetWidth;return t.parentNode.removeChild(t),e-a}},{key:"hasScrollbar",get:function(){var t="BackCompat"===document.compatMode?document.body:document.documentElement;return t.scrollHeight>t.clientHeight}},{key:"miniScreen",get:function(){return window.screen.height<500||window.screen.width<500}},{key:"addParamsToURL",value:function(e,i,a){if(t.Device.browser.ie11)return"".concat(e+(e.indexOf("?")>=0?"&":"?")+encodeURIComponent(i),"=").concat(encodeURIComponent(a));var n=(e=new URL(e)).search,s=new URLSearchParams(n);return s.append(i,a),e.search=s.toString(),e.toString()}},{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 data-id="sgb-video-player" src="https://player.vimeo.com/video/%id%?%hash%autoplay=1&byline=0&portrait=0&transparent=0" frameborder=“0” allowfullscreen allow=autoplay></iframe>'}},{key:"mediaEl",value:function(e){var i=document.createElement(e);return i.className="thumb-".concat(e,"-content"),i.setAttribute("preload","metadata"),i.setAttribute("controlsList","nodownload"),"video"===e&&(i.setAttribute("preload",t.Device.browser.safari||t.Device.browser.opera?"auto":"metadata"),i.setAttribute("webkit-playsinline",""),i.setAttribute("playsinline","")),i}},{key:"embedVideoEl",value:function(t,e,i){var a=document.createElement("iframe");if(a.setAttribute("allow","autoplay"),a.setAttribute("allowfullscreen",""),a.setAttribute("frameborder","0"),"youtube"===t)a.src="https://www.youtube.com/embed/".concat(e,"?autoplay=1&rel=0&showinfo=0&wmode=transparent");else if("vimeo"===t){var n=i?"h="+i+"&":"";a.src="https://player.vimeo.com/video/".concat(e,"?").concat(n,"autoplay=1&byline=0&portrait=0&transparent=0")}return a}},{key:"copyProperties",value:function(t,e){for(var i=[],a=Object.keys(t),n=0;n<a.length;n+=1){var s=a[n];void 0!==t[s]&&(Object.prototype.hasOwnProperty.call(e,s)?e[s]!==t[s]&&i.push(s):i.push(s),e[s]=t[s])}return i}},{key:"setStyleForElFomObj",value:function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t.style[i]=e[i])}},{key:"shuffle",value:function(t){for(var e,i,a=t.length;0!==a;)i=Math.floor(Math.random()*a),e=t[a-=1],t[a]=t[i],t[i]=e;return t}},{key:"Rect",value:function(t,e,i,a){return{x:t,y:e,width:i,height:a}}},{key:"Size",value:function(t,e){return{width:t,height:e}}},{key:"Point",value:function(t,e){return{x:t,y:e}}},{key:"SvgWithImage",value:function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("viewBox","0 0 1 1"),e.setAttribute("version","1.1"),e.setAttribute("role","img");var i=document.createElementNS("http://www.w3.org/2000/svg","image");return i.setAttributeNS("http://www.w3.org/1999/xlink","href",t),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("preserveAspectRatio","xMidYMid slice"),e.appendChild(i),e}},{key:"findHighestZIndex",value:function(t){for(var e,i=99999,a=0;a<t.childNodes.length;a+=1){var n=t.childNodes[a];1===n.nodeType&&"SCRIPT"!==n.nodeName&&(e=document.defaultView.getComputedStyle(n,null).getPropertyValue("z-index")),e>i&&"auto"!==e&&(i=parseInt(e,10))}return i}},{key:"escape",value:function(t){var e={"&":"&","<":"<",">":">",'"':""","'":"'"};return t.replace(/[&<>"']/g,(function(t){return e[t]}))}},{key:"trace",value:function(t){if(1!==arguments.length){for(var e="",i=0;i<arguments.length;i+=1)e+="".concat(arguments[i]," , ");e=e.slice(0,-2),console.log(e)}else console.log(t)}},{key:"preventDefaultForScrollKeys",value:function(t){return!{37:1,38:1,39:1,40:1}[t.keyCode]||(t.preventDefault(),!1)}},{key:"preventDefault",value:function(t){(t=t||window.event).preventDefault&&t.preventDefault(),t.returnValue=!1}},{key:"pageXOffset",get:function(){return void 0!==window.pageXOffset?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft}},{key:"pageYOffset",get:function(){return void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop}},{key:"disableBodyScroll",value:function(){document.getElementsByTagName("html")[0].classList.add("".concat(t.ClassPref,"PopUpActive"))}},{key:"enableBodyScroll",value:function(){document.getElementsByTagName("html")[0].classList.remove("".concat(t.ClassPref,"PopUpActive"))}},{key:"disableBodyScrollSlider",value:function(){if(window.addEventListener){var e=t.passiveListener,i=t.preventDefault;window.addEventListener("wheel",i,e),window.addEventListener("mousewheel",i,e),window.addEventListener("touchmove",i,e)}document.onkeydown=t.preventDefaultForScrollKeys}},{key:"enableBodyScrollSlider",value:function(){if(window.removeEventListener){var e=t.passiveListener,i=t.preventDefault;window.removeEventListener("wheel",i,e),window.removeEventListener("mousewheel",i,e),window.removeEventListener("touchmove",i,e)}document.onkeydown=null}},{key:"collapseElementsInElemt",value:function(t,e){for(var i=[],a=0;a<t.childNodes.length;a+=1){var n={},s=t.childNodes[a];1===s.nodeType&&"SCRIPT"!==s.nodeName&&s!==e&&(n.element=s,n.height=null,n.overflow=null,""!==s.style.height&&(n.height=s.style.height),""!==s.style.overflow&&(n.overflow=s.style.overflow),i.push(n),s.style.overflow="hidden",s.style.height="0")}return i}},{key:"recoverElements",value:function(t){if(0!==t.length)for(var e=0;e<t.length;e+=1){var i=t[e].element;i&&(t[e].overflow?i.style.overflow=t[e].overflow:i.style.removeProperty("overflow"),t[e].height?i.style.height=t[e].height:i.style.removeProperty("height"))}}},{key:"hexToRgbaStrin",value:function(t,e){t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,i,a){return e+e+i+i+a+a}));var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return i?"rgba(".concat(parseInt(i[1],16),",").concat(parseInt(i[2],16),",").concat(parseInt(i[3],16),",").concat(e,")"):null}},{key:"getFrameForBoxWithMode",value:function(e,i,a){var n=e.width,s=e.height,o=i.width,r=i.height,l=1,h=1,c=1;a?(l=o/n,h=r/s,c=Math.max(l,h)):(l=o/n,h=r/s,c=(c=Math.min(l,h))>1?1:c);var d=Math.round(n*c),u=Math.round(s*c),g=Math.round((o-d)/2),m=Math.round((r-u)/2);return t.Rect(g,m,d,u)}},{key:"getItemFrameByIndexForBox",value:function(e,i,a,n,s,o){var r=1;o&&(r=o);var l=s=Math.min(i,s),h=Math.floor(i/s),c=(l=h>1?(i-(h-1)*a)/h:i)*r,d=Math.ceil((e+1)/h)-1,u=d*(c+n),g=(e-d*h)*(l+a);return t.Rect(g,u,l,c)}},{key:"fadeOut",value:function(t,e,i){i||(i=500);var a=Math.sqrt,n=(new Date).getTime();!function s(){var o=(new Date).getTime()-n,r=o/i;if(r<1){var l=1-a(r);t.style.opacity=String(l),setTimeout(s,Math.min(25,i-o))}else t.style.opacity="0",e&&e()}()}},{key:"ellipsizeTextBoxToLine",value:function(t,e){t.innerHTML=t.textContent||t.innerText||"";var i=t.innerHTML,a=t.innerHTML.split(" ");t.innerHTML=a[0].substring(0,3);var n=t.clientHeight*e;for(t.innerHTML=i;t.clientHeight>n;)a.pop(),t.innerHTML="".concat(a.join(" ")," ...")}},{key:"ellipsizeTextBox",value:function(t){t.innerHTML=t.textContent||t.innerText||"";for(var e=t.innerHTML.split(" ");t.scrollHeight>t.offsetHeight;)e.pop(),t.innerHTML="".concat(e.join(" ")," ...")}},{key:"searchParentByClassName",value:function(e,i){if(e.parentElement){var a=e.parentElement;return a.classList.contains(i)?a:t.searchParentByClassName(a,i)}}},{key:"scrollYpositionForDiv",value:function(t){var e=(window.innerHeight-t.clientHeight)/2;return window.innerHeight-t.getBoundingClientRect().bottom<-t.clientHeight||t.getBoundingClientRect().bottom<0&&t.getBoundingClientRect().top<0?t.getBoundingClientRect().top+window.pageYOffset-e:void 0}},{key:"scrollInElementToY",value:function(t,e){var i,a=(e=Math.min(e,t.scrollHeight-t.clientHeight-1))-t.scrollTop;i=setInterval((function(){a=.05*a+.07*(e-t.scrollTop);var n=t.scrollTop+a;Math.abs(a)<1?(a=0,clearInterval(i)):t.scrollTop=n}),15),document.addEventListener("wheel",(function t(){clearInterval(i),document.removeEventListener("wheel",t,!1)}),!1)}},{key:"scrollWindowToY",value:function(t){var e,i;function a(){clearInterval(e),document.removeEventListener("wheel",a,!1)}var n=window.pageYOffset;t=Math.min(t,document.documentElement.scrollHeight-document.documentElement.clientHeight-1);var s=0,o=.05+.01*Math.abs(t-window.pageYOffset)/1e3;o=Math.min(.9,o),e=setInterval((function(){var r=(t-window.pageYOffset)*o;(r===s||Math.abs(r)<1)&&(window.scrollTo(0,t),clearInterval(e)),s=(t-window.pageYOffset)*o,n+=s,window.scrollTo(0,n),void 0===i&&((i=Math.abs(n-window.pageYOffset)>20)?(window.scrollTo(0,t),clearInterval(e)):document.addEventListener("wheel",a,!1))}),15)}},{key:"scrollToY",value:function(t,e){var i,a=window.pageYOffset,n=Math.PI/(e/15),s=a/2,o=0,r=setInterval((function(){window.pageYOffset>t?(o+=1,i=s-s*Math.cos(o*n),window.scrollTo(0,a-i)):clearInterval(r)}),15)}},{key:"isFullscreen",get:function(){return document.webkitIsFullScreen||document.mozFullScreen||!1}},{key:"toggleFullScreen",value:function(t){var e=document.webkitIsFullScreen||document.mozFullScreen||!1;t.requestFullScreen=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||function(){return!1},document.cancelFullScreen=document.cancelFullScreen||document.webkitCancelFullScreen||document.mozCancelFullScreen||function(){return!1},e?document.cancelFullScreen():t.requestFullScreen()}},{key:"PageInteractionListener",value:function(){return{actionHandler:function(t){var e=this;return e.action=function(t){e.callback&&e.callback instanceof Function&&e.callback(t),e.remove()},e.action},init:function(t){this.callback=t,this.action=this.actionHandler(),document.addEventListener("mousedown",this.action,!0),document.addEventListener("touchstart",this.action,!0),document.addEventListener("keydown",this.action,!0)},remove:function(){document.removeEventListener("mousedown",this.action,!0),document.removeEventListener("touchstart",this.action,!0),document.removeEventListener("keydown",this.action,!0)}}}},{key:"CacheItemsList",value:function(){var t={};function e(a){!t.itemsList||t.cached===t.itemsList.length&&!t.amount||t.amount&&t.cached>=t.amount||(t.amount&&(t.amount=Math.min(t.amount,t.itemsList.length)),t.currentItem=t.itemsList[a].webView,t.lastIndex=a,void 0===t.currentItem||t.currentItem.complete?(t.cached+=1,e(t.lastIndex+1>=t.itemsList.length?0:t.lastIndex+1)):t.currentItem.addEventListener("load",i,!1))}function i(){t.cached+=1,e(t.lastIndex+1>=t.itemsList.length?0:t.lastIndex+1)}return t.cached=0,t.itemsList=void 0,t.currentItem=void 0,t.amount=void 0,t.lastIndex=void 0,t.init=function(a,n,s){if(t.itemsList&&t.itemsList.length)for(var o=0;o<t.itemsList.length;o+=1)t.itemsList[o].webView.removeEventListener("load",i,!1);t.amount=s,t.cached=0,t.currentItem=void 0,t.lastIndex=n,t.itemsList=a,void 0===n&&(n=0),e(n)},t.status=function(){return{list:t.itemsList,index:t.lastIndex}},t}},{key:"GMEventsManager",value:function(){return{listenerSet:{},addGMEventListener:function(e,i,a){if(!e)return t.trace("********************************* Event UNDEFINED!!! ***************************************"),t.trace(i),t.trace(a),void t.trace("********************************* Event UNDEFINED!!! ***************************************");this.listenerSet[e]||(this.listenerSet[e]=[]);var n={};n.listener=i,n.handler=a,this.listenerSet[e].push(n)},removeGMEventListener:function(t,e,i){if(this.listenerSet[t])for(var a=0;a<this.listenerSet[t].length;a+=1)this.listenerSet[t][a].listener===e&&this.listenerSet[t][a].handler===i&&(this.listenerSet[t].splice(a,1),a=this.listenerSet[t].length)},dispatchGMEvent:function(t){if(this.listenerSet[t.type])for(var e=this.listenerSet[t.type],i=0;i<e.length;i+=1){var a=e[i];a&&a.listener&&"function"==typeof a.listener[a.handler]&&a.listener[a.handler](t)}}}}},{key:"GMEvent",value:function(t,e,i){var a={};return a.type=t,a.params=i,a.target=e,a}}],null&&y(e.prototype,null),i&&y(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i}();const w=b;var C=i(7157),S=i.n(C),k={};function L(t){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},L(t)}function E(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,_(a.key),a)}}function T(t,e,i){return e&&E(t.prototype,e),i&&E(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function _(t){var e=function(t){if("object"!=L(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=L(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==L(e)?e:e+""}function I(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}k.styleTagTransform=u(),k.setAttributes=l(),k.insert=o().bind(null,"head"),k.domAPI=n(),k.insertStyleElement=c(),e()(S(),k),S()&&S().locals&&S().locals;var P=T((function t(e,i,a,n,s,o,r){function l(t){return t&&t[0].toUpperCase()+t.slice(1)}I(this,t);var h=document.createElement("div");return h.className=e,h.dataset.type=a,h.innerHTML=i,h.style.backgroundColor=n,h.style.order=r,h.style.fill=s,h.setAttribute("title",l(a)),h.setAttribute("aria-label",l(a)),h.addEventListener("touchend",o,!1),h.addEventListener("click",o,!1),h.addEventListener("mouseenter",o,!1),h.addEventListener("mouseleave",o,!1),h}));const M=function(){function t(e,i,a){I(this,t),this.appSet=e,this.appName=e.appName,this.type=i,this.buttonsList=[];var n=t.MENU_TYPE;this.config=t.CONFIG,w.copyProperties(a,this.config),this.item=void 0,this.lightbox=i===n.LIGHTBOX,this.view=document.createElement("div"),this.view.className="".concat(t.classPref,"view"),this.view.classList.add(i),this.initButtons()}return T(t,[{key:"initButtons",value:function(){var e=this.type,i=t.MENU_TYPE,a=this;function n(t){"like"===t.dataset.type&&t.dataset.like||("bookmark"===t.dataset.type&&t.dataset.bookmark?t.style.backgroundColor=a.backgroundColor:(t.style.backgroundColor=a.backgroundColor,t.style.fill=a.iconColor,t.classList.remove("hover")))}function s(e){if(this.eventType=e.type,"click"===e.type){var i=a.item;if(!i)return;var s={};s.type=this.dataset.type,s.item=i,this.dataset.type,n(this),w.Device.desktop||n(this),a.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.ITEM_MENU_ACTION,a,s))}else"mouseenter"===e.type?"bookmark"===(o=this).dataset.type&&o.dataset.bookmark?o.style.backgroundColor=a.backgroundColorOver:(o.style.backgroundColor=a.backgroundColorOver,o.style.fill=a.iconColorOver,o.classList.add("hover")):"mouseleave"===e.type&&n(this);var o}this.backgroundColor=this.config.im_backgroundColor,this.backgroundColorOver=this.config.im_backgroundColorOver,this.iconColor=this.config.im_iconColor,this.iconColorOver=this.config.im_iconColorOver,this.config.im_link&&(this.linkButton=new P("".concat(t.classPref,"button"),e===i.ULTRABOX?w.ICONS.LINK_2_SVG:w.ICONS.LINK_SVG,"link",this.backgroundColor,this.iconColor,s,e===i.ULTRABOX?6:0),this.buttonsList.push(this.linkButton),this.view.appendChild(this.linkButton)),this.config.im_play&&(this.playButton=new P("".concat(t.classPref,"button"),w.ICONS.PLAY_SVG,"play",this.backgroundColor,this.iconColor,s,1),this.buttonsList.push(this.playButton),this.view.appendChild(this.playButton)),this.config.im_zoom&&(this.zoomButton=new P("".concat(t.classPref,"button"),w.ICONS.ZOOM_IN_SVG,"zoom",this.backgroundColor,this.iconColor,s,2),this.buttonsList.push(this.zoomButton),this.view.appendChild(this.zoomButton)),this.config.im_info&&(this.infoButton=new P("".concat(t.classPref,"button"),w.ICONS.INFO_SVG,"info",this.backgroundColor,this.iconColor,s,e===i.ULTRABOX?5:3),this.buttonsList.push(this.infoButton),this.view.appendChild(this.infoButton)),this.config.im_discuss&&(this.commentsButton=new P("".concat(t.classPref,"button"),e===i.ULTRABOX?w.ICONS.COMENTS_2_SVG:w.ICONS.COMENTS_SVG,"coments",this.backgroundColor,this.iconColor,s,(i.ULTRABOX,4)),this.buttonsList.push(this.commentsButton),this.view.appendChild(this.commentsButton)),this.config.im_download&&(this.downloadButton=new P("".concat(t.classPref,"button"),e===i.ULTRABOX?w.ICONS.DOWNLOAD_2_SVG:w.ICONS.DOWNLOAD_SVG,"download",this.backgroundColor,this.iconColor,s,e===i.ULTRABOX?3:5),this.buttonsList.push(this.downloadButton),this.view.appendChild(this.downloadButton)),this.config.im_share&&(this.shareButton=new P("".concat(t.classPref,"button"),e===i.ULTRABOX?w.ICONS.SHARE_2_SVG:w.ICONS.SHARE_SVG,"share",this.backgroundColor,this.iconColor,s,e===i.ULTRABOX?2:6),this.buttonsList.push(this.shareButton),this.view.appendChild(this.shareButton)),this.config.im_bookmark&&(this.bookMarkButton=new P("".concat(t.classPref,"button"),w.ICONS.BOOKMARK_SVG,"bookmark",this.backgroundColor,this.iconColor,s),this.buttonsList.push(this.bookMarkButton),this.view.appendChild(this.bookMarkButton)),this.config.im_like&&(this.likeButton=new P("".concat(t.classPref,"button"),e===i.ULTRABOX?w.ICONS.HEART_2_SVG:w.ICONS.HEART_SVG,"like",this.backgroundColor,this.iconColor,s,e===i.ULTRABOX?1:7),this.buttonsList.push(this.likeButton),this.view.appendChild(this.likeButton)),this.config.im_thumbnails&&(this.thumbs=new P("".concat(t.classPref,"button"),w.ICONS.GRID_SVG,"thumbnails",this.backgroundColor,this.iconColor,s,8),this.buttonsList.push(this.thumbs),this.view.appendChild(this.thumbs)),this.config.im_resize&&(this.resizeButton=new P("".concat(t.classPref,"button"),w.ICONS.EXPAND_SVG,"resize",this.backgroundColor,this.iconColor,s,e===i.ULTRABOX?6:9),this.buttonsList.push(this.resizeButton),this.view.appendChild(this.resizeButton)),this.config.im_fulscreen&&(this.fullscreenButton=new P("".concat(t.classPref,"button"),w.ICONS.FULL_SCREEN_SVG,"fullscreen",this.backgroundColor,this.iconColor,s,e===i.ULTRABOX?7:10),this.buttonsList.push(this.fullscreenButton),this.view.appendChild(this.fullscreenButton)),this.config.im_close&&(this.closeButton=new P("".concat(t.classPref,"button"),w.ICONS.CLOSE_SVG,"close",this.backgroundColor,this.iconColor,s,11),this.buttonsList.push(this.closeButton),this.view.appendChild(this.closeButton))}},{key:"updateConfig",value:function(t){if(0!==w.copyProperties(t,this.config).length){for(var e=0;e<this.buttonsList.length;e+=1){var i=this.buttonsList[e];i.parentNode&&i.parentNode.removeChild(i),delete this.buttonsList[e]}this.buttonsList=[],this.initButtons()}}},{key:"updateForItem",value:function(e){var i=t.MENU_TYPE;if(this.item=e,this.zoomButton&&("image"!==e.type?this.zoomButtonStatus("desable"):this.zoomButtonStatus("zoomOut")),this.downloadButton&&("image"===e.type||"audio"===e.type||"video"===e.type&&void 0===e.mime_type?(this.downloadButton.style.opacity="1",this.downloadButton.style.cursor="pointer",this.downloadButton.style.pointerEvents="auto"):(this.downloadButton.style.opacity="0.4",this.downloadButton.style.cursor="default",this.downloadButton.style.pointerEvents="none")),this.likeButton&&this.config.im_likesSet&&(this.config.im_likesSet()[e.ID]?(this.likeButton.style.fill="red",this.likeButton.style.cursor="default",this.likeButton.style.pointerEvents="none",this.likeButton.dataset.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.config.im_isContainIdInBookmarkSet(this.item.ID)||0===this.config.im_isContainIdInBookmarkSet(this.item.ID)?(this.bookMarkButton.dataset.bookmark=e.ID,this.bookMarkButton.style.fill="red"):(delete this.bookMarkButton.dataset.bookmark,this.bookMarkButton.style.fill=this.iconColor)),this.linkButton&&(e.meta&&e.meta.subType&&"product"===e.meta.subType?this.linkButton.innerHTML=w.ICONS.SHOP_SVG:this.linkButton.innerHTML=this.type===i.ULTRABOX?w.ICONS.LINK_2_SVG:w.ICONS.LINK_SVG,e.link?(this.linkButton.style.display="block",this.linkButton.style.opacity="1",this.linkButton.style.cursor="pointer",this.linkButton.style.pointerEvents="all",e.linkText&&""!==e.linkText?this.linkButton.setAttribute("title",e.linkText):this.linkButton.removeAttribute("title")):(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(t){if(this.zoomButton&&this.zoomStatus!==t){switch(t){case"desable":this.zoomButton.innerHTML=w.ICONS.ZOOM_IN_SVG,this.zoomButton.style.pointerEvents="none",this.zoomButton.style.opacity=.4;break;case"zoomOut":this.zoomButton.innerHTML=w.ICONS.ZOOM_IN_SVG,this.zoomButton.style.pointerEvents="auto",this.zoomButton.style.opacity=1;break;case"zoomIn":this.zoomButton.innerHTML=w.ICONS.ZOOM_OUT_SVG,this.zoomButton.style.pointerEvents="auto",this.zoomButton.style.opacity=1}this.zoomStatus=t}}},{key:"resizeButtonStatus",value:function(t){if(this.resizeButton)switch(t){case"mini":default:this.resizeButton.innerHTML=w.ICONS.EXPAND_SVG;break;case"maxi":this.resizeButton.innerHTML=w.ICONS.REDUCE_SVG;break;case"disable":this.resizeButton.style.display="none";break;case"enable":this.resizeButton.style.display="inline-block"}}},{key:"playButtonStatus",value:function(t){if(this.playButton&&this.playStatus!==t){switch(t){case"play":this.playButton.innerHTML=w.ICONS.PAUSE_SVG,this.playButton.style.pointerEvents="auto",this.playButton.style.opacity=1;break;case"stop":this.playButton.innerHTML=w.ICONS.PLAY_SVG,this.playButton.style.pointerEvents="auto",this.playButton.style.opacity=1;break;case"desable":this.playButton.innerHTML=w.ICONS.PLAY_SVG,this.playButton.style.pointerEvents="none",this.playButton.style.opacity=.4}this.playStatus=t}}},{key:"resizeHandler",value:function(){var t=this;setTimeout((function(){var e=document.webkitIsFullScreen||document.mozFullScreen||!1;t.fullscreenButton&&(t.fullscreenButton.innerHTML=e?w.ICONS.NORMAL_SCREEN_SVG:w.ICONS.FULL_SCREEN_SVG,t.fullscreenButton.style.fill=t.iconColor)}),200)}}],[{key:"classPref",get:function(){return"pgc-rev-item-menu-"}},{key:"EVENTS",get:function(){return{ITEM_MENU_ACTION:"ITEM_MENU_ACTION"}}},{key:"MENU_TYPE",get:function(){return{THUMB:"".concat(t.classPref,"type-thumb"),LIGHTBOX:"".concat(t.classPref,"type-lightbox"),ULTRABOX:"".concat(t.classPref,"type-ultrabox")}}},{key:"CONFIG",get:function(){return{im_linkTargetWindow:"_self",im_backgroundColor:"rgb(0,0,0)",im_backgroundColorOver:"rgb(255,255,255)",im_iconColor:"rgb(255,255,255)",im_iconColorOver:"rgb(0,0,0)",im_link:!1,im_play:!1,im_zoom:!1,im_info:!1,im_discuss:!1,im_download:!1,im_share:!1,im_like:!1,im_bookmark:!1,im_resize:!1,im_fulscreen:!1,im_thumbnails:!1,im_close:!1,im_likesSet:void 0,im_isContainIdInBookmarkSet:void 0}}}])}();var D=i(7412),x=i.n(D),N={};function B(t){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},B(t)}function O(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,H(a.key),a)}}function H(t){var e=function(t){if("object"!=B(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=B(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==B(e)?e:e+""}N.styleTagTransform=u(),N.setAttributes=l(),N.insert=o().bind(null,"head"),N.domAPI=n(),N.insertStyleElement=c(),e()(x(),N),x()&&x().locals&&x().locals,w.trace;const A=function(){function t(e,i,a){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.appSet=e,this.appName=e.appName,this.config=t.CONFIG,w.copyProperties(i,this.config),this.accelX=0,this.view=document.createElement("div"),this.view.className="".concat(t.classPref,"view"),this.config.scrh_block_pan_y&&this.view.classList.add("pgc-block-pan-y"),this.startDragHandler=void 0,this.draggingPr=!1,this.config.scrh_dragin?(this.startDragHandler=this.startDrag(),w.isTouchDevice&&(this.view.addEventListener("touchstart",this.startDragHandler,w.passiveListener),window.addEventListener("touchmove",(function(){}),w.passiveListener)),this.view.addEventListener("mousedown",this.startDragHandler,!1)):this.view.addEventListener("mousedown",this.mouseHandler(),!1),this.view.addEventListener("wheel",this.mouseHandler(),!1),this.view.addEventListener("mouseup",this.mouseHandler(),!1),this.view.addEventListener("touchstart",this.mouseHandler(),!1),this.view.addEventListener("touchend",this.mouseHandler(),!1),this.scrollView=void 0,this.pages=0,this.lastPageWidth=0,this.scrollDirection=0,this.nextPagePart=0,this.scrollScale=0,this.rPosX=0,this.currentPageIndex=0,this.currentPagePr=0,this.renderingX=!1,this.internalControll=!1,this.prevButtonSt=!1,this.nextButtonSt=!1,w.setStyleForElFomObj(this.view,a)}return e=t,a=[{key:"classPref",get:function(){return"pgc-rev-scroller-ho-"}},{key:"EVENTS",get:function(){return{SCR_ACTION:"SCR_ACTION",SCR_SCROLL:"SCR_SCROLL"}}},{key:"CONFIG",get:function(){return{scrh_dragin:!1,scrh_dragin_cursor:!0,scrh_smooth_dragin:!0,scrh_block_pan_y:!1}}}],(i=[{key:"dragging",set:function(t){var e=this;clearTimeout(this.draggingDelayTimer),t?(this.draggingPr=!0,this.view.classList.add("isDraging")):(this.draggingDelayTimer=setTimeout((function(){e.draggingPr=!1}),20),this.view.classList.remove("isDraging"))}},{key:"draging",get:function(){return this.draggingPr}},{key:"initByScrollView",value:function(t){this.scrollView=t,this.view.appendChild(this.scrollView),this.calculateScroll()}},{key:"mouseHandler",value:function(){var t=this;return this.msHandler=function(e){switch(e.type){case"mousedown":case"wheel":case"touchstart":t.internalControll=!0;break;case"mouseup":case"touchend":t.internalControll=!1}},this.msHandler}},{key:"scrollWidth",get:function(){if(this.scrollView)return this.scrollView.clientWidth}},{key:"width",get:function(){return this.view.clientWidth}},{key:"refresh",value:function(){clearInterval(this.scrollAnimInterval),this.scrHandler&&this.view.removeEventListener("scroll",this.scrHandler),this.currentPageIndex=0,this.view.scrollLeft=0,this.rPosX=0,this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.SCR_SCROLL,this,{scroll:0})),this.calculateScroll()}},{key:"calculateScroll",value:function(){this.scrollWidth&&(this.scrollScale=this.width/this.scrollWidth,this.scrollScale<1?(this.view.addEventListener("scroll",this.scrollHandler()),this.config.scrh_dragin&&this.config.scrh_dragin_cursor&&this.view.classList.add("".concat(t.classPref,"grabbable"))):(this.view.removeEventListener("scroll",this.scrHandler),this.config.scrh_dragin&&this.config.scrh_dragin_cursor&&this.view.classList.remove("".concat(t.classPref,"grabbable"))),this.pages=Math.ceil(this.scrollWidth/this.width),this.lastPageWidth=this.scrollWidth%this.width==0?this.width:this.scrollWidth%this.width,this.updateControls())}},{key:"updateControls",value:function(e){var i={},a=this.pages,n=this.view.scrollLeft;i.pages=a,i.scrollScale=this.scrollScale,i.renderingX=this.renderingX,i.internalControll=this.internalControll,i.currentPage=void 0!==e?e:this.currentPagePr,1===a?(i.hasPrevPage=!1,i.hasNextPage=!1):(i.hasPrevPage=n>0,i.hasNextPage=this.scrollWidth-n-this.width>.5),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.SCR_ACTION,this,i))}},{key:"currentPage",value:function(){var e=this.pages,i=this.width,a=this.view.scrollLeft,n=this.scrollWidth-a-i,s=a%i,o=Math.ceil(a/i)===e-1?this.lastPageWidth:i;this.nextPagePart=s/o;var r=Math.round(Math.floor(a/i)+this.nextPagePart),l=-(this.rPosX-a)/Math.abs(this.rPosX-a);return l&&this.scrollDirection!==l&&(this.scrollDirection=l,this.updateControls()),this.currentPagePr===r&&0!==n&&0!==a||(this.currentPagePr=r,this.updateControls()),this.rPosX=a,this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.SCR_SCROLL,this,{scroll:a,scrollDirection:this.scrollDirection,internalControll:this.internalControll})),r}},{key:"gotoNext",value:function(){var t=this.currentPage(),e=this.nextPagePart>=.5&&!this.renderingX?t:t+1;this.gotoPageByIndex(e)}},{key:"gotoPrev",value:function(){var t=this.currentPage(),e=0!==this.nextPagePart&&this.nextPagePart<=.5&&!this.renderingX?t:t-1;this.gotoPageByIndex(e)}},{key:"gotoPageByIndex",value:function(t,e){var i=this.pages;this.internalControll=!1,t=Math.min(t,i-1);var a=(t=Math.max(t,0))*this.width;e?this.scrollLeft=a:this.scrollLeftAnime=a,this.currentPageIndex=t,this.updateControls(t)}},{key:"scrollLeftAnime",set:function(t){var e=this;this.accelX=Math.max(t,0),this.accelX=Math.min(t,this.scrollWidth-this.width);var i=this.view.scrollLeft,a=0,n=.05+.05*Math.abs(this.accelX-i)/1e3;n=Math.min(.9,n),this.renderingX=!0,this.internalControll=!1,this.scrollAnimInterval||(this.scrollAnimInterval=setInterval((function(){a=(e.accelX-i)*n,i+=a,e.view.scrollLeft=i,Math.abs(i-e.accelX)<=1&&(e.view.scrollLeft=e.accelX,e.renderingX=!1,e.updateControls(),clearInterval(e.scrollAnimInterval),e.scrollAnimInterval=void 0)}),17))}},{key:"scrollHandler",value:function(){var t=this;return this.scrHandler=function(){t.internalControll&&(clearInterval(t.scrollAnimInterval),t.scrollAnimInterval=void 0),t.currentPage()},this.scrHandler}},{key:"scrollLeft",get:function(){return this.view.scrollLeft},set:function(t){this.scrollAnimInterval&&(clearInterval(this.scrollAnimInterval),this.scrollAnimInterval=void 0),this.view.scrollLeft=t}},{key:"maxScrollLeft",get:function(){return this.scrollWidth-this.width}},{key:"startDrag",value:function(){var e,i,a,n,s,o,r=this,l=0,h=0,c=0;function d(t){var d;if(t.touches?(s=t.touches[0].pageX,o=t.touches[0].pageY):(s=t.pageX,o=t.pageY),void 0===n&&(o===i?n=!1:(d=180*Math.atan2(Math.abs(o-i),Math.abs(s-e))/Math.PI,n=d>45)),n)r.dragging=!0;else{t.preventDefault();var u=e-s;Math.abs(u)>4&&(r.dragging=!0),r.view.scrollLeft=a+u,c=r.view.scrollLeft,l=1*(c-h)}}function u(){w.isTouchDevice&&(document.removeEventListener("touchmove",d,w.passiveListener),document.removeEventListener("touchend",u,w.passiveListener)),document.removeEventListener("mousemove",d,!1),document.removeEventListener("mouseup",u,!1),r.dragging=!1,r.config.scrh_smooth_dragin&&0!==l?(r.scrollAnimInterval=setInterval((function(){l*=.75,r.view.scrollLeft+=l,r.accelX=r.view.scrollLeft,r.renderingX=!0,Math.abs(l)<.1&&(r.renderingX=!1,clearInterval(r.scrollAnimInterval),r.updateControls(),r.scrollAnimInterval=void 0)}),17),r.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.SCR_ACTION,r,{dragging:!1}))):(r.renderingX=!1,r.updateControls(),r.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.SCR_ACTION,r,{dragging:!1})))}return function(t){var s,o;clearInterval(r.scrollAnimInterval),r.scrollAnimInterval=void 0,l=0,n=void 0,t.touches?(s=t.touches[0].pageX,o=t.touches[0].pageY):(s=t.pageX,o=t.pageY),e=s,i=o,a=r.view.scrollLeft,h=r.view.scrollLeft,w.isTouchDevice&&(document.addEventListener("touchmove",d,w.passiveListener),document.addEventListener("touchend",u,w.passiveListener)),document.addEventListener("mousemove",d,!1),document.addEventListener("mouseup",u,!1)}}},{key:"resizeHandler",value:function(){if(this.viewWidth!==this.width){clearInterval(this.scrollAnimInterval),this.scrollAnimInterval=void 0;var t=this.pages;this.viewWidth=this.width;var e=(this.currentPageIndex+1)/t;this.calculateScroll();var i=Math.round(e*t)-1;this.gotoPageByIndex(0===this.currentPageIndex?0:i)}}},{key:"remove",value:function(){clearInterval(this.scrollAnimInterval),this.view.removeEventListener("wheel",this.scrHandler,!1),this.view.removeEventListener("scroll",this.scrHandler),this.view.removeEventListener("mouseup",this.msHandler,!1),this.view.removeEventListener("touchstart",this.msHandler,!1),this.view.removeEventListener("touchend",this.msHandler,!1)}}])&&O(e.prototype,i),a&&O(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i,a}();var z=i(6378),V=i.n(z),F={};function G(t){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(t)}function R(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Y(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,W(a.key),a)}}function j(t,e,i){return e&&Y(t.prototype,e),i&&Y(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function W(t){var e=function(t){if("object"!=G(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=G(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==G(e)?e:e+""}F.styleTagTransform=u(),F.setAttributes=l(),F.insert=o().bind(null,"head"),F.domAPI=n(),F.insertStyleElement=c(),e()(V(),F),V()&&V().locals&&V().locals;var U=w.trace,X=function(){function t(e,i,a){R(this,t),this.config=t.CONFIG,Object.assign(this.config,e),this.context=a,this.appSet=i,this.view=document.createElement("div"),this.view.classList.add("".concat(t.classPref,"simple-border")),this.view.style.padding="".concat(this.config.thumb_spasing/2,"px"),this.wrap_main=document.createElement("div"),this.wrap_main.className="".concat(t.classPref,"main-wrap"),this.view.appendChild(this.wrap_main),this.wrap_item=document.createElement("div"),this.wrap_item.className="".concat(t.classPref,"item-wrap"),this.wrap_main.appendChild(this.wrap_item),this.hover=document.createElement("div"),this.hover.className="".concat(t.classPref,"item-hover"),this.inner=document.createElement("div"),this.inner.className="".concat(t.classPref,"item-inner"),this.imgCompleted=!1,this.isSelect=!1,this.opacityDelay=void 0,this.displayPr=void 0,this.opacityPr=0,this.inited=!1}return j(t,[{key:"init",value:function(t){if(!this.inited){this.item=t;var e=this;this.type=t.type;var i=void 0;t.itemViewThumbSrc||t.itemViewSrc||t.poster||t.thumb?(this.img=new Image,this.config.thumb_loading_lazy&&this.img.setAttribute("loading","lazy"),this.img.onload=function(){t.title&&this.setAttribute("alt",t.title),e.imgCompleted=!0,e.view.style.opacity=e.opacityPr},this.img.onerror=function(){e.view.classList.add("pgc-rev-error"),t.errorStatus=!0},this.wrap_item.appendChild(this.img),t.itemViewThumbSrc?(this.img.style.width="".concat(t.itemViewThumbSize.width,"px"),this.img.style.height="".concat(t.itemViewThumbSize.height,"px"),i=t.itemViewThumbSrc):t.poster?(this.img.style.width="".concat(t.poster.thumbnail.width,"px"),this.img.style.height="".concat(t.poster.thumbnail.height,"px"),i=t.poster.thumbnail.url):t.thumb&&t.thumb.width>=150&&(this.img.style.width="".concat(t.thumb.width,"px"),this.img.style.height="".concat(t.thumb.height,"px"),i=t.thumb.src),i&&(this.img.src=i)):this.view.style.opacity=this.opacityPr,this.wrap_item.appendChild(this.hover),this.wrap_item.appendChild(this.inner),this.initSubContent(),this.initInteractive(),this.inited=!0}}},{key:"initSubContent",value:function(){this.type=this.item.type;var e=this.item;if("video"===this.type)if(e.mime_type);else if(!e.poster&&(!e.thumb||e.thumb&&e.thumb.width<150)){this.videoContent=w.mediaEl("video"),this.imgSubstitute=!0,this.videoContent.className="".concat(t.classPref,"video-content");var i=e.original;e.poster&&e.poster.medium?this.videoContent.setAttribute("poster",e.poster.medium.url):w.Device.browser.safari&&w.isTouchDevice&&(i+="#t=0.001"),this.videoContent.src=i,this.wrap_item.insertBefore(this.videoContent,this.wrap_item.firstChild)}this.hover.classList.add("".concat(t.classPref,"hover")),this.hover.style.backgroundColor=this.config.thumb_hover_color}},{key:"initInteractive",value:function(){var e=this;function i(t){switch(t.type){case"mouseenter":this.classList.add("hover"),e.hoverAnim(!0);break;case"mouseleave":!1===e.isSelect&&e.hoverAnim(!1),this.classList.remove("hover")}}this.view.addEventListener("click",(function(){e.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENT.THUMB_ACTION,e,{index:e.index}))})),this.view.addEventListener("mouseenter",i,!1),this.view.addEventListener("mouseleave",i,!1)}},{key:"updateSize",value:function(t){var e=Math.round(t*this.config.thumb_coverHieghtRation);this.thumbSize=w.Size(t,e),this.view.style.width="".concat(this.thumbSize.width,"px"),this.view.style.height="".concat(this.thumbSize.height,"px")}},{key:"x",set:function(t){this.view.style.left="".concat(t,"px")}},{key:"y",set:function(t){this.view.style.top="".concat(t,"px")}},{key:"hoverAnim",value:function(t){this.inner.style.border=t?"solid 2px ".concat(this.config.thumb_border_color):null}},{key:"select",set:function(t){t?(this.view.classList.add("pgc-select"),this.hoverAnim(!0)):(this.view.classList.remove("pgc-select"),this.hoverAnim(!1)),this.isSelect=t}},{key:"visibility",set:function(t){this.view.style.visibility=t}},{key:"display",get:function(){return this.displayPr},set:function(t){"none"===t&&clearTimeout(this.opacityDelay),this.view.style.display=t,this.displayPr=t}},{key:"opacity",set:function(t){var e=this;t.delay?this.opacityDelay=setTimeout((function(){(e.imgCompleted||e.imgSubstitute)&&(e.view.style.opacity=t.opacity),e.opacityPr=t.opacity}),t.delay):(clearTimeout(this.opacityDelay),(e.imgCompleted||e.imgSubstitute)&&(e.view.style.opacity=t.opacity),e.opacityPr=t.opacity)}}],[{key:"EVENT",get:function(){return{THUMB_ACTION:"THUMB_ACTION"}}},{key:"classPref",get:function(){return"pgc-rev-scroll-bar-thumb-"}},{key:"CONFIG",get:function(){return{thumb_spasing:10,thumb_coverHieghtRation:1,thumb_loading_lazy:!1,thumb_border_color:"white",thumb_hover_color:"rgba(0,0,0,0.5)"}}}])}();const q=function(){function t(e,i,a){R(this,t),this.context="ItemsScrollBarPagination",this.config=t.CONFIG,w.copyProperties(i,this.config),this.appName=e.appName,this.appSet=e,this.thumbsList=[],this.presentedList=[],this.thumbSize=w.Size(Math.round(this.config.isb_height/this.config.isb_thum_ration),this.config.isb_height),this.activatedPages={},this.maxWidth=0,this.width=1,this.scrollLeft=0,this.view=document.createElement("div"),this.view.className="".concat(t.classPref,"view"),this.sliderContent=document.createElement("div"),this.sliderContent.className="".concat(t.classPref,"slider-content-view");var n=A.CONFIG;n.scrh_dragin=!0,n.scrh_block_pan_y=this.config.isb_block_pan_y,this.scroller=new A(this.appSet,n,{}),this.appSet.appEventManager.addGMEventListener(A.EVENTS.SCR_SCROLL,this,"scrollHandler"),this.view.appendChild(this.scroller.view),this.activIndex=void 0,this.activAudioIndex=void 0,a&&w.setStyleForElFomObj(this.view,a),this.appSet.appEventManager.addGMEventListener(X.EVENT.THUMB_ACTION,this,"thumbActionHandler")}return j(t,[{key:"initByItemslist",value:function(t){this.itemsList=t;var e=X.CONFIG;e.thumb_coverHieghtRation=this.config.isb_thum_ration,e.thumb_loading_lazy=!0,e.thumb_spasing=4,e.thumb_border_color=this.config.isb_itemBgColor;for(var i=0;i<t.length;i+=1){var a=t[i],n=new X(e,this.appSet,this.context);n.index=i,n.init(a),this.thumbsList.push(n)}this.sliderContent.style.width="".concat(this.thumbsList.length*this.thumbSize.width,"px"),this.sliderContent.style.height="".concat(this.thumbSize.height,"px"),this.scroller.initByScrollView(this.sliderContent)}},{key:"scrollHandler",value:function(t){if(t.target===this.scroller){var e=t.params,i=e.scroll,a=e.scrollDirection;this.scrollLeft=i,this.addPage(Math.ceil(this.scrollLeft/this.width)-(a<0?1:0))}}},{key:"thumbActionHandler",value:function(e){if(e.target.context===this.context){var i=e.params.index;this.scroller.draging||void 0===i||this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.ITEMS_SCROLL_BAR_ITEM_ACTION,this,{action:"click",index:parseInt(i)}))}}},{key:"addPage",value:function(t){if(!this.activatedPages["".concat(t)]){for(var e=Math.min(t*this.itemsOnPage+this.itemsOnPage,this.thumbsList.length),i=Math.max(e-this.itemsOnPage,0);i<e;i+=1){var a=this.thumbsList[i];a.updateSize(this.thumbSize.width),a.x=i*this.thumbSize.width,a.y=0,a.display="block",a.opacity={opacity:1},this.presentedList[i]=a,this.sliderContent.appendChild(a.view)}this.activatedPages["".concat(t)]=!0}}},{key:"selectThumbsByIndexes",value:function(t){if(0!==this.thumbsList.length){if(void 0!==this.activIndexes)for(var e=0;e<this.activIndexes.length;e+=1)this.thumbsList[this.activIndexes[e]]&&(this.thumbsList[this.activIndexes[e]].select=!1);for(var i=0;i<t.length;i+=1)this.thumbsList[t[i]]&&(this.thumbsList[t[i]].select=!0);this.activIndexes=t;var a=this.pageByItemIndex(t[0]),n=this.pageByItemIndex(t[t.length-1]),s=t[0]*this.thumbSize.width+t.length*this.thumbSize.width/2-this.width/2;this.scroller.scrollLeftAnime=s,this.addPage(a),this.addPage(n)}}},{key:"selectThumbByIndex",value:function(t){if(0!==this.thumbsList.length){void 0!==this.activIndex&&(this.thumbsList[this.activIndex].select=!1),this.thumbsList[t].select=!0;var e=this.pageByItemIndex(t),i=t*this.thumbSize.width,a=Math.ceil(this.scrollLeft/this.thumbSize.width),n=Math.floor((this.scrollLeft+this.width-this.thumbSize.width)/this.thumbSize.width);if(t<a||t>n){var s;i<this.scrollLeft?s=i:i+this.thumbSize.width-this.width>0&&(s=i+this.thumbSize.width-this.width);var o=Math.ceil(s/this.thumbSize.width),r=Math.floor((s+this.width-this.thumbSize.width)/this.thumbSize.width),l=this.pageByItemIndex(o);l!==e&&this.addPage(l);var h=this.pageByItemIndex(r);h!==e&&this.addPage(h),Math.abs(this.scrollLeft-s)>this.width?this.scroller.scrollLeft=s:this.scroller.scrollLeftAnime=s}this.addPage(e),this.activIndex=t}}},{key:"size",set:function(t){var e=Math.floor(t.width/this.thumbSize.width);if(this.view.style.maxWidth="".concat(e*this.thumbSize.width,"px"),this.itemsOnPage!==e){if(this.itemsOnPage=e,this.width=Math.min(this.itemsOnPage,this.thumbsList.length)*this.thumbSize.width,this.view.style.width="".concat(this.width,"px"),this.view.style.maxWidth=null,this.activatedPages={},this.maxWidth=t.width,void 0!==this.activIndexes&&this.activIndexes.length){var i=this.activIndexes,a=this.pageByItemIndex(i[0]),n=this.pageByItemIndex(i[i.length-1]);this.addPage(a),this.addPage(n)}void 0!==this.activIndex&&this.addPage(this.pageByItemIndex(this.activIndex))}}},{key:"pageByItemIndex",value:function(t){return Math.floor(t/this.itemsOnPage)}},{key:"resizeHandler",value:function(){this.updateView()}},{key:"updateView",value:function(){U("Update View")}},{key:"prepareToRemove",value:function(){this.appSet.appEventManager.removeGMEventListener(A.EVENTS.SCR_ACTION,this,"scrollHandler"),this.scroller.remove(),this.appSet.appEventManager.removeGMEventListener(X.EVENT.THUMB_ACTION,this,"thumbActionHandler")}}],[{key:"classPref",get:function(){return"pgc-rev-scroll-bar-"}},{key:"CONFIG",get:function(){return{isb_itemBgColor:"rgba(255,255,255,0.6)",isb_height:50,isb_thum_ration:.85,isb_block_pan_y:!1}}},{key:"EVENTS",get:function(){return{ITEMS_SCROLL_BAR_ITEM_ACTION:"ITEMS_SCROLL_BAR_ITEM_ACTION"}}}])}();var Z=i(7625),K=i.n(Z),J={};function $(t){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$(t)}function Q(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tt(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,it(a.key),a)}}function et(t,e,i){return e&&tt(t.prototype,e),i&&tt(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function it(t){var e=function(t){if("object"!=$(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=$(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$(e)?e:e+""}J.styleTagTransform=u(),J.setAttributes=l(),J.insert=o().bind(null,"head"),J.domAPI=n(),J.insertStyleElement=c(),e()(K(),J),K()&&K().locals&&K().locals;var at=w.trace,nt=function(){return et((function t(e){Q(this,t);var i=document.createElement("div"),a=document.createElement("div");a.className="".concat(t.classPref,"view");var n=document.createElement("div");if(n.className="".concat(t.classPref,"button"),e.meta&&e.meta.subType&&"product"===e.meta.subType?n.innerHTML='<a href="'.concat(e.link,'">').concat(e.linkText,"</a>"):n.innerHTML=e.link_text?e.link_text:e.title,a.appendChild(n),e.price||e.meta&&e.meta.price){var s=document.createElement("div"),o=document.createElement("div");o.className="".concat(t.classPref,"price"),o.innerHTML=e.price||e.meta.price,s.appendChild(o),a.appendChild(s)}return i.appendChild(a),i}),null,[{key:"classPref",get:function(){return"pgc-rev-slider-post-informer-"}}])}(),st=et((function t(e){Q(this,t);var i=document.createElement("div"),a=document.createElement("div");return a.className="icon-holder",a.innerHTML=e,i.appendChild(a),i})),ot=function(){function t(e){Q(this,t),this.delegate=e,this.item=void 0,this.id=void 0,this.appName=e.appName,this.itemIndex=void 0,this.iconSet=e.iconSet,this.positionIndex=0,this.view=document.createElement("div"),this.delegate.config.sl_canRemoved||(this.view.style.touchAction="auto"),this.view.className="".concat(t.classPref,"view"),this.itemInner=document.createElement("div"),this.itemInner.className="".concat(t.classPref,"inner"),this.delegate.config.sl_canRemoved||(this.itemInner.style.touchAction="auto"),this.view.appendChild(this.itemInner),this.preloader=w.createPreloaderView(this.delegate.config.sl_preloaderColor),this.preloader.style.display="none",this.view.appendChild(this.preloader),this.subContentHolder=document.createElement("div"),this.subContentHolder.className="".concat(t.classPref,"sub-content-holder"),this.view.appendChild(this.subContentHolder),this.videoContent=!1,this.videoContentReadyAction=!1,this.videoContentReady=!1,this.isEmbedContent=!1,this.videoAutoStarted=void 0,this.size=w.Size(0,0),this.imgSize=w.Size(0,0),this.imageFramePr=w.Rect(0,0,0,0),this.imageFrameFF=w.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=w.Point(0,0),this.origin=w.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,this.targetPoint=w.Point(0,0),this.stopRenderTransform=!1}return et(t,[{key:"overLoadHandler",value:function(){var t=this;return this.overLoadH||(this.overLoadH=function(){t.preloader.style.display="none",t.subContentHolder.style.display=null,t.imgSize.width=this.naturalWidth,t.imgSize.height=this.naturalHeight,t.item.videoId&&t.imgSize.width<1e3&&(t.imgSize.width*=1.5,t.imgSize.height*=1.5),t.isInScale&&t.normalize(),t.fit(!1)}),this.overLoadH}},{key:"clearPage",value:function(){this.item=void 0,this.id=void 0,1!==this.scale&&(this.scale=1,this.viewTranslate=w.Point(0,0)),this.itemInner.innerHTML="",this.subContentHolder.innerHTML="",this.videoContentReadyAction=!1,this.videoContentReady=!1,this.videoContent&&this.delegate.videoPlayer&&this.delegate.videoPlayer===this.videoContent&&this.delegate.setVideoPlayer(void 0,void 0),delete this.videoContent,delete this.audioContent,this.itemImg&&this.itemImg.removeEventListener("load",this.overLoadHandler(),!1),this.itemImg=void 0}},{key:"initByItem",value:function(e){if(this.fadePrep(),this.stopRenderTransform=!1,void 0!==e){if(this.id!==e.ID){if(this.item=e,this.id=e.ID,1!==this.scale&&(this.scale=1,this.viewTranslate=w.Point(0,0)),this.itemInner.innerHTML="",this.subContentHolder.innerHTML="",this.videoContentReadyAction=!1,this.videoContentReady=!1,this.videoContent&&this.delegate.videoPlayer&&this.delegate.videoPlayer===this.videoContent&&this.delegate.setVideoPlayer(void 0,void 0),delete this.videoContent,delete this.audioContent,this.itemImg&&this.itemImg.removeEventListener("load",this.overLoadHandler(),!1),e.webView)if("video"!==e.type||e.mime_type)if("audio1"===e.type&&e.poster){this.item.webImgFrame=w.Rect(0,0,0,0),this.imgSize.width=300,this.imgSize.height=300,this.itemImg=document.createElement("div"),this.itemImg.className="".concat(t.classPref,"place-holder");var i=new Image;i.className="".concat(t.classPref,"item-poster"),i.src=e.poster.medium.url,i.onload=function(){this.classList.add("onLoad")},this.itemImg.appendChild(i),this.itemInner.appendChild(this.itemImg)}else"video"===e.type&&void 0!==e.mime_type&&(this.videoContentReady=!0),this.itemImg=e.webView,this.itemInner.appendChild(this.itemImg),this.itemImg.classList.add("pgc-img"),this.delegate.config.sl_copyR_Proptection&&this.itemImg.classList.add("iph-protect"),e.webView.complete?(this.preloader.style.display="none",this.imgSize.width=this.itemImg.naturalWidth,this.imgSize.height=this.itemImg.naturalHeight,e.videoId&&this.imgSize.width<1e3&&(this.imgSize.width*=1.5,this.imgSize.height*=1.5)):(this.imgSize=(this.delegate.config.sl_FullSizeViewMode,this.item.itemViewSize),e.videoId&&this.imgSize.width<1e3&&(this.imgSize.width*=1.5,this.imgSize.height*=1.5),this.subContentHolder.style.display="none",this.preloader.style.display="block",this.itemImg.addEventListener("load",this.overLoadHandler(),!1));else this.item.webImgFrame=w.Rect(0,0,0,0),this.imgSize.width=400,this.imgSize.height=400,this.itemImg=document.createElement("div"),this.itemImg.className="".concat(t.classPref,"place-holder"),this.itemInner.appendChild(this.itemImg);else this.item.webImgFrame=w.Rect(0,0,0,0),this.imgSize.width=400,this.imgSize.height=400,this.itemImg=document.createElement("div"),this.itemImg.className="".concat(t.classPref,"place-holder"),"video"===e.type||e.mime_type||this.itemImg.classList.add("bg-mode"),this.itemInner.appendChild(this.itemImg);switch("video"!==e.type||e.mime_type||this.addVideo(e.original),this.isInScale&&this.normalize(),this.fit(!1),e.type){case"audio":this.view.classList.add("info-icon"),this.audioContent=w.mediaEl("audio"),this.audioContent.setAttribute("controls",""),this.audioContent.className="lb-audio-content",this.subContentHolder.childNodes.length?this.subContentHolder.replaceChild(this.audioContent,this.subContentHolder.firstChild):this.subContentHolder.appendChild(this.audioContent),this.audioContent.src=e.original;break;case"video":this.view.classList.add("info-icon"),this.subContentHolder.innerHTML=new st(this.iconSet.PLAY_SVG).innerHTML,this.subContentHolder.getElementsByTagName("svg")[0].style.marginLeft="7px";break;case"post":case"page":case"product":this.view.classList.add("info-icon"),this.subContentHolder.innerHTML=new nt(this.item).innerHTML;break;default:this.view.classList.remove("info-icon")}e.meta&&e.meta.subType&&"product"===e.meta.subType&&(this.view.classList.add("info-icon"),this.subContentHolder.innerHTML=new nt(this.item).innerHTML)}}else this.clearPage()}},{key:"addVideo",value:function(e){var i=this;this.preloader.style.display="block",this.item.webView?(this.imgSize.width=this.item.webImgFrame.width,this.imgSize.height=this.item.webImgFrame.height):(this.item.webImgFrame=w.Rect(0,0,0,0),this.imgSize.width=1e3,this.imgSize.height=this.imgSize.width/(16/9)),this.itemImg.parentNode&&this.itemImg.parentNode.removeChild(this.itemImg),this.itemImg=document.createElement("div"),this.itemImg.className="".concat(t.classPref,"place-holder"),this.videoContent=w.mediaEl("video"),this.videoContent.setAttribute("data-id","sgb-video-player"),this.videoContent.setAttribute("data-gallery",this.delegate.appName),this.videoContent.className="lb-video-content",i.delegate.config.sl_video_loop&&this.videoContent.setAttribute("loop",""),this.item.poster?(this.videoContent.setAttribute("poster",this.item.poster.large?this.item.poster.large.url:this.item.poster.full.url),this.videoContent.removeAttribute("preload")):this.item.featuredImage?(this.videoContent.setAttribute("poster",this.item.featuredImage.src),this.videoContent.removeAttribute("preload")):this.item.image&&this.item.image.width>=200&&this.videoContent.setAttribute("poster",this.item.image.src),this.itemImg.appendChild(this.videoContent),this.videoContent.addEventListener("canplay",(function(){i.item&&(i.videoContentReady=!0,i.delegate.tryAutoStartVideo(i.item.id),i.delegate.onYtStatusChange("onReady"))})),this.videoContent.addEventListener("ended",(function(){i.delegate.onYtStatusChange(0)})),this.videoContent.addEventListener("play",(function(){i.delegate.onYtStatusChange(1),i.delegate.setVideoPlayer(i.videoContent,"html",i)})),this.videoContent.addEventListener("loadedmetadata",(function(){i.preloader.style.display="none",this.videoWidth&&this.videoHeight&&(i.imgSize.width=this.videoWidth,i.imgSize.height=this.videoHeight,i.isInScale&&i.normalize(),i.fit(!1))})),this.videoContent.src=e+(void 0===this.item.poster&&void 0===this.item.featuredImage&&w.Device.browser.safari&&w.isTouchDevice?"#t=0.001":""),this.itemInner.appendChild(this.itemImg)}},{key:"posX",set:function(t){this.view.style.left="".concat(this.size.width*t,"px"),this.positionIndex=t}},{key:"resize",value:function(t){this.boundingBoxScale=void 0,this.size=t,this.posX=this.positionIndex,this.isInScale&&this.normalize(),this.fit(!0)}},{key:"fit",value:function(){if(this.itemImg){var t=this.delegate.config.sl_xOffset,e=0,i=w.getFrameForBoxWithMode(this.imgSize,w.Size(this.size.width-2*t,this.size.height-2*e),!1,!1);i.x+=t,i.y+=e,this.imageFrameFF=i,e=this.delegate.config.sl_yOffset,(i=w.getFrameForBoxWithMode(this.imgSize,w.Size(this.size.width-2*t,this.size.height-2*e),!1,!1)).x+=t,i.y+=e,this.imageFrameNF=i,this.imgScale=Math.min(this.imgSize.width/i.width,this.MaxScale),this.imgScaleFF=this.imageFrameFF.height/i.height,"image"!==this.item.type&&"video"!==this.item.type&&"audio"!==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.subContentFrame=i}}},{key:"imageFrame",get:function(){return this.imageFramePr},set:function(t){this.itemImg.style.left="".concat(t.x,"px"),this.itemImg.style.top="".concat(t.y,"px"),this.itemImg.style.width="".concat(t.width,"px"),this.itemImg.style.height="".concat(t.height,"px"),this.imageFramePr=t}},{key:"subContentFrame",set:function(t){this.subContentHolder.style.left="".concat(t.x,"px"),this.subContentHolder.style.top="".concat(t.y,"px"),this.subContentHolder.style.width="".concat(t.width,"px"),this.subContentHolder.style.height="".concat(t.height,"px")}},{key:"checkOffset",value:function(t,e){var i=this.imageScaledFF?this.imageFrameFF:this.imageFrame;if(e!==this.boundingBoxScale){var a=i.width*(e||1),n=i.height*(e||1),s=i.x*(e||1),o=i.y*(e||1);this.boundingBox={left:a>this.size.width?-s:(this.size.width-this.size.width*e)/2,top:n>this.size.height?-o:(this.size.height-this.size.height*e)/2,right:a>this.size.width?this.size.width-(s+a):(this.size.width-this.size.width*e)/2,bottom:n>this.size.height?this.size.height-(o+n):(this.size.height-this.size.height*e)/2},this.boundingBoxScale=e}var r=t.x>this.boundingBox.left?this.boundingBox.left:t.x;r=r<this.boundingBox.right?this.boundingBox.right:r;var l=t.y>this.boundingBox.top?this.boundingBox.top:t.y;return l=l<this.boundingBox.bottom?this.boundingBox.bottom:l,w.Point(r,l)}},{key:"isPointInItem",value:function(t){var e=this.viewTranslate.x+this.size.width/2*this.newScale-this.imageFrame.width/2*this.newScale,i=e+this.imageFrame.width*this.newScale,a=this.size.height/2*this.newScale+this.viewTranslate.y-this.imageFrame.height/2*this.newScale*this.newScale,n=a+this.imageFrame.height*this.scale*this.newScale;return t.x>e&&t.x<i&&t.y>a&&t.y<n}},{key:"normalize",value:function(t){w.cancelAnimationFrame(this.animaSliderRender),t?this.renderTransformTo(w.Point(0,0),1):(this.scale=1,this.newScale=1,this.newScaleMW=1,this.viewTranslate=w.Point(0,0),this.origin=w.Point(0,0),this.targetPoint=this.origin)}},{key:"isInScale",get:function(){return 1!==this.newScale||0!==this.origin.x||0!==this.origin.y}},{key:"zoomIn",value:function(t,e){if("image"===this.item.type){w.cancelAnimationFrame(this.animaSliderRender);var i=e.x-this.viewTranslate.x,a=e.y-this.viewTranslate.y,n=i/this.scale,s=a/this.scale,o=e.x-n*t,r=e.y-s*t,l=w.Point(o,r);this.stopRenderTransform=!0,this.renderTransformTo(this.checkOffset(l,t),t)}}},{key:"zoomByScaleIter",value:function(t,e){if("image"===this.item.type){var i=t<0?1.065:.935;w.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=w.Point(e.x-i*(e.x-this.origin.x),e.y-i*(e.y-this.origin.y)),this.stopRenderTransform=!0,this.renderTransformTo(this.checkOffset(this.origin,this.newScale),this.newScale)}}},{key:"zoomByScaleDeltaToPoint",value:function(t,e){if(this.delegate.pinchToZoom&&"image"===this.item.type){var i;w.cancelAnimationFrame(this.animaSliderRender);var a=t/this.startDistForZoom,n=0;(i=this.startDistForZoom/this.startScale*a/(this.startDistForZoom/this.startScale)*this.startScale)>this.MaxScale&&(n=.8*-(i-this.MaxScale)),i+=n;var s=this.startGlobalPoint.x-this.startTranslate.x,o=this.startGlobalPoint.y-this.startTranslate.y,r=s/this.newScale,l=o/this.newScale,h=this.startGlobalPoint.x-r*i,c=this.startGlobalPoint.y-l*i,d=w.Point(h-e.x,c-e.y);this.scale=i,this.newScale=i,this.viewTranslate=d,this.startTranslate=w.Point(h,c)}}},{key:"viewTranslate",get:function(){return this.viewTranslatePr},set:function(t){this.viewTranslatePr=t,this.itemInner.style.transform="matrix(".concat(this.scale,", 0, 0, \n ").concat(this.scale,", ").concat(t.x,", ").concat(t.y,")")}},{key:"renderTransformByDelta",value:function(t,e){if(!this.stopRenderTransform){var i=w.Point(this.targetPoint.x-t,this.targetPoint.y-e);i=this.checkOffset(i,this.scale),this.renderTransformTo(i,this.scale)}}},{key:"renderTransformTo",value:function(t,e){var i=this;w.cancelAnimationFrame(i.animaSliderRender),this.origin=t,this.targetPoint=t,this.newScale=e;var a=0,n=0,s=0,o=.05,r=.22;i.animaSliderRender=w.requestAnimationFrame((function l(){a=a*o+(t.x-i.viewTranslate.x)*r,n=n*o+(t.y-i.viewTranslate.y)*r,e&&(s=s*o+(e-i.scale)*r);var h=i.viewTranslate.x;h+=a;var c=i.viewTranslate.y;c+=n,e&&(i.scale+=s),i.viewTranslate=w.Point(h,c),Math.abs(a)<.02&&Math.abs(n)<.02&&Math.abs(s)<.02?(w.cancelAnimationFrame(i.animaSliderRender),e&&(i.scale=e),i.viewTranslate=w.Point(t.x,t.y),i.stopRenderTransform=!1):i.animaSliderRender=w.requestAnimationFrame(l)}))}},{key:"renderGlidingTransform",value:function(){var t=this;w.cancelAnimationFrame(t.animaSliderRender);var e=.95,i=.95;t.animaSliderRender=w.requestAnimationFrame((function a(){t.speedX*=e,t.speedY*=i;var n=t.viewTranslate.x;n+=t.speedX;var s=t.viewTranslate.y;if(s+=t.speedY,n>t.boundingBox.left||n<t.boundingBox.right){t.speedX*=-1;var o=n<t.boundingBox.right?t.boundingBox.right:n;n=n>t.boundingBox.left?t.boundingBox.left:o,n+=t.speedX,e=.75}if(s>t.boundingBox.top||s<t.boundingBox.bottom){t.speedY*=-1;var r=s<t.boundingBox.bottom?t.boundingBox.bottom:s;s=s>t.boundingBox.top?t.boundingBox.top:r,s+=t.speedY,i=.75}t.origin=w.Point(n,s),t.viewTranslate=w.Point(n,s),Math.abs(t.speedX)<.02&&Math.abs(t.speedY)<.02?(w.cancelAnimationFrame(t.animaSliderRender),t.speedX=0,t.speedY=0):t.animaSliderRender=w.requestAnimationFrame(a)}))}},{key:"renderStretchstretchTransform",value:function(){var t=this;w.cancelAnimationFrame(t.animaSliderRender);var e=this.checkOffset(w.Point(t.viewTranslate.x+t.speedX,t.viewTranslate.y+t.speedY),t.scale),i=0,a=0;t.animaSliderRender=w.requestAnimationFrame((function n(){i=.2*i+.15*(e.x-t.viewTranslate.x),a=.2*a+.15*(e.y-t.viewTranslate.y);var s=t.viewTranslate.x+i,o=t.viewTranslate.y+a;t.viewTranslate=w.Point(s,o),Math.abs(i)<.02&&Math.abs(a)<.02?(w.cancelAnimationFrame(t.animaSliderRender),t.viewTranslate=e):t.animaSliderRender=w.requestAnimationFrame(n)}))}},{key:"startDrag",value:function(t,e){w.cancelAnimationFrame(this.animaSliderRender),"image"===this.item.type&&(this.startDistForZoom=e,this.startGlobalPoint=t,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("image"===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 t=this.checkOffset(this.origin,this.newScale);this.isBlockDraging=t.x!==this.origin.x||t.y!==this.origin.y,this.isBlockDraging&&this.renderStretchstretchTransform()}this.draging&&(this.isBlockDraging?this.renderStretchstretchTransform():this.renderGlidingTransform(),this.stopRenderTransform=!1,this.draging=!1)}}},{key:"dragin",value:function(t){if("image"!==this.item.type)return!1;var e=this.startTranslate.x-t.x,i=this.startTranslate.y-t.y,a=this.checkOffset(w.Point(e,i),this.newScale);return this.isBlockDraging=a.x!==e||a.y!==i,e-=.7*(e-a.x),i-=.7*(i-a.y),this.oldX=this.newX,this.newX=e,this.speedX=.7*(this.newX-this.oldX),this.oldY=this.newY,this.newY=i,this.speedY=.7*(this.newY-this.oldY),this.origin=w.Point(e,i),this.viewTranslate=w.Point(e,i),this.draging=!0,!0}},{key:"action",value:function(t,e){if(this.item)switch(t){case"click":if(e&&"enter"===e)return"linkAction";if("video"===this.item.type){if(this.videoContent){if(!1===this.videoContent.controls&&(this.view.classList.add("video-play"),this.view.classList.remove("info-icon"),this.delegate.videoVolume&&(this.videoContent.volume=this.delegate.videoVolume),this.videoContent.controls=!0,e||this.videoContent.play()),e&&"space"===e){if(!this.videoContent.paused)return void this.videoContent.pause();this.videoContent.play()}return this.videoContent.paused?"videoStop":"videoPlay"}if(this.item.mime_type)return this.isEmbedContent?(this.removeEmbedVideoContent(),"videoStop"):(this.addEmbedVideoContent(),"videoPlay")}if("audio"===this.item.type&&this.audioContent)return this.audioContent.paused?(this.audioContent.setAttribute("controls",""),this.audioContent.play(),"audioPlay"):(this.audioContent.pause(),this.audioContent.removeAttribute("controls"),"audioStop");if("post"===this.item.type||"page"===this.item.type||"product"===this.item.type)return"linkAction";break;case"removeSubContent":if("video"===this.item.type)return this.videoContent?(this.view.classList.remove("video-play"),this.view.classList.add("info-icon"),this.videoContent.pause(),this.videoContent.currentTime=0,this.videoContent.controls=!1,0!==this.videoContent.played.length&&(this.delegate.videoVolume=this.videoContent.volume)):this.removeEmbedVideoContent(),"videoStop";this.audioContent&&(this.audioContent.pause(),this.audioContent.currentTime=0);break;default:return}}},{key:"addEmbedVideoContent",value:function(){if(this.item.mime_type){var t=this.item.mime_type.split("/")[1];if(!t)return;this.view.classList.add("video-play");var e,i=this.item.videoId,a=this.delegate,n=this;switch(a.onYtStatusChange(void 0),t){case"youtube":if(void 0===window.YT){var s=document.createElement("script");s.src="https://www.youtube.com/iframe_api";var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(s,o)}if(this.subContentHolder.innerHTML='<div id="'+i+'" data-id="sgb-video-player" data-gallery="'+a.appName+'" ></div>',window.YT){var r=window.YT,l={autoplay:1,frameborder:0,playlist:i,loop:a.config.sl_video_loop?1:0,rel:0};a.config.sl_video_loop||(delete l.playlist,delete l.loop);var h=new r.Player(i,{videoId:i,playerVars:l,events:{onReady:function(){a.onYtStatusChange("onReady")},onStateChange:function(t){1===t.data&&a.setVideoPlayer(h,"yt",n),a.onYtStatusChange(t.data)}}});a.setVideoPlayer(h,"yt",n)}else window.onYouTubeIframeAPIReady=function(){var t=window.YT,e={autoplay:1,frameborder:0,playlist:i,loop:a.config.sl_video_loop?1:0,rel:0};a.config.sl_video_loop||(delete e.playlist,delete e.loop);var s=new t.Player(i,{videoId:i,playerVars:e,events:{onReady:function(){a.onYtStatusChange("onReady")},onStateChange:function(t){1===t.data&&a.setVideoPlayer(s,"yt",n),a.onYtStatusChange(t.data)}}})};break;case"vimeo":e=(e=w.vimeoCode.replace("%id%",this.item.videoId)).replace("%hash%",this.item.videoHash?"h="+this.item.videoHash+"&":""),this.subContentHolder.innerHTML=e;var c=this.subContentHolder.querySelector('[data-id="sgb-video-player"]');if(c)if(c.setAttribute("data-gallery",a.appName),void 0===window.Vimeo){var d=document.createElement("script");d.src="https://player.vimeo.com/api/player.js";var u=document.getElementsByTagName("script")[0];u.parentNode.insertBefore(d,u),d.onload=function(){if(window.Vimeo){var t=new Vimeo.Player(c);a.config.sl_video_loop&&t.setLoop(!0),t.on("play",(function(t){a.onYtStatusChange("onReady")})),t.on("ended",(function(t){a.onYtStatusChange(0)})),t.on("play",(function(e){a.onYtStatusChange(1),a.setVideoPlayer(t,"vimeo",n)}))}}}else if(window.Vimeo){var g=new Vimeo.Player(c);a.config.sl_video_loop&&g.setLoop(!0),g.on("play",(function(t){a.onYtStatusChange("onReady")})),g.on("ended",(function(t){a.onYtStatusChange(0)})),g.on("play",(function(t){a.onYtStatusChange(1),a.setVideoPlayer(g,"vimeo",n)}))}}this.isEmbedContent=!0}}},{key:"removeEmbedVideoContent",value:function(){this.isEmbedContent&&(this.subContentHolder.innerHTML=new st(this.iconSet.PLAY_SVG).innerHTML,this.subContentHolder.getElementsByTagName("svg")[0].style.marginLeft="7px",this.isEmbedContent=!1,this.view.classList.remove("video-play"),this.view.classList.add("info-icon"),this.delegate.onYtStatusChange(void 0),this.delegate.setVideoPlayer(void 0,void 0))}},{key:"fadePrep",value:function(){this.itemInner.style.animationName=null}},{key:"fadeIn",value:function(){var t=this;this.itemInner.style.animationName="pgc-rev-fade-in",this.fadeAnimClear=setTimeout((function(){t.fadePrep()}),600)}}],[{key:"classPref",get:function(){return"pgc-rev-slider-page-"}}])}(),rt=function(){function t(e,i){Q(this,t),this.iconSet=t.ICONS,this.config=t.CONFIG,w.copyProperties(i,this.config),this.appSet=e,this.appName=e.appName,this.cacherItemsList=this.appSet.cacheItemsList,this.id="".concat(this.appName,"_vitSlider_"),this.itemsList=void 0,this.visibleBounds=w.Rect(0,0,0,0),this.isControllsShow=!1,this.isZooming=!1,this.needHideControlls=!1,this.naviButtonsStatus=void 0,this.canNext=!0,this.canPrev=!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(t.classPref,"view"),this.view.id="".concat(this.id,"main"),this.resizeDelay=void 0,this.size=w.Size(0,0);var a=document.createElement("div");a.className="".concat(t.classPref,"bg"),this.config.sl_backgroundColor&&(this.background=a,this.background.style.backgroundColor=this.config.sl_backgroundColor,this.view.appendChild(a)),this.config.sl_audioPlayer&&this.config.sl_audioPlayer.pause(),this.sliderPages=[],this.draggingPr=!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.videoVolume=void 0,this.pinchToZoom=!0,this.canRemovedLite=!1,this.FF_Mode=!1,this.mouseWheelMode=!1,this.animaSliderRender=void 0,this.slider=document.createElement("div"),this.slider.className="".concat(t.classPref,"wrap"),this.view.appendChild(this.slider),this.autoStartActionDelay=void 0,this._ytStatus=void 0}return et(t,[{key:"setYOffset",value:function(t){this.config.sl_yOffset=t,this.resizeHandler(this.size)}},{key:"onYtStatusChange",value:function(e){this._ytStatus=e,this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.YT_ON_CHANGE_STATUS,this,{status:e,itemIndex:this.itemIndex,itemID:this.itemsList[this.itemIndex].id}))}},{key:"ytStatus",get:function(){return this._ytStatus}},{key:"dragging",get:function(){return this.draggingPr},set:function(t){t?this.view.classList.add("isDragging"):this.view.classList.remove("isDragging"),this.draggingPr=t}},{key:"viewOfsetY",get:function(){return this.view.getBoundingClientRect().top+w.pageYOffset}},{key:"viewOfsetX",get:function(){return this.view.getBoundingClientRect().left+w.pageXOffset}},{key:"copyRight",value:function(){var e,i=this;return function(a){if(!w.Device.ios||"mouseup"!==a.type){var n,s;a.changedTouches&&a.changedTouches[0]?(n=a.changedTouches[0].pageX,s=a.changedTouches[0].pageY):(n=a.pageX,s=a.pageY),n-=i.viewOfsetX,s-=i.viewOfsetY;var o=i.itemsList[i.itemIndex];if(o.webView&&o.webView===a.target||a.target.className&&"pgc-rev-slider-page-sub-content-holder"===a.target.className||a.target.className&&("lb-video-content"===a.target.className||"lb-audio-content"===a.target.className)){a.preventDefault();var r=document.getElementById("gm_copyr");r&&(clearTimeout(e),r.parentNode.removeChild(r),r=null),(r=document.createElement("div")).id="gm_copyr",r.className="".concat(t.classPref,"hints"),r.innerHTML=o.user&&o.user.displayname?"Hey, this photo is ©".concat(o.user.displayname):i.config.sl_copyR_Alert,o.copyright&&""!==o.copyright&&(r.innerHTML=o.copyright),r.style.top="".concat(s,"px"),r.style.left="".concat(n,"px"),i.view.appendChild(r),e=setTimeout((function(){r.parentNode.removeChild(r)}),1e3)}}}}},{key:"initByStage",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t.appendChild(this.view),e&&this.createControlls()}},{key:"addToStage",value:function(){var e=this,i=document.getElementsByTagName("body")[0];this.view.style.zIndex=w.findHighestZIndex(i)+1,w.disableBodyScrollSlider(),i.appendChild(this.view),setTimeout((function(){e.view.classList.add("".concat(t.classPref,"activate"))}),30)}},{key:"initByList",value:function(t,e){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(t&&t.length>0){var a=this;if(this.currentItemIndex=e&&0!==e?0:void 0,this.startItemIndex=e||0,this.itemsList=t,!i)return void a.createLayout();this.createlayoutDelay=setTimeout((function(){a.createLayout()}),100)}}},{key:"prepareToRemove",value:function(){if(!this.removing){clearTimeout(this.createlayoutDelay),clearTimeout(this.intitByTermDelay),this.removing=!0,this.cacherItemsList.init(),this.appSet.appEventManager.removeGMEventListener(t.EVENTS.COLLECTION_DATA_REDY,this,"dataLoaded"),this.view.removeEventListener("wheel",this.handlerMWheel,!1),this.config.sl_copyR_Proptection&&document.removeEventListener("contextmenu",this.copyR,!1),this.config.sl_audioPlayer&&this.config.sl_audioPlayer.pause(),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.REMOVE_LIGHTBOX,this,{}));for(var e=0;e<this.sliderPages.length;e+=1){this.sliderPages[e].clearPage();var i=this.sliderPages[e].view;i.parentNode&&i.parentNode.removeChild(i)}this.sliderPages=[],this.removing=!1}}},{key:"remoteControl",value:function(e){if(this.startDragHandler||"esc"===e)switch(e){case"prev":this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.UPDATE_CONTROLS,this,{draging:!0})),this.gotoPrev();break;case"next":this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.UPDATE_CONTROLS,this,{draging:!0})),this.gotoNext();break;case"enter":case"space":this.firstClick(w.Point(this.view.clientWidth/2,this.view.clientHeight/2),e);break;case"esc":this.prepareToRemove();break;case"zoom":this.zoomSwitch()}}},{key:"showPreloader",value:function(t){var e;if(t){if(document.getElementById("".concat(this.appName,"slider_preloader")))return;(e=w.createPreloaderView(this.config.sl_preloaderColor)).id="".concat(this.appName,"slider_preloader"),this.view.appendChild(e)}else(e=document.getElementById("".concat(this.appName,"slider_preloader")))&&w.fadeOut(e,(function(){e&&e.parentNode&&e.parentNode.removeChild(e)}),500)}},{key:"createLayout",value:function(){var e=this;this.itemsAmount=this.itemsList.length,this.size=w.Size(this.view.clientWidth,this.view.clientHeight),w.miniScreen&&this.slider.classList.add("miniScreen"),this.prevButton&&this.size.width<500&&(this.prevButton.classList.add("next-prev-button-mini-screen"),this.nextButton.classList.add("next-prev-button-mini-screen")),this.initSlider(),this.size.height<700&&this.slider.classList.add("miniScreen"),this.initDownloadProtection(this.config.sl_copyR_Proptection,this.config.sl_copyR_Alert),this.view.addEventListener("wheel",this.mouseWheelHandler(),!1),setTimeout((function(){e.showControlls(!0),e.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.UPDATE_CONTROLS,e,{status:"ready"}))}),500)}},{key:"initDownloadProtection",value:function(t,e){e&&(this.config.sl_copyR_Alert=e),t?(this.copyR&&document.removeEventListener("contextmenu",this.copyR,!1),this.copyR=this.copyRight(),document.addEventListener("contextmenu",this.copyR,!1)):(document.removeEventListener("contextmenu",this.copyR,!1),this.copyR=void 0),this.config.sl_copyR_Proptection=t}},{key:"itemIndex",get:function(){return this.itemNumPr},set:function(t){this.itemNumPr=t,this.updateControlls()}},{key:"pageConstructor",get:function(){return new ot(this)}},{key:"initSlider",value:function(){var t,e=0;if(0===this.sliderPages.length)for(e=0;e<3;e+=1)t=this.pageConstructor,this.slider.appendChild(t.view),this.sliderPages.push(t),t.resize(this.size);var i=this.itemsAmount>2?-1:0;for(e=0;e<3;e+=1)(t=this.sliderPages[e]).posX=i,t.itemIndex=void 0,i+=1;this.startDragHandler?this.gotoPageByNum(0):(this.startDragHandler=this.startDrag(),w.isTouchDevice&&(this.slider.addEventListener("touchstart",this.startDragHandler,w.passiveListener),window.addEventListener("touchmove",(function(){}),w.passiveListener)),this.slider.addEventListener("mousedown",this.startDragHandler,!1),this.gotoPageByNum(this.startItemIndex))}},{key:"scrollViewTranslateY",get:function(){return this.scrollViewTranslateYPr},set:function(t){this.scrollViewTranslateYPr=t,this.slider.style.transform="translate3d(".concat(this.scrollViewTranslateX,"px,").concat(t,"px, 0px)"),0===t||this.canRemovedLite||this.sliderVerticalRender()}},{key:"scrollViewTranslateX",get:function(){return this.scrollViewTranslateXPr},set:function(t){this.scrollViewTranslateXPr=t,this.slider.style.transform="translate3d(".concat(t,"px,").concat(this.scrollViewTranslateY,"px, 0px)"),!1===this.config.sl_carouselMode&&(t>0||t<-this.size.width*(this.itemsAmount-1))||this.pageRenderByIndex(-Math.round(t/this.size.width))}},{key:"sliderVerticalRender",value:function(){var e=1-Math.abs(this.scrollViewTranslateY)/(this.size.height/2);this.background&&(this.background.style.opacity=e),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.UPDATE_CONTROLS,this,{backgroundOpacity:e})),this.needHideControlls||(e<.8?(this.showHideNaviButton("hide"),this.showControlls(!1)):(this.showHideNaviButton("show"),this.showControlls(!0)))}},{key:"tryOpenItemID",value:function(t){for(var e=0;e<this.itemsList.length;e+=1)if(this.itemsList[e].ID===t)return this.gotoPageByNum(e),!0;return!1}},{key:"gotoPageByNum",value:function(t){this.currentItemIndex!==t?this.gotoPageByIndex(t,!1):this.pausePlayVideo()}},{key:"gotoNext",value:function(){this.gotoPageByIndex(this.currentItemIndex+1,this.config.sl_next_prev_animation)}},{key:"gotoPrev",value:function(){this.gotoPageByIndex(this.currentItemIndex-1,this.config.sl_next_prev_animation)}},{key:"renderTransformTo",value:function(t){var e=this;w.cancelAnimationFrame(e.animaSliderRender);var i=5*e.speedX,a=5*e.speedY;e.animaSliderRender=w.requestAnimationFrame((function n(){i=.2*i+.15*(t.x-e.scrollViewTranslateX),a=.2*a+.15*(t.y-e.scrollViewTranslateY),e.scrollViewTranslateX+=i,e.scrollViewTranslateY+=a,Math.abs(i)<1&&Math.abs(a)<1&&(e.dragging=!1),Math.abs(i)<.1&&Math.abs(a)<.1?(w.cancelAnimationFrame(e.animaSliderRender),e.scrollViewTranslateX=t.x,e.scrollViewTranslateY=t.y,e.sliderTransitionComplete({target:e.slider})):e.animaSliderRender=w.requestAnimationFrame(n)}))}},{key:"gotoPageByIndex",value:function(t,e){if(void 0!==this.size.width&&0!==this.size.width){(this.itemsAmount<3||!1===this.config.sl_carouselMode)&&(t=Math.max(0,t),t=Math.min(this.itemsAmount-1,t));var i=-t*this.size.width;e?this.renderTransformTo(w.Point(i,this.scrollViewTranslateY)):(w.cancelAnimationFrame(this.animaSliderRender),this.scrollViewTranslateX=i,this.pageInFocus&&this.pageInFocus.fadeIn(),this.sliderTransitionComplete({target:this.slider}))}}},{key:"pageRenderByIndex",value:function(t){if(void 0===t||this.currentItemIndex!==t){void 0!==this.pageInFocus&&(this.pageInFocusPrev=this.pageInFocus,this.pageInFocusPrev.action("removeSubContent"),this.pageInFocus.isInScale&&(this.zoomingPage=this.pageInFocus));var e=0;if(this.itemsAmount<3){for(e=0;e<this.itemsAmount;e+=1)this.sliderPages[e].initByItem(this.itemsList[e]);return this.pageInFocus=this.sliderPages[t],this.currentItemIndex=t,void(this.itemIndex=t)}var i=(t+1)%3;i<0&&(i+=3);var a=i-1>=0?i-1:2,n=i+1<3?i+1:0,s=[a,i,n],o=[t-1,t,t+1];for(e=0;e<s.length;e+=1)this.sliderPages[s[e]].posX=o[e];this.currentItemIndex=t,this.pageInFocus=this.sliderPages[i],this.itemIndex=t<0?this.itemsAmount+(t%this.itemsAmount==0?-this.itemsAmount:t%this.itemsAmount):t%this.itemsAmount,this.sliderPages[i].initByItem(this.itemsList[this.itemIndex]),this.sliderPages[n].initByItem(this.itemIndex+1<this.itemsAmount?this.itemsList[this.itemIndex+1]:this.config.sl_carouselMode?this.itemsList[0]:void 0),this.sliderPages[a].initByItem(this.itemIndex-1<0?this.config.sl_carouselMode?this.itemsList[this.itemsAmount-1]:void 0:this.itemsList[this.itemIndex-1])}}},{key:"pausePlayVideo",value:function(){var t=this;if(void 0!==this.videoInPlayer&&void 0!==this.videoInPlayer&&void 0!==this.videoPlayerType&&this.videoPlayer&&this.videoPlayerType)try{"yt"===this.videoPlayerType?2===this.videoPlayer.getPlayerState()?this.videoPlayer.playVideo():1===this.videoPlayer.getPlayerState()&&this.videoPlayer.pauseVideo():"vimeo"===this.videoPlayerType?this.videoPlayer.getPaused().then((function(e){e?t.videoPlayer.play():t.videoPlayer.pause()})):"html"===this.videoPlayerType&&(this.videoPlayer.paused?this.videoPlayer.play():this.videoPlayer.pause())}catch(t){at(t)}}},{key:"tryPausedVideo",value:function(t){if(void 0!==this.videoInPlayer&&this.videoInPlayer!==t&&this.videoPlayer)try{"html"===this.videoPlayerType||"vimeo"===this.videoPlayerType?this.videoPlayer.pause():"yt"===this.videoPlayerType&&this.videoPlayer.pauseVideo(),this.externalPause=!0}catch(t){at(t)}}},{key:"tryPlayAgainVideo",value:function(){if(void 0!==this.videoInPlayer&&void 0!==this.videoPlayer&&void 0!==this.videoPlayerType)try{"html"===this.videoPlayerType||"vimeo"===this.videoPlayerType?this.videoPlayer.play():"yt"===this.videoPlayerType&&this.videoPlayer.playVideo()}catch(t){at(t)}}},{key:"setVideoPlayer",value:function(t,e,i){this.videoPlayerType=e,this.videoPlayer=t,this.externalPause=!1,i?(this.videoInPlayer=i.item.id,this.videoAutoStarted=i.item.id):this.videoInPlayer=void 0}},{key:"tryAutoStartVideo",value:function(t){this.config.sl_video_auto_start&&this.pageInFocus.item&&this.videoAutoStarted!==t&&"video"===this.pageInFocus.item.type&&this.pageInFocus.item.id===t&&window&&void 0===window.pgcVideoAutostartLock&&(this.videoAutoStarted=t,this.firstClick(w.Point(this.view.clientWidth/2,this.view.clientHeight/2),"space"))}},{key:"sliderTransitionComplete",value:function(t){var e=this;if(t.target===this.slider){var i=this.cacherItemsList.status();(i.list!==this.itemsList||i.list===this.itemsList&&this.itemIndex>=i.index)&&this.cacherItemsList.init(this.itemsList,this.itemIndex,5),clearTimeout(this.autoStartActionDelay),this.config.sl_video_auto_start&&this.pageInFocus.item&&("video"!==this.pageInFocus.item.type&&(this.videoAutoStarted=void 0),this.pageInFocus.videoContentReady&&(this.autoStartActionDelay=setTimeout((function(){e.tryAutoStartVideo(e.pageInFocus.item.id)}),600))),void 0!==this.zoomingPage&&this.zoomingPage!==this.pageInFocus&&(this.zoomingPage.normalize(),this.zoomControll())}}},{key:"mouseWheelHandler",value:function(){var e=this,i=Date.now(),a=[],n=[],s=400,o=0;return e.handlerMWheel=function(r){if(!1!==e.mouseWheelMode||!1!==e.config.sl_mouseWheelPagination||e.zoomingPage){r.stopPropagation(),r.preventDefault();var l=w.Point(0,0);if("deltaX"in r)1===r.deltaMode?(l.x=18*r.deltaX,l.y=18*r.deltaY):(l.x=r.deltaX,l.y=r.deltaY);else if("wheelDelta"in r)r.wheelDeltaX&&(l.x=-.16*r.wheelDeltaX),r.wheelDeltaY?l.y=-.16*r.wheelDeltaY:l.y=-.16*r.wheelDelta;else{if(!("detail"in r))return;l.y=r.detail}if(e.config.sl_mouseWheelPagination&&!e.isZoom){var h=Math.abs(l.y)>Math.abs(l.x)?l.y:-l.x,c=Date.now();0===a.length&&a.push(c),c-a[0]<s?(n.length>0&&n[n.length-1]!==h&&(o+=1),n.push(h),a.push(c)):(s=o>3?1100:500,n=[],a=[],o=0),c-i>s&&(h>0?e.gotoNext():e.gotoPrev(),e.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.UPDATE_CONTROLS,e,{draging:!0})),i=c)}else e.zoomingPage&&!e.dragging&&e.zoomingPage.renderTransformByDelta(l.x,l.y)}},e.handlerMWheel}},{key:"zoomSwitch",value:function(){var t=w.Point(this.view.clientWidth/2,this.view.clientHeight/2);this.secondClick(t)}},{key:"isZoom",get:function(){return!!this.pageInFocus&&this.pageInFocus.isInScale}},{key:"fitMode",value:function(t){this.config.sl_fit&&(this.FF_Mode=t);for(var e=0;e<this.sliderPages.length;e+=1)this.sliderPages[e].fit()}},{key:"firstClick",value:function(t,e){var i;if(this.pageInFocus?i=this.pageInFocus.action("click",e):this.prepareToRemove(),this.pageInFocus.isPointInItem(t)||w.miniScreen)if(this.pageInFocus.isInScale)this.pageInFocus.normalize(!0),this.zoomingPage=void 0,this.showControlls(!this.needHideControlls);else switch(i){case"audioPlay":this.fitMode(!0),this.showControlls(!1),this.needHideControlls=!this.isControllsShow;break;case"audioStop":this.fitMode(!1),this.showControlls(!0),this.needHideControlls=!this.isControllsShow;break;case"linkAction":void 0!==this.pageInFocus.item.link&&""!==this.pageInFocus.item.link&&window.open(this.pageInFocus.item.link,this.pageInFocus.item.link_target?this.pageInFocus.item.link_target:"_blank");break;case"videoPlay":this.pageInFocus.isPointInItem(t)?(this.fitMode(!0),this.showControlls(!1),this.needHideControlls=!this.isControllsShow):(this.switchShowControlls(),this.needHideControlls=!this.isControllsShow);break;case"videoStop":this.pageInFocus.isPointInItem(t)?(this.fitMode(!1),this.showControlls(!0),this.needHideControlls=!this.isControllsShow):(this.switchShowControlls(),this.needHideControlls=!this.isControllsShow);break;default:this.fitMode(this.isControllsShow),this.switchShowControlls(),this.needHideControlls=!this.isControllsShow}else this.config.sl_canRemoved?"videoStop"===i?(this.fitMode(!1),this.showControlls(!0),this.needHideControlls=!this.isControllsShow):this.prepareToRemove():this.config.sl_canRemoved||("videoStop"===i?(this.fitMode(!1),this.showControlls(!0),this.needHideControlls=!this.isControllsShow):this.blackMilkEvent&&this.blackMilkEvent())}},{key:"secondClick",value:function(t){this.config.sl_zoom&&this.pageInFocus.isPointInItem(t)&&(this.pageInFocus.isInScale?(this.pageInFocus.normalize(!0),this.zoomingPage=void 0,this.showControlls(!this.needHideControlls)):(this.zoomingPage&&this.zoomingPage.normalize(),this.zoomingPage=this.pageInFocus,this.zoomingPage.zoomIn(Math.abs(this.zoomingPage.imgScale-1)<.3?2:this.zoomingPage.imgScale,t),this.needHideControlls=!this.isControllsShow,this.showControlls(!1)))}},{key:"doubleClickController",value:function(t){var e=this;if(!w.Device.ios||"mouseup"!==t.type){var i,a;if(t.changedTouches&&t.changedTouches[0]?(i=t.changedTouches[0].pageX,a=t.changedTouches[0].pageY):(i=t.pageX,a=t.pageY),i-=this.viewOfsetX,a-=this.viewOfsetY,this.firsrTap)return clearTimeout(this.firsrTap),this.firsrTap=void 0,void this.secondClick(w.Point(i,a));this.firsrTap=setTimeout((function(){e.firsrTap=void 0,e.firstClick(w.Point(i,a))}),400)}}},{key:"startDrag",value:function(){var e,i,a,n,s,o,r,l,h,c=this,d=c.viewOfsetY,u=c.viewOfsetX,g=0,m=0,v=0;function p(t){var e,l,h,p,y;if(t.originalEvent&&(t=t.originalEvent),t.touches?!c.dragging&&t.touches.length>1?c.config.sl_zoom&&(r=!0,e=t.touches[0].pageX,l=t.touches[0].pageY,h=t.touches[1].pageX,p=t.touches[1].pageY,y=Math.hypot(e-h,l-p),e+=(h-e)/2,l+=(p-l)/2):(r=!1,e=t.touches[0].pageX,l=t.touches[0].pageY):(e=t.pageX,l=t.pageY),e-=u,l-=d,!(w.Device.ios&&i<=20)){var f,b;if(void 0===o&&(l===a?o=!1:(f=180*Math.atan2(Math.abs(l-a),Math.abs(e-i))/Math.PI,o=f>45)),!c.dragging&&c.zoomingPage){t.preventDefault();var C=Math.abs(i-e)>4?i-e:0,S=Math.abs(a-l)>4?a-l:0;return(C||S)&&(c.zoomingDrag=!0),void(r?c.pageInFocus.zoomByScaleDeltaToPoint(y,w.Point(C,S),w.Point(e,l)):c.zoomingPage&&c.zoomingPage.dragin(w.Point(C,S)))}o?(g=0,(b=Math.abs(a-l)>4?a-l:0)&&(c.dragging=!0),(c.config.sl_canRemoved||c.canRemovedLite)&&(c.scrollViewTranslateY=s-b)):(t.preventDefault(),c.transition=!0,(b=Math.abs(i-e)>4?i-e:0)&&(c.dragging=!0),c.scrollViewTranslateX=n-b,m=v,v=c.scrollViewTranslateX,g=v-m)}}function y(t){if(o=void 0,w.isTouchDevice&&(document.removeEventListener("touchmove",p,w.passiveListener),document.removeEventListener("touchend",y,w.passiveListener)),document.removeEventListener("mousemove",p,!1),document.removeEventListener("mouseup",y,!1),document.removeEventListener("contextmenu",y,!1),c.dragging||r||c.zoomingDrag){if(c.zoomingPage&&(c.zoomingPage.stopDrag(),r=!1),!c.zoomingPage)if(Math.abs(c.scrollViewTranslateY)<4){var i=c.currentItemIndex,a=w.isTouchDevice?7:1;Math.abs(g)>a&&e===c.currentItemIndex&&(i=g>0?i-1:i+1),c.speedX=g,c.scrollViewTranslateY=0,c.gotoPageByIndex(i,!0)}else{var n=c.scrollViewTranslateY/(c.size.height/2);Math.abs(n)>.2?c.canRemovedLite?c.blackMilkEvent&&(c.scrollViewTranslateY=0,c.blackMilkEvent()):c.prepareToRemove():c.renderTransformTo(w.Point(c.scrollViewTranslateX,0))}this.dragging=!1}else c.doubleClickController(t);c.zoomingDrag=!1,h=t.type}return function(o){var f,b,C,S;"mousedown"===o.type&&"touchend"===h||(c.zoomingPage=c.pageInFocus.isInScale?c.pageInFocus:void 0,w.cancelAnimationFrame(c.animaSliderRender),e=c.currentItemIndex,o.originalEvent&&(o=o.originalEvent),w.isTouchDevice||o.preventDefault(),o.button&&0!==o.button||(o.touches?!c.dragging&&o.touches.length>1?c.config.sl_zoom&&(r=!0,f=o.touches[0].pageX,b=o.touches[0].pageY,C=o.touches[1].pageX,S=o.touches[1].pageY,l=Math.hypot(f-C,b-S),f+=(C-f)/2,b+=(S-b)/2,c.zoomingPage=c.pageInFocus,c.needHideControlls=c.isControllsShow,c.showControlls(!1)):(f=o.touches[0].pageX,b=o.touches[0].pageY):(f=o.pageX,b=o.pageY),f-=u,b-=d,c.speedX=0,c.speedY=0,g=0,m=0,v=c.scrollViewTranslateX,i=f,a=b,n=c.scrollViewTranslateX,s=c.scrollViewTranslateY,c.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.UPDATE_CONTROLS,c,{draging:!0})),c.zoomingPage&&c.zoomingPage.startDrag(w.Point(i,a),l),w.isTouchDevice&&(document.addEventListener("touchmove",p,w.passiveListener),document.addEventListener("touchend",y,w.passiveListener)),document.addEventListener("mousemove",p,!1),document.addEventListener("mouseup",y,!1),document.addEventListener("contextmenu",y,!1)))}}},{key:"createControlls",value:function(){var e=this;function i(t){t.style.backgroundColor=e.config.sl_navigationColorOver,t.childNodes[0].style.fill=e.config.sl_navigationIconColorOver,t.classList.add("hover")}function a(t){t.style.backgroundColor=e.config.sl_navigationColor,t.childNodes[0].style.fill=e.config.sl_navigationIconColor,t.classList.remove("hover")}this.prevButton=document.createElement("div"),this.prevButton.className="".concat(t.classPref,"next-prev-button"),this.prevButton.style.left="".concat(0,"px"),this.prevButton.style.transform="translate(-150%, -50%)",this.prevButton.style.backgroundColor=e.config.sl_navigationColor,this.prevButton.style.visibility="hidden",this.prevButton.innerHTML=w.ICONS.PREV_ARR,this.prevButton.childNodes[0].style.fill=e.config.sl_navigationIconColor,this.prevButton.onmouseenter=function(){i(this)},this.prevButton.onmouseleave=function(){a(this)},this.prevButton.onclick=function(){e.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.UPDATE_CONTROLS,e,{draging:!0})),e.gotoPrev(),w.Device.desktop||a(this)},this.view.appendChild(this.prevButton),this.nextButton=document.createElement("div"),this.nextButton.className="".concat(t.classPref,"next-prev-button"),this.nextButton.style.backgroundColor=e.config.sl_navigationColor,this.nextButton.style.right="0px",this.nextButton.style.transform="translate(150%, -50%)",this.nextButton.style.visibility="hidden",this.nextButton.innerHTML=w.ICONS.NEXT_ARR,this.nextButton.childNodes[0].style.fill=e.config.sl_navigationIconColor,this.nextButton.onmouseenter=function(){i(this)},this.nextButton.onmouseleave=function(){a(this)},this.nextButton.onclick=function(){e.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.UPDATE_CONTROLS,e,{draging:!0})),e.gotoNext(),w.Device.desktop||a(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.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.UPDATE_CONTROLS,this,{next:this.canNext?"show":"hide",prev:this.canPrev?"show":"hide"})),this.prevButton&&(this.prevButton.style.transform="translate(0%, -50%)",this.prevButton.style.transform="translate(0%, -50%)",this.canNext&&(this.prevButton.style.transform="translate(0%, -50%)"),this.canNext&&(this.nextButton.style.transform="translate(0%, -50%)"));break;case"hide":this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.UPDATE_CONTROLS,this,{next:"hide",prev:"hide"})),this.prevButton&&(this.prevButton.style.transform="translate(-150%, -50%)",this.nextButton.style.transform="translate(150%, -50%)")}this.naviButtonsStatus=e}}},{key:"zoomControll",value:function(){this.isZooming!==this.isZoom&&(this.isZooming=this.isZoom,this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.UPDATE_CONTROLS,this,{zoom:this.isZoom?"zoomIn":"zoomOut"})),this.isZoom?(this.view.classList.add("pgc-img-zoom-in"),this.showHideNaviButton("hide")):(this.view.classList.remove("pgc-img-zoom-in"),this.showHideNaviButton("show")))}},{key:"showControlls",value:function(e){this.zoomControll(),this.isControllsShow!==e&&(e?(this.slider.classList.add("pgc-show-controls"),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.UPDATE_CONTROLS,this,{controls:"show"})),this.showHideNaviButton("show")):(this.slider.classList.remove("pgc-show-controls"),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.UPDATE_CONTROLS,this,{controls:"hide"})),w.miniScreen&&this.showHideNaviButton("hide")),this.isControllsShow=e)}},{key:"updateControlls",value:function(){this.itemsAmount<3||!1===this.config.sl_carouselMode?(0===this.itemIndex?(this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.UPDATE_CONTROLS,this,{prev:"hide"})),this.canPrev=!1,this.prevButton&&(this.prevButton.style.visibility="hidden")):(this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.UPDATE_CONTROLS,this,{prev:"show"})),this.canPrev=!0,this.prevButton&&(this.prevButton.style.visibility="visible")),this.itemIndex===this.itemsAmount-1?(this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.UPDATE_CONTROLS,this,{next:"hide"})),this.canNext=!1,this.nextButton&&(this.nextButton.style.visibility="hidden")):(this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.UPDATE_CONTROLS,this,{next:"show"})),this.canNext=!0,this.nextButton&&(this.nextButton.style.visibility="visible")),1===this.itemsAmount&&(this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.UPDATE_CONTROLS,this,{next:"hide",prev:"hide"})),this.canNext=this.canPrev=!1,this.prevButton&&(this.prevButton.style.visibility="hidden"),this.nextButton&&(this.nextButton.style.visibility="hidden"))):(this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.UPDATE_CONTROLS,this,{next:"show",prev:"show"})),this.canNext=this.canPrev=!0,this.prevButton&&(this.prevButton.style.visibility="visible"),this.nextButton&&(this.nextButton.style.visibility="visible"));var e=this.itemsList[this.itemIndex];e&&this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.UPDATE_CONTROLS,this,{item:e,itemIndex:this.itemIndex}))}},{key:"resizeHandler",value:function(t){var e=this;this.resizeDelay&&clearTimeout(this.resizeDelay),w.cancelAnimationFrame(this.animaSliderRender),this.resizeDelay=setTimeout((function(){if(e.size=t,e.prevButton&&(e.size.width<500?(e.prevButton.classList.add("next-prev-button-mini-screen"),e.nextButton.classList.add("next-prev-button-mini-screen")):(e.prevButton.classList.remove("next-prev-button-mini-screen"),e.nextButton.classList.remove("next-prev-button-mini-screen"))),0!==e.sliderPages.length){for(var i=0;i<e.sliderPages.length;i+=1)e.sliderPages[i].resize(e.size);e.zoomControll(),e.gotoPageByIndex(e.currentItemIndex,!1),e.size.height<410&&e.config.sl_canRemoved&&(e.showControlls(!1,!0),e.needHideControlls=!0)}}),70)}}],[{key:"classPref",get:function(){return"pgc-rev-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>'}}},{key:"EVENTS",get:function(){return{COLLECTION_DATA_REDY:"COLLECTION_DATA_REDY",UPDATE_CONTROLS:"UPDATE_CONTROLS",YT_ON_CHANGE_STATUS:"YT_ON_CHANGE_STATUS",ZOOM:"ZOOM",REMOVE_LIGHTBOX:"REMOVE_LIGHTBOX"}}},{key:"CONFIG",get:function(){return{sl_preloaderColor:"#494949",sl_backgroundColor:"rgba(0,0,0,1)",sl_navigationIconColor:"rgba(255,255,255,1)",sl_navigationIconColorOver:"rgba(0,0,0,0.8)",sl_navigationColor:"rgba(0,0,0,0.8)",sl_navigationColorOver:"rgba(255,255,255,1)",sl_zoom:!1,sl_fit:!1,sl_xOffset:2,sl_yOffset:0,sl_canRemoved:!1,sl_copyR_Alert:"Hello, this photo is mine!",sl_copyR_Proptection:!0,sl_audioPlayer:void 0,sl_mouseWheelPagination:!1,sl_next_prev_animation:!1,sl_video_auto_start:!1,sl_video_loop:!1,sl_carouselMode:!0,sl_FullSizeViewMode:!1}}}])}(),lt=i(9966),ht=i.n(lt),ct={};function dt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function ut(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?dt(Object(i),!0).forEach((function(e){gt(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):dt(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function gt(t,e,i){return(e=ft(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function mt(t){return mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mt(t)}function vt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pt(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,ft(a.key),a)}}function yt(t,e,i){return e&&pt(t.prototype,e),i&&pt(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function ft(t){var e=function(t){if("object"!=mt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=mt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==mt(e)?e:e+""}ct.styleTagTransform=u(),ct.setAttributes=l(),ct.insert=o().bind(null,"head"),ct.domAPI=n(),ct.insertStyleElement=c(),e()(ht(),ct),ht()&&ht().locals&&ht().locals;var bt=function(){function t(e,i){vt(this,t),this.delegate=e,this.appSet=this.delegate.appSet,this.appName=e.appName,this.config=t.CONFIG,w.copyProperties(i,this.config);var a='<svg class="'.concat(t.classPref,'progress-radial" width="22px" height="22px" viewBox="0 0 100 100" shape-rendering="geometricPrecision">\n <defs><mask id="circle_mask" x="0" y="0" width="100" height="100" maskUnits="userSpaceOnUse">\n <circle cx="50" cy="50" r="51" stroke-width="0" fill="black" opacity="1"/>\n <circle cx="50" cy="50" r="50" stroke-width="0" fill="white" opacity="1"/>\n <circle class="').concat(t.classPref,'progress-radial-mask-inner" cx="50" cy="50" r="40" stroke-width="0" fill="black" opacity="1"/>\n </mask></defs><g mask="url(#circle_mask)">\n <circle class="').concat(t.classPref,'progress-radial-track" cx="50" cy="50" r="50" stroke-width="0" opacity="1"/>\n <path class="').concat(t.classPref,'progress-radial-bar" transform="translate(50, 50)"d="M 0 0"></path></g></svg>');this.view=document.createElement("div"),this.view.className="".concat(t.classPref,"wrap"),this.view.innerHTML=a,this.bar=this.view.getElementsByClassName("".concat(t.classPref,"progress-radial-bar"))[0],this.bar.style.fill=this.config.ap_autoPlayColor,this.view.getElementsByClassName("".concat(t.classPref,"progress-radial-track"))[0].style.fill=this.config.ap_autoPlayBgColor,this.animRatio=25,this.counter=0,this.durationCount=25*this.config.ap_slideshowDelay,this.interval=void 0,this.anPart=0,this.status=void 0}return yt(t,[{key:"drawProgress",value:function(e){if(!isNaN(e)){e=t.clamp(parseFloat(e),0,1);var i=t.clamp(360*e,0,359.99999),a=i*Math.PI/180,n=51*Math.sin(a),s=-51*Math.cos(a),o=i>180?1:0,r="M 0 0 v -%@ A %@ %@ 1 ".replace(/%@/gi,51),l="".concat(r+o," 1 ").concat(n," ").concat(s," z");this.bar.setAttribute("d",l)}}},{key:"switch",value:function(){"play"===this.status?this.clear():this.start()}},{key:"start",value:function(){var e=this;w.Device.desktop||(this.view.style.display="block"),this.view.style.opacity=1;var i=1/this.durationCount;this.interval=setInterval((function(){e.counter+=1,e.counter>=e.durationCount&&(clearInterval(e.interval),e.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.NEXT_SLIDE,e,{})),e.counter=0,e.start()),e.drawProgress(i*e.counter)}),1e3/this.animRatio),"play"!==this.status&&(this.status="play",e.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.PLAY,e,{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),w.Device.desktop||(this.view.style.display="none"),this.view.style.opacity=0,this.status="stop",this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.PLAY,this,{status:this.status}))}}],[{key:"classPref",get:function(){return"pgc-rev-lb-auto-play-"}},{key:"CONFIG",get:function(){return{ap_autoPlayBgColor:"rgba(255,255,255, 0.3)",ap_autoPlayColor:"rgba(255,255,255, 1)",ap_slideshowDelay:8}}},{key:"EVENTS",get:function(){return{NEXT_SLIDE:"NEXT_SLIDE",PLAY:"PLAY"}}},{key:"clamp",value:function(t,e,i){return Math.max(e,Math.min(i,t))}}])}();const wt=function(){function t(e,i){var a=this;vt(this,t),this.appSet=e,this.config=t.CONFIG,w.copyProperties(i,this.config),this.appName=e.appName,this.headerFooterStatus=void 0,this.headerStatus=void 0,this.mouseMovingTimer=void 0,this.resizeDelay=void 0,this.size=w.Size(0,0),this.view=document.createElement("div"),this.view.className="".concat(t.classPref,"view"),this.view.id="".concat(this.appName,"_lightbox"),this.view.dataset.galleryId=this.appName,w.Device.desktop||(this.view.style.height="100%"),this.styleSheet=document.createElement("style"),this.styleSheet.id="style_lb_".concat(this.appName),this.view.appendChild(this.styleSheet),this.updateStyleSheet();var n=document.createElement("div");n.className="".concat(t.classPref,"bg"),this.background=n,this.backgroundOpacity=1,this.background.style.backgroundColor=this.config.lb_backgroundColor,this.view.appendChild(n),this.content=document.createElement("div"),this.content.className="".concat(t.classPref,"content");var s=rt.CONFIG;s.sl_backgroundColor=!1,s.sl_preloaderColor=this.config.lb_preloaderColor,s.sl_FullSizeViewMode=this.config.lb_FullSizeViewMode,s.sl_navigationColor=this.config.lb_sliderNavigationColor,s.sl_navigationIconColor=this.config.lb_sliderNavigationIconColor,s.sl_navigationColorOver=this.config.lb_sliderNavigationColorOver,s.sl_navigationIconColorOver=this.config.lb_sliderNavigationIconColorOver,s.sl_fit=!0;var o=this.config.lb_thumbBarEnable?60:this.config.lb_headerFooterHeight;s.sl_yOffset=w.miniScreen?0:o,s.sl_canRemoved=!0,s.sl_copyR_Alert=this.config.lb_copyR_Alert,s.sl_copyR_Proptection=this.config.lb_copyR_Proptection,s.sl_zoom=this.config.lb_zoom,s.sl_mouseWheel=this.config.lb_zoom,s.sl_audioPlayer=this.config.lb_audioPlayer,s.sl_mouseWheelPagination=this.config.lb_scrollNavi,s.sl_next_prev_animation=this.config.lb_sliderNextPrevAnimation,s.sl_video_auto_start=this.config.lb_videoAutoStart,s.sl_video_loop=this.config.lb_videoLoop,this.appSet.appEventManager.addGMEventListener(rt.EVENTS.UPDATE_CONTROLS,this,"updateViewControls"),this.appSet.appEventManager.addGMEventListener(rt.EVENTS.YT_ON_CHANGE_STATUS,this,"updateYTstatus"),this.appSet.appEventManager.addGMEventListener(rt.EVENTS.REMOVE_LIGHTBOX,this,"prepareToRemove"),this.appSet.appEventManager.addGMEventListener(bt.EVENTS.PLAY,this,"slideShowSwitchHandler"),this.appSet.appEventManager.addGMEventListener(bt.EVENTS.NEXT_SLIDE,this,"slideshowHandler"),this.appSet.appEventManager.addGMEventListener(q.EVENTS.ITEMS_SCROLL_BAR_ITEM_ACTION,this,"scrollBarHandler"),this.slider=new rt(this.appSet,s),this.slider.initByStage(this.content,!1),this.slider.mouseWheelMode=this.config.lb_zoom,this.view.appendChild(this.content),this.prevButton=document.createElement("div"),this.prevButton.className="".concat(t.classPref,"next-prev-button"),this.prevButton.classList.add("prev"),this.prevButton.innerHTML=w.ICONS.PREV_ARR,this.prevButton.onclick=function(){a.updateViewControls({params:{draging:!0}}),a.slider.gotoPrev()},this.view.appendChild(this.prevButton),this.nextButton=document.createElement("div"),this.nextButton.className="".concat(t.classPref,"next-prev-button"),this.nextButton.classList.add("next"),this.nextButton.innerHTML=w.ICONS.NEXT_ARR,this.nextButton.onclick=function(){a.updateViewControls({params:{draging:!0}}),a.slider.gotoNext()},this.view.appendChild(this.nextButton),this.header=document.createElement("div"),this.header.className="".concat(t.classPref,"header"),this.header.style.backgroundImage="linear-gradient(0deg,rgba(0,0,0,0),".concat(this.config.lb_headerFooterColor,")"),t.isMobileMode&&this.header.classList.add("".concat(t.classPref,"touch-device")),this.view.appendChild(this.header),this.footer=document.createElement("div"),this.footer.className="".concat(t.classPref,"footer"),this.footer.style.minHeight="".concat(o,"px"),t.isMobileMode&&this.footer.classList.add("".concat(t.classPref,"touch-device")),w.miniScreen&&(this.footer.style.backgroundImage="linear-gradient(0deg,".concat(this.config.lb_headerFooterColor,",rgba(0,0,0,0))")),this.view.appendChild(this.footer),this.infoBar1=document.createElement("div"),this.infoBar1.className="".concat(t.classPref,"info-wrap"),this.header.appendChild(this.infoBar1),this.config.lb_itemTitleEnable&&(this.itemTitle=document.createElement("div"),this.itemTitle.className="".concat(t.classPref,"item-title"),this.itemTitle.style.fontSize=t.isMobileMode?"".concat(16,"px"):"".concat(this.config.lb_itemTitleFontSize,"px"),t.isMobileMode&&(this.itemTitle.style.lineHeight="".concat(16,"px"),this.itemTitle.style.transform="translateY(6px)"),this.itemTitle.style.color=this.config.lb_itemTitleTextColor,this.infoBar1.appendChild(this.itemTitle));var r=document.createElement("div");r.className=this.config.lb_itemTitleEnable?"".concat(t.classPref,"caption-wrap"):"".concat(t.classPref,"caption-wrap-nt"),r.classList.add("mini-screen"),r.style.color=this.config.lb_itemCounterColor,!this.config.lb_thumbBarEnable&&t.isMobileMode,this.item_current_info=document.createElement("div"),this.item_current_info.className="".concat(t.classPref,"caption-current"),r.appendChild(this.item_current_info);var l=document.createElement("div");l.className="".concat(t.classPref,"caption-delimiter"),l.style.opacity=.7,this.config.lb_itemTitleEnable?l.textContent="/":l.style.backgroundColor=this.config.lb_itemCounterColor,r.appendChild(l),this.items_amount_info=document.createElement("div"),this.items_amount_info.className="".concat(t.classPref,"caption-all"),r.appendChild(this.items_amount_info),!1===this.config.lb_itemCounterEnable&&(r.style.display="none"),this.counter=r;var h=document.createElement("div");if(h.className="".concat(t.classPref,"caption-play-wrap"),h.appendChild(r),this.infoBar1.appendChild(h),this.config.lb_thumbBarEnable){var c=q.CONFIG;c.isb_itemBgColor=this.config.lb_thumbBarHoverColor,c.isb_block_pan_y=!0,this.thumbsBar=new q(this.appSet,c),this.footer.appendChild(this.thumbsBar.view),t.isMobileMode&&this.footer.appendChild(h)}else this.footer.appendChild(h);if(this.config.lb_slideshowEneble){var d=bt.CONFIG;d.ap_autoPlayBgColor=this.config.lb_slideshowIndicatorColorBg,d.ap_autoPlayColor=this.config.lb_slideshowIndicatorColor,d.ap_slideshowDelay=this.config.lb_slideshowTimer,this.autoPlay=new bt(this,d),h.appendChild(this.autoPlay.view)}var u=document.createElement("div");t.isMobileMode&&(u.style.width="100%"),u.className="".concat(t.classPref,"free-space"),this.header.appendChild(u),this.itemMenuWrap=document.createElement("div"),this.itemMenuWrap.className="".concat(t.classPref,"item-menu-wrap"),this.header.appendChild(this.itemMenuWrap);var g=M.CONFIG;g.im_link=!0,g.im_play=this.config.lb_slideshowEneble,g.im_zoom=w.Device.desktop&&this.config.lb_zoom,g.im_discuss=this.config.lb_discuss,g.im_info=this.config.lb_itemInfoEnable,g.im_share=this.config.lb_itemShare,g.im_download=this.config.lb_itemDownload,g.im_bookmark=this.config.lb_bookmark,g.im_like=this.config.lb_itemLike,g.im_close=!0,g.im_fulscreen=!w.Device.ios&&this.config.lb_fullscreen,g.im_backgroundColor=this.config.lb_menuBackgroundColor,g.im_backgroundColorOver=this.config.lb_menuBackgroundColorOver,g.im_iconColor=this.config.lb_menuIconColor,g.im_iconColorOver=this.config.lb_menuIconColorOver,g.im_likesSet=this.config.lb_likesSet,g.im_isContainIdInBookmarkSet=this.config.lb_isContainIdInBookmarkSet,this.itemMenu=new M(this.appSet,M.MENU_TYPE.LIGHTBOX,g),this.itemMenuWrap.appendChild(this.itemMenu.view),this.appSet.appEventManager.addGMEventListener(M.EVENTS.ITEM_MENU_ACTION,this,"itemMenuActionHandler"),this.addToStage()}return yt(t,[{key:"updateStyleSheet",value:function(){this.styleSheet.innerHTML='\n\t\tdiv[data-gallery-id="'.concat(this.appName,'"] .').concat(t.classPref,"next-prev-button{\n\t\t\tbackground-color:").concat(this.config.lb_sliderNavigationColor,";\n\t\t\tfill:").concat(this.config.lb_sliderNavigationIconColor,';\n\t\t}\n\t\tdiv[data-gallery-id="').concat(this.appName,'"] .').concat(t.classPref,"next-prev-button:hover{\n\t\t\tbackground-color:").concat(this.config.lb_sliderNavigationColorOver,";\n\t\t\tfill:").concat(this.config.lb_sliderNavigationIconColorOver,";\n\t\t}\n\t\t")}},{key:"itemMenuActionHandler",value:function(e){if(e.target===this.itemMenu){var i=e.params.item,a=e.params.type;if(i&&a){var n,s,o={};switch(o.item=i,a){case"info":o.type="info",this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.LB_NEED_MODAL,this,o)),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(bt.EVENTS.PLAY,this,{action:"stop"}));break;case"link":i.link&&window.open(i.link,i.linkTarget?i.linkTarget:this.config.lb_linkTargetWindow);break;case"like":this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.LB_ITEM_ACTION,this,{type:"like",item:i})),this.itemMenu.updateForItem(i);break;case"bookmark":this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.LB_ITEM_ACTION,this,{type:"bookmark",item:i})),this.itemMenu.updateForItem(i);break;case"share":o.type="share",this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.LB_NEED_MODAL,this,o)),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(bt.EVENTS.PLAY,this,{action:"stop"}));break;case"zoom":"function"==typeof this.sliderZoomSwitch&&this.sliderZoomSwitch();break;case"close":this.prepareToRemove();break;case"play":this.autoPlay&&this.itemsList.length>1&&(this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(bt.EVENTS.NEXT_SLIDE,this,{})),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(bt.EVENTS.PLAY,this,{})));break;case"download":n=i.url,(s=document.createElement("A")).href=n,s.download=n.substr(n.lastIndexOf("/")+1),document.body.appendChild(s),s.click(),document.body.removeChild(s);break;case"coments":"open"===i.comment_status&&(n="".concat(i.sharelink,"/#comments"),window.open(n,"_self"));break;case"fullscreen":this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.LB_FULLSCREEN_SWITCH,this,{}))}}}}},{key:"sliderZoomSwitch",value:function(){this.slider&&this.slider.remoteControl("zoom")}},{key:"slideShowSwitchHandler",value:function(t){if(this.autoPlay)if(t.params.action)switch(t.params.action){case"play":this.autoPlay.start();break;case"stop":this.autoPlay.clear()}else t.params.status?this.itemMenu&&this.itemMenu.playButtonStatus(t.params.status):this.autoPlay.switch()}},{key:"slideshowHandler",value:function(){this.slider&&(void 0===this.slider.ytStatus||0===this.slider.ytStatus)&&this.slider.gotoNext()}},{key:"scrollBarHandler",value:function(t){t.target===this.thumbsBar&&this.slider&&t.params&&t.params.action&&(t.params.index||0===t.params.index)&&"click"===t.params.action&&this.slider.gotoPageByNum(t.params.index)}},{key:"keydownHandler",value:function(){var t=this;return t.handlerKB=function(e){switch(e.keyCode){case 37:t.slider.remoteControl("prev");break;case 39:case 9:e.stopPropagation(),e.preventDefault(),t.slider.remoteControl("next");break;case 32:w.preventDefault(e),t.slider.remoteControl("space");break;case 13:w.preventDefault(e),t.slider.remoteControl("enter")}},t.handlerKB}},{key:"addToStage",value:function(){var e=this,i=document.getElementsByTagName("body")[0];this.view.style.zIndex=w.findHighestZIndex(i)+1,w.disableBodyScrollSlider(),document.addEventListener("keydown",e.keydownHandler(),!0),i.appendChild(this.view),setTimeout((function(){e.view.classList.add("".concat(t.classPref,"activate"))}),30)}},{key:"initByList",value:function(t,e){t&&t.length>0&&(this.currentItemIndex=e&&0!==e?0:void 0,this.startItemIndex=e||0,this.itemsList=t,this.thumbsBar&&this.thumbsBar.initByItemslist(this.itemsList),this.slider.initByList(this.itemsList,this.startItemIndex),this.resizeHandler())}},{key:"prepareToRemove",value:function(){var e=this;this.removing||(this.removing=!0,this.autoPlay&&this.autoPlay.clear(),this.slider.prepareToRemove(),this.thumbsBar&&this.thumbsBar.prepareToRemove(),this.view.removeChild(this.header),this.view.removeChild(this.content),this.view.removeChild(this.footer),this.view.removeChild(this.nextButton),this.view.removeChild(this.prevButton),this.background.classList.add("".concat(t.classPref,"deactivate")),this.background.style.opacity="0",document.removeEventListener("keydown",this.handlerKB,!0),document.getElementById("gmediaAudioPlayer")&&document.getElementById("gmediaAudioPlayer").pause(),this.appSet.appEventManager.removeGMEventListener(M.EVENTS.ITEM_MENU_ACTION,this,"itemMenuActionHandler"),this.appSet.appEventManager.removeGMEventListener(rt.EVENTS.UPDATE_CONTROLS,this,"updateViewControls"),this.appSet.appEventManager.removeGMEventListener(rt.EVENTS.YT_ON_CHANGE_STATUS,this,"updateYTstatus"),this.appSet.appEventManager.removeGMEventListener(rt.EVENTS.REMOVE_LIGHTBOX,this,"prepareToRemove"),this.appSet.appEventManager.removeGMEventListener(bt.EVENTS.PLAY,this,"slideShowSwitchHandler"),this.appSet.appEventManager.removeGMEventListener(bt.EVENTS.NEXT_SLIDE,this,"slideshowHandler"),this.appSet.appEventManager.removeGMEventListener(q.EVENTS.ITEMS_SCROLL_BAR_ITEM_ACTION,this,"scrollBarHandler"),setTimeout((function(){w.enableBodyScrollSlider(),e.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.LB_REMOVE_LIGHTBOX,e))}),300*this.backgroundOpacity))}},{key:"mouseMoveHandler",value:function(){var e=this;"hide"===this.headerFooterStatus?(clearTimeout(this.mouseMovingTimer),"show"!==this.headerStatus&&(this.header.classList.add("".concat(t.classPref,"show")),this.headerStatus="show",this.slider&&this.slider.showHideNaviButton("show")),this.mouseMovingTimer=setTimeout((function(){e.header.classList.remove("".concat(t.classPref,"show")),e.slider&&e.slider.showHideNaviButton("hide"),e.headerStatus="hide"}),3e3)):(clearTimeout(this.mouseMovingTimer),"show"!==this.headerStatus&&(this.header.classList.add("".concat(t.classPref,"show")),this.headerStatus="show",this.slider&&this.slider.showHideNaviButton("show")))}},{key:"updateYTstatus",value:function(e){this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.LB_ITEM_ACTION,this,ut(ut({},{type:"YTstatus"}),e.params))),this.slider&&this.config.lb_videoAutoStart&&this.config.lb_tryPlayNext&&e.params&&void 0!==e.params.status&&0===e.params.status&&this.slider.gotoNext()}},{key:"updateViewControls",value:function(e){var i=this;if(e.params.backgroundOpacity&&(this.background.style.opacity=e.params.backgroundOpacity,this.backgroundOpacity=e.params.backgroundOpacity),e.params.draging&&this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(bt.EVENTS.PLAY,this,{action:"stop"})),e.params.zoom&&(this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(bt.EVENTS.PLAY,this,{action:"stop"})),"zoomIn"===e.params.zoom?this.view.classList.add("pgc-zoom-in"):this.view.classList.remove("pgc-zoom-in"),this.itemMenu&&this.itemMenu.zoomButtonStatus(e.params.zoom)),e.params.next&&("show"===e.params.next?this.view.classList.add("pgc-next-show"):this.view.classList.remove("pgc-next-show")),e.params.prev&&("show"===e.params.prev?this.view.classList.add("pgc-prev-show"):this.view.classList.remove("pgc-prev-show")),e.params.controls)switch(this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(bt.EVENTS.PLAY,this,{action:"stop"})),this.headerFooterStatus=e.params.controls,this.mouseMoveHandler(),e.params.controls){case"show":(w.miniScreen||this.backgroundOpacity<.9)&&this.header.classList.add("".concat(t.classPref,"show")),this.footer.classList.add("".concat(t.classPref,"show"));break;case"hide":(w.miniScreen||this.backgroundOpacity<.9)&&this.header.classList.remove("".concat(t.classPref,"show")),this.footer.classList.remove("".concat(t.classPref,"show"))}(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.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.LB_ITEM_ACTION,this,{type:"view",item:this.currentItem,itemIndex:e.params.itemIndex})),this.itemTitle&&(this.itemTitle.innerHTML=e.params.item[this.config.lb_itemTitleSrc]?e.params.item[this.config.lb_itemTitleSrc]:""),this.itemMenu&&this.itemMenu.updateForItem(e.params.item)),e.params.status&&"ready"===e.params.status&&(this.autoPlay&&this.itemsList.length>1&&(this.config.lb_slideshowAutoPlay||this.config.lb_sliderSlideshowAutoStart)&&!this.startItem&&this.autoPlay.start(),this.view.addEventListener("mousemove",(function(t){i.mouseMoveHandler(t)}),!1))}},{key:"resizeHandler",value:function(){if(this.view.clientWidth<360?(this.autoPlay&&(this.autoPlay.view.style.display="none"),this.descriptionWrap||this.thumbsBar):this.autoPlay&&(this.autoPlay.view.style.display=null),this.view.clientWidth<500?this.view.classList.add("pgc-mini-screen"):this.view.classList.remove("pgc-mini-screen"),this.itemMenu&&this.itemMenu.resizeHandler(),this.thumbsBar){var t=this.footer.clientWidth-10;this.thumbsBar.size=w.Size(t,0)}this.slider&&this.slider.resizeHandler(w.Size(this.view.clientWidth,this.view.clientHeight))}}],[{key:"classPref",get:function(){return"pgc-rev-lb-b-"}},{key:"EVENTS",get:function(){return{LB_NEED_MODAL:"LB_NEED_MODAL",LB_REMOVE_LIGHTBOX:"LB_REMOVE_LIGHTBOX",LB_FULLSCREEN_SWITCH:"LB_FULLSCREEN_SWITCH",LB_ITEM_ACTION:"LB_ITEM_ACTION"}}},{key:"CONFIG",get:function(){return{lb_FullSizeViewMode:!1,lb_scrollNavi:!1,lb_backgroundColor:"rgba(0,0,0,0.8)",lb_preloaderColor:"#494949",lb_headerFooterHeight:40,lb_headerFooterColor:"rgba(0,0,0,1)",lb_sliderNavigationColor:"rgba(0,0,0,0.8)",lb_sliderNavigationIconColor:"rgba(255,255,255,1)",lb_sliderNavigationColorOver:"rgba(255,255,255,1)",lb_sliderNavigationIconColorOver:"rgba(0,0,0,0)",lb_itemCounterEnable:!0,lb_itemCounterColor:"rgba(255,255,255,1)",lb_itemTitleEnable:!0,lb_itemTitleSrc:"title",lb_itemTitleFontSize:18,lb_itemTitleTextColor:"rgba(255,255,255,1)",lb_sliderNextPrevAnimation:!0,lb_thumbBarEnable:!0,lb_thumbBarHoverColor:"rgba(255,255,255,1)",lb_itemInfoEnable:!1,lb_itemLike:!1,lb_itemShare:!1,lb_itemDownload:!0,lb_zoom:!0,lb_discuss:!1,lb_fullscreen:!0,lb_bookmark:!1,lb_menuBackgroundColor:"rgb(0,0,0)",lb_menuBackgroundColorOver:"rgb(255,255,255)",lb_menuIconColor:"rgb(255,255,255)",lb_menuIconColorOver:"rgb(0,0,0)",lb_slideshowEneble:!0,lb_sliderSlideshowAutoStart:!1,lb_slideshowTimer:8,lb_slideshowAutoPlay:!1,lb_slideshowIndicatorColorBg:"rgba(255,255,255,0.7)",lb_slideshowIndicatorColor:"rgba(255,255,255,1)",lb_copyR_Alert:"Hello, this photo is mine!",lb_copyR_Proptection:!0,lb_audioPlayer:void 0,lb_likesSet:void 0,lb_isContainIdInBookmarkSet:void 0,lb_videoAutoStart:!1,lb_videoLoop:!1,lb_tryPlayNext:!1}}},{key:"isMobileMode",get:function(){return!(!w.isTouchDevice||w.isiPpad)}}])}();var Ct=i(7336),St=i.n(Ct),kt={};function Lt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function Et(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Lt(Object(i),!0).forEach((function(e){Tt(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Lt(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Tt(t,e,i){return(e=Dt(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function _t(t){return _t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_t(t)}function It(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pt(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,Dt(a.key),a)}}function Mt(t,e,i){return e&&Pt(t.prototype,e),i&&Pt(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function Dt(t){var e=function(t){if("object"!=_t(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=_t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_t(e)?e:e+""}kt.styleTagTransform=u(),kt.setAttributes=l(),kt.insert=o().bind(null,"head"),kt.domAPI=n(),kt.insertStyleElement=c(),e()(St(),kt),St()&&St().locals&&St().locals;var xt=function(){return Mt((function t(e,i,a){It(this,t),this.id=i,this.name=e,this.config=a,this.view=document.createElement("div"),this.view.className="".concat(t.classPref,"view"),this.view.dataset.id=i,this.title=document.createElement("div"),this.title.innerHTML=e,this.title.className="".concat(t.classPref,"title"),this.view.appendChild(this.title),this.mouseleave(),this.selected=!1;var n=this;function s(t){switch(t.type){case"mouseenter":n.mouseenter();break;case"mouseleave":if(n.selected)return;n.mouseleave()}}this.view.addEventListener("mouseenter",s,!1),this.view.addEventListener("mouseleave",s,!1)}),[{key:"updateConfig",value:function(t){this.config=t,this.mouseleave()}},{key:"mouseenter",value:function(){this.title.style.color=this.config.tg_titleColorOver,this.view.style.backgroundColor=this.config.tg_backgrounColorOver}},{key:"mouseleave",value:function(){this.title.style.color=this.config.tg_titleColor,this.view.style.backgroundColor=this.config.tg_backgrounColor}},{key:"select",value:function(){this.mouseenter(),this.selected=!0,this.view.classList.add("pgc-selected")}},{key:"deselect",value:function(){this.selected=!1,this.mouseleave(),this.view.classList.remove("pgc-selected")}}],[{key:"classPref",get:function(){return"pgc-rev-tags-list-item-"}},{key:"CONFIG",get:function(){return{tg_backgrounColor:"lightgray",tg_backgrounColorOver:"gray",tg_titleColor:"black",tg_titleColorOver:"white"}}}])}(),Nt=function(){function t(e,i){It(this,t),this.appSet=i,this.config=t.CONFIG,w.copyProperties(e,this.config),this.view=document.createElement("div"),this.view.className="".concat(t.classPref,"view"),this.view.style.fontSize=this.config.tl_fontSize+"px",this.list=[],this.selectedTag=void 0}return Mt(t,[{key:"updateViewByQueue",value:function(t,e){var i=this,a=t.map((function(t){return"".concat(t.title.toLowerCase(),"~/~").concat(t.title,"~/~").concat(t.term_id)}));this.config.tl_sort_item&&a.sort(),this.config.tl_all&&a.splice(0,0,"all~/~".concat(this.config.tl_all,"~/~0"));for(var n=function(){var n=a[s].split("~/~"),o={term_id:n[2],title:n[1]},r=xt.CONFIG;r.tg_backgrounColor=i.config.tl_backgrounColor,r.tg_backgrounColorOver=i.config.tl_backgrounColorOver,r.tg_titleColor=i.config.tl_titleColor,r.tg_titleColorOver=i.config.tl_titleColorOver;var l=new xt(o.title,o.term_id,r);void 0!==e&&parseInt(o.term_id)===parseInt(e)&&(i.selectedTag=l,l.select()),l.view.addEventListener("click",(function(){i.tagClickHandler(l)}),!1),t.push(l),i.view.appendChild(l.view)},s=0;s<a.length;s+=1)n()}},{key:"clearList",value:function(){for(this.view.removeEventListener("click",this.tagsClickHandler,!1);this.view.lastElementChild;)this.view.removeChild(this.view.lastElementChild);this.list=[]}},{key:"viewHandler",value:function(){var t=this;return t.tagsClickHandler=function(e){if(e.target.dataset&&e.target.dataset.tagIndex){var i=t.list[parseInt(e.target.dataset.tagIndex)];i&&t.tagClickHandler(i)}},t.tagsClickHandler}},{key:"refreshByListCustomSort",value:function(t,e,i){this.clearList(),i||t.unshift({id:"pgc_0",name:this.config.tl_all});var a=xt.CONFIG;a.tg_backgrounColor=this.config.tl_backgrounColor,a.tg_backgrounColorOver=this.config.tl_backgrounColorOver,a.tg_titleColor=this.config.tl_titleColor,a.tg_titleColorOver=this.config.tl_titleColorOver;for(var n=0;n<t.length;n+=1){var s=t[n],o=new xt(s.name,s.id,a);s.id===e&&(this.selectedTag=o,o.select()),o.view.dataset.tagIndex=this.list.length,this.list.push(o),this.view.appendChild(o.view)}this.view.addEventListener("click",this.viewHandler(),!1)}},{key:"refreshByList",value:function(t,e,i,a){this.clearList();var n=[],s=[],o=Et({},t);for(var r in o)"pgc_0"!==r&&n.push(o[r].toLowerCase());a||(o.pgc_0=this.config.tl_all),(void 0===i||void 0!==i&&!0===i)&&n.sort(),a||n.splice(0,0,o.pgc_0.toLowerCase());for(var l=0;l<n.length;l+=1)for(var h in o)if(o[h].toLowerCase()!==n[l]);else{var c=xt.CONFIG;c.tg_backgrounColor=this.config.tl_backgrounColor,c.tg_backgrounColorOver=this.config.tl_backgrounColorOver,c.tg_titleColor=this.config.tl_titleColor,c.tg_titleColorOver=this.config.tl_titleColorOver;var d=new xt(o[h],h,c);h===e&&(this.selectedTag=d,d.select()),d.view.dataset.tagIndex=this.list.length,this.list.push(d),s.push(d),this.view.appendChild(d.view),delete o[h]}this.view.addEventListener("click",this.viewHandler(),!1)}},{key:"updateConfig",value:function(t){this.config=t,this.view.style.fontSize=this.config.tl_fontSize+"px";var e=xt.CONFIG;e.tg_backgrounColor=this.config.tl_backgrounColor,e.tg_backgrounColorOver=this.config.tl_backgrounColorOver,e.tg_titleColor=this.config.tl_titleColor,e.tg_titleColorOver=this.config.tl_titleColorOver;for(var i=0;i<this.list.length;i+=1)this.list[i].updateConfig(e);this.list[0]&&(this.list[0].title.innerHTML=this.config.tl_all),this.selectedTag&&this.selectedTag.select()}},{key:"updateViewByList",value:function(t,e){var i=this,a=[],n=[],s=Et({},t);for(var o in s)"0"!==o&&a.push(s[o].toLowerCase());s[0]=this.config.tl_all,a.sort(),a.splice(0,0,s[0].toLowerCase());for(var r=0;r<a.length;r+=1){var l=function(){if(s[h].toLowerCase()===a[r]){var t=xt.CONFIG;t.tg_backgrounColor=i.config.tl_backgrounColor,t.tg_backgrounColorOver=i.config.tl_backgrounColorOver,t.tg_titleColor=i.config.tl_titleColor,t.tg_titleColorOver=i.config.tl_titleColorOver;var o=new xt(s[h],h,t);return parseInt(h)===parseInt(e)&&(i.selectedTag=o,o.select()),o.view.addEventListener("click",(function(){i.tagClickHandler(o)}),!1),n.push(o),i.view.appendChild(o.view),delete s[h],1}};for(var h in s)l()}}},{key:"trySelectByTagId",value:function(t){for(var e=0;e<this.list.length;e+=1){var i=this.list[e];i.id===t&&(this.selectedTag&&this.selectedTag.deselect(),i.select(),this.selectedTag=i,e=this.list.length)}}},{key:"tagClickHandler",value:function(e){this.selectedTag&&this.selectedTag.deselect(),e.select(),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.TAG_ACTION,this,{tagId:e.id,tagName:e.name})),this.selectedTag=e}}],[{key:"classPref",get:function(){return"pgc-rev-tags-list-"}},{key:"EVENTS",get:function(){return{TAG_ACTION:"TAG_ACTION"}}},{key:"CONFIG",get:function(){return{tl_all:"All",tl_sort_item:!0,tl_backgrounColor:"lightgray",tl_backgrounColorOver:"gray",tl_titleColor:"black",tl_titleColorOver:"white",tl_fontSize:16}}}])}(),Bt=i(6550),Ot=i.n(Bt),Ht={};function At(t){return At="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},At(t)}function zt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function Vt(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?zt(Object(i),!0).forEach((function(e){Ft(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):zt(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function Ft(t,e,i){return(e=Rt(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Gt(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,Rt(a.key),a)}}function Rt(t){var e=function(t){if("object"!=At(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=At(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==At(e)?e:e+""}Ht.styleTagTransform=u(),Ht.setAttributes=l(),Ht.insert=o().bind(null,"head"),Ht.domAPI=n(),Ht.insertStyleElement=c(),e()(Ot(),Ht),Ot()&&Ot().locals&&Ot().locals,w.trace;var Yt=function(){function t(e,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.appEventManager=e,this.config=Vt(Vt({},t.CONFIG),i),this.animDelay=void 0,this.view=document.createElement("div"),this.view.className="".concat(t.classPref,"view"),this.view.style.backgroundColor=this.config.ish_backgroundColor,this.view.style.fill=this.config.ish_iconColor;var a=document.createElement("div");a.className="".concat(t.classPref,"bg"),a.dataset.type="bg",this.view.appendChild(a);var n=".".concat(t.classPref,"button:hover{fill:").concat(this.config.ish_iconColorHover,"}"),s=document.createElement("style");if(s.styleSheet?s.styleSheet.cssText=n:s.appendChild(document.createTextNode(n)),this.view.appendChild(s),this.config.ish_facebook){var o=document.createElement("div");o.title="Facebook",o.className="".concat(t.classPref,"button"),o.dataset.type="facebook",o.innerHTML=w.ICONS.FB_SVG,this.view.appendChild(o)}if(this.config.ish_twitter){var r=document.createElement("div");r.title="X",r.className="".concat(t.classPref,"button"),r.dataset.type="x",r.innerHTML=w.ICONS.TW_SVG,this.view.appendChild(r)}if(this.config.ish_pinterest){var l=document.createElement("div");l.title="Pnterest",l.className="".concat(t.classPref,"button"),l.dataset.type="pinterest",l.innerHTML=w.ICONS.PIN_SVG,this.view.appendChild(l)}if(this.config.ish_download){var h=document.createElement("div");h.title="Download",h.className="".concat(t.classPref,"button"),h.dataset.type="download",h.innerHTML=w.ICONS.DOWNLOAD_SVG,this.download=h,this.view.appendChild(h)}if(this.config.ish_copy){var c=document.createElement("div");c.title="Copy URL",c.className="".concat(t.classPref,"button"),c.dataset.type="copy",c.innerHTML=w.ICONS.LINK_SVG,this.copy=c,this.view.appendChild(c)}}return e=t,a=[{key:"classPref",get:function(){return"pgc-rev-share-bar-light-"}},{key:"EVENTS",get:function(){return{REMOVE_SHARE_WINDOW:"REMOVE_SHARE_WINDOW"}}},{key:"CONFIG",get:function(){return{ish_parentDiv:void 0,ish_backgroundColor:"rgba(0,0,0,0.8)",ish_iconColor:"rgb(255,255,255)",ish_iconColorHover:"rgb(200,200,200)",ish_copy:!1,ish_download:!1,ish_facebook:!0,ish_twitter:!0,ish_pinterest:!0,ish_linkToPost:"sharelink"}}}],(i=[{key:"addToStage",value:function(){var e=this,i=document.getElementsByTagName("BODY")[0];this.config.ish_parentDiv&&(i=this.config.ish_parentDiv,this.view.classList.add("".concat(t.classPref,"fixed")),w.disableBodyScrollSlider()),this.view.style.zIndex=w.findHighestZIndex(i)+1,i.appendChild(this.view),this.animDelay=setTimeout((function(){e.view.classList.add("".concat(t.classPref,"activate"))}),40)}},{key:"initByItem",value:function(t){var e=this,i=t.sharelink;"postlink"===this.config.ish_linkToPost&&(i=t.linkOriginal?t.linkOriginal:t[this.config.ish_linkToPost]);var a=document.createElement("div");a.innerText=i,a.style.bottom="0",a.style.position="absolute",a.style.opacity=0,a.id="pgc_copy_link";var n,s,o=(window.screen.width-600)/2,r="menubar=no,toolbar=no,resizable=yes,scrollbars=yes, top=".concat(200,",\n left=").concat(o,", height=450,width=600"),l=!1;this.view.onclick=function(o){var h=o.target;if(h.dataset.type)switch(h.dataset.type){case"facebook":window.open("https://www.facebook.com/share.php?u=".concat(i),"",r);break;case"x":window.open("https://x.com/intent/tweet?text=".concat(encodeURI(t.title?t.title:""),"&url=").concat(i),"",r);break;case"pinterest":window.open("https://www.pinterest.com/pin/create/button/?url=".concat(i,"&media=").concat(t.url,"\n &description=").concat(encodeURI(t.title?t.title:"")),"",r);break;case"download":n=t.url,(s=document.createElement("A")).href=n,s.download=n.substr(n.lastIndexOf("/")+1),document.body.appendChild(s),s.click(),document.body.removeChild(s);break;case"copy":l&&window.open(i,"_blank"),e.view.appendChild(a),window.getSelection().selectAllChildren(document.getElementById("pgc_copy_link"));try{document.execCommand("copy")&&(window.getSelection().removeAllRanges(),e.view.removeChild(a),h.style.fill="green",l=!0)}catch(t){window.open(i,"_blank")}break;case"bg":e.prepareToRemove()}},this.addToStage(),this.download&&(this.download.classList.remove("disable"),"post"!==t.type&&"page"!==t.type&&"pgc_simply_gallery"!==t.type||this.download.classList.add("disable"),"video"===t.type&&t.mime_type&&this.download.classList.add("disable"))}},{key:"prepareToRemove",value:function(e){var i=this;clearTimeout(this.animDelay),this.config.ish_parentDiv&&w.enableBodyScrollSlider(),this.view.classList.remove("".concat(t.classPref,"activate")),this.animDelay=setTimeout((function(){i.view.parentNode&&i.view.parentNode.removeChild(i.view),delete i.shareBar,i.appEventManager.dispatchGMEvent(w.GMEvent(t.EVENTS.REMOVE_SHARE_WINDOW,i,{}))}),e?0:300)}}])&&Gt(e.prototype,i),a&&Gt(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i,a}();const jt=Yt;function Wt(t){return Wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wt(t)}function Ut(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,Xt(a.key),a)}}function Xt(t){var e=function(t){if("object"!=Wt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=Wt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Wt(e)?e:e+""}function qt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(qt=function(){return!!t})()}function Zt(t){return Zt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Zt(t)}function Kt(t,e){return Kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Kt(t,e)}var Jt=window.PGC_SGB,$t=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,i){return e=Zt(e),function(t,e){if(e&&("object"==Wt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,qt()?Reflect.construct(e,i||[],Zt(t).constructor):e.apply(t,i))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Kt(t,e)}(e,t),i=e,a=[{key:"getDefSettungsFromAtt",value:function(t){var e={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i].default);return e}},{key:"moduleSettings",value:function(t){return window.PGC_SGB&&window.PGC_SGB.galleries&&window.PGC_SGB.galleries[t].galleryData?window.PGC_SGB.galleries[t].galleryData:null}},{key:"getViewPortBySelector",value:function(t){var e=document.querySelector('div[data-block-id="'.concat(t,'"]'));return e&&e.dataset.gallery?e:null}},{key:"pausedAllVideoPlayers",value:function(t){if(window&&window.PGC_SGB&&window.PGC_SGB.galleries)for(var e=window.PGC_SGB.galleries,i=Object.keys(e),a=0;a<i.length;a+=1){var n=e[i[a]];n.deleteAllEmbedInItems&&n.deleteAllEmbedInItems instanceof Function&&n.deleteAllEmbedInItems(t)}}},{key:"deleteAllEmbetContent",value:function(){e.pausedAllVideoPlayers()}},{key:"pausedAllVideoContent",value:function(){var t=document.getElementsByClassName("thumb-video-content");if(t.length)for(var e=0;e<t.length;e+=1)t[e].parentNode.classList.remove("pgc-interectiv"),t[e].pause()}},{key:"pausedAllAudioContent",value:function(){var t=document.getElementById("simplyAudioPlayer");t&&t.pause();var e=document.getElementsByClassName("pgc-sgb-svg-rotate");if(e.length)for(var i=0;i<e.length;i+=1)e[i].classList.remove("pgc-sgb-svg-rotate")}},{key:"shuffleArray",value:function(t){for(var e=t.length-1;e>0;e-=1){var i=Math.floor(Math.random()*(e+1)),a=[t[i],t[e]];t[e]=a[0],t[i]=a[1]}return t}},{key:"timeConverter",value:function(t){var e=new Date(t),i=new Date,a=new Date(Date.now()-864e5),n=e.getFullYear(),s=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][e.getMonth()],o=e.getDate(),r=e.getHours(),l=e.getMinutes();return e.setHours(0,0,0,0)===i.setHours(0,0,0,0)?"Today, ".concat(r,":").concat(l):e.setHours(0,0,0,0)===a.setHours(0,0,0,0)?"Yesterday, ".concat(r,":").concat(l):n===(new Date).getFullYear()?"".concat(o," ").concat(s,", ").concat(n):"".concat(o," ").concat(s," ").concat(n)}},{key:"request",value:function(t,i,a,n,s){var o=new URL(t);if(a)for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&o.searchParams.set(r,a[r]);var l=new XMLHttpRequest;l.open("GET",o,!0),i&&l.setRequestHeader("X-WP-Nonce",i),l.onreadystatechange=function(){if(4===l.readyState){var t={};200!==l.status?t.error=l.statusText:t.data=l.responseText,n&&(t.params=n),s&&"function"==typeof s&&s(t)}},l.onerror=function(){e.trace("An error occurred while transferring the file.")};try{l.send()}catch(t){e.trace(t)}}},{key:"ItemGallery",value:function(t,e){var i={get webView(){return this.webImg.src?i.webImg:(this.itemViewSrc&&(this.webImg.src=this.itemViewSrc),this.webImg)}},a=this;if(this.copyProperties(t,i),i.appName=e,i.sharelink=t.postLink,i.alt=""!==t.title?t.title:void 0,i.title){var n=document.createElement("div");n.innerHTML=i.title,i.title=1===n.childNodes.length?n.childNodes[0].nodeValue:i.title}return i.ratio=1,i.errorStatus=!1,i.itemViewSrc=function(){if(i.thumb){if(i.thumb.large)return i.thumb.large.url;if(i.thumb.full)return i.thumb.full.url}else if(i.thumbURL)return i.thumbURL;return null}(),i.itemViewThumbSrc=function(){if(i.thumb){if(i.thumb.medium)return i.thumb.medium.url;if(i.thumb.large)return i.thumb.large.url;if(i.thumb.full)return i.thumb.full.url}else if(i.thumbURL)return i.thumbURL;return null}(),i.itemViewSize=function(){if(i.thumb){if(i.thumb.large)return a.Size(i.thumb.large.width,i.thumb.large.height);if(i.thumb.full)return a.Size(i.thumb.full.width,i.thumb.full.height)}return a.Size(400,400)}(),i.itemViewThumbSize=function(){if(i.thumb){if(i.thumb.medium)return a.Size(i.thumb.medium.width,i.thumb.medium.height);if(i.thumb.large)return a.Size(i.thumb.large.width,i.thumb.large.height);if(i.thumb.full)return a.Size(i.thumb.full.width,i.thumb.full.height)}return a.Size(400,400)}(),i.ratio=i.itemViewSize.height/i.itemViewSize.width,i.webImg=new Image,i.webImg.setAttribute("draggable","false"),i.webImgFrame=this.Rect(0,0,0,0),i.webImg.addEventListener("load",(function(){this.classList.add("onLoad")}),!1),i.webImg.addEventListener("error",(function(){i.errorStatus=!0,this.classList.add("onError")}),!1),i}},{key:"Item",value:function(t,i,a){var n={get webView(){return this.webImg.src?n.webImg:(this.itemViewFullSizePr?this.itemViewFlSrc&&(this.webImg.src=this.itemViewFlSrc):this.itemViewSrc&&(this.webImg.src=this.itemViewSrc),this.webImg)},set itemViewFullSize(t){this.itemViewFullSizePr=t},getItemViewFlSrc:function(){if("video"===this.type)return null;if("audio"===this.type&&this.poster){if(this.poster.full)return this.poster.full.url;if(this.poster.large)return this.poster.large.url}return this.meta?this.meta.original?this.meta.original.url:this.meta.web?this.meta.web.url:null:null},getItemViewSrc:function(){if("video"===this.type)return null;if("audio"===this.type&&this.poster){if(this.poster.large)return this.poster.large.url;if(this.poster.full)return this.poster.full.url}return this.meta?this.meta.web?this.meta.web.url:this.meta.original?this.meta.original.url:null:null},getItemViewThumbSrc:function(){if("video"===this.type)return null;if("audio"===this.type&&this.poster){if(this.poster.medium)return this.poster.medium.url;if(this.poster.large)return this.poster.large.url;if(this.poster.full)return this.poster.full.url}return this.meta?this.meta.thumb?this.meta.thumb.url:this.meta.web?this.meta.web.url:this.meta.original?this.meta.original.url:null:null},getItemViewFlSize:function(){if("audio"===this.type&&this.poster){if(this.poster.full)return e.Size(this.poster.full.width,this.poster.full.height);if(this.poster.large)return e.Size(this.poster.large.width,this.poster.large.height)}return this.meta?this.meta.original?e.Size(this.meta.original.width,this.meta.original.height):this.meta.web?e.Size(this.meta.web.width,this.meta.web.height):e.Size(300,300):e.Size(300,300)},getItemViewSize:function(){if("audio"===this.type&&this.poster){if(this.poster.large)return e.Size(this.poster.large.width,this.poster.large.height);if(this.poster.full)return e.Size(this.poster.full.width,this.poster.full.height)}return this.meta?this.meta.web?e.Size(this.meta.web.width,this.meta.web.height):this.meta.original?e.Size(this.meta.original.width,this.meta.original.height):e.Size(300,300):e.Size(300,300)},getItemViewThumbSize:function(){if("audio"===this.type&&this.poster){if(this.poster.medium)return e.Size(this.poster.medium.width,this.poster.medium.height);if(this.poster.large)return e.Size(this.poster.large.width,this.poster.large.height);if(this.poster.full)return e.Size(this.poster.full.width,this.poster.full.height)}return this.meta?this.meta.thumb?e.Size(this.meta.thumb.width,this.meta.thumb.height):this.meta.web?e.Size(this.meta.web.width,this.meta.web.height):this.meta.original?e.Size(this.meta.original.width,this.meta.original.height):e.Size(300,300):e.Size(300,300)},getRatio:function(){return this.getItemViewSize().height/this.getItemViewSize().width},hasTag:function(t){return"pgc_0"===t||!(!this.tags||0===this.tags.length)&&-1!==this.tags.indexOf(t)},updateSrcAndSizes:function(){this.itemViewFlSrc=this.getItemViewFlSrc(),this.itemViewSrc=this.getItemViewSrc(),this.itemViewThumbSrc=this.getItemViewThumbSrc(),this.itemViewFlSize=this.getItemViewFlSize(),this.itemViewSize=this.getItemViewSize(),this.itemViewThumbSize=this.getItemViewThumbSize(),this.ratio=this.getRatio()},initMetaObj:function(t){var e=!1;if("audio"===this.type&&t.poster!==this.poster&&(e=!0),t.poster?(this.poster=t.poster,"audio"===this.type&&this.updateSrcAndSizes()):(delete this.poster,"audio"===this.type&&this.updateSrcAndSizes()),this.tags=t.tags,t.link&&""!==t.link){if(this.link=decodeURIComponent(t.link),this.linkOriginal=this.link,this.linkTarget=t.linkTarget,this.linkText=t.linkText,this.orignLinkText=t.orignLinkText,"image"===this.type||this.parentType&&"image"===this.parentType){var i,a,n,s=this.link;if(s.match(/youtu\.be/i)||s.match(/youtube\.com/i))i=void 0!==(s=/(youtu.*be.*)\/(watch\?v=|embed\/|v|shorts|)(.*?((?=[&#?])|$))/gm.exec(s))[3]?s[3].split(/[^0-9a-z_\-]/i)[0]:s[0],a="video/youtube";else if(s.match(/vimeo\.com/i)){var o=s.match(/(www\.)?vimeo.com\/(\d+)($|:|\?|\/)/);o&&(i=parseInt(o[2],10),a="video/vimeo");var r=s.match(/vimeo.com\/(\d+):(\w+)$/);if(r){i=parseInt(r[1],10);var l=r[2];l&&i&&(n=l)}var h=s.match(/vimeo.com\/(\d+)\/(\w+)($|\?|\/)/);if(h){var c=h[2];c&&i&&(n=c)}}void 0!==i?(this.parentType||(this.parentType=this.type),this.type="video",this.mime_type=a,this.videoId=i,this.videoHash=n,this.link=void 0):(this.parentType&&(this.type=this.parentType),delete this.parentType,delete this.videoId,delete this.mime_type)}}else this.link=void 0,this.linkTarget="_self",this.linkText="",this.orignLinkText="",this.parentType&&(this.type=this.parentType),delete this.parentType,delete this.videoId,delete this.mime_type;return e}};if(n.itemViewFullSizePr=!(!a||!a.itemViewFullSize),n.comment_status="closed",n.featuredImage=void 0,n.tags=[],this.copyProperties(t,n),n.appName=i,n.idPrefix=void 0,n.albums=[],n.categories=[],n.user=n.author,n.sharelink=n.url,n.orignLinkText="",n.id=parseInt(t.id),n.duration){var s=new Date(null);s.setSeconds(parseInt(n.duration));var o=s.toISOString().slice(11,19).split(":");if(o.length&&3===o.length){var r="00"===o[0]?"":"".concat(o[0],":"),l="".concat(o[1],":"),h=o[2];n.fileLength=r+l+h}}if(n.ID=n.id,t.url&&(n.original=t.url),n.alt=""!==n.alt?n.alt:void 0,n.title=""!==n.title?n.title:void 0,n.caption=""!==n.caption?n.caption:void 0,n.description){var c=n.description.replace(/\r?\n/g,"<br />");n.description=c}if(n.ratio=1,n.errorStatus=!1,"attachment"===t.type&&t.media_type&&(n.type=t.media_type),n.link=t.link&&void 0!==t.linkText?decodeURIComponent(t.link):void 0,n.linkTarget=t.linkTarget?t.linkTarget:void 0,n.linkText=t.linkText?t.linkText:void 0,n.meta=function(){var e={};if(n.meta&&Object.assign(e,n.meta),e.mime=n.mime,e.likes=0,e.views=0,n.sizes)return n.sizes.medium&&(e.thumb=n.sizes.medium),n.sizes.large&&(e.web=n.sizes.large),n.sizes.full&&(e.original=n.sizes.full),e;if(n.fullUrl&&n.url){e.original={},e.original.url=n.url;var i=n.url.toString().match(/.*\/(.+?)\./)[1].split("-").pop().split("x");i&&i.length>0&&(e.original.width=i[0]&&i[1]?Math.min(parseInt(i[0]),3e3):300,e.original.height=i[0]&&i[1]?Math.min(parseInt(i[1]),3e3):300,n.ratio=e.original.height/e.original.width),e.thumb=e.original,e.web=e.original}if(n.media_details&&n.media_details.sizes){var a=n.media_details.sizes;return a.medium&&(e.thumb=a.medium,e.thumb.url||(e.thumb.url=e.thumb.source_url)),a.large&&(e.web=a.large,e.web.url||(e.web.url=e.web.source_url)),a.full&&(e.original=a.full,e.original.url||(e.original.url=e.original.source_url)),e}if("audio"===n.type&&t.image&&t.image.width>=200&&!t.poster){var s={medium:{}};s.medium.url=t.image.src,s.medium.width=t.image.width,s.medium.height=t.image.height,s.medium.orientation=t.image.width/t.image.height>1?"landscape":"portrait",s.large=s.medium,s.full=s.medium,s.thumbnail=s.medium,n.poster=s}if(n.sizes)e.original=n.sizes.full?n.sizes.full:void 0,e.thumb=e.original,e.web=e.original,n.sizes.medium&&(e.thumb=n.sizes.medium),n.sizes.large&&(e.web=n.sizes.large);else{if("image"===n.type){e.original={},e.original.url=n.url;var o=n.url.toString().match(/.*\/(.+?)\./)[1].split("-").pop().split("x");return o&&o.length>0&&(e.original.width=o[0]&&o[1]?Math.min(parseInt(o[0]),3e3):300,e.original.height=o[0]&&o[1]?Math.min(parseInt(o[1]),3e3):300,n.ratio=e.original.height/e.original.width),e.thumb=e.original,e.web=e.original,e}if("video"===n.type&&(t.image&&t.image.width>=200&&(n.featuredImage=t.image),t.width&&t.height))return e.original={},e.original.url=n.url,e.original.width=t.width,e.original.height=t.height,n.ratio=e.original.height/e.original.width,e.thumb=e.original,e.web=e.original,e;if("audio"===n.type)return t.image&&t.image.width>=200?(e.original={},e.original.url=t.image.src,e.original.width=t.image.width,e.original.height=t.image.height,n.ratio=e.original.height/e.original.width,e.thumb=e.original,e.web=e.original,e):(e.original={},e.original.url="".concat(Jt.assets,"holder-mp3.png"),e.original.width=300,e.original.height=300,n.ratio=e.original.height/e.original.width,e.thumb=e.original,e.web=e.original,e);if(n.url&&void 0===n.width&&void 0===n.height){e.original={},e.original.url=n.url;var r=n.url.toString().match(/.*\/(.+?)\./)[1].split("-").pop().split("x");return r&&r.length>0&&(e.original.width=r[0]&&r[1]?Math.min(parseInt(r[0]),3e3):300,e.original.height=r[0]&&r[1]?Math.min(parseInt(r[1]),3e3):300,n.ratio=e.original.height/e.original.width),e.thumb=e.original,e.web=e.original,e}if(n.width&&n.height&&(n.src||n.url))return e.original={},e.original.url=n.src||n.url,e.original.width=n.width,e.original.height=n.height,n.ratio=e.original.height/e.original.width,e.thumb=e.original,e.web=e.original,e;if(n.imgUrl){e.original={},e.original.url=n.imgUrl;var l=n.imgUrl.toString().match(/.*\/(.+?)\./)[1].split("-").pop().split("x");return l&&l.length>0&&(e.original.width=l[0]&&l[1]?Math.min(parseInt(l[0]),3e3):300,e.original.height=l[0]&&l[1]?Math.min(parseInt(l[1]),3e3):300,n.ratio=e.original.height/e.original.width),e.thumb=e.original,e.web=e.original,e}}return e}(),n.updateSrcAndSizes(),n.sizes){var d="";for(var u in n.sizes)if(n.sizes.hasOwnProperty(u)){var g=n.sizes[u];d="".concat(d+g.url," ").concat(g.width,"w, ")}d=d.slice(0,-2),n.srcset=d}return n.webImg=new Image,n.webImg.setAttribute("draggable","false"),(n.title||n.alt)&&n.webImg.setAttribute("alt",n.alt?n.alt:n.title),n.webImgFrame=this.Rect(0,0,0,0),n.webImg.addEventListener("load",(function(){this.classList.add("onLoad")}),!1),n.webImg.addEventListener("error",(function(){n.errorStatus=!0,this.classList.add("onError")}),!1),n}},{key:"GalleryItem",value:function(t,i,a){var n,s,o="pgcSgb";if(!(s="A"===i.tagName?i:i.getElementsByTagName("A")[0]))return null;if(s.target&&"_self"!==s.target)return null;if(!1===s.hasAttribute("href"))return null;var r=s.getAttribute("href"),l=s.getElementsByTagName("IMG")[0];if(l){if(l.dataset.lightboxExclude)return null;var h,c;if((n={get webView(){return this.webImg.src?n.webImg:(this.webImg.src=this.itemViewSrc,this.webImg)}}).galId=a,n.index=t,l.dataset.id?(n.ID="".concat(t,"_").concat(l.dataset.id),n.attId=l.dataset.id):n.ID="".concat(t,"_").concat(n.galId),n.url=r,n.sharelink=r,0===r.indexOf("http://")||0===r.indexOf("https://")){if("/"===(h=new URL(r)).pathname)return null;c=h.pathname.split("/").pop().split("#")[0].split("?")[0].split(".")}else c=(h=r).split("/").pop().split("#")[0].split("?")[0].split(".");if(c.length<=1)return null;if(n.fileName=c[0].split("-")[0],""===n.fileName)return null;if(l.src.indexOf(n.fileName)<0){if(!l.dataset.fullUrl)return null;if(l.dataset.fullUrl.indexOf(n.fileName)<0)return null}n.fileExt=c[c.length-1],l.dataset["".concat(o,"Id")]="".concat(a,"_").concat(t),s&&(s.dataset["".concat(o,"Id")]="".concat(a,"_").concat(t)),n.itemViewSrc=n.url,n.itemViewSize=e.Size(100,100),n.type="image",n.subtype="image/".concat(n.fileExt),l.alt&&""!==l.alt&&(n.alt=l.alt);var d=i.getElementsByTagName("FIGCAPTION");if(d[0]&&(d[0].id&&(n.ID+="_".concat(d[0].id.split("-").pop()),n.attId=d[0].id.split("-").pop()),n.title=d[0].innerHTML),!n.attId&&l.classList&&l.classList.length>0)for(var u=0;u<l.classList.length;u+=1){var g=l.classList.item(u);g.indexOf("wp-image")+1&&(n.attId=g.split("-").pop(),n.ID+="_".concat(n.attId),u=l.classList.length)}n.itemViewThumbSrc=r,n.itemViewThumbSize=e.Size(l.width?parseInt(l.width):150,l.height?parseInt(l.height):150),l.naturalWidth?(n.itemViewThumbSize.width=l.naturalWidth,n.itemViewThumbSize.height=l.naturalHeight):l.addEventListener("load",(function(){n.itemViewThumbSize.width=l.naturalWidth,n.itemViewThumbSize.height=l.naturalHeight}))}return n?(n.webImg=new Image,n.webImg.setAttribute("draggable","false"),(n.title||n.alt)&&n.webImg.setAttribute("alt",n.alt?n.alt:n.title),n.webImgFrame=this.Rect(0,0,0,0),n.webImg.addEventListener("load",(function(){this.classList.add("onLoad")}),!1),n.webImg.addEventListener("error",(function(){n.errorStatus=!0,this.classList.add("onError")}),!1),n):null}},{key:"Term",value:function(t,e){var i=this,a={get count(){return this.itemsList.length},get description(){if(this.description)return this.description},get name(){if(this.title)return this.title},get term_id(){if(this.gid)return this.gid},get sharelink(){if(i.moduleSettings(e).post_url)return i.moduleSettings(e).post_url},get thumbnail(){if(this.itemsList.length>0)return this.itemsList[0].itemViewSrc}};return this.copyProperties(t,a),a}},{key:"Meta",value:function(){return{}}}],null&&Ut(i.prototype,null),a&&Ut(i,a),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,a}(w);const Qt=$t;function te(t){return te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},te(t)}function ee(t){return function(t){if(Array.isArray(t))return ie(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ie(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?ie(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ie(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=Array(e);i<e;i++)a[i]=t[i];return a}function ae(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,ne(a.key),a)}}function ne(t){var e=function(t){if("object"!=te(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=te(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==te(e)?e:e+""}function se(t){return se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},se(t)}function oe(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,re(a.key),a)}}function re(t){var e=function(t){if("object"!=se(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=se(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==se(e)?e:e+""}function le(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(le=function(){return!!t})()}function he(t){return he=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},he(t)}function ce(t,e){return ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ce(t,e)}Qt.trace;const de=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,i){return e=he(e),function(t,e){if(e&&("object"==se(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,le()?Reflect.construct(e,i||[],he(t).constructor):e.apply(t,i))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ce(t,e)}(e,t),i=e,(a=[{key:"createLightbox",value:function(t){var e=this.filteredCollection,i=t.index;if(void 0!==i){this.lightbox&&this.lightbox.prepareToRemove();var a=wt.CONFIG;if(a.lb_FullSizeViewMode=this.galleryData.sliderFullSizeViewMode,a.lb_videoAutoStart=this.galleryData.sliderVideoAutoPlay,a.lb_tryPlayNext=this.galleryData.sliderTryPlayNext,a.lb_videoLoop=this.galleryData.sliderVideoLoop,a.lb_scrollNavi=this.galleryData.sliderScrollNavi,a.lb_sliderNextPrevAnimation="animation"===this.galleryData.sliderNextPrevAnimation,a.lb_copyR_Alert=this.galleryData.copyRAlert,a.lb_copyR_Proptection=this.galleryData.copyRProtection&&this.galleryData.isPremium,a.lb_backgroundColor=this.galleryData.sliderBgColor,a.lb_headerFooterColor=this.galleryData.sliderHeaderFooterBgColor,a.lb_preloaderColor=this.galleryData.sliderPreloaderColor,a.lb_sliderNavigationColor=this.galleryData.sliderNavigationColor,a.lb_sliderNavigationColorOver=this.galleryData.sliderNavigationColorOver?this.galleryData.sliderNavigationColorOver:this.galleryData.sliderNavigationIconColor,a.lb_sliderNavigationIconColor=this.galleryData.sliderNavigationIconColor,a.lb_sliderNavigationIconColorOver=this.galleryData.sliderNavigationIconColorOver?this.galleryData.sliderNavigationIconColorOver:this.galleryData.sliderNavigationColor,a.lb_itemCounterColor=this.galleryData.itemCounterColor,a.lb_itemCounterEnable=this.galleryData.sliderItemCounterEnable,a.lb_itemTitleEnable=this.galleryData.sliderItemTitleEnable,a.lb_itemTitleSrc=this.galleryData.sliderCaptionSrc,a.lb_itemTitleFontSize=this.galleryData.sliderItemTitleFontSize,a.lb_itemTitleTextColor=this.galleryData.sliderItemTitleTextColor,a.lb_thumbBarEnable=this.galleryData.sliderThumbBarEnable,a.lb_thumbBarHoverColor=this.galleryData.sliderThumbBarHoverColor,a.lb_zoom=this.galleryData.sliderZoomEnable,a.lb_itemInfoEnable=this.galleryData.sliderInfoEnable,a.lb_itemShare=this.galleryData.sliderSocialShareEnabled,a.lb_itemDownload=!1,a.lb_itemLike=this.galleryData.sliderLikesEnabled,a.lb_discuss=this.galleryData.sliderItemDiscuss,a.lb_menuBackgroundColor=this.galleryData.sliderThumbSubMenuBackgroundColor,a.lb_menuBackgroundColorOver=this.galleryData.sliderThumbSubMenuBackgroundColorOver,a.lb_menuIconColor=this.galleryData.sliderThumbSubMenuIconColor,a.lb_menuIconColorOver=this.galleryData.sliderThumbSubMenuIconHoverColor,a.lb_fullscreen=this.galleryData.sliderFullscreenEnabled,a.lb_slideshowEneble=this.galleryData.sliderSlideshow,a.lb_sliderSlideshowAutoStart=this.galleryData.sliderSlideshowAutoStart,a.lb_slideshowIndicatorColor=this.galleryData.slideshowIndicatorColor,a.lb_slideshowIndicatorColorBg=this.galleryData.slideshowIndicatorColorBg,a.lb_slideshowTimer=this.galleryData.sliderSlideshowDelay,a.lb_audioPlayer=this.audioPlayer,a.lb_likesSet=Qt.likesSet,a.lb_isContainIdInBookmarkSet=Qt.isContainIdInBookmarkSet,this.galleryData.appEventManager.addGMEventListener(wt.EVENTS.LB_NEED_MODAL,this,"createModalEventHendler"),this.galleryData.appEventManager.addGMEventListener(wt.EVENTS.LB_REMOVE_LIGHTBOX,this,"removeLightbox"),this.galleryData.appEventManager.addGMEventListener(wt.EVENTS.LB_FULLSCREEN_SWITCH,this,"fullscreenSwitch"),this.galleryData.appEventManager.addGMEventListener(wt.EVENTS.LB_ITEM_ACTION,this,"itemActionHandler"),this.lightbox=new wt(this.galleryData,a),this.lightbox.initByList(e,i),this.deepLinking){var n=this.filteredCollection[i],s=this.itemHash(n);window.location.hash!==s&&window.history.pushState(null,null,s)}}}},{key:"removeLightbox",value:function(t){if(t.target===this.lightbox){var e=this,i=t.target;setTimeout((function(){i.view&&i.view.parentNode&&i.view.parentNode.removeChild(i.view),e.lightbox&&(e.lightbox=void 0)}),100),this.deepLinking&&this.itemFromHash&&void 0!==this.itemFromHash.id&&window.history.back(),this.galleryData.appEventManager.removeGMEventListener(wt.EVENTS.LB_NEED_MODAL,this,"createModalEventHendler"),this.galleryData.appEventManager.removeGMEventListener(wt.EVENTS.LB_REMOVE_LIGHTBOX,this,"removeLightbox"),this.galleryData.appEventManager.removeGMEventListener(wt.EVENTS.LB_FULLSCREEN_SWITCH,this,"fullscreenSwitch"),this.galleryData.appEventManager.removeGMEventListener(wt.EVENTS.LB_ITEM_ACTION,this,"itemActionHandler"),this.galleryData.galleryScrollPositionControll&&this.checkGalleryYpositionForViewedItem()}}}])&&oe(i.prototype,a),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,a}(function(){return t=function t(e,i){var a=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.appName=i.dataset.galleryId?i.dataset.galleryId:e,this.id=e,this.viewPort=i,this.editMode=!1,this.isInitByVp=!1,this.PAGINATION_AMOUNT=20,this.needScrollHandler=!0,this.lastAddedPageNum=void 0,this.itemsList=[],this.filteredList=[],this.tagsList={},this.tagsListAdvancedCustomMode={},this.tagFromHash=void 0,this.filterPr="pgc_0",this.tagsListCopy="",this.timeOut=void 0,this.configureGalleryDefSet(),this.propsFilter=Object.keys(this.galleryData),window.pgcVideoAutostartLock=!0,this.userInteractionListener=Qt.PageInteractionListener(),this.userInteractionListener.init((function(t){t&&t.type&&"undefined"!=typeof window&&(window.pgcVideoAutostartLock=void 0)})),this.galleryData.appName=this.appName,this.initMetaDataCollection=void 0,this.presentedList=[],this.page_Amount=0,this.cureantPage=void 0,this.scrollHandler=void 0,this.viewedItem=void 0,this.view=document.createElement("div"),this.styleSheet=document.createElement("style"),this.styleSheet.id="style_".concat(this.appName),this.view.appendChild(this.styleSheet),this.customCssSheet=document.createElement("style"),this.customCssSheet.id="custom_style_".concat(this.appName),this.view.appendChild(this.customCssSheet),this.content=document.createElement("div"),this.view.appendChild(this.content),this.resizeTimeOut=void 0,this.viewWidth=0,this.firstUpdate=!1,this.content.className="".concat(this.classPref,"content"),this.view.className="".concat(this.classPref,"collection"),this.createAudioPlayer(),window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((function(){a.windowResizeHandler()})),this.resizeObserver.observe(this.view)),i.style.minHeight=null},e=[{key:"classPref",get:function(){return Qt.trace("** Need override - classPref **"),null}},{key:"itemViewConstructor",get:function(){return Qt.trace("** Need override - itemViewConstructor **"),null}},{key:"configureGalleryDefSet",value:function(){this.galleryData={},this.galleryData.customCSS="",this.galleryData.cacheItemsList=Qt.CacheItemsList(),this.galleryData.appEventManager=Qt.GMEventsManager(),this.galleryData.itemsMetaDataCollection=[],this.galleryData.images=[],this.galleryData.gutIsSelected=!1,this.galleryData.isPremium=window.PGC_SGB&&window.PGC_SGB.skinsList&&window.PGC_SGB.skinsList.pgc_sgb_portfolio,this.galleryData.collectionItemPadding=10,this.galleryData.collectionItemBgColorEv="rgba(237,237,237,1)",this.galleryData.collectionItemBgColorOd="rgba(217,217,217,1)",this.galleryData.thumbTitleColorOd="rgba(153,153,153,1)",this.galleryData.thumbDescriptionTextColorOd="rgba(119,110,119,1)",this.galleryData.collectionThummMediaWidth=40,this.galleryData.collectionThummMediaWidthMax=100,this.galleryData.chessMode=!0,this.galleryData.thumbInfoBarBgColor="rgba(237,237,237,1)",this.galleryData.thumbTitle=!0,this.galleryData.thumbTitleFontSize=18,this.galleryData.thumbTitleColor="rgba(153,153,153,1)",this.galleryData.thumbDescription=!0,this.galleryData.thumbDescriptionSrc="caption",this.galleryData.thumbDescriptionFontSize=16,this.galleryData.thumbDescriptionTextColor="rgba(119,110,119,1)",this.galleryData.thumbPanningEffect=!0,this.galleryData.thumbShadowColor="rgba(0,0,0,1)",this.galleryData.thumbHardOrdering=!1,this.galleryData.tagsFilter=!1,this.galleryData.tagsListCustomMode=!1,this.galleryData.initGalleryByFirstTag=!1,this.galleryData.deepLinkingForTag=!1,this.galleryData.galleryTagsList=void 0,this.galleryData.startByTag="pgc_0",this.galleryData.tagCloudAll="All",this.galleryData.tagCloudBgColor="rgba(153,153,153,1)",this.galleryData.tagCloudBgColorOver="rgba(253,253,253,1)",this.galleryData.tagCloudTextColor="rgba(253,253,253,1)",this.galleryData.tagCloudTextColorOver="rgba(153,153,153,1)",this.galleryData.tagCloudFontSize=16,this.galleryData.pageMode=!1,this.galleryData.itemsPerPage=20,this.galleryData.loadMoreDefName="Load More",this.galleryData.loadMoreAuto=!1,this.galleryData.loadMoreFontSize=16,this.galleryData.loadMoreTextColor="rgba(255,255,255,1)",this.galleryData.loadMoreBgColor="rgba(0,0,0,1)",this.galleryData.numItemsDisplayed=0,this.galleryData.useLightbox=!0,this.galleryData.thumbClickAction="",this.galleryData.deepLinking=!1,this.galleryData.linkTargetWindow="self",this.galleryData.galleryBgColor="rgba(0,0,0,0)",this.galleryData.galleryBorderRadius=0,this.galleryData.lazyLoading=!0,this.galleryData.contentNoPadding=!1,this.galleryData.orderBy=!1,this.galleryData.sliderMaxHeight=400,this.galleryData.sliderAdminWidth=400,this.galleryData.responsiveHeight=!1,this.galleryData.sliderAnimation="animation",this.galleryData.sliderNextPrevNavigation=!0,this.galleryData.sliderNextPrevBgColor="rgba(255,255,255,1)",this.galleryData.sliderNextPrevBgColorHover="rgba(0,0,0,1)",this.galleryData.sliderNextPrevIconColor="rgba(0,0,0,1)",this.galleryData.sliderNextPrevIconColorHover="rgba(255,255,255,1)",this.galleryData.sliderItemFill="true",this.galleryData.sliderItemBgColor="rgba(0,0,0,0)",this.galleryData.sliderItemBorderWidth=0,this.galleryData.sliderItemBorderColor="rgba(0,0,0,0)",this.galleryData.collectionthumbColorsFilter="none",this.galleryData.sliderDotNavi=!1,this.galleryData.sliderDotNaviBgColor="rgba(0,0,0,0.4)",this.galleryData.sliderDotNaviBgColorHover="rgba(255,255,255,1)",this.galleryData.sliderThumbsNavi=!0,this.galleryData.sliderThumbsNaviColor="rgba(255,255,255,1)",this.galleryData.autoPlay=!1,this.galleryData.autoPlayDelay=4,this.galleryData.autoPlayMouseStoper=!0,this.galleryData.collectionPreloaderColor="rgba(0,0,0,0.7)",this.galleryData.thumbHieghtRation=1,this.galleryData.thumbSpacing=5,this.galleryData.thumbMobileSpacing=5,this.galleryData.collectionthumbRoundedCorners=0,this.galleryData.collectionthumbHoverTitleFontSize=18,this.galleryData.collectionthumbHoverTitleTextColor="rgba(255,255,255,1)",this.galleryData.collectionthumbHoverTitleTextBgColor="rgba(0,0,0,0.8)",this.galleryData.collectionthumbHoverBgColor="rgba(0,0,0,0.4)",this.galleryData.externalLink=!0,this.galleryData.externalLinkDefName="Read More",this.galleryData.externalLinkTextColor="rgba(0,0,0,1)",this.galleryData.externalLinkBgColor="rgba(255,255,255,1)",this.galleryData.externalLinkFontSize=18,this.galleryData.captions=!0,this.galleryData.captionSrc="caption",this.galleryData.captionHAlign="top",this.galleryData.collectionColumns=3,this.galleryData.lastRowFill=!1,this.galleryData.collectionThumbRecomendedWidth=200,this.galleryData.collectionThumbRecomendedHeight=200,this.galleryData.collectionThumbMiniScreenScale=!1,this.galleryData.collectionThumbSubMenuVisibility=!1,this.galleryData.collectionThumbSubMenuInfo=!1,this.galleryData.collectionThumbSubMenuComents=!1,this.galleryData.collectionThumbSubMenuShare=!0,this.galleryData.collectionThumbSubMenuDownload=!0,this.galleryData.collectionThumbSubMenuBgColor="rgba(0,0,0,0.8)",this.galleryData.collectionThumbSubMenuBgColorHover="rgba(255,255,255,1)",this.galleryData.collectionThumbSubMenuIconColor="rgba(255,255,255,1)",this.galleryData.collectionThumbSubMenuIconColorHover="rgba(0,0,0,1)",this.galleryData.modaBgColor="rgba(0,0,0,0.8)",this.galleryData.modalInfoBoxBgColor="rgba(240,240,240,1)",this.galleryData.modalInfoBoxTitleTextColor="rgba(20,20,20,1)",this.galleryData.modalInfoBoxTextColor="rgba(20,20,20,1)",this.galleryData.infoBarExifEnable=!1,this.galleryData.infoBarDateInfoEnable=!1,this.galleryData.modalIconColor="rgba(255,255,255,1)",this.galleryData.modalIconColorHover="rgba(200,200,200,1)",this.galleryData.shareFacebook=!0,this.galleryData.shareTwitter=!0,this.galleryData.sharePinterest=!0,this.galleryData.shareCopyLink=!0,this.galleryData.sliderItemDownload=!0,this.galleryData.sharePost="sharelink",this.galleryData.sliderFullSizeViewMode=!1,this.galleryData.sliderCarouselMode=!0,this.galleryData.sliderVideoAutoPlay=!1,this.galleryData.sliderVideoLoop=!1,this.galleryData.sliderTryPlayNext=!1,this.galleryData.sliderScrollNavi=!1,this.galleryData.sliderNextPrevAnimation="animation",this.galleryData.galleryScrollPositionControll=!1,this.galleryData.copyRProtection=!1,this.galleryData.copyRAlert="Hello, this photo is mine!",this.galleryData.sliderItemCounterEnable=!0,this.galleryData.itemCounterColor="rgba(255,255,255,1)",this.galleryData.sliderThumbBarEnable=!0,this.galleryData.sliderThumbBarHoverColor="rgba(240,240,240,1)",this.galleryData.sliderBgColor="rgba(0,0,0,0.8)",this.galleryData.sliderPreloaderColor="rgba(240,240,240,1)",this.galleryData.sliderHeaderFooterBgColor="rgba(0,0,0,0.4)",this.galleryData.sliderNavigationColor="rgba(0,0,0,1)",this.galleryData.sliderNavigationColorOver="rgba(255,255,255,1)",this.galleryData.sliderNavigationIconColor="rgba(255,255,255,1)",this.galleryData.sliderNavigationIconColorOver="rgba(0,0,0,1)",this.galleryData.sliderItemTitleEnable=!0,this.galleryData.sliderCaptionSrc="caption",this.galleryData.sliderItemTitleFontSize=20,this.galleryData.sliderItemTitleTextColor="rgba(255,255,255,1)",this.galleryData.sliderItemDescriptionEnable=!1,this.galleryData.sliderDescriptionSrc="caption",this.galleryData.sliderItemDescriptionFontSize=16,this.galleryData.sliderItemDescriptionTextColor="rgba(255,255,255,1)",this.galleryData.sliderSlideshow=!0,this.galleryData.sliderSlideshowAutoStart=!1,this.galleryData.sliderSlideshowDelay=8,this.galleryData.slideshowIndicatorColor="rgba(255,255,255,1)",this.galleryData.slideshowIndicatorColorBg="rgba(255,255,255,0.5)",this.galleryData.sliderThumbSubMenuBackgroundColor="rgba(255,255,255,0)",this.galleryData.sliderThumbSubMenuBackgroundColorOver="rgba(255,255,255,1)",this.galleryData.sliderThumbSubMenuIconColor="rgba(255,255,255,1)",this.galleryData.sliderThumbSubMenuIconHoverColor="rgba(0,0,0,1)",this.galleryData.sliderInfoEnable=!1,this.galleryData.sliderSocialShareEnabled=!0,this.galleryData.sliderItemDiscuss=!1,this.galleryData.sliderZoomEnable=!0,this.galleryData.sliderLikesEnabled=!1,this.galleryData.sliderFullscreenEnabled=!0}},{key:"addItemToStage",value:function(t){t.initSRC()}},{key:"updateLayout",value:function(){Qt.trace("** Need implementation - updateLayout **")}},{key:"isAdmin",get:function(){return"1"===window.PGC_SGB.admin}},{key:"deepLinking",get:function(){return this.galleryData.deepLinking&&this.galleryData.isPremium&&!this.editMode}},{key:"deepLinkingForTag",get:function(){return this.TAGS_CLOUD_CUSTOM&&this.galleryData.deepLinkingForTag}},{key:"tagNameToId",value:function(t){return t.replace(/[^a-zA-Z0-9]/g,"_").toLowerCase()}},{key:"hashForTagName",value:function(t){if("pgc_0"!==t)return this.tagNameToId(t)}},{key:"createAudioPlayer",value:function(){var t;null!=(t=document.getElementById("simplyAudioPlayer")?document.getElementById("simplyAudioPlayer"):new Audio)&&t.canPlayType&&t.canPlayType("audio/mpeg")&&(t.id="simplyAudioPlayer",t.setAttribute("type","audio/mpeg"),t.setAttribute("codecs","mp3"),this.view.appendChild(t),this.galleryData.audioPlayer=t)}},{key:"mediaStoper",value:function(){if(this.galleryData.audioPlayer.src){var t=document.getElementsByClassName("pgc-sgb-svg-rotate");if(t.length)for(var e=0;e<t.length;e+=1)t[e].classList.remove("pgc-sgb-svg-rotate");this.galleryData.audioPlayer.pause()}var i=document.getElementsByClassName("thumb-video-content");if(i.length)for(var a=0;a<i.length;a+=1)i[a].pause()}},{key:"itemFromHash",get:function(){var t,e,i=window.location.hash.indexOf("".concat(this.appName));if(i+1){var a=window.location.hash.substring(i).split("-");return 2===a.length?this.deepLinkingForTag&&void 0!==this.filtredById?void 0!==a[1]&&(e=a[1]):t=a[1]:this.deepLinkingForTag&&void 0!==this.filtredById&&(void 0!==a[1]&&(e=a[1]),void 0!==a[2]&&(t=a[2])),{tagID:e,id:t}}}},{key:"itemHash",value:function(t){return this.deepLinkingForTag&&this.filtredById?"#".concat(this.appName).concat(this.hashForTagName(this.filtredById)?"-".concat(this.hashForTagName(this.filtredById)):"","-").concat(t.ID):"#".concat(this.appName,"-").concat(t.ID)}},{key:"showPreloader",value:function(t){var e;if(t){if(document.getElementById("".concat(this.appName,"slider_preloader")))return;(e=Qt.createPreloaderView(Qt.hexToRgbaStrin(this.galleryData.collectionPreloaderColor,.7))).id="".concat(this.appName,"slider_preloader"),this.view.appendChild(e)}else(e=document.getElementById("".concat(this.appName,"slider_preloader")))&&Qt.fadeOut(e,(function(){e&&e.parentNode&&e.parentNode.removeChild(e)}),500)}},{key:"addNotification",value:function(t){this.notificationBlock||(this.notificationBlock=document.createElement("div"),this.notificationBlock.className="".concat(this.classPref,"notification")),this.notificationBlock.innerHTML=t,this.view.appendChild(this.notificationBlock)}},{key:"keydownHandler",value:function(){var t=this;return t.handlerKB=function(e){var i,a;if(t.modal)t.modal.prepareToRemove();else switch(e.keyCode){case 27:t.stopAllMediaContentInCollection(),t.lightbox&&t.lightbox.prepareToRemove();break;case 39:if(t.lightbox)return;if(!(i=document.activeElement)||void 0===i.dataset.pgcGallery)return;if(i.dataset.pgcGallery!==t.appName)return;"slider"===t.TYPE&&t.slider||"showcase"===t.TYPE&&t.scroller?"next"===i.dataset.pgcAction&&(t.slider&&t.slider.gotoNext?t.slider.gotoNext():t.gotoNext&&(e.preventDefault(),t.gotoNext())):"horizon"===t.TYPE&&"scroll"===i.dataset.pgcAction&&t.slider.renderTransformTo&&t.slider.renderTransformTo(t.slider.targetX-20);break;case 37:if(t.lightbox)return;if(!(i=document.activeElement)||void 0===i.dataset.pgcGallery)return;if(i.dataset.pgcGallery!==t.appName)return;"slider"===t.TYPE&&t.slider||"showcase"===t.TYPE&&t.scroller?"next"===i.dataset.pgcAction&&(t.slider&&t.slider.gotoNext?t.slider.gotoPrev():t.gotoNext&&(e.preventDefault(),t.gotoPrev())):"horizon"===t.TYPE&&"scroll"===i.dataset.pgcAction&&t.slider.renderTransformTo&&t.slider.renderTransformTo(t.slider.targetX+20);break;case 13:if(!t.isAdmin&&!t.lightbox){if(!(i=document.activeElement)||void 0===i.dataset.pgcGallery)return;if(i.dataset.pgcGallery!==t.appName)return;if("showcase"===t.TYPE&&t.scroller)void 0!==t.cureantItem&&t.filteredCollection[t.cureantItem]&&(a=t.filteredCollection[t.cureantItem])&&a.view&&a.view.inner&&(a.view.itemClickHandler?a.view.itemClickHandler({target:a.view.inner}):a.view.itemMediaClickHandler&&a.view.itemMediaClickHandler({target:a.view.inner}));else if("slider"===t.TYPE&&t.slider&&void 0!==t.columns)return void(void 0!==t.slider.currentPageIndex&&t.filteredCollection[t.slider.currentPageIndex*t.columns]&&(a=t.filteredCollection[t.slider.currentPageIndex*t.columns])&&a.view&&a.view.inner&&(a.view.itemClickHandler?a.view.itemClickHandler({target:a.view.inner}):a.view.itemMediaClickHandler&&a.view.itemMediaClickHandler({target:a.view.inner})));i.dataset.pgcAction&&void 0!==i.dataset.index&&t.filteredCollection[parseInt(i.dataset.index)]&&(a=t.filteredCollection[parseInt(i.dataset.index)])&&a.view&&(a.view.itemClickHandler?"portfolio2"===t.TYPE?a.view.itemClickHandler({target:a.view.wrap_item}):a.view.itemClickHandler({target:i}):a.view.itemMediaClickHandler&&("portfolio2"===t.TYPE?a.view.itemClickHandler({target:a.view.wrap_item}):a.view.itemMediaClickHandler({target:i})))}}},t.handlerKB}},{key:"init",value:function(){this.viewPort.appendChild(this.view),this.viewPort.dataset.editor&&(this.editMode=!0),this.initByVpData(),document.addEventListener("keydown",this.keydownHandler(),!0);var t=this;this.resizeWindow=function(){t.windowResizeHandler()},this.focusPage=function(e){t.focusPageHandler(e)},window.addEventListener("resize",this.resizeWindow),window.addEventListener("blur",this.focusPage),window.addEventListener("focus",this.focusPage),this.popstateHandler=function(){t.modal&&t.modal.prepareToRemove(),t.lightbox?t.lightbox.prepareToRemove():(t.itemFromHash&&void 0!==t.itemFromHash.id&&t.tryOpenLightboxForID(t.itemFromHash.id),t.deepLinkingForTag&&t.itemFromHash&&void 0!==t.itemFromHash.tagID&&void 0===t.itemFromHash.id&&void 0!==t.tagsListAdvancedCustomMode[t.itemFromHash.tagID]&&t.tagsListContoller&&(t.tagsListContoller.trySelectByTagId(t.itemFromHash.tagID),t.filtred(t.tagsListAdvancedCustomMode[t.itemFromHash.tagID])))},this.deepLinking&&window.addEventListener("popstate",this.popstateHandler,!1)}},{key:"initByVpData",value:function(){var t,e=this.viewPort.getElementsByClassName("sgb-data")[0];if(e?t=e.textContent:this.viewPort.dataset.gallery?t=this.viewPort.dataset.gallery:Qt.trace("Error: Gallery data is missing"),t&&""!==t)try{var i=JSON.parse(t);Qt.copyProperties(i,this.galleryData),this.initByData(),this.isInitByVp=!0}catch(t){Qt.trace(t)}}},{key:"shuffleArray",value:function(t){for(var e=t.length-1;e>0;e-=1){var i=Math.floor(Math.random()*(e+1)),a=[t[i],t[e]];t[e]=a[0],t[i]=a[1]}return t}},{key:"initByData",value:function(t){if(t&&Qt.copyProperties(t,this.galleryData),!this.editMode&&this.galleryData.useClobalSettings&&window.PGC_SGB&&window.PGC_SGB.skinsSettings&&window.PGC_SGB.skinsSettings[this.galleryData.galleryType]){var e=window.PGC_SGB.skinsSettings[this.galleryData.galleryType];Qt.copyProperties(e,this.galleryData)}this.galleryData.thumbClickAction&&""!==this.galleryData.thumbClickAction||(this.galleryData.thumbClickAction=this.galleryData.useLightbox?"useLightbox":"none"),this.updateGalleryWrapStyle(),this.updateGalleryStyleSheet(),this.updateGalleryCustomCSS(),this.paddingMarginContent(),this.intByDataExtra(),this.initItemMenu();var i=this.galleryData.images,a=[],n=[];if(n=!Array.isArray(this.galleryData.itemsMetaDataCollection)&&this.galleryData.itemsMetaDataCollection.toJSON?this.galleryData.itemsMetaDataCollection.toJSON():ee(this.galleryData.itemsMetaDataCollection),i){for(var s=0;s<i.length;s+=1){var o=i[s];o.link&&!o.postlink&&(o.postlink=o.link);for(var r=o.id,l=Qt.Item(o,this.appName,{itemViewFullSize:this.galleryData.sliderFullSizeViewMode}),h=0;h<n.length;h+=1){var c=n[h];if(parseInt(c.id)===r){if(c.orignLinkText=c.linkText,c.linkText=""===c.linkText?this.galleryData.externalLinkDefName:c.linkText,c.tags)for(var d=0;d<c.tags.length;d+=1)this.tagsList[c.tags[d].replace(/[ ]/g,"_").toLowerCase()]=c.tags[d];l.initMetaObj(c),n.splice(h,1),h=n.length}}a.push(l)}this.initByList(a)}if(this.deepLinking&&void 0!==this.itemFromHash){var u=this.itemFromHash.id;"pgc_0"===this.filtredById&&void 0===this.itemFromHash.id&&/^\d+$/.test(this.itemFromHash.tagID)&&(u=this.itemFromHash.tagID);var g=this.getItemIndexByID(u,this.filteredCollection);void 0!==g&&(window.history.replaceState(null,null,window.location.pathname+window.location.search),this.createLightbox({index:g}))}}},{key:"updateGalleryWrapStyle",value:function(){""!==this.galleryData.thumbClickAction?(this.view.classList.remove("action-lightbox"),this.view.classList.remove("action-postlink"),"useLightbox"===this.galleryData.thumbClickAction?this.view.classList.add("action-lightbox"):"postLink"===this.galleryData.thumbClickAction&&this.view.classList.add("action-postlink")):this.galleryData.useLightbox?this.view.classList.add("action-lightbox"):this.view.classList.remove("action-lightbox"),this.galleryData.thumbPanningEffect||this.content.classList.add("pgc-no-panning"),this.contentNoPadding=this.galleryData.contentNoPadding,this.galleryData.contentNoPadding?(this.content.style.backgroundColor="rgba(0,0,0,0)",this.content.style.borderRadius="0px"):(this.content.style.backgroundColor=this.galleryData.galleryBgColor,this.content.style.borderRadius="".concat(this.galleryData.galleryBorderRadius,"px"))}},{key:"thumbSpacing",get:function(){var t=this.galleryData,e=t.thumbSpacing,i=t.thumbMobileSpacing;return void 0!==i&&Qt.miniScreen?i:e}},{key:"collectionthumbRoundedCorners",get:function(){return this.galleryData.collectionthumbRoundedCorners}},{key:"paddingMarginContent",value:function(){var t=this.thumbSpacing/2;this.galleryData.contentNoPadding?(this.content.style.margin="-".concat(t,"px"),this.content.style.padding=null):(this.content.style.padding="".concat(t,"px"),this.content.style.margin=null)}},{key:"intByDataExtra",value:function(){}},{key:"updateList",value:function(t){if(t){if(Array.isArray(t)){this.removeViewContent();var e=[],i=[];i=!Array.isArray(this.galleryData.itemsMetaDataCollection)&&this.galleryData.itemsMetaDataCollection.toJSON?this.galleryData.itemsMetaDataCollection.toJSON():ee(this.galleryData.itemsMetaDataCollection);for(var a=0;a<t.length;a+=1){var n=t[a];n.link&&!n.postlink&&(n.postlink=n.link);for(var s=n.id,o=Qt.Item(n,this.appName,{itemViewFullSize:this.galleryData.sliderFullSizeViewMode}),r=0;r<i.length;r+=1){var l=i[r];if(parseInt(l.id)===s){if(l.orignLinkText=l.linkText,l.linkText=""===l.linkText?this.galleryData.externalLinkDefName:l.linkText,l.tags)for(var h=0;h<l.tags.length;h+=1)this.tagsList[l.tags[h].replace(/[ ]/g,"_").toLowerCase()]=l.tags[h];o.initMetaObj(l),i.splice(r,1),r=i.length}}e.push(o)}this.initByList(e)}}else for(var c=0;c<this.itemsList.length;c+=1)this.itemsList[c].index=c}},{key:"initByList",value:function(t){this.lastAddedPageNum=void 0,this.cureantPage=void 0,t.length>0&&(this.viewWidth=this.view.clientWidth,this.itemsList="random"!==this.galleryData.orderBy||this.isAdmin?t:this.shuffleArray(t),this.filteredList=[],this.createViewForItem(),this.galleryData.tagsFilter&&Object.keys(this.tagsList).length&&(this.createTagsCloudView(),this.filtredById=this.galleryData.startByTag),this.updateViewByData())}},{key:"createViewForItem",value:function(){if(this.itemViewConstructor&&this.itemsList)for(var t=0;t<this.itemsList.length;t+=1){var e=this.itemViewConstructor(t);this.itemsList[t].view=e,e.init()}}},{key:"updateViewByData",value:function(){this.createLayout()}},{key:"updateExraProps",value:function(t){}},{key:"updateGalleryCustomCSS",value:function(){var t=this.galleryData.customCSS;if(t)if(""!==t){var e,i="",a=/([\s\S]+?)\{([\s\S]*?)\}/gi,n=t.replace(/\/\*[\s\S]*?\*\//g,"");do{try{if(e=a.exec(n)){var s=e[1].trim().split(",");if(s.length){for(var o=e[0],r=0;r<s.length;r+=1){var l=s[r].trim();o=o.replace(l,'div[data-gallery-id="'.concat(this.appName,'"] ').concat(l))}i+="".concat(o," ")}}}catch(t){Qt.trace(t)}}while(e);i.trim().length&&(this.customCssSheet.innerHTML=i)}else this.customCssSheet.innerHTML=""}},{key:"updateGalleryStyleSheet",value:function(){this.styleSheet.innerHTML='\n div[data-gallery-id="'.concat(this.appName,'"] .').concat(this.classPref,"main-wrap{\n padding:").concat(this.thumbSpacing/2,"px;\n color:").concat(this.galleryData.collectionthumbHoverTitleTextColor,";\n font-size:").concat(this.galleryData.collectionthumbHoverTitleFontSize,"px;\n border-radius:").concat(this.collectionthumbRoundedCorners,'px;\n }\n div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"item-button{\n color:").concat(this.galleryData.externalLinkTextColor,";\n font-size:").concat(this.galleryData.externalLinkFontSize,"px;\n background-color:").concat(this.galleryData.externalLinkBgColor,";\n box-shadow:10px 0 0 ").concat(this.galleryData.externalLinkBgColor,", -10px 0 0 ").concat(this.galleryData.externalLinkBgColor,';\n }\n div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"load-more{\n color:").concat(this.galleryData.loadMoreTextColor,";\n font-size:").concat(this.galleryData.loadMoreFontSize,"px;\n background-color:").concat(this.galleryData.loadMoreBgColor,';\n }\n div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"load-more:hover{\n color:").concat(this.galleryData.loadMoreBgColor,";\n background-color:").concat(this.galleryData.loadMoreTextColor,';\n }\n div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"item-button:hover{\n color:").concat(this.galleryData.externalLinkBgColor,";\n background-color:").concat(this.galleryData.externalLinkTextColor,";\n box-shadow:10px 0 0 ").concat(this.galleryData.externalLinkTextColor,", -10px 0 0 ").concat(this.galleryData.externalLinkTextColor,';\n }\n div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"item-title{\n background-color:").concat(this.galleryData.collectionthumbHoverTitleTextBgColor,";\n box-shadow:10px 0 0 ").concat(this.galleryData.collectionthumbHoverTitleTextBgColor,", -10px 0 0 ").concat(this.galleryData.collectionthumbHoverTitleTextBgColor,';\n }\n div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"item-thumb-price{\n color:").concat(this.galleryData.collectionthumbHoverTitleTextColor,";\n background-color:").concat(this.galleryData.collectionthumbHoverTitleTextBgColor,';\n }\n div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"item-hover{\n background-color:").concat(this.galleryData.collectionthumbHoverBgColor,';\n }\n div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,'item-inner.action-lightbox{\n cursor: zoom-in;\n }\n div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,'item-inner.action-postlink{\n cursor: pointer;\n }\n div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"item-badge{\n background-color:").concat(this.galleryData.collectionThumbSubMenuBgColor,";\n fill:").concat(this.galleryData.collectionThumbSubMenuIconColor,';\n }\n div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"next-prev-navi{\n margin:").concat(this.thumbSpacing/2,"px;\n background-color:").concat(this.galleryData.sliderNextPrevBgColor,";\n fill:").concat(this.galleryData.sliderNextPrevIconColor,';\n }\n div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"next-prev-navi:hover{\n background-color:").concat(this.galleryData.sliderNextPrevBgColorHover,";\n fill:").concat(this.galleryData.sliderNextPrevIconColorHover,';\n }\n div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,'dot-navi,\n div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"thumbs-navi{\n margin: ").concat(this.thumbSpacing/2,"px ").concat(this.thumbSpacing/2,'px 0;\n }\n div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"dot{\n background-color:").concat(this.galleryData.sliderDotNaviBgColor,';\n }\n div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,'dot.pgc-selected,\n div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"dot:hover{\n background-color:").concat(this.galleryData.sliderDotNaviBgColorHover,';\n }\n div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"next-prev-navi.prev{\n left:-").concat(this.thumbSpacing,'px;\n }\n div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"next-prev-navi.next{\n right:-").concat(this.thumbSpacing,'px;\n }\n div[id="').concat(this.appName,'_lightbox"] .pgc-rev-slider-post-informer-button a{\n color:').concat(this.galleryData.sliderNavigationIconColor,';\n }\n div[id="').concat(this.appName,'_lightbox"] .pgc-rev-slider-post-informer-button:hover a{\n color:').concat(this.galleryData.sliderNavigationIconColorOver,';\n }\n div[id="').concat(this.appName,'_lightbox"] .pgc-rev-slider-post-informer-button,\n div[id="').concat(this.appName,'_lightbox"] .pgc-rev-slider-post-informer-price{\n background-color:').concat(this.galleryData.sliderNavigationColor,";\n color:").concat(this.galleryData.sliderNavigationIconColor,';\n }\n div[id="').concat(this.appName,'_lightbox"] .pgc-rev-slider-post-informer-button:hover{\n background-color:').concat(this.galleryData.sliderNavigationColorOver,";\n color:").concat(this.galleryData.sliderNavigationIconColorOver,";\n }\n ")}},{key:"tagsActionHandler",value:function(t){t.params&&t.params.tagName&&t.params.tagId&&this.filtred("pgc_0"===t.params.tagId?t.params.tagId:t.params.tagName)}},{key:"updateMetaDataWithDelay",value:function(){if(this.galleryData.itemsMetaDataCollection&&this.galleryData.itemsMetaDataCollection.models){var t=this.galleryData.itemsMetaDataCollection.models;this.tagsList={};for(var e=0;e<t.length;e+=1){var i=t[e].toJSON();if(i.tags)for(var a=0;a<i.tags.length;a+=1)this.tagsList[i.tags[a].replace(/[ ]/g,"_").toLowerCase()]=i.tags[a]}this.tagsListCopy!==JSON.stringify(this.tagsList)&&(this.createTagsCloudView(),this.filtred("pgc_0"))}}},{key:"createTagsCloudView",value:function(){if(this.TAGS_CLOUD){if(!this.tagsListContoller){this.header=document.createElement("div"),this.header.className="".concat(this.classPref,"header"),this.view.insertBefore(this.header,this.subContent?this.subContent:this.content);var t=Nt.CONFIG;t.tl_all=this.galleryData.tagCloudAll,t.tl_sort_item=!0,t.tl_backgrounColor=this.galleryData.tagCloudBgColor,t.tl_backgrounColorOver=this.galleryData.tagCloudBgColorOver,t.tl_titleColor=this.galleryData.tagCloudTextColor,t.tl_titleColorOver=this.galleryData.tagCloudTextColorOver,t.tl_fontSize=this.galleryData.tagCloudFontSize,this.tagsListContoller=new Nt(t,this.galleryData),this.galleryData.appEventManager.addGMEventListener(Nt.EVENTS.TAG_ACTION,this,"tagsActionHandler")}if(this.galleryData.tagsFilter){var e=Nt.CONFIG;if(e.tl_all=this.galleryData.tagCloudAll,e.tl_sort_item=!0,e.tl_backgrounColor=this.galleryData.tagCloudBgColor,e.tl_backgrounColorOver=this.galleryData.tagCloudBgColorOver,e.tl_titleColor=this.galleryData.tagCloudTextColor,e.tl_titleColorOver=this.galleryData.tagCloudTextColorOver,e.tl_fontSize=this.galleryData.tagCloudFontSize,this.tagsListContoller.config=e,Object.keys(this.tagsList).length&&(this.TAGS_CLOUD_CUSTOM&&!this.galleryData.tagsListCustomMode||void 0===this.TAGS_CLOUD_CUSTOM))return this.tagsListCopy=JSON.stringify(this.tagsList),this.tagsListContoller.refreshByList(this.tagsList,this.galleryData.startByTag),void this.header.appendChild(this.tagsListContoller.view);if(this.galleryData.tagsListCustomMode&&this.TAGS_CLOUD_CUSTOM&&this.galleryData.galleryTagsList){for(var i=[],a=0;a<this.galleryData.galleryTagsList.length;a+=1){var n=this.galleryData.galleryTagsList[a];i[a]={id:this.tagNameToId(n),name:n},this.tagsListAdvancedCustomMode[this.tagNameToId(n)]=n}return this.galleryData.initGalleryByFirstTag&&this.galleryData.galleryTagsList[0]&&(this.galleryData.startByTag=this.galleryData.galleryTagsList[0]),void 0!==this.itemFromHash&&this.deepLinkingForTag&&this.itemFromHash.tagID&&void 0!==this.tagsListAdvancedCustomMode[this.itemFromHash.tagID]&&(this.tagFromHash=this.tagsListAdvancedCustomMode[this.itemFromHash.tagID],this.galleryData.startByTag=this.tagFromHash),this.tagsListContoller.refreshByListCustomSort(i,this.tagNameToId(this.galleryData.startByTag),this.galleryData.initGalleryByFirstTag),this.header.appendChild(this.tagsListContoller.view),void(this.tagsListCopy=JSON.stringify(i))}this.tagsListContoller.view.parentNode&&this.tagsListContoller.view.parentNode.removeChild(this.tagsListContoller.view)}else this.tagsListContoller.view.parentNode&&this.tagsListContoller.view.parentNode.removeChild(this.tagsListContoller.view)}}},{key:"needUpdateProps",value:function(t){for(var e={},i=0;i<this.propsFilter.length;i+=1){var a=this.propsFilter[i];Object.prototype.hasOwnProperty.call(t,a)&&("galleryTagsList"===a?JSON.stringify(this.galleryData[a])!==JSON.stringify(t[a])&&(e[a]=ee(t[a])):this.galleryData[a]!==t[a]&&(e[a]=t[a]))}return e}},{key:"updateItemsMetaData",value:function(t){for(var e=t.toJSON(),i=0;i<e.length;i+=1){var a=this.itemsList[this.getItemIndexByID(e[i].id,this.itemsList)];if(a){var n=e[i];n.orignLinkText=n.linkText,n.linkText=""===n.linkText?this.galleryData.externalLinkDefName:n.linkText,a.initMetaObj(n),a.view&&a.view.updateLink(n)}}}},{key:"inFiltartionByFirstTag",value:function(){if(this.tagsListContoller&&this.tagsListContoller.list){var t=this.tagsListContoller.list[0];t?this.filtred(t.name):this.filtred("pgc_0")}}},{key:"update",value:function(t){var e=this;if(t){var i=this.needUpdateProps(t);if(0!==Object.keys(i).length){if(!this.isInitByVp)return Qt.copyProperties(i,this.galleryData),this.initByData(),void(this.isInitByVp=!0);if(void 0!==i.gutIsSelected&&this.isSelected(i.gutIsSelected),i.itemsMetaDataCollection&&!this.initMetaDataCollection&&!1===Array.isArray(i.itemsMetaDataCollection)&&(this.galleryData.itemsMetaDataCollection=i.itemsMetaDataCollection,this.updateItemsMetaData(this.galleryData.itemsMetaDataCollection),this.galleryData.itemsMetaDataCollection.on("change add remove",(function(t){var i=e.itemsList[e.getItemIndexByID(t.id,e.itemsList)];if(i){var a=t.toJSON();a.orignLinkText=a.linkText,a.linkText=""===a.linkText?e.galleryData.externalLinkDefName:a.linkText,i.initMetaObj(a)&&e.updateLayout(),i.view&&i.view.updateLink()}clearTimeout(e.setTimeout),e.setTimeout=setTimeout((function(){e.updateMetaDataWithDelay()}),100)})),this.initMetaDataCollection=!0),i.images&&this.updateList(i.images),void 0!==i.sliderFullSizeViewMode)for(var a=0;a<this.itemsList.length;a+=1)this.itemsList[a].itemViewFullSize=i.sliderFullSizeViewMode;if(this.updateExraProps(i),Qt.copyProperties(i,this.galleryData),void 0!==i.initGalleryByFirstTag&&this.TAGS_CLOUD_CUSTOM&&(this.createTagsCloudView(),this.inFiltartionByFirstTag()),void 0!==i.tagsListCustomMode&&this.TAGS_CLOUD_CUSTOM&&(this.createTagsCloudView(),i.tagsListCustomMode&&this.galleryData.initGalleryByFirstTag?this.inFiltartionByFirstTag():this.filtred("pgc_0")),void 0!==i.galleryTagsList&&this.TAGS_CLOUD_CUSTOM&&(this.createTagsCloudView(),this.galleryData.initGalleryByFirstTag&&this.inFiltartionByFirstTag()),void 0!==i.tagsFilter&&this.TAGS_CLOUD&&(this.createTagsCloudView(),!1===i.tagsFilter&&this.filtred(this.galleryData.startByTag)),this.TAGS_CLOUD&&this.tagsListContoller&&(i.tagCloudAll||i.tagCloudBgColor||i.tagCloudBgColorOver||i.tagCloudTextColor||i.tagCloudTextColorOver||i.tagCloudFontSize)){var n=Nt.CONFIG;n.tl_all=this.galleryData.tagCloudAll,n.tl_sort_item=!0,n.tl_backgrounColor=this.galleryData.tagCloudBgColor,n.tl_backgrounColorOver=this.galleryData.tagCloudBgColorOver,n.tl_titleColor=this.galleryData.tagCloudTextColor,n.tl_titleColorOver=this.galleryData.tagCloudTextColorOver,n.tl_fontSize=this.galleryData.tagCloudFontSize,this.tagsListContoller.updateConfig(n)}if(void 0!==i.thumbPanningEffect&&(i.thumbPanningEffect?this.content.classList.remove("pgc-no-panning"):this.content.classList.add("pgc-no-panning")),this.itemMenu){var s=M.CONFIG;s.im_download=this.galleryData.collectionThumbSubMenuDownload,s.im_share=this.galleryData.collectionThumbSubMenuShare,s.im_backgroundColor=this.galleryData.collectionThumbSubMenuBgColor,s.im_backgroundColorOver=this.galleryData.collectionThumbSubMenuBgColorHover,s.im_iconColor=this.galleryData.collectionThumbSubMenuIconColor,s.im_iconColorOver=this.galleryData.collectionThumbSubMenuIconColorHover,this.itemMenu.updateConfig(s)}else this.initItemMenu();this.updateGalleryStyleSheet(),void 0!==i.customCSS&&this.updateGalleryCustomCSS(),this.updateStyleByProps()}}else this.initByVpData()}},{key:"updateStyleExraProps",value:function(){}},{key:"updateStyleByProps",value:function(){this.updateStyleExraProps(),this.updateGalleryWrapStyle();for(var t=0;t<this.itemsList.length;t+=1){var e=this.itemsList[t].view;e&&e.updateProps()}}},{key:"isSelected",value:function(t){this.placeHolder(!0!==t)}},{key:"placeHolder",value:function(t){t?(this.placeHolderDiv||(this.placeHolderDiv=document.createElement("div"),this.placeHolderDiv.className="pgc-block-protector",this.placeHolderDiv.style.width="100%",this.placeHolderDiv.style.height="100%",this.placeHolderDiv.style.top="0",this.placeHolderDiv.style.bottom="0",this.placeHolderDiv.style.backgroundColor="rgba(255,255,255,0.4)",this.placeHolderDiv.style.cursor="pointer",this.placeHolderDiv.style.position="absolute",this.placeHolderDiv.style.zIndex="auto"),this.view.appendChild(this.placeHolderDiv)):this.placeHolderDiv&&this.placeHolderDiv.parentElement&&this.placeHolderDiv.parentElement.removeChild(this.placeHolderDiv)}},{key:"initItemMenu",value:function(){var t=M.CONFIG;t.im_link=this.galleryData.collectionThumbSubMenuVisibility,t.im_info=this.galleryData.collectionThumbSubMenuInfo,t.im_discuss=this.galleryData.collectionThumbSubMenuComents,t.im_download=this.galleryData.collectionThumbSubMenuDownload,t.im_share=this.galleryData.collectionThumbSubMenuShare,t.im_backgroundColor=this.galleryData.collectionThumbSubMenuBgColor,t.im_backgroundColorOver=this.galleryData.collectionThumbSubMenuBgColorHover,t.im_iconColor=this.galleryData.collectionThumbSubMenuIconColor,t.im_iconColorOver=this.galleryData.collectionThumbSubMenuIconColorHover,this.itemMenu=new M(this.galleryData,M.MENU_TYPE.THUMB,t),this.galleryData.appEventManager.addGMEventListener(M.EVENTS.ITEM_MENU_ACTION,this,"itemMenuActionHandler")}},{key:"itemMenuActionHandler",value:function(t){if(t.target===this.itemMenu){var e,i,a=t.params.item,n={};switch(t.params.type){case"share":n.item=a,n.type="share",this.createModal(n);break;case"download":e=a.url,(i=document.createElement("A")).href=e,i.download=e.substring(e.lastIndexOf("/")+1),document.body.appendChild(i),i.click(),document.body.removeChild(i);break;case"fullscreen":this.fullscreenSwitch()}}}},{key:"deleteItemMenu",value:function(){this.itemMenu&&(this.itemMenu.view.parentElement&&this.itemMenu.view.parentElement.removeChild(this.itemMenu.view),this.galleryData.appEventManager.removeGMEventListener(M.EVENTS.ITEM_MENU_ACTION,this,"itemMenuActionHandler"),delete this.itemMenu)}},{key:"getItemIndexByID",value:function(t,e){if(t)for(var i=0;i<e.length;i+=1){var a=e[i];if(parseInt(t)===parseInt(a.ID))return i}}},{key:"tryOpenLightboxForID",value:function(t){var e=this.getItemIndexByID(t,this.filteredCollection);void 0!==e?this.createLightbox({index:e}):this.createLightbox({index:0})}},{key:"refreshDataInItems",value:function(){for(var t=this.filteredCollection,e=0;e<t.length;e+=1)t[e].view.updateSomeData()}},{key:"deleteAllEmbedInItems",value:function(t){for(var e=this.filteredCollection,i=0;i<e.length;i+=1)e[i].view.deleteEmbedContent()}},{key:"stopAllMediaContentInCollection",value:function(){for(var t=this.filteredCollection,e=0;e<t.length;e+=1){var i=t[e].view;i.deleteEmbedContent&&i.deleteEmbedContent(),i.stopAllInterectivContentInside&&i.stopAllInterectivContentInside()}}},{key:"activate",value:function(){this.updateLayout(),this.scrollHandler=this.scrollHandlerFunction(),this.scrollHandler&&window.addEventListener("scroll",this.scrollHandler,!1)}},{key:"deactivate",value:function(){window.removeEventListener("scroll",this.scrollHandler,!1),this.scrollHandler=void 0,this.removePresentedItems()}},{key:"removeViewContent",value:function(){this.itemsList=[],this.presentedList=[],this.cureantPage=void 0}},{key:"removeItemsViewFormStage",value:function(){this.removePresentedItems(),this.presentedList=[],this.cureantPage=void 0}},{key:"removePresentedItems",value:function(){for(var t=0;t<this.presentedList.length;t+=1)this.presentedList[t].display="none"}},{key:"updateSisePresentedItems",value:function(){for(var t=0;t<this.presentedList.length;t+=1)this.presentedList[t].updateImgSize()}},{key:"showPresentedItems",value:function(){for(var t=0;t<this.presentedList.length;t+=1)this.presentedList[t].display="block"}},{key:"initScrollHandler",value:function(){this.scrollHandler||(this.scrollHandler=this.scrollHandlerFunction(),this.scrollHandler&&window.addEventListener("scroll",this.scrollHandler,!1))}},{key:"createLayout",value:function(){this.needScrollHandler&&!this.galleryData.pageMode&&this.initScrollHandler(),this.galleryData.pageMode?this.PAGINATION_AMOUNT=this.galleryData.itemsPerPage:this.PAGINATION_AMOUNT=20,this.page_Amount=Math.min(this.PAGINATION_AMOUNT,this.filteredCollection.length),this.editMode&&(this.filteredCollection.length>20&&!this.galleryData.pageMode?this.addNotification("For greater comfort, in editing mode, the gallery displays only the first 20 images. All images will be available on the page in viewing mode (dynamic loading)."):this.notificationBlock&&this.notificationBlock.parentElement&&(this.notificationBlock.parentElement.removeChild(this.notificationBlock),delete this.notificationBlock))}},{key:"checkLoadMore",value:function(){var t=this;if(this.footer||(this.footer=document.createElement("div"),this.footer.className="".concat(this.classPref,"footer"),this.loadMoreButton=document.createElement("div"),this.loadMoreButton.className="".concat(this.classPref,"load-more"),this.loadMoreButton.innerHTML=this.galleryData.loadMoreDefName,this.footer.appendChild(this.loadMoreButton),this.loadMoreButton.addEventListener("click",(function(){t.addNextPage()}))),this.filteredCollection.length){var e=Math.ceil(this.filteredCollection.length/this.page_Amount);if(this.galleryData.numItemsDisplayed>0){var i=Math.min(this.filteredCollection.length,this.galleryData.numItemsDisplayed);e=Math.ceil(i/this.page_Amount)}this.galleryData.pageMode&&this.cureantPage<e?this.view.appendChild(this.footer):this.footer.parentNode&&this.footer.parentNode.removeChild(this.footer)}}},{key:"scrollHandlerFunction",value:function(){var t=this;return function(){t.offsetYcontroll()}}},{key:"offsetYcontroll",value:function(){this.checkIfNeedNewPage()}},{key:"addNextPage",value:function(){this.needScrollHandler&&this.galleryData.loadMoreAuto&&(this.galleryData.pageMode=!1,this.footer&&this.footer.parentNode&&this.footer.parentNode.removeChild(this.footer),this.initScrollHandler()),this.addPageToStage()}},{key:"itemPageByIndex",value:function(t){return Math.floor(t/this.page_Amount)+1}},{key:"addPageToStage",value:function(){this.addPageToStageByPageNum()}},{key:"addPageToStageByPageNum",value:function(t){var e=this;if(0!==this.itemsList.length&&!(void 0!==this.lastAddedPageNum&&t<=this.lastAddedPageNum)){var i=this.filteredCollection,a=Math.ceil(i.length/this.page_Amount);if(void 0===this.cureantPage&&(this.cureantPage=0),void 0===t){if(this.cureantPage>=a)return}else if(t>a)return;var n=this.cureantPage*this.page_Amount,s=Math.min(void 0===t?n+this.page_Amount:t*this.page_Amount,i.length);this.galleryData.numItemsDisplayed>0&&(s=Math.min(s,this.galleryData.numItemsDisplayed)),clearTimeout(this.layoutSizerDelay);for(var o=1,r=n;r<s;r+=1){var l=i[r].view;l.index=r,l.opacity={opacity:0,delay:0},this.addItemToStage(l),l.opacity={opacity:1,delay:100*o},o+=1}this.cureantPage=void 0===t?this.cureantPage+1:t,this.lastAddedPageNum=this.cureantPage,this.resizeHandler(),this.editMode||this.galleryData.pageMode?this.checkLoadMore():this.layoutSizerDelay=setTimeout((function(){e.checkIfNeedNewPage&&e.checkIfNeedNewPage()}),1e3)}}},{key:"checkIfNeedNewPage",value:function(){this.bottomSpace<400&&this.addPageToStage()}},{key:"bottomSpace",get:function(){var t=this.view.getBoundingClientRect(),e=window.innerHeight;return t.bottom-e}},{key:"filtred",value:function(t){if(this.galleryData.tagsFilter||(t=this.galleryData.startByTag),this.stopAllMediaContentInCollection(),this.removeItemsViewFormStage(),this.filtredById=t,this.createLayout(),this.deepLinkingForTag){if(void 0===this.hashForTagName(t))return void window.history.replaceState(null,null,window.location.pathname+window.location.search);var e="#".concat(this.appName,"-").concat(this.hashForTagName(t));if(window.location.hash===e)return;window.history.replaceState(null,null,e)}}},{key:"filtredById",get:function(){return this.filterPr},set:function(t){if(this.itemsList)if(this.filteredList=[],this.filterPr=t,"pgc_0"!==t)for(var e=0;e<this.itemsList.length;e+=1)this.itemsList[e].hasTag(t)&&this.filteredList.push(this.itemsList[e]);else this.filteredList=this.itemsList}},{key:"filteredCollection",get:function(){return this.filteredList.length>0?this.filteredList:this.itemsList}},{key:"updateItemLink",value:function(t){window.history.replaceState(null,null,this.itemHash(t))}},{key:"createLightbox",value:function(t){return t}},{key:"openPostLink",value:function(t){var e=this.filteredCollection,i=t.index;if(e[i])if(e[i].linkOriginal){var a=e[i].linkOriginal,n=e[i].linkTarget?e[i].linkTarget:"_self";window.open(a,n)}else e[i].postlink&&window.open(e[i].postlink,"_self");return t}},{key:"removeLightbox",value:function(t){return t}},{key:"checkGalleryYpositionForViewedItem",value:function(){if(this.viewedItem){var t=this.viewedItem,e=(window.innerHeight-t.view.view.clientHeight)/2,i=window.innerHeight-t.view.view.getBoundingClientRect().bottom<-t.view.view.clientHeight||t.view.view.getBoundingClientRect().bottom<0&&t.view.view.getBoundingClientRect().top<0?t.view.view.getBoundingClientRect().top+window.pageYOffset-e:void 0;i&&Qt.scrollWindowToY(i)}}},{key:"itemActionHandler",value:function(t){if(t&&t.params&&t.params.type&&t.target===this.lightbox)switch(t.params.type){case"view":if(t.params.item){if(this.viewedItem=t.params.item,this.deepLinking&&this.updateItemLink(this.viewedItem),!this.galleryData.galleryScrollPositionControll)return;void 0!==t.params.itemIndex&&this.addPageToStageByPageNum(this.itemPageByIndex(t.params.itemIndex))}break;case"YTstatus":void 0!==t.params.status&&1===t.params.status&&Qt.pausedAllVideoPlayers(t.params.itemID)}}},{key:"createModalEventHendler",value:function(t){this.createModal(t.params)}},{key:"createModal",value:function(t){if(t.type&&t.item){var e=t.item,i=jt.CONFIG;i.ish_backgroundColor=this.galleryData.modaBgColor,i.ish_iconColor=this.galleryData.modalIconColor,i.ish_iconColorHover=this.galleryData.modalIconColorHover,i.ish_facebook=this.galleryData.shareFacebook,i.ish_twitter=this.galleryData.shareTwitter,i.ish_pinterest=this.galleryData.sharePinterest,i.ish_download=this.galleryData.sliderItemDownload,i.ish_copy=this.galleryData.shareCopyLink,i.ish_linkToPost=this.galleryData.sharePost;var a=document.getElementsByTagName("body")[0];i.ish_parentDiv=this.lightbox?this.lightbox.view:a,this.galleryData.appEventManager.addGMEventListener(jt.EVENTS.REMOVE_SHARE_WINDOW,this,"deleteModal"),this.modal=new jt(this.galleryData.appEventManager,i),this.modal.initByItem(e),this.modal.view&&this.modal.view.dataset&&(this.modal.view.dataset.galleryId=this.appName)}}},{key:"deleteModal",value:function(){this.modal&&delete this.modal,this.galleryData.appEventManager.removeGMEventListener(jt.EVENTS.REMOVE_SHARE_WINDOW,this,"deleteModal")}},{key:"fullscreenSwitch",value:function(){var t=this.lightbox.view;t&&(Qt.toggleFullScreen(t),this.windowResizeHandler())}},{key:"pageLeave",value:function(){}},{key:"pageEnter",value:function(){}},{key:"focusPageHandler",value:function(t){if(!this.isAdmin)switch(t.type){case"blur":this.pageLeave();break;case"focus":this.pageEnter()}}},{key:"windowResizeHandler",value:function(){var t=this;clearTimeout(this.resizeTimeOut),Qt.isTouchDevice?this.resizeTimeOut=setTimeout((function(){t.windowResize()}),200):this.windowResize()}},{key:"windowResize",value:function(){this.resizeHandler(),this.lightbox&&this.lightbox.resizeHandler()}},{key:"resizeHandler",value:function(){this.viewWidth!==this.view.clientWidth&&(this.updateLayout(),this.viewWidth=this.view.clientWidth)}},{key:"remove",value:function(){this.resizeObserver.disconnect(),this.removeViewContent(),this.deleteItemMenu(),this.galleryData.appEventManager.removeGMEventListener(Nt.EVENTS.TAG_ACTION,this,"tagsActionHandler"),this.tagsList={},this.tagsListContoller=void 0,document.removeEventListener("keydown",this.handlerKB,!0),window.removeEventListener("resize",this.resizeWindow),window.removeEventListener("resize",this.resizeWindow),window.removeEventListener("blur",this.focusPage),window.removeEventListener("focus",this.focusPage),this.view.parentNode&&this.view.parentNode.removeChild(this.view)}}],e&&ae(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());function ue(t){return ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ue(t)}function ge(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,me(a.key),a)}}function me(t){var e=function(t){if("object"!=ue(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=ue(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ue(e)?e:e+""}var ve=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var i=window.PGC_SGB;if(i){var a=e.split("-").pop();window.PGC_SGB.galleries||(window.PGC_SGB.galleries={}),this.galleries=window.PGC_SGB.galleries;var n=t.galleriesVP(e);if(i.vports&&i.vports[a])for(var s in i.vports[a])if(Object.prototype.hasOwnProperty.call(i.vports[a],s)){var o=i.vports[a][s];n.push(o)}if(n.length>0)for(var r=0;r<n.length;r+=1){var l=n[r];if(l.id)this.createGalleryByVpRef(l);else{if(l.getElementsByClassName("sgb-preloader").length){var h=l.getElementsByClassName("sgb-preloader")[0];l.removeChild(h)}if(l.getElementsByClassName("simply-gallery-amp").length){var c=l.getElementsByClassName("simply-gallery-amp")[0];l.removeChild(c)}this.createGalleryByVp(l)}}console.log("%c SGB ".concat(a.toUpperCase()," v.3.2.7"),"background: #222; color: #eaabff")}else Qt.trace("Plugin scripts are not ready")}return e=t,a=[{key:"galleriesVP",value:function(t){for(var e=[],i=document.getElementsByClassName(t),a=0;a<i.length;a+=1){var n=i[a];e.push(n)}return e}},{key:"getAppNameFromVp",value:function(t){var e,i=t.getElementsByClassName("sgb-data")[0];if(i?e=i.textContent:t.dataset.gallery?e=this.viewPort.dataset.gallery:Qt.trace("Error: Gallery data is missing"),e&&""!==e)try{var a=JSON.parse(e);if(a.galleryId)return a.galleryId}catch(t){Qt.trace(t)}}}],(i=[{key:"collectionConstructor",value:function(t,e){Qt.trace(" ********* Need an implementation - CollectionConstructor *********** ",t),Qt.trace(e)}},{key:"createGalleryByVpRef",value:function(t,e){if(!t)return!1;var i=t.id;if(this.galleries[i])return!0;var a=this.collectionConstructor(i,t);return a.isSelected(e),this.galleries[i]=a,!0}},{key:"updateGalleryById",value:function(t,e,i){e&&void 0!==i&&(e.gutIsSelected=i);var a=this.galleries[t];a&&a.update(e)}},{key:"removeGalleryById",value:function(t){this.galleries[t]&&(this.galleries[t].remove(),delete this.galleries[t])}},{key:"removeDuplicateByAppname",value:function(t){for(var e in this.galleries)if(Object.hasOwn(this.galleries,e)){var i=this.galleries[e];t===i.appName&&(i.remove(),delete this.galleries[e])}}},{key:"createGalleryByVpSavedGalley",value:function(e){var i=t.getAppNameFromVp(e);this.removeDuplicateByAppname(i);var a=this.collectionConstructor(i,e);this.galleries[i]=a}},{key:"createGalleryByVp",value:function(t){if(t.getElementsByClassName("sgb-preloader").length){var e=t.getElementsByClassName("sgb-preloader")[0];t.removeChild(e)}if(t.getElementsByClassName("simply-gallery-amp").length){var i=t.getElementsByClassName("simply-gallery-amp")[0];t.removeChild(i)}var a=(new Date).getTime(),n=this.collectionConstructor(a,t);this.galleries[a]=n}}])&&ge(e.prototype,i),a&&ge(e,a),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,i,a}();const pe=ve;function ye(t){return ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ye(t)}function fe(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,be(a.key),a)}}function be(t){var e=function(t){if("object"!=ye(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=ye(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ye(e)?e:e+""}Qt.trace;const we=function(){return t=function t(e,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.delegate=e,this.classPref=e.classPref,this.galleryData=this.delegate.galleryData,this.appName=e.appName,this.index=i,this.inited=!1,this.scrollerViewWrapper=e.scrollerViewWrapper?e.scrollerViewWrapper:document,this.view=document.createElement("div"),this.view.className="".concat(this.classPref,"item"),this.wrap_main=document.createElement("div"),this.wrap_main.className="".concat(this.classPref,"main-wrap"),this.view.appendChild(this.wrap_main),this.wrap_item=document.createElement("div"),this.wrap_item.className="".concat(this.classPref,"item-wrap"),this.wrap_main.appendChild(this.wrap_item),this.captions=!0,this.captionSrc="caption",this.useLightbox=void 0,this.linkTextVal="",this.opacityDelay=void 0,this.displayPr=void 0,this.opacityPr=0,this.imgCompleted=!1,this.itemViewSrcCompleted=!1,this.imageInteractiv=!1,this.completedHandlerCallback=void 0},(e=[{key:"init",value:function(){var t=this.delegate.itemsList[this.index];this.item=t,this.thumbSize=t.itemViewThumbSize,this.type=t.type,this.itemViewSrc=t.itemViewSrc,this.view.dataset.id=t.id,this.view.classList.add("pgc-".concat(t.type)),this.wrap_main.classList.add("pgc-".concat(t.type)),t.ratio>1&&this.view.classList.add("pgc-portrait")}},{key:"initSRC",value:function(){var t=this;if(!this.inited){var e=this.item,i=this;if(this.img=new Image,"video"!==e.type||"video"===e.type&&e.mime_type)"audio"===e.type&&(this.poster=document.createElement("div"),this.poster.className="pgc-item-poster",this.wrap_item.appendChild(this.poster)),this.img=new Image,this.img.onload=function(){(e.title||e.alt)&&this.setAttribute("alt",e.alt?e.alt:e.title),i.view.style.opacity=i.opacityPr,i.imgCompleted=!0,i.itemCompleted(),i.updateImgSize()},this.img.onerror=function(){i.view.classList.add("pgc-error"),e.errorStatus=!0;var t=document.createElement("div");t.className="pgc-alert-icon",t.innerHTML=Qt.ICONS.ATTENTION_SVG,i.view.appendChild(t),i.view.style.opacity=i.opacityPr,i.imgCompleted=!0,this.itemCompleted()},"audio"===e.type?this.poster.appendChild(this.img):this.wrap_item.appendChild(this.img),this.img.style.width="".concat(e.itemViewThumbSize.width,"px"),this.img.style.height="".concat(e.itemViewThumbSize.height,"px"),this.galleryData.lazyLoading&&!1===this.delegate.isAdmin?this.img.setAttribute("loading","lazy"):this.img.removeAttribute("loading"),e.itemViewThumbSrc&&(this.img.src=e.itemViewThumbSrc);else{if(this.view.style.opacity=this.opacityPr,this.imgCompleted=!1,this.videoContent=Qt.mediaEl("video"),this.videoContent.className="thumb-video-content",this.videoContent.setAttribute("loop",""),this.wrap_item.insertBefore(this.videoContent,this.wrap_item.children[0]),e.mime&&this.videoContent.setAttribute("type",e.mime),this.videoContent.src="".concat(e.url+(void 0===e.poster&&void 0===e.featuredImage&&!1===this.galleryData.useLightbox&&Qt.Device.browser.safari&&Qt.isTouchDevice?"#t=0.001":"")),e.poster){var a=e.poster.medium?e.poster.medium.url:e.poster.full.url;this.videoContent.setAttribute("poster",a),this.videoContent.setAttribute("preload","none"),this.img.src=a,this.img.onload=function(){t.itemCompleted(),t.img=void 0}}else e.featuredImage?(this.videoContent.setAttribute("poster",e.featuredImage.src),this.videoContent.setAttribute("preload","none"),this.img.src=e.featuredImage.src,this.img.onload=function(){t.itemCompleted(),t.img=void 0}):(this.videoContent.setAttribute("preload",Qt.preloadedAttributForVideo),this.videoContent.onloadedmetadata=function(){t.itemCompleted()});this.ratio&&(this.ratio<=1&&this.item.ratio<=1&&this.ratio>this.item.ratio?(this.videoContent.classList.add("pgc-lsp"),this.videoContent.classList.remove("pgc-prt")):(this.videoContent.classList.add("pgc-prt"),this.videoContent.classList.remove("pgc-lsp")))}this.inited=!0,this.initViewContent(),this.initBadge(),this.initSubContent(e),this.initItemViewHandlers(),this.updateProps(),this.updateLink()}}},{key:"itemCompleted",value:function(){this.view.style.minHeight=null,this.completedHandlerCallback&&this.completedHandlerCallback(this)}},{key:"initViewContent",value:function(){this.inited&&(this.hover=document.createElement("div"),this.hover.className="".concat(this.classPref,"item-hover"),this.wrap_item.appendChild(this.hover),this.inner=document.createElement("div"),this.inner.className="".concat(this.classPref,"item-inner"),this.wrap_item.appendChild(this.inner))}},{key:"initBadge",value:function(){if(this.inited){var t,e=this.item;switch(this.badge&&this.badge.parentNode&&this.badge.parentNode.removeChild(this.badge),e.type){case"video":(t=document.createElement("div")).className="".concat(this.classPref,"item-badge"),t.innerHTML=Qt.ICONS.VIDEO_TYPE,this.inner.appendChild(t);break;case"audio":(t=document.createElement("div")).className="".concat(this.classPref,"item-badge"),t.innerHTML=Qt.ICONS.NOTE_SVG,this.inner.appendChild(t)}t&&(this.badge=t)}}},{key:"initSubContent",value:function(t){this.inited&&(this.menuHolder=document.createElement("div"),this.menuHolder.className="".concat(this.classPref,"item-menu-holder"),this.inner.appendChild(this.menuHolder),this.titleHolder=document.createElement("div"),this.titleHolder.className="".concat(this.classPref,"title-wrap"),this.inner.appendChild(this.titleHolder),this.infoWrap=document.createElement("div"),this.infoWrap.className="".concat(this.classPref,"info-wrap"),this.titleHolder.appendChild(this.infoWrap),this.title=document.createElement("div"),this.title.className="".concat(this.classPref,"item-title"),this.captionSrc=this.galleryData.captionSrc,this.title.innerHTML="".concat(t[this.captionSrc]?t[this.captionSrc]:""),Qt.Device.browser.safari&&(this.title.style.willChange="opacity"),this.infoWrap.appendChild(this.title),this.linkButton=document.createElement("a"),this.linkButton.className="".concat(this.classPref,"item-button"),t.meta&&t.meta.subType&&"product"===t.meta.subType&&(t.meta.price&&(this.price=document.createElement("div"),this.price.className="".concat(this.classPref,"item-thumb-price"),this.price.innerHTML=t.meta.price,this.inner.appendChild(this.price)),void 0!==t.meta.on_sale&&t.meta.on_sale&&this.inner.classList.add("sgb-product-onsale")))}},{key:"initItemViewHandlers",value:function(){var t=this,e=this.item;function i(i){switch(i.type){case"mouseenter":(t.galleryData.useLightbox||"none"!==t.galleryData.thumbClickAction||"audio"===t.item.type||"video"===t.item.type)&&this.classList.add("hover"),t.delegate.itemMenu&&t.menuHolder&&(this.classList.add("hover-menu"),t.delegate.itemMenu.updateForItem(e),t.menuHolder.appendChild(t.delegate.itemMenu.view));break;case"mouseleave":this.classList.remove("hover"),this.classList.remove("hover-menu")}}this.view.addEventListener("mouseenter",i,!1),this.view.addEventListener("mouseleave",i,!1)}},{key:"clickHandler",value:function(){var t=this;return this.itemClickHandler=function(e){e.target.classList.contains("".concat(t.classPref,"item-inner"))&&(t.view.classList.remove("hover"),t.view.classList.remove("hover-menu"),"useLightbox"===t.galleryData.thumbClickAction&&t.delegate.createLightbox({index:t.index}),"postLink"===t.galleryData.thumbClickAction&&t.delegate.openPostLink({index:t.index}))},this.itemClickHandler}},{key:"checkPositionHandler",value:function(){var t=this;return t.checkPosition||(t.checkPosition=function(e){if(t.videoContent){if(t.delegate.mediaPlayHandler&&"play"===e.type&&t.delegate.mediaPlayHandler(!0),"pause"===e.type||"ended"===e.type)return t.scrollerViewWrapper.removeEventListener("scroll",t.checkPosition),t.videoContent.removeEventListener("pause",t.checkPosition),t.videoContent.removeEventListener("ended",t.checkPosition),void(t.delegate.mediaPlayHandler&&t.delegate.mediaPlayHandler(!1));Qt.scrollYpositionForDiv(t.wrap_item)&&(t.videoContent.pause(),t.wrap_main.classList.remove("pgc-interectiv"),t.delegate.mediaPlayHandler&&t.delegate.mediaPlayHandler(!1))}t.embedContent&&Qt.scrollYpositionForDiv(t.wrap_item)&&(t.delegate.mediaPlayHandler&&t.delegate.mediaPlayHandler(!1),t.deleteEmbedContent())}),t.checkPosition}},{key:"deleteEmbedContent",value:function(){this.embedContent&&(this.scrollerViewWrapper.removeEventListener("scroll",this.checkPositionHandler()),this.delegate.mediaPlayHandler&&this.delegate.mediaPlayHandler(!1),this.wrap_main.classList.remove("pgc-interectiv"),this.embedContent.parentNode&&this.embedContent.parentNode.removeChild(this.embedContent),delete this.embedContent)}},{key:"stopAllInterectivContentInside",value:function(){var t=this;if(t.wrap_main.classList.contains("pgc-interectiv")){var e=t.galleryData.audioPlayer;e.src&&e.src===t.item.original&&(e.pause(),t.wrap_main.classList.remove("pgc-interectiv"),t.badge&&t.badge.classList.remove("pgc-sgb-svg-rotate"),t.delegate.mediaPlayHandler&&t.delegate.mediaPlayHandler(!1)),t.videoContent&&(t.wrap_main.classList.remove("pgc-interectiv"),t.videoContent.pause()),t.deleteEmbedContent(),t.imageInteractiv&&"image"===t.item.type&&t.wrap_main.classList.remove("pgc-interectiv")}}},{key:"clicMediaHandler",value:function(){var t=this;return this.itemMediaClickHandler=function(e){if(!t.imageInteractiv&&"image"===t.item.type&&t.externalLink&&t.item.link&&""!==t.item.link&&window.open(t.item.link,t.item.linkTarget?t.item.linkTarget:"_blank"),t.wrap_main.classList.contains("pgc-interectiv"))t.stopAllInterectivContentInside();else if(!1!==e.target.classList.contains("".concat(t.classPref,"item-inner"))||!1!==e.target.classList.contains("".concat(t.classPref,"item-wrap"))||!1!==e.target.classList.contains("".concat(t.classPref,"play"))){var i=t.galleryData.audioPlayer;if(i.src&&i.src!==t.item.original){i.pause();for(var a=document.getElementsByClassName("pgc-audio"),n=0;n<a.length;n+=1){var s=a[n];s.classList.contains("pgc-interectiv")&&s.classList.remove("pgc-interectiv")}var o=document.getElementsByClassName("pgc-sgb-svg-rotate");if(o.length)for(var r=0;r<o.length;r+=1)o[r].classList.remove("pgc-sgb-svg-rotate")}var l=document.getElementsByClassName("thumb-video-content");if(l.length)for(var h=0;h<l.length;h+=1)if(l[h]!==t.videoContent){var c=Qt.searchParentByClassName(l[h],"pgc-interectiv");c&&c.classList.remove("pgc-interectiv"),l[h].pause()}Qt.deleteAllEmbetContent();var d=document.getElementsByClassName("pgc-interectiv");if(d.length)for(var u=0;u<d.length;u+=1)d[u].classList.remove("pgc-interectiv");if("audio"===t.item.type&&i&&(i.src===t.item.original?i.paused?(i.play(),t.delegate.mediaPlayHandler&&t.delegate.mediaPlayHandler(!0),t.badge&&t.badge.classList.add("pgc-sgb-svg-rotate"),t.wrap_main.classList.add("pgc-interectiv")):(i.pause(),t.delegate.mediaPlayHandler&&t.delegate.mediaPlayHandler(!1),t.wrap_main.classList.remove("pgc-interectiv"),t.badge&&t.badge.classList.remove("pgc-sgb-svg-rotate")):setTimeout((function(){i.src=t.item.original,i.play(),t.wrap_main.classList.add("pgc-interectiv"),t.badge&&t.badge.classList.add("pgc-sgb-svg-rotate"),t.delegate.mediaPlayHandler&&t.delegate.mediaPlayHandler(!0)}),100)),"video"===t.item.type&&t.videoContent)t.videoContent.paused?(t.videoContent.play(),t.wrap_main.classList.add("pgc-interectiv"),t.view.classList.remove("hover"),t.view.classList.remove("hover-menu"),t.scrollerViewWrapper.addEventListener("scroll",t.checkPositionHandler()),t.videoContent.addEventListener("pause",t.checkPositionHandler()),t.videoContent.addEventListener("ended",t.checkPositionHandler()),t.videoContent.addEventListener("play",t.checkPositionHandler())):(t.videoContent.pause(),t.view.classList.add("hover"),t.view.classList.add("hover-menu"),t.wrap_main.classList.remove("pgc-interectiv"));else if("video"===t.item.type&&t.item.mime_type){var g=t.item.mime_type.split("/")[1];if(!g)return;t.delegate.mediaPlayHandler&&t.delegate.mediaPlayHandler(!0),t.embedContent||(window.PGC_SGB.galleries[t.delegate.id],t.embedContent=Qt.embedVideoEl(g,t.item.videoId,t.item.videoHash),t.embedContent.className="thumb-embed-content",t.embedContent.dataset.id=t.delegate.id,t.wrap_item.appendChild(t.embedContent),t.wrap_main.classList.add("pgc-interectiv"),t.scrollerViewWrapper.addEventListener("scroll",t.checkPositionHandler()))}else t.imageInteractiv&&"image"===t.item.type&&t.wrap_main.classList.add("pgc-interectiv");t.itemMediaClickHandlerExtend&&t.itemMediaClickHandlerExtend()}},this.itemMediaClickHandler}},{key:"updateLink",value:function(){if(this.inited){var t,e=this.item;if(this.deleteEmbedContent(),this.videoContent&&(t=this.videoContent.src,this.videoContent.removeAttribute("src")),e.poster){var i=e.poster.medium?e.poster.medium.url:e.poster.full.url;this.videoContent&&(this.videoContent.setAttribute("poster",i),this.videoContent.setAttribute("preload","none")),this.img&&(this.img.src=i),this.itemViewSrcCompleted=!1,this.updateImgSize()}else this.itemViewSrcCompleted=!1,this.videoContent&&(this.videoContent.removeAttribute("poster"),this.videoContent.setAttribute("preload",Qt.preloadedAttributForVideo),e.featuredImage&&(this.videoContent.setAttribute("poster",e.featuredImage.src),this.videoContent.setAttribute("preload","none"))),this.img&&e.itemViewThumbSrc&&(this.img.src=e.itemViewThumbSrc),this.updateImgSize();this.videoContent&&t&&(this.videoContent.src=t),"video"===e.type&&e.mime_type?this.addEmbedVideoToItem(e.mime_type.split("/").pop(),e.videoId):(this.view.classList.remove("pgc-embed"),this.wrap_main.classList.remove("pgc-embed"),this.initBadge()),e.link&&""!==e.link?(this.titleHolder&&(this.titleHolder.style.pointerEvents=null),this.linkButton.href=e.link,this.linkButton.innerHTML=e.linkText,e.linkTarget&&(this.linkButton.target=e.linkTarget),this.externalLink&&(this.titleHolder?this.titleHolder.insertBefore(this.linkButton,this.titleHolder.firstChild):this.subMenuHolder&&this.subMenuHolder.insertBefore(this.linkButton,this.subMenuHolder.firstChild),this.descriptionWrap&&this.infoWrap.classList.add("pgc-button"))):this.removeLInkButton()}}},{key:"addEmbedVideoHandler",value:function(){this.inner.removeEventListener("click",this.itemMediaClickHandler),this.inner.addEventListener("click",this.clicMediaHandler())}},{key:"addEmbedVideoToItem",value:function(t){this.view.classList.add("pgc-embed"),this.wrap_main.classList.add("pgc-embed"),this.badge&&this.badge.parentNode&&this.badge.parentNode.removeChild(this.badge),this.badge=document.createElement("div"),this.badge.className="".concat(this.classPref,"item-badge"),"vimeo"===t?(this.badge.innerHTML=Qt.ICONS.VIMEO_SVG,this.badge.firstChild.style.fill="#00adef"):"youtube"===t&&(this.badge.innerHTML=Qt.ICONS.YOU_TUBE_SVG,this.badge.firstChild.style.fill="#e02f2f"),this.inner.appendChild(this.badge),this.galleryData.useLightbox||"none"!==this.galleryData.thumbClickAction&&""!==this.galleryData.thumbClickAction||this.addEmbedVideoHandler(),this.removeLInkButton()}},{key:"removeLInkButton",value:function(){this.titleHolder&&(this.titleHolder.style.pointerEvents="none"),this.linkButton.parentNode&&this.linkButton.parentNode.removeChild(this.linkButton),this.descriptionWrap&&this.infoWrap.classList.remove("pgc-button"),this.updatePropsSubContent()}},{key:"addItemClickHandler",value:function(){this.useLightbox!==this.galleryData.thumbClickAction&&(this.inner.classList.remove("action-lightbox"),this.inner.classList.remove("action-postlink"),this.inner.removeEventListener("click",this.itemClickHandler),"useLightbox"===this.galleryData.thumbClickAction||"postLink"===this.galleryData.thumbClickAction?(this.deleteEmbedContent(),"useLightbox"===this.galleryData.thumbClickAction?this.inner.classList.add("action-lightbox"):"postLink"===this.galleryData.thumbClickAction&&this.inner.classList.add("action-postlink"),this.inner.addEventListener("click",this.clickHandler()),this.inner.setAttribute("tabindex",0),this.inner.dataset.pgcAction="click",this.inner.dataset.pgcGallery=this.appName,this.inner.removeEventListener("click",this.itemMediaClickHandler)):(this.inner.addEventListener("click",this.clicMediaHandler()),"video"!==this.type&&"audio"!==this.type||(this.inner.setAttribute("tabindex",0),this.inner.dataset.pgcAction="media",this.inner.dataset.pgcGallery=this.appName)),this.useLightbox=this.galleryData.thumbClickAction)}},{key:"updateProps",value:function(){this.inited&&(this.linkTextVal!==this.galleryData.externalLinkDefName&&(""===this.item.orignLinkText&&(this.item.linkText=this.galleryData.externalLinkDefName,this.linkButton.innerHTML=this.galleryData.externalLinkDefName),this.linkTextVal=this.galleryData.externalLinkDefName),this.addItemClickHandler(),this.updatePropsSubContent(),this.img&&(this.galleryData.lazyLoading&&!1===this.delegate.isAdmin?this.img.setAttribute("loading","lazy"):this.img.removeAttribute("loading")))}},{key:"updatePropsSubContent",value:function(){"bottom"===this.galleryData.captionHAlign?(this.menuHolder&&this.menuHolder.classList.add("pgc-bottom-align"),this.inner.classList.add("pgc-bottom-align")):(this.menuHolder&&this.menuHolder.classList.remove("pgc-bottom-align"),this.inner.classList.remove("pgc-bottom-align")),this.galleryData.externalLink!==this.externalLink&&(this.externalLink=this.galleryData.externalLink,this.externalLink&&this.item.link?(this.titleHolder.style.pointerEvents=null,this.titleHolder.insertBefore(this.linkButton,this.titleHolder.firstChild)):(this.titleHolder.style.pointerEvents="none",this.linkButton.parentNode&&this.linkButton.parentNode.removeChild(this.linkButton))),this.galleryData.captions!==this.captions&&(this.captions=this.galleryData.captions,this.captions?this.infoWrap.appendChild(this.title):this.title.parentNode&&this.title.parentNode.removeChild(this.title)),this.galleryData.captionSrc!==this.captionSrc&&this.captions&&(this.captionSrc=this.galleryData.captionSrc,this.title.innerHTML="".concat(this.item[this.galleryData.captionSrc]?this.item[this.galleryData.captionSrc]:""))}},{key:"updateImgSize",value:function(){if(this.rect)if("video"!==this.type&&"audio"!==this.type||!this.item.poster||this.itemViewSrcCompleted)this.imgCompleted&&("audio"!==this.type||"audio"===this.type&&this.item.poster)&&!this.itemViewSrcCompleted&&(this.rect.width.toFixed(2)/this.img.naturalWidth>1.1||this.rect.height.toFixed(2)/this.img.naturalHeight>1.1)&&this.itemViewSrc&&(this.img.src=this.itemViewSrc,this.img.style.width="".concat(this.item.itemViewSize.width,"px"),this.img.style.height="".concat(this.item.itemViewSize.height,"px"),this.itemViewSrcCompleted=!0);else{var t=this.item.poster.medium?this.item.poster.medium:this.item.poster.full,e=this.item.poster.large?this.item.poster.large:this.item.poster.full;(this.rect.width.toFixed(2)/t.width>1.1||this.rect.height.toFixed(2)/t.height>1.1)&&(this.videoContent&&this.videoContent.setAttribute("poster",e.url),this.img&&(this.img.src=e.url),this.itemViewSrcCompleted=!0)}}},{key:"display",get:function(){return this.displayPr},set:function(t){this.displayPr!==t&&("block"===t&&(this.wrap_main.dataset.index=this.index,this.inner&&(this.inner.dataset.index=this.index)),"none"===t&&clearTimeout(this.opacityDelay),this.view.style.display=t,this.displayPr=t)}},{key:"opacity",set:function(t){if(t.opacity!==this.opacityPr){var e=this;t.delay?this.opacityDelay=setTimeout((function(){(e.imgCompleted||"video"===e.item.type)&&(e.view.style.opacity=t.opacity),e.opacityPr=t.opacity}),t.delay):(clearTimeout(this.opacityDelay),(e.imgCompleted||"video"===e.item.type)&&(e.view.style.opacity=t.opacity),e.opacityPr=t.opacity)}}}])&&fe(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();var Ce,Se,ke,Le,Ee,Te=i(2775),_e=i.n(Te),Ie={};function Pe(t){return Pe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pe(t)}function Me(t,e,i,a){var n=De(ze(1&a?t.prototype:t),e,i);return 2&a&&"function"==typeof n?function(t){return n.apply(i,t)}:n}function De(){return De="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,i){var a=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ze(t)););return t}(t,e);if(a){var n=Object.getOwnPropertyDescriptor(a,e);return n.get?n.get.call(arguments.length<3?t:i):n.value}},De.apply(null,arguments)}function xe(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ne(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,Oe(a.key),a)}}function Be(t,e,i){return e&&Ne(t.prototype,e),i&&Ne(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function Oe(t){var e=function(t){if("object"!=Pe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=Pe(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pe(e)?e:e+""}function He(t,e,i){return e=ze(e),function(t,e){if(e&&("object"==Pe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ae()?Reflect.construct(e,i||[],ze(t).constructor):e.apply(t,i))}function Ae(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ae=function(){return!!t})()}function ze(t){return ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ze(t)}function Ve(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fe(t,e)}function Fe(t,e){return Fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Fe(t,e)}Ie.styleTagTransform=u(),Ie.setAttributes=l(),Ie.insert=o().bind(null,"head"),Ie.domAPI=n(),Ie.insertStyleElement=c(),e()(_e(),Ie),_e()&&_e().locals&&_e().locals,window.pgc_sgb_justified=(Ce="justified",Se="wp-block-".concat("pgcsimplygalleryblock","-").concat(Ce),ke="".concat("pgcsimplygalleryblock","-").concat(Ce,"-"),Qt.trace,Le=function(t){function e(t,i){var a;return xe(this,e),(a=He(this,e,[t,i])).widthForCollectionPr=0,a.heightForCollectionPr=0,a.rect=Qt.Rect(0,0,0,0),a}return Ve(e,t),Be(e,[{key:"ratio",get:function(){return this.item.ratio}},{key:"thumbWidthByHeight",value:function(t){return this.rect.width=(t-this.delegate.thumbSpacing)/this.ratio+this.delegate.thumbSpacing,this.rect.height=t,this.rect.width}},{key:"thumbHeightByWidth",value:function(t){return this.rect.height=(t-this.delegate.thumbSpacing)*this.ratio+this.delegate.thumbSpacing,this.rect.width=t,this.rect.height}},{key:"widthForCollection",get:function(){return this.rect.width},set:function(t){this.rect.width=t}},{key:"heightForCollection",set:function(t){this.rect.height=t}},{key:"width",get:function(){return this.rect.width}},{key:"height",get:function(){return this.rect.height}},{key:"updateSize",value:function(){this.view.style.width="".concat(this.rect.width,"px"),this.view.style.height="".concat(this.rect.height,"px"),this.updateImgSize()}}])}(we),Ee=function(t){function e(t,i){var a;return xe(this,e),(a=He(this,e,[t,i])).TAGS_CLOUD=!0,a.contentNoPadding=void 0,a.init(),a}return Ve(e,t),Be(e,[{key:"classPref",get:function(){return ke}},{key:"itemViewConstructor",get:function(){var t=this;return function(e){return new Le(t,e)}}},{key:"updateExraProps",value:function(t){t.lastRowFill&&(this.galleryData.lastRowFill=t.lastRowFill,this.updateLayout()),t.collectionThumbRecomendedHeight&&(this.galleryData.collectionThumbRecomendedHeight=t.collectionThumbRecomendedHeight,this.updateLayout()),t.thumbSpacing&&(this.galleryData.thumbSpacing=t.thumbSpacing,this.updateLayout()),t.thumbMobileSpacing&&(this.galleryData.thumbMobileSpacing=t.thumbMobileSpacing,this.updateLayout()),void 0!==t.pageMode&&(this.galleryData.pageMode=t.pageMode,this.stopAllMediaContentInCollection(),this.removeItemsViewFormStage(),this.createLayout()),void 0!==t.itemsPerPage&&(this.galleryData.itemsPerPage=t.itemsPerPage,this.stopAllMediaContentInCollection(),this.removeItemsViewFormStage(),this.createLayout()),void 0!==t.loadMoreDefName&&(this.galleryData.loadMoreDefName=t.loadMoreDefName,this.loadMoreButton&&(this.loadMoreButton.innerHTML=this.galleryData.loadMoreDefName))}},{key:"updateStyleExraProps",value:function(){var t=this.thumbSpacing/2;this.galleryData.contentNoPadding?(this.content.style.margin="-".concat(t,"px"),this.content.style.padding=null):(this.content.style.margin=null,this.content.style.padding="".concat(t,"px")),this.contentNoPadding!==this.galleryData.contentNoPadding&&(this.contentNoPadding=this.galleryData.contentNoPadding,this.updateLayout())}},{key:"collectionthumbRoundedCorners",get:function(){var t=this.galleryData.collectionthumbRoundedCorners;return Qt.miniScreen&&this.galleryData.collectionThumbMiniScreenScale&&(t/=2),t}},{key:"contentWidth",get:function(){return this.galleryData.contentNoPadding?Math.floor(this.content.clientWidth-.1):Math.floor(this.content.clientWidth-.1-this.thumbSpacing)}},{key:"createGrid",value:function(){this.rowWidth=0,this.rowArray=[];var t=this.contentWidth,e=this.galleryData.collectionThumbRecomendedHeight;Qt.miniScreen&&this.galleryData.collectionThumbMiniScreenScale&&(e/=2);var i=this.filteredCollection,a=i.length;if(this.galleryData.numItemsDisplayed>0&&(a=Math.min(a,this.galleryData.numItemsDisplayed)),0!==a){for(var n=0;n<a;n+=1){var s=i[n].view;this.rowWidth+s.thumbWidthByHeight(e)<t?(this.rowWidth+=s.thumbWidthByHeight(e),this.rowArray.push(s)):(this.rowArray.length>0&&this.corectHeight(this.rowArray),this.rowArray=new Array(0),this.rowWidth=s.thumbWidthByHeight(e),this.rowArray.push(s))}this.rowArray.length>0&&(this.corectHeight(this.rowArray,!0),this.rowArray=[])}}},{key:"corectHeight",value:function(t,e){var i=999999,a=this.contentWidth/this.rowWidth;e&&!1===this.galleryData.lastRowFill&&(a=1);for(var n=0;n<t.length;n+=1){var s=t[n];s.thumbHeightByWidth(s.width*a),i=Math.min(i,s.height)}for(var o=0;o<t.length;o+=1)t[o].heightForCollection=i}},{key:"createLayout",value:function(){Me(e,"createLayout",this,3)([]),this.createGrid(),this.addPageToStage()}},{key:"updateLayout",value:function(){this.createGrid();for(var t=0;t<this.presentedList.length;t+=1)this.arangeItem(this.presentedList[t])}},{key:"addItemToStage",value:function(t){Me(e,"addItemToStage",this,3)([t]),t.updateSize(),t.display="block";var i=t.view;this.content.appendChild(i),this.presentedList.push(t)}},{key:"arangeItem",value:function(t){t.updateSize(),t.display="block"}},{key:"removeViewContent",value:function(){for(var t=this.content.childNodes.length-1;t>=0;t-=1)this.content.removeChild(this.content.childNodes[t]);Me(e,"removeViewContent",this,3)([])}}])}(de),new(function(t){function e(){return xe(this,e),He(this,e,arguments)}return Ve(e,t),Be(e,[{key:"collectionConstructor",value:function(t,e){return new Ee(t,e)}}])}(pe))(Se))})()})();