/home/s/h/a/shalekuihb/www/wp-content/plugins/insta-gallery/build/frontend/js/index.js
/*! For license information please see index.js.LICENSE.txt */
(()=>{var t={500:(t,e)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var t="",e=0;e<arguments.length;e++){var n=arguments[e];n&&(t=a(t,i(n)))}return t}function i(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return o.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var e="";for(var n in t)r.call(t,n)&&t[n]&&(e=a(e,n));return e}function a(t,e){return e?t?t+" "+e:t+e:t}t.exports?(o.default=o,t.exports=o):void 0===(n=function(){return o}.apply(e,[]))||(t.exports=n)}()}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t,e,r,o,i,a,l,u,c,s,d,f,_={},m=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function v(t,e){for(var n in e)t[n]=e[n];return t}function y(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function h(e,n,r){var o,i,a,l={};for(a in n)"key"==a?o=n[a]:"ref"==a?i=n[a]:l[a]=n[a];if(arguments.length>2&&(l.children=arguments.length>3?t.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===l[a]&&(l[a]=e.defaultProps[a]);return b(e,l,o,i,null)}function b(t,n,o,i,a){var l={type:t,props:n,key:o,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==a?++r:a,__i:-1,__u:0};return null==a&&null!=e.vnode&&e.vnode(l),l}function w(t){return t.children}function S(t,e){this.props=t,this.context=e}function k(t,e){if(null==e)return t.__?k(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?k(t):null}function O(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return O(t)}}function x(t){(!t.__d&&(t.__d=!0)&&o.push(t)&&!N.__r++||i!=e.debounceRendering)&&((i=e.debounceRendering)||a)(N)}function N(){for(var t,n,r,i,a,u,c,s=1;o.length;)o.length>s&&o.sort(l),t=o.shift(),s=o.length,t.__d&&(r=void 0,i=void 0,a=(i=(n=t).__v).__e,u=[],c=[],n.__P&&((r=v({},i)).__v=i.__v+1,e.vnode&&e.vnode(r),M(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[a]:null,u,null==a?k(i):a,!!(32&i.__u),c),r.__v=i.__v,r.__.__k[r.__i]=r,D(u,r,c),i.__e=i.__=null,r.__e!=a&&O(r)));N.__r=0}function I(t,e,n,r,o,i,a,l,u,c,s){var d,f,p,g,v,y,h,b=r&&r.__k||m,w=e.length;for(u=P(n,e,b,u,w),d=0;d<w;d++)null!=(p=n.__k[d])&&(f=-1==p.__i?_:b[p.__i]||_,p.__i=d,y=M(t,p,f,o,i,a,l,u,c,s),g=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&R(f.ref,null,p),s.push(p.ref,p.__c||g,p)),null==v&&null!=g&&(v=g),(h=!!(4&p.__u))||f.__k===p.__k?u=j(p,u,t,h):"function"==typeof p.type&&void 0!==y?u=y:g&&(u=g.nextSibling),p.__u&=-7);return n.__e=v,u}function P(t,e,n,r,o){var i,a,l,u,c,s=n.length,d=s,f=0;for(t.__k=new Array(o),i=0;i<o;i++)null!=(a=e[i])&&"boolean"!=typeof a&&"function"!=typeof a?(u=i+f,(a=t.__k[i]="string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?b(null,a,null,null,null):g(a)?b(w,{children:a},null,null,null):null==a.constructor&&a.__b>0?b(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=t,a.__b=t.__b+1,l=null,-1!=(c=a.__i=A(a,n,u,d))&&(d--,(l=n[c])&&(l.__u|=2)),null==l||null==l.__v?(-1==c&&(o>s?f--:o<s&&f++),"function"!=typeof a.type&&(a.__u|=4)):c!=u&&(c==u-1?f--:c==u+1?f++:(c>u?f--:f++,a.__u|=4))):t.__k[i]=null;if(d)for(i=0;i<s;i++)null!=(l=n[i])&&!(2&l.__u)&&(l.__e==r&&(r=k(l)),G(l,l));return r}function j(t,e,n,r){var o,i;if("function"==typeof t.type){for(o=t.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=t,e=j(o[i],e,n,r));return e}t.__e!=e&&(r&&(e&&t.type&&!e.parentNode&&(e=k(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8==e.nodeType);return e}function E(t,e){return e=e||[],null==t||"boolean"==typeof t||(g(t)?t.some(function(t){E(t,e)}):e.push(t)),e}function A(t,e,n,r){var o,i,a,l=t.key,u=t.type,c=e[n],s=null!=c&&!(2&c.__u);if(null===c&&null==t.key||s&&l==c.key&&u==c.type)return n;if(r>(s?1:0))for(o=n-1,i=n+1;o>=0||i<e.length;)if(null!=(c=e[a=o>=0?o--:i++])&&!(2&c.__u)&&l==c.key&&u==c.type)return a;return-1}function C(t,e,n){"-"==e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||p.test(e)?n:n+"px"}function T(t,e,n,r,o){var i,a;t:if("style"==e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||C(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||C(t.style,e,n[e])}else if("o"==e[0]&&"n"==e[1])i=e!=(e=e.replace(u,"$1")),a=e.toLowerCase(),e=a in t||"onFocusOut"==e||"onFocusIn"==e?a.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=n,n?r?n.u=r.u:(n.u=c,t.addEventListener(e,i?d:s,i)):t.removeEventListener(e,i?d:s,i);else{if("http://www.w3.org/2000/svg"==o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=e&&"height"!=e&&"href"!=e&&"list"!=e&&"form"!=e&&"tabIndex"!=e&&"download"!=e&&"rowSpan"!=e&&"colSpan"!=e&&"role"!=e&&"popover"!=e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null==n||!1===n&&"-"!=e[4]?t.removeAttribute(e):t.setAttribute(e,"popover"==e&&1==n?"":n))}}function q(t){return function(n){if(this.l){var r=this.l[n.type+t];if(null==n.t)n.t=c++;else if(n.t<r.u)return;return r(e.event?e.event(n):n)}}}function M(t,n,r,o,i,a,l,u,c,s){var d,f,_,m,p,h,b,k,O,x,N,P,j,E,A,C,T,q=n.type;if(null!=n.constructor)return null;128&r.__u&&(c=!!(32&r.__u),a=[u=n.__e=r.__e]),(d=e.__b)&&d(n);t:if("function"==typeof q)try{if(k=n.props,O="prototype"in q&&q.prototype.render,x=(d=q.contextType)&&o[d.__c],N=d?x?x.props.value:d.__:o,r.__c?b=(f=n.__c=r.__c).__=f.__E:(O?n.__c=f=new q(k,N):(n.__c=f=new S(k,N),f.constructor=q,f.render=H),x&&x.sub(f),f.props=k,f.state||(f.state={}),f.context=N,f.__n=o,_=f.__d=!0,f.__h=[],f._sb=[]),O&&null==f.__s&&(f.__s=f.state),O&&null!=q.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=v({},f.__s)),v(f.__s,q.getDerivedStateFromProps(k,f.__s))),m=f.props,p=f.state,f.__v=n,_)O&&null==q.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),O&&null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(O&&null==q.getDerivedStateFromProps&&k!==m&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(k,N),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(k,f.__s,N)||n.__v==r.__v){for(n.__v!=r.__v&&(f.props=k,f.state=f.__s,f.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(t){t&&(t.__=n)}),P=0;P<f._sb.length;P++)f.__h.push(f._sb[P]);f._sb=[],f.__h.length&&l.push(f);break t}null!=f.componentWillUpdate&&f.componentWillUpdate(k,f.__s,N),O&&null!=f.componentDidUpdate&&f.__h.push(function(){f.componentDidUpdate(m,p,h)})}if(f.context=N,f.props=k,f.__P=t,f.__e=!1,j=e.__r,E=0,O){for(f.state=f.__s,f.__d=!1,j&&j(n),d=f.render(f.props,f.state,f.context),A=0;A<f._sb.length;A++)f.__h.push(f._sb[A]);f._sb=[]}else do{f.__d=!1,j&&j(n),d=f.render(f.props,f.state,f.context),f.state=f.__s}while(f.__d&&++E<25);f.state=f.__s,null!=f.getChildContext&&(o=v(v({},o),f.getChildContext())),O&&!_&&null!=f.getSnapshotBeforeUpdate&&(h=f.getSnapshotBeforeUpdate(m,p)),C=d,null!=d&&d.type===w&&null==d.key&&(C=U(d.props.children)),u=I(t,g(C)?C:[C],n,r,o,i,a,l,u,c,s),f.base=n.__e,n.__u&=-161,f.__h.length&&l.push(f),b&&(f.__E=f.__=null)}catch(t){if(n.__v=null,c||null!=a)if(t.then){for(n.__u|=c?160:128;u&&8==u.nodeType&&u.nextSibling;)u=u.nextSibling;a[a.indexOf(u)]=null,n.__e=u}else{for(T=a.length;T--;)y(a[T]);L(n)}else n.__e=r.__e,n.__k=r.__k,t.then||L(n);e.__e(t,n,r)}else null==a&&n.__v==r.__v?(n.__k=r.__k,n.__e=r.__e):u=n.__e=F(r.__e,n,r,o,i,a,l,c,s);return(d=e.diffed)&&d(n),128&n.__u?void 0:u}function L(t){t&&t.__c&&(t.__c.__e=!0),t&&t.__k&&t.__k.forEach(L)}function D(t,n,r){for(var o=0;o<r.length;o++)R(r[o],r[++o],r[++o]);e.__c&&e.__c(n,t),t.some(function(n){try{t=n.__h,n.__h=[],t.some(function(t){t.call(n)})}catch(t){e.__e(t,n.__v)}})}function U(t){return"object"!=typeof t||null==t||t.__b&&t.__b>0?t:g(t)?t.map(U):v({},t)}function F(n,r,o,i,a,l,u,c,s){var d,f,m,p,v,h,b,w=o.props,S=r.props,O=r.type;if("svg"==O?a="http://www.w3.org/2000/svg":"math"==O?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),null!=l)for(d=0;d<l.length;d++)if((v=l[d])&&"setAttribute"in v==!!O&&(O?v.localName==O:3==v.nodeType)){n=v,l[d]=null;break}if(null==n){if(null==O)return document.createTextNode(S);n=document.createElementNS(a,O,S.is&&S),c&&(e.__m&&e.__m(r,l),c=!1),l=null}if(null==O)w===S||c&&n.data==S||(n.data=S);else{if(l=l&&t.call(n.childNodes),w=o.props||_,!c&&null!=l)for(w={},d=0;d<n.attributes.length;d++)w[(v=n.attributes[d]).name]=v.value;for(d in w)if(v=w[d],"children"==d);else if("dangerouslySetInnerHTML"==d)m=v;else if(!(d in S)){if("value"==d&&"defaultValue"in S||"checked"==d&&"defaultChecked"in S)continue;T(n,d,null,v,a)}for(d in S)v=S[d],"children"==d?p=v:"dangerouslySetInnerHTML"==d?f=v:"value"==d?h=v:"checked"==d?b=v:c&&"function"!=typeof v||w[d]===v||T(n,d,v,w[d],a);if(f)c||m&&(f.__html==m.__html||f.__html==n.innerHTML)||(n.innerHTML=f.__html),r.__k=[];else if(m&&(n.innerHTML=""),I("template"==r.type?n.content:n,g(p)?p:[p],r,o,i,"foreignObject"==O?"http://www.w3.org/1999/xhtml":a,l,u,l?l[0]:o.__k&&k(o,0),c,s),null!=l)for(d=l.length;d--;)y(l[d]);c||(d="value","progress"==O&&null==h?n.removeAttribute("value"):null!=h&&(h!==n[d]||"progress"==O&&!h||"option"==O&&h!=w[d])&&T(n,d,h,w[d],a),d="checked",null!=b&&b!=n[d]&&T(n,d,b,w[d],a))}return n}function R(t,n,r){try{if("function"==typeof t){var o="function"==typeof t.__u;o&&t.__u(),o&&null==n||(t.__u=t(n))}else t.current=n}catch(t){e.__e(t,r)}}function G(t,n,r){var o,i;if(e.unmount&&e.unmount(t),(o=t.ref)&&(o.current&&o.current!=t.__e||R(o,null,n)),null!=(o=t.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(t){e.__e(t,n)}o.base=o.__P=null}if(o=t.__k)for(i=0;i<o.length;i++)o[i]&&G(o[i],n,r||"function"!=typeof t.type);r||y(t.__e),t.__c=t.__=t.__e=void 0}function H(t,e,n){return this.constructor(t,n)}function W(n,r,o){var i,a,l,u;r==document&&(r=document.documentElement),e.__&&e.__(n,r),a=(i="function"==typeof o)?null:o&&o.__k||r.__k,l=[],u=[],M(r,n=(!i&&o||r).__k=h(w,null,[n]),a||_,_,r.namespaceURI,!i&&o?[o]:a?null:r.firstChild?t.call(r.childNodes):null,l,!i&&o?o:a?a.__e:r.firstChild,i,u),D(l,n,u)}t=m.slice,e={__e:function(t,e,n,r){for(var o,i,a;e=e.__;)if((o=e.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(t)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(t,r||{}),a=o.__d),a)return o.__E=o}catch(e){t=e}throw t}},r=0,S.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=v({},this.state),"function"==typeof t&&(t=t(v({},n),this.props)),t&&v(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),x(this))},S.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),x(this))},S.prototype.render=w,o=[],a="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,l=function(t,e){return t.__v.__b-e.__v.__b},N.__r=0,u=/(PointerCapture)$|Capture$/i,c=0,s=q(!1),d=q(!0),f=0;var V,B,z,Z,$=0,J=[],X=e,Y=X.__b,K=X.__r,Q=X.diffed,tt=X.__c,et=X.unmount,nt=X.__;function rt(t,e){X.__h&&X.__h(B,t,$||e),$=0;var n=B.__H||(B.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function ot(t){return $=1,it(gt,t)}function it(t,e,n){var r=rt(V++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):gt(void 0,e),function(t){var e=r.__N?r.__N[0]:r.__[0],n=r.t(e,t);e!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=B,!B.__f)){var o=function(t,e,n){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter(function(t){return!!t.__c});if(o.every(function(t){return!t.__N}))return!i||i.call(this,t,e,n);var a=r.__c.props!==t;return o.forEach(function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(a=!0)}}),i&&i.call(this,t,e,n)||a};B.__f=!0;var i=B.shouldComponentUpdate,a=B.componentWillUpdate;B.componentWillUpdate=function(t,e,n){if(this.__e){var r=i;i=void 0,o(t,e,n),i=r}a&&a.call(this,t,e,n)},B.shouldComponentUpdate=o}return r.__N||r.__}function at(t,e){var n=rt(V++,3);!X.__s&&pt(n.__H,e)&&(n.__=t,n.u=e,B.__H.__h.push(n))}function lt(t){return $=5,ut(function(){return{current:t}},[])}function ut(t,e){var n=rt(V++,7);return pt(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function ct(t,e){return $=8,ut(function(){return t},e)}function st(){for(var t;t=J.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(_t),t.__H.__h.forEach(mt),t.__H.__h=[]}catch(e){t.__H.__h=[],X.__e(e,t.__v)}}X.__b=function(t){B=null,Y&&Y(t)},X.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),nt&&nt(t,e)},X.__r=function(t){K&&K(t),V=0;var e=(B=t.__c).__H;e&&(z===B?(e.__h=[],B.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.u=t.__N=void 0})):(e.__h.forEach(_t),e.__h.forEach(mt),e.__h=[],V=0)),z=B},X.diffed=function(t){Q&&Q(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==J.push(e)&&Z===X.requestAnimationFrame||((Z=X.requestAnimationFrame)||ft)(st)),e.__H.__.forEach(function(t){t.u&&(t.__H=t.u),t.u=void 0})),z=B=null},X.__c=function(t,e){e.some(function(t){try{t.__h.forEach(_t),t.__h=t.__h.filter(function(t){return!t.__||mt(t)})}catch(n){e.some(function(t){t.__h&&(t.__h=[])}),e=[],X.__e(n,t.__v)}}),tt&&tt(t,e)},X.unmount=function(t){et&&et(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(t){try{_t(t)}catch(t){e=t}}),n.__H=void 0,e&&X.__e(e,n.__v))};var dt="function"==typeof requestAnimationFrame;function ft(t){var e,n=function(){clearTimeout(r),dt&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);dt&&(e=requestAnimationFrame(n))}function _t(t){var e=B,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),B=e}function mt(t){var e=B;t.__c=t.__(),B=e}function pt(t,e){return!t||t.length!==e.length||e.some(function(e,n){return e!==t[n]})}function gt(t,e){return"function"==typeof e?e(t):e}function vt(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var u=r&&r.prototype instanceof l?r:l,c=Object.create(u.prototype);return yt(c,"_invoke",function(n,r,o){var i,l,u,c=0,s=o||[],d=!1,f={p:0,n:0,v:t,a:_,f:_.bind(t,4),d:function(e,n){return i=e,l=0,u=t,f.n=n,a}};function _(n,r){for(l=n,u=r,e=0;!d&&c&&!o&&e<s.length;e++){var o,i=s[e],_=f.p,m=i[2];n>3?(o=m===r)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=t):i[0]<=_&&((o=n<2&&_<i[1])?(l=0,f.v=r,f.n=i[1]):_<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,f.n=m,l=0))}if(o||n>1)return a;throw d=!0,r}return function(o,s,m){if(c>1)throw TypeError("Generator is already running");for(d&&1===s&&_(s,m),l=s,u=m;(e=l<2?t:u)||!d;){i||(l?l<3?(l>1&&(f.n=-1),_(l,u)):f.n=u:f.v=u);try{if(c=2,i){if(l||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=i.return)&&e.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=t}else if((e=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(e){i=t,l=1,u=e}finally{c=1}}return{value:e,done:d}}}(n,o,i),!0),c}var a={};function l(){}function u(){}function c(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(yt(e={},r,function(){return this}),e),d=c.prototype=l.prototype=Object.create(s);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,yt(t,o,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=c,yt(d,"constructor",c),yt(c,"constructor",u),u.displayName="GeneratorFunction",yt(c,o,"GeneratorFunction"),yt(d),yt(d,o,"Generator"),yt(d,r,function(){return this}),yt(d,"toString",function(){return"[object Generator]"}),(vt=function(){return{w:i,m:f}})()}function yt(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}yt=function(t,e,n,r){function i(e,n){yt(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(i("next",0),i("throw",1),i("return",2))},yt(t,e,n,r)}function ht(t,e,n,r,o,i,a){try{var l=t[i](a),u=l.value}catch(t){return void n(t)}l.done?e(u):Promise.resolve(u).then(r,o)}function bt(t){return wt.apply(this,arguments)}function wt(){return wt=function(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){ht(i,r,o,a,l,"next",t)}function l(t){ht(i,r,o,a,l,"throw",t)}a(void 0)})}}(vt().m(function t(e){var n,r,o,i;return vt().w(function(t){for(;;)switch(t.n){case 0:if(n=e.url,r=e.data,o=e.method,n){t.n=1;break}throw new Error("Empty url: ".concat(n));case 1:return i={"Content-Type":"application/json"},"undefined"!=typeof wpApiSettings&&wpApiSettings.nonce&&(i["X-WP-Nonce"]=wpApiSettings.nonce),t.n=2,fetch(n,{body:r?JSON.stringify(r):void 0,method:o,headers:i,credentials:"same-origin"}).then(function(t){return t.json()}).then(function(t){if(t.code)throw new Error("".concat(t.code,": ").concat((null==t?void 0:t.message)||"Unknown"));return t}).catch(function(t){throw new Error(t)});case 2:return t.a(2,t.v)}},t)})),wt.apply(this,arguments)}function St(t){return St="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},St(t)}function kt(t,e){var n=[];for(var r in t)if(t.hasOwnProperty(r)){var o=e?e+"["+r+"]":r,i=t[r];n.push(null!==i&&"object"===St(i)?kt(i,o):encodeURIComponent(o)+"="+encodeURIComponent(i))}return n.join("&")}function Ot(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var u=r&&r.prototype instanceof l?r:l,c=Object.create(u.prototype);return xt(c,"_invoke",function(n,r,o){var i,l,u,c=0,s=o||[],d=!1,f={p:0,n:0,v:t,a:_,f:_.bind(t,4),d:function(e,n){return i=e,l=0,u=t,f.n=n,a}};function _(n,r){for(l=n,u=r,e=0;!d&&c&&!o&&e<s.length;e++){var o,i=s[e],_=f.p,m=i[2];n>3?(o=m===r)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=t):i[0]<=_&&((o=n<2&&_<i[1])?(l=0,f.v=r,f.n=i[1]):_<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,f.n=m,l=0))}if(o||n>1)return a;throw d=!0,r}return function(o,s,m){if(c>1)throw TypeError("Generator is already running");for(d&&1===s&&_(s,m),l=s,u=m;(e=l<2?t:u)||!d;){i||(l?l<3?(l>1&&(f.n=-1),_(l,u)):f.n=u:f.v=u);try{if(c=2,i){if(l||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=i.return)&&e.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=t}else if((e=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(e){i=t,l=1,u=e}finally{c=1}}return{value:e,done:d}}}(n,o,i),!0),c}var a={};function l(){}function u(){}function c(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(xt(e={},r,function(){return this}),e),d=c.prototype=l.prototype=Object.create(s);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,xt(t,o,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=c,xt(d,"constructor",c),xt(c,"constructor",u),u.displayName="GeneratorFunction",xt(c,o,"GeneratorFunction"),xt(d),xt(d,o,"Generator"),xt(d,r,function(){return this}),xt(d,"toString",function(){return"[object Generator]"}),(Ot=function(){return{w:i,m:f}})()}function xt(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}xt=function(t,e,n,r){function i(e,n){xt(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(i("next",0),i("throw",1),i("return",2))},xt(t,e,n,r)}function Nt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return It(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?It(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function It(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Pt(t,e,n,r,o,i,a){try{var l=t[i](a),u=l.value}catch(t){return void n(t)}l.done?e(u):Promise.resolve(u).then(r,o)}function jt(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){Pt(i,r,o,a,l,"next",t)}function l(t){Pt(i,r,o,a,l,"throw",t)}a(void 0)})}}function Et(t){return At.apply(this,arguments)}function At(){return(At=jt(Ot().m(function t(e){var n,r,o,i;return Ot().w(function(t){for(;;)switch(t.n){case 0:return r=null===(n=window)||void 0===n||null===(n=n.qligg_frontend)||void 0===n?void 0:n.restRoutePaths.userprofile,o=kt({account_id:e.account_id}).toString(),i="".concat(r).concat(r.includes("?")?"&":"?").concat(o),t.n=1,bt({url:i,method:"GET"});case 1:return t.a(2,t.v)}},t)}))).apply(this,arguments)}function Ct(t){return Ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ct(t)}function Tt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function qt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Mt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?qt(Object(n),!0).forEach(function(e){Lt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Lt(t,e,n){return(e=function(t){var e=function(t){if("object"!=Ct(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ct(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ct(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Dt=function(t){function e(t){var n,r;return this.getChildContext||(n=new Set,(r={})[e.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(t){this.props.value!=t.value&&n.forEach(function(t){t.__e=!0,x(t)})},this.sub=function(t){n.add(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n&&n.delete(t),e&&e.call(t)}}),t.children}return e.__c="__cC"+f++,e.__=t,e.Provider=e.__l=(e.Consumer=function(t,e){return t.children(e)}).contextType=e,e}({}),Ut=function(){return function(t){var e=B.context[t.__c],n=rt(V++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(B)),e.props.value):t.__}(Dt)},Ft=function(t,e){switch(e.type){case"SET_CURRENT_FEED_INDEX":case"SET_IS_OPEN":case"SET_COUNTER":return Mt(Mt({},t),e.payload)}},Rt=function(t){var e=t.children,n=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Tt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Tt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(it(Ft,{currentFeedIndex:0,isOpen:!1,isImageLoad:!1,counter:0}),2),r=n[0],o=n[1];return h(Dt.Provider,{value:Mt(Mt({},r),{},{setCurrentFeedIndex:function(t){r.currentFeedIndex!=t&&o({type:"SET_CURRENT_FEED_INDEX",payload:{currentFeedIndex:t}})},setIsOpen:function(t){r.isOpen!=t&&o({type:"SET_IS_OPEN",payload:{isOpen:t}})},setCounter:function(t){r.counter!=t&&o({type:"SET_COUNTER",payload:{counter:t}})}})},e)};function Gt(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var u=r&&r.prototype instanceof l?r:l,c=Object.create(u.prototype);return Ht(c,"_invoke",function(n,r,o){var i,l,u,c=0,s=o||[],d=!1,f={p:0,n:0,v:t,a:_,f:_.bind(t,4),d:function(e,n){return i=e,l=0,u=t,f.n=n,a}};function _(n,r){for(l=n,u=r,e=0;!d&&c&&!o&&e<s.length;e++){var o,i=s[e],_=f.p,m=i[2];n>3?(o=m===r)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=t):i[0]<=_&&((o=n<2&&_<i[1])?(l=0,f.v=r,f.n=i[1]):_<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,f.n=m,l=0))}if(o||n>1)return a;throw d=!0,r}return function(o,s,m){if(c>1)throw TypeError("Generator is already running");for(d&&1===s&&_(s,m),l=s,u=m;(e=l<2?t:u)||!d;){i||(l?l<3?(l>1&&(f.n=-1),_(l,u)):f.n=u:f.v=u);try{if(c=2,i){if(l||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=i.return)&&e.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=t}else if((e=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(e){i=t,l=1,u=e}finally{c=1}}return{value:e,done:d}}}(n,o,i),!0),c}var a={};function l(){}function u(){}function c(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(Ht(e={},r,function(){return this}),e),d=c.prototype=l.prototype=Object.create(s);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Ht(t,o,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=c,Ht(d,"constructor",c),Ht(c,"constructor",u),u.displayName="GeneratorFunction",Ht(c,o,"GeneratorFunction"),Ht(d),Ht(d,o,"Generator"),Ht(d,r,function(){return this}),Ht(d,"toString",function(){return"[object Generator]"}),(Gt=function(){return{w:i,m:f}})()}function Ht(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}Ht=function(t,e,n,r){function i(e,n){Ht(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(i("next",0),i("throw",1),i("return",2))},Ht(t,e,n,r)}function Wt(t){return function(t){if(Array.isArray(t))return zt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Bt(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||Bt(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Bt(t,e){if(t){if("string"==typeof t)return zt(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zt(t,e):void 0}}function zt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Zt(t,e,n,r,o,i,a){try{var l=t[i](a),u=l.value}catch(t){return void n(t)}l.done?e(u):Promise.resolve(u).then(r,o)}function $t(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){Zt(i,r,o,a,l,"next",t)}function l(t){Zt(i,r,o,a,l,"throw",t)}a(void 0)})}}function Jt(t){return Xt.apply(this,arguments)}function Xt(){return Xt=$t(Gt().m(function t(e){var n,r,o,i,a,l,u,c,s,d,f,_,m,p,g,v=arguments;return Gt().w(function(t){for(;;)switch(t.n){case 0:if(i=v.length>1&&void 0!==v[1]?v[1]:"",a=v.length>2&&void 0!==v[2]?v[2]:0,l=null==e?void 0:e.account_id,u=null==e?void 0:e.limit,c=null==e||null===(n=e.copyright)||void 0===n?void 0:n.hide,s=null==e||null===(r=e.reel)||void 0===r?void 0:r.hide,d=null==e?void 0:e.order_by,f=null==e?void 0:e.tag,_=null==e?void 0:e.source,m=null===(o=window)||void 0===o||null===(o=o.qligg_frontend)||void 0===o||null===(o=o.restRoutePaths)||void 0===o?void 0:o[_]){t.n=1;break}throw new Error("Unknown source: ".concat(_));case 1:return p=kt({account_id:l,limit:u,hide_items_with_copyright:c,hide_reels:s,after:i,pagination:a,order_by:d,tag:f}).toString(),g="".concat(m).concat(m.includes("?")?"&":"?").concat(p),t.n=2,bt({url:g,method:"GET"});case 2:return t.a(2,t.v)}},t)})),Xt.apply(this,arguments)}Dt.Consumer;var Yt=n(500),Kt=n.n(Yt);const Qt=function(t){var e=t.href,n=t.className,r=t.children,o=t.onClick,i=t.disabled;return h("a",{href:e,target:"blank",onClick:o,className:Kt()("instagram-gallery__button",n,i&&"instagram-gallery__button--disabled")},r)};function te(t,e){var n=t.tag,r=t.source,o=null==e?void 0:e.username;switch(r){case"username":return"https://www.instagram.com/".concat(o);case"tag":return"https://www.instagram.com/explore/tags/".concat(n);default:return"https://www.instagram.com"}}const ee=function(t){var e,n,r=t.userProfile,o=t.feedSettings,i=t.onClick,a=t.after,l=!(null==o||null===(e=o.button)||void 0===e||!e.display),u=!(null==o||null===(n=o.button_load)||void 0===n||!n.display);return h("div",{className:"instagram-gallery__actions"},l&&h(Qt,{feedSettings:o,href:te(o,r),target:"blank",className:"instagram-gallery__button--follow"},h("i",{className:"qligg-icon-instagram "}),o.button.text),u&&h(Qt,{feedSettings:o,className:"instagram-gallery__button--load",disabled:""===a,onClick:i},o.button_load.text))},ne=function(){var t,e=null===(t=window)||void 0===t||null===(t=t.qligg_frontend)||void 0===t||null===(t=t.settings)||void 0===t?void 0:t.spinner_image_url;return h("div",{className:"instagram-gallery__spinner",style:e?{backgroundImage:"url(".concat(e,")")}:{}})},re=function(t){var e=t.errorUserProfile,n=t.errorUserMediaList;return h("div",{className:"instagram-gallery__alert"},h("ul",null,e&&h("li",null,h("b",null,e.error),h("p",null,e.message)),n&&h("li",null,h("b",null,n.error),h("p",null,n.message))))};function oe(t,e){for(var n in e)t[n]=e[n];return t}function ie(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var r in e)if("__source"!==r&&t[r]!==e[r])return!0;return!1}function ae(t,e){this.props=t,this.context=e}function le(t,e){function n(t){var n=this.props.ref,r=n==t.ref;return!r&&n&&(n.call?n(null):n.current=null),e?!e(this.props,t)||!r:ie(this.props,t)}function r(e){return this.shouldComponentUpdate=n,h(t,e)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=t,r}(ae.prototype=new S).isPureReactComponent=!0,ae.prototype.shouldComponentUpdate=function(t,e){return ie(this.props,t)||ie(this.state,e)};var ue=e.__b;e.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),ue&&ue(t)};var ce="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var se=e.__e;e.__e=function(t,e,n,r){if(t.then)for(var o,i=e;i=i.__;)if((o=i.__c)&&o.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),o.__c(t,e);se(t,e,n,r)};var de=e.unmount;function fe(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(t){"function"==typeof t.__c&&t.__c()}),t.__c.__H=null),null!=(t=oe({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return fe(t,e,n)})),t}function _e(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return _e(t,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function me(){this.__u=0,this.o=null,this.__b=null}function pe(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function ge(){this.i=null,this.l=null}e.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),de&&de(t)},(me.prototype=new S).__c=function(t,e){var n=e.__c,r=this;null==r.o&&(r.o=[]),r.o.push(n);var o=pe(r.__v),i=!1,a=function(){i||(i=!0,n.__R=null,o?o(l):l())};n.__R=a;var l=function(){if(! --r.__u){if(r.state.__a){var t=r.state.__a;r.__v.__k[0]=_e(t,t.__c.__P,t.__c.__O)}var e;for(r.setState({__a:r.__b=null});e=r.o.pop();)e.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(a,a)},me.prototype.componentWillUnmount=function(){this.o=[]},me.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=fe(this.__b,n,r.__O=r.__P)}this.__b=null}var o=e.__a&&h(w,null,t.fallback);return o&&(o.__u&=-33),[h(w,null,e.__a?null:t.children),o]};var ve=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}};function ye(t){return this.getChildContext=function(){return t.context},t.children}function he(t){var e=this,n=t.h;if(e.componentWillUnmount=function(){W(null,e.v),e.v=null,e.h=null},e.h&&e.h!==n&&e.componentWillUnmount(),!e.v){for(var r=e.__v;null!==r&&!r.__m&&null!==r.__;)r=r.__;e.h=n,e.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},insertBefore:function(t,n){this.childNodes.push(t),e.h.insertBefore(t,n)},removeChild:function(t){this.childNodes.splice(this.childNodes.indexOf(t)>>>1,1),e.h.removeChild(t)}}}W(h(ye,{context:e.context},t.__v),e.v)}(ge.prototype=new S).__a=function(t){var e=this,n=pe(e.__v),r=e.l.get(t);return r[0]++,function(o){var i=function(){e.props.revealOrder?(r.push(o),ve(e,t,r)):o()};n?n(i):i()}},ge.prototype.render=function(t){this.i=null,this.l=new Map;var e=E(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},ge.prototype.componentDidUpdate=ge.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){ve(t,n,e)})};var be="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,we=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Se=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ke=/[A-Z0-9]/g,Oe="undefined"!=typeof document,xe=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)};S.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(S.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Ne=e.event;function Ie(){}function Pe(){return this.cancelBubble}function je(){return this.defaultPrevented}e.event=function(t){return Ne&&(t=Ne(t)),t.persist=Ie,t.isPropagationStopped=Pe,t.isDefaultPrevented=je,t.nativeEvent=t};var Ee={enumerable:!1,configurable:!0,get:function(){return this.class}},Ae=e.vnode;e.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,r={},o=-1===n.indexOf("-");for(var i in e){var a=e[i];if(!("value"===i&&"defaultValue"in e&&null==a||Oe&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var l=i.toLowerCase();"defaultValue"===i&&"value"in e&&null==e.value?i="value":"download"===i&&!0===a?a="":"translate"===l&&"no"===a?a=!1:"o"===l[0]&&"n"===l[1]?"ondoubleclick"===l?i="ondblclick":"onchange"!==l||"input"!==n&&"textarea"!==n||xe(e.type)?"onfocus"===l?i="onfocusin":"onblur"===l?i="onfocusout":Se.test(i)&&(i=l):l=i="oninput":o&&we.test(i)?i=i.replace(ke,"-$&").toLowerCase():null===a&&(a=void 0),"oninput"===l&&r[i=l]&&(i="oninputCapture"),r[i]=a}}"select"==n&&r.multiple&&Array.isArray(r.value)&&(r.value=E(e.children).forEach(function(t){t.props.selected=-1!=r.value.indexOf(t.props.value)})),"select"==n&&null!=r.defaultValue&&(r.value=E(e.children).forEach(function(t){t.props.selected=r.multiple?-1!=r.defaultValue.indexOf(t.props.value):r.defaultValue==t.props.value})),e.class&&!e.className?(r.class=e.class,Object.defineProperty(r,"className",Ee)):(e.className&&!e.class||e.class&&e.className)&&(r.class=r.className=e.className),t.props=r}(t),t.$$typeof=be,Ae&&Ae(t)};var Ce=e.__r;e.__r=function(t){Ce&&Ce(t),t.__c};var Te=e.diffed;function qe(t){return qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qe(t)}function Me(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Le(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Me(Object(n),!0).forEach(function(e){De(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Me(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function De(t,e,n){return(e=function(t){var e=function(t){if("object"!=qe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=qe(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==qe(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}e.diffed=function(t){Te&&Te(t);var e=t.props,n=t.__e;null!=n&&"textarea"===t.type&&"value"in e&&e.value!==n.value&&(n.value=null==e.value?"":e.value)};const Ue=le(function(t){var e,n=t.feedSettings,r=Le(Le({},t.userProfile),function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&""!==t[n]&&(e[n]=t[n]);return e}(n.profile));return!(null==n||null===(e=n.profile)||void 0===e||!e.display)&&h("div",{className:"instagram-gallery__profile"},h("div",{className:"avatar"},h("img",{src:r.avatar||"http://2.gravatar.com/avatar/b642b4217b34b1e8d3bd915fc65c4452?s=150&d=mm&r=g",alt:r.nickname})),h("div",{className:"info"},h("div",null,h("span",{className:"user"},"@",r.username),r.nickname&&h(w,null,h("span",{className:"separator"},"•"),h("span",{className:"user"},r.nickname)),h("span",{className:"separator"},"•"),h("a",{className:"follow",href:r.link,target:"_blank",rel:"noopener noreferrer"},r.link_text),!!r.website&&h(w,null,h("span",{className:"separator"},"•"),h("a",{className:"follow",href:r.website,target:"_blank",rel:"noopener noreferrer"},r.website_text)),h("div",{className:"description"},r.biography))))}),Fe=function(t){var e=t.feedSettings,n=t.feedItem;return h(w,null,h("div",{className:"instagram-gallery-item__media-mask"}),"BUSINESS"==(null==n?void 0:n.user_type)&&h("div",{className:"instagram-gallery-item__media-mask--content"},!!e.mask.likes_count&&h("span",{className:"instagram-gallery-item__likes_count--mask"},h("i",{className:"qligg-icon-heart instagram-gallery-item__icon-heart"}),n.likes_count||0),!!e.mask.comments_count&&h("span",{className:"instagram-gallery-item__comments_count--mask"},h("i",{className:"qligg-icon-comment instagram-gallery-item__icon-bubble_chat"}),n.comments_count||0)))},Re=function(t){var e=t.feedItem,n=t.feedSettings,r="CAROUSEL_ALBUM"===e.media_type&&"VIDEO"===e.media.type,o=null===e.media.url;return h("div",{className:"instagram-gallery-item__media-wrap"},o?h("img",{alt:"instagram",className:Kt()("instagram-gallery-item__media"),src:n.copyright.placeholder?n.copyright.placeholder:e.media.thumbnail}):"VIDEO"===e.media_type||r?h("video",{alt:"instagram",poster:e.media.thumbnail,className:"instagram-gallery-item__media",src:e.media.url}):h("img",{alt:"instagram",className:"instagram-gallery-item__media",src:e.media.url}),n.mask.display&&h(Fe,{feedItem:e,feedSettings:n}),"VIDEO"===e.media_type&&!o&&h("i",{className:"instagram-gallery-item__icon qligg-icon-video instagram-gallery-item__icon--views"}),"CAROUSEL_ALBUM"===e.media_type&&h("i",{className:"instagram-gallery-item__icon qligg-icon-gallery instagram-gallery-item__icon--views"}),!!e.share_url&&h("a",{className:"instagram-gallery-item__icon qligg-icon-instagram instagram-gallery-item__icon--link",href:e.share_url,target:"_blank",rel:"noreferrer"}))};var Ge=function(t){var e;return(null===(e=t.highlight.tag)||void 0===e?void 0:e.split(" ")).map(function(t){return t.includes("#")?t:t.split(" ").map(function(t){return"#"+t}).join(" ")})},He=function(t,e){if(t){var n,r=t.replace(/<[^>]+>/g,"");return(n=t.match("[぀-ヿ㐀-䶿一-鿿豈-﫿ヲ-゚]")?r.split("",e).join(""):r.split(" ",e).join(" ")).length<t.length?"".concat(n,"..."):n}};const We=le(function(t){var e=t.feedSettings,n=t.feedItem;return h("div",{className:"instagram-gallery-item__media-card"},h("div",{className:"instagram-gallery-item__info"},!!n.date&&h("span",{className:"instagram-gallery-item__date"},h("i",{className:"qligg-icon-date"}),n.date),"BUSINESS"==(null==n?void 0:n.user_type)&&h("div",{className:"instagram-gallery-item__icons"},!!e.card.likes_count&&h("span",{className:"instagram-gallery-item__likes_count"},h("i",{className:"qligg-icon-heart"}),n.likes_count||0),!!e.card.comments_count&&h("span",{className:"instagram-gallery-item__comments_count"},h("i",{className:"qligg-icon-comment"}),n.comments_count||0))),!!e.card.text_length&&!!n.media_description&&h("p",{className:"instagram-gallery-item__media_description"},He(n.media_description,e.card.text_length)))}),Ve=function(t){var e,n,r,o=t.index,i=t.length,a=t.feedSettings,l=t.feedItem,u=t.onClick,c=function(t,e,n){var r;if(!["highlight","highlight-square"].includes(t.layout))return!1;if(null==t||!t.highlight)return!1;for(var o in t.highlight){var i=t.highlight[o].split(",").map(function(t){return t.toString().trim()});switch(o){case"position":if(i.includes(n.toString()))return!0;break;case"id":if(i.includes(e.id))return!0;break;case"tag":if(null===(r=e.tags)||void 0===r?void 0:r.filter(function(e){return Ge(t).includes(e)}).length)return!0}}return!1}(a,l,o),s=function(t){return["carousel","carousel-vertical"].includes(t.layout)}(a),d=!(null!=a&&null!==(e=a.modal)&&void 0!==e&&e.display||null==l||!l.share_url);return h(d?"a":"div",{href:d?l.share_url:void 0,target:d?"_blank":void 0,rel:d?"noopener noreferrer":void 0,className:Kt()("instagram-gallery-item",s&&"swiper-slide",c&&"instagram-gallery-item--highlight","instagram-gallery-item--cols-".concat(a.columns)),"data-elementor-open-lightbox":"no","data-feed-item-index":o,onClick:u,onKeyDown:d?void 0:function(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),u(t))},tabIndex:d?void 0:0,role:d?void 0:"button","aria-label":(n="VIDEO"===l.media_type?"Video":"Image",r=l.media_description?": ".concat(l.media_description.replace(/<[^>]*>?/gm,"")):"",r.length>100&&(r=r.substring(0,100)+"..."),"Instagram ".concat(n).concat(r))},h("div",{className:"instagram-gallery-item__wrap"},h(Re,{index:o,feedItem:l,length:i,feedSettings:a}),a.card.display&&h(We,{feedItem:l,feedSettings:a})))};window.React;const Be="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjRweCIgaGVpZ2h0PSIyNHB4IiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCBtZWV0IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHN0eWxlPSItbXMtdHJhbnNmb3JtOiByb3RhdGUoMzYwZGVnKTsgLXdlYmtpdC10cmFuc2Zvcm06IHJvdGF0ZSgzNjBkZWcpOyB0cmFuc2Zvcm06IHJvdGF0ZSgzNjBkZWcpOyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE2IDE3SDJsMy41LTQuNWwyLjUgM2wzLTMuODFBMiAyIDAgMCAxIDEwIDEwVjZIMmEyIDIgMCAwIDAtMiAydjEwYTIgMiAwIDAgMCAyIDJoMTRhMiAyIDAgMCAwIDItMnYtNmgtNS43NXoiLz48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMTkgNGgtLjVWMi41YTIuNSAyLjUgMCAwIDAtNSAwVjRIMTNhMSAxIDAgMCAwLTEgMXY0YTEgMSAwIDAgMCAxIDFoNmExIDEgMCAwIDAgMS0xVjVhMSAxIDAgMCAwLTEtMXptLTMgNGExIDEgMCAxIDEgMS0xYTEgMSAwIDAgMS0xIDF6bTEuNS00aC0zVjIuNzVDMTQuNSAyIDE0LjUgMSAxNiAxczEuNSAxIDEuNSAxLjc1eiIvPjwvc3ZnPgo=",ze=function(t){var e=t.currentFeedItem,n=t.feedSettings,r=lt(null);return h("section",{className:"instagram-gallery-modal__media-container insta-gallery-slider-container"},h("div",{ref:r,className:"insta-gallery-slider"},e.children.map(function(t){return h("div",{key:t.id,className:"insta-gallery__media"},null===t.media.url?h("img",{className:Kt()("instagram-gallery-modal__media",!n.copyright.placeholder&&"instagram-gallery-modal__media--placeholder"),src:n.copyright.placeholder?n.copyright.placeholder:Be,alt:t.media.alt}):"VIDEO"===t.media.type?h("video",{controls:!0,poster:t.media.thumbnail,className:"instagram-gallery-modal__media",src:t.media.url}):h("img",{className:"instagram-gallery-modal__media",src:t.media.url,alt:t.media.alt}))})),h("div",{className:"insta-gallery-slider__button-container"},h("span",{onClick:function(){if(r.current.children.length>0){var t=r.current.children.length-1,e=r.current.children[t];r.current.insertBefore(e,r.current.firstChild),r.current.style.transition="none";var n=r.current.children[0].offsetWidth;r.current.style.transform="translateX(-".concat(n,"px)"),setTimeout(function(){r.current.style.transition="200ms ease-out all",r.current.style.transform="translateX(0)"},30)}},className:"insta-gallery-slider__button insta-gallery-slider__button--left qligg-icon-prev"}),h("span",{onClick:function(){if(r.current.children.length>0){var t=r.current.children[0];r.current.style.transition="300ms ease-out all";var e=r.current.children[0].offsetWidth;r.current.style.transform="translateX(-".concat(e,"px)");var n=function(){r.current.style.transition="none",r.current.style.transform="translateX(0)",r.current.appendChild(t),r.current.removeEventListener("transitionend",n)};r.current.addEventListener("transitionend",n)}},className:"insta-gallery-slider__button insta-gallery-slider__button--right qligg-icon-next"})))},Ze=le(function(t){var e,n,r,o,i=t.currentFeedItem,a=t.feedSettings,l=!(null!=i&&null!==(e=i.media)&&void 0!==e&&e.url);switch(i.media_type){case"CAROUSEL_ALBUM":return h(ze,{feedSettings:a,currentFeedItem:i});case"VIDEO":return h("section",{className:"instagram-gallery-modal__media-container"},l?h("img",{src:Be,alt:"thumbnail",className:"instagram-gallery-item__icon qligg-icon-video instagram-gallery-item__icon--views"}):h("video",{poster:i.media.thumbnail,src:i.media.url,controls:!0,className:"instagram-gallery-modal__media"}));default:return h("section",{className:"instagram-gallery-modal__media-container"},h("img",l?{src:null!==(n=null==i||null===(r=i.media)||void 0===r?void 0:r.thumbnail)&&void 0!==n?n:null==a||null===(o=a.copyright)||void 0===o?void 0:o.placeholder,className:"instagram-gallery-modal__media"}:{src:i.media.url,className:"instagram-gallery-modal__media"}))}});function $e(t){return $e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$e(t)}function Je(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var u=r&&r.prototype instanceof l?r:l,c=Object.create(u.prototype);return Xe(c,"_invoke",function(n,r,o){var i,l,u,c=0,s=o||[],d=!1,f={p:0,n:0,v:t,a:_,f:_.bind(t,4),d:function(e,n){return i=e,l=0,u=t,f.n=n,a}};function _(n,r){for(l=n,u=r,e=0;!d&&c&&!o&&e<s.length;e++){var o,i=s[e],_=f.p,m=i[2];n>3?(o=m===r)&&(u=i[(l=i[4])?5:(l=3,3)],i[4]=i[5]=t):i[0]<=_&&((o=n<2&&_<i[1])?(l=0,f.v=r,f.n=i[1]):_<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,f.n=m,l=0))}if(o||n>1)return a;throw d=!0,r}return function(o,s,m){if(c>1)throw TypeError("Generator is already running");for(d&&1===s&&_(s,m),l=s,u=m;(e=l<2?t:u)||!d;){i||(l?l<3?(l>1&&(f.n=-1),_(l,u)):f.n=u:f.v=u);try{if(c=2,i){if(l||(o="next"),e=i[o]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=i.return)&&e.call(i),l<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),l=1);i=t}else if((e=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(e){i=t,l=1,u=e}finally{c=1}}return{value:e,done:d}}}(n,o,i),!0),c}var a={};function l(){}function u(){}function c(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(Xe(e={},r,function(){return this}),e),d=c.prototype=l.prototype=Object.create(s);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Xe(t,o,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=c,Xe(d,"constructor",c),Xe(c,"constructor",u),u.displayName="GeneratorFunction",Xe(c,o,"GeneratorFunction"),Xe(d),Xe(d,o,"Generator"),Xe(d,r,function(){return this}),Xe(d,"toString",function(){return"[object Generator]"}),(Je=function(){return{w:i,m:f}})()}function Xe(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}Xe=function(t,e,n,r){function i(e,n){Xe(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(i("next",0),i("throw",1),i("return",2))},Xe(t,e,n,r)}function Ye(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Ke(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ke(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ke(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Qe(t,e,n,r,o,i,a){try{var l=t[i](a),u=l.value}catch(t){return void n(t)}l.done?e(u):Promise.resolve(u).then(r,o)}function tn(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){Qe(i,r,o,a,l,"next",t)}function l(t){Qe(i,r,o,a,l,"throw",t)}a(void 0)})}}function en(t){return nn.apply(this,arguments)}function nn(){return(nn=tn(Je().m(function t(e){var n,r,o,i,a,l,u,c,s,d;return Je().w(function(t){for(;;)switch(t.n){case 0:return r=e.account_id,o=e.media_id,i=e.limit,a=void 0===i?25:i,l=null===(n=window)||void 0===n||null===(n=n.qligg_frontend)||void 0===n?void 0:n.restRoutePaths.comments,u=kt({account_id:r,media_id:o,limit:a}).toString(),c="".concat(l).concat(l.includes("?")?"&":"?").concat(u),t.n=1,bt({url:c,method:"GET"});case 1:if(s=t.v,d=s.data,!Array.isArray(d)){t.n=2;break}return t.a(2,d);case 2:if(!d||"object"!==$e(d)){t.n=3;break}return t.a(2,[d]);case 3:return t.a(2,[])}},t)}))).apply(this,arguments)}function rn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}const on=function(t){var e,n,r,o,i=t.currentFeedItem,a=t.userProfile,l=t.feedItemsNumber,u=t.feedSettings,c=Ut().currentFeedIndex,s=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return rn(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rn(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(ot(5),2),d=s[0],f=s[1],_=function(t){var e,n=t.feedSettings,r=t.currentFeedItem,o=t.maxRetries,i=void 0===o?2:o,a=t.retryDelay,l=void 0===a?1500:a,u=Ye(ot([]),2),c=u[0],s=u[1],d=Ye(ot(!1),2),f=d[0],_=d[1],m=Ye(ot(null),2),p=m[0],g=m[1];return null===(e=window)||void 0===e||null===(e=e.qligg_frontend)||void 0===e||e.restRoutePaths.comments,at(function(){var t;if((null==n||null===(t=n.modal)||void 0===t?void 0:t.comments_list)&&"BUSINESS"===(null==r?void 0:r.user_type)&&(null==r?void 0:r.id)&&(null==n?void 0:n.account_id)){var e=!0,o=function(){var t=tn(Je().m(function t(){var o;return Je().w(function(t){for(;;)switch(t.n){case 0:return _(!0),s([]),g(null),o=function(){var t=tn(Je().m(function t(a){var u,c;return Je().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,en({account_id:n.account_id,media_id:r.id});case 1:u=t.v,e&&(s(u),_(!1)),t.n=4;break;case 2:if(t.p=2,c=t.v,e){t.n=3;break}return t.a(2);case 3:a<i?setTimeout(function(){e&&o(a+1)},l):(g(c),_(!1));case 4:return t.a(2)}},t,null,[[0,2]])}));return function(e){return t.apply(this,arguments)}}(),t.n=1,o(0);case 1:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return o(),function(){e=!1}}},[null==r?void 0:r.id,null==n?void 0:n.account_id,i,l]),{comments:c,loading:f,error:p}}({feedSettings:u,currentFeedItem:i}),m=_.comments,p=_.loading,g=_.error,v=ct(function(t){return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})},[]),y=ct(function(){f(function(t){return t+5})},[]),b=m.slice(0,d),S=m.length>d,k="BUSINESS"===i.user_type;return h("section",{className:"instagram-gallery-modal__media-sidebar"},u.modal.profile&&a.username&&a.link&&h("div",{className:"instagram-gallery-modal__profile"},a.avatar&&h("img",{alt:null!==(e=a.nickname)&&void 0!==e?e:a.username,src:a.avatar}),h("div",null,h("span",null,null!==(n=a.nickname)&&void 0!==n?n:a.username),h("a",{href:a.link,title:null!==(r=a.nickname)&&void 0!==r?r:a.username,target:"_blank",rel:"noopener noreferrer","aria-label":"Visit ".concat(null!==(o=a.nickname)&&void 0!==o?o:a.username,"'s Instagram profile")},"@".concat(a.username)))),h("div",{className:"instagram-gallery-modal__icons"},h("span",{className:"instagram-gallery-modal__counter","aria-live":"polite"},"".concat(c+1," / ").concat(l)),h("a",{className:"instagram-gallery-modal__link",href:i.share_url,target:"_blank",rel:"noopener noreferrer","aria-label":"View on Instagram"},h("i",{className:"qligg-icon-instagram","aria-hidden":"true"})," ","Instagram")),u.modal.media_description&&!!i.media_description&&h("div",{className:"instagram-gallery-modal__media_description"},h("p",{dangerouslySetInnerHTML:{__html:He(i.media_description,u.modal.text_length)}})),(u.modal.likes_count||u.modal.comments_count)&&k&&h("div",{className:"instagram-gallery-modal__info"},u.modal.likes_count&&h("span",{className:"instagram-gallery-modal__likes_count"},h("i",{className:"qligg-icon-heart","aria-hidden":"true"}),i.likes_count||0),u.modal.comments_count&&h("span",{className:"instagram-gallery-modal__comments_count"},h("i",{className:"qligg-icon-comment","aria-hidden":"true"}),i.comments_count||0)),u.modal.comments_list&&k&&h("div",{className:"instagram-gallery-modal__comments-list"},h("p",null,h("b",null,"Comments")),p?h("p",{"aria-live":"polite"},"Loading comments..."):g?h("p",{className:"instagram-gallery-modal__error","aria-live":"assertive"},"Unable to load comments. Please try again later."):b.length>0?h(w,null,h("ul",null,b.map(function(t){return h("li",{key:t.id,className:"instagram-gallery-modal__comment"},h("div",{className:"instagram-gallery-modal__comment-header"},h("strong",null,t.username),h("span",{className:"instagram-gallery-modal__comment-time"},v(t.timestamp))),h("p",null,t.text),t.replies&&t.replies.length>0&&h("ul",{className:"instagram-gallery-modal__comment-replies"},t.replies.map(function(t){return h("li",{key:t.id,className:"instagram-gallery-modal__comment-reply"},h("div",{className:"instagram-gallery-modal__comment-header"},h("strong",null,t.username),h("span",{className:"instagram-gallery-modal__comment-time"},v(t.timestamp))),h("p",null,t.text))})))})),S&&h("button",{className:"instagram-gallery-modal__load-more",onClick:y,"aria-label":"Load more comments"},"Load more comments")):h("div",null,h("p",null,"No comments available for this post."),window.qligg_frontend&&window.qligg_frontend.QLIGG_DEVELOPER&&h("p",null,"Comment count in feed item:"," ",i.comments_count))))};var an=["isPrevious","classname","onClick"];function ln(){return ln=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ln.apply(null,arguments)}const un=function(t){var e=t.isPrevious,n=t.classname,r=t.onClick,o=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,an);return h("span",ln({className:Kt()("instagram-gallery-modal__button-arrow",n,e&&"qligg-icon-prev",!e&&"qligg-icon-next"),onClick:r,onKeyPress:function(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),r(t))},role:"button",tabIndex:"0"},o))};var cn=["onClick"];function sn(){return sn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},sn.apply(null,arguments)}const dn=function(t){var e=t.onClick,n=function(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,cn);return h("span",sn({className:"instagram-gallery-modal__button-close",onClick:e,onKeyPress:function(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),e(t))},role:"button"},n))},fn=function(t){var e=t.children,n=t.id,r=Ut(),o=r.isOpen,i=r.setIsOpen;return o?h("div",{className:"instagram-gallery-modal__overlay",id:n,onClick:function(){return i(!1)},onKeyDown:function(t){"Escape"===t.key&&i(!1)},role:"dialog","aria-modal":"true",tabIndex:"-1"},e):null};function _n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}const mn=function(t){var e=t.feedItems,n=t.feedSettings,r=t.userProfile,o=Ut(),i=o.currentFeedIndex,a=o.setCurrentFeedIndex,l=Ut(),u=l.setIsOpen,c=l.isOpen,s=lt(null),d=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return _n(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_n(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(ot(e[i]),2),f=d[0],_=d[1],m=!!e[i-1]||e.length>1,p=!!e[i+1]||e.length>1,g=ct(function(){m&&(e[i-1]?a(i-1):a(e.length-1))},[i,e,m,a]),v=ct(function(){p&&(e[i+1]?a(i+1):a(0))},[i,e,p,a]),y=ct(function(t){"ArrowLeft"===t.key?g():"ArrowRight"===t.key?v():"Escape"===t.key&&u(!1)},[g,v,u]);return at(function(){_(e[i])},[i,e]),at(function(){return document.addEventListener("keydown",y),s.current&&s.current.focus(),c&&(document.body.style.overflow="hidden"),function(){document.removeEventListener("keydown",y),document.body.style.overflow=""}},[y,c]),h(fn,{id:"instagram-gallery-modal-".concat(n.id)},h("div",{className:"instagram-gallery-modal",onClick:function(t){return t.stopPropagation()},ref:s,tabIndex:"-1","aria-modal":"true",role:"dialog","aria-label":"Instagram media viewer"},h("div",{className:"instagram-gallery-modal__options"},h("div",{className:"instagram-gallery-modal__options--arrows"},h(un,{isPrevious:!0,onClick:function(t){t.stopPropagation(),g()},"aria-label":"Previous image",tabIndex:"0"}),h(un,{next:!0,onClick:function(t){t.stopPropagation(),v()},"aria-label":"Next image",tabIndex:"0"})),h(dn,{onClick:function(){return u(!1)},"aria-label":"Close modal",tabIndex:"0"})),h("section",{className:Kt()("instagram-gallery-modal__body","right"!==n.modal.modal_align&&"instagram-gallery-modal__body--sidebar-".concat(n.modal.modal_align))},h(Ze,{feedSettings:n,currentFeedItem:f}),h(on,{feedSettings:n,currentFeedItem:f,userProfile:r,feedItemsNumber:e.length}))))};var pn=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null==e||""===e?"":"".concat(t,": ").concat(e).concat(n,";")};function gn(){return gn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},gn.apply(null,arguments)}const vn=function(t){function e(e){var n=oe({},e);return delete n.ref,t(n,e.ref||null)}return e.$$typeof=ce,e.render=t,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}((yn=function(t){var e,n=t.target.parentNode,r=t.masonryRef,o=t.userMediaList,i=t.feedSettings,a=t.className,l=t.userProfile,u=Ut(),c=u.currentFeedIndex,s=u.setCurrentFeedIndex,d=Ut().setIsOpen,f=!(null==i||null===(e=i.modal)||void 0===e||!e.display);return h(w,null,h("div",{ref:r,className:Kt()("instagram-gallery-list",a),"data-feed_layout":i.layout},o.data.map(function(t,e){var n=o.data.length;return h(Ve,{key:t.id,index:e,length:n,feedItem:t,feedSettings:i,onClick:function(){f&&(s(e),d(!0))}})})),f&&function(t,e){var n=h(he,{__v:t,h:e});return n.containerInfo=e,n}(h(mn,{userProfile:l,feedSettings:i,currentFeedIndex:c,feedItems:o.data}),n))},function(t,e){var n,r,o,i,a,l,u,c,s,d,f,_,m,p,g,v,y,b=t.feedSettings,S=b.responsive||{desktop:{columns:b.columns||3,spacing:b.spacing||10},tablet:{columns:2,spacing:8},mobile:{columns:1,spacing:6},breakpoints:{tablet:768,mobile:480}},k=(null===(n=S.breakpoints)||void 0===n?void 0:n.tablet)||768,O=(null===(r=S.breakpoints)||void 0===r?void 0:r.mobile)||480,x=!(null===(o=b.box)||void 0===o||!o.display),N=!(null===(i=b.card)||void 0===i||!i.display),I="carousel"===b.layout,P=!(null===(a=b.mask)||void 0===a||!a.display),j=!(null===(l=b.button)||void 0===l||!l.display),E=!(null===(u=b.button_load)||void 0===u||!u.display),A="instagram-gallery-feed-".concat(b.id),C="instagram-gallery-modal-".concat(b.id);return h(w,null,h("style",null,"\n\t\t\t\t\t#".concat(C," {\n\t\t\t\t\t\t").concat(pn("--qligg-modal-text-align",(null===(c=b.modal)||void 0===c?void 0:c.text_align)||"left"),"\n\t\t\t\t\t\t").concat(pn("--qligg-modal-font-size",(null===(s=b.modal)||void 0===s?void 0:s.font_size)||14,"px"),"\n\t\t\t\t\t\t--qligg-modal-body-height: 75vh;\n\t\t\t\t\t\t--qligg-modal-body-width: 75vw;\n\t\t\t\t\t\t--qligg-modal-sidebar-width: 360px;\n\t\t\t\t\t\t--qligg-modal-button-size: 40px;\n\t\t\t\t\t\t--qligg-modal-comments-height: 400px;\n\t\t\t\t\t\t--qligg-modal-border-color: #eeeeee;\n\t\t\t\t\t\t--qligg-modal-border-color-dark: #dddddd;\n\t\t\t\t\t\t--qligg-modal-button-border: #efefef;\n\t\t\t\t\t\t--qligg-modal-button-hover: #fafafa;\n\t\t\t\t\t\t--qligg-modal-error-color: #e74c3c;\n\t\t\t\t\t}\n\t\t\t\t")),h("style",null,"\n\t\t\t\t\t\t#".concat(A," {\n\t\t\t\t\t\t\t--qligg-columns: ").concat((null===(d=S.desktop)||void 0===d?void 0:d.columns)||3,";\n\t\t\t\t\t\t\t--qligg-spacing: ").concat((null===(f=S.desktop)||void 0===f?void 0:f.spacing)||10,"px;\n\t\t\t\t\t\t\t--qligg-item-width: calc(100% / var(--qligg-columns));\n\t\t\t\t\t\t\t--qligg-aspect-ratio: ").concat((null===(_=b.aspect_ratio)||void 0===_?void 0:_.width)||1," / ").concat((null===(m=b.aspect_ratio)||void 0===m?void 0:m.height)||1,";\n\t\t\t\t\t\t\t").concat(x?pn("--qligg-box-bg",b.box.background):"","\n\t\t\t\t\t\t\t").concat(x?pn("--qligg-box-color",b.box.text_color):"","\n\t\t\t\t\t\t\t").concat(x?pn("--qligg-box-radius",b.box.radius,"px"):"","\n\t\t\t\t\t\t\t").concat(x?pn("--qligg-box-padding",b.box.padding,"px"):"","\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* Feed card settings */\n\t\t\t\t\t\t\t").concat(N?pn("--qligg-card-bg",b.card.background):"","\n\t\t\t\t\t\t\t").concat(N?pn("--qligg-card-bg-hover",b.card.background_hover):"","\n\t\t\t\t\t\t\t").concat(N?pn("--qligg-card-color",b.card.text_color):"","\n\t\t\t\t\t\t\t").concat(N?pn("--qligg-card-font-size",b.card.font_size,"px"):"","\n\t\t\t\t\t\t\t").concat(N?pn("--qligg-card-padding",b.card.padding,"px"):"","\n\t\t\t\t\t\t\t").concat(N?pn("--qligg-card-radius",b.card.radius,"px"):"","\n\t\t\t\t\t\t\t").concat(N&&b.card.boxed?pn("--qligg-card-boxed","1px solid #f5f5f5"):"","\n\t\t\t\t\t\t\t").concat(N&&b.card.boxed?pn("--qligg-card-shadow","0 1px 3px rgba(0,0,0,0.05)"):"","\n\t\t\t\t\t\t\t").concat(N&&b.card.boxed?pn("--qligg-card-shadow-hover","0 3px 10px rgba(0,0,0,0.06)"):"","\n\t\t\t\t\t\t\t").concat(N?pn("--qligg-card-text-align",b.card.text_align||"left"):"","\n\t\t\t\t\t\t\t").concat(P?pn("--qligg-mask-bg",b.mask.background):"","\n\t\t\t\t\t\t\t").concat(P?pn("--qligg-mask-icon-color",b.mask.icon_color||"#ffffff"):"","\n\t\t\t\t\t\t\t").concat(I?pn("--qligg-carousel-arrow-color",b.carousel.navarrows_color):"","\n\t\t\t\t\t\t\t").concat(I?pn("--qligg-carousel-pagination-color",b.carousel.pagination_color):"","\n\t\t\t\t\t\t\t").concat(j?pn("--qligg-button-color",b.button.text_color):"","\n\t\t\t\t\t\t\t").concat(j?pn("--qligg-button-bg",b.button.background):"","\n\t\t\t\t\t\t\t").concat(j?pn("--qligg-button-bg-hover",b.button.background_hover):"","\n\t\t\t\t\t\t\t").concat(E?pn("--qligg-load-button-color",b.button_load.text_color):"","\n\t\t\t\t\t\t\t").concat(E?pn("--qligg-load-button-bg",b.button_load.background):"","\n\t\t\t\t\t\t\t").concat(E?pn("--qligg-load-button-bg-hover",b.button_load.background_hover):"","\n\t\t\t\t\t\t}\n\t\t\t\t\t")),h("style",null,"\n\t\t\t\t\t\t@media (max-width: ".concat(k,"px) {\n\t\t\t\t\t\t\t#").concat(A," {\n\t\t\t\t\t\t\t\t--qligg-columns: ").concat((null===(p=S.tablet)||void 0===p?void 0:p.columns)||2,";\n\t\t\t\t\t\t\t\t--qligg-spacing: ").concat((null===(g=S.tablet)||void 0===g?void 0:g.spacing)||8,"px;\n\t\t\t\t\t\t\t\t--qligg-mask-icon-size: 26px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t#").concat(C," {\n\t\t\t\t\t\t\t\t--qligg-modal-body-height: 80vh;\n\t\t\t\t\t\t\t\t--qligg-modal-body-width: 80vw;\n\t\t\t\t\t\t\t\t--qligg-modal-sidebar-width: 100%;\n\t\t\t\t\t\t\t\t--qligg-modal-button-size: 36px;\n\t\t\t\t\t\t\t\t--qligg-modal-comments-height: 250px;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t#").concat(C," .instagram-gallery-modal__body {\n\t\t\t\t\t\t\t\tflex-direction: column;\n\t\t\t\t\t\t\t\toverflow-x: hidden;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t#").concat(C," .instagram-gallery-modal__media-sidebar {\n\t\t\t\t\t\t\t\tmax-height: 40vh;\n\t\t\t\t\t\t\t\tborder-left: none;\n\t\t\t\t\t\t\t\tborder-top: 1px solid #f5f5f5;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t#").concat(C," .instagram-gallery-modal__media-container {\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\toverflow: visible;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t#").concat(C," .instagram-gallery-modal__button-close:before, \n\t\t\t\t\t\t\t#").concat(C," .instagram-gallery-modal__button-close:after {\n\t\t\t\t\t\t\t\twidth: 18px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t")),h("style",null,"\n\t\t\t\t\t\t@media (max-width: ".concat(O,"px) {\n\t\t\t\t\t\t\t#").concat(A," {\n\t\t\t\t\t\t\t\t--qligg-columns: ").concat((null===(v=S.mobile)||void 0===v?void 0:v.columns)||1,";\n\t\t\t\t\t\t\t\t--qligg-spacing: ").concat((null===(y=S.mobile)||void 0===y?void 0:y.spacing)||6,"px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t#").concat(C," {\n\t\t\t\t\t\t\t\t--qligg-modal-body-height: 85vh;\n\t\t\t\t\t\t\t\t--qligg-modal-body-width: 90vw;\n\t\t\t\t\t\t\t\t--qligg-modal-sidebar-width: 100%;\n\t\t\t\t\t\t\t\t--qligg-modal-button-size: 32px;\n\t\t\t\t\t\t\t\t--qligg-modal-comments-height: 200px;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t#").concat(C," .instagram-gallery-modal__button-arrow {\n\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\tfont-size: 1rem;\n\t\t\t\t\t\t\t\ttop: auto;\n\t\t\t\t\t\t\t\tleft: auto;\n\t\t\t\t\t\t\t\tright: auto;\n\t\t\t\t\t\t\t\tbottom: auto;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t")),h(yn,gn({},t,{forwardRef:e})))}));var yn;function hn(){return hn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},hn.apply(null,arguments)}function bn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}const wn=function(t){var e,n,r,o=t.target,i=t.userMediaList,a=t.feedSettings,l=t.calculateWidth,u=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i,a,l=[],u=!0,c=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,o=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return bn(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bn(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(ot(!0),2),c=u[0],s=u[1],d=(Ut().isImageLoad,lt(null)),f=lt(null),_=lt(new Set),m=lt(0),p=ct(function(){f.current&&clearTimeout(f.current),f.current=setTimeout(function(){d.current&&d.current.layout()},100)},[]),g=ct(function(t){_.current.add(t),p(),_.current.size>=m.current&&m.current>0&&(s(!1),o.classList.add("loaded"))},[p,o]),v=(e=function(t){var e=t.ownerDocument.defaultView;if(e.Masonry){var n={itemSelector:".instagram-gallery-item",isResizable:!0,isAnimated:!1,transitionDuration:0,percentPosition:!0,gutter:0};n.columnWidth=l&&"function"==typeof l?l(t,a):".instagram-gallery-item";var r=new e.Masonry(t,n);d.current=r;var i=t.querySelectorAll(".instagram-gallery-item__media");m.current=i.length,_.current.clear(),i.forEach(function(t,e){var n="media-".concat(e),r=function(){g(n),t.removeEventListener("load",r),t.removeEventListener("loadeddata",r),t.removeEventListener("canplay",r),t.removeEventListener("error",r)};"IMG"===t.tagName?t.complete&&0!==t.naturalWidth?g(n):(t.addEventListener("load",r),t.addEventListener("error",r)):"VIDEO"===t.tagName&&(t.readyState>=3?g(n):(t.addEventListener("loadeddata",r),t.addEventListener("canplay",r),t.addEventListener("error",r)))}),0===m.current&&(s(!1),o.classList.add("loaded"));var u=new e.MutationObserver(function(t){var e=!1;t.forEach(function(t){"childList"===t.type&&t.addedNodes.length>0&&(e=!0)}),e&&p()}),c=t.querySelector(".instagram-gallery-item__wrap")||t;return u.observe(c,{childList:!0,subtree:!0}),setTimeout(function(){r.layout()},50),function(){f.current&&clearTimeout(f.current),u.disconnect(),r.destroy(),d.current=null}}},n=[i,g,p,o,l,a],r=lt(),ct(function(t){t?r.current=e(t):r.current&&r.current()},n));return h(w,null,c&&h(ne,null),h(vn,hn({},t,{masonryRef:v})))};function Sn(t){return Sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sn(t)}function kn(){return kn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},kn.apply(null,arguments)}function On(t,e,n){return(e=function(t){var e=function(t){if("object"!=Sn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Sn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Sn(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const xn=function(t){var e=t.userMediaList,n=t.feedSettings,r=Ut().setCurrentFeedIndex,o=Ut().setIsOpen,i=ct(function(t){if(t){var e,i,a,l,u,c,s,d,f,_,m=document.defaultView;if(!m.Swiper)return;new m.Swiper(t,{slideClass:"instagram-gallery-item",loop:!0,loopedSlidesLimit:!1,centeredSlides:n.carousel.centered_slides,allowTouchMove:!1,slidesPerView:(null===(e=n.responsive)||void 0===e||null===(e=e.desktop)||void 0===e?void 0:e.columns)||n.carousel.slidespv||n.columns||3,spaceBetween:(null===(i=n.responsive)||void 0===i||null===(i=i.desktop)||void 0===i?void 0:i.spacing)||n.spacing||10,autoplay:n.carousel.autoplay&&{delay:n.carousel.autoplay_interval},pagination:{el:t.querySelector(".swiper-pagination"),dynamicBullets:!0,clickable:!0,type:"bullets"},navigation:{nextEl:t.querySelector(".swiper-button-next"),prevEl:t.querySelector(".swiper-button-prev")},breakpoints:On(On({0:{slidesPerView:(null===(a=n.responsive)||void 0===a||null===(a=a.mobile)||void 0===a?void 0:a.columns)||1,spaceBetween:(null===(l=n.responsive)||void 0===l||null===(l=l.mobile)||void 0===l?void 0:l.spacing)||6}},(null===(u=n.responsive)||void 0===u||null===(u=u.breakpoints)||void 0===u?void 0:u.mobile)||480,{slidesPerView:(null===(c=n.responsive)||void 0===c||null===(c=c.tablet)||void 0===c?void 0:c.columns)||2,spaceBetween:(null===(s=n.responsive)||void 0===s||null===(s=s.tablet)||void 0===s?void 0:s.spacing)||8}),(null===(d=n.responsive)||void 0===d||null===(d=d.breakpoints)||void 0===d?void 0:d.tablet)||768,{slidesPerView:(null===(f=n.responsive)||void 0===f||null===(f=f.desktop)||void 0===f?void 0:f.columns)||3,spaceBetween:(null===(_=n.responsive)||void 0===_||null===(_=_.desktop)||void 0===_?void 0:_.spacing)||10})}),t.addEventListener("click",function(t){(t.target.classList.contains(".swiper-slide-duplicate")||t.target.closest(".swiper-slide-duplicate"))&&(o(!0),r(Number(t.target.closest(".swiper-slide-duplicate").dataset.feedItemIndex)))})}},[e,n]);return h("div",{ref:i,className:"swiper-container"},h(vn,kn({className:"swiper-wrapper instagram-gallery-square"},t)),n.carousel.pagination&&h("div",{className:"swiper-pagination"}),n.carousel.navarrows&&h(w,null,h("div",{tabIndex:"1",className:"swiper-button-prev"}),h("div",{tabIndex:"1",className:"swiper-button-next"})))};function Nn(){return Nn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Nn.apply(null,arguments)}const In=function(t){var e=lt();return h(vn,Nn({ref:e,className:"instagram-gallery-square"},t))},Pn=function(t){switch(t.feedSettings.layout){case"masonry":case"highlight":return h(wn,t);case"carousel":return h(xn,t);default:return h(In,t)}},jn=function(t){var e,n,r=t.target,o=t.feedSettings,i=function(t){var e=t.account_id,n=Nt(ot(!0),2),r=n[0],o=n[1],i=Nt(ot(null),2),a=i[0],l=i[1],u=Nt(ot(null),2),c=u[0],s=u[1];return at(function(){var e=function(){var e=jt(Ot().m(function e(){var n,r;return Ot().w(function(e){for(;;)switch(e.p=e.n){case 0:return o(!0),e.p=1,e.n=2,Et(t);case 2:n=e.v,l(n),o(!1),e.n=4;break;case 3:e.p=3,r=e.v,o(!1),s(r);case 4:return e.a(2)}},e,null,[[1,3]])}));return function(){return e.apply(this,arguments)}}();e()},[e]),{isLoading:r,userProfile:a,error:c}}(o),a=i.isLoading,l=i.userProfile,u=i.error,c=function(t){var e=t.source,n=t.limit,r=t.account_id,o=t.tag,i=t.order_by,a=t.copyright,l=t.reel,u=Ut().counter,c=Vt(ot(!0),2),s=c[0],d=c[1],f=Vt(ot(!1),2),_=f[0],m=f[1],p=Vt(ot({paging:{next:null,prev:null},data:[]}),2),g=p[0],v=p[1],y=Vt(ot(""),2),h=y[0],b=y[1],w=Vt(ot(null),2),S=w[0],k=w[1];return at(function(){k(null);var e=function(){var e=$t(Gt().m(function e(){var n,r;return Gt().w(function(e){for(;;)switch(e.p=e.n){case 0:return 0===u?d(!0):m(!0),e.p=1,e.n=2,Jt(t,h,u);case 2:n=e.v,v(0===u?{paging:null==n?void 0:n.paging,data:null==n?void 0:n.data}:{paging:null==n?void 0:n.paging,data:[].concat(Wt(null==g?void 0:g.data),Wt(null==n?void 0:n.data))}),d(!1),m(!1),e.n=4;break;case 3:e.p=3,r=e.v,d(!1),m(!1),k(r);case 4:return e.a(2)}},e,null,[[1,3]])}));return function(){return e.apply(this,arguments)}}();e()},[n,i,r,e,o,null==a?void 0:a.hide,null==l?void 0:l.hide,u]),{isLoading:s,isLoadingMore:_,userMediaList:g,error:S,setAfter:b}}(o),s=c.isLoading,d=c.isLoadingMore,f=c.userMediaList,_=c.error,m=c.setAfter,p=a||s,g=u||_,v=Ut(),y=v.counter,b=v.setCounter;return at(function(){p||["masonry","highlight"].includes(o.layout)||r.classList.add("loaded")},[p]),p?h(ne,null):g?h(re,{errorUserProfile:u,errorUserMediaList:_}):h(w,null,!(null==o||null===(e=o.profile)||void 0===e||!e.display)&&h(Ue,{feedSettings:o,userProfile:l}),h(Pn,{target:r,feedSettings:o,userMediaList:f,userProfile:l}),d&&h(ne,null),h(ee,{userProfile:l,feedSettings:o,onClick:function(t){t.preventDefault(),m(f.paging.next),b(y+1)},after:null==f||null===(n=f.paging)||void 0===n?void 0:n.next}))};var En,An,Cn,Tn=new WeakMap;function qn(t){var e,n;if(t){var r={};try{r=JSON.parse(t.dataset.feed||"{}")}catch(t){return void console.warn("Invalid JSON in data-feed:",t)}if(null!==(e=r)&&void 0!==e&&e.account_id)if(null!==(n=r)&&void 0!==n&&n.source){var o=t.querySelector(".instagram-gallery-feed");o||((o=document.createElement("div")).className="instagram-gallery-feed",t.appendChild(o)),Tn.has(o)&&W(null,o),W(h(w,null,h(Rt,null,h(jn,{target:t,feedSettings:r}))),o),Tn.set(o,!0)}else console.warn("Missing source:",r);else console.warn("Missing account_id:",r)}}function Mn(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).querySelectorAll(".instagram-gallery-feed");Array.from(t).forEach(qn)}null!==(En=window.elementorFrontend)&&void 0!==En&&null!==(An=En.isEditMode)&&void 0!==An&&An.call(En)||Mn(),window.qliggFrontend={init:Mn,renderFeed:qn},null!==(Cn=window.elementorFrontend)&&void 0!==Cn&&Cn.hooks&&window.elementorFrontend.hooks.addAction("frontend/element_ready/instagram_feed.default",function(t){return Mn((null==t?void 0:t[0])||t)})})()})();