HEX
Server: Apache
System: Linux efa57bbe-abb1-400d-2985-3b056fbc2701.secureserver.net 6.1.147-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jul 24 12:33:32 EDT 2025 x86_64
User: root (0)
PHP: 8.0.30.4
Disabled: NONE
Upload Files
File: //var/www/wp-content/plugins/simply-gallery-block/blocks/skins/pgc_sgb_albumnavigator.js
(()=>{var e={6416:()=>{},7157:()=>{},5996:()=>{},5472:()=>{},9829:()=>{},7412:()=>{},6550:()=>{},7625:()=>{},7336:()=>{},6238:()=>{},2113:()=>{},1166:()=>{},5072:e=>{"use strict";var t=[];function i(e){for(var i=-1,n=0;n<t.length;n++)if(t[n].identifier===e){i=n;break}return i}function n(e,n){for(var o={},s=[],r=0;r<e.length;r++){var l=e[r],c=n.base?l[0]+n.base:l[0],h=o[c]||0,d="".concat(c," ").concat(h);o[c]=h+1;var u=i(d),m={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==u)t[u].references++,t[u].updater(m);else{var p=a(m,n);n.byIndex=r,t.splice(r,0,{identifier:d,updater:p,references:1})}s.push(d)}return s}function a(e,t){var i=t.domAPI(t);return i.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;i.update(e=t)}else i.remove()}}e.exports=function(e,a){var o=n(e=e||[],a=a||{});return function(e){e=e||[];for(var s=0;s<o.length;s++){var r=i(o[s]);t[r].references--}for(var l=n(e,a),c=0;c<o.length;c++){var h=i(o[c]);0===t[h].references&&(t[h].updater(),t.splice(h,1))}o=l}}},7659:e=>{"use strict";var t={};e.exports=function(e,i){var n=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(i)}},540:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056:(e,t,i)=>{"use strict";e.exports=function(e){var t=i.nc;t&&e.setAttribute("nonce",t)}},7825:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(i){!function(e,t,i){var n="";i.supports&&(n+="@supports (".concat(i.supports,") {")),i.media&&(n+="@media ".concat(i.media," {"));var a=void 0!==i.layer;a&&(n+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),n+=i.css,a&&(n+="}"),i.media&&(n+="}"),i.supports&&(n+="}");var o=i.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,i)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function i(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,i),o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.nc=void 0,(()=>{"use strict";var e=i(5072),t=i.n(e),n=i(7825),a=i.n(n),o=i(7659),s=i.n(o),r=i(5056),l=i.n(r),c=i(540),h=i.n(c),d=i(1113),u=i.n(d),m=i(2113),p=i.n(m),g={};function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function f(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function y(e){var t=function(e){if("object"!=v(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=v(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==v(t)?t:t+""}g.styleTagTransform=u(),g.setAttributes=l(),g.insert=s().bind(null,"head"),g.domAPI=a(),g.insertStyleElement=h(),t()(p(),g),p()&&p().locals&&p().locals;var b=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var t=this;this.mouseDetected=!1,this.mouseMoveHandler=function(){return function(e){window.removeEventListener("mousedown",t.mouseMoveHandler,!1),window.removeEventListener("touchstart",t.mouseMoveHandler,!1),"touchstart"===e.type?(e.stopPropagation(),t.mouseDetected=!1):t.mouseDetected=!0}},window.addEventListener("mousedown",this.mouseMoveHandler,!1),window.addEventListener("touchstart",this.mouseMoveHandler,!1)}return t=e,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(t){var i=0,n=document.createElement("div");n.className="".concat(e.ClassPref,"preloader");var a=document.createElement("div");a.className="".concat(e.ClassPref,"static"),a.style.width="".concat(8,"px"),a.style.height="".concat(8,"px"),a.style.margin="".concat(-4,"px"),a.style.backgroundColor=t,n.appendChild(a);var o=document.createElement("div");o.className="".concat(e.ClassPref,"spinner"),o.style.position="absolute",o.style.width="".concat(36,"px"),o.style.height="".concat(36,"px"),o.style.margin="".concat(-18,"px");for(var s=0;s<8;s+=1){var r=document.createElement("div");r.className="".concat(e.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=t,r.style.transform="rotate(".concat(i,"deg) translate(").concat(18,"px)"),i+=45,o.appendChild(r)}return n.appendChild(o),n}},{key:"passiveListener",get:function(){var e=!1;try{var t={get:function(){e=!0}},i=Object.defineProperty({},"passive",t);window.addEventListener("testPassive",null,i),window.removeEventListener("testPassive",null,i)}catch(e){}return!!e&&{passive:!1,capture:!1}}},{key:"requestAnimationFrame",value:function(e){return(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame)(e)}},{key:"cancelAnimationFrame",value:function(e){(window.cancelAnimationFrame||window.mozCancelAnimationFrame)(e)}},{key:"whichTransitionEventEnd",value:function(){var e=document.createElement("fakeelement"),t={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"},i=Object.keys(t);for(var n in i)if(void 0!==e.style[n])return t[n]}},{key:"Device",get:function(){var e=window,t=e.navigator.userAgent,i={ios:!1,android:!1,androidChrome:!1,desktop:!1,windows:!1,iphone:!1,ipod:!1,ipad:!1,cordova:e.cordova||e.phonegap,phonegap:e.cordova||e.phonegap,browser:{ie11:!1}},n=t.match(/(Windows Phone);?[\s\/]+([\d.]+)?/),a=t.match(/(Android);?[\s\/]+([\d.]+)?/),o=t.match(/(iPad).*OS\s([\d_]+)/),s=t.match(/(iPod)(.*OS\s([\d_]+))?/),r=!o&&t.match(/(iPhone\sOS|iOS)\s([\d_]+)/);if(n&&(i.os="windows",i.osVersion=n[2],i.windows=!0),a&&!n&&(i.os="android",i.osVersion=a[2],i.android=!0,i.androidChrome=t.toLowerCase().indexOf("chrome")>=0),(o||r||s)&&(i.os="ios",i.ios=!0),r&&!s&&(i.osVersion=r[2].replace(/_/g,"."),i.iphone=!0),o&&(i.osVersion=o[2].replace(/_/g,"."),i.ipad=!0),s&&(i.osVersion=s[3]?s[3].replace(/_/g,"."):null,i.iphone=!0),i.ios&&i.osVersion&&t.indexOf("Version/")>=0&&"10"===i.osVersion.split(".")[0]&&(i.osVersion=t.toLowerCase().split("version/")[1].split(" ")[0]),i.desktop=!(i.os||i.android||i.webView),i.webView=(r||o||s)&&t.match(/.*AppleWebKit(?!.*Safari)/i),i.os&&"ios"===i.os){var l=i.osVersion.split("."),c=document.querySelector('meta[name="viewport"]');i.minimalUi=!i.webView&&(s||r)&&(1*l[0]==7?1*l[1]>=1:1*l[0]>7)&&c&&c.getAttribute("content").indexOf("minimal-ui")>=0}i.pixelRatio=e.devicePixelRatio||1,t.indexOf("Trident/7.0")>-1&&(i.browser.ie11=!0);var h=t.indexOf("Chrome")>-1;i.browser.explorer=t.indexOf("MSIE")>-1,i.browser.firefox=t.indexOf("Firefox")>-1;var d=t.indexOf("Safari")>-1,u=t.toLowerCase().indexOf("op")>-1;return i.browser.opera=u,i.browser.chrome=(!h||!u)&&h,i.browser.safari=(!h||!d)&&d,i}},{key:"preloadedAttributForVideo",get:function(){return e.Device.browser.safari?"auto":"metadata"}},{key:"isTouchDevice",get:function(){try{return document.createEvent("TouchEvent"),!0}catch(e){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 e=document.createElement("div");e.style.visibility="hidden",e.style.width="100px",e.style.msOverflowStyle="scrollbar",document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var i=document.createElement("div");i.style.width="100%",e.appendChild(i);var n=i.offsetWidth;return e.parentNode.removeChild(e),t-n}},{key:"hasScrollbar",get:function(){var e="BackCompat"===document.compatMode?document.body:document.documentElement;return e.scrollHeight>e.clientHeight}},{key:"miniScreen",get:function(){return window.screen.height<500||window.screen.width<500}},{key:"addParamsToURL",value:function(t,i,n){if(e.Device.browser.ie11)return"".concat(t+(t.indexOf("?")>=0?"&":"?")+encodeURIComponent(i),"=").concat(encodeURIComponent(n));var a=(t=new URL(t)).search,o=new URLSearchParams(a);return o.append(i,n),t.search=o.toString(),t.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(t){var i=document.createElement(t);return i.className="thumb-".concat(t,"-content"),i.setAttribute("preload","metadata"),i.setAttribute("controlsList","nodownload"),"video"===t&&(i.setAttribute("preload",e.Device.browser.safari||e.Device.browser.opera?"auto":"metadata"),i.setAttribute("webkit-playsinline",""),i.setAttribute("playsinline","")),i}},{key:"embedVideoEl",value:function(e,t,i){var n=document.createElement("iframe");if(n.setAttribute("allow","autoplay"),n.setAttribute("allowfullscreen",""),n.setAttribute("frameborder","0"),"youtube"===e)n.src="https://www.youtube.com/embed/".concat(t,"?autoplay=1&rel=0&showinfo=0&wmode=transparent");else if("vimeo"===e){var a=i?"h="+i+"&":"";n.src="https://player.vimeo.com/video/".concat(t,"?").concat(a,"autoplay=1&byline=0&portrait=0&transparent=0")}return n}},{key:"copyProperties",value:function(e,t){for(var i=[],n=Object.keys(e),a=0;a<n.length;a+=1){var o=n[a];void 0!==e[o]&&(Object.prototype.hasOwnProperty.call(t,o)?t[o]!==e[o]&&i.push(o):i.push(o),t[o]=e[o])}return i}},{key:"setStyleForElFomObj",value:function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e.style[i]=t[i])}},{key:"shuffle",value:function(e){for(var t,i,n=e.length;0!==n;)i=Math.floor(Math.random()*n),t=e[n-=1],e[n]=e[i],e[i]=t;return e}},{key:"Rect",value:function(e,t,i,n){return{x:e,y:t,width:i,height:n}}},{key:"Size",value:function(e,t){return{width:e,height:t}}},{key:"Point",value:function(e,t){return{x:e,y:t}}},{key:"SvgWithImage",value:function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("viewBox","0 0 1 1"),t.setAttribute("version","1.1"),t.setAttribute("role","img");var i=document.createElementNS("http://www.w3.org/2000/svg","image");return i.setAttributeNS("http://www.w3.org/1999/xlink","href",e),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("preserveAspectRatio","xMidYMid slice"),t.appendChild(i),t}},{key:"findHighestZIndex",value:function(e){for(var t,i=99999,n=0;n<e.childNodes.length;n+=1){var a=e.childNodes[n];1===a.nodeType&&"SCRIPT"!==a.nodeName&&(t=document.defaultView.getComputedStyle(a,null).getPropertyValue("z-index")),t>i&&"auto"!==t&&(i=parseInt(t,10))}return i}},{key:"escape",value:function(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};return e.replace(/[&<>"']/g,(function(e){return t[e]}))}},{key:"trace",value:function(e){if(1!==arguments.length){for(var t="",i=0;i<arguments.length;i+=1)t+="".concat(arguments[i]," , ");t=t.slice(0,-2),console.log(t)}else console.log(e)}},{key:"preventDefaultForScrollKeys",value:function(e){return!{37:1,38:1,39:1,40:1}[e.keyCode]||(e.preventDefault(),!1)}},{key:"preventDefault",value:function(e){(e=e||window.event).preventDefault&&e.preventDefault(),e.returnValue=!1}},{key:"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(e.ClassPref,"PopUpActive"))}},{key:"enableBodyScroll",value:function(){document.getElementsByTagName("html")[0].classList.remove("".concat(e.ClassPref,"PopUpActive"))}},{key:"disableBodyScrollSlider",value:function(){if(window.addEventListener){var t=e.passiveListener,i=e.preventDefault;window.addEventListener("wheel",i,t),window.addEventListener("mousewheel",i,t),window.addEventListener("touchmove",i,t)}document.onkeydown=e.preventDefaultForScrollKeys}},{key:"enableBodyScrollSlider",value:function(){if(window.removeEventListener){var t=e.passiveListener,i=e.preventDefault;window.removeEventListener("wheel",i,t),window.removeEventListener("mousewheel",i,t),window.removeEventListener("touchmove",i,t)}document.onkeydown=null}},{key:"collapseElementsInElemt",value:function(e,t){for(var i=[],n=0;n<e.childNodes.length;n+=1){var a={},o=e.childNodes[n];1===o.nodeType&&"SCRIPT"!==o.nodeName&&o!==t&&(a.element=o,a.height=null,a.overflow=null,""!==o.style.height&&(a.height=o.style.height),""!==o.style.overflow&&(a.overflow=o.style.overflow),i.push(a),o.style.overflow="hidden",o.style.height="0")}return i}},{key:"recoverElements",value:function(e){if(0!==e.length)for(var t=0;t<e.length;t+=1){var i=e[t].element;i&&(e[t].overflow?i.style.overflow=e[t].overflow:i.style.removeProperty("overflow"),e[t].height?i.style.height=e[t].height:i.style.removeProperty("height"))}}},{key:"hexToRgbaStrin",value:function(e,t){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,i,n){return t+t+i+i+n+n}));var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return i?"rgba(".concat(parseInt(i[1],16),",").concat(parseInt(i[2],16),",").concat(parseInt(i[3],16),",").concat(t,")"):null}},{key:"getFrameForBoxWithMode",value:function(t,i,n){var a=t.width,o=t.height,s=i.width,r=i.height,l=1,c=1,h=1;n?(l=s/a,c=r/o,h=Math.max(l,c)):(l=s/a,c=r/o,h=(h=Math.min(l,c))>1?1:h);var d=Math.round(a*h),u=Math.round(o*h),m=Math.round((s-d)/2),p=Math.round((r-u)/2);return e.Rect(m,p,d,u)}},{key:"getItemFrameByIndexForBox",value:function(t,i,n,a,o,s){var r=1;s&&(r=s);var l=o=Math.min(i,o),c=Math.floor(i/o),h=(l=c>1?(i-(c-1)*n)/c:i)*r,d=Math.ceil((t+1)/c)-1,u=d*(h+a),m=(t-d*c)*(l+n);return e.Rect(m,u,l,h)}},{key:"fadeOut",value:function(e,t,i){i||(i=500);var n=Math.sqrt,a=(new Date).getTime();!function o(){var s=(new Date).getTime()-a,r=s/i;if(r<1){var l=1-n(r);e.style.opacity=String(l),setTimeout(o,Math.min(25,i-s))}else e.style.opacity="0",t&&t()}()}},{key:"ellipsizeTextBoxToLine",value:function(e,t){e.innerHTML=e.textContent||e.innerText||"";var i=e.innerHTML,n=e.innerHTML.split(" ");e.innerHTML=n[0].substring(0,3);var a=e.clientHeight*t;for(e.innerHTML=i;e.clientHeight>a;)n.pop(),e.innerHTML="".concat(n.join(" ")," ...")}},{key:"ellipsizeTextBox",value:function(e){e.innerHTML=e.textContent||e.innerText||"";for(var t=e.innerHTML.split(" ");e.scrollHeight>e.offsetHeight;)t.pop(),e.innerHTML="".concat(t.join(" ")," ...")}},{key:"searchParentByClassName",value:function(t,i){if(t.parentElement){var n=t.parentElement;return n.classList.contains(i)?n:e.searchParentByClassName(n,i)}}},{key:"scrollYpositionForDiv",value:function(e){var t=(window.innerHeight-e.clientHeight)/2;return window.innerHeight-e.getBoundingClientRect().bottom<-e.clientHeight||e.getBoundingClientRect().bottom<0&&e.getBoundingClientRect().top<0?e.getBoundingClientRect().top+window.pageYOffset-t:void 0}},{key:"scrollInElementToY",value:function(e,t){var i,n=(t=Math.min(t,e.scrollHeight-e.clientHeight-1))-e.scrollTop;i=setInterval((function(){n=.05*n+.07*(t-e.scrollTop);var a=e.scrollTop+n;Math.abs(n)<1?(n=0,clearInterval(i)):e.scrollTop=a}),15),document.addEventListener("wheel",(function e(){clearInterval(i),document.removeEventListener("wheel",e,!1)}),!1)}},{key:"scrollWindowToY",value:function(e){var t,i;function n(){clearInterval(t),document.removeEventListener("wheel",n,!1)}var a=window.pageYOffset;e=Math.min(e,document.documentElement.scrollHeight-document.documentElement.clientHeight-1);var o=0,s=.05+.01*Math.abs(e-window.pageYOffset)/1e3;s=Math.min(.9,s),t=setInterval((function(){var r=(e-window.pageYOffset)*s;(r===o||Math.abs(r)<1)&&(window.scrollTo(0,e),clearInterval(t)),o=(e-window.pageYOffset)*s,a+=o,window.scrollTo(0,a),void 0===i&&((i=Math.abs(a-window.pageYOffset)>20)?(window.scrollTo(0,e),clearInterval(t)):document.addEventListener("wheel",n,!1))}),15)}},{key:"scrollToY",value:function(e,t){var i,n=window.pageYOffset,a=Math.PI/(t/15),o=n/2,s=0,r=setInterval((function(){window.pageYOffset>e?(s+=1,i=o-o*Math.cos(s*a),window.scrollTo(0,n-i)):clearInterval(r)}),15)}},{key:"isFullscreen",get:function(){return document.webkitIsFullScreen||document.mozFullScreen||!1}},{key:"toggleFullScreen",value:function(e){var t=document.webkitIsFullScreen||document.mozFullScreen||!1;e.requestFullScreen=e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||function(){return!1},document.cancelFullScreen=document.cancelFullScreen||document.webkitCancelFullScreen||document.mozCancelFullScreen||function(){return!1},t?document.cancelFullScreen():e.requestFullScreen()}},{key:"PageInteractionListener",value:function(){return{actionHandler:function(e){var t=this;return t.action=function(e){t.callback&&t.callback instanceof Function&&t.callback(e),t.remove()},t.action},init:function(e){this.callback=e,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 e={};function t(n){!e.itemsList||e.cached===e.itemsList.length&&!e.amount||e.amount&&e.cached>=e.amount||(e.amount&&(e.amount=Math.min(e.amount,e.itemsList.length)),e.currentItem=e.itemsList[n].webView,e.lastIndex=n,void 0===e.currentItem||e.currentItem.complete?(e.cached+=1,t(e.lastIndex+1>=e.itemsList.length?0:e.lastIndex+1)):e.currentItem.addEventListener("load",i,!1))}function i(){e.cached+=1,t(e.lastIndex+1>=e.itemsList.length?0:e.lastIndex+1)}return e.cached=0,e.itemsList=void 0,e.currentItem=void 0,e.amount=void 0,e.lastIndex=void 0,e.init=function(n,a,o){if(e.itemsList&&e.itemsList.length)for(var s=0;s<e.itemsList.length;s+=1)e.itemsList[s].webView.removeEventListener("load",i,!1);e.amount=o,e.cached=0,e.currentItem=void 0,e.lastIndex=a,e.itemsList=n,void 0===a&&(a=0),t(a)},e.status=function(){return{list:e.itemsList,index:e.lastIndex}},e}},{key:"GMEventsManager",value:function(){return{listenerSet:{},addGMEventListener:function(t,i,n){if(!t)return e.trace("********************************* Event UNDEFINED!!! ***************************************"),e.trace(i),e.trace(n),void e.trace("********************************* Event UNDEFINED!!! ***************************************");this.listenerSet[t]||(this.listenerSet[t]=[]);var a={};a.listener=i,a.handler=n,this.listenerSet[t].push(a)},removeGMEventListener:function(e,t,i){if(this.listenerSet[e])for(var n=0;n<this.listenerSet[e].length;n+=1)this.listenerSet[e][n].listener===t&&this.listenerSet[e][n].handler===i&&(this.listenerSet[e].splice(n,1),n=this.listenerSet[e].length)},dispatchGMEvent:function(e){if(this.listenerSet[e.type])for(var t=this.listenerSet[e.type],i=0;i<t.length;i+=1){var n=t[i];n&&n.listener&&"function"==typeof n.listener[n.handler]&&n.listener[n.handler](e)}}}}},{key:"GMEvent",value:function(e,t,i){var n={};return n.type=e,n.params=i,n.target=t,n}}],null&&f(t.prototype,null),i&&f(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i}();const w=b;var C=i(7157),S=i.n(C),_={};function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function E(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,T(n.key),n)}}function L(e,t,i){return t&&E(e.prototype,t),i&&E(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function T(e){var t=function(e){if("object"!=k(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=k(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==k(t)?t:t+""}function P(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}_.styleTagTransform=u(),_.setAttributes=l(),_.insert=s().bind(null,"head"),_.domAPI=a(),_.insertStyleElement=h(),t()(S(),_),S()&&S().locals&&S().locals;var I=L((function e(t,i,n,a,o,s,r){function l(e){return e&&e[0].toUpperCase()+e.slice(1)}P(this,e);var c=document.createElement("div");return c.className=t,c.dataset.type=n,c.innerHTML=i,c.style.backgroundColor=a,c.style.order=r,c.style.fill=o,c.setAttribute("title",l(n)),c.setAttribute("aria-label",l(n)),c.addEventListener("touchend",s,!1),c.addEventListener("click",s,!1),c.addEventListener("mouseenter",s,!1),c.addEventListener("mouseleave",s,!1),c}));const M=function(){function e(t,i,n){P(this,e),this.appSet=t,this.appName=t.appName,this.type=i,this.buttonsList=[];var a=e.MENU_TYPE;this.config=e.CONFIG,w.copyProperties(n,this.config),this.item=void 0,this.lightbox=i===a.LIGHTBOX,this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.view.classList.add(i),this.initButtons()}return L(e,[{key:"initButtons",value:function(){var t=this.type,i=e.MENU_TYPE,n=this;function a(e){"like"===e.dataset.type&&e.dataset.like||("bookmark"===e.dataset.type&&e.dataset.bookmark?e.style.backgroundColor=n.backgroundColor:(e.style.backgroundColor=n.backgroundColor,e.style.fill=n.iconColor,e.classList.remove("hover")))}function o(t){if(this.eventType=t.type,"click"===t.type){var i=n.item;if(!i)return;var o={};o.type=this.dataset.type,o.item=i,this.dataset.type,a(this),w.Device.desktop||a(this),n.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.ITEM_MENU_ACTION,n,o))}else"mouseenter"===t.type?"bookmark"===(s=this).dataset.type&&s.dataset.bookmark?s.style.backgroundColor=n.backgroundColorOver:(s.style.backgroundColor=n.backgroundColorOver,s.style.fill=n.iconColorOver,s.classList.add("hover")):"mouseleave"===t.type&&a(this);var s}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 I("".concat(e.classPref,"button"),t===i.ULTRABOX?w.ICONS.LINK_2_SVG:w.ICONS.LINK_SVG,"link",this.backgroundColor,this.iconColor,o,t===i.ULTRABOX?6:0),this.buttonsList.push(this.linkButton),this.view.appendChild(this.linkButton)),this.config.im_play&&(this.playButton=new I("".concat(e.classPref,"button"),w.ICONS.PLAY_SVG,"play",this.backgroundColor,this.iconColor,o,1),this.buttonsList.push(this.playButton),this.view.appendChild(this.playButton)),this.config.im_zoom&&(this.zoomButton=new I("".concat(e.classPref,"button"),w.ICONS.ZOOM_IN_SVG,"zoom",this.backgroundColor,this.iconColor,o,2),this.buttonsList.push(this.zoomButton),this.view.appendChild(this.zoomButton)),this.config.im_info&&(this.infoButton=new I("".concat(e.classPref,"button"),w.ICONS.INFO_SVG,"info",this.backgroundColor,this.iconColor,o,t===i.ULTRABOX?5:3),this.buttonsList.push(this.infoButton),this.view.appendChild(this.infoButton)),this.config.im_discuss&&(this.commentsButton=new I("".concat(e.classPref,"button"),t===i.ULTRABOX?w.ICONS.COMENTS_2_SVG:w.ICONS.COMENTS_SVG,"coments",this.backgroundColor,this.iconColor,o,(i.ULTRABOX,4)),this.buttonsList.push(this.commentsButton),this.view.appendChild(this.commentsButton)),this.config.im_download&&(this.downloadButton=new I("".concat(e.classPref,"button"),t===i.ULTRABOX?w.ICONS.DOWNLOAD_2_SVG:w.ICONS.DOWNLOAD_SVG,"download",this.backgroundColor,this.iconColor,o,t===i.ULTRABOX?3:5),this.buttonsList.push(this.downloadButton),this.view.appendChild(this.downloadButton)),this.config.im_share&&(this.shareButton=new I("".concat(e.classPref,"button"),t===i.ULTRABOX?w.ICONS.SHARE_2_SVG:w.ICONS.SHARE_SVG,"share",this.backgroundColor,this.iconColor,o,t===i.ULTRABOX?2:6),this.buttonsList.push(this.shareButton),this.view.appendChild(this.shareButton)),this.config.im_bookmark&&(this.bookMarkButton=new I("".concat(e.classPref,"button"),w.ICONS.BOOKMARK_SVG,"bookmark",this.backgroundColor,this.iconColor,o),this.buttonsList.push(this.bookMarkButton),this.view.appendChild(this.bookMarkButton)),this.config.im_like&&(this.likeButton=new I("".concat(e.classPref,"button"),t===i.ULTRABOX?w.ICONS.HEART_2_SVG:w.ICONS.HEART_SVG,"like",this.backgroundColor,this.iconColor,o,t===i.ULTRABOX?1:7),this.buttonsList.push(this.likeButton),this.view.appendChild(this.likeButton)),this.config.im_thumbnails&&(this.thumbs=new I("".concat(e.classPref,"button"),w.ICONS.GRID_SVG,"thumbnails",this.backgroundColor,this.iconColor,o,8),this.buttonsList.push(this.thumbs),this.view.appendChild(this.thumbs)),this.config.im_resize&&(this.resizeButton=new I("".concat(e.classPref,"button"),w.ICONS.EXPAND_SVG,"resize",this.backgroundColor,this.iconColor,o,t===i.ULTRABOX?6:9),this.buttonsList.push(this.resizeButton),this.view.appendChild(this.resizeButton)),this.config.im_fulscreen&&(this.fullscreenButton=new I("".concat(e.classPref,"button"),w.ICONS.FULL_SCREEN_SVG,"fullscreen",this.backgroundColor,this.iconColor,o,t===i.ULTRABOX?7:10),this.buttonsList.push(this.fullscreenButton),this.view.appendChild(this.fullscreenButton)),this.config.im_close&&(this.closeButton=new I("".concat(e.classPref,"button"),w.ICONS.CLOSE_SVG,"close",this.backgroundColor,this.iconColor,o,11),this.buttonsList.push(this.closeButton),this.view.appendChild(this.closeButton))}},{key:"updateConfig",value:function(e){if(0!==w.copyProperties(e,this.config).length){for(var t=0;t<this.buttonsList.length;t+=1){var i=this.buttonsList[t];i.parentNode&&i.parentNode.removeChild(i),delete this.buttonsList[t]}this.buttonsList=[],this.initButtons()}}},{key:"updateForItem",value:function(t){var i=e.MENU_TYPE;if(this.item=t,this.zoomButton&&("image"!==t.type?this.zoomButtonStatus("desable"):this.zoomButtonStatus("zoomOut")),this.downloadButton&&("image"===t.type||"audio"===t.type||"video"===t.type&&void 0===t.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()[t.ID]?(this.likeButton.style.fill="red",this.likeButton.style.cursor="default",this.likeButton.style.pointerEvents="none",this.likeButton.dataset.like=t.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=t.ID,this.bookMarkButton.style.fill="red"):(delete this.bookMarkButton.dataset.bookmark,this.bookMarkButton.style.fill=this.iconColor)),this.linkButton&&(t.meta&&t.meta.subType&&"product"===t.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,t.link?(this.linkButton.style.display="block",this.linkButton.style.opacity="1",this.linkButton.style.cursor="pointer",this.linkButton.style.pointerEvents="all",t.linkText&&""!==t.linkText?this.linkButton.setAttribute("title",t.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(t.comment_status){case"open":this.commentsButton.style.display=null;break;case"closed":this.commentsButton.style.display="none"}}},{key:"zoomButtonStatus",value:function(e){if(this.zoomButton&&this.zoomStatus!==e){switch(e){case"desable":this.zoomButton.innerHTML=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=e}}},{key:"resizeButtonStatus",value:function(e){if(this.resizeButton)switch(e){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(e){if(this.playButton&&this.playStatus!==e){switch(e){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=e}}},{key:"resizeHandler",value:function(){var e=this;setTimeout((function(){var t=document.webkitIsFullScreen||document.mozFullScreen||!1;e.fullscreenButton&&(e.fullscreenButton.innerHTML=t?w.ICONS.NORMAL_SCREEN_SVG:w.ICONS.FULL_SCREEN_SVG,e.fullscreenButton.style.fill=e.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(e.classPref,"type-thumb"),LIGHTBOX:"".concat(e.classPref,"type-lightbox"),ULTRABOX:"".concat(e.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 x=i(7412),N=i.n(x),B={};function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function D(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,H(n.key),n)}}function H(e){var t=function(e){if("object"!=O(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=O(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==O(t)?t:t+""}B.styleTagTransform=u(),B.setAttributes=l(),B.insert=s().bind(null,"head"),B.domAPI=a(),B.insertStyleElement=h(),t()(N(),B),N()&&N().locals&&N().locals,w.trace;const A=function(){function e(t,i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.appSet=t,this.appName=t.appName,this.config=e.CONFIG,w.copyProperties(i,this.config),this.accelX=0,this.view=document.createElement("div"),this.view.className="".concat(e.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,n)}return t=e,n=[{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(e){var t=this;clearTimeout(this.draggingDelayTimer),e?(this.draggingPr=!0,this.view.classList.add("isDraging")):(this.draggingDelayTimer=setTimeout((function(){t.draggingPr=!1}),20),this.view.classList.remove("isDraging"))}},{key:"draging",get:function(){return this.draggingPr}},{key:"initByScrollView",value:function(e){this.scrollView=e,this.view.appendChild(this.scrollView),this.calculateScroll()}},{key:"mouseHandler",value:function(){var e=this;return this.msHandler=function(t){switch(t.type){case"mousedown":case"wheel":case"touchstart":e.internalControll=!0;break;case"mouseup":case"touchend":e.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(e.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(e.classPref,"grabbable"))):(this.view.removeEventListener("scroll",this.scrHandler),this.config.scrh_dragin&&this.config.scrh_dragin_cursor&&this.view.classList.remove("".concat(e.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(t){var i={},n=this.pages,a=this.view.scrollLeft;i.pages=n,i.scrollScale=this.scrollScale,i.renderingX=this.renderingX,i.internalControll=this.internalControll,i.currentPage=void 0!==t?t:this.currentPagePr,1===n?(i.hasPrevPage=!1,i.hasNextPage=!1):(i.hasPrevPage=a>0,i.hasNextPage=this.scrollWidth-a-this.width>.5),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.SCR_ACTION,this,i))}},{key:"currentPage",value:function(){var t=this.pages,i=this.width,n=this.view.scrollLeft,a=this.scrollWidth-n-i,o=n%i,s=Math.ceil(n/i)===t-1?this.lastPageWidth:i;this.nextPagePart=o/s;var r=Math.round(Math.floor(n/i)+this.nextPagePart),l=-(this.rPosX-n)/Math.abs(this.rPosX-n);return l&&this.scrollDirection!==l&&(this.scrollDirection=l,this.updateControls()),this.currentPagePr===r&&0!==a&&0!==n||(this.currentPagePr=r,this.updateControls()),this.rPosX=n,this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.SCR_SCROLL,this,{scroll:n,scrollDirection:this.scrollDirection,internalControll:this.internalControll})),r}},{key:"gotoNext",value:function(){var e=this.currentPage(),t=this.nextPagePart>=.5&&!this.renderingX?e:e+1;this.gotoPageByIndex(t)}},{key:"gotoPrev",value:function(){var e=this.currentPage(),t=0!==this.nextPagePart&&this.nextPagePart<=.5&&!this.renderingX?e:e-1;this.gotoPageByIndex(t)}},{key:"gotoPageByIndex",value:function(e,t){var i=this.pages;this.internalControll=!1,e=Math.min(e,i-1);var n=(e=Math.max(e,0))*this.width;t?this.scrollLeft=n:this.scrollLeftAnime=n,this.currentPageIndex=e,this.updateControls(e)}},{key:"scrollLeftAnime",set:function(e){var t=this;this.accelX=Math.max(e,0),this.accelX=Math.min(e,this.scrollWidth-this.width);var i=this.view.scrollLeft,n=0,a=.05+.05*Math.abs(this.accelX-i)/1e3;a=Math.min(.9,a),this.renderingX=!0,this.internalControll=!1,this.scrollAnimInterval||(this.scrollAnimInterval=setInterval((function(){n=(t.accelX-i)*a,i+=n,t.view.scrollLeft=i,Math.abs(i-t.accelX)<=1&&(t.view.scrollLeft=t.accelX,t.renderingX=!1,t.updateControls(),clearInterval(t.scrollAnimInterval),t.scrollAnimInterval=void 0)}),17))}},{key:"scrollHandler",value:function(){var e=this;return this.scrHandler=function(){e.internalControll&&(clearInterval(e.scrollAnimInterval),e.scrollAnimInterval=void 0),e.currentPage()},this.scrHandler}},{key:"scrollLeft",get:function(){return this.view.scrollLeft},set:function(e){this.scrollAnimInterval&&(clearInterval(this.scrollAnimInterval),this.scrollAnimInterval=void 0),this.view.scrollLeft=e}},{key:"maxScrollLeft",get:function(){return this.scrollWidth-this.width}},{key:"startDrag",value:function(){var t,i,n,a,o,s,r=this,l=0,c=0,h=0;function d(e){var d;if(e.touches?(o=e.touches[0].pageX,s=e.touches[0].pageY):(o=e.pageX,s=e.pageY),void 0===a&&(s===i?a=!1:(d=180*Math.atan2(Math.abs(s-i),Math.abs(o-t))/Math.PI,a=d>45)),a)r.dragging=!0;else{e.preventDefault();var u=t-o;Math.abs(u)>4&&(r.dragging=!0),r.view.scrollLeft=n+u,h=r.view.scrollLeft,l=1*(h-c)}}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(e.EVENTS.SCR_ACTION,r,{dragging:!1}))):(r.renderingX=!1,r.updateControls(),r.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.SCR_ACTION,r,{dragging:!1})))}return function(e){var o,s;clearInterval(r.scrollAnimInterval),r.scrollAnimInterval=void 0,l=0,a=void 0,e.touches?(o=e.touches[0].pageX,s=e.touches[0].pageY):(o=e.pageX,s=e.pageY),t=o,i=s,n=r.view.scrollLeft,c=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 e=this.pages;this.viewWidth=this.width;var t=(this.currentPageIndex+1)/e;this.calculateScroll();var i=Math.round(t*e)-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)}}])&&D(t.prototype,i),n&&D(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i,n}();var V=i(6238),z=i.n(V),G={};function R(e){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}function F(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,W(n.key),n)}}function W(e){var t=function(e){if("object"!=R(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=R(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==R(t)?t:t+""}G.styleTagTransform=u(),G.setAttributes=l(),G.insert=s().bind(null,"head"),G.domAPI=a(),G.insertStyleElement=h(),t()(z(),G),z()&&z().locals&&z().locals,w.trace,w.moduleSettings;const j=function(){function e(t,i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.context=n,this.appSet=i,this.config=e.CONFIG,w.copyProperties(t,this.config),this.imageBoxSize=void 0,this.thumbSize=w.Size(400,400),this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.wrap_main=document.createElement("div"),this.wrap_main.className="".concat(e.classPref,"main-wrap"),this.view.appendChild(this.wrap_main),this.wrap_item=document.createElement("div"),this.wrap_item.className="".concat(e.classPref,"item-wrap"),this.wrap_main.appendChild(this.wrap_item),this.hover=document.createElement("div"),this.hover.className="".concat(e.classPref,"item-hover"),this.inner=document.createElement("div"),this.inner.className="".concat(e.classPref,"item-inner"),this.opacityDelay=void 0,this.displayPr=void 0,this.opacityPr=0,this.imgCompleted=!1,this.itemViewSrcCompleted=!1}return t=e,n=[{key:"classPref",get:function(){return"pgc-rev-fillmode-thumb-"}},{key:"EVENT",get:function(){return{THUMB_ACTION:"THUMB_ACTION"}}},{key:"CONFIG",get:function(){return{thumb_spasing:10,thumb_coverHieghtRation:1,thumb_loading_lazy:!1}}}],(i=[{key:"init",value:function(t){if(!this.item){var i,n=this;this.item=t,this.appName=t.appName,t.itemViewThumbSize&&(this.thumbSize=t.itemViewThumbSize),this.type=t.type,t.itemViewThumbSrc||t.itemViewSrc||t.poster||t.thumb?(this.itemViewSrc=t.itemViewSrc,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),n.imgCompleted=!0,n.updateImgSize(),n.view.style.opacity=n.opacityPr},this.img.onerror=function(){n.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&&t.poster.medium?(this.img.style.width="".concat(t.poster.medium.width,"px"),this.img.style.height="".concat(t.poster.medium.height,"px"),i=t.poster.medium.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:delete this.img):(this.imgSubstitute=document.createElement("div"),this.imgSubstitute.className="".concat(e.classPref,"image-substitute"),this.wrap_item.appendChild(this.imgSubstitute),this.view.style.opacity=this.opacityPr),this.wrap_item.appendChild(this.hover),this.wrap_item.appendChild(this.inner),this.initSubContent(),this.initInteractive(),this.updateProps()}}},{key:"clickHandler",value:function(){this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENT.THUMB_ACTION,this,{index:this.index}))}},{key:"initSubContent",value:function(){}},{key:"initInteractive",value:function(){}},{key:"updateProps",value:function(e){e&&w.copyProperties(e,this.config),this.wrap_main.style.padding="".concat(this.config.thumb_spasing/2,"px")}},{key:"updateSize",value:function(e){var t=Math.round(e*this.config.thumb_coverHieghtRation);this.thumbSize=w.Size(e,t),this.view.style.width="".concat(this.thumbSize.width,"px"),this.view.style.height="".concat(this.thumbSize.height,"px"),this.imageBoxSize=w.Size(this.thumbSize.width-this.config.thumb_spasing,this.thumbSize.height-this.config.thumb_spasing),this.updateImgSize()}},{key:"updateImgSize",value:function(){if(this.imgSubstitute&&(this.imgSubstitute.style.width="".concat(this.thumbSize.width,"px"),this.imgSubstitute.style.height="".concat(this.thumbSize.height,"px")),this.imageBoxSize&&this.imgCompleted&&this.img){var e=w.getFrameForBoxWithMode(w.Size(this.img.naturalWidth,this.img.naturalHeight),this.imageBoxSize,!0);"audio"!==this.type&&!this.itemViewSrcCompleted&&(this.imageBoxSize.width/this.img.naturalWidth>1.1||this.imageBoxSize.height/this.img.naturalHeight>1.1)&&this.itemViewSrc&&(this.img.src=this.itemViewSrc,this.itemViewSrcCompleted=!0),this.img.style.left="".concat(e.x,"px"),this.img.style.top="".concat(e.y,"px"),this.img.style.width="".concat(e.width,"px"),this.img.style.height="".concat(e.height,"px")}}},{key:"visibility",set:function(e){this.view.style.visibility=e}},{key:"display",get:function(){return this.displayPr},set:function(e){"none"===e&&clearTimeout(this.opacityDelay),this.view.style.display=e,this.displayPr=e}},{key:"opacity",set:function(e){var t=this;e.delay?this.opacityDelay=setTimeout((function(){(t.imgCompleted||t.imgSubstitute)&&(t.view.style.opacity=e.opacity),t.opacityPr=e.opacity}),e.delay):(clearTimeout(this.opacityDelay),(t.imgCompleted||t.imgSubstitute)&&(t.view.style.opacity=e.opacity),t.opacityPr=e.opacity)}}])&&F(t.prototype,i),n&&F(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i,n}();var Y=i(5996),X=i.n(Y),U={};function q(e){return q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},q(e)}function Z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,$(n.key),n)}}function J(e,t,i){return t&&K(e.prototype,t),i&&K(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function $(e){var t=function(e){if("object"!=q(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=q(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==q(t)?t:t+""}function Q(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Q=function(){return!!e})()}function ee(e,t){return ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ee(e,t)}function te(){return te="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,i){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=ie(e)););return e}(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(arguments.length<3?e:i):a.value}},te.apply(null,arguments)}function ie(e){return ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ie(e)}U.styleTagTransform=u(),U.setAttributes=l(),U.insert=s().bind(null,"head"),U.domAPI=a(),U.insertStyleElement=h(),t()(X(),U),X()&&X().locals&&X().locals;var ne=w.trace,ae=function(e){function t(e,i,n){var a,o,s,r;return Z(this,t),(o=this,s=t,r=[e,i,n],s=ie(s),a=function(e,t){if(t&&("object"==q(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(o,Q()?Reflect.construct(s,r||[],ie(o).constructor):s.apply(o,r))).view.classList.add("".concat(t.classPref,"simple-border")),a.view.style.position="absolute",a.isSelect=!1,a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ee(e,t)}(t,e),J(t,[{key:"initSubContent",value:function(){var e=this;this.type=this.item.type;var i=this.item;if("image"!==this.type){var n=document.createElement("div");switch(n.className="".concat(t.classPref,"item-link"),n.style.backgroundColor=this.config.thumb_border_color,this.type){case"video":i.mime_type?(n.classList.add("yt-v"),"vimeo"===i.mime_type.split("/")[1]?n.innerHTML=w.ICONS.VIMEO_SVG:n.innerHTML=w.ICONS.YOU_TUBE_SVG):i.original&&(this.img||(this.videoContent=w.mediaEl("video"),this.videoContent.addEventListener("loadedmetadata",(function(){e.imgSubstitute&&e.imgSubstitute.parentNode&&e.imgSubstitute.parentNode.removeChild(e.imgSubstitute),e.wrap_item.getElementsByTagName("img").length>0&&(e.wrap_item.getElementsByTagName("img")[0].style.visibility="hidden",e.wrap_item.getElementsByTagName("img")[0].style.position="absolute",e.imgCompleted=!0,e.view.style.minHeight=null,e.view.style.opacity=e.opacityPr)})),this.videoContent.src=i.original,this.wrap_item.insertBefore(this.videoContent,this.wrap_item.firstChild)),n.innerHTML=w.ICONS.VIDEO_TYPE);break;case"audio":n.innerHTML=w.ICONS.NOTE_SVG;break;case"post":case"page":n.innerHTML=w.ICONS.POST_TYPE;break;default:n=void 0}n&&this.wrap_item.appendChild(n)}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 t(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.clickHandler()})),this.view.addEventListener("mouseenter",t,!1),this.view.addEventListener("mouseleave",t,!1)}},{key:"x",set:function(e){this.view.style.left="".concat(e,"px")}},{key:"y",set:function(e){this.view.style.top="".concat(e,"px")}},{key:"hoverAnim",value:function(e){this.inner.style.border=e?"solid 2px ".concat(this.config.thumb_border_color):null}},{key:"select",set:function(e){e?(this.view.classList.add("pgc-select"),this.hoverAnim(!0)):(this.view.classList.remove("pgc-select"),this.hoverAnim(!1)),this.isSelect=e}}],[{key:"classPref",get:function(){return"pgc-rev-scroll-bar-maxi-thumb-"}},{key:"CONFIG",get:function(){var e,i=(e=this,te(ie(t),"CONFIG",e));return i.thumb_border_color="white",i.thumb_hover_color="rgba(0,0,0,0.5)",i}}])}(j);const oe=function(){function e(t,i,n){Z(this,e),this.context="ItemsScrollBarPaginationMaxi",this.config=e.CONFIG,w.copyProperties(i,this.config),this.config.isb_action_callback&&"function"==typeof this.config.isb_action_callback||(this.config.isb_action_callback=void 0),this.appName=t.appName,this.appSet=t,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(e.classPref,"view"),this.sliderContent=document.createElement("div"),this.sliderContent.className="".concat(e.classPref,"slider-content-view");var a=A.CONFIG;a.scrh_dragin=!0,a.scrh_block_pan_y=this.config.isb_block_pan_y,this.scroller=new A(this.appSet,a,{}),this.appSet.appEventManager.addGMEventListener(A.EVENTS.SCR_SCROLL,this,"scrollHandler"),this.appSet.appEventManager.addGMEventListener(A.EVENTS.SCR_ACTION,this,"scrollHandler"),this.view.appendChild(this.scroller.view),this.activIndex=void 0,this.activAudioIndex=void 0,n&&w.setStyleForElFomObj(this.view,n),this.appSet.appEventManager.addGMEventListener(ae.EVENT.THUMB_ACTION,this,"thumbActionHandler")}return J(e,[{key:"initByItemslist",value:function(e){this.itemsList=e;var t=ae.CONFIG;t.thumb_coverHieghtRation=this.config.isb_thum_ration,t.thumb_loading_lazy=!0,t.thumb_spasing=4,t.thumb_border_color=this.config.isb_itemBgColor;for(var i=0;i<e.length;i+=1){var n=e[i],a=new ae(t,this.appSet,this.context);a.index=i,a.init(n),this.thumbsList.push(a)}this.sliderContent.style.width="".concat(this.thumbsList.length*this.thumbSize.width,"px"),this.sliderContent.style.height="".concat(this.thumbSize.height+10,"px"),this.scroller.initByScrollView(this.sliderContent)}},{key:"scrollHandler",value:function(e){if(e.target===this.scroller){this.config.isb_action_callback&&this.config.isb_action_callback(e.params);var t=e.params,i=t.scroll,n=t.scrollDirection;(void 0!==i||n)&&(this.scrollLeft=i,void 0!==this.activIndex&&this.addPage(Math.ceil(this.scrollLeft/this.width)-(n<0?1:0)))}}},{key:"thumbActionHandler",value:function(t){if(t.target.context===this.context){var i=t.params.index;this.scroller.draging||void 0===i||this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.ITEMS_SCROLL_BAR_ITEM_ACTION,this,{action:"click",index:parseInt(i)}))}}},{key:"addPage",value:function(e){if(!this.activatedPages["".concat(e)]){for(var t=Math.min(e*this.itemsOnPage+this.itemsOnPage,this.thumbsList.length),i=Math.max(t-this.itemsOnPage,0);i<t;i+=1){var n=this.thumbsList[i];n.updateSize(this.thumbSize.width),n.x=i*this.thumbSize.width,n.y=10,n.display="block",n.opacity={opacity:1},this.presentedList[i]=n,this.sliderContent.appendChild(n.view)}this.activatedPages["".concat(e)]=!0}}},{key:"selectThumbByIndex",value:function(e){if(0!==this.thumbsList.length){void 0!==this.activIndex&&(this.thumbsList[this.activIndex].select=!1),this.thumbsList[e].select=!0;var t=e*this.thumbSize.width+this.thumbSize.width-(this.width+this.thumbSize.width)/2;this.scroller.scrollLeft=t;var i=this.scroller.scrollLeft,n=Math.floor(i/this.width),a=Math.floor((i+this.width/2)/this.width),o=Math.floor((i+this.width)/this.width);this.addPage(a),n!==a&&this.addPage(n),o!==a&&this.addPage(o),this.activIndex=e}}},{key:"size",set:function(e){var t=Math.floor(e.width/this.thumbSize.width);t=Math.min(t,this.thumbsList.length?this.thumbsList.length:99999),this.view.style.maxWidth="".concat(t*this.thumbSize.width,"px"),this.itemsOnPage!==t&&(this.itemsOnPage=t,this.width=this.itemsOnPage*this.thumbSize.width,this.view.style.width="".concat(this.width,"px"),this.view.style.maxWidth=null,this.activatedPages={},this.maxWidth=e.width,void 0!==this.activIndex&&this.addPage(this.pageByItemIndex(this.activIndex)))}},{key:"pageByItemIndex",value:function(e){return Math.floor(e/this.itemsOnPage)}},{key:"resizeHandler",value:function(){this.updateView()}},{key:"updateView",value:function(){ne("Update View")}},{key:"prepareToRemove",value:function(){this.appSet.appEventManager.removeGMEventListener(A.EVENTS.SCR_ACTION,this,"scrollHandler"),this.appSet.appEventManager.removeGMEventListener(A.EVENTS.SCR_SCROLL,this,"scrollHandler"),this.scroller.remove(),this.appSet.appEventManager.removeGMEventListener(ae.EVENT.THUMB_ACTION,this,"thumbActionHandler")}}],[{key:"classPref",get:function(){return"pgc-rev-scroll-bar-maxi-"}},{key:"CONFIG",get:function(){return{isb_itemBgColor:"rgba(255,255,255,0.6)",isb_height:50,isb_thum_ration:.7,isb_block_pan_y:!1,isb_action_callback:void 0}}},{key:"EVENTS",get:function(){return{ITEMS_SCROLL_BAR_ITEM_ACTION:"ITEMS_SCROLL_BAR_ITEM_ACTION"}}}])}();var se=i(9829),re=i.n(se),le={};function ce(e){return ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ce(e)}function he(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,de(n.key),n)}}function de(e){var t=function(e){if("object"!=ce(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=ce(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ce(t)?t:t+""}le.styleTagTransform=u(),le.setAttributes=l(),le.insert=s().bind(null,"head"),le.domAPI=a(),le.insertStyleElement=h(),t()(re(),le),re()&&re().locals&&re().locals,w.trace;var ue=function(){function e(t,i,n){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.appSet=t,this.appName=t.appName,this.config=e.CONFIG,w.copyProperties(i,this.config),this.scalePr=0,this.positionPr=0,this.barXPr=0,this.barWidth=0,this.draging=!1,this.startDragHandler=void 0,this.trackHandler=void 0,this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.track=document.createElement("div"),this.track.className="".concat(e.classPref,"track"),this.trackView=document.createElement("div"),this.track.appendChild(this.trackView),this.view.appendChild(this.track),this.bar=document.createElement("div"),this.bar.className="".concat(e.classPref,"bar"),this.barView=document.createElement("div"),this.bar.appendChild(this.barView),this.view.appendChild(this.bar),w.setStyleForElFomObj(this.view,n),this.updateProps(this.config)}return t=e,n=[{key:"classPref",get:function(){return"pgc-rev-scr-bar-"}},{key:"EVENTS",get:function(){return{SCROLL_BAR_ACTION:"SCROLL_BAR_ACTION"}}},{key:"CONFIG",get:function(){return{scr_bar_size:10,scr_bar_padding:0,scr_bar_trackColor:"lightgray",scr_bar_BarColor:"gray",scr_bar_BarHoverColor:"black"}}}],(i=[{key:"updateProps",value:function(e){w.copyProperties(e,this.config),this.trackView.style.height="".concat(this.config.scr_bar_size,"px"),this.trackView.style.backgroundColor=this.config.scr_bar_trackColor,this.track.style.padding="".concat(this.config.scr_bar_padding,"px 0"),this.barView.style.backgroundColor=this.config.scr_bar_BarColor,this.bar.style.padding="".concat(this.config.scr_bar_padding,"px 0")}},{key:"startBarDrag",value:function(){var e,t,i,n,a,o,s=this;function r(r){var l;if(r.touches?(e=r.touches[0].pageX,t=r.touches[0].pageY):(e=r.pageX,t=r.pageY),void 0===o&&(t===n?o=!1:(l=180*Math.atan2(Math.abs(t-n),Math.abs(e-i))/Math.PI,o=l>45)),o)s.dragging=!0;else{r.preventDefault();var c=i-e;c&&(s.dragging=!0),s.barX=a-c}}function l(){w.isTouchDevice&&(document.removeEventListener("touchmove",r,w.passiveListener),document.removeEventListener("touchend",l,w.passiveListener)),document.removeEventListener("mousemove",r,!1),document.removeEventListener("mouseup",l,!1),s.dragging=!1}return function(c){c.preventDefault(),o=void 0,c.touches?(e=c.touches[0].pageX,t=c.touches[0].pageY):(e=c.pageX,t=c.pageY),i=e,n=t,a=s.barXPr,w.isTouchDevice&&(document.addEventListener("touchmove",r,w.passiveListener),document.addEventListener("touchend",l,w.passiveListener)),document.addEventListener("mousemove",r,!1),document.addEventListener("mouseup",l,!1)}}},{key:"startTouchTrack",value:function(){var t=this;return function(i){i.preventDefault();var n=i.pageX-t.barWidth/2,a=(n-=t.view.getBoundingClientRect().left)/t.scalePr;t.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.SCROLL_BAR_ACTION,t,{positionAnime:a}))}}},{key:"prepareToRemove",value:function(){this.bar.removeEventListener("mousedown",this.startBarDrag,!1),this.bar.removeEventListener("touchstart",this.startBarDrag,w.passiveListener),this.track.removeEventListener("mousedown",this.startTouchTrack,!1)}},{key:"width",get:function(){return this.view.clientWidth}},{key:"scale",set:function(e){e<1?(this.barWidth=this.width*e,this.bar.style.width="".concat(this.barWidth,"px"),this.startDragHandler||(this.startDragHandler=this.startBarDrag(),this.trackHandler=this.startTouchTrack()),w.isTouchDevice&&(this.bar.addEventListener("touchstart",this.startDragHandler,w.passiveListener),window.addEventListener("touchmove",(function(){}),w.passiveListener)),this.bar.addEventListener("mousedown",this.startDragHandler,!1),this.track.addEventListener("mousedown",this.trackHandler,!1),this.view.classList.add("pgc-enable")):(this.view.classList.remove("pgc-enable"),this.bar.removeEventListener("mousedown",this.startBarDrag,!1),this.bar.removeEventListener("touchstart",this.startBarDrag,w.passiveListener),this.track.removeEventListener("mousedown",this.startTouchTrack,!1),this.startDragHandler=void 0,this.trackHandler=void 0,this.bar.style.width="".concat(0,"px"),this.barWidth=0),this.scalePr=e}},{key:"position",get:function(){return this.barXPr/this.scalePr},set:function(e){if(this.positionPr=e,!this.draging){var t=e*this.scalePr;this.barXPr=t,this.bar.style.transform="translateX(".concat(t,"px)")}}},{key:"barX",set:function(t){t=Math.max(t,0),t=Math.min(t,this.width-this.barWidth),this.bar.style.transform="translateX(".concat(t,"px)"),this.barXPr=t,this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.SCROLL_BAR_ACTION,this,{position:this.position}))}}])&&he(t.prototype,i),n&&he(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i,n}(),me=i(6550),pe=i.n(me),ge={};function ve(e){return ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ve(e)}function fe(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function ye(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(i),!0).forEach((function(t){be(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):fe(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function be(e,t,i){return(t=Ce(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function we(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ce(n.key),n)}}function Ce(e){var t=function(e){if("object"!=ve(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=ve(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ve(t)?t:t+""}ge.styleTagTransform=u(),ge.setAttributes=l(),ge.insert=s().bind(null,"head"),ge.domAPI=a(),ge.insertStyleElement=h(),t()(pe(),ge),pe()&&pe().locals&&pe().locals,w.trace;var Se=function(){function e(t,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.appEventManager=t,this.config=ye(ye({},e.CONFIG),i),this.animDelay=void 0,this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.view.style.backgroundColor=this.config.ish_backgroundColor,this.view.style.fill=this.config.ish_iconColor;var n=document.createElement("div");n.className="".concat(e.classPref,"bg"),n.dataset.type="bg",this.view.appendChild(n);var a=".".concat(e.classPref,"button:hover{fill:").concat(this.config.ish_iconColorHover,"}"),o=document.createElement("style");if(o.styleSheet?o.styleSheet.cssText=a:o.appendChild(document.createTextNode(a)),this.view.appendChild(o),this.config.ish_facebook){var s=document.createElement("div");s.title="Facebook",s.className="".concat(e.classPref,"button"),s.dataset.type="facebook",s.innerHTML=w.ICONS.FB_SVG,this.view.appendChild(s)}if(this.config.ish_twitter){var r=document.createElement("div");r.title="X",r.className="".concat(e.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(e.classPref,"button"),l.dataset.type="pinterest",l.innerHTML=w.ICONS.PIN_SVG,this.view.appendChild(l)}if(this.config.ish_download){var c=document.createElement("div");c.title="Download",c.className="".concat(e.classPref,"button"),c.dataset.type="download",c.innerHTML=w.ICONS.DOWNLOAD_SVG,this.download=c,this.view.appendChild(c)}if(this.config.ish_copy){var h=document.createElement("div");h.title="Copy URL",h.className="".concat(e.classPref,"button"),h.dataset.type="copy",h.innerHTML=w.ICONS.LINK_SVG,this.copy=h,this.view.appendChild(h)}}return t=e,n=[{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 t=this,i=document.getElementsByTagName("BODY")[0];this.config.ish_parentDiv&&(i=this.config.ish_parentDiv,this.view.classList.add("".concat(e.classPref,"fixed")),w.disableBodyScrollSlider()),this.view.style.zIndex=w.findHighestZIndex(i)+1,i.appendChild(this.view),this.animDelay=setTimeout((function(){t.view.classList.add("".concat(e.classPref,"activate"))}),40)}},{key:"initByItem",value:function(e){var t=this,i=e.sharelink;"postlink"===this.config.ish_linkToPost&&(i=e.linkOriginal?e.linkOriginal:e[this.config.ish_linkToPost]);var n=document.createElement("div");n.innerText=i,n.style.bottom="0",n.style.position="absolute",n.style.opacity=0,n.id="pgc_copy_link";var a,o,s=(window.screen.width-600)/2,r="menubar=no,toolbar=no,resizable=yes,scrollbars=yes, top=".concat(200,",\n       left=").concat(s,", height=450,width=600"),l=!1;this.view.onclick=function(s){var c=s.target;if(c.dataset.type)switch(c.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(e.title?e.title:""),"&url=").concat(i),"",r);break;case"pinterest":window.open("https://www.pinterest.com/pin/create/button/?url=".concat(i,"&media=").concat(e.url,"\n              &description=").concat(encodeURI(e.title?e.title:"")),"",r);break;case"download":a=e.url,(o=document.createElement("A")).href=a,o.download=a.substr(a.lastIndexOf("/")+1),document.body.appendChild(o),o.click(),document.body.removeChild(o);break;case"copy":l&&window.open(i,"_blank"),t.view.appendChild(n),window.getSelection().selectAllChildren(document.getElementById("pgc_copy_link"));try{document.execCommand("copy")&&(window.getSelection().removeAllRanges(),t.view.removeChild(n),c.style.fill="green",l=!0)}catch(e){window.open(i,"_blank")}break;case"bg":t.prepareToRemove()}},this.addToStage(),this.download&&(this.download.classList.remove("disable"),"post"!==e.type&&"page"!==e.type&&"pgc_simply_gallery"!==e.type||this.download.classList.add("disable"),"video"===e.type&&e.mime_type&&this.download.classList.add("disable"))}},{key:"prepareToRemove",value:function(t){var i=this;clearTimeout(this.animDelay),this.config.ish_parentDiv&&w.enableBodyScrollSlider(),this.view.classList.remove("".concat(e.classPref,"activate")),this.animDelay=setTimeout((function(){i.view.parentNode&&i.view.parentNode.removeChild(i.view),delete i.shareBar,i.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.REMOVE_SHARE_WINDOW,i,{}))}),t?0:300)}}])&&we(t.prototype,i),n&&we(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i,n}();const _e=Se;var ke=i(7625),Ee=i.n(ke),Le={};function Te(e){return Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Te(e)}function Pe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ie(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,xe(n.key),n)}}function Me(e,t,i){return t&&Ie(e.prototype,t),i&&Ie(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function xe(e){var t=function(e){if("object"!=Te(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=Te(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Te(t)?t:t+""}Le.styleTagTransform=u(),Le.setAttributes=l(),Le.insert=s().bind(null,"head"),Le.domAPI=a(),Le.insertStyleElement=h(),t()(Ee(),Le),Ee()&&Ee().locals&&Ee().locals;var Ne=w.trace,Be=function(){return Me((function e(t){Pe(this,e);var i=document.createElement("div"),n=document.createElement("div");n.className="".concat(e.classPref,"view");var a=document.createElement("div");if(a.className="".concat(e.classPref,"button"),t.meta&&t.meta.subType&&"product"===t.meta.subType?a.innerHTML='<a href="'.concat(t.link,'">').concat(t.linkText,"</a>"):a.innerHTML=t.link_text?t.link_text:t.title,n.appendChild(a),t.price||t.meta&&t.meta.price){var o=document.createElement("div"),s=document.createElement("div");s.className="".concat(e.classPref,"price"),s.innerHTML=t.price||t.meta.price,o.appendChild(s),n.appendChild(o)}return i.appendChild(n),i}),null,[{key:"classPref",get:function(){return"pgc-rev-slider-post-informer-"}}])}(),Oe=Me((function e(t){Pe(this,e);var i=document.createElement("div"),n=document.createElement("div");return n.className="icon-holder",n.innerHTML=t,i.appendChild(n),i})),De=function(){function e(t){Pe(this,e),this.delegate=t,this.item=void 0,this.id=void 0,this.appName=t.appName,this.itemIndex=void 0,this.iconSet=t.iconSet,this.positionIndex=0,this.view=document.createElement("div"),this.delegate.config.sl_canRemoved||(this.view.style.touchAction="auto"),this.view.className="".concat(e.classPref,"view"),this.itemInner=document.createElement("div"),this.itemInner.className="".concat(e.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(e.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 Me(e,[{key:"overLoadHandler",value:function(){var e=this;return this.overLoadH||(this.overLoadH=function(){e.preloader.style.display="none",e.subContentHolder.style.display=null,e.imgSize.width=this.naturalWidth,e.imgSize.height=this.naturalHeight,e.item.videoId&&e.imgSize.width<1e3&&(e.imgSize.width*=1.5,e.imgSize.height*=1.5),e.isInScale&&e.normalize(),e.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(t){if(this.fadePrep(),this.stopRenderTransform=!1,void 0!==t){if(this.id!==t.ID){if(this.item=t,this.id=t.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),t.webView)if("video"!==t.type||t.mime_type)if("audio1"===t.type&&t.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(e.classPref,"place-holder");var i=new Image;i.className="".concat(e.classPref,"item-poster"),i.src=t.poster.medium.url,i.onload=function(){this.classList.add("onLoad")},this.itemImg.appendChild(i),this.itemInner.appendChild(this.itemImg)}else"video"===t.type&&void 0!==t.mime_type&&(this.videoContentReady=!0),this.itemImg=t.webView,this.itemInner.appendChild(this.itemImg),this.itemImg.classList.add("pgc-img"),this.delegate.config.sl_copyR_Proptection&&this.itemImg.classList.add("iph-protect"),t.webView.complete?(this.preloader.style.display="none",this.imgSize.width=this.itemImg.naturalWidth,this.imgSize.height=this.itemImg.naturalHeight,t.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),t.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(e.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(e.classPref,"place-holder"),"video"===t.type||t.mime_type||this.itemImg.classList.add("bg-mode"),this.itemInner.appendChild(this.itemImg);switch("video"!==t.type||t.mime_type||this.addVideo(t.original),this.isInScale&&this.normalize(),this.fit(!1),t.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=t.original;break;case"video":this.view.classList.add("info-icon"),this.subContentHolder.innerHTML=new Oe(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 Be(this.item).innerHTML;break;default:this.view.classList.remove("info-icon")}t.meta&&t.meta.subType&&"product"===t.meta.subType&&(this.view.classList.add("info-icon"),this.subContentHolder.innerHTML=new Be(this.item).innerHTML)}}else this.clearPage()}},{key:"addVideo",value:function(t){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(e.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=t+(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(e){this.view.style.left="".concat(this.size.width*e,"px"),this.positionIndex=e}},{key:"resize",value:function(e){this.boundingBoxScale=void 0,this.size=e,this.posX=this.positionIndex,this.isInScale&&this.normalize(),this.fit(!0)}},{key:"fit",value:function(){if(this.itemImg){var e=this.delegate.config.sl_xOffset,t=0,i=w.getFrameForBoxWithMode(this.imgSize,w.Size(this.size.width-2*e,this.size.height-2*t),!1,!1);i.x+=e,i.y+=t,this.imageFrameFF=i,t=this.delegate.config.sl_yOffset,(i=w.getFrameForBoxWithMode(this.imgSize,w.Size(this.size.width-2*e,this.size.height-2*t),!1,!1)).x+=e,i.y+=t,this.imageFrameNF=i,this.imgScale=Math.min(this.imgSize.width/i.width,this.MaxScale),this.imgScaleFF=this.imageFrameFF.height/i.height,"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(e){this.itemImg.style.left="".concat(e.x,"px"),this.itemImg.style.top="".concat(e.y,"px"),this.itemImg.style.width="".concat(e.width,"px"),this.itemImg.style.height="".concat(e.height,"px"),this.imageFramePr=e}},{key:"subContentFrame",set:function(e){this.subContentHolder.style.left="".concat(e.x,"px"),this.subContentHolder.style.top="".concat(e.y,"px"),this.subContentHolder.style.width="".concat(e.width,"px"),this.subContentHolder.style.height="".concat(e.height,"px")}},{key:"checkOffset",value:function(e,t){var i=this.imageScaledFF?this.imageFrameFF:this.imageFrame;if(t!==this.boundingBoxScale){var n=i.width*(t||1),a=i.height*(t||1),o=i.x*(t||1),s=i.y*(t||1);this.boundingBox={left:n>this.size.width?-o:(this.size.width-this.size.width*t)/2,top:a>this.size.height?-s:(this.size.height-this.size.height*t)/2,right:n>this.size.width?this.size.width-(o+n):(this.size.width-this.size.width*t)/2,bottom:a>this.size.height?this.size.height-(s+a):(this.size.height-this.size.height*t)/2},this.boundingBoxScale=t}var r=e.x>this.boundingBox.left?this.boundingBox.left:e.x;r=r<this.boundingBox.right?this.boundingBox.right:r;var l=e.y>this.boundingBox.top?this.boundingBox.top:e.y;return l=l<this.boundingBox.bottom?this.boundingBox.bottom:l,w.Point(r,l)}},{key:"isPointInItem",value:function(e){var t=this.viewTranslate.x+this.size.width/2*this.newScale-this.imageFrame.width/2*this.newScale,i=t+this.imageFrame.width*this.newScale,n=this.size.height/2*this.newScale+this.viewTranslate.y-this.imageFrame.height/2*this.newScale*this.newScale,a=n+this.imageFrame.height*this.scale*this.newScale;return e.x>t&&e.x<i&&e.y>n&&e.y<a}},{key:"normalize",value:function(e){w.cancelAnimationFrame(this.animaSliderRender),e?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(e,t){if("image"===this.item.type){w.cancelAnimationFrame(this.animaSliderRender);var i=t.x-this.viewTranslate.x,n=t.y-this.viewTranslate.y,a=i/this.scale,o=n/this.scale,s=t.x-a*e,r=t.y-o*e,l=w.Point(s,r);this.stopRenderTransform=!0,this.renderTransformTo(this.checkOffset(l,e),e)}}},{key:"zoomByScaleIter",value:function(e,t){if("image"===this.item.type){var i=e<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(t.x-i*(t.x-this.origin.x),t.y-i*(t.y-this.origin.y)),this.stopRenderTransform=!0,this.renderTransformTo(this.checkOffset(this.origin,this.newScale),this.newScale)}}},{key:"zoomByScaleDeltaToPoint",value:function(e,t){if(this.delegate.pinchToZoom&&"image"===this.item.type){var i;w.cancelAnimationFrame(this.animaSliderRender);var n=e/this.startDistForZoom,a=0;(i=this.startDistForZoom/this.startScale*n/(this.startDistForZoom/this.startScale)*this.startScale)>this.MaxScale&&(a=.8*-(i-this.MaxScale)),i+=a;var o=this.startGlobalPoint.x-this.startTranslate.x,s=this.startGlobalPoint.y-this.startTranslate.y,r=o/this.newScale,l=s/this.newScale,c=this.startGlobalPoint.x-r*i,h=this.startGlobalPoint.y-l*i,d=w.Point(c-t.x,h-t.y);this.scale=i,this.newScale=i,this.viewTranslate=d,this.startTranslate=w.Point(c,h)}}},{key:"viewTranslate",get:function(){return this.viewTranslatePr},set:function(e){this.viewTranslatePr=e,this.itemInner.style.transform="matrix(".concat(this.scale,", 0, 0, \n        ").concat(this.scale,", ").concat(e.x,", ").concat(e.y,")")}},{key:"renderTransformByDelta",value:function(e,t){if(!this.stopRenderTransform){var i=w.Point(this.targetPoint.x-e,this.targetPoint.y-t);i=this.checkOffset(i,this.scale),this.renderTransformTo(i,this.scale)}}},{key:"renderTransformTo",value:function(e,t){var i=this;w.cancelAnimationFrame(i.animaSliderRender),this.origin=e,this.targetPoint=e,this.newScale=t;var n=0,a=0,o=0,s=.05,r=.22;i.animaSliderRender=w.requestAnimationFrame((function l(){n=n*s+(e.x-i.viewTranslate.x)*r,a=a*s+(e.y-i.viewTranslate.y)*r,t&&(o=o*s+(t-i.scale)*r);var c=i.viewTranslate.x;c+=n;var h=i.viewTranslate.y;h+=a,t&&(i.scale+=o),i.viewTranslate=w.Point(c,h),Math.abs(n)<.02&&Math.abs(a)<.02&&Math.abs(o)<.02?(w.cancelAnimationFrame(i.animaSliderRender),t&&(i.scale=t),i.viewTranslate=w.Point(e.x,e.y),i.stopRenderTransform=!1):i.animaSliderRender=w.requestAnimationFrame(l)}))}},{key:"renderGlidingTransform",value:function(){var e=this;w.cancelAnimationFrame(e.animaSliderRender);var t=.95,i=.95;e.animaSliderRender=w.requestAnimationFrame((function n(){e.speedX*=t,e.speedY*=i;var a=e.viewTranslate.x;a+=e.speedX;var o=e.viewTranslate.y;if(o+=e.speedY,a>e.boundingBox.left||a<e.boundingBox.right){e.speedX*=-1;var s=a<e.boundingBox.right?e.boundingBox.right:a;a=a>e.boundingBox.left?e.boundingBox.left:s,a+=e.speedX,t=.75}if(o>e.boundingBox.top||o<e.boundingBox.bottom){e.speedY*=-1;var r=o<e.boundingBox.bottom?e.boundingBox.bottom:o;o=o>e.boundingBox.top?e.boundingBox.top:r,o+=e.speedY,i=.75}e.origin=w.Point(a,o),e.viewTranslate=w.Point(a,o),Math.abs(e.speedX)<.02&&Math.abs(e.speedY)<.02?(w.cancelAnimationFrame(e.animaSliderRender),e.speedX=0,e.speedY=0):e.animaSliderRender=w.requestAnimationFrame(n)}))}},{key:"renderStretchstretchTransform",value:function(){var e=this;w.cancelAnimationFrame(e.animaSliderRender);var t=this.checkOffset(w.Point(e.viewTranslate.x+e.speedX,e.viewTranslate.y+e.speedY),e.scale),i=0,n=0;e.animaSliderRender=w.requestAnimationFrame((function a(){i=.2*i+.15*(t.x-e.viewTranslate.x),n=.2*n+.15*(t.y-e.viewTranslate.y);var o=e.viewTranslate.x+i,s=e.viewTranslate.y+n;e.viewTranslate=w.Point(o,s),Math.abs(i)<.02&&Math.abs(n)<.02?(w.cancelAnimationFrame(e.animaSliderRender),e.viewTranslate=t):e.animaSliderRender=w.requestAnimationFrame(a)}))}},{key:"startDrag",value:function(e,t){w.cancelAnimationFrame(this.animaSliderRender),"image"===this.item.type&&(this.startDistForZoom=t,this.startGlobalPoint=e,this.startTranslate=this.viewTranslate,this.speedX=0,this.speedY=0,this.newX=this.viewTranslate.x,this.newY=this.viewTranslate.y,this.startScale=this.scale)}},{key:"stopDrag",value:function(){if("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 e=this.checkOffset(this.origin,this.newScale);this.isBlockDraging=e.x!==this.origin.x||e.y!==this.origin.y,this.isBlockDraging&&this.renderStretchstretchTransform()}this.draging&&(this.isBlockDraging?this.renderStretchstretchTransform():this.renderGlidingTransform(),this.stopRenderTransform=!1,this.draging=!1)}}},{key:"dragin",value:function(e){if("image"!==this.item.type)return!1;var t=this.startTranslate.x-e.x,i=this.startTranslate.y-e.y,n=this.checkOffset(w.Point(t,i),this.newScale);return this.isBlockDraging=n.x!==t||n.y!==i,t-=.7*(t-n.x),i-=.7*(i-n.y),this.oldX=this.newX,this.newX=t,this.speedX=.7*(this.newX-this.oldX),this.oldY=this.newY,this.newY=i,this.speedY=.7*(this.newY-this.oldY),this.origin=w.Point(t,i),this.viewTranslate=w.Point(t,i),this.draging=!0,!0}},{key:"action",value:function(e,t){if(this.item)switch(e){case"click":if(t&&"enter"===t)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,t||this.videoContent.play()),t&&"space"===t){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 e=this.item.mime_type.split("/")[1];if(!e)return;this.view.classList.add("video-play");var t,i=this.item.videoId,n=this.delegate,a=this;switch(n.onYtStatusChange(void 0),e){case"youtube":if(void 0===window.YT){var o=document.createElement("script");o.src="https://www.youtube.com/iframe_api";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(o,s)}if(this.subContentHolder.innerHTML='<div id="'+i+'" data-id="sgb-video-player" data-gallery="'+n.appName+'" ></div>',window.YT){var r=window.YT,l={autoplay:1,frameborder:0,playlist:i,loop:n.config.sl_video_loop?1:0,rel:0};n.config.sl_video_loop||(delete l.playlist,delete l.loop);var c=new r.Player(i,{videoId:i,playerVars:l,events:{onReady:function(){n.onYtStatusChange("onReady")},onStateChange:function(e){1===e.data&&n.setVideoPlayer(c,"yt",a),n.onYtStatusChange(e.data)}}});n.setVideoPlayer(c,"yt",a)}else window.onYouTubeIframeAPIReady=function(){var e=window.YT,t={autoplay:1,frameborder:0,playlist:i,loop:n.config.sl_video_loop?1:0,rel:0};n.config.sl_video_loop||(delete t.playlist,delete t.loop);var o=new e.Player(i,{videoId:i,playerVars:t,events:{onReady:function(){n.onYtStatusChange("onReady")},onStateChange:function(e){1===e.data&&n.setVideoPlayer(o,"yt",a),n.onYtStatusChange(e.data)}}})};break;case"vimeo":t=(t=w.vimeoCode.replace("%id%",this.item.videoId)).replace("%hash%",this.item.videoHash?"h="+this.item.videoHash+"&":""),this.subContentHolder.innerHTML=t;var h=this.subContentHolder.querySelector('[data-id="sgb-video-player"]');if(h)if(h.setAttribute("data-gallery",n.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 e=new Vimeo.Player(h);n.config.sl_video_loop&&e.setLoop(!0),e.on("play",(function(e){n.onYtStatusChange("onReady")})),e.on("ended",(function(e){n.onYtStatusChange(0)})),e.on("play",(function(t){n.onYtStatusChange(1),n.setVideoPlayer(e,"vimeo",a)}))}}}else if(window.Vimeo){var m=new Vimeo.Player(h);n.config.sl_video_loop&&m.setLoop(!0),m.on("play",(function(e){n.onYtStatusChange("onReady")})),m.on("ended",(function(e){n.onYtStatusChange(0)})),m.on("play",(function(e){n.onYtStatusChange(1),n.setVideoPlayer(m,"vimeo",a)}))}}this.isEmbedContent=!0}}},{key:"removeEmbedVideoContent",value:function(){this.isEmbedContent&&(this.subContentHolder.innerHTML=new Oe(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 e=this;this.itemInner.style.animationName="pgc-rev-fade-in",this.fadeAnimClear=setTimeout((function(){e.fadePrep()}),600)}}],[{key:"classPref",get:function(){return"pgc-rev-slider-page-"}}])}(),He=function(){function e(t,i){Pe(this,e),this.iconSet=e.ICONS,this.config=e.CONFIG,w.copyProperties(i,this.config),this.appSet=t,this.appName=t.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(e.classPref,"view"),this.view.id="".concat(this.id,"main"),this.resizeDelay=void 0,this.size=w.Size(0,0);var n=document.createElement("div");n.className="".concat(e.classPref,"bg"),this.config.sl_backgroundColor&&(this.background=n,this.background.style.backgroundColor=this.config.sl_backgroundColor,this.view.appendChild(n)),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(e.classPref,"wrap"),this.view.appendChild(this.slider),this.autoStartActionDelay=void 0,this._ytStatus=void 0}return Me(e,[{key:"setYOffset",value:function(e){this.config.sl_yOffset=e,this.resizeHandler(this.size)}},{key:"onYtStatusChange",value:function(t){this._ytStatus=t,this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.YT_ON_CHANGE_STATUS,this,{status:t,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(e){e?this.view.classList.add("isDragging"):this.view.classList.remove("isDragging"),this.draggingPr=e}},{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 t,i=this;return function(n){if(!w.Device.ios||"mouseup"!==n.type){var a,o;n.changedTouches&&n.changedTouches[0]?(a=n.changedTouches[0].pageX,o=n.changedTouches[0].pageY):(a=n.pageX,o=n.pageY),a-=i.viewOfsetX,o-=i.viewOfsetY;var s=i.itemsList[i.itemIndex];if(s.webView&&s.webView===n.target||n.target.className&&"pgc-rev-slider-page-sub-content-holder"===n.target.className||n.target.className&&("lb-video-content"===n.target.className||"lb-audio-content"===n.target.className)){n.preventDefault();var r=document.getElementById("gm_copyr");r&&(clearTimeout(t),r.parentNode.removeChild(r),r=null),(r=document.createElement("div")).id="gm_copyr",r.className="".concat(e.classPref,"hints"),r.innerHTML=s.user&&s.user.displayname?"Hey, this photo is &#169;".concat(s.user.displayname):i.config.sl_copyR_Alert,s.copyright&&""!==s.copyright&&(r.innerHTML=s.copyright),r.style.top="".concat(o,"px"),r.style.left="".concat(a,"px"),i.view.appendChild(r),t=setTimeout((function(){r.parentNode.removeChild(r)}),1e3)}}}}},{key:"initByStage",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.appendChild(this.view),t&&this.createControlls()}},{key:"addToStage",value:function(){var t=this,i=document.getElementsByTagName("body")[0];this.view.style.zIndex=w.findHighestZIndex(i)+1,w.disableBodyScrollSlider(),i.appendChild(this.view),setTimeout((function(){t.view.classList.add("".concat(e.classPref,"activate"))}),30)}},{key:"initByList",value:function(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e&&e.length>0){var n=this;if(this.currentItemIndex=t&&0!==t?0:void 0,this.startItemIndex=t||0,this.itemsList=e,!i)return void n.createLayout();this.createlayoutDelay=setTimeout((function(){n.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(e.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(e.EVENTS.REMOVE_LIGHTBOX,this,{}));for(var t=0;t<this.sliderPages.length;t+=1){this.sliderPages[t].clearPage();var i=this.sliderPages[t].view;i.parentNode&&i.parentNode.removeChild(i)}this.sliderPages=[],this.removing=!1}}},{key:"remoteControl",value:function(t){if(this.startDragHandler||"esc"===t)switch(t){case"prev":this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{draging:!0})),this.gotoPrev();break;case"next":this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.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),t);break;case"esc":this.prepareToRemove();break;case"zoom":this.zoomSwitch()}}},{key:"showPreloader",value:function(e){var t;if(e){if(document.getElementById("".concat(this.appName,"slider_preloader")))return;(t=w.createPreloaderView(this.config.sl_preloaderColor)).id="".concat(this.appName,"slider_preloader"),this.view.appendChild(t)}else(t=document.getElementById("".concat(this.appName,"slider_preloader")))&&w.fadeOut(t,(function(){t&&t.parentNode&&t.parentNode.removeChild(t)}),500)}},{key:"createLayout",value:function(){var t=this;this.itemsAmount=this.itemsList.length,this.size=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(){t.showControlls(!0),t.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,t,{status:"ready"}))}),500)}},{key:"initDownloadProtection",value:function(e,t){t&&(this.config.sl_copyR_Alert=t),e?(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=e}},{key:"itemIndex",get:function(){return this.itemNumPr},set:function(e){this.itemNumPr=e,this.updateControlls()}},{key:"pageConstructor",get:function(){return new De(this)}},{key:"initSlider",value:function(){var e,t=0;if(0===this.sliderPages.length)for(t=0;t<3;t+=1)e=this.pageConstructor,this.slider.appendChild(e.view),this.sliderPages.push(e),e.resize(this.size);var i=this.itemsAmount>2?-1:0;for(t=0;t<3;t+=1)(e=this.sliderPages[t]).posX=i,e.itemIndex=void 0,i+=1;this.startDragHandler?this.gotoPageByNum(0):(this.startDragHandler=this.startDrag(),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(e){this.scrollViewTranslateYPr=e,this.slider.style.transform="translate3d(".concat(this.scrollViewTranslateX,"px,").concat(e,"px, 0px)"),0===e||this.canRemovedLite||this.sliderVerticalRender()}},{key:"scrollViewTranslateX",get:function(){return this.scrollViewTranslateXPr},set:function(e){this.scrollViewTranslateXPr=e,this.slider.style.transform="translate3d(".concat(e,"px,").concat(this.scrollViewTranslateY,"px, 0px)"),!1===this.config.sl_carouselMode&&(e>0||e<-this.size.width*(this.itemsAmount-1))||this.pageRenderByIndex(-Math.round(e/this.size.width))}},{key:"sliderVerticalRender",value:function(){var t=1-Math.abs(this.scrollViewTranslateY)/(this.size.height/2);this.background&&(this.background.style.opacity=t),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{backgroundOpacity:t})),this.needHideControlls||(t<.8?(this.showHideNaviButton("hide"),this.showControlls(!1)):(this.showHideNaviButton("show"),this.showControlls(!0)))}},{key:"tryOpenItemID",value:function(e){for(var t=0;t<this.itemsList.length;t+=1)if(this.itemsList[t].ID===e)return this.gotoPageByNum(t),!0;return!1}},{key:"gotoPageByNum",value:function(e){this.currentItemIndex!==e?this.gotoPageByIndex(e,!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(e){var t=this;w.cancelAnimationFrame(t.animaSliderRender);var i=5*t.speedX,n=5*t.speedY;t.animaSliderRender=w.requestAnimationFrame((function a(){i=.2*i+.15*(e.x-t.scrollViewTranslateX),n=.2*n+.15*(e.y-t.scrollViewTranslateY),t.scrollViewTranslateX+=i,t.scrollViewTranslateY+=n,Math.abs(i)<1&&Math.abs(n)<1&&(t.dragging=!1),Math.abs(i)<.1&&Math.abs(n)<.1?(w.cancelAnimationFrame(t.animaSliderRender),t.scrollViewTranslateX=e.x,t.scrollViewTranslateY=e.y,t.sliderTransitionComplete({target:t.slider})):t.animaSliderRender=w.requestAnimationFrame(a)}))}},{key:"gotoPageByIndex",value:function(e,t){if(void 0!==this.size.width&&0!==this.size.width){(this.itemsAmount<3||!1===this.config.sl_carouselMode)&&(e=Math.max(0,e),e=Math.min(this.itemsAmount-1,e));var i=-e*this.size.width;t?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(e){if(void 0===e||this.currentItemIndex!==e){void 0!==this.pageInFocus&&(this.pageInFocusPrev=this.pageInFocus,this.pageInFocusPrev.action("removeSubContent"),this.pageInFocus.isInScale&&(this.zoomingPage=this.pageInFocus));var t=0;if(this.itemsAmount<3){for(t=0;t<this.itemsAmount;t+=1)this.sliderPages[t].initByItem(this.itemsList[t]);return this.pageInFocus=this.sliderPages[e],this.currentItemIndex=e,void(this.itemIndex=e)}var i=(e+1)%3;i<0&&(i+=3);var n=i-1>=0?i-1:2,a=i+1<3?i+1:0,o=[n,i,a],s=[e-1,e,e+1];for(t=0;t<o.length;t+=1)this.sliderPages[o[t]].posX=s[t];this.currentItemIndex=e,this.pageInFocus=this.sliderPages[i],this.itemIndex=e<0?this.itemsAmount+(e%this.itemsAmount==0?-this.itemsAmount:e%this.itemsAmount):e%this.itemsAmount,this.sliderPages[i].initByItem(this.itemsList[this.itemIndex]),this.sliderPages[a].initByItem(this.itemIndex+1<this.itemsAmount?this.itemsList[this.itemIndex+1]:this.config.sl_carouselMode?this.itemsList[0]:void 0),this.sliderPages[n].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 e=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(t){t?e.videoPlayer.play():e.videoPlayer.pause()})):"html"===this.videoPlayerType&&(this.videoPlayer.paused?this.videoPlayer.play():this.videoPlayer.pause())}catch(e){Ne(e)}}},{key:"tryPausedVideo",value:function(e){if(void 0!==this.videoInPlayer&&this.videoInPlayer!==e&&this.videoPlayer)try{"html"===this.videoPlayerType||"vimeo"===this.videoPlayerType?this.videoPlayer.pause():"yt"===this.videoPlayerType&&this.videoPlayer.pauseVideo(),this.externalPause=!0}catch(e){Ne(e)}}},{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(e){Ne(e)}}},{key:"setVideoPlayer",value:function(e,t,i){this.videoPlayerType=t,this.videoPlayer=e,this.externalPause=!1,i?(this.videoInPlayer=i.item.id,this.videoAutoStarted=i.item.id):this.videoInPlayer=void 0}},{key:"tryAutoStartVideo",value:function(e){this.config.sl_video_auto_start&&this.pageInFocus.item&&this.videoAutoStarted!==e&&"video"===this.pageInFocus.item.type&&this.pageInFocus.item.id===e&&window&&void 0===window.pgcVideoAutostartLock&&(this.videoAutoStarted=e,this.firstClick(w.Point(this.view.clientWidth/2,this.view.clientHeight/2),"space"))}},{key:"sliderTransitionComplete",value:function(e){var t=this;if(e.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(){t.tryAutoStartVideo(t.pageInFocus.item.id)}),600))),void 0!==this.zoomingPage&&this.zoomingPage!==this.pageInFocus&&(this.zoomingPage.normalize(),this.zoomControll())}}},{key:"mouseWheelHandler",value:function(){var t=this,i=Date.now(),n=[],a=[],o=400,s=0;return t.handlerMWheel=function(r){if(!1!==t.mouseWheelMode||!1!==t.config.sl_mouseWheelPagination||t.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(t.config.sl_mouseWheelPagination&&!t.isZoom){var c=Math.abs(l.y)>Math.abs(l.x)?l.y:-l.x,h=Date.now();0===n.length&&n.push(h),h-n[0]<o?(a.length>0&&a[a.length-1]!==c&&(s+=1),a.push(c),n.push(h)):(o=s>3?1100:500,a=[],n=[],s=0),h-i>o&&(c>0?t.gotoNext():t.gotoPrev(),t.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,t,{draging:!0})),i=h)}else t.zoomingPage&&!t.dragging&&t.zoomingPage.renderTransformByDelta(l.x,l.y)}},t.handlerMWheel}},{key:"zoomSwitch",value:function(){var e=w.Point(this.view.clientWidth/2,this.view.clientHeight/2);this.secondClick(e)}},{key:"isZoom",get:function(){return!!this.pageInFocus&&this.pageInFocus.isInScale}},{key:"fitMode",value:function(e){this.config.sl_fit&&(this.FF_Mode=e);for(var t=0;t<this.sliderPages.length;t+=1)this.sliderPages[t].fit()}},{key:"firstClick",value:function(e,t){var i;if(this.pageInFocus?i=this.pageInFocus.action("click",t):this.prepareToRemove(),this.pageInFocus.isPointInItem(e)||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(e)?(this.fitMode(!0),this.showControlls(!1),this.needHideControlls=!this.isControllsShow):(this.switchShowControlls(),this.needHideControlls=!this.isControllsShow);break;case"videoStop":this.pageInFocus.isPointInItem(e)?(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(e){this.config.sl_zoom&&this.pageInFocus.isPointInItem(e)&&(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,e),this.needHideControlls=!this.isControllsShow,this.showControlls(!1)))}},{key:"doubleClickController",value:function(e){var t=this;if(!w.Device.ios||"mouseup"!==e.type){var i,n;if(e.changedTouches&&e.changedTouches[0]?(i=e.changedTouches[0].pageX,n=e.changedTouches[0].pageY):(i=e.pageX,n=e.pageY),i-=this.viewOfsetX,n-=this.viewOfsetY,this.firsrTap)return clearTimeout(this.firsrTap),this.firsrTap=void 0,void this.secondClick(w.Point(i,n));this.firsrTap=setTimeout((function(){t.firsrTap=void 0,t.firstClick(w.Point(i,n))}),400)}}},{key:"startDrag",value:function(){var t,i,n,a,o,s,r,l,c,h=this,d=h.viewOfsetY,u=h.viewOfsetX,m=0,p=0,g=0;function v(e){var t,l,c,v,f;if(e.originalEvent&&(e=e.originalEvent),e.touches?!h.dragging&&e.touches.length>1?h.config.sl_zoom&&(r=!0,t=e.touches[0].pageX,l=e.touches[0].pageY,c=e.touches[1].pageX,v=e.touches[1].pageY,f=Math.hypot(t-c,l-v),t+=(c-t)/2,l+=(v-l)/2):(r=!1,t=e.touches[0].pageX,l=e.touches[0].pageY):(t=e.pageX,l=e.pageY),t-=u,l-=d,!(w.Device.ios&&i<=20)){var y,b;if(void 0===s&&(l===n?s=!1:(y=180*Math.atan2(Math.abs(l-n),Math.abs(t-i))/Math.PI,s=y>45)),!h.dragging&&h.zoomingPage){e.preventDefault();var C=Math.abs(i-t)>4?i-t:0,S=Math.abs(n-l)>4?n-l:0;return(C||S)&&(h.zoomingDrag=!0),void(r?h.pageInFocus.zoomByScaleDeltaToPoint(f,w.Point(C,S),w.Point(t,l)):h.zoomingPage&&h.zoomingPage.dragin(w.Point(C,S)))}s?(m=0,(b=Math.abs(n-l)>4?n-l:0)&&(h.dragging=!0),(h.config.sl_canRemoved||h.canRemovedLite)&&(h.scrollViewTranslateY=o-b)):(e.preventDefault(),h.transition=!0,(b=Math.abs(i-t)>4?i-t:0)&&(h.dragging=!0),h.scrollViewTranslateX=a-b,p=g,g=h.scrollViewTranslateX,m=g-p)}}function f(e){if(s=void 0,w.isTouchDevice&&(document.removeEventListener("touchmove",v,w.passiveListener),document.removeEventListener("touchend",f,w.passiveListener)),document.removeEventListener("mousemove",v,!1),document.removeEventListener("mouseup",f,!1),document.removeEventListener("contextmenu",f,!1),h.dragging||r||h.zoomingDrag){if(h.zoomingPage&&(h.zoomingPage.stopDrag(),r=!1),!h.zoomingPage)if(Math.abs(h.scrollViewTranslateY)<4){var i=h.currentItemIndex,n=w.isTouchDevice?7:1;Math.abs(m)>n&&t===h.currentItemIndex&&(i=m>0?i-1:i+1),h.speedX=m,h.scrollViewTranslateY=0,h.gotoPageByIndex(i,!0)}else{var a=h.scrollViewTranslateY/(h.size.height/2);Math.abs(a)>.2?h.canRemovedLite?h.blackMilkEvent&&(h.scrollViewTranslateY=0,h.blackMilkEvent()):h.prepareToRemove():h.renderTransformTo(w.Point(h.scrollViewTranslateX,0))}this.dragging=!1}else h.doubleClickController(e);h.zoomingDrag=!1,c=e.type}return function(s){var y,b,C,S;"mousedown"===s.type&&"touchend"===c||(h.zoomingPage=h.pageInFocus.isInScale?h.pageInFocus:void 0,w.cancelAnimationFrame(h.animaSliderRender),t=h.currentItemIndex,s.originalEvent&&(s=s.originalEvent),w.isTouchDevice||s.preventDefault(),s.button&&0!==s.button||(s.touches?!h.dragging&&s.touches.length>1?h.config.sl_zoom&&(r=!0,y=s.touches[0].pageX,b=s.touches[0].pageY,C=s.touches[1].pageX,S=s.touches[1].pageY,l=Math.hypot(y-C,b-S),y+=(C-y)/2,b+=(S-b)/2,h.zoomingPage=h.pageInFocus,h.needHideControlls=h.isControllsShow,h.showControlls(!1)):(y=s.touches[0].pageX,b=s.touches[0].pageY):(y=s.pageX,b=s.pageY),y-=u,b-=d,h.speedX=0,h.speedY=0,m=0,p=0,g=h.scrollViewTranslateX,i=y,n=b,a=h.scrollViewTranslateX,o=h.scrollViewTranslateY,h.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,h,{draging:!0})),h.zoomingPage&&h.zoomingPage.startDrag(w.Point(i,n),l),w.isTouchDevice&&(document.addEventListener("touchmove",v,w.passiveListener),document.addEventListener("touchend",f,w.passiveListener)),document.addEventListener("mousemove",v,!1),document.addEventListener("mouseup",f,!1),document.addEventListener("contextmenu",f,!1)))}}},{key:"createControlls",value:function(){var t=this;function i(e){e.style.backgroundColor=t.config.sl_navigationColorOver,e.childNodes[0].style.fill=t.config.sl_navigationIconColorOver,e.classList.add("hover")}function n(e){e.style.backgroundColor=t.config.sl_navigationColor,e.childNodes[0].style.fill=t.config.sl_navigationIconColor,e.classList.remove("hover")}this.prevButton=document.createElement("div"),this.prevButton.className="".concat(e.classPref,"next-prev-button"),this.prevButton.style.left="".concat(0,"px"),this.prevButton.style.transform="translate(-150%, -50%)",this.prevButton.style.backgroundColor=t.config.sl_navigationColor,this.prevButton.style.visibility="hidden",this.prevButton.innerHTML=w.ICONS.PREV_ARR,this.prevButton.childNodes[0].style.fill=t.config.sl_navigationIconColor,this.prevButton.onmouseenter=function(){i(this)},this.prevButton.onmouseleave=function(){n(this)},this.prevButton.onclick=function(){t.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,t,{draging:!0})),t.gotoPrev(),w.Device.desktop||n(this)},this.view.appendChild(this.prevButton),this.nextButton=document.createElement("div"),this.nextButton.className="".concat(e.classPref,"next-prev-button"),this.nextButton.style.backgroundColor=t.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=t.config.sl_navigationIconColor,this.nextButton.onmouseenter=function(){i(this)},this.nextButton.onmouseleave=function(){n(this)},this.nextButton.onclick=function(){t.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,t,{draging:!0})),t.gotoNext(),w.Device.desktop||n(this)},this.view.appendChild(this.nextButton)}},{key:"switchShowControlls",value:function(){this.showControlls(!this.isControllsShow)}},{key:"showHideNaviButton",value:function(t){if(this.naviButtonsStatus!==t){switch(t){case"show":if(this.isZoom)return;this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.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(e.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=t}}},{key:"zoomControll",value:function(){this.isZooming!==this.isZoom&&(this.isZooming=this.isZoom,this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.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(t){this.zoomControll(),this.isControllsShow!==t&&(t?(this.slider.classList.add("pgc-show-controls"),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{controls:"show"})),this.showHideNaviButton("show")):(this.slider.classList.remove("pgc-show-controls"),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{controls:"hide"})),w.miniScreen&&this.showHideNaviButton("hide")),this.isControllsShow=t)}},{key:"updateControlls",value:function(){this.itemsAmount<3||!1===this.config.sl_carouselMode?(0===this.itemIndex?(this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{prev:"hide"})),this.canPrev=!1,this.prevButton&&(this.prevButton.style.visibility="hidden")):(this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.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(e.EVENTS.UPDATE_CONTROLS,this,{next:"hide"})),this.canNext=!1,this.nextButton&&(this.nextButton.style.visibility="hidden")):(this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.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(e.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(e.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 t=this.itemsList[this.itemIndex];t&&this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{item:t,itemIndex:this.itemIndex}))}},{key:"resizeHandler",value:function(e){var t=this;this.resizeDelay&&clearTimeout(this.resizeDelay),w.cancelAnimationFrame(this.animaSliderRender),this.resizeDelay=setTimeout((function(){if(t.size=e,t.prevButton&&(t.size.width<500?(t.prevButton.classList.add("next-prev-button-mini-screen"),t.nextButton.classList.add("next-prev-button-mini-screen")):(t.prevButton.classList.remove("next-prev-button-mini-screen"),t.nextButton.classList.remove("next-prev-button-mini-screen"))),0!==t.sliderPages.length){for(var i=0;i<t.sliderPages.length;i+=1)t.sliderPages[i].resize(t.size);t.zoomControll(),t.gotoPageByIndex(t.currentItemIndex,!1),t.size.height<410&&t.config.sl_canRemoved&&(t.showControlls(!1,!0),t.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}}}])}(),Ae=i(5472),Ve=i.n(Ae),ze={};function Ge(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Re(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Ge(Object(i),!0).forEach((function(t){Fe(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Ge(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Fe(e,t,i){return(t=Ue(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function We(e){return We="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},We(e)}function je(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ye(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ue(n.key),n)}}function Xe(e,t,i){return t&&Ye(e.prototype,t),i&&Ye(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ue(e){var t=function(e){if("object"!=We(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=We(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==We(t)?t:t+""}ze.styleTagTransform=u(),ze.setAttributes=l(),ze.insert=s().bind(null,"head"),ze.domAPI=a(),ze.insertStyleElement=h(),t()(Ve(),ze),Ve()&&Ve().locals&&Ve().locals,w.trace;var qe=function(){function e(t,i){je(this,e),this.delegate=t,this.appSet=this.delegate.appSet,this.appName=t.appName,this.config=e.CONFIG,w.copyProperties(i,this.config);var n='<svg class="'.concat(e.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(e.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(e.classPref,'progress-radial-track" cx="50" cy="50" r="50" stroke-width="0" opacity="1"/>\n          <path class="').concat(e.classPref,'progress-radial-bar" transform="translate(50, 50)"d="M 0 0"></path></g></svg>');this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"wrap"),this.view.innerHTML=n,this.bar=this.view.getElementsByClassName("".concat(e.classPref,"progress-radial-bar"))[0],this.bar.style.fill=this.config.ap_autoPlayColor,this.view.getElementsByClassName("".concat(e.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 Xe(e,[{key:"drawProgress",value:function(t){if(!isNaN(t)){t=e.clamp(parseFloat(t),0,1);var i=e.clamp(360*t,0,359.99999),n=i*Math.PI/180,a=51*Math.sin(n),o=-51*Math.cos(n),s=i>180?1:0,r="M 0 0 v -%@ A %@ %@ 1 ".replace(/%@/gi,51),l="".concat(r+s," 1 ").concat(a," ").concat(o," z");this.bar.setAttribute("d",l)}}},{key:"switch",value:function(){"play"===this.status?this.clear():this.start()}},{key:"start",value:function(){var t=this;this.view.style.opacity=1;var i=1/this.durationCount;this.interval=setInterval((function(){t.counter+=1,t.counter>=t.durationCount&&(clearInterval(t.interval),t.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.NEXT_SLIDE,t,{})),t.counter=0,t.start()),t.drawProgress(i*t.counter)}),1e3/this.animRatio),"play"!==this.status&&(this.status="play",t.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.PLAY,t,{status:this.status})))}},{key:"pause",value:function(){clearInterval(this.interval),this.status="pause"}},{key:"clear",value:function(){clearInterval(this.interval),this.counter=0,this.drawProgress(0),this.view.style.opacity=0,this.status="stop",this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.PLAY,this,{status:this.status}))}}],[{key:"classPref",get:function(){return"pgc-rev-lb-d-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(e,t,i){return Math.max(t,Math.min(i,e))}}])}(),Ze=function(){function e(t,i){var n=this;je(this,e),this.config=e.CONFIG,w.copyProperties(t,this.config),this.item=void 0,this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view");var a=document.createElement("div");a.className="".concat(e.classPref,"info-wrapper"),a.style.textShadow="".concat(this.config.inf_bgCollor," 1px 1px 5px"),this.view.appendChild(a),this.config.inf_title&&(this.title=document.createElement("div"),this.title.className="".concat(e.classPref,"title"),this.title.style.fontSize="".concat(this.config.inf_titleSize,"px"),this.title.style.color=this.config.inf_titleColor,a.appendChild(this.title)),this.config.inf_description&&(this.description=document.createElement("div"),this.description.style.fontSize="".concat(this.config.inf_descriptionSize,"px"),this.description.style.color=this.config.inf_descriptionColor,this.description.className="".concat(e.classPref,"description"),a.appendChild(this.description)),this.config.inf_title||this.config.inf_description||(a.style.display="none"),i&&(this.subRender=i,this.readMoreButton=document.createElement("div"),this.readMoreButton.className="".concat(e.classPref,"read-more"),this.readMoreButton.innerHTML=w.ICONS.MORE_SVG,this.readMoreButton.style.fill="white",this.view.appendChild(this.readMoreButton),this.readMoreButton.onclick=function(){n.subBar?n.removeSubContent():n.addSubContent()}),this.config.inf_title||this.config.inf_description||i||(this.view.style.padding="unset")}return Xe(e,[{key:"setItem",value:function(t){if(this.item=t,this.title&&(this.title.innerHTML=t.title?t.title:""),this.description){var i=t[this.config.inf_descriptionSrc]?t[this.config.inf_descriptionSrc]:"";this.description.innerHTML=i}this.subRender&&(this.subRender.item(t)?this.readMoreButton.classList.add("".concat(e.classPref,"activate")):this.readMoreButton.classList.remove("".concat(e.classPref,"activate")))}},{key:"addSubContent",value:function(){this.subBar=this.subRender.view,this.subBar.classList.add("".concat(e.classPref,"sub-info-wrapper")),this.view.appendChild(this.subBar)}},{key:"removeSubContent",value:function(){this.subBar&&(this.view.removeChild(this.subBar),delete this.subBar)}}],[{key:"classPref",get:function(){return"pgc-rev-lb-d-informer-"}},{key:"CONFIG",get:function(){return{inf_title:!1,inf_titleSize:18,inf_titleColor:"rgba(255,255,255,1)",inf_description:!1,inf_descriptionSrc:"description",inf_descriptionSize:13,inf_descriptionColor:"rgba(255,255,255,1)",inf_bgCollor:"rgba(0,0,0,1)"}}}])}(),Ke=function(){return Xe((function e(t,i){var n=this;je(this,e),this.thumsBarHandler=this.thumsBarHandler.bind(this),this.appSet=t,this.config=qe.CONFIG,w.copyProperties(i,this.config),this.scrollWidth=void 0,this.sctollLeftAccel=void 0,this.mouseWhellActivity=!1,this.mouseWhellTimeOut=void 0,this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.view.style.backgroundColor=this.config.thb_backgroundColor;var a=document.createElement("div");a.className="".concat(e.classPref,"bg"),a.onclick=function(){n.prepareToRemove()},this.view.appendChild(a);var o=document.createElement("div");o.className="".concat(e.classPref,"close"),o.innerHTML=w.ICONS.CLOSE_SVG,o.style.fill=this.config.thb_controlsColor,o.onclick=function(){n.prepareToRemove()},this.view.appendChild(o);var s=180;this.config.thb_startWidth&&(s=Math.floor(this.config.thb_startWidth/Math.floor(this.config.thb_startWidth/200)));var r=oe.CONFIG;r.isb_itemBgColor=this.config.thb_thumbBarHoverColor,r.isb_block_pan_y=!0,r.isb_height=s,r.isb_thum_ration=1,r.isb_action_callback=this.thumsBarHandler,this.thumbsBar=new oe(this.appSet,r),this.view.appendChild(this.thumbsBar.view);var l=ue.CONFIG,c={margin:"unset",borderRadius:"".concat(w.miniScreen?3:5,"px")};l.scr_bar_size=w.miniScreen?6:10,l.scr_bar_trackColor=this.config.thb_scrollBarTrackColor,l.scr_bar_BarColor=this.config.thb_scrollBarColor,l.scr_bar_padding=10,this.scrollBarTrack=new ue(this.appSet,l,c),w.miniScreen&&this.scrollBarTrack.view.classList.add("pgc-mini-screen"),this.view.appendChild(this.scrollBarTrack.view)}),[{key:"initByItemsList",value:function(e,t){var i=this;this.thumbsBar.size=w.Size(this.view.clientWidth,0),this.thumbsBar.initByItemslist(e),this.thumbsBar.size=w.Size(this.view.clientWidth,0),this.thumbsBar.selectThumbByIndex(t),this.scrollWidth=this.thumbsBar.scroller.scrollWidth-this.thumbsBar.width,this.sctollLeftAccel=this.scrollLeft,this.view.addEventListener("wheel",this.mouseWheelHandler(),!1),this.appSet.appEventManager.addGMEventListener(ue.EVENTS.SCROLL_BAR_ACTION,this,"scrollBarTrackHandler"),this.thumbnailsAnimDelay=setTimeout((function(){i.view.classList.add("active")}),40)}},{key:"mouseWheelHandler",value:function(){var e,t=this,i=this.thumbsBar.scroller;return t.sctollLeftAccel=t.scrollLeft,this.handlerMWheel||(this.handlerMWheel=function(n){clearTimeout(t.mouseWhellTimeOut),!1===t.mouseWhellActivity&&(t.sctollLeftAccel=t.scrollLeft),t.mouseWhellActivity=!0,n.stopPropagation(),n.preventDefault();var a=w.Point(0,0);if("deltaX"in n)1===n.deltaMode?(a.x=18*n.deltaX,a.y=18*n.deltaY):(a.x=n.deltaX,a.y=n.deltaY);else if("wheelDelta"in n)n.wheelDeltaX&&(a.x=-.16*n.wheelDeltaX),n.wheelDeltaY?a.y=-.16*n.wheelDeltaY:a.y=-.16*n.wheelDelta;else{if(!("detail"in n))return;a.y=n.detail}t.mouseWhellTimeOut=setTimeout((function(){t.mouseWhellActivity=!1}),500);var o=Math.abs(a.y)>Math.abs(a.x)?a.y:a.x;void 0===e&&(e=Math.abs(o)>30),t.sctollLeftAccel+=o,t.sctollLeftAccel=Math.max(0,t.sctollLeftAccel),t.sctollLeftAccel=Math.min(t.sctollLeftAccel,t.scrollWidth),e?i.scrollLeftAnime=t.sctollLeftAccel:i.scrollLeft=t.sctollLeftAccel}),this.handlerMWheel}},{key:"scrollBarTrackHandler",value:function(e){var t=e.params,i=t.position,n=t.positionAnime;if(void 0!==i)return this.scrollLeft=i,void(this.sctollLeftAccel=i);void 0!==n&&(this.thumbsBar.scroller.scrollLeftAnime=n,this.sctollLeftAccel=n)}},{key:"thumsBarHandler",value:function(e){var t=e.scrollScale,i=e.scroll;this.scrollBarTrack&&void 0!==t&&(this.scrollBarTrack.scale=t),void 0!==i&&(this.scrollBarTrack.position=i)}},{key:"scrollLeft",get:function(){if(this.thumbsBar)return this.thumbsBar.scroller.scrollLeft},set:function(e){this.thumbsBar.scroller.scrollLeft=e}},{key:"resize",value:function(){this.thumbsBar.size=w.Size(this.view.clientWidth,0),this.scrollWidth=this.thumbsBar.scroller.scrollWidth-this.thumbsBar.width}},{key:"selectThumbByIndex",value:function(e){var t=this;clearTimeout(this.sliderGoDelay),this.sliderGoDelay=setTimeout((function(){t.thumbsBar&&t.thumbsBar.selectThumbByIndex(e)}),400)}},{key:"prepareToRemove",value:function(e){var t=this;clearTimeout(this.thumbnailsAnimDelay),this.view.removeEventListener("wheel",this.mouseWheelHandler(),!1),this.appSet.appEventManager.removeGMEventListener(ue.EVENTS.SCROLL_BAR_ACTION,this,"scrollBarTrackHandler"),this.view.style.opacity=0,this.thumbnailsAnimDelay=setTimeout((function(){t.view.parentNode&&t.view.parentNode.removeChild(t.view),t.thumbsBar.prepareToRemove(),t.scrollBarTrack.prepareToRemove(),delete t.thumbsBar;var e=t.config.thb_closeCallback;e&&"function"==typeof e&&e()}),e?0:500)}}],[{key:"classPref",get:function(){return"pgc-rev-lb-d-thumbs-"}},{key:"CONFIG",get:function(){return{thb_backgroundColor:"rgba(0,0,0,0.8)",thb_controlsColor:"rgba(255,255,255,1)",thb_thumbBarHoverColor:"rgba(255,255,255,1)",thb_scrollBarColor:"rgba(255,255,255,1)",thb_scrollBarTrackColor:"rgba(255,255,255,0.5)",thb_startWidth:void 0,thb_closeCallback:void 0}}}])}(),Je=function(){function e(t,i){var n=this;je(this,e),this.appSet=t,this.config=e.CONFIG,w.copyProperties(i,this.config),this.appName=t.appName,this.mouseMovingTimer=void 0,this.resizeDelay=void 0,this.sliderGoDelay=void 0,this.size=w.Size(0,0),this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.view.id="".concat(this.appName,"_lightbox"),this.view.dataset.galleryId=this.appName,this.styleSheet=document.createElement("style"),this.styleSheet.id="style_lb_".concat(this.appName),this.view.appendChild(this.styleSheet),this.updateStyleSheet(),w.miniScreen&&this.view.classList.add("miniScreen"),w.Device.desktop||(this.view.style.height="100%");var a=document.createElement("div");a.className="".concat(e.classPref,"bg"),this.background=a,this.backgroundOpacity=1,this.background.style.backgroundColor=this.config.lb_backgroundColor,this.view.appendChild(a),this.content=document.createElement("div"),this.content.className="".concat(e.classPref,"content");var o=He.CONFIG;if(o.sl_backgroundColor=!1,o.sl_preloaderColor=this.config.lb_preloaderColor,o.sl_carouselMode=this.config.lb_sliderCarouselMode,o.sl_FullSizeViewMode=this.config.lb_FullSizeViewMode,o.sl_navigationColor=this.config.lb_sliderNavigationColor,o.sl_navigationIconColor=this.config.lb_sliderNavigationIconColor,o.sl_navigationColorOver=this.config.lb_sliderNavigationColorOver,o.sl_navigationIconColorOver=this.config.lb_sliderNavigationIconColorOver,o.sl_fit=!0,o.sl_yOffset=w.miniScreen?0:35,o.sl_canRemoved=!0,o.sl_copyR_Alert=this.config.lb_copyR_Alert,o.sl_copyR_Proptection=this.config.lb_copyR_Proptection,o.sl_zoom=this.config.lb_zoom,o.sl_mouseWheel=this.config.lb_zoom,o.sl_audioPlayer=this.config.lb_audioPlayer,o.sl_mouseWheelPagination=this.config.lb_scrollNavi,o.sl_next_prev_animation=this.config.lb_sliderNextPrevAnimation,o.sl_video_auto_start=this.config.lb_videoAutoStart,o.sl_video_loop=this.config.lb_videoLoop,this.appSet.appEventManager.addGMEventListener(He.EVENTS.UPDATE_CONTROLS,this,"updateViewControls"),this.appSet.appEventManager.addGMEventListener(He.EVENTS.YT_ON_CHANGE_STATUS,this,"updateYTstatus"),this.appSet.appEventManager.addGMEventListener(He.EVENTS.REMOVE_LIGHTBOX,this,"prepareToRemove"),this.appSet.appEventManager.addGMEventListener(qe.EVENTS.PLAY,this,"slideShowSwitchHandler"),this.appSet.appEventManager.addGMEventListener(qe.EVENTS.NEXT_SLIDE,this,"slideshowHandler"),this.appSet.appEventManager.addGMEventListener(oe.EVENTS.ITEMS_SCROLL_BAR_ITEM_ACTION,this,"scrollBarHandler"),this.slider=new He(this.appSet,o),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(e.classPref,"next-prev-button"),this.prevButton.classList.add("prev"),this.prevButton.innerHTML=w.ICONS.PREV_ARR,this.prevButton.onclick=function(){n.updateViewControls({params:{draging:!0}}),n.slider.gotoPrev()},this.view.appendChild(this.prevButton),this.nextButton=document.createElement("div"),this.nextButton.className="".concat(e.classPref,"next-prev-button"),this.nextButton.classList.add("next"),this.nextButton.innerHTML=w.ICONS.NEXT_ARR,this.nextButton.onclick=function(){n.updateViewControls({params:{draging:!0}}),n.slider.gotoNext()},this.view.appendChild(this.nextButton),this.header=document.createElement("div"),this.header.className="".concat(e.classPref,"header"),w.isTouchDevice&&this.header.classList.add("".concat(e.classPref,"touch-device")),this.view.appendChild(this.header),this.footer=document.createElement("div"),this.footer.className="".concat(e.classPref,"footer"),w.isTouchDevice&&this.footer.classList.add("".concat(e.classPref,"touch-device")),this.footer.style.backgroundImage="linear-gradient(rgba(0,0,0,0) 0%, ".concat(this.config.lb_headerFooterColor,")"),this.view.appendChild(this.footer),!this.config.lb_informer){var s=Ze.CONFIG;s.inf_title=this.config.lb_itemTitleEnable,s.inf_titleSize=this.config.lb_itemTitleFontSize,s.inf_titleColor=this.config.lb_itemTitleTextColor,s.inf_description=this.config.lb_itemDescriptionEnable,s.inf_descriptionSrc=this.config.lb_itemDescriptionSrc,s.inf_descriptionSize=this.config.lb_itemDescriptionFontSize,s.inf_descriptionColor=this.config.lb_itemDescriptionTextColor,s.inf_bgCollor=this.config.lb_headerFooterColor,this.config.lb_informer=new Ze(s,this.config.lb_informerSub)}this.footer.appendChild(this.config.lb_informer.view),this.infoBar1=document.createElement("div"),this.infoBar1.className="".concat(e.classPref,"info-wrap"),this.header.appendChild(this.infoBar1);var r=document.createElement("div");r.className="".concat(e.classPref,"counter-wrap"),r.style.color=this.config.lb_itemCounterColor,this.item_current_info=document.createElement("div"),this.item_current_info.className="".concat(e.classPref,"counter-current"),r.appendChild(this.item_current_info);var l=document.createElement("div");l.className="".concat(e.classPref,"counter-delimiter"),l.style.opacity=.7,l.innerText="/",r.appendChild(l),this.items_amount_info=document.createElement("div"),this.items_amount_info.className="".concat(e.classPref,"counter-all"),r.appendChild(this.items_amount_info),!1===this.config.lb_itemCounterEnable&&(r.style.display="none"),this.counter=r;var c=document.createElement("div");if(c.className="".concat(e.classPref,"counter-play-wrap"),c.appendChild(r),this.infoBar1.appendChild(c),this.config.lb_slideshowEneble){var h=qe.CONFIG;h.ap_autoPlayBgColor=this.config.lb_slideshowIndicatorColorBg,h.ap_autoPlayColor=this.config.lb_slideshowIndicatorColor,h.ap_slideshowDelay=this.config.lb_slideshowTimer,this.autoPlay=new qe(this,h),c.appendChild(this.autoPlay.view)}var d=document.createElement("div");w.isTouchDevice&&(d.style.width="100%"),d.className="".concat(e.classPref,"free-space"),this.header.appendChild(d),this.itemMenuWrap=document.createElement("div"),this.itemMenuWrap.className="".concat(e.classPref,"item-menu-wrap"),this.header.appendChild(this.itemMenuWrap);var u=M.CONFIG;u.im_link=!0,u.im_play=this.config.lb_slideshowEneble,u.im_zoom=w.Device.desktop&&this.config.lb_zoom,u.im_share=this.config.lb_itemShare,u.im_thumbnails=this.config.lb_thumbBarEnable,u.im_close=!0,u.im_fulscreen=!w.Device.ios&&this.config.lb_fullscreen,u.im_backgroundColor=this.config.lb_menuBackgroundColor,u.im_backgroundColorOver=this.config.lb_menuBackgroundColorOver,u.im_iconColor=this.config.lb_menuIconColor,u.im_iconColorOver=this.config.lb_menuIconColorOver,this.itemMenu=new M(this.appSet,M.MENU_TYPE.LIGHTBOX,u),this.itemMenuWrap.appendChild(this.itemMenu.view),this.appSet.appEventManager.addGMEventListener(M.EVENTS.ITEM_MENU_ACTION,this,"itemMenuActionHandler"),this.addToStage()}return Xe(e,[{key:"updateStyleSheet",value:function(){this.styleSheet.innerHTML='\n\t\tdiv[data-gallery-id="'.concat(this.appName,'"] .').concat(e.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(e.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(t){if(t.target===this.itemMenu){var i,n=t.params.item,a=t.params.type;if(n&&a)switch(a){case"link":n.link&&window.open(n.link,this.config.lb_linkTargetWindow);break;case"like":this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.LB_ITEM_ACTION,this,{type:"like",item:n})),this.itemMenu.updateForItem(n);break;case"bookmark":this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.LB_ITEM_ACTION,this,{type:"bookmark",item:n})),this.itemMenu.updateForItem(n);break;case"share":this.shareBar?this.removeShareBar():this.addShareBar(),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(qe.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.slider.itemIndex===this.itemsList.length-1&&!1===this.config.lb_sliderCarouselMode?this.slider.gotoPageByNum(0):this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(qe.EVENTS.NEXT_SLIDE,this,{})),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(qe.EVENTS.PLAY,this,{})));break;case"coments":"open"===n.comment_status&&(i="".concat(n.sharelink,"/#comments"),window.open(i,"_self"));break;case"thumbnails":this.thumbsHolder?this.removeThumbnailsbar():this.addThmbnailsBar(),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(qe.EVENTS.PLAY,this,{action:"stop"}));break;case"fullscreen":this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.LB_FULLSCREEN_SWITCH,this,{}))}}}},{key:"addShareBar",value:function(){if(clearTimeout(this.shareAnimDelay),this.itemsList[this.currentItemIndex]){var e=this.itemsList[this.currentItemIndex],t=_e.CONFIG;t.ish_backgroundColor=this.config.lb_itemShareBarBackgroundColor,t.ish_iconColor=this.config.lb_itemShareBarIconColor,t.ish_iconColorHover=this.config.lb_itemShareBarIconColorHover,t.ish_facebook=this.config.lb_itemShareFb,t.ish_twitter=this.config.lb_itemShareTw,t.ish_pinterest=this.config.lb_itemSharePin,t.ish_download=this.config.lb_itemShareDownload,t.ish_linkToPost=this.config.lb_itemSharePost,t.ish_copy=this.config.lb_itemShareCopy,t.ish_parentDiv=this.view,this.appSet.appEventManager.addGMEventListener(_e.EVENTS.REMOVE_SHARE_WINDOW,this,"deleteShareModal"),this.shareBar=new _e(this.appSet.appEventManager,t),this.shareBar.initByItem(e)}}},{key:"deleteShareModal",value:function(){this.shareBar&&delete this.shareBar,this.appSet.appEventManager.removeGMEventListener(_e.EVENTS.REMOVE_SHARE_WINDOW,this,"deleteShareModal")}},{key:"removeShareBar",value:function(e){this.shareBar&&this.shareBar.prepareToRemove(e)}},{key:"addThmbnailsBar",value:function(){var e=this,t=Ke.CONFIG;t.thb_backgroundColor=this.config.lb_backgroundColor,t.thb_controlsColor=this.config.lb_sliderNavigationIconColor,t.thb_thumbBarHoverColor=this.config.lb_thumbBarHoverColor,t.thb_scrollBarColor=this.config.lb_sliderNavigationIconColor,t.thb_scrollBarTrackColor=this.config.lb_sliderNavigationColor,t.thb_startWidth=this.view.clientWidth,t.thb_closeCallback=function(){delete e.thumbsHolder},this.thumbsHolder=new Ke(this.appSet,t),this.view.appendChild(this.thumbsHolder.view),this.thumbsHolder.initByItemsList(this.itemsList,this.currentItemIndex)}},{key:"scrollBarHandler",value:function(e){e.target===this.thumbsHolder.thumbsBar&&this.slider&&e.params&&e.params.action&&(e.params.index||0===e.params.index)&&"click"===e.params.action&&(this.removeThumbnailsbar(),this.slider.gotoPageByNum(e.params.index))}},{key:"removeThumbnailsbar",value:function(e){this.thumbsHolder&&this.thumbsHolder.prepareToRemove(e)}},{key:"sliderZoomSwitch",value:function(){this.slider&&this.slider.remoteControl("zoom")}},{key:"slideShowSwitchHandler",value:function(e){if(this.autoPlay)if(e.params.action)switch(e.params.action){case"play":this.autoPlay.start();break;case"stop":this.autoPlay.clear()}else e.params.status?this.itemMenu&&this.itemMenu.playButtonStatus(e.params.status):this.autoPlay.switch()}},{key:"slideshowHandler",value:function(){this.slider&&this.slider.gotoNext()}},{key:"keydownHandler",value:function(){var e=this;return e.handlerKB=function(t){switch(t.keyCode){case 37:e.slider.remoteControl("prev");break;case 39:case 9:t.stopPropagation(),t.preventDefault(),e.slider.remoteControl("next");break;case 13:w.preventDefault(t),e.slider.remoteControl("enter");break;case 32:if(w.preventDefault(t),e.thumbsHolder)return void e.removeThumbnailsbar();if(e.shareBar)return void e.removeShareBar();e.slider.remoteControl("space")}},e.handlerKB}},{key:"addToStage",value:function(){var t=this,i=document.getElementsByTagName("body")[0];this.view.style.zIndex=w.findHighestZIndex(i)+1,w.disableBodyScrollSlider(),document.addEventListener("keydown",t.keydownHandler(),!0),i.appendChild(this.view),setTimeout((function(){t.view.classList.add("".concat(e.classPref,"activate"))}),30)}},{key:"showPreloader",value:function(e){var t;if(e){if(document.getElementById("".concat(this.appName,"slider_preloader")))return;(t=w.createPreloaderView(this.config.lb_preloaderColor)).id="".concat(this.appName,"slider_preloader"),this.view.appendChild(t)}else(t=document.getElementById("".concat(this.appName,"slider_preloader")))&&w.fadeOut(t,(function(){t&&t.parentNode&&t.parentNode.removeChild(t)}),500)}},{key:"initStandbyMode",value:function(){this.showPreloader(!0)}},{key:"initByList",value:function(e,t){this.showPreloader(!1),e&&e.length>0&&(this.currentItemIndex=t&&0!==t?0:void 0,this.startItemIndex=t||0,this.itemsList=e,this.slider.initByList(this.itemsList,this.startItemIndex),this.resizeHandler())}},{key:"prepareToRemove",value:function(){var t=this;this.removing||(this.removing=!0,this.autoPlay&&this.autoPlay.clear(),this.removeShareBar(!0),this.removeThumbnailsbar(!0),this.slider.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(e.classPref,"deactivate")),this.background.style.opacity="0",document.removeEventListener("keydown",this.handlerKB,!0),this.appSet.appEventManager.removeGMEventListener(M.EVENTS.ITEM_MENU_ACTION,this,"itemMenuActionHandler"),this.appSet.appEventManager.removeGMEventListener(He.EVENTS.UPDATE_CONTROLS,this,"updateViewControls"),this.appSet.appEventManager.removeGMEventListener(He.EVENTS.YT_ON_CHANGE_STATUS,this,"updateYTstatus"),this.appSet.appEventManager.removeGMEventListener(He.EVENTS.REMOVE_LIGHTBOX,this,"prepareToRemove"),this.appSet.appEventManager.removeGMEventListener(qe.EVENTS.PLAY,this,"slideShowSwitchHandler"),this.appSet.appEventManager.removeGMEventListener(qe.EVENTS.NEXT_SLIDE,this,"slideshowHandler"),this.appSet.appEventManager.removeGMEventListener(oe.EVENTS.ITEMS_SCROLL_BAR_ITEM_ACTION,this,"scrollBarHandler"),setTimeout((function(){w.enableBodyScrollSlider(),t.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.LB_REMOVE_LIGHTBOX,t))}),300*this.backgroundOpacity))}},{key:"updateYTstatus",value:function(t){this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.LB_ITEM_ACTION,this,Re(Re({},{type:"YTstatus"}),t.params))),this.slider&&this.config.lb_videoAutoStart&&this.config.lb_tryPlayNext&&t.params&&void 0!==t.params.status&&0===t.params.status&&this.slider.gotoNext()}},{key:"updateViewControls",value:function(t){if(t.params.backgroundOpacity&&(this.background.style.opacity=t.params.backgroundOpacity,this.backgroundOpacity=t.params.backgroundOpacity),t.params.draging&&this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(qe.EVENTS.PLAY,this,{action:"stop"})),t.params.zoom&&(this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(qe.EVENTS.PLAY,this,{action:"stop"})),"zoomIn"===t.params.zoom?this.view.classList.add("pgc-zoom-in"):this.view.classList.remove("pgc-zoom-in"),this.itemMenu&&this.itemMenu.zoomButtonStatus(t.params.zoom)),t.params.next&&("show"===t.params.next?this.view.classList.add("pgc-next-show"):this.view.classList.remove("pgc-next-show")),t.params.prev&&("show"===t.params.prev?this.view.classList.add("pgc-prev-show"):this.view.classList.remove("pgc-prev-show")),t.params.controls)switch(this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(qe.EVENTS.PLAY,this,{action:"stop"})),this.headerFooterStatus=t.params.controls,t.params.controls){case"show":this.view.classList.add("pgc-header-show");break;case"hide":this.view.classList.remove("pgc-header-show")}(t.params.itemIndex||0===t.params.itemIndex)&&(this.currentItemIndex=t.params.itemIndex,this.item_current_info.innerHTML=t.params.itemIndex+1,this.items_amount_info.innerHTML=this.itemsList.length,this.thumbsHolder&&this.thumbsHolder.selectThumbByIndex(t.params.itemIndex),this.autoPlay&&"play"===this.autoPlay.status&&t.params.itemIndex===this.itemsList.length-1&&!1===this.config.lb_sliderCarouselMode&&this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(qe.EVENTS.PLAY,this,{action:"stop"}))),t.params.item&&(this.currentItem=t.params.item,this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.LB_ITEM_ACTION,this,{type:"view",item:this.currentItem,itemIndex:t.params.itemIndex})),this.shareBar&&this.shareBar.setItem(t.params.item),this.config.lb_informer&&this.config.lb_informer.setItem(t.params.item),this.itemMenu&&this.itemMenu.updateForItem(t.params.item)),t.params.status&&"ready"===t.params.status&&this.autoPlay&&this.itemsList.length>1&&(this.config.lb_slideshowAutoPlay||this.config.lb_sliderSlideshowAutoStart)&&!this.startItem&&(!1===this.config.lb_sliderCarouselMode&&this.currentItemIndex===this.itemsList.length-1||this.autoPlay.start())}},{key:"resizeHandler",value:function(){this.view.clientWidth<360?(this.autoPlay&&(this.autoPlay.view.style.display="none"),this.descriptionWrap||this.thumbsHolder):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.thumbsHolder&&this.thumbsHolder.resize(),this.slider&&this.slider.resizeHandler(w.Size(this.view.clientWidth,this.view.clientHeight))}}],[{key:"classPref",get:function(){return"pgc-rev-lb-d-"}},{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_sliderCarouselMode:!0,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:!1,lb_itemTitleFontSize:18,lb_itemTitleTextColor:"rgba(255,255,255,1)",lb_itemDescriptionEnable:!1,lb_itemDescriptionSrc:"description",lb_itemDescriptionFontSize:13,lb_itemDescriptionTextColor:"rgba(255,255,255,1)",lb_itemExifEnable:!1,lb_sliderNextPrevAnimation:!0,lb_thumbBarEnable:!0,lb_thumbBarHoverColor:"rgba(255,255,255,1)",lb_itemInfoEnable:!1,lb_itemLike:!1,lb_itemShare:!1,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_itemShareBarBackgroundColor:"rgba(0,0,0,0.8)",lb_itemShareBarIconColor:"rgb(255,255,255)",lb_itemShareBarIconColorHover:"rgb(255,255,255)",lb_itemShareFb:!0,lb_itemShareTw:!0,lb_itemSharePin:!0,lb_itemShareDownload:!1,lb_itemShareCopy:!1,lb_itemSharePost:"sharelink",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_informer:void 0,lb_informerSub:void 0,lb_videoAutoStart:!1,lb_videoLoop:!1,lb_tryPlayNext:!1}}}])}();function $e(e){return $e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$e(e)}function Qe(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,et(n.key),n)}}function et(e){var t=function(e){if("object"!=$e(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=$e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$e(t)?t:t+""}function tt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(tt=function(){return!!e})()}function it(e){return it=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},it(e)}function nt(e,t){return nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nt(e,t)}var at=window.PGC_SGB,ot=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,i){return t=it(t),function(e,t){if(t&&("object"==$e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,tt()?Reflect.construct(t,i||[],it(e).constructor):t.apply(e,i))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nt(e,t)}(t,e),i=t,n=[{key:"getDefSettungsFromAtt",value:function(e){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i].default);return t}},{key:"moduleSettings",value:function(e){return window.PGC_SGB&&window.PGC_SGB.galleries&&window.PGC_SGB.galleries[e].galleryData?window.PGC_SGB.galleries[e].galleryData:null}},{key:"getViewPortBySelector",value:function(e){var t=document.querySelector('div[data-block-id="'.concat(e,'"]'));return t&&t.dataset.gallery?t:null}},{key:"pausedAllVideoPlayers",value:function(e){if(window&&window.PGC_SGB&&window.PGC_SGB.galleries)for(var t=window.PGC_SGB.galleries,i=Object.keys(t),n=0;n<i.length;n+=1){var a=t[i[n]];a.deleteAllEmbedInItems&&a.deleteAllEmbedInItems instanceof Function&&a.deleteAllEmbedInItems(e)}}},{key:"deleteAllEmbetContent",value:function(){t.pausedAllVideoPlayers()}},{key:"pausedAllVideoContent",value:function(){var e=document.getElementsByClassName("thumb-video-content");if(e.length)for(var t=0;t<e.length;t+=1)e[t].parentNode.classList.remove("pgc-interectiv"),e[t].pause()}},{key:"pausedAllAudioContent",value:function(){var e=document.getElementById("simplyAudioPlayer");e&&e.pause();var t=document.getElementsByClassName("pgc-sgb-svg-rotate");if(t.length)for(var i=0;i<t.length;i+=1)t[i].classList.remove("pgc-sgb-svg-rotate")}},{key:"shuffleArray",value:function(e){for(var t=e.length-1;t>0;t-=1){var i=Math.floor(Math.random()*(t+1)),n=[e[i],e[t]];e[t]=n[0],e[i]=n[1]}return e}},{key:"timeConverter",value:function(e){var t=new Date(e),i=new Date,n=new Date(Date.now()-864e5),a=t.getFullYear(),o=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t.getMonth()],s=t.getDate(),r=t.getHours(),l=t.getMinutes();return t.setHours(0,0,0,0)===i.setHours(0,0,0,0)?"Today, ".concat(r,":").concat(l):t.setHours(0,0,0,0)===n.setHours(0,0,0,0)?"Yesterday, ".concat(r,":").concat(l):a===(new Date).getFullYear()?"".concat(s," ").concat(o,", ").concat(a):"".concat(s," ").concat(o," ").concat(a)}},{key:"request",value:function(e,i,n,a,o){var s=new URL(e);if(n)for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&s.searchParams.set(r,n[r]);var l=new XMLHttpRequest;l.open("GET",s,!0),i&&l.setRequestHeader("X-WP-Nonce",i),l.onreadystatechange=function(){if(4===l.readyState){var e={};200!==l.status?e.error=l.statusText:e.data=l.responseText,a&&(e.params=a),o&&"function"==typeof o&&o(e)}},l.onerror=function(){t.trace("An error occurred while transferring the file.")};try{l.send()}catch(e){t.trace(e)}}},{key:"ItemGallery",value:function(e,t){var i={get webView(){return this.webImg.src?i.webImg:(this.itemViewSrc&&(this.webImg.src=this.itemViewSrc),this.webImg)}},n=this;if(this.copyProperties(e,i),i.appName=t,i.sharelink=e.postLink,i.alt=""!==e.title?e.title:void 0,i.title){var a=document.createElement("div");a.innerHTML=i.title,i.title=1===a.childNodes.length?a.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 n.Size(i.thumb.large.width,i.thumb.large.height);if(i.thumb.full)return n.Size(i.thumb.full.width,i.thumb.full.height)}return n.Size(400,400)}(),i.itemViewThumbSize=function(){if(i.thumb){if(i.thumb.medium)return n.Size(i.thumb.medium.width,i.thumb.medium.height);if(i.thumb.large)return n.Size(i.thumb.large.width,i.thumb.large.height);if(i.thumb.full)return n.Size(i.thumb.full.width,i.thumb.full.height)}return n.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(e,i,n){var a={get webView(){return this.webImg.src?a.webImg:(this.itemViewFullSizePr?this.itemViewFlSrc&&(this.webImg.src=this.itemViewFlSrc):this.itemViewSrc&&(this.webImg.src=this.itemViewSrc),this.webImg)},set itemViewFullSize(e){this.itemViewFullSizePr=e},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 t.Size(this.poster.full.width,this.poster.full.height);if(this.poster.large)return t.Size(this.poster.large.width,this.poster.large.height)}return this.meta?this.meta.original?t.Size(this.meta.original.width,this.meta.original.height):this.meta.web?t.Size(this.meta.web.width,this.meta.web.height):t.Size(300,300):t.Size(300,300)},getItemViewSize:function(){if("audio"===this.type&&this.poster){if(this.poster.large)return t.Size(this.poster.large.width,this.poster.large.height);if(this.poster.full)return t.Size(this.poster.full.width,this.poster.full.height)}return this.meta?this.meta.web?t.Size(this.meta.web.width,this.meta.web.height):this.meta.original?t.Size(this.meta.original.width,this.meta.original.height):t.Size(300,300):t.Size(300,300)},getItemViewThumbSize:function(){if("audio"===this.type&&this.poster){if(this.poster.medium)return t.Size(this.poster.medium.width,this.poster.medium.height);if(this.poster.large)return t.Size(this.poster.large.width,this.poster.large.height);if(this.poster.full)return t.Size(this.poster.full.width,this.poster.full.height)}return this.meta?this.meta.thumb?t.Size(this.meta.thumb.width,this.meta.thumb.height):this.meta.web?t.Size(this.meta.web.width,this.meta.web.height):this.meta.original?t.Size(this.meta.original.width,this.meta.original.height):t.Size(300,300):t.Size(300,300)},getRatio:function(){return this.getItemViewSize().height/this.getItemViewSize().width},hasTag:function(e){return"pgc_0"===e||!(!this.tags||0===this.tags.length)&&-1!==this.tags.indexOf(e)},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(e){var t=!1;if("audio"===this.type&&e.poster!==this.poster&&(t=!0),e.poster?(this.poster=e.poster,"audio"===this.type&&this.updateSrcAndSizes()):(delete this.poster,"audio"===this.type&&this.updateSrcAndSizes()),this.tags=e.tags,e.link&&""!==e.link){if(this.link=decodeURIComponent(e.link),this.linkOriginal=this.link,this.linkTarget=e.linkTarget,this.linkText=e.linkText,this.orignLinkText=e.orignLinkText,"image"===this.type||this.parentType&&"image"===this.parentType){var i,n,a,o=this.link;if(o.match(/youtu\.be/i)||o.match(/youtube\.com/i))i=void 0!==(o=/(youtu.*be.*)\/(watch\?v=|embed\/|v|shorts|)(.*?((?=[&#?])|$))/gm.exec(o))[3]?o[3].split(/[^0-9a-z_\-]/i)[0]:o[0],n="video/youtube";else if(o.match(/vimeo\.com/i)){var s=o.match(/(www\.)?vimeo.com\/(\d+)($|:|\?|\/)/);s&&(i=parseInt(s[2],10),n="video/vimeo");var r=o.match(/vimeo.com\/(\d+):(\w+)$/);if(r){i=parseInt(r[1],10);var l=r[2];l&&i&&(a=l)}var c=o.match(/vimeo.com\/(\d+)\/(\w+)($|\?|\/)/);if(c){var h=c[2];h&&i&&(a=h)}}void 0!==i?(this.parentType||(this.parentType=this.type),this.type="video",this.mime_type=n,this.videoId=i,this.videoHash=a,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 t}};if(a.itemViewFullSizePr=!(!n||!n.itemViewFullSize),a.comment_status="closed",a.featuredImage=void 0,a.tags=[],this.copyProperties(e,a),a.appName=i,a.idPrefix=void 0,a.albums=[],a.categories=[],a.user=a.author,a.sharelink=a.url,a.orignLinkText="",a.id=parseInt(e.id),a.duration){var o=new Date(null);o.setSeconds(parseInt(a.duration));var s=o.toISOString().slice(11,19).split(":");if(s.length&&3===s.length){var r="00"===s[0]?"":"".concat(s[0],":"),l="".concat(s[1],":"),c=s[2];a.fileLength=r+l+c}}if(a.ID=a.id,e.url&&(a.original=e.url),a.alt=""!==a.alt?a.alt:void 0,a.title=""!==a.title?a.title:void 0,a.caption=""!==a.caption?a.caption:void 0,a.description){var h=a.description.replace(/\r?\n/g,"<br />");a.description=h}if(a.ratio=1,a.errorStatus=!1,"attachment"===e.type&&e.media_type&&(a.type=e.media_type),a.link=e.link&&void 0!==e.linkText?decodeURIComponent(e.link):void 0,a.linkTarget=e.linkTarget?e.linkTarget:void 0,a.linkText=e.linkText?e.linkText:void 0,a.meta=function(){var t={};if(a.meta&&Object.assign(t,a.meta),t.mime=a.mime,t.likes=0,t.views=0,a.sizes)return a.sizes.medium&&(t.thumb=a.sizes.medium),a.sizes.large&&(t.web=a.sizes.large),a.sizes.full&&(t.original=a.sizes.full),t;if(a.fullUrl&&a.url){t.original={},t.original.url=a.url;var i=a.url.toString().match(/.*\/(.+?)\./)[1].split("-").pop().split("x");i&&i.length>0&&(t.original.width=i[0]&&i[1]?Math.min(parseInt(i[0]),3e3):300,t.original.height=i[0]&&i[1]?Math.min(parseInt(i[1]),3e3):300,a.ratio=t.original.height/t.original.width),t.thumb=t.original,t.web=t.original}if(a.media_details&&a.media_details.sizes){var n=a.media_details.sizes;return n.medium&&(t.thumb=n.medium,t.thumb.url||(t.thumb.url=t.thumb.source_url)),n.large&&(t.web=n.large,t.web.url||(t.web.url=t.web.source_url)),n.full&&(t.original=n.full,t.original.url||(t.original.url=t.original.source_url)),t}if("audio"===a.type&&e.image&&e.image.width>=200&&!e.poster){var o={medium:{}};o.medium.url=e.image.src,o.medium.width=e.image.width,o.medium.height=e.image.height,o.medium.orientation=e.image.width/e.image.height>1?"landscape":"portrait",o.large=o.medium,o.full=o.medium,o.thumbnail=o.medium,a.poster=o}if(a.sizes)t.original=a.sizes.full?a.sizes.full:void 0,t.thumb=t.original,t.web=t.original,a.sizes.medium&&(t.thumb=a.sizes.medium),a.sizes.large&&(t.web=a.sizes.large);else{if("image"===a.type){t.original={},t.original.url=a.url;var s=a.url.toString().match(/.*\/(.+?)\./)[1].split("-").pop().split("x");return s&&s.length>0&&(t.original.width=s[0]&&s[1]?Math.min(parseInt(s[0]),3e3):300,t.original.height=s[0]&&s[1]?Math.min(parseInt(s[1]),3e3):300,a.ratio=t.original.height/t.original.width),t.thumb=t.original,t.web=t.original,t}if("video"===a.type&&(e.image&&e.image.width>=200&&(a.featuredImage=e.image),e.width&&e.height))return t.original={},t.original.url=a.url,t.original.width=e.width,t.original.height=e.height,a.ratio=t.original.height/t.original.width,t.thumb=t.original,t.web=t.original,t;if("audio"===a.type)return e.image&&e.image.width>=200?(t.original={},t.original.url=e.image.src,t.original.width=e.image.width,t.original.height=e.image.height,a.ratio=t.original.height/t.original.width,t.thumb=t.original,t.web=t.original,t):(t.original={},t.original.url="".concat(at.assets,"holder-mp3.png"),t.original.width=300,t.original.height=300,a.ratio=t.original.height/t.original.width,t.thumb=t.original,t.web=t.original,t);if(a.url&&void 0===a.width&&void 0===a.height){t.original={},t.original.url=a.url;var r=a.url.toString().match(/.*\/(.+?)\./)[1].split("-").pop().split("x");return r&&r.length>0&&(t.original.width=r[0]&&r[1]?Math.min(parseInt(r[0]),3e3):300,t.original.height=r[0]&&r[1]?Math.min(parseInt(r[1]),3e3):300,a.ratio=t.original.height/t.original.width),t.thumb=t.original,t.web=t.original,t}if(a.width&&a.height&&(a.src||a.url))return t.original={},t.original.url=a.src||a.url,t.original.width=a.width,t.original.height=a.height,a.ratio=t.original.height/t.original.width,t.thumb=t.original,t.web=t.original,t;if(a.imgUrl){t.original={},t.original.url=a.imgUrl;var l=a.imgUrl.toString().match(/.*\/(.+?)\./)[1].split("-").pop().split("x");return l&&l.length>0&&(t.original.width=l[0]&&l[1]?Math.min(parseInt(l[0]),3e3):300,t.original.height=l[0]&&l[1]?Math.min(parseInt(l[1]),3e3):300,a.ratio=t.original.height/t.original.width),t.thumb=t.original,t.web=t.original,t}}return t}(),a.updateSrcAndSizes(),a.sizes){var d="";for(var u in a.sizes)if(a.sizes.hasOwnProperty(u)){var m=a.sizes[u];d="".concat(d+m.url," ").concat(m.width,"w, ")}d=d.slice(0,-2),a.srcset=d}return a.webImg=new Image,a.webImg.setAttribute("draggable","false"),(a.title||a.alt)&&a.webImg.setAttribute("alt",a.alt?a.alt:a.title),a.webImgFrame=this.Rect(0,0,0,0),a.webImg.addEventListener("load",(function(){this.classList.add("onLoad")}),!1),a.webImg.addEventListener("error",(function(){a.errorStatus=!0,this.classList.add("onError")}),!1),a}},{key:"GalleryItem",value:function(e,i,n){var a,o,s="pgcSgb";if(!(o="A"===i.tagName?i:i.getElementsByTagName("A")[0]))return null;if(o.target&&"_self"!==o.target)return null;if(!1===o.hasAttribute("href"))return null;var r=o.getAttribute("href"),l=o.getElementsByTagName("IMG")[0];if(l){if(l.dataset.lightboxExclude)return null;var c,h;if((a={get webView(){return this.webImg.src?a.webImg:(this.webImg.src=this.itemViewSrc,this.webImg)}}).galId=n,a.index=e,l.dataset.id?(a.ID="".concat(e,"_").concat(l.dataset.id),a.attId=l.dataset.id):a.ID="".concat(e,"_").concat(a.galId),a.url=r,a.sharelink=r,0===r.indexOf("http://")||0===r.indexOf("https://")){if("/"===(c=new URL(r)).pathname)return null;h=c.pathname.split("/").pop().split("#")[0].split("?")[0].split(".")}else h=(c=r).split("/").pop().split("#")[0].split("?")[0].split(".");if(h.length<=1)return null;if(a.fileName=h[0].split("-")[0],""===a.fileName)return null;if(l.src.indexOf(a.fileName)<0){if(!l.dataset.fullUrl)return null;if(l.dataset.fullUrl.indexOf(a.fileName)<0)return null}a.fileExt=h[h.length-1],l.dataset["".concat(s,"Id")]="".concat(n,"_").concat(e),o&&(o.dataset["".concat(s,"Id")]="".concat(n,"_").concat(e)),a.itemViewSrc=a.url,a.itemViewSize=t.Size(100,100),a.type="image",a.subtype="image/".concat(a.fileExt),l.alt&&""!==l.alt&&(a.alt=l.alt);var d=i.getElementsByTagName("FIGCAPTION");if(d[0]&&(d[0].id&&(a.ID+="_".concat(d[0].id.split("-").pop()),a.attId=d[0].id.split("-").pop()),a.title=d[0].innerHTML),!a.attId&&l.classList&&l.classList.length>0)for(var u=0;u<l.classList.length;u+=1){var m=l.classList.item(u);m.indexOf("wp-image")+1&&(a.attId=m.split("-").pop(),a.ID+="_".concat(a.attId),u=l.classList.length)}a.itemViewThumbSrc=r,a.itemViewThumbSize=t.Size(l.width?parseInt(l.width):150,l.height?parseInt(l.height):150),l.naturalWidth?(a.itemViewThumbSize.width=l.naturalWidth,a.itemViewThumbSize.height=l.naturalHeight):l.addEventListener("load",(function(){a.itemViewThumbSize.width=l.naturalWidth,a.itemViewThumbSize.height=l.naturalHeight}))}return a?(a.webImg=new Image,a.webImg.setAttribute("draggable","false"),(a.title||a.alt)&&a.webImg.setAttribute("alt",a.alt?a.alt:a.title),a.webImgFrame=this.Rect(0,0,0,0),a.webImg.addEventListener("load",(function(){this.classList.add("onLoad")}),!1),a.webImg.addEventListener("error",(function(){a.errorStatus=!0,this.classList.add("onError")}),!1),a):null}},{key:"Term",value:function(e,t){var i=this,n={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(t).post_url)return i.moduleSettings(t).post_url},get thumbnail(){if(this.itemsList.length>0)return this.itemsList[0].itemViewSrc}};return this.copyProperties(e,n),n}},{key:"Meta",value:function(){return{}}}],null&&Qe(i.prototype,null),n&&Qe(i,n),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,n}(w);const st=ot,rt={galleries:[],galleryDeepLinking:!1,galleryOpeningMode:"inside",galleryPreloaderColor:"rgba(0,0,0,0.7)",customCSS:"",loading:!1,galleryLayout:"masonry",cacheItemsList:st.CacheItemsList(),appEventManager:st.GMEventsManager(),galleryModalBgColor:"rgba(255,255,255,1)",galleryModalPreloaderColor:"rgba(155,155,155,1)",galleryModalHeaderBgColor:"rgba(255,255,255,1)",galleryModalHeaderTitleColor:"rgba(0,0,0,1)",galleryModalHeaderTitleFontSize:18,galleryModalShareButton:!0,galleryModalControlsColor:"rgba(255,255,255,1)",galleryModalControlsColorHover:"rgba(0,0,0,1)",galleryModalControlsIconColor:"rgba(0,0,0,1)",galleryModalControlsIconColorHover:"rgba(255,255,255,1)",modaBgColor:"rgba(0,0,0,0.8)",modalInfoBoxBgColor:"rgba(240,240,240,1)",modalInfoBoxTitleTextColor:"rgba(20,20,20,1)",modalInfoBoxTextColor:"rgba(20,20,20,1)",infoBarExifEnable:!1,infoBarDateInfoEnable:!1,modalIconColor:"rgba(255,255,255,1)",modalIconColorHover:"rgba(200,200,200,1)",shareFacebook:!0,shareTwitter:!0,sharePinterest:!0,shareCopyLink:!0,sliderItemDownload:!0,sharePost:"sharelink",tagsFilter:!1,tagsListCustomMode:!1,initGalleryByFirstTag:!1,deepLinkingForTag:!1,galleryTagsList:void 0,startByTag:"pgc_0",tagCloudAllDef:"All",tagCloudAll:"All",tagCloudBgColor:"rgba(153,153,153,1)",tagCloudBgColorOver:"rgba(253,253,253,1)",tagCloudTextColor:"rgba(253,253,253,1)",tagCloudTextColorOver:"rgba(153,153,153,1)",tagCloudFontSize:16,numItemsDisplayed:0,thumbClickAction:"useLightbox",deepLinking:!1,linkTargetWindow:"self",galleryBgColor:"rgba(0,0,0,0)",galleryBorderRadius:0,lazyLoading:!1,contentNoPadding:!1,orderBy:!1,collectionPreloaderColor:"rgba(0,0,0,0.7)",externalLink:!0,externalLinkDefName:"Read More",externalLinkTextColor:"rgba(0,0,0,1)",externalLinkBgColor:"rgba(255,255,255,1)",externalLinkFontSize:18,captions:!0,captionSrc:"caption",collectionThumbRecomendedWidth:200,collectionThumbRecomendedHeight:200,collectionThumbMiniScreenScale:!1,thumbHieghtRation:1,thumbSpacing:5,collectionthumbRoundedCorners:0,collectionthumbHoverTitleFontSize:18,collectionthumbHoverTitleTextColor:"rgba(255,255,255,1)",collectionthumbHoverTitleTextBgColor:"rgba(0,0,0,0.8)",collectionthumbHoverBgColor:"rgba(0,0,0,.7)",captionHAlign:"top",collectionColumns:3,lastRowFill:!1,collectionThumbSubMenuShare:!0,collectionThumbSubMenuDownload:!0,collectionThumbSubMenuBgColor:"rgba(0,0,0,0.8)",collectionThumbSubMenuBgColorHover:"rgba(255,255,255,1)",collectionThumbSubMenuIconColor:"rgba(255,255,255,1)",collectionThumbSubMenuIconColorHover:"rgba(0,0,0,1)",sliderFullSizeViewMode:!1,sliderCarouselMode:!0,sliderVideoAutoPlay:!1,sliderVideoLoop:!1,sliderScrollNavi:!1,sliderNextPrevAnimation:"animation",galleryScrollPositionControll:!1,copyRProtection:!1,copyRAlert:"Hello, this photo is mine!",sliderItemCounterEnable:!0,itemCounterColor:"rgba(255,255,255,1)",sliderThumbBarEnable:!0,sliderThumbBarHoverColor:"rgba(240,240,240,1)",sliderBgColor:"rgba(0,0,0,0.8)",sliderPreloaderColor:"rgba(240,240,240,1)",sliderHeaderFooterBgColor:"rgba(0,0,0,0.4)",sliderNavigationColor:"rgba(0,0,0,1)",sliderNavigationColorOver:"rgba(255,255,255,1)",sliderNavigationIconColor:"rgba(255,255,255,1)",sliderNavigationIconColorOver:"rgba(0,0,0,1)",sliderItemTitleEnable:!0,sliderCaptionSrc:"caption",sliderItemTitleFontSize:20,sliderItemTitleTextColor:"rgba(255,255,255,1)",sliderItemDescriptionEnable:!1,sliderDescriptionSrc:"caption",sliderItemDescriptionFontSize:16,sliderItemDescriptionTextColor:"rgba(255,255,255,1)",sliderSlideshow:!0,sliderSlideshowAutoStart:!1,sliderSlideshowDelay:8,slideshowIndicatorColor:"rgba(255,255,255,1)",slideshowIndicatorColorBg:"rgba(255,255,255,0.5)",sliderThumbSubMenuBackgroundColor:"rgba(255,255,255,0)",sliderThumbSubMenuBackgroundColorOver:"rgba(255,255,255,1)",sliderThumbSubMenuIconColor:"rgba(255,255,255,1)",sliderThumbSubMenuIconHoverColor:"rgba(0,0,0,1)",sliderInfoEnable:!1,sliderSocialShareEnabled:!0,sliderItemDiscuss:!1,sliderZoomEnable:!0,sliderLikesEnabled:!1,sliderFullscreenEnabled:!0};var lt=i(6416),ct=i.n(lt),ht={};function dt(e){return dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},dt(e)}function ut(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,mt(n.key),n)}}function mt(e){var t=function(e){if("object"!=dt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=dt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==dt(t)?t:t+""}ht.styleTagTransform=u(),ht.setAttributes=l(),ht.insert=s().bind(null,"head"),ht.domAPI=a(),ht.insertStyleElement=h(),t()(ct(),ht),ct()&&ct().locals&&ct().locals;const pt=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.appSet=t,this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.bg=document.createElement("div"),this.bg.className="".concat(e.classPref,"bg"),this.header=document.createElement("div"),this.header.className="".concat(e.classPref,"header"),this.view.appendChild(this.header),this.content=document.createElement("div"),this.content.className="".concat(e.classPref,"content"),this.view.appendChild(this.content),this.headerFixed=document.createElement("div"),this.headerFixed.className="".concat(e.classPref,"header-fixed"),this.headerFixed.style.right="".concat(w.getScrollbarWidth,"px"),this.addToStage()}return t=e,n=[{key:"classPref",get:function(){return"pgc-rev-fs-modal-wrap-"}}],(i=[{key:"bottomSpace",get:function(){var e=this.view;return e.scrollHeight-e.scrollTop-e.clientHeight}},{key:"pageYOffset",get:function(){return this.view.scrollTop}},{key:"scrollTo",value:function(e){w.scrollInElementToY(this.view,e)}},{key:"addToStage",value:function(){var t=this,i=document.getElementsByTagName("body")[0],n=document.getElementsByTagName("html")[0],a=document.documentElement;w.hasScrollbar&&i.clientWidth!==window.innerWidth&&a.style.setProperty("--right-marg","".concat(w.getScrollbarWidth,"px")),w.hasScrollbar&&i.clientWidth===window.innerWidth&&0!==w.getScrollbarWidth&&(this.view.classList.add("pgc-clear-scroll"),this.headerFixed.style.right="0"),n.classList.add("".concat(e.classPref,"html")),this.bg.style.zIndex=w.findHighestZIndex(i)+1,this.view.style.zIndex=w.findHighestZIndex(i)+2,this.headerFixed.style.zIndex=w.findHighestZIndex(i)+3,i.appendChild(this.bg),i.appendChild(this.view),i.appendChild(this.headerFixed),setTimeout((function(){t.bg.style.transform="translateY(0)"}),30)}},{key:"prepareToRemove",value:function(){this.view.removeChild(this.header),this.view.removeChild(this.content),this.headerFixed.parentNode.removeChild(this.headerFixed),this.bg.style.opacity="0",document.getElementsByTagName("html")[0].classList.remove("".concat(e.classPref,"html"))}}])&&ut(t.prototype,i),n&&ut(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i,n}();function gt(e){return gt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gt(e)}function vt(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function ft(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?vt(Object(i),!0).forEach((function(t){yt(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):vt(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function yt(e,t,i){return(t=wt(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function bt(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,wt(n.key),n)}}function wt(e){var t=function(e){if("object"!=gt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=gt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gt(t)?t:t+""}function Ct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ct=function(){return!!e})()}function St(){return St="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,i){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=_t(e)););return e}(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(arguments.length<3?e:i):a.value}},St.apply(null,arguments)}function _t(e){return _t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_t(e)}function kt(e,t){return kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kt(e,t)}var Et=st.trace,Lt=window.PGC_SGB,Tt=function(e){function t(e,i,n){var a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=i.mc_classPref,s=document.getElementsByTagName("body")[0],r=document.createElement("style"),l=e.galleryData;return r.id="style_modal".concat(l.appName),r.innerHTML="\n    .".concat(o,"gallery-modal-bg{\n      background-color:").concat(i.mc_backgroundColor,";\n    }\n    .").concat(o,"gallery-modal-header{\n      background-color:").concat(i.mc_headerBackgroundColor,";\n      color:").concat(i.mc_headerTextColor,";\n    }\n    .").concat(o,"modal-title{\n      font-size:").concat(i.mc_headerTextFontSize,"px;\n    }\n    .").concat(o,"gallery-modal-header-fixed{\n      background-color:").concat(i.mc_fixedHeaderBackgroundColor,";\n      color:").concat(i.mc_fixedHeaderTextColor,";\n    }\n    .").concat(o,"gallery-modal-header-button{\n      background-color:").concat(i.mc_headerButtonBgColor,";\n      fill:").concat(i.mc_headerButtonIconColor,";\n    }\n    .").concat(o,"gallery-modal-header-button:hover{\n      background-color:").concat(i.mc_headerButtonBgColorHover,";\n      fill:").concat(i.mc_headerButtonIconColorHover,";\n    }\n    "),s.appendChild(r),(a=function(e,t,i){return t=_t(t),function(e,t){if(t&&("object"==gt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ct()?Reflect.construct(t,i||[],_t(e).constructor):t.apply(e,i))}(this,t,[l])).delegate=e,a.requestGalleryHandler=a.requestGalleryHandler.bind(a),a.config=ft(ft({},t.CONFIG),i),a.galleryData=n,a.galleryView=void 0,a.appName=a.appSet.appName,a.view.id="gallery_modal_".concat(a.appName),a.view.dataset.galleryId=a.appName,a.view.tabIndex="-1",a.view.focus(),a.view.classList.add("".concat(o,"gallery-modal")),a.bg.classList.add("".concat(o,"gallery-modal-bg")),a.header.classList.add("".concat(o,"gallery-modal-header")),a.headerFixed.classList.add("".concat(o,"gallery-modal-header-fixed")),a.closeButton=document.createElement("div"),a.closeButton.className="".concat(o,"gallery-modal-header-button"),a.closeButton.classList.add("".concat(o,"modal-close")),a.closeButton.innerHTML=st.ICONS.CLOSE_SVG,a.closeButton.onclick=function(){a.prepareToRemove()},a.header.appendChild(a.closeButton),a.fixedHeaderShow=!1,a.removing=!1,a.startItem=void 0,a.initGallery(),a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kt(e,t)}(t,e),i=t,n=[{key:"galleryViewConstructor",get:function(){return st.trace("** Need override - galleryViewConstructor **"),null}},{key:"scrollerViewWrapper",get:function(){return this.view}},{key:"initGallery",value:function(){var e=this;this.showHeaderTitle(),this.config.mc_shareButtonShow&&this.showShareButton(),this.loadCollectionDelay=setTimeout((function(){e.header.classList.add("".concat(e.config.mc_classPref,"init")),e.startLoadGalleryData()}),400)}},{key:"initScrollControll",value:function(){this.scrollHandler=this.scrollHandlerFunction(),this.view.addEventListener("scroll",this.scrollHandler,!1)}},{key:"showHeaderTitle",value:function(){this.title=document.createElement("div"),this.title.className="".concat(this.config.mc_classPref,"modal-title"),this.title.innerHTML=this.galleryData.title,this.header.appendChild(this.title),this.titleFixed=document.createElement("div"),this.titleFixed.className="".concat(this.config.mc_classPref,"modal-title"),this.headerFixed.appendChild(this.titleFixed);var e=document.createElement("div");e.className="".concat(this.config.mc_classPref,"free-space"),this.headerFixed.appendChild(e)}},{key:"showShareButton",value:function(){var e=this,i=this.config.mc_classPref;this.shareButton=document.createElement("div"),this.shareButton.className="".concat(i,"gallery-modal-header-button"),this.shareButton.classList.add("".concat(i,"modal-share")),this.shareButton.innerHTML=st.ICONS.SHARE_2_SVG,this.shareButton.onclick=function(){e.appSet.appEventManager.dispatchGMEvent(st.GMEvent(t.EVENTS.MC_BUTTONS_ACTION,e,ft(ft({},{actionType:"share"}),e.galleryData)))},this.header.appendChild(this.shareButton)}},{key:"showPreloader",value:function(e,t){var i;e?(document.getElementById("".concat(this.appName,"cover_preloader"))?i=document.getElementById("".concat(this.appName,"cover_preloader")):(i=st.createPreloaderView(this.config.mc_preloaderColor)).id="".concat(this.appName,"cover_preloader"),t.insertBefore(i,t.firstChild)):(i=document.getElementById("".concat(this.appName,"cover_preloader")))&&st.fadeOut(i,(function(){i&&i.parentNode&&i.parentNode.removeChild(i)}),200)}},{key:"startLoadGalleryData",value:function(){this.showPreloader(!0,this.bg);var e=this.galleryData.id,t="".concat(Lt.wpApiRoot+Lt.postType,"/v2/gallery/").concat(e);st.request(t,void 0,null,null,this.requestGalleryHandler)}},{key:"requestGalleryHandler",value:function(e){if(!this.removing){if(e.error)Et(e.error);else if(e.data)try{var t=JSON.parse(e.data);if(Array.isArray(t)&&t.length){var i=t[0];this.ctreateCollectionItemsList(i)}}catch(e){Et(e)}this.galleryDataCompleted()}}},{key:"ctreateCollectionItemsList",value:function(e){var t=e.images,i=e.itemsMetaDataCollection?e.itemsMetaDataCollection:[],n=[],a={};if(e.tagsListCustomMode?this.appSet.tagsListCustomMode=e.tagsListCustomMode:this.appSet.tagsListCustomMode=!1,e.galleryTagsList?this.appSet.galleryTagsList=e.galleryTagsList:this.appSet.galleryTagsList=void 0,e.orderBy?this.appSet.orderBy=e.orderBy:this.appSet.orderBy=!1,e.tagCloudAll?this.appSet.tagCloudAllDef=e.tagCloudAll:this.appSet.tagCloudAllDef=this.appSet.tagCloudAll,t){for(var o=0;o<t.length;o+=1){var s=t[o];s.link&&!s.postlink&&(s.postlink=s.link);for(var r=s.id,l=st.Item(s,this.appName,{itemViewFullSize:this.appSet.sliderFullSizeViewMode}),c=0;c<i.length;c+=1){var h=i[c];if(parseInt(h.id)===r){if(h.orignLinkText=h.linkText,h.linkText=""===h.linkText?this.galleryData.externalLinkDefName:h.linkText,h.tags)for(var d=0;d<h.tags.length;d+=1)a[h.tags[d].replace(/[ ]/g,"_").toLowerCase()]=h.tags[d];l.initMetaObj(h),i.splice(c,1),c=i.length}}n.push(l)}var u={itemsList:n,tagsList:a};this.initGalleryContent(u)}}},{key:"galleryDataCompleted",value:function(){this.appSet.appEventManager.dispatchGMEvent(st.GMEvent(t.EVENTS.MC_COLLECTION_MODAL_GALLERY_READY,this,{collection:this.filteredCollection}))}},{key:"galleryDataReady",value:function(){this.showPreloader(!1)}},{key:"filteredCollection",get:function(){if(this.galleryView)return this.galleryView.filteredCollection}},{key:"itemPageByIndex",value:function(e){if(this.galleryView)return this.galleryView.itemPageByIndex(e)}},{key:"addPageToStageByPageNum",value:function(e){this.galleryView&&this.galleryView.addPageToStageByPageNum(e)}},{key:"initGalleryContent",value:function(e){this.galleryDataReady(),this.galleryContent=e,this.galleryView=this.galleryViewConstructor(e),this.content.appendChild(this.galleryView.view),this.galleryView.init(),this.initScrollControll(),this.titleFixed.innerHTML='<span class="pgc-name">'.concat(this.galleryData.title,'</span><span class="pgc-delim"> • </span><span class="pgc-amount">').concat(this.galleryContent.itemsList.length,"</spna>"),this.title.classList.add("pgc-sgb-opacity-100"),this.title.innerHTML='<span class="pgc-name">'.concat(this.galleryData.title,'</span><span class="pgc-delim"> • </span><span class="pgc-amount">').concat(this.galleryContent.itemsList.length,"</spna>")}},{key:"checkNeedNewPage",value:function(){this.bottomSpace<200&&this.galleryView.addPageToStage()}},{key:"bottomSpace",get:function(){var e=this.view;return e.scrollHeight-e.scrollTop-e.clientHeight}},{key:"scrollToTop",value:function(){st.scrollInElementToY(this.view,0)}},{key:"scrollHandlerFunction",value:function(){var e=this;return function(){e.offsetYcontroll()}}},{key:"offsetYcontroll",value:function(){this.view.scrollTop>this.header.clientHeight?this.showFixedHeader(!0):this.showFixedHeader(!1),this.checkNeedNewPage()}},{key:"showFixedHeader",value:function(e){this.fixedHeaderShow!==e&&(!0===e?(this.headerFixed.appendChild(this.closeButton),this.headerFixed.classList.add("".concat(this.config.mc_classPref,"init"))):(this.headerFixed.classList.remove("".concat(this.config.mc_classPref,"init")),this.header.appendChild(this.closeButton)),this.fixedHeaderShow=e)}},{key:"resizeHandler",value:function(){this.galleryView&&this.galleryView.resizeHandler()}},{key:"prepareToRemove",value:function(){var e=this;this.view.blur(),this.loadCollectionDelay&&clearTimeout(this.loadCollectionDelay),this.removing=!0,this.showPreloader(!1);var i,n,a,o=document.getElementById("style_modal".concat(this.appSet.appName));o&&o.parentNode&&o.parentNode.removeChild(o),this.galleryView&&(this.galleryView.remove(),delete this.galleryView),this.view.removeEventListener("scroll",this.scrollHandler,!1),(i=t,n=this,"function"==typeof(a=St(_t(1&3?i.prototype:i),"prepareToRemove",n))?function(e){return a.apply(n,e)}:a)([]),setTimeout((function(){e.view&&e.view.parentNode&&(e.view.parentNode.removeChild(e.view),e.bg.parentNode.removeChild(e.bg)),delete e.view,e.appSet.appEventManager.dispatchGMEvent(st.GMEvent(t.EVENTS.MC_COLLECTION_MODAL_REMOVE,e,{}))}),400)}}],a=[{key:"EVENTS",get:function(){return{MC_BUTTONS_ACTION:"MC_BUTTONS_ACTION",MC_COLLECTION_MODAL_REMOVE:"MC_COLLECTION_MODAL_REMOVE",MC_COLLECTION_MODAL_GALLERY_READY:"MC_COLLECTION_MODAL_GALLERY_READY"}}},{key:"CONFIG",get:function(){return{mc_classPref:"",mc_backgroundColor:"rgba(255,255,255,1)",mc_headerBackgroundColor:"rgba(255,255,255,1)",mc_headerTextColor:"rgba(0,0,0,1)",mc_headerTextFontSize:18,mc_fixedHeaderBackgroundColor:"rgba(255,255,255,1)",mc_fixedHeaderTextColor:"rgba(0,0,0,1)",mc_headerButtonIconColor:"rgba(0,0,0,1)",mc_headerButtonBgColor:"rgba(255,255,255,1)",mc_headerButtonIconColorHover:"rgba(255,255,255,1)",mc_headerButtonBgColorHover:"rgba(0,0,0,1)",mc_preloaderColor:"rgba(0,0,0,0.5)",mc_descriptionShow:!1,mc_shareButtonShow:!1}}}],n&&bt(i.prototype,n),a&&bt(i,a),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,n,a}(pt);const Pt=Tt;var It=i(7336),Mt=i.n(It),xt={};function Nt(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Bt(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Nt(Object(i),!0).forEach((function(t){Ot(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Nt(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Ot(e,t,i){return(t=zt(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Dt(e){return Dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dt(e)}function Ht(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function At(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,zt(n.key),n)}}function Vt(e,t,i){return t&&At(e.prototype,t),i&&At(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function zt(e){var t=function(e){if("object"!=Dt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=Dt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Dt(t)?t:t+""}xt.styleTagTransform=u(),xt.setAttributes=l(),xt.insert=s().bind(null,"head"),xt.domAPI=a(),xt.insertStyleElement=h(),t()(Mt(),xt),Mt()&&Mt().locals&&Mt().locals;var Gt=function(){return Vt((function e(t,i,n){Ht(this,e),this.id=i,this.name=t,this.config=n,this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.view.dataset.id=i,this.title=document.createElement("div"),this.title.innerHTML=t,this.title.className="".concat(e.classPref,"title"),this.view.appendChild(this.title),this.mouseleave(),this.selected=!1;var a=this;function o(e){switch(e.type){case"mouseenter":a.mouseenter();break;case"mouseleave":if(a.selected)return;a.mouseleave()}}this.view.addEventListener("mouseenter",o,!1),this.view.addEventListener("mouseleave",o,!1)}),[{key:"updateConfig",value:function(e){this.config=e,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"}}}])}(),Rt=function(){function e(t,i){Ht(this,e),this.appSet=i,this.config=e.CONFIG,w.copyProperties(t,this.config),this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.view.style.fontSize=this.config.tl_fontSize+"px",this.list=[],this.selectedTag=void 0}return Vt(e,[{key:"updateViewByQueue",value:function(e,t){var i=this,n=e.map((function(e){return"".concat(e.title.toLowerCase(),"~/~").concat(e.title,"~/~").concat(e.term_id)}));this.config.tl_sort_item&&n.sort(),this.config.tl_all&&n.splice(0,0,"all~/~".concat(this.config.tl_all,"~/~0"));for(var a=function(){var a=n[o].split("~/~"),s={term_id:a[2],title:a[1]},r=Gt.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 Gt(s.title,s.term_id,r);void 0!==t&&parseInt(s.term_id)===parseInt(t)&&(i.selectedTag=l,l.select()),l.view.addEventListener("click",(function(){i.tagClickHandler(l)}),!1),e.push(l),i.view.appendChild(l.view)},o=0;o<n.length;o+=1)a()}},{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 e=this;return e.tagsClickHandler=function(t){if(t.target.dataset&&t.target.dataset.tagIndex){var i=e.list[parseInt(t.target.dataset.tagIndex)];i&&e.tagClickHandler(i)}},e.tagsClickHandler}},{key:"refreshByListCustomSort",value:function(e,t,i){this.clearList(),i||e.unshift({id:"pgc_0",name:this.config.tl_all});var n=Gt.CONFIG;n.tg_backgrounColor=this.config.tl_backgrounColor,n.tg_backgrounColorOver=this.config.tl_backgrounColorOver,n.tg_titleColor=this.config.tl_titleColor,n.tg_titleColorOver=this.config.tl_titleColorOver;for(var a=0;a<e.length;a+=1){var o=e[a],s=new Gt(o.name,o.id,n);o.id===t&&(this.selectedTag=s,s.select()),s.view.dataset.tagIndex=this.list.length,this.list.push(s),this.view.appendChild(s.view)}this.view.addEventListener("click",this.viewHandler(),!1)}},{key:"refreshByList",value:function(e,t,i,n){this.clearList();var a=[],o=[],s=Bt({},e);for(var r in s)"pgc_0"!==r&&a.push(s[r].toLowerCase());n||(s.pgc_0=this.config.tl_all),(void 0===i||void 0!==i&&!0===i)&&a.sort(),n||a.splice(0,0,s.pgc_0.toLowerCase());for(var l=0;l<a.length;l+=1)for(var c in s)if(s[c].toLowerCase()!==a[l]);else{var h=Gt.CONFIG;h.tg_backgrounColor=this.config.tl_backgrounColor,h.tg_backgrounColorOver=this.config.tl_backgrounColorOver,h.tg_titleColor=this.config.tl_titleColor,h.tg_titleColorOver=this.config.tl_titleColorOver;var d=new Gt(s[c],c,h);c===t&&(this.selectedTag=d,d.select()),d.view.dataset.tagIndex=this.list.length,this.list.push(d),o.push(d),this.view.appendChild(d.view),delete s[c]}this.view.addEventListener("click",this.viewHandler(),!1)}},{key:"updateConfig",value:function(e){this.config=e,this.view.style.fontSize=this.config.tl_fontSize+"px";var t=Gt.CONFIG;t.tg_backgrounColor=this.config.tl_backgrounColor,t.tg_backgrounColorOver=this.config.tl_backgrounColorOver,t.tg_titleColor=this.config.tl_titleColor,t.tg_titleColorOver=this.config.tl_titleColorOver;for(var i=0;i<this.list.length;i+=1)this.list[i].updateConfig(t);this.list[0]&&(this.list[0].title.innerHTML=this.config.tl_all),this.selectedTag&&this.selectedTag.select()}},{key:"updateViewByList",value:function(e,t){var i=this,n=[],a=[],o=Bt({},e);for(var s in o)"0"!==s&&n.push(o[s].toLowerCase());o[0]=this.config.tl_all,n.sort(),n.splice(0,0,o[0].toLowerCase());for(var r=0;r<n.length;r+=1){var l=function(){if(o[c].toLowerCase()===n[r]){var e=Gt.CONFIG;e.tg_backgrounColor=i.config.tl_backgrounColor,e.tg_backgrounColorOver=i.config.tl_backgrounColorOver,e.tg_titleColor=i.config.tl_titleColor,e.tg_titleColorOver=i.config.tl_titleColorOver;var s=new Gt(o[c],c,e);return parseInt(c)===parseInt(t)&&(i.selectedTag=s,s.select()),s.view.addEventListener("click",(function(){i.tagClickHandler(s)}),!1),a.push(s),i.view.appendChild(s.view),delete o[c],1}};for(var c in o)l()}}},{key:"trySelectByTagId",value:function(e){for(var t=0;t<this.list.length;t+=1){var i=this.list[t];i.id===e&&(this.selectedTag&&this.selectedTag.deselect(),i.select(),this.selectedTag=i,t=this.list.length)}}},{key:"tagClickHandler",value:function(t){this.selectedTag&&this.selectedTag.deselect(),t.select(),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.TAG_ACTION,this,{tagId:t.id,tagName:t.name})),this.selectedTag=t}}],[{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}}}])}();function Ft(e){return Ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ft(e)}function Wt(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function jt(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Wt(Object(i),!0).forEach((function(t){Yt(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Wt(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Yt(e,t,i){return(t=Ut(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Xt(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ut(n.key),n)}}function Ut(e){var t=function(e){if("object"!=Ft(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=Ft(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ft(t)?t:t+""}st.trace;var qt="GM_ACTIONS",Zt=function(){return e=function e(t,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.delegate=t,this.scrollerViewWrapper=t.scrollerViewWrapper?t.scrollerViewWrapper:document,this.app=t.delegate,this.appSet=t.appSet,this.appName=this.appSet.appName,this.galleryContent=i,this.itemsList=[],this.galleryContent.itemsList.length&&(this.itemsList="random"===this.appSet.orderBy?this.shuffleArray(this.galleryContent.itemsList):this.galleryContent.itemsList,this.tagsList=this.galleryContent.tagsList),this.PAGINATION_AMOUNT=20,this.lastAddedPageNum=void 0,this.filteredList=[],this.tagsListAdvancedCustomMode={},this.tagFromHash=void 0,this.filterPr="pgc_0",this.tagsListCopy="",this.timeOut=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_gallery_".concat(this.appName),this.view.appendChild(this.styleSheet),this.content=document.createElement("div"),this.view.appendChild(this.content),this.viewWidth=0,this.content.className="".concat(this.classPref,"gallery-content"),this.view.className="".concat(this.classPref,"gallery-collection"),this.view.addEventListener("keydown",this.keydownHandler(),!0)},(t=[{key:"classPref",get:function(){return st.trace("** Need override - classPref **"),null}},{key:"itemViewConstructor",get:function(){return st.trace("** Need override - itemViewConstructor **"),null}},{key:"addItemToStage",value:function(e){e.initSRC()}},{key:"updateLayout",value:function(){st.trace("** Need implementation - updateLayout **")}},{key:"isAdmin",get:function(){return"1"===window.PGC_SGB.admin}},{key:"tagNameToId",value:function(e){return e.replace(/[^a-zA-Z0-9]/g,"_").toLowerCase()}},{key:"keydownHandler",value:function(){var e=this;return e.handlerKB=function(t){if(!e.app.lightbox){var i=document.activeElement;if(i&&void 0!==i.dataset.pgcGallery&&(i.dataset.pgcGallery===e.appName||i.dataset.pgcAction||void 0!==i.dataset.index)){var n,a=parseInt(i.dataset.index),o=e.filteredCollection[a];if(o)switch(t.keyCode){case 37:if(e.filteredCollection.length){if(n=e.filteredCollection[a-1]?a-1:e.filteredCollection.length-1,t.preventDefault(),"block"!==e.filteredCollection[n].view.displayPr)return;e.filteredCollection[n].view.inner.tabIndex="-1",e.filteredCollection[n].view.inner.focus()}break;case 39:if(e.filteredCollection.length){if(n=e.filteredCollection[a+1]?a+1:0,t.preventDefault(),"block"!==e.filteredCollection[n].view.displayPr)return;e.filteredCollection[n].view.inner.tabIndex="-1",e.filteredCollection[n].view.inner.focus()}break;case 13:o&&o.view&&(t.preventDefault(),o.view.itemClickHandler?o.view.itemClickHandler({target:i}):o.view.itemMediaClickHandler&&o.view.itemMediaClickHandler({target:i}))}}}},e.handlerKB}},{key:"thumbSpacing",get:function(){return this.appSet.thumbSpacing}},{key:"collectionthumbRoundedCorners",get:function(){return this.appSet.collectionthumbRoundedCorners}},{key:"mediaStoper",value:function(){if(this.appSet.audioPlayer.src){var e=document.getElementsByClassName("pgc-sgb-svg-rotate");if(e.length)for(var t=0;t<e.length;t+=1)e[t].classList.remove("pgc-sgb-svg-rotate");this.appSet.audioPlayer.pause()}var i=document.getElementsByClassName("thumb-video-content");if(i.length)for(var n=0;n<i.length;n+=1)i[n].pause()}},{key:"init",value:function(){0!==this.itemsList.length&&(this.updateGalleryStyleSheet(),this.updateGalleryWrapStyle(),this.initList(),this.initItemMenu())}},{key:"shuffleArray",value:function(e){for(var t=e.length-1;t>0;t-=1){var i=Math.floor(Math.random()*(t+1)),n=[e[i],e[t]];e[t]=n[0],e[i]=n[1]}return e}},{key:"updateGalleryWrapStyle",value:function(){"useLightbox"!==this.appSet.thumbClickAction?this.view.classList.remove("action-lightbox"):this.view.classList.add("action-lightbox"),"postLink"!==this.appSet.thumbClickAction?this.view.classList.remove("action-postlink"):this.view.classList.add("action-postlink")}},{key:"initList",value:function(){this.lastAddedPageNum=void 0,this.cureantPage=void 0,this.viewWidth=this.view.clientWidth,this.filteredList=[],this.createViewForItem(),this.appSet.tagsFilter&&Object.keys(this.tagsList).length&&(this.createTagsCloudView(),this.filtredById=this.appSet.startByTag),this.updateViewByData()}},{key:"createViewForItem",value:function(){if(this.itemViewConstructor&&this.itemsList)for(var e=0;e<this.itemsList.length;e+=1){var t=this.itemViewConstructor(e);this.itemsList[e].view=t,t.init()}}},{key:"updateViewByData",value:function(){this.createLayout()}},{key:"updateGalleryStyleSheet",value:function(){}},{key:"tagsActionHandler",value:function(e){e.params&&e.params.tagName&&e.params.tagId&&this.filtred("pgc_0"===e.params.tagId?e.params.tagId:e.params.tagName)}},{key:"createTagsCloudView",value:function(){if(this.TAGS_CLOUD){if(!this.tagsListContoller){this.header=document.createElement("div"),this.header.className="".concat(this.classPref,"gallery-header"),this.view.insertBefore(this.header,this.content);var e=Rt.CONFIG;e.tl_all=this.appSet.tagCloudAllDef,e.tl_sort_item=!0,e.tl_backgrounColor=this.appSet.tagCloudBgColor,e.tl_backgrounColorOver=this.appSet.tagCloudBgColorOver,e.tl_titleColor=this.appSet.tagCloudTextColor,e.tl_titleColorOver=this.appSet.tagCloudTextColorOver,e.tl_fontSize=this.appSet.tagCloudFontSize,this.tagsListContoller=new Rt(e,this.appSet),this.appSet.appEventManager.addGMEventListener(Rt.EVENTS.TAG_ACTION,this,"tagsActionHandler")}if(this.appSet.tagsFilter){var t=Rt.CONFIG;if(t.tl_all=this.appSet.tagCloudAllDef,t.tl_sort_item=!0,t.tl_backgrounColor=this.appSet.tagCloudBgColor,t.tl_backgrounColorOver=this.appSet.tagCloudBgColorOver,t.tl_titleColor=this.appSet.tagCloudTextColor,t.tl_titleColorOver=this.appSet.tagCloudTextColorOver,t.tl_fontSize=this.appSet.tagCloudFontSize,this.tagsListContoller.config=t,Object.keys(this.tagsList).length&&(this.TAGS_CLOUD_CUSTOM&&!this.appSet.tagsListCustomMode||void 0===this.TAGS_CLOUD_CUSTOM))return this.tagsListCopy=JSON.stringify(this.tagsList),this.tagsListContoller.refreshByList(this.tagsList,this.appSet.startByTag),void this.header.appendChild(this.tagsListContoller.view);if(this.appSet.tagsListCustomMode&&this.TAGS_CLOUD_CUSTOM&&this.appSet.galleryTagsList){for(var i=[],n=0;n<this.appSet.galleryTagsList.length;n+=1){var a=this.appSet.galleryTagsList[n];i[n]={id:this.tagNameToId(a),name:a}}return this.tagsListAdvancedCustomMode=i,this.appSet.initGalleryByFirstTag&&this.appSet.galleryTagsList[0]&&(this.appSet.startByTag=this.appSet.galleryTagsList[0]),this.tagsListContoller.refreshByListCustomSort(i,this.tagNameToId(this.appSet.startByTag),this.appSet.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:"initItemMenu",value:function(){var e=M.CONFIG;e.im_link=this.appSet.collectionThumbSubMenuVisibility,e.im_info=this.appSet.collectionThumbSubMenuInfo,e.im_discuss=this.appSet.collectionThumbSubMenuComents,e.im_download=this.appSet.collectionThumbSubMenuDownload,e.im_share=this.appSet.collectionThumbSubMenuShare,e.im_backgroundColor=this.appSet.collectionThumbSubMenuBgColor,e.im_backgroundColorOver=this.appSet.collectionThumbSubMenuBgColorHover,e.im_iconColor=this.appSet.collectionThumbSubMenuIconColor,e.im_iconColorOver=this.appSet.collectionThumbSubMenuIconColorHover,this.itemMenu=new M(this.appSet,M.MENU_TYPE.THUMB,e),this.appSet.appEventManager.addGMEventListener(M.EVENTS.ITEM_MENU_ACTION,this,"itemMenuActionHandler")}},{key:"itemMenuActionHandler",value:function(e){e.target===this.itemMenu&&this.appSet.appEventManager.dispatchGMEvent(st.GMEvent(qt,this,{actionType:"itemSubMenu_".concat(e.params.type),item:jt({},e.params.item)}))}},{key:"deleteItemMenu",value:function(){this.itemMenu&&(this.itemMenu.view.parentElement&&this.itemMenu.view.parentElement.removeChild(this.itemMenu.view),this.appSet.appEventManager.removeGMEventListener(M.EVENTS.ITEM_MENU_ACTION,this,"itemMenuActionHandler"),delete this.itemMenu)}},{key:"getItemIndexByID",value:function(e,t){if(e)for(var i=0;i<t.length;i+=1){var n=t[i];if(parseInt(e)===parseInt(n.ID))return i}}},{key:"refreshDataInItems",value:function(){for(var e=this.filteredCollection,t=0;t<e.length;t+=1)e[t].view.updateSomeData()}},{key:"deleteAllEmbedInItems",value:function(){for(var e=this.filteredCollection,t=0;t<e.length;t+=1)e[t].view.deleteEmbedContent()}},{key:"stopAllMediaContentInCollection",value:function(){for(var e=this.filteredCollection,t=0;t<e.length;t+=1){var i=e[t].view;i.deleteEmbedContent&&i.deleteEmbedContent(),i.stopAllInterectivContentInside&&i.stopAllInterectivContentInside()}}},{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 e=0;e<this.presentedList.length;e+=1)this.presentedList[e].display="none"}},{key:"showPresentedItems",value:function(){for(var e=0;e<this.presentedList.length;e+=1)this.presentedList[e].display="block"}},{key:"createLayout",value:function(){this.appSet.pageMode?this.PAGINATION_AMOUNT=this.appSet.itemsPerPage:this.PAGINATION_AMOUNT=20,this.page_Amount=Math.min(this.PAGINATION_AMOUNT,this.filteredCollection.length)}},{key:"itemPageByIndex",value:function(e){return Math.floor(e/this.page_Amount)+1}},{key:"addPageToStage",value:function(){this.addPageToStageByPageNum()}},{key:"addPageToStageByPageNum",value:function(e){var t=this;if(0!==this.itemsList.length&&!(void 0!==this.lastAddedPageNum&&e<=this.lastAddedPageNum)){var i=this.filteredCollection,n=Math.ceil(i.length/this.page_Amount);if(void 0===this.cureantPage&&(this.cureantPage=0),void 0===e){if(this.cureantPage>=n)return}else if(e>n)return;var a=this.cureantPage*this.page_Amount,o=Math.min(void 0===e?a+this.page_Amount:e*this.page_Amount,i.length);this.appSet.numItemsDisplayed>0&&(o=Math.min(o,this.appSet.numItemsDisplayed)),clearTimeout(this.layoutSizerDelay);for(var s=1,r=a;r<o;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*s},s+=1}this.cureantPage=void 0===e?this.cureantPage+1:e,this.lastAddedPageNum=this.cureantPage,this.resizeHandler(),this.layoutSizerDelay=setTimeout((function(){t.delegate.checkNeedNewPage&&t.delegate.checkNeedNewPage()}),1e3)}}},{key:"filtred",value:function(e){this.appSet.tagsFilter||(e=this.appSet.startByTag),this.stopAllMediaContentInCollection(),this.removeItemsViewFormStage(),this.filtredById=e,this.createLayout()}},{key:"filtredById",get:function(){return this.filterPr},set:function(e){if(this.itemsList)if(this.filteredList=[],this.filterPr=e,"pgc_0"!==e)for(var t=0;t<this.itemsList.length;t+=1)this.itemsList[t].hasTag(e)&&this.filteredList.push(this.itemsList[t]);else this.filteredList=this.itemsList}},{key:"filteredCollection",get:function(){return this.filteredList.length>0?this.filteredList:this.itemsList}},{key:"createLightbox",value:function(e){var t=this.filteredCollection,i=e.index;void 0!==i&&this.appSet.appEventManager.dispatchGMEvent(st.GMEvent(qt,this,{actionType:"createLightbox",index:i,collection:t}))}},{key:"openPostLink",value:function(e){var t=this.filteredCollection,i=e.index;return t[i]&&t[i].postlink&&window.open(t[i].postlink,"_self"),e}},{key:"checkGalleryYpositionForViewedItem",value:function(){if(this.viewedItem){var e=this.viewedItem,t=(window.innerHeight-e.view.view.clientHeight)/2,i=window.innerHeight-e.view.view.getBoundingClientRect().bottom<-e.view.view.clientHeight||e.view.view.getBoundingClientRect().bottom<0&&e.view.view.getBoundingClientRect().top<0?e.view.view.getBoundingClientRect().top+window.pageYOffset-t:void 0;i&&st.scrollWindowToY(i)}}},{key:"itemActionHandler",value:function(e){if(e&&e.params&&e.params.type&&e.params.item&&"view"===e.params.type){if(this.viewedItem=e.params.item,!this.appSet.galleryScrollPositionControll)return;void 0!==e.params.itemIndex&&this.addPageToStageByPageNum(this.itemPageByIndex(e.params.itemIndex))}}},{key:"resizeHandler",value:function(){this.viewWidth!==this.view.clientWidth&&(this.updateLayout(),this.viewWidth=this.view.clientWidth)}},{key:"remove",value:function(){clearTimeout(this.layoutSizerDelay),this.stopAllMediaContentInCollection(),this.view.removeEventListener("keydown",this.handlerKB,!0),this.removeViewContent(),this.deleteItemMenu(),this.appSet.appEventManager.removeGMEventListener(Rt.EVENTS.TAG_ACTION,this,"tagsActionHandler"),this.tagsList={},this.tagsListContoller=void 0,this.view.parentNode&&this.view.parentNode.removeChild(this.view)}}])&&Xt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Kt(e){return Kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kt(e)}function Jt(e){return function(e){if(Array.isArray(e))return $t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return $t(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?$t(e,t):void 0}}(e)||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 $t(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function Qt(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function ei(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Qt(Object(i),!0).forEach((function(t){ti(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Qt(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function ti(e,t,i){return(t=ni(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function ii(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ni(n.key),n)}}function ni(e){var t=function(e){if("object"!=Kt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=Kt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Kt(t)?t:t+""}st.trace;var ai=window.PGC_SGB;const oi=function(){return e=function e(t,i){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.appName=i.dataset.galleryId?i.dataset.galleryId:t,this.id=t,this.viewPort=i,this.isInitByVp=!1,this.coversList=[],this.currentGallery={},this.startItemID=void 0,this.strastItemIndex=0,this.configureGalleryDefSet(),this.propsFilter=Object.keys(this.galleryData),this.galleryData.appName=this.appName,this.galleryData.editMode=!1,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(){n.windowResizeHandler()})),this.resizeObserver.observe(this.view))},t=[{key:"classPref",get:function(){return st.trace("** Need override - classPref **"),null}},{key:"coverViewConstructor",get:function(){return st.trace("** Need override - itemViewConstructor **"),null}},{key:"modalViewConstructor",get:function(){return st.trace("** Need override - modalViewConstructor **"),null}},{key:"isAdmin",get:function(){return"1"===ai.admin}},{key:"configureGalleryDefSet",value:function(){this.galleryData=ei({},rt)}},{key:"createAudioPlayer",value:function(){var e;null!=(e=document.getElementById("simplyAudioPlayer")?document.getElementById("simplyAudioPlayer"):new Audio)&&e.canPlayType&&e.canPlayType("audio/mpeg")&&(e.id="simplyAudioPlayer",e.setAttribute("type","audio/mpeg"),e.setAttribute("codecs","mp3"),this.view.appendChild(e),this.galleryData.audioPlayer=e)}},{key:"keydownHandler",value:function(){var e=this;return e.handlerKB=function(t){e.modal?e.modal.prepareToRemove():27===t.keyCode&&(e.lightbox?e.lightbox.prepareToRemove():e.galleryModal&&e.galleryModal.prepareToRemove())},e.handlerKB}},{key:"requestGallery",value:function(e){if(this.currentGallery=ei({},e),this.galleryModal=this.modalViewConstructor(e),this.galleryData.appEventManager.addGMEventListener(Pt.EVENTS.MC_BUTTONS_ACTION,this,"galleryModalButtonsHander"),this.galleryData.appEventManager.addGMEventListener(Pt.EVENTS.MC_COLLECTION_MODAL_REMOVE,this,"removGalleryModal"),this.galleryData.appEventManager.addGMEventListener(Pt.EVENTS.MC_COLLECTION_MODAL_GALLERY_READY,this,"modalGalleryReady"),this.galleryData.appEventManager.addGMEventListener(qt,this,"modalGalleryHandler"),this.galleryData.galleryDeepLinking&&!this.galleryData.editMode){var t=this.collectionHash(e.id);if(window.location.hash===t)return;window.history.pushState(null,null,t)}}},{key:"modalGalleryReady",value:function(e){(e.target||void 0!==e.target.filteredCollection)&&this.galleryData.galleryDeepLinking&&!this.galleryData.editMode&&this.startItemID&&(this.tryOpenLightboxForID(this.startItemID),this.startItemID=void 0)}},{key:"galleryModalButtonsHander",value:function(e){e.params&&e.params.actionType&&"share"===e.params.actionType&&this.createModal({type:"share",item:ei({},e.params)})}},{key:"modalGalleryHandler",value:function(e){if(e.params&&e.params.actionType){var t,i,n=e.params.item;switch(e.params.actionType){case"createLightbox":this.createLightbox(e.params);break;case"itemSubMenu_share":this.createModal({type:"share",item:n});break;case"itemSubMenu_download":t=n.url,(i=document.createElement("A")).href=t,i.download=t.substring(t.lastIndexOf("/")+1),document.body.appendChild(i),i.click(),document.body.removeChild(i)}}}},{key:"removGalleryModal",value:function(){this.galleryData.appEventManager.removeGMEventListener(qt,this,"modalGalleryHandler"),this.galleryData.appEventManager.removeGMEventListener(Pt.EVENTS.MC_BUTTONS_ACTION,this,"galleryModalButtonsHander"),this.galleryData.appEventManager.removeGMEventListener(Pt.EVENTS.MC_COLLECTION_MODAL_GALLERY_READY,this,"modalGalleryReady"),this.galleryData.appEventManager.removeGMEventListener(Pt.EVENTS.MC_COLLECTION_MODAL_REMOVE,this,"removGalleryModal"),delete this.galleryModal,this.removeCollectionDeepLink()}},{key:"init",value:function(){this.viewPort.appendChild(this.view),this.viewPort.dataset.editor&&(this.galleryData.editMode=!0),this.initByVpData(),document.addEventListener("keydown",this.keydownHandler(),!0);var e=this;this.resizeWindow=function(){e.windowResizeHandler()},window.addEventListener("resize",this.resizeWindow),this.popstateHandler=function(){e.modal&&e.modal.prepareToRemove(),e.lightbox?e.lightbox.prepareToRemove():e.galleryModal?(e.itemFromHash&&e.tryOpenLightboxForID(e.itemFromHash),e.termFromHash||e.galleryModal.prepareToRemove()):e.addCollectionoFromHash()},this.galleryData.galleryDeepLinking&&!this.galleryData.editMode&&window.addEventListener("popstate",this.popstateHandler,!1)}},{key:"initByVpData",value:function(){var e,t=this.viewPort.getElementsByClassName("sgb-data")[0];if(t?e=t.textContent:this.viewPort.dataset.gallery?e=this.viewPort.dataset.gallery:st.trace("Error: Gallery data is missing"),e&&""!==e)try{var i=JSON.parse(e);st.copyProperties(i,this.galleryData),this.initByData(),this.isInitByVp=!0}catch(e){st.trace(e)}}},{key:"initByData",value:function(e){if(e&&st.copyProperties(e,this.galleryData),!this.galleryData.editMode&&this.galleryData.useGlobalSettings&&window.PGC_SGB&&window.PGC_SGB.skinsSettings&&window.PGC_SGB.skinsSettings[this.galleryData.galleryType]){var t=window.PGC_SGB.skinsSettings[this.galleryData.galleryType];st.copyProperties(t,this.galleryData)}this.intByDataExtra(),this.updateGalleryStyleSheet(),this.updateGalleryCustomCSS();var i=this.galleryData.galleries,n=[];if(i)for(var a=0;a<i.length;a+=1){var o=i[a],s=st.ItemGallery(o,this.appName);n.push(s)}if(this.initByList(n),this.galleryData.galleryDeepLinking&&!this.galleryData.editMode&&void 0!==this.itemFromHash){var r=ei({},this.itemFromHash);if(r.postID){var l=this.getTermById(r.postID);if(!l)return;window.history.replaceState(null,null,window.location.pathname+window.location.search),this.requestGallery(l)}r.id&&(this.startItemID=r)}}},{key:"intByDataExtra",value:function(){this.galleryData.tagCloudAll&&(this.galleryData.tagCloudAllDef=this.galleryData.tagCloudAll)}},{key:"updateGalleryCustomCSS",value:function(){var e=this.galleryData.customCSS;if(""!==e){var t,i="",n=/([\s\S]+?)\{([\s\S]*?)\}/gi,a=e.replace(/\/\*[\s\S]*?\*\//g,"");do{try{if(t=n.exec(a)){var o=t[1].trim().split(",");if(o.length){for(var s=t[0],r=0;r<o.length;r+=1){var l=o[r].trim();s=s.replace(l,'div[data-gallery-id="'.concat(this.appName,'"] ').concat(l))}i+="".concat(s," ")}}}catch(e){st.trace(e)}}while(t);i.trim().length&&(this.customCssSheet.innerHTML=i)}else this.customCssSheet.innerHTML=""}},{key:"updateGalleryStyleSheet",value:function(){}},{key:"updateList",value:function(e){if(e){if(Array.isArray(e)){this.removeViewContent();for(var t=[],i=0;i<e.length;i+=1){var n=e[i],a=st.ItemGallery(n,this.appName);t.push(a)}this.initByList(t)}}else for(var o=0;o<this.coversList.length;o+=1)this.coversList[o].index=o}},{key:"initByList",value:function(e){this.coversList=e,this.updateViewByData()}},{key:"updateViewByData",value:function(){if(this.coverViewConstructor&&this.coversList)for(var e=0;e<this.coversList.length;e+=1){var t=this.coverViewConstructor(e);this.coversList[e].view=t,t.init()}this.createLayout()}},{key:"createLayout",value:function(){}},{key:"needUpdateProps",value:function(e){for(var t={},i=0;i<this.propsFilter.length;i+=1){var n=this.propsFilter[i];Object.prototype.hasOwnProperty.call(e,n)&&("galleryTagsList"===n?JSON.stringify(this.galleryData[n])!==JSON.stringify(e[n])&&(t[n]=Jt(e[n])):this.galleryData[n]!==e[n]&&(t[n]=e[n]))}return t}},{key:"updateExraProps",value:function(e){void 0!==e.loading&&(this.galleryData.loading=e.loading,e.loading?this.view.classList.add("pgc-sgb-loading"):this.view.classList.remove("pgc-sgb-loading"))}},{key:"update",value:function(e){if(e){var t=this.needUpdateProps(e);0!==Object.keys(t).length&&(t.galleries&&this.updateList(t.galleries),this.updateExraProps(t),st.copyProperties(t,this.galleryData),this.updateGalleryStyleSheet(),void 0!==t.customCSS&&this.updateGalleryCustomCSS(),this.updateStyleByProps())}else this.initByVpData()}},{key:"updateStyleExraProps",value:function(){}},{key:"updateStyleByProps",value:function(){this.updateStyleExraProps()}},{key:"removeViewContent",value:function(){this.galleryModal&&this.galleryModal.prepareToRemove()}},{key:"getItemIndexByID",value:function(e,t){if(e)for(var i=0;i<t.length;i+=1){var n=t[i];if(parseInt(e)===parseInt(n.ID))return i}}},{key:"tryOpenLightboxForID",value:function(e){if(e.id||!this.galleryModal.galleryData||this.galleryModal||!this.galleryModal.filteredCollection){var t=this.galleryModal.filteredCollection;if(t&&t.length){if(e.postID&&this.galleryModal.galleryData.id!==e.postID)return;for(var i=0;i<t.length;i+=1){var n=t[i];parseInt(n.id)===parseInt(e.id)&&(this.createLightbox({collection:t,index:i}),i=t.length)}}}}},{key:"itemFromHash",get:function(){var e,t,i=window.location.hash.indexOf(this.appName);if(i+1){var n=window.location.hash.substring(i).split("-");e=n.length>=2?parseInt(n[n.length-1]):void 0,t=n.length>=2?parseInt(n[1].replace(/\D/g,"")):void 0}if(e||t)return{postID:t,id:e}}},{key:"termFromHash",get:function(){var e,t=window.location.hash.indexOf(this.appName);if(t+1){var i=window.location.hash.substring(t).split("-");if(e=i.length>=2?parseInt(i[1].replace(/\D/g,"")):void 0)return this.getTermById(e)}}},{key:"getTermById",value:function(e){for(var t=0;t<this.coversList.length;t+=1){var i=this.coversList[t],n=i.id;if(parseInt(n)===e)return i}}},{key:"collectionHash",value:function(e){return"#".concat(this.appName,"-g").concat(e)}},{key:"addCollectionoFromHash",value:function(){var e=this.termFromHash;e&&this.requestGallery(e)}},{key:"removeCollectionDeepLink",value:function(){this.termFromHash?window.history.back():window.history.replaceState(null,null,window.location.pathname+window.location.search)}},{key:"itemHash",value:function(e,t){var i="#".concat(this.appName);return e&&(i+="-g".concat(e)),t&&(i+="-".concat(t.ID)),i}},{key:"updateItemLink",value:function(e){this.galleryData.galleryDeepLinking&&!this.galleryData.editMode&&window.history.replaceState(null,null,this.itemHash(this.currentGallery.id,e))}},{key:"viewItem",set:function(e){this.updateItemLink(e)}},{key:"pushState",value:function(e,t){if(!this.galleryData.editMode&&!1!==this.galleryData.galleryDeepLinking){var i=this.itemHash(e,t);window.location.hash!==i&&window.history.pushState(null,null,i)}}},{key:"createLightbox",value:function(e){var t=e.collection,i=t[e.index];this.currentGallery.filteredCollection=t,this.pushState(this.currentGallery.id,i)}},{key:"removeLightbox",value:function(){delete this.currentGallery.filteredCollection,this.galleryData.galleryDeepLinking&&!this.galleryData.editMode&&this.itemFromHash&&window.history.back()}},{key:"checkGalleryYpositionForViewedItem",value:function(){if(this.viewedItemBounding&&this.galleryModal&&this.galleryModal.view){var e=this.viewedItemBounding,t=(this.galleryModal.view.getBoundingClientRect().height-e.height)/2,i=this.galleryModal.view.scrollTop+e.top-t;st.scrollInElementToY(this.galleryModal.view,Math.max(0,i))}}},{key:"itemActionHandler",value:function(e){if(e&&e.params&&e.params.type&&e.params.item&&"view"===e.params.type&&(this.viewItem=e.params.item,this.galleryData.galleryScrollPositionControll&&void 0!==e.params.itemIndex&&this.galleryModal)){e.params.item&&e.params.item.view&&e.params.item.view.view&&(this.viewedItemBounding=e.params.item.view.view.getBoundingClientRect());var t=this.galleryModal.itemPageByIndex(e.params.itemIndex);void 0!==t&&this.galleryModal.addPageToStageByPageNum(t)}}},{key:"isSelected",value:function(e){this.placeHolder(!0!==e)}},{key:"placeHolder",value:function(e){e?(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.view.appendChild(this.placeHolderDiv)):this.placeHolderDiv&&this.placeHolderDiv.parentElement&&this.placeHolderDiv.parentElement.removeChild(this.placeHolderDiv)}},{key:"createModalEventHendler",value:function(e){this.createModal(e.params)}},{key:"createModal",value:function(e){if(e.type&&e.item){var t=e.item,i=_e.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="pgc_simply_gallery"!==t.type&&this.galleryData.sliderItemDownload,i.ish_copy=this.galleryData.shareCopyLink,i.ish_linkToPost=this.galleryData.sharePost;var n=document.getElementsByTagName("body")[0];i.ish_parentDiv=this.lightbox?this.lightbox.view:n,this.galleryData.appEventManager.addGMEventListener(_e.EVENTS.REMOVE_SHARE_WINDOW,this,"deleteModal"),this.modal=new _e(this.galleryData.appEventManager,i),this.modal.initByItem(t)}}},{key:"deleteModal",value:function(){this.modal&&delete this.modal,this.galleryData.appEventManager.removeGMEventListener(_e.EVENTS.REMOVE_SHARE_WINDOW,this,"deleteModal")}},{key:"fullscreenSwitch",value:function(){var e=this.lightbox.view;e&&(st.toggleFullScreen(e),this.windowResizeHandler())}},{key:"windowResizeHandler",value:function(){var e=this;clearTimeout(this.resizeTimeOut),st.isTouchDevice?this.resizeTimeOut=setTimeout((function(){e.windowResize()}),200):this.windowResize()}},{key:"windowResize",value:function(){this.resizeHandler(),this.lightbox&&this.lightbox.resizeHandler(),this.galleryModal&&this.galleryModal.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(),document.removeEventListener("keydown",this.handlerKB,!0),window.removeEventListener("resize",this.resizeWindow),this.view.parentNode&&this.view.parentNode.removeChild(this.view)}}],t&&ii(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function si(e){return si="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},si(e)}function ri(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,li(n.key),n)}}function li(e){var t=function(e){if("object"!=si(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=si(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==si(t)?t:t+""}st.trace;const ci=function(){return e=function e(t,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.delegate=t,this.classPref=t.classPref,this.galleryData=this.delegate.galleryData,this.appName=t.appName,this.index=i,this.inited=!1,this.scrollerViewWrapper=t.scrollerViewWrapper?t.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},(t=[{key:"init",value:function(){var e=this.delegate.itemsList[this.index];this.item=e,this.thumbSize=e.itemViewThumbSize,this.type=e.type,this.itemViewSrc=e.itemViewSrc,this.view.dataset.id=e.id,this.view.classList.add("pgc-".concat(e.type)),this.wrap_main.classList.add("pgc-".concat(e.type)),e.ratio>1&&this.view.classList.add("pgc-portrait")}},{key:"initSRC",value:function(){var e=this;if(!this.inited){var t=this.item,i=this;if(this.img=new Image,"video"!==t.type||"video"===t.type&&t.mime_type)"audio"===t.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(){(t.title||t.alt)&&this.setAttribute("alt",t.alt?t.alt:t.title),i.view.style.opacity=i.opacityPr,i.imgCompleted=!0,i.itemCompleted(),i.updateImgSize()},this.img.onerror=function(){i.view.classList.add("pgc-error"),t.errorStatus=!0;var e=document.createElement("div");e.className="pgc-alert-icon",e.innerHTML=st.ICONS.ATTENTION_SVG,i.view.appendChild(e),i.view.style.opacity=i.opacityPr,i.imgCompleted=!0,this.itemCompleted()},"audio"===t.type?this.poster.appendChild(this.img):this.wrap_item.appendChild(this.img),this.img.style.width="".concat(t.itemViewThumbSize.width,"px"),this.img.style.height="".concat(t.itemViewThumbSize.height,"px"),this.galleryData.lazyLoading&&!1===this.delegate.isAdmin?this.img.setAttribute("loading","lazy"):this.img.removeAttribute("loading"),t.itemViewThumbSrc&&(this.img.src=t.itemViewThumbSrc);else{if(this.view.style.opacity=this.opacityPr,this.imgCompleted=!1,this.videoContent=st.mediaEl("video"),this.videoContent.className="thumb-video-content",this.videoContent.setAttribute("loop",""),this.wrap_item.insertBefore(this.videoContent,this.wrap_item.children[0]),t.mime&&this.videoContent.setAttribute("type",t.mime),this.videoContent.src="".concat(t.url+(void 0===t.poster&&void 0===t.featuredImage&&!1===this.galleryData.useLightbox&&st.Device.browser.safari&&st.isTouchDevice?"#t=0.001":"")),t.poster){var n=t.poster.medium?t.poster.medium.url:t.poster.full.url;this.videoContent.setAttribute("poster",n),this.videoContent.setAttribute("preload","none"),this.img.src=n,this.img.onload=function(){e.itemCompleted(),e.img=void 0}}else t.featuredImage?(this.videoContent.setAttribute("poster",t.featuredImage.src),this.videoContent.setAttribute("preload","none"),this.img.src=t.featuredImage.src,this.img.onload=function(){e.itemCompleted(),e.img=void 0}):(this.videoContent.setAttribute("preload",st.preloadedAttributForVideo),this.videoContent.onloadedmetadata=function(){e.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(t),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 e,t=this.item;switch(this.badge&&this.badge.parentNode&&this.badge.parentNode.removeChild(this.badge),t.type){case"video":(e=document.createElement("div")).className="".concat(this.classPref,"item-badge"),e.innerHTML=st.ICONS.VIDEO_TYPE,this.inner.appendChild(e);break;case"audio":(e=document.createElement("div")).className="".concat(this.classPref,"item-badge"),e.innerHTML=st.ICONS.NOTE_SVG,this.inner.appendChild(e)}e&&(this.badge=e)}}},{key:"initSubContent",value:function(e){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(e[this.captionSrc]?e[this.captionSrc]:""),st.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"),e.meta&&e.meta.subType&&"product"===e.meta.subType&&(e.meta.price&&(this.price=document.createElement("div"),this.price.className="".concat(this.classPref,"item-thumb-price"),this.price.innerHTML=e.meta.price,this.inner.appendChild(this.price)),void 0!==e.meta.on_sale&&e.meta.on_sale&&this.inner.classList.add("sgb-product-onsale")))}},{key:"initItemViewHandlers",value:function(){var e=this,t=this.item;function i(i){switch(i.type){case"mouseenter":(e.galleryData.useLightbox||"none"!==e.galleryData.thumbClickAction||"audio"===e.item.type||"video"===e.item.type)&&this.classList.add("hover"),e.delegate.itemMenu&&e.menuHolder&&(this.classList.add("hover-menu"),e.delegate.itemMenu.updateForItem(t),e.menuHolder.appendChild(e.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 e=this;return this.itemClickHandler=function(t){t.target.classList.contains("".concat(e.classPref,"item-inner"))&&(e.view.classList.remove("hover"),e.view.classList.remove("hover-menu"),"useLightbox"===e.galleryData.thumbClickAction&&e.delegate.createLightbox({index:e.index}),"postLink"===e.galleryData.thumbClickAction&&e.delegate.openPostLink({index:e.index}))},this.itemClickHandler}},{key:"checkPositionHandler",value:function(){var e=this;return e.checkPosition||(e.checkPosition=function(t){if(e.videoContent){if(e.delegate.mediaPlayHandler&&"play"===t.type&&e.delegate.mediaPlayHandler(!0),"pause"===t.type||"ended"===t.type)return e.scrollerViewWrapper.removeEventListener("scroll",e.checkPosition),e.videoContent.removeEventListener("pause",e.checkPosition),e.videoContent.removeEventListener("ended",e.checkPosition),void(e.delegate.mediaPlayHandler&&e.delegate.mediaPlayHandler(!1));st.scrollYpositionForDiv(e.wrap_item)&&(e.videoContent.pause(),e.wrap_main.classList.remove("pgc-interectiv"),e.delegate.mediaPlayHandler&&e.delegate.mediaPlayHandler(!1))}e.embedContent&&st.scrollYpositionForDiv(e.wrap_item)&&(e.delegate.mediaPlayHandler&&e.delegate.mediaPlayHandler(!1),e.deleteEmbedContent())}),e.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 e=this;if(e.wrap_main.classList.contains("pgc-interectiv")){var t=e.galleryData.audioPlayer;t.src&&t.src===e.item.original&&(t.pause(),e.wrap_main.classList.remove("pgc-interectiv"),e.badge&&e.badge.classList.remove("pgc-sgb-svg-rotate"),e.delegate.mediaPlayHandler&&e.delegate.mediaPlayHandler(!1)),e.videoContent&&(e.wrap_main.classList.remove("pgc-interectiv"),e.videoContent.pause()),e.deleteEmbedContent(),e.imageInteractiv&&"image"===e.item.type&&e.wrap_main.classList.remove("pgc-interectiv")}}},{key:"clicMediaHandler",value:function(){var e=this;return this.itemMediaClickHandler=function(t){if(!e.imageInteractiv&&"image"===e.item.type&&e.externalLink&&e.item.link&&""!==e.item.link&&window.open(e.item.link,e.item.linkTarget?e.item.linkTarget:"_blank"),e.wrap_main.classList.contains("pgc-interectiv"))e.stopAllInterectivContentInside();else if(!1!==t.target.classList.contains("".concat(e.classPref,"item-inner"))||!1!==t.target.classList.contains("".concat(e.classPref,"item-wrap"))||!1!==t.target.classList.contains("".concat(e.classPref,"play"))){var i=e.galleryData.audioPlayer;if(i.src&&i.src!==e.item.original){i.pause();for(var n=document.getElementsByClassName("pgc-audio"),a=0;a<n.length;a+=1){var o=n[a];o.classList.contains("pgc-interectiv")&&o.classList.remove("pgc-interectiv")}var s=document.getElementsByClassName("pgc-sgb-svg-rotate");if(s.length)for(var r=0;r<s.length;r+=1)s[r].classList.remove("pgc-sgb-svg-rotate")}var l=document.getElementsByClassName("thumb-video-content");if(l.length)for(var c=0;c<l.length;c+=1)if(l[c]!==e.videoContent){var h=st.searchParentByClassName(l[c],"pgc-interectiv");h&&h.classList.remove("pgc-interectiv"),l[c].pause()}st.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"===e.item.type&&i&&(i.src===e.item.original?i.paused?(i.play(),e.delegate.mediaPlayHandler&&e.delegate.mediaPlayHandler(!0),e.badge&&e.badge.classList.add("pgc-sgb-svg-rotate"),e.wrap_main.classList.add("pgc-interectiv")):(i.pause(),e.delegate.mediaPlayHandler&&e.delegate.mediaPlayHandler(!1),e.wrap_main.classList.remove("pgc-interectiv"),e.badge&&e.badge.classList.remove("pgc-sgb-svg-rotate")):setTimeout((function(){i.src=e.item.original,i.play(),e.wrap_main.classList.add("pgc-interectiv"),e.badge&&e.badge.classList.add("pgc-sgb-svg-rotate"),e.delegate.mediaPlayHandler&&e.delegate.mediaPlayHandler(!0)}),100)),"video"===e.item.type&&e.videoContent)e.videoContent.paused?(e.videoContent.play(),e.wrap_main.classList.add("pgc-interectiv"),e.view.classList.remove("hover"),e.view.classList.remove("hover-menu"),e.scrollerViewWrapper.addEventListener("scroll",e.checkPositionHandler()),e.videoContent.addEventListener("pause",e.checkPositionHandler()),e.videoContent.addEventListener("ended",e.checkPositionHandler()),e.videoContent.addEventListener("play",e.checkPositionHandler())):(e.videoContent.pause(),e.view.classList.add("hover"),e.view.classList.add("hover-menu"),e.wrap_main.classList.remove("pgc-interectiv"));else if("video"===e.item.type&&e.item.mime_type){var m=e.item.mime_type.split("/")[1];if(!m)return;e.delegate.mediaPlayHandler&&e.delegate.mediaPlayHandler(!0),e.embedContent||(window.PGC_SGB.galleries[e.delegate.id],e.embedContent=st.embedVideoEl(m,e.item.videoId,e.item.videoHash),e.embedContent.className="thumb-embed-content",e.embedContent.dataset.id=e.delegate.id,e.wrap_item.appendChild(e.embedContent),e.wrap_main.classList.add("pgc-interectiv"),e.scrollerViewWrapper.addEventListener("scroll",e.checkPositionHandler()))}else e.imageInteractiv&&"image"===e.item.type&&e.wrap_main.classList.add("pgc-interectiv");e.itemMediaClickHandlerExtend&&e.itemMediaClickHandlerExtend()}},this.itemMediaClickHandler}},{key:"updateLink",value:function(){if(this.inited){var e,t=this.item;if(this.deleteEmbedContent(),this.videoContent&&(e=this.videoContent.src,this.videoContent.removeAttribute("src")),t.poster){var i=t.poster.medium?t.poster.medium.url:t.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",st.preloadedAttributForVideo),t.featuredImage&&(this.videoContent.setAttribute("poster",t.featuredImage.src),this.videoContent.setAttribute("preload","none"))),this.img&&t.itemViewThumbSrc&&(this.img.src=t.itemViewThumbSrc),this.updateImgSize();this.videoContent&&e&&(this.videoContent.src=e),"video"===t.type&&t.mime_type?this.addEmbedVideoToItem(t.mime_type.split("/").pop(),t.videoId):(this.view.classList.remove("pgc-embed"),this.wrap_main.classList.remove("pgc-embed"),this.initBadge()),t.link&&""!==t.link?(this.titleHolder&&(this.titleHolder.style.pointerEvents=null),this.linkButton.href=t.link,this.linkButton.innerHTML=t.linkText,t.linkTarget&&(this.linkButton.target=t.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(e){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"===e?(this.badge.innerHTML=st.ICONS.VIMEO_SVG,this.badge.firstChild.style.fill="#00adef"):"youtube"===e&&(this.badge.innerHTML=st.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 e=this.item.poster.medium?this.item.poster.medium:this.item.poster.full,t=this.item.poster.large?this.item.poster.large:this.item.poster.full;(this.rect.width.toFixed(2)/e.width>1.1||this.rect.height.toFixed(2)/e.height>1.1)&&(this.videoContent&&this.videoContent.setAttribute("poster",t.url),this.img&&(this.img.src=t.url),this.itemViewSrcCompleted=!0)}}},{key:"display",get:function(){return this.displayPr},set:function(e){this.displayPr!==e&&("block"===e&&(this.wrap_main.dataset.index=this.index,this.inner&&(this.inner.dataset.index=this.index)),"none"===e&&clearTimeout(this.opacityDelay),this.view.style.display=e,this.displayPr=e)}},{key:"opacity",set:function(e){if(e.opacity!==this.opacityPr){var t=this;e.delay?this.opacityDelay=setTimeout((function(){(t.imgCompleted||"video"===t.item.type)&&(t.view.style.opacity=e.opacity),t.opacityPr=e.opacity}),e.delay):(clearTimeout(this.opacityDelay),(t.imgCompleted||"video"===t.item.type)&&(t.view.style.opacity=e.opacity),t.opacityPr=e.opacity)}}}])&&ri(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function hi(e){return hi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hi(e)}function di(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ui(n.key),n)}}function ui(e){var t=function(e){if("object"!=hi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=hi(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==hi(t)?t:t+""}var mi=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var i=window.PGC_SGB;if(i){var n=t.split("-").pop();window.PGC_SGB.galleries||(window.PGC_SGB.galleries={}),this.galleries=window.PGC_SGB.galleries;var a=e.galleriesVP(t);if(i.vports&&i.vports[n])for(var o in i.vports[n])if(Object.prototype.hasOwnProperty.call(i.vports[n],o)){var s=i.vports[n][o];a.push(s)}if(a.length>0)for(var r=0;r<a.length;r+=1){var l=a[r];if(l.id)this.createGalleryByVpRef(l);else{if(l.getElementsByClassName("sgb-preloader").length){var c=l.getElementsByClassName("sgb-preloader")[0];l.removeChild(c)}if(l.getElementsByClassName("simply-gallery-amp").length){var h=l.getElementsByClassName("simply-gallery-amp")[0];l.removeChild(h)}this.createGalleryByVp(l)}}console.log("%c SGB ".concat(n.toUpperCase()," v.3.2.7"),"background: #222; color: #eaabff")}else st.trace("Plugin scripts are not ready")}return t=e,n=[{key:"galleriesVP",value:function(e){for(var t=[],i=document.getElementsByClassName(e),n=0;n<i.length;n+=1){var a=i[n];t.push(a)}return t}},{key:"getAppNameFromVp",value:function(e){var t,i=e.getElementsByClassName("sgb-data")[0];if(i?t=i.textContent:e.dataset.gallery?t=this.viewPort.dataset.gallery:st.trace("Error: Gallery data is missing"),t&&""!==t)try{var n=JSON.parse(t);if(n.galleryId)return n.galleryId}catch(e){st.trace(e)}}}],(i=[{key:"collectionConstructor",value:function(e,t){st.trace(" ********* Need an implementation - CollectionConstructor *********** ",e),st.trace(t)}},{key:"createGalleryByVpRef",value:function(e,t){if(!e)return!1;var i=e.id;if(this.galleries[i])return!0;var n=this.collectionConstructor(i,e);return n.isSelected(t),this.galleries[i]=n,!0}},{key:"updateGalleryById",value:function(e,t,i){t&&void 0!==i&&(t.gutIsSelected=i);var n=this.galleries[e];n&&n.update(t)}},{key:"removeGalleryById",value:function(e){this.galleries[e]&&(this.galleries[e].remove(),delete this.galleries[e])}},{key:"removeDuplicateByAppname",value:function(e){for(var t in this.galleries)if(Object.hasOwn(this.galleries,t)){var i=this.galleries[t];e===i.appName&&(i.remove(),delete this.galleries[t])}}},{key:"createGalleryByVpSavedGalley",value:function(t){var i=e.getAppNameFromVp(t);this.removeDuplicateByAppname(i);var n=this.collectionConstructor(i,t);this.galleries[i]=n}},{key:"createGalleryByVp",value:function(e){if(e.getElementsByClassName("sgb-preloader").length){var t=e.getElementsByClassName("sgb-preloader")[0];e.removeChild(t)}if(e.getElementsByClassName("simply-gallery-amp").length){var i=e.getElementsByClassName("simply-gallery-amp")[0];e.removeChild(i)}var n=(new Date).getTime(),a=this.collectionConstructor(n,e);this.galleries[n]=a}}])&&di(t.prototype,i),n&&di(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i,n}();const pi=mi,gi={splashColumns:{type:"number",default:3},splashThumbHieghtRation:{type:"number",default:1},splashThumbRecomendedWidth:{type:"number",default:200},splashThumbSpacing:{type:"number",default:5},coverRoundedCorners:{type:"number",default:0},coverHoverColor:{type:"sring",default:"rgba(0,0,0,0.5)"},coverTitleTextBgColor:{type:"sring",default:"#01b5fd"},coverTitle:{type:"boolean",default:!0},coverTitleTextColor:{type:"sring",default:"rgba(255,255,255,1)"},coverTitleTextSize:{type:"number",default:20},coverTip:{type:"boolean",default:!0},coverTipLabel:{type:"sring",default:"more"},coverTipTextColor:{type:"sring",default:"rgba(255,255,255,1)"},coverTipTextSize:{type:"number",default:12},coverTipTextBgColor:{type:"sring",default:"rgba(0,0,0,0.7)"}};var vi,fi,yi,bi,wi,Ci,Si,_i,ki=i(1166),Ei=i.n(ki),Li={};function Ti(e){return Ti="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ti(e)}function Pi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ii(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,xi(n.key),n)}}function Mi(e,t,i){return t&&Ii(e.prototype,t),i&&Ii(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function xi(e){var t=function(e){if("object"!=Ti(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=Ti(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ti(t)?t:t+""}function Ni(e,t,i){return t=Hi(t),function(e,t){if(t&&("object"==Ti(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Bi()?Reflect.construct(t,i||[],Hi(e).constructor):t.apply(e,i))}function Bi(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Bi=function(){return!!e})()}function Oi(e,t,i,n){var a=Di(Hi(1&n?e.prototype:e),t,i);return 2&n&&"function"==typeof a?function(e){return a.apply(i,e)}:a}function Di(){return Di="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,i){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=Hi(e)););return e}(e,t);if(n){var a=Object.getOwnPropertyDescriptor(n,t);return a.get?a.get.call(arguments.length<3?e:i):a.value}},Di.apply(null,arguments)}function Hi(e){return Hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Hi(e)}function Ai(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vi(e,t)}function Vi(e,t){return Vi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Vi(e,t)}Li.styleTagTransform=u(),Li.setAttributes=l(),Li.insert=s().bind(null,"head"),Li.domAPI=a(),Li.insertStyleElement=h(),t()(Ei(),Li),Ei()&&Ei().locals&&Ei().locals,window.pgc_sgb_albumnavigator=(vi="albumnavigator",fi="wp-block-".concat("pgcsimplygalleryblock","-").concat(vi),yi="".concat("pgcsimplygalleryblock","-").concat(vi,"-"),st.trace,bi=function(e){function t(e,i){var n;return Pi(this,t),(n=Ni(this,t,[e,i])).galleryData=e.appSet,n.rect=void 0,n}return Ai(t,e),Mi(t,[{key:"updateImgSize",value:function(){this.rect=st.Size(this.view.clientWidth,this.view.clientHeight),this.videoContent&&0!==this.rect.width&&(this.videoContent.style.height="".concat(this.item.ratio*this.wrap_item.clientWidth,"px")),Oi(t,"updateImgSize",this,3)([])}},{key:"display",set:function(e){this.view.style.display=e,"block"===e&&this.inner&&(this.inner.dataset.index=this.index),this.displayPr=e,this.updateImgSize(),this.imgCompleted||(this.view.style.minHeight="".concat(this.item.ratio*this.view.clientWidth,"px"))}}])}(ci),wi=function(e){function t(e,i){var n;return Pi(this,t),(n=Ni(this,t,[e,i])).delegate=e,n.TAGS_CLOUD=!0,n.TAGS_CLOUD_CUSTOM=!0,n.columnsArr=[],n.columnsHeightsArr=[],n.contentNoPadding=void 0,n}return Ai(t,e),Mi(t,[{key:"classPref",get:function(){return"".concat(yi,"masonry-")}},{key:"contentWidth",get:function(){return this.content.clientWidth-this.appSet.thumbSpacing}},{key:"updateGalleryStyleSheet",value:function(){this.styleSheet.innerHTML='\n      div[data-gallery-id="'.concat(this.appName,'"] .').concat(this.classPref,"gallery-content{\n        padding:").concat(this.thumbSpacing/2,'px;\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"main-wrap{\n        padding:").concat(this.thumbSpacing/2,"px;\n        color:").concat(this.appSet.collectionthumbHoverTitleTextColor,";\n        font-size:").concat(this.appSet.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.appSet.externalLinkTextColor,";\n        font-size:").concat(this.appSet.externalLinkFontSize,"px;\n        background-color:").concat(this.appSet.externalLinkBgColor,";\n        box-shadow:10px 0 0 ").concat(this.appSet.externalLinkBgColor,", -10px 0 0 ").concat(this.appSet.externalLinkBgColor,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"item-button:hover{\n        color:").concat(this.appSet.externalLinkBgColor,";\n        background-color:").concat(this.appSet.externalLinkTextColor,";\n        box-shadow:10px 0 0 ").concat(this.appSet.externalLinkTextColor,", -10px 0 0 ").concat(this.appSet.externalLinkTextColor,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"item-title{\n        background-color:").concat(this.appSet.collectionthumbHoverTitleTextBgColor,";\n        box-shadow:10px 0 0 ").concat(this.appSet.collectionthumbHoverTitleTextBgColor,", -10px 0 0 ").concat(this.appSet.collectionthumbHoverTitleTextBgColor,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"item-hover{\n        background-color:").concat(this.appSet.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.appSet.collectionThumbSubMenuBgColor,";\n        fill:").concat(this.appSet.collectionThumbSubMenuIconColor,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"item-thumb-price{\n        color:").concat(this.appSet.collectionthumbHoverTitleTextColor,";\n        background-color:").concat(this.appSet.collectionthumbHoverTitleTextBgColor,";\n      }\n     ")}},{key:"itemViewConstructor",get:function(){var e=this;return function(t){return new bi(e,t)}}},{key:"createLayout",value:function(){Oi(t,"createLayout",this,3)([]),this.createColumns(),this.addPageToStage()}},{key:"updateLayout",value:function(){if(!1!==this.createColumns()){this.removePresentedItems();for(var e=0;e<this.presentedList.length;e+=1)this.arangeItemToColum(this.presentedList[e])}else this.presentedList&&this.presentedList[0]&&"none"===this.presentedList[0].display&&this.showPresentedItems()}},{key:"createColumns",value:function(){var e=Math.floor(this.contentWidth/this.appSet.collectionThumbRecomendedWidth);if(e=e<1?1:e,e=Math.min(e,this.appSet.collectionColumns),this.columnsArr.length!==e){for(var t=0;t<this.columnsArr.length;t+=1)this.content.removeChild(this.columnsArr[t]);this.columnsArr=[],this.columnsHeightsArr=[];for(var i=0;i<e;i+=1){var n=document.createElement("div");n.className="collectionColumn",n.style.width="".concat(100/e,"%"),this.columnsArr.push(n),this.columnsHeightsArr.push(0),this.content.appendChild(n)}return!0}return!1}},{key:"getColumWithMinHeight",value:function(){for(var e=this.columnsHeightsArr[0],t=0,i=1;i<this.columnsHeightsArr.length;i+=1)e!==Math.min(e,this.columnsHeightsArr[i])&&(e=Math.min(e,this.columnsHeightsArr[i]),t=i);return t}},{key:"arangeItemToColum",value:function(e){var t=e.view,i=this.getColumWithMinHeight();this.columnsHeightsArr[i]+=e.thumbSize.height/e.thumbSize.width*this.itemWidth,this.columnsArr[i].appendChild(t),e.display="block"}},{key:"removePresentedItems",value:function(){Oi(t,"removePresentedItems",this,3)([]);for(var e=0;e<this.columnsHeightsArr.length;e+=1)this.columnsHeightsArr[e]=0}},{key:"addItemToStage",value:function(e){Oi(t,"addItemToStage",this,3)([e]),this.arangeItemToColum(e),this.presentedList.push(e)}},{key:"itemWidth",get:function(){var e=Math.floor(this.contentWidth/this.appSet.collectionThumbRecomendedWidth);return this.contentWidth/e}},{key:"removeViewContent",value:function(){for(var e=0;e<this.columnsArr.length;e+=1)this.content.removeChild(this.columnsArr[e]);this.columnsArr=[],this.columnsHeightsArr=[],Oi(t,"removeViewContent",this,3)([])}}])}(Zt),Ci=function(e){function t(){return Pi(this,t),Ni(this,t,arguments)}return Ai(t,e),Mi(t,[{key:"galleryViewConstructor",get:function(){var e=this;return function(t){return new wi(e,t)}}}])}(Pt),Si=function(){return Mi((function e(t,i){Pi(this,e);var n=this;function a(e){switch(e.type){case"mouseenter":n.delegate.coverInFocus=n.index;break;case"mouseleave":n.delegate.coverInFocus=void 0}}this.delegate=t,this.index=i,this.galleryData=this.delegate.galleryData,this.appName=t.appName,this.classPref=t.classPref,this.view=document.createElement("div"),this.view.className="".concat(this.classPref,"cover"),this.view.dataset.index=i,this.mainWrap=document.createElement("div"),this.mainWrap.className="".concat(this.classPref,"main-wrap"),this.view.appendChild(this.mainWrap),this.inner=document.createElement("a"),this.inner.dataset.index=i,this.inner.className="".concat(this.classPref,"inner"),this.mainWrap.appendChild(this.inner),this.subContentWrap=document.createElement("div"),this.subContentWrap.className="".concat(this.classPref,"sub-wrap"),this.inner.appendChild(this.subContentWrap),(this.delegate.isAdmin||this.delegate.galleryData.coverTitle)&&(this.titleWrap=document.createElement("div"),this.titleWrap.className="".concat(this.classPref,"title"),this.subContentWrap.appendChild(this.titleWrap)),(this.delegate.isAdmin||this.delegate.galleryData.coverTip)&&(this.amountWrap=document.createElement("div"),this.amountWrap.className="".concat(this.classPref,"amount"),this.amountWrap.innerHTML=this.delegate.galleryData.coverTipLabel,this.subContentWrap.appendChild(this.amountWrap)),this.rect=void 0,this.thumbSize=st.Size(0,0),this.view.addEventListener("mouseenter",a,!1),this.view.addEventListener("mouseleave",a,!1)}),[{key:"coverHandler",value:function(){var e=this;return this.coverMouseHandler=function(t){t.stopPropagation(),t.preventDefault(),e.delegate.coverHandlerInsideType(e.index)},e.coverMouseHandler}},{key:"init",value:function(){var e=this,t=this.delegate.coversList[this.index];this.item=t,this.inner.href=t.postLink,this.inner.dataset.idGallery=t.id,this.inner.setAttribute("target","_blank"===e.galleryData.galleryOpeningMode?"_blank":"_self"),"inside"===e.galleryData.galleryOpeningMode&&this.inner.addEventListener("click",this.coverHandler(),!1),this.thumbSize=t.itemViewThumbSize,this.type=t.type,this.itemViewSrc=t.itemViewSrc,this.view.dataset.idGallery=t.id,this.view.classList.add("pgc-".concat(t.type)),this.titleWrap&&(this.titleWrap.innerHTML=this.item.title),t.ratio>1&&this.view.classList.add("pgc-portrait"),this.img=new Image,this.img.onload=function(){(t.title||t.alt)&&this.setAttribute("alt",t.alt?t.alt:t.title),e.imgCompleted=!0,e.itemCompleted(),e.updateImgSize()},this.img.onerror=function(){e.view.classList.add("pgc-error"),t.errorStatus=!0,e.imgCompleted=!0,this.itemCompleted()},this.img.style.width="".concat(t.itemViewThumbSize.width,"px"),this.img.style.height="".concat(t.itemViewThumbSize.height,"px"),this.inner.insertBefore(this.img,this.subContentWrap),this.img.src=t.itemViewThumbSrc}},{key:"itemCompleted",value:function(){var e=this;this.img.classList.add("pgc-loaded"),setTimeout((function(){e.view.classList.add("pgc-completed")}),200),this.completedHandlerCallback&&this.completedHandlerCallback(this)}},{key:"updateTip",value:function(){this.amountWrap&&(this.amountWrap.innerHTML=this.delegate.galleryData.coverTipLabel)}},{key:"updateImgSize",value:function(){if(this.rect&&this.imgCompleted){var e=st.getFrameForBoxWithMode(st.Size(this.img.naturalWidth,this.img.naturalHeight),this.rect,!0);this.img.style.left="".concat(e.x,"px"),this.img.style.top="".concat(e.y,"px"),this.img.style.width="".concat(e.width,"px"),this.img.style.height="".concat(e.height,"px"),!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.classList.remove("pgc-loaded"),this.view.classList.remove("pgc-completed"),this.img.src=this.itemViewSrc,this.itemViewSrcCompleted=!0)}}},{key:"updateSize",value:function(e){var t=e*this.delegate.galleryData.splashThumbHieghtRation;this.ratio=t/e,this.thumbSize=st.Size(e,t),this.view.style.width="".concat(100/this.delegate.columns,"%"),this.view.style.height="".concat(this.thumbSize.height,"px"),this.rect=st.Size(this.thumbSize.width-this.delegate.galleryData.splashThumbSpacing,this.thumbSize.height-this.delegate.galleryData.splashThumbSpacing),this.updateImgSize()}}])}(),_i=function(e){function t(e,i){var n;return Pi(this,t),(n=Ni(this,t,[e,i])).init(),n}return Ai(t,e),Mi(t,[{key:"classPref",get:function(){return yi}},{key:"coverViewConstructor",get:function(){var e=this;return function(t){return new Si(e,t)}}},{key:"modalViewConstructor",get:function(){var e=this;return function(t){var i=Pt.CONFIG;return i.mc_classPref=yi,i.mc_backgroundColor=e.galleryData.galleryModalBgColor,i.mc_headerBackgroundColor=e.galleryData.galleryModalHeaderBgColor,i.mc_fixedHeaderBackgroundColor=e.galleryData.galleryModalHeaderBgColor,i.mc_headerTextColor=e.galleryData.galleryModalHeaderTitleColor,i.mc_fixedHeaderTextColor=e.galleryData.galleryModalHeaderTitleColor,i.mc_headerTextFontSize=e.galleryData.galleryModalHeaderTitleFontSize,i.mc_headerButtonBgColor=e.galleryData.galleryModalControlsColor,i.mc_headerButtonIconColor=e.galleryData.galleryModalControlsIconColor,i.mc_headerButtonBgColorHover=e.galleryData.galleryModalControlsColorHover,i.mc_headerButtonIconColorHover=e.galleryData.galleryModalControlsIconColorHover,i.mc_preloaderColor=e.galleryData.galleryModalPreloaderColor,i.mc_shareButtonShow=e.galleryData.galleryModalShareButton,new Ci(e,i,t)}}},{key:"configureGalleryDefSet",value:function(){Oi(t,"configureGalleryDefSet",this,3)([]);var e=st.getDefSettungsFromAtt(gi);e.galleryType="pgc_sgb_".concat(vi),this.galleryData=Object.assign(this.galleryData,e)}},{key:"coverHandlerInsideType",value:function(e){var t=this.coversList[parseInt(e)];this.requestGallery(t)}},{key:"coverHandler",value:function(){var e=this;return this.coverMouseHandler=function(t){if("_self"!==e.galleryData.galleryOpeningMode&&"_blank"!==e.galleryData.galleryOpeningMode){if(t.target.dataset.idGallery){var i=e.coversList[parseInt(t.target.dataset.index)];e.requestGallery(i)}}else{var n=e.coversList[parseInt(t.target.dataset.index)].postLink;window.open(n,e.galleryData.galleryOpeningMode)}},e.coverMouseHandler}},{key:"updateStyleExraProps",value:function(){}},{key:"updateGalleryStyleSheet",value:function(){this.styleSheet.innerHTML='\n      div[data-gallery-id="'.concat(this.appName,'"] .').concat(this.classPref,"inner{\n        border-radius:").concat(this.galleryData.coverRoundedCorners,"px;\n        background-color:").concat(this.galleryData.coverTitleTextBgColor,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"inner:focus{\n        background-color:").concat(this.galleryData.coverTitleTextBgColor," !important;\n        background:").concat(this.galleryData.coverTitleTextBgColor,' !important;\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"title{\n        display:").concat(this.galleryData.coverTitle?"block":"none",";\n        color:").concat(this.galleryData.coverTitleTextColor,";\n        font-size:").concat(this.galleryData.coverTitleTextSize,'px;\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"amount{\n        display:").concat(this.galleryData.coverTip?"block":"none",";\n        color:").concat(this.galleryData.coverTipTextColor,";\n        font-size:").concat(this.galleryData.coverTipTextSize,"px;\n        background-color:").concat(this.galleryData.coverTipTextBgColor,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"main-wrap{\n        padding:").concat(this.galleryData.splashThumbSpacing/2,'px;\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"content{\n        margin: -").concat(this.galleryData.splashThumbSpacing/2,'px;\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"content:hover .").concat(this.classPref,"cover .").concat(this.classPref,"sub-wrap{\n        background-color: ").concat(this.galleryData.coverHoverColor,';\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:"addCoversToStage",value:function(){for(var e=0;e<this.coversList.length;e+=1){var t=this.coversList[e].view;this.content.appendChild(t.view)}}},{key:"updateExraProps",value:function(e){if(Oi(t,"updateExraProps",this,3)([e]),e.coverTipLabel){this.galleryData.coverTipLabel=e.coverTipLabel;for(var i=0;i<this.coversList.length;i+=1)this.coversList[i].view.updateTip()}e.splashColumns&&(this.galleryData.splashColumns=e.splashColumns,this.updateLayout()),e.tagCloudAll&&(this.galleryData.tagCloudAll=e.tagCloudAll,this.galleryData.tagCloudAllDef=e.tagCloudAll),e.splashThumbSpacing&&(this.galleryData.splashThumbSpacing=e.splashThumbSpacing,this.updateLayout()),e.splashThumbRecomendedWidth&&(this.galleryData.splashThumbRecomendedWidth=e.splashThumbRecomendedWidth,this.updateLayout()),e.splashThumbHieghtRation&&(this.galleryData.splashThumbHieghtRation=e.splashThumbHieghtRation,this.updateLayout())}},{key:"arangeCover",value:function(e){e.updateSize(this.itemWidth)}},{key:"createLayout",value:function(){Oi(t,"createLayout",this,3)([]),this.addCoversToStage(),this.updateLayout()}},{key:"updateLayout",value:function(){for(var e=0;e<this.coversList.length;e+=1){var t=this.coversList[e].view;this.arangeCover(t)}}},{key:"contentWidth",get:function(){return this.content.clientWidth}},{key:"itemWidth",get:function(){return this.columns=Math.floor(this.contentWidth/this.galleryData.splashThumbRecomendedWidth),this.columns=this.columns<1?1:this.columns,this.columns=Math.min(this.columns,this.galleryData.splashColumns),this.contentWidth/this.columns}},{key:"createLightbox",value:function(e){var i=e.index,n=e.collection;if(void 0!==i){this.lightbox&&this.lightbox.prepareToRemove();var a=Je.CONFIG;a.lb_sliderCarouselMode=this.galleryData.sliderCarouselMode,a.lb_videoAutoStart=this.galleryData.sliderVideoAutoPlay,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_itemTitleFontSize=this.galleryData.sliderItemTitleFontSize,a.lb_itemTitleTextColor=this.galleryData.sliderItemTitleTextColor,a.lb_itemDescriptionEnable=this.galleryData.sliderItemDescriptionEnable,a.lb_itemDescriptionSrc=this.galleryData.sliderDescriptionSrc,a.lb_itemDescriptionFontSize=this.galleryData.sliderItemDescriptionFontSize,a.lb_itemDescriptionTextColor=this.galleryData.sliderItemDescriptionTextColor,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_itemShareBarBackgroundColor=this.galleryData.modaBgColor,a.lb_itemShareBarIconColor=this.galleryData.modalIconColor,a.lb_itemShareBarIconColorHover=this.galleryData.modalIconColorHover,a.lb_itemShareFb=this.galleryData.shareFacebook,a.lb_itemShareTw=this.galleryData.shareTwitter,a.lb_itemSharePin=this.galleryData.sharePinterest,a.lb_itemShareDownload=this.galleryData.sliderItemDownload,a.lb_itemShareCopy=this.galleryData.shareCopyLink,a.lb_itemSharePost=this.galleryData.sharePost,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=st.likesSet,a.lb_isContainIdInBookmarkSet=st.isContainIdInBookmarkSet,this.galleryData.appEventManager.addGMEventListener(Je.EVENTS.LB_NEED_MODAL,this,"createModalEventHendler"),this.galleryData.appEventManager.addGMEventListener(Je.EVENTS.LB_REMOVE_LIGHTBOX,this,"removeLightbox"),this.galleryData.appEventManager.addGMEventListener(Je.EVENTS.LB_FULLSCREEN_SWITCH,this,"fullscreenSwitch"),this.galleryData.appEventManager.addGMEventListener(Je.EVENTS.LB_ITEM_ACTION,this,"itemActionHandler"),this.lightbox=new Je(this.galleryData,a),this.lightbox.initByList(n,i),Oi(t,"createLightbox",this,3)([e])}}},{key:"removeLightbox",value:function(e){if(Oi(t,"removeLightbox",this,3)([e]),e.target===this.lightbox){var i=this,n=e.target;setTimeout((function(){n.view&&n.view.parentNode&&n.view.parentNode.removeChild(n.view),i.lightbox&&(i.lightbox=void 0)}),100),this.galleryData.appEventManager.removeGMEventListener(Je.EVENTS.LB_NEED_MODAL,this,"createModalEventHendler"),this.galleryData.appEventManager.removeGMEventListener(Je.EVENTS.LB_REMOVE_LIGHTBOX,this,"removeLightbox"),this.galleryData.appEventManager.removeGMEventListener(Je.EVENTS.LB_FULLSCREEN_SWITCH,this,"fullscreenSwitch"),this.galleryData.appEventManager.removeGMEventListener(Je.EVENTS.LB_ITEM_ACTION,this,"itemActionHandler"),this.galleryData.galleryScrollPositionControll&&this.checkGalleryYpositionForViewedItem()}}},{key:"removeViewContent",value:function(){for(Oi(t,"removeViewContent",this,3)([]);this.content.firstChild;)this.content.removeChild(this.content.lastChild);this.coversList=[]}},{key:"remove",value:function(){this.content.removeEventListener("click",this.coverMouseHandler,!1),Oi(t,"remove",this,3)([])}}])}(oi),new(function(e){function t(){return Pi(this,t),Ni(this,t,arguments)}return Ai(t,e),Mi(t,[{key:"collectionConstructor",value:function(e,t){return new _i(e,t)}}])}(pi))(fi))})()})();