You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Filterizr version
Which version of Filterizr do you have installed in your project?
I'm using v2.2.4
Describe the issue in details
I'm using bootstrap tabs with 2 galleries that are independent. Both galleries use the same script (the vanilla version) and they have custom filters. Everything works well when they are in the same tab, but a weird error occurs when I try to put them in separate ones.
// fiterizr http://yiotis.net/filterizr/varFilterizr=function(t){vare={};functionn(r){if(e[r])returne[r].exports;vari=e[r]={i:r,l:!1,exports:{}};returnt[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}returnn.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)returnt;if(4&e&&"object"==typeoft&&t&&t.__esModule)returnt;varr=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeoft)for(variint)n.d(r,i,function(e){returnt[e]}.bind(null,i));returnr},n.n=function(t){vare=t&&t.__esModule?function(){returnt.default}:function(){returnt};returnn.d(e,"a",e),e},n.o=function(t,e){returnObject.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=5)}([function(t,e,n){"use strict";varr={IDLE:"IDLE",FILTERING:"FILTERING",SORTING:"SORTING",SHUFFLING:"SHUFFLING"},i={SAME_SIZE:"sameSize",SAME_HEIGHT:"sameHeight",SAME_WIDTH:"sameWidth",PACKED:"packed",HORIZONTAL:"horizontal",VERTICAL:"vertical"},o=/(^linear$)|(^ease-in-out$)|(^ease-in$)|(^ease-out$)|(^ease$)|(^step-start$)|(^step-end$)|(^steps\(\d\s*,\s*(end|start)\))$|(^cubic-bezier\((\d*\.*\d+)\s*,\s*(\d*\.*\d+)\s*,\s*(\d*\.*\d+)\s*,\s*(\d*\.*\d+)\))$/,s=function(t,e,n,r,i){if(void0!==e){varo=newError('Filterizr: expected type of option "'+t+'" to be "'+n+'", but its type is: "'+typeofe+'"'),s=!1,a=!1,u=n.includes("array");if((typeofe).match(n)?s=!0:!s&&u&&(a=Array.isArray(e)),!s&&!u)throwo;if(!s&&u&&!a)throwo;varc=function(t){returnt?" For further help read here: "+t:""};if(Array.isArray(r)){varl=!1;if(r.forEach(function(t){t===e&&(l=!0)}),!l)thrownewError('Filterizr: allowed values for option "'+t+'" are: '+r.map(function(t){return'"'+t+'"'}).join(", ")+'. Value received: "'+e+'".'+c(i))}elseif("string"==typeofe&&rinstanceofRegExp){if(!e.match(r))thrownewError('Filterizr: invalid value "'+e+'" for option "'+t+'" received.'+c(i))}}},a=function(t,e,n){varr;returnfunction(){vari=this,o=arguments;clearTimeout(r),r=window.setTimeout(function(){r=null,n||t.apply(i,o)},e),n&&!r&&t.apply(i,o)}},u=function(t,e){returnt.length===e.length&&t.reduce(function(t,n,r){vari=n.getSortAttribute("index"),o=e[r].getSortAttribute("index");returnt&&i===o},!0)};varc=function(t){return"string"==typeoft?document.querySelector(t):t};functionl(t){returnt&&"object"==typeoft&&!Array.isArray(t)}functionf(t){for(vare,n,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];if(!r.length)returnt;varo=r.shift();if(l(t)&&l(o))for(varsino)l(o[s])?(t[s]||Object.assign(t,((e={})[s]={},e)),f(t[s],o[s])):Object.assign(t,((n={})[s]=o[s],n));returnf.apply(void0,[t].concat(r))}varh=function(){};functionp(t,e){Object.entries(e).forEach(function(e){varn=e[0],r=e[1];t.style[n]=r})}vard=function(t){for(vare=t.slice(0),n=[];0!==e.length;){varr=Math.floor(e.length*Math.random());n.push(e[r]),e.splice(r,1)}returnn},y=function(){functiont(t){this.receiver=t,this.eventDictionary={}}returnt.prototype.on=function(t,e){varn=this.receiver,r=ninstanceofNodeList;!!this.eventDictionary[t]&&deletethis.eventDictionary[t],r&&n.length?(this.eventDictionary[t]=e,Array.from(n).forEach(function(n){n.addEventListener(t,e)})):!r&&n&&(this.eventDictionary[t]=e,n.addEventListener(t,e))},t.prototype.off=function(t){vare=this.receiver,n=this.eventDictionary[t],r=einstanceofNodeList;r&&e.length?Array.from(e).forEach(function(e){e.removeEventListener(t,n)}):!r&&e&&e.removeEventListener(t,n),deletethis.eventDictionary[t]},t.prototype.destroy=function(){vart=this,e=this.receiver,n=einstanceofNodeList;n&&e.length?Array.from(e).forEach(function(e){returnt.removeAllEvents(e)}):!n&&e&&this.removeAllEvents(e)},t.prototype.removeAllEvents=function(t){vare=this;Object.keys(this.eventDictionary).forEach(function(n){t.removeEventListener(n,e.eventDictionary[n]),deletee.eventDictionary[n]})},t}(),v={animationDuration:.5,callbacks:{onInit:h,onFilteringStart:h,onFilteringEnd:h,onShufflingStart:h,onShufflingEnd:h,onSortingStart:h,onSortingEnd:h},controlsSelector:"",delay:0,delayMode:"progressive",easing:"ease-out",filter:"all",filterOutCss:{opacity:0,transform:"scale(0.5)"},filterInCss:{opacity:1,transform:"scale(1)"},gridItemsSelector:".filtr-item",gutterPixels:0,layout:i.SAME_SIZE,multifilterLogicalOperator:"or",searchTerm:"",setupControls:!0,spinner:{enabled:!1,fillColor:"#2184D0",styles:{height:"75px",margin:"0 auto",width:"75px","z-index":2}}},g=function(){functiont(t){this.filter=t}returnt.prototype.get=function(){returnthis.filter},t.prototype.set=function(t){this.filter=t},t.prototype.toggle=function(t){this.filter=this.toggleFilter(this.filter,t)},t.prototype.toggleFilter=function(t,e){if("all"===t)returne;if(Array.isArray(t)){if(t.includes(e)){varn=t.filter(function(t){returnt!==e});return1===n.length?n[0]:n}returnt.concat([e])}returnt===e?"all":[t,e]},t}(),m=function(){return(m=Object.assign||function(t){for(vare,n=1,r=arguments.length;n<r;n++)for(variine=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);returnt}).apply(this,arguments)},b=function(){functiont(t){vare=f({},v,this.validate(t));this.options=this.convertToFilterizrOptions(e)}returnObject.defineProperty(t.prototype,"isSpinnerEnabled",{get:function(){returnthis.options.spinner.enabled},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"areControlsEnabled",{get:function(){returnthis.options.setupControls},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"controlsSelector",{get:function(){returnthis.options.controlsSelector},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"filter",{get:function(){returnthis.options.filter.get()},set:function(t){this.options.filter.set(t)},enumerable:!0,configurable:!0}),t.prototype.toggleFilter=function(t){this.options.filter.toggle(t)},Object.defineProperty(t.prototype,"searchTerm",{get:function(){returnthis.options.searchTerm},set:function(t){this.options.searchTerm=t},enumerable:!0,configurable:!0}),t.prototype.get=function(){returnthis.options},t.prototype.getRaw=function(){returnthis.convertToOptions(this.options)},t.prototype.set=function(t){vare=f({},this.convertToOptions(this.options),this.validate(t));this.options=this.convertToFilterizrOptions(e)},t.prototype.convertToFilterizrOptions=function(t){returnm({},t,{filter:newg(t.filter)})},t.prototype.convertToOptions=function(t){returnm({},t,{filter:t.filter.get()})},t.prototype.validate=function(t){returns("animationDuration",t.animationDuration,"number"),s("callbacks",t.callbacks,"object"),s("controlsSelector",t.controlsSelector,"string"),s("delay",t.delay,"number"),s("easing",t.easing,"string",o,"https://www.w3schools.com/cssref/css3_pr_transition-timing-function.asp"),s("delayMode",t.delayMode,"string",["progressive","alternate"]),s("filter",t.filter,"string|number|array"),s("filterOutCss",t.filterOutCss,"object"),s("filterInCss",t.filterOutCss,"object"),s("gridItemsSelector",t.gridItemsSelector,"string"),s("gutterPixels",t.gutterPixels,"number"),s("layout",t.layout,"string",Object.values(i)),s("multifilterLogicalOperator",t.multifilterLogicalOperator,"string",["and","or"]),s("searchTerm",t.searchTerm,"string"),s("setupControls",t.setupControls,"boolean"),t},t}(),w=function(){functiont(t,e){void0===e&&(e=""),this.filterizr=t,this.selector=e,this.filterControls=newy(document.querySelectorAll(e+"[data-filter]")),this.multiFilterControls=newy(document.querySelectorAll(e+"[data-multifilter]")),this.shuffleControls=newy(document.querySelectorAll(e+"[data-shuffle]")),this.searchControls=newy(document.querySelectorAll(e+"[data-search]")),this.sortAscControls=newy(document.querySelectorAll(e+"[data-sortAsc]")),this.sortDescControls=newy(document.querySelectorAll(e+"[data-sortDesc]")),this.initialize()}returnt.prototype.destroy=function(){this.filterControls.destroy(),this.multiFilterControls.destroy(),this.shuffleControls.destroy(),this.searchControls.destroy(),this.sortAscControls.destroy(),this.sortDescControls.destroy()},t.prototype.initialize=function(){vart=this.filterizr,e=this.selector;this.filterControls.on("click",function(e){varn=e.currentTarget.getAttribute("data-filter");t.filter(n)}),this.multiFilterControls.on("click",function(e){varn=e.target.getAttribute("data-multifilter");t.toggleFilter(n)}),this.shuffleControls.on("click",t.shuffle.bind(t)),this.searchControls.on("keyup",a(function(e){varn=e.target.value;t.search(n)},250,!1)),this.sortAscControls.on("click",function(){varn=document.querySelector(e+"[data-sortOrder]").value;t.sort(n,"asc")}),this.sortDescControls.on("click",function(){varn=document.querySelector(e+"[data-sortOrder]").value;t.sort(n,"desc")})},t}(),E=function(){functiont(t,e){this.node=t,this.options=e,this.eventReceiver=newy(this.node)}returnObject.defineProperty(t.prototype,"dimensions",{get:function(){return{width:this.node.clientWidth,height:this.node.clientHeight}},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){this.styles.destroy()},t.prototype.trigger=function(t){vare=newEvent(t);this.node.dispatchEvent(e)},t}();functionI(t,e){varn=e.get(),r=n.delay;return"progressive"===n.delayMode?r*t:t%2==0?r:0}varS,O=function(t,e,n,r){returnnew(n||(n=Promise))(function(i,o){functions(t){try{u(r.next(t))}catch(t){o(t)}}functiona(t){try{u(r.throw(t))}catch(t){o(t)}}functionu(t){t.done?i(t.value):newn(function(e){e(t.value)}).then(s,a)}u((r=r.apply(t,e||[])).next())})},x=function(t,e){varn,r,i,o,s={label:0,sent:function(){if(1&i[0])throwi[1];returni[1]},trys:[],ops:[]};returno={next:a(0),throw:a(1),return:a(2)},"function"==typeofSymbol&&(o[Symbol.iterator]=function(){returnthis}),o;functiona(o){returnfunction(a){returnfunction(o){if(n)thrownewTypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)returni;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case0:case1:i=o;break;case4:returns.label++,{value:o[1],done:!1};case5:s.label++,r=o[1],o=[0];continue;case7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throwo[1];return{value:o[0]?o[1]:void0,done:!0}}([o,a])}}},_=function(){functiont(){}returnt.animate=function(e,n){returnO(this,void0,void0,function(){returnx(this,function(r){switch(r.label){case0:return[4,t.process({node:e,targetStyles:n,eventReceiver:newy(e)})];case1:returnr.sent(),[2]}})})},t.process=function(t){returnO(this,void0,void0,function(){returnx(this,function(e){return[2,newPromise(function(e){t.eventReceiver.on("transitionend",function(){t.eventReceiver.destroy(),e()}),setTimeout(function(){p(t.node,t.targetStyles)},10)})]})})},t}().animate,k=function(t,e,n,r){returnnew(n||(n=Promise))(function(i,o){functions(t){try{u(r.next(t))}catch(t){o(t)}}functiona(t){try{u(r.throw(t))}catch(t){o(t)}}functionu(t){t.done?i(t.value):newn(function(e){e(t.value)}).then(s,a)}u((r=r.apply(t,e||[])).next())})},C=function(t,e){varn,r,i,o,s={label:0,sent:function(){if(1&i[0])throwi[1];returni[1]},trys:[],ops:[]};returno={next:a(0),throw:a(1),return:a(2)},"function"==typeofSymbol&&(o[Symbol.iterator]=function(){returnthis}),o;functiona(o){returnfunction(a){returnfunction(o){if(n)thrownewTypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)returni;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case0:case1:i=o;break;case4:returns.label++,{value:o[1],done:!1};case5:s.label++,r=o[1],o=[0];continue;case7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throwo[1];return{value:o[0]?o[1]:void0,done:!0}}([o,a])}}},A=function(){functiont(t,e){this.node=t,this.options=e}returnt.prototype.destroy=function(){this.node.removeAttribute("style")},t.prototype.animate=function(t){returnk(this,void0,void0,function(){returnC(this,function(e){return_(this.node,t),[2]})})},t.prototype.set=function(t){p(this.node,t)},t.prototype.remove=function(t){this.node.style.removeProperty(t)},t}(),T=(S=function(t,e){return(S=Object.setPrototypeOf||{__proto__:[]}instanceofArray&&function(t,e){t.__proto__=e}||function(t,e){for(varnine)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){functionn(){this.constructor=t}S(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,newn)}),j=function(t,e,n,r){returnnew(n||(n=Promise))(function(i,o){functions(t){try{u(r.next(t))}catch(t){o(t)}}functiona(t){try{u(r.throw(t))}catch(t){o(t)}}functionu(t){t.done?i(t.value):newn(function(e){e(t.value)}).then(s,a)}u((r=r.apply(t,e||[])).next())})},P=function(t,e){varn,r,i,o,s={label:0,sent:function(){if(1&i[0])throwi[1];returni[1]},trys:[],ops:[]};returno={next:a(0),throw:a(1),return:a(2)},"function"==typeofSymbol&&(o[Symbol.iterator]=function(){returnthis}),o;functiona(o){returnfunction(a){returnfunction(o){if(n)thrownewTypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)returni;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case0:case1:i=o;break;case4:returns.label++,{value:o[1],done:!1};case5:s.label++,r=o[1],o=[0];continue;case7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throwo[1];return{value:o[0]?o[1]:void0,done:!0}}([o,a])}}},F=n(1),L=function(t){functione(e,n,r){vari=t.call(this,e,r)||this;returni._index=n,i}returnT(e,t),e.prototype.initialize=function(){vart;this.set((t=this.options,Object.assign({},t.get().filterOutCss,{"-webkit-backface-visibility":"hidden",perspective:"1000px","-webkit-perspective":"1000px","-webkit-transform-style":"preserve-3d",position:"absolute"})))},e.prototype.setFilteredStyles=function(t,e){this.set(function(t,e){returnObject.assign({},e,{transform:(e.transform||"")+" translate3d("+t.left+"px, "+t.top+"px, 0)"})}(t,e))},e.prototype.updateTransitionStyle=function(){vart,e,n;this.set((t=this._index,e=this.options,{transition:"all "+(n=e.get()).animationDuration+"s "+n.easing+" "+I(t,e)+"ms, width 1ms"}))},e.prototype.updateWidth=function(){vart=this.options.get().gutterPixels,e=this.node.parentElement.clientWidth,n=this.node.clientWidth,r=n-t*(1/Math.floor(e/n)+1)+"px";this.set({width:r})},e.prototype.enableTransitions=function(){returnj(this,void0,void0,function(){vart=this;returnP(this,function(e){return[2,newPromise(function(e){!!t.node.querySelectorAll("img").length?F(t.node,function(){setTimeout(function(){t.updateTransitionStyle(),e()},10)}):setTimeout(function(){t.updateTransitionStyle(),e()},10)})]})})},e.prototype.disableTransitions=function(){this.remove("transition")},e.prototype.setZIndex=function(t){this.set({"z-index":t})},e.prototype.removeZIndex=function(){this.remove("z-index")},e.prototype.removeWidth=function(){this.remove("width")},e.prototype.setHidden=function(){this.set({display:"none"})},e.prototype.setVisible=function(){this.remove("display")},e}(A),z=function(){vart=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceofArray&&function(t,e){t.__proto__=e}||function(t,e){for(varnine)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};returnfunction(e,n){functionr(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,newr)}}(),D=function(){return(D=Object.assign||function(t){for(vare,n=1,r=arguments.length;n<r;n++)for(variine=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);returnt}).apply(this,arguments)},N=function(t){functione(e,n,r){vari=t.call(this,e,r)||this;returni.filteredOut=!1,i.lastPosition={left:0,top:0},i.sortData=D({},function(t){for(vare={category:"",sort:""},n=0,r=t.attributes,i=r.length;n<i;n++){varo=r[n],s=o.nodeName,a=o.nodeValue;s.includes("data")&&(e[s.slice(5,s.length)]=a)}returndeletee.category,deletee.sort,e}(e),{index:n,sortData:e.getAttribute("data-sort")}),i.styledNode=newL(e,n,r),i.styles.initialize(),i.bindEvents(),i}returnz(e,t),Object.defineProperty(e.prototype,"styles",{get:function(){returnthis.styledNode},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.unbindEvents()},e.prototype.filterIn=function(t){vare=this.options.get().filterInCss;this.styles.setFilteredStyles(t,e),this.lastPosition=t,this.filteredOut=!1},e.prototype.filterOut=function(){vart=this.options.get().filterOutCss;this.styles.setFilteredStyles(this.lastPosition,t),this.filteredOut=!0},e.prototype.contentsMatchSearch=function(t){returnthis.node.textContent.toLowerCase().includes(t)},e.prototype.getCategories=function(){returnthis.node.getAttribute("data-category").split(/\s*,\s*/g)},e.prototype.getSortAttribute=function(t){returnthis.sortData[t]},e.prototype.bindEvents=function(){vart=this;this.eventReceiver.on("transitionend",function(){t.filteredOut?(t.node.classList.add("filteredOut"),t.styles.setZIndex(-1e3),t.styles.setHidden()):(t.node.classList.remove("filteredOut"),t.styles.removeZIndex())})},e.prototype.unbindEvents=function(){this.eventReceiver.off("transitionend")},e}(E),M=function(){},R=function(){vart=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceofArray&&function(t,e){t.__proto__=e}||function(t,e){for(varnine)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};returnfunction(e,n){functionr(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,newr)}}(),H=function(t,e,n,r){returnnew(n||(n=Promise))(function(i,o){functions(t){try{u(r.next(t))}catch(t){o(t)}}functiona(t){try{u(r.throw(t))}catch(t){o(t)}}functionu(t){t.done?i(t.value):newn(function(e){e(t.value)}).then(s,a)}u((r=r.apply(t,e||[])).next())})},W=function(t,e){varn,r,i,o,s={label:0,sent:function(){if(1&i[0])throwi[1];returni[1]},trys:[],ops:[]};returno={next:a(0),throw:a(1),return:a(2)},"function"==typeofSymbol&&(o[Symbol.iterator]=function(){returnthis}),o;functiona(o){returnfunction(a){returnfunction(o){if(n)thrownewTypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)returni;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case0:case1:i=o;break;case4:returns.label++,{value:o[1],done:!1};case5:s.label++,r=o[1],o=[0];continue;case7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throwo[1];return{value:o[0]?o[1]:void0,done:!0}}([o,a])}}},q=function(t){functione(e){varn=t.call(this)||this;returnn._filterItems=e.map(function(t){returnt.styles}),n}returnR(e,t),e.prototype.resetDisplay=function(){this._filterItems.forEach(function(t){returnt.setVisible()})},e.prototype.removeWidth=function(){this._filterItems.forEach(function(t){returnt.removeWidth()})},e.prototype.updateWidth=function(){this._filterItems.forEach(function(t){returnt.updateWidth()})},e.prototype.updateTransitionStyle=function(){this._filterItems.forEach(function(t){returnt.updateTransitionStyle()})},e.prototype.disableTransitions=function(){this._filterItems.forEach(function(t){returnt.disableTransitions()})},e.prototype.enableTransitions=function(){returnH(this,void0,void0,function(){vart=this;returnW(this,function(e){returnthis._filterItems.forEach(function(e){returnH(t,void0,void0,function(){returnW(this,function(t){switch(t.label){case0:return[4,e.enableTransitions()];case1:return[2,t.sent()]}})})}),[2]})})},e.prototype.updateWidthWithTransitionsDisabled=function(){this.disableTransitions(),this.removeWidth(),this.updateWidth(),this.enableTransitions()},e}(M),G=function(){functiont(t,e){this.filterItems=t,this.styledFilterItems=newq(t),this.options=e}returnObject.defineProperty(t.prototype,"styles",{get:function(){returnthis.styledFilterItems},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){returnthis.filterItems.length},enumerable:!0,configurable:!0}),t.prototype.getItem=function(t){returnthis.filterItems[t]},t.prototype.destroy=function(){this.filterItems.forEach(function(t){returnt.destroy()})},t.prototype.push=function(t){returnthis.filterItems.push(t)},t.prototype.remove=function(t){this.filterItems=this.filterItems.filter(function(e){returne.node!==t})},t.prototype.getFiltered=function(t){vare=this,n=this.options.searchTerm,r=this.search(this.filterItems,n);return"all"===t?r:r.filter(function(n){returne.shouldBeFiltered(n.getCategories(),t)})},t.prototype.getFilteredOut=function(t){vare=this,n=this.options.searchTerm;returnthis.filterItems.filter(function(r){vari=r.getCategories(),o=e.shouldBeFiltered(i,t),s=r.contentsMatchSearch(n);return!o||!s})},t.prototype.sort=function(t,e){void0===t&&(t="index"),void0===e&&(e="asc");varn,r,i=(n=this.filterItems,r=function(e){returne.getSortAttribute(t)},n.slice(0).sort(function(t){returnfunction(e,n){varr=t(e),i=t(n);returnr<i?-1:r>i?1:0}}(r))),o="asc"===e?i:i.reverse();this.filterItems=o},t.prototype.shuffle=function(){vart=this,e=this.getFiltered(this.options.filter);if(e.length>1){varn=this.getFiltered(this.options.filter).map(function(e){returnt.filterItems.indexOf(e)}).slice(),r=void0;do{r=d(e)}while(u(e,r));(r=d(e)).forEach(function(e,r){vari,o=n[r];t.filterItems=Object.assign([],t.filterItems,((i={})[o]=e,i))})}},t.prototype.search=function(t,e){returne?t.filter(function(t){returnt.contentsMatchSearch(e)}):t},t.prototype.shouldBeFiltered=function(t,e){varn,r,i=this.options.getRaw().multifilterLogicalOperator;returnArray.isArray(e)?"or"===i?!!(n=t,r=e,Array.prototype.filter.call(n,function(t){returnr.includes(t)})).length:function(t,e){returnt.reduce(function(t,n){returnt&&e.includes(n)},!0)}(e,t):t.includes(e)},t}(),B=function(){return(B=Object.assign||function(t){for(vare,n=1,r=arguments.length;n<r;n++)for(variine=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);returnt}).apply(this,arguments)},Z=function(t){return{padding:t.get().gutterPixels+"px"}},$=function(){vart=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceofArray&&function(t,e){t.__proto__=e}||function(t,e){for(varnine)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};returnfunction(e,n){functionr(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,newr)}}(),Q=function(t){functione(){returnnull!==t&&t.apply(this,arguments)||this}return$(e,t),e.prototype.initialize=function(){vart;this.set((t=this.options,B({},Z(t),{position:"relative",width:"100%",display:"flex",flexWrap:"wrap"})))},e.prototype.updatePaddings=function(){this.set(Z(this.options))},e.prototype.setHeight=function(t){this.set({height:t+"px"})},e}(A),V=function(){vart=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceofArray&&function(t,e){t.__proto__=e}||function(t,e){for(varnine)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};returnfunction(e,n){functionr(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,newr)}}(),J=function(t){functione(e,n){vari=this;if(!e)thrownewError("Filterizr: could not initialize container, check the selector or node you passed to the constructor exists.");return(i=t.call(this,e,n)||this).styledNode=newQ(e,n),i._filterizrState=r.IDLE,i.styles.initialize(),i.filterItems=i.makeFilterItems(i.options),i.bindEvents(),i}returnV(e,t),Object.defineProperty(e.prototype,"styles",{get:function(){returnthis.styledNode},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filterizrState",{set:function(t){this._filterizrState=t},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.unbindEvents(),this.filterItems.destroy()},e.prototype.makeFilterItems=function(t){vare=Array.from(this.node.querySelectorAll(t.get().gridItemsSelector)).map(function(e,n){returnnewN(e,n,t)}),n=newG(e,t);if(!n.length)thrownewError("Filterizr: cannot initialize empty container. Make sure the gridItemsSelector option corresponds to the selector of your grid's items");returnn.styles.updateWidth(),n},e.prototype.insertItem=function(t){vare=t.cloneNode(!0);e.removeAttribute("style"),this.node.appendChild(e);varn=newN(e,this.filterItems.length,this.options);n.styles.enableTransitions(),n.styles.updateWidth(),this.filterItems.push(n)},e.prototype.removeItem=function(t){this.filterItems.remove(t),this.node.removeChild(t)},e.prototype.setHeight=function(t){this.dimensions.height=t,this.styles.setHeight(t)},e.prototype.bindEvents=function(){vart=this,e=this.options.get(),n=e.animationDuration,i=e.callbacks,o=e.delay,s=e.delayMode,u=e.gridItemsSelector,c="progressive"===s?o*this.filterItems.length:o;this.eventReceiver.on("transitionend",a(function(e){if(Array.from(e.target.classList).reduce(function(t,e){returnt||u.includes(e)},!1)){switch(t._filterizrState){caser.FILTERING:t.trigger("filteringEnd");break;caser.SORTING:t.trigger("sortingEnd");break;caser.SHUFFLING:t.trigger("shufflingEnd")}t.filterizrState=r.IDLE}},100*n+c,!1)),this.eventReceiver.on("init",i.onInit),this.eventReceiver.on("filteringStart",i.onFilteringStart),this.eventReceiver.on("filteringEnd",i.onFilteringEnd),this.eventReceiver.on("shufflingStart",i.onShufflingStart),this.eventReceiver.on("shufflingEnd",i.onShufflingEnd),this.eventReceiver.on("sortingStart",i.onSortingStart),this.eventReceiver.on("sortingEnd",i.onSortingEnd)},e.prototype.unbindEvents=function(){this.eventReceiver.off("transitionend"),this.eventReceiver.off("init"),this.eventReceiver.off("filteringStart"),this.eventReceiver.off("filteringEnd"),this.eventReceiver.off("shufflingStart"),this.eventReceiver.off("shufflingEnd"),this.eventReceiver.off("sortingStart"),this.eventReceiver.off("sortingEnd")},e}(E);varU=function(){vart=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceofArray&&function(t,e){t.__proto__=e}||function(t,e){for(varnine)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};returnfunction(e,n){functionr(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,newr)}}(),K=function(){return(K=Object.assign||function(t){for(vare,n=1,r=arguments.length;n<r;n++)for(variine=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);returnt}).apply(this,arguments)},X=function(t,e,n,r){returnnew(n||(n=Promise))(function(i,o){functions(t){try{u(r.next(t))}catch(t){o(t)}}functiona(t){try{u(r.throw(t))}catch(t){o(t)}}functionu(t){t.done?i(t.value):newn(function(e){e(t.value)}).then(s,a)}u((r=r.apply(t,e||[])).next())})},Y=function(t,e){varn,r,i,o,s={label:0,sent:function(){if(1&i[0])throwi[1];returni[1]},trys:[],ops:[]};returno={next:a(0),throw:a(1),return:a(2)},"function"==typeofSymbol&&(o[Symbol.iterator]=function(){returnthis}),o;functiona(o){returnfunction(a){returnfunction(o){if(n)thrownewTypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)returni;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case0:case1:i=o;break;case4:returns.label++,{value:o[1],done:!1};case5:s.label++,r=o[1],o=[0];continue;case7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throwo[1];return{value:o[0]?o[1]:void0,done:!0}}([o,a])}}},tt=function(t){functione(){returnnull!==t&&t.apply(this,arguments)||this}returnU(e,t),e.prototype.initialize=function(){vart=this.options.get().spinner.styles;this.set(K({},t,{opacity:1,transition:"all ease-out 500ms"}))},e.prototype.fadeOut=function(){returnX(this,void0,void0,function(){returnY(this,function(t){switch(t.label){case0:return[4,this.animate({opacity:0})];case1:returnt.sent(),[2]}})})},e}(A),et=function(t,e,n,r){returnnew(n||(n=Promise))(function(i,o){functions(t){try{u(r.next(t))}catch(t){o(t)}}functiona(t){try{u(r.throw(t))}catch(t){o(t)}}functionu(t){t.done?i(t.value):newn(function(e){e(t.value)}).then(s,a)}u((r=r.apply(t,e||[])).next())})},nt=function(t,e){varn,r,i,o,s={label:0,sent:function(){if(1&i[0])throwi[1];returni[1]},trys:[],ops:[]};returno={next:a(0),throw:a(1),return:a(2)},"function"==typeofSymbol&&(o[Symbol.iterator]=function(){returnthis}),o;functiona(o){returnfunction(a){returnfunction(o){if(n)thrownewTypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)returni;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case0:case1:i=o;break;case4:returns.label++,{value:o[1],done:!1};case5:s.label++,r=o[1],o=[0];continue;case7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throwo[1];return{value:o[0]?o[1]:void0,done:!0}}([o,a])}}},rt=function(){functiont(t,e){varn,r,i;this.filterContainer=t,this.node=(n=e.get().spinner,r='<?xml version="1.0" encoding="UTF-8"?><svg stroke="'+n.fillColor+'" viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd" stroke-width="2"><circle cx="22" cy="22" r="1"><animate attributeName="r" begin="0s" calcMode="spline" dur="1.8s" keySplines="0.165, 0.84, 0.44, 1" keyTimes="0; 1" repeatCount="indefinite" values="1; 20"/><animate attributeName="stroke-opacity" begin="0s" calcMode="spline" dur="1.8s" keySplines="0.3, 0.61, 0.355, 1" keyTimes="0; 1" repeatCount="indefinite" values="1; 0"/></circle><circle cx="22" cy="22" r="1"><animate attributeName="r" begin="-0.9s" calcMode="spline" dur="1.8s" keySplines="0.165, 0.84, 0.44, 1" keyTimes="0; 1" repeatCount="indefinite" values="1; 20"/><animate attributeName="stroke-opacity" begin="-0.9s" calcMode="spline" dur="1.8s" keySplines="0.3, 0.61, 0.355, 1" keyTimes="0; 1" repeatCount="indefinite" values="1; 0"/></circle></g></svg>',(i=document.createElement("img")).classList.add("Filterizr__spinner"),i.src="data:image/svg+xml;base64,"+window.btoa(r),i.alt="Spinner",i),this.styledNode=newtt(this.node,e),this.initialize()}returnObject.defineProperty(t.prototype,"styles",{get:function(){returnthis.styledNode},enumerable:!0,configurable:!0}),t.prototype.destroy=function(){returnet(this,void0,void0,function(){returnnt(this,function(t){switch(t.label){case0:return[4,this.styles.fadeOut()];case1:returnt.sent(),this.filterContainer.node.removeChild(this.node),[2]}})})},t.prototype.initialize=function(){this.styles.initialize(),this.filterContainer.node.appendChild(this.node)},t}(),it=n(2),ot=n.n(it);functionst(t,e){returnt.reduce(function(t,n){returnt+n.width+e},0)}functionat(t,e){returnt.length?t.reduce(function(t,n){returnt+n.height+e},0):0}varut=function(){return(ut=Object.assign||function(t){for(vare,n=1,r=arguments.length;n<r;n++)for(variine=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);returnt}).apply(this,arguments)},ct=function(){functiont(t){this.init(t)}returnt.prototype.init=function(t){this.root={x:0,y:0,w:t}},t.prototype.fit=function(t){vare,n,r,i=t.length,o=i>0?t[0].h:0;for(this.root.h=o,e=0;e<i;e++)r=t[e],(n=this.findNode(this.root,r.w,r.h))?r.fit=this.splitNode(n,r.w,r.h):r.fit=this.growDown(r.w,r.h)},t.prototype.findNode=function(t,e,n){returnt.used?this.findNode(t.right,e,n)||this.findNode(t.down,e,n):e<=t.w&&n<=t.h?t:null},t.prototype.splitNode=function(t,e,n){returnt.used=!0,t.down={x:t.x,y:t.y+n,w:t.w,h:t.h-n},t.right={x:t.x+e,y:t.y,w:t.w-e,h:n},t},t.prototype.growDown=function(t,e){varn;returnthis.root={used:!0,x:0,y:0,w:this.root.w,h:this.root.h+e,down:{x:0,y:this.root.h,w:this.root.w,h:e},right:this.root},(n=this.findNode(this.root,t,e))?this.splitNode(n,t,e):null},t}(),lt=ot()(function(t,e,n){varr=n.gutterPixels,o=n.layout;if(!e.length)return{containerHeight:0,itemsPositions:[]};switch(o){casei.HORIZONTAL:returnfunction(t,e){return{containerHeight:Math.max.apply(Math,t.map(function(t){returnt.height}))+2*e,itemsPositions:t.map(function(n,r){return{left:st(t.slice(0,r),e),top:0}})}}(e,r);casei.VERTICAL:returnfunction(t,e){return{containerHeight:at(t,e)+e,itemsPositions:t.map(function(n,r){return{left:0,top:at(t.slice(0,r),e)}})}}(e,r);casei.SAME_HEIGHT:returnfunction(t,e,n){varr=e.map(function(t,r){vari=t.width;returne.slice(0,r).reduce(function(t,e){returnt+e.width+2*n},0)+i+n}),i=r.reduce(function(e,n,r){vari,o=Object.keys(e).length;returnut({},e,n>t*o&&((i={})[o]=r,i))},{0:0}),o=e.map(function(o,s){vara=o.height,u=Math.floor(r[s]/t);return{left:e.slice(i[u],s).reduce(function(t,e){returnt+e.width+n},0),top:(a+n)*u}});return{containerHeight:Object.keys(i).length*(e[0].height+n)+n,itemsPositions:o}}(t,e,r);casei.SAME_WIDTH:returnfunction(t,e,n){varr=Math.floor(t/(e[0].width+n)),i=e.map(function(t,i){varo=t.width,s=Math.floor(i/r);return{left:(i-r*s)*(o+n),top:e.slice(0,i).filter(function(t,e){return(i-e)%r==0}).reduce(function(t,e){returnt+e.height+n},0)}}),o=e.reduce(function(t,e,i){varo=e.height,s=Math.floor(i/r);returnt[i-r*s]+=o+n,t},Array.apply(null,Array(r)).map(Number.prototype.valueOf,0));return{containerHeight:Math.max.apply(Math,o)+n,itemsPositions:i}}(t,e,r);casei.PACKED:returnfunction(t,e,n){varr=newct(t),i=e.map(function(t){vare=t.width,r=t.height;return{w:e+n,h:r+n}});r.fit(i);varo=i.map(function(t){vare=t.fit;return{left:e.x,top:e.y}});return{containerHeight:r.root.h+n,itemsPositions:o}}(t,e,r);casei.SAME_SIZE:default:returnfunction(t,e,n){varr=Math.floor(t/(e[0].width+n)),i=e.map(function(t,e){vari=t.width,o=t.height,s=Math.floor(e/r);return{left:(e-r*s)*(i+n),top:s*(o+n)}});return{containerHeight:Math.ceil(e.length/r)*(e[0].height+n)+n,itemsPositions:i}}(t,e,r)}});functionft(t){if(!t)thrownewError("Filterizr as a jQuery plugin, requires jQuery to work. If you would prefer to use the vanilla JS version, please use the correct bundle file.");t.fn.filterizr=function(){vare="."+t.trim(this.get(0).className).replace(/\s+/g,"."),n=arguments;if(!this._fltr&&0===n.length||1===n.length&&"object"==typeofn[0]){varr=n.length>0?n[0]:v;this._fltr=newyt(e,r)}elseif(n.length>=1&&"string"==typeofn[0]){vari=n[0],o=Array.prototype.slice.call(n,1),s=this._fltr;switch(i){case"filter":returns.filter.apply(s,o),this;case"insertItem":returns.insertItem.apply(s,o),this;case"removeItem":returns.removeItem.apply(s,o),this;case"toggleFilter":returns.toggleFilter.apply(s,o),this;case"sort":returns.sort.apply(s,o),this;case"shuffle":returns.shuffle.apply(s,o),this;case"search":returns.search.apply(s,o),this;case"setOptions":returns.setOptions.apply(s,o),this;case"destroy":returns.destroy.apply(s,o),deletethis._fltr,this;default:thrownewError("Filterizr: "+i+" is not part of the Filterizr API. Please refer to the docs for more information.")}}returnthis}}varht=function(t,e,n,r){returnnew(n||(n=Promise))(function(i,o){functions(t){try{u(r.next(t))}catch(t){o(t)}}functiona(t){try{u(r.throw(t))}catch(t){o(t)}}functionu(t){t.done?i(t.value):newn(function(e){e(t.value)}).then(s,a)}u((r=r.apply(t,e||[])).next())})},pt=function(t,e){varn,r,i,o,s={label:0,sent:function(){if(1&i[0])throwi[1];returni[1]},trys:[],ops:[]};returno={next:a(0),throw:a(1),return:a(2)},"function"==typeofSymbol&&(o[Symbol.iterator]=function(){returnthis}),o;functiona(o){returnfunction(a){returnfunction(o){if(n)thrownewTypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)returni;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case0:case1:i=o;break;case4:returns.label++,{value:o[1],done:!1};case5:s.label++,r=o[1],o=[0];continue;case7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throwo[1];return{value:o[0]?o[1]:void0,done:!0}}([o,a])}}},dt=n(1),yt=function(){functiont(t,e){void0===t&&(t=".filtr-container"),void0===e&&(e={}),this.options=newb(e);varn=this.options,r=n.areControlsEnabled,i=n.controlsSelector,o=n.isSpinnerEnabled;this.windowEventReceiver=newy(window),this.filterContainer=newJ(c(t),this.options),this.imagesHaveLoaded=!this.filterContainer.node.querySelectorAll("img").length,r&&(this.filterControls=neww(this,i)),o&&(this.spinner=newrt(this.filterContainer,this.options)),this.initialize()}returnObject.defineProperty(t.prototype,"filterItems",{get:function(){returnthis.filterContainer.filterItems},enumerable:!0,configurable:!0}),t.prototype.filter=function(t){vare=this.filterContainer;e.trigger("filteringStart"),e.filterizrState=r.FILTERING,t=Array.isArray(t)?t.map(function(t){returnt.toString()}):t.toString(),this.options.filter=t,this.render()},t.prototype.destroy=function(){vart=this.windowEventReceiver,e=this.filterControls;this.filterContainer.destroy(),t.destroy(),this.options.areControlsEnabled&&e&&e.destroy()},t.prototype.insertItem=function(t){returnht(this,void0,void0,function(){returnpt(this,function(e){switch(e.label){case0:returnthis.filterContainer.insertItem(t),[4,this.waitForImagesToLoad()];case1:returne.sent(),this.render(),[2]}})})},t.prototype.removeItem=function(t){this.filterContainer.removeItem(t),this.render()},t.prototype.sort=function(t,e){void0===t&&(t="index"),void0===e&&(e="asc");varn=this.filterContainer,i=this.filterItems;n.trigger("sortingStart"),n.filterizrState=r.SORTING,i.sort(t,e),this.render()},t.prototype.search=function(t){void0===t&&(t=this.options.get().searchTerm),this.options.searchTerm=t.toLowerCase(),this.render()},t.prototype.shuffle=function(){vart=this.filterContainer,e=this.filterItems;t.trigger("shufflingStart"),t.filterizrState=r.SHUFFLING,e.shuffle(),this.render()},t.prototype.setOptions=function(t){vare=this.filterContainer,n=this.filterItems,r="animationDuration"int||"delay"int||"delayMode"int;(t.callbacks||r)&&e.unbindEvents(),this.options.set(t),(t.easing||r)&&n.styles.updateTransitionStyle(),(t.callbacks||r)&&e.bindEvents(),"searchTerm"int&&this.search(t.searchTerm),("filter"int||"multifilterLomultifilterLogicalOperator"int)&&this.filter(this.options.filter),"gutterPixels"int&&(this.filterContainer.styles.updatePaddings(),this.filterItems.styles.updateWidthWithTransitionsDisabled(),this.render())},t.prototype.toggleFilter=function(t){this.options.toggleFilter(t),this.filter(this.options.filter)},t.prototype.render=function(){vart=this.filterContainer,e=this.filterItems,n=this.options,r=e.getFiltered(n.filter);e.styles.resetDisplay(),e.getFilteredOut(n.filter).forEach(function(t){t.filterOut()});vari=lt(t.dimensions.width,r.map(function(t){returnt.dimensions}),this.options.get()),o=i.containerHeight,s=i.itemsPositions;t.setHeight(o),r.forEach(function(t,e){t.filterIn(s[e])})},t.prototype.initialize=function(){returnht(this,void0,void0,function(){vart,e,n,r;returnpt(this,function(i){switch(i.label){case0:returne=(t=this).filterContainer,n=t.filterItems,r=t.spinner,this.bindEvents(),[4,this.waitForImagesToLoad()];case1:returni.sent(),this.options.isSpinnerEnabled?[4,r.destroy()]:[3,3];case2:i.sent(),i.label=3;case3:returnthis.render(),[4,n.styles.enableTransitions()];case4:returni.sent(),e.trigger("init"),[2]}})})},t.prototype.bindEvents=function(){vart=this,e=this.filterItems;this.windowEventReceiver.on("resize",a(function(){e.styles.updateWidthWithTransitionsDisabled(),t.render()},50,!1))},t.prototype.waitForImagesToLoad=function(){returnht(this,void0,void0,function(){vart,e,n,r=this;returnpt(this,function(i){returne=(t=this).imagesHaveLoaded,n=t.filterContainer,e?[2,Promise.resolve()]:[2,newPromise(function(t){dt(n.node,function(){r.imagesHaveLoaded=!0,t()})})]})})},t.FilterContainer=J,t.FilterItem=N,t.defaultOptions=v,t.installAsJQueryPlugin=ft,t}();n.d(e,"a",function(){returnyt})},function(t,e,n){varr,i;!function(o,s){"use strict";r=[n(3)],void0===(i=function(t){returnfunction(t,e){varn=t.jQuery,r=t.console;functioni(t,e){for(varnine)t[n]=e[n];returnt}varo=Array.prototype.slice;functions(t,e,a){if(!(thisinstanceofs))returnnews(t,e,a);varu=t;"string"==typeoft&&(u=document.querySelectorAll(t)),u?(this.elements=function(t){if(Array.isArray(t))returnt;if("object"==typeoft&&"number"==typeoft.length)returno.call(t);return[t]}(u),this.options=i({},this.options),"function"==typeofe?a=e:i(this.options,e),a&&this.on("always",a),this.getImages(),n&&(this.jqDeferred=newn.Deferred),setTimeout(this.check.bind(this))):r.error("Bad element for imagesLoaded "+(u||t))}s.prototype=Object.create(e.prototype),s.prototype.options={},s.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},s.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);vare=t.nodeType;if(e&&a[e]){for(varn=t.querySelectorAll("img"),r=0;r<n.length;r++){vari=n[r];this.addImage(i)}if("string"==typeofthis.options.background){varo=t.querySelectorAll(this.options.background);for(r=0;r<o.length;r++){vars=o[r];this.addElementBackgroundImages(s)}}}};vara={1:!0,9:!0,11:!0};functionu(t){this.img=t}functionc(t,e){this.url=t,this.element=e,this.img=newImage}returns.prototype.addElementBackgroundImages=function(t){vare=getComputedStyle(t);if(e)for(varn=/url\((['"])?(.*?)\1\)/gi,r=n.exec(e.backgroundImage);null!==r;){vari=r&&r[2];i&&this.addBackground(i,t),r=n.exec(e.backgroundImage)}},s.prototype.addImage=function(t){vare=newu(t);this.images.push(e)},s.prototype.addBackground=function(t,e){varn=newc(t,e);this.images.push(n)},s.prototype.check=function(){vart=this;functione(e,n,r){setTimeout(function(){t.progress(e,n,r)})}this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?this.images.forEach(function(t){t.once("progress",e),t.check()}):this.complete()},s.prototype.progress=function(t,e,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&r&&r.log("progress: "+n,t,e)},s.prototype.complete=function(){vart=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){vare=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[e](this)}},u.prototype=Object.create(e.prototype),u.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=newImage,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.src)},u.prototype.getIsImageComplete=function(){returnthis.img.complete&&this.img.naturalWidth},u.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.img,e])},u.prototype.handleEvent=function(t){vare="on"+t.type;this[e]&&this[e](t)},u.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},u.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},u.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},c.prototype=Object.create(u.prototype),c.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},c.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},c.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},s.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&((n=e).fn.imagesLoaded=function(t,e){returnnews(this,t,e).jqDeferred.promise(n(this))})},s.makeJQueryPlugin(),s}(o,t)}.apply(e,r))||(t.exports=i)}("undefined"!=typeofwindow?window:this)},function(t,e){functionn(t,e,n,r){vari,o=null==(i=r)||"number"==typeofi||"boolean"==typeofi?r:n(r),s=e.get(o);returnvoid0===s&&(s=t.call(this,r),e.set(o,s)),s}functionr(t,e,n){varr=Array.prototype.slice.call(arguments,3),i=n(r),o=e.get(i);returnvoid0===o&&(o=t.apply(this,r),e.set(i,o)),o}functioni(t,e,n,r,i){returnn.bind(e,t,r,i)}functiono(t,e){returni(t,this,1===t.length?n:r,e.cache.create(),e.serializer)}functions(){returnJSON.stringify(arguments)}functiona(){this.cache=Object.create(null)}a.prototype.has=function(t){returntinthis.cache},a.prototype.get=function(t){returnthis.cache[t]},a.prototype.set=function(t,e){this.cache[t]=e};varu={create:function(){returnnewa}};t.exports=function(t,e){varn=e&&e.cache?e.cache:u,r=e&&e.serializer?e.serializer:s;return(e&&e.strategy?e.strategy:o)(t,{cache:n,serializer:r})},t.exports.strategies={variadic:function(t,e){returni(t,this,r,e.cache.create(),e.serializer)},monadic:function(t,e){returni(t,this,n,e.cache.create(),e.serializer)}}},function(t,e,n){varr,i;"undefined"!=typeofwindow&&window,void0===(i="function"==typeof(r=function(){"use strict";functiont(){}vare=t.prototype;returne.on=function(t,e){if(t&&e){varn=this._events=this._events||{},r=n[t]=n[t]||[];return-1==r.indexOf(e)&&r.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);varn=this._onceEvents=this._onceEvents||{};return(n[t]=n[t]||{})[e]=!0,this}},e.off=function(t,e){varn=this._events&&this._events[t];if(n&&n.length){varr=n.indexOf(e);return-1!=r&&n.splice(r,1),this}},e.emitEvent=function(t,e){varn=this._events&&this._events[t];if(n&&n.length){n=n.slice(0),e=e||[];for(varr=this._onceEvents&&this._onceEvents[t],i=0;i<n.length;i++){varo=n[i];r&&r[o]&&(this.off(t,o),deleter[o]),o.apply(this,e)}returnthis}},e.allOff=function(){deletethis._events,deletethis._onceEvents},t})?r.call(e,n,e,t):r)||(t.exports=i)},,function(t,e,n){"use strict";n.r(e);varr=n(0);n.d(e,"default",function(){returnr.a})}]).default;// simplelightbox 1.12.0 https://github.com/andreknieriem/simplelightbox!function(t,e,i,n){"use strict";t.fn.simpleLightbox=function(n){vara,n=t.extend({sourceAttr:"href",overlay:!0,spinner:!0,nav:!0,navText:["‹","›"],captions:!0,captionDelay:0,captionSelector:"img",captionType:"attr",captionsData:"title",captionPosition:"bottom",captionClass:"",close:!0,closeText:"×",swipeClose:!0,showCounter:!0,fileExt:"png|jpg|jpeg|gif",animationSlide:!0,animationSpeed:250,preloading:!0,enableKeyboard:!0,loop:!0,rel:!1,docClose:!0,swipeTolerance:50,className:"simple-lightbox",widthRatio:.8,heightRatio:.9,disableRightClick:!1,disableScroll:!0,alertError:!0,alertErrorMessage:"Image not found, next image will be loaded",additionalHtml:!1,history:!0},n),o=(e.navigator.pointerEnabled||e.navigator.msPointerEnabled,0),s=0,l=t(),r=function(){vart=i.body||i.documentElement;returnt=t.style,""===t.WebkitTransition?"-webkit-":""===t.MozTransition?"-moz-":""===t.OTransition?"-o-":""===t.transition&&""},c=!1,p=[],d=n.rel&&!1!==n.rel?function(e,i){returnt(i.selector).filter(function(){returnt(this).attr("rel")===e})}(n.rel,this):this,h=0,g=!1!==(r=r()),u="pushState"inhistory,f=!1,m=e.location,v=function(){returnm.hash.substring(1)},b=v(),x=function(){v();vart="pid="+(D+1),e=m.href.split("#")[0]+"#"+t;u?history[f?"replaceState":"pushState"]("",i.title,e):f?m.replace(e):m.hash=t,f=!0},y=function(){u?history.pushState("",i.title,m.pathname+m.search):m.hash="",clearTimeout(a)},w=function(){f?a=setTimeout(x,800):x()},E="simplelb",C=t("<div>").addClass("sl-overlay"),T=t("<button>").addClass("sl-close").html(n.closeText),S=t("<div>").addClass("sl-spinner").html("<div></div>"),k=t("<div>").addClass("sl-navigation").html('<button class="sl-prev">'+n.navText[0]+'</button><button class="sl-next">'+n.navText[1]+"</button>"),I=t("<div>").addClass("sl-counter").html('<span class="sl-current"></span>/<span class="sl-total"></span>'),q=!1,D=0,M=t("<div>").addClass("sl-caption "+n.captionClass+" pos-"+n.captionPosition),A=t("<div>").addClass("sl-image"),R=t("<div>").addClass("sl-wrapper").addClass(n.className),O=function(e){if(!n.fileExt)return!0;vari=/\.([0-9a-z]+)(?=[?#])|(\.)(?:[\w]+)$/gim,a=t(e).attr(n.sourceAttr).match(i);returna&&"a"==t(e).prop("tagName").toLowerCase()&&newRegExp(".("+n.fileExt+")$","i").test(a)},P=function(e){e.trigger(t.Event("show.simplelightbox")),n.disableScroll&&(h=K("hide")),R.appendTo("body"),A.appendTo(R),n.overlay&&C.appendTo(t("body")),q=!0,D=d.index(e),l=t("<img/>").hide().attr("src",e.attr(n.sourceAttr)),-1==p.indexOf(e.attr(n.sourceAttr))&&p.push(e.attr(n.sourceAttr)),A.html("").attr("style",""),l.appendTo(A),X(),C.fadeIn("fast"),t(".sl-close").fadeIn("fast"),S.show(),k.fadeIn("fast"),t(".sl-wrapper .sl-counter .sl-current").text(D+1),I.fadeIn("fast"),z(),n.preloading&&Y(),setTimeout(function(){e.trigger(t.Event("shown.simplelightbox"))},n.animationSpeed)},z=function(i){if(l.length){vara=newImage,o=t(e).width()*n.widthRatio,s=t(e).height()*n.heightRatio;a.src=l.attr("src"),t(a).bind("error",function(e){d.eq(D).trigger(t.Event("error.simplelightbox")),q=!1,c=!0,S.hide(),n.alertError&&alert(n.alertErrorMessage),j(1==i||-1==i?i:1)}),a.onload=function(){void0!==i&&d.eq(D).trigger(t.Event("changed.simplelightbox")).trigger(t.Event((1===i?"nextDone":"prevDone")+".simplelightbox")),n.history&&w(),-1==p.indexOf(l.attr("src"))&&p.push(l.attr("src"));varr=a.width,u=a.height;if(r>o||u>s){varf=r/u>o/s?r/o:u/s;r/=f,u/=f}t(".sl-image").css({top:(t(e).height()-u)/2+"px",left:(t(e).width()-r-h)/2+"px"}),S.hide(),l.css({width:r+"px",height:u+"px"}).fadeIn("fast"),c=!0;varm,v="self"==n.captionSelector?d.eq(D):d.eq(D).find(n.captionSelector);if(m="data"==n.captionType?v.data(n.captionsData):"text"==n.captionType?v.html():v.prop(n.captionsData),n.loop||(0===D&&t(".sl-prev").hide(),D>=d.length-1&&t(".sl-next").hide(),D>0&&t(".sl-prev").show(),D<d.length-1&&t(".sl-next").show()),1==d.length&&t(".sl-prev, .sl-next").hide(),1==i||-1==i){varb={opacity:1};n.animationSlide&&(g?(W(0,100*i+"px"),setTimeout(function(){W(n.animationSpeed/1e3,"0px")},50)):b.left=parseInt(t(".sl-image").css("left"))+100*i+"px"),t(".sl-image").animate(b,n.animationSpeed,function(){q=!1,L(m)})}elseq=!1,L(m);n.additionalHtml&&0===t(".sl-additional-html").length&&t("<div>").html(n.additionalHtml).addClass("sl-additional-html").appendTo(t(".sl-image"))}}},L=function(e){""!==e&&void0!==e&&n.captions&&M.html(e).hide().appendTo(t(".sl-image")).delay(n.captionDelay).fadeIn("fast")},W=function(e,i){varn={};n[r+"transform"]="translateX("+i+")",n[r+"transition"]=r+"transform "+e+"s linear",t(".sl-image").css(n)},X=function(){t(e).on("resize."+E,z),t(i).on("click.simplelb touchstart."+E,".sl-close",function(t){t.preventDefault(),c&&H()}),n.history&&setTimeout(function(){t(e).on("hashchange."+E,function(){c&&v()===b&&H()})},40),k.on("click."+E,"button",function(e){e.preventDefault(),o=0,j(t(this).hasClass("sl-next")?1:-1)});vara=0,l=0,r=0,p=0,h=!1,u=0;A.on("touchstart.simplelb mousedown."+E,function(t){return!!h||(g&&(u=parseInt(A.css("left"))),h=!0,a=t.originalEvent.pageX||t.originalEvent.touches[0].pageX,r=t.originalEvent.pageY||t.originalEvent.touches[0].pageY,!1)}).on("touchmove.simplelb mousemove.simplelb pointermove MSPointerMove",function(t){if(!h)return!0;t.preventDefault(),l=t.originalEvent.pageX||t.originalEvent.touches[0].pageX,p=t.originalEvent.pageY||t.originalEvent.touches[0].pageY,o=a-l,s=r-p,n.animationSlide&&(g?W(0,-o+"px"):A.css("left",u-o+"px"))}).on("touchend.simplelb mouseup.simplelb touchcancel.simplelb mouseleave.simplelb pointerup pointercancel MSPointerUp MSPointerCancel",function(t){if(h){h=!1;vare=!0;n.loop||(0===D&&o<0&&(e=!1),D>=d.length-1&&o>0&&(e=!1)),Math.abs(o)>n.swipeTolerance&&e?j(o>0?1:-1):n.animationSlide&&(g?W(n.animationSpeed/1e3,"0px"):A.animate({left:u+"px"},n.animationSpeed/2)),n.swipeClose&&Math.abs(s)>50&&Math.abs(o)<n.swipeTolerance&&H()}})},N=function(){k.off("click","button"),t(i).off("click."+E,".sl-close"),t(e).off("resize."+E),t(e).off("hashchange."+E)},Y=function(){vare=D+1<0?d.length-1:D+1>=d.length-1?0:D+1,i=D-1<0?d.length-1:D-1>=d.length-1?0:D-1;t("<img />").attr("src",d.eq(e).attr(n.sourceAttr)).on("load",function(){-1==p.indexOf(t(this).attr("src"))&&p.push(t(this).attr("src")),d.eq(D).trigger(t.Event("nextImageLoaded.simplelightbox"))}),t("<img />").attr("src",d.eq(i).attr(n.sourceAttr)).on("load",function(){-1==p.indexOf(t(this).attr("src"))&&p.push(t(this).attr("src")),d.eq(D).trigger(t.Event("prevImageLoaded.simplelightbox"))})},j=function(e){d.eq(D).trigger(t.Event("change.simplelightbox")).trigger(t.Event((1===e?"next":"prev")+".simplelightbox"));vari=D+e;if(!(q||(i<0||i>=d.length)&&!1===n.loop)){D=i<0?d.length-1:i>d.length-1?0:i,t(".sl-wrapper .sl-counter .sl-current").text(D+1);vara={opacity:0};n.animationSlide&&(g?W(n.animationSpeed/1e3,-100*e-o+"px"):a.left=parseInt(t(".sl-image").css("left"))+-100*e+"px"),t(".sl-image").animate(a,n.animationSpeed,function(){setTimeout(function(){vari=d.eq(D);l.attr("src",i.attr(n.sourceAttr)),-1==p.indexOf(i.attr(n.sourceAttr))&&S.show(),t(".sl-caption").remove(),z(e),n.preloading&&Y()},100)})}},H=function(){if(!q){vare=d.eq(D),i=!1;e.trigger(t.Event("close.simplelightbox")),n.history&&y(),t(".sl-image img, .sl-overlay, .sl-close, .sl-navigation, .sl-image .sl-caption, .sl-counter").fadeOut("fast",function(){n.disableScroll&&K("show"),t(".sl-wrapper, .sl-overlay").remove(),N(),i||e.trigger(t.Event("closed.simplelightbox")),i=!0}),l=t(),c=!1,q=!1}},K=function(n){vara=0;if("hide"==n){varo=e.innerWidth;if(!o){vars=i.documentElement.getBoundingClientRect();o=s.right-Math.abs(s.left)}if(i.body.clientWidth<o){varl=i.createElement("div"),r=parseInt(t("body").css("padding-right"),10);l.className="sl-scrollbar-measure",t("body").append(l),a=l.offsetWidth-l.clientWidth,t(i.body)[0].removeChild(l),t("body").data("padding",r),a>0&&t("body").addClass("hidden-scroll").css({"padding-right":r+a})}}elset("body").removeClass("hidden-scroll").css({"padding-right":t("body").data("padding")});returna};returnn.close&&T.appendTo(R),n.showCounter&&d.length>1&&(I.appendTo(R),I.find(".sl-total").text(d.length)),n.nav&&k.appendTo(R),n.spinner&&S.appendTo(R),d.on("click."+E,function(e){if(O(this)){if(e.preventDefault(),q)return!1;P(t(this))}}),t(i).on("click.simplelb touchstart."+E,function(e){c&&n.docClose&&0===t(e.target).closest(".sl-image").length&&0===t(e.target).closest(".sl-navigation").length&&H()}),n.disableRightClick&&t(i).on("contextmenu",".sl-image img",function(t){return!1}),n.enableKeyboard&&t(i).on("keyup."+E,function(t){if(o=0,c){t.preventDefault();vare=t.keyCode;27==e&&H(),37!=e&&39!=t.keyCode||j(39==t.keyCode?1:-1)}}),this.open=function(e){e=e||t(this[0]),P(e)},this.next=function(){j(1)},this.prev=function(){j(-1)},this.close=function(){H()},this.destroy=function(){t(i).unbind("click."+E).unbind("keyup."+E),H(),t(".sl-overlay, .sl-wrapper").remove(),this.off("click")},this.refresh=function(){this.destroy(),t(this).simpleLightbox(n)},this}}(jQuery,window,document);$(document).ready(function(){// make galleries invisible until photos are loaded$('.photography-gallery').css('visibility','hidden');$('.graphic-design-gallery').css('visibility','hidden');$('.filtr-controls').after('<div class="filtr-loading"></div>');// filter settings for separate galleriesconstph_filter_end=function(){// only visible itemsvarphGall=$('.active.ph-control').attr('data-filter');$('.photography-gallery .filtr-item').each(function(){if($(this).css('opacity')!=0){$(this).find('a').attr('data-simplelightbox',phGall);}else{$(this).find('a').removeAttr('data-simplelightbox');}});varphlightbox=$('a[data-simplelightbox="'+phGall+'"]').simpleLightbox({showCounter : false,history : false,captionType : 'data',captionsData : 'caption'});phlightbox.refresh();console.log("PH-lightbox init");}constgd_filter_end=function(){// only visible itemsvargdGall=$('.active.gd-control').attr('data-filter');$('.graphic-design-gallery .filtr-item').each(function(){// console.log("avem GD");if($(this).css('opacity')!=0){$(this).find('a').attr('data-simplelightbox',gdGall);}else{$(this).find('a').removeAttr('data-simplelightbox');}});vargdlightbox=$('a[data-simplelightbox="'+gdGall+'"]').simpleLightbox({showCounter : false,history : false,captionType : 'data',captionsData : 'caption'});gdlightbox.refresh();console.log("GD-lightbox init");}$('.photography-gallery').imagesLoaded(function(){console.log("PH IMAGES LOADED");// make the gallery visible after images are finished loading$('.photography-gallery').css('visibility','visible');$('.filtr-loading').remove();// active class for controls// this way, categories stay selected in both galleries$('.photography-gallery .filtr-controls').on('click','span',function(){$('.photography-gallery .filtr-controls').find('span').removeClass('active');$(this).addClass('active');});// init filter settingsvarphFilterizd=newFilterizr('.ph-images',{controlsSelector: '.ph-control',layout: "sameWidth",callbacks: {onFilteringEnd: ph_filter_end()},setupControls: false});// ###################### CUSTOM FILTERS ########################// # DEFINE CUSTOM FILTERS TO CONTROL BOTH GALLERIES SEPARATELY #// ##############################################################// ~~~~~~~ PHOTOGRAPHY ~~~~~~~$('#filtr-all-ph').click(function(){phFilterizd.filter('all');});$('#filtr-portraits').click(function(){phFilterizd.filter('portret');});$('#filtr-landscapes').click(function(){phFilterizd.filter('land');});$('#nightPhotography').click(function(){phFilterizd.filter('night');});$('#filtr-black-white').click(function(){phFilterizd.filter('BW');});$('#filtr-others').click(function(){phFilterizd.filter('other');});});$('.graphic-design-gallery').imagesLoaded(function(){console.log("GD IMAGES LOADED");// make the gallery visible after images are finished loading$('.graphic-design-gallery').css('visibility','visible');$('.filtr-loading').remove();// active class for controls// this way, categories stay selected in both galleries$('.graphic-design-gallery .filtr-controls').on('click','span',function(){$('.graphic-design-gallery .filtr-controls').find('span').removeClass('active');$(this).addClass('active');});// init filter settingsvargdFilterizd=newFilterizr('.gd-images',{controlsSelector: '.gd-control',layout: "sameWidth",callbacks: {onFilteringEnd: gd_filter_end()},setupControls: false});// ###################### CUSTOM FILTERS ########################// # DEFINE CUSTOM FILTERS TO CONTROL BOTH GALLERIES SEPARATELY #// ##############################################################// ~~~~~~ GRAPHIC DESIGN ~~~~~~$('#filtr-all-gd').click(function(){gdFilterizd.filter('all');});$('#filtr-logos').click(function(){gdFilterizd.filter('logo');});$('#filtr-album-covers').click(function(){gdFilterizd.filter('cover');});$('#filtr-posters').click(function(){gdFilterizd.filter('poster');});$('#filtr-for-fun').click(function(){gdFilterizd.filter('fun');});});});
I solved the issue by bypassing it with some basic "display":"none" and "display":"block" css and click triggers to hide/show the galleries when the tab buttons are clicked.
It's a good solution and I'm happy with it, but I would still like to know why this was happening :/
@FrogMustang this is just theorizing, but it must mean that calculated height from the tab is 0 at the time when the script runs from the first time. It may need the height of the parent container to calculate the layout.
Filterizr version
Which version of Filterizr do you have installed in your project?
I'm using v2.2.4
Describe the issue in details
I'm using bootstrap tabs with 2 galleries that are independent. Both galleries use the same script (the vanilla version) and they have custom filters. Everything works well when they are in the same tab, but a weird error occurs when I try to put them in separate ones.
The error
The HTML code
The JS code
The CSS
Any ideas why this is happening? Maybe something in the bootstrap Tabs is messing with it.
The text was updated successfully, but these errors were encountered: