/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){if(t.__P&&t.__d){var n=t.__v,r=n.__e,o=[],i=[],a=v({},n);a.__v=n.__v+1,e.vnode&&e.vnode(a),F(t.__P,a,n,t.__n,t.__P.namespaceURI,32&n.__u?[r]:null,o,null==r?k(n):r,!!(32&n.__u),i),a.__v=n.__v,a.__.__k[a.__i]=a,D(o,a,i),n.__e=n.__=null,a.__e!=r&&x(a)}}function x(t){if(null!=(t=t.__)&&null!=t.__c)return t.__e=t.__c.base=null,t.__k.some(function(e){if(null!=e&&null!=e.__e)return t.__e=t.__c.base=e.__e}),x(t)}function N(t){(!t.__d&&(t.__d=!0)&&o.push(t)&&!I.__r++||i!=e.debounceRendering)&&((i=e.debounceRendering)||a)(I)}function I(){try{for(var t,e=1;o.length;)o.length>e&&o.sort(l),t=o.shift(),e=o.length,O(t)}finally{o.length=I.__r=0}}function P(t,e,n,r,o,i,a,l,u,c,s){var d,_,p,g,v,y,h,b=r&&r.__k||m,w=e.length;for(u=j(n,e,b,u,w),d=0;d<w;d++)null!=(p=n.__k[d])&&(_=-1!=p.__i&&b[p.__i]||f,p.__i=d,y=F(t,p,_,o,i,a,l,u,c,s),g=p.__e,p.ref&&_.ref!=p.ref&&(_.ref&&G(_.ref,null,p),s.push(p.ref,p.__c||g,p)),null==v&&null!=g&&(v=g),(h=!!(4&p.__u))||_.__k===p.__k?u=E(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 j(t,e,n,r,o){var i,a,l,u,c,s=n.length,d=s,_=0;for(t.__k=new Array(o),i=0;i<o;i++)null!=(a=e[i])&&"boolean"!=typeof a&&"function"!=typeof a?("string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?a=t.__k[i]=b(null,a,null,null,null):g(a)?a=t.__k[i]=b(w,{children:a},null,null,null):void 0===a.constructor&&a.__b>0?a=t.__k[i]=b(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):t.__k[i]=a,u=i+_,a.__=t,a.__b=t.__b+1,l=null,-1!=(c=a.__i=C(a,n,u,d))&&(d--,(l=n[c])&&(l.__u|=2)),null==l||null==l.__v?(-1==c&&(o>s?_--:o<s&&_++),"function"!=typeof a.type&&(a.__u|=4)):c!=u&&(c==u-1?_--:c==u+1?_++:(c>u?_--:_++,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)),W(l,l));return r}function E(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=E(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 A(t,e){return e=e||[],null==t||"boolean"==typeof t||(g(t)?t.some(function(t){A(t,e)}):e.push(t)),e}function C(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==l||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 T(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 q(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||T(t.style,e,"");if(n)for(e in n)r&&n[e]==r[e]||T(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 M(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 F(t,n,r,o,i,a,l,u,c,s){var d,_,f,p,h,b,k,O,x,N,I,j,E,A,C,T=n.type;if(void 0!==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 T)try{if(O=n.props,x=T.prototype&&T.prototype.render,N=(d=T.contextType)&&o[d.__c],I=d?N?N.props.value:d.__:o,r.__c?k=(_=n.__c=r.__c).__=_.__E:(x?n.__c=_=new T(O,I):(n.__c=_=new S(O,I),_.constructor=T,_.render=H),N&&N.sub(_),_.state||(_.state={}),_.__n=o,f=_.__d=!0,_.__h=[],_._sb=[]),x&&null==_.__s&&(_.__s=_.state),x&&null!=T.getDerivedStateFromProps&&(_.__s==_.state&&(_.__s=v({},_.__s)),v(_.__s,T.getDerivedStateFromProps(O,_.__s))),p=_.props,h=_.state,_.__v=n,f)x&&null==T.getDerivedStateFromProps&&null!=_.componentWillMount&&_.componentWillMount(),x&&null!=_.componentDidMount&&_.__h.push(_.componentDidMount);else{if(x&&null==T.getDerivedStateFromProps&&O!==p&&null!=_.componentWillReceiveProps&&_.componentWillReceiveProps(O,I),n.__v==r.__v||!_.__e&&null!=_.shouldComponentUpdate&&!1===_.shouldComponentUpdate(O,_.__s,I)){n.__v!=r.__v&&(_.props=O,_.state=_.__s,_.__d=!1),n.__e=r.__e,n.__k=r.__k,n.__k.some(function(t){t&&(t.__=n)}),m.push.apply(_.__h,_._sb),_._sb=[],_.__h.length&&l.push(_);break t}null!=_.componentWillUpdate&&_.componentWillUpdate(O,_.__s,I),x&&null!=_.componentDidUpdate&&_.__h.push(function(){_.componentDidUpdate(p,h,b)})}if(_.context=I,_.props=O,_.__P=t,_.__e=!1,j=e.__r,E=0,x)_.state=_.__s,_.__d=!1,j&&j(n),d=_.render(_.props,_.state,_.context),m.push.apply(_.__h,_._sb),_._sb=[];else do{_.__d=!1,j&&j(n),d=_.render(_.props,_.state,_.context),_.state=_.__s}while(_.__d&&++E<25);_.state=_.__s,null!=_.getChildContext&&(o=v(v({},o),_.getChildContext())),x&&!f&&null!=_.getSnapshotBeforeUpdate&&(b=_.getSnapshotBeforeUpdate(p,h)),A=null!=d&&d.type===w&&null==d.key?U(d.props.children):d,u=P(t,g(A)?A:[A],n,r,o,i,a,l,u,c,s),_.base=n.__e,n.__u&=-161,_.__h.length&&l.push(_),k&&(_.__E=_.__=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(C=a.length;C--;)y(a[C]);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=R(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.__k&&t.__k.some(L))}function D(t,n,r){for(var o=0;o<r.length;o++)G(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>0?t:g(t)?t.map(U):v({},t)}function R(n,r,o,i,a,l,u,c,s){var d,_,m,p,v,h,b,w=o.props||f,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),!c&&null!=l)for(w={},d=0;d<n.attributes.length;d++)w[(v=n.attributes[d]).name]=v.value;for(d in w)v=w[d],"dangerouslySetInnerHTML"==d?m=v:"children"==d||d in S||"value"==d&&"defaultValue"in S||"checked"==d&&"defaultChecked"in S||q(n,d,null,v,a);for(d in S)v=S[d],"children"==d?p=v:"dangerouslySetInnerHTML"==d?_=v:"value"==d?h=v:"checked"==d?b=v:c&&"function"!=typeof v||w[d]===v||q(n,d,v,w[d],a);if(_)c||m&&(_.__html==m.__html||_.__html==n.innerHTML)||(n.innerHTML=_.__html),r.__k=[];else if(m&&(n.innerHTML=""),P("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])&&q(n,d,h,w[d],a),d="checked",null!=b&&b!=n[d]&&q(n,d,b,w[d],a))}return n}function G(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 W(t,n,r){var o,i;if(e.unmount&&e.unmount(t),(o=t.ref)&&(o.current&&o.current!=t.__e||G(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]&&W(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 V(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=[],F(r,n=(!i&&o||r).__k=h(w,null,[n]),a||f,f,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),N(this))},S.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),N(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},I.__r=0,u=/(PointerCapture)$|Capture$/i,c=0,s=M(!1),d=M(!0),_=0;var B,z,Z,$,J=0,X=[],Y=e,K=Y.__b,Q=Y.__r,tt=Y.diffed,et=Y.__c,nt=Y.unmount,rt=Y.__;function ot(t,e){Y.__h&&Y.__h(z,t,J||e),J=0;var n=z.__H||(z.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function it(t){return J=1,at(vt,t)}function at(t,e,n){var r=ot(B++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):vt(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=z,!z.__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.some(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};z.__f=!0;var i=z.shouldComponentUpdate,a=z.componentWillUpdate;z.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)},z.shouldComponentUpdate=o}return r.__N||r.__}function lt(t,e){var n=ot(B++,3);!Y.__s&&gt(n.__H,e)&&(n.__=t,n.u=e,z.__H.__h.push(n))}function ut(t){return J=5,ct(function(){return{current:t}},[])}function ct(t,e){var n=ot(B++,7);return gt(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function st(t,e){return J=8,ct(function(){return t},e)}function dt(){for(var t;t=X.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(mt),e.__h.some(pt),e.__h=[]}catch(n){e.__h=[],Y.__e(n,t.__v)}}}Y.__b=function(t){z=null,K&&K(t)},Y.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),rt&&rt(t,e)},Y.__r=function(t){Q&&Q(t),B=0;var e=(z=t.__c).__H;e&&(Z===z?(e.__h=[],z.__h=[],e.__.some(function(t){t.__N&&(t.__=t.__N),t.u=t.__N=void 0})):(e.__h.some(mt),e.__h.some(pt),e.__h=[],B=0)),Z=z},Y.diffed=function(t){tt&&tt(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==X.push(e)&&$===Y.requestAnimationFrame||(($=Y.requestAnimationFrame)||ft)(dt)),e.__H.__.some(function(t){t.u&&(t.__H=t.u),t.u=void 0})),Z=z=null},Y.__c=function(t,e){e.some(function(t){try{t.__h.some(mt),t.__h=t.__h.filter(function(t){return!t.__||pt(t)})}catch(n){e.some(function(t){t.__h&&(t.__h=[])}),e=[],Y.__e(n,t.__v)}}),et&&et(t,e)},Y.unmount=function(t){nt&&nt(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.some(function(t){try{mt(t)}catch(t){e=t}}),n.__H=void 0,e&&Y.__e(e,n.__v))};var _t="function"==typeof requestAnimationFrame;function ft(t){var e,n=function(){clearTimeout(r),_t&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,35);_t&&(e=requestAnimationFrame(n))}function mt(t){var e=z,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),z=e}function pt(t){var e=z;t.__c=t.__(),z=e}function gt(t,e){return!t||t.length!==e.length||e.some(function(e,n){return e!==t[n]})}function vt(t,e){return"function"==typeof e?e(t):e}function yt(){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,_={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return i=e,l=0,u=t,_.n=n,a}};function f(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]<=f&&((o=n<2&&f<i[1])?(l=0,_.v=r,_.n=i[1]):f<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,_.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&&f(s,m),l=s,u=m;(e=l<2?t:u)||!d;){i||(l?l<3?(l>1&&(_.n=-1),f(l,u)):_.n=u:_.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=_.n<0)?u:n.call(r,_))!==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 _(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]"}),(yt=function(){return{w:i,m:_}})()}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 bt(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 wt(t){return St.apply(this,arguments)}function St(){return St=function(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){bt(i,r,o,a,l,"next",t)}function l(t){bt(i,r,o,a,l,"throw",t)}a(void 0)})}}(yt().m(function t(e){var n,r,o,i;return yt().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)})),St.apply(this,arguments)}function kt(t){return kt="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},kt(t)}function Ot(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"===kt(i)?Ot(i,o):encodeURIComponent(o)+"="+encodeURIComponent(i))}return n.join("&")}function xt(){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 Nt(c,"_invoke",function(n,r,o){var i,l,u,c=0,s=o||[],d=!1,_={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return i=e,l=0,u=t,_.n=n,a}};function f(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]<=f&&((o=n<2&&f<i[1])?(l=0,_.v=r,_.n=i[1]):f<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,_.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&&f(s,m),l=s,u=m;(e=l<2?t:u)||!d;){i||(l?l<3?(l>1&&(_.n=-1),f(l,u)):_.n=u:_.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=_.n<0)?u:n.call(r,_))!==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]())):(Nt(e={},r,function(){return this}),e),d=c.prototype=l.prototype=Object.create(s);function _(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Nt(t,o,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=c,Nt(d,"constructor",c),Nt(c,"constructor",u),u.displayName="GeneratorFunction",Nt(c,o,"GeneratorFunction"),Nt(d),Nt(d,o,"Generator"),Nt(d,r,function(){return this}),Nt(d,"toString",function(){return"[object Generator]"}),(xt=function(){return{w:i,m:_}})()}function Nt(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}Nt=function(t,e,n,r){function i(e,n){Nt(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))},Nt(t,e,n,r)}function It(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 Pt(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)?Pt(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 Pt(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 jt(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 Et(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){jt(i,r,o,a,l,"next",t)}function l(t){jt(i,r,o,a,l,"throw",t)}a(void 0)})}}function At(t){return Ct.apply(this,arguments)}function Ct(){return(Ct=Et(xt().m(function t(e){var n,r,o,i;return xt().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=Ot({account_id:e.account_id}).toString(),i="".concat(r).concat(r.includes("?")?"&":"?").concat(o),t.n=1,wt({url:i,method:"GET"});case 1:return t.a(2,t.v)}},t)}))).apply(this,arguments)}function Tt(t){return Tt="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},Tt(t)}function qt(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 Mt(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 Ft(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Mt(Object(n),!0).forEach(function(e){Lt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mt(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"!=Tt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Tt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Tt(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,N(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"+_++,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=z.context[t.__c],n=ot(B++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(z)),e.props.value):t.__}(Dt)},Rt=function(t,e){switch(e.type){case"SET_CURRENT_FEED_INDEX":case"SET_IS_OPEN":case"SET_COUNTER":return Ft(Ft({},t),e.payload)}},Gt=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 qt(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)?qt(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.")}()}(at(Rt,{currentFeedIndex:0,isOpen:!1,isImageLoad:!1,counter:0}),2),r=n[0],o=n[1];return h(Dt.Provider,{value:Ft(Ft({},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 Wt(){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,_={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return i=e,l=0,u=t,_.n=n,a}};function f(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]<=f&&((o=n<2&&f<i[1])?(l=0,_.v=r,_.n=i[1]):f<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,_.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&&f(s,m),l=s,u=m;(e=l<2?t:u)||!d;){i||(l?l<3?(l>1&&(_.n=-1),f(l,u)):_.n=u:_.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=_.n<0)?u:n.call(r,_))!==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 _(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]"}),(Wt=function(){return{w:i,m:_}})()}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 Vt(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)||zt(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 Bt(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)||zt(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 zt(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 $t(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){$t(i,r,o,a,l,"next",t)}function l(t){$t(i,r,o,a,l,"throw",t)}a(void 0)})}}function Xt(t){return Yt.apply(this,arguments)}function Yt(){return Yt=Jt(Wt().m(function t(e){var n,r,o,i,a,l,u,c,s,d,_,f,m,p,g,v=arguments;return Wt().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,_=null==e?void 0:e.tag,f=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[f]){t.n=1;break}throw new Error("Unknown source: ".concat(f));case 1:return p=Ot({account_id:l,limit:u,hide_items_with_copyright:c,hide_reels:s,after:i,pagination:a,order_by:d,tag:_}).toString(),g="".concat(m).concat(m.includes("?")?"&":"?").concat(p),t.n=2,wt({url:g,method:"GET"});case 2:return t.a(2,t.v)}},t)})),Yt.apply(this,arguments)}Dt.Consumer;var Kt=n(500),Qt=n.n(Kt);const te=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:Qt()("instagram-gallery__button",n,i&&"instagram-gallery__button--disabled")},r)};function ee(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 ne=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(te,{feedSettings:o,href:ee(o,r),target:"blank",className:"instagram-gallery__button--follow"},h("i",{className:"qligg-icon-instagram "}),o.button.text),u&&h(te,{feedSettings:o,className:"instagram-gallery__button--load",disabled:""===a,onClick:i},o.button_load.text))},re=function(){return h("div",{className:"instagram-gallery__spinner"})},oe=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 ie(t,e){for(var n in e)t[n]=e[n];return t}function ae(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 le(t,e){this.props=t,this.context=e}function ue(t,e){function n(t){var n=this.props.ref;return n!=t.ref&&n&&("function"==typeof n?n(null):n.current=null),e?!e(this.props,t)||n!=t.ref:ae(this.props,t)}function r(e){return this.shouldComponentUpdate=n,h(t,e)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.__f=r.prototype.isReactComponent=!0,r.type=t,r}(le.prototype=new S).isPureReactComponent=!0,le.prototype.shouldComponentUpdate=function(t,e){return ae(this.props,t)||ae(this.state,e)};var ce=e.__b;e.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),ce&&ce(t)};var se="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var de=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);de(t,e,n,r)};var _e=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=ie({},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 me(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return me(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 pe(){this.__u=0,this.o=null,this.__b=null}function ge(t){var e=t.__&&t.__.__c;return e&&e.__a&&e.__a(t)}function ve(){this.i=null,this.l=null}e.unmount=function(t){var e=t.__c;e&&(e.__z=!0),e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),_e&&_e(t)},(pe.prototype=new S).__c=function(t,e){var n=e.__c,r=this;null==r.o&&(r.o=[]),r.o.push(n);var o=ge(r.__v),i=!1,a=function(){i||r.__z||(i=!0,n.__R=null,o?o(u):u())};n.__R=a;var l=n.__P;n.__P=null;var u=function(){if(! --r.__u){if(r.state.__a){var t=r.state.__a;r.__v.__k[0]=me(t,t.__c.__P,t.__c.__O)}var e;for(r.setState({__a:r.__b=null});e=r.o.pop();)e.__P=l,e.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(a,a)},pe.prototype.componentWillUnmount=function(){this.o=[]},pe.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 ye=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 he(t){return this.getChildContext=function(){return t.context},t.children}function be(t){var e=this,n=t.h;if(e.componentWillUnmount=function(){V(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},namespaceURI:n.namespaceURI,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)}}}V(h(he,{context:e.context},t.__v),e.v)}(ve.prototype=new S).__a=function(t){var e=this,n=ge(e.__v),r=e.l.get(t);return r[0]++,function(o){var i=function(){e.props.revealOrder?(r.push(o),ye(e,t,r)):o()};n?n(i):i()}},ve.prototype.render=function(t){this.i=null,this.l=new Map;var e=A(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},ve.prototype.componentDidUpdate=ve.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){ye(t,n,e)})};var we="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Se=/^(?: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]/,ke=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Oe=/[A-Z0-9]/g,xe="undefined"!=typeof document,Ne=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)};S.prototype.isReactComponent=!0,["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 Ie=e.event;e.event=function(t){return Ie&&(t=Ie(t)),t.persist=function(){},t.isPropagationStopped=function(){return this.cancelBubble},t.isDefaultPrevented=function(){return this.defaultPrevented},t.nativeEvent=t};var Pe={configurable:!0,get:function(){return this.class}},je=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||xe&&"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||Ne(e.type)?"onfocus"===l?i="onfocusin":"onblur"===l?i="onfocusout":ke.test(i)&&(i=l):l=i="oninput":o&&Se.test(i)?i=i.replace(Oe,"-$&").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=A(e.children).forEach(function(t){t.props.selected=-1!=r.value.indexOf(t.props.value)})),null!=r.defaultValue&&(r.value=A(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",Pe)):e.className&&(r.class=r.className=e.className),t.props=r}(t),t.$$typeof=we,je&&je(t)};var Ee=e.__r;e.__r=function(t){Ee&&Ee(t),t.__c};var Ae=e.diffed;function Ce(t){return Ce="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},Ce(t)}function Te(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 qe(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Te(Object(n),!0).forEach(function(e){Me(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Te(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Me(t,e,n){return(e=function(t){var e=function(t){if("object"!=Ce(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ce(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ce(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){Ae&&Ae(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 Fe=ue(function(t){var e,n=t.feedSettings,r=qe(qe({},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))))}),Le=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)))},De=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:Qt()("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(Le,{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 Ue=/<[^>]+>/g,Re=/[\u3040-\u30FF\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF\uFF66-\uFF9F]/,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(" ")})},We=function(t,e){if(t){var n,r=t.replace(Ue,"");return(n=Re.test(t)?r.split("",e).join(""):r.split(" ",e).join(" ")).length<t.length?"".concat(n,"..."):n}};const He=ue(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"},We(n.media_description,e.card.text_length)))});var Ve=/<[^>]+>/g;const Be=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:Qt()("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(Ve,"")):"",r.length>100&&(r=r.substring(0,100)+"..."),"Instagram ".concat(n).concat(r))},h("div",{className:"instagram-gallery-item__wrap"},h(De,{index:o,feedItem:l,length:i,feedSettings:a}),a.card.display&&h(He,{feedItem:l,feedSettings:a})))};window.React;const ze="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjRweCIgaGVpZ2h0PSIyNHB4IiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCBtZWV0IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHN0eWxlPSItbXMtdHJhbnNmb3JtOiByb3RhdGUoMzYwZGVnKTsgLXdlYmtpdC10cmFuc2Zvcm06IHJvdGF0ZSgzNjBkZWcpOyB0cmFuc2Zvcm06IHJvdGF0ZSgzNjBkZWcpOyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTE2IDE3SDJsMy41LTQuNWwyLjUgM2wzLTMuODFBMiAyIDAgMCAxIDEwIDEwVjZIMmEyIDIgMCAwIDAtMiAydjEwYTIgMiAwIDAgMCAyIDJoMTRhMiAyIDAgMCAwIDItMnYtNmgtNS43NXoiLz48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMTkgNGgtLjVWMi41YTIuNSAyLjUgMCAwIDAtNSAwVjRIMTNhMSAxIDAgMCAwLTEgMXY0YTEgMSAwIDAgMCAxIDFoNmExIDEgMCAwIDAgMS0xVjVhMSAxIDAgMCAwLTEtMXptLTMgNGExIDEgMCAxIDEgMS0xYTEgMSAwIDAgMS0xIDF6bTEuNS00aC0zVjIuNzVDMTQuNSAyIDE0LjUgMSAxNiAxczEuNSAxIDEuNSAxLjc1eiIvPjwvc3ZnPgo=",Ze=function(t){var e=t.currentFeedItem,n=t.feedSettings,r=ut(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:Qt()("instagram-gallery-modal__media",!n.copyright.placeholder&&"instagram-gallery-modal__media--placeholder"),src:n.copyright.placeholder?n.copyright.placeholder:ze,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"})))},$e=ue(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:ze,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 Je(t){return Je="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},Je(t)}function Xe(){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 Ye(c,"_invoke",function(n,r,o){var i,l,u,c=0,s=o||[],d=!1,_={p:0,n:0,v:t,a:f,f:f.bind(t,4),d:function(e,n){return i=e,l=0,u=t,_.n=n,a}};function f(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]<=f&&((o=n<2&&f<i[1])?(l=0,_.v=r,_.n=i[1]):f<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,_.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&&f(s,m),l=s,u=m;(e=l<2?t:u)||!d;){i||(l?l<3?(l>1&&(_.n=-1),f(l,u)):_.n=u:_.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=_.n<0)?u:n.call(r,_))!==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]())):(Ye(e={},r,function(){return this}),e),d=c.prototype=l.prototype=Object.create(s);function _(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,Ye(t,o,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=c,Ye(d,"constructor",c),Ye(c,"constructor",u),u.displayName="GeneratorFunction",Ye(c,o,"GeneratorFunction"),Ye(d),Ye(d,o,"Generator"),Ye(d,r,function(){return this}),Ye(d,"toString",function(){return"[object Generator]"}),(Xe=function(){return{w:i,m:_}})()}function Ye(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}Ye=function(t,e,n,r){function i(e,n){Ye(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))},Ye(t,e,n,r)}function Ke(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 Qe(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)?Qe(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 Qe(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 tn(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 en(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){tn(i,r,o,a,l,"next",t)}function l(t){tn(i,r,o,a,l,"throw",t)}a(void 0)})}}function nn(t){return rn.apply(this,arguments)}function rn(){return(rn=en(Xe().m(function t(e){var n,r,o,i,a,l,u,c,s,d;return Xe().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=Ot({account_id:r,media_id:o,limit:a}).toString(),c="".concat(l).concat(l.includes("?")?"&":"?").concat(u),t.n=1,wt({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"!==Je(d)){t.n=3;break}return t.a(2,[d]);case 3:return t.a(2,[])}},t)}))).apply(this,arguments)}function on(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 an=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 on(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)?on(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(5),2),d=s[0],_=s[1],f=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=Ke(it([]),2),c=u[0],s=u[1],d=Ke(it(!1),2),_=d[0],f=d[1],m=Ke(it(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,lt(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=en(Xe().m(function t(){var o;return Xe().w(function(t){for(;;)switch(t.n){case 0:return f(!0),s([]),g(null),o=function(){var t=en(Xe().m(function t(a){var u,c;return Xe().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,nn({account_id:n.account_id,media_id:r.id});case 1:u=t.v,e&&(s(u),f(!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),f(!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:_,error:p}}({feedSettings:u,currentFeedItem:i}),m=f.comments,p=f.loading,g=f.error,v=st(function(t){return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})},[]),y=st(function(){_(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:We(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 ln=["isPrevious","classname","onClick"];function un(){return un=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},un.apply(null,arguments)}const cn=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,ln);return h("span",un({className:Qt()("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 sn=["onClick"];function dn(){return dn=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},dn.apply(null,arguments)}const _n=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,sn);return h("span",dn({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 mn(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 pn=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=ut(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 mn(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)?mn(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(e[i]),2),_=d[0],f=d[1],m=!!e[i-1]||e.length>1,p=!!e[i+1]||e.length>1,g=st(function(){m&&(e[i-1]?a(i-1):a(e.length-1))},[i,e,m,a]),v=st(function(){p&&(e[i+1]?a(i+1):a(0))},[i,e,p,a]),y=st(function(t){"ArrowLeft"===t.key?g():"ArrowRight"===t.key?v():"Escape"===t.key&&u(!1)},[g,v,u]);return lt(function(){f(e[i])},[i,e]),lt(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(cn,{isPrevious:!0,onClick:function(t){t.stopPropagation(),g()},"aria-label":"Previous image",tabIndex:"0"}),h(cn,{next:!0,onClick:function(t){t.stopPropagation(),v()},"aria-label":"Next image",tabIndex:"0"})),h(_n,{onClick:function(){return u(!1)},"aria-label":"Close modal",tabIndex:"0"})),h("section",{className:Qt()("instagram-gallery-modal__body","right"!==n.modal.modal_align&&"instagram-gallery-modal__body--sidebar-".concat(n.modal.modal_align))},h($e,{feedSettings:n,currentFeedItem:_}),h(an,{feedSettings:n,currentFeedItem:_,userProfile:r,feedItemsNumber:e.length}))))};var gn=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 vn(){return vn=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},vn.apply(null,arguments)}const yn=function(t){function e(e){var n=ie({},e);return delete n.ref,t(n,e.ref||null)}return e.$$typeof=se,e.render=t,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}((hn=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,_=!(null==i||null===(e=i.modal)||void 0===e||!e.display);return h(w,null,h("div",{ref:r,className:Qt()("instagram-gallery-list",a),"data-feed_layout":i.layout},o.data.map(function(t,e){var n=o.data.length;return h(Be,{key:t.id,index:e,length:n,feedItem:t,feedSettings:i,onClick:function(){_&&(s(e),d(!0))}})})),_&&function(t,e){var n=h(be,{__v:t,h:e});return n.containerInfo=e,n}(h(pn,{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(gn("--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(gn("--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===(_=S.desktop)||void 0===_?void 0:_.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===(f=b.aspect_ratio)||void 0===f?void 0:f.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?gn("--qligg-box-bg",b.box.background):"","\n\t\t\t\t\t\t\t").concat(x?gn("--qligg-box-color",b.box.text_color):"","\n\t\t\t\t\t\t\t").concat(x?gn("--qligg-box-radius",b.box.radius,"px"):"","\n\t\t\t\t\t\t\t").concat(x?gn("--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?gn("--qligg-card-bg",b.card.background):"","\n\t\t\t\t\t\t\t").concat(N?gn("--qligg-card-bg-hover",b.card.background_hover):"","\n\t\t\t\t\t\t\t").concat(N?gn("--qligg-card-color",b.card.text_color):"","\n\t\t\t\t\t\t\t").concat(N?gn("--qligg-card-font-size",b.card.font_size,"px"):"","\n\t\t\t\t\t\t\t").concat(N?gn("--qligg-card-padding",b.card.padding,"px"):"","\n\t\t\t\t\t\t\t").concat(N?gn("--qligg-card-radius",b.card.radius,"px"):"","\n\t\t\t\t\t\t\t").concat(N&&b.card.boxed?gn("--qligg-card-boxed","1px solid #f5f5f5"):"","\n\t\t\t\t\t\t\t").concat(N&&b.card.boxed?gn("--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?gn("--qligg-card-shadow-hover","0 3px 10px rgba(0,0,0,0.06)"):"","\n\t\t\t\t\t\t\t").concat(N?gn("--qligg-card-text-align",b.card.text_align||"left"):"","\n\t\t\t\t\t\t\t").concat(P?gn("--qligg-mask-bg",b.mask.background):"","\n\t\t\t\t\t\t\t").concat(P?gn("--qligg-mask-icon-color",b.mask.icon_color||"#ffffff"):"","\n\t\t\t\t\t\t\t").concat(I?gn("--qligg-carousel-arrow-color",b.carousel.navarrows_color):"","\n\t\t\t\t\t\t\t").concat(I?gn("--qligg-carousel-pagination-color",b.carousel.pagination_color):"","\n\t\t\t\t\t\t\t").concat(j?gn("--qligg-button-color",b.button.text_color):"","\n\t\t\t\t\t\t\t").concat(j?gn("--qligg-button-bg",b.button.background):"","\n\t\t\t\t\t\t\t").concat(j?gn("--qligg-button-bg-hover",b.button.background_hover):"","\n\t\t\t\t\t\t\t").concat(E?gn("--qligg-load-button-color",b.button_load.text_color):"","\n\t\t\t\t\t\t\t").concat(E?gn("--qligg-load-button-bg",b.button_load.background):"","\n\t\t\t\t\t\t\t").concat(E?gn("--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(hn,vn({},t,{forwardRef:e})))}));var hn;function bn(){return bn=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},bn.apply(null,arguments)}function wn(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 Sn=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 wn(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)?wn(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(!0),2),c=u[0],s=u[1],d=(Ut().isImageLoad,ut(null)),_=ut(null),f=ut(new Set),m=ut(0),p=st(function(){_.current&&clearTimeout(_.current),_.current=setTimeout(function(){d.current&&d.current.layout()},100)},[]),g=st(function(t){f.current.add(t),p(),f.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,f.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(){_.current&&clearTimeout(_.current),u.disconnect(),r.destroy(),d.current=null}}},n=[i,g,p,o,l,a],r=ut(),st(function(t){t?r.current=e(t):r.current&&r.current()},n));return h(w,null,c&&h(re,null),h(yn,bn({},t,{masonryRef:v})))};function kn(t){return kn="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},kn(t)}function On(){return On=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},On.apply(null,arguments)}function xn(t,e,n){return(e=function(t){var e=function(t){if("object"!=kn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=kn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==kn(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Nn=function(t){var e=t.userMediaList,n=t.feedSettings,r=Ut().setCurrentFeedIndex,o=Ut().setIsOpen,i=st(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:xn(xn({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===(_=n.responsive)||void 0===_||null===(_=_.desktop)||void 0===_?void 0:_.columns)||3,spaceBetween:(null===(f=n.responsive)||void 0===f||null===(f=f.desktop)||void 0===f?void 0:f.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(yn,On({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 In(){return In=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},In.apply(null,arguments)}const Pn=function(t){var e=ut();return h(yn,In({ref:e,className:"instagram-gallery-square"},t))},jn=function(t){switch(t.feedSettings.layout){case"masonry":case"highlight":return h(Sn,t);case"carousel":return h(Nn,t);default:return h(Pn,t)}},En=function(t){var e,n,r=t.target,o=t.feedSettings,i=function(t){var e=t.account_id,n=It(it(!0),2),r=n[0],o=n[1],i=It(it(null),2),a=i[0],l=i[1],u=It(it(null),2),c=u[0],s=u[1];return lt(function(){var e=function(){var e=Et(xt().m(function e(){var n,r;return xt().w(function(e){for(;;)switch(e.p=e.n){case 0:return o(!0),e.p=1,e.n=2,At(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=Bt(it(!0),2),s=c[0],d=c[1],_=Bt(it(!1),2),f=_[0],m=_[1],p=Bt(it({paging:{next:null,prev:null},data:[]}),2),g=p[0],v=p[1],y=Bt(it(""),2),h=y[0],b=y[1],w=Bt(it(null),2),S=w[0],k=w[1];return lt(function(){k(null);var e=function(){var e=Jt(Wt().m(function e(){var n,r;return Wt().w(function(e){for(;;)switch(e.p=e.n){case 0:return 0===u?d(!0):m(!0),e.p=1,e.n=2,Xt(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(Vt(null==g?void 0:g.data),Vt(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:f,userMediaList:g,error:S,setAfter:b}}(o),s=c.isLoading,d=c.isLoadingMore,_=c.userMediaList,f=c.error,m=c.setAfter,p=a||s,g=u||f,v=Ut(),y=v.counter,b=v.setCounter;return lt(function(){p||["masonry","highlight"].includes(o.layout)||r.classList.add("loaded")},[p]),p?h(re,null):g?h(oe,{errorUserProfile:u,errorUserMediaList:f}):h(w,null,!(null==o||null===(e=o.profile)||void 0===e||!e.display)&&h(Fe,{feedSettings:o,userProfile:l}),h(jn,{target:r,feedSettings:o,userMediaList:_,userProfile:l}),d&&h(re,null),h(ne,{userProfile:l,feedSettings:o,onClick:function(t){t.preventDefault(),m(_.paging.next),b(y+1)},after:null==_||null===(n=_.paging)||void 0===n?void 0:n.next}))};var An,Cn,Tn,qn=new WeakMap;function Mn(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)),qn.has(o)&&V(null,o),V(h(w,null,h(Gt,null,h(En,{target:t,feedSettings:r}))),o),qn.set(o,!0)}else console.warn("Missing source:",r);else console.warn("Missing account_id:",r)}}function Fn(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).querySelectorAll(".instagram-gallery-feed");Array.from(t).forEach(Mn)}null!==(An=window.elementorFrontend)&&void 0!==An&&null!==(Cn=An.isEditMode)&&void 0!==Cn&&Cn.call(An)||Fn(),window.qliggFrontend={init:Fn,renderFeed:Mn},null!==(Tn=window.elementorFrontend)&&void 0!==Tn&&Tn.hooks&&window.elementorFrontend.hooks.addAction("frontend/element_ready/instagram_feed.default",function(t){return Fn((null==t?void 0:t[0])||t)})})()})();