/**
 * JS Object to manipulate and reorder a grid
 * @param {int} maxWidth max column width
 * @since 2.0.0
 */
function IndexedGrid(i){i=void 0!==i?i:12,this.grid=[],this.maxWidth=i}IndexedGrid.prototype.insertionSort=function(){for(var i=this.grid.length,r=1;r<i;r++){for(var t=this.grid[r],d=r-1;0<=d&&this.grid[d]>t;d--)this.grid[d+1]=this.grid[d];this.grid[d+1]=t}},IndexedGrid.prototype.setGrid=function(i,r,t,d){for(var h=0;h<d;h++)for(var o=0;o<t;o++)this.grid.push(i+o+(r+h)*this.maxWidth);this.insertionSort()},IndexedGrid.prototype.checkGrid=function(i){for(var r=0;this.grid[r]<i;){var t=this.grid[r];if(t+1!==this.grid[r+1])for(var d=t+1;d<this.grid[r+1];d++)this.grid.push(d);r++}this.insertionSort()},IndexedGrid.prototype.willFit=function(i,r){if(0==this.grid.length)return 0;for(var t=this.findHoles(),d=0,h=t.length;d<h;d++){var o=t[d],e=t[d]+1;if(void 0!==o&&void 0!==e)for(var s=this.grid[o]+1;s<this.grid[e];s++)if(this.searchFreeSpace(s,i,r))return s}for(var n=this.grid[this.grid.length-1]+1,f=Math.floor(n/this.maxWidth),a=Math.floor((n+(i-1))/this.maxWidth);f!==a;)n+=1,f=Math.floor(n/this.maxWidth),a=Math.floor((n+(i-1))/this.maxWidth);return n},IndexedGrid.prototype.findHoles=function(){for(var i=[],r=0,t=this.grid.length;r<t;r++)void 0!==this.grid[r+1]&&this.grid[r]+1===this.grid[r+1]||i.push(r);return i},IndexedGrid.prototype.searchFreeSpace=function(i,r,t){if(Math.floor(i/this.maxWidth)!==Math.floor((i+r-1)/this.maxWidth))return!1;for(var d=0;d<t;d++)for(var h=0;h<r;h++){var o=i+h+d*this.maxWidth;if(-1!==this.grid.indexOf(o))return!1}return!0},IndexedGrid.prototype.negativeGrid=function(){for(var i=[],r=0,t=this.grid.length;r<t;r++)if(this.grid[r]+1!==this.grid[r+1])for(var d=this.grid[r]+1;d<this.grid[r+1];d++)i.push(d);return i};
/**
 * Copyright 2016 Google Inc. All Rights Reserved.
 *
 * Licensed under the W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE.
 *
 *  https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
 *
 */
!function(){"use strict";var d,e;function c(t){this.time=t.time,this.target=t.target,this.rootBounds=t.rootBounds,this.boundingClientRect=t.boundingClientRect,this.intersectionRect=t.intersectionRect||i(),this.isIntersecting=!!t.intersectionRect;var t=this.boundingClientRect,t=t.width*t.height,e=this.intersectionRect,e=e.width*e.height;this.intersectionRatio=t?Number((e/t).toFixed(4)):this.isIntersecting?1:0}function t(t,e){var n,o,i,e=e||{};if("function"!=typeof t)throw new Error("callback must be a function");if(e.root&&1!=e.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),o=this.THROTTLE_TIMEOUT,i=null,function(){i=i||setTimeout(function(){n(),i=null},o)}),this._callback=t,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(e.rootMargin),this.thresholds=this._initThresholds(e.threshold),this.root=e.root||null,this.rootMargin=this._rootMarginValues.map(function(t){return t.value+t.unit}).join(" ")}function n(t,e,n,o){"function"==typeof t.addEventListener?t.addEventListener(e,n,o||!1):"function"==typeof t.attachEvent&&t.attachEvent("on"+e,n)}function o(t,e,n,o){"function"==typeof t.removeEventListener?t.removeEventListener(e,n,o||!1):"function"==typeof t.detatchEvent&&t.detatchEvent("on"+e,n)}function l(t){var e;try{e=t.getBoundingClientRect()}catch(t){}return e?e.width&&e.height?e:{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}:i()}function i(){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}function r(t,e){for(var n=e;n;){if(n==t)return!0;n=p(n)}return!1}function p(t){t=t.parentNode;return t&&11==t.nodeType&&t.host?t.host:t&&t.assignedSlot?t.assignedSlot.parentNode:t}"object"==typeof window&&("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype?"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return 0<this.intersectionRatio}}):(d=window.document,e=[],t.prototype.THROTTLE_TIMEOUT=100,t.prototype.POLL_INTERVAL=null,t.prototype.USE_MUTATION_OBSERVER=!0,t.prototype.observe=function(e){var t=this._observationTargets.some(function(t){return t.element==e});if(!t){if(!e||1!=e.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections(),this._checkForIntersections()}},t.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter(function(t){return t.element!=e}),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},t.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},t.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},t.prototype._initThresholds=function(t){t=t||[0];return(t=Array.isArray(t)?t:[t]).sort().filter(function(t,e,n){if("number"!=typeof t||isNaN(t)||t<0||1<t)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==n[e-1]})},t.prototype._parseRootMargin=function(t){t=(t||"0px").split(/\s+/).map(function(t){t=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(t)return{value:parseFloat(t[1]),unit:t[2]};throw new Error("rootMargin must be specified in pixels or percent")});return t[1]=t[1]||t[0],t[2]=t[2]||t[0],t[3]=t[3]||t[1],t},t.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(n(window,"resize",this._checkForIntersections,!0),n(d,"scroll",this._checkForIntersections,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in window&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(d,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},t.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,o(window,"resize",this._checkForIntersections,!0),o(d,"scroll",this._checkForIntersections,!0),this._domObserver)&&(this._domObserver.disconnect(),this._domObserver=null)},t.prototype._checkForIntersections=function(){var s=this._rootIsInDom(),h=s?this._getRootRect():i();this._observationTargets.forEach(function(t){var e=t.element,n=l(e),o=this._rootContainsTarget(e),i=t.entry,r=s&&o&&this._computeTargetAndRootIntersection(e,h),t=t.entry=new c({time:window.performance&&performance.now&&performance.now(),target:e,boundingClientRect:n,rootBounds:h,intersectionRect:r});i?s&&o?this._hasCrossedThreshold(i,t)&&this._queuedEntries.push(t):i&&i.isIntersecting&&this._queuedEntries.push(t):this._queuedEntries.push(t)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},t.prototype._computeTargetAndRootIntersection=function(t,e){if("none"!=window.getComputedStyle(t).display){for(var n,o,i,r,s=l(t),h=p(t),c=!1;!c;){var u=null,a=1==h.nodeType?window.getComputedStyle(h):{};if("none"==a.display)return;if(h==this.root||h==d?(c=!0,u=e):h!=d.body&&h!=d.documentElement&&"visible"!=a.overflow&&(u=l(h)),u&&(a=u,u=s,r=i=o=n=void 0,n=Math.max(a.top,u.top),o=Math.min(a.bottom,u.bottom),i=Math.max(a.left,u.left),a=Math.min(a.right,u.right),r=o-n,!(s=0<=(u=a-i)&&0<=r&&{top:n,bottom:o,left:i,right:a,width:u,height:r})))break;h=p(h)}return s}},t.prototype._getRootRect=function(){var t,e;return e=this.root?l(this.root):(e=d.documentElement,t=d.body,{top:0,left:0,right:e.clientWidth||t.clientWidth,width:e.clientWidth||t.clientWidth,bottom:e.clientHeight||t.clientHeight,height:e.clientHeight||t.clientHeight}),this._expandRectByRootMargin(e)},t.prototype._expandRectByRootMargin=function(n){var t=this._rootMarginValues.map(function(t,e){return"px"==t.unit?t.value:t.value*(e%2?n.width:n.height)/100}),t={top:n.top-t[0],right:n.right+t[1],bottom:n.bottom+t[2],left:n.left-t[3]};return t.width=t.right-t.left,t.height=t.bottom-t.top,t},t.prototype._hasCrossedThreshold=function(t,e){var n=t&&t.isIntersecting?t.intersectionRatio||0:-1,o=e.isIntersecting?e.intersectionRatio||0:-1;if(n!==o)for(var i=0;i<this.thresholds.length;i++){var r=this.thresholds[i];if(r==n||r==o||r<n!=r<o)return!0}},t.prototype._rootIsInDom=function(){return!this.root||r(d,this.root)},t.prototype._rootContainsTarget=function(t){return r(this.root||d,t)},t.prototype._registerInstance=function(){e.indexOf(this)<0&&e.push(this)},t.prototype._unregisterInstance=function(){var t=e.indexOf(this);-1!=t&&e.splice(t,1)},window.IntersectionObserver=t,window.IntersectionObserverEntry=c))}();
!function(e){"use strict";function r(e,n){var t=/[^\w\-.:]/.test(e)?new Function(r.arg+",tmpl","var _e=tmpl.encode"+r.helper+",_s='"+e.replace(r.regexp,r.func)+"';return _s;"):r.cache[e]=r.cache[e]||r(r.load(e));return n?t(n,r):function(e){return t(e,r)}}r.cache={},r.load=function(e){return document.getElementById(e).innerHTML},r.regexp=/([\s'\\])(?!(?:[^{]|\{(?!%))*%\})|(?:\{%(=|#)([\s\S]+?)%\})|(\{%)|(%\})/g,r.func=function(e,n,t,r,c,u){return n?{"\n":"\\n","\r":"\\r","\t":"\\t"," ":" "}[n]||"\\"+n:t?"="===t?"'+_e("+r+")+'":"'+("+r+"==null?'':"+r+")+'":c?"';":u?"_s+='":void 0},r.encReg=/[<>&"'\x00]/g,r.encMap={"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;","'":"&#39;"},r.encode=function(e){return(null==e?"":""+e).replace(r.encReg,function(e){return r.encMap[e]||""})},r.arg="o",r.helper=",print=function(s,e){_s+=e?(s==null?'':s):_e(s);},include=function(s,d){_s+=tmpl(s,d);}","function"==typeof define&&define.amd?define(function(){return r}):"object"==typeof module&&module.exports?module.exports=r:e.tmpl=r}(this);
/*! PhotoSwipe - v4.1.3 - 2019-01-08
* http://photoswipe.com
* Copyright (c) 2019 Dmitry Semenov; */
!function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.PhotoSwipe=t()}(this,function(){"use strict";return function(m,z,t,_){var p={features:null,bind:function(e,t,n,i){var o=(i?"remove":"add")+"EventListener";t=t.split(" ");for(var a=0;a<t.length;a++)t[a]&&e[o](t[a],n,!1)},isArray:function(e){return e instanceof Array},createEl:function(e,t){t=document.createElement(t||"div");return e&&(t.className=e),t},getScrollY:function(){var e=window.pageYOffset;return void 0!==e?e:document.documentElement.scrollTop},unbind:function(e,t,n){p.bind(e,t,n,!0)},removeClass:function(e,t){t=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(t," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")},addClass:function(e,t){p.hasClass(e,t)||(e.className+=(e.className?" ":"")+t)},hasClass:function(e,t){return e.className&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(e.className)},getChildByClass:function(e,t){for(var n=e.firstChild;n;){if(p.hasClass(n,t))return n;n=n.nextSibling}},arraySearch:function(e,t,n){for(var i=e.length;i--;)if(e[i][n]===t)return i;return-1},extend:function(e,t,n){for(var i in t)if(t.hasOwnProperty(i)){if(n&&e.hasOwnProperty(i))continue;e[i]=t[i]}},easing:{sine:{out:function(e){return Math.sin(e*(Math.PI/2))},inOut:function(e){return-(Math.cos(Math.PI*e)-1)/2}},cubic:{out:function(e){return--e*e*e+1}}},detectFeatures:function(){if(p.features)return p.features;var e,t,n=p.createEl().style,i="",o={};o.oldIE=document.all&&!document.addEventListener,o.touch="ontouchstart"in window,window.requestAnimationFrame&&(o.raf=window.requestAnimationFrame,o.caf=window.cancelAnimationFrame),o.pointerEvent=!!window.PointerEvent||navigator.msPointerEnabled,o.pointerEvent||(e=navigator.userAgent,/iP(hone|od)/.test(navigator.platform)&&(t=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/))&&0<t.length&&1<=(t=parseInt(t[1],10))&&t<8&&(o.isOldIOSPhone=!0),t=(t=e.match(/Android\s([0-9\.]*)/))?t[1]:0,1<=(t=parseFloat(t))&&(t<4.4&&(o.isOldAndroid=!0),o.androidVersion=t),o.isMobileOpera=/opera mini|opera mobi/i.test(e));for(var a,r,l,s=["transform","perspective","animationName"],c=["","webkit","Moz","ms","O"],u=0;u<4;u++){for(var i=c[u],d=0;d<3;d++)a=s[d],r=i+(i?a.charAt(0).toUpperCase()+a.slice(1):a),!o[a]&&r in n&&(o[a]=r);i&&!o.raf&&(i=i.toLowerCase(),o.raf=window[i+"RequestAnimationFrame"],o.raf)&&(o.caf=window[i+"CancelAnimationFrame"]||window[i+"CancelRequestAnimationFrame"])}return o.raf||(l=0,o.raf=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-l)),i=window.setTimeout(function(){e(t+n)},n);return l=t+n,i},o.caf=function(e){clearTimeout(e)}),o.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,p.features=o}},f=(p.detectFeatures(),p.features.oldIE&&(p.bind=function(e,t,n,i){t=t.split(" ");for(var o,a=(i?"detach":"attach")+"Event",r=function(){n.handleEvent.call(n)},l=0;l<t.length;l++)if(o=t[l])if("object"==typeof n&&n.handleEvent){if(i){if(!n["oldIE"+o])return!1}else n["oldIE"+o]=r;e[a]("on"+o,n["oldIE"+o])}else e[a]("on"+o,n)}),this),N=25,h={allowPanToNext:!0,spacing:.12,bgOpacity:1,mouseUsed:!1,loop:!0,pinchToClose:!0,closeOnScroll:!0,closeOnVerticalDrag:!0,verticalDragRange:.75,hideAnimationDuration:333,showAnimationDuration:333,showHideOpacity:!1,focus:!0,escKey:!0,arrowKeys:!0,mainScrollEndFriction:.35,panEndFriction:.35,isClickableElement:function(e){return"A"===e.tagName},getDoubleTapZoom:function(e,t){return e||t.initialZoomLevel<.7?1:1.33},maxSpreadZoom:1.33,modal:!0,scaleMode:"fit"};p.extend(h,_);function e(){return{x:0,y:0}}function U(e,t){p.extend(f,t.publicMethods),Ge.push(e)}function H(e){var t=P();return t-1<e?e-t:e<0?t+e:e}function a(e,t){return Ke[e]||(Ke[e]=[]),Ke[e].push(t)}function Y(e,t,n,i){i===f.currItem.initialZoomLevel?n[e]=f.currItem.initialPosition[e]:(n[e]=Qe(e,i),n[e]>t.min[e]?n[e]=t.min[e]:n[e]<t.max[e]&&(n[e]=t.max[e]))}function W(e){var t="";h.escKey&&27===e.keyCode?t="close":h.arrowKeys&&(37===e.keyCode?t="prev":39===e.keyCode&&(t="next")),!t||e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||(e.preventDefault?e.preventDefault():e.returnValue=!1,f[t]())}function B(e){e&&(Ee||Ae||g||Te)&&(e.preventDefault(),e.stopPropagation())}function G(){f.setScrollOffset(0,p.getScrollY())}function X(e){var t;"mousedown"===e.type&&0<e.button||(Qt?e.preventDefault():Me&&"mousedown"===e.type||(kt(e,!0)&&e.preventDefault(),C("pointerDown"),pe&&((t=p.arraySearch(ht,e.pointerId,"id"))<0&&(t=ht.length),ht[t]={x:e.pageX,y:e.pageY,id:e.pointerId}),e=(t=Nt(e)).length,c=null,ct(),s&&1!==e||(s=Fe=!0,p.bind(window,ee,f),De=_e=Le=Te=ke=Ee=Se=Ae=!1,Ze=null,C("firstTouchStart",t),S(He,v),Ue.x=Ue.y=0,S(k,t[0]),S(ft,k),yt.x=b.x*Ye,xt=[{x:k.x,y:k.y}],Ie=be=D(),it(x,!0),Mt(),St()),!u&&1<e&&!g&&!ke&&(ne=x,u=Se=!(Ae=!1),Ue.y=Ue.x=0,S(He,v),S(E,t[0]),S(pt,t[1]),Pt(E,pt,Ct),It.x=Math.abs(Ct.x)-v.x,It.y=Math.abs(Ct.y)-v.y,Re=Tt(E,pt))))}function V(e){var t;e.preventDefault(),pe&&-1<(t=p.arraySearch(ht,e.pointerId,"id"))&&((t=ht[t]).x=e.pageX,t.y=e.pageY),s&&(t=Nt(e),Ze||Ee||u?c=t:R.x!==b.x*Ye?Ze="h":(e=Math.abs(t[0].x-k.x)-Math.abs(t[0].y-k.y),Math.abs(e)>=mt&&(Ze=0<e?"h":"v",c=t)))}function K(e){if(l.isOldAndroid){if(Me&&"mouseup"===e.type)return;-1<e.type.indexOf("touch")&&(clearTimeout(Me),Me=setTimeout(function(){Me=0},600))}var t;C("pointerUp"),kt(e,!1)&&e.preventDefault(),pe&&-1<(a=p.arraySearch(ht,e.pointerId,"id"))&&(t=ht.splice(a,1)[0],navigator.msPointerEnabled&&(t.type={4:"mouse",2:"touch",3:"pen"}[e.pointerType],t.type)||(t.type=e.pointerType||"mouse"));var n=(a=Nt(e)).length;if(2===(n="mouseup"===e.type?0:n))return!(c=null);1===n&&S(ft,a[0]),0!==n||Ze||g||(t||("mouseup"===e.type?t={x:e.pageX,y:e.pageY,type:"mouse"}:e.changedTouches&&e.changedTouches[0]&&(t={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY,type:"touch"})),C("touchRelease",e,t));var i,o,a=-1;if(0===n&&(s=!1,p.unbind(window,ee,f),Mt(),u?a=0:-1!==bt&&(a=D()-bt)),bt=1===n?D():-1,e=-1!==a&&a<150?"zoom":"swipe",u&&n<2&&(u=!1,1===n&&(e="zoomPointerUp"),C("zoomGestureEnded")),c=null,Ee||Ae||g||Te)if(ct(),(Ce=Ce||Yt()).calculateSwipeSpeed("x"),Te)Ft()<h.verticalDragRange?f.close():(i=v.y,o=ze,ut("verticalDrag",0,1,300,p.easing.cubic.out,function(e){v.y=(f.currItem.initialPosition.y-i)*e+i,T((1-o)*e+o),M()}),C("onVerticalDrag",1));else{if((ke||g)&&0===n){if(Bt(e,Ce))return;e="zoomPointerUp"}if(!g)return"swipe"!==e?void Xt():void(!ke&&x>f.currItem.fitRatio&&Wt(Ce))}}var q,$,j,y,J,Q,ee,te,i,x,ne,ie,oe,ae,re,r,le,se,ce,ue,de,me,pe,o,fe,he,ye,xe,ge,ve,l,we,be,Ie,Ce,De,Te,Me,s,Se,Ae,Ee,Oe,ke,c,u,Re,d,Pe,g,Ze,Fe,Le,ze,_e,Ne,Ue=e(),He=e(),v=e(),w={},Ye=0,We={},b=e(),I=0,Be=!0,Ge=[],Xe={},Ve=!1,Ke={},C=function(e){var t=Ke[e];if(t){var n=Array.prototype.slice.call(arguments);n.shift();for(var i=0;i<t.length;i++)t[i].apply(f,n)}},D=function(){return(new Date).getTime()},T=function(e){ze=e,f.bg.style.opacity=e*h.bgOpacity},qe=function(e,t,n,i,o){(!Ve||o&&o!==f.currItem)&&(i/=(o||f.currItem).fitRatio),e[me]=ie+t+"px, "+n+"px"+oe+" scale("+i+")"},M=function(e){Pe&&(e&&(x>f.currItem.fitRatio?Ve||(cn(f.currItem,!1,!0),Ve=!0):Ve&&(cn(f.currItem),Ve=!1)),qe(Pe,v.x,v.y,x))},$e=function(e){e.container&&qe(e.container.style,e.initialPosition.x,e.initialPosition.y,e.initialZoomLevel,e)},je=function(e,t){t[me]=ie+e+"px, 0px"+oe},Je=function(e,t){var n;!h.loop&&t&&(t=y+(b.x*Ye-e)/b.x,n=Math.round(e-R.x),t<0&&0<n||t>=P()-1&&n<0)&&(e=R.x+n*h.mainScrollEndFriction),R.x=e,je(e,J)},Qe=function(e,t){var n=It[e]-We[e];return He[e]+Ue[e]+n-t/ne*n},S=function(e,t){e.x=t.x,e.y=t.y,t.id&&(e.id=t.id)},et=function(e){e.x=Math.round(e.x),e.y=Math.round(e.y)},tt=null,nt=function(){tt&&(p.unbind(document,"mousemove",nt),p.addClass(m,"pswp--has_mouse"),h.mouseUsed=!0,C("mouseUsed")),tt=setTimeout(function(){tt=null},100)},it=function(e,t){e=ln(f.currItem,w,e);return t&&(d=e),e},ot=function(e){return(e=e||f.currItem).initialZoomLevel},at=function(e){return 0<(e=e||f.currItem).w?h.maxSpreadZoom:1},A={},rt=0,lt=function(e){A[e]&&(A[e].raf&&he(A[e].raf),rt--,delete A[e])},st=function(e){A[e]&&lt(e),A[e]||(rt++,A[e]={})},ct=function(){for(var e in A)A.hasOwnProperty(e)&&lt(e)},ut=function(e,t,n,i,o,a,r){function l(){A[e]&&(s=D()-c,i<=s?(lt(e),a(n),r&&r()):(a((n-t)*o(s/i)+t),A[e].raf=fe(l)))}var s,c=D();st(e);l()},_={shout:C,listen:a,viewportSize:w,options:h,isMainScrollAnimating:function(){return g},getZoomLevel:function(){return x},getCurrentIndex:function(){return y},isDragging:function(){return s},isZooming:function(){return u},setScrollOffset:function(e,t){We.x=e,ve=We.y=t,C("updateScrollOffset",We)},applyZoomPan:function(e,t,n,i){v.x=t,v.y=n,x=e,M(i)},init:function(){if(!q&&!$){f.framework=p,f.template=m,f.bg=p.getChildByClass(m,"pswp__bg"),ye=m.className,q=!0,l=p.detectFeatures(),fe=l.raf,he=l.caf,me=l.transform,ge=l.oldIE,f.scrollWrap=p.getChildByClass(m,"pswp__scroll-wrap"),f.container=p.getChildByClass(f.scrollWrap,"pswp__container"),J=f.container.style,f.itemHolders=r=[{el:f.container.children[0],wrap:0,index:-1},{el:f.container.children[1],wrap:0,index:-1},{el:f.container.children[2],wrap:0,index:-1}],r[0].el.style.display=r[2].el.style.display="none",me?(t=l.perspective&&!o,ie="translate"+(t?"3d(":"("),oe=l.perspective?", 0px)":")"):(me="left",p.addClass(m,"pswp--ie"),je=function(e,t){t.left=e+"px"},$e=function(e){var t=1<e.fitRatio?1:e.fitRatio,n=e.container.style,i=t*e.w,t=t*e.h;n.width=i+"px",n.height=t+"px",n.left=e.initialPosition.x+"px",n.top=e.initialPosition.y+"px"},M=function(){var e,t,n,i;Pe&&(e=Pe,n=(i=1<(t=f.currItem).fitRatio?1:t.fitRatio)*t.w,i=i*t.h,e.width=n+"px",e.height=i+"px",e.left=v.x+"px",e.top=v.y+"px")}),i={resize:f.updateSize,orientationchange:function(){clearTimeout(we),we=setTimeout(function(){w.x!==f.scrollWrap.clientWidth&&f.updateSize()},500)},scroll:G,keydown:W,click:B};var e,t=l.isOldIOSPhone||l.isOldAndroid||l.isMobileOpera;for(l.animationName&&l.transform&&!t||(h.showAnimationDuration=h.hideAnimationDuration=0),e=0;e<Ge.length;e++)f["init"+Ge[e]]();z&&(f.ui=new z(f,p)).init(),C("firstUpdate"),y=y||h.index||0,(isNaN(y)||y<0||y>=P())&&(y=0),f.currItem=en(y),(l.isOldIOSPhone||l.isOldAndroid)&&(Be=!1),m.setAttribute("aria-hidden","false"),h.modal&&(Be?m.style.position="fixed":(m.style.position="absolute",m.style.top=p.getScrollY()+"px")),void 0===ve&&(C("initialLayout"),ve=xe=p.getScrollY());var n="pswp--open ";for(h.mainClass&&(n+=h.mainClass+" "),h.showHideOpacity&&(n+="pswp--animate_opacity "),n=(n=(n+=o?"pswp--touch":"pswp--notouch")+(l.animationName?" pswp--css_animation":""))+(l.svg?" pswp--svg":""),p.addClass(m,n),f.updateSize(),Q=-1,I=null,e=0;e<3;e++)je((e+Q)*b.x,r[e].el.style);ge||p.bind(f.scrollWrap,te,f),a("initialZoomInEnd",function(){f.setContent(r[0],y-1),f.setContent(r[2],y+1),r[0].el.style.display=r[2].el.style.display="block",h.focus&&m.focus(),p.bind(document,"keydown",f),l.transform&&p.bind(f.scrollWrap,"click",f),h.mouseUsed||p.bind(document,"mousemove",nt),p.bind(window,"resize scroll orientationchange",f),C("bindEvents")}),f.setContent(r[1],y),f.updateCurrItem(),C("afterInit"),Be||(ae=setInterval(function(){rt||s||u||x!==f.currItem.initialZoomLevel||f.updateSize()},1e3)),p.addClass(m,"pswp--visible")}var t},close:function(){q&&($=!(q=!1),C("close"),p.unbind(window,"resize scroll orientationchange",f),p.unbind(window,"scroll",i.scroll),p.unbind(document,"keydown",f),p.unbind(document,"mousemove",nt),l.transform&&p.unbind(f.scrollWrap,"click",f),s&&p.unbind(window,ee,f),clearTimeout(we),C("unbindEvents"),tn(f.currItem,null,!0,f.destroy))},destroy:function(){C("destroy"),$t&&clearTimeout($t),m.setAttribute("aria-hidden","true"),m.className=ye,ae&&clearInterval(ae),p.unbind(f.scrollWrap,te,f),p.unbind(window,"scroll",f),Mt(),ct(),Ke=null},panTo:function(e,t,n){n||(e>d.min.x?e=d.min.x:e<d.max.x&&(e=d.max.x),t>d.min.y?t=d.min.y:t<d.max.y&&(t=d.max.y)),v.x=e,v.y=t,M()},handleEvent:function(e){e=e||window.event,i[e.type]&&i[e.type](e)},goTo:function(e){var t=(e=H(e))-y;I=t,y=e,f.currItem=en(y),Ye-=t,Je(b.x*Ye),ct(),g=!1,f.updateCurrItem()},next:function(){f.goTo(y+1)},prev:function(){f.goTo(y-1)},updateCurrZoomItem:function(e){var t;e&&C("beforeChange",0),Pe=r[1].el.children.length&&(t=r[1].el.children[0],p.hasClass(t,"pswp__zoom-wrap"))?t.style:null,d=f.currItem.bounds,ne=x=f.currItem.initialZoomLevel,v.x=d.center.x,v.y=d.center.y,e&&C("afterChange")},invalidateCurrItems:function(){re=!0;for(var e=0;e<3;e++)r[e].item&&(r[e].item.needsUpdate=!0)},updateCurrItem:function(e){if(0!==I){var t,n=Math.abs(I);if(!(e&&n<2)){f.currItem=en(y),Ve=!1,C("beforeChange",I),3<=n&&(Q+=I+(0<I?-3:3),n=3);for(var i=0;i<n;i++)0<I?(t=r.shift(),r[2]=t,je((++Q+2)*b.x,t.el.style),f.setContent(t,y-n+i+1+1)):(t=r.pop(),r.unshift(t),je(--Q*b.x,t.el.style),f.setContent(t,y+n-i-1-1));Pe&&1===Math.abs(I)&&(e=en(le)).initialZoomLevel!==x&&(ln(e,w),cn(e),$e(e)),I=0,f.updateCurrZoomItem(),le=y,C("afterChange")}}},updateSize:function(e){if(!Be&&h.modal){var t=p.getScrollY();if(ve!==t&&(m.style.top=t+"px",ve=t),!e&&Xe.x===window.innerWidth&&Xe.y===window.innerHeight)return;Xe.x=window.innerWidth,Xe.y=window.innerHeight,m.style.height=Xe.y+"px"}if(w.x=f.scrollWrap.clientWidth,w.y=f.scrollWrap.clientHeight,G(),b.x=w.x+Math.round(w.x*h.spacing),b.y=w.y,Je(b.x*Ye),C("beforeResize"),void 0!==Q){for(var n,i,o,a=0;a<3;a++)n=r[a],je((a+Q)*b.x,n.el.style),o=y+a-1,h.loop&&2<P()&&(o=H(o)),(i=en(o))&&(re||i.needsUpdate||!i.bounds)?(f.cleanSlide(i),f.setContent(n,o),1===a&&(f.currItem=i,f.updateCurrZoomItem(!0)),i.needsUpdate=!1):-1===n.index&&0<=o&&f.setContent(n,o),i&&i.container&&(ln(i,w),cn(i),$e(i));re=!1}ne=x=f.currItem.initialZoomLevel,(d=f.currItem.bounds)&&(v.x=d.center.x,v.y=d.center.y,M(!0)),C("resize")},zoomTo:function(t,e,n,i,o){e&&(ne=x,It.x=Math.abs(e.x)-v.x,It.y=Math.abs(e.y)-v.y,S(He,v));function a(e){1===e?(x=t,v.x=r.x,v.y=r.y):(x=(t-l)*e+l,v.x=(r.x-s.x)*e+s.x,v.y=(r.y-s.y)*e+s.y),o&&o(e),M(1===e)}var e=it(t,!1),r={},l=(Y("x",e,r,t),Y("y",e,r,t),x),s={x:v.x,y:v.y};et(r);n?ut("customZoomTo",0,1,n,i||p.easing.sine.inOut,a):a(1)}},dt=30,mt=10,E={},pt={},O={},k={},ft={},ht=[],yt={},xt=[],gt={},vt=0,wt=e(),bt=0,R=e(),It=e(),Ct=e(),Dt=function(e,t){return e.x===t.x&&e.y===t.y},Tt=function(e,t){return gt.x=Math.abs(e.x-t.x),gt.y=Math.abs(e.y-t.y),Math.sqrt(gt.x*gt.x+gt.y*gt.y)},Mt=function(){Oe&&(he(Oe),Oe=null)},St=function(){s&&(Oe=fe(St),Ht())},At=function(){return!("fit"===h.scaleMode&&x===f.currItem.initialZoomLevel)},Et=function(e,t){return!(!e||e===document)&&!(e.getAttribute("class")&&-1<e.getAttribute("class").indexOf("pswp__scroll-wrap"))&&(t(e)?e:Et(e.parentNode,t))},Ot={},kt=function(e,t){return Ot.prevent=!Et(e.target,h.isClickableElement),C("preventDragEvent",e,t,Ot),Ot.prevent},Rt=function(e,t){return t.x=e.pageX,t.y=e.pageY,t.id=e.identifier,t},Pt=function(e,t,n){n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y)},Zt=function(e,t,n){var i;50<e-Ie&&((i=2<xt.length?xt.shift():{}).x=t,i.y=n,xt.push(i),Ie=e)},Ft=function(){var e=v.y-f.currItem.initialPosition.y;return 1-Math.abs(e/(w.y/2))},Lt={},zt={},_t=[],Nt=function(e){for(;0<_t.length;)_t.pop();return pe?(Ne=0,ht.forEach(function(e){0===Ne?_t[0]=e:1===Ne&&(_t[1]=e),Ne++})):-1<e.type.indexOf("touch")?e.touches&&0<e.touches.length&&(_t[0]=Rt(e.touches[0],Lt),1<e.touches.length)&&(_t[1]=Rt(e.touches[1],zt)):(Lt.x=e.pageX,Lt.y=e.pageY,Lt.id="",_t[0]=Lt),_t},Ut=function(e,t){var n,i,o,a=v[e]+t[e],r=0<t[e],l=R.x+t.x,s=R.x-yt.x,c=a>d.min[e]||a<d.max[e]?h.panEndFriction:1,a=v[e]+t[e]*c;return!h.allowPanToNext&&x!==f.currItem.initialZoomLevel||(Pe?"h"!==Ze||"x"!==e||Ae||(r?(a>d.min[e]&&(c=h.panEndFriction,d.min[e],n=d.min[e]-He[e]),(n<=0||s<0)&&1<P()?(o=l,s<0&&l>yt.x&&(o=yt.x)):d.min.x!==d.max.x&&(i=a)):(a<d.max[e]&&(c=h.panEndFriction,d.max[e],n=He[e]-d.max[e]),(n<=0||0<s)&&1<P()?(o=l,0<s&&l<yt.x&&(o=yt.x)):d.min.x!==d.max.x&&(i=a))):o=l,"x"!==e)?void(g||ke||x>f.currItem.fitRatio&&(v[e]+=t[e]*c)):(void 0!==o&&(Je(o,!0),ke=o!==yt.x),d.min.x!==d.max.x&&(void 0!==i?v.x=i:ke||(v.x+=t.x*c)),void 0!==o)},Ht=function(){var e,t,n,i,o,a;c&&0!==(e=c.length)&&(S(E,c[0]),O.x=E.x-k.x,O.y=E.y-k.y,u&&1<e?(k.x=E.x,k.y=E.y,!O.x&&!O.y&&Dt(c[1],pt)||(S(pt,c[1]),Ae||(Ae=!0,C("zoomGestureStarted")),e=Tt(E,pt),(t=Gt(e))>f.currItem.initialZoomLevel+f.currItem.initialZoomLevel/15&&(_e=!0),n=1,i=ot(),o=at(),t<i?h.pinchToClose&&!_e&&ne<=f.currItem.initialZoomLevel?(T(a=1-(i-t)/(i/1.2)),C("onPinchClose",a),Le=!0):t=i-(n=1<(n=(i-t)/i)?1:n)*(i/3):o<t&&(t=o+(n=1<(n=(t-o)/(6*i))?1:n)*i),n<0&&(n=0),Pt(E,pt,wt),Ue.x+=wt.x-Ct.x,Ue.y+=wt.y-Ct.y,S(Ct,wt),v.x=Qe("x",t),v.y=Qe("y",t),De=x<t,x=t,M())):Ze&&(Fe&&(Fe=!1,Math.abs(O.x)>=mt&&(O.x-=c[0].x-ft.x),Math.abs(O.y)>=mt)&&(O.y-=c[0].y-ft.y),k.x=E.x,k.y=E.y,0===O.x&&0===O.y||("v"===Ze&&h.closeOnVerticalDrag&&!At()?(Ue.y+=O.y,v.y+=O.y,a=Ft(),Te=!0,C("onVerticalDrag",a),T(a),M()):(Zt(D(),E.x,E.y),Ee=!0,d=f.currItem.bounds,Ut("x",O)||(Ut("y",O),et(v),M())))))},Yt=function(){var t,n,i={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(e){n=(1<xt.length?(t=D()-Ie+50,xt[xt.length-2]):(t=D()-be,ft))[e],i.lastFlickOffset[e]=k[e]-n,i.lastFlickDist[e]=Math.abs(i.lastFlickOffset[e]),20<i.lastFlickDist[e]?i.lastFlickSpeed[e]=i.lastFlickOffset[e]/t:i.lastFlickSpeed[e]=0,Math.abs(i.lastFlickSpeed[e])<.1&&(i.lastFlickSpeed[e]=0),i.slowDownRatio[e]=.95,i.slowDownRatioReverse[e]=1-i.slowDownRatio[e],i.speedDecelerationRatio[e]=1},calculateOverBoundsAnimOffset:function(t,e){i.backAnimStarted[t]||(v[t]>d.min[t]?i.backAnimDestination[t]=d.min[t]:v[t]<d.max[t]&&(i.backAnimDestination[t]=d.max[t]),void 0!==i.backAnimDestination[t]&&(i.slowDownRatio[t]=.7,i.slowDownRatioReverse[t]=1-i.slowDownRatio[t],i.speedDecelerationRatioAbs[t]<.05)&&(i.lastFlickSpeed[t]=0,i.backAnimStarted[t]=!0,ut("bounceZoomPan"+t,v[t],i.backAnimDestination[t],e||300,p.easing.sine.out,function(e){v[t]=e,M()})))},calculateAnimOffset:function(e){i.backAnimStarted[e]||(i.speedDecelerationRatio[e]=i.speedDecelerationRatio[e]*(i.slowDownRatio[e]+i.slowDownRatioReverse[e]-i.slowDownRatioReverse[e]*i.timeDiff/10),i.speedDecelerationRatioAbs[e]=Math.abs(i.lastFlickSpeed[e]*i.speedDecelerationRatio[e]),i.distanceOffset[e]=i.lastFlickSpeed[e]*i.speedDecelerationRatio[e]*i.timeDiff,v[e]+=i.distanceOffset[e])},panAnimLoop:function(){A.zoomPan&&(A.zoomPan.raf=fe(i.panAnimLoop),i.now=D(),i.timeDiff=i.now-i.lastNow,i.lastNow=i.now,i.calculateAnimOffset("x"),i.calculateAnimOffset("y"),M(),i.calculateOverBoundsAnimOffset("x"),i.calculateOverBoundsAnimOffset("y"),i.speedDecelerationRatioAbs.x<.05)&&i.speedDecelerationRatioAbs.y<.05&&(v.x=Math.round(v.x),v.y=Math.round(v.y),M(),lt("zoomPan"))}};return i},Wt=function(e){return e.calculateSwipeSpeed("y"),d=f.currItem.bounds,e.backAnimDestination={},e.backAnimStarted={},Math.abs(e.lastFlickSpeed.x)<=.05&&Math.abs(e.lastFlickSpeed.y)<=.05?(e.speedDecelerationRatioAbs.x=e.speedDecelerationRatioAbs.y=0,e.calculateOverBoundsAnimOffset("x"),e.calculateOverBoundsAnimOffset("y"),!0):(st("zoomPan"),e.lastNow=D(),void e.panAnimLoop())},Bt=function(e,t){var n,i,o;g||(vt=y),"swipe"===e&&(e=k.x-ft.x,a=t.lastFlickDist.x<10,dt<e&&(a||20<t.lastFlickOffset.x)?i=-1:e<-dt&&(a||t.lastFlickOffset.x<-20)&&(i=1)),i&&((y+=i)<0?(y=h.loop?P()-1:0,o=!0):y>=P()&&(y=h.loop?0:P()-1,o=!0),o&&!h.loop||(I+=i,Ye-=i,n=!0));var e=b.x*Ye,a=Math.abs(e-R.x),r=n||e>R.x==0<t.lastFlickSpeed.x?(r=0<Math.abs(t.lastFlickSpeed.x)?a/Math.abs(t.lastFlickSpeed.x):333,r=Math.min(r,400),Math.max(r,250)):333;return vt===y&&(n=!1),g=!0,C("mainScrollAnimStart"),ut("mainScroll",R.x,e,r,p.easing.cubic.out,Je,function(){ct(),g=!1,vt=-1,!n&&vt===y||f.updateCurrItem(),C("mainScrollAnimComplete")}),n&&f.updateCurrItem(!0),n},Gt=function(e){return 1/Re*e*ne},Xt=function(){var e=x,t=ot(),n=at();x<t?e=t:n<x&&(e=n);var i,o=ze;return Le&&!De&&!_e&&x<t?f.close():(Le&&(i=function(e){T((1-o)*e+o)}),f.zoomTo(e,0,200,p.easing.cubic.out,i)),!0};U("Gestures",{publicMethods:{initGestures:function(){function e(e,t,n,i,o){se=e+t,ce=e+n,ue=e+i,de=o?e+o:""}(pe=l.pointerEvent)&&l.touch&&(l.touch=!1),pe?navigator.msPointerEnabled?e("MSPointer","Down","Move","Up","Cancel"):e("pointer","down","move","up","cancel"):l.touch?(e("touch","start","move","end","cancel"),o=!0):e("mouse","down","move","up"),ee=ce+" "+ue+" "+de,te=se,pe&&!o&&(o=1<navigator.maxTouchPoints||1<navigator.msMaxTouchPoints),f.likelyTouchDevice=o,i[se]=X,i[ce]=V,i[ue]=K,de&&(i[de]=i[ue]),l.touch&&(te+=" mousedown",ee+=" mousemove mouseup",i.mousedown=i[se],i.mousemove=i[ce],i.mouseup=i[ue]),o||(h.allowPanToNext=!1)}}});function Vt(e){function t(){e.loading=!1,e.loaded=!0,e.loadComplete?e.loadComplete(e):e.img=null,n.onload=n.onerror=null,n=null}e.loading=!0,e.loaded=!1;var n=e.img=p.createEl("pswp__img","img");n.onload=t,n.onerror=function(){e.loadError=!0,t()},n.src=e.src}function Kt(e,t){return e.src&&e.loadError&&e.container&&(t&&(e.container.innerHTML=""),e.container.innerHTML=h.errorMsg.replace("%url%",e.src),1)}function qt(){if(nn.length){for(var e,t=0;t<nn.length;t++)(e=nn[t]).holder.index===e.index&&sn(e.index,e.item,e.baseDiv,e.img,!1,e.clearPlaceholder);nn=[]}}var $t,jt,Jt,Qt,en,P,tn=function(a,e,r,t){function l(){lt("initialZoom"),r?(f.template.removeAttribute("style"),f.bg.removeAttribute("style")):(T(1),e&&(e.style.display="block"),p.addClass(m,"pswp--animated-in"),C("initialZoom"+(r?"OutEnd":"InEnd"))),t&&t(),Qt=!1}$t&&clearTimeout($t),Jt=Qt=!0,a.initialLayout?(s=a.initialLayout,a.initialLayout=null):s=h.getThumbBoundsFn&&h.getThumbBoundsFn(y);var s,c,u,d=r?h.hideAnimationDuration:h.showAnimationDuration;d&&s&&void 0!==s.x?(c=j,u=!f.currItem.src||f.currItem.loadError||h.showHideOpacity,a.miniImg&&(a.miniImg.style.webkitBackfaceVisibility="hidden"),r||(x=s.w/a.w,v.x=s.x,v.y=s.y-xe,f[u?"template":"bg"].style.opacity=.001,M()),st("initialZoom"),r&&!c&&p.removeClass(m,"pswp--animated-in"),u&&(r?p[(c?"remove":"add")+"Class"](m,"pswp--animate_opacity"):setTimeout(function(){p.addClass(m,"pswp--animate_opacity")},30)),$t=setTimeout(function(){var t,n,i,o,e;C("initialZoom"+(r?"Out":"In")),r?(t=s.w/a.w,n={x:v.x,y:v.y},i=x,o=ze,e=function(e){1===e?(x=t,v.x=s.x,v.y=s.y-ve):(x=(t-i)*e+i,v.x=(s.x-n.x)*e+n.x,v.y=(s.y-ve-n.y)*e+n.y),M(),u?m.style.opacity=1-e:T(o-e*o)},c?ut("initialZoom",0,1,d,p.easing.cubic.out,e,l):(e(1),$t=setTimeout(l,d+20))):(x=a.initialZoomLevel,S(v,a.initialPosition),M(),T(1),u?m.style.opacity=1:T(1),$t=setTimeout(l,d+20))},r?25:90)):(C("initialZoom"+(r?"Out":"In")),x=a.initialZoomLevel,S(v,a.initialPosition),M(),m.style.opacity=r?0:1,T(1),d?setTimeout(function(){l()},d):l())},Z={},nn=[],on={index:0,errorMsg:'<div class="pswp__error-msg"><a href="%url%" target="_blank">The image</a> could not be loaded.</div>',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return jt.length}},an=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},rn=function(e,t,n){var i=e.bounds;i.center.x=Math.round((Z.x-t)/2),i.center.y=Math.round((Z.y-n)/2)+e.vGap.top,i.max.x=t>Z.x?Math.round(Z.x-t):i.center.x,i.max.y=n>Z.y?Math.round(Z.y-n)+e.vGap.top:i.center.y,i.min.x=t>Z.x?0:i.center.x,i.min.y=n>Z.y?e.vGap.top:i.center.y},ln=function(e,t,n){var i,o;return e.src&&!e.loadError?((i=!n)&&(e.vGap||(e.vGap={top:0,bottom:0}),C("parseVerticalMargin",e)),Z.x=t.x,Z.y=t.y-e.vGap.top-e.vGap.bottom,i&&(t=Z.x/e.w,o=Z.y/e.h,e.fitRatio=t<o?t:o,"orig"===(t=h.scaleMode)?n=1:"fit"===t&&(n=e.fitRatio),e.initialZoomLevel=n=1<n?1:n,e.bounds||(e.bounds=an())),n?(rn(e,e.w*n,e.h*n),i&&n===e.initialZoomLevel&&(e.initialPosition=e.bounds.center),e.bounds):void 0):(e.w=e.h=0,e.initialZoomLevel=e.fitRatio=1,e.bounds=an(),e.initialPosition=e.bounds.center,e.bounds)},sn=function(e,t,n,i,o,a){t.loadError||i&&(t.imageAppended=!0,cn(t,i,t===f.currItem&&Ve),n.appendChild(i),a)&&setTimeout(function(){t&&t.loaded&&t.placeholder&&(t.placeholder.style.display="none",t.placeholder=null)},500)},cn=function(e,t,n){var i;e.src&&(t=t||e.container.lastChild,i=n?e.w:Math.round(e.w*e.fitRatio),n=n?e.h:Math.round(e.h*e.fitRatio),e.placeholder&&!e.loaded&&(e.placeholder.style.width=i+"px",e.placeholder.style.height=n+"px"),t.style.width=i+"px",t.style.height=n+"px")};U("Controller",{publicMethods:{lazyLoadItem:function(e){e=H(e);var t=en(e);t&&(!t.loaded&&!t.loading||re)&&(C("gettingData",e,t),t.src)&&Vt(t)},initController:function(){p.extend(h,on,!0),f.items=jt=t,en=f.getItemAt,P=h.getNumItemsFn,h.loop,P()<3&&(h.loop=!1),a("beforeChange",function(e){for(var t=h.preload,n=null===e||0<=e,i=Math.min(t[0],P()),o=Math.min(t[1],P()),a=1;a<=(n?o:i);a++)f.lazyLoadItem(y+a);for(a=1;a<=(n?i:o);a++)f.lazyLoadItem(y-a)}),a("initialLayout",function(){f.currItem.initialLayout=h.getThumbBoundsFn&&h.getThumbBoundsFn(y)}),a("mainScrollAnimComplete",qt),a("initialZoomInEnd",qt),a("destroy",function(){for(var e,t=0;t<jt.length;t++)(e=jt[t]).container&&(e.container=null),e.placeholder&&(e.placeholder=null),e.img&&(e.img=null),e.preloader&&(e.preloader=null),e.loadError&&(e.loaded=e.loadError=!1);nn=null})},getItemAt:function(e){return 0<=e&&void 0!==jt[e]&&jt[e]},allowProgressiveImg:function(){return h.forceProgressiveLoading||!o||h.mouseUsed||1200<screen.width},setContent:function(t,n){h.loop&&(n=H(n));var e=f.getItemAt(t.index);e&&(e.container=null);var i,o,a,e=f.getItemAt(n);e?(C("gettingData",n,e),t.index=n,o=(t.item=e).container=p.createEl("pswp__zoom-wrap"),!e.src&&e.html&&(e.html.tagName?o.appendChild(e.html):o.innerHTML=e.html),Kt(e),ln(e,w),!e.src||e.loadError||e.loaded?e.src&&!e.loadError&&((i=p.createEl("pswp__img","img")).style.opacity=1,i.src=e.src,cn(e,i),sn(n,e,o,i,!0)):(e.loadComplete=function(e){if(q){if(t&&t.index===n){if(Kt(e,!0))return e.loadComplete=e.img=null,ln(e,w),$e(e),void(t.index===y&&f.updateCurrZoomItem());e.imageAppended?!Qt&&e.placeholder&&(e.placeholder.style.display="none",e.placeholder=null):l.transform&&(g||Qt)?nn.push({item:e,baseDiv:o,img:e.img,index:n,holder:t,clearPlaceholder:!0}):sn(n,e,o,e.img,g||Qt,!0)}e.loadComplete=null,e.img=null,C("imageLoadComplete",n,e)}},p.features.transform&&(a="pswp__img pswp__img--placeholder",a+=e.msrc?"":" pswp__img--placeholder--blank",a=p.createEl(a,e.msrc?"img":""),e.msrc&&(a.src=e.msrc),cn(e,a),o.appendChild(a),e.placeholder=a),e.loading||Vt(e),f.allowProgressiveImg()&&(!Jt&&l.transform?nn.push({item:e,baseDiv:o,img:e.img,index:n,holder:t}):sn(n,e,o,e.img,!0,!0))),Jt||n!==y?$e(e):(Pe=o.style,tn(e,i||e.img)),t.el.innerHTML="",t.el.appendChild(o)):t.el.innerHTML=""},cleanSlide:function(e){e.img&&(e.img.onload=e.img.onerror=null),e.loaded=e.loading=e.img=e.imageAppended=!1}}});function un(e,t,n){var i=document.createEvent("CustomEvent"),t={origEvent:e,target:e.target,releasePoint:t,pointerType:n||"touch"};i.initCustomEvent("pswpTap",!0,!0,t),e.target.dispatchEvent(i)}var dn,F,mn={};U("Tap",{publicMethods:{initTap:function(){a("firstTouchStart",f.onTapStart),a("touchRelease",f.onTapRelease),a("destroy",function(){mn={},dn=null})},onTapStart:function(e){1<e.length&&(clearTimeout(dn),dn=null)},onTapRelease:function(e,t){var n,i,o;!t||Ee||Se||rt||(n=t,dn&&(clearTimeout(dn),dn=null,i=n,o=mn,Math.abs(i.x-o.x)<N)&&Math.abs(i.y-o.y)<N?C("doubleTap",n):"mouse"===t.type?un(e,t,"mouse"):"BUTTON"===e.target.tagName.toUpperCase()||p.hasClass(e.target,"pswp__single-tap")?un(e,t):(S(mn,n),dn=setTimeout(function(){un(e,t),dn=null},300)))}}}),U("DesktopZoom",{publicMethods:{initDesktopZoom:function(){ge||(o?a("mouseUsed",function(){f.setupDesktopZoom()}):f.setupDesktopZoom(!0))},setupDesktopZoom:function(e){F={};var t="wheel mousewheel DOMMouseScroll";a("bindEvents",function(){p.bind(m,t,f.handleMouseWheel)}),a("unbindEvents",function(){F&&p.unbind(m,t,f.handleMouseWheel)}),f.mouseZoomedIn=!1;function n(){f.mouseZoomedIn&&(p.removeClass(m,"pswp--zoomed-in"),f.mouseZoomedIn=!1),x<1?p.addClass(m,"pswp--zoom-allowed"):p.removeClass(m,"pswp--zoom-allowed"),o()}var i,o=function(){i&&(p.removeClass(m,"pswp--dragging"),i=!1)};a("resize",n),a("afterChange",n),a("pointerDown",function(){f.mouseZoomedIn&&(i=!0,p.addClass(m,"pswp--dragging"))}),a("pointerUp",o),e||n()},handleMouseWheel:function(e){if(x<=f.currItem.fitRatio)return h.modal&&(!h.closeOnScroll||rt||s?e.preventDefault():me&&2<Math.abs(e.deltaY)&&(j=!0,f.close())),!0;if(e.stopPropagation(),F.x=0,"deltaX"in e)1===e.deltaMode?(F.x=18*e.deltaX,F.y=18*e.deltaY):(F.x=e.deltaX,F.y=e.deltaY);else if("wheelDelta"in e)e.wheelDeltaX&&(F.x=-.16*e.wheelDeltaX),e.wheelDeltaY?F.y=-.16*e.wheelDeltaY:F.y=-.16*e.wheelDelta;else{if(!("detail"in e))return;F.y=e.detail}it(x,!0);var t=v.x-F.x,n=v.y-F.y;(h.modal||t<=d.min.x&&t>=d.max.x&&n<=d.min.y&&n>=d.max.y)&&e.preventDefault(),f.panTo(t,n)},toggleDesktopZoom:function(e){e=e||{x:w.x/2+We.x,y:w.y/2+We.y};var t=h.getDoubleTapZoom(!0,f.currItem),n=x===t;f.mouseZoomedIn=!n,f.zoomTo(n?f.currItem.initialZoomLevel:t,e,333),p[(n?"remove":"add")+"Class"](m,"pswp--zoomed-in")}}});function pn(){hn&&clearTimeout(hn),xn&&clearTimeout(xn)}function fn(){var e=Mn(),t={};if(!(e.length<5)){var n,i=e.split("&");for(a=0;a<i.length;a++)!i[a]||(n=i[a].split("=")).length<2||(t[n[0]]=n[1]);if(h.galleryPIDs){for(var o=t.pid,a=t.pid=0;a<jt.length;a++)if(jt[a].pid===o){t.pid=a;break}}else t.pid=parseInt(t.pid,10)-1;t.pid<0&&(t.pid=0)}return t}var hn,yn,xn,gn,vn,wn,n,bn,In,Cn,L,Dn,Tn={history:!0,galleryUID:1},Mn=function(){return L.hash.substring(1)},Sn=function(){var e,t;xn&&clearTimeout(xn),rt||s?xn=setTimeout(Sn,500):(gn?clearTimeout(yn):gn=!0,t=y+1,(e=en(y)).hasOwnProperty("pid")&&(t=e.pid),e=n+"&gid="+h.galleryUID+"&pid="+t,bn||-1===L.hash.indexOf(e)&&(Cn=!0),t=L.href.split("#")[0]+"#"+e,Dn?"#"+e!==window.location.hash&&history[bn?"replaceState":"pushState"]("",document.title,t):bn?L.replace(t):L.hash=e,bn=!0,yn=setTimeout(function(){gn=!1},60))};U("History",{publicMethods:{initHistory:function(){var e,t;p.extend(h,Tn,!0),h.history&&(L=window.location,bn=In=Cn=!1,n=Mn(),Dn="pushState"in history,-1<n.indexOf("gid=")&&(n=(n=n.split("&gid=")[0]).split("?gid=")[0]),a("afterChange",f.updateURL),a("unbindEvents",function(){p.unbind(window,"hashchange",f.onHashChange)}),e=function(){wn=!0,In||(Cn?history.back():n?L.hash=n:Dn?history.pushState("",document.title,L.pathname+L.search):L.hash=""),pn()},a("unbindEvents",function(){j&&e()}),a("destroy",function(){wn||e()}),a("firstUpdate",function(){y=fn().pid}),-1<(t=n.indexOf("pid="))&&"&"===(n=n.substring(0,t)).slice(-1)&&(n=n.slice(0,-1)),setTimeout(function(){q&&p.bind(window,"hashchange",f.onHashChange)},40))},onHashChange:function(){return Mn()===n?(In=!0,void f.close()):void(gn||(vn=!0,f.goTo(fn().pid),vn=!1))},updateURL:function(){pn(),vn||(bn?hn=setTimeout(Sn,800):Sn())}}}),p.extend(f,_)}});
/*! PhotoSwipe Default UI - 4.1.3 - 2019-01-08
* http://photoswipe.com
* Copyright (c) 2019 Dmitry Semenov; */
!function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.PhotoSwipeUI_Default=t()}(this,function(){"use strict";return function(o,s){function e(e){if(x)return!0;e=e||window.event,F.timeToIdle&&F.mouseUsed&&!v&&a();for(var t,n,o=(e.target||e.srcElement).getAttribute("class")||"",l=0;l<M.length;l++)(t=M[l]).onTap&&-1<o.indexOf("pswp__"+t.name)&&(t.onTap(),n=!0);n&&(e.stopPropagation&&e.stopPropagation(),x=!0,e=s.features.isOldAndroid?600:30,setTimeout(function(){x=!1},e))}function n(){var e=1===F.getNumItemsFn();e!==E&&(y(m,"ui--one-slide",e),E=e)}function i(){y(g,"share-modal--hidden",R)}function l(){if((R=!R)?(s.removeClass(g,"pswp__share-modal--fade-in"),setTimeout(function(){R&&i()},300)):(i(),setTimeout(function(){R||s.addClass(g,"pswp__share-modal--fade-in")},30)),!R){for(var e,t,n,o,l="",r=0;r<F.shareButtons.length;r++)e=F.shareButtons[r],t=F.getImageURLForShare(e),n=F.getPageURLForShare(e),o=F.getTextForShare(e),l+='<a href="'+e.url.replace("{{url}}",encodeURIComponent(n)).replace("{{image_url}}",encodeURIComponent(t)).replace("{{raw_image_url}}",t).replace("{{text}}",encodeURIComponent(o))+'" target="_blank" class="pswp__share--'+e.id+'"'+(e.download?"download":"")+">"+e.label+"</a>",F.parseShareButtonOut&&(l=F.parseShareButtonOut(e,l));g.children[0].innerHTML=l,g.children[0].onclick=P}}function r(e){for(var t=0;t<F.closeElClasses.length;t++)if(s.hasClass(e,"pswp__"+F.closeElClasses[t]))return!0}function a(){clearTimeout(k),z=0,v&&K.setIdle(!1)}function u(e){(e=(e=e||window.event).relatedTarget||e.toElement)&&"HTML"!==e.nodeName||(clearTimeout(k),k=setTimeout(function(){K.setIdle(!0)},F.timeToIdleOutside))}function c(e){T!==e&&(y(C,"preloader--active",!e),T=e)}function p(e){var t,n=e.vGap;!o.likelyTouchDevice||F.mouseUsed||screen.width>F.fitControlsWidth?(t=F.barsSize,F.captionEl&&"auto"===t.bottom?(h||((h=s.createEl("pswp__caption pswp__caption--fake")).appendChild(s.createEl("pswp__caption__center")),m.insertBefore(h,f),s.addClass(m,"pswp__ui--fit")),F.addCaptionHTMLFn(e,h,!0)?(e=h.clientHeight,n.bottom=parseInt(e,10)||44):n.bottom=t.top):n.bottom="auto"===t.bottom?0:t.bottom,n.top=t.top):n.top=n.bottom=0}function D(){function e(e){if(e)for(var t=e.length,n=0;n<t;n++){l=e[n],r=l.className;for(var o=0;o<M.length;o++)i=M[o],-1<r.indexOf("pswp__"+i.name)&&(F[i.option]?(s.removeClass(l,"pswp__element--disabled"),i.onInit&&i.onInit(l)):s.addClass(l,"pswp__element--disabled"))}}e(m.children);var l,r,i,t=s.getChildByClass(m,"pswp__top-bar");t&&e(t.children)}var d,m,f,h,t,w,g,b,v,_,C,T,I,E,F,x,S,k,K=this,L=!1,O=!0,R=!0,A={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(e,t){return e.title?(t.children[0].innerHTML=e.title,!0):(t.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return o.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return o.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},y=function(e,t,n){s[(n?"add":"remove")+"Class"](e,"pswp__"+t)},P=function(e){var t=(e=e||window.event).target||e.srcElement;return o.shout("shareLinkClick",e,t),!(!t.href||!t.hasAttribute("download")&&(window.open(t.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),R||l(),1))},z=0,M=[{name:"caption",option:"captionEl",onInit:function(e){f=e}},{name:"share-modal",option:"shareEl",onInit:function(e){g=e},onTap:function(){l()}},{name:"button--share",option:"shareEl",onInit:function(e){w=e},onTap:function(){l()}},{name:"button--zoom",option:"zoomEl",onTap:o.toggleDesktopZoom},{name:"counter",option:"counterEl",onInit:function(e){t=e}},{name:"button--close",option:"closeEl",onTap:o.close},{name:"button--arrow--left",option:"arrowEl",onTap:o.prev},{name:"button--arrow--right",option:"arrowEl",onTap:o.next},{name:"button--fs",option:"fullscreenEl",onTap:function(){d.isFullscreen()?d.exit():d.enter()}},{name:"preloader",option:"preloaderEl",onInit:function(e){C=e}}];K.init=function(){var t;s.extend(o.options,A,!0),F=o.options,m=s.getChildByClass(o.scrollWrap,"pswp__ui"),(_=o.listen)("onVerticalDrag",function(e){O&&e<.95?K.hideControls():!O&&.95<=e&&K.showControls()}),_("onPinchClose",function(e){O&&e<.9?(K.hideControls(),t=!0):t&&!O&&.9<e&&K.showControls()}),_("zoomGestureEnded",function(){(t=!1)&&!O&&K.showControls()}),_("beforeChange",K.update),_("doubleTap",function(e){var t=o.currItem.initialZoomLevel;o.getZoomLevel()!==t?o.zoomTo(t,e,333):o.zoomTo(F.getDoubleTapZoom(!1,o.currItem),e,333)}),_("preventDragEvent",function(e,t,n){var o=e.target||e.srcElement;o&&o.getAttribute("class")&&-1<e.type.indexOf("mouse")&&(0<o.getAttribute("class").indexOf("__caption")||/(SMALL|STRONG|EM)/i.test(o.tagName))&&(n.prevent=!1)}),_("bindEvents",function(){s.bind(m,"pswpTap click",e),s.bind(o.scrollWrap,"pswpTap",K.onGlobalTap),o.likelyTouchDevice||s.bind(o.scrollWrap,"mouseover",K.onMouseOver)}),_("unbindEvents",function(){R||l(),S&&clearInterval(S),s.unbind(document,"mouseout",u),s.unbind(document,"mousemove",a),s.unbind(m,"pswpTap click",e),s.unbind(o.scrollWrap,"pswpTap",K.onGlobalTap),s.unbind(o.scrollWrap,"mouseover",K.onMouseOver),d&&(s.unbind(document,d.eventK,K.updateFullscreen),d.isFullscreen()&&(F.hideAnimationDuration=0,d.exit()),d=null)}),_("destroy",function(){F.captionEl&&(h&&m.removeChild(h),s.removeClass(f,"pswp__caption--empty")),g&&(g.children[0].onclick=null),s.removeClass(m,"pswp__ui--over-close"),s.addClass(m,"pswp__ui--hidden"),K.setIdle(!1)}),F.showAnimationDuration||s.removeClass(m,"pswp__ui--hidden"),_("initialZoomIn",function(){F.showAnimationDuration&&s.removeClass(m,"pswp__ui--hidden")}),_("initialZoomOut",function(){s.addClass(m,"pswp__ui--hidden")}),_("parseVerticalMargin",p),D(),F.shareEl&&w&&g&&(R=!0),n(),F.timeToIdle&&_("mouseUsed",function(){s.bind(document,"mousemove",a),s.bind(document,"mouseout",u),S=setInterval(function(){2===++z&&K.setIdle(!0)},F.timeToIdle/2)}),F.fullscreenEl&&!s.features.isOldAndroid&&((d=d||K.getFullscreenAPI())?(s.bind(document,d.eventK,K.updateFullscreen),K.updateFullscreen(),s.addClass(o.template,"pswp--supports-fs")):s.removeClass(o.template,"pswp--supports-fs")),F.preloaderEl&&(c(!0),_("beforeChange",function(){clearTimeout(I),I=setTimeout(function(){o.currItem&&o.currItem.loading?o.allowProgressiveImg()&&(!o.currItem.img||o.currItem.img.naturalWidth)||c(!1):c(!0)},F.loadingIndicatorDelay)}),_("imageLoadComplete",function(e,t){o.currItem===t&&c(!0)}))},K.setIdle=function(e){y(m,"ui--idle",v=e)},K.update=function(){L=!(!O||!o.currItem||(K.updateIndexIndicator(),F.captionEl&&(F.addCaptionHTMLFn(o.currItem,f),y(f,"caption--empty",!o.currItem.title)),0)),R||l(),n()},K.updateFullscreen=function(e){e&&setTimeout(function(){o.setScrollOffset(0,s.getScrollY())},50),s[(d.isFullscreen()?"add":"remove")+"Class"](o.template,"pswp--fs")},K.updateIndexIndicator=function(){F.counterEl&&(t.innerHTML=o.getCurrentIndex()+1+F.indexIndicatorSep+F.getNumItemsFn())},K.onGlobalTap=function(e){var t=(e=e||window.event).target||e.srcElement;if(!x)if(e.detail&&"mouse"===e.detail.pointerType)r(t)?o.close():s.hasClass(t,"pswp__img")&&(1===o.getZoomLevel()&&o.getZoomLevel()<=o.currItem.fitRatio?F.clickToCloseNonZoomable&&o.close():o.toggleDesktopZoom(e.detail.releasePoint));else if(F.tapToToggleControls&&(O?K.hideControls():K.showControls()),F.tapToClose&&(s.hasClass(t,"pswp__img")||r(t)))return void o.close()},K.onMouseOver=function(e){e=(e=e||window.event).target||e.srcElement;y(m,"ui--over-close",r(e))},K.hideControls=function(){s.addClass(m,"pswp__ui--hidden"),O=!1},K.showControls=function(){O=!0,L||K.update(),s.removeClass(m,"pswp__ui--hidden")},K.supportsFullscreen=function(){var e=document;return!!(e.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.msExitFullscreen)},K.getFullscreenAPI=function(){var e,t=document.documentElement,n="fullscreenchange";return t.requestFullscreen?e={enterK:"requestFullscreen",exitK:"exitFullscreen",elementK:"fullscreenElement",eventK:n}:t.mozRequestFullScreen?e={enterK:"mozRequestFullScreen",exitK:"mozCancelFullScreen",elementK:"mozFullScreenElement",eventK:"moz"+n}:t.webkitRequestFullscreen?e={enterK:"webkitRequestFullscreen",exitK:"webkitExitFullscreen",elementK:"webkitFullscreenElement",eventK:"webkit"+n}:t.msRequestFullscreen&&(e={enterK:"msRequestFullscreen",exitK:"msExitFullscreen",elementK:"msFullscreenElement",eventK:"MSFullscreenChange"}),e&&(e.enter=function(){return b=F.closeOnScroll,F.closeOnScroll=!1,"webkitRequestFullscreen"!==this.enterK?o.template[this.enterK]():void o.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT)},e.exit=function(){return F.closeOnScroll=b,document[this.exitK]()},e.isFullscreen=function(){return document[this.elementK]}),e}}});
/*jquery.mb.YTPlayer 02-02-2017
 _ jquery.mb.components 
 _ email: matteo@open-lab.com 
 _ Copyright (c) 2001-2017. Matteo Bicocchi (Pupunzi); 
 _ blog: http://pupunzi.open-lab.com 
 _ Open Lab s.r.l., Florence - Italy 
 */
function onYouTubeIframeAPIReady(){ytp.YTAPIReady||(ytp.YTAPIReady=!0,jQuery(document).trigger("YTAPIReady"))}function uncamel(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function setUnit(e,r){return"string"!=typeof e||e.match(/^[\-0-9\.]+jQuery/)?""+e+r:e}function setFilter(e,r,t){var a=uncamel(r),o=jQuery.browser.mozilla?"":jQuery.CSS.sfx;e[o+"filter"]=e[o+"filter"]||"",t=setUnit(t>jQuery.CSS.filters[r].max?jQuery.CSS.filters[r].max:t,jQuery.CSS.filters[r].unit),e[o+"filter"]+=a+"("+t+") ",delete e[r]}var ytp=ytp||{},getYTPVideoID=function(e){var r,t;return 0<e.indexOf("youtu.be")?r=(t=0<(r=e.substr(e.lastIndexOf("/")+1,e.length)).indexOf("?list=")?r.substr(r.lastIndexOf("="),r.length):null)?r.substr(0,r.lastIndexOf("?")):r:t=-1<e.indexOf("http")?(r=e.match(/[\\?&]v=([^&#]*)/)[1],0<e.indexOf("list=")?e.match(/[\\?&]list=([^&#]*)/)[1]:null):(r=15<e.length?null:e)?null:e,{videoID:r,playlistID:t}},nAgt=(!function(jQuery,ytp){jQuery.mbYTPlayer={name:"jquery.mb.YTPlayer",version:"3.0.11",build:"6092",author:"Matteo Bicocchi (pupunzi)",apiKey:"",defaults:{containment:"body",ratio:"auto",videoURL:null,playlistURL:null,startAt:0,stopAt:0,autoPlay:!0,vol:50,addRaster:!1,mask:!1,opacity:1,quality:"default",mute:!1,loop:!0,showControls:!0,showAnnotations:!1,showYTLogo:!0,stopMovieOnBlur:!0,realfullscreen:!0,mobileFallbackImage:null,gaTrack:!0,optimizeDisplay:!0,anchor:"center,center",onReady:function(e){},onError:function(e,r){}},controls:{play:"P",pause:"p",mute:"M",unmute:"A",onlyYT:"O",showSite:"R",ytLogo:"Y"},controlBar:null,loading:null,locationProtocol:"https:",filters:{grayscale:{value:0,unit:"%"},hue_rotate:{value:0,unit:"deg"},invert:{value:0,unit:"%"},opacity:{value:0,unit:"%"},saturate:{value:0,unit:"%"},sepia:{value:0,unit:"%"},brightness:{value:0,unit:"%"},contrast:{value:0,unit:"%"},blur:{value:0,unit:"px"}},buildPlayer:function(options){return this.each(function(){var YTPlayer=this,$YTPlayer=jQuery(YTPlayer),property=(YTPlayer.loop=0,YTPlayer.opt={},YTPlayer.state={},YTPlayer.filters=jQuery.mbYTPlayer.filters,YTPlayer.filtersEnabled=!0,YTPlayer.id=YTPlayer.id||"YTP_"+(new Date).getTime(),$YTPlayer.addClass("mb_YTPlayer"),$YTPlayer.data("property")&&"string"==typeof $YTPlayer.data("property")?eval("("+$YTPlayer.data("property")+")"):$YTPlayer.data("property")),isIframe=(void 0!==property&&void 0!==property.vol&&(property.vol=0===property.vol?property.vol=1:property.vol),jQuery.extend(YTPlayer.opt,jQuery.mbYTPlayer.defaults,options,property),YTPlayer.hasChanged||(YTPlayer.defaultOpt={},jQuery.extend(YTPlayer.defaultOpt,jQuery.mbYTPlayer.defaults,options)),"true"==YTPlayer.opt.loop&&(YTPlayer.opt.loop=9999),YTPlayer.isRetina=window.retina||1<window.devicePixelRatio,function(){var r=!1;try{self.location.href!=top.location.href&&(r=!0)}catch(e){r=!0}return r}),playerID=(YTPlayer.canGoFullScreen=!(jQuery.browser.msie||jQuery.browser.opera||isIframe()),YTPlayer.canGoFullScreen||(YTPlayer.opt.realfullscreen=!1),$YTPlayer.attr("id")||$YTPlayer.attr("id","ytp_"+(new Date).getTime()),"mbYTP_"+YTPlayer.id),playerVars=(YTPlayer.isAlone=!1,YTPlayer.hasFocus=!0,YTPlayer.videoID=this.opt.videoURL?getYTPVideoID(this.opt.videoURL).videoID:!!$YTPlayer.attr("href")&&getYTPVideoID($YTPlayer.attr("href")).videoID,YTPlayer.playlistID=this.opt.videoURL?getYTPVideoID(this.opt.videoURL).playlistID:!!$YTPlayer.attr("href")&&getYTPVideoID($YTPlayer.attr("href")).playlistID,YTPlayer.opt.showAnnotations=YTPlayer.opt.showAnnotations?"0":"3",{modestbranding:1,autoplay:0,controls:0,showinfo:0,rel:0,enablejsapi:1,version:3,playerapiid:playerID,origin:"*",allowfullscreen:!0,wmode:"transparent",iv_load_policy:YTPlayer.opt.showAnnotations}),isPlayer,overlay,wrapper,playerBox,tag;document.createElement("video").canPlayType&&jQuery.extend(playerVars,{html5:1}),jQuery.browser.msie&&jQuery.browser.version<9&&(this.opt.opacity=1),YTPlayer.isSelf="self"==YTPlayer.opt.containment,YTPlayer.defaultOpt.containment=YTPlayer.opt.containment=jQuery("self"==YTPlayer.opt.containment?this:YTPlayer.opt.containment),YTPlayer.isBackground=YTPlayer.opt.containment.is("body"),YTPlayer.isBackground&&ytp.backgroundIsInited||(isPlayer=YTPlayer.opt.containment.is(jQuery(this)),YTPlayer.canPlayOnMobile=isPlayer&&0===jQuery(this).children().length,YTPlayer.isPlayer=!1,isPlayer?YTPlayer.isPlayer=!0:$YTPlayer.hide(),overlay=jQuery("<div/>").css({position:"absolute",top:0,left:0,width:"100%",height:"100%"}).addClass("YTPOverlay"),YTPlayer.isPlayer&&overlay.on("click",function(){$YTPlayer.YTPTogglePlay()}),wrapper=jQuery("<div/>").addClass("mbYTP_wrapper").attr("id","wrapper_"+playerID),wrapper.css({position:"absolute",zIndex:0,minWidth:"100%",minHeight:"100%",left:0,top:0,overflow:"hidden",opacity:0}),playerBox=jQuery("<div/>").attr("id",playerID).addClass("playerBox"),playerBox.css({position:"absolute",zIndex:0,width:"100%",height:"100%",top:0,left:0,overflow:"hidden"}),wrapper.append(playerBox),YTPlayer.opt.containment.children().not("script, style").each(function(){"static"==jQuery(this).css("position")&&jQuery(this).css("position","relative")}),YTPlayer.isBackground?(jQuery("body").css({boxSizing:"border-box"}),wrapper.css({position:"fixed",top:0,left:0,zIndex:0}),$YTPlayer.hide()):"static"==YTPlayer.opt.containment.css("position")&&YTPlayer.opt.containment.css({position:"relative"}),YTPlayer.opt.containment.prepend(wrapper),YTPlayer.wrapper=wrapper,playerBox.css({opacity:1}),jQuery.browser.mobile||(playerBox.after(overlay),YTPlayer.overlay=overlay),YTPlayer.isBackground||overlay.on("mouseenter",function(){YTPlayer.controlBar&&YTPlayer.controlBar.length&&YTPlayer.controlBar.addClass("visible")}).on("mouseleave",function(){YTPlayer.controlBar&&YTPlayer.controlBar.length&&YTPlayer.controlBar.removeClass("visible")}),ytp.YTAPIReady?setTimeout(function(){jQuery(document).trigger("YTAPIReady")},100):(jQuery("#YTAPI").remove(),tag=jQuery("<script><\/script>").attr({src:jQuery.mbYTPlayer.locationProtocol+"//www.youtube.com/iframe_api?v="+jQuery.mbYTPlayer.version,id:"YTAPI"}),jQuery("head").prepend(tag)),jQuery.browser.mobile&&!YTPlayer.canPlayOnMobile?(YTPlayer.opt.mobileFallbackImage&&wrapper.css({backgroundImage:"url("+YTPlayer.opt.mobileFallbackImage+")",backgroundPosition:"center center",backgroundSize:"cover",backgroundRepeat:"no-repeat",opacity:1}),$YTPlayer.remove(),jQuery(document).trigger("YTPUnavailable")):(jQuery(document).on("YTAPIReady",function(){YTPlayer.isBackground&&ytp.backgroundIsInited||YTPlayer.isInit||(YTPlayer.isBackground&&(ytp.backgroundIsInited=!0),YTPlayer.opt.autoPlay=void 0===YTPlayer.opt.autoPlay?!!YTPlayer.isBackground:YTPlayer.opt.autoPlay,YTPlayer.opt.vol=YTPlayer.opt.vol||100,jQuery.mbYTPlayer.getDataFromAPI(YTPlayer),jQuery(YTPlayer).on("YTPChanged",function(){var h;YTPlayer.isInit||(YTPlayer.isInit=!0,jQuery.browser.mobile&&YTPlayer.canPlayOnMobile?(YTPlayer.opt.containment.outerWidth()>jQuery(window).width()&&(YTPlayer.opt.containment.css({maxWidth:"100%"}),h=.563*YTPlayer.opt.containment.outerWidth(),YTPlayer.opt.containment.css({maxHeight:h})),new YT.Player(playerID,{videoId:YTPlayer.videoID.toString(),width:"100%",height:h,playerVars:playerVars,events:{onReady:function(e){YTPlayer.player=e.target,playerBox.css({opacity:1}),YTPlayer.wrapper.css({opacity:1})}}})):new YT.Player(playerID,{videoId:YTPlayer.videoID.toString(),playerVars:playerVars,events:{onReady:function(e){YTPlayer.player=e.target,YTPlayer.isReady||(YTPlayer.isReady=!(YTPlayer.isPlayer&&!YTPlayer.opt.autoPlay),YTPlayer.playerEl=YTPlayer.player.getIframe(),jQuery(YTPlayer.playerEl).unselectable(),$YTPlayer.optimizeDisplay(),jQuery(window).off("resize.YTP_"+YTPlayer.id).on("resize.YTP_"+YTPlayer.id,function(){$YTPlayer.optimizeDisplay()}),jQuery.mbYTPlayer.checkForState(YTPlayer))},onStateChange:function(event){if("function"==typeof event.target.getPlayerState){var state=event.target.getPlayerState(),eventType;if(YTPlayer.preventTrigger)YTPlayer.preventTrigger=!1;else{switch(YTPlayer.state=state,state){case-1:eventType="YTPUnstarted";break;case 0:eventType="YTPEnd";break;case 1:eventType="YTPPlay",YTPlayer.controlBar.length&&YTPlayer.controlBar.find(".mb_YTPPlaypause").html(jQuery.mbYTPlayer.controls.pause),"undefined"!=typeof _gaq&&eval(YTPlayer.opt.gaTrack)&&_gaq.push(["_trackEvent","YTPlayer","Play",YTPlayer.hasData?YTPlayer.videoData.title:YTPlayer.videoID.toString()]),"undefined"!=typeof ga&&eval(YTPlayer.opt.gaTrack)&&ga("send","event","YTPlayer","play",YTPlayer.hasData?YTPlayer.videoData.title:YTPlayer.videoID.toString());break;case 2:eventType="YTPPause",YTPlayer.controlBar.length&&YTPlayer.controlBar.find(".mb_YTPPlaypause").html(jQuery.mbYTPlayer.controls.play);break;case 3:YTPlayer.player.setPlaybackQuality(YTPlayer.opt.quality),eventType="YTPBuffering",YTPlayer.controlBar.length&&YTPlayer.controlBar.find(".mb_YTPPlaypause").html(jQuery.mbYTPlayer.controls.play);break;case 5:eventType="YTPCued"}var YTPEvent=jQuery.Event(eventType);YTPEvent.time=YTPlayer.currentTime,YTPlayer.canTrigger&&jQuery(YTPlayer).trigger(YTPEvent)}}},onPlaybackQualityChange:function(e){var e=e.target.getPlaybackQuality(),r=jQuery.Event("YTPQualityChange");r.quality=e,jQuery(YTPlayer).trigger(r)},onError:function(e){150==e.data&&(console.log("Embedding this video is restricted by Youtube."),YTPlayer.isPlayList)&&jQuery(YTPlayer).playNext(),2==e.data&&YTPlayer.isPlayList&&jQuery(YTPlayer).playNext(),"function"==typeof YTPlayer.opt.onError&&YTPlayer.opt.onError($YTPlayer,e)}}}))}))}),$YTPlayer.off("YTPTime.mask"),jQuery.mbYTPlayer.applyMask(YTPlayer)))})},getDataFromAPI:function(a){var e;a.videoData=jQuery.mbStorage.get("YTPlayer_data_"+a.videoID),jQuery(a).off("YTPData.YTPlayer").on("YTPData.YTPlayer",function(){var e;a.hasData&&a.isPlayer&&!a.opt.autoPlay&&(e=a.videoData.thumb_max||a.videoData.thumb_high||a.videoData.thumb_medium,a.opt.containment.css({background:"rgba(0,0,0,0.5) url("+e+") center center",backgroundSize:"cover"}),a.opt.backgroundUrl=e)}),a.videoData?(setTimeout(function(){a.opt.ratio="auto"==a.opt.ratio?"16/9":a.opt.ratio,a.dataReceived=!0,jQuery(a).trigger("YTPChanged");var e,r=jQuery.Event("YTPData");for(e in r.prop={},a.videoData)r.prop[e]=a.videoData[e];jQuery(a).trigger(r)},500),a.hasData=!0):jQuery.mbYTPlayer.apiKey?jQuery.getJSON(jQuery.mbYTPlayer.locationProtocol+"//www.googleapis.com/youtube/v3/videos?id="+a.videoID+"&key="+jQuery.mbYTPlayer.apiKey+"&part=snippet",function(e){a.dataReceived=!0,jQuery(a).trigger("YTPChanged"),e=e.items[0].snippet,a.videoData={},a.videoData.id=a.videoID,a.videoData.channelTitle=e.channelTitle,a.videoData.title=e.title,a.videoData.description=e.description.length<400?e.description:e.description.substring(0,400)+" ...",a.videoData.aspectratio="auto"==a.opt.ratio?"16/9":a.opt.ratio,a.opt.ratio=a.videoData.aspectratio,a.videoData.thumb_max=e.thumbnails.maxres?e.thumbnails.maxres.url:null,a.videoData.thumb_high=e.thumbnails.high?e.thumbnails.high.url:null,a.videoData.thumb_medium=e.thumbnails.medium?e.thumbnails.medium.url:null,jQuery.mbStorage.set("YTPlayer_data_"+a.videoID,a.videoData),a.hasData=!0;var r,t=jQuery.Event("YTPData");for(r in t.prop={},a.videoData)t.prop[r]=a.videoData[r];jQuery(a).trigger(t)}):(setTimeout(function(){jQuery(a).trigger("YTPChanged")},50),a.isPlayer&&!a.opt.autoPlay&&(e=jQuery.mbYTPlayer.locationProtocol+"//i.ytimg.com/vi/"+a.videoID+"/hqdefault.jpg",a.opt.containment.css({background:"rgba(0,0,0,0.5) url("+e+") center center",backgroundSize:"cover"}),a.opt.backgroundUrl=e),a.videoData=null,a.opt.ratio="auto"==a.opt.ratio?"16/9":a.opt.ratio),!a.isPlayer||a.opt.autoPlay||jQuery.browser.mobile||(a.loading=jQuery("<div/>").addClass("loading").html("Loading").hide(),jQuery(a).append(a.loading),a.loading.fadeIn())},removeStoredData:function(){jQuery.mbStorage.remove()},getVideoData:function(){return this.get(0).videoData},getVideoID:function(){return this.get(0).videoID||!1},setVideoQuality:function(e){this.get(0).player.setPlaybackQuality(e)},playlist:function(e,r,t,a){var o=this.get(0);return o.isPlayList=!0,r&&(e=jQuery.shuffle(e)),o.videoID||(o.videos=e,o.videoCounter=0,o.videoLength=e.length,jQuery(o).data("property",e[0]),jQuery(o).mb_YTPlayer()),"function"==typeof t&&jQuery(o).one("YTPChanged",function(){t(o)}),jQuery(o).on("YTPEnd",function(){a=void 0===a||a,jQuery(o).playNext(a)}),this},playNext:function(e){var r=this.get(0);return r.checkForStartAt&&(clearTimeout(r.checkForStartAt),clearInterval(r.getState)),r.videoCounter++,r.videoCounter>=r.videoLength&&e&&(r.videoCounter=0),r.videoCounter<r.videoLength?jQuery(r).YTPChangeMovie(r.videos[r.videoCounter]):r.videoCounter--,this},playPrev:function(){var e=this.get(0);return e.checkForStartAt&&(clearInterval(e.checkForStartAt),clearInterval(e.getState)),e.videoCounter--,e.videoCounter<0&&(e.videoCounter=e.videoLength-1),jQuery(e).YTPChangeMovie(e.videos[e.videoCounter]),this},playIndex:function(e){var r=this.get(0);return--e,r.checkForStartAt&&(clearInterval(r.checkForStartAt),clearInterval(r.getState)),r.videoCounter=e,r.videoCounter>=r.videoLength-1&&(r.videoCounter=r.videoLength-1),jQuery(r).YTPChangeMovie(r.videos[r.videoCounter]),this},changeMovie:function(e){var r=this.get(0);r.opt.startAt=0,r.opt.stopAt=0,r.opt.mask=!1,r.opt.mute=!0,r.hasData=!1,r.hasChanged=!0,r.player.loopTime=void 0,e&&jQuery.extend(r.opt,e),r.videoID=getYTPVideoID(r.opt.videoURL).videoID,"true"==r.opt.loop&&(r.opt.loop=9999),jQuery(r.playerEl).CSSAnimate({opacity:0},200,function(){var e=jQuery.Event("YTPChangeMovie");e.time=r.currentTime,e.videoId=r.videoID,jQuery(r).trigger(e),jQuery(r).YTPGetPlayer().cueVideoByUrl(encodeURI(jQuery.mbYTPlayer.locationProtocol+"//www.youtube.com/v/"+r.videoID),1,r.opt.quality),jQuery(r).optimizeDisplay(),jQuery.mbYTPlayer.checkForState(r),jQuery.mbYTPlayer.getDataFromAPI(r)}),jQuery.mbYTPlayer.applyMask(r)},getPlayer:function(){return jQuery(this).get(0).player},playerDestroy:function(){var e=this.get(0);return ytp.YTAPIReady=!0,ytp.backgroundIsInited=!1,e.isInit=!1,e.videoID=null,e.isReady=!1,e.wrapper.remove(),jQuery("#controlBar_"+e.id).remove(),clearInterval(e.checkForStartAt),clearInterval(e.getState),this},fullscreen:function(real){function hideMouse(){YTPlayer.overlay.css({cursor:"none"})}function RunPrefixMethod(e,r){for(var t,a,o=["webkit","moz","ms","o",""],i=0;i<o.length&&!e[t];){if(t=r,""==o[i]&&(t=t.substr(0,1).toLowerCase()+t.substr(1)),"undefined"!=(a=typeof e[t=o[i]+t]))return o=[o[i]],"function"==a?e[t]():e[t];i++}}function launchFullscreen(e){RunPrefixMethod(e,"RequestFullScreen")}function cancelFullscreen(){(RunPrefixMethod(document,"FullScreen")||RunPrefixMethod(document,"IsFullScreen"))&&RunPrefixMethod(document,"CancelFullScreen")}var YTPlayer=this.get(0),controls=(void 0===real&&(real=YTPlayer.opt.realfullscreen),real=eval(real),jQuery("#controlBar_"+YTPlayer.id)),fullScreenBtn=controls.find(".mb_OnlyYT"),videoWrapper=YTPlayer.isSelf?YTPlayer.opt.containment:YTPlayer.wrapper,fullscreenchange;return real&&(fullscreenchange=jQuery.browser.mozilla?"mozfullscreenchange":jQuery.browser.webkit?"webkitfullscreenchange":"fullscreenchange",jQuery(document).off(fullscreenchange).on(fullscreenchange,function(){RunPrefixMethod(document,"IsFullScreen")||RunPrefixMethod(document,"FullScreen")?(jQuery(YTPlayer).YTPSetVideoQuality("default"),jQuery(YTPlayer).trigger("YTPFullScreenStart")):(YTPlayer.isAlone=!1,fullScreenBtn.html(jQuery.mbYTPlayer.controls.onlyYT),jQuery(YTPlayer).YTPSetVideoQuality(YTPlayer.opt.quality),videoWrapper.removeClass("YTPFullscreen"),videoWrapper.CSSAnimate({opacity:YTPlayer.opt.opacity},500),videoWrapper.css({zIndex:0}),YTPlayer.isBackground?jQuery("body").after(controls):YTPlayer.wrapper.before(controls),jQuery(window).resize(),jQuery(YTPlayer).trigger("YTPFullScreenEnd"))})),YTPlayer.isAlone?(jQuery(document).off("mousemove.YTPlayer"),clearTimeout(YTPlayer.hideCursor),YTPlayer.overlay.css({cursor:"auto"}),real?cancelFullscreen():(videoWrapper.CSSAnimate({opacity:YTPlayer.opt.opacity},500),videoWrapper.css({zIndex:0})),fullScreenBtn.html(jQuery.mbYTPlayer.controls.onlyYT),YTPlayer.isAlone=!1):(jQuery(document).on("mousemove.YTPlayer",function(e){YTPlayer.overlay.css({cursor:"auto"}),clearTimeout(YTPlayer.hideCursor),jQuery(e.target).parents().is(".mb_YTPBar")||(YTPlayer.hideCursor=setTimeout(hideMouse,3e3))}),hideMouse(),real?(videoWrapper.css({opacity:0}),videoWrapper.addClass("YTPFullscreen"),launchFullscreen(videoWrapper.get(0)),setTimeout(function(){videoWrapper.CSSAnimate({opacity:1},1e3),YTPlayer.wrapper.append(controls),jQuery(YTPlayer).optimizeDisplay(),YTPlayer.player.seekTo(YTPlayer.player.getCurrentTime()+.1,!0)},500)):videoWrapper.css({zIndex:1e4}).CSSAnimate({opacity:1},1e3),fullScreenBtn.html(jQuery.mbYTPlayer.controls.showSite),YTPlayer.isAlone=!0),this},toggleLoops:function(){var e=this.get(0),r=e.opt;return 1==r.loop?r.loop=0:(r.startAt?e.player.seekTo(r.startAt):e.player.playVideo(),r.loop=1),this},play:function(){var e=this.get(0);return e.isReady&&(e.player.playVideo(),e.wrapper.CSSAnimate({opacity:e.isAlone?1:e.opt.opacity},2e3),jQuery(e.playerEl).CSSAnimate({opacity:1},1e3),jQuery("#controlBar_"+e.id).find(".mb_YTPPlaypause").html(jQuery.mbYTPlayer.controls.pause),e.state=1,jQuery(e).css("background-image","none")),this},togglePlay:function(e){var r=this.get(0);return 1==r.state?this.YTPPause():this.YTPPlay(),"function"==typeof e&&e(r.state),this},stop:function(){var e=this.get(0);return jQuery("#controlBar_"+e.id).find(".mb_YTPPlaypause").html(jQuery.mbYTPlayer.controls.play),e.player.stopVideo(),this},pause:function(){var e=this.get(0);return e.player.pauseVideo(),e.state=2,this},seekTo:function(e){return this.get(0).player.seekTo(e,!0),this},setVolume:function(e){var r=this.get(0);return e||r.opt.vol||0!=r.player.getVolume()?!e&&0<r.player.getVolume()||e&&r.opt.vol==e?r.isMute?jQuery(r).YTPUnmute():jQuery(r).YTPMute():(r.opt.vol=e,r.player.setVolume(r.opt.vol),r.volumeBar&&r.volumeBar.length&&r.volumeBar.updateSliderVal(e)):jQuery(r).YTPUnmute(),this},toggleVolume:function(){var e=this.get(0);if(e)return e.player.isMuted()?(jQuery(e).YTPUnmute(),!0):(jQuery(e).YTPMute(),!1)},mute:function(){var e,r=this.get(0);if(!r.isMute)return r.player.mute(),r.isMute=!0,r.player.setVolume(0),r.volumeBar&&r.volumeBar.length&&10<r.volumeBar.width()&&r.volumeBar.updateSliderVal(0),jQuery("#controlBar_"+r.id).find(".mb_YTPMuteUnmute").html(jQuery.mbYTPlayer.controls.unmute),jQuery(r).addClass("isMuted"),r.volumeBar&&r.volumeBar.length&&r.volumeBar.addClass("muted"),(e=jQuery.Event("YTPMuted")).time=r.currentTime,r.canTrigger&&jQuery(r).trigger(e),this},unmute:function(){var e,r=this.get(0);if(r.isMute)return r.player.unMute(),r.isMute=!1,r.player.setVolume(r.opt.vol),r.volumeBar&&r.volumeBar.length&&r.volumeBar.updateSliderVal(10<r.opt.vol?r.opt.vol:10),jQuery("#controlBar_"+r.id).find(".mb_YTPMuteUnmute").html(jQuery.mbYTPlayer.controls.mute),jQuery(r).removeClass("isMuted"),r.volumeBar&&r.volumeBar.length&&r.volumeBar.removeClass("muted"),(e=jQuery.Event("YTPUnmuted")).time=r.currentTime,r.canTrigger&&jQuery(r).trigger(e),this},applyFilter:function(e,r){return this.each(function(){this.filters[e].value=r,this.filtersEnabled&&jQuery(this).YTPEnableFilters()})},applyFilters:function(t){return this.each(function(){var e=this;if(e.isReady){for(var r in t)jQuery(e).YTPApplyFilter(r,t[r]);jQuery(e).trigger("YTPFiltersApplied")}else jQuery(e).on("YTPReady",function(){jQuery(e).YTPApplyFilters(t)})})},toggleFilter:function(e,r){return this.each(function(){this.filters[e].value?this.filters[e].value=0:this.filters[e].value=r,this.filtersEnabled&&jQuery(this).YTPEnableFilters()})},toggleFilters:function(r){return this.each(function(){var e=this;e.filtersEnabled?(jQuery(e).trigger("YTPDisableFilters"),jQuery(e).YTPDisableFilters()):(jQuery(e).YTPEnableFilters(),jQuery(e).trigger("YTPEnableFilters")),"function"==typeof r&&r(e.filtersEnabled)})},disableFilters:function(){return this.each(function(){var e=jQuery(this.playerEl);e.css("-webkit-filter",""),e.css("filter",""),this.filtersEnabled=!1})},enableFilters:function(){return this.each(function(){var e,r=this,t=jQuery(r.playerEl),a="";for(e in r.filters)r.filters[e].value&&(a+=e.replace("_","-")+"("+r.filters[e].value+r.filters[e].unit+") ");t.css("-webkit-filter",a),t.css("filter",a),r.filtersEnabled=!0})},removeFilter:function(r,t){return this.each(function(){if("function"==typeof r&&(t=r,r=null),r)jQuery(this).YTPApplyFilter(r,0),"function"==typeof t&&t(r);else for(var e in this.filters)jQuery(this).YTPApplyFilter(e,0),"function"==typeof t&&t(e)})},getFilters:function(){return this.get(0).filters},addMask:function(e){var r=this.get(0),t=r.overlay,a=(e=e||r.actualMask,jQuery("<img/>").attr("src",e).on("load",function(){t.CSSAnimate({opacity:0},500,function(){r.hasMask=!0,a.remove(),t.css({backgroundImage:"url("+e+")",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"cover"}),t.CSSAnimate({opacity:1},500)})}));return this},removeMask:function(){var e=this.get(0),r=e.overlay;return r.CSSAnimate({opacity:0},500,function(){e.hasMask=!1,r.css({backgroundImage:"",backgroundRepeat:"",backgroundPosition:"",backgroundSize:""}),r.CSSAnimate({opacity:1},500)}),this},applyMask:function(t){var a=jQuery(t);if(a.off("YTPTime.mask"),t.opt.mask)if("string"==typeof t.opt.mask)a.YTPAddMask(t.opt.mask),t.actualMask=t.opt.mask;else if("object"==typeof t.opt.mask){for(var e in t.opt.mask)t.opt.mask[e]&&jQuery("<img/>").attr("src",t.opt.mask[e]);t.opt.mask[0]&&a.YTPAddMask(t.opt.mask[0]),a.on("YTPTime.mask",function(e){for(var r in t.opt.mask)e.time==r&&(t.opt.mask[r]?(a.YTPAddMask(t.opt.mask[r]),t.actualMask=t.opt.mask[r]):a.YTPRemoveMask())})}},toggleMask:function(){var e=this.get(0),r=$(e);return e.hasMask?r.YTPRemoveMask():r.YTPAddMask(),this},manageProgress:function(){var e=this.get(0),r=jQuery("#controlBar_"+e.id),t=r.find(".mb_YTPProgress"),a=r.find(".mb_YTPLoaded"),r=r.find(".mb_YTPseekbar"),t=t.outerWidth(),o=Math.floor(e.player.getCurrentTime()),i=Math.floor(e.player.getDuration()),t=o*t/i,e=100*e.player.getVideoLoadedFraction();return a.css({left:0,width:e+"%"}),r.css({left:0,width:t}),{totalTime:i,currentTime:o}},buildControls:function(YTPlayer){var data=YTPlayer.opt,buttonBar,playpause,MuteUnmute,volumeBar,idx,vURL,movieUrl,onlyVideo,progressBar,loadedBar,timeBar;data.showYTLogo=data.showYTLogo||data.printUrl,jQuery("#controlBar_"+YTPlayer.id).length||(YTPlayer.controlBar=jQuery("<span/>").attr("id","controlBar_"+YTPlayer.id).addClass("mb_YTPBar").css({whiteSpace:"noWrap",position:YTPlayer.isBackground?"fixed":"absolute",zIndex:YTPlayer.isBackground?1e4:1e3}).hide(),buttonBar=jQuery("<div/>").addClass("buttonBar"),playpause=jQuery("<span>"+jQuery.mbYTPlayer.controls.play+"</span>").addClass("mb_YTPPlaypause ytpicon").click(function(){1==YTPlayer.player.getPlayerState()?jQuery(YTPlayer).YTPPause():jQuery(YTPlayer).YTPPlay()}),MuteUnmute=jQuery("<span>"+jQuery.mbYTPlayer.controls.mute+"</span>").addClass("mb_YTPMuteUnmute ytpicon").click(function(){0==YTPlayer.player.getVolume()?jQuery(YTPlayer).YTPUnmute():jQuery(YTPlayer).YTPMute()}),volumeBar=jQuery("<div/>").addClass("mb_YTPVolumeBar").css({display:"inline-block"}),YTPlayer.volumeBar=volumeBar,idx=jQuery("<span/>").addClass("mb_YTPTime"),vURL=data.videoURL||"",vURL.indexOf("http")<0&&(vURL=jQuery.mbYTPlayer.locationProtocol+"//www.youtube.com/watch?v="+data.videoURL),movieUrl=jQuery("<span/>").html(jQuery.mbYTPlayer.controls.ytLogo).addClass("mb_YTPUrl ytpicon").attr("title","view on YouTube").on("click",function(){window.open(vURL,"viewOnYT")}),onlyVideo=jQuery("<span/>").html(jQuery.mbYTPlayer.controls.onlyYT).addClass("mb_OnlyYT ytpicon").on("click",function(){jQuery(YTPlayer).YTPFullscreen(data.realfullscreen)}),progressBar=jQuery("<div/>").addClass("mb_YTPProgress").css("position","absolute").click(function(e){timeBar.css({width:e.clientX-timeBar.offset().left}),YTPlayer.timeW=e.clientX-timeBar.offset().left,YTPlayer.controlBar.find(".mb_YTPLoaded").css({width:0});e=Math.floor(YTPlayer.player.getDuration());YTPlayer.goto=timeBar.outerWidth()*e/progressBar.outerWidth(),YTPlayer.player.seekTo(parseFloat(YTPlayer.goto),!0),YTPlayer.controlBar.find(".mb_YTPLoaded").css({width:0})}),loadedBar=jQuery("<div/>").addClass("mb_YTPLoaded").css("position","absolute"),timeBar=jQuery("<div/>").addClass("mb_YTPseekbar").css("position","absolute"),progressBar.append(loadedBar).append(timeBar),buttonBar.append(playpause).append(MuteUnmute).append(volumeBar).append(idx),data.showYTLogo&&buttonBar.append(movieUrl),(YTPlayer.isBackground||eval(YTPlayer.opt.realfullscreen)&&!YTPlayer.isBackground)&&buttonBar.append(onlyVideo),YTPlayer.controlBar.append(buttonBar).append(progressBar),YTPlayer.isBackground?jQuery("body").after(YTPlayer.controlBar):(YTPlayer.controlBar.addClass("inlinePlayer"),YTPlayer.wrapper.before(YTPlayer.controlBar)),volumeBar.simpleSlider({initialval:YTPlayer.opt.vol,scale:100,orientation:"h",callback:function(e){0==e.value?jQuery(YTPlayer).YTPMute():jQuery(YTPlayer).YTPUnmute(),YTPlayer.player.setVolume(e.value),YTPlayer.isMute||(YTPlayer.opt.vol=e.value)}}))},checkForState:function(YTPlayer){var interval=YTPlayer.opt.showControls?100:400;return clearInterval(YTPlayer.getState),jQuery.contains(document,YTPlayer)?(jQuery.mbYTPlayer.checkForStart(YTPlayer),void(YTPlayer.getState=setInterval(function(){var prog=jQuery(YTPlayer).YTPManageProgress(),$YTPlayer=jQuery(YTPlayer),data=YTPlayer.opt,startAt=YTPlayer.opt.startAt||1,stopAt=YTPlayer.opt.stopAt>YTPlayer.opt.startAt?YTPlayer.opt.stopAt:0,YTPEvent,stopAt=stopAt<YTPlayer.player.getDuration()?stopAt:0,YTPEnd;if(YTPlayer.currentTime!=prog.currentTime&&(YTPEvent=jQuery.Event("YTPTime"),YTPEvent.time=YTPlayer.currentTime,jQuery(YTPlayer).trigger(YTPEvent)),YTPlayer.currentTime=prog.currentTime,YTPlayer.totalTime=YTPlayer.player.getDuration(),0==YTPlayer.player.getVolume()?$YTPlayer.addClass("isMuted"):$YTPlayer.removeClass("isMuted"),YTPlayer.opt.showControls&&(prog.totalTime?YTPlayer.controlBar.find(".mb_YTPTime").html(jQuery.mbYTPlayer.formatTime(prog.currentTime)+" / "+jQuery.mbYTPlayer.formatTime(prog.totalTime)):YTPlayer.controlBar.find(".mb_YTPTime").html("-- : -- / -- : --")),eval(YTPlayer.opt.stopMovieOnBlur)&&(document.hasFocus()?document.hasFocus()&&!YTPlayer.hasFocus&&-1!=YTPlayer.state&&0!=YTPlayer.state&&(YTPlayer.hasFocus=!0,$YTPlayer.YTPPlay()):1==YTPlayer.state&&(YTPlayer.hasFocus=!1,$YTPlayer.YTPPause())),YTPlayer.controlBar.length&&YTPlayer.controlBar.outerWidth()<=400&&!YTPlayer.isCompact?(YTPlayer.controlBar.addClass("compact"),YTPlayer.isCompact=!0,!YTPlayer.isMute&&YTPlayer.volumeBar&&YTPlayer.volumeBar.updateSliderVal(YTPlayer.opt.vol)):YTPlayer.controlBar.length&&400<YTPlayer.controlBar.outerWidth()&&YTPlayer.isCompact&&(YTPlayer.controlBar.removeClass("compact"),YTPlayer.isCompact=!1,!YTPlayer.isMute)&&YTPlayer.volumeBar&&YTPlayer.volumeBar.updateSliderVal(YTPlayer.opt.vol),1==YTPlayer.player.getPlayerState()&&(parseFloat(YTPlayer.player.getDuration()-1.5)<YTPlayer.player.getCurrentTime()||0<stopAt&&parseFloat(YTPlayer.player.getCurrentTime())>stopAt)&&!YTPlayer.isEnded){if(YTPlayer.isEnded=!0,setTimeout(function(){YTPlayer.isEnded=!1},1e3),YTPlayer.isPlayList){if(!data.loop||0<data.loop&&YTPlayer.player.loopTime===data.loop-1)return YTPlayer.player.loopTime=void 0,clearInterval(YTPlayer.getState),YTPEnd=jQuery.Event("YTPEnd"),YTPEnd.time=YTPlayer.currentTime,void jQuery(YTPlayer).trigger(YTPEnd)}else if(!data.loop||0<data.loop&&YTPlayer.player.loopTime===data.loop-1)return YTPlayer.player.loopTime=void 0,YTPlayer.preventTrigger=!0,YTPlayer.state=2,jQuery(YTPlayer).YTPPause(),void YTPlayer.wrapper.CSSAnimate({opacity:0},500,function(){YTPlayer.controlBar.length&&YTPlayer.controlBar.find(".mb_YTPPlaypause").html(jQuery.mbYTPlayer.controls.play);var e=jQuery.Event("YTPEnd");e.time=YTPlayer.currentTime,jQuery(YTPlayer).trigger(e),YTPlayer.player.seekTo(startAt,!0),YTPlayer.isBackground||YTPlayer.opt.containment.css({background:"rgba(0,0,0,0.5) url("+YTPlayer.opt.backgroundUrl+") center center",backgroundSize:"cover"})});YTPlayer.player.loopTime=YTPlayer.player.loopTime?++YTPlayer.player.loopTime:1,startAt=startAt||1,YTPlayer.preventTrigger=!0,YTPlayer.state=2,jQuery(YTPlayer).YTPPause(),YTPlayer.player.seekTo(startAt,!0),$YTPlayer.YTPPlay()}},interval))):(jQuery(YTPlayer).YTPPlayerDestroy(),clearInterval(YTPlayer.getState),void clearInterval(YTPlayer.checkForStartAt))},getTime:function(){var e=this.get(0);return jQuery.mbYTPlayer.formatTime(e.currentTime)},getTotalTime:function(){var e=this.get(0);return jQuery.mbYTPlayer.formatTime(e.totalTime)},checkForStart:function(r){var e,t,a=jQuery(r);jQuery.contains(document,r)?(r.preventTrigger=!0,r.state=2,jQuery(r).YTPPause(),jQuery(r).muteYTPVolume(),jQuery("#controlBar_"+r.id).remove(),r.controlBar=!1,r.opt.showControls&&jQuery.mbYTPlayer.buildControls(r),r.opt.addRaster?(e="dot"==r.opt.addRaster?"raster-dot":"raster",r.overlay.addClass(r.isRetina?e+" retina":e)):r.overlay.removeClass(function(e,r){var r=r.split(" "),t=[];return jQuery.each(r,function(e,r){/raster.*/.test(r)&&t.push(r)}),t.push("retina"),t.join(" ")}),t=r.opt.startAt||1,r.player.playVideo(),r.player.seekTo(t,!0),r.checkForStartAt=setInterval(function(){jQuery(r).YTPMute();var e=r.player.getVideoLoadedFraction()>=t/r.player.getDuration();0<r.player.getDuration()&&r.player.getCurrentTime()>=t&&e?(clearInterval(r.checkForStartAt),"function"==typeof r.opt.onReady&&r.opt.onReady(r),r.isReady=!0,(e=jQuery.Event("YTPReady")).time=r.currentTime,jQuery(r).trigger(e),r.preventTrigger=!0,r.state=2,jQuery(r).YTPPause(),r.opt.mute||jQuery(r).YTPUnmute(),r.canTrigger=!0,r.opt.autoPlay?((e=jQuery.Event("YTPStart")).time=r.currentTime,jQuery(r).trigger(e),a.css("background-image","none"),jQuery(r.playerEl).CSSAnimate({opacity:1},1e3),a.YTPPlay(),r.wrapper.CSSAnimate({opacity:r.isAlone?1:r.opt.opacity},1e3),jQuery.browser.safari&&(r.safariPlay=setInterval(function(){1!=r.state?a.YTPPlay():clearInterval(r.safariPlay)},10)),a.on("YTPReady",function(){a.YTPPlay()})):(r.player.pauseVideo(),r.isPlayer||(jQuery(r.playerEl).CSSAnimate({opacity:1},500),r.wrapper.CSSAnimate({opacity:r.isAlone?1:r.opt.opacity},500)),r.controlBar.length&&r.controlBar.find(".mb_YTPPlaypause").html(jQuery.mbYTPlayer.controls.play)),r.isPlayer&&!r.opt.autoPlay&&r.loading&&r.loading.length&&(r.loading.html("Ready"),setTimeout(function(){r.loading.fadeOut()},100)),r.controlBar&&r.controlBar.length&&r.controlBar.slideDown(1e3)):jQuery.browser.safari&&(r.player.playVideo(),0<=t)&&r.player.seekTo(t,!0)},1)):jQuery(r).YTPPlayerDestroy()},setAnchor:function(e){this.optimizeDisplay(e)},getAnchor:function(){return this.get(0).opt.anchor},formatTime:function(e){var r=Math.floor(e/60),e=Math.floor(e-60*r);return(r<=9?"0"+r:r)+" : "+(e<=9?"0"+e:e)}},jQuery.fn.optimizeDisplay=function(e){var r=this.get(0),t=jQuery(r.playerEl),a={},o=(r.opt.anchor=e||r.opt.anchor,r.opt.anchor="undefined "!=typeof r.opt.anchor?r.opt.anchor:"center,center",r.opt.anchor.split(","));if(r.opt.optimizeDisplay){var i,e=r.isPlayer?0:80,n={},l=r.wrapper,s=(n.width=l.outerWidth(),n.height=l.outerHeight()+e,a.width=n.width,a.height="16/9"==r.opt.ratio?Math.ceil(a.width*(9/16)):Math.ceil(.75*a.width),a.marginTop=-(a.height-n.height)/2,a.marginLeft=0,a.height<n.height);for(i in s&&(a.height=n.height,a.width="16/9"==r.opt.ratio?Math.floor(a.height*(16/9)):Math.floor(a.height*(4/3)),a.marginTop=0,a.marginLeft=-(a.width-n.width)/2),o)if(o.hasOwnProperty(i))switch(o[i].replace(/ /g,"")){case"top":a.marginTop=s?-(a.height-n.height)/2:0;break;case"bottom":a.marginTop=s?0:-(a.height-n.height);break;case"left":a.marginLeft=0;break;case"right":a.marginLeft=s?-(a.width-n.width):0;break;default:n.width<a.width&&(a.marginLeft=-(a.width-n.width)/2)}}else a.width="100%",a.height="100%",a.marginTop=0,a.marginLeft=0;t.css({width:a.width,height:a.height,marginTop:a.marginTop,marginLeft:a.marginLeft,maxWidth:"initial"})},jQuery.shuffle=function(e){for(var r=e.slice(),t=r.length,a=t;a--;){var o=parseInt(Math.random()*t),i=r[a];r[a]=r[o],r[o]=i}return r},jQuery.fn.unselectable=function(){return this.each(function(){jQuery(this).css({"-moz-user-select":"none","-webkit-user-select":"none","user-select":"none"}).attr("unselectable","on")})},jQuery.fn.YTPlayer=jQuery.mbYTPlayer.buildPlayer,jQuery.fn.YTPGetPlayer=jQuery.mbYTPlayer.getPlayer,jQuery.fn.YTPGetVideoID=jQuery.mbYTPlayer.getVideoID,jQuery.fn.YTPChangeMovie=jQuery.mbYTPlayer.changeMovie,jQuery.fn.YTPPlayerDestroy=jQuery.mbYTPlayer.playerDestroy,jQuery.fn.YTPPlay=jQuery.mbYTPlayer.play,jQuery.fn.YTPTogglePlay=jQuery.mbYTPlayer.togglePlay,jQuery.fn.YTPStop=jQuery.mbYTPlayer.stop,jQuery.fn.YTPPause=jQuery.mbYTPlayer.pause,jQuery.fn.YTPSeekTo=jQuery.mbYTPlayer.seekTo,jQuery.fn.YTPlaylist=jQuery.mbYTPlayer.playlist,jQuery.fn.YTPPlayNext=jQuery.mbYTPlayer.playNext,jQuery.fn.YTPPlayPrev=jQuery.mbYTPlayer.playPrev,jQuery.fn.YTPPlayIndex=jQuery.mbYTPlayer.playIndex,jQuery.fn.YTPMute=jQuery.mbYTPlayer.mute,jQuery.fn.YTPUnmute=jQuery.mbYTPlayer.unmute,jQuery.fn.YTPToggleVolume=jQuery.mbYTPlayer.toggleVolume,jQuery.fn.YTPSetVolume=jQuery.mbYTPlayer.setVolume,jQuery.fn.YTPGetVideoData=jQuery.mbYTPlayer.getVideoData,jQuery.fn.YTPFullscreen=jQuery.mbYTPlayer.fullscreen,jQuery.fn.YTPToggleLoops=jQuery.mbYTPlayer.toggleLoops,jQuery.fn.YTPSetVideoQuality=jQuery.mbYTPlayer.setVideoQuality,jQuery.fn.YTPManageProgress=jQuery.mbYTPlayer.manageProgress,jQuery.fn.YTPApplyFilter=jQuery.mbYTPlayer.applyFilter,jQuery.fn.YTPApplyFilters=jQuery.mbYTPlayer.applyFilters,jQuery.fn.YTPToggleFilter=jQuery.mbYTPlayer.toggleFilter,jQuery.fn.YTPToggleFilters=jQuery.mbYTPlayer.toggleFilters,jQuery.fn.YTPRemoveFilter=jQuery.mbYTPlayer.removeFilter,jQuery.fn.YTPDisableFilters=jQuery.mbYTPlayer.disableFilters,jQuery.fn.YTPEnableFilters=jQuery.mbYTPlayer.enableFilters,jQuery.fn.YTPGetFilters=jQuery.mbYTPlayer.getFilters,jQuery.fn.YTPGetTime=jQuery.mbYTPlayer.getTime,jQuery.fn.YTPGetTotalTime=jQuery.mbYTPlayer.getTotalTime,jQuery.fn.YTPAddMask=jQuery.mbYTPlayer.addMask,jQuery.fn.YTPRemoveMask=jQuery.mbYTPlayer.removeMask,jQuery.fn.YTPToggleMask=jQuery.mbYTPlayer.toggleMask,jQuery.fn.YTPSetAnchor=jQuery.mbYTPlayer.setAnchor,jQuery.fn.YTPGetAnchor=jQuery.mbYTPlayer.getAnchor,jQuery.fn.mb_YTPlayer=jQuery.mbYTPlayer.buildPlayer,jQuery.fn.playNext=jQuery.mbYTPlayer.playNext,jQuery.fn.playPrev=jQuery.mbYTPlayer.playPrev,jQuery.fn.changeMovie=jQuery.mbYTPlayer.changeMovie,jQuery.fn.getVideoID=jQuery.mbYTPlayer.getVideoID,jQuery.fn.getPlayer=jQuery.mbYTPlayer.getPlayer,jQuery.fn.playerDestroy=jQuery.mbYTPlayer.playerDestroy,jQuery.fn.fullscreen=jQuery.mbYTPlayer.fullscreen,jQuery.fn.buildYTPControls=jQuery.mbYTPlayer.buildControls,jQuery.fn.playYTP=jQuery.mbYTPlayer.play,jQuery.fn.toggleLoops=jQuery.mbYTPlayer.toggleLoops,jQuery.fn.stopYTP=jQuery.mbYTPlayer.stop,jQuery.fn.pauseYTP=jQuery.mbYTPlayer.pause,jQuery.fn.seekToYTP=jQuery.mbYTPlayer.seekTo,jQuery.fn.muteYTPVolume=jQuery.mbYTPlayer.mute,jQuery.fn.unmuteYTPVolume=jQuery.mbYTPlayer.unmute,jQuery.fn.setYTPVolume=jQuery.mbYTPlayer.setVolume,jQuery.fn.setVideoQuality=jQuery.mbYTPlayer.setVideoQuality,jQuery.fn.manageYTPProgress=jQuery.mbYTPlayer.manageProgress,jQuery.fn.YTPGetDataFromFeed=jQuery.mbYTPlayer.getVideoData}(jQuery,ytp),jQuery.support.CSStransition=function(){var e=(document.body||document.documentElement).style;return void 0!==e.transition||void 0!==e.WebkitTransition||void 0!==e.MozTransition||void 0!==e.MsTransition||void 0!==e.OTransition}(),jQuery.CSS={name:"mb.CSSAnimate",author:"Matteo Bicocchi",version:"2.0.0",transitionEnd:"transitionEnd",sfx:"",filters:{blur:{min:0,max:100,unit:"px"},brightness:{min:0,max:400,unit:"%"},contrast:{min:0,max:400,unit:"%"},grayscale:{min:0,max:100,unit:"%"},hueRotate:{min:0,max:360,unit:"deg"},invert:{min:0,max:100,unit:"%"},saturate:{min:0,max:400,unit:"%"},sepia:{min:0,max:100,unit:"%"}},normalizeCss:function(e){var r,t=jQuery.extend(!0,{},e);for(r in jQuery.browser.webkit||jQuery.browser.opera?jQuery.CSS.sfx="-webkit-":jQuery.browser.mozilla?jQuery.CSS.sfx="-moz-":jQuery.browser.msie&&(jQuery.CSS.sfx="-ms-"),t){"transform"===r&&(t[jQuery.CSS.sfx+"transform"]=t[r],delete t[r]),"transform-origin"===r&&(t[jQuery.CSS.sfx+"transform-origin"]=e[r],delete t[r]),"filter"!==r||jQuery.browser.mozilla||(t[jQuery.CSS.sfx+"filter"]=e[r],delete t[r]),"blur"===r&&setFilter(t,"blur",e[r]),"brightness"===r&&setFilter(t,"brightness",e[r]),"contrast"===r&&setFilter(t,"contrast",e[r]),"grayscale"===r&&setFilter(t,"grayscale",e[r]),"hueRotate"===r&&setFilter(t,"hueRotate",e[r]),"invert"===r&&setFilter(t,"invert",e[r]),"saturate"===r&&setFilter(t,"saturate",e[r]),"sepia"===r&&setFilter(t,"sepia",e[r]);var a="";"x"===r&&(t[a=jQuery.CSS.sfx+"transform"]=t[a]||"",t[a]+=" translateX("+setUnit(e[r],"px")+")",delete t[r]),"y"===r&&(t[a=jQuery.CSS.sfx+"transform"]=t[a]||"",t[a]+=" translateY("+setUnit(e[r],"px")+")",delete t[r]),"z"===r&&(t[a=jQuery.CSS.sfx+"transform"]=t[a]||"",t[a]+=" translateZ("+setUnit(e[r],"px")+")",delete t[r]),"rotate"===r&&(t[a=jQuery.CSS.sfx+"transform"]=t[a]||"",t[a]+=" rotate("+setUnit(e[r],"deg")+")",delete t[r]),"rotateX"===r&&(t[a=jQuery.CSS.sfx+"transform"]=t[a]||"",t[a]+=" rotateX("+setUnit(e[r],"deg")+")",delete t[r]),"rotateY"===r&&(t[a=jQuery.CSS.sfx+"transform"]=t[a]||"",t[a]+=" rotateY("+setUnit(e[r],"deg")+")",delete t[r]),"rotateZ"===r&&(t[a=jQuery.CSS.sfx+"transform"]=t[a]||"",t[a]+=" rotateZ("+setUnit(e[r],"deg")+")",delete t[r]),"scale"===r&&(t[a=jQuery.CSS.sfx+"transform"]=t[a]||"",t[a]+=" scale("+setUnit(e[r],"")+")",delete t[r]),"scaleX"===r&&(t[a=jQuery.CSS.sfx+"transform"]=t[a]||"",t[a]+=" scaleX("+setUnit(e[r],"")+")",delete t[r]),"scaleY"===r&&(t[a=jQuery.CSS.sfx+"transform"]=t[a]||"",t[a]+=" scaleY("+setUnit(e[r],"")+")",delete t[r]),"scaleZ"===r&&(t[a=jQuery.CSS.sfx+"transform"]=t[a]||"",t[a]+=" scaleZ("+setUnit(e[r],"")+")",delete t[r]),"skew"===r&&(t[a=jQuery.CSS.sfx+"transform"]=t[a]||"",t[a]+=" skew("+setUnit(e[r],"deg")+")",delete t[r]),"skewX"===r&&(t[a=jQuery.CSS.sfx+"transform"]=t[a]||"",t[a]+=" skewX("+setUnit(e[r],"deg")+")",delete t[r]),"skewY"===r&&(t[a=jQuery.CSS.sfx+"transform"]=t[a]||"",t[a]+=" skewY("+setUnit(e[r],"deg")+")",delete t[r]),"perspective"===r&&(t[a=jQuery.CSS.sfx+"transform"]=t[a]||"",t[a]+=" perspective("+setUnit(e[r],"px")+")",delete t[r])}return t},getProp:function(e){var r,t=[];for(r in e)t.indexOf(r)<0&&t.push(uncamel(r));return t.join(",")},animate:function(s,u,y,c,p){return this.each(function(){function e(){t.called=!0,t.CSSAIsRunning=!1,a.off(jQuery.CSS.transitionEnd+"."+t.id),clearTimeout(t.timeout),a.css(jQuery.CSS.sfx+"transition",""),"function"==typeof p&&p.apply(t),"function"==typeof t.CSSqueue&&(t.CSSqueue(),t.CSSqueue=null)}var r,t=this,a=jQuery(this),o=(t.id=t.id||"CSSA_"+(new Date).getTime(),{type:"noEvent"});if(t.CSSAIsRunning&&t.eventType==o.type&&!jQuery.browser.msie&&jQuery.browser.version<=9)t.CSSqueue=function(){a.CSSAnimate(s,u,y,c,p)};else if(t.CSSqueue=null,t.eventType=o.type,0!==a.length&&s){if(s=jQuery.normalizeCss(s),t.CSSAIsRunning=!0,"function"==typeof u&&(p=u,u=jQuery.fx.speeds._default),"function"==typeof y&&(c=y,y=0),"string"==typeof y&&(p=y,y=0),"function"==typeof c&&(p=c,c="cubic-bezier(0.65,0.03,0.36,0.72)"),"string"==typeof u)for(var i in jQuery.fx.speeds){if(u==i){u=jQuery.fx.speeds[i];break}u=jQuery.fx.speeds._default}if(u=u||jQuery.fx.speeds._default,"string"==typeof p&&(c=p,p=null),jQuery.support.CSStransition){var o={default:"ease",in:"ease-in",out:"ease-out","in-out":"ease-in-out",snap:"cubic-bezier(0,1,.5,1)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"},o=(o[c]&&(c=o[c]),a.off(jQuery.CSS.transitionEnd+"."+t.id),jQuery.CSS.getProp(s)),n={};jQuery.extend(n,s),n[jQuery.CSS.sfx+"transition-property"]=o,n[jQuery.CSS.sfx+"transition-duration"]=u+"ms",n[jQuery.CSS.sfx+"transition-delay"]=y+"ms",n[jQuery.CSS.sfx+"transition-timing-function"]=c,setTimeout(function(){a.one(jQuery.CSS.transitionEnd+"."+t.id,e),a.css(n)},1),t.timeout=setTimeout(function(){return t.called||!p?(t.called=!1,void(t.CSSAIsRunning=!1)):(a.css(jQuery.CSS.sfx+"transition",""),p.apply(t),t.CSSAIsRunning=!1,void("function"==typeof t.CSSqueue&&(t.CSSqueue(),t.CSSqueue=null)))},u+y+10)}else{for(var l in s)"transform"===l&&delete s[l],"filter"===l&&delete s[l],"transform-origin"===l&&delete s[l],"auto"===s[l]&&delete s[l],"x"===l&&(r=s[l],s["left"]=r,delete s[l]),"y"===l&&(r=s[l],s["top"]=r,delete s[l]),"-ms-transform"!==l&&"-ms-filter"!==l||delete s[l];a.delay(y).animate(s,u,p)}}})}},jQuery.fn.CSSAnimate=jQuery.CSS.animate,jQuery.normalizeCss=jQuery.CSS.normalizeCss,jQuery.fn.css3=function(t){return this.each(function(){var e=jQuery(this),r=jQuery.normalizeCss(t);e.css(r)})},navigator.userAgent),nameOffset,verOffset,ix,start,end,nAgt=(jQuery.browser||(jQuery.browser={},jQuery.browser.mozilla=!1,jQuery.browser.webkit=!1,jQuery.browser.opera=!1,jQuery.browser.safari=!1,jQuery.browser.chrome=!1,jQuery.browser.androidStock=!1,jQuery.browser.msie=!1,jQuery.browser.ua=nAgt,jQuery.browser.name=navigator.appName,jQuery.browser.fullVersion=""+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10),-1!=(verOffset=nAgt.indexOf("Opera"))?(jQuery.browser.opera=!0,jQuery.browser.name="Opera",jQuery.browser.fullVersion=nAgt.substring(verOffset+6),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf("OPR"))?(jQuery.browser.opera=!0,jQuery.browser.name="Opera",jQuery.browser.fullVersion=nAgt.substring(verOffset+4)):-1!=(verOffset=nAgt.indexOf("MSIE"))?(jQuery.browser.msie=!0,jQuery.browser.name="Microsoft Internet Explorer",jQuery.browser.fullVersion=nAgt.substring(verOffset+5)):-1!=nAgt.indexOf("Trident")||-1!=nAgt.indexOf("Edge")?(jQuery.browser.msie=!0,jQuery.browser.name="Microsoft Internet Explorer",start=nAgt.indexOf("rv:")+3,end=start+4,jQuery.browser.fullVersion=nAgt.substring(start,end)):-1!=(verOffset=nAgt.indexOf("Chrome"))?(jQuery.browser.webkit=!0,jQuery.browser.chrome=!0,jQuery.browser.name="Chrome",jQuery.browser.fullVersion=nAgt.substring(verOffset+7)):-1<nAgt.indexOf("mozilla/5.0")&&-1<nAgt.indexOf("android ")&&-1<nAgt.indexOf("applewebkit")&&!(-1<nAgt.indexOf("chrome"))?(verOffset=nAgt.indexOf("Chrome"),jQuery.browser.webkit=!0,jQuery.browser.androidStock=!0,jQuery.browser.name="androidStock",jQuery.browser.fullVersion=nAgt.substring(verOffset+7)):-1!=(verOffset=nAgt.indexOf("Safari"))||-1!=(verOffset=nAgt.indexOf("AppleWebkit"))?(jQuery.browser.webkit=!0,jQuery.browser.safari=!0,jQuery.browser.name="Safari",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf("Firefox"))?(jQuery.browser.mozilla=!0,jQuery.browser.name="Firefox",jQuery.browser.fullVersion=nAgt.substring(verOffset+8)):(nameOffset=nAgt.lastIndexOf(" ")+1)<(verOffset=nAgt.lastIndexOf("/"))&&(jQuery.browser.name=nAgt.substring(nameOffset,verOffset),jQuery.browser.fullVersion=nAgt.substring(verOffset+1),jQuery.browser.name.toLowerCase()==jQuery.browser.name.toUpperCase())&&(jQuery.browser.name=navigator.appName),-1!=(ix=jQuery.browser.fullVersion.indexOf(";"))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),-1!=(ix=jQuery.browser.fullVersion.indexOf(" "))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),jQuery.browser.majorVersion=parseInt(""+jQuery.browser.fullVersion,10),isNaN(jQuery.browser.majorVersion)&&(jQuery.browser.fullVersion=""+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10)),jQuery.browser.version=jQuery.browser.majorVersion),jQuery.browser.android=/Android/i.test(nAgt),jQuery.browser.blackberry=/BlackBerry|BB|PlayBook/i.test(nAgt),jQuery.browser.ios=/iPhone|iPad|iPod|webOS/i.test(nAgt),jQuery.browser.operaMobile=/Opera Mini/i.test(nAgt),jQuery.browser.windowsMobile=/IEMobile|Windows Phone/i.test(nAgt),jQuery.browser.kindle=/Kindle|Silk/i.test(nAgt),jQuery.browser.mobile=jQuery.browser.android||jQuery.browser.blackberry||jQuery.browser.ios||jQuery.browser.windowsMobile||jQuery.browser.operaMobile||jQuery.browser.kindle,jQuery.isMobile=jQuery.browser.mobile,jQuery.isTablet=jQuery.browser.mobile&&765<jQuery(window).width(),jQuery.isAndroidDefault=jQuery.browser.android&&!/chrome/i.test(nAgt),navigator.userAgent),nameOffset,verOffset,ix,start,end;jQuery.browser||(jQuery.browser={},jQuery.browser.mozilla=!1,jQuery.browser.webkit=!1,jQuery.browser.opera=!1,jQuery.browser.safari=!1,jQuery.browser.chrome=!1,jQuery.browser.androidStock=!1,jQuery.browser.msie=!1,jQuery.browser.ua=nAgt,jQuery.browser.name=navigator.appName,jQuery.browser.fullVersion=""+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10),-1!=(verOffset=nAgt.indexOf("Opera"))?(jQuery.browser.opera=!0,jQuery.browser.name="Opera",jQuery.browser.fullVersion=nAgt.substring(verOffset+6),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf("OPR"))?(jQuery.browser.opera=!0,jQuery.browser.name="Opera",jQuery.browser.fullVersion=nAgt.substring(verOffset+4)):-1!=(verOffset=nAgt.indexOf("MSIE"))?(jQuery.browser.msie=!0,jQuery.browser.name="Microsoft Internet Explorer",jQuery.browser.fullVersion=nAgt.substring(verOffset+5)):-1!=nAgt.indexOf("Trident")||-1!=nAgt.indexOf("Edge")?(jQuery.browser.msie=!0,jQuery.browser.name="Microsoft Internet Explorer",start=nAgt.indexOf("rv:")+3,end=start+4,jQuery.browser.fullVersion=nAgt.substring(start,end)):-1!=(verOffset=nAgt.indexOf("Chrome"))?(jQuery.browser.webkit=!0,jQuery.browser.chrome=!0,jQuery.browser.name="Chrome",jQuery.browser.fullVersion=nAgt.substring(verOffset+7)):-1<nAgt.indexOf("mozilla/5.0")&&-1<nAgt.indexOf("android ")&&-1<nAgt.indexOf("applewebkit")&&!(-1<nAgt.indexOf("chrome"))?(verOffset=nAgt.indexOf("Chrome"),jQuery.browser.webkit=!0,jQuery.browser.androidStock=!0,jQuery.browser.name="androidStock",jQuery.browser.fullVersion=nAgt.substring(verOffset+7)):-1!=(verOffset=nAgt.indexOf("Safari"))||-1!=(verOffset=nAgt.indexOf("AppleWebkit"))?(jQuery.browser.webkit=!0,jQuery.browser.safari=!0,jQuery.browser.name="Safari",jQuery.browser.fullVersion=nAgt.substring(verOffset+7),-1!=(verOffset=nAgt.indexOf("Version"))&&(jQuery.browser.fullVersion=nAgt.substring(verOffset+8))):-1!=(verOffset=nAgt.indexOf("Firefox"))?(jQuery.browser.mozilla=!0,jQuery.browser.name="Firefox",jQuery.browser.fullVersion=nAgt.substring(verOffset+8)):(nameOffset=nAgt.lastIndexOf(" ")+1)<(verOffset=nAgt.lastIndexOf("/"))&&(jQuery.browser.name=nAgt.substring(nameOffset,verOffset),jQuery.browser.fullVersion=nAgt.substring(verOffset+1),jQuery.browser.name.toLowerCase()==jQuery.browser.name.toUpperCase())&&(jQuery.browser.name=navigator.appName),-1!=(ix=jQuery.browser.fullVersion.indexOf(";"))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),-1!=(ix=jQuery.browser.fullVersion.indexOf(" "))&&(jQuery.browser.fullVersion=jQuery.browser.fullVersion.substring(0,ix)),jQuery.browser.majorVersion=parseInt(""+jQuery.browser.fullVersion,10),isNaN(jQuery.browser.majorVersion)&&(jQuery.browser.fullVersion=""+parseFloat(navigator.appVersion),jQuery.browser.majorVersion=parseInt(navigator.appVersion,10)),jQuery.browser.version=jQuery.browser.majorVersion),jQuery.browser.android=/Android/i.test(nAgt),jQuery.browser.blackberry=/BlackBerry|BB|PlayBook/i.test(nAgt),jQuery.browser.ios=/iPhone|iPad|iPod|webOS/i.test(nAgt),jQuery.browser.operaMobile=/Opera Mini/i.test(nAgt),jQuery.browser.windowsMobile=/IEMobile|Windows Phone/i.test(nAgt),jQuery.browser.kindle=/Kindle|Silk/i.test(nAgt),jQuery.browser.mobile=jQuery.browser.android||jQuery.browser.blackberry||jQuery.browser.ios||jQuery.browser.windowsMobile||jQuery.browser.operaMobile||jQuery.browser.kindle,jQuery.isMobile=jQuery.browser.mobile,jQuery.isTablet=jQuery.browser.mobile&&765<jQuery(window).width(),jQuery.isAndroidDefault=jQuery.browser.android&&!/chrome/i.test(nAgt),function(o){o.simpleSlider={defaults:{initialval:0,scale:100,orientation:"h",readonly:!1,callback:!1},events:{start:o.browser.mobile?"touchstart":"mousedown",end:o.browser.mobile?"touchend":"mouseup",move:o.browser.mobile?"touchmove":"mousemove"},init:function(a){return this.each(function(){var r=this,t=o(r),e=(t.addClass("simpleSlider"),r.opt={},o.extend(r.opt,o.simpleSlider.defaults,a),o.extend(r.opt,t.data()),"h"==r.opt.orientation?"horizontal":"vertical"),e=o("<div/>").addClass("level").addClass(e);t.prepend(e),r.level=e,t.css({cursor:"default"}),"auto"==r.opt.scale&&(r.opt.scale=o(r).outerWidth()),t.updateSliderVal(),r.opt.readonly||(t.on(o.simpleSlider.events.start,function(e){o.browser.mobile&&(e=e.changedTouches[0]),r.canSlide=!0,t.updateSliderVal(e),"h"==r.opt.orientation?t.css({cursor:"col-resize"}):t.css({cursor:"row-resize"}),e.preventDefault(),e.stopPropagation()}),o(document).on(o.simpleSlider.events.move,function(e){o.browser.mobile&&(e=e.changedTouches[0]),r.canSlide&&(o(document).css({cursor:"default"}),t.updateSliderVal(e),e.preventDefault(),e.stopPropagation())}).on(o.simpleSlider.events.end,function(){o(document).css({cursor:"auto"}),r.canSlide=!1,t.css({cursor:"auto"})}))})},updateSliderVal:function(e){var r,t,a=this.get(0);a.opt&&(a.opt.initialval="number"==typeof a.opt.initialval?a.opt.initialval:a.opt.initialval(a),r=o(a).outerWidth(),t=o(a).outerHeight(),a.x="object"==typeof e?e.clientX+document.body.scrollLeft-this.offset().left:"number"==typeof e?e*r/a.opt.scale:a.opt.initialval*r/a.opt.scale,a.y="object"==typeof e?e.clientY+document.body.scrollTop-this.offset().top:"number"==typeof e?(a.opt.scale-a.opt.initialval-e)*t/a.opt.scale:a.opt.initialval*t/a.opt.scale,a.y=this.outerHeight()-a.y,a.scaleX=a.x*a.opt.scale/r,a.scaleY=a.y*a.opt.scale/t,a.outOfRangeX=a.scaleX>a.opt.scale?a.scaleX-a.opt.scale:a.scaleX<0?a.scaleX:0,a.outOfRangeY=a.scaleY>a.opt.scale?a.scaleY-a.opt.scale:a.scaleY<0?a.scaleY:0,a.outOfRange="h"==a.opt.orientation?a.outOfRangeX:a.outOfRangeY,a.value=void 0!==e?"h"==a.opt.orientation?a.x>=this.outerWidth()?a.opt.scale:a.x<=0?0:a.scaleX:a.y>=this.outerHeight()?a.opt.scale:a.y<=0?0:a.scaleY:"h"==a.opt.orientation?a.scaleX:a.scaleY,"h"==a.opt.orientation?a.level.width(Math.floor(100*a.x/r)+"%"):a.level.height(Math.floor(100*a.y/t)),"function"==typeof a.opt.callback)&&a.opt.callback(a)}},o.fn.simpleSlider=o.simpleSlider.init,o.fn.updateSliderVal=o.simpleSlider.updateSliderVal}(jQuery),function(r){r.mbCookie={set:function(e,r,t,a){r=JSON.stringify(r),t=t||7,a=a?"; domain="+a:"";var o=new Date;o.setTime(o.getTime()+864e5*t),t="; expires="+o.toGMTString(),document.cookie=e+"="+r+t+"; path=/"+a},get:function(e){for(var r=e+"=",t=document.cookie.split(";"),a=0;a<t.length;a++){for(var o=t[a];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(r))return JSON.parse(o.substring(r.length,o.length))}return null},remove:function(e){r.mbCookie.set(e,"",-1)}},r.mbStorage={set:function(e,r){r=JSON.stringify(r),localStorage.setItem(e,r)},get:function(e){return localStorage[e]?JSON.parse(localStorage[e]):null},remove:function(e){e?localStorage.removeItem(e):localStorage.clear()}}}(jQuery);
/* store.js - Copyright (c) 2010-2017 Marcus Westin */
!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).store=e()}(function(){var define,module,exports;return function r(o,i,u){function a(n,e){if(!i[n]){if(!o[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(c)return c(n,!0);e=new Error("Cannot find module '"+n+"'");throw e.code="MODULE_NOT_FOUND",e}t=i[n]={exports:{}};o[n][0].call(t.exports,function(e){var t=o[n][1][e];return a(t||e)},t,t.exports,r,o,i,u)}return i[n].exports}for(var c="function"==typeof require&&require,e=0;e<u.length;e++)a(u[e]);return a}({1:[function(e,t,n){"use strict";var r=e("../src/store-engine"),o=e("../storages/all"),e=[e("../plugins/json2")];t.exports=r.createStore(o,e)},{"../plugins/json2":2,"../src/store-engine":4,"../storages/all":6}],2:[function(e,t,n){"use strict";t.exports=function(){return e("./lib/json2"),{}}},{"./lib/json2":3}],3:[function(require,module,exports){"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};"object"!==("undefined"==typeof JSON?"undefined":_typeof(JSON))&&(JSON={}),function(){function f(e){return e<10?"0"+e:e}function this_value(){return this.valueOf()}function quote(e){return rx_escapable.lastIndex=0,rx_escapable.test(e)?'"'+e.replace(rx_escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,o,i,u,a=gap,c=t[e];switch(c&&"object"===(void 0===c?"undefined":_typeof(c))&&"function"==typeof c.toJSON&&(c=c.toJSON(e)),void 0===(c="function"==typeof rep?rep.call(t,e,c):c)?"undefined":_typeof(c)){case"string":return quote(c);case"number":return isFinite(c)?String(c):"null";case"boolean":case"null":return String(c);case"object":if(!c)return"null";if(gap+=indent,u=[],"[object Array]"===Object.prototype.toString.apply(c)){for(i=c.length,n=0;n<i;n+=1)u[n]=str(n,c)||"null";o=0===u.length?"[]":gap?"[\n"+gap+u.join(",\n"+gap)+"\n"+a+"]":"["+u.join(",")+"]"}else{if(rep&&"object"===(void 0===rep?"undefined":_typeof(rep)))for(i=rep.length,n=0;n<i;n+=1)"string"==typeof rep[n]&&(o=str(r=rep[n],c))&&u.push(quote(r)+(gap?": ":":")+o);else for(r in c)Object.prototype.hasOwnProperty.call(c,r)&&(o=str(r,c),o)&&u.push(quote(r)+(gap?": ":":")+o);o=0===u.length?"{}":gap?"{\n"+gap+u.join(",\n"+gap)+"\n"+a+"}":"{"+u.join(",")+"}"}return gap=a,o}}var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta,rep;"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value),"function"!=typeof JSON.stringify&&(meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(e,t,n){var r;if(indent=gap="","number"==typeof n)for(r=0;r<n;r+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(!(rep=t)||"function"==typeof t||"object"===(void 0===t?"undefined":_typeof(t))&&"number"==typeof t.length)return str("",{"":e});throw new Error("JSON.stringify")}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(e,t){var n,r,o=e[t];if(o&&"object"===(void 0===o?"undefined":_typeof(o)))for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(r=walk(o,n),void 0!==r?o[n]=r:delete o[n]);return reviver.call(e,t,o)}var j;if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},{}],4:[function(e,t,n){"use strict";function r(e,t,n){n=n||"",e&&!l(e)&&(e=[e]),t&&!l(t)&&(t=[t]);var r,o=n?"__storejs_"+n+"_":"",i=n?new RegExp("^"+o):null;if(/^[a-zA-Z0-9_\-]*$/.test(n))return(r=f({_namespacePrefix:o,_namespaceRegexp:i,_testStorage:function(e){try{var t="__storejs__test__",n=(e.write(t,t),e.read(t)===t);return e.remove(t),n}catch(e){return!1}},_assignPluginFnProp:function(r,e){var o=this[e];this[e]=function(){var n=u(arguments,0),e=this,t=[function(){if(o)return c(arguments,function(e,t){n[t]=e}),o.apply(e,n)}].concat(n);return r.apply(e,t)}},_serialize:function(e){return JSON.stringify(e)},_deserialize:function(t,e){if(!t)return e;var n="";try{n=JSON.parse(t)}catch(e){n=t}return void 0!==n?n:e},_addStorage:function(e){this.enabled||this._testStorage(e)&&(this.storage=e,this.enabled=!0)},_addPlugin:function(n){var r=this;if(l(n))c(n,function(e){r._addPlugin(e)});else if(!a(this.plugins,function(e){return n===e})){if(this.plugins.push(n),!p(n))throw new Error("Plugins must be function values that return objects");var e=n.call(this);if(!g(e))throw new Error("Plugins must return an object of function properties");c(e,function(e,t){if(!p(e))throw new Error("Bad plugin property: "+t+" from plugin "+n.name+". Plugins should only return functions.");r._assignPluginFnProp(e,t)})}},addStorage:function(e){(function(){var e="undefined"==typeof console?null:console;e&&(e.warn||e.log).apply(e,arguments)})("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(e)}},d,{plugins:[]})).raw={},c(r,function(e,t){p(e)&&(r.raw[t]=s(r,e))}),c(e,function(e){r._addStorage(e)}),c(t,function(e){r._addPlugin(e)}),r;throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes")}var e=e("./util"),u=e.slice,a=e.pluck,c=e.each,s=e.bind,f=e.create,l=e.isList,p=e.isFunction,g=e.isObject,d={version:"2.0.12",enabled:!(t.exports={createStore:r}),get:function(e,t){e=this.storage.read(this._namespacePrefix+e);return this._deserialize(e,t)},set:function(e,t){return void 0===t?this.remove(e):(this.storage.write(this._namespacePrefix+e,this._serialize(t)),t)},remove:function(e){this.storage.remove(this._namespacePrefix+e)},each:function(n){var r=this;this.storage.each(function(e,t){n.call(r,r._deserialize(e),(t||"").replace(r._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(e){return this._namespacePrefix=="__storejs_"+e+"_"},createStore:function(){return r.apply(this,arguments)},addPlugin:function(e){this._addPlugin(e)},namespace:function(e){return r(this.storage,this.plugins,e)}}},{"./util":5}],5:[function(e,s,t){!function(e){"use strict";function i(e,t){return Array.prototype.slice.call(e,t||0)}function u(e,n){t(e,function(e,t){return n(e,t),0})}function t(e,t){if(o(e)){for(var n=0;n<e.length;n++)if(t(e[n],n))return e[n]}else for(var r in e)if(e.hasOwnProperty(r)&&t(e[r],r))return e[r]}function o(e){return null!=e&&"function"!=typeof e&&"number"==typeof e.length}var a,c=Object.assign||function(n,e,t,r){for(var o=1;o<arguments.length;o++)u(Object(arguments[o]),function(e,t){n[t]=e});return n},n=Object.create?function(e,t,n,r){var o=i(arguments,1);return c.apply(this,[Object.create(e)].concat(o))}:(a=function(){},function(e,t,n,r){var o=i(arguments,1);return a.prototype=e,c.apply(this,[new a].concat(o))}),r=String.prototype.trim?function(e){return String.prototype.trim.call(e)}:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},e="undefined"!=typeof window?window:e;s.exports={assign:c,create:n,trim:r,bind:function(e,t){return function(){return t.apply(e,Array.prototype.slice.call(arguments,0))}},slice:i,each:u,map:function(e,n){var r=o(e)?[]:{};return t(e,function(e,t){return r[t]=n(e,t),0}),r},pluck:t,isList:o,isFunction:function(e){return e&&"[object Function]"==={}.toString.call(e)},isObject:function(e){return e&&"[object Object]"==={}.toString.call(e)},Global:e}}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],6:[function(e,t,n){"use strict";t.exports=[e("./localStorage"),e("./oldFF-globalStorage"),e("./oldIE-userDataStorage"),e("./cookieStorage"),e("./sessionStorage"),e("./memoryStorage")]},{"./cookieStorage":7,"./localStorage":8,"./memoryStorage":9,"./oldFF-globalStorage":10,"./oldIE-userDataStorage":11,"./sessionStorage":12}],7:[function(e,t,n){"use strict";function r(e){for(var t,n,r=c.cookie.split(/; ?/g),o=r.length-1;0<=o;o--)a(r[o])&&(t=r[o].split("="),n=unescape(t[0]),e(unescape(t[1]),n))}function o(e){e&&i(e)&&(c.cookie=escape(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function i(e){return new RegExp("(?:^|;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(c.cookie)}var e=e("../src/util"),u=e.Global,a=e.trim,c=(t.exports={name:"cookieStorage",read:function(e){return e&&i(e)?(e="(?:^|.*;\\s*)"+escape(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*",unescape(c.cookie.replace(new RegExp(e),"$1"))):null},write:function(e,t){e&&(c.cookie=escape(e)+"="+escape(t)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")},each:r,remove:o,clearAll:function(){r(function(e,t){o(t)})}},u.document)},{"../src/util":5}],8:[function(e,t,n){"use strict";function r(){return i.localStorage}function o(e){return r().getItem(e)}var i=e("../src/util").Global;t.exports={name:"localStorage",read:o,write:function(e,t){return r().setItem(e,t)},each:function(e){for(var t=r().length-1;0<=t;t--){var n=r().key(t);e(o(n),n)}},remove:function(e){return r().removeItem(e)},clearAll:function(){return r().clear()}}},{"../src/util":5}],9:[function(e,t,n){"use strict";t.exports={name:"memoryStorage",read:function(e){return r[e]},write:function(e,t){r[e]=t},each:function(e){for(var t in r)r.hasOwnProperty(t)&&e(r[t],t)},remove:function(e){delete r[e]},clearAll:function(e){r={}}};var r={}},{}],10:[function(e,t,n){"use strict";function r(e){for(var t=o.length-1;0<=t;t--){var n=o.key(t);e(o[n],n)}}var e=e("../src/util").Global,o=(t.exports={name:"oldFF-globalStorage",read:function(e){return o[e]},write:function(e,t){o[e]=t},each:r,remove:function(e){return o.removeItem(e)},clearAll:function(){r(function(e,t){delete o[e]})}},e.globalStorage)},{"../src/util":5}],11:[function(e,t,n){"use strict";function r(e){return e.replace(/^\d/,"___$&").replace(c,"___")}var e=e("../src/util").Global,o=(t.exports={name:"oldIE-userDataStorage",write:function(e,t){var n;a||(n=r(e),u(function(e){e.setAttribute(n,t),e.save(o)}))},read:function(e){var t,n;if(!a)return t=r(e),n=null,u(function(e){n=e.getAttribute(t)}),n},each:function(o){u(function(e){for(var t=e.XMLDocument.documentElement.attributes,n=t.length-1;0<=n;n--){var r=t[n];o(e.getAttribute(r.name),r.name)}})},remove:function(e){var t=r(e);u(function(e){e.removeAttribute(t),e.save(o)})},clearAll:function(){u(function(e){var t=e.XMLDocument.documentElement.attributes;e.load(o);for(var n=t.length-1;0<=n;n--)e.removeAttribute(t[n].name);e.save(o)})}},"storejs"),i=e.document,u=function(){if(!i||!i.documentElement||!i.documentElement.addBehavior)return null;var n,e,r;try{(e=new ActiveXObject("htmlfile")).open(),e.write('<script>document.w=window<\/script><iframe src="/favicon.ico"></iframe>'),e.close(),n=e.w.frames[0].document,r=n.createElement("div")}catch(e){r=i.createElement("div"),n=i.body}return function(e){var t=[].slice.call(arguments,0);t.unshift(r),n.appendChild(r),r.addBehavior("#default#userData"),r.load(o),e.apply(this,t),n.removeChild(r)}}(),a=(e.navigator?e.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./),c=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g")},{"../src/util":5}],12:[function(e,t,n){"use strict";function r(){return i.sessionStorage}function o(e){return r().getItem(e)}var i=e("../src/util").Global;t.exports={name:"sessionStorage",read:o,write:function(e,t){return r().setItem(e,t)},each:function(e){for(var t=r().length-1;0<=t;t--){var n=r().key(t);e(o(n),n)}},remove:function(e){return r().removeItem(e)},clearAll:function(){return r().clear()}}},{"../src/util":5}]},{},[1])(1)});
/**
 * HTML templates in string, much faster on Safari
 * @since  2.0.5
 */
var Rexbuilder_Public_Templates=function(){"use strict";function a(e,t){if("label-text-paragraph"===e)return'<div class="wpcf7-label-text__paragraph" contenteditable="false"></div>'}return{getTemplate:a,getParsedTemplate:function(e,t){return $.parseHTML(a(e))}}}();
var Rexbuilder_Util=function($){"use strict";var hasClass,addClass,removeClass,toggleClass;function rtimeOut(e,t){function i(){o()-s<t?a||r(i):e()}var a,o=Date.now,r=window.requestAnimationFrame,s=o();return r(i),{clear:function(){a=1}}}function rInterval(e,t){function i(){o()-s<t||(s+=t,e()),a||r(i)}var a,o=Date.now,r=window.requestAnimationFrame,s=o();return r(i),{clear:function(){a=1}}}var removeClass="classList"in document.documentElement?(hasClass=function(e,t){return e.classList.contains(t)},addClass=function(e,t){e.classList.add(t)},function(e,t){e.classList.remove(t)}):(hasClass=function(e,t){return new RegExp("\\b"+t+"\\b").test(e.className)},addClass=function(e,t){hasClass(e,t)||(e.className+=" "+t)},function(e,t){e.className=e.className.replace(new RegExp("\\b"+t+"\\b","g"),"")}),toggleClass=function(e,t){(hasClass(e,t)?removeClass:addClass)(e,t)},editorMode=!1,windowIsResizing=!1,responsiveLayouts,defaultLayoutSections,$modelsCustomizationsDataDiv,$pageCustomizationsDataDiv,$liveDataContainer,$layoutsDomOrder,$defaultLayoutState,frontAvailableLayouts,startFrontLayout,changedFrontLayout,layoutSavedInfo,$usedIDSContainer,sectionIDSused,$usedBlocksIDsContainer,blocksIDsUsed,$rexbuilderLayoutData,$rexbuilderModelData,$availableLayoutNames,edlTimeouts=[],$bodyHtml;function handlingRowReadyEnd(e){edlTimeouts[e]=null,""===edlTimeouts.join("")&&(Rexbuilder_Util.playAllVideos(),e=jQuery.Event("rexlive:editDomLayoutEnd"),Rexbuilder_Util.$document.trigger(e),edlTimeouts=[])}var createRandomID=function(e){for(var t="",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=0;a<e;a++)t+=i.charAt(Math.floor(Math.random()*i.length));return t},_createRandomNumericID=function(e){for(var t="",i="0123456789",a=0;a<e;a++)t+=i.charAt(Math.floor(Math.random()*i.length));return parseInt(t)},_storeNamesUsed=function(){sectionIDSused=0<$usedIDSContainer.length?JSON.parse($usedIDSContainer.text()):[]},_saveSectionNamesUsed=function(){$usedIDSContainer.text(JSON.stringify(sectionIDSused))},_getSectionNamesUsed=function(){return sectionIDSused},_addSectionID=function(e){for(var t=sectionIDSused.length-1;0<=t&&e!=sectionIDSused[t];t--);-1==t&&sectionIDSused.push(e)},_removeSectionID=function(e){for(var t=0,t=sectionIDSused.length-1;0<=t&&e!=sectionIDSused[t];t--);-1<t&&(sectionIDSused.splice(t,1),_saveSectionNamesUsed())},_createSectionID=function(){var e,t,i;do{if(t=!0,"self"==(e=createRandomID(4)))t=!1;else for(i=0;i<sectionIDSused.length;i++)if(e==sectionIDSused[i]){t=!1;break}}while(!t);return _addSectionID(e),e},_updateSectionsIDs=function(){if(Rexbuilder_Util.rexContainer)for(var e=[].slice.call(Rexbuilder_Util.rexContainer.getElementsByClassName("rexpansive_section")),t=e.length,i=0;i<t;i++){var a=e[i].getAttribute("data-rexlive-section-id");null!==a&&""!==a||(a=_createSectionID(),e[i].setAttribute("data-rexlive-section-id",a),_fix_tools_ids(e[i],a))}},_fix_tools_ids=function(e,t){if(e)for(var i,a,o,r,s,n=[].slice.call(e.getElementsByClassName("tool-area--side tool-area--left")),l=n.length,d=0;d<l;d++){for(o=(a=[].slice.call(n[d].getElementsByClassName("edit-row-width"))).length,i=0;i<o;i++)a[i].setAttribute("id",a[i].getAttribute("id")+t),a[i].setAttribute("name",a[i].getAttribute("name")+t),a[i].nextElementSibling.setAttribute("for",a[i].nextElementSibling.getAttribute("for")+t);for(s=(r=[].slice.call(n[d].getElementsByClassName("edit-row-layout"))).length,i=0;i<s;i++)r[i].setAttribute("id",r[i].getAttribute("id")+t),r[i].setAttribute("name",r[i].getAttribute("name")+t),r[i].nextElementSibling.setAttribute("for",r[i].nextElementSibling.getAttribute("for")+t)}},_updateSectionsNumber=function(){var e=-1;if(Rexbuilder_Util.rexContainer){for(var t=[].slice.call(Rexbuilder_Util.rexContainer.getElementsByClassName("rexpansive_section")),i=t.length,a=0;a<i;a++)t[a].setAttribute("data-rexlive-section-number",a),e=a;Rexbuilder_Util.lastSectionNumber=e}};function _storeBlocksIDsUsed(){blocksIDsUsed=0<$usedBlocksIDsContainer.length?JSON.parse($usedBlocksIDsContainer.text()):[]}function saveBlocksIDsUsed(){$usedBlocksIDsContainer.text(JSON.stringify(blocksIDsUsed))}function updateBlocksIDsUsed(e){blocksIDsUsed=e,saveBlocksIDsUsed()}function getBlocksIDsUsed(){return blocksIDsUsed}function addBlockID(e){blocksIDsUsed.push(e),blocksIDsUsed=Rexbuilder_Util.removeArrayDuplicates(blocksIDsUsed)}function removeBlockID(e){for(var t=blocksIDsUsed.length-1;0<=t&&e!=blocksIDsUsed[t];t--);-1<t&&(blocksIDsUsed.splice(t,1),saveBlocksIDsUsed())}function createBlockID(){for(var e;!("self"!==(e=createRandomID(4))&&-1===blocksIDsUsed.indexOf(e)););return addBlockID(e),e}function _updateBlocksIDs(){if(Rexbuilder_Util.rexContainer)for(var e,t=Array.prototype.slice.call(Rexbuilder_Util.rexContainer.getElementsByClassName("grid-stack-item")),i=0;i<t.length;i++)null!==(e=t[i].getAttribute("data-rexbuilder-block-id"))&&""!==e||(e=createBlockID(),t[i].setAttribute("data-rexbuilder-block-id",e))}var _findLayoutType=function(e){return"default"==e||"tablet"==e||"mobile"==e?"standard":"custom"},_findFrontLayout=function(){for(var e=Rexbuilder_Util.globalViewport.width,t=frontAvailableLayouts.length-1;0<=t;t--)if(e>=parseInt(frontAvailableLayouts[t].min)&&(""==frontAvailableLayouts[t].max||e<=parseInt(frontAvailableLayouts[t].max)))return frontAvailableLayouts[t].id},_getModelsCustomizations=function(){var o=[];return $modelsCustomizationsDataDiv.children(".model-customizations-container").each(function(e,t){var t=$(t),i=parseInt(t.attr("data-model-id")),a=[];t.children(".model-customization-data").each(function(e,t){var t=$(t),i=t.attr("data-model-layout-name"),t=JSON.parse(t.text());a.push({name:i,targets:t})}),o.push({id:i,customizations:a})}),o},_updateModelsCustomizationsData=function(e){var t,i,a=e.id,o=$modelsCustomizationsDataDiv.children('.model-customizations-container[data-model-id="'+a+'"]');for(0!=o.length?o.children(".model-customization-data").remove():((o=$(document.createElement("script"))).addClass("model-customizations-container"),o.attr("data-model-id",a),o.appendTo($modelsCustomizationsDataDiv[0])),t=0,i=e.customizations.length;t<i;t++){var r=$(document.createElement("script"));r.addClass("model-customization-data"),r.attr("data-model-layout-name",e.customizations[t].name),r.text(JSON.stringify(e.customizations[t].targets)),r.appendTo(o[0])}$modelsCustomizationsDataDiv.attr("data-empty-models-customizations",!1)},_updateDivModelCustomizationsNames=function(e){for(var t=$rexbuilderModelData.find(".available-models-customizations-names"),i=JSON.parse(t.text()),a=[],o=0,r=i.length;o<r;o++){var s=i[o];s.id!=e.id&&a.push(s)}a.push(e),t.text(JSON.stringify(a))},_getPageCustomizations=function(){var i=[],s={name:"default",sections:[]};return $pageCustomizationsDataDiv.children('.customization-wrap[data-customization-name="default"]').children(".section-targets").each(function(e,t){var t=$(t),i=t.attr("data-section-rex-id"),a=isNaN(parseInt(t.attr("data-model-id")))?-1:parseInt(t.attr("data-model-id")),o=isNaN(parseInt(t.attr("data-model-number")))?-1:parseInt(t.attr("data-model-number")),r=void 0!==t.attr("data-section-hide")&&"1"==t.attr("data-section-hide").toString(),t=""!=t.text()?JSON.parse(t.text()):[];s.sections.push({section_rex_id:i,section_model_id:-1!=a?a:"",section_model_number:-1!=o?o:"",section_is_model:-1!=a,section_hide:r,targets:t})}),i.push(s),$pageCustomizationsDataDiv.children('.customization-wrap:not([data-customization-name="default"])').each(function(e,t){var t=$(t),n={name:t.attr("data-customization-name"),sections:[]};t.children(".section-targets").each(function(e,t){var t=$(t),i=t.attr("data-section-rex-id"),a=isNaN(parseInt(t.attr("data-model-id")))?-1:parseInt(t.attr("data-model-id")),o=isNaN(parseInt(t.attr("data-model-number")))?-1:parseInt(t.attr("data-model-number")),r=void 0!==t.attr("data-section-hide")&&"1"==t.attr("data-section-hide").toString(),s=""!=t.text()?JSON.parse(t.text()):[],t=void 0!==t.attr("data-section-created-live")&&"1"==t.attr("data-section-created-live").toString();n.sections.push({section_rex_id:i,section_model_id:-1!=a?a:"",section_model_number:-1!=o?o:"",section_is_model:-1!=a,section_hide:r,section_created_live:t,targets:s})}),i.push(n)}),i},_createPageCustomizationsDataLive=function(e){var t,i;for($liveDataContainer.children().remove(),t=0,i=e.length;t<i;t++){var a=$(document.createElement("script"));a.addClass("section-targets"),a.attr("data-section-rex-id",e[t].section_rex_id),a.attr("data-model-id",e[t].section_model_id),a.attr("data-model-number",e[t].section_model_number),a.attr("data-section-hide",e[t].section_hide),a.text(JSON.stringify(e[t].targets)),a.appendTo($liveDataContainer[0])}},_updatePageCustomizationsData=function(e){var t,i,a=e.name,o=$pageCustomizationsDataDiv.children('.customization-wrap[data-customization-name="'+a+'"]');for(0!=o.length?o.children(".section-targets").remove():((o=$(document.createElement("script"))).addClass("customization-wrap"),o.attr("data-customization-name",a),o.appendTo($pageCustomizationsDataDiv[0])),t=0,i=e.sections.length;t<i;t++){var r=$(document.createElement("script"));r.addClass("section-targets"),r.attr("data-section-rex-id",e.sections[t].section_rex_id),r.attr("data-model-id",e.sections[t].section_model_id),r.attr("data-model-number",e.sections[t].section_model_number),r.attr("data-section-hide",e.sections[t].section_hide),r.attr("data-section-created-live","true"==e.sections[t].section_created_live.toString()&&"1"),""==e.sections[t].section_model_id&&r.text(JSON.stringify(e.sections[t].targets)),r.appendTo(o[0])}$pageCustomizationsDataDiv.removeAttr("data-empty-customizations")},_updatePageAvaiableLayoutsNames=function(e){$availableLayoutNames.text(JSON.stringify(e))},_getSectionCustomLayouts=function(e){for(var t,i,a=[],o=Rexbuilder_Util.getPageCustomizations(),r=0,s=o.length;r<s;r++){var n,l=o[r].name;if(null!=o[r].sections)for(t=0,i=o[r].sections.length;t<i;t++)o[r].sections[t].section_rex_id==e&&(n=jQuery.extend(!0,[],o[r].sections[t].targets),a.push({name:l,targets:n}))}return a},chooseLayout=function(){var e=$rexbuilderLayoutData,t=$rexbuilderModelData;if(Rexbuilder_Util.chosenLayoutData={min:0,max:"",id:"default",label:"My Desktop",type:"standard"},"true"==e.children(".layouts-data").attr("data-empty-customizations")||Rexbuilder_Util.editorMode&&Rexbuilder_Util.firstStart)return"default";for(var i,a,o,r,s,n,l,d,u,c=Rexbuilder_Util.globalViewport.width,_=document.getElementById("layout-avaiable-dimensions"),g=_?JSON.parse(_.textContent):[],_=t.children(".available-models-customizations-names"),m=0<_.length?JSON.parse(_.text()):[],t=e.children("#available-layouts-names"),p=0<t.length?JSON.parse(t.text()):[],b=[],f=0,h=g.length;f<h;f++){for(d=!1,i=0,o=m.length;i<o;i++)for(a=0,r=m[i].names.length;a<r;a++)g[f].id==m[i].names[a]&&(d=(u=g[f]).model=!0,b.push(u));if(!d)for(a=0,s=p.length;a<s;a++)g[f].id==p[a]&&(d=!((u=g[f]).model=!1),b.push(u))}for(f=0,n=b.length;f<n;f++)""==b[f].min&&(b[f].min=0);var v,x="",y=b.concat();for(y.sort((v="min",function(e,t){return e[v]>t[v]?1:t[v]>e[v]?-1:0})),f=0,l=y.length;f<l;f++)c>=y[f].min&&(""==y[f].max||c<=y[f].max)&&(x=y[f].id,Rexbuilder_Util.chosenLayoutData=y[f]);return x=""===x?"default":x},predictLayout=function(){var e=Rexbuilder_Util.globalViewport.width;return e<=767?"mobile":e<=1024?"tablet":"default"},_createEmptyTargets=function(e){for(var t=[],i=0,a=e.length;i<a;i++){var o={name:e[i].name,props:{}};"self"==e[i].name&&_isMobile()&&(o.props.collapse_grid=!0),t.push(o)}return t},_getDefaultPageLayout=function(e,t){for(var i,a,o,r,s,n,l,d=[],u=0,c=e.length;u<c;u++)if("default"==e[u].name){for(i=0,r=e[u].sections.length;i<r;i++)d.push(jQuery.extend(!0,{},e[u].sections[i]));break}for(u=0,s=d.length;u<s;u++)if("true"==d[u].section_is_model.toString())for(a=0,n=t.length;a<n;a++)if(t[a].id==d[u].section_model_id){for(o=0,l=t[a].customizations.length;o<l;o++)if("default"==t[a].customizations[o].name){d[u].targets=jQuery.extend(!0,[],t[a].customizations[o].targets);break}break}return d},_getDefaultModelsLayout=function(e){for(var t,i,a=[],o=0,r=e.length;o<r;o++)for(t=0,i=e[o].customizations.length;t<i;t++)if("default"==e[o].customizations[t].name){a.push({id:e[o].id,targets:e[o].customizations[t].targets});break}return a};function guessLayout(t){var e=document.getElementById("layout-avaiable-dimensions").textContent,i=(e=""!==e?JSON.parse(e):[]).filter(function(e){return e.id===t});if(!i)return"default";if("standard"===(i=i[0]).type)return"default";var a,o=$availableLayoutNames.text(),r=e.filter(function(e){return-1!==o.indexOf(e.id)}),s=r.length,n="";if(parseInt(i.min)<_plugin_frontend_settings.defaultSettings.collapseWidth){for(a=0;a<s;a++)if(parseInt(r[a].min)<_plugin_frontend_settings.defaultSettings.collapseWidth&&parseInt(i.min)>=parseInt(r[a].min)&&(""===r[a].max||parseInt(i.min)<=parseInt(r[a].max))){n=r[a].id;break}}else for(a=0;a<s;a++)if(parseInt(r[a].min)>=_plugin_frontend_settings.defaultSettings.collapseWidth&&parseInt(i.min)>=parseInt(r[a].min)&&(""===r[a].max||parseInt(i.min)<=parseInt(r[a].max))){n=r[a].id;break}return n=""===n?"default":n}var _getCustomLayoutSections=function(e,t,i,a){if("default"==a)return i;for(var o,r,s,n,l,d,u,c,_,g,m=[],p=!1,b=_getDefaultModelsLayout(t),f=0,h=e.length;f<h;f++)if(e[f].name==a){for(p=!0,o=0,n=e[f].sections.length;o<n;o++)m.push(jQuery.extend(!0,{},e[f].sections[o]));break}if(!p)for(f=0,l=i.length;f<l;f++){var v=jQuery.extend(!0,{},i[f]);v.targets=_createEmptyTargets(i[f].targets),v.sectionCleared=!0,m.push(v)}for(f=0,d=m.length;f<d;f++)if("true"==m[f].section_is_model.toString()){for(r=0,u=t.length;r<u;r++)if(t[r].id==m[f].section_model_id){for(g=!1,s=0,c=t[r].customizations.length;s<c;s++)if(t[r].customizations[s].name==a){g=!0,m[f].targets=jQuery.extend(!0,[],t[r].customizations[s].targets),m[f].defaultSection=!1,m[f].sectionCleared=!1;break}if(!g)for(s=0,_=b.length;s<_;s++)if(m[f].section_model_id==b[s].id){m[f].targets=_createEmptyTargets(b[s].targets),m[f].sectionCleared=!0;break}break}}else if(0==m[f].targets.length)for(o=0,l=i.length;o<l;o++)if(m[f].section_rex_id==i[o].section_rex_id){m[f].targets=_createEmptyTargets(i[o].targets),m[f].sectionCleared=!0;break}return m},_mergeSections=function(e,t){var i,a,o,r,s,n,l,d,u;if("default"!=Rexbuilder_Util.activeLayout){for(i=0,s=e.length;i<s;i++)for(e[i].sectionFounded=!1,e[i].defaultSection=!1,a=0,n=t.length;a<n;a++)if(e[i].section_rex_id==t[a].section_rex_id){e[i].sectionFounded=!0;var c,_,g,m=e[i],p=t[a];for((void 0===m.targets[0]||jQuery.isEmptyObject(m.targets[0].props)||void 0!==m.sectionCleared&&m.sectionCleared)&&(m.defaultSection=!0,m.targets=jQuery.extend(!0,[],p.targets)),o=0,l=m.targets.length;o<l;o++){for(u=!1,r=0,d=p.targets.length;r<d;r++)if(m.targets[o].name==p.targets[r].name){m.targets[o].notDisplay=!1,p.targets[r].oldElement=u=!0,1<=o&&jQuery.isEmptyObject(m.targets[o].props)&&"default"!=Rexbuilder_Util.activeLayout&&p.targets[0].props.layout!=m.targets[0].props.layout&&(_=parseFloat(p.targets[0].props.grid_cell_width),g=5,"masonry"==p.targets[0].props.layout?(m.targets[o].props.gs_y=Math.round(p.targets[r].props.gs_y*g/_),m.targets[o].props.gs_height=Math.round(p.targets[r].props.gs_height*g/_),m.targets[o].props.gs_start_h=Math.round(p.targets[r].props.gs_start_h*g/_)):(m.targets[o].props.gs_y=Math.round(p.targets[r].props.gs_y*_/g),m.targets[o].props.gs_height=Math.round(p.targets[r].props.gs_height*_/g),m.targets[o].props.gs_start_h=Math.round(p.targets[r].props.gs_start_h*_/g))),m.targets[o].props=Rexbuilder_Util.merge(p.targets[r].props,m.targets[o].props);break}u||(m.targets[o].notDisplay=!0)}for(r=0,d=p.targets.length;r<d;r++)void 0===p.targets[r].oldElement&&(c=jQuery.extend(!0,{},p.targets[r]),"default"!=Rexbuilder_Util.activeLayout&&p.targets[0].props.layout!=m.targets[0].props.layout&&(_=parseFloat(p.targets[0].props.grid_cell_width),g=5,"masonry"==p.targets[0].props.layout?(c.props.gs_y=Math.round(c.props.gs_y*g/_),c.props.gs_height=Math.round(c.props.gs_height*g/_),c.props.gs_start_h=Math.round(c.props.gs_start_h*g/_)):(c.props.gs_y=Math.round(c.props.gs_y*_/g),c.props.gs_height=Math.round(c.props.gs_height*_/g),c.props.gs_start_h=Math.round(c.props.gs_start_h*_/g))),m.targets.splice(1,0,c));break}if(0==e.length)for(i=0,s=(e=t).length;i<s;i++)e[i].defaultSection=!0}for(_createPageCustomizationsDataLive(e),i=0,s=e.length;i<s;i++)(e[i].sectionFounded||"default"==Rexbuilder_Util.activeLayout)&&("default"!=Rexbuilder_Util.activeLayout&&e[i].defaultSection||"default"==Rexbuilder_Util.activeLayout)&&_isMobile()&&(e[i].targets[0].props.collapse_grid=!0,e[i].targets[0].props.noMobileLayoutSaved=!0,e[i].targets[0].props.layout="masonry",e[i].targets[0].props.fullHeight=!1);return jQuery.extend(!0,{},e)};function _isMobile(){return Rexbuilder_Util.globalViewport.width<_plugin_frontend_settings.defaultSettings.collapseWidth}var _cssPropertyValueSupported=function(e,t){var i=document.createElement("div");return i.style[e]=t,i.style[e]===t};function clearSectionsEdited(){for(var e=Array.prototype.slice.call(Rexbuilder_Util.rexContainer.getElementsByClassName("rexpansive_section")),t=e.length,i=0;i<t;i++){e[i].setAttribute("data-rexlive-section-edited",!1),e[i].querySelector(".grid-stack-row").setAttribute("data-rexlive-layout-changed",!1);for(var a=Array.prototype.slice.call(e[i].getElementsByClassName("grid-stack-item")),o=a.length,r=0;r<o;r++)a[r].setAttribute("data-rexlive-element-edited",!1)}}var launchEditDomLayout=function(){var e=Rexbuilder_Util.chooseLayout();Rexbuilder_Util.edit_dom_layout(e)},edit_dom_layout=function(e){var t={collapse_needed:!1};if(e==Rexbuilder_Util.activeLayout&&"default"==e)_isMobile()?Rexbuilder_Util.blockGridUnder768||(Rexbuilder_Util.collapseAllGrids(),t.collapse_needed=!0):Rexbuilder_Util.removeCollapsedGrids();else if(Rexbuilder_Util.rexContainer.setAttribute("data-rex-layout-selected",e),Rexbuilder_Util.activeLayout=e,"true"==$rexbuilderLayoutData.children(".layouts-customizations").attr("data-empty-customizations")&&"true"==$rexbuilderModelData.children(".models-customizations").attr("data-empty-models-customizations")){_isMobile()?Rexbuilder_Util.blockGridUnder768||(Rexbuilder_Util.collapseAllGrids(),t.collapse_needed=!0):Rexbuilder_Util.removeCollapsedGrids();var i=document.querySelector(".rexpansive_section.empty-section");if(i){i=[{section_rex_id:i.getAttribute("data-rexlive-section-id"),targets:[{name:"self",props:{}}]}];Rexbuilder_Util.editedDataInfo=new RexEditedData(i)}else{for(var a=Array.prototype.slice.call(document.getElementsByClassName("rexpansive_section")),o=a.length,r=[],s=0;s<o;s++){for(var n={},l=a[s].querySelector(".section-data"),d=(n.section_rex_id=a[s].getAttribute("data-rexlive-section-id"),n.targets=[],{name:"",props:{}}),u=(d.name="self",d.props.section_name=l.getAttribute("data-section_name"),d.props.section_nav_label=l.getAttribute("data-section_nav_label"),d.props.color_bg_section=l.getAttribute("data-color_bg_section"),d.props.color_bg_section_active=""!==d.props.color_bg_section,d.props.image_bg_section_active=l.getAttribute("data-image_bg_section_active"),d.props.image_bg_section=l.getAttribute("data-image_bg_section"),d.props.image_width=l.getAttribute("data-image_width"),d.props.image_height=l.getAttribute("data-image_height"),d.props.id_image_bg_section=l.getAttribute("data-id_image_bg_section"),d.props.image_size=l.getAttribute("data-image_size"),d.props.video_bg_id=l.getAttribute("data-video_bg_id_section"),d.props.video_mp4_url=l.getAttribute("data-video_mp4_url"),d.props.video_bg_width_section=l.getAttribute("data-video_bg_width_section"),d.props.video_bg_height_section=l.getAttribute("data-video_bg_height_section"),d.props.video_bg_url_section=l.getAttribute("data-video_bg_url_section"),d.props.video_bg_url_vimeo_section=l.getAttribute("data-video_bg_url_vimeo_section"),d.props.block_distance=l.getAttribute("data-block_distance"),d.props.row_separator_top=l.getAttribute("data-row_separator_top"),d.props.row_separator_bottom=l.getAttribute("data-row_separator_bottom"),d.props.row_separator_right=l.getAttribute("data-row_separator_right"),d.props.row_separator_left=l.getAttribute("data-row_separator_left"),d.props.margin=l.getAttribute("data-margin"),d.props.row_margin_top=l.getAttribute("data-row_margin_top"),d.props.row_margin_bottom=l.getAttribute("data-row_margin_bottom"),d.props.row_margin_right=l.getAttribute("data-row_margin_right"),d.props.row_margin_left=l.getAttribute("data-row_margin_left"),d.props.custom_classes=l.getAttribute("data-custom_classes"),d.props.row_overlay_color=l.getAttribute("data-row_overlay_color"),d.props.row_overlay_active=l.getAttribute("data-row_overlay_active"),n.targets.push(d),Array.prototype.slice.call(a[s].getElementsByClassName("rexbuilder-block-data"))),c=u.length,g=0;g<c;g++){var m={name:u[g].getAttribute("data-rexbuilder_block_id"),props:{color_bg_block:u[g].getAttribute("data-color_bg_block"),color_bg_block_active:u[g].getAttribute("data-color_bg_block_active"),image_bg_url:u[g].getAttribute("data-image_bg_url"),image_width:u[g].getAttribute("data-image_width"),image_height:u[g].getAttribute("data-image_height"),id_image_bg:u[g].getAttribute("data-id_image_bg"),image_size:u[g].getAttribute("data-image_size"),image_bg_elem_active:u[g].getAttribute("data-image_bg_elem_active"),type_bg_image:u[g].getAttribute("data-type_bg_image"),video_bg_id:u[g].getAttribute("data-video_bg_id"),video_bg_width:u[g].getAttribute("data-video_bg_width"),video_bg_height:u[g].getAttribute("data-video_bg_height"),video_mp4_url:u[g].getAttribute("data-video_mp4_url"),video_bg_url_youtube:u[g].getAttribute("data-video_bg_url_youtube"),video_bg_url_vimeo:u[g].getAttribute("data-video_bg_url_vimeo"),photoswipe:u[g].getAttribute("data-photoswipe"),block_custom_class:u[g].getAttribute("data-block_custom_class"),block_padding:u[g].getAttribute("data-block_padding"),overlay_block_color:u[g].getAttribute("data-overlay_block_color"),overlay_block_color_active:u[g].getAttribute("data-overlay_block_color_active"),linkurl:u[g].getAttribute("data-linkurl"),block_flex_position:u[g].getAttribute("data-block_flex_position"),block_flex_img_position:u[g].getAttribute("data-block_flex_img_position")}};n.targets.push(m)}r.push(n)}Rexbuilder_Util.editedDataInfo=new RexEditedData(r)}}else{for(var p,b,f=[],h=[],v=[].slice.call(Rexbuilder_Util.rexContainer.querySelectorAll(".rexpansive_section:not(.removing_section)")),B=v.length,x=0;x<B;x++)Rexbuilder_Util.hasClass(v[x],"rex-model-section")&&f.push(parseInt(v[x].getAttribute("data-rexlive-model-id"))),p={rexID:v[x].getAttribute("data-rexlive-section-id"),modelID:isNaN(parseInt(v[x].getAttribute("data-rexlive-model-id")))?"":parseInt(v[x].getAttribute("data-rexlive-model-id"))},h.push(p);for(var y,D,i=_getPageCustomizations(),S=("default"==Rexbuilder_Util.activeLayout&&_saveCustomizationDomOrder(jQuery.extend(!0,[],i)),_getModelsCustomizations()),C=("true"==$defaultLayoutState.attr("data-empty-default-customization")?(y=Rexbuilder_Util.getDefaultPageLayout(i,S),_createDefaultLayoutState(y)):(_updateDefaultLayoutState({modelsData:S}),y=_getDefaultLayoutState()),Rexbuilder_Util.getCustomLayoutSections(i,S,y,e)),U=[],k=0;k<C;k++)if("true"==C[k].section_is_model.toString()){for(D=!1,b=0;b<U.length;b++)if(U[b].id==C[k].section_model_id){U[b].number=U[b].number+1,C[k].section_model_number=U[b].number,D=!0;break}D||(C[k].section_model_number=1,U.push({id:C[k].section_model_id,number:1}))}Rexbuilder_Util.clearSectionsEdited();var I,R,w,S=!1,i=("default"!==e&&"tablet"!==e&&"mobile"!==e&&null===document.querySelector('.customization-wrap[data-customization-name="'+e+'"]')&&(e!==(I=guessLayout(e))?(R=(R=i.filter(function(e){return I===e.name}))[0].sections,S=!0):R=C),null),A=(S&&(i=C.map(function(e){var t=e.targets.map(function(e){return{name:e.name,props:{}}});return _.merge(_.omit(e,"targets"),{targets:t})})),Rexbuilder_Util.editedDataInfo=new RexEditedData(i||C),_mergeSections(void 0===I?C:R,y)),L=(Rexbuilder_Util.removeCollapsedGrids(),Rexbuilder_Util.domUpdating=!0,[]);for(w in A){var N,z,E,P=A[w],V=P.section_rex_id;P.notInSection&&"default"!=e||(N={rexID:V,modelID:-1,modelNumber:-1},(z="true"==P.section_is_model.toString()?(z=P.section_model_id,E=P.section_model_number,N.modelID=z,N.modelNumber=E,Rexbuilder_Util.rexContainer.querySelector('section[data-rexlive-section-id="'+V+'"][data-rexlive-model-number="'+N.modelNumber+'"]')):Rexbuilder_Util.rexContainer.querySelector('section[data-rexlive-section-id="'+V+'"]'))&&!Rexbuilder_Util.hasClass(z,"removing_section")&&(void 0!==P.section_hide&&"true"==P.section_hide.toString()?Rexbuilder_Util.addClass(z,"rex-hide-section"):(Rexbuilder_Util.removeClass(z,"rex-hide-section"),E=$(z),V=_updateDOMelements(E,P.targets,!1,w),t.collapse_needed+=V),L.push(N)))}Rexbuilder_Dom_Util.fixSectionDomOrder(L,!0),Rexbuilder_Util.domUpdating=!1}return t},_updateDOMelements=function(e,t,i,a){var o=e.find(".grid-stack-row"),r=o.get(0),s=o.data(),n=s.plugin_perfectGridGalleryEditor,l=(t[0].props.gridEdited&&r.setAttribute("data-rexlive-layout-changed",!0),e.removeClass("empty-section"),!0);if(void 0!==s&&void 0!==n){for(var d,u=1,c=t.length;u<c;u++)null!==(p=r.querySelector('div[data-rexbuilder-block-id="'+t[u].name+'"]'))&&(l*=d=void 0!==t[u].props.hide&&"true"==t[u].props.hide.toString(),d?Rexbuilder_Util.hasClass(p,"rex-hide-element")||(Rexbuilder_Util.addClass(p,"rex-hide-element"),n.removeBlock(p)):Rexbuilder_Util.hasClass(p,"rex-hide-element")&&(Rexbuilder_Util.removeClass(p,"rex-hide-element"),n.reAddBlock($(p))));n.properties.gridstackInstance.batchUpdate()}l&&e.addClass("empty-section");var _,g,m,p,b,f,h=t.length;for(u=1;u<h;u++)if((!t[u].notDisplay||"default"==Rexbuilder_Util.activeLayout)&&(x=t[u].name,_=t[u].props,p=(x=o.find('.perfect-grid-item[data-rexbuilder-block-id="'+x+'"]'))[0],g=x.children(".rexbuilder-block-data"),m=x.find(".grid-item-content"),0<x.length)){if(f=(b=[].slice.call(p.getElementsByTagName("img"))).length,!Rexbuilder_Util.editorMode&&0!==f)for(var v=0;v<f;v++)"true"===b[v].getAttribute("inline-photoswipe")&&Rexbuilder_Photoswipe.addElementFromInline($(b[v]));var x={$elem:x,targetProps:_,$itemData:g,$itemContent:m,gridstackInstance:Rexbuilder_Util.editorMode?n.properties.gridstackInstance:null,positionAndSize:!0};Rexbuilder_Util.updateDOMSingleElement(x)}updateSection(e,o,t[0].props,i),Rexbuilder_Util.editorMode&&updateSectionTools(e,o,t[0].props,i);e=void 0!==t[0].props.collapse_grid&&("true"==t[0].props.collapse_grid.toString()||i);return void 0!==s&&void 0!==n&&void 0!==n.properties.gridstackInstance&&n.properties.gridstackInstance&&(Rexbuilder_Util.domUpdating=!0,n.properties.gridstackInstance.commit(),handlingGridstackCommitEnd(n,e,t,a)),e};function handlingGridstackCommitEnd(e,t,i,a){Rexbuilder_Util.domUpdating=!0,e.properties.gridstackInstance&&e.properties.gridstackInstance.batchUpdate(),e.fixBlockDomOrder(),e.saveStateGrid(),"masonry"!=e.settings.galleryLayout||t?"fixed"==e.settings.galleryLayout&&"true"==e.settings.fullHeight.toString()&&e.updateFullHeight():e.updateBlocksHeight(),i[0].props.collapse_grid&&(e.collapseElements(),e.collapseElementsProperties()),e.properties.gridstackInstance&&e.properties.gridstackInstance.commit();t=setTimeout(handlingRowReady.bind(null,e,a,i[0].props.collapse_grid),200);edlTimeouts.push(t)}function handlingRowReady(e,t,i){Rexbuilder_Util.domUpdating=!1,e.properties.dispositionBeforeCollapsing=e.createActionDataMoveBlocksGrid(),e._createFirstReverseStack(),e._fixImagesDimension(),Rexbuilder_Util.editorMode&&e._updateElementsSizeViewers(),handlingRowReadyEnd(t),i||setTimeout(Rexbuilder_Util.fixYoutube.bind(null,e.section),1500)}function updateDOMSingleElement(e){var t=e.$elem,i=t.get(0),a=e.targetProps,o=e.$itemData,r=o.get(0),s=e.$itemContent,n=e.gridstackInstance,l=e.positionAndSize||!1,e=e.collapseGrid||!1,i=(l&&(e&&(i.setAttribute("data-gs-width",12),i.setAttribute("data-width",12),r.setAttribute("data-gs_width",12),r.setAttribute("data-size_x",12),a.gs_width="12",a.size_x="12",i.setAttribute("data-gs-x",0),i.setAttribute("data-row",1),r.setAttribute("data-gs_x",0),r.setAttribute("data-row",1),a.gs_x="0",a.row="1"),l={x:i.getAttribute("data-gs-x"),y:i.getAttribute("data-gs-y"),w:i.getAttribute("data-gs-width"),h:i.getAttribute("data-gs-height"),startH:r.getAttribute("data-gs_start_h"),realFluid:r.getAttribute("data-element_real_fluid")},e={x:void 0===a.gs_x?l.x:a.gs_x,y:void 0===a.gs_y?l.y:a.gs_y,w:void 0===a.gs_width?l.w:a.gs_width,h:void 0===a.gs_height?l.h:a.gs_height,startH:void 0===a.gs_start_h?l.startH:a.gs_start_h,realFluid:void 0===a.element_real_fluid?l.realFluid:a.element_real_fluid,gridstackInstance:n},updateElementDimensions(t[0],o[0],e)),isNaN(parseInt(a.video_bg_id))?"":parseInt(a.video_bg_id)),r=void 0===a.video_bg_url_youtube?"":a.video_bg_url_youtube,l=void 0===a.video_bg_url_vimeo?"":a.video_bg_url_vimeo,n="",e=(""!=i?n="mp4":""!=l?n="vimeo":""!=r&&(n="youtube"),{mp4Data:{idMp4:i,linkMp4:void 0===a.video_mp4_url?"":a.video_mp4_url,width:isNaN(parseInt(a.video_bg_width))?"":parseInt(a.video_bg_width),height:isNaN(parseInt(a.video_bg_height))?"":parseInt(a.video_bg_height)},vimeoUrl:l,youtubeUrl:r,audio:void 0===a.video_has_audio?"":"1"==a.video_has_audio||"true"==a.video_has_audio.toString(),typeVideo:n}),i=(Rexbuilder_Dom_Util.updateVideos(s,e),void 0===a.image_bg_elem_active||"true"==a.image_bg_elem_active.toString()),l={active:i,idImage:!i||isNaN(parseInt(a.id_image_bg))?"":parseInt(a.id_image_bg),urlImage:i?a.image_bg_url:"",width:!i||isNaN(parseInt(a.image_width))?"":parseInt(a.image_width),height:!i||isNaN(parseInt(a.image_height))?"":parseInt(a.image_height),typeBGimage:i?a.type_bg_image:"",photoswipe:i?a.photoswipe:""},r=(Rexbuilder_Dom_Util.updateImageBG(s,l),{$elem:t,color:void 0!==a.color_bg_block?a.color_bg_block:"",active:void 0===a.color_bg_block_active||a.color_bg_block_active.toString()}),n=(-1===r.color.indexOf("gradient")?Rexbuilder_Dom_Util.updateBlockBackgroundColor(r):Rexbuilder_Dom_Util.updateBlockBackgroundGradient(r),{$elem:t,color:void 0!==a.overlay_block_color?a.overlay_block_color:"",active:void 0!==a.overlay_block_color_active&&a.overlay_block_color_active.toString()}),e=(-1===n.color.indexOf("gradient")?Rexbuilder_Dom_Util.updateBlockOverlay(n):Rexbuilder_Dom_Util.updateBlockOverlayGradient(n),Rexbuilder_Dom_Util.updateBlockPaddings(t,_getPaddingsDataString(void 0!==a.block_padding?a.block_padding:"")),void 0===a.block_custom_class?"":a.block_custom_class),i=[],l=(""!=e&&(i=(e=e.trim()).split(/\s+/)),Rexbuilder_Dom_Util.updateCustomClasses(t,i),void 0!==a.block_flex_position?a.block_flex_position.split(" "):""),r={x:l[0],y:l[1]};Rexbuilder_Dom_Util.updateFlexPostition(t,r);n={x:(l=void 0!==a.block_flex_img_position?a.block_flex_img_position.split(" "):"")[0],y:l[1]},Rexbuilder_Dom_Util.updateImageFlexPostition(t,n),e=void 0===a.slider_dimension_ratio?"":a.slider_dimension_ratio,o.attr("data-slider_ratio",e),i=void 0===a.block_ratio?"":a.block_ratio,o.attr("data-block_ratio",i),r=void 0===a.block_dimensions_live_edited?"":a.block_dimensions_live_edited;o.attr("data-block_dimensions_live_edited",r);void 0!==a.hide&&"true"==a.hide.toString()?(t.hasClass("rex-hide-element")||t.addClass("rex-hide-element"),Rexbuilder_Util.stopBlockVideos(t)):(t.hasClass("rex-hide-element")&&t.removeClass("rex-hide-element"),Rexbuilder_Util.playBlockVideos(t));var d,u,c,l=void 0!==a.element_edited&&"true"==a.element_edited.toString();for(d in t.attr("data-rexlive-element-edited",l),a)switch(d){case"type":o.attr("data-type",a.type);break;case"size_x":t.attr("data-width",a.size_x);break;case"size_y":t.attr("data-height",a.size_y);break;case"row":t.attr("data-row",a.row);break;case"col":t.attr("data-col",a.col);break;case"photoswipe":Rexbuilder_Util.editorMode||(""===a.linkurl&&"true"==a.photoswipe?(Rexbuilder_Photoswipe.addElement(s,a.image_bg_url,parseInt(a.image_width),parseInt(a.image_height),a.image_size),t.parents(".rexpansive_section").addClass("photoswipe-gallery")):Rexbuilder_Photoswipe.removeElement(s)),o.attr("data-photoswipe",a.photoswipe);break;case"linkurl":Rexbuilder_Util.editorMode||(u=s.parents(".element-link"),""!=a.linkurl?0!=u.length?(u.attr("href",a.linkurl),u.attr("title",a.linkurl)):(c=s.parent(),tmpl.arg="link",c.append('<a class="element-link hovered" href="'+a.linkurl+'" title="'+a.linkurl+'"></a>'),c=c.children(".element-link"),s.detach().appendTo(c)):0!=u.length&&u.children().unwrap()),Rexbuilder_Dom_Util.updateBlockUrl(t,a.linkurl)}}var _getDefaultBlockMeasure=function(n){var l={defDefaultWidth:3,defDefaultHeight:4,defMobileWidth:12,defMobileHeight:null};return""!==(n=void 0!==n?n:"")&&$pageCustomizationsDataDiv.find(".customization-wrap").each(function(e,t){for(var i=$(t),a=t.getAttribute("data-customization-name"),o=JSON.parse(i.find(".section-targets[data-section-rex-id="+n+"]").text()),r=0,s=o.length;r<s;r++)if("self"===o[r].name){switch(o[r].props.layout){case"masonry":"mobile"==a?l.defMobileHeight=52:l.defDefaultHeight=Math.ceil(4*o[r].props.grid_cell_width/5);break;case"fixed":"mobile"==a?l.defMobileHeight=4:l.defDefaultHeight=4}break}}),l.defMobileHeight||(l.defMobileHeight=52),l},_updateModelsLive=function(e,t,i){Rexbuilder_Util.domUpdating=!0;for(var a,o=[].slice.call(Rexbuilder_Util.rexContainer.getElementsByClassName("rexpansive_section")),r=o.length,s=0;s<r;s++)o[s].getAttribute("data-rexlive-model-id")==e&&o[s].getAttribute("data-rexlive-model-number")!=i&&(a=$(o[s]),_updateDOMelements(a,t,!1));Rexbuilder_Util.domUpdating=!1},_saveCustomizationDomOrder=function(e){$layoutsDomOrder.children().remove();for(var t,i,a=[],o=0,r=e.length;o<r;o++){var s=document.createElement("script");for(Rexbuilder_Util.addClass(s,"layout-sections"),s.setAttribute("data-rex-layout-name",e[o].name),a=[],t=0,i=e[o].sections.length;t<i;t++)a.push(e[o].sections[t]);s.textContent=JSON.stringify(a),$(s).appendTo($layoutsDomOrder[0])}},_getPageDefaultDom=function(){var e=$layoutsDomOrder.children('.layout-sections[data-rex-layout-name="default"]');return{name:"default",sections:JSON.parse(e.text())}},_getPageCustomizationsDom=function(){var i=[];return $layoutsDomOrder.children('.layout-sections:not([data-rex-layout-name="default"])').each(function(e,t){t=$(t);i.push({name:t.attr("data-rex-layout-name"),sections:JSON.parse(t.text())})}),i},_updatePageCustomizationsDomOrder=function(e){for(var t=0,i=e.length;t<i;t++)$layoutsDomOrder.children('.layout-sections[data-rex-layout-name="'+e[t].name+'"]').text(JSON.stringify(e[t].sections))},_getPageAvaiableLayoutsNames=function(){return JSON.parse($availableLayoutNames.text())},_getLayoutLiveSectionTargets=function(e){var i,a,o=[];return e.hasClass("rex-model-section")?(i=e.attr("data-rexlive-model-id"),$liveDataContainer.children().each(function(e,t){t=$(t);if(i==t.attr("data-model-id"))return o=JSON.parse(t.text()),!1})):(a=e.attr("data-rexlive-section-id"),$liveDataContainer.children().each(function(e,t){t=$(t);if(a==t.attr("data-section-rex-id"))return o=JSON.parse(t.text()),!1})),o},_applyDefaultBlocksDimentions=function(e,t,i){for(var a=_getDefaultLayoutState(),o=e.attr("data-rexlive-section-id"),r=0,s=a.length;r<s;r++)if(o==a[r].section_rex_id){var n=a[r].targets;i.layout=n[0].props.layout,i.fullHeight=n[0].props.full_height,i.collapsed=void 0!==n[0].props.collapsed&&n[0].props.collapsed;for(var l=1,d=t.length;l<d;l++)for(var u=0,c=n.length;u<c;u++){var _=t[l];_.name==n[u].name&&(_.props.gs_x=n[u].props.gs_x,_.props.gs_y=n[u].props.gs_y,_.props.gs_width=n[u].props.gs_width,_.props.gs_height=n[u].props.gs_height,_.props.gs_start_h=n[u].props.gs_start_h)}break}},_createDefaultLayoutState=function(e){var t,i;for($defaultLayoutState.children().remove(),t=0,i=e.length;t<i;t++){var a=$(document.createElement("script"));a.addClass("section-targets"),a.attr("data-section-rex-id",e[t].section_rex_id),a.attr("data-model-id",e[t].section_model_id),a.attr("data-model-number",e[t].section_model_number),a.attr("data-section-hide",e[t].section_hide),a.text(JSON.stringify(e[t].targets)),a.appendTo($defaultLayoutState[0])}$defaultLayoutState.removeAttr("data-empty-default-customization")},_updateDefaultLayoutState=function(e){var t,o,r,s,i,a,n=void 0===e.pageData?[]:e.pageData,l=void 0===e.modelsData?[]:e.modelsData;if(0==n.length)$defaultLayoutState.children(".section-targets").each(function(e,t){var i=$(t),a=isNaN(parseInt(i.attr("data-model-id")))?-1:parseInt(i.attr("data-model-id"));if(-1!=a)for(o=0;o<l.length;o++)if(a==l[o].id){for(r=0,s=l[o].customizations.length;r<s;r++)if("default"==l[o].customizations[r].name){i.text(JSON.stringify(l[o].customizations[r].targets));break}break}});else for($defaultLayoutState.children(".section-targets").remove(),t=0,i=n.length;t<i;t++){var d=$(document.createElement("script"));if(d.addClass("section-targets"),d.attr("data-section-rex-id",n[t].section_rex_id),d.attr("data-model-id",n[t].section_model_id),d.attr("data-model-number",n[t].section_model_number),d.attr("data-section-hide",n[t].section_hide),""==n[t].section_model_id||-1==n[t].section_model_id)d.text(JSON.stringify(n[t].targets));else if(-1!=n[t].section_model_id)for(o=0,a=l.length;o<a;o++)if(n[t].section_model_id==l[o].id){for(r=0,s=l[o].customizations.length;r<s;r++)if("default"==l[o].customizations[r].name){d.text(JSON.stringify(l[o].customizations[r].targets));break}break}d.appendTo($defaultLayoutState[0])}},_updateDefaultLayoutStateDOMOrder=function(e){for(var t,i,a,o,r=_getDefaultLayoutState(),s=[],n=0,l=(e=jQuery.extend(!0,[],e)).length;n<l;n++)if(-1!=e[n].modelID){for(o=!1,t=0,i=s.length;t<i;t++)if(s[t].id==e[n].modelID){s[t].number=s[t].number+1,e[n].modelNumber=s[t].number,o=!0;break}o||(s.push({id:e[n].modelID,number:1}),e[n].modelNumber=1)}var d,u=[];for(n=0,l=e.length;n<e;n++){for(t=0,a=r.length;t<a;t++)-1!=e[n].modelID?e[n].modelID==r[t].section_model_id&&e[n].modelNumber==r[t].section_model_number&&(d=r.splice(t,1)):e[n].rexID==r[t].section_rex_id&&(d=r.splice(t,1));u.push(d[0])}_updateDefaultLayoutState({pageData:u})},_updateDefaultLayoutStateSection=function(e,i){var a,t=e[0],o=(i=void 0===i?-1:i,Rexbuilder_Dom_Util.fixModelNumbers(),Rex_Save_Listeners.createTargets(e,Rexbuilder_Util.activeLayout)),r=!1;if(hasClass(t,"rex-model-section")){var s=t.getAttribute("data-rexlive-model-id"),n=t.getAttribute("data-rexlive-section-number"),l=(d=[].slice.call($defaultLayoutState[0].getElementsByClassName("section-targets"))).length;for(u=0;u<l;u++)s==d[u].getAttribute("data-model-id")&&(d[u].textContent=JSON.stringify(o),n==d[u].getAttribute("data-model-number"))&&(r=!0)}else{var d,u,c=t.getAttribute("data-rexlive-section-id"),l=(d=[].slice.call($defaultLayoutState[0].getElementsByClassName("section-targets"))).length;for(u=0;u<l;u++)c==d[u].getAttribute("data-section-rex-id")&&(d[u].textContent=JSON.stringify(o),r=!0)}r||((e={section_rex_id:t.getAttribute("data-rexlive-section-id"),section_is_model:!1,section_model_id:"",section_model_number:-1,section_hide:!1}).section_hide=hasClass(t,"rex-hide-section"),hasClass(t,"rex-model-section")&&(e.section_is_model=!0,e.section_model_id=t.getAttribute("data-rexlive-model-id"),e.section_model_number=t.getAttribute("data-rexlive-model-number")),t=document.createElement("script"),addClass(t,"section-targets"),t.setAttribute("data-section-rex-id",e.section_rex_id),t.setAttribute("data-model-id",e.section_model_id),t.setAttribute("data-model-number",e.section_model_number),t.setAttribute("data-section-hide",e.section_hide),t.textContent=JSON.stringify(o),e=$(t),-1==i?e.appendTo($defaultLayoutState[0]):(i-=1,$defaultLayoutState.children(".section-targets").each(function(e,t){if(e==i)return a=$(t),!1}),a.after(e[0])))},_getDefaultLayoutState=function(){var s=[];return $defaultLayoutState.children(".section-targets").each(function(e,t){var t=$(t),i=t.attr("data-section-rex-id"),a=isNaN(parseInt(t.attr("data-model-id")))?-1:parseInt(t.attr("data-model-id")),o=isNaN(parseInt(t.attr("data-model-number")))?-1:parseInt(t.attr("data-model-number")),r=void 0!==t.attr("data-section-hide")&&"1"==t.attr("data-section-hide").toString(),t=""!=t.text()?JSON.parse(t.text()):[];s.push({section_rex_id:i,section_model_id:-1!=a?a:"",section_model_number:-1!=o?o:"",section_is_model:-1!=a,section_hide:r,targets:t})}),s},_updateSectionOrderCustomLayouts=function(e,t){for(var i,a,o,r,s,n,l=Rexbuilder_Util.getPageCustomizationsDom(),d=0,u=t.length;d<u;d++)if(t[d].rexID==e.rexID&&t[d].modelNumber==e.modelNumber&&t[d].modelID==e.modelID){a=d;break}for(d=0,r=l.length;d<r;d++){for(i=!1,o=0,s=l[d].sections.length;o<s;o++)if(l[d].sections[o].section_is_model){if(l[d].sections[o].section_model_id==e.modelID&&l[d].sections[o].section_model_number==e.modelNumber){void 0!==l[d].sections[o].section_created_live&&"true"==l[d].sections[o].section_created_live.toString()&&(i=!0);break}}else if(e.rexID==l[d].sections[o].section_rex_id){void 0!==l[d].sections[o].section_created_live&&"true"==l[d].sections[o].section_created_live.toString()&&(i=!0);break}i&&(n=l[d].sections.splice(o,1)[0],l[d].sections.splice(a,0,n))}Rexbuilder_Util.updatePageCustomizationsDomOrder(l)},_updateSectionStateLive=function(e){Rexbuilder_Dom_Util.fixModelNumbers();var i,a,t,o=Rex_Save_Listeners.createTargets(e,Rexbuilder_Util.activeLayout),r=!1;e.hasClass("rex-model-section")?(i=e.attr("data-rexlive-model-id"),$liveDataContainer.children().each(function(e,t){t=$(t);i==t.attr("data-model-id")&&(t.text(JSON.stringify(o)),r=!0)})):(a=e.attr("data-rexlive-section-id"),$liveDataContainer.children().each(function(e,t){t=$(t);a==t.attr("data-section-rex-id")&&(t.text(JSON.stringify(o)),r=!0)})),r||((t={section_rex_id:e.attr("data-rexlive-section-id"),section_is_model:!1,section_model_id:"",section_model_number:-1,section_hide:!1}).section_hide=e.hasClass("rex-hide-section"),e.hasClass("rex-model-section")&&(t.section_is_model=!0,t.section_model_id=e.attr("data-rexlive-model-id"),t.section_model_number=e.attr("data-rexlive-model-number")),(e=$(document.createElement("script"))).addClass("section-targets"),e.attr("data-section-rex-id",t.section_rex_id),e.attr("data-model-id",t.section_model_id),e.attr("data-model-number",t.section_model_number),e.attr("data-section-hide",t.section_hide),e.text(JSON.stringify(o)),e.appendTo($liveDataContainer[0]))},_getGridLayoutLive=function(e){var i,a,o,t={layout:"fixed",fullHeight:!1,collapsed:!1};return e.hasClass("rex-model-section")?(a=e.attr("data-rexlive-model-id"),$liveDataContainer.children(".section-targets").each(function(e,t){t=$(t);a==t.attr("data-model-id")&&(i=JSON.parse(t.text()))})):(o=e.attr("data-rexlive-section-id"),$liveDataContainer.children(".section-targets").each(function(e,t){t=$(t);o==t.attr("data-section-rex-id")&&(i=JSON.parse(t.text()))})),t.layout=i[0].props.layout,t.fullHeight=i[0].props.full_height,t.collapsed=i[0].props.collapse_grid,t},_getLayoutSectionTargets=function(e,t){t=void 0===t?"default":t;var i,a,o,r,s=[];if(e.hasClass("rex-model-section")){for(var n=e.attr("data-rexlive-model-id"),l=_getModelsCustomizations(),d=0,u=l.length;d<u;d++)if(l[d].id==n){for(i=0,a=l[d].customizations.length;i<a;i++)if(l[d].customizations[i].name==t){s=jQuery.extend(!0,[],l[d].customizations[i].targets);break}break}}else{var c=e.attr("data-rexlive-section-id"),_=_getPageCustomizations();for(d=0,o=_.length;d<o;d++)if(_[d].name==t&&void 0!==_[d].sections){for(i=0,r=_[d].sections.length;i<r;i++)if(_[d].sections[i].section_rex_id==c){s=jQuery.extend(!0,[],_[d].sections[i].targets);break}break}}return s},_getDefaultBlockProps=function(e,t){for(var i=_getLayoutSectionTargets(e,"default"),a={},o=1,r=i.length;o<r;o++)if(i[o].name==t){a=jQuery.extend(!0,{},i[o].props);break}return a},_getGridLayout=function(e,t){t=void 0===t?"default":t;var i,a,o,r,s={layout:"fixed",fullHeight:!1,collapsed:!1};if(e.hasClass("rex-model-section")){for(var n=e.attr("data-rexlive-model-id"),l=_getModelsCustomizations(),d=0,u=l.length;d<u;d++)if(l[d].id==n){for(i=0,a=l[d].customizations.length;i<a;i++)if(l[d].customizations[i].name==t){s.layout=l[d].customizations[i].targets[0].props.layout,s.fullHeight=l[d].customizations[i].targets[0].props.full_height,s.collapsed=l[d].customizations[i].targets[0].props.collapse_grid;break}break}}else{var c=e.attr("data-rexlive-section-id"),_=_getPageCustomizations();for(d=0,o=_.length;d<o;d++)if(_[d].name==t&&void 0!==_[d].sections&&null!==typeof _[d].sections){for(i=0,r=_[d].sections.length;i<r;i++)if(_[d].sections[i].section_rex_id==c){0!=_[d].sections[i].targets.length&&(s.layout=_[d].sections[i].targets[0].props.layout,s.fullHeight=_[d].sections[i].targets[0].props.full_height,s.collapsed=_[d].sections[i].targets[0].props.collapse_grid);break}break}}return s},_customizationExists=function(e){for(var t=!1,i=[],a=0,o=(i=""!=$availableLayoutNames.text()?JSON.parse($availableLayoutNames.text()):i).length;a<o;a++)if(i[a]==e){t=!0;break}return t},updateSection=function(e,t,i,a){var o=e.children(".section-data"),r=isNaN(parseInt(i.video_bg_id))?"":parseInt(i.video_bg_id),s=void 0===i.video_bg_url_section?"":i.video_bg_url_section,n=void 0===i.video_bg_url_vimeo_section?"":i.video_bg_url_vimeo_section,l="",d=(""!=r?l="mp4":""!=n?l="vimeo":""!=s&&(l="youtube"),"undefined"!==i.custom_classes&&-1!==i.custom_classes.indexOf("rex-video--with-audio")),r={mp4Data:{idMp4:r,linkMp4:void 0===i.video_mp4_url?"":i.video_mp4_url,width:void 0===i.video_bg_width_section?"":i.video_bg_width_section,height:void 0===i.video_bg_height_section?"":i.video_bg_height_section},vimeoUrl:n,youtubeUrl:s,audio:d,typeVideo:l},n=(Rexbuilder_Dom_Util.updateSectionVideoBackground(e,r),{active:void 0===i.image_bg_section_active||i.image_bg_section_active.toString(),idImage:isNaN(parseInt(i.id_image_bg_section))?"":parseInt(i.id_image_bg_section),urlImage:i.image_bg_section,width:parseInt(i.image_width),height:parseInt(i.image_height)}),s={color:i.row_overlay_color,active:void 0!==i.row_overlay_active&&i.row_overlay_active.toString()},d=(Rexbuilder_Dom_Util.updateImageBG(e,n),{color:void 0!==i.color_bg_section?i.color_bg_section:"",active:void 0===i.color_bg_section_active||i.color_bg_section_active.toString()}),l=(-1===d.color.indexOf("gradient")?Rexbuilder_Dom_Util.updateSectionBackgroundColor(e,d):Rexbuilder_Dom_Util.updateSectionBackgroundGradient(e,d),-1===s.color.indexOf("gradient")?Rexbuilder_Dom_Util.updateSectionOverlay(e,s):Rexbuilder_Dom_Util.updateSectionOverlayGradient(e,s),{top:isNaN(parseInt(i.row_margin_top))?0:parseInt(i.row_margin_top),right:isNaN(parseInt(i.row_margin_right))?0:parseInt(i.row_margin_right),bottom:isNaN(parseInt(i.row_margin_bottom))?0:parseInt(i.row_margin_bottom),left:isNaN(parseInt(i.row_margin_left))?0:parseInt(i.row_margin_left)}),r=(Rexbuilder_Dom_Util.updateSectionMarginsData(e,l),-1!==i.custom_classes.indexOf("rex-block-grid")&&(i.collapse_grid=!1,i.layout=o.attr("data-layout")),{gutter:i.block_distance,top:i.row_separator_top,bottom:i.row_separator_bottom,right:i.row_separator_right,left:i.row_separator_left,full_height:i.full_height,layout:i.layout,section_width:i.section_width,dimension:i.dimension,collapse_grid:void 0!==i.collapse_grid&&("true"==i.collapse_grid.toString()||a),noMobileLayoutSaved:!!i.noMobileLayoutSaved}),n=(Rexbuilder_Dom_Util.updateRow(e,o,t,r),void 0===i.section_name?"":i.section_name),d=(Rexbuilder_Dom_Util.updateSectionName(e,n),e.attr("data-type",i.type),void 0===i.custom_classes?"":i.custom_classes),s=[],l=(""!=d&&(s=(d=d.trim()).split(/\s+/)),Rexbuilder_Dom_Util.updateCustomClasses(e,s),void 0!==i.section_edited&&"true"==i.section_edited.toString());e.attr("data-rexlive-section-edited",l)},updateSectionTools=function(e,t,i,a){var o={top:isNaN(parseInt(i.row_margin_top))?0:parseInt(i.row_margin_top),right:isNaN(parseInt(i.row_margin_right))?0:parseInt(i.row_margin_right),bottom:isNaN(parseInt(i.row_margin_bottom))?0:parseInt(i.row_margin_bottom),left:isNaN(parseInt(i.row_margin_left))?0:parseInt(i.row_margin_left)},o=(Rexbuilder_Section.fixSectionToolbox(e,o),-1!==i.custom_classes.indexOf("rex-block-grid")&&(i.collapse_grid=!1),{gutter:i.block_distance,top:i.row_separator_top,bottom:i.row_separator_bottom,right:i.row_separator_right,left:i.row_separator_left,full_height:i.full_height,layout:i.layout,section_width:i.section_width,dimension:i.dimension,collapse_grid:void 0!==i.collapse_grid&&("true"==i.collapse_grid.toString()||a)});Rexbuilder_Section.fixBlockToolsAccordingToSeparator(e,o)},updateElementDimensions=function(e,t,i){var a=parseInt(i.x),o=parseInt(i.y),r=parseInt(i.w),s=parseInt(i.h),n=parseInt(i.startH),l=(parseInt(i.increaseHeight),parseInt(i.realFluid));void 0!==i.gridstackInstance&&i.gridstackInstance?i.gridstackInstance.update(e,a,o,r,s):(e.setAttribute("data-gs-height",s),e.setAttribute("data-gs-width",r),e.setAttribute("data-gs-y",o),e.setAttribute("data-gs-x",a)),t.setAttribute("data-gs_start_h",n),t.setAttribute("data-gs_width",r),t.setAttribute("data-gs_height",s),t.setAttribute("data-gs_y",o),t.setAttribute("data-gs_x",a),t.setAttribute("data-element_real_fluid",l)},_detect_mobile=function(){"ontouchstart"in document.documentElement?Rexbuilder_Util.addClass(document.body,"touch"):Rexbuilder_Util.addClass(document.body,"no-touch")},_viewport=function(){var e=window,t="inner";return"innerWidth"in window||(t="client",e=document.documentElement||document.body),{width:e[t+"Width"],height:e[t+"Height"]}},_merge=function(e,t){function i(e){for(var t in e)e.hasOwnProperty(t)&&("[object Object]"===Object.prototype.toString.call(e[t])?a[t]=merge(a[t],e[t]):a[t]=e[t])}var a={};return i(e),i(t),a},getYoutubeID=function(e){e=0<e.indexOf("youtu.be")?e.substr(e.lastIndexOf("/")+1,e.length):-1<e.indexOf("http")?e.match(/[\\?&]v=([^&#]*)/)[1]:15<e.length?null:e;return e},_checkPresentationPage=function(){return 0!==$(".rexpansive_portfolio_presentation").length},_checkStaticPresentationPage=function(){return 0!==$(".rexpansive-static-portfolio").length},_checkPost=function(){return 0!==$("#rex-article").length},_whichTransitionEvent=function(){var e,t=document.createElement("fakeelement"),i={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in i)if(void 0!==t.style[e])return i[e]},_whichAnimationEvent=function(){var e,t=document.createElement("fakeelement"),i={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(e in i)if(void 0!==t.style[e])return i[e]},doneResizing=function(){if(Rexbuilder_Util.windowIsResizing=!0,Rexbuilder_Util.editorMode){if(!Rexbuilder_Util_Editor.changedLayout)return"default"===Rexbuilder_Util.chosenLayoutData.id&&_updateGridsHeights(),void(Rexbuilder_Util.windowIsResizing=!1);Rexbuilder_Util_Editor.changedLayout=!1,0===edit_dom_layout(Rexbuilder_Util_Editor.clickedLayoutID).collapse_needed?Rexbuilder_Util_Editor.endLoading():Rexbuilder_Util.$document.one("rexlive:collapsingElementsEnded",function(e){Rexbuilder_Util_Editor.endLoading()})}Rexbuilder_Util.windowIsResizing=!1,Rexbuilder_Util.loadWidth=Rexbuilder_Util.globalViewport.width},_set_initial_grids_state=function(e){if(e=void 0!==e?e:"default",Rexbuilder_Util.rexContainer)for(var t=[].slice.call(Rexbuilder_Util.rexContainer.getElementsByClassName("rexpansive_section")),i=t.length,a=0;a<i;a++){for(var o=$(t[a]),r=o.find(".grid-stack-row").data().plugin_perfectGridGalleryEditor,s=Rexbuilder_Util.getSectionCustomLayouts(t[a].getAttribute("data-rexlive-section-id")),n=null,l=null,d=0;d<s.length;d++){if("default"===s[d].name&&(l=d),s[d].name===e){n=d;break}d==s.length-1&&(n=l)}for(var u,c=[],d=0,_=s[n].targets.length;d<_;d++)"self"!==s[n].targets[d].name&&((u={}).el=o.find(".perfect-grid-item[data-rexbuilder-block-id="+s[n].targets[d].name+"]"),u.x=parseInt(s[n].targets[d].props.gs_x),u.y=parseInt(s[n].targets[d].props.gs_y),u.width=parseInt(s[n].targets[d].props.gs_width),u.height=parseInt(s[n].targets[d].props.gs_height),c.push(u));r.set_grid_initial_state(c)}},_updateGridsHeights=function(){if(Rexbuilder_Util.rexContainer)for(var e,t=[].slice.call(Rexbuilder_Util.rexContainer.getElementsByClassName("grid-stack-row")),i=t.length,a=0;a<i;a++){void 0!==(o=(e=$(t[a])).data().plugin_perfectGridGalleryEditor)&&(o.batchGridstack(),o._defineDynamicPrivateProperties(),o.updateGridstackStyles(),o.setFullWidthNaturalBackground(),o.setNaturalBackground(),o.updateBlocksHeight(),o.commitGridstack());var o=jQuery.Event("rexlive:updateGridsHeights");o.settings={$row:e},Rexbuilder_Util.$document.trigger(o)}},_stopBlockVideos=function(e){_stopVideo(e.find(".grid-item-content"))},_playBlockVideos=function(e){_playVideoFromBegin(e.find(".grid-item-content"))},_stopPluginsSection=function(e){var t=e.find(".mp4-player"),i=e.find(".vimeo-player"),e=e.find(".youtube-player");$.each(t,function(e,t){Rexbuilder_Util.stopVideo($(t))}),$.each(i,function(e,t){Rexbuilder_Util.stopVideo($(t))}),$.each(e,function(e,t){Rexbuilder_Util.stopVideo($(t))})},_playPluginsSection=function(e){var t=e.find(".mp4-player"),i=e.find(".vimeo-player"),e=e.find(".youtube-player");Rexbuilder_Util.editorMode&&$.each(t,function(e,t){Rexbuilder_Util.playVideoFromBegin($(t))}),$.each(i,function(e,t){Rexbuilder_Util.playVideoFromBegin($(t))}),$.each(e,function(e,t){Rexbuilder_Util.playVideoFromBegin($(t))})},_stopVideo=function(e){var t;e.hasClass("mp4-player")?((t=e.children(".rex-video-wrap").find("video")[0]).currentTime=0,t.pause()):e.hasClass("vimeo-player")?(t=VimeoVideo.findVideo(e.children(".rex-video-vimeo-wrap").find("iframe")[0]))&&t.unload():e.hasClass("youtube-player")&&void 0!==e.children(".rex-youtube-wrap").YTPGetPlayer()&&e.children(".rex-youtube-wrap").YTPStop()},_fixVideosAudioSection=function(e){var t=e.find(".mp4-player"),i=e.find(".vimeo-player"),a=e.find(".youtube-player");Rexbuilder_Util.fixVideoAudio(e),$.each(t,function(e,t){Rexbuilder_Util.fixVideoAudio($(t))}),$.each(i,function(e,t){Rexbuilder_Util.fixVideoAudio($(t))}),$.each(a,function(e,t){Rexbuilder_Util.fixVideoAudio($(t))})},_fixYoutube=function(e){for(var t=[].slice.call(e.getElementsByClassName("rex-youtube-wrap")),i=t.length,a=0;a<i;a++){var o=$(t[a]),r=o.parents(".youtube-player").eq(0).children(".rex-video-toggle-audio"),s=o.YTPGetPlayer();void 0!==s&&(o.optimizeDisplay(),o.YTPPlay(),0==r.length||r.hasClass("user-has-muted")?(s.mute(),s.isMute=!0,s.setVolume(0)):o.YTPUnmute())}},_fixVideoAudio=function(e){var t,i=e.children("rex-video-toggle-audio");e.hasClass("mp4-player")?(t=e.children(".rex-video-wrap").find("video")[0],0==i.length||i.hasClass("user-has-muted")?$(t).prop("muted",!0):$(t).prop("muted",!1)):e.hasClass("vimeo-player")?(t=VimeoVideo.findVideo(e.children(".rex-video-vimeo-wrap").find("iframe")[0]),0==i.length||i.hasClass("user-has-muted")?t&&t.setVolume(0):t.setVolume(1)):e.hasClass("youtube-player")&&void 0!==(e=(t=e.children(".rex-youtube-wrap")).YTPGetPlayer())&&(0==i.length||i.hasClass("user-has-muted")?(e.mute(),e.isMute=!0,e.setVolume(0)):t.YTPUnmute())},_playVideoFromBegin=function(e){var t=!1;if(e.hasClass("mp4-player")){var i=e.children(".rex-video-wrap").find("video")[0];i.currentTime=0,i.play(),t=!0}else if(e.hasClass("vimeo-player")){i=VimeoVideo.findVideo(e.children(".rex-video-vimeo-wrap").find("iframe")[0]);null!==i&&i.play(),t=!0}else if(e.hasClass("youtube-player")){i=e.children(".rex-youtube-wrap");if(0==i.length)return;if(void 0===i.YTPGetPlayer())return;i.YTPPlay(),t=!0}t&&setTimeout(Rexbuilder_Util.fixVideoAudio.bind(null,e),500)},setContainer=function(e){this.$rexContainer=e},_parents=function(e,t){for(;e.parentNode;){if(_matches(e,t))return e;e=e.parentNode}return null},_matches=function(e,t){return(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector).call(e,t)},_transitionEvent="",_animationEvent="";function _smoothScroll(e){$bodyHtml.animate({scrollTop:e.offset().top+_plugin_frontend_settings.scroll_animation_offset},600)}function getGalleryInstance(e){e=(e=e.is(".rexpansive_section")?e:e.parents(".rexpansive_section")).find(".grid-stack-row");return 0==e.length?null:e.data("plugin_perfectGridGalleryEditor")}var removeCollapsedGrids=function(){if(Rexbuilder_Util.rexContainer&&Rexbuilder_Util.galleryPluginActive)for(var e=[].slice.call(Rexbuilder_Util.rexContainer.getElementsByClassName("rexpansive_section")),t=e.length,i=0;i<t;i++){var a=getGalleryInstance($(e[i]));Rexbuilder_Dom_Util.collapseGrid(a,!1,a.properties.dispositionBeforeCollapsing,a.properties.layoutBeforeCollapsing)}},collapseAllGrids=function(){if(Rexbuilder_Util.rexContainer&&Rexbuilder_Util.galleryPluginActive)for(var e=[].slice.call(Rexbuilder_Util.rexContainer.getElementsByClassName("rexpansive_section")),t=e.length,i=0;i<t;i++){var a=getGalleryInstance($(e[i]));a._defineDynamicPrivateProperties(),a.collapseElements()}};function startVideoPlugin(e){var t,i;e.hasClass("mp4-player")?(t=(i=e.find(".rex-video-wrap")).children(".rex-video-container").get(0),i.removeClass("removing-video-mp4"),t.play().catch(function(e){Rexbuilder_Util.displayError("An error occurred while trying to play the video."),console.error(e)})):e.hasClass("vimeo-player")?(i=e.children(".rex-video-vimeo-wrap").find("iframe")[0],VimeoVideo.addPlayer("1",i,{autoplay:!0,background:!0,loop:!0})):e.hasClass("youtube-player")&&void 0===e.children(".rex-youtube-wrap").YTPGetPlayer()&&e.children(".rex-youtube-wrap").YTPlayer()}var _destroyVideo=function(e,t){var i="";return e.hasClass("mp4-player")?(i="mp4",Rexbuilder_Dom_Util.removeMp4Video(e,t)):e.hasClass("vimeo-player")?(i="vimeo",Rexbuilder_Dom_Util.removeVimeoVideo(e,t)):e.hasClass("youtube-player")&&(i="youtube",Rexbuilder_Dom_Util.removeYoutubeVideo(e,t)),i},_pauseVideo=function(e){e.hasClass("mp4-player")?e.children(".rex-video-wrap").find("video")[0].pause():e.hasClass("vimeo-player")?VimeoVideo.findVideo(e.find(".rex-video-vimeo-wrap").find("iframe")[0]).pause():e.hasClass("youtube-player")&&void 0!==e.children(".rex-youtube-wrap").YTPGetPlayer()&&e.children(".rex-youtube-wrap").YTPPause()},_launchVideoPlugins=function(){if(Rexbuilder_Util.rexContainer&&void 0!==Rexbuilder_Util.rexContainer){var ytVideos=[].slice.call(Rexbuilder_Util.rexContainer.getElementsByClassName("rex-youtube-wrap")),i,tot_ytVideos=ytVideos.length,$ytVideo,data_yt,url,id;if(jQuery.browser.mobile)for(i=0;i<tot_ytVideos;i++)data_yt=eval("("+ytVideos[i].getAttribute("data-property")+")"),url=data_yt.videoURL,id=getYoutubeID(url),ytVideos[i].style.backgroundImage="url(https://img.youtube.com/vi/"+id+"/0.jpg)",ytVideos[i].addEventListener("click",handleYtbVideoMobileClick);else for(i=0;i<tot_ytVideos;i++){if($ytVideo=$(ytVideos[i]),void 0===$ytVideo.YTPGetPlayer()&&!Rexbuilder_Util.hasClass(ytVideos[i],"youtube-player-launching"))return void $ytVideo.YTPlayer();Rexbuilder_Util.removeClass(ytVideos[i],"youtube-player-launching")}VimeoVideo.init()}};function handleYtbVideoMobileClick(ev){ev.preventDefault();var data_yt=eval("("+this.getAttribute("data-property")+")"),url=data_yt.videoURL;window.location.href=url}var _playAllVideos=function(){if(Rexbuilder_Util.rexContainer&&void 0!==Rexbuilder_Util.rexContainer){var e,t=[].slice.call(Rexbuilder_Util.rexContainer.getElementsByClassName("mp4-player")),i=[].slice.call(Rexbuilder_Util.rexContainer.getElementsByClassName("vimeo-player")),a=[].slice.call(Rexbuilder_Util.rexContainer.getElementsByClassName("youtube-player")),o=t.length,r=i.length,s=a.length;if(Rexbuilder_Util.editorMode)for(e=0;e<o;e++)Rexbuilder_Util.playVideo($(t[e]));for(e=0;e<r;e++)Rexbuilder_Util.playVideo($(i[e]));for(e=0;e<s;e++)Rexbuilder_Util.playVideo($(a[e]))}},_playVideo=function(e){var t,e=e[0];void 0!==e&&(Rexbuilder_Util.hasClass(e,"mp4-player")?(t=e.querySelector("video"))&&t.play():Rexbuilder_Util.hasClass(e,"vimeo-player")?(t=VimeoVideo.findVideo(e.querySelector("iframe")))&&t.play():Rexbuilder_Util.hasClass(e,"youtube-player")&&(t=e.querySelector(".rex-youtube-wrap"))&&void 0!==(e=$(t)).YTPGetPlayer()&&e.YTPPlay())},_getPaddingsDataString=function(e){var t,i={top:"5",right:"5",bottom:"5",left:"5",type:"px"};return""!=e&&(e=e.split(/;/gm),i.top=parseInt(e[0].split(/\D+/gm)[0]),i.right=parseInt(e[1].split(/\D+/gm)[0]),i.bottom=parseInt(e[2].split(/\D+/gm)[0]),i.left=parseInt(e[3].split(/\D+/gm)[0]),t="",t=-1!=e[0].indexOf("%")?"%":"px",i.type=t),i},_paddingsToString=function(e){var t="";return(t+=""+e.top+e.type+";")+(""+e.right+e.type+";")+(""+e.bottom+e.type+";")+(""+e.left+e.type+";")},getCoord=function(e,t){return{x:e%(t=void 0!==t?t:12),y:Math.floor(e/t)}},_diffStrings=function(e,t){t=void 0!==t?t:" ";for(var i,a=e.join(" ").split(t),o={},r=[],s=0,n=a.length;s<n;s++)o[a[s]]=void 0!==o[a[s]]?o[a[s]]+1:1;for(i in o)1===o[i]&&r.push(i);return r};function handleLayoutChange(e){for(var t,i,a=Array.prototype.slice.call(Rexbuilder_Util.rexContainer.querySelectorAll(".rexpansive_section:not(.removing_section)")),o=a.length,r=(Rexbuilder_Util.rexContainer.setAttribute("data-rex-layout-selected",e),Rexbuilder_Util.activeLayout=e,[]),s=[],n=0;n<o;n++)Rexbuilder_Util.hasClass(a[n],"rex-model-section")&&r.push(parseInt(a[n].getAttribute("data-rexlive-model-id"))),t={rexID:a[n].getAttribute("data-rexlive-section-id"),modelID:isNaN(parseInt(a[n].getAttribute("data-rexlive-model-id")))?"":parseInt(a[n].getAttribute("data-rexlive-model-id"))},s.push(t);for(var l,d,u=Rexbuilder_Util.getPageCustomizations(),c=("default"==Rexbuilder_Util.activeLayout&&Rexbuilder_Util.saveCustomizationDomOrder(jQuery.extend(!0,[],u)),Rexbuilder_Util.getModelsCustomizations()),_=("true"==$defaultLayoutState.attr("data-empty-default-customization")?(l=Rexbuilder_Util.getDefaultPageLayout(u,c),_createDefaultLayoutState(l)):(Rexbuilder_Util.updateDefaultLayoutState({modelsData:c}),l=Rexbuilder_Util.getDefaultLayoutState()),Rexbuilder_Util.getCustomLayoutSections(u,c,l,e)),g=[],m=0;m<_;m++)if("true"==_[m].section_is_model.toString()){for(d=!1,i=0;i<g.length;i++)if(g[i].id==_[m].section_model_id){g[i].number=g[i].number+1,_[m].section_model_number=g[i].number,d=!0;break}d||(_[m].section_model_number=1,g.push({id:_[m].section_model_id,number:1}))}Rexbuilder_Util.clearSectionsEdited();var p,b,f,h=_mergeSections(_,l),v=(Rexbuilder_Util.domUpdating=!0,[]);for(p in h)h[p].notInSection&&"default"!=e||(b={rexID:h[p].section_rex_id,modelID:-1,modelNumber:-1},(f="true"==h[p].section_is_model.toString()?(b.modelID=h[p].section_model_id,b.modelNumber=h[p].section_model_number,Rexbuilder_Util.rexContainer.querySelector('section[data-rexlive-section-id="'+h[p].section_rex_id+'"][data-rexlive-model-number="'+b.modelNumber+'"]')):Rexbuilder_Util.rexContainer.querySelector('section[data-rexlive-section-id="'+h[p].section_rex_id+'"]'))&&!Rexbuilder_Util.hasClass(f,"removing_section")&&(void 0!==h[p].section_hide&&"true"==h[p].section_hide.toString()?Rexbuilder_Util.addClass(f,"rex-hide-section"):(Rexbuilder_Util.removeClass(f,"rex-hide-section"),updateRexGrid(f,h[p].targets,!1,p)),v.push(b)));Rexbuilder_Dom_Util.fixSectionDomOrder(v,!0),Rexbuilder_Util.domUpdating=!1}function updateRexGrid(e,t,i){var a=$(e),o=a.find(".grid-stack-row"),r=t[0].props.collapse_grid;-1!==t[0].props.custom_classes.indexOf("rex-block-grid")&&(r=!1),e.querySelector(".section-data").setAttribute("data-collapse-grid",r),t[0].props.gridEdited&&o.attr("data-rexlive-layout-changed",!0);for(var s,n,l,d,u,c,_=t.length,g=1;g<_;g++){var m=o.children('div[data-rexbuilder-block-id="'+t[g].name+'"]');void 0!==t[g].props.hide&&"true"==t[g].props.hide.toString()?m.hasClass("rex-hide-element")||m.addClass("rex-hide-element"):m.hasClass("rex-hide-element")&&m.removeClass("rex-hide-element")}for(g=1;g<_;g++)if((!t[g].notDisplay||"default"==Rexbuilder_Util.activeLayout)&&(d=t[g].name,s=t[g].props,d=(m=o.find('.perfect-grid-item[data-rexbuilder-block-id="'+d+'"]'))[0],n=m.children(".rexbuilder-block-data"),l=m.find(".grid-item-content"),0<m.length)){if(c=(u=[].slice.call(d.getElementsByTagName("img"))).length,!Rexbuilder_Util.editorMode&&0!==c)for(var p=0;p<c;p++)"true"===u[p].getAttribute("inline-photoswipe")&&Rexbuilder_Photoswipe.addElementFromInline($(u[p]));Rexbuilder_Util.updateDOMSingleElement({$elem:m,targetProps:s,$itemData:n,$itemContent:l,gridstackInstance:null,positionAndSize:!0,collapseGrid:r})}updateSection(a,o,t[0].props,i)}function removeArrayDuplicates(e){return e.filter(function(e,t,i){return i.indexOf(e)===t})}function isOrIsChild(e,t){return!!e.matches(t)||0!==$(e).parents(t).length}function displayError(e,t){"string"!=typeof e&&(e=e.toString()),/^\[Rexpansive\]/.test(e)||(e="[Rexpansive] "+e),console.error(e),t&&"string"==typeof t&&alert(t)}function displayAjaxError(e,t,i){"string"!=typeof t&&(t=t.toString()),/^\[Rexpansive\]/.test(t)||(t="[Rexpansive] "+t),console.error(t,{status:e.response.status,message:e.textStatus,errorThrown:e.errorThrown}),i&&"string"==typeof i&&alert(i)}var init=function(){this.globalViewport=Rexbuilder_Util.viewport(),this.firstStart=!0,this.isIframe=window.location!==window.parent.location,_plugin_frontend_settings.scroll_animation_offset=0,Rexbuilder_Util.changedFrontLayout=!1,_plugin_frontend_settings.user.logged&&_plugin_frontend_settings.user.editing?this.editorMode=!0:this.editorMode=!1,this._transitionEvent=_whichTransitionEvent(),this._animationEvent=_whichAnimationEvent(),this.$window=$(window),this.$document=$(document),this.$body=$("body"),$bodyHtml=$("body, html"),this.galleryPluginActive=!1,_detect_mobile(),$rexbuilderLayoutData=$(document.getElementById("rexbuilder-layout-data")),$rexbuilderModelData=$(document.getElementById("rexbuilder-model-data")),$availableLayoutNames=$(document.getElementById("available-layouts-names"));var e=$(document.getElementById("layout-avaiable-dimensions")),t=(frontAvailableLayouts=0<e.length?JSON.parse(e.text()):[],$availableLayoutNames.text()),e=(layoutSavedInfo=frontAvailableLayouts.filter(function(e){return-1!==t.indexOf(e.id)}),this.editorMode||(Rexbuilder_Util.startFrontLayout=_findFrontLayout()),$modelsCustomizationsDataDiv=$("#rexbuilder-model-data").children(".models-customizations").eq(0),$pageCustomizationsDataDiv=$rexbuilderLayoutData.children(".layouts-customizations").eq(0),$liveDataContainer=$("#rexbuilder-layout-data-live"),$layoutsDomOrder=$("#rexbuilder-layouts-sections-order"),$defaultLayoutState=$("#rexbuilder-default-layout-state"),$usedIDSContainer=$("#sections-ids-used"),_storeNamesUsed(),$usedBlocksIDsContainer=$("#blocks-ids-used"),_storeBlocksIDsUsed(),this.$rexContainer=$(".rex-container"),this.rexContainer=this.$rexContainer[0],0===this.$rexContainer.length&&console.warn("[Rexpansive] No rexContainer detected! This may cause problems."),this.backendEdited=!1,0<Rexbuilder_Util.$rexContainer.length&&"true"==Rexbuilder_Util.$rexContainer.attr("data-backend-edited").toString()&&(Rexbuilder_Util.$rexContainer.addClass("backend-edited"),this.backendEdited=!0),this.lastSectionNumber=-1,this.activeLayout="",this.domUpdating=!1,this.$rexContainer.children(".rexpansive_section").eq(0).attr("data-rex-collapse-grid"));this.blockGridUnder768=void 0!==e&&"false"==e.toString(),this.chosenLayoutData=null,this.loadWidth=Rexbuilder_Util.globalViewport.width,_updateSectionsIDs(),_updateBlocksIDs(),Rexbuilder_Dom_Util.fixModelNumbers(),_updateSectionsNumber(),this.firstStart=!1};return{init:init,viewport:_viewport,getYoutubeID:getYoutubeID,transitionEvent:_transitionEvent,animationEvent:_animationEvent,checkPresentationPage:_checkPresentationPage,checkStaticPresentationPage:_checkStaticPresentationPage,editorMode:editorMode,windowIsResizing:windowIsResizing,launchVideoPlugins:_launchVideoPlugins,stopPluginsSection:_stopPluginsSection,playPluginsSection:_playPluginsSection,stopBlockVideos:_stopBlockVideos,playBlockVideos:_playBlockVideos,chooseLayout:chooseLayout,predictLayout:predictLayout,setContainer:setContainer,createRandomID:createRandomID,createRandomNumericID:_createRandomNumericID,responsiveLayouts:responsiveLayouts,defaultLayoutSections:defaultLayoutSections,launchEditDomLayout:launchEditDomLayout,edit_dom_layout:edit_dom_layout,smoothScroll:_smoothScroll,getGalleryInstance:getGalleryInstance,removeCollapsedGrids:removeCollapsedGrids,collapseAllGrids:collapseAllGrids,stopVideo:_stopVideo,playVideoFromBegin:_playVideoFromBegin,pauseVideo:_pauseVideo,playVideo:_playVideo,destroyVideo:_destroyVideo,startVideoPlugin:startVideoPlugin,getPaddingsDataString:_getPaddingsDataString,paddingsToString:_paddingsToString,playAllVideos:_playAllVideos,findLayoutType:_findLayoutType,updateModelsLive:_updateModelsLive,getLayoutSectionTargets:_getLayoutSectionTargets,updateElementDimensions:updateElementDimensions,getGridLayout:_getGridLayout,customizationExists:_customizationExists,getDefaultBlockProps:_getDefaultBlockProps,fixVideosAudioSection:_fixVideosAudioSection,fixVideoAudio:_fixVideoAudio,fixYoutube:_fixYoutube,saveCustomizationDomOrder:_saveCustomizationDomOrder,getDefaultPageLayout:_getDefaultPageLayout,getModelsCustomizations:_getModelsCustomizations,updateModelsCustomizationsData:_updateModelsCustomizationsData,getPageCustomizations:_getPageCustomizations,updatePageCustomizationsData:_updatePageCustomizationsData,updatePageAvaiableLayoutsNames:_updatePageAvaiableLayoutsNames,getPageAvaiableLayoutsNames:_getPageAvaiableLayoutsNames,updateDivModelCustomizationsNames:_updateDivModelCustomizationsNames,getSectionCustomLayouts:_getSectionCustomLayouts,getLayoutLiveSectionTargets:_getLayoutLiveSectionTargets,getGridLayoutLive:_getGridLayoutLive,getCustomLayoutSections:_getCustomLayoutSections,updateSectionStateLive:_updateSectionStateLive,updatePageCustomizationsDomOrder:_updatePageCustomizationsDomOrder,getPageDefaultDom:_getPageDefaultDom,getPageCustomizationsDom:_getPageCustomizationsDom,updateDefaultLayoutState:_updateDefaultLayoutState,updateDefaultLayoutStateSection:_updateDefaultLayoutStateSection,updateDefaultLayoutStateDOMOrder:_updateDefaultLayoutStateDOMOrder,getDefaultLayoutState:_getDefaultLayoutState,updateSectionOrderCustomLayouts:_updateSectionOrderCustomLayouts,updateGridsHeights:_updateGridsHeights,updateDOMSingleElement:updateDOMSingleElement,getDefaultBlockMeasure:_getDefaultBlockMeasure,doneResizing:doneResizing,getCoord:getCoord,diffStrings:_diffStrings,applyDefaultBlocksDimentions:_applyDefaultBlocksDimentions,isMobile:_isMobile,cssPropertyValueSupported:_cssPropertyValueSupported,changedFrontLayout:changedFrontLayout,startFrontLayout:startFrontLayout,findFrontLayout:_findFrontLayout,parents:_parents,rtimeOut:rtimeOut,rInterval:rInterval,merge:_merge,handleLayoutChange:handleLayoutChange,removeArrayDuplicates:removeArrayDuplicates,isOrIsChild:isOrIsChild,hasClass:hasClass,addClass:addClass,removeClass:removeClass,toggleClass:toggleClass,createSectionID:_createSectionID,addSectionID:_addSectionID,removeSectionID:_removeSectionID,saveSectionNamesUsed:_saveSectionNamesUsed,getSectionNamesUsed:_getSectionNamesUsed,createBlockID:createBlockID,addBlockID:addBlockID,removeBlockID:removeBlockID,saveBlocksIDsUsed:saveBlocksIDsUsed,updateBlocksIDsUsed:updateBlocksIDsUsed,getBlocksIDsUsed:getBlocksIDsUsed,clearSectionsEdited:clearSectionsEdited,displayError:displayError,displayAjaxError:displayAjaxError}}(jQuery);
var Rexbuilder_Photoswipe=function(u){"use strict";function c(e){if(e=e||window.event,!(0<u(e.target).parents(".perfect-grid-item").find(".element-link").length||"a"===e.target.tagName.toUpperCase())){var t=e.target,r=p(t,function(e){return e.tagName&&"FIGURE"===e.tagName.toUpperCase()});if(r){e.preventDefault?e.preventDefault():e.returnValue=!1;for(var i,t=u(r).parents(g)[0],n=Array.prototype.slice.call(t.getElementsByClassName("pswp-figure")),l=n.length,a=0,s=0;s<l;s++)if(1===n[s].nodeType){if(n[s]===r){i=a;break}a++}return 0<=i&&w(i,t),!1}}}var g="",f=function(e){for(var t,r,i,n=u(e).find(".pswp-figure").get(),l=n.length,a=[],s=0;s<l;s++)1===(t=n[s]).nodeType&&(i=(r=t.children[0]).getAttribute("data-size").replace("px","").split("x"),i={src:r.getAttribute("href"),w:parseInt(i[0],10),h:parseInt(i[1],10)},1<t.children.length&&(i.title=t.children[1].innerHTML),0<r.children.length&&(i.msrc=r.children[0].getAttribute("data-thumburl")),i.pid=s,i.el=t,a.push(i));return a},p=function e(t,r){return t&&(r(t)?t:e(t.parentNode,r))},h=function(){Rexbuilder_Util_Editor.sendParentIframeMessage({eventName:"popUpContent:pswpOpened"})},m=function(){Rexbuilder_Util_Editor.sendParentIframeMessage({eventName:"popUpContent:pswpClosed"})},w=function(e,t,r,i){var n,l,a=document.querySelectorAll(".pswp")[0],s=f(t),p={galleryUID:t.getAttribute("data-pswp-uid"),getThumbBoundsFn:function(e){var t=s[e].el.getElementsByClassName("pswp-item-thumb")[0],e=s[e].el.getElementsByClassName("rex-custom-scrollbar")[0],r=window.pageYOffset||document.documentElement.scrollTop,e=e.getBoundingClientRect();return"natural"==t.getAttribute("data-thumb-image-type")?{x:e.left,y:e.top+r,w:e.width}:null},galleryPIDs:!0,closeOnScroll:!1,showHideOpacity:!0};if(i)if(p.galleryPIDs){for(var o=0,d=s.length;o<d;o++)if(s[o].pid==e){p.index=o;break}}else p.index=parseInt(e,10)-1;else p.index=parseInt(e,10);Rexbuilder_Util.hasClass(t,"split-scrollable")?(n=u(t).find(".pswp-figure").eq(e).parents(".opacity-block").find(".pswp-figure").get(),i=u(t).find(".pswp-figure").eq(e).get(0),p.index=n.indexOf(i),s=s.filter(function(e){for(var t=0;t<n.length;t++)if(e.el===n[t])return!0;return!1})):0!==Array.prototype.slice.call(t.getElementsByClassName("block-has-slider")).length&&(i=Rexbuilder_Util.parents(s[e].el,".perfect-grid-item"),l=!1,i&&Rexbuilder_Util.hasClass(i,"block-has-slider")&&(l=!0),s=s.filter(function(e){e=Rexbuilder_Util.parents(e.el,".perfect-grid-item");return!e||(Rexbuilder_Util.hasClass(e,"block-has-slider")?!!l:!l)})),isNaN(p.index)||(r&&(p.showAnimationDuration=0),(t=new PhotoSwipe(a,PhotoSwipeUI_Default,s,p)).init(),Rexbuilder_Util.isIframe&&(h(),t.listen("close",m)))};return{init:function(e){g=e;for(var t=document.querySelectorAll(e),r=t.length,i=0;i<r;i++)t[i].setAttribute("data-pswp-uid",i+1),t[i].onclick=c;for(var n,l,a,s,p=t,o=p.length,d=0,u=0;d<o;d++)for(l=(n=Array.prototype.slice.call(p[d].querySelectorAll(".rex-slider-element"))).length,u=0;u<l;u++)a=n[u].querySelector(".pswp-item"),s=n[u].querySelector(".slider-overlay"),a&&s&&a.appendChild(s);e=function(){var e=window.location.hash.substring(1),t={};if(!(e.length<5)){for(var r,i=e.split("&"),n=0;n<i.length;n++)i[n]&&((r=i[n].split("=")).length<2||(t[r[0]]=r[1]));t.gid&&(t.gid=parseInt(t.gid,10))}return t}();e.pid&&e.gid&&w(e.pid,t[e.gid-1],!0,!0)},addElement:function(e,t,r,i,n){var l;e.parents(".grid-stack-item").hasClass("block-has-slider")||(tmpl.arg="image",l=e.parents(".grid-stack-item-content"),0==e.parents(".pswp-figure").length&&(e.parent().prepend(tmpl("tmpl-photoswipe-block",{link:t,width:r,height:i,type:n})),t=l.find(".pswp-item"),e.detach().appendTo(t)))},addElementFromInline:function(e){var t="alignone";void 0!==e.attr("class")&&(t=e.attr("class").split(" ")[1]),tmpl.arg="image",e.before(tmpl("tmpl-photoswipe-block-inline",{link:e.attr("src"),width:e.css("width"),height:e.css("height"),type:"natural",align:t}));t=e.parents(".text-wrap").find(".pswp-item").filter(function(e){return 3==u(this).children().length});e.detach().appendTo(t)},removeElement:function(e){var t,r=e.parents(".pswp-figure");0!=r.length&&(t=r.parent(),e.detach().appendTo(t),r.remove())},init_inline_pswp:function(e){var t,e=e.target,r=e.getAttribute("data-inline-pswp-info");void 0!==r&&""!==r&&(t=document.querySelectorAll(".pswp")[0],r=JSON.parse(r),e={galleryUID:e.getAttribute("data-pswp-uid"),closeOnScroll:!1,showHideOpacity:!0},new PhotoSwipe(t,PhotoSwipeUI_Default,r,e).init())}}}(jQuery);
/**
 * Util functions on RexLive
 * @since 2.0.0
 */
var Rexbuilder_Util_Editor=function(d){var n=null;function o(){var e={eventName:"rexlive:undoRedoStackChange",stacks:{undo:Rexbuilder_Util_Editor.undoStackArray.length,redo:Rexbuilder_Util_Editor.redoStackArray.length}};Rexbuilder_Util_Editor.sendParentIframeMessage(e)}function l(e){var t={sectionID:"",targetID:"",modelNumber:""},i=e.is("section")?e:e.parents(".rexpansive_section"),e=e.parents(".grid-stack-item");return t.sectionID=i.attr("data-rexlive-section-id"),i.hasClass("rex-model-section")&&(t.modelNumber=i.attr("data-rexlive-model-number")),0!=e.length?t.targetID=e.attr("data-rexbuilder-block-id"):t.targetID="self",t}function r(e,t){var i;""!=e&&(i="",i=t.parent().is("section")?t.attr("data-custom_classes"):t.attr("data-block_custom_class"),e=a(e),e=new RegExp("(\\s"+e+"\\s|^"+e+"\\s|\\s"+e+"$|^"+e+"$)","g"),i=(i=i.replace(e," ")).trim(),t.parent().is("section")?t.attr("data-custom_classes",i):t.attr("data-block_custom_class",i))}var a=function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")};function s(e){for(var t,i=document.createElement("div").style,r=Rexbuilder_Util_Editor.getPrefixedValues(e),n=0;n<r.length&&(t=r[n],i.backgroundImage=t,i.backgroundImage!=t);n++);return i.backgroundImage}var u=function(e){var t={};if(void 0!==e)for(var i=e.attributes,r=0;r<i.length;r++)"class"!==i[r].name&&"style"!==i[r].name&&(t[i[r].name.replace("data-","")]=i[r].value);return t},c=function(e){var t=Rexbuilder_Util.$rexContainer.find(".rexpansive_section").removeClass("highLightRow").filter(".focusedRow"),i=d(e);0!=t.length&&!i.is(t)||(i.addClass("highLightRow"),Rexbuilder_Util_Editor.visibleRow=e,Rexbuilder_Util_Editor.visibleRowInfo={sectionID:e.getAttribute("data-rexlive-section-id"),modelNumber:void 0!==e.getAttribute("data-rexlive-model-number")?e.getAttribute("data-rexlive-model-number"):"",modelEditing:void 0!==e.getAttribute("data-rexlive-model-editing")?e.getAttribute("data-rexlive-model-editing"):""},t={},i=i.find(".section-data")[0],(t=u(i)).collapse=e.getAttribute("data-rex-collapse-grid"),i={eventName:"rexlive:traceVisibleRow",sectionTarget:Rexbuilder_Util_Editor.visibleRowInfo,rowInfo:t},Rexbuilder_Util_Editor.sendParentIframeMessage(i))},x=function(e,t,i){i=t=0;var r=e.offset().top,e=e.height(),n=d(window).scrollTop();return!(r+t<n&&n<r+e+i)};function m(){var e=d(window).height(),o=.8*e,l=.3*e,a=null;return Rexbuilder_Util.$rexContainer.find(".rexpansive_section").each(function(e,t){var i=d(t),r=i.offset().top,i=i.height(),n=d(window).scrollTop();if(r-o<n&&n<r+i-l)return a=t,!1}),a}function _(){var e,t,i,r=m();null!==(r=n?n:r)&&Rexbuilder_Util_Editor.visibleRow!==r&&c(r),r=Rexbuilder_Util.$rexContainer.find(".rexpansive_section.highLightRow"),t=Rexbuilder_Util.$rexContainer.find(".rexpansive_section.focusedRow"),i=Rexbuilder_Util.$rexContainer.find(".rexpansive_section").first(),0<r.length?x(r)?r.is(i)?e={eventName:"rexlive:hideTopFastTools"}:0<t.length?r.is(t)&&(e={eventName:"rexlive:hideTopFastTools"}):e={eventName:"rexlive:viewTopFastTools"}:0<t.length&&!r.is(t)||(e={eventName:"rexlive:viewTopFastTools"}):e={eventName:"rexlive:hideTopFastTools"},Rexbuilder_Util_Editor.sendParentIframeMessage(e)}return{init:function(){this.elementIsResizing=!1,this.elementIsDragging=!1,this.sectionCopying=!1,this.blockCopying=!1,this.editingGallery=!1,this.editingElement=!1,this.editedElement=null,this.manageElement=!1,this.editedGallery=null,this.editedTextWrap=null,this.activateElementFocus=!1,this.mouseDownEvent=null,this.mouseUpEvent=null,this.mouseDown=!1,this.mouseUp=!1,this.mousePosition=null,this.mouseClickObject=null,this.mousePositionFrameYOffset=50,this.viewportMeasurement=Rexbuilder_Util.globalViewport,this.elementDraggingTriggered=!1,this.focusedElement=null,this.hasResized=!1,this.changedLayout=!1,this.clickedLayoutID="",this.undoActive=!1,this.redoActive=!1,this.updatingGridstack=!1,this.addingNewBlocks=!1,this.removingBlocks=!1,this.updatingImageBg=!1,this.updatingPaddingBlock=!1,this.updatingCollapsedGrid=!1,this.updatingSectionWidth=!1,this.updatingSectionLayout=!1,this.savingPage=!1,this.savingModel=!1,this.openingModel=!1,this.insertingModel=!1,this.visibleRow=null,this.visibleRowInfo={},this.scrollbarsActive=!1,this.dragAndDropFromParent=!1,this.undoStackArray=[],this.redoStackArray=[],this.needToSave=!0,this.$styleElement=d("#rexpansive-builder-style-inline-css")},load:function(){var e,t,i;Rexbuilder_Util_Editor.visibleRow=m(),e=null!==Rexbuilder_Util_Editor.visibleRow,t={},e&&(i=d(Rexbuilder_Util_Editor.visibleRow).find(".section-data")[0],(t=u(i)).collapse=Rexbuilder_Util_Editor.visibleRow.getAttribute("data-rex-collapse-grid")),Rexbuilder_Util_Editor.visibleRowInfo={sectionID:e?Rexbuilder_Util_Editor.visibleRow.getAttribute("data-rexlive-section-id"):null,modelNumber:e?void 0!==Rexbuilder_Util_Editor.visibleRow.getAttribute("data-rexlive-model-number")?Rexbuilder_Util_Editor.visibleRow.getAttribute("data-rexlive-model-number"):"":null,modelEditing:e?void 0!==Rexbuilder_Util_Editor.visibleRow.getAttribute("data-rexlive-model-editing")?Rexbuilder_Util_Editor.visibleRow.getAttribute("data-rexlive-model-editing"):"":null},i={eventName:"rexlive:traceVisibleRow",sectionTarget:Rexbuilder_Util_Editor.visibleRowInfo,rowInfo:t},Rexbuilder_Util_Editor.sendParentIframeMessage(i),d(Rexbuilder_Util_Editor.visibleRow).addClass("highLightRow"),Rexbuilder_Util.$rexContainer.on("mouseenter",".rexpansive_section",function(e){var t=d(n=this);t.hasClass("highLightRow")||c(this),t=x(t)?{eventName:"rexlive:hideTopFastTools"}:{eventName:"rexlive:viewTopFastTools"},Rexbuilder_Util_Editor.sendParentIframeMessage(t)}),Rexbuilder_Util.$rexContainer.on("mouseleave",".rexpansive_section",function(e){var t=m(),t=(null!==t&&Rexbuilder_Util_Editor.visibleRow!==t&&c(t),d(t)),i=Rexbuilder_Util.$rexContainer.find(".rexpansive_section").first();n=null,t.is(i)||Rexbuilder_Util_Editor.sendParentIframeMessage({eventName:"rexlive:viewTopFastTools"})}),Rexbuilder_Util.$window.on("scroll",_),"1"==(e=Rexbuilder_Util.$rexContainer.find(".rexpansive_section:not(removing_section)")).length&&e.hasClass("empty-section")?(Rexbuilder_Util.$rexContainer.parent().addClass("add-new-section--hide"),e.addClass("activeRowTools")):Rexbuilder_Util.$rexContainer.parent().removeClass("add-new-section--hide"),0==Rexbuilder_Util_Editor.$styleElement.length&&(t=document.head||document.getElementsByTagName("head")[0],(i=document.createElement("style")).type="text/css",i.id="rexpansive-builder-style-inline-css",i.styleSheet?i.styleSheet.cssText="":i.appendChild(document.createTextNode("")),t.appendChild(i))},activeAddSection:function(e){e=void 0!==e?e:null,Rexbuilder_Util.$rexContainer.parent().removeClass("add-new-section--hide"),e&&e.removeClass("activeRowTools")},endEditingElement:function(){var e=Rexbuilder_Util_Editor.editedGallery;e&&clearTimeout(e.doubleDownTimer),Rexbuilder_Util_Editor.elementIsDragging=!1,Rexbuilder_Util_Editor.editedTextWrap&&Rexbuilder_Util_Editor.editedTextWrap.blur(),e&&e.focusElementEditing(Rexbuilder_Util_Editor.editedElement),Rexbuilder_Util_Editor.editingGallery=!1,Rexbuilder_Util_Editor.editedGallery=null,Rexbuilder_Util_Editor.editingElement=!1,Rexbuilder_Util_Editor.editedElement=null,Rexbuilder_Util_Editor.editedTextWrap=null},startEditingElement:function(){var e,t;Rexbuilder_Util_Editor.editingElement&&Rexbuilder_Util_Editor.editingGallery&&(e=Rexbuilder_Util_Editor.editedGallery,t=Rexbuilder_Util_Editor.editedElement,e.unFocusElementEditing(t),e.properties.elementStartingH=parseInt(t.attr("data-gs-height")))},sendParentIframeMessage:function(e){var t={rexliveEvent:!0};jQuery.extend(t,e),window.parent.postMessage(t,"*")},addCustomClass:function(e,t){var i;""!=e&&(r(e,t),i="",i=t.parent().is("section")?t.attr("data-custom_classes"):t.attr("data-block_custom_class"),i=(i+=" "+e).trim(),t.parent().is("section")?t.attr("data-custom_classes",i):t.attr("data-block_custom_class",i))},removeCustomClass:r,escapeRegExp:a,pushAction:function(e,t,i,r){e={sectionID:(e="document"!==e?l(e):{sectionID:"",targetID:"",modelNumber:-1}).sectionID,targetID:e.targetID,modelNumber:e.modelNumber,actionName:t,performActionData:i,reverseActionData:r};Rexbuilder_Util_Editor.undoStackArray.push(e),Rexbuilder_Util_Editor.redoStackArray=[],o()},getIDs:l,getStacks:function(){return{undo:Rexbuilder_Util_Editor.undoStackArray,redo:Rexbuilder_Util_Editor.redoStackArray}},getTextWrapLength:function(e){var t,e=e.find(".text-wrap"),i=0,r=0;return e.hasClass("medium-editor-element")?((t=e.clone(!1)).children(".medium-insert-buttons").remove(),0!=(i=t.text().trim().length)&&(e.hasClass("medium-editor-element")&&!e.hasClass("medium-editor-placeholder")||0!=e.parents(".pswp-item").length)&&(r=e.innerHeight())):0!=(i=e.text().trim().length)&&(r=e.innerHeight()),0==r?0:i},rowAttrsObj:u,blockAttrsObj:u,startLoading:function(e){(e=void 0===e||e)&&(Rexbuilder_Util.$rexContainer.parent().addClass("rexbuilder-live-content--loading"),Rexbuilder_Util.$rexContainer.addClass("fade-out").one(Rexbuilder_Util._animationEvent,function(){Rexbuilder_Util.$rexContainer.css("opacity","0").removeClass("fade-out");Rexbuilder_Util_Editor.sendParentIframeMessage({eventName:"rexlive:animateContentsFadeOutEnd"})}))},endLoading:function(e){(e=void 0===e||e)&&Rexbuilder_Util.$rexContainer.addClass("fade-in").one(Rexbuilder_Util._animationEvent,function(){Rexbuilder_Util.$rexContainer.css("opacity","").removeClass("fade-in"),Rexbuilder_Util.$rexContainer.parent().removeClass("rexbuilder-live-content--loading");Rexbuilder_Util_Editor.sendParentIframeMessage({eventName:"rexlive:animateContentsEnd"})})},builderEdited:function(e){Rexbuilder_Util_Editor.sendParentIframeMessage({eventName:"rexlive:edited",modelEdited:e=void 0!==e&&e})},getMousePosition:function(e,t){var i={};return void 0!==e.clientX&&void 0!==e.clientY&&void 0!==e.offsetX&&void 0!==e.offsetY&&void 0!==t?i={x:(e=e.target.getBoundingClientRect()).left+t.offset.w/2,y:e.top+Rexbuilder_Util_Editor.mousePositionFrameYOffset}:null!==Rexbuilder_Util_Editor.mousePosition&&null!==Rexbuilder_Util_Editor.mouseClickObject?(i={x:Rexbuilder_Util_Editor.mousePosition.client.x-Rexbuilder_Util_Editor.mousePosition.offset.x+Rexbuilder_Util_Editor.mouseClickObject.offset.w/2,y:Rexbuilder_Util_Editor.mousePosition.client.y-Rexbuilder_Util_Editor.mousePosition.offset.y+Rexbuilder_Util_Editor.mousePositionFrameYOffset},Rexbuilder_Util_Editor.mousePosition=null,Rexbuilder_Util_Editor.mouseClickObject=null):i={x:Rexbuilder_Util_Editor.viewportMeasurement.width/2,y:Rexbuilder_Util_Editor.viewportMeasurement.height/2},i},lockRows:function(){Rexbuilder_Util.$rexContainer.children(".rexpansive_section").each(function(e,t){t=d(t);t.wrap("<div></div>"),t.parent().attr("style","position:relative;"),t.parent().append('<div class="rexpansive-lock-section"></div>')})},lockRowsLight:function(e){var t=Rexbuilder_Util.$rexContainer.children(".rexpansive_section");null!==e&&t.not(e),t.addClass("rexpansive-lock-section--light")},releaseRows:function(){Rexbuilder_Util.$rexContainer.find(".rexpansive_section").each(function(e,t){t=d(t);t.siblings().each(function(e,t){t=d(t);t.hasClass("rexpansive-lock-section")&&t.remove()}),t.unwrap()})},releaseRowsLight:function(){Rexbuilder_Util.$rexContainer.children(".rexpansive_section").removeClass("rexpansive-lock-section--light").removeClass("rexpansive-lock-section--overlay"),Rexbuilder_Util.$rexContainer.find(".grid-stack-item--drag-to-row").removeClass("grid-stack-item--drag-to-row"),Rexbuilder_Util.$rexContainer.find(".drag-to-section-simulator").remove()},getGradientSafeValue:s,getPrefixedValues:function(e){for(var t=["-moz-","-webkit-","-o-","-ms-"],i=[],r=0;r<t.length;r++)i.push(t[r]+e);return i},synchGradient:function(){d(".text-gradient").each(function(e,t){var i=t.getAttribute("data-gradient"),i=s(i),t=d(t);t.css("background",i),t.css("-webkit-background-clip","text"),t.css("-webkit-text-fill-color","transparent")})},updateBlockContainerHeight:function(e,t,i){var r=Rexbuilder_Util.getGalleryInstance(e),e=e.parents(".grid-stack-item").get(0);this.needToSave=t=t||!0,r.updateElementHeight(e,void 0,i),this.needToSave=!0},updateContainerMargins:function(e){var t=Rexbuilder_Util.$rexContainer.parents(".rexbuilder-live-content").eq(0);0<e.distances.vals.top?t.addClass("fix-tools-first-row"):t.removeClass("fix-tools-first-row"),t.css("margin-top",e.distances.vals.top)},sendUndoRedoInformation:o,restorePageStartingState:function(e){var t,i,r="default"===e.selected;if(Rexbuilder_Util.$rexContainer.hasClass("editing-model")&&(t=Rexbuilder_Util.$rexContainer.find(".rex-model-section .update-model-button.unlocked").eq(0),Rexbuilder_Dom_Util.updateLockEditModel(t,!0),Rexbuilder_Util.$rexContainer.removeClass("editing-model")),r){for(var n=Rexbuilder_Util_Editor.undoStackArray.length,o=0;o<n;o++)Rexbuilder_Util.$document.trigger("rexlive:undo");t="default",r=d("#rexbuilder-layout-data"),i=d("#rexbuilder-default-layout-state"),r.find('.customization-wrap[data-customization-name="'+t+'"] .section-targets').get().map(function(e){return{sectionID:e.getAttribute("data-section-rex-id"),data:e.innerText}}).forEach(function(e){i.find('[data-section-rex-id="'+e.sectionID+'"]').text(e.data)})}r={eventName:"rexlive:restoreStateEnded",buttonData:e.buttonData},Rexbuilder_Util_Editor.sendParentIframeMessage(r)},isJQuery:function(e){return e instanceof jQuery}}}(jQuery);
var Rexbuilder_Dom_Util=function($){"use strict";var _updateSlider=function(e){var t=e.textWrap,i=e.sliderNumberToActive,a=(t.children('.rex-slider-wrap:not([data-rex-slider-number="'+e.sliderNumberToActive+'"])').each(function(e,t){var i=$(t);t.style.display="none",t.setAttribute("data-rex-slider-active",!1),RexSlider.destroySliderPlugins(i)}),t.children('.rex-slider-wrap[data-rex-slider-number="'+i+'"]'));0==a.length?void 0!==e.newSliderData&&(t=t.parents(".grid-stack-item"),Rexbuilder_CreateBlocks.createSlider(e.newSliderData,t,i)):(a[0].style.display="",RexSlider.initSlider(a))},_updateSliderStack=function(e){var t=""!=e.target.modelNumber?Rexbuilder_Util.$rexContainer.find('section[data-rexlive-section-id="'+e.target.sectionID+'"][data-rexlive-model-number="'+e.target.modelNumber+'"]'):Rexbuilder_Util.$rexContainer.find('section[data-rexlive-section-id="'+e.target.sectionID+'"]'),i=t.find('div [data-rexbuilder-block-id="'+e.target.rexID+'"]').find(".text-wrap"),a=i.find('.rex-slider-wrap[data-rex-slider-number="'+e.target.sliderNumber+'"]'),a={textWrap:i,sliderNumberToActive:parseInt(a.attr("data-rex-slider-number"))},i=(Rexbuilder_Dom_Util.lastSliderNumber=Rexbuilder_Dom_Util.lastSliderNumber+1,{textWrap:i,sliderNumberToActive:Rexbuilder_Dom_Util.lastSliderNumber,newSliderData:e});_updateSlider(i),Rexbuilder_Util_Editor.pushAction(t,"updateSlider",i,a)},_updateRow=function(e,t,i,a){var o=parseInt(a.gutter),r=parseInt(a.top),d=parseInt(a.right),l=parseInt(a.bottom),n=parseInt(a.left),o={gutter:isNaN(o)?20:o,top:isNaN(r)?20:r,right:isNaN(d)?20:d,bottom:isNaN(l)?20:l,left:isNaN(n)?20:n},r=o.gutter,d=o.top,l=o.right,n=o.bottom,o=o.left,s=void 0===a.layout?"fixed":a.layout,c=void 0!==a.full_height&&"masonry"!=s&&a.full_height,u=void 0===a.section_width?"100%":""+a.section_width,p=void 0===a.dimension?"full":a.dimension,_=!Rexbuilder_Util.editorMode&&a.collapse_grid,g=i.parent(),m=g[0],g=("full"==p?(g.removeClass("center-disposition"),g.addClass("full-disposition"),m.style.maxWidth="100%"):(g.removeClass("full-disposition"),g.addClass("center-disposition"),m.style.maxWidth=u),i.attr("data-separator",r),i.attr("data-row-separator-top",d),i.attr("data-row-separator-right",l),i.attr("data-row-separator-bottom",n),i.attr("data-row-separator-left",o),i.attr("data-layout",s),i.attr("data-full-height",c),t.attr("data-section_width",u),t.attr("data-dimension",p),t.attr("data-no-mobile-layout",a.noMobileLayoutSaved),t.attr("data-responsive_collapse",_),t.attr("data-layout",s),e.attr("data-rex-collapse-grid",_),i.data());void 0!==g&&void 0!==(m=g.plugin_perfectGridGalleryEditor)&&m.updateGridSettingsChangeLayout(a),Rexbuilder_Util.editorMode&&(Rexbuilder_Section_Editor.updateSectionDimensionTool(e,a),Rexbuilder_Section_Editor.updateSectionLayoutTool(e,a))},_updateImageBG=function(e,t){var i,a;e.hasClass("rexpansive_section")?(i=e.children(".section-data"),""==t.idImage||"true"!=t.active.toString()?(_resetImageSection(e,i),Rexbuilder_Util.editorMode||e.removeClass("section-w-image")):(_updateImageSection(e,i,t),Rexbuilder_Util.editorMode||e.addClass("section-w-image"))):e.hasClass("grid-item-content")&&(a=(i=e.parents(".grid-stack-item")).children(".rexbuilder-block-data"),""==t.idImage||"true"!=t.active.toString()?(_resetImageBlock(e,a,t),Rexbuilder_Util.editorMode||i.removeClass("block-w-image")):(Rexbuilder_Util.editorMode||i.addClass("block-w-image"),_updateImageBlock(e,a,t)))},_updateImageSection=function(e,t,i){"undefined"!=typeof Rexbuilder_Section_Editor&&Rexbuilder_Section_Editor.updateRowBackgroundImageTool(e,i),i.idImage!=parseInt(t.attr("data-id_image_bg_section"))&&(e=e[0],Rexbuilder_Util.editorMode?e.style.backgroundImage="url("+i.urlImage+")":e.setAttribute("data-src",i.urlImage),e.setAttribute("data-background_image_width",i.width),e.setAttribute("data-background_image_height",i.height),t.attr("data-image_size",i.image_size),t.attr("data-id_image_bg_section",i.idImage),t.attr("data-image_bg_section",i.urlImage),t.attr("data-image_bg_section_active",i.active))},_updateBlockPhotoswipe=function(e){e.$elem.children(".rexbuilder-block-data").attr("data-photoswipe",e.photoswipe)},_updateImageBlock=function(e,t,i){t.attr("data-id_image_bg_block",i.idImage),t.attr("data-type_bg_block",i.typeBGimage),t.attr("data-image_bg_block",i.urlImage),t.attr("data-image_size",i.sizeImage),t.attr("data-image_bg_elem_active",i.active),"full"==i.typeBGimage?_addImageFullBgBlock(e,i):"natural"==i.typeBGimage&&_addImageNaturalBgBlock(e,i),/(youtube|vimeo|mp4)-player/.test(e.get(0).className)&&_moveImageBeforeVideo(e),e.attr("data-background_image_width",i.width),e.attr("data-background_image_height",i.height),"undefined"!=typeof Rexbuilder_Block_Editor&&(Rexbuilder_Block_Editor.updateBlockBackgroundImageTool(e,i),Rexbuilder_Block_Editor.updateBlockImagePositionTool(e,i))},_addImageNaturalBgBlock=function(e,t){var i=e.find(".rex-image-wrapper"),a=e.find(".responsive-block-overlay"),o=(0==i.length?(o=document.createElement("div"),(i=$(o)).addClass("rex-image-wrapper"),i.insertBefore(a[0])):i.hasClass("full-image-background")&&(i.detach().insertBefore(a[0]),i.removeClass("full-image-background")),i[0]);i.addClass("natural-image-background"),Rexbuilder_Util.editorMode?o.style.backgroundImage="url("+t.urlImage+")":o.setAttribute("data-src",t.urlImage);a=e.parents(".grid-stack-item")[0];a&&(a.offsetWidth<t.width?i.addClass("small-width"):i.removeClass("small-width"))},_removeImageBlock=function(e){e=e.find(".rex-image-wrapper");0!=e.length&&e.remove()},_addImageFullBgBlock=function(e,t){var i=e.find(".rex-image-wrapper"),e=e.find(".responsive-block-overlay"),a=(0==i.length?(a=document.createElement("div"),(i=$(a)).addClass("rex-image-wrapper"),i.insertBefore(e[0])):i.hasClass("natural-image-background")&&(i.detach().insertBefore(e[0]),i.removeClass("natural-image-background"),i.removeClass("small-width")),i[0]);i.addClass("full-image-background"),Rexbuilder_Util.editorMode?a.style.backgroundImage="url("+t.urlImage+")":a.setAttribute("data-src",t.urlImage)},_resetImageSection=function(e,t){var i=e[0];t.attr("data-image_bg_section",""),t.attr("data-id_image_bg_section",""),t.data("data-image_size",""),i.setAttribute("data-background_image_width",""),i.setAttribute("data-background_image_height",""),i.style.backgroundImage="","undefined"!=typeof Rexbuilder_Section_Editor&&Rexbuilder_Section_Editor.resetRowBackgroundImageTool(e)};function _resetImageBlock(e,t,i){t.attr("data-id_image_bg_block",""),t.attr("data-type_bg_block",""),t.attr("data-image_bg_block",""),t.attr("data-image_size",""),e.parents(".grid-stack-item").hasClass("block-has-slider")?t.attr("data-photoswipe",i.photoswipe):t.attr("data-photoswipe",""),t.attr("data-image_bg_elem_active",""),_removeImageBlock(e),e.attr("data-background_image_width",""),e.attr("data-background_image_height","");i=e.parents(".grid-stack-item").get(0);i&&Rexbuilder_Util.editorMode&&(t=i.querySelector(".deactivate-block-image-background"),$(t).parents(".tool-button--double-icon--wrap").addClass("tool-button--hide"),Rexbuilder_Util.addClass(i.querySelector(".rexlive-block-toolbox.bottom-tools .edit-block-image-position"),"tool-button--hide"),$(i).find(".rexlive-block-toolbox.top-tools .edit-block-image").parents(".tool-button--double-icon--wrap").removeClass("tool-button--hide"))}var _removeYoutubeVideo=function($target,removeFromDom){var $ytpWrapper=$target.children(".rex-youtube-wrap"),$toggleAudio=$target.children(".rex-video-toggle-audio"),videoID,elemData,videoID,wasSlide,hadAudio,youTubeTemplate,$toggle;0!=$ytpWrapper.length&&(removeFromDom=void 0===removeFromDom||removeFromDom,$target.removeClass("youtube-player"),removeFromDom?(void 0!==$ytpWrapper.YTPGetPlayer()&&$ytpWrapper.YTPPlayerDestroy(),$ytpWrapper.remove(),0!=$toggleAudio.length&&$toggleAudio.remove()):(void 0!==$ytpWrapper.YTPGetPlayer()?(videoID=$ytpWrapper.YTPGetVideoID(),$ytpWrapper.YTPPlayerDestroy()):(elemData=jQuery.extend(!0,{},eval("("+$ytpWrapper.attr("data-property")+")")),videoID=elemData.videoURL),wasSlide=0!=$ytpWrapper.parents(".rex-slider-element").length,hadAudio=0!=$toggleAudio.length,wasSlide&&(hadAudio=0!=$ytpWrapper.children(".rex-video-toggle-audio").length),$ytpWrapper.remove(),tmpl.arg="video",youTubeTemplate='<div class="rex-youtube-wrap" data-property="{videoURL:\''+videoID+"',containment:'self',startAt:0,mute:"+!1+',autoPlay:true,loop:true,opacity:1,showControls:false, showYTLogo:false}"></div>',_insertBlockVideoToDOM($target,youTubeTemplate),hadAudio&&wasSlide&&($toggle=$('<div class="rex-video-toggle-audio"><div class="rex-video-toggle-audio-shadow"></div></div>'),$toggle.addClass("removing-toggle-audio"),$toggle.appendTo($target.children(".rex-youtube-wrap")[0]))))},_removeVimeoVideo=function(e,t){var i,a=e.children(".rex-video-vimeo-wrap"),o=e.children(".rex-video-toggle-audio");0!=a.length&&(i=a.children("iframe")[0],t=void 0===t||t,e.removeClass("vimeo-player"),t?(VimeoVideo.removePlayer(i),a.remove(),0!=o.length&&o.remove()):((e=VimeoVideo.findVideo(i))&&e.unload(),0!=o.length&&o.addClass("removing-toggle-audio")))},_removeMp4Video=function(e,t){var i,a=e.children(".rex-video-wrap"),o=e.children(".rex-video-toggle-audio");0!=a.length&&(t=void 0===t||t,(i=a.find("video")[0]).pause(),i.currentTime=0,e.removeClass("mp4-player"),t?(a.remove(),0!=o.length&&o.remove()):(a.addClass("removing-video-mp4"),0!=o.length&&o.addClass("removing-toggle-audio")))},_addMp4Video=function(e,t,i){var a=e.children(".rex-video-wrap"),o=e.children(".rex-video-toggle-audio"),r=a.find("source"),r=Rexbuilder_Util.editorMode?r.attr("src"):r.attr("data-src");0!=a.length&&r!=t.linkMp4||0==a.length?(_removeMp4Video(e,!0),e.addClass("mp4-player"),tmpl.arg="video",r='<div class="rex-video-wrap intrinsic-ignore" data-rex-video-width="'+t.width+'" data-rex-video-height="'+t.height+'"><video width="'+t.width+'" height="'+t.height+'" class="rex-video-container" preload autoplay loop muted><source type="video/mp4" src="'+t.linkMp4+'"></video></div>',e.is("section")?(t="",t=Rexbuilder_Util.editorMode?".section-toolBox":".section-data",e.children(t).after(r)):_insertBlockVideoToDOM(e,r)):0!=a.length&&(a.removeClass("removing-video-mp4"),Rexbuilder_Util.editorMode)&&a.find("video")[0].play(),0==o.length?i&&e.append('<div class="rex-video-toggle-audio"><div class="rex-video-toggle-audio-shadow"></div></div>'):i?o.removeClass("removing-toggle-audio"):o.remove()},_addYoutubeVideo=function($target,urlYoutube,hasAudio){var $ytpWrapper=$target.children(".rex-youtube-wrap"),$toggleAudio=$target.children(".rex-video-toggle-audio"),elemData,activeUrl,videoID,urlID,youTubeTemplate;0!=$ytpWrapper.length?(elemData=jQuery.extend(!0,{},eval("("+$ytpWrapper.attr("data-property")+")")),activeUrl=elemData.videoURL,videoID=Rexbuilder_Util.getYoutubeID(activeUrl),urlID=Rexbuilder_Util.getYoutubeID(urlYoutube),videoID!=urlID?void 0===$ytpWrapper.YTPGetPlayer()?($ytpWrapper.attr("data-property","{videoURL:'"+urlYoutube+"',containment:'self',startAt:0,mute:'"+!hasAudio+"',autoPlay:true,loop:true,opacity:1,showControls:false, showYTLogo:false}"),$ytpWrapper.addClass("youtube-player-launching"),$ytpWrapper.YTPlayer()):(_removeYoutubeVideo($target,!0),setTimeout(function(){tmpl.arg="video";_insertBlockVideoToDOM($target,'<div class="rex-youtube-wrap" data-property="{videoURL:\''+urlYoutube+"',containment:'self',startAt:0,mute:"+!hasAudio+',autoPlay:true,loop:true,opacity:1,showControls:false, showYTLogo:false}"></div>'),$target.children(".rex-youtube-wrap").YTPlayer();var e=$target.children(".rex-video-toggle-audio");0==e.length?hasAudio&&$target.append('<div class="rex-video-toggle-audio"><div class="rex-video-toggle-audio-shadow"></div></div>'):hasAudio?e.removeClass("removing-toggle-audio"):e.remove()},1e3,$target,urlYoutube,hasAudio)):void 0===$ytpWrapper.YTPGetPlayer()&&($ytpWrapper.addClass("youtube-player-launching"),$ytpWrapper.YTPlayer())):(tmpl.arg="video",youTubeTemplate='<div class="rex-youtube-wrap" data-property="{videoURL:\''+urlYoutube+"',containment:'self',startAt:0,mute:"+!hasAudio+',autoPlay:true,loop:true,opacity:1,showControls:false, showYTLogo:false}"></div>',_insertBlockVideoToDOM($target,youTubeTemplate),$target.children(".rex-youtube-wrap").YTPlayer()),$target.addClass("youtube-player"),0==$toggleAudio.length?hasAudio&&$target.append('<div class="rex-video-toggle-audio"><div class="rex-video-toggle-audio-shadow"></div></div>'):hasAudio?$toggleAudio.removeClass("removing-toggle-audio"):$toggleAudio.remove()},_addVimeoVideo=function(e,t,i){var a=e.children(".rex-video-vimeo-wrap"),o=e.children(".rex-video-toggle-audio");e.addClass("vimeo-player"),""==t?_removeVimeoVideo(e,!0):0!=a.length&&a.children("iframe").attr("src").split("?")[0]!=t||0==a.length?(_removeVimeoVideo(e,!0),tmpl.arg="video",_insertBlockVideoToDOM(e,'<div class="rex-video-vimeo-wrap rex-video-vimeo-wrap--block"><iframe src="'+(t+="?autoplay=1&loop=1&title=0&byline=0&portrait=0&autopause=0&muted="+("true"==i.toString()?"0":"1")+"&background=1")+'" width="640" height="360" frameborder="0" allow="autoplay"  webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>'),t=e.children(".rex-video-vimeo-wrap").find("iframe")[0],VimeoVideo.addPlayer("1",t)):0!=a.length&&null!=(t=VimeoVideo.findVideo(a.find("iframe")[0]))&&t.play(),0==o.length?i&&e.append('<div class="rex-video-toggle-audio"><div class="rex-video-toggle-audio-shadow"></div></div>'):i?o.removeClass("removing-toggle-audio"):o.remove()},_updateBlockVideoTools=function(e,t){var i=e.find(".rexlive-block-toolbox.top-tools .edit-block-video-background"),e=e.find(".rexlive-block-toolbox.bottom-tools .edit-block-video-background");t?(i.parent().removeClass("tool-button--hide"),e.parent().addClass("tool-button--hide")):(i.parent().addClass("tool-button--hide"),e.parent().removeClass("tool-button--hide"))},_updateVideos=function(e,t){var i,a,o,r="";if(e.hasClass("rexpansive_section"))i=e.children(".section-data"),r="section";else if(e.hasClass("grid-item-content"))a=(o=e.parents(".grid-stack-item")).children(".rexbuilder-block-data"),r="block";else{if(!e.hasClass("rex-slider-video-wrapper"))return;r="slide"}var d=t.typeVideo;""==d?(_removeMp4Video(e,!0),_removeYoutubeVideo(e,!0),_removeVimeoVideo(e,!0)):"mp4"==d?(_removeYoutubeVideo(e,!0),_removeVimeoVideo(e,!0),_addMp4Video(e,t.mp4Data,t.audio)):"vimeo"==d?(_removeYoutubeVideo(e,!0),_removeMp4Video(e,!0),_addVimeoVideo(e,t.vimeoUrl,t.audio)):"youtube"==d&&(_removeVimeoVideo(e,!0),_removeMp4Video(e,!0),_addYoutubeVideo(e,t.youtubeUrl,t.audio)),"section"==r?(i.attr("data-video_mp4_url",t.mp4Data.linkMp4),i.attr("data-video_bg_id_section",t.mp4Data.idMp4),i.attr("data-video_bg_width_section",t.mp4Data.width),i.attr("data-video_bg_height_section",t.mp4Data.height),i.attr("data-video_bg_url_section",t.youtubeUrl),i.attr("data-video_bg_url_vimeo_section",t.vimeoUrl),"undefined"!=typeof Rexbuilder_Section_Editor&&Rexbuilder_Section_Editor.updateRowBackgroundVideo(e,t),"mp4"==d?e.addClass("section-w-html-video"):e.removeClass("section-w-html-video")):"block"==r&&(a.attr("data-video_mp4_url",t.mp4Data.linkMp4),a.attr("data-video_bg_id",t.mp4Data.idMp4),a.attr("data-video_bg_width",t.mp4Data.width),a.attr("data-video_bg_height",t.mp4Data.height),a.attr("data-video_bg_url",t.youtubeUrl),a.attr("data-video_bg_url_vimeo",t.vimeoUrl),a.attr("data-video_has_audio",t.audio),"mp4"==d?o.addClass("block-w-html-video"):o.removeClass("block-w-html-video"),Rexbuilder_Util.editorMode)&&_updateBlockVideoTools(o,""===d)},_updateBlockPaddings=function(e,t){e.children(".rexbuilder-block-data").attr("data-block_padding",Rexbuilder_Util.paddingsToString(t));var e=e.find(".text-wrap");0!=e.length&&((e=e[0]).style.paddingTop=""+t.top+t.type,e.style.paddingRight=""+t.right+t.type,e.style.paddingBottom=""+t.bottom+t.type,e.style.paddingLeft=""+t.left+t.type)},_updateBlocksLayout=function(e){var t,i,a,o,r,d,l=e.blocks,n=e.gridstackInstance;if(!(l.length<=0)){e=$(e.blocks[0].elem).parents(".rexpansive_section");for(Rexbuilder_Util_Editor.updatingGridstack||n.grid&&n.batchUpdate(),t=0;t<l.length;t++)i=l[t].x,a=l[t].y,o=l[t].w,r=l[t].h,d=l[t].elem,n.update(d,i,a,o,r);Rexbuilder_Util_Editor.updatingGridstack||n.grid&&n.commit(),setTimeout(Rexbuilder_Util.fixYoutube.bind(null,e[0]),1500)}},_collapseGrid=function(e,t,i,a){Rexbuilder_Util_Editor.updatingCollapsedGrid=!0,t?e.collapseElementsProperties():e.removeCollapseElementsProperties(),e.updateGridLayoutCollapse(a),_updateBlocksLayout(i),setTimeout(function(){Rexbuilder_Util_Editor.updatingCollapsedGrid=!1,e._fixImagesDimension(),e._createFirstReverseStack(),Rexbuilder_Util.editorMode&&e._updateElementsSizeViewers()},200)},updateRemovingBlock=function(e,t,i){t?(i.removeBlock(e.get(0)),Rexbuilder_Util.stopBlockVideos(e)):(i.reAddBlock(e),Rexbuilder_Util.playBlockVideos(e)),0==i.properties.numberBlocksVisibileOnGrid?e.parents(".rexpansive_section").addClass("empty-section"):e.parents(".rexpansive_section").removeClass("empty-section")},_updateSectionName=function(e,t){var i;null!==t&&(e.attr("data-rexlive-section-name",t),""!==t)&&void 0!==t&&(i=t.replace(/\s/gm,""),Rex_Navigator.updateNavigatorItem(e,i,t))},_updateSectionNavLabel=function(e,t){e.children(".section-data").attr("data-section_nav_label",t)},_fixSectionDomOrder=function(e,t,i){for(var a,o,r,d=[],l=[].slice.call(Rexbuilder_Util.rexContainer.getElementsByClassName("rexpansive_section")),n=l.length,s=0;s<n;s++){var c=$(l[s]),c={rexID:l[s].getAttribute("data-rexlive-section-id"),section_is_model:Rexbuilder_Util.hasClass(l[s],"rex-model-section"),section_model_id:l[s].getAttribute("data-rexlive-model-id"),section_model_number:l[s].getAttribute("data-rexlive-model-number"),$section:c.detach()};d.push(c)}for(o=0;o<e.length;o++){for(r=0;r<d.length;r++)if(d[r].rexID==e[o].rexID){if(!d[r].section_is_model){a=d[r].$section;break}if(d[r].section_model_number==e[o].modelNumber){a=d[r].$section;break}}Rexbuilder_Util.$rexContainer.append(a),d.splice(r,1)}for(r=0;r<d.length;r++)Rexbuilder_Util.$rexContainer.append(d[r].$section);"default"==Rexbuilder_Util.activeLayout&&(Rexbuilder_Util.updateDefaultLayoutStateDOMOrder(e),void 0!==i)&&Rexbuilder_Util.updateSectionOrderCustomLayouts(i,e)};function _enablePhotoswipeAllBlocksSection(e){for(var t,i,a,o,r,d=e.get(0).querySelectorAll(".grid-stack-item:not(.removing_block)"),l=d.length,n=0;n<l;n++)i=(t=d[n]).querySelector(".rexbuilder-block-data"),a=Rexbuilder_Util.hasClass(t,"block-has-slider"),o=0!==Rexbuilder_Util_Editor.getTextWrapLength($(t)),r=""!==i.getAttribute("data-image_bg_block"),t.setAttribute("data-rexlive-element-edited",!0),(r&&!o||a)&&i.setAttribute("data-photoswipe",!0)}function _removePhotoswipeAllBlocksSection(e){for(var t,i=e.get(0).querySelectorAll(".grid-stack-item:not(.removing_block)"),a=i.length,o=0;o<a;o++)t=i[o].querySelector(".rexbuilder-block-data"),i[o].setAttribute("data-rexlive-element-edited",!0),t.setAttribute("data-photoswipe",!1)}var _updateSectionPhotoswipe=function(e){for(var t=0;t<e.length;t++)e[t].$data.attr("data-photoswipe",e[t].photoswipe)},_updateCustomClasses=function(e,t){for(var i,a="",o=(a=(a=void 0===(a=e.is("section")?(i=e.children(".section-data")).attr("data-custom_classes"):(i=e.children(".rexbuilder-block-data")).attr("data-block_custom_class"))?"":a).trim()).split(/\s+/),r=0;r<o.length;r++)Rexbuilder_Util_Editor.removeCustomClass(o[r],i),e.removeClass(o[r]);for(r=0;r<t.length;r++)Rexbuilder_Util_Editor.addCustomClass(t[r],i),e.addClass(t[r])},_updateBlockUrl=function(e,t){e.children(".rexbuilder-block-data").attr("data-linkurl",t)},_updateFlexPostition=function(e,t){var i;e.hasClass("block-has-slider")||(e.removeClass("rex-flex-top rex-flex-middle rex-flex-bottom rex-flex-left rex-flex-center rex-flex-right"),(i=e.children(".rexbuilder-block-data")).attr("data-block_flex_position",""),""!=t.x&&""!=t.y&&(e.addClass("rex-flex-"+t.x),e.addClass("rex-flex-"+t.y),i.attr("data-block_flex_position",t.x+" "+t.y)))},_updateImageFlexPostition=function(e,t){var i;e.hasClass("block-has-slider")||(e.removeClass("rex-flex-img-top rex-flex-img-middle rex-flex-img-bottom rex-flex-img-left rex-flex-img-center rex-flex-img-right"),(i=e.children(".rexbuilder-block-data")).attr("data-block_flex_img_position",""),""!=t.x&&""!=t.y&&(e.addClass("rex-flex-img-"+t.x),e.addClass("rex-flex-img-"+t.y),i.attr("data-block_flex_img_position",t.x+" "+t.y)))},_updateCustomCSS=function(e){var t=document.getElementById("rexpansive-builder-style-inline-css");t&&(t.textContent=e)},_updateSectionVideoBackground=function(e,t){_updateVideos(e,t)};function _updateSectionBackgroundColorLive(e,t){var i=""!=e.modelNumber,a=Rexbuilder_Util.$rexContainer.find('section[data-rexlive-section-id="'+e.sectionID+'"]');_setBackgroundColor(a=i?Rexbuilder_Util.$rexContainer.find('section[data-rexlive-section-id="'+e.sectionID+'"][data-rexlive-model-number="'+e.modelNumber+'"]'):a,t),"undefined"!=typeof Rexbuilder_Section_Editor&&Rexbuilder_Section_Editor.updateRowBackgroundColorTool(a,t)}function updateSectionBackgroundColor(e,t){var i=e.children(".section-data"),a=t.color,t=t.active;_setBackgroundColor(e,a),i.attr("data-color_bg_section",a),i.attr("data-color_bg_section_active",t),"undefined"!=typeof Rexbuilder_Section_Editor&&Rexbuilder_Section_Editor.updateRowBackgroundColorTool(e,a)}var _updateSectionBackgroundGradient=function(e,t){var i=e.children(".section-data"),a=Rexbuilder_Util_Editor.getGradientSafeValue(t.color);e[0].style.background=a,i.attr("data-color_bg_section",t.color),i.attr("data-color_bg_section_active",t.active),"undefined"!=typeof Rexbuilder_Section_Editor&&Rexbuilder_Section_Editor.updateRowBackgroundGradientTool(e,a)},_updateBlockBackgroundColorLive=function(e,t){var i,a;a=(i=""!=e.modelNumber?(i='section[data-rexlive-section-id="'+e.sectionID+'"][data-rexlive-model-number="'+e.modelNumber+'"]',a='div[data-rexbuilder-block-id="'+e.rexID+'"] .grid-item-content',Rexbuilder_Util.$rexContainer.find(i).find(a)):Rexbuilder_Util.$rexContainer.find('section[data-rexlive-section-id="'+e.sectionID+'"]').find('div [data-rexbuilder-block-id="'+e.rexID+'"] .grid-item-content'))[0],-1!==getComputedStyle(a).background.indexOf("linear-gradient")&&(a.style.background=""),a.style.backgroundColor=t,"undefined"!=typeof Rexbuilder_Block_Editor&&Rexbuilder_Block_Editor.updateBlockBackgroundColorToolLive(i,t)},_updateBlockBackgroundColor=function(e){var t=e.$elem,i=t.find(".grid-item-content")[0],a=t.children(".rexbuilder-block-data");-1!==getComputedStyle(i).background.indexOf("linear-gradient")&&(i.style.background=""),i.style.backgroundColor=e.color,a.attr("data-color_bg_block",e.color),a.attr("data-color_bg_elem_active",e.active),"undefined"!=typeof Rexbuilder_Block_Editor&&Rexbuilder_Block_Editor.updateBlockBackgroundColorTool(t,e.color,e.active)},_updateBlockBackgroundGradient=function(e){var t=e.$elem,i=t.find(".grid-item-content")[0],a=t.children(".rexbuilder-block-data"),o=Rexbuilder_Util_Editor.getGradientSafeValue(e.color);i.style.background=o,a.attr("data-color_bg_block",e.color),a.attr("data-color_bg_elem_active",e.active),"undefined"!=typeof Rexbuilder_Block_Editor&&Rexbuilder_Block_Editor.updateBlockBackgroundGradientTool(t,o)};function updateSectionOverlayColorLive(e,t){e=""!==e.modelNumber?Rexbuilder_Util.$rexContainer.find('.rexpansive_section[data-rexlive-section-id="'+e.sectionID+'"][data-rexlive-model-number="'+e.modelNumber+'"]'):Rexbuilder_Util.$rexContainer.find('.rexpansive_section[data-rexlive-section-id="'+e.sectionID+'"]');_setBackgroundColor(e.children(".responsive-overlay"),t),"undefined"!=typeof Rexbuilder_Section_Editor&&Rexbuilder_Section_Editor.updateRowOverlayColorToolLive(e,t)}var updateSectionOverlay=function(e,t){var i=e.children(".responsive-overlay"),a=e.children(".section-data");_setBackgroundColor(i,t.color),a.attr("data-row_overlay_color",t.color),a.attr("data-row_overlay_active",t.active),"true"==t.active.toString()?i.addClass("rex-active-overlay"):i.removeClass("rex-active-overlay"),"undefined"!=typeof Rexbuilder_Section_Editor&&Rexbuilder_Section_Editor.updateRowOverlayColorTool(e,t)},_updateSectionOverlayGradient=function(e,t){var i=e.children(".section-data"),a=e.children(".responsive-overlay"),o=a[0],r=Rexbuilder_Util_Editor.getGradientSafeValue(t.color);o.style.background=r,i.attr("data-row_overlay_color",t.color),i.attr("data-row_overlay_active",t.active),"true"==t.active.toString()?a.addClass("rex-active-overlay"):a.removeClass("rex-active-overlay"),"undefined"!=typeof Rexbuilder_Section_Editor&&Rexbuilder_Section_Editor.updateRowOverlayGradientTool(e,{active:t.active,color:r})},_updateBlockOverlayColorLive=function(e,t){var i,a;""!=e.modelNumber?(i='section[data-rexlive-section-id="'+e.sectionID+'"][data-rexlive-model-number="'+e.modelNumber+'"]',a='div [data-rexbuilder-block-id="'+e.rexID+'"] .responsive-block-overlay',-1!==(i=Rexbuilder_Util.$rexContainer.find(i).find(a)).css("background").indexOf("linear-gradient")&&i.css("background",""),i.css("background-color",t)):(i=Rexbuilder_Util.$rexContainer.find('section[data-rexlive-section-id="'+e.sectionID+'"]').find('div [data-rexbuilder-block-id="'+e.rexID+'"] .responsive-block-overlay'),a=Rexbuilder_Util.$rexContainer.find('[data-rexbuilder-block-id="'+e.rexID+'"] .slider-overlay'),-1!==i.css("background").indexOf("linear-gradient")&&i.css("background",""),i.css("background-color",t),0===a.length?(e=Rexbuilder_Util.$rexContainer.find('[data-rexbuilder-block-id="'+e.rexID+'"] .rex-slider-element'),""!==t&&e.append('<div class="slider-overlay" style="background-color:'+t+'"></div>')):a.css("background-color",t)),"undefined"!=typeof Rexbuilder_Block_Editor&&Rexbuilder_Block_Editor.updateBlockOverlayColorToolLive(i,t)},_updateBlockOverlay=function(e){var t=e.color,i=e.active,e=e.$elem,a=e.children(".rexbuilder-block-data"),o=e.find(".responsive-block-overlay"),r=o[0],d=o.find(".slider-overlay");-1!==getComputedStyle(r).background.indexOf("linear-gradient")&&(r.style.background=""),r.style.backgroundColor=t,0===d.length?(r=e.find(".rex-slider-element"),""!==t&&r.append('<div class="slider-overlay" style="background-color:'+t+'"></div>')):d.css("background-color",t),a.attr("data-overlay_block_color",t),a.attr("data-overlay_block_color_active",i),"true"==i.toString()?o.addClass("rex-active-overlay"):o.removeClass("rex-active-overlay"),"undefined"!=typeof Rexbuilder_Block_Editor&&Rexbuilder_Block_Editor.updateBlockOverlayColorTool(e,t,i)},_updateBlockOverlayGradient=function(e){var t=e.color,i=e.active,a=e.$elem,o=a.children(".rexbuilder-block-data"),r=a.find(".responsive-block-overlay"),e=Rexbuilder_Util_Editor.getGradientSafeValue(e.color);r[0].style.background=e,o.attr("data-overlay_block_color",t),o.attr("data-overlay_block_color_active",i),"true"==i.toString()?r.addClass("rex-active-overlay"):r.removeClass("rex-active-overlay"),"undefined"!=typeof Rexbuilder_Block_Editor&&Rexbuilder_Block_Editor.updateBlockOverlayGradientTool(a,e)},_updateSectionBackgroundImage=function(e,t){_updateImageBG(e,t)},_updateSectionVisibility=function(e,t,i,a){t?("default"==Rexbuilder_Util.activeLayout&&(e.removeClass("removing_section"),Rexbuilder_Util.addSectionID(e.attr("data-rexlive-section-id"))),e.removeClass("rex-hide-section"),Rexbuilder_Util.playPluginsSection(e)):(Rexbuilder_Util.stopPluginsSection(e),"default"==Rexbuilder_Util.activeLayout&&(e.addClass("removing_section"),Rexbuilder_Util.removeSectionID(e.attr("data-rexlive-section-id"))),e.addClass("rex-hide-section")),void 0!==i&&null!=i&&Rexbuilder_Util.updatePageCustomizationsDomOrder(i),void 0!==a&&null!=a&&Rexbuilder_Util.updateDefaultLayoutState({pageData:a})},_updateModelVisibility=function(e){var t=e.$sectionToHide,i=e.$sectionToShow,a=e.layoutsOrder,e=e.defaultStateSections;_updateSectionVisibility(t,!1),_updateSectionVisibility(i,!0),void 0!==a&&null!=a&&Rexbuilder_Util.updatePageCustomizationsDomOrder(a),void 0!==e&&null!=e&&Rexbuilder_Util.updateDefaultLayoutState({pageData:e})},_updateSectionBecameModel=function(e){var t=e.$section,i=e.layoutsOrder,a=e.defaultStateSections;e.isModel?(t.addClass("rex-model-section"),t.addClass("rexlive-block-grid-editing"),t.attr("data-rexlive-model-editing","false"),0==t.find(".grid-stack-row").parent().children(".rexpansive-block-grid").length&&t.find(".grid-stack-row").parent().prepend('<div class="rexpansive-block-grid"></div>'),0==t.find(".rexpansive-block-section-toolbox").length&&t.find(".section-toolBox").parent().prepend('<div class="rexpansive-block-section-toolbox"></div>')):(t.removeClass("rex-model-section"),t.removeClass("rexlive-block-grid-editing"),t.attr("data-rexlive-model-editing","false"),t.find(".grid-stack-row").parent().children(".rexpansive-block-grid").remove(),t.find(".rexpansive-block-section-toolbox").remove()),t.attr("data-rexlive-model-id",e.modelID),t.attr("data-rexlive-model-name",e.modelName),t.attr("data-rexlive-model-number",e.modelNumber),t.attr("data-rexlive-section-id",e.sectionID),void 0!==i&&null!=i&&Rexbuilder_Util.updatePageCustomizationsDomOrder(i),void 0!==a&&null!=a&&Rexbuilder_Util.updateDefaultLayoutState({pageData:a})},updateLockEditModel=function(e,t){var i=e.parents(".rexpansive_section");t?(i.addClass("rexlive-block-grid-editing"),i.attr("data-rexlive-model-editing","false"),0==i.find(".grid-stack-row").parent().children(".rexpansive-block-grid").length&&i.find(".grid-stack-row").parent().prepend('<div class="rexpansive-block-grid"></div>'),0==i.find(".rexpansive-block-section-toolbox").length&&i.find(".section-toolBox").parent().prepend('<div class="rexpansive-block-section-toolbox"></div>'),e.removeClass("unlocked"),e.addClass("locked")):(e.addClass("unlocked"),e.removeClass("locked"),i.removeClass("rexlive-block-grid-editing"),i.attr("data-rexlive-model-editing","true"),i.find(".grid-stack-row").parent().children(".rexpansive-block-grid").remove(),i.find(".rexpansive-block-section-toolbox").remove())},_fixModelNumbers=function(){var e=[];if(Rexbuilder_Util.rexContainer)for(var t=[].slice.call(Rexbuilder_Util.rexContainer.querySelectorAll(".rexpansive_section:not(.removing_section)")),i=t.length,a=0;a<i;a++)if(Rexbuilder_Util.hasClass(t[a],"rex-model-section")){for(var o,r=t[a].getAttribute("data-rexlive-model-id"),d=!1,l=0;l<e.length;l++)e[l].id==r&&(e[l].number=e[l].number+1,t[a].setAttribute("data-rexlive-model-number",e[l].number),d=!0);d||(e.push(o={id:r,number:1}),t[a].setAttribute("data-rexlive-model-number",o.number))}},_updateSectionWidthData=function(e,t){e=e.children(".section-data");e.attr("data-section_width",t.sectionWidth),e.attr("data-dimension",t.widthType)},_updateSectionWidth=function(e,t){var i=t.section_width,a=t.dimension,o=t.galleryInstance;_updateSectionWidthData(e,{sectionWidth:i,widthType:a}),o.updateSectionWidthWrap(i),Rexbuilder_Util_Editor.updatingGridstack=!0,o.batchGridstack(),o.updateGridstackGridSizes(t.singleWidth,t.singleHeight),_updateBlocksLayout(t.blocksDisposition),o.commitGridstack(),Rexbuilder_Util_Editor.updatingGridstack=!1},_updateRowDistancesData=function(e,t){var i=e.parents(".rexpansive_section").children(".section-data");e.attr("data-separator",t.gutter),e.attr("data-row-separator-top",t.top),e.attr("data-row-separator-right",t.right),e.attr("data-row-separator-bottom",t.bottom),e.attr("data-row-separator-left",t.left),i.attr("data-block_distance",t.gutter),i.attr("data-row_separator_top",t.top),i.attr("data-row_separator_right",t.right),i.attr("data-row_separator_bottom",t.bottom),i.attr("data-row_separator_left",t.left)},_updateRowDistances=function(e,t){var i=t.rowDistances,e=e.find(".grid-stack-row"),a=t.galleryInstance;_updateRowDistancesData(e,i),a.updateRowDistances(i),Rexbuilder_Util_Editor.updatingGridstack=!0,a.batchGridstack(),a.updateGridstackGridSizes(t.singleWidth,t.singleHeight),_updateBlocksLayout(t.blocksDisposition),a.commitGridstack(),Rexbuilder_Util_Editor.updatingGridstack=!1},_updateSectionMarginsData=function(e,t){e=e[0];e.style.marginTop=t.top+"px",e.style.marginRight=t.right+"px",e.style.marginBottom=t.bottom+"px",e.style.marginLeft=t.left+"px"},_updateSectionMargins=function(e,t){_updateSectionMarginsData(e,t.marginsSection);e=t.galleryInstance;Rexbuilder_Util_Editor.updatingGridstack=!0,e.batchGridstack(),e.updateGridstackGridSizes(t.singleWidth,t.singleHeight),_updateBlocksLayout(t.blocksDisposition),e.commitGridstack(),Rexbuilder_Util_Editor.updatingGridstack=!1},_updateGridLayoutDomProperties=function(e,t){var i=e.parents(".rexpansive_section").children(".section-data");e.attr("data-layout",t),e.attr("data-full-height",!1),i.attr("data-layout",t),i.attr("data-full_height",!1)},_updateSectionLayout=function(e,t){_updateGridLayoutDomProperties(e,t.gridLayout);e=t.galleryInstance;Rexbuilder_Util_Editor.updatingGridstack=!0,e.settings.galleryLayout=t.gridLayout,e.batchGridstack(),e.updateFloatingElementsGridstack(),e.updateGridstackGridSizes(t.singleWidth,t.singleHeight),_updateBlocksLayout(t.blocksDisposition),e.commitGridstack(),e._updateElementsSizeViewers(),Rexbuilder_Section_Editor.updateSectionLayoutTool(e.$section,{layout:t.gridLayout}),Rexbuilder_Util_Editor.updatingGridstack=!1};function updateSectionFullHeight(e){e.galleryInstance.updateFullHeight("true"==e.fullHeight.toString())}function _updateBulkSection(e,t,i){for(var a,o=""!=e.modelNumber?Rexbuilder_Util.$rexContainer.find('section[data-rexlive-section-id="'+e.sectionID+'"][data-rexlive-model-number="'+e.modelNumber+'"]'):Rexbuilder_Util.$rexContainer.find('section[data-rexlive-section-id="'+e.sectionID+'"]'),r=i.length,d=0;d<r;d++)if("self"===i[d].name){a=i[d].props;break}var l,n=!1,s=!1,c=!1,u=!1,p=!1,_=!1,g=!1,m=o.find(".perfect-grid-gallery").data().plugin_perfectGridGalleryEditor;for(l in t)if(t[l])switch(l){case"section_name":_updateSectionName(o,a.section_name);break;case"section_nav_label":_updateSectionNavLabel(o,a.section_nav_label);break;case"color_bg_section":case"color_bg_section_active":n||(updateSectionBackgroundColor(o,{color:a.color_bg_section,active:a.color_bg_section_active}),n=!0);break;case"image_bg_section_active":case"image_bg_section":case"image_width":case"image_height":case"id_image_bg_section":case"image_size":s||(_updateSectionBackgroundImage(o,{width:a.image_width,height:a.image_height,image_size:a.image_size,idImage:a.id_image_bg_section,urlImage:a.image_bg_section,active:a.image_bg_section_active}),s=!0);break;case"video_bg_id_section":case"video_mp4_url":case"video_bg_width_section":case"video_bg_height_section":c||(_updateSectionVideoBackground(o,{typeVideo:"mp4",mp4Data:{linkMp4:a.video_mp4_url,idMp4:a.video_bg_id_section,width:a.video_bg_width_section,height:a.video_bg_height_section},youtubeUrl:"",vimeoUrl:""}),c=!0);break;case"video_bg_url_section":_updateSectionVideoBackground(o,{typeVideo:"youtube",mp4Data:{linkMp4:"",idMp4:"",width:"",height:""},youtubeUrl:a.video_bg_url_section,vimeoUrl:""});break;case"video_bg_url_vimeo_section":_updateSectionVideoBackground(o,{typeVideo:"vimeo",mp4Data:{linkMp4:"",idMp4:"",width:"",height:""},youtubeUrl:"",vimeoUrl:a.video_bg_url_vimeo_section});break;case"block_distance":case"row_separator_top":case"row_separator_bottom":case"row_separator_right":case"row_separator_left":u||(_updateRowDistances(o,{rowDistances:{gutter:a.block_distance,top:a.row_separator_top,right:a.row_separator_right,bottom:a.row_separator_bottom,left:a.row_separator_left},galleryInstance:m,singleWidth:m.properties.singleWidth,singleHeight:m.properties.singleHeight,blocksDisposition:$.extend(!0,{},m.createActionDataMoveBlocksGrid())}),u=!0);break;case"margin":case"row_margin_top":case"row_margin_bottom":case"row_margin_right":case"row_margin_left":p||(_updateSectionMargins(o,{marginsSection:{top:a.row_margin_top,bottom:a.row_margin_bottom,right:a.row_margin_right,left:a.row_margin_left},galleryInstance:m,singleWidth:m.properties.singleWidth,singleHeight:m.properties.singleHeight,blocksDisposition:$.extend(!0,{},m.createActionDataMoveBlocksGrid())}),p=!0);break;case"custom_classes":var b=a.custom_classes.trim().split(/\s+/);_updateCustomClasses(o,b),g=!0;break;case"row_overlay_color":case"row_overlay_active":_||(updateSectionOverlay(o,{color:a.row_overlay_color,active:a.row_overlay_active}),_=!0)}g&&"default"!==Rexbuilder_Util.activeLayout&&Rexbuilder_Util.globalViewport.width<768&&-1!==a.custom_classes.indexOf("rex-block-grid")&&o.find(".collapse-grid").trigger("click")}function updateBulkBlock(e,t,i){for(var a,o,r=(""!=e.modelNumber?Rexbuilder_Util.$rexContainer.find('section[data-rexlive-section-id="'+e.sectionID+'"][data-rexlive-model-number="'+e.modelNumber+'"]'):Rexbuilder_Util.$rexContainer.find('section[data-rexlive-section-id="'+e.sectionID+'"]')).find('div [data-rexbuilder-block-id="'+e.rexID+'"]'),d=r.get(0),l=d.querySelector(".rexbuilder-block-data"),n=r.parents(".rexpansive_section"),s=n.children(".section-data"),c=n.find(".grid-stack-row").data("plugin_perfectGridGalleryEditor"),u=i.length,p=0;p<u;p++)if(e.rexID===i[p].name){a=i[p].props;break}for(p=0;p<u;p++)if("self"===i[p].name){o=i[p].props;break}var n=parseInt(a.gs_width),g=parseInt(a.gs_height),m=parseInt(a.gs_x),b=parseInt(a.gs_y);if(Rexbuilder_Util.isMobile()&&"fixed"===o.layout)g=Math.floor(a.gs_height*c.properties.singleWidth/5),b=Math.floor(a.gs_y*c.properties.singleWidth/5);else if(o.layout!==s.attr("data-layout"))switch(s.attr("data-layout")){case"fixed":g=Math.floor(5*a.gs_height/c.properties.singleWidth),b=Math.floor(5*a.gs_y/c.properties.singleWidth);break;case"masonry":g=Math.floor(a.gs_height*c.properties.singleWidth/5),b=Math.floor(a.gs_y*c.properties.singleWidth/5)}l.setAttribute("data-gs_width",n),l.setAttribute("data-gs_height",g),l.setAttribute("data-gs_start_h",g),l.setAttribute("data-gs_x",m),l.setAttribute("data-gs_y",b),l.setAttribute("data-element_real_fluid",a.element_real_fluid),c.properties.gridstackInstance.update(d,m,b,n,g);var v,k=!1,x=!1,h=!1,f=!1;for(v in t)if(t[v])switch(v){case"color_bg_block":case"color_bg_block_active":k||(_updateBlockBackgroundColor({$elem:r,color:a.color_bg_block,active:a.color_bg_block_active}),k=!0);break;case"image_bg_url":case"image_width":case"image_height":case"id_image_bg":case"image_size":case"image_bg_elem_active":case"type_bg_image":x||(_updateImageBG(r.find(".grid-item-content"),{width:a.image_width,height:a.image_height,sizeImage:a.image_size,idImage:a.id_image_bg,urlImage:a.image_bg_url,active:a.image_bg_elem_active,typeBGimage:a.type_bg_image}),x=!0);break;case"video_bg_id":case"video_bg_width":case"video_bg_height":case"video_mp4_url":case"video_bg_url_youtube":case"video_bg_url_vimeo":case"video_has_audio":if(!f){var y=null;if(""!==a.video_mp4_url?y="mp4":""!==a.video_bg_url_youtube?y="youtube":""!==a.video_bg_url_vimeo&&(y="vimeo"),y){var B={typeVideo:y,mp4Data:{linkMp4:"",idMp4:"",width:"",height:""},youtubeUrl:"",vimeoUrl:"",audio:"true"===a.video_has_audio};switch(y){case"mp4":B=_.assign(B,{mp4Data:{linkMp4:a.video_mp4_url,idMp4:a.video_bg_id,width:a.video_bg_width,height:a.video_bg_height}});break;case"youtube":B=_.assign(B,{youtubeUrl:a.video_bg_url_youtube});break;case"vimeo":B=_.assign(B,{vimeoUrl:a.video_bg_url_vimeo})}_updateVideos(r.find(".grid-item-content"),B),f=!0}}break;case"photoswipe":_updateBlockPhotoswipe({$elem:r,photoswipe:a.photoswipe});break;case"block_custom_class":y=a.block_custom_class.trim().split(/\s+/);_updateCustomClasses(r,y);break;case"block_padding":var S=-1!==a.block_padding.indexOf("px")?"px":-1!==a.block_padding.indexOf("%")?"%":"",w=a.block_padding.replace(/px|%/g,"").split(";");_updateBlockPaddings(r,{top:w[0],right:w[1],bottom:w[2],left:w[3],type:S});break;case"overlay_block_color":case"overlay_block_color_active":h||(_updateBlockOverlay({$elem:r,color:a.overlay_block_color,active:a.overlay_block_color_active}),h=!0);break;case"linkurl":_updateBlockUrl(r,a.linkurl);break;case"block_flex_position":var C=a.block_flex_position.split(" ");_updateFlexPostition(r,{x:C[0],y:C[1]});break;case"block_flex_img_position":C=a.block_flex_img_position.split(" ");_updateImageFlexPostition(r,{x:C[0],y:C[1]})}}function htmlToElement(e){var t=document.createElement("template");return e=e.trim(),t.innerHTML=e,t.content.firstChild}var _updateRexButton=function(e){Rexbuilder_Rexbutton.updateButton(e)},_performAction=function(e,t){t?(i=e.performActionData,Rexbuilder_Util_Editor.undoActive=!1,Rexbuilder_Util_Editor.redoActive=!0):(i=e.reverseActionData,Rexbuilder_Util_Editor.redoActive=!1,Rexbuilder_Util_Editor.undoActive=!0);var i,a,o,r=(a=""!=e.modelNumber?Rexbuilder_Util.$rexContainer.find('section[data-rexlive-section-id="'+e.sectionID+'"][data-rexlive-model-number="'+e.modelNumber+'"]'):Rexbuilder_Util.$rexContainer.find('section[data-rexlive-section-id="'+e.sectionID+'"]')).find(".grid-stack-row");switch(void 0!==r.data()&&(o=r.data().plugin_perfectGridGalleryEditor),e.actionName){case"updateSectionLayout":_updateSectionLayout(r,i);break;case"updateSectionFullHeight":updateSectionFullHeight(i);break;case"updateSectionBlocksDisposition":void 0!==o&&(_updateBlocksLayout(i),setTimeout(o._updateElementsSizeViewers(),200));break;case"updateBlockVisibility":void 0!==o&&updateRemovingBlock(i.targetElement,i.hasToBeRemoved,i.galleryInstance);break;case"updateSlider":_updateSlider(i);break;case"updateSectionName":_updateSectionName(a,i.sectionName);break;case"updateSectionPhotoswipe":_updateSectionPhotoswipe(i.elements);break;case"collapseSection":_collapseGrid(i.gridInstance,i.collapse,i.blockDisposition,i.gridLayout);break;case"updateCustomClasses":_updateCustomClasses(i.$target,i.classes);break;case"updateCustomCSS":_updateCustomCSS(i.css);break;case"updateSectionBackgroundColor":updateSectionBackgroundColor(a,i);break;case"updateSectionOverlay":updateSectionOverlay(a,i);break;case"updateSectionImageBG":_updateImageBG(a,i);break;case"updateSectionVideoBG":Rexbuilder_Dom_Util.updateVideos(a,i);break;case"updateBlockBackgroundColor":_updateBlockBackgroundColor(i);break;case"updateBlockBackgroundGradient":_updateBlockBackgroundGradient(i);break;case"updateBlockOverlayGradient":_updateBlockOverlayGradient(i);break;case"updateBlockOverlay":_updateBlockOverlay(i);break;case"updateBlockImageBG":Rexbuilder_Util_Editor.updatingImageBg=!0,_updateImageBG(i.$itemContent,i.imageOpt),void 0!==o&&"masonry"==o.settings.galleryLayout&&o.updateElementHeight(i.$itemContent.parents(".grid-stack-item").get(0)),Rexbuilder_Util_Editor.updatingImageBg=!1;break;case"updateBlockPhotoswipe":_updateBlockPhotoswipe(i);break;case"updateBlockPadding":Rexbuilder_Util_Editor.updatingPaddingBlock=!0,_updateBlockPaddings(i.$elem,i.dataPadding),void 0!==o&&"masonry"==o.settings.galleryLayout&&o.updateElementHeight(i.$elem[0],!0),Rexbuilder_Util_Editor.updatingPaddingBlock=!1;break;case"updateBlockVideoBG":Rexbuilder_Dom_Util.updateVideos(i.$itemContent,i.videoOpt);break;case"updateBlockFlexPosition":_updateFlexPostition(i.$elem,i.dataPosition);break;case"updateBlockImageFlexPosition":_updateImageFlexPostition(i.$elem,i.dataPosition);break;case"updateBlockUrl":_updateBlockUrl(i.$elem,i.url);break;case"updateSectionVisibility":_updateSectionVisibility(a,i.show,i.layoutsOrder,i.stateDefault);break;case"updateSectionModel":_updateModelVisibility(i);break;case"sectionBecameModel":_updateSectionBecameModel(i);break;case"updateSectionOrder":_fixSectionDomOrder(i.sectionOrder,!1,i.sectionMoved);break;case"updateLockButton":updateLockEditModel(i.$button,i.lock);break;case"updateSectionWidth":_updateSectionWidth(a,i);break;case"updateGridDistances":_updateRowDistances(a,i);break;case"updateSectionMargins":_updateSectionMargins(a,i);break;case"updateRexButton":_updateRexButton(i)}Rexbuilder_Util_Editor.undoActive=!1,Rexbuilder_Util_Editor.redoActive=!1};function _setBackgroundColor(e,t){-1!==e.css("background").indexOf("linear-gradient")&&e.css("background",""),e.css("background-color",t)}function _insertBlockVideoToDOM(e,t){var i=e.find(".rex-image-wrapper"),a=e.find(".rexlive-block-drag-handle"),o=0!==i.length,r=0!==a.length;o?i.after(t):r?a.after(t):e.prepend(t)}function _moveImageBeforeVideo(e){var t=e.find(".rex-image-wrapper"),e=e.find(".rex-youtube-wrap, .rex-video-vimeo-wrap, .rex-video-wrap");t.insertBefore(e)}var init=function(){this.lastSliderNumber=0};return{init:init,updateRow:_updateRow,updateSectionMargins:_updateSectionMargins,updateSectionMarginsData:_updateSectionMarginsData,updateImageBG:_updateImageBG,updateBlockPhotoswipe:_updateBlockPhotoswipe,performAction:_performAction,addYoutubeVideo:_addYoutubeVideo,removeYoutubeVideo:_removeYoutubeVideo,addVimeoVideo:_addVimeoVideo,removeVimeoVideo:_removeVimeoVideo,addMp4Video:_addMp4Video,removeMp4Video:_removeMp4Video,updateSlider:_updateSlider,updateSliderStack:_updateSliderStack,updateSectionName:_updateSectionName,updateSectionNavLabel:_updateSectionNavLabel,enablePhotoswipeAllBlocksSection:_enablePhotoswipeAllBlocksSection,removePhotoswipeAllBlocksSection:_removePhotoswipeAllBlocksSection,updateCustomClasses:_updateCustomClasses,collapseGrid:_collapseGrid,updateCustomCSS:_updateCustomCSS,updateSectionVideoBackground:_updateSectionVideoBackground,updateSectionBackgroundImage:_updateSectionBackgroundImage,updateSectionBackgroundColor:updateSectionBackgroundColor,updateSectionBackgroundColorLive:_updateSectionBackgroundColorLive,updateSectionBackgroundGradient:_updateSectionBackgroundGradient,updateSectionOverlay:updateSectionOverlay,updateSectionOverlayColorLive:updateSectionOverlayColorLive,updateSectionOverlayGradient:_updateSectionOverlayGradient,updateBlockBackgroundColor:_updateBlockBackgroundColor,updateBlockBackgroundColorLive:_updateBlockBackgroundColorLive,updateBlockBackgroundGradient:_updateBlockBackgroundGradient,updateBlockOverlayColorLive:_updateBlockOverlayColorLive,updateBlockOverlay:_updateBlockOverlay,updateBlockOverlayGradient:_updateBlockOverlayGradient,updateVideos:_updateVideos,updateBlockPaddings:_updateBlockPaddings,updateFlexPostition:_updateFlexPostition,updateImageFlexPostition:_updateImageFlexPostition,updateBlockUrl:_updateBlockUrl,updateSectionVisibility:_updateSectionVisibility,fixSectionDomOrder:_fixSectionDomOrder,updateSectionBecameModel:_updateSectionBecameModel,updateLockEditModel:updateLockEditModel,fixModelNumbers:_fixModelNumbers,updateSectionWidthData:_updateSectionWidthData,updateSectionWidth:_updateSectionWidth,updateRowDistancesData:_updateRowDistancesData,updateGridLayoutDomProperties:_updateGridLayoutDomProperties,htmlToElement:htmlToElement,updateBulkSection:_updateBulkSection,updateBulkBlock:updateBulkBlock,updateRemovingBlock:updateRemovingBlock,updateSectionFullHeight:updateSectionFullHeight}}(jQuery);
/**
 Values to insert on "wp_options" to work with rexbuttons
 Data are in form
 "option_name"
 "option_value"


_rex_buttons_ids

[\"9UEc\"]


_rex_buttons_styles

[{\"rexID\":\"9UEc\",\"buttonName\":\"Rex Funny v23\",\"rules\":{\"element\":{\"text_color\":\"rgb(111, 115, 181)\",\"font_size\":\"px\",\"background_color\":\"rgb(0, 238, 255)\",\"button_height\":\"px\",\"button_width\":\"\",\"border_color\":\"rgb(165, 0, 255)\",\"border_width\":\"px\",\"border_radius\":\"px\",\"margin_top\":\"px\",\"margin_bottom\":\"px\",\"margin_right\":\"px\",\"margin_left\":\"px\",\"padding_top\":\"px\",\"padding_bottom\":\"px\",\"padding_right\":\"px\",\"padding_left\":\"px\"},\"hover\":{\"background_color\":\"rgb(165, 0, 146)\",\"text_color\":\"rgb(0, 60, 255)\",\"border_color\":\"rgb(0, 255, 15)\"}}}]


_rex_button_9UEc_css

.rex-button-wrapper[data-rex-button-id=\"9UEc\"] .rex-button-container{font-size: 12px;color: rgb(111, 115, 181);min-height: 70px;min-width: 100px;margin-top: 20px;margin-right: 20px;margin-bottom: 20px;margin-left: 20px;}.rex-button-wrapper[data-rex-button-id=\"9UEc\"] .rex-button-text{padding-top: 20px;padding-right: 20px;padding-bottom: 20px;padding-left: 20px;}.rex-button-wrapper[data-rex-button-id=\"9UEc\"] .rex-button-background{background-color: rgb(0, 238, 255);border-color: rgb(165, 0, 255);border-width: 5px;border-radius: 10px;border-style: solid;}.rex-button-wrapper[data-rex-button-id=\"9UEc\"] .rex-button-background:hover{background-color: rgb(165, 0, 146);border-color: rgb(0, 255, 15);}.rex-button-wrapper[data-rex-button-id=\"9UEc\"] .rex-button-container:hover{color: rgb(0, 60, 255);}

_rex_button_9UEc_html

<span class=\"rex-button-wrapper\" data-rex-button-id=\"9UEc\"><span class=\"rex-button-data\" style=\"display:none;\" data-text-color=\"rgb(111, 115, 181)\" data-text-size=\"px\" data-background-color=\"rgb(0, 238, 255)\" data-background-color-hover=\"rgb(165, 0, 146)\" data-border-color-hover=\"rgb(0, 255, 15)\" data-text-color-hover=\"rgb(0, 60, 255)\" data-border-width=\"px\" data-border-color=\"rgb(165, 0, 255)\" data-border-radius=\"px\" data-button-height=\"px\" data-button-width=\"\" data-margin-top=\"px\" data-margin-bottom=\"px\" data-margin-left=\"px\" data-margin-right=\"px\" data-padding-left=\"px\" data-padding-right=\"px\" data-padding-top=\"px\" data-padding-bottom=\"px\" data-link-target=\"#\" data-link-type=\"_blank\" data-button-name=\"Rex Funny v23\"></span><a href=\"#\" class=\"rex-button-container\" target=\"_blank\"><span class=\"rex-button-background\"><span class=\"rex-button-text\">Learn More</span></span></a></span>


 */
var Rexbuilder_Rexbutton=function(b){var n,i,s;function a(t,e,r){for(var o=0;o<n.cssRules.length;o++)if(n.cssRules[o].selectorText=='.rex-button-wrapper[data-rex-button-id="'+t+'"] .rex-button-container'||n.cssRules[o].selectorText=="[data-rex-button-id='"+t+"'].rex-button-wrapper .rex-button-container"){switch(e){case"font-size":n.cssRules[o].style.fontSize=r;break;case"color":n.cssRules[o].style.color=r;break;case"min-height":n.cssRules[o].style.minHeight=r;break;case"min-width":n.cssRules[o].style.minWidth=r;break;case"margin-top":n.cssRules[o].style.marginTop=r;break;case"margin-bottom":n.cssRules[o].style.marginBottom=r;break;case"margin-left":n.cssRules[o].style.marginLeft=r;break;case"margin-right":n.cssRules[o].style.marginRight=r}break}}function d(t,e,r){for(var o=0;o<n.cssRules.length;o++)if(n.cssRules[o].selectorText=='.rex-button-wrapper[data-rex-button-id="'+t+'"] .rex-button-background'||n.cssRules[o].selectorText=="[data-rex-button-id='"+t+"'].rex-button-wrapper .rex-button-background"){switch(e){case"border-width":n.cssRules[o].style.borderWidth=r,n.cssRules[o].style.borderTopWidth=r,n.cssRules[o].style.borderLeftWidth=r,n.cssRules[o].style.borderRightWidth=r,n.cssRules[o].style.borderBottomWidth=r,n.cssRules[o].style.borderTop=r+" "+n.cssRules[o].style.borderTopStyle+" "+n.cssRules[o].style.borderTopColor,n.cssRules[o].style.borderLeft=r+" "+n.cssRules[o].style.borderLeftStyle+" "+n.cssRules[o].style.borderLeftColor,n.cssRules[o].style.borderRight=r+" "+n.cssRules[o].style.borderRightStyle+" "+n.cssRules[o].style.borderRightColor,n.cssRules[o].style.borderBottom=r+" "+n.cssRules[o].style.borderBottomStyle+" "+n.cssRules[o].style.borderBottomColor;break;case"border-color":n.cssRules[o].style.borderColor=r,n.cssRules[o].style.borderTopColor=r,n.cssRules[o].style.borderLeftColor=r,n.cssRules[o].style.borderRightColor=r,n.cssRules[o].style.borderBottomColor=r;break;case"border-style":n.cssRules[o].style.borderStyle=r,n.cssRules[o].style.borderTopStyle=r,n.cssRules[o].style.borderLeftStyle=r,n.cssRules[o].style.borderRightStyle=r,n.cssRules[o].style.borderBottomStyle=r,n.cssRules[o].style.borderTop=n.cssRules[o].style.borderTopWidth+" "+r+" "+n.cssRules[o].style.borderTopColor,n.cssRules[o].style.borderLeft=n.cssRules[o].style.borderLeftWidth+" "+r+" "+n.cssRules[o].style.borderLeftColor,n.cssRules[o].style.borderRight=n.cssRules[o].style.borderRightWidth+" "+r+" "+n.cssRules[o].style.borderRightColor,n.cssRules[o].style.borderBottom=n.cssRules[o].style.borderBottomWidth+" "+r+" "+n.cssRules[o].style.borderBottomColor;break;case"border-radius":n.cssRules[o].style.borderRadius=r,n.cssRules[o].style.borderTopLeftRadius=r,n.cssRules[o].style.borderTopRightRadius=r,n.cssRules[o].style.borderBottomLeftRadius=r,n.cssRules[o].style.borderBottomRightRadius=r,n.cssRules[o].style.webkitBorderRadius=r,n.cssRules[o].style.webkitBorderTopLeftRadius=r,n.cssRules[o].style.webkitBorderTopRightRadius=r,n.cssRules[o].style.webkitBorderBottomLeftRadius=r,n.cssRules[o].style.webkitBorderBottomRightRadius=r;break;case"background-color":n.cssRules[o].style.backgroundColor=r}break}}function l(t,e,r){for(var o=0;o<n.cssRules.length;o++)if(n.cssRules[o].selectorText=='.rex-button-wrapper[data-rex-button-id="'+t+'"] .rex-button-text'||n.cssRules[o].selectorText=="[data-rex-button-id='"+t+"'].rex-button-wrapper .rex-button-text")switch(e){case"padding-left":n.cssRules[o].style.paddingLeft=r;break;case"padding-right":n.cssRules[o].style.paddingRight=r;break;case"padding-top":n.cssRules[o].style.paddingTop=r;break;case"padding-bottom":n.cssRules[o].style.paddingBottom=r}}function u(t,e,r){for(var o=0;o<n.cssRules.length;o++)if(n.cssRules[o].selectorText=='.rex-button-wrapper[data-rex-button-id="'+t+'"] .rex-button-container:hover'||n.cssRules[o].selectorText=="[data-rex-button-id='"+t+"'].rex-button-wrapper .rex-button-container:hover"){"color"===e&&(n.cssRules[o].style.color=r);break}}function p(t,e,r){for(var o=0;o<n.cssRules.length;o++)if(n.cssRules[o].selectorText=='.rex-button-wrapper[data-rex-button-id="'+t+'"] .rex-button-background:hover'||n.cssRules[o].selectorText=="[data-rex-button-id='"+t+"'].rex-button-wrapper .rex-button-background:hover"){switch(e){case"background-color":n.cssRules[o].style.backgroundColor=r;break;case"border-color":n.cssRules[o].style.borderColor=r,n.cssRules[o].style.borderTopColor=r,n.cssRules[o].style.borderLeftColor=r,n.cssRules[o].style.borderRightColor=r,n.cssRules[o].style.borderBottomColor=r;break;case"border-style":n.cssRules[o].style.borderStyle=r,n.cssRules[o].style.borderTopStyle=r,n.cssRules[o].style.borderLeftStyle=r,n.cssRules[o].style.borderRightStyle=r,n.cssRules[o].style.borderBottomStyle=r,n.cssRules[o].style.borderTop=n.cssRules[o].style.borderTopWidth+" "+r+" "+n.cssRules[o].style.borderTopColor,n.cssRules[o].style.borderLeft=n.cssRules[o].style.borderLeftWidth+" "+r+" "+n.cssRules[o].style.borderLeftColor,n.cssRules[o].style.borderRight=n.cssRules[o].style.borderRightWidth+" "+r+" "+n.cssRules[o].style.borderRightColor,n.cssRules[o].style.borderBottom=n.cssRules[o].style.borderBottomWidth+" "+r+" "+n.cssRules[o].style.borderBottomColor}break}}var g=function(t){for(var e=t.attr("data-rex-button-id"),r=!1,o=0;o<i.length;o++)if(i[o].id==e){r=!0;break}r||c(t),_(),R(),h(t);t=t.parents(".text-wrap");Rexbuilder_Util_Editor.updateBlockContainerHeight(t),Rexbuilder_Util_Editor.builderEdited(!1)},c=function(t){var e;0!=t.find(".rex-button-data").eq(0).length&&(e=(t=o(t,!0)).buttonInfo.buttonTarget.button_id,r(e,t.buttonInfo))},r=function(t,e){var r,o,a="",a=(a=(a=(a=(a=(a=(a=(a+="color: "+e.text_color+";")+("font-size: "+(isNaN(parseInt(e.font_size.replace("px","")))?s:e).font_size+";"))+("min-height: "+(isNaN(parseInt(e.button_height.replace("px","")))?s.dimensions.height:e.button_height)+";"))+("min-width: "+(isNaN(parseInt(e.button_width.replace("px","")))?s.dimensions.width:e.button_width)+";"))+("margin-top: "+(isNaN(parseInt(e.margin_top.replace("px","")))?s.margins.top:e.margin_top)+";"))+("margin-right: "+(isNaN(parseInt(e.margin_right.replace("px","")))?s.margins.right:e.margin_right)+";"))+("margin-bottom: "+(isNaN(parseInt(e.margin_bottom.replace("px","")))?s.margins.bottom:e.margin_bottom)+";"),r=isNaN(parseInt(e.margin_left.replace("px","")))?s.margins.left:e.margin_left,o=t,r=a+="margin-left: "+r+";","insertRule"in n?n.insertRule('.rex-button-wrapper[data-rex-button-id="'+o+'"] .rex-button-container{'+r+"}",n.cssRules.length):"addRule"in n&&n.addRule('.rex-button-wrapper[data-rex-button-id="'+o+'"] .rex-button-container{'+r+"}",n.cssRules.length),""),a=(a=(a=(a=a+("border-color: "+e.border_color+";")+"border-style: solid;")+("border-width: "+(isNaN(parseInt(e.border_width.replace("px","")))?s.border.width:e.border_width)+";"))+("border-radius: "+(isNaN(parseInt(e.border_radius.replace("px","")))?s.border.radius:e.border_radius)+";")+("background-color: "+e.background_color+";"),o=t,r=a,"insertRule"in n?n.insertRule('.rex-button-wrapper[data-rex-button-id="'+o+'"] .rex-button-background{'+r+"}",n.cssRules.length):"addRule"in n&&n.addRule('.rex-button-wrapper[data-rex-button-id="'+o+'"] .rex-button-background{'+r+"}",n.cssRules.length),""),a=(a=(a+="padding-top: "+(isNaN(parseInt(e.padding_top.replace("px","")))?s.paddings.top:e.padding_top)+";")+("padding-right: "+(isNaN(parseInt(e.padding_right.replace("px","")))?s.paddings.right:e.padding_right)+";"))+("padding-bottom: "+(isNaN(parseInt(e.padding_bottom.replace("px","")))?s.paddings.bottom:e.padding_bottom)+";"),a=(o=isNaN(parseInt(e.padding_left.replace("px","")))?s.paddings.left:e.padding_left,r=t,o=a+="padding-left: "+o+";","insertRule"in n?n.insertRule('.rex-button-wrapper[data-rex-button-id="'+r+'"] .rex-button-text{'+o+"}",n.cssRules.length):"addRule"in n&&n.addRule('.rex-button-wrapper[data-rex-button-id="'+r+'"] .rex-button-text{'+o+"}",n.cssRules.length),""),a=(a=(a+="background-color: "+e.hover_color+";")+("border-color: "+e.hover_border+";"),r=t,o=a,"insertRule"in n?n.insertRule('.rex-button-wrapper[data-rex-button-id="'+r+'"] .rex-button-background:hover{'+o+"}",n.cssRules.length):"addRule"in n&&n.addRule('.rex-button-wrapper[data-rex-button-id="'+r+'"] .rex-button-background:hover{'+o+"}",n.cssRules.length),"");a+="color: "+e.hover_text+";",r=t,o=a,"insertRule"in n?n.insertRule('.rex-button-wrapper[data-rex-button-id="'+r+'"] .rex-button-container:hover{'+o+"}",n.cssRules.length):"addRule"in n&&n.addRule('.rex-button-wrapper[data-rex-button-id="'+r+'"] .rex-button-container:hover{'+o+"}",n.cssRules.length)};function x(t){let e={id:t.buttonTarget.button_id,target:t.link_type,number:t.buttonTarget.button_number,href:t.link_target,separate:t.separate,label:t.text,popupVideo:!1,class:t.classes};t.separate&&(e={...e,size:t.font_size,color:t.text_color,hoverColor:t.hover_text,backgroundColor:t.background_color,hoverBackgroundColor:t.hover_color,borderColor:t.border_color,hoverBorderColor:t.hover_border,borderWidth:t.border_width,borderRadius:t.border_radius,width:t.button_width,height:t.button_height,marginTop:t.margin_top,marginRight:t.margin_right,marginBottom:t.margin_bottom,marginLeft:t.margin_left,paddingTop:t.padding_top,paddingRight:t.padding_right,paddingBottom:t.padding_bottom,paddingLeft:t.padding_left,name:t.buttonTarget.button_name}),CKEditor_Handler.handleEvent({name:"rexlive:ckeditor:setAttributesRexbutton",data:e,editable:null})}var h=function(t){t=t.find(".rex-button-data").eq(0);t.removeAttr("data-text-color"),t.removeAttr("data-text-size"),t.removeAttr("data-background-color"),t.removeAttr("data-background-color-hover"),t.removeAttr("data-border-color-hover"),t.removeAttr("data-text-color-hover"),t.removeAttr("data-border-width"),t.removeAttr("data-border-color"),t.removeAttr("data-border-radius"),t.removeAttr("data-button-height"),t.removeAttr("data-button-width"),t.removeAttr("data-margin-top"),t.removeAttr("data-margin-bottom"),t.removeAttr("data-margin-left"),t.removeAttr("data-margin-right"),t.removeAttr("data-padding-top"),t.removeAttr("data-padding-bottom"),t.removeAttr("data-padding-left"),t.removeAttr("data-padding-right"),t.removeAttr("data-button-name")},o=function(t,e){e=void 0!==e&&"true"==e.toString();var r={text_color:"",text:"",font_size:"",background_color:"",button_height:"",button_width:"",hover_color:"",hover_border:"",hover_text:"",border_color:"",border_width:"",border_radius:"",margin_top:"",margin_bottom:"",margin_right:"",margin_left:"",padding_top:"",padding_bottom:"",padding_right:"",padding_left:"",link_target:"",link_type:"",classes:"",buttonTarget:{button_name:"",button_id:"",button_number:""}},o=t.find(".rex-button-data").eq(0),a=(r.buttonTarget.button_id=t.attr("data-rex-button-id"),r.buttonTarget.button_number=parseInt(t.attr("data-rex-button-number")),o[0]),n=!1;return t.hasClass("rex-separate-button")||e?(r.font_size=a.getAttribute("data-text-size")?a.getAttribute("data-text-size").toString():"",r.text_color=a.getAttribute("data-text-color")?a.getAttribute("data-text-color").toString():"",r.button_height=a.getAttribute("data-button-height")?a.getAttribute("data-button-height").toString():"",r.button_width=a.getAttribute("data-button-width")?a.getAttribute("data-button-width").toString():"",r.margin_top=a.getAttribute("data-margin-top")?a.getAttribute("data-margin-top").toString():"",r.margin_bottom=a.getAttribute("data-margin-bottom")?a.getAttribute("data-margin-bottom").toString():"",r.margin_right=a.getAttribute("data-margin-right")?a.getAttribute("data-margin-right").toString():"",r.margin_left=a.getAttribute("data-margin-left")?a.getAttribute("data-margin-left").toString():"",r.border_color=a.getAttribute("data-border-color")?a.getAttribute("data-border-color").toString():"",r.border_width=a.getAttribute("data-border-width")?a.getAttribute("data-border-width").toString():"",r.border_radius=a.getAttribute("data-border-radius")?a.getAttribute("data-border-radius").toString():"",r.background_color=a.getAttribute("data-background-color")?a.getAttribute("data-background-color").toString():"",r.padding_top=a.getAttribute("data-padding-top")?a.getAttribute("data-padding-top").toString():"",r.padding_bottom=a.getAttribute("data-padding-bottom")?a.getAttribute("data-padding-bottom").toString():"",r.padding_right=a.getAttribute("data-padding-right")?a.getAttribute("data-padding-right").toString():"",r.padding_left=a.getAttribute("data-padding-left")?a.getAttribute("data-padding-left").toString():"",r.hover_color=a.getAttribute("data-background-color-hover")?a.getAttribute("data-background-color-hover").toString():"",r.hover_border=a.getAttribute("data-border-color-hover")?a.getAttribute("data-border-color-hover").toString():"",r.hover_text=a.getAttribute("data-text-color-hover")?a.getAttribute("data-text-color-hover").toString():"",r.buttonTarget.button_name=a.getAttribute("data-button-name")?a.getAttribute("data-button-name").toString():"",n=!0):r.synchronize=void 0!==o.attr("data-synchronize")&&o.attr("data-synchronize").toString(),r.text=t.find(".rex-button-text").eq(0).text(),r.link_target=o.attr("data-link-target"),r.link_type=o.attr("data-link-type"),r.classes=t.find("a.rex-button-container").eq(0).attr("class").replace("rex-button-container","").replace(/\s/,""),{separateButton:n,buttonInfo:r}};function m(t){t=t||!1;var e=[];if(Rexbuilder_Util.rexContainer&&void 0!==Rexbuilder_Util.rexContainer){for(var r,o,a,n,i,s,d,l=Array.prototype.slice.call(Rexbuilder_Util.rexContainer.querySelectorAll(".rexpansive_section")),u=l.length,b=0,p=0,g=0;b<u;b++)if(r=l[b],t||!Rexbuilder_Util.hasClass(r,"removing_section"))for(n=(o=Array.prototype.slice.call(r.querySelectorAll(".perfect-grid-item"))).length,p=0;p<n;p++)if(a=o[p],t||!Rexbuilder_Util.hasClass(a,"removing_block"))for(d=(i=Array.prototype.slice.call(a.querySelectorAll(".rex-button-wrapper"))).length,g=0;g<d;g++)s=i[g],e.push(s.getAttribute("data-rex-button-id"));e=Rexbuilder_Util.removeArrayDuplicates(e)}return e}function _(){var t=m(!0),e={};if(t.forEach(function(t){e[t]={occurrencies:0}}),Rexbuilder_Util.rexContainer&&void 0!==Rexbuilder_Util.rexContainer)for(var r,o,a=Array.prototype.slice.call(Rexbuilder_Util.rexContainer.querySelectorAll(".rex-button-wrapper")),n=a.length,i=0;i<n;i++)o=(r=a[i]).getAttribute("data-rex-button-id"),e[o].occurrencies++,r.setAttribute("data-rex-button-number",e[o].occurrencies)}function R(){if(i=[],Rexbuilder_Util.rexContainer&&void 0!==Rexbuilder_Util.rexContainer)for(var t,e,r,o=Array.prototype.slice.call(Rexbuilder_Util.rexContainer.querySelectorAll(".rex-button-wrapper")),a=0;a<o.length;a++)e=(t=o[a]).getAttribute("data-rex-button-id"),r=parseInt(t.getAttribute("data-rex-button-number")),i.push({id:e,number:r}),Rexbuilder_Util.hasClass(t,"rex-separate-button")&&!function(t){for(var e=0;e<n.cssRules.length;e++)if(-1!==n.cssRules[e].selectorText.indexOf(t))return 1}(e)&&c(b(t)),i[a].number<r&&(i[a].number=r)}return{init:function(){var t,e;n=null,i=[],s={margins:{top:"20px",right:"20px",bottom:"20px",left:"20px"},paddings:{top:"20px",right:"20px",bottom:"20px",left:"20px"},dimensions:{height:"70px",width:"100px"},border:{width:"5px",radius:"10px"},font_size:"12px"},this.$buttonsStyle=b("#rexpansive-builder-rexbutton-style-inline-css"),0==Rexbuilder_Rexbutton.$buttonsStyle.length&&(t=document.head||document.getElementsByTagName("head")[0],(e=document.createElement("style")).type="text/css",e.id="rexpansive-builder-rexbutton-style-inline-css",e.dataset.rexName="buttons-style",e.styleSheet?e.styleSheet.cssText="":e.appendChild(document.createTextNode("")),t.appendChild(e));for(var r=0;r<document.styleSheets.length;r++)"rexpansive-builder-rexbutton-style-inline-css"==document.styleSheets[r].ownerNode.id&&(n=document.styleSheets[r]);_(),R(),Rexbuilder_Util.$document.on("rexlive:completeImportButton",function(t){var t=t.settings,e=t.$blockAdded,t=t.$buttonWrapper;t.detach().prependTo(e.find(".text-wrap").eq(0)),t.wrap('<p class="rex-buttons-paragraph"></p>'),g(t)})},getActiveStyleSheet:function(){return n},fixImportedButton:function(t){var e,r=Rexbuilder_Util.$rexContainer.find(".rex-loading-button .rex-button-wrapper"),o=(r.unwrap(),r.parents(".rex-buttons-paragraph").eq(0)),a=r.parents(".text-wrap").eq(0),n=r.parents(".grid-stack-row").eq(0),i=r.parents(".rexpansive_section").eq(0),s=jQuery.extend(!0,{},t.buttonDimensions),d=(n.find(".button-list__element__tools").remove(),r.find(".rex-button-data").eq(0)),l={top:parseInt(d.attr("data-margin-top").replace("px","")),bottom:parseInt(d.attr("data-margin-bottom").replace("px","")),left:parseInt(d.attr("data-margin-left").replace("px","")),right:parseInt(d.attr("data-margin-right").replace("px",""))},d=(l.top=isNaN(l.top)?0:l.top,l.bottom=isNaN(l.bottom)?0:l.bottom,l.left=isNaN(l.left)?0:l.left,l.right=isNaN(l.right)?0:l.right,{top:parseInt(d.attr("data-padding-top").replace("px","")),bottom:parseInt(d.attr("data-padding-bottom").replace("px","")),left:parseInt(d.attr("data-padding-left").replace("px","")),right:parseInt(d.attr("data-padding-right").replace("px",""))});switch(d.top=isNaN(d.top)?0:d.top,d.bottom=isNaN(d.bottom)?0:d.bottom,d.left=isNaN(d.left)?0:d.left,d.right=isNaN(d.right)?0:d.right,s.height=s.height+l.top+l.bottom+d.top+d.bottom,s.width=s.width+l.left+l.right+d.left+d.right,0==a.length?0!=n.length?"inside-row":"inside-new-row":0!=o.length?"inside-paragraph":"inside-block"){case"inside-block":r.wrap('<p class="rex-buttons-paragraph"></p>'),g(r);break;case"inside-paragraph":g(r),function(t){Rexbuilder_Util_Editor.isJQuery(t)||(t=b(t));return 0!==t.next("p").length}(o)||(u=o,Rexbuilder_Util_Editor.isJQuery(u)&&(u=u.get(0)),e=Rexbuilder_Live_Templates.getTemplate("empty-paragraph"),u.insertAdjacentHTML("afterend",e));break;case"inside-row":var u=jQuery.Event("rexlive:insert_new_text_block");u.settings={data_to_send:{$buttonWrapper:r,$section:i,addBlockButton:!0,mousePosition:t.mousePosition,blockDimensions:{w:s.width,h:s.height},sectionTarget:{sectionID:i.attr("data-rexlive-section-id"),modelNumber:void 0!==i.attr("data-rexlive-model-number")?i.attr("data-rexlive-model-number"):""}}},Rexbuilder_Util.$document.trigger(u)}},getButtonsInPage:function(){return i},updateButtonLive:function(t){switch(t.propertyType){case"text":l(t.buttonTarget.button_id,t.propertyName,t.newValue);break;case"container":a(t.buttonTarget.button_id,t.propertyName,t.newValue);break;case"background":d(t.buttonTarget.button_id,t.propertyName,t.newValue);break;case"backgroundHover":case"borderHover":p(t.buttonTarget.button_id,t.propertyName,t.newValue);break;case"textHover":u(t.buttonTarget.button_id,t.propertyName,t.newValue);break;case"button":var e=Rexbuilder_Util.$rexContainer.find('.rex-button-wrapper[data-rex-button-id="'+t.buttonTarget.button_id+'"][data-rex-button-number="'+t.buttonTarget.button_number+'"]');switch(t.propertyName){case"link_target":e.find("a.rex-button-container").eq(0).attr("href",t.newValue);break;case"link_type":e.find("a.rex-button-container").eq(0).attr("target",t.newValue);break;case"button_label":e.find(".rex-button-text").eq(0).text(t.newValue);break;case"button_class":e.find("a.rex-button-container").eq(0).attr("class","").addClass("rex-button-container").addClass(t.newValue);break;case"button_name":e.find(".rex-button-data").eq(0).attr("data-button-name",t.newValue)}}},lockSynchronize:function(t){var e=t.buttonTarget.button_id;Rexbuilder_Util.$rexContainer.find('.rex-button-wrapper[data-rex-button-id="'+e+'"][data-rex-button-number="'+t.buttonTarget.button_number+'"]').find(".rex-button-data").attr("data-synchronize",!0)},updateButton:function(t){var t=t.buttonProperties,e=t.buttonTarget.button_id,r=(isNaN(parseInt(t.font_size.replace("px","")))?s:t).font_size,r=(a(e,"font-size",r),a(e,"color",t.text_color),r=isNaN(parseInt(t.button_height.replace("px","")))?s.dimensions.height:t.button_height,a(e,"min-height",r),r=isNaN(parseInt(t.button_width.replace("px","")))?s.dimensions.width:t.button_width,a(e,"min-width",r),r=isNaN(parseInt(t.margin_top.replace("px","")))?s.margins.top:t.margin_top,a(e,"margin-top",r),r=isNaN(parseInt(t.margin_right.replace("px","")))?s.margins.right:t.margin_right,a(e,"margin-right",r),r=isNaN(parseInt(t.margin_bottom.replace("px","")))?s.margins.bottom:t.margin_bottom,a(e,"margin-bottom",r),r=isNaN(parseInt(t.margin_left.replace("px","")))?s.margins.left:t.margin_left,a(e,"margin-left",r),d(e,"border-color",t.border_color),r=isNaN(parseInt(t.border_width.replace("px","")))?s.border.width:t.border_width,d(e,"border-width",r),r=isNaN(parseInt(t.border_radius.replace("px","")))?s.border.radius:t.border_radius,d(e,"border-radius",r),d(e,"background-color",t.background_color),r=isNaN(parseInt(t.padding_top.replace("px","")))?s.paddings.top:t.padding_top,l(e,"padding-top",r),r=isNaN(parseInt(t.padding_right.replace("px","")))?s.paddings.right:t.padding_right,l(e,"padding-right",r),r=isNaN(parseInt(t.padding_bottom.replace("px","")))?s.paddings.bottom:t.padding_bottom,l(e,"padding-bottom",r),r=isNaN(parseInt(t.padding_left.replace("px","")))?s.paddings.left:t.padding_left,l(e,"padding-left",r),p(e,"background-color",t.hover_color),p(e,"border-color",t.hover_border),u(e,"color",t.hover_text),Rexbuilder_Util.$rexContainer.find('.rex-button-wrapper[data-rex-button-id="'+e+'"][data-rex-button-number="'+t.buttonTarget.button_number+'"]')),e=r.find(".rex-button-data").eq(0),o=r.find(".rex-button-container").eq(0);r.find(".rex-button-text").eq(0).text(t.text),r.find("a.rex-button-container").eq(0).attr("href",t.link_target),r.find("a.rex-button-container").eq(0).attr("target",t.link_type),e.attr("data-link-target",t.link_target),e.attr("data-link-type",t.link_type),t.separate=r.hasClass("rex-separate-button"),t.popup_video=o.hasClass("popup-video-button"),x(t)},removeSeparateButton:function(t){t=t.buttonTarget.button_id,t=Rexbuilder_Util.$rexContainer.find('.rex-button-wrapper[data-rex-button-id="'+t+'"]');t.removeClass("rex-separate-button"),h(t)},separateRexButton:function(t){var e=t.buttonData,t=t.newID,r=e.buttonTarget.button_id,o=Rexbuilder_Util.$rexContainer.find('.rex-button-wrapper[data-rex-button-id="'+r+'"][data-rex-button-number="'+e.buttonTarget.button_number+'"]');if(o.addClass("rex-separate-button"),o.attr("data-rex-button-id",t),o.attr("data-rex-button-number",1),i.push({id:t,number:1}),0==Rexbuilder_Util.$rexContainer.find('.rex-button-wrapper[data-rex-button-id="'+r+'"]').length){for(var a=0;a<i.length&&i[a].id!=r;a++);a!=i.length&&i.splice(a,1)}e.separate=!0,e.buttonTarget.button_id=t,e.buttonTarget.button_number=1,e.popup_video=!1,x(e),c(o)},generateButtonData:o,endFixingButtonImported:g,updateButtonListInPage:R,findIDsInPage:m,refreshNumbers:_,updateButtonContainerRule:a,updateButtonBackgroundRule:d,updateButtonBackgroundHoverRule:p,updateContainerHoverRule:u}}(jQuery);
var Rexbuilder_Rexelement=function(n){"use strict";var i=[],_={background_color:"rgb(0, 0, 0, 0)",border_color:"rgb(0, 0, 0, 1)",border_width:"2px",margin_top:"5px",margin_left:"5px",margin_right:"5px",margin_bottom:"5px",error_message_color:"rgb(0, 0, 0, 1)",error_message_font_size:"15px",send_message_color:"rgb(0, 0, 0, 1)",send_message_font_size:"15px",columns:{padding_top:"15px",padding_left:"15px",padding_right:"15px",padding_bottom:"15px"},content:{background_color:"rgb(255, 255, 255, 1)",background_color_hover:"rgb(255, 255, 255, 1)",text_color:"rgb(0, 0, 0, 1)",text_color_hover:"rgb(0, 0, 0, 1)",border_color:"rgb(0, 0, 0, 1)",border_color_hover:"rgb(0, 0, 0, 1)",width:"200px",height:"50px",font_size:"15px",border_width:"1px",border_radius:"0px"},options_different:{width:!0,height:!0,font_size:!0,text_color:!0}};function r(e){0!==e.find(".wpcf7-form").length&&(Rexbuilder_Rexwpcf7.refreshFormStyle(e.find(".wpcf7-form"),!0),e.find(".wpcf7-column").each(function(e,t){Rexbuilder_Rexwpcf7.refreshColumnContentStyle(n(t))}))}return{init:function(){var o;Rexbuilder_Util.$document.find("form").get().filter(function(e){return 0===n(e).parents(".rex-element-wrapper").length}).forEach(function(e){Rexbuilder_Util.addClass(e,"no-builder-form")}),Rexbuilder_Util.$rexContainer.find(".rex-element-wrapper").each(function(e,t){var t=n(t),r=t.attr("data-rex-element-id"),t=parseInt(t.attr("data-rex-element-number"));for(o=0;o<i.length;o++)if(i[o].id==r){0;break}!1||i.push({id:parseInt(r),number:t}),i[o].number<t&&(i[o].number=t)})},addStyles:function(){Rexbuilder_Util.$rexContainer.find(".rex-element-wrapper").each(function(e,t){t=n(t);!t.hasClass("rex-separate-element")&&0!==e&&i[e].id==i[e-1].id||r(t)})},addElementStyle:r,generateElementData:function(e){var t,r,o,n,i=e.get(0),c={},d=i.querySelector(".rex-element-data").dataset,i={element_id:e.attr("data-rex-element-id"),element_number:parseInt(e.attr("data-rex-element-number")),is_separated:Rexbuilder_Util.hasClass(i,"rex-separate-form"),form_title:i.querySelector(".string-shortcode").getAttribute("shortcode").match(/title\=\"(.*)\"/)[1]},e=e.find(".wpcf7-form"),e={background_color:d.wpcf7BackgroundColor||e.css("background-color"),border_color:d.wpcf7BorderColor||e.css("border-color"),border_width:d.wpcf7BorderWidth||e.css("border-width"),margin_top:d.wpcf7MarginTop||e.css("margin-top"),margin_left:d.wpcf7MarginLeft||e.css("margin-left"),margin_right:d.wpcf7MarginRight||e.css("margin-right"),margin_bottom:d.wpcf7MarginBottom||e.css("margin-bottom"),error_message_color:d.wpcf7ErrorMessageColor||_.error_message_color,error_message_font_size:d.wpcf7ErrorMessageFontSize||_.error_message_font_size,send_message_color:d.wpcf7SendMessageColor||_.send_message_color,send_message_font_size:d.wpcf7SendMessageFontSize||_.send_message_font_size},a={width:d.wpcf7ContentWidth||_.content.width,height:d.wpcf7ContentHeight||_.content.height,font_size:d.wpcf7ContentFontSize||_.content.font_size,border_width:d.wpcf7ContentBorderWidth||_.content.border_width,border_radius:d.wpcf7ContentBorderRadius||_.content.border_radius,text_color:d.wpcf7ContentTextColor||_.content.text_color,background_color:d.wpcf7ContentBackgroundColor||_.content.background_color,border_color:d.wpcf7ContentBorderColor||_.content.border_color,text_color_hover:d.wpcf7ContentTextColorHover||_.content.text_color_hover,background_color_hover:d.wpcf7ContentBackgroundColorHover||_.content.background_color_hover,border_color_hover:d.wpcf7ContentBorderColorHover||_.content.border_color_hover},l={padding_top:d.wpcf7ColumnsPaddingTop||_.columns.padding_top,padding_left:d.wpcf7ColumnsPaddingLeft||_.columns.padding_left,padding_right:d.wpcf7ColumnsPaddingRight||_.columns.padding_right,padding_bottom:d.wpcf7ColumnsPaddingBottom||_.columns.padding_bottom};function s(e,t,r){return e===r[0]}return e.content=a,e.columns=l,e.options_different=(a=i.element_id,a=Rexbuilder_Util.rexContainer.querySelector('.rex-element-wrapper[data-rex-element-id="'+a+'"]'),l=a.querySelector(".rex-element-data"),a=Array.prototype.slice.call(a.querySelectorAll(".rex-wpcf7-column-content-data")),t=new Array(l.getAttribute("data-wpcf7-content-width")),r=new Array(l.getAttribute("data-wpcf7-content-height")),o=new Array(l.getAttribute("data-wpcf7-content-text-color")),n=new Array(l.getAttribute("data-wpcf7-content-font-size")),a.forEach(function(e){t.push(e.getAttribute("data-wpcf7-input-width")),r.push(e.getAttribute("data-wpcf7-input-height")),o.push(e.getAttribute("data-text-color")),n.push(e.getAttribute("data-wpcf7-font-size"))}),(l={}).width=!t.every(s),l.height=!r.every(s),l.text_color=!o.every(s),l.font_size=!n.every(s),l),c.synchronize=d.synchronize||!1,c.synchronize=d.synchronize||!1,c.element_target=i,c.wpcf7_data=e,c}}}(jQuery);
var Rexbuilder_Rexwpcf7=function(f){"use strict";var n=null,i={wpcf7_required_field:!1,wpcf7_email:!1,wpcf7_only_numbers:!1,wpcf7_default_check:!1,wpcf7_placeholder:"Placeholder",wpcf7_file_max_dimensions:"25mb",wpcf7_button:{text_color_hover:"rgba(255,255,255,1)",background_color_hover:"rgba(86,86,86,1)",border_color_hover:"rgba(255,255,255,1)"},placeholder_color:"rgba(0,0,0,1)",placeholder_hover_color:"rgba(0,0,0,1)",text_color_focus:"rgba(0,0,0,1)"},s=["wpcf7-validation-errors","wpcf7-aborted","wpcf7-acceptance-missing","wpcf7-spam-blocked","wpcf7-mail-sent-ng"],d=["wpcf7-mail-sent-ok"];function u(t){for(var e=0;e<n.cssRules.length;e++)if(n.cssRules[e].selectorText==t)return 1}function b(t){var e={};return t.split(";").forEach(function(t){t=t.split(":");2===t.length&&(e[t[0]]=t[1].trim())}),e}function p(t,e){var o='.rex-element-wrapper[data-rex-element-id="'+t+'"] .wpcf7-form',r=o+"{"+e+"}";if(u(o)){var c,l=b(e);for(c in l)l.hasOwnProperty(c)&&a(t,c,l[c])}else"insertRule"in n?n.insertRule(r,n.cssRules.length):"addRule"in n&&n.addRule(r,n.cssRules.length)}function _(t,e,o){var e='.rex-element-wrapper[data-rex-element-id="'+t+'"] .wpcf7-form .'+e,r=e+"{"+o+"}";if(u(e)){var c,l=b(o);for(c in l)l.hasOwnProperty(c)&&R(t,c,l[c])}else"insertRule"in n?n.insertRule(r,n.cssRules.length):"addRule"in n&&n.addRule(r,n.cssRules.length)}function g(t,e){var o='.rex-element-wrapper[data-rex-element-id="'+t+'"] .wpcf7-form .wpcf7-column',r=o+"{"+e+"}";if(u(o)){var c,l=b(e);for(c in l)l.hasOwnProperty(c)&&y(t,c,l[c])}else"insertRule"in n?n.insertRule(r,n.cssRules.length):"addRule"in n&&n.addRule(r,n.cssRules.length)}function w(t,e,o,r,c){e='.rex-element-wrapper[data-rex-element-id="'+t+'"] .wpcf7-row[wpcf7-row-number="'+e+'"] .wpcf7-column[wpcf7-column-number="'+o+'"] .'+r,o=e+"{"+c+"}";if(u(e)){var l,a=b(c);for(l in a)a.hasOwnProperty(l)&&F(t,l,a[l])}else"insertRule"in n?n.insertRule(o,n.cssRules.length):"addRule"in n&&n.addRule(o,n.cssRules.length)}function m(t,e,o,r,c){e='.rex-element-wrapper[data-rex-element-id="'+t+'"] .wpcf7-row[wpcf7-row-number="'+e+'"] .wpcf7-column[wpcf7-column-number="'+o+'"] .'+r+":focus",o=e+"{"+c+"}";if(u(e)){var l,a=b(c);for(l in a)a.hasOwnProperty(l)&&E(t,l,a[l])}else"insertRule"in n?n.insertRule(o,n.cssRules.length):"addRule"in n&&n.addRule(o,n.cssRules.length)}function h(t,e,o,r,c){e='.rex-element-wrapper[data-rex-element-id="'+t+'"] .wpcf7-row[wpcf7-row-number="'+e+'"] .wpcf7-column[wpcf7-column-number="'+o+'"] .'+r+":hover",o=e+"{"+c+"}";if(u(e)){var l,a=b(c);for(l in a)a.hasOwnProperty(l)&&O(t,l,a[l])}else"insertRule"in n?n.insertRule(o,n.cssRules.length):"addRule"in n&&n.addRule(o,n.cssRules.length)}function x(t,e,o,r,c){e='.rex-element-wrapper[data-rex-element-id="'+t+'"] .wpcf7-row[wpcf7-row-number="'+e+'"] .wpcf7-column[wpcf7-column-number="'+o+'"] .'+r+":hover::placeholder",o=e+"{"+c+"}";if(u(e)){var l,a=b(c);for(l in a)a.hasOwnProperty(l)&&P(t,l,a[l])}else"insertRule"in n?n.insertRule(o,n.cssRules.length):"addRule"in n&&n.addRule(o,n.cssRules.length)}function a(t,e,o){for(var r=0;r<n.cssRules.length;r++)if(n.cssRules[r].selectorText=='.rex-element-wrapper[data-rex-element-id="'+t+'"] .wpcf7-form'||n.cssRules[r].selectorText=='[data-rex-element-id="'+t+'"].rex-element-wrapper .wpcf7-form'){switch(e){case"margin-top":n.cssRules[r].style.marginTop=o;break;case"margin-bottom":n.cssRules[r].style.marginBottom=o;break;case"margin-left":n.cssRules[r].style.marginLeft=o;break;case"margin-right":n.cssRules[r].style.marginRight=o;break;case"border-width":n.cssRules[r].style.borderWidth=o,n.cssRules[r].style.borderTopWidth=o,n.cssRules[r].style.borderLeftWidth=o,n.cssRules[r].style.borderRightWidth=o,n.cssRules[r].style.borderBottomWidth=o,n.cssRules[r].style.borderTop=o+" "+n.cssRules[r].style.borderTopStyle+" "+n.cssRules[r].style.borderTopColor,n.cssRules[r].style.borderLeft=o+" "+n.cssRules[r].style.borderLeftStyle+" "+n.cssRules[r].style.borderLeftColor,n.cssRules[r].style.borderRight=o+" "+n.cssRules[r].style.borderRightStyle+" "+n.cssRules[r].style.borderRightColor,n.cssRules[r].style.borderBottom=o+" "+n.cssRules[r].style.borderBottomStyle+" "+n.cssRules[r].style.borderBottomColor;break;case"border-color":n.cssRules[r].style.borderColor=o,n.cssRules[r].style.borderTopColor=o,n.cssRules[r].style.borderLeftColor=o,n.cssRules[r].style.borderRightColor=o,n.cssRules[r].style.borderBottomColor=o;break;case"border-style":n.cssRules[r].style.borderStyle=o,n.cssRules[r].style.borderTopStyle=o,n.cssRules[r].style.borderLeftStyle=o,n.cssRules[r].style.borderRightStyle=o,n.cssRules[r].style.borderBottomStyle=o,n.cssRules[r].style.borderTop=n.cssRules[r].style.borderTopWidth+" "+o+" "+n.cssRules[r].style.borderTopColor,n.cssRules[r].style.borderLeft=n.cssRules[r].style.borderLeftWidth+" "+o+" "+n.cssRules[r].style.borderLeftColor,n.cssRules[r].style.borderRight=n.cssRules[r].style.borderRightWidth+" "+o+" "+n.cssRules[r].style.borderRightColor,n.cssRules[r].style.borderBottom=n.cssRules[r].style.borderBottomWidth+" "+o+" "+n.cssRules[r].style.borderBottomColor;break;case"border-radius":n.cssRules[r].style.borderRadius=o,n.cssRules[r].style.borderTopLeftRadius=o,n.cssRules[r].style.borderTopRightRadius=o,n.cssRules[r].style.borderBottomLeftRadius=o,n.cssRules[r].style.borderBottomRightRadius=o,n.cssRules[r].style.webkitBorderRadius=o,n.cssRules[r].style.webkitBorderTopLeftRadius=o,n.cssRules[r].style.webkitBorderTopRightRadius=o,n.cssRules[r].style.webkitBorderBottomLeftRadius=o,n.cssRules[r].style.webkitBorderBottomRightRadius=o;break;case"background-color":n.cssRules[r].style.backgroundColor=o}break}}function R(t,e,o,r){for(var c='.rex-element-wrapper[data-rex-element-id="'+t+'"] .wpcf7-form .'+e,l='[data-rex-element-id="'+t+'"].rex-element-wrapper .wpcf7-form',a=0;a<n.cssRules.length;a++)if(n.cssRules[a].selectorText==c||n.cssRules[a].selectorText==l){switch(o){case"text-color":n.cssRules[a].style.color=r;break;case"border-color":n.cssRules[a].style.borderColor=r;break;case"font-size":n.cssRules[a].style.fontSize=r}break}}function y(t,e,o){for(var r='.rex-element-wrapper[data-rex-element-id="'+t+'"] .wpcf7-form .wpcf7-column',c='[data-rex-element-id="'+t+'"].rex-element-wrapper .wpcf7-form .wpcf7-column',l=0;l<n.cssRules.length;l++)if(n.cssRules[l].selectorText==r||n.cssRules[l].selectorText==c){switch(e){case"padding-top":n.cssRules[l].style.paddingTop=o;break;case"padding-left":n.cssRules[l].style.paddingLeft=o;break;case"padding-right":n.cssRules[l].style.paddingRight=o;break;case"padding-bottom":n.cssRules[l].style.paddingBottom=o}break}}function F(t,e,o,r,c,l){for(var a=0;a<n.cssRules.length;a++)if(n.cssRules[a].selectorText=='.rex-element-wrapper[data-rex-element-id="'+t+'"] .wpcf7-row[wpcf7-row-number="'+e+'"] .wpcf7-column[wpcf7-column-number="'+o+'"] .'+r||n.cssRules[a].selectorText=='.rex-element-wrapper[data-rex-element-id="'+t+'"] .wpcf7-row[wpcf7-row-number="'+e+'"] .wpcf7-column[wpcf7-column-number="'+o+'"] .'+r){switch(c){case"float":n.cssRules[a].style.float=l;break;case"width":n.cssRules[a].style.width=l;break;case"height":n.cssRules[a].style.height=l;break;case"text-color":n.cssRules[a].style.color=l;break;case"font-size":n.cssRules[a].style.fontSize=l;break;case"margin-top":n.cssRules[a].style.marginTop=l;break;case"margin-bottom":n.cssRules[a].style.marginBottom=l;break;case"margin-left":n.cssRules[a].style.marginLeft=l;break;case"margin-right":n.cssRules[a].style.marginRight=l;break;case"padding-top":n.cssRules[a].style.paddingTop=l;break;case"padding-bottom":n.cssRules[a].style.paddingBottom=l;break;case"padding-left":n.cssRules[a].style.paddingLeft=l;break;case"padding-right":n.cssRules[a].style.paddingRight=l;break;case"border-width":n.cssRules[a].style.borderWidth=l,n.cssRules[a].style.borderTopWidth=l,n.cssRules[a].style.borderLeftWidth=l,n.cssRules[a].style.borderRightWidth=l,n.cssRules[a].style.borderBottomWidth=l,n.cssRules[a].style.borderTop=l+" "+n.cssRules[a].style.borderTopStyle+" "+n.cssRules[a].style.borderTopColor,n.cssRules[a].style.borderLeft=l+" "+n.cssRules[a].style.borderLeftStyle+" "+n.cssRules[a].style.borderLeftColor,n.cssRules[a].style.borderRight=l+" "+n.cssRules[a].style.borderRightStyle+" "+n.cssRules[a].style.borderRightColor,n.cssRules[a].style.borderBottom=l+" "+n.cssRules[a].style.borderBottomStyle+" "+n.cssRules[a].style.borderBottomColor;break;case"border-color":n.cssRules[a].style.borderColor=l,n.cssRules[a].style.borderTopColor=l,n.cssRules[a].style.borderLeftColor=l,n.cssRules[a].style.borderRightColor=l,n.cssRules[a].style.borderBottomColor=l;break;case"border-top-color":n.cssRules[a].style.borderTopColor=l;break;case"border-right-color":n.cssRules[a].style.borderRightColor=l;break;case"border-bottom-color":n.cssRules[a].style.borderBottomColor=l;break;case"border-left-color":n.cssRules[a].style.borderLeftColor=l;break;case"border-style":n.cssRules[a].style.borderStyle=l,n.cssRules[a].style.borderTopStyle=l,n.cssRules[a].style.borderLeftStyle=l,n.cssRules[a].style.borderRightStyle=l,n.cssRules[a].style.borderBottomStyle=l,n.cssRules[a].style.borderTop=n.cssRules[a].style.borderTopWidth+" "+l+" "+n.cssRules[a].style.borderTopColor,n.cssRules[a].style.borderLeft=n.cssRules[a].style.borderLeftWidth+" "+l+" "+n.cssRules[a].style.borderLeftColor,n.cssRules[a].style.borderRight=n.cssRules[a].style.borderRightWidth+" "+l+" "+n.cssRules[a].style.borderRightColor,n.cssRules[a].style.borderBottom=n.cssRules[a].style.borderBottomWidth+" "+l+" "+n.cssRules[a].style.borderBottomColor;break;case"border-radius":n.cssRules[a].style.borderRadius=l,n.cssRules[a].style.borderTopLeftRadius=l,n.cssRules[a].style.borderTopRightRadius=l,n.cssRules[a].style.borderBottomLeftRadius=l,n.cssRules[a].style.borderBottomRightRadius=l,n.cssRules[a].style.webkitBorderRadius=l,n.cssRules[a].style.webkitBorderTopLeftRadius=l,n.cssRules[a].style.webkitBorderTopRightRadius=l,n.cssRules[a].style.webkitBorderBottomLeftRadius=l,n.cssRules[a].style.webkitBorderBottomRightRadius=l;break;case"background-color":n.cssRules[a].style.backgroundColor=l}break}}function E(t,e,o,r,c,l){for(var a=0;a<n.cssRules.length;a++)if(n.cssRules[a].selectorText=='.rex-element-wrapper[data-rex-element-id="'+t+'"] .wpcf7-row[wpcf7-row-number="'+e+'"] .wpcf7-column[wpcf7-column-number="'+o+'"] .'+r+":focus"||n.cssRules[a].selectorText=='[data-rex-element-id="'+t+'"].rex-element-wrapper .'+r+":focus"){"text-color"===c&&(n.cssRules[a].style.color=l);break}}function O(t,e,o,r,c,l){for(var a=0;a<n.cssRules.length;a++)if(n.cssRules[a].selectorText=='.rex-element-wrapper[data-rex-element-id="'+t+'"] .wpcf7-row[wpcf7-row-number="'+e+'"] .wpcf7-column[wpcf7-column-number="'+o+'"] .'+r+":hover"||n.cssRules[a].selectorText=='[data-rex-element-id="'+t+'"].rex-element-wrapper .'+r+":hover"){switch(c){case"text-color":n.cssRules[a].style.color=l;break;case"background-color":n.cssRules[a].style.backgroundColor=l;break;case"border-color":n.cssRules[a].style.borderColor=l}break}}function P(t,e,o,r,c,l){for(var a=0;a<n.cssRules.length;a++)if(n.cssRules[a].selectorText=='.rex-element-wrapper[data-rex-element-id="'+t+'"] .wpcf7-row[wpcf7-row-number="'+e+'"] .wpcf7-column[wpcf7-column-number="'+o+'"] .'+r+":hover::placeholder"||n.cssRules[a].selectorText=='[data-rex-element-id="'+t+'"].rex-element-wrapper .'+r+":hover::placeholder"){switch(c){case"text-color":n.cssRules[a].style.color=l;break;case"background-color":n.cssRules[a].style.backgroundColor=l;break;case"border-color":n.cssRules[a].style.borderColor=l}break}}function k(t,e,o,r){for(var c='.rex-element-wrapper[data-rex-element-id="'+t+'"] .wpcf7-row[wpcf7-row-number="'+e+'"] .wpcf7-column[wpcf7-column-number="'+o+'"] .'+r,l=0;l<n.cssRules.length;l++)if(n.cssRules[l].selectorText==c){n.deleteRule(l);break}}function v(t,e,o,r){for(var c=0;c<n.cssRules.length;c++)if(n.cssRules[c].selectorText=='.rex-element-wrapper[data-rex-element-id="'+t+'"] .wpcf7-row[wpcf7-row-number="'+e+'"] .wpcf7-column[wpcf7-column-number="'+o+'"] .'+r+":hover"){n.deleteRule(c);break}}function C(t,e,o,r){for(var c=0;c<n.cssRules.length;c++)if(n.cssRules[c].selectorText=='.rex-element-wrapper[data-rex-element-id="'+t+'"] .wpcf7-row[wpcf7-row-number="'+e+'"] .wpcf7-column[wpcf7-column-number="'+o+'"] .'+r+":focus"){n.deleteRule(c);break}}function A(t){var e,o=t.elementData.wpcf7_data,r=t.elementData.element_target.element_id,t=(a(r,"background-color",o.background_color),a(r,"border-color",o.border_color),a(r,"border-width",o.border_width),a(r,"margin-top",o.margin_top),a(r,"margin-left",o.margin_left),a(r,"margin-right",o.margin_right),a(r,"margin-bottom",o.margin_bottom),s.forEach(function(t){R(r,t,"text-color",o.error_message_color),R(r,t,"border-color",o.error_message_color),R(r,t,"font-size",o.error_message_font_size)}),d.forEach(function(t){R(r,t,"text-color",o.send_message_color),R(r,t,"border-color",o.send_message_color),R(r,t,"font-size",o.send_message_font_size)}),y(r,"padding-top",o.columns.padding_top),y(r,"padding-left",o.columns.padding_left),y(r,"padding-right",o.columns.padding_right),y(r,"padding-bottom",o.columns.padding_bottom),c(t.elementData),Rexbuilder_Util.$rexContainer.find('.rex-element-wrapper[data-rex-element-id="'+r+'"]'));e=o,t.each(function(){var t=f(this).find(".rex-element-data").eq(0);t.attr("data-wpcf7-background-color",e.background_color),t.attr("data-wpcf7-border-color",e.border_color),t.attr("data-wpcf7-border-width",e.border_width),t.attr("data-wpcf7-margin-top",e.margin_top),t.attr("data-wpcf7-margin-left",e.margin_left),t.attr("data-wpcf7-margin-right",e.margin_right),t.attr("data-wpcf7-margin-bottom",e.margin_bottom),t.attr("data-wpcf7-error-message-color",e.error_message_color),t.attr("data-wpcf7-error-message-font-size",e.error_message_font_size),t.attr("data-wpcf7-send-message-color",e.send_message_color),t.attr("data-wpcf7-send-message-font-size",e.send_message_font_size),t.attr("data-wpcf7-columns-padding-top",e.columns.padding_top),t.attr("data-wpcf7-columns-padding-left",e.columns.padding_left),t.attr("data-wpcf7-columns-padding-right",e.columns.padding_right),t.attr("data-wpcf7-columns-padding-bottom",e.columns.padding_bottom),t.attr("data-wpcf7-content-width",e.content.width),t.attr("data-wpcf7-content-height",e.content.height),t.attr("data-wpcf7-content-font-size",e.content.font_size),t.attr("data-wpcf7-content-border-width",e.content.border_width),t.attr("data-wpcf7-content-border-radius",e.content.border_radius),t.attr("data-wpcf7-content-text-color",e.content.text_color),t.attr("data-wpcf7-content-text-color-hover",e.content.text_color_hover),t.attr("data-wpcf7-content-background-color",e.content.background_color),t.attr("data-wpcf7-content-background-color-hover",e.content.background_color_hover),t.attr("data-wpcf7-content-border-color",e.content.border_color),t.attr("data-wpcf7-content-border-color-hover",e.content.border_color_hover)})}function c(t){var r=t,t=r.element_target.element_id,c=r.wpcf7_data.options_different;Rexbuilder_Util.$rexContainer.find('.rex-element-wrapper[data-rex-element-id="'+t+'"] .wpcf7-column').not(".with-button").each(function(t,e){var e=f(e),o=0!==e.find(".rex-wpcf7-column-content-data").length,e=z(e,o),o=e.input_type;"file"!=o&&"radio"!=o&&"acceptance"!=o&&(e.background_color=r.wpcf7_data.content.background_color,e.background_color_hover=r.wpcf7_data.content.background_color_hover,e.border_color=r.wpcf7_data.content.border_color,e.border_color_hover=r.wpcf7_data.content.border_color_hover,e.border_width=r.wpcf7_data.content.border_width,e.border_radius=r.wpcf7_data.content.border_radius),c.width||(e.input_width=r.wpcf7_data.content.width),c.height||(e.input_height=r.wpcf7_data.content.height),c.font_size||(e.font_size=r.wpcf7_data.content.font_size),c.text_color||(e.text_color=r.wpcf7_data.content.text_color),e.text_color_hover=r.wpcf7_data.content.text_color_hover,S({columnContentData:e})})}function o(t,e){e=void 0!==e&&e;var o,r,c,l,a,t=t.parents(".rex-element-wrapper");0!==t.find(".rex-element-data").length&&(c=(t=Rexbuilder_Rexelement.generateElementData(t)).element_target.element_id,r=t.wpcf7_data,o=c,c="",c=(c=(c=(c=(c=(c=(c="background-color: "+(r=r).background_color+";border-style: solid;")+"border-color: "+r.border_color+";")+"border-width: "+r.border_width+";")+"margin-top: "+r.margin_top+";")+"margin-left: "+r.margin_left+";")+"margin-right: "+r.margin_right+";")+"margin-bottom: "+r.margin_bottom+";",p(o,c),l="",l=(l+="color:"+r.error_message_color+";")+"font-size:"+r.error_message_font_size+";",s.forEach(function(t){_(o,t,l)}),a="",a=(a+="color:"+r.send_message_color+";")+"font-size:"+r.send_message_font_size+";",d.forEach(function(t){_(o,t,a)}),c="",c=(c=(c=(c+="padding-top: "+r.columns.padding_top+";")+"padding-left: "+r.columns.padding_left+";")+"padding-right: "+r.columns.padding_right+";")+"padding-bottom: "+r.columns.padding_bottom+";",g(o,c),e)&&A({elementData:{element_target:t.element_target,synchronize:t.synchronize,wpcf7_data:t.wpcf7_data}})}function l(t){q(t),e(t)}function e(t){if(t.get(0).querySelector(".rex-wpcf7-column-content-data")){var e,o,r,t=z(t,!0),c=t.target.element_id,l=t.target.row_number,a=t.target.column_number,n=t.field_class,s=t.input_type;switch(s){case"text":case"email":case"number":case"textarea":case"select":r="wpcf7-"+s;break;case"acceptance":r="wpcf7-form-control-wrap";break;case"file":case"submit":r=n;break;case"radio":r="wpcf7-form-control-wrap."+n}var i="";-1===["select","submit"].indexOf(s)&&(i+="color: "+t.text_color_focus+";",m(c,l,a,r,i)),"file"==s&&(i="",i=(i=(i=(i=(i=(i=(i=(i=(i=(i=(i=(i=(i=(i=(i=(i+="font-size: "+t.wpcf7_button.font_size+";")+"height: "+t.wpcf7_button.height+";")+"width: "+t.wpcf7_button.width+";")+"border-width: "+t.wpcf7_button.border_width+";")+"border-radius: "+t.wpcf7_button.border_radius+";border-style: solid;")+"margin-top: "+t.wpcf7_button.margin_top+";")+"margin-right: "+t.wpcf7_button.margin_right+";")+"margin-bottom: "+t.wpcf7_button.margin_bottom+";")+"margin-left: "+t.wpcf7_button.margin_left+";")+"padding-top: "+t.wpcf7_button.padding_top+";")+"padding-right: "+t.wpcf7_button.padding_right+";")+"padding-bottom: "+t.wpcf7_button.padding_bottom+";")+"padding-left: "+t.wpcf7_button.padding_left+";")+"color: "+t.wpcf7_button.text_color+";")+"background-color: "+t.wpcf7_button.background_color+";")+"border-color: "+t.wpcf7_button.border_color+";",e="",e=(e=(e+="color: "+t.wpcf7_button.text_color_hover+";")+"background-color: "+t.wpcf7_button.background_color_hover+";")+"border-color: "+t.wpcf7_button.border_color_hover+";",w(c,l,a,r+" label",i),h(c,l,a,r+" label",e)),"submit"==s?(i="",i=(i=(i=(i=(i=(i=(i=(i=(i=(i=(i=(i=(i=(i=(i=(i+="font-size: "+t.wpcf7_button.font_size+";")+"height: "+t.wpcf7_button.height+";")+"width: "+t.wpcf7_button.width+";")+"border-width: "+t.wpcf7_button.border_width+";")+"border-radius: "+t.wpcf7_button.border_radius+";border-style: solid;")+"margin-top: "+t.wpcf7_button.margin_top+";")+"margin-right: "+t.wpcf7_button.margin_right+";")+"margin-bottom: "+t.wpcf7_button.margin_bottom+";")+"margin-left: "+t.wpcf7_button.margin_left+";")+"padding-top: "+t.wpcf7_button.padding_top+";")+"padding-right: "+t.wpcf7_button.padding_right+";")+"padding-bottom: "+t.wpcf7_button.padding_bottom+";")+"padding-left: "+t.wpcf7_button.padding_left+";")+"color: "+t.wpcf7_button.text_color+";")+"background-color: "+t.wpcf7_button.background_color+";")+"border-color: "+t.wpcf7_button.border_color+";",e="",e=(e=(e+="color: "+t.wpcf7_button.text_color_hover+";")+"background-color: "+t.wpcf7_button.background_color_hover+";")+"border-color: "+t.wpcf7_button.border_color_hover+";",w(c,l,a,r,i),h(c,l,a,r,e)):(e=i="","file"===s?i+="display: block;":(i=(i=(i=(i+="background-color: "+t.background_color+";")+"border-color: "+t.border_color+";")+"border-width: "+t.border_width+";")+"border-radius: "+t.border_radius+";",e=(e+="background-color: "+t.background_color_hover+";")+"border-color: "+t.border_color_hover+";",-1===["radio","acceptance"].indexOf(s)&&(i+="border-style: solid;")),o="","radio"===s&&(o+="font-size: "+t.font_size+";",w(c,l,a,r+" .wpcf7-radio-label",o+="cursor:pointer;")),"acceptance"===s&&(o+="font-size: "+t.font_size+";",w(c,l,a,r+" .wpcf7-list-item-label",o+="cursor:pointer;"),w(c,l,a,r+" :not(:checked) ~ .wpcf7-list-item-label::before","border-color:"+t.text_color+";"),o="border-bottom-color:"+t.text_color+";",o+="border-right-color:"+t.text_color+";",w(c,l,a,r+" :checked ~ .wpcf7-list-item-label::before",o)),i=(i+="color: "+t.text_color+";")+"width: "+D(s,c,l,a,t.input_width)+";","acceptance"!==s&&(i+="height: "+t.input_height+";"),i+="font-size: "+t.font_size+";",w(c,l,a,r,i),e+="color: "+t.text_color_hover+";",h(c,l,a,r,e),"text"!=s&&"email"!=s&&"number"!=s&&"textarea"!=s||(o="",o+="color:"+t.placeholder_color+";",w(c,l,a,r+"::placeholder",o),i="",i+="color:"+t.placeholder_hover_color+";",x(c,l,a,r,i)))}}function S(t){var e,t=t.columnContentData,o=t.target.element_id,r=t.target.row_number,c=t.target.column_number,l=t.input_type,a=t.field_class,n=t.wpcf7_button.height,s=t.wpcf7_button.width,i=t.wpcf7_button.border_width,d=t.wpcf7_button.border_radius,f=t.wpcf7_button.margin_top,u=t.wpcf7_button.margin_right,b=t.wpcf7_button.margin_bottom,p=t.wpcf7_button.margin_left,_=t.wpcf7_button.padding_top,g=t.wpcf7_button.padding_right,w=t.wpcf7_button.padding_bottom,m=t.wpcf7_button.padding_left,h=t.wpcf7_button.font_size,x=t.background_color,R=t.background_color_hover,y=t.text_color,k=t.text_color_hover,v=t.text_color_focus,C=t.palceholder_color,A=t.palceholder_color_hover,S=t.border_color,z=t.border_color_hover,T=t.wpcf7_button.text_color,q=t.wpcf7_button.text_color_hover,B=t.wpcf7_button.background_color,L=t.wpcf7_button.background_color_hover,U=t.wpcf7_button.border_color,W=t.wpcf7_button.border_color_hover;switch(l){case"text":case"email":case"number":case"textarea":case"select":e="wpcf7-"+l;break;case"acceptance":e="wpcf7-form-control-wrap";break;case"submit":case"file":e=a;break;case"radio":e="wpcf7-form-control-wrap."+a}"radio"===l&&F(o,r,c,e+" .wpcf7-radio-label","font-size",t.font_size),"acceptance"===l&&(F(o,r,c,e+" .wpcf7-list-item-label","font-size",t.font_size),F(o,r,c,e+" :not(:checked) ~ .wpcf7-list-item-label::before","border-color",t.text_color),F(o,r,c,e+" :checked ~ .wpcf7-list-item-label::before","border-bottom-color",t.text_color),F(o,r,c,e+" :checked ~ .wpcf7-list-item-label::before","border-right-color",t.text_color)),"text"!=l&&"email"!=l&&"number"!=l&&"textarea"!=l||(F(o,r,c,e+"::placeholder","text-color",C),P(o,r,c,e,"text-color",A)),"submit"!=l?(E(o,r,c,e,"text-color",v),O(o,r,c,e,"color",k),O(o,r,c,e,"background-color",R),O(o,r,c,e,"border-color",z),F(o,r,c,e,"width",D(l,o,r,c,t.input_width)),"acceptance"!==l&&F(o,r,c,e,"height",t.input_height),F(o,r,c,e,"font-size",t.font_size),F(o,r,c,e,"border-width",t.border_width),F(o,r,c,e,"border-radius",t.border_radius),F(o,r,c,e,"text-color",y),F(o,r,c,e,"background-color",x),F(o,r,c,e,"border-color",S),"file"==l&&(F(o,r,c,e+" label","height",n),F(o,r,c,e+" label","width",s),F(o,r,c,e+" label","border-width",i),F(o,r,c,e+" label","border-radius",d),F(o,r,c,e+" label","margin-top",f),F(o,r,c,e+" label","margin-right",u),F(o,r,c,e+" label","margin-bottom",b),F(o,r,c,e+" label","margin-left",p),F(o,r,c,e+" label","padding-top",_),F(o,r,c,e+" label","padding-right",g),F(o,r,c,e+" label","padding-bottom",w),F(o,r,c,e+" label","padding-left",m),F(o,r,c,e+" label","font-size",h),F(o,r,c,e+" label","text-color",T),F(o,r,c,e+" label","background-color",B),F(o,r,c,e+" label","border-color",U),O(o,r,c,e+" label","text-color",q),O(o,r,c,e+" label","background-color",L),O(o,r,c,e+" label","border-color",W))):(F(o,r,c,e,"height",n),F(o,r,c,e,"width",s),F(o,r,c,e,"border-width",i),F(o,r,c,e,"border-radius",d),F(o,r,c,e,"margin-top",f),F(o,r,c,e,"margin-right",u),F(o,r,c,e,"margin-bottom",b),F(o,r,c,e,"margin-left",p),F(o,r,c,e,"padding-top",_),F(o,r,c,e,"padding-right",g),F(o,r,c,e,"padding-bottom",w),F(o,r,c,e,"padding-left",m),F(o,r,c,e,"font-size",h),F(o,r,c,e,"text-color",T),F(o,r,c,e,"background-color",B),F(o,r,c,e,"border-color",U),O(o,r,c,e,"text-color",q),O(o,r,c,e,"background-color",L),O(o,r,c,e,"border-color",W)),N(o,t)}function z(t,e){var o,r={wpcf7_required_field:"",wpcf7_email:"",wpcf7_only_numbers:"",wpcf7_default_check:"",wpcf7_placeholder:"",wpcf7_list_fields:[],wpcf7_file_max_dimensions:"",wpcf7_button:{text:"",font_size:"",height:"",width:"",border_width:"",border_radius:"",margin_top:"",margin_right:"",margin_bottom:"",margin_left:"",padding_top:"",padding_right:"",padding_bottom:"",padding_left:"",text_color:"",text_color_hover:"",background_color:"",background_color_hover:"",border_color:"",border_color_hover:""},input_width:"",input_height:"",font_size:"",border_width:"",border_radius:"",background_color:"",background_color_hover:"",border_color:"",border_color_hover:"",placeholder_color:"",placeholder_hover_color:"",select_color_after_selection:"",text_color:"",text_color_hover:"",text_color_focus:"",label_text:"",text:"",type:"",field_class:"",input_type:"",target:{element_id:"",row_number:"",column_number:""}},c=(r.target.element_id=t.parents(".rex-element-wrapper").attr("data-rex-element-id"),r.target.row_number=t.parents(".wpcf7-row").attr("wpcf7-row-number"),r.target.column_number=t.attr("wpcf7-column-number"),/([a-z]+\-[\d]+)(-rexclone-([\d]+))?/),l=t.find(".wpcf7-form-control"),a=(r.field_class=null,0!==l.length&&(l=(l=(l=l.get(0).className.match(c))||t.find(".wpcf7-form-control-wrap").get(0).className.match(c))||t.find("[type=checkbox]").get(0).className.match(c),r.field_class=l[0]),r.input_type=/[a-z]+/.exec(r.field_class)[0],r.input_type="menu"==r.input_type?"select":r.input_type,r.input_type);switch(a){case"text":case"email":case"number":case"textarea":case"select":o="wpcf7-"+a;break;case"acceptance":o="wpcf7-form-control-wrap";break;case"submit":case"file":o=r.field_class;break;case"radio":o="wpcf7-form-control-wrap."+r.field_class}-1!==["text","email","number","textarea"].indexOf(a)&&(r.label_text=t.find(".wpcf7-label-text__paragraph").html()),"acceptance"==a&&(r.text=t.find(".wpcf7-list-item-label").html()),"file"==a&&(r.text=t.find(".wpcf7-file-caption").html());c=t.find(".wpcf7-select").eq(0).find("option");if(0!=c.length&&c.each(function(t,e){""===e.value||e.getAttribute("disabled")||r.wpcf7_list_fields.push(e.textContent)}),0!==t.find(".wpcf7-radio").length&&(l=0===(l=t.find(".wpcf7-radio").eq(0).find(".wpcf7-radio-label")).length?t.find(".wpcf7-radio").eq(0).find(".wpcf7-list-item-label"):l).each(function(t,e){r.wpcf7_list_fields.push(e.textContent)}),e){c=t.find(".rex-wpcf7-column-content-data").eq(0)[0],l=0!==t.find(".wpcf7-validates-as-required").length,e=(l||0!==t.find(".wpcf7-acceptance").length&&(l=0===t.find(".wpcf7-acceptance.optional")),r.wpcf7_required_field=c.getAttribute("data-wpcf7-required-field")?"true"===c.getAttribute("data-wpcf7-required-field"):l,0!==t.find(".wpcf7-validates-as-email").length),l=(r.wpcf7_email=c.getAttribute("data-wpcf7-email")?"true"===c.getAttribute("data-wpcf7-email").toString():e,0!==t.find(".wpcf7-validates-as-number").length),e=(r.wpcf7_only_numbers=c.getAttribute("data-wpcf7-only-numbers")?"true"===c.getAttribute("data-wpcf7-only-numbers").toString():l,void 0!==t.find(".wpcf7-acceptance [type=checkbox]").prop("checked"));if(r.wpcf7_default_check=c.getAttribute("data-wpcf7-default-check")?"true"===c.getAttribute("data-wpcf7-default-check").toString():e,-1!==["text","email","number","textarea"].indexOf(a)?c.hasAttribute("data-wpcf7-placeholder")&&c.getAttribute("data-wpcf7-placeholder")?r.wpcf7_placeholder=c.getAttribute("data-wpcf7-placeholder"):r.wpcf7_placeholder=t.find(".wpcf7-form-control").attr("placeholder")||"":-1!==["select"].indexOf(a)&&(c.getAttribute("data-wpcf7-placeholder")?r.wpcf7_placeholder=c.getAttribute("data-wpcf7-placeholder"):r.wpcf7_placeholder=t.find(".wpcf7-form-control [disabled]").text()||""),r.wpcf7_file_max_dimensions=c.getAttribute("data-wpcf7-file-max-dimensions")?c.getAttribute("data-wpcf7-file-max-dimensions").toString():i.wpcf7_file_max_dimensions,"file"===a)if(c.getAttribute("data-wpcf7-file-types"))r.wpcf7_list_fields=c.getAttribute("data-wpcf7-file-types").toString().split(",");else{for(var n=t.find("[type=file]").attr("accept").toString().split(","),s=0;s<n.length;s++)n[s]=n[s].replace(".","");r.wpcf7_list_fields=n}r.input_width=c.getAttribute("data-wpcf7-input-width")?c.getAttribute("data-wpcf7-input-width").toString():t.find("."+o).css("width"),r.input_height=c.getAttribute("data-wpcf7-input-height")?c.getAttribute("data-wpcf7-input-height").toString():t.find("."+o).css("height"),r.font_size=c.getAttribute("data-wpcf7-font-size")?c.getAttribute("data-wpcf7-font-size").toString():t.find("."+o).css("font-size"),r.background_color=c.getAttribute("data-background-color")?c.getAttribute("data-background-color").toString():t.find("."+o).css("background-color"),r.text_color=c.getAttribute("data-text-color")?c.getAttribute("data-text-color").toString():t.find("."+o).css("color"),r.text_color_focus=c.getAttribute("data-text-color-focus")?c.getAttribute("data-text-color-focus").toString():i.text_color_focus,r.select_color_after_selection=c.getAttribute("data-select-color-after-selection")?c.getAttribute("data-select-color-after-selection").toString():"",r.placeholder_color=c.getAttribute("data-placeholder-color")?c.getAttribute("data-placeholder-color").toString():i.placeholder_color,r.placeholder_hover_color=c.getAttribute("data-placeholder-hover-color")?c.getAttribute("data-placeholder-hover-color").toString():i.placeholder_hover_color,r.border_width=c.getAttribute("data-wpcf7-border-width")?c.getAttribute("data-wpcf7-border-width").toString():t.find("."+o).css("border-width"),r.border_radius=c.getAttribute("data-wpcf7-border-radius")?c.getAttribute("data-wpcf7-border-radius").toString():t.find("."+o).css("border-radius"),r.background_color_hover=c.getAttribute("data-background-color-hover")?c.getAttribute("data-background-color-hover").toString():"",r.text_color_hover=c.getAttribute("data-text-color-hover")?c.getAttribute("data-text-color-hover").toString():"",r.border_color=c.getAttribute("data-border-color")?c.getAttribute("data-border-color").toString():t.find("."+o).css("border-color"),r.border_color_hover=c.getAttribute("data-border-color-hover")?c.getAttribute("data-border-color-hover").toString():"",c.getAttribute("data-button-text")?r.wpcf7_button.text=c.getAttribute("data-button-text").toString():"file"==a?r.wpcf7_button.text="Choose a file":"submit"==a&&(r.wpcf7_button.text=t.find("[type=submit]").val()),c.getAttribute("data-button-text-font-size")?r.wpcf7_button.font_size=c.getAttribute("data-button-text-font-size").toString():"file"==a?r.wpcf7_button.font_size=t.find("."+r.field_class+" label").eq(0).css("font-size"):"submit"==a&&(r.wpcf7_button.font_size=t.find("."+o).css("font-size")),/\d+\.\d+/.test(r.wpcf7_button.font_size)&&(r.wpcf7_button.font_size=/\d+/.exec(r.wpcf7_button.font_size)[0]+"px"),c.getAttribute("data-button-height")?r.wpcf7_button.height=c.getAttribute("data-button-height").toString():"file"==a?r.wpcf7_button.height=t.find("."+r.field_class+" label").eq(0).css("height"):"submit"==a&&(r.wpcf7_button.height=t.find("."+o).css("height")),c.getAttribute("data-button-width")?r.wpcf7_button.width=c.getAttribute("data-button-width").toString():"file"==a?r.wpcf7_button.width=t.find("."+r.field_class+" label").eq(0).css("width"):"submit"==a&&(r.wpcf7_button.width=t.find("."+o).css("width")),c.getAttribute("data-button-border-width")?r.wpcf7_button.border_width=c.getAttribute("data-button-border-width").toString():"file"==a?r.wpcf7_button.border_width=t.find("."+r.field_class+" label").eq(0).css("border-width"):"submit"==a&&(r.wpcf7_button.border_width=t.find("."+o).css("border-width")),c.getAttribute("data-button-border-radius")?r.wpcf7_button.border_radius=c.getAttribute("data-button-border-radius").toString():"file"==a?r.wpcf7_button.border_radius=t.find("."+r.field_class+" label").eq(0).css("border-radius"):"submit"==a&&(r.wpcf7_button.border_radius=t.find("."+o).css("border-radius")),c.getAttribute("data-button-margin-top")?r.wpcf7_button.margin_top=c.getAttribute("data-button-margin-top").toString():"file"==a?r.wpcf7_button.margin_top=t.find("."+r.field_class+" label").eq(0).css("margin-top"):"submit"==a&&(r.wpcf7_button.margin_top=t.find("."+o).css("margin-top")),c.getAttribute("data-button-margin-right")?r.wpcf7_button.margin_right=c.getAttribute("data-button-margin-right").toString():"file"==a?r.wpcf7_button.margin_right=t.find("."+r.field_class+" label").eq(0).css("margin-right"):"submit"==a&&(r.wpcf7_button.margin_right=t.find("."+o).css("margin-right")),c.getAttribute("data-button-margin-bottom")?r.wpcf7_button.margin_bottom=c.getAttribute("data-button-margin-bottom").toString():"file"==a?r.wpcf7_button.margin_bottom=t.find("."+r.field_class+" label").eq(0).css("margin-bottom"):"submit"==a&&(r.wpcf7_button.margin_bottom=t.find("."+o).css("margin-bottom")),c.getAttribute("data-button-margin-left")?r.wpcf7_button.margin_left=c.getAttribute("data-button-margin-left").toString():"file"==a?r.wpcf7_button.margin_left=t.find("."+r.field_class+" label").eq(0).css("margin-left"):"submit"==a&&(r.wpcf7_button.margin_left=t.find("."+o).css("margin-left")),c.getAttribute("data-button-padding-top")?r.wpcf7_button.padding_top=c.getAttribute("data-button-padding-top").toString():"file"==a?r.wpcf7_button.padding_top=t.find("."+r.field_class+" label").eq(0).css("padding-top"):"submit"==a&&(r.wpcf7_button.padding_top=t.find("."+o).css("padding-top")),c.getAttribute("data-button-padding-right")?r.wpcf7_button.padding_right=c.getAttribute("data-button-padding-right").toString():"file"==a?r.wpcf7_button.padding_right=t.find("."+r.field_class+" label").eq(0).css("padding-right"):"submit"==a&&(r.wpcf7_button.padding_right=t.find("."+o).css("padding-right")),c.getAttribute("data-button-padding-bottom")?r.wpcf7_button.padding_bottom=c.getAttribute("data-button-padding-bottom").toString():"file"==a?r.wpcf7_button.padding_bottom=t.find("."+r.field_class+" label").eq(0).css("padding-bottom"):"submit"==a&&(r.wpcf7_button.padding_bottom=t.find("."+o).css("padding-bottom")),c.getAttribute("data-button-padding-left")?r.wpcf7_button.padding_left=c.getAttribute("data-button-padding-left").toString():"file"==a?r.wpcf7_button.padding_left=t.find("."+r.field_class+" label").eq(0).css("padding-left"):"submit"==a&&(r.wpcf7_button.padding_left=t.find("."+o).css("padding-left")),c.getAttribute("data-button-text-color")?r.wpcf7_button.text_color=c.getAttribute("data-button-text-color").toString():"file"==a?r.wpcf7_button.text_color=t.find("."+r.field_class+" label").eq(0).css("color"):"submit"==a&&(r.wpcf7_button.text_color=t.find("."+o).css("color")),r.wpcf7_button.text_color_hover=c.getAttribute("data-button-text-color-hover")?c.getAttribute("data-button-text-color-hover").toString():i.wpcf7_button.text_color_hover,c.getAttribute("data-button-background-color")?r.wpcf7_button.background_color=c.getAttribute("data-button-background-color").toString():"file"==a?r.wpcf7_button.background_color=t.find("."+r.field_class+" label").eq(0).css("background-color"):"submit"==a&&(r.wpcf7_button.background_color=t.find("."+o).css("background-color")),r.wpcf7_button.background_color_hover=c.getAttribute("data-button-background-color-hover")?c.getAttribute("data-button-background-color-hover").toString():i.wpcf7_button.background_color_hover,c.getAttribute("data-button-border-color")?r.wpcf7_button.border_color=c.getAttribute("data-button-border-color").toString():"file"==a?r.wpcf7_button.border_color=t.find("."+r.field_class+" label").eq(0).css("border-color"):"submit"==a&&(r.wpcf7_button.border_color=t.find("."+o).css("border-color")),r.wpcf7_button.border_color_hover=c.getAttribute("data-button-border-color-hover")?c.getAttribute("data-button-border-color-hover").toString():i.wpcf7_button.border_color_hover}else r.wpcf7_required_field=i.wpcf7_required_field,r.wpcf7_only_numbers=i.wpcf7_only_numbers,r.wpcf7_default_check=i.wpcf7_default_check,r.wpcf7_placeholder=i.wpcf7_placeholder,r.wpcf7_file_max_dimensions=i.wpcf7_file_max_dimensions,"file"==a&&(r.wpcf7_list_fields=["png","jpg","jpeg","pdf"]),r.input_width=t.find("."+o).css("width"),r.input_height=t.find("."+o).css("height"),r.font_size=i.font_size,r.background_color=t.find("."+o).css("background-color"),r.text_color=t.find("."+o).css("color"),r.text_color_focus=i.text_color_focus,"file"==a?r.wpcf7_button.text="Choose a file":"submit"==a&&(r.wpcf7_button.text="Send"),"file"==a?r.wpcf7_button.font_size=t.find("."+r.field_class+" label").eq(0).css("font-size"):"submit"==a&&(r.wpcf7_button.font_size=t.find("."+o).css("font-size")),"file"==a?r.wpcf7_button.height=t.find("."+r.field_class+" label").eq(0).css("height"):"submit"==a&&(r.wpcf7_button.height=t.find("."+o).css("height")),"file"==a?r.wpcf7_button.width=t.find("."+r.field_class+" label").eq(0).css("width"):"submit"==a&&(r.wpcf7_button.width=t.find("."+o).css("width")),"file"==a?r.wpcf7_button.border_width=t.find("."+r.field_class+" label").eq(0).css("border-width"):"submit"==a&&(r.wpcf7_button.border_width=t.find("."+o).css("border-width")),"file"==a?r.wpcf7_button.border_radius=t.find("."+r.field_class+" label").eq(0).css("border-radius"):"submit"==a&&(r.wpcf7_button.border_radius=t.find("."+o).css("border-radius")),"file"==a?r.wpcf7_button.margin_top=t.find("."+r.field_class+" label").eq(0).css("margin-top"):"submit"==a&&(r.wpcf7_button.margin_top=t.find("."+o).css("margin-top")),"file"==a?r.wpcf7_button.margin_right=t.find("."+r.field_class+" label").eq(0).css("margin-right"):"submit"==a&&(r.wpcf7_button.margin_right=t.find("."+o).css("margin-right")),"file"==a?r.wpcf7_button.margin_bottom=t.find("."+r.field_class+" label").eq(0).css("margin-bottom"):"submit"==a&&(r.wpcf7_button.margin_bottom=t.find("."+o).css("margin-bottom")),"file"==a?r.wpcf7_button.margin_left=t.find("."+r.field_class+" label").eq(0).css("margin-left"):"submit"==a&&(r.wpcf7_button.margin_left=t.find("."+o).css("margin-left")),"file"==a?r.wpcf7_button.padding_top=t.find("."+r.field_class+" label").eq(0).css("padding-top"):"submit"==a&&(r.wpcf7_button.padding_top=t.find("."+o).css("padding-top")),"file"==a?r.wpcf7_button.padding_right=t.find("."+r.field_class+" label").eq(0).css("padding-right"):"submit"==a&&(r.wpcf7_button.padding_right=t.find("."+o).css("padding-right")),"file"==a?r.wpcf7_button.padding_bottom=t.find("."+r.field_class+" label").eq(0).css("padding-bottom"):"submit"==a&&(r.wpcf7_button.padding_bottom=t.find("."+o).css("padding-bottom")),"file"==a?r.wpcf7_button.padding_left=t.find("."+r.field_class+" label").eq(0).css("padding-left"):"submit"==a&&(r.wpcf7_button.padding_left=t.find("."+o).css("padding-left")),"file"==a?r.wpcf7_button.text_color=t.find("."+r.field_class+" label").eq(0).css("color"):"submit"==a&&(r.wpcf7_button.text_color=t.find("."+o).css("color")),r.wpcf7_button.text_color_hover=i.wpcf7_button.text_color_hover,"file"==a?r.wpcf7_button.background_color=t.find("."+r.field_class+" label").eq(0).css("background-color"):"submit"==a&&(r.wpcf7_button.background_color=t.find("."+o).css("background-color")),r.wpcf7_button.background_color_hover=i.wpcf7_button.background_color_hover,"file"==a?r.wpcf7_button.border_color=t.find("."+r.field_class+" label").eq(0).css("border-color"):"submit"==a&&(r.wpcf7_button.border_color=t.find("."+o).css("border-color")),r.wpcf7_button.border_color_hover=i.wpcf7_button.border_color_hover;return r}function r(){Rexbuilder_Util.$rexContainer.find(".wpcf7-form:not(.no-builder-form) .wpcf7-column").each(function(t,e){var o,r=f(e),c={text:0!=r.find("[type=text]").length,email:0!=r.find(".wpcf7-email").length,number:0!=r.find(".wpcf7-number").length,textarea:0!=r.find(".wpcf7-textarea").length,select:0!=r.find(".wpcf7-select").length,radio:0!=r.find(".wpcf7-radio").length,acceptance:0!=r.find(".wpcf7-acceptance").length,file:0!=r.find(".wpcf7-file").length,submit:0!=r.find(".wpcf7-submit").length},l="";for(o in c)if(1==c[o]){l=o;break}var a=null;switch(l){case"text":case"email":case"number":case"textarea":(a=r.find(".wpcf7-"+l)).attr("size","");var n,s=a,i=s.parents(".wpcf7-column-content").children("label");0!==i.length?1===i.length&&i.addClass("wpcf7-label-text"):(i=Rexbuilder_Public_Templates.getTemplate("label-text-paragraph"),d=s.parents(".wpcf7-form-control-wrap").get(0),n=document.createElement("label"),Rexbuilder_Util.addClass(n,"wpcf7-label-text"),n.insertAdjacentHTML("afterbegin",i),d.parentNode.insertBefore(n,d),n.appendChild(d),Rexbuilder_Util.editorMode&&(i=Rexbuilder_Public_Templates.getTemplate("label-text-paragraph"),n=s.parents(".rex-element-wrapper").attr("data-rex-element-id"),d=s.parents(".wpcf7-row").attr("wpcf7-row-number"),s=s.parents(".wpcf7-column").attr("wpcf7-column-number"),(n=Rexbuilder_Rexwpcf7_Editor.retrieveFormsInPage()[n].find('[wpcf7-row-number="'+d+'"] [wpcf7-column-number="'+s+'"] .wpcf7-column-content').get(0)).innerHTML='<label class="wpcf7-label-text">'+i+n.textContent+"</label>"));break;case"select":var d="";""==(a=r.find(".wpcf7-select")).find("option").eq(0).val()?((s=a.find("option").eq(0)).attr("disabled",""),s.attr("selected",""),d=s.parents(".wpcf7-column").find(".rex-wpcf7-column-content-data").attr("data-wpcf7-placeholder"),s.text(d),""===s.text()&&(s.text("Select something"),a.parents(".wpcf7-column").find(".rex-wpcf7-column-content-data").attr("data-wpcf7-placeholder","Select something"))):(i=f("<option value disabled selected></option>"),a.prepend(i),d=a.parents(".wpcf7-column").find(".rex-wpcf7-column-content-data").attr("data-wpcf7-placeholder"),i.text(d),""===i.text()&&(i.text("Select something"),a.parents(".wpcf7-column").find(".rex-wpcf7-column-content-data").attr("data-wpcf7-placeholder","Select something"))),a.on("change",function(){var t=a.parents(".wpcf7-column").find(".rex-wpcf7-column-content-data").attr("data-select-color-after-selection");a.css("color",t)})}}),t(),T()}function t(){if(Rexbuilder_Util.rexContainer&&void 0!==Rexbuilder_Util.rexContainer){for(var t,e,o,r=Rexbuilder_Util.rexContainer.querySelectorAll(".wpcf7-radio"),c=r.length,l=0;l<c;l++)(o=(e=r[l]).className.match(/radio-\d+/))&&(o=o[0],Rexbuilder_Util.removeClass(e,o),t=e.querySelector("[type=radio]").name,e=e.parentNode,Rexbuilder_Util.addClass(e,o),Rexbuilder_Util.removeClass(e,t));Rexbuilder_Util.$rexContainer.find('.wpcf7 input[type="radio"]').each(function(t,e){var o,r,e=f(e),c=(e.addClass("with-gap"),e.attr("id","wpcf7-radio-"+(t+1)),e.siblings(".wpcf7-list-item-label"));0!==c.length?(o=c.text(),c.empty(),(r=f(document.createElement("label"))).addClass("wpcf7-radio-label"),r.attr("for",e.attr("id")),r.text(o),r.insertAfter(c),c.removeClass("wpcf7-list-item-label")):e.siblings(".wpcf7-radio-label").attr("for","wpcf7-radio-"+(t+1))})}}function T(){Rexbuilder_Util.$rexContainer.find(".rexpansive_section:not(.removing_section) .grid-stack-item:not(.removing_block) .wpcf7 .wpcf7-form-control-wrap").has(".wpcf7-file").each(function(t,e){var e=f(e),o=(0===e.find(".wpcf7-file-caption").length&&e.siblings(".wpcf7-file-caption").detach().appendTo(e),e.find("[type=file]")),r=o.get(0).className,r=/file-\w+/gm.exec(r),r=(r&&(r=r[0],o.removeClass(r),o.parents(".wpcf7-form-control-wrap").addClass(r)),o.attr("id","wpcf7-file-"+(t+1)),o.siblings("label").remove(),f('<label for="'+o.attr("id")+'"></label>')),t=(r.insertAfter(o),void 0!==e.parents(".wpcf7-column").find(".rex-wpcf7-column-content-data").attr("data-button-text")?(t=e.parents(".wpcf7-column").find(".rex-wpcf7-column-content-data").attr("data-button-text"),r.text(t)):(r.text("Choose a file"),e.parents(".wpcf7-column").find(".rex-wpcf7-column-content-data").attr("data-button-text","Choose a file")),o.parents(".wpcf7-column")),r=z(t,!0);N(r.target.element_id,r),l(t)})}function q(t){var e=t.parents(".rex-element-wrapper").attr("data-rex-element-id"),o=t.parents(".wpcf7-row").attr("wpcf7-row-number"),r=t.attr("wpcf7-column-number");if(0===t.find(".wpcf7-add-new-form-content").length&&0==t.parents("#rex-wpcf7-tools").length){var c,l=(null===(l=/[a-z]+\-[0-9]+/.exec(t.find(".wpcf7-form-control").get(0).classList))&&null===(l=/[a-z]+\-[0-9]+/.exec(t.find(".wpcf7-form-control-wrap").get(0).classList))?/[a-z]+\-[0-9]+/.exec(t.find("[type=checkbox]").get(0).classList):l)[0],a=/[a-z]+/.exec(l)[0];switch(a="menu"==a?"select":a){case"text":case"email":case"number":case"textarea":case"select":c="wpcf7-"+a;break;case"acceptance":c="wpcf7-form-control-wrap";break;case"submit":c=l;break;case"file":k(e,o,r,(c=l)+" label"),v(e,o,r,c+" label");break;case"radio":c="wpcf7-form-control-wrap."+l}k(e,o,r,c),v(e,o,r,c),C(e,o,r,c)}}function N(t,e){var o=Rexbuilder_Util.$rexContainer.find('.rex-element-wrapper[data-rex-element-id="'+t+'"]').find(".wpcf7-form"),r=e.target.row_number,c=e.target.column_number,l=e.input_type;o.each(function(){var t=f(this).find('.wpcf7-row[wpcf7-row-number="'+r+'"]').find('.wpcf7-column[wpcf7-column-number="'+c+'"]').find(".rex-wpcf7-column-content-data");"submit"!==l&&"radio"!==l&&t.attr("data-wpcf7-required-field",e.wpcf7_required_field),"text"!==l&&"email"!==l&&"number"!==l||(t.attr("data-wpcf7-email",e.wpcf7_email),t.attr("data-wpcf7-only-numbers",e.wpcf7_only_numbers)),"acceptance"===l&&t.attr("data-wpcf7-default-check",e.wpcf7_default_check),"text"!==l&&"email"!==l&&"number"!==l&&"textarea"!==l&&"select"!==l||t.attr("data-wpcf7-placeholder",e.wpcf7_placeholder),"file"===l&&(t.attr("data-wpcf7-file-max-dimensions",e.wpcf7_file_max_dimensions),t.attr("data-wpcf7-file-types",e.wpcf7_list_fields)),"file"!=l&&"radio"!=l&&"acceptance"!=l&&(t.attr("data-wpcf7-border-width",e.border_width),t.attr("data-wpcf7-border-radius",e.border_radius),t.attr("data-background-color",e.background_color),t.attr("data-background-color-hover",e.background_color_hover),t.attr("data-border-color",e.border_color),t.attr("data-border-color-hover",e.border_color_hover)),t.attr("data-wpcf7-input-width",e.input_width),t.attr("data-wpcf7-input-height",e.input_height),t.attr("data-wpcf7-font-size",e.font_size),t.attr("data-text-color",e.text_color),t.attr("data-text-color-hover",e.text_color_hover),t.attr("data-text-color-focus",e.text_color_focus),"select"===l&&t.attr("data-select-color-after-selection",e.select_color_after_selection),"text"!==l&&"email"!==l&&"number"!==l&&"textarea"!==l||(t.attr("data-placeholder-color",e.placeholder_color),t.attr("data-placeholder-hover-color",e.placeholder_hover_color)),"file"!==l&&"submit"!==l||(t.attr("data-button-text",e.wpcf7_button.text),t.attr("data-button-text-font-size",e.wpcf7_button.font_size),t.attr("data-button-height",e.wpcf7_button.height),t.attr("data-button-width",e.wpcf7_button.width),t.attr("data-button-border-width",e.wpcf7_button.border_width),t.attr("data-button-border-radius",e.wpcf7_button.border_radius),t.attr("data-button-margin-top",e.wpcf7_button.margin_top),t.attr("data-button-margin-right",e.wpcf7_button.margin_right),t.attr("data-button-margin-bottom",e.wpcf7_button.margin_bottom),t.attr("data-button-margin-left",e.wpcf7_button.margin_left),t.attr("data-button-padding-top",e.wpcf7_button.padding_top),t.attr("data-button-padding-right",e.wpcf7_button.padding_right),t.attr("data-button-padding-bottom",e.wpcf7_button.padding_bottom),t.attr("data-button-padding-left",e.wpcf7_button.padding_left),t.attr("data-button-text-color",e.wpcf7_button.text_color),t.attr("data-button-text-color-hover",e.wpcf7_button.text_color_hover),t.attr("data-button-background-color",e.wpcf7_button.background_color),t.attr("data-button-background-color-hover",e.wpcf7_button.background_color_hover),t.attr("data-button-border-color",e.wpcf7_button.border_color),t.attr("data-button-border-color-hover",e.wpcf7_button.border_color_hover))}),Rexbuilder_Util.editorMode&&Rexbuilder_Rexwpcf7_Editor.updateSpanDataInDB(t,e)}function D(t,e,o,r,c){var l=-1!==["text","email","number","textarea","select"].indexOf(t)&&/\%/.test(c);return Array.prototype.slice.call(Rexbuilder_Util.rexContainer.querySelectorAll('.rex-element-wrapper[data-rex-element-id="'+e+'"] .wpcf7-row[wpcf7-row-number="'+o+'"] .wpcf7-column[wpcf7-column-number="'+r+'"] .wpcf7-form-control-wrap')).forEach(function(t){t.style.width=l?c:""}),l?"100%":c}return{init:function(){var t,e;this.$rexFormsStyle=f("#rexpansive-builder-rexwpcf7-style-inline-css"),0===Rexbuilder_Rexwpcf7.$rexFormsStyle.length&&(t=document.head||document.getElementsByTagName("head")[0],(e=document.createElement("style")).type="text/css",e.id="rexpansive-builder-rexwpcf7-style-inline-css",e.dataset.rexName="rexwpcf7-style",e.styleSheet?e.styleSheet.cssText="":e.appendChild(document.createTextNode("")),t.appendChild(e));for(var o=0;o<document.styleSheets.length;o++)"rexpansive-builder-rexwpcf7-style-inline-css"==document.styleSheets[o].ownerNode.id&&(n=document.styleSheets[o]);Rexbuilder_Util.editorMode||r(),Rexbuilder_Rexelement.addStyles(),Rexbuilder_Util.$rexContainer.find(".wpcf7-form:not(.no-builder-form) .wpcf7-radio").each(function(t,o){f(o).find(".wpcf7-list-item").click(function(t){t.preventDefault();t=f(t.target).parents(".wpcf7-list-item");t.hasClass("selected")||(f(o).find(".wpcf7-list-item").each(function(t,e){f(e).removeClass("selected"),f(o).find("input").prop("checked",!1)}),t.addClass("selected"),t.find("input").prop("checked",!0))})}),Rexbuilder_Util.editorMode||document.addEventListener("wpcf7submit",function(t){var e,t=t.target,t=f(t).parents(".perfect-grid-gallery");0!==t.length&&(e=RexGrid.data(t.get(0)))&&setTimeout(function(){e.endResize()},200)}),Rexbuilder_Util.editorMode||f(".wpcf7-column.with-button").each(function(t,e){Rexbuilder_Util.removeClass(e,"with-button"),Rexbuilder_Util.addClass(e,"column-empty"),e.innerHTML=""})},guessWidthToSet:D,addFormStyle:o,refreshFormStyle:function(t,e){o(t,e)},addColumnContentStyle:e,removeColumnContentStyle:q,refreshColumnContentStyle:l,fixInputs:r,fixWpcf7RadioButtons:t,fixWpcf7Files:T,generateColumnContentData:z,updateForm:A,updateFormContent:c,updateColumnContent:S,addFormRule:p,addFormMessageRule:_,addFormColumnsRule:g,addColumnContentRule:w,addColumnContentFocusRule:m,addColumnContentHoverRule:h,addColumnContentPlaceholderHoverRule:x,updateFormRule:a,updateFormMessageRule:R,updateFormColumnsRule:y,updateColumnContentRule:F,updateColumnContentFocusRule:E,updateColumnContentHoverRule:O,updateColumnContentPlaceholderHoverRule:P,removeFormRule:function(t){for(var e='.rex-element-wrapper[data-rex-element-id="'+t+'"] .wpcf7-form',o=0;o<n.cssRules.length;o++)if(n.cssRules[o].selectorText==e){n.deleteRule(o);break}},removeColumnContentRule:k,removeColumnContentHoverRule:v,removeColumnContentFocusRule:C}}(jQuery);
!function(t,e){"use strict";t.RexGrid=e(t)}("undefined"!=typeof window?window:this,function(l){var s=[],w={viewport:function(){var t=l,e="inner";return"innerWidth"in l||(e="client",t=document.documentElement||document.body),{width:t[e+"Width"],height:t[e+"Height"]}},extendDefaults:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},matches:function(t,e){return(t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector).call(t,e)},parents:function(t,e){for(;t.parentNode;){if(w.matches(t,e))return t;t=t.parentNode}return null},isEven:function(t){if("string"==typeof t&&(t=parseInt(t)),isNaN(t))throw new Error("The value passed is not a Number or a String representing a Number");return t%2==0},toggleClass:function(t,e){hasClass(t,e)?w.removeClass(t,e):w.addClass(t,e)},getCoord:function(t,e){return{x:t%e,y:Math.floor(t/e)}}},r=("classList"in document.documentElement?(w.hasClass=function(t,e){return t.classList.contains(e)},w.addClass=function(t,e){t.classList.add(e)},w.removeClass=function(t,e){t.classList.remove(e)}):(w.hasClass=function(t,e){return new RegExp("\\b"+e+"\\b").test(t.className)},w.addClass=function(t,e){hasClass(t,e)||(t.className+=" "+e)},w.removeClass=function(t,e){t.className=t.className.replace(new RegExp("\\b"+e+"\\b","g"),"")}),w.viewport());function a(t){this.el=t.el,this.blockData=this.el.querySelector(".rexbuilder-block-data"),this.id=t.id,this.w=t.w,this.h=t.h,this.x=t.x,this.y=t.y,this.start_x=this.x,this.start_y=this.y,this.start_h=parseInt(this.blockData.getAttribute("data-gs_start_h")),this.hide=t.hide,this.domIndex=this.x+12*this.y,this.toCheck=t.toCheck,this.setHeight=!0,this.setTop=!0}function t(){this.REX_BLOCK_FORCE_MASONRY_CLASSNAME="rex-block--force-masonry",this.element=null,this.gridBlocks=[],this.gridBlocksTotal=0,this.noFlowBlocks=[],this.section=null,this.sectionData=null,arguments[0]&&(this.element=arguments[0],this.section=w.parents(this.element,".rexpansive_section"),this.sectionData=this.section.querySelector(".section-data"));var t={gutter:20,columns:12};this.options=arguments[1]&&"object"==typeof arguments[1]?w.extendDefaults(t,arguments[1]):t,this.properties={id:"",gridWidth:0,layout:"fixed",oneColumnModeActive:!1,noMobileLayoutSaved:!1,fullHeight:!1,gridHeightSettable:!0,singleWidth:0,singleHeight:0,halfSeparator:0,halfSeparatorTop:0,halfSeparatorRight:0,halfSeparatorBottom:0,halfSeparatorLeft:0,halfSeparatorBlockTop:0,halfSeparatorBlockRight:0,halfSeparatorBlockBottom:0,halfSeparatorBlockLeft:0,gridTopSeparator:null,gridRightSeparator:null,gridBottomSeparator:null,gridLeftSeparator:null,setMobilePadding:!1,setDesktopPadding:!1,editedFromBackend:!1,filterRule:!1,filterCoords:[],forceMasonryPositions:!1},function(){g.call(this),u.call(this),f.call(this),k.call(this),B.call(this),o.call(this),n.call(this),h.call(this),p.call(this),y.call(this),this.calcAllBlocksHeights(),this.calcAllBlocksTops(),c.call(this),s.push(this)}.call(this)}function o(){this.properties.gridWidth=this.element.offsetWidth,this.properties.singleWidth=this.properties.gridWidth/this.options.columns,"fixed"===this.properties.layout?this.properties.singleHeight=this.properties.singleWidth:"masonry"===this.properties.layout&&(this.properties.singleHeight=5)}function h(){if(this.properties.forceMasonryPositions=!1,"masonry"!==this.properties.layout)for(let t=0;t<this.gridBlocksTotal;t++)if(-1!==this.gridBlocks[t].blockData.getAttribute("data-block_custom_class").indexOf(this.REX_BLOCK_FORCE_MASONRY_CLASSNAME)){this.properties.forceMasonryPositions=!0;break}}function p(){var t,e,i;this.properties.fullHeight&&(t=d.call(this),e=this.properties.gridTopSeparator-this.properties.halfSeparatorTop,i=this.properties.gridBottomSeparator-this.properties.halfSeparatorBottom,0!==t)&&(this.properties.singleHeight=(r.height*this.properties.fullHeightScale+this.properties.fullHeightOffset-(e+i))/t)}function n(){for(var t,e=Array.prototype.slice.call(this.element.getElementsByClassName("perfect-grid-item")),i=0,i=0;i<e.length;i++)w.hasClass(e[i],"rex-block--no-flow")?this.noFlowBlocks.push(e[i]):(t=new a({el:e[i],id:e[i].getAttribute("data-rexbuilder-block-id"),w:parseInt(e[i].getAttribute("data-gs-width")),h:parseInt(e[i].getAttribute("data-gs-height")),x:parseInt(e[i].getAttribute("data-gs-x")),y:parseInt(e[i].getAttribute("data-gs-y")),hide:w.hasClass(e[i],"rex-hide-element"),toCheck:!1}),m.call(this,t),this.gridBlocks.push(t));this.gridBlocksTotal=this.gridBlocks.length,this.sortBlocks(),this.properties.id=this.element.dataset.rexGridId}function C(t){var e,i,s=t.querySelector(".text-wrap"),r=0;return s&&(t=w.hasClass(t,"block-has-slider"),e=0!==s.textContent.trim().length,i=0!==s.childElementCount,t||!e&&!i||(r=s.offsetHeight)),r}function c(t){this.properties.gridHeightSettable&&(t=d.call(this,t),this.element.style.minHeight=t*this.properties.singleHeight+"px")}function d(t){for(var e,i=0,s=0,r=(t=void 0!==t?t:this.gridBlocks).length,s=0;s<r;s++)t[s].hide||i<(e=t[s].h+t[s].y)&&(i=e);return i}function g(){"true"!=this.sectionData.getAttribute("data-row_edited_live")&&(this.properties.editedFromBackend=!0),this.properties.layout=this.element.getAttribute("data-layout"),this.properties.noMobileLayoutSaved="true"===this.sectionData.getAttribute("data-no-mobile-layout"),this.properties.oneColumnModeActive="true"===this.sectionData.getAttribute("data-collapse-grid"),this.properties.fullHeight="true"===this.element.getAttribute("data-full-height");var t=parseInt(this.element.dataset.fullHeightOffset),t=(this.properties.fullHeightOffset=isNaN(t)?0:t,parseFloat(this.element.dataset.fullHeightScale));this.properties.fullHeightScale=isNaN(t)?1:t}function u(){this.element.getAttribute("data-separator")&&(this.options.gutter=parseInt(this.element.getAttribute("data-separator"))),this.properties.gridTopSeparator=this.element.getAttribute("data-row-separator-top")?parseInt(this.element.getAttribute("data-row-separator-top")):null,this.properties.gridRightSeparator=this.element.getAttribute("data-row-separator-right")?parseInt(this.element.getAttribute("data-row-separator-right")):null,this.properties.gridBottomSeparator=this.element.getAttribute("data-row-separator-bottom")?parseInt(this.element.getAttribute("data-row-separator-bottom")):null,this.properties.gridLeftSeparator=this.element.getAttribute("data-row-separator-left")?parseInt(this.element.getAttribute("data-row-separator-left")):null}function f(){w.isEven(this.options.gutter)?(this.properties.halfSeparatorTop=this.options.gutter/2,this.properties.halfSeparatorRight=this.options.gutter/2,this.properties.halfSeparatorBottom=this.options.gutter/2,this.properties.halfSeparatorLeft=this.options.gutter/2):(this.properties.halfSeparatorTop=Math.floor(this.options.gutter/2),this.properties.halfSeparatorRight=Math.floor(this.options.gutter/2),this.properties.halfSeparatorBottom=Math.ceil(this.options.gutter/2),this.properties.halfSeparatorLeft=Math.ceil(this.options.gutter/2))}function k(){w.isEven(this.options.gutter)?(this.properties.halfSeparatorBlockTop=this.options.gutter/2,this.properties.halfSeparatorBlockRight=this.options.gutter/2,this.properties.halfSeparatorBlockBottom=this.options.gutter/2,this.properties.halfSeparatorBlockLeft=this.options.gutter/2):(this.properties.halfSeparatorBlockTop=Math.floor(this.options.gutter/2),this.properties.halfSeparatorBlockRight=Math.floor(this.options.gutter/2),this.properties.halfSeparatorBlockBottom=Math.ceil(this.options.gutter/2),this.properties.halfSeparatorBlockLeft=Math.ceil(this.options.gutter/2))}function B(){this.properties.setDesktopPadding&&(this.properties.setDesktopPadding||this.properties.setMobilePadding||"true"!=this.section.getAttribute("data-rex-collapse-grid"))||(this.properties.setDesktopPadding=!0,"true"==this.section.getAttribute("data-rex-collapse-grid")?this.properties.setMobilePadding=!0:this.properties.setMobilePadding=!1,null!==this.properties.gridTopSeparator?this.element.style.marginTop=this.properties.gridTopSeparator-this.properties.halfSeparatorTop+"px":this.element.style.marginTop=this.properties.halfSeparatorTop+"px",null!==this.properties.gridBottomSeparator?this.element.style.marginBottom=this.properties.gridBottomSeparator-this.properties.halfSeparatorBottom+"px":this.element.style.marginBottom=this.properties.halfSeparatorBottom+"px",null!==this.properties.gridLeftSeparator?this.element.style.marginLeft=this.properties.gridLeftSeparator-this.properties.halfSeparatorLeft+"px":this.element.style.marginLeft=this.properties.halfSeparatorLeft+"px",null!==this.properties.gridRightSeparator?this.element.style.marginRight=this.properties.gridRightSeparator-this.properties.halfSeparatorRight+"px":this.element.style.marginRight=this.properties.halfSeparatorRight+"px")}function y(){for(var t,e=0,e=0;e<this.gridBlocksTotal;e++)(t=this.gridBlocks[e].el.querySelector(".grid-stack-item-content")).style.paddingTop=this.properties.halfSeparatorBlockTop+"px",t.style.paddingRight=this.properties.halfSeparatorBlockRight+"px",t.style.paddingBottom=this.properties.halfSeparatorBlockBottom+"px",t.style.paddingLeft=this.properties.halfSeparatorBlockLeft+"px"}function m(t){var e=t.el,i=e.querySelector(".natural-image-background");null!==i&&(null===(e=e.querySelector(".grid-item-content"))?console.warn("No .grid-item-content Element found in function fixNaturalImage!"):(e=parseInt(e.getAttribute("data-background_image_width")),this.properties.singleWidth*t.w-this.options.gutter<e&&w.addClass(i,"small-width")))}function b(t,e){"masonry"===this.properties.layout?t.setAttribute("data-block_height_masonry",e):t.setAttribute("data-block_height_fixed",e),t.setAttribute("data-gs_height",e),t.setAttribute("data-block_height_calculated",e)}function x(t){if(0!==t.length){var e,s=new IndexedGrid(this.options.columns);for(t[0].x=0,t[0].y=0,s.setGrid(0,0,t[0].w,t[0].h),i=1;i<t.length;i++)(e=s.willFit(t[i].w,t[i].h))&&(e=w.getCoord(e,this.options.columns),s.setGrid(e.x,e.y,t[i].w,t[i].h),t[i].x=e.x,t[i].y=e.y)}}function A(t,e){t.h=e,t.setHeight&&(t.el.style.height=t.h*this.properties.singleHeight+"px"),t.el.setAttribute("data-gs-height",t.h),t.el.setAttribute("data-height",t.h),t.toCheck=!0}return a.prototype.refreshProperties=function(){this.refreshCoords(),this.refreshHide(),this.refreshDOMIndex()},a.prototype.refreshCoords=function(){this.w=parseInt(this.el.getAttribute("data-gs-width")),this.h=parseInt(this.el.getAttribute("data-gs-height")),this.x=parseInt(this.el.getAttribute("data-gs-x")),this.y=parseInt(this.el.getAttribute("data-gs-y")),this.start_h=parseInt(this.blockData.getAttribute("data-gs_start_h")),this.start_x=this.x,this.start_y=this.y},a.prototype.refreshHide=function(){this.hide=w.hasClass(this.el,"rex-hide-element")},a.prototype.refreshDOMIndex=function(){this.domIndex=this.x+12*this.y},a.prototype.destroy=function(){this.el.style.top="",this.el.style.height=""},t.prototype.isMasonry=function(){return"masonry"===this.properties.layout},t.prototype.isFixed=function(){return"fixed"===this.properties.layout},t.prototype.calcAllBlocksHeights=function(){for(var t=0,t=0;t<this.gridBlocksTotal;t++)this.gridBlocks[t].setHeight&&this.calcAndSetBlockHeight(this.gridBlocks[t])},t.prototype.calcAndSetBlockHeight=function(t){t.el.style.height=this.properties.singleHeight*t.h+"px"},t.prototype.fixAllBlocksHeights=function(){for(var t=0,t=0;t<this.gridBlocksTotal;t++)this.gridBlocks[t].hide||this.fixBlockHeight(this.gridBlocks[t])},t.prototype.fixBlockHeight=function(t){var e=(this.properties.oneColumnModeActive?function(t){var e=(a=t.el).querySelector(".rexbuilder-block-data"),i=a.querySelector(".text-wrap"),s=a.querySelector(".rex-image-wrapper"),r=a.querySelector(".grid-item-content"),o=-1!==a.className.indexOf("block-has-slider"),l=-1!==r.className.indexOf("youtube-player"),a=0!==[].slice.call(a.getElementsByClassName("rex-video-wrap")).length,h=-1!==r.className.indexOf("vimeo-player"),p=!1,n=null,c=t.h*this.properties.singleHeight,r=(Math.round(c/this.properties.singleHeight),i&&(p=0!==(c=C.call(this,t.el)),n=c+this.options.gutter),!p&&s&&(i=parseInt(r.getAttribute("data-background_image_width")),c=parseInt(r.getAttribute("data-background_image_height")),this.properties.singleWidth*t.w-this.options.gutter<i?(n=c*(t.w*this.properties.singleWidth-this.options.gutter)/i,w.addClass(s,"small-width")):(n=c+this.options.gutter,w.removeClass(s,"small-width"))),!p&&(l||a||h)&&(n=Math.round(t.w*this.properties.singleWidth*.75)),parseFloat(e.getAttribute("data-slider_ratio")));return o&&!isNaN(r)&&(n=isNaN(r)?t.w*this.properties.singleWidth*.75:t.w*this.properties.singleWidth*r),Math.round(n/this.properties.singleHeight)}:function(t){var e=t.el,i=t.blockData,s=t.start_h,r=this.properties.singleWidth,o=this.options.gutter,l=t.w,a=t.start_h*this.properties.singleHeight-o,h=parseInt(i.getAttribute("data-element_real_fluid")),p=0,n=0,c=0,d=0,g=!1,u=i.getAttribute("data-type_bg_block"),f=w.hasClass(e,"fit-natural-bg-image"),k=e.querySelector(".grid-item-content"),B=null,y=!1,m=!1,b=!1,x=!1,A=!1;if(k&&(m=-1!==k.className.indexOf("empty-content"),B=k.querySelector(".rex-image-wrapper"),y=-1!==e.className.indexOf("block-has-slider"),b=-1!==k.className.indexOf("youtube-player"),x=-1!==k.className.indexOf("mp4-player"),A=-1!==k.className.indexOf("vimeo-player")),i=-1!==i.getAttribute("data-block_custom_class").indexOf(this.REX_BLOCK_FORCE_MASONRY_CLASSNAME),y)return null;e=C.call(this,e),this.properties.oneColumnModeActive&&(l=this.options.columns),0===e&&(null!==B&&(B=parseInt(k.getAttribute("data-background_image_width")),k=parseInt(k.getAttribute("data-background_image_height")),v=this.properties.singleWidth*t.w,p=f?k*v/B-o:v<B?k*(l*r-o)/B:k),(b||x||A)&&(n=t.start_h*this.properties.singleHeight),y&&(d=t.start_h*this.properties.singleHeight),0==n)&&0==p&&0==d&&(m||y)&&(c=this.properties.editedFromBackend&&"masonry"==this.properties.layout?Math.round(r*s):s*this.properties.singleHeight),y||0!=p||0!=n||0!=e||(g=!0),f=y||b||A||x||!("full"===u&&0===e||""===u&&0===e)?Math.max(0,p,n,c,e,d):s*this.properties.singleHeight-o;let S=!0;var v=!1;return 0!==e?("fixed"===this.properties.layout||1!==h&&"masonry"===this.properties.layout)&&f<=a&&(t.h>t.start_h?v=!0:S=!1):0!==p?("fixed"===this.properties.layout||"masonry"===this.properties.layout&&("natural"===u&&1!==h||"full"===u)&&f<=a)&&(S=!1):0!==n&&"masonry"===this.properties.layout&&(S=!1),v?t.start_h:(S=i||S)?"fixed"==this.properties.layout&&(g||b||x||A)?Math.round((f+o)/this.properties.singleHeight):Math.ceil((f+o)/this.properties.singleHeight):null}).call(this,t);t.toCheck=!0,null===e||isNaN(e)||(b.call(this,t.blockData,e),A.call(this,t,e))},t.prototype.fixAllBlockPositions=function(){!0===("masonry"===this.properties.layout||this.properties.forceMasonryPositions)&&!function(){for(var t=0,t=0;t<this.gridBlocksTotal;t++)this.gridBlocks[t].el.setAttribute("data-gs-y",0),this.gridBlocks[t].blockData.setAttribute("data-gs-y",0),this.gridBlocks[t].setTop&&(this.gridBlocks[t].el.style.top="0px"),this.gridBlocks[t].y=0,this.gridBlocks[t].toCheck=!0}.call(this),function(){for(var t,e=0,i=0,e=0;e<this.gridBlocksTotal;e++)if(this.gridBlocks[e].toCheck&&!this.gridBlocks[e].hide){for(i=0;i<this.gridBlocksTotal;i++)this.gridBlocks[e].el!==this.gridBlocks[i].el&&this.gridBlocks[e].x<this.gridBlocks[i].x+this.gridBlocks[i].w&&this.gridBlocks[e].x+this.gridBlocks[e].w>this.gridBlocks[i].x&&this.gridBlocks[e].y<this.gridBlocks[i].y+this.gridBlocks[i].h&&this.gridBlocks[e].y+this.gridBlocks[e].h>this.gridBlocks[i].y&&(t=this.gridBlocks[e].y+this.gridBlocks[e].h-this.gridBlocks[i].y,t=this.gridBlocks[i].y+t,this.gridBlocks[i].el.setAttribute("data-gs-y",t),this.gridBlocks[i].blockData.setAttribute("data-gs-y",t),this.gridBlocks[i].setTop&&(this.gridBlocks[i].el.style.top=t*this.properties.singleHeight+"px"),this.gridBlocks[i].y=t,this.gridBlocks[i].domIndex=this.gridBlocks[i].x+this.gridBlocks[i].y*this.options.columns,this.gridBlocks[i].toCheck=!0);this.gridBlocks[e].toCheck=!1}}.call(this)},t.prototype.calcAllBlocksTops=function(){for(var t,e,i=0,i=0;i<this.gridBlocksTotal;i++)t=this.gridBlocks[i].el,"fixed"===this.properties.layout&&(this.gridBlocks[i].y=this.gridBlocks[i].start_y),this.gridBlocks[i].setTop&&(e=this.properties.singleHeight*this.gridBlocks[i].y,t.style.top=e+"px")},t.prototype.fixAfterLoad=function(){this.fixAllBlocksHeights(),this.fixAllBlockPositions(),c.call(this)},t.prototype.updateGridBlocks=function(){for(var t=0,t=0;t<this.gridBlocksTotal;t++)this.gridBlocks[t].refreshProperties()},t.prototype.sortBlocks=function(){this.gridBlocks.sort(function(t,e){return t.domIndex-e.domIndex})},t.prototype.endChangeLayout=function(){if(!function(){this.gridBlocksTotal=0,this.gridBlocks=[],this.noFlowBlocks=[]}.call(this),n.call(this),h.call(this),!function(){for(let t=0;t<this.noFlowBlocks.length;t++)this.noFlowBlocks[t].querySelector(".grid-stack-item-content").style.padding="",this.noFlowBlocks[t].style.height="",this.noFlowBlocks[t].style.top="",this.noFlowBlocks[t].style.left=""}.call(this),g.call(this),u.call(this),f.call(this),k.call(this),this.properties.setDesktopPadding=!1,B.call(this),p.call(this),y.call(this),this.properties.noMobileLayoutSaved){for(var t,e=Array.prototype.slice.call(this.element.getElementsByClassName("perfect-grid-item")),i=e.length,s=[],r=0;r<i;r++)for(t=0;t<this.gridBlocksTotal;t++)e[r]===this.gridBlocks[t].el&&(s[r]=this.gridBlocks[t]);this.gridBlocks=s}this.updateGridBlocks(),this.sortBlocks()},t.prototype.endResize=function(){if(o.call(this),p.call(this),this.isFiltered()){this.calcAllBlocksHeights(),this.fixAllBlocksHeights(),this.fixAllBlockPositions();for(e=0;e<this.gridBlocksTotal;e++)for(var t=0;t<this.properties.filterCoords.length;t++)if(this.properties.filterCoords[t].el===this.gridBlocks[e].el){this.properties.filterCoords[t].w=this.gridBlocks[e].w,this.properties.filterCoords[t].h=this.gridBlocks[e].h,this.properties.filterCoords[t].x=this.gridBlocks[e].x,this.properties.filterCoords[t].y=this.gridBlocks[e].y;break}x.call(this,this.properties.filterCoords);for(e=0;e<this.properties.filterCoords.length;e++)this.properties.filterCoords[e].el.style.left=this.properties.filterCoords[e].x*this.properties.singleWidth+"px",this.properties.filterCoords[e].el.style.top=this.properties.filterCoords[e].y*this.properties.singleHeight+"px";c.call(this,this.properties.filterCoords)}else{if("*"===this.properties.filterRule)for(var e=0;e<this.gridBlocksTotal;e++)this.gridBlocks[e].el.style.left="";this.calcAllBlocksHeights(),this.calcAllBlocksTops(),this.fixAllBlocksHeights(),this.fixAllBlockPositions(),c.call(this)}},t.prototype.getRexBlockInstance=function(t){for(var e=0,e=0;e<this.gridBlocksTotal;e++)if(t===this.gridBlocks[e].el)return this.gridBlocks[e];return null},t.prototype.reCalcBlockHeight=function(t){var e=this.getRexBlockInstance(t),t=C.call(this,t),t=Math.ceil((t+this.options.gutter)/this.properties.singleHeight);b.call(this,e.blockData,t),A.call(this,e,t),this.fixAllBlockPositions(),c.call(this)},t.prototype.isFiltered=function(){return"string"==typeof this.properties.filterRule&&"*"!==this.properties.filterRule},t.prototype.filter=function(t){var e,i=[],s=[],r=[];if("*"==(this.properties.filterRule=t))for(e=0;e<this.gridBlocksTotal;e++)i.push(this.gridBlocks[e].el),s.push({x:this.gridBlocks[e].x,y:this.gridBlocks[e].y,w:this.gridBlocks[e].w,h:this.gridBlocks[e].h}),this.gridBlocks[e].hide=!1;else for(e=0;e<this.gridBlocksTotal;e++)w.hasClass(this.gridBlocks[e].el,t)?(i.push(this.gridBlocks[e].el),s.push({el:this.gridBlocks[e].el,x:0,y:0,w:this.gridBlocks[e].w,h:this.gridBlocks[e].h}),this.gridBlocks[e].hide=!1):(this.gridBlocks[e].hide=!0,r.push(this.gridBlocks[e].el));x.call(this,s),this.properties.filterCoords=s;var o=this;anime.timeline({duration:200,easing:"easeInOutQuad",begin:function(t){},complete:function(t){c.call(o,s),function(t,e){var i;e=void 0===e?null:e,l.CustomEvent&&"function"==typeof l.CustomEvent?i=new CustomEvent(t,{detail:e}):(i=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,e),this.element.dispatchEvent(i)}.call(o,"rex-grid-filter-end")}}).add({targets:i,scale:1,opacity:1,left:function(t,e){return s[e].x*o.properties.singleWidth+"px"},top:function(t,e){return s[e].y*o.properties.singleHeight+"px"},begin:function(t){t.animatables.forEach(function(t){w.removeClass(t.target,"rex-block--filtered")})}}).add({targets:r,scale:0,opacity:0,complete:function(t){t.animatables.forEach(function(t){w.addClass(t.target,"rex-block--filtered")})}},"-=200")},t.prototype.addGridBlock=function(t,e,i,s,r){void 0!==e?(e=parseInt(e),t.setAttribute("data-gs-width",e)):e=parseInt(t.getAttribute("data-gs-width")),void 0!==i?(i=parseInt(i),t.setAttribute("data-gs-height",i)):i=parseInt(t.getAttribute("data-gs-height")),void 0!==s?(s=parseInt(s),t.setAttribute("data-gs-x",s)):s=parseInt(t.getAttribute("data-gs-x")),void 0!==r?(r=parseInt(r),t.setAttribute("data-gs-y",r)):r=parseInt(t.getAttribute("data-gs-y"));var o=t.querySelector(".rexbuilder-block-data"),o=(o.setAttribute("data-gs_width",e),o.setAttribute("data-gs_height",i),o.setAttribute("data-gs_x",s),o.setAttribute("data-gs_y",r),o.setAttribute("data-gs_start_h",i),new a({el:t,id:t.getAttribute("data-rexbuilder-block-id"),w:e,h:i,x:s,y:r,hide:w.hasClass(t,"rex-hide-element"),toCheck:!1})),e=t.querySelector(".grid-stack-item-content");e.style.paddingTop=this.properties.halfSeparatorBlockTop+"px",e.style.paddingRight=this.properties.halfSeparatorBlockRight+"px",e.style.paddingBottom=this.properties.halfSeparatorBlockBottom+"px",e.style.paddingLeft=this.properties.halfSeparatorBlockLeft+"px",this.gridBlocks.push(o),this.gridBlocksTotal=this.gridBlocks.length},t.prototype.addGridBlocksAccordingToLayoutData=function(t,e){if(Array.isArray(t)||(t=Array.prototype.slice.call(t)),!Array.isArray(e))throw new Error("Layout data passed is not an array!");for(var i=0;i<t.length;i++){var s,r=t[i],o=r.getAttribute("data-rexbuilder-block-id");(s=e.filter(function(t){return o===t.name})[0]).props.length;if(!s)throw new Error("Block with ID "+o+" is not in the archive data!");this.addGridBlock(r,s.props.gs_width,s.props.gs_height,s.props.gs_x,s.props.gs_y)}},t.prototype.removeGridBlock=function(t,e){e=void 0!==e?e:{removeFromDOM:!0};for(var i=null,s=0;s<this.gridBlocksTotal;s++)if(this.gridBlocks[s].el===t){i=s;break}null!==i&&(e.removeFromDOM&&this.gridBlocks[i].el.parentNode.removeChild(this.gridBlocks[i].el),this.gridBlocks.splice(i,1),this.gridBlocksTotal=this.gridBlocks.length)},t.prototype.removeGridBlocks=function(t,e){Array.isArray(t)||(t=Array.prototype.slice.call(t));var i=this.removeGridBlock.bind(this);t.forEach(function(t){i(t,e)})},t.prototype.removeAllGridBlocks=function(){for(var t=0;t<this.gridBlocksTotal;t++)this.gridBlocks[t].el.parentNode&&this.gridBlocks[t].el.parentNode.removeChild(this.gridBlocks[t].el);this.gridBlocks=[],this.gridBlocksTotal=0},t.prototype.destroy=function(){var t;for(this.element.style.minHeight="",t=0;t<this.gridBlocksTotal;t++)this.gridBlocks[t].destroy();s=s.filter(function(t){return t.element!==this.element}.bind(this))},t.prototype.setFullHeightOffset=function(t){t?"number"!=typeof(t="string"==typeof t?parseInt(t):t)||isNaN(t)?console.error("The offset passed must be either a String or a Number"):(this.element.dataset.fullHeightOffset=t,this.properties.fullHeightOffset=t):console.error("An offset must be passed!")},t.destroyAll=function(){s.forEach(function(t){t.destroy()})},t.data=function(t){for(var e=0,i=s.length,e=0;e<i;e++)if(t===s[e].element)return s[e];return null},t.updateViewportSize=function(){r=w.viewport()},t});
var Rex_Navigator=function(u){"use strict";var a,o,i,r,e,d=function(){var e,t;r.each(function(){e=u(this),null!==this.getAttribute("id")&&""!=this.getAttribute("id")&&(t=document.querySelector('.vertical-nav a[href="#'+this.getAttribute("id")+'"]'))&&(t=t.getAttribute("data-number")-1,e.offset().top-Rexbuilder_Util.globalViewport.height/2<Rexbuilder_Util.$window.scrollTop()&&e.offset().top+e.height()-Rexbuilder_Util.globalViewport.height/2>Rexbuilder_Util.$window.scrollTop()?i.eq(t).addClass("is-selected"):i.eq(t).removeClass("is-selected"))})};function s(){r=Rexbuilder_Util.$rexContainer.children(".rexpansive_section"),(e=r.get()).length,(e=e.filter(function(e){return e.getAttribute("id")&&""!==e.getAttribute("id")})).length,t(),n(),a&&d()}var t=function(){i=Rexbuilder_Util.$document.find(".vertical-nav a")},n=function(){o=Rexbuilder_Util.$document.find(".touch .vertical-nav a")},c={};function v(){for(var e=Array.prototype.slice.call(document.querySelectorAll(".vertical-nav-link[href]")),t=0;t<e.length;t++){var i=e[t].getAttribute("href"),r=e[t].getBoundingClientRect();c[i]=r}}return{init:function(){var r,e=Rexbuilder_Util.$document.find('nav[class*="vertical-nav"]'),i=(0!=e.length&&e.hasClass("nav-editor-mode-disable")&&(r=e,Rexbuilder_Util.$rexContainer.children(".rexpansive_section").each(function(e,t){var i,t=u(t).attr("data-rexlive-section-name");""!=t&&(i=t.replace(/ /gm,""),tmpl.arg="navigator",t=tmpl("tmpl-navigator-item",{sectionName:t,sectionID:i,number:e+1}),r.children("ul").append(t))})),(a=document.querySelector(".vertical-nav"))&&(Rexbuilder_Util.$window.on("scroll",function(){d()}),Rexbuilder_Util.$document.on("click",".vertical-nav a",function(e){e.preventDefault();e=u(e.target),e=(e=e.is("a")?e:e.parents("a")).attr("href"),e=Rexbuilder_Util.$rexContainer.children(e);Rexbuilder_Util.smoothScroll(e)}),Rexbuilder_Util.$document.on("click",".touch .vertical-nav a",function(){o.find(".rex-label").removeClass("fadeInAndOut"),u(this).find(".rex-label").addClass("fadeInAndOut"),Rexbuilder_Util.$document.find(".touch .vertical-nav").removeClass("open")})),s(),v(),document.getElementById("vertical-nav-label")),t=Array.prototype.slice.call(document.querySelectorAll(".vertical-nav-link[href]"));if(null!==i)for(var n=i.getAttribute("data-nav-position")||"right",l=0;l<t.length;l++)t[l].addEventListener("mouseenter",function(e){var t=e.target.getAttribute("href"),e=e.target.getAttribute("data-section_nav_label"),e=(e?i.innerHTML=e:i.innerText=t.replace("#","").replace(/\-/g," "),i.style.display="inline",i.style.opacity="1",i.style.top=c[t].top+c[t].height/2-i.offsetHeight/2+"px",1.5*c[t].width+"px");"right"===n?i.style.right=e:i.style.left=e}),t[l].addEventListener("mouseleave",function(e){i.style.display="none",i.style.opacity="0"})},updateNavigator:s,updateNavigatorItem:function(e,t,i){var r=Rexbuilder_Util.$document.find('nav[class*="vertical-nav"]');if(""!=t){if(""==e.attr("id")){var n=Rexbuilder_Util.$rexContainer.children(".rexpansive_section").length,l=Rexbuilder_Util.$rexContainer.children('.rexpansive_section[id=""]').length,a=e,o="";do{if(""!=(o=(a=a.next()).attr("id")))break}while(0!=a.length);n=n-l+1,l=(tmpl.arg="navigator",tmpl("tmpl-navigator-item",{sectionName:i,sectionID:t,number:n}));""==o||null==o?r.children("ul").append(l):u(l).insertBefore(r.find('li a[href="#'+o+'"]').parent())}else{var d,c=e.attr("id");(d=r.find('li a[href="#'+c+'"]')).attr("href","#"+t),d.find(".label").text(i)}e.attr("id",t),e.attr("href","#"+t)}else""!=e.attr("id")&&(c=e.attr("id"),(d=r.find('li a[href="#'+c+'"]').parent()).remove(),e.attr("id",""),e.removeAttr("href"));s()},fixNavigatorItemOrder:function(e){if(null!=e.attr("id")&&""!=e.attr("id")){var t=e.attr("id"),i=Rexbuilder_Util.$document.find('nav[class*="vertical-nav"]'),t=i.find('li a[href="#'+t+'"]').parent(),r=e,n="";do{if(""!=(n=(r=r.next()).attr("id")))break}while(0!=r.length);""==n||null==n?i.children("ul").append(t[0]):t.insertBefore(i.find('li a[href="#'+n+'"]').parent())}},getNavigationDotsPosition:v}}(jQuery);
/*!
 * Flickity PACKAGED v2.3.0
 * Touch, responsive, flickable carousels
 *
 * Licensed GPLv3 for open source use
 * or Flickity Commercial License for commercial use
 *
 * https://flickity.metafizzy.co
 * Copyright 2015-2021 Metafizzy
 */
!function(e,i){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(t){return i(e,t)}):"object"==typeof module&&module.exports?module.exports=i(e,require("jquery")):e.jQueryBridget=i(e,e.jQuery)}(window,function(t,e){"use strict";var i=Array.prototype.slice,n=t.console,d=void 0===n?function(){}:function(t){n.error(t)};function s(l,h,c){(c=c||e||t.jQuery)&&(h.prototype.option||(h.prototype.option=function(t){c.isPlainObject(t)&&(this.options=c.extend(!0,this.options,t))}),c.fn[l]=function(t){var e,n,s,o,r,a;return"string"==typeof t?(e=i.call(arguments,1),s=e,r="$()."+l+'("'+(n=t)+'")',(e=this).each(function(t,e){var i,e=c.data(e,l);e?(i=e[n])&&"_"!=n.charAt(0)?(i=i.apply(e,s),o=void 0===o?i:o):d(r+" is not a valid method"):d(l+" not initialized. Cannot call methods, i.e. "+r)}),void 0!==o?o:e):(a=t,this.each(function(t,e){var i=c.data(e,l);i?(i.option(a),i._init()):(i=new h(e,a),c.data(e,l,i))}),this)},o(c))}function o(t){t&&!t.bridget&&(t.bridget=s)}return o(e||t.jQuery),s}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){var i;if(t&&e)return-1==(i=(i=this._events=this._events||{})[t]=i[t]||[]).indexOf(e)&&i.push(e),this},e.once=function(t,e){var i;if(t&&e)return this.on(t,e),((i=this._onceEvents=this._onceEvents||{})[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){t=this._events&&this._events[t];if(t&&t.length)return-1!=(e=t.indexOf(e))&&t.splice(e,1),this},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],s=0;s<i.length;s++){var o=i[s];n&&n[o]&&(this.off(t,o),delete n[o]),o.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t}),
/*!
 * getSize v2.0.3
 * measure size of elements
 * MIT license
 */
function(t,e){"function"==typeof define&&define.amd?define("get-size/get-size",e):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function m(t){var e=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(e)&&e}var e="undefined"==typeof console?function(){}:function(t){console.error(t)},v=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],y=v.length;function b(t){t=getComputedStyle(t);return t||e("Style returned "+t+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),t}var E,S=!1;function C(t){if(S||(S=!0,(c=document.createElement("div")).style.width="200px",c.style.padding="1px 2px 3px 4px",c.style.borderStyle="solid",c.style.borderWidth="1px 2px 3px 4px",c.style.boxSizing="border-box",(h=document.body||document.documentElement).appendChild(c),o=b(c),E=200==Math.round(m(o.width)),C.isBoxSizeOuter=E,h.removeChild(c)),(t="string"==typeof t?document.querySelector(t):t)&&"object"==typeof t&&t.nodeType){var e=b(t);if("none"==e.display){for(var i={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},n=0;n<y;n++)i[v[n]]=0;return i}for(var s={},o=(s.width=t.offsetWidth,s.height=t.offsetHeight,s.isBorderBox="border-box"==e.boxSizing),r=0;r<y;r++){var a=v[r],l=e[a],l=parseFloat(l);s[a]=isNaN(l)?0:l}var h=s.paddingLeft+s.paddingRight,c=s.paddingTop+s.paddingBottom,t=s.marginLeft+s.marginRight,d=s.marginTop+s.marginBottom,u=s.borderLeftWidth+s.borderRightWidth,p=s.borderTopWidth+s.borderBottomWidth,f=o&&E,g=m(e.width),g=(!1!==g&&(s.width=g+(f?0:h+u)),m(e.height));return!1!==g&&(s.height=g+(f?0:c+p)),s.innerWidth=s.width-(h+u),s.innerHeight=s.height-(c+p),s.outerWidth=s.width+t,s.outerHeight=s.height+d,s}}return C}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var i=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i]+"MatchesSelector";if(t[n])return n}}();return function(t,e){return t[i](e)}}),function(e,i){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(t){return i(e,t)}):"object"==typeof module&&module.exports?module.exports=i(e,require("desandro-matches-selector")):e.fizzyUIUtils=i(e,e.matchesSelector)}(window,function(i,o){var l={extend:function(t,e){for(var i in e)t[i]=e[i];return t},modulo:function(t,e){return(t%e+e)%e}},e=Array.prototype.slice,h=(l.makeArray=function(t){return Array.isArray(t)?t:null==t?[]:"object"==typeof t&&"number"==typeof t.length?e.call(t):[t]},l.removeFrom=function(t,e){e=t.indexOf(e);-1!=e&&t.splice(e,1)},l.getParent=function(t,e){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,o(t,e))return t},l.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},l.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},l.filterFindElements=function(t,n){t=l.makeArray(t);var s=[];return t.forEach(function(t){if(t instanceof HTMLElement)if(n){o(t,n)&&s.push(t);for(var e=t.querySelectorAll(n),i=0;i<e.length;i++)s.push(e[i])}else s.push(t)}),s},l.debounceMethod=function(t,e,n){n=n||100;var s=t.prototype[e],o=e+"Timeout";t.prototype[e]=function(){var t=this[o],e=(clearTimeout(t),arguments),i=this;this[o]=setTimeout(function(){s.apply(i,e),delete i[o]},n)}},l.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},l.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()},i.console);return l.htmlInit=function(r,a){l.docReady(function(){var t=l.toDashed(a),n="data-"+t,e=document.querySelectorAll("["+n+"]"),t=document.querySelectorAll(".js-"+t),e=l.makeArray(e).concat(l.makeArray(t)),s=n+"-options",o=i.jQuery;e.forEach(function(t){var e=t.getAttribute(n)||t.getAttribute(s);try{i=e&&JSON.parse(e)}catch(e){return void(h&&h.error("Error parsing "+n+" on "+t.className+": "+e))}var i=new r(t,i);o&&o.data(t,a,i)})})},l}),function(t,e){"function"==typeof define&&define.amd?define("flickity/js/cell",["get-size/get-size"],function(t){return e(0,t)}):"object"==typeof module&&module.exports?module.exports=e(0,require("get-size")):(t.Flickity=t.Flickity||{},t.Flickity.Cell=e(0,t.getSize))}(window,function(t,e){function i(t,e){this.element=t,this.parent=e,this.create()}var n=i.prototype;return n.create=function(){this.element.style.position="absolute",this.element.setAttribute("aria-hidden","true"),this.x=0,this.shift=0,this.element.style[this.parent.originSide]=0},n.destroy=function(){this.unselect(),this.element.style.position="";var t=this.parent.originSide;this.element.style[t]="",this.element.style.transform="",this.element.removeAttribute("aria-hidden")},n.getSize=function(){this.size=e(this.element)},n.setPosition=function(t){this.x=t,this.updateTarget(),this.renderPosition(t)},n.updateTarget=n.setDefaultTarget=function(){var t="left"==this.parent.originSide?"marginLeft":"marginRight";this.target=this.x+this.size[t]+this.size.width*this.parent.cellAlign},n.renderPosition=function(t){var e="left"===this.parent.originSide?1:-1,t=this.parent.options.percentPosition?t*e*(this.parent.size.innerWidth/this.size.width):t*e;this.element.style.transform="translateX("+this.parent.getPositionValue(t)+")"},n.select=function(){this.element.classList.add("is-selected"),this.element.removeAttribute("aria-hidden")},n.unselect=function(){this.element.classList.remove("is-selected"),this.element.setAttribute("aria-hidden","true")},n.wrapShift=function(t){this.shift=t,this.renderPosition(this.x+this.parent.slideableWidth*t)},n.remove=function(){this.element.parentNode.removeChild(this.element)},i}),function(t,e){"function"==typeof define&&define.amd?define("flickity/js/slide",e):"object"==typeof module&&module.exports?module.exports=e():(t.Flickity=t.Flickity||{},t.Flickity.Slide=e())}(window,function(){"use strict";function t(t){this.parent=t,this.isOriginLeft="left"==t.originSide,this.cells=[],this.outerWidth=0,this.height=0}var e=t.prototype;return e.addCell=function(t){var e;this.cells.push(t),this.outerWidth+=t.size.outerWidth,this.height=Math.max(t.size.outerHeight,this.height),1==this.cells.length&&(this.x=t.x,e=this.isOriginLeft?"marginLeft":"marginRight",this.firstMargin=t.size[e])},e.updateTarget=function(){var t=this.isOriginLeft?"marginRight":"marginLeft",e=this.getLastCell(),e=e?e.size[t]:0,t=this.outerWidth-(this.firstMargin+e);this.target=this.x+this.firstMargin+t*this.parent.cellAlign},e.getLastCell=function(){return this.cells[this.cells.length-1]},e.select=function(){this.cells.forEach(function(t){t.select()})},e.unselect=function(){this.cells.forEach(function(t){t.unselect()})},e.getCellElements=function(){return this.cells.map(function(t){return t.element})},t}),function(t,e){"function"==typeof define&&define.amd?define("flickity/js/animate",["fizzy-ui-utils/utils"],function(t){return e(0,t)}):"object"==typeof module&&module.exports?module.exports=e(0,require("fizzy-ui-utils")):(t.Flickity=t.Flickity||{},t.Flickity.animatePrototype=e(0,t.fizzyUIUtils))}(window,function(t,e){var i={startAnimation:function(){this.isAnimating||(this.isAnimating=!0,this.restingFrames=0,this.animate())},animate:function(){this.applyDragForce(),this.applySelectedAttraction();var t,e=this.x;this.integratePhysics(),this.positionSlider(),this.settle(e),this.isAnimating&&(t=this,requestAnimationFrame(function(){t.animate()}))},positionSlider:function(){var t=this.x;this.options.wrapAround&&1<this.cells.length&&(t=e.modulo(t,this.slideableWidth),t-=this.slideableWidth,this.shiftWrapCells(t)),this.setTranslateX(t,this.isAnimating),this.dispatchScrollEvent()},setTranslateX:function(t,e){t+=this.cursorPosition,t=this.options.rightToLeft?-t:t;t=this.getPositionValue(t);this.slider.style.transform=e?"translate3d("+t+",0,0)":"translateX("+t+")"},dispatchScrollEvent:function(){var t,e=this.slides[0];e&&(t=(e=-this.x-e.target)/this.slidesWidth,this.dispatchEvent("scroll",null,[t,e]))},positionSliderAtSelected:function(){this.cells.length&&(this.x=-this.selectedSlide.target,this.velocity=0,this.positionSlider())},getPositionValue:function(t){return this.options.percentPosition?.01*Math.round(t/this.size.innerWidth*1e4)+"%":Math.round(t)+"px"},settle:function(t){this.isPointerDown||Math.round(100*this.x)!=Math.round(100*t)||this.restingFrames++,2<this.restingFrames&&(this.isAnimating=!1,delete this.isFreeScrolling,this.positionSlider(),this.dispatchEvent("settle",null,[this.selectedIndex]))},shiftWrapCells:function(t){var e=this.cursorPosition+t,e=(this._shiftCells(this.beforeShiftCells,e,-1),this.size.innerWidth-(t+this.slideableWidth+this.cursorPosition));this._shiftCells(this.afterShiftCells,e,1)},_shiftCells:function(t,e,i){for(var n=0;n<t.length;n++){var s=t[n];s.wrapShift(0<e?i:0),e-=s.size.outerWidth}},_unshiftCells:function(t){if(t&&t.length)for(var e=0;e<t.length;e++)t[e].wrapShift(0)},integratePhysics:function(){this.x+=this.velocity,this.velocity*=this.getFrictionFactor()},applyForce:function(t){this.velocity+=t},getFrictionFactor:function(){return 1-this.options[this.isFreeScrolling?"freeScrollFriction":"friction"]},getRestingPosition:function(){return this.x+this.velocity/(1-this.getFrictionFactor())},applyDragForce:function(){var t;this.isDraggable&&this.isPointerDown&&(t=this.dragX-this.x-this.velocity,this.applyForce(t))},applySelectedAttraction:function(){var t;this.isDraggable&&this.isPointerDown||this.isFreeScrolling||!this.slides.length||(t=(-1*this.selectedSlide.target-this.x)*this.options.selectedAttraction,this.applyForce(t))}};return i}),function(r,a){var t;"function"==typeof define&&define.amd?define("flickity/js/flickity",["ev-emitter/ev-emitter","get-size/get-size","fizzy-ui-utils/utils","./cell","./slide","./animate"],function(t,e,i,n,s,o){return a(r,t,e,i,n,s,o)}):"object"==typeof module&&module.exports?module.exports=a(r,require("ev-emitter"),require("get-size"),require("fizzy-ui-utils"),require("./cell"),require("./slide"),require("./animate")):(t=r.Flickity,r.Flickity=a(r,r.EvEmitter,r.getSize,r.fizzyUIUtils,t.Cell,t.Slide,t.animatePrototype))}(window,function(n,t,e,r,i,a,s){var o=n.jQuery,l=n.getComputedStyle,h=n.console;function c(t,e){for(t=r.makeArray(t);t.length;)e.appendChild(t.shift())}var d=0,u={};function p(t,e){var i,n=r.getQueryElement(t);if(n){if(this.element=n,this.element.flickityGUID)return(i=u[this.element.flickityGUID])&&i.option(e),i;o&&(this.$element=o(this.element)),this.options=r.extend({},this.constructor.defaults),this.option(e),this._create()}else h&&h.error("Bad element for Flickity: "+(n||t))}p.defaults={accessibility:!0,cellAlign:"center",freeScrollFriction:.075,friction:.28,namespaceJQueryEvents:!0,percentPosition:!0,resize:!0,selectedAttraction:.025,setGallerySize:!0},p.createMethods=[];var f=p.prototype,g=(r.extend(f,t.prototype),f._create=function(){var t,e=this.guid=++d;for(t in this.element.flickityGUID=e,(u[e]=this).selectedIndex=0,this.restingFrames=0,this.x=0,this.velocity=0,this.originSide=this.options.rightToLeft?"right":"left",this.viewport=document.createElement("div"),this.viewport.className="flickity-viewport",this._createSlider(),(this.options.resize||this.options.watchCSS)&&n.addEventListener("resize",this),this.options.on){var i=this.options.on[t];this.on(t,i)}p.createMethods.forEach(function(t){this[t]()},this),this.options.watchCSS?this.watchCSS():this.activate()},f.option=function(t){r.extend(this.options,t)},f.activate=function(){this.isActive||(this.isActive=!0,this.element.classList.add("flickity-enabled"),this.options.rightToLeft&&this.element.classList.add("flickity-rtl"),this.getSize(),c(this._filterFindCellElements(this.element.children),this.slider),this.viewport.appendChild(this.slider),this.element.appendChild(this.viewport),this.reloadCells(),this.options.accessibility&&(this.element.tabIndex=0,this.element.addEventListener("keydown",this)),this.emitEvent("activate"),this.selectInitialIndex(),this.isInitActivated=!0,this.dispatchEvent("ready"))},f._createSlider=function(){var t=document.createElement("div");t.className="flickity-slider",t.style[this.originSide]=0,this.slider=t},f._filterFindCellElements=function(t){return r.filterFindElements(t,this.options.cellSelector)},f.reloadCells=function(){this.cells=this._makeCells(this.slider.children),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize()},f._makeCells=function(t){return this._filterFindCellElements(t).map(function(t){return new i(t,this)},this)},f.getLastCell=function(){return this.cells[this.cells.length-1]},f.getLastSlide=function(){return this.slides[this.slides.length-1]},f.positionCells=function(){this._sizeCells(this.cells),this._positionCells(0)},f._positionCells=function(t){this.maxCellHeight=(t=t||0)&&this.maxCellHeight||0;for(var e,i=0,n=(0<t&&(i=(e=this.cells[t-1]).x+e.size.outerWidth),this.cells.length),s=t;s<n;s++){var o=this.cells[s];o.setPosition(i),i+=o.size.outerWidth,this.maxCellHeight=Math.max(o.size.outerHeight,this.maxCellHeight)}this.slideableWidth=i,this.updateSlides(),this._containSlides(),this.slidesWidth=n?this.getLastSlide().target-this.slides[0].target:0},f._sizeCells=function(t){t.forEach(function(t){t.getSize()})},f.updateSlides=function(){var n,s,o;this.slides=[],this.cells.length&&(n=new a(this),this.slides.push(n),s="left"==this.originSide?"marginRight":"marginLeft",o=this._getCanCellFit(),this.cells.forEach(function(t,e){var i;n.cells.length&&(i=n.outerWidth-n.firstMargin+(t.size.outerWidth-t.size[s]),o.call(this,e,i)||(n.updateTarget(),n=new a(this),this.slides.push(n))),n.addCell(t)},this),n.updateTarget(),this.updateSelectedSlide())},f._getCanCellFit=function(){var e,i,t=this.options.groupCells;return t?"number"==typeof t?(e=parseInt(t,10),function(t){return t%e!=0}):(t="string"==typeof t&&t.match(/^(\d+)%$/),i=t?parseInt(t[1],10)/100:1,function(t,e){return e<=(this.size.innerWidth+1)*i}):function(){return!1}},f._init=f.reposition=function(){this.positionCells(),this.positionSliderAtSelected()},f.getSize=function(){this.size=e(this.element),this.setCellAlign(),this.cursorPosition=this.size.innerWidth*this.cellAlign},{center:{left:.5,right:.5},left:{left:0,right:1},right:{right:0,left:1}});return f.setCellAlign=function(){var t=g[this.options.cellAlign];this.cellAlign=t?t[this.originSide]:this.options.cellAlign},f.setGallerySize=function(){var t;this.options.setGallerySize&&(t=this.options.adaptiveHeight&&this.selectedSlide?this.selectedSlide.height:this.maxCellHeight,this.viewport.style.height=t+"px")},f._getWrapShiftCells=function(){var t,e;this.options.wrapAround&&(this._unshiftCells(this.beforeShiftCells),this._unshiftCells(this.afterShiftCells),t=this.cursorPosition,e=this.cells.length-1,this.beforeShiftCells=this._getGapCells(t,e,-1),t=this.size.innerWidth-this.cursorPosition,this.afterShiftCells=this._getGapCells(t,0,1))},f._getGapCells=function(t,e,i){for(var n=[];0<t;){var s=this.cells[e];if(!s)break;n.push(s),e+=i,t-=s.size.outerWidth}return n},f._containSlides=function(){var t,e,i,n,s,o;this.options.contain&&!this.options.wrapAround&&this.cells.length&&(t=(e=this.options.rightToLeft)?"marginRight":"marginLeft",e=e?"marginLeft":"marginRight",i=this.slideableWidth-this.getLastCell().size[e],n=i<this.size.innerWidth,s=this.cursorPosition+this.cells[0].size[t],o=i-this.size.innerWidth*(1-this.cellAlign),this.slides.forEach(function(t){n?t.target=i*this.cellAlign:(t.target=Math.max(t.target,s),t.target=Math.min(t.target,o))},this))},f.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;this.emitEvent(t,n),o&&this.$element&&(n=t+=this.options.namespaceJQueryEvents?".flickity":"",e&&((e=new o.Event(e)).type=t,n=e),this.$element.trigger(n,i))},f.select=function(t,e,i){this.isActive&&(t=parseInt(t,10),this._wrapSelect(t),(this.options.wrapAround||e)&&(t=r.modulo(t,this.slides.length)),this.slides[t])&&(e=this.selectedIndex,this.selectedIndex=t,this.updateSelectedSlide(),i?this.positionSliderAtSelected():this.startAnimation(),this.options.adaptiveHeight&&this.setGallerySize(),this.dispatchEvent("select",null,[t]),t!=e&&this.dispatchEvent("change",null,[t]),this.dispatchEvent("cellSelect"))},f._wrapSelect=function(t){var e=this.slides.length;if(!(this.options.wrapAround&&1<e))return t;var i=r.modulo(t,e),n=Math.abs(i-this.selectedIndex),s=Math.abs(i+e-this.selectedIndex),i=Math.abs(i-e-this.selectedIndex);!this.isDragSelect&&s<n?t+=e:!this.isDragSelect&&i<n&&(t-=e),t<0?this.x-=this.slideableWidth:e<=t&&(this.x+=this.slideableWidth)},f.previous=function(t,e){this.select(this.selectedIndex-1,t,e)},f.next=function(t,e){this.select(this.selectedIndex+1,t,e)},f.updateSelectedSlide=function(){var t=this.slides[this.selectedIndex];t&&(this.unselectSelectedSlide(),(this.selectedSlide=t).select(),this.selectedCells=t.cells,this.selectedElements=t.getCellElements(),this.selectedCell=t.cells[0],this.selectedElement=this.selectedElements[0])},f.unselectSelectedSlide=function(){this.selectedSlide&&this.selectedSlide.unselect()},f.selectInitialIndex=function(){var t=this.options.initialIndex;if(this.isInitActivated)this.select(this.selectedIndex,!1,!0);else{if(t&&"string"==typeof t)if(this.queryCell(t))return void this.selectCell(t,!1,!0);var e=0;t&&this.slides[t]&&(e=t),this.select(e,!1,!0)}},f.selectCell=function(t,e,i){var t=this.queryCell(t);t&&(t=this.getCellSlideIndex(t),this.select(t,e,i))},f.getCellSlideIndex=function(t){for(var e=0;e<this.slides.length;e++)if(-1!=this.slides[e].cells.indexOf(t))return e},f.getCell=function(t){for(var e=0;e<this.cells.length;e++){var i=this.cells[e];if(i.element==t)return i}},f.getCells=function(t){t=r.makeArray(t);var e=[];return t.forEach(function(t){t=this.getCell(t);t&&e.push(t)},this),e},f.getCellElements=function(){return this.cells.map(function(t){return t.element})},f.getParentCell=function(t){var e=this.getCell(t);return e||(t=r.getParent(t,".flickity-slider > *"),this.getCell(t))},f.getAdjacentCellElements=function(t,e){if(!t)return this.selectedSlide.getCellElements();e=void 0===e?this.selectedIndex:e;var i=this.slides.length;if(i<=1+2*t)return this.getCellElements();for(var n=[],s=e-t;s<=e+t;s++){var o=this.options.wrapAround?r.modulo(s,i):s,o=this.slides[o];o&&(n=n.concat(o.getCellElements()))}return n},f.queryCell=function(t){if("number"==typeof t)return this.cells[t];if("string"==typeof t){if(t.match(/^[#.]?[\d/]/))return;t=this.element.querySelector(t)}return this.getCell(t)},f.uiChange=function(){this.emitEvent("uiChange")},f.childUIPointerDown=function(t){"touchstart"!=t.type&&t.preventDefault(),this.focus()},f.onresize=function(){this.watchCSS(),this.resize()},r.debounceMethod(p,"onresize",150),f.resize=function(){var t;!this.isActive||this.isAnimating||this.isDragging||(this.getSize(),this.options.wrapAround&&(this.x=r.modulo(this.x,this.slideableWidth)),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize(),this.emitEvent("resize"),t=this.selectedElements&&this.selectedElements[0],this.selectCell(t,!1,!0))},f.watchCSS=function(){this.options.watchCSS&&(-1!=l(this.element,":after").content.indexOf("flickity")?this.activate():this.deactivate())},f.onkeydown=function(t){var e=document.activeElement&&document.activeElement!=this.element;this.options.accessibility&&!e&&(e=p.keyboardHandlers[t.keyCode])&&e.call(this)},p.keyboardHandlers={37:function(){var t=this.options.rightToLeft?"next":"previous";this.uiChange(),this[t]()},39:function(){var t=this.options.rightToLeft?"previous":"next";this.uiChange(),this[t]()}},f.focus=function(){var t=n.pageYOffset;this.element.focus({preventScroll:!0}),n.pageYOffset!=t&&n.scrollTo(n.pageXOffset,t)},f.deactivate=function(){this.isActive&&(this.element.classList.remove("flickity-enabled"),this.element.classList.remove("flickity-rtl"),this.unselectSelectedSlide(),this.cells.forEach(function(t){t.destroy()}),this.element.removeChild(this.viewport),c(this.slider.children,this.element),this.options.accessibility&&(this.element.removeAttribute("tabIndex"),this.element.removeEventListener("keydown",this)),this.isActive=!1,this.emitEvent("deactivate"))},f.destroy=function(){this.deactivate(),n.removeEventListener("resize",this),this.allOff(),this.emitEvent("destroy"),o&&this.$element&&o.removeData(this.element,"flickity"),delete this.element.flickityGUID,delete u[this.guid]},r.extend(f,s),p.data=function(t){t=(t=r.getQueryElement(t))&&t.flickityGUID;return t&&u[t]},r.htmlInit(p,"flickity"),o&&o.bridget&&o.bridget("flickity",p),p.setJQuery=function(t){o=t},p.Cell=i,p.Slide=a,p}),
/*!
 * Unipointer v2.4.0
 * base class for doing one thing with pointer event
 * MIT license
 */
function(e,i){"function"==typeof define&&define.amd?define("unipointer/unipointer",["ev-emitter/ev-emitter"],function(t){return i(e,t)}):"object"==typeof module&&module.exports?module.exports=i(e,require("ev-emitter")):e.Unipointer=i(e,e.EvEmitter)}(window,function(n,t){function e(){}var t=e.prototype=Object.create(t.prototype),i=(t.bindStartEvent=function(t){this._bindStartEvent(t,!0)},t.unbindStartEvent=function(t){this._bindStartEvent(t,!1)},t._bindStartEvent=function(t,e){var e=(e=void 0===e||e)?"addEventListener":"removeEventListener",i="mousedown";"ontouchstart"in n?i="touchstart":n.PointerEvent&&(i="pointerdown"),t[e](i,this)},t.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},t.getTouch=function(t){for(var e=0;e<t.length;e++){var i=t[e];if(i.identifier==this.pointerIdentifier)return i}},t.onmousedown=function(t){var e=t.button;e&&0!==e&&1!==e||this._pointerDown(t,t)},t.ontouchstart=function(t){this._pointerDown(t,t.changedTouches[0])},t.onpointerdown=function(t){this._pointerDown(t,t)},t._pointerDown=function(t,e){t.button||this.isPointerDown||(this.isPointerDown=!0,this.pointerIdentifier=void 0!==e.pointerId?e.pointerId:e.identifier,this.pointerDown(t,e))},t.pointerDown=function(t,e){this._bindPostStartEvents(t),this.emitEvent("pointerDown",[t,e])},{mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]});return t._bindPostStartEvents=function(t){t&&((t=i[t.type]).forEach(function(t){n.addEventListener(t,this)},this),this._boundPointerEvents=t)},t._unbindPostStartEvents=function(){this._boundPointerEvents&&(this._boundPointerEvents.forEach(function(t){n.removeEventListener(t,this)},this),delete this._boundPointerEvents)},t.onmousemove=function(t){this._pointerMove(t,t)},t.onpointermove=function(t){t.pointerId==this.pointerIdentifier&&this._pointerMove(t,t)},t.ontouchmove=function(t){var e=this.getTouch(t.changedTouches);e&&this._pointerMove(t,e)},t._pointerMove=function(t,e){this.pointerMove(t,e)},t.pointerMove=function(t,e){this.emitEvent("pointerMove",[t,e])},t.onmouseup=function(t){this._pointerUp(t,t)},t.onpointerup=function(t){t.pointerId==this.pointerIdentifier&&this._pointerUp(t,t)},t.ontouchend=function(t){var e=this.getTouch(t.changedTouches);e&&this._pointerUp(t,e)},t._pointerUp=function(t,e){this._pointerDone(),this.pointerUp(t,e)},t.pointerUp=function(t,e){this.emitEvent("pointerUp",[t,e])},t._pointerDone=function(){this._pointerReset(),this._unbindPostStartEvents(),this.pointerDone()},t._pointerReset=function(){this.isPointerDown=!1,delete this.pointerIdentifier},t.pointerDone=function(){},t.onpointercancel=function(t){t.pointerId==this.pointerIdentifier&&this._pointerCancel(t,t)},t.ontouchcancel=function(t){var e=this.getTouch(t.changedTouches);e&&this._pointerCancel(t,e)},t._pointerCancel=function(t,e){this._pointerDone(),this.pointerCancel(t,e)},t.pointerCancel=function(t,e){this.emitEvent("pointerCancel",[t,e])},e.getPointerPoint=function(t){return{x:t.pageX,y:t.pageY}},e}),
/*!
 * Unidragger v2.4.0
 * Draggable base class
 * MIT license
 */
function(e,i){"function"==typeof define&&define.amd?define("unidragger/unidragger",["unipointer/unipointer"],function(t){return i(e,t)}):"object"==typeof module&&module.exports?module.exports=i(e,require("unipointer")):e.Unidragger=i(e,e.Unipointer)}(window,function(o,t){function e(){}var i=e.prototype=Object.create(t.prototype),n=(i.bindHandles=function(){this._bindHandles(!0)},i.unbindHandles=function(){this._bindHandles(!1)},i._bindHandles=function(t){for(var e=(t=void 0===t||t)?"addEventListener":"removeEventListener",i=t?this._touchActionValue:"",n=0;n<this.handles.length;n++){var s=this.handles[n];this._bindStartEvent(s,t),s[e]("click",this),o.PointerEvent&&(s.style.touchAction=i)}},i._touchActionValue="none",i.pointerDown=function(t,e){this.okayPointerDown(t)&&(this.pointerDownPointer={pageX:e.pageX,pageY:e.pageY},t.preventDefault(),this.pointerDownBlur(),this._bindPostStartEvents(t),this.emitEvent("pointerDown",[t,e]))},{TEXTAREA:!0,INPUT:!0,SELECT:!0,OPTION:!0}),s={radio:!0,checkbox:!0,button:!0,submit:!0,image:!0,file:!0};return i.okayPointerDown=function(t){var e=n[t.target.nodeName],t=s[t.target.type],e=!e||t;return e||this._pointerReset(),e},i.pointerDownBlur=function(){var t=document.activeElement;t&&t.blur&&t!=document.body&&t.blur()},i.pointerMove=function(t,e){var i=this._dragPointerMove(t,e);this.emitEvent("pointerMove",[t,e,i]),this._dragMove(t,e,i)},i._dragPointerMove=function(t,e){var i={x:e.pageX-this.pointerDownPointer.pageX,y:e.pageY-this.pointerDownPointer.pageY};return!this.isDragging&&this.hasDragStarted(i)&&this._dragStart(t,e),i},i.hasDragStarted=function(t){return 3<Math.abs(t.x)||3<Math.abs(t.y)},i.pointerUp=function(t,e){this.emitEvent("pointerUp",[t,e]),this._dragPointerUp(t,e)},i._dragPointerUp=function(t,e){this.isDragging?this._dragEnd(t,e):this._staticClick(t,e)},i._dragStart=function(t,e){this.isDragging=!0,this.isPreventingClicks=!0,this.dragStart(t,e)},i.dragStart=function(t,e){this.emitEvent("dragStart",[t,e])},i._dragMove=function(t,e,i){this.isDragging&&this.dragMove(t,e,i)},i.dragMove=function(t,e,i){t.preventDefault(),this.emitEvent("dragMove",[t,e,i])},i._dragEnd=function(t,e){this.isDragging=!1,setTimeout(function(){delete this.isPreventingClicks}.bind(this)),this.dragEnd(t,e)},i.dragEnd=function(t,e){this.emitEvent("dragEnd",[t,e])},i.onclick=function(t){this.isPreventingClicks&&t.preventDefault()},i._staticClick=function(t,e){this.isIgnoringMouseUp&&"mouseup"==t.type||(this.staticClick(t,e),"mouseup"!=t.type&&(this.isIgnoringMouseUp=!0,setTimeout(function(){delete this.isIgnoringMouseUp}.bind(this),400)))},i.staticClick=function(t,e){this.emitEvent("staticClick",[t,e])},e.getPointerPoint=t.getPointerPoint,e}),function(n,s){"function"==typeof define&&define.amd?define("flickity/js/drag",["./flickity","unidragger/unidragger","fizzy-ui-utils/utils"],function(t,e,i){return s(n,t,e,i)}):"object"==typeof module&&module.exports?module.exports=s(n,require("./flickity"),require("unidragger"),require("fizzy-ui-utils")):n.Flickity=s(n,n.Flickity,n.Unidragger,n.fizzyUIUtils)}(window,function(i,t,e,o){o.extend(t.defaults,{draggable:">1",dragThreshold:3}),t.createMethods.push("_createDrag");var n=t.prototype,s=(o.extend(n,e.prototype),n._touchActionValue="pan-y",n._createDrag=function(){this.on("activate",this.onActivateDrag),this.on("uiChange",this._uiChangeDrag),this.on("deactivate",this.onDeactivateDrag),this.on("cellChange",this.updateDraggable)},n.onActivateDrag=function(){this.handles=[this.viewport],this.bindHandles(),this.updateDraggable()},n.onDeactivateDrag=function(){this.unbindHandles(),this.element.classList.remove("is-draggable")},n.updateDraggable=function(){">1"==this.options.draggable?this.isDraggable=1<this.slides.length:this.isDraggable=this.options.draggable,this.isDraggable?this.element.classList.add("is-draggable"):this.element.classList.remove("is-draggable")},n.bindDrag=function(){this.options.draggable=!0,this.updateDraggable()},n.unbindDrag=function(){this.options.draggable=!1,this.updateDraggable()},n._uiChangeDrag=function(){delete this.isFreeScrolling},n.pointerDown=function(t,e){this.isDraggable?this.okayPointerDown(t)&&(this._pointerDownPreventDefault(t),this.pointerDownFocus(t),document.activeElement!=this.element&&this.pointerDownBlur(),this.dragX=this.x,this.viewport.classList.add("is-pointer-down"),this.pointerDownScroll=r(),i.addEventListener("scroll",this),this._pointerDownDefault(t,e)):this._pointerDownDefault(t,e)},n._pointerDownDefault=function(t,e){this.pointerDownPointer={pageX:e.pageX,pageY:e.pageY},this._bindPostStartEvents(t),this.dispatchEvent("pointerDown",t,[e])},{INPUT:!0,TEXTAREA:!0,SELECT:!0});function r(){return{x:i.pageXOffset,y:i.pageYOffset}}return n.pointerDownFocus=function(t){s[t.target.nodeName]||this.focus()},n._pointerDownPreventDefault=function(t){var e="touchstart"==t.type,i="touch"==t.pointerType,n=s[t.target.nodeName];e||i||n||t.preventDefault()},n.hasDragStarted=function(t){return Math.abs(t.x)>this.options.dragThreshold},n.pointerUp=function(t,e){delete this.isTouchScrolling,this.viewport.classList.remove("is-pointer-down"),this.dispatchEvent("pointerUp",t,[e]),this._dragPointerUp(t,e)},n.pointerDone=function(){i.removeEventListener("scroll",this),delete this.pointerDownScroll},n.dragStart=function(t,e){this.isDraggable&&(this.dragStartPosition=this.x,this.startAnimation(),i.removeEventListener("scroll",this),this.dispatchEvent("dragStart",t,[e]))},n.pointerMove=function(t,e){var i=this._dragPointerMove(t,e);this.dispatchEvent("pointerMove",t,[e,i]),this._dragMove(t,e,i)},n.dragMove=function(t,e,i){var n,s;this.isDraggable&&(t.preventDefault(),this.previousDragX=this.dragX,n=this.options.rightToLeft?-1:1,this.options.wrapAround&&(i.x%=this.slideableWidth),n=this.dragStartPosition+i.x*n,!this.options.wrapAround&&this.slides.length&&(n=(n=(s=Math.max(-this.slides[0].target,this.dragStartPosition))<n?.5*(n+s):n)<(s=Math.min(-this.getLastSlide().target,this.dragStartPosition))?.5*(n+s):n),this.dragX=n,this.dragMoveTime=new Date,this.dispatchEvent("dragMove",t,[e,i]))},n.dragEnd=function(t,e){var i,n;this.isDraggable&&(this.options.freeScroll&&(this.isFreeScrolling=!0),i=this.dragEndRestingSelect(),this.options.freeScroll&&!this.options.wrapAround?(n=this.getRestingPosition(),this.isFreeScrolling=-n>this.slides[0].target&&-n<this.getLastSlide().target):this.options.freeScroll||i!=this.selectedIndex||(i+=this.dragEndBoostSelect()),delete this.previousDragX,this.isDragSelect=this.options.wrapAround,this.select(i),delete this.isDragSelect,this.dispatchEvent("dragEnd",t,[e]))},n.dragEndRestingSelect=function(){var t=this.getRestingPosition(),e=Math.abs(this.getSlideDistance(-t,this.selectedIndex)),i=this._getClosestResting(t,e,1),t=this._getClosestResting(t,e,-1);return(i.distance<t.distance?i:t).index},n._getClosestResting=function(t,e,i){for(var n=this.selectedIndex,s=1/0,o=this.options.contain&&!this.options.wrapAround?function(t,e){return t<=e}:function(t,e){return t<e};o(e,s)&&(s=e,null!==(e=this.getSlideDistance(-t,n+=i)));)e=Math.abs(e);return{distance:s,index:n-i}},n.getSlideDistance=function(t,e){var i=this.slides.length,n=this.options.wrapAround&&1<i,s=n?o.modulo(e,i):e,s=this.slides[s];return s?(n=n?this.slideableWidth*Math.floor(e/i):0,t-(s.target+n)):null},n.dragEndBoostSelect=function(){var t,e;return void 0===this.previousDragX||!this.dragMoveTime||100<new Date-this.dragMoveTime?0:(t=this.getSlideDistance(-this.dragX,this.selectedIndex),e=this.previousDragX-this.dragX,0<t&&0<e?1:t<0&&e<0?-1:0)},n.staticClick=function(t,e){var i=this.getParentCell(t.target),n=i&&i.element,i=i&&this.cells.indexOf(i);this.dispatchEvent("staticClick",t,[e,n,i])},n.onscroll=function(){var t=r(),e=this.pointerDownScroll.x-t.x,t=this.pointerDownScroll.y-t.y;(3<Math.abs(e)||3<Math.abs(t))&&this._pointerDone()},t}),function(t,n){"function"==typeof define&&define.amd?define("flickity/js/prev-next-button",["./flickity","unipointer/unipointer","fizzy-ui-utils/utils"],function(t,e,i){return n(0,t,e,i)}):"object"==typeof module&&module.exports?module.exports=n(0,require("./flickity"),require("unipointer"),require("fizzy-ui-utils")):n(0,t.Flickity,t.Unipointer,t.fizzyUIUtils)}(window,function(t,e,i,n){"use strict";var s="http://www.w3.org/2000/svg";function o(t,e){this.direction=t,this.parent=e,this._create()}(o.prototype=Object.create(i.prototype))._create=function(){this.isEnabled=!0,this.isPrevious=-1==this.direction;var t=this.parent.options.rightToLeft?1:-1,t=(this.isLeft=this.direction==t,this.element=document.createElement("button")),e=(t.className="flickity-button flickity-prev-next-button",t.className+=this.isPrevious?" previous":" next",t.setAttribute("type","button"),this.disable(),t.setAttribute("aria-label",this.isPrevious?"Previous":"Next"),this.createSVG());t.appendChild(e),this.parent.on("select",this.update.bind(this)),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},o.prototype.activate=function(){this.bindStartEvent(this.element),this.element.addEventListener("click",this),this.parent.element.appendChild(this.element)},o.prototype.deactivate=function(){this.parent.element.removeChild(this.element),this.unbindStartEvent(this.element),this.element.removeEventListener("click",this)},o.prototype.createSVG=function(){var t=document.createElementNS(s,"svg"),e=(t.setAttribute("class","flickity-button-icon"),t.setAttribute("viewBox","0 0 100 100"),document.createElementNS(s,"path")),i="string"!=typeof(i=this.parent.options.arrowShape)?"M "+i.x0+",50 L "+i.x1+","+(i.y1+50)+" L "+i.x2+","+(i.y2+50)+" L "+i.x3+",50  L "+i.x2+","+(50-i.y2)+" L "+i.x1+","+(50-i.y1)+" Z":i;return e.setAttribute("d",i),e.setAttribute("class","arrow"),this.isLeft||e.setAttribute("transform","translate(100, 100) rotate(180) "),t.appendChild(e),t},o.prototype.handleEvent=n.handleEvent,o.prototype.onclick=function(){var t;this.isEnabled&&(this.parent.uiChange(),t=this.isPrevious?"previous":"next",this.parent[t]())},o.prototype.enable=function(){this.isEnabled||(this.element.disabled=!1,this.isEnabled=!0)},o.prototype.disable=function(){this.isEnabled&&(this.element.disabled=!0,this.isEnabled=!1)},o.prototype.update=function(){var t=this.parent.slides;this.parent.options.wrapAround&&1<t.length?this.enable():(t=t.length?t.length-1:0,t=this.isPrevious?0:t,this[this.parent.selectedIndex==t?"disable":"enable"]())},o.prototype.destroy=function(){this.deactivate(),this.allOff()},n.extend(e.defaults,{prevNextButtons:!0,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}}),e.createMethods.push("_createPrevNextButtons");i=e.prototype;return i._createPrevNextButtons=function(){this.options.prevNextButtons&&(this.prevButton=new o(-1,this),this.nextButton=new o(1,this),this.on("activate",this.activatePrevNextButtons))},i.activatePrevNextButtons=function(){this.prevButton.activate(),this.nextButton.activate(),this.on("deactivate",this.deactivatePrevNextButtons)},i.deactivatePrevNextButtons=function(){this.prevButton.deactivate(),this.nextButton.deactivate(),this.off("deactivate",this.deactivatePrevNextButtons)},e.PrevNextButton=o,e}),function(t,n){"function"==typeof define&&define.amd?define("flickity/js/page-dots",["./flickity","unipointer/unipointer","fizzy-ui-utils/utils"],function(t,e,i){return n(0,t,e,i)}):"object"==typeof module&&module.exports?module.exports=n(0,require("./flickity"),require("unipointer"),require("fizzy-ui-utils")):n(0,t.Flickity,t.Unipointer,t.fizzyUIUtils)}(window,function(t,e,i,n){function s(t){this.parent=t,this._create()}(s.prototype=Object.create(i.prototype))._create=function(){this.holder=document.createElement("ol"),this.holder.className="flickity-page-dots",this.dots=[],this.handleClick=this.onClick.bind(this),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},s.prototype.activate=function(){this.setDots(),this.holder.addEventListener("click",this.handleClick),this.bindStartEvent(this.holder),this.parent.element.appendChild(this.holder)},s.prototype.deactivate=function(){this.holder.removeEventListener("click",this.handleClick),this.unbindStartEvent(this.holder),this.parent.element.removeChild(this.holder)},s.prototype.setDots=function(){var t=this.parent.slides.length-this.dots.length;0<t?this.addDots(t):t<0&&this.removeDots(-t)},s.prototype.addDots=function(t){for(var e=document.createDocumentFragment(),i=[],n=this.dots.length,s=n+t,o=n;o<s;o++){var r=document.createElement("li");r.className="dot",r.setAttribute("aria-label","Page dot "+(o+1)),e.appendChild(r),i.push(r)}this.holder.appendChild(e),this.dots=this.dots.concat(i)},s.prototype.removeDots=function(t){this.dots.splice(this.dots.length-t,t).forEach(function(t){this.holder.removeChild(t)},this)},s.prototype.updateSelected=function(){this.selectedDot&&(this.selectedDot.className="dot",this.selectedDot.removeAttribute("aria-current")),this.dots.length&&(this.selectedDot=this.dots[this.parent.selectedIndex],this.selectedDot.className="dot is-selected",this.selectedDot.setAttribute("aria-current","step"))},s.prototype.onTap=s.prototype.onClick=function(t){var t=t.target;"LI"==t.nodeName&&(this.parent.uiChange(),t=this.dots.indexOf(t),this.parent.select(t))},s.prototype.destroy=function(){this.deactivate(),this.allOff()},e.PageDots=s,n.extend(e.defaults,{pageDots:!0}),e.createMethods.push("_createPageDots");i=e.prototype;return i._createPageDots=function(){this.options.pageDots&&(this.pageDots=new s(this),this.on("activate",this.activatePageDots),this.on("select",this.updateSelectedPageDots),this.on("cellChange",this.updatePageDots),this.on("resize",this.updatePageDots),this.on("deactivate",this.deactivatePageDots))},i.activatePageDots=function(){this.pageDots.activate()},i.updateSelectedPageDots=function(){this.pageDots.updateSelected()},i.updatePageDots=function(){this.pageDots.setDots()},i.deactivatePageDots=function(){this.pageDots.deactivate()},e.PageDots=s,e}),function(t,e){"function"==typeof define&&define.amd?define("flickity/js/player",["ev-emitter/ev-emitter","fizzy-ui-utils/utils","./flickity"],e):"object"==typeof module&&module.exports?module.exports=e(require("ev-emitter"),require("fizzy-ui-utils"),require("./flickity")):e(t.EvEmitter,t.fizzyUIUtils,t.Flickity)}(window,function(t,e,i){function n(t){this.parent=t,this.state="stopped",this.onVisibilityChange=this.visibilityChange.bind(this),this.onVisibilityPlay=this.visibilityPlay.bind(this)}(n.prototype=Object.create(t.prototype)).play=function(){"playing"!=this.state&&(document.hidden?document.addEventListener("visibilitychange",this.onVisibilityPlay):(this.state="playing",document.addEventListener("visibilitychange",this.onVisibilityChange),this.tick()))},n.prototype.tick=function(){var t,e;"playing"==this.state&&(t="number"==typeof(t=this.parent.options.autoPlay)?t:3e3,(e=this).clear(),this.timeout=setTimeout(function(){e.parent.next(!0),e.tick()},t))},n.prototype.stop=function(){this.state="stopped",this.clear(),document.removeEventListener("visibilitychange",this.onVisibilityChange)},n.prototype.clear=function(){clearTimeout(this.timeout)},n.prototype.pause=function(){"playing"==this.state&&(this.state="paused",this.clear())},n.prototype.unpause=function(){"paused"==this.state&&this.play()},n.prototype.visibilityChange=function(){this[document.hidden?"pause":"unpause"]()},n.prototype.visibilityPlay=function(){this.play(),document.removeEventListener("visibilitychange",this.onVisibilityPlay)},e.extend(i.defaults,{pauseAutoPlayOnHover:!0}),i.createMethods.push("_createPlayer");t=i.prototype;return t._createPlayer=function(){this.player=new n(this),this.on("activate",this.activatePlayer),this.on("uiChange",this.stopPlayer),this.on("pointerDown",this.stopPlayer),this.on("deactivate",this.deactivatePlayer)},t.activatePlayer=function(){this.options.autoPlay&&(this.player.play(),this.element.addEventListener("mouseenter",this))},t.playPlayer=function(){this.player.play()},t.stopPlayer=function(){this.player.stop()},t.pausePlayer=function(){this.player.pause()},t.unpausePlayer=function(){this.player.unpause()},t.deactivatePlayer=function(){this.player.stop(),this.element.removeEventListener("mouseenter",this)},t.onmouseenter=function(){this.options.pauseAutoPlayOnHover&&(this.player.pause(),this.element.addEventListener("mouseleave",this))},t.onmouseleave=function(){this.player.unpause(),this.element.removeEventListener("mouseleave",this)},i.Player=n,i}),function(t,i){"function"==typeof define&&define.amd?define("flickity/js/add-remove-cell",["./flickity","fizzy-ui-utils/utils"],function(t,e){return i(0,t,e)}):"object"==typeof module&&module.exports?module.exports=i(0,require("./flickity"),require("fizzy-ui-utils")):i(0,t.Flickity,t.fizzyUIUtils)}(window,function(t,e,n){var i=e.prototype;return i.insert=function(t,e){var i,n,s,o,r,t=this._makeCells(t);t&&t.length&&(i=this.cells.length,e=void 0===e?i:e,r=t,n=document.createDocumentFragment(),r.forEach(function(t){n.appendChild(t.element)}),r=n,(s=e==i)?this.slider.appendChild(r):(o=this.cells[e].element,this.slider.insertBefore(r,o)),0===e?this.cells=t.concat(this.cells):s?this.cells=this.cells.concat(t):(r=this.cells.splice(e,i-e),this.cells=this.cells.concat(t).concat(r)),this._sizeCells(t),this.cellChange(e,!0))},i.append=function(t){this.insert(t,this.cells.length)},i.prepend=function(t){this.insert(t,0)},i.remove=function(t){var i,t=this.getCells(t);t&&t.length&&(i=this.cells.length-1,t.forEach(function(t){t.remove();var e=this.cells.indexOf(t);i=Math.min(e,i),n.removeFrom(this.cells,t)},this),this.cellChange(i,!0))},i.cellSizeChange=function(t){var t=this.getCell(t);t&&(t.getSize(),t=this.cells.indexOf(t),this.cellChange(t))},i.cellChange=function(t,e){var i=this.selectedElement,i=(this._positionCells(t),this._getWrapShiftCells(),this.setGallerySize(),this.getCell(i));i&&(this.selectedIndex=this.getCellSlideIndex(i)),this.selectedIndex=Math.min(this.slides.length-1,this.selectedIndex),this.emitEvent("cellChange",[t]),this.select(this.selectedIndex),e&&this.positionSliderAtSelected()},e}),function(t,i){"function"==typeof define&&define.amd?define("flickity/js/lazyload",["./flickity","fizzy-ui-utils/utils"],function(t,e){return i(0,t,e)}):"object"==typeof module&&module.exports?module.exports=i(0,require("./flickity"),require("fizzy-ui-utils")):i(0,t.Flickity,t.fizzyUIUtils)}(window,function(t,e,s){"use strict";e.createMethods.push("_createLazyload");var i=e.prototype;function n(t,e){this.img=t,this.flickity=e,this.load()}return i._createLazyload=function(){this.on("select",this.lazyLoad)},i.lazyLoad=function(){var e,t=this.options.lazyLoad;t&&(t=this.getAdjacentCellElements("number"==typeof t?t:0),e=[],t.forEach(function(t){t=function(t){if("IMG"==t.nodeName){var e=t.getAttribute("data-flickity-lazyload"),i=t.getAttribute("data-flickity-lazyload-src"),n=t.getAttribute("data-flickity-lazyload-srcset");if(e||i||n)return[t]}e=t.querySelectorAll("img[data-flickity-lazyload], img[data-flickity-lazyload-src], img[data-flickity-lazyload-srcset]");return s.makeArray(e)}(t);e=e.concat(t)}),e.forEach(function(t){new n(t,this)},this))},n.prototype.handleEvent=s.handleEvent,n.prototype.load=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this);var t=this.img.getAttribute("data-flickity-lazyload")||this.img.getAttribute("data-flickity-lazyload-src"),e=this.img.getAttribute("data-flickity-lazyload-srcset");this.img.src=t,e&&this.img.setAttribute("srcset",e),this.img.removeAttribute("data-flickity-lazyload"),this.img.removeAttribute("data-flickity-lazyload-src"),this.img.removeAttribute("data-flickity-lazyload-srcset")},n.prototype.onload=function(t){this.complete(t,"flickity-lazyloaded")},n.prototype.onerror=function(t){this.complete(t,"flickity-lazyerror")},n.prototype.complete=function(t,e){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this);var i=this.flickity.getParentCell(this.img),i=i&&i.element;this.flickity.cellSizeChange(i),this.img.classList.add(e),this.flickity.dispatchEvent("lazyLoad",t,i)},e.LazyLoader=n,e}),
/*!
 * Flickity v2.3.0
 * Touch, responsive, flickable carousels
 *
 * Licensed GPLv3 for open source use
 * or Flickity Commercial License for commercial use
 *
 * https://flickity.metafizzy.co
 * Copyright 2015-2021 Metafizzy
 */
function(t){"function"==typeof define&&define.amd?define("flickity/js/index",["./flickity","./drag","./prev-next-button","./page-dots","./player","./add-remove-cell","./lazyload"],t):"object"==typeof module&&module.exports&&(module.exports=t(require("./flickity"),require("./drag"),require("./prev-next-button"),require("./page-dots"),require("./player"),require("./add-remove-cell"),require("./lazyload")))}((window,function(t){return t})),
/*!
 * Flickity asNavFor v2.0.2
 * enable asNavFor for Flickity
 */
function(t,e){"function"==typeof define&&define.amd?define("flickity-as-nav-for/as-nav-for",["flickity/js/index","fizzy-ui-utils/utils"],e):"object"==typeof module&&module.exports?module.exports=e(require("flickity"),require("fizzy-ui-utils")):t.Flickity=e(t.Flickity,t.fizzyUIUtils)}(window,function(i,n){i.createMethods.push("_createAsNavFor");var t=i.prototype;return t._createAsNavFor=function(){this.on("activate",this.activateAsNavFor),this.on("deactivate",this.deactivateAsNavFor),this.on("destroy",this.destroyAsNavFor);var t,e=this.options.asNavFor;e&&(t=this,setTimeout(function(){t.setNavCompanion(e)}))},t.setNavCompanion=function(t){t=n.getQueryElement(t);var e,t=i.data(t);t&&t!=this&&(this.navCompanion=t,(e=this).onNavCompanionSelect=function(){e.navCompanionSelect()},t.on("select",this.onNavCompanionSelect),this.on("staticClick",this.onNavStaticClick),this.navCompanionSelect(!0))},t.navCompanionSelect=function(t){var e,i,n=this.navCompanion&&this.navCompanion.selectedCells;n&&(e=n[0],e=this.navCompanion.cells.indexOf(e),n=e+n.length-1,i=Math.floor((i=this.navCompanion.cellAlign,(n-e)*i+e)),this.selectCell(i,!1,t),this.removeNavSelectedElements(),i>=this.cells.length||(t=this.cells.slice(e,1+n),this.navSelectedElements=t.map(function(t){return t.element}),this.changeNavSelectedClass("add")))},t.changeNavSelectedClass=function(e){this.navSelectedElements.forEach(function(t){t.classList[e]("is-nav-selected")})},t.activateAsNavFor=function(){this.navCompanionSelect(!0)},t.removeNavSelectedElements=function(){this.navSelectedElements&&(this.changeNavSelectedClass("remove"),delete this.navSelectedElements)},t.onNavStaticClick=function(t,e,i,n){"number"==typeof n&&this.navCompanion.selectCell(n)},t.deactivateAsNavFor=function(){this.removeNavSelectedElements()},t.destroyAsNavFor=function(){this.navCompanion&&(this.navCompanion.off("select",this.onNavCompanionSelect),this.off("staticClick",this.onNavStaticClick),delete this.navCompanion)},i}),
/*!
 * imagesLoaded v4.1.4
 * JavaScript is all like "You images are done yet or what?"
 * MIT License
 */
function(e,i){"use strict";"function"==typeof define&&define.amd?define("imagesloaded/imagesloaded",["ev-emitter/ev-emitter"],function(t){return i(e,t)}):"object"==typeof module&&module.exports?module.exports=i(e,require("ev-emitter")):e.imagesLoaded=i(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){var o=e.jQuery,r=e.console;function a(t,e){for(var i in e)t[i]=e[i];return t}var l=Array.prototype.slice;function h(t,e,i){if(!(this instanceof h))return new h(t,e,i);var n,s=t;(s="string"==typeof t?document.querySelectorAll(t):s)?(this.elements=(n=s,Array.isArray(n)?n:"object"==typeof n&&"number"==typeof n.length?l.call(n):[n]),this.options=a({},this.options),"function"==typeof e?i=e:a(this.options,e),i&&this.on("always",i),this.getImages(),o&&(this.jqDeferred=new o.Deferred),setTimeout(this.check.bind(this))):r.error("Bad element for imagesLoaded "+(s||t))}(h.prototype=Object.create(t.prototype)).options={},h.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},h.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);var e=t.nodeType;if(e&&c[e]){for(var i=t.querySelectorAll("img"),n=0;n<i.length;n++){var s=i[n];this.addImage(s)}if("string"==typeof this.options.background)for(var o=t.querySelectorAll(this.options.background),n=0;n<o.length;n++){var r=o[n];this.addElementBackgroundImages(r)}}};var c={1:!0,9:!0,11:!0};function i(t){this.img=t}function n(t,e){this.url=t,this.element=e,this.img=new Image}return h.prototype.addElementBackgroundImages=function(t){var e=getComputedStyle(t);if(e)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(e.backgroundImage);null!==n;){var s=n&&n[2];s&&this.addBackground(s,t),n=i.exec(e.backgroundImage)}},h.prototype.addImage=function(t){t=new i(t);this.images.push(t)},h.prototype.addBackground=function(t,e){t=new n(t,e);this.images.push(t)},h.prototype.check=function(){var n=this;function e(t,e,i){setTimeout(function(){n.progress(t,e,i)})}this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?this.images.forEach(function(t){t.once("progress",e),t.check()}):this.complete()},h.prototype.progress=function(t,e,i){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: "+i,t,e)},h.prototype.complete=function(){var t=this.hasAnyBroken?"fail":"done";this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred&&(t=this.hasAnyBroken?"reject":"resolve",this.jqDeferred[t](this))},(i.prototype=Object.create(t.prototype)).check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,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)},i.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},i.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.img,e])},i.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},i.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},i.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},(n.prototype=Object.create(i.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())},n.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},n.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},(h.makeJQueryPlugin=function(t){(t=t||e.jQuery)&&((o=t).fn.imagesLoaded=function(t,e){return new h(this,t,e).jqDeferred.promise(o(this))})})(),h}),
/*!
 * Flickity imagesLoaded v2.0.0
 * enables imagesLoaded option for Flickity
 */
function(t,i){"function"==typeof define&&define.amd?define(["flickity/js/index","imagesloaded/imagesloaded"],function(t,e){return i(0,t,e)}):"object"==typeof module&&module.exports?module.exports=i(0,require("flickity"),require("imagesloaded")):t.Flickity=i(0,t.Flickity,t.imagesLoaded)}(window,function(t,e,n){"use strict";e.createMethods.push("_createImagesLoaded");var i=e.prototype;return i._createImagesLoaded=function(){this.on("activate",this.imagesLoaded)},i.imagesLoaded=function(){var i;this.options.imagesLoaded&&n((i=this).slider).on("progress",function(t,e){e=i.getParentCell(e.img),i.cellSizeChange(e&&e.element),i.options.freeScroll||i.positionSliderAtSelected()})},e});
/**
 * Flickity background lazyload v1.0.1
 * lazyload background cell images
 */
!function(t,e){"function"==typeof define&&define.amd?define(["flickity/js/index","fizzy-ui-utils/utils"],e):"object"==typeof module&&module.exports?module.exports=e(require("flickity"),require("fizzy-ui-utils")):e(t.Flickity,t.fizzyUIUtils)}(window,function(t,e){"use strict";t.createMethods.push("_createBgLazyLoad");var i=t.prototype;function o(t,e,i){this.element=t,this.url=e,this.img=new Image,this.flickity=i,this.load()}return i._createBgLazyLoad=function(){this.on("select",this.bgLazyLoad)},i.bgLazyLoad=function(){var t=this.options.bgLazyLoad;if(t)for(var e=this.getAdjacentCellElements("number"==typeof t?t:0),i=0;i<e.length;i++)for(var o=e[i],a=(this.bgLazyLoadElem(o),o.querySelectorAll("[data-flickity-bg-lazyload]")),l=0;l<a.length;l++)this.bgLazyLoadElem(a[l])},i.bgLazyLoadElem=function(t){var e=t.getAttribute("data-flickity-bg-lazyload");e&&new o(t,e,this)},o.prototype.handleEvent=e.handleEvent,o.prototype.load=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.element.removeAttribute("data-flickity-bg-lazyload")},o.prototype.onload=function(t){this.element.style.backgroundImage='url("'+this.url+'")',this.complete(t,"flickity-bg-lazyloaded")},o.prototype.onerror=function(t){this.complete(t,"flickity-bg-lazyerror")},o.prototype.complete=function(t,e){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this),this.element.classList.add(e),this.flickity.dispatchEvent("bgLazyLoad",t,this.element)},t.BgLazyLoader=o,t});
var RexSlider=function(s){"use strict";var e=".rex-slider-wrap",o=".flickity-page-dots.rex-slider__custom-nav",t=".rexpansive_section",i=".rex-box-slider-wrap";function c(e){var t=this,i=this.element.getAttribute("data-custom-autoplay-timer")?this.element.getAttribute("data-custom-autoplay-timer"):9e3;t.customAutoplayInterval&&t.customAutoplayInterval.clear(),t.customAutoplayInterval=Rexbuilder_Util.rtimeOut(function(){t.playPlayer()},i),t.pausePlayer()}function a(e){void 0!==e.data("flickity")&&e.flickity("destroy"),e.find(".rex-slider-video-wrapper").each(function(e,t){Rexbuilder_Util.destroyVideo(s(t),!1)})}var r=function(e){var t=s(e),i={cellAlign:"center",prevNextButtons:!0,pageDots:!0,cellSelector:".rex-box-slider-element",selectedAttraction:.018,friction:.3,initialIndex:null!==e.getAttribute("data-rex-box-slider-initialIndex")?parseInt(e.getAttribute("data-rex-box-slider-initialIndex")):0,setGallerySize:!1,arrowShape:"m 38.79662,40.087413 0,0 c -0.387529,0 -0.757576,-0.154429 -1.031468,-0.425408 L 1.2470862,3.1322842 c -0.56818177,-0.5681815 -0.56818177,-1.4918411 0,-2.060023 0.5681819,-0.56818197 1.4918415,-0.56818197 2.0600234,0 L 38.793706,36.570513 74.294872,1.0722612 c 0.568182,-0.56818197 1.491842,-0.56818197 2.060023,0 0.568182,0.5681819 0.568182,1.4918415 0,2.060023 L 39.825175,39.659091 c -0.273893,0.273893 -0.641026,0.428322 -1.028555,0.428322 l 0,0 0,0 z"},e=e.getAttribute("data-rex-slider-animation");null!==e&&"true"==e&&(i.autoPlay=!0),t.flickity(i),t.flickity("stopPlayer"),t.on("dragStart.flickity",function(){s(this).addClass("is-dragging")}),t.on("dragEnd.flickity",function(){s(this).removeClass("is-dragging")})};return{init:function(){0<s(e,t).length&&s(e,t).each(function(e,t){RexSlider.initSlider(s(t)),s(t).attr("data-rex-slider-number",e),Rexbuilder_Dom_Util.lastSliderNumber=e}),0<s(i,t).length&&s(i,t).each(function(e,t){r(t)})},initSlider:function(a){var e=a.get(0),t={cellAlign:"left",prevNextButtons:!1,pageDots:!1,cellSelector:".rex-slider-element",selectedAttraction:.018,friction:.3,wrapAround:!0,arrowShape:_plugin_frontend_settings.slider.arrowShape},i=a.parents(".block-has-slider"),r=(t.setGallerySize=void 0!==a.attr("data-set-gallery-size")&&JSON.parse(a.attr("data-set-gallery-size")),t.wrapAround=void 0===a.attr("data-wrap-around")||JSON.parse(a.attr("data-wrap-around")),a.attr("data-rex-slider-animation")),r=(void 0!==r&&"true"==r.toString()?t.autoPlay=_plugin_frontend_settings.slider.autoPlay:t.autoPlay=!1,a.attr("data-rex-slider-prev-next")),r=(void 0!==r&&"1"==r.toString()&&(t.prevNextButtons=!0),a.attr("data-rex-slider-dots")),r=(void 0!==r&&"1"==r.toString()&&(t.pageDots=!0),a.attr("data-rexlider-lazyload")),r=(void 0!==r&&"0"!==r.toString()&&(t.bgLazyLoad=parseInt(r),t.lazyLoad=parseInt(r)),a.hasClass("rex-slider--bottom-interface")&&i.addClass("block-has-slider--navigator"),a.find(".rex-slider-element").each(function(e,t){t=s(t).find(".rex-slider-video-wrapper");Rexbuilder_Util.startVideoPlugin(t)}),!1!==t.autoPlay);t.prevNextButtons&&r&&(t.pauseAutoPlayOnHover=!1),a.flickity(t),a.flickity("stopPlayer");var l=Array.prototype.slice.call(e.getElementsByClassName("rex-slide--video"));if(a.on("dragStart.flickity",function(){Rexbuilder_Util.addClass(this,"is-dragging")}),a.on("dragEnd.flickity",function(){Rexbuilder_Util.removeClass(this,"is-dragging")}),0!==l.length&&a.on("select.flickity",function(e,t){for(var i=0;i<l.length;i++)Rexbuilder_Util.pauseVideo(s(l[i].querySelector(".rex-slider-video-wrapper")));Rexbuilder_Util.hasClass(Flickity.data(e.target).selectedCell.element,"rex-slide--video")&&Rexbuilder_Util.playVideo(s(e.target.querySelector(".rex-slider-video-wrapper")))}),t.autoPlay&&a.flickity("playPlayer"),r){var n=a.data("flickity");if(n.customAutoplayInterval=null,t.prevNextButtons&&(n.prevButton.element.addEventListener("click",c.bind(n)),n.nextButton.element.addEventListener("click",c.bind(n))),t.pageDots)for(var d=0;d<n.pageDots.dots.length;d++)n.pageDots.dots[d].addEventListener("click",c.bind(n));n.$element.on("dragEnd.flickity",c.bind(n))}a.attr("data-rex-slider-active",!0),a.find(o).children().first().addClass("is-selected"),a.find(o).on("click",".dot",function(e){var t=s(this),i=t.index();t.addClass("is-selected").siblings(".dot").removeClass("is-selected"),a.flickity("select",i)}),a.find(".flickity-page-dots.rex-slider__custom-nav__preview-slide").find(".rex-slider__b-label-image--item").hover(function(e){e=parseInt(e.currentTarget.getAttribute("data-nav-index"));a.flickity("select",e)})},startAutoPlay:function(){s(e,t).length&&s(e,t).each(function(e,t){t=Flickity.data(t);t&&t.autoPlay&&t.playPlayer()})},destroy:function(){0<s(e,t).length&&s(e,t).each(function(e,t){a(s(t))}),0<s(i,t).length&&s(i,t).each(function(e,t){a(s(t))})},destroySliderPlugins:a}}(jQuery);
/*
 *  TextFill
 */
!function(r,e,t,n){"use strict";var a="textFill",i={maxFontSize:100,textAlignment:"center",fontFamily:"sans-serif",fontWeight:"bold",relative:!1,relativeWrap:""};function h(t,e){this.element=t,this.$element=r(t),this.settings=r.extend({},i,e),this._defaults=i,this._name=a,this.properties={canvas:null,text:"",ctx:null,img:null,background:null,lines:null,wrap:null},this.init()}r.extend(h.prototype,{init:function(){this._defineSettings(),this._defineProperties(),this._attachImage();var t=this;r(e).on("resize",function(){t._resizeCanvas(),t._drawText()})},_defineSettings:function(){this.settings.maxFontSize=parseInt(this.element.dataset.maxFontSize||this.element.getAttribute("data-max-font-size")||this.settings.maxFontSize),this.settings.textAlignment=this.element.getElementsByClassName("text-fill-canvas-background")[0].dataset.textAlign||this.element.getElementsByClassName("text-fill-canvas-background")[0].getAttribute("data-text-align")||this.settings.textAlignment,this.settings.relativeWrap=this.element.getAttribute("data-relative-wrap")||this.settings.relativeWrap},_defineProperties:function(){this.properties.canvas=this.element.getElementsByClassName("text-fill-canvas")[0],this.properties.text=this.properties.canvas.textContent,this.properties.ctx=this.properties.canvas.getContext("2d"),this.properties.img=t.createElement("img"),this.properties.background=this.element.getElementsByClassName("text-fill-canvas-background")[0].dataset.backSrc||this.element.getElementsByClassName("text-fill-canvas-background")[0].getAttribute("data-back-src"),this.settings.relative&&""!==this.settings.relativeWrap&&(this.properties.wrap=r(this.element).parents(this.settings.relativeWrap)[0],void 0===this.properties.wrap)&&(this.settings.relative=!1)},_attachImage:function(){this.properties.img.src=this.properties.background;var t=this;this.properties.img.onload=function(){t._resizeCanvas(),t._drawText(),t.$element.trigger("textfill-render-complete")}},_drawText:function(){var t,e=this._calcFontSize(this.settings.maxFontSize);switch(this.properties.ctx.font=this.settings.fontWeight+" "+e+"px "+this.settings.fontFamily,this.properties.rows=this._numRows(this.properties.ctx,this.properties.text,(this.properties.relative?this.properties.wrap:this.element).offsetWidth-20),this.properties.canvas.height=this.properties.ctx.height=this.properties.rows*e,this.properties.ctx.clearRect(0,0,this.properties.canvas.width,this.properties.canvas.height),this.properties.ctx.font=this.settings.fontWeight+" "+e+"px "+this.settings.fontFamily,this.properties.ctx.fillStyle=this.properties.ctx.createPattern(this.properties.img,"repeat"),this.properties.ctx.textAlign=this.settings.textAlignment,this.properties.ctx.textBaseline="middle",this.settings.textAlignment){case"left":t=0;break;case"right":t=this.properties.canvas.width;break;default:t=this.properties.canvas.width/2}this._wrapText(this.properties.ctx,this.properties.text,t,e/2,(this.properties.relative?this.properties.wrap:this.element).offsetWidth-20,e)},_calcFontSize:function(t){var e=this.settings.maxFontSize/1e3;return this.properties.relative?this.properties.wrap.offsetWidth*e:this.element.offsetWidth*e},_wrapText:function(t,e,i,s,r,n){for(var a=e.split(" "),h=(t.measureText(a).width,""),p=0;p<a.length;p++){var o=h+a[p]+" ";r<t.measureText(o).width&&0<p?(t.fillText(h,i,s),h=a[p]+" ",s+=n):h=o}h=h.trim(),t.fillText(h,i,s)},_numRows:function(t,e,i){for(var s=new Array,r=e.split(" "),n=1,a=0;a<r.length;a++)s.unshift(" "),s.unshift(r[a]),i<this._partialTextLenght(t,s)&&(s.splice(1,s.length),n++);return n<=r.length?n:r.length},_partialTextLenght:function(t,e){for(var i=0,s=0;s<e.length;s++)i+=t.measureText(e[s]).width;return i},_resizeCanvas:function(){this.properties.canvas.width=this.properties.ctx.canvas.width=Math.floor((this.properties.relative?this.properties.wrap:this.element).offsetWidth),this.properties.canvas.height=this.properties.ctx.canvas.height=this._calcFontSize(this.settings.maxFontSize+50)},_calcSlope:function(t,e){return(e[1]-t[1])/(e[0]-t[0])}}),r.fn[a]=function(e){var i,s=arguments;return e===n||"object"==typeof e?this.each(function(){r.data(this,"plugin_"+a)||r.data(this,"plugin_"+a,new h(this,e))}):"string"==typeof e&&"_"!==e[0]&&"init"!==e?(this.each(function(){var t=r.data(this,"plugin_"+a);t instanceof h&&"function"==typeof t[e]&&(i=t[e].apply(t,Array.prototype.slice.call(s,1))),"destroy"===e&&r.data(this,"plugin_"+a,null)}),i!==n?i:this):void 0}}(jQuery,window,document);
var VimeoVideo=function(t){"use strict";function e(e){var n=e;0<o.length&&o.each(function(e,i){var o=t(i).attr("data-vimeo-video-mute"),i=t(i).find("iframe")[0];"undefined"!=typeof Vimeo&&n.addPlayer(o,i)})}var i=null,o=null;return{init:function(){this.blockVideos=[],i=Rexbuilder_Util.$rexContainer.find(".rex-video-vimeo-wrap--section"),o=Rexbuilder_Util.$rexContainer.find(".rex-video-vimeo-wrap--block"),0<i.length&&i.each(function(e,i){var o,i=t(i).find("iframe")[0];"undefined"!=typeof Vimeo&&(o=new Vimeo.Player(i)).ready().then(function(){o.setVolume(0)})}),e(this)},findVideo:function(e){if(void 0!==this.blockVideos)for(var i=0,o=this.blockVideos.length;i<o;i++)if(this.blockVideos[i].el===e)return this.blockVideos[i].player;return null},initBlockVideos:e,addPlayer:function(e,i,o){var n;void 0!==this.blockVideos&&(n=void 0!==o?new Vimeo.Player(i,o):new Vimeo.Player(i),"1"==e&&n.ready().then(function(){n.setVolume(0)}),o={el:i,player:n},this.blockVideos.push(o))},removePlayer:function(e){for(var i=!1,o=this.blockVideos.length,n=0;n<o;n++)if(this.blockVideos[n].el===e){this.blockVideos[n].player.destroy().then(function(){}).catch(function(e){}),i=!0;break}i&&this.blockVideos.splice(n,1)}}}(jQuery);
/**
 * JS object to fix CF7 forms if user wants some materialize style
 */
var Rexbuilder_FormFixes=function(i){"use strict";var e;function c(){document.addEventListener("wpcf7submit",function(e){var c,a=i(e.target).parents(".perfect-grid-gallery").get(0);null!=a&&((c=RexGrid.data(a))?setTimeout(()=>{c.endResize()},200):setTimeout(()=>{var e=a,c=Array.prototype.slice.call(e.querySelectorAll(".perfect-grid-item"));for(let e=0;e<c.length;e++){var n=c[e],i=n.querySelector(".text-wrap"),t=parseInt(n.style.height),i=Math.ceil(i.getBoundingClientRect().height);t<i&&(n.style.height=i+"px")}},200))},!1)}return{init:function(){e=i(".wpcf7-form"),c(),e.each(function(e,c){c=i(c);c.hasClass("rxcf7-custom-checkbox")&&(c.find(".wpcf7-checkbox").each(function(e,c){var n=i(c).find(".rex-checkbox__indicator"),c=(0<i(c).find("label").length&&0==n.length&&i(c).find("input[type=checkbox]").after('<span class="rex-checkbox__indicator"></span>'),i(c).find("input[type=checkbox]"));0!==c.length&&0===n.length&&c.after('<span class="rex-checkbox__indicator"></span>')}),c.find(".wpcf7-acceptance").each(function(e,c){0<i(c).find("label").length&&0==i(c).find(".rex-checkbox__indicator").length&&i(c).find("input[type=checkbox]").after('<span class="rex-checkbox__indicator"></span>')})),c.hasClass("rxcf7-custom-loader")&&0==c.find(".sk-double-bounce").length&&(c.find(".ajax-loader").append('<div class="sk-double-bounce"><div class="sk-child sk-double-bounce1"></div><div class="sk-child sk-double-bounce2"></div></div>'),c.find(".wpcf7-spinner").append('<div class="sk-double-bounce"><div class="sk-child sk-double-bounce1"></div><div class="sk-child sk-double-bounce2"></div></div>'))})}}}(jQuery);
/*
 *  rexScrolled - v0.1
 *
 *  Made by NEWEB di Simone Forgiarini
 */
!function(s,o,a,t){"use strict";function i(){for(var t=0;t<r.length;t++)null!==r[t]&&r[t].call()}var l="rexScrolled",n={offset:0,mobile:!0,force_launch:!1,callback:null,visiblePercentage:50},r=[];o.addEventListener("scroll",i);var h=e();function e(){var t=o,e="inner";return"innerWidth"in o||(e="client",t=a.documentElement||a.body),{width:t[e+"Width"],height:t[e+"Height"]}}function c(t,e){this.element=t,this.$element=s(t),this.settings=s.extend({},n,e),this._defaults=n,this._name=l,this.properties={launched:!1},this.settings.offset=parseInt(this.element.getAttribute("data-rs-animation-offset")||this.settings.offset),this.settings.force_launch=this.element.getAttribute("data-rs-animation-force-launch")||this.settings.force_launch,this.settings.visiblePercentage=(parseInt(this.element.getAttribute("data-rs-animation-visible-percentage"))||this.settings.visiblePercentage)/100,this.init()}o.addEventListener("resize",function(){h=e()}),s.extend(c.prototype,{init:function(){this.instance_index=r.length,r.push(this.has_scrolled.bind(this)),this.has_scrolled(!1)},has_scrolled:function(t){var e,i,n,s,l,r;t=void 0===t||t,h.width<=767&&!this.settings.mobile?(this.properties.launched=!0,t&&this.removeScrollHandler()):this.properties.launched?t&&this.removeScrollHandler():(e=h.height,i=o.pageYOffset||a.documentElement.scrollTop,l=this.element,r=void 0!==(r=i)?r:o.pageYOffset||a.documentElement.scrollTop,n=(l=l.getBoundingClientRect().top+r)+(r=this.element.offsetHeight),s=e*(this.settings.offset/100),(i+s<=l&&n<=i+e-s||l+r*this.settings.visiblePercentage<=i+e-s&&i+e-s<=n||l+r*this.settings.visiblePercentage>=i+s&&l<=i+s)&&(this.properties.launched=!0,this.$element.trigger("rs-scrolled-complete"),this.settings.callback&&"function"==typeof this.settings.callback&&this.settings.callback(this.element),t)&&this.removeScrollHandler())},removeScrollHandler:function(){var t=this.instance_index;r[t]=null;for(var e=0;e<r.length;e++)if(null!==r[e])return;o.removeEventListener("scroll",i)}}),s.fn[l]=function(e){var i,n=arguments;return e===t||"object"==typeof e?this.each(function(){s.data(this,"plugin_"+l)||s.data(this,"plugin_"+l,new c(this,e))}):"string"==typeof e&&"_"!==e[0]&&"init"!==e?(this.each(function(){var t=s.data(this,"plugin_"+l);t instanceof c&&"function"==typeof t[e]&&(i=t[e].apply(t,Array.prototype.slice.call(n,1))),"destroy"===e&&s.data(this,"plugin_"+l,null)}),i!==t?i:this):void 0}}(jQuery,window,document);
/*
 *  rexAccordion - v1.0.0
 *
 *  Made by NEWEB di Simone Forgiarini
 */
!function(i,t){"use strict";var l="rexAccordion",c={selectors:{self:".rex-accordion",toggle:".rex-accordion--toggle",content:".rex-accordion--content"},duration:150,durationOpen:null,durationClose:null,noToggleClass:"no-toggle"};function o(t,e){this.element=t,this.$element=i(t),this.settings=i.extend({},c,e),this._defaults=c,this._name=l,null==this.settings.durationOpen&&(this.settings.durationOpen=this.settings.duration),null==this.settings.durationClose&&(this.settings.durationClose=this.settings.duration);var t=this.$element.find(this.settings.selectors.toggle),e=this.$element.find(this.settings.selectors.content),s=this,n=[],o=(t.each(function(t,e){i(e).closest(s.settings.selectors.self).is(s.$element)&&n.push(e)}),[]);e.each(function(t,e){i(e).closest(s.settings.selectors.self).is(s.$element)&&o.push(e)}),this.properties={$toggle:i(n),$content:i(o)},this.init()}i.extend(o.prototype,{init:function(){var s=this;"function"==typeof this.settings.onSetup&&this.settings.onSetup.call(this),this.updateState(),this.properties.$toggle.each(function(e,t){i(t).on("click",function(t){i(t.target).hasClass(s.settings.noToggleClass)||0!==i(t.target).parents("."+s.settings.noToggleClass).length||s._handle_click(e)})})},updateState:function(){this.$element.hasClass("close")&&this.close_all(),this.$element.hasClass("open")&&this.open_all()},_handle_click:function(n){var o=this;1==this.properties.$toggle.length?this.$element.hasClass("open")?(this.$element.addClass("close").removeClass("open"),this.properties.$content.slideUp({duration:this.settings.durationClose,start:function(t){"function"==typeof o.settings.close.startClbk&&o.settings.close.startClbk.call(this,o,n)},progress:function(t,e,s){"function"==typeof o.settings.close.progressClbk&&o.settings.close.progressClbk.call(this,o,e,n)},complete:function(){"function"==typeof o.settings.close.completeClbk&&o.settings.close.completeClbk.call(this,o,n),o.$element.trigger("rex_accordion:close")}}).attr("data-item-status","close")):this.$element.hasClass("close")&&(this.$element.addClass("open").removeClass("close"),this.properties.$content.slideDown({duration:this.settings.durationOpen,start:function(t){"function"==typeof o.settings.open.startClbk&&o.settings.open.startClbk.call(this,o,n)},progress:function(t,e,s){"function"==typeof o.settings.open.progressClbk&&o.settings.open.progressClbk.call(this,o,e,n)},complete:function(){"function"==typeof o.settings.open.completeClbk&&o.settings.open.completeClbk.call(this,o,n),o.$element.trigger("rex_accordion:open")}}).attr("data-item-status","open")):1<this.properties.$toggle.length&&(this.$element.hasClass("open")?"open"==this.properties.$content.eq(n).attr("data-item-status")?(this.$element.addClass("close").removeClass("open"),this.properties.$content.eq(n).slideUp({duration:this.settings.durationClose,start:function(t){"function"==typeof o.settings.close.startClbk&&o.settings.close.startClbk.call(this,o,n)},progress:function(t,e,s){"function"==typeof o.settings.close.progressClbk&&o.settings.close.progressClbk.call(this,o,e,n)},complete:function(){"function"==typeof o.settings.close.completeClbk&&o.settings.close.completeClbk.call(this,o,n),o.$element.trigger("rex_accordion:close")}}).attr("data-item-status","close")):(this.$element.addClass("close").removeClass("close"),this.properties.$content.not(n).slideUp({duration:this.settings.durationClose,start:function(t){"function"==typeof o.settings.close.startClbk&&o.settings.close.startClbk.call(this,o,n)},progress:function(t,e,s){"function"==typeof o.settings.close.progressClbk&&o.settings.close.progressClbk.call(this,o,e,n)},complete:function(){"function"==typeof o.settings.close.completeClbk&&o.settings.close.completeClbk.call(this,o,n),o.$element.trigger("rex_accordion:close")}}).attr("data-item-status","close"),this.properties.$content.eq(n).slideDown({duration:this.settings.durationOpen,start:function(t){"function"==typeof o.settings.open.startClbk&&o.settings.open.startClbk.call(this,o,n)},progress:function(t,e,s){"function"==typeof o.settings.open.progressClbk&&o.settings.open.progressClbk.call(this,o,e,n)},complete:function(){"function"==typeof o.settings.open.completeClbk&&o.settings.open.completeClbk.call(this,o,n),o.$element.trigger("rex_accordion:open")}}).attr("data-item-status","open")):this.$element.hasClass("close")&&("close"==this.properties.$content.eq(n).attr("data-item-status")?(this.$element.addClass("open").removeClass("close"),this.properties.$content.eq(n).slideDown({duration:this.settings.durationOpen,start:function(t){"function"==typeof o.settings.open.startClbk&&o.settings.open.startClbk.call(this,o,n)},progress:function(t,e,s){"function"==typeof o.settings.open.progressClbk&&o.settings.open.progressClbk.call(this,o,e,n)},complete:function(){"function"==typeof o.settings.open.completeClbk&&o.settings.open.completeClbk.call(this,o,n),o.$element.trigger("rex_accordion:open")}})):(this.$element.addClass("close").removeClass("open"),this.properties.$content.eq(n).slideUp({duration:this.settings.duration,start:function(t){"function"==typeof o.settings.close.startClbk&&o.settings.close.startClbk.call(this,o,n)},progress:function(t,e,s){"function"==typeof o.settings.close.progressClbk&&o.settings.close.progressClbk.call(this,o,e,n)},complete:function(){"function"==typeof o.settings.close.completeClbk&&o.settings.close.completeClbk.call(this,o,n),o.$element.trigger("rex_accordion:close")}}).attr("data-item-status","close"),this.properties.$content.not(n).slideDown({duration:this.settings.durationOpen,start:function(t){"function"==typeof o.settings.open.startClbk&&o.settings.open.startClbk.call(this,o,n)},progress:function(t,e,s){"function"==typeof o.settings.open.progressClbk&&o.settings.open.progressClbk.call(this,o,e,n)},complete:function(){"function"==typeof o.settings.open.completeClbk&&o.settings.open.completeClbk.call(this,o,n),o.$element.trigger("rex_accordion:open")}}))).attr("data-item-status","open"))},open_single_accordion:function(){var n=this;this.$element.addClass("open").removeClass("close"),this.properties.$content.slideDown({duration:this.settings.durationOpen,start:function(t){"function"==typeof n.settings.open.startClbk&&n.settings.open.startClbk.call(this,n)},progress:function(t,e,s){"function"==typeof n.settings.open.progressClbk&&n.settings.open.progressClbk.call(this,n,e)},complete:function(){"function"==typeof n.settings.open.completeClbk&&n.settings.open.completeClbk.call(this,n),n.$element.trigger("rex_accordion:open")}}).attr("data-item-status","open")},close_single_accordion:function(){var n=this;this.$element.addClass("close").removeClass("open"),this.properties.$content.slideUp({duration:this.settings.durationClose,start:function(t){"function"==typeof n.settings.close.startClbk&&n.settings.close.startClbk.call(this,n)},progress:function(t,e,s){"function"==typeof n.settings.close.progressClbk&&n.settings.close.progressClbk.call(this,n,e)},complete:function(){"function"==typeof n.settings.close.completeClbk&&n.settings.close.completeClbk.call(this,n),n.$element.trigger("rex_accordion:close")}}).attr("data-item-status","close")},open_all:function(){this.properties.$content.attr("data-item-status","open"),this.properties.$content.css("display","block"),this.$element.hasClass("close")&&this.$element.addClass("open").removeClass("close")},close_all:function(){this.properties.$content.attr("data-item-status","close"),this.properties.$content.css("display","none"),this.$element.hasClass("open")&&this.$element.addClass("close").removeClass("open")},getState:function(){return this.properties.$content.attr("data-item-status")}}),i.fn[l]=function(e){var s,n=arguments;return e===t||"object"==typeof e?this.each(function(){i.data(this,"plugin_"+l)||i.data(this,"plugin_"+l,new o(this,e))}):"string"==typeof e&&"_"!==e[0]&&"init"!==e?(this.each(function(){var t=i.data(this,"plugin_"+l);t instanceof o&&"function"==typeof t[e]&&(s=t[e].apply(t,Array.prototype.slice.call(n,1))),"destroy"===e&&i.data(this,"plugin_"+l,null)}),s!==t?s:this):void 0}}(jQuery,(window,void document));
!function(){"use strict";jQuery.fn.reverse=[].reverse}();
/*
 * anime.js v3.1.0
 * (c) 2019 Julian Garnier
 * Released under the MIT license
 * animejs.com
 */
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):n.anime=e()}(this,function(){"use strict";var i={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},M={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},S=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective"],l={CSS:{},springs:{}};function C(n,e,t){return Math.min(Math.max(n,e),t)}function s(n,e){return-1<n.indexOf(e)}function o(n,e){return n.apply(null,e)}var w={arr:function(n){return Array.isArray(n)},obj:function(n){return s(Object.prototype.toString.call(n),"Object")},pth:function(n){return w.obj(n)&&n.hasOwnProperty("totalLength")},svg:function(n){return n instanceof SVGElement},inp:function(n){return n instanceof HTMLInputElement},dom:function(n){return n.nodeType||w.svg(n)},str:function(n){return"string"==typeof n},fnc:function(n){return"function"==typeof n},und:function(n){return void 0===n},hex:function(n){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(n)},rgb:function(n){return/^rgb/.test(n)},hsl:function(n){return/^hsl/.test(n)},col:function(n){return w.hex(n)||w.rgb(n)||w.hsl(n)},key:function(n){return!i.hasOwnProperty(n)&&!M.hasOwnProperty(n)&&"targets"!==n&&"keyframes"!==n}};function d(n){n=/\(([^)]+)\)/.exec(n);return n?n[1].split(",").map(function(n){return parseFloat(n)}):[]}function u(r,t){var n=d(r),e=C(w.und(n[0])?1:n[0],.1,100),a=C(w.und(n[1])?100:n[1],.1,100),o=C(w.und(n[2])?10:n[2],.1,100),n=C(w.und(n[3])?0:n[3],.1,100),u=Math.sqrt(a/e),i=o/(2*Math.sqrt(a*e)),c=i<1?u*Math.sqrt(1-i*i):0,s=i<1?(i*u-n)/c:-n+u;function f(n){var e=t?t*n/1e3:n,e=i<1?Math.exp(-e*i*u)*(+Math.cos(c*e)+s*Math.sin(c*e)):(1+s*e)*Math.exp(-e*u);return 0===n||1===n?n:1-e}return t?f:function(){var n=l.springs[r];if(n)return n;for(var e=0,t=0;;)if(1===f(e+=1/6)){if(16<=++t)break}else t=0;n=e*(1/6)*1e3;return l.springs[r]=n}}function q(e){return void 0===e&&(e=10),function(n){return Math.round(n*e)*(1/e)}}function $(b,e,M,t){if(0<=b&&b<=1&&0<=M&&M<=1){var x=new Float32Array(11);if(b!==e||M!==t)for(var n=0;n<11;++n)x[n]=k(.1*n,b,M);return function(n){return b===e&&M===t||0===n||1===n?n:k(function(n){for(var e=0,t=1;10!==t&&x[t]<=n;++t)e+=.1;var r=e+(n-x[--t])/(x[t+1]-x[t])*.1,a=O(r,b,M);if(.001<=a){for(var o=n,u=r,i=b,c=M,s=0;s<4;++s){var f=O(u,i,c);if(0===f)return u;u-=(k(u,i,c)-o)/f}return u}if(0===a)return r;for(var l,d,p=n,h=e,g=e+.1,m=b,v=M,y=0;0<(l=k(d=h+(g-h)/2,m,v)-p)?g=d:h=d,1e-7<Math.abs(l)&&++y<10;);return d}(n),e,t)}}}e={linear:function(){return function(n){return n}}},t={Sine:function(){return function(n){return 1-Math.cos(n*Math.PI/2)}},Circ:function(){return function(n){return 1-Math.sqrt(1-n*n)}},Back:function(){return function(n){return n*n*(3*n-2)}},Bounce:function(){return function(n){for(var e,t=4;n<((e=Math.pow(2,--t))-1)/11;);return 1/Math.pow(4,3-t)-7.5625*Math.pow((3*e-2)/22-n,2)}},Elastic:function(n,e){void 0===e&&(e=.5);var t=C(n=void 0===n?1:n,1,10),r=C(e,.1,2);return function(n){return 0===n||1===n?n:-t*Math.pow(2,10*(n-1))*Math.sin((n-1-r/(2*Math.PI)*Math.asin(1/t))*(2*Math.PI)/r)}}},["Quad","Cubic","Quart","Quint","Expo"].forEach(function(n,e){t[n]=function(){return function(n){return Math.pow(n,e+2)}}}),Object.keys(t).forEach(function(n){var r=t[n];e["easeIn"+n]=r,e["easeOut"+n]=function(e,t){return function(n){return 1-r(e,t)(1-n)}},e["easeInOut"+n]=function(e,t){return function(n){return n<.5?r(e,t)(2*n)/2:1-r(e,t)(-2*n+2)/2}}});var e,t,c=e;function r(n,e){return 1-3*e+3*n}function k(n,e,t){return((r(e,t)*n+(3*t-6*e))*n+3*e)*n}function O(n,e,t){return 3*r(e,t)*n*n+2*(3*t-6*e)*n+3*e}function B(n,e){if(w.fnc(n))return n;var t=n.split("(")[0],r=c[t],a=d(n);switch(t){case"spring":return u(n,e);case"cubicBezier":return o($,a);case"steps":return o(q,a);default:return o(r,a)}}function a(n){try{return document.querySelectorAll(n)}catch(n){}}function P(n,e){for(var t,r=n.length,a=2<=arguments.length?e:void 0,o=[],u=0;u<r;u++)u in n&&(t=n[u],e.call(a,t,u,n))&&o.push(t);return o}function f(n){return n.reduce(function(n,e){return n.concat(w.arr(e)?f(e):e)},[])}function p(n){return w.arr(n)?n:(n=w.str(n)?a(n)||n:n)instanceof NodeList||n instanceof HTMLCollection?[].slice.call(n):[n]}function h(n,e){return n.some(function(n){return n===e})}function g(n){var e,t={};for(e in n)t[e]=n[e];return t}function x(n,e){var t,r=g(n);for(t in n)r[t]=(e.hasOwnProperty(t)?e:n)[t];return r}function I(n,e){var t,r=g(n);for(t in e)r[t]=(w.und(n[t])?e:n)[t];return r}function T(n){n=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(n);if(n)return n[1]}function m(n,e){return w.fnc(n)?n(e.target,e.id,e.total):n}function v(n,e){return n.getAttribute(e)}function y(n,e,t){var r,a,o;return h([t,"deg","rad","turn"],T(e))?e:(r=l.CSS[e+t],w.und(r)?(a=document.createElement(n.tagName),(n=n.parentNode&&n.parentNode!==document?n.parentNode:document.body).appendChild(a),a.style.position="absolute",a.style.width=100+t,o=100/a.offsetWidth,n.removeChild(a),n=o*parseFloat(e),l.CSS[e+t]=n):r)}function b(n,e,t){var r;if(e in n.style)return r=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),e=n.style[e]||getComputedStyle(n).getPropertyValue(r)||"0",t?y(n,e,t):e}function D(n,e){return w.dom(n)&&!w.inp(n)&&(v(n,e)||w.svg(n)&&n[e])?"attribute":w.dom(n)&&h(S,e)?"transform":w.dom(n)&&"transform"!==e&&b(n,e)?"css":null!=n[e]?"object":void 0}function X(n){if(w.dom(n)){for(var e,t=n.style.transform||"",r=/(\w+)\(([^)]*)\)/g,a=new Map;e=r.exec(t);)a.set(e[1],e[2]);return a}}function E(n,e,t,r){switch(D(n,e)){case"transform":return a=n,u=r,i=t,c=s(o=e,"scale")?1:0+(s(c=o,"translate")||"perspective"===c?"px":s(c,"rotate")||s(c,"skew")?"deg":void 0),c=X(a).get(o)||c,u&&(u.transforms.list.set(o,c),u.transforms.last=o),i?y(a,c,i):c;case"css":return b(n,e,t);case"attribute":return v(n,e);default:return n[e]||0}var a,o,u,i,c}function F(n,e){var t=/^(\*=|\+=|-=)/.exec(n);if(!t)return n;var r=T(n)||0,a=parseFloat(e),o=parseFloat(n.replace(t[0],""));switch(t[0][0]){case"+":return a+o+r;case"-":return a-o+r;case"*":return a*o+r}}function Y(n,e){var t,r,a,o,u,i,c;return w.col(n)?(i=n,w.rgb(i)?(o=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(u=i))?"rgba("+o[1]+",1)":u:w.hex(i)?(o=i.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(n,e,t,r){return e+e+t+t+r+r}),u=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(o),"rgba("+parseInt(u[1],16)+","+parseInt(u[2],16)+","+parseInt(u[3],16)+",1)"):w.hsl(i)?(o=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(o=i)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(o),u=parseInt(o[1],10)/360,i=parseInt(o[2],10)/100,c=parseInt(o[3],10)/100,o=o[4]||1,0==i?t=r=a=c:(t=s(i=2*c-(c=c<.5?c*(1+i):c+i-c*i),c,u+1/3),r=s(i,c,u),a=s(i,c,u-1/3)),"rgba("+255*t+","+255*r+","+255*a+","+o+")"):void 0):/\s/g.test(n)?n:(c=(i=T(n))?n.substr(0,n.length-i.length):n,e?c+e:c);function s(n,e,t){return t<0&&(t+=1),1<t&&--t,t<1/6?n+6*(e-n)*t:t<.5?e:t<2/3?n+(e-n)*(2/3-t)*6:n}}function N(n,e){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function Z(n){for(var e,t=n.points,r=0,a=0;a<t.numberOfItems;a++){var o=t.getItem(a);0<a&&(r+=N(e,o)),e=o}return r}function Q(n){if(n.getTotalLength)return n.getTotalLength();switch(n.tagName.toLowerCase()){case"circle":return 2*Math.PI*v(n,"r");case"rect":return 2*v(e=n,"width")+2*v(e,"height");case"line":return N({x:v(e=n,"x1"),y:v(e,"y1")},{x:v(e,"x2"),y:v(e,"y2")});case"polyline":return Z(n);case"polygon":return e=n.points,Z(n)+N(e.getItem(e.numberOfItems-1),e.getItem(0))}var e}function V(e,n){var n=n||{},t=n.el||function(){for(var n=e.parentNode;w.svg(n)&&w.svg(n.parentNode);)n=n.parentNode;return n}(),r=t.getBoundingClientRect(),a=v(t,"viewBox"),o=r.width,r=r.height,n=n.viewBox||(a?a.split(" "):[0,0,o,r]);return{el:t,viewBox:n,x:+n[0],y:+n[1],w:o/n[2],h:r/n[3]}}function z(n,e){var t=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,r=Y(w.pth(n)?n.totalLength:n,e)+"";return{original:r,numbers:r.match(t)?r.match(t).map(Number):[0],strings:w.str(n)||e?r.split(t):[]}}function H(n){return P(n?f(w.arr(n)?n.map(p):p(n)):[],function(n,e,t){return t.indexOf(n)===e})}function G(n){var t=H(n);return t.map(function(n,e){return{target:n,id:e,total:t.length,transforms:{list:X(n)}}})}function R(n,e){var t,r=[],a=e.keyframes;for(t in e=a?I(function(e){for(var t=P(f(e.map(function(n){return Object.keys(n)})),function(n){return w.key(n)}).reduce(function(n,e){return n.indexOf(e)<0&&n.push(e),n},[]),a={},n=0;n<t.length;n++)!function(n){var r=t[n];a[r]=e.map(function(n){var e,t={};for(e in n)w.key(e)?e==r&&(t.value=n[e]):t[e]=n[e];return t})}(n);return a}(a),e):e)w.key(t)&&r.push({name:t,tweens:function(n,t){var e,r=g(t),a=(/^spring/.test(r.easing)&&(r.duration=u(r.easing)),w.arr(n)&&(2!==(e=n.length)||w.obj(n[0])?w.fnc(t.duration)||(r.duration=t.duration/e):n={value:n}),w.arr(n)?n:[n]);return a.map(function(n,e){n=w.obj(n)&&!w.pth(n)?n:{value:n};return w.und(n.delay)&&(n.delay=e?0:t.delay),w.und(n.endDelay)&&(n.endDelay=e===a.length-1?t.endDelay:0),n}).map(function(n){return I(n,r)})}(e[t],n)});return r}var W={css:function(n,e,t){return n.style[e]=t},attribute:function(n,e,t){return n.setAttribute(e,t)},object:function(n,e,t){return n[e]=t},transform:function(n,e,t,r,a){var o;r.list.set(e,t),e!==r.last&&!a||(o="",r.list.forEach(function(n,e){o+=e+"("+n+") "}),n.style.transform=o)}};function J(n,u){G(n).forEach(function(n){for(var e in u){var t=m(u[e],n),r=n.target,a=T(t),o=E(r,e,a,n),t=F(Y(t,a||T(o)),o),a=D(r,e);W[a](r,e,t,n.transforms,!0)}})}function K(n,e){return P(f(n.map(function(o){return e.map(function(n){var e,t,i,c,s,r=o,a=D(r.target,n.name);if(a)return c=r,t=(e=(i=n).tweens.map(function(n){var n=function(n,e){var t,r={};for(t in n){var a=m(n[t],e);w.arr(a)&&1===(a=a.map(function(n){return m(n,e)})).length&&(a=a[0]),r[t]=a}return r.duration=parseFloat(r.duration),r.delay=parseFloat(r.delay),r}(n,c),e=n.value,t=w.arr(e)?e[1]:e,r=T(t),a=E(c.target,i.name,r,c),o=s?s.to.original:a,u=w.arr(e)?e[0]:o,a=T(u)||T(a),r=r||a;return w.und(t)&&(t=o),n.from=z(u,r),n.to=z(F(t,u),r),n.start=s?s.end:0,n.end=n.start+n.delay+n.duration+n.endDelay,n.easing=B(n.easing,n.duration),n.isPath=w.pth(e),n.isColor=w.col(n.from.original),n.isColor&&(n.round=1),s=n}))[e.length-1],{type:a,property:n.name,animatable:r,tweens:e,duration:t.end,delay:e[0].delay,endDelay:t.endDelay}})})),function(n){return!w.und(n)})}function U(n,e){function t(n){return n.timelineOffset||0}var r=n.length,a={};return a.duration=r?Math.max.apply(Math,n.map(function(n){return t(n)+n.duration})):e.duration,a.delay=r?Math.min.apply(Math,n.map(function(n){return t(n)+n.delay})):e.delay,a.endDelay=r?a.duration-Math.max.apply(Math,n.map(function(n){return t(n)+n.duration-n.endDelay})):e.endDelay,a}var A,_=0,L=[],n=[],nn=en;function en(){A=requestAnimationFrame(tn)}function tn(n){var e=L.length;if(e){for(var t=0;t<e;){var r,a=L[t];a.paused?-1<(r=L.indexOf(a))&&(L.splice(r,1),e=L.length):a.tick(n),t++}en()}else A=cancelAnimationFrame(A)}function j(n){var c,s=0,f=0,l=0,d=0,p=null;function h(n){var e=window.Promise&&new Promise(function(n){return p=n});n.finished=e}e=x(i,n=n=void 0===n?{}:n),t=R(r=x(M,n),n),r=U(t=K(n=G(n.targets),t),r),a=_,_++;var e,t,r,a,k=I(e,{id:a,children:[],animatables:n,animations:t,duration:r.duration,delay:r.delay,endDelay:r.endDelay});function g(){var n=k.direction;"alternate"!==n&&(k.direction="normal"!==n?"normal":"reverse"),k.reversed=!k.reversed,c.forEach(function(n){return n.reversed=k.reversed})}function m(n){return k.reversed?k.duration-n:n}function o(){s=0,f=m(k.currentTime)*(1/j.speed)}function v(n,e){e&&e.seek(n-e.timelineOffset)}function y(e){for(var n=0,t=k.animations,r=t.length;n<r;){var a=t[n],o=a.animatable,u=a.tweens,i=u.length-1,c=u[i];i&&(c=P(u,function(n){return e<n.end})[0]||c);for(var i=C(e-c.start-c.delay,0,c.duration)/c.duration,s=isNaN(i)?1:c.easing(i),f=c.to.strings,l=c.round,d=[],p=c.to.numbers.length,h=void 0,g=0;g<p;g++){var m=void 0,v=c.to.numbers[g],y=c.from.numbers[g]||0,m=c.isPath?function(e,t){function n(n){return e.el.getPointAtLength(1<=t+(n=void 0===n?0:n)?t+n:0)}var r=V(e.el,e.svg),a=n(),o=n(-1),u=n(1);switch(e.property){case"x":return(a.x-r.x)*r.w;case"y":return(a.y-r.y)*r.h;case"angle":return 180*Math.atan2(u.y-o.y,u.x-o.x)/Math.PI}}(c.value,s*v):y+s*(v-y);!l||c.isColor&&2<g||(m=Math.round(m*l)/l),d.push(m)}var b=f.length;if(b)for(var h=f[0],M=0;M<b;M++){f[M];var x=f[M+1],w=d[M];isNaN(w)||(h+=x?w+x:w+" ")}else h=d[0];W[a.type](o.target,a.property,h,o.transforms),a.currentValue=h,n++}}function b(n){k[n]&&!k.passThrough&&k[n](k)}function u(n){var e=k.duration,t=k.delay,r=e-k.endDelay,a=m(n);if(k.progress=C(a/e*100,0,100),k.reversePlayback=a<k.currentTime,c){var o=a;if(k.reversePlayback)for(var u=d;u--;)v(o,c[u]);else for(var i=0;i<d;i++)v(o,c[i])}!k.began&&0<k.currentTime&&(k.began=!0,b("begin")),!k.loopBegan&&0<k.currentTime&&(k.loopBegan=!0,b("loopBegin")),a<=t&&0!==k.currentTime&&y(0),(r<=a&&k.currentTime!==e||!e)&&y(e),t<a&&a<r?(k.changeBegan||(k.changeBegan=!0,k.changeCompleted=!1,b("changeBegin")),b("change"),y(a)):k.changeBegan&&(k.changeCompleted=!0,k.changeBegan=!1,b("changeComplete")),k.currentTime=C(a,0,e),k.began&&b("update"),e<=n&&(f=0,k.remaining&&!0!==k.remaining&&k.remaining--,k.remaining?(s=l,b("loopComplete"),k.loopBegan=!1,"alternate"===k.direction&&g()):(k.paused=!0,k.completed||(k.completed=!0,b("loopComplete"),b("complete"),!k.passThrough&&"Promise"in window&&(p(),h(k)))))}return h(k),k.reset=function(){var n=k.direction;k.passThrough=!1,k.currentTime=0,k.progress=0,k.paused=!0,k.began=!1,k.loopBegan=!1,k.changeBegan=!1,k.completed=!1,k.changeCompleted=!1,k.reversePlayback=!1,k.reversed="reverse"===n,k.remaining=k.loop,c=k.children;for(var e=d=c.length;e--;)k.children[e].reset();(k.reversed&&!0!==k.loop||"alternate"===n&&1===k.loop)&&k.remaining++,y(k.reversed?k.duration:0)},k.set=function(n,e){return J(n,e),k},k.tick=function(n){u(((l=n)+(f-(s=s||l)))*j.speed)},k.seek=function(n){u(m(n))},k.pause=function(){k.paused=!0,o()},k.play=function(){k.paused&&(k.completed&&k.reset(),k.paused=!1,L.push(k),o(),A||nn())},k.reverse=function(){g(),o()},k.restart=function(){k.reset(),k.play()},k.reset(),k.autoplay&&k.play(),k}function rn(n,e){for(var t=e.length;t--;)h(n,e[t].animatable.target)&&e.splice(t,1)}return"undefined"!=typeof document&&document.addEventListener("visibilitychange",function(){document.hidden?(L.forEach(function(n){return n.pause()}),n=L.slice(0),j.running=L=[]):n.forEach(function(n){return n.play()})}),j.version="3.1.0",j.speed=1,j.running=L,j.remove=function(n){for(var e=H(n),t=L.length;t--;){var r=L[t],a=r.animations,o=r.children;rn(e,a);for(var u=o.length;u--;){var i=o[u],c=i.animations;rn(e,c),c.length||i.children.length||o.splice(u,1)}a.length||o.length||r.pause()}},j.get=E,j.set=J,j.convertPx=y,j.path=function(n,e){var t=w.str(n)?a(n)[0]:n,r=e||100;return function(n){return{property:n,el:t,svg:V(t),totalLength:Q(t)*(r/100)}}},j.setDashoffset=function(n){var e=Q(n);return n.setAttribute("stroke-dasharray",e),e},j.stagger=function(n,e){var i=(e=void 0===e?{}:e).direction||"normal",c=e.easing?B(e.easing):null,s=e.grid,f=e.axis,l=e.from||0,d="first"===l,p="center"===l,h="last"===l,g=w.arr(n),m=g?parseFloat(n[0]):parseFloat(n),v=g?parseFloat(n[1]):0,y=T(g?n[1]:n)||0,b=e.start||0+(g?m:0),M=[],x=0;return function(n,e,t){if(d&&(l=0),p&&(l=(t-1)/2),h&&(l=t-1),!M.length){for(var r,a,o,u=0;u<t;u++)s?(r=p?(s[0]-1)/2:l%s[0],a=p?(s[1]-1)/2:Math.floor(l/s[0]),r=r-u%s[0],a=a-Math.floor(u/s[0]),o=Math.sqrt(r*r+a*a),"x"===f&&(o=-r),M.push(o="y"===f?-a:o)):M.push(Math.abs(l-u)),x=Math.max.apply(Math,M);c&&(M=M.map(function(n){return c(n/x)*x})),"reverse"===i&&(M=M.map(function(n){return f?n<0?-1*n:-n:Math.abs(x-n)}))}return b+(g?(v-m)/x:m)*(Math.round(100*M[e])/100)+y}},j.timeline=function(u){var i=j(u=void 0===u?{}:u);return i.duration=0,i.add=function(n,e){var t=L.indexOf(i),r=i.children;function a(n){n.passThrough=!0}-1<t&&L.splice(t,1);for(var o=0;o<r.length;o++)a(r[o]);t=I(n,x(M,u)),t.targets=t.targets||u.targets,n=i.duration,t.autoplay=!1,t.direction=i.direction,t.timelineOffset=w.und(e)?n:F(e,n),a(i),i.seek(t.timelineOffset),e=j(t),a(e),r.push(e),n=U(r,u);return i.delay=n.delay,i.endDelay=n.endDelay,i.duration=n.duration,i.seek(0),i.reset(),i.autoplay&&i.play(),i},i},j.easing=B,j.penner=c,j.random=function(n,e){return Math.floor(Math.random()*(e-n+1))+n},j});
/*
 *  rexScrollify - v0.1
 *
 *  Made by NEWEB di Simone Forgiarini
 */
!function(s,o,r,a){"use strict";var l="rexScrollify",i={animation:"rexSlideUpBigIn",duration:"500",offset:0,delay:0,stagger:0,mobile:!0,force_launch:!1,context:null},h=e(),t=(o.addEventListener("resize",function(){h=e()}),function(){var t,e=r.createElement("fakeelement"),i={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in i)if(e.style[t]!==a)return}(),function(){var t,e=r.createElement("fakeelement"),i={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(t in i)if(e.style[t]!==a)return i[t]}());function e(){var t=o,e="inner";return"innerWidth"in o||(e="client",t=r.documentElement||r.body),{width:t[e+"Width"],height:t[e+"Height"]}}function n(){var t,e,i,n,s,a;h.width<=767&&!this.settings.mobile?(this.$element.css("opacity",1),this.properties.launched=!0,this.removeScrollHandler()):!this.properties.launched&&(t=h.height,n=o.pageYOffset||r.documentElement.scrollTop,s=this.element,a=void 0!==(a=n)?a:o.pageYOffset||r.documentElement.scrollTop,s=s.getBoundingClientRect().top+a,a=this.element.offsetHeight,0===this.settings.offset?(e=.7*t,i=.2*t):0<this.settings.offset?(e=t-this.settings.offset,i=.2*t):this.settings.offset<0&&(e=.7*t,i=t+this.settings.offset),s-e<n&&n<s+a-i||this.settings.force_launch)&&(this.settings.delay&&(this.properties.launched=!0),this.launchAnimation())}function d(t,e){this.element=t,this.$element=s(t),this.settings=s.extend({},i,e),this._defaults=i,this._name=l,this.properties={launched:!1},this.settings.animation=this.element.getAttribute("data-rs-animation")||this.settings.animation,this.settings.duration=this.element.getAttribute("data-rs-animation-duration")||this.settings.duration,this.settings.offset=parseInt(this.element.getAttribute("data-rs-animation-offset")||this.settings.offset),this.settings.delay=parseInt(this.element.getAttribute("data-rs-animation-delay")||this.settings.delay),this.settings.stagger=parseInt(this.element.getAttribute("data-rs-animation-stagger")||this.settings.stagger),this.settings.force_launch=this.element.getAttribute("data-rs-animation-force-launch")||this.settings.force_launch,this.bindedScrollHandler=null,this.init()}s.extend(d.prototype,{init:function(){n.call(this),this.bindedScrollHandler=n.bind(this),(this.settings.context||o).addEventListener("scroll",this.bindedScrollHandler)},launchAnimation:function(){var e=this;this.$element.one(t,function(t){e.element.style.opacity=1,e.$element.trigger("rs-animation-complete"),e.removeScrollHandler()}),this.properties.launched=!0,this.$element.addClass(this.settings.animation)},removeScrollHandler:function(){(this.settings.context||o).removeEventListener("scroll",this.bindedScrollHandler)}}),s.fn[l]=function(e){var i,n=arguments;return e===a||"object"==typeof e?this.each(function(){s.data(this,"plugin_"+l)||s.data(this,"plugin_"+l,new d(this,e))}):"string"==typeof e&&"_"!==e[0]&&"init"!==e?(this.each(function(){var t=s.data(this,"plugin_"+l);t instanceof d&&"function"==typeof t[e]&&(i=t[e].apply(t,Array.prototype.slice.call(n,1))),"destroy"===e&&s.data(this,"plugin_"+l,null)}),i!==a?i:this):void 0}}(jQuery,window,document);
// var lodash = _.noConflict();
var Rexbuilder_App=function(P){"use strict";function b(){Rexbuilder_Util.$document.on("YTPStart",function(e){var t=(e=P(e.target)).parents(".youtube-player").eq(0).children(".rex-video-toggle-audio"),i=e.YTPGetPlayer();void 0!==i&&(e.optimizeDisplay(),0==t.length||t.hasClass("user-has-muted")?(i.mute(),i.isMute=!0,i.setVolume(0)):e.YTPUnmute())}),Rexbuilder_Util.$document.on("click",".YTPOverlay",function(e){0<(e=P(e.target).parents(".rex-youtube-wrap")).length&&(1==e[0].state?e.YTPPause():e.YTPPlay())}),Rexbuilder_Util.$document.on("click",".block-has-slider",function(e){var t,i=(r=P(this).find(".grid-item-content")).children(".rex-youtube-wrap"),n=r.children(".rex-video-vimeo-wrap--block"),r=r.children(".rex-video-wrap");0<i.length&&(1==i[0].state?i.YTPPause():i.YTPPlay()),0<n.length&&(t=VimeoVideo.findVideo(n.find("iframe")[0]))&&t.getPaused().then(function(e){e?t.play():t.pause()}).catch(function(e){}),0<r.length&&((i=r.find(".rex-video-container").get(0)).paused?i.play():i.pause())}),Rexbuilder_Util.$document.on("click",".rex-video-toggle-audio",function(e){e.stopPropagation();var t,i=P(this),e=i.parents(".youtube-player").eq(0).children(".rex-youtube-wrap"),n=i.parents(".mp4-player").eq(0).find(".rex-video-container"),r=i.parents(".vimeo-player").eq(0).find(".rex-video-vimeo-wrap--block");0<e.length&&(e.get(0).player.isMuted()?(e.YTPUnmute(),i.removeClass("user-has-muted")):(e.YTPMute(),i.addClass("user-has-muted"))),0<n.length&&(n.prop("muted")?(n.prop("muted",!1),i.removeClass("user-has-muted")):(n.prop("muted",!0),i.addClass("user-has-muted"))),0<r.length&&(t=VimeoVideo.findVideo(r.find("iframe")[0]))&&t.getVolume().then(function(e){0==e?(t.setVolume(1),i.removeClass("user-has-muted")):(t.setVolume(0),i.addClass("user-has-muted"))}).catch(function(e){})}),Rexbuilder_Util.$document.on("click",".rex-video__controls .pause",function(e){var t=(e=P(e.currentTarget)).parent().children(".play"),i=e.parents(".rexpansive_section");e.removeClass("video-tool--view"),t.addClass("video-tool--view"),Rexbuilder_Util.pauseVideo(i)}),Rexbuilder_Util.$document.on("click",".rex-video__controls .play",function(e){var t=(e=P(e.currentTarget)).parent().children(".pause"),i=e.parents(".rexpansive_section");e.removeClass("video-tool--view"),t.addClass("video-tool--view"),Rexbuilder_Util.playVideo(i)}),Rexbuilder_Util.$document.on("click",".sticky-video-controls",function(e){P(e.currentTarget).parent().find(".video-tool--view").click()})}var r=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor),A="undefined"!=typeof SplitScrollable,L="undefined"!=typeof StickySection,y=null,v=null,e=null,t=null,R=[],i={},U=[];function n(){var e=this.iframeContainer.contentDocument.querySelector(".rexbuilder-live-content");e.parentElement.removeChild(e),this.iframeContainer.contentDocument.body.insertBefore(e,this.iframeContainer.contentDocument.body.firstChild)}var T=function(){if("undefined"!=typeof DistanceAccordion)for(var e=document.getElementsByClassName("distance-accordion-toggle"),t=0,i=e.length;t<i;t++)new DistanceAccordion(e[t])},$=function(){if("undefined"!=typeof PopUpContent)for(var e=[].slice.call(document.getElementsByClassName("popup-content-button")),t=e.length,i=0,i=0;i<t;i++)null===PopUpContent.data(e[i])&&new PopUpContent(e[i],{contentRetrieveMethod:"iframe",getPopUpContentComplete:n,ajaxSettings:{type:"GET",dataType:"json",url:_plugin_frontend_settings.rexajax.ajaxurl,data:{action:"rex_get_popup_content",nonce_param:_plugin_frontend_settings.rexajax.rexnonce}}})};function M(){if("undefined"!=typeof PopUpContent&&!Rexbuilder_Util.isIframe){window.addEventListener("message",l,!1),document.addEventListener("popUpContent:open",function(){var e;for(e=0;e<i.length;e++)i[e].options.autoPlay&&i[e].pausePlayer()}),document.addEventListener("popUpContent:close",function(){var e;for(e=0;e<i.length;e++)i[e].options.autoPlay&&i[e].unpausePlayer()});for(var e=Array.prototype.slice.call(document.getElementsByClassName("rex-slider-wrap")),t=e.length,i=[],n=0;n<t;n++){var r=Flickity.data(e[n]);r&&i.push(r)}}}function l(e){if(e.data.rexliveEvent)switch(e.data.eventName){case"popUpContent:pswpOpened":Rexbuilder_Util.addClass(document.body,"popup-content--active--pswp-open");break;case"popUpContent:pswpClosed":Rexbuilder_Util.removeClass(document.body,"popup-content--active--pswp-open");break;case"popUpContent:changePage":""!==e.data.href&&(window.location=e.data.href)}}function F(){var e,t,i=this.element.querySelector(".perfect-grid-gallery"),n=u(i);if(n.instance){for(o(this,n.instance),a(this,n.instance),e=0;e<this.totScrollEls;e++)this.scrollEls[e].style.height="";for(e=0;e<this.totOpacityEls;e++)this.opacityEls[e].style.top="";for(e=0;e<n.instance.gridBlocksTotal;e++){for(t=0;t<this.totScrollEls;t++)if(this.scrollEls[t]===n.instance.gridBlocks[e].el){n.instance.gridBlocks[e].setHeight=!1;break}for(t=0;t<this.totOpacityEls;t++)if(this.opacityEls[t]===n.instance.gridBlocks[e].el){n.instance.gridBlocks[e].setTop=!1;break}}i.style.height="",n.instance.properties.gridHeightSettable=!1}}function o(t,e){t.scrollEls=e.gridBlocks.filter(function(e){return Rexbuilder_Util.hasClass(e.el,t.options.scrollElsClass)}).map(function(e){return e.el}),t.scrollElsToWatch=e.gridBlocks.filter(function(e){return Rexbuilder_Util.hasClass(e.el,t.options.scrollElsClass)}).map(function(e){return e.el.querySelector("."+t.options.scrollElsToWatchClass)});for(var i=0,n=0,r=0;i<e.gridBlocksTotal;i++)for(n=0;n<t.totScrollEls;n++)if(t.scrollEls[n]===e.gridBlocks[i].el){t.scrollEls[n].style.WebKitBoxOrdinalGroup=r+1,t.scrollEls[n].style.MozFlexOrder=r,t.scrollEls[n].style.OOrder=r,t.scrollEls[n].style.MSOrder=r,t.scrollEls[n].style.order=r,t.scrollElsToWatch[n].setAttribute("data-scroll-el-index",r),r++;break}}function a(t,e){t.opacityEls=e.gridBlocks.filter(function(e){return Rexbuilder_Util.hasClass(e.el,t.options.opacityElsClass)}).map(function(e){return e.el})}var C=function(e){if("undefined"!=typeof Odometer){var t,i,n,r=e.innerText;if(null!==e.getAttribute("data-yearly-inc")&&""!==_plugin_frontend_settings.sitedate&&(t=new Date(_plugin_frontend_settings.sitedate),i=(new Date).getFullYear()-t.getFullYear(),n=e.getAttribute("data-yearly-inc"),r=parseInt(r)+parseInt(n)*i),null!==e.getAttribute("data-montly-inc")&&""!==_plugin_frontend_settings.sitedate&&(t=new Date(_plugin_frontend_settings.sitedate),i=(new Date).getMonth()-t.getMonth(),n=e.getAttribute("data-montly-inc"),r=parseInt(r)+parseInt(n)*i),e.setAttribute("data-final-value",r),null==(l=e.getAttribute("data-start-value")))for(var l="",o=0,a=e.innerText.length;o<a;o++)l+="1";return new Odometer({el:e,value:l,format:_plugin_frontend_settings.odometer.format,theme:_plugin_frontend_settings.odometer.theme})}};function k(){e=Rexbuilder_Util.$rexContainer.find(".perfect-grid-item .rex-accordion"),i={onSetup:function(){var e,t,i;Rexbuilder_Util.editorMode||(e=(i=this.$element.parents(".perfect-grid-gallery")).find(".perfect-grid-item"),i=i.get(0),t=this.$element.parents(".perfect-grid-item").get(0),i=u(i),this.caching={$blocks:e,block:t,$block:P(t),rexGridInstance:i})}},Rexbuilder_Util.editorMode?(i.open={progressClbk:function(e){var t=e.properties.$content.parents(".grid-stack-item")[0],i=e.properties.$content.parents(".grid-stack").data("gridstack");i.resize(t,null,Math.round(e.element.parentElement.offsetHeight/i.opts.cellHeight))}},i.close={progressClbk:function(e){var t=e.properties.$content.parents(".grid-stack-item")[0],i=t.children[0].getAttribute("data-gs_start_h");e.properties.$content.parents(".grid-stack").data("gridstack").resize(t,null,Math.round(parseInt(i)))}}):(i.open={startClbk:function(e){e.caching.$blocks.addClass("accordion-animate-block")},progressClbk:function(e){e.caching.rexGridInstance&&e.caching.rexGridInstance.instance.reCalcBlockHeight(e.caching.block)}},i.close={progressClbk:function(e){e.caching.rexGridInstance&&e.caching.rexGridInstance.instance.reCalcBlockHeight(e.caching.block)},completeClbk:function(e){e.caching.$block.one(Rexbuilder_Util._transitionEvent,function(){e.caching.$blocks.removeClass("accordion-animate-block")})}}),e.rexAccordion(i)}function w(){t=Rexbuilder_Util.$rexContainer.find(".rexpansive_section.rex-accordion"),Rexbuilder_Util.editorMode||t.each(function(e,t){var i=P(t);i.find(".perfect-grid-item").removeClass("rs-animation"),i.rexAccordion({onSetup:function(){this.caching={rexGridInstance:u(t.querySelector(".perfect-grid-gallery"))}},open:{progressClbk:function(e){e=e.element.querySelector(".perfect-grid-gallery");RexGrid.data(e).endResize()},completeClbk:function(e){e.caching.rexGridInstance.instance.section.classList.add("open_complete")}},close:{startClbk:function(e){e=e.element.getAttribute("href"),e=Rexbuilder_Util.rexContainer.querySelector(`a[href="${e}"`),e.classList.add("close"),e.classList.remove("open"),e=P(e).offset().top;e<document.documentElement.scrollTop&&P("html, body").animate({scrollTop:e},150)},progressClbk:function(e){e=e.element.querySelector(".perfect-grid-gallery");RexGrid.data(e).endResize()},completeClbk:function(e){e.$element.removeClass("open_complete")}}}),i.on("rexclassic:smooth_link_complete",function(e,t){P(this).rexAccordion("open_single_accordion")})})}function E(){Rexbuilder_Util.$document.find(".rex-accordion").not(t).not(e).rexAccordion({open:{},close:{}})}function s(){for(var e=0;e<U.length;e++)Rexbuilder_Util.removeClass(U[e].section,"empty-section"),(0===U[e].gridBlocksTotal||U[e].section.getElementsByClassName("rex-hide-element").length===U[e].gridBlocksTotal)&&Rexbuilder_Util.addClass(U[e].section,"empty-section")}function d(){if(!Rexbuilder_Util.editorMode){for(var e=Array.prototype.slice.call(document.getElementsByClassName("disable-grid")),t=e.length,i=0;i<t;i++){for(var n=e[i].querySelector(".perfect-grid-gallery"),r=Array.prototype.slice.call(e[i].getElementsByClassName("grid-stack-item")),l=r.length,o=[],a=0;a<l;a++)o.push(r[a].style.height);for(V(n),Rexbuilder_Util.addClass(e[i],"disabled"),P(n).find(".rex-animate-lazy-loaded-resource .rex-image-wrapper").addClass("rex-image-wrapper--lazy-show"),a=0;a<l;a++)r[a].style.height=o[a]}if(Rexbuilder_Photoswipe.init(".photoswipe-gallery"),Rexbuilder_Util.$rexContainer.find(".inline-pswp-gallery").on("click",Rexbuilder_Photoswipe.init_inline_pswp),P(".rex-effect-distortion").each(function(e,t){var i=P(t);1==_plugin_frontend_settings.animations?i.one("rs-animation-complete",function(){i.rexEffect({effect:{name:"distortion",properties:{startDelay:2500}}})}):i.rexEffect({effect:{name:"distortion",properties:{startDelay:2500}}})}),P(".rex-effect-distortion-section").each(function(e,t){var i=P(t);1==_plugin_frontend_settings.animations?i.one("rs-scrolled-complete",function(){i.rexEffect({effect:{name:"distortion-section",properties:{startDelay:2500}}})}):i.rexEffect({effect:{name:"distortion-section",properties:{startDelay:2500}}})}),P("[class*=border-space-animated-]").each(function(e,t){var i=P(t);i.addClass("border-space-animated"),1==_plugin_frontend_settings.animations&&768<Rexbuilder_Util.globalViewport.width?i.one("rs-animation-complete",function(){i.addClass("border-active")}):i.parents(".rexpansive_section").one("rs-scrolled-complete",function(){i.addClass("border-active")})}),L){var s,d,c=!(Rexbuilder_Util.cssPropertyValueSupported("position","sticky")||Rexbuilder_Util.cssPropertyValueSupported("position","-webkit-sticky")),u=Array.prototype.slice.call(document.getElementsByClassName("sticky-section")),p=u.length,f=0,g="";for(StickySection.destroyHandlers(),f=0;f<p;f++)if(s=u[f],null!==StickySection.data(s)&&StickySection.data(s).destroy(),Rexbuilder_Util.hasClass(s,"mp4-player")?g=".rex-video-wrap":""===s.style.backgroundImage&&!Rexbuilder_Util.hasClass(s,"section-w-image")||(g=".sticky-background-simulator"),d="true"===s.querySelector(".section-data").getAttribute("data-row_overlay_active"),new StickySection(s,{borderAnimation:!0,stickyJS:c,stickyElementSelector:g,overlayAnimation:d}),"undefined"!=typeof RevealOpacityOnScroll&&_plugin_frontend_settings.stickySection.revealContentOnScroll)for(var m=RexGrid.data(s.querySelector(".perfect-grid-gallery")),x=0;x<m.gridBlocksTotal;x++){Rexbuilder_Util.removeClass(m.gridBlocks[x].el,"has-rs-animation"),Rexbuilder_Util.removeClass(m.gridBlocks[x].el,"rs-animation");var _=m.gridBlocks[x].el.querySelector(".text-wrap");new RevealOpacityOnScroll(_,{offset:1,transition:!1})}}if(P(document.getElementsByClassName("rex-element--animated")).rexScrolled({callback:function(e){e.addEventListener(Rexbuilder_Util._transitionEvent,B),Rexbuilder_Util.addClass(e,"run-animation")}}),1==_plugin_frontend_settings.animations&&Rexbuilder_Util.$rexContainer.imagesLoaded({background:!0},function(){P(document.querySelectorAll(".rs-animation:not(.deactivate-rexpansive-animation)")).rexScrollify({mobile:!1})}),T(),$(),"undefined"!=typeof PopUpVideo)for(var h=[].slice.call(document.getElementsByClassName("popup-video-button")),b=h.length,y=0,y=0;y<b;y++)""!==h[y].href&&new PopUpVideo(h[y],{closeOnEnd:_plugin_frontend_settings.popUpVideo.closeOnEnd});if(A&&!(Rexbuilder_Util.globalViewport.width<_plugin_frontend_settings.splitScrollable.minViewportWidth))for(var v=Array.prototype.slice.call(document.getElementsByClassName("split-scrollable")),R=v.length,U=0;U<R;U++)null===SplitScrollable.data(v[U])&&new SplitScrollable(v[U],{scrollElsToWatchClass:"text-wrap",initializeComplete:F});if("undefined"!=typeof ParticleSwarm)for(var C=Array.prototype.slice.call(document.getElementsByClassName("particle-swarm")),k=C.length,w=0;w<k;w++){var E=document.createElement("canvas");C[w].insertBefore(E,C[w].firstChild),new ParticleSwarm(E)}if("undefined"!=typeof RexIndicator){var S=Array.prototype.slice.call(document.getElementsByClassName("rex-indicator__placeholder"));for(let e=0;e<S.length;e++)new RexIndicator(S[e])}M()}function B(e){Rexbuilder_Util.removeClass(this,"rex-element--animated"),this.removeEventListener(Rexbuilder_Util._transitionEvent,B)}}var c=[];function S(e){void 0!==c[e]&&c[e].forEach(function(e){e.call()})}function u(e){for(var t=e.getAttribute("data-rex-grid-id"),i=0,n=U.length,i=0;i<n;i++)if(t===U[i].properties.id&&e===U[i].element)return{instance:U[i],index:i};return null}function V(e){e=u(e);null!==e&&(e.instance.destroy(),U.splice(e.index,1))}return{init:function(){if(Rexbuilder_Util.init(),Rexbuilder_Dom_Util.init(),y=Rexbuilder_Util.$rexContainer.find(".rexpansive_section"),v=Rexbuilder_Util.$rexContainer.find(".grid-stack-row"),S("builder_before_launch_grids"),0!==v.length)if(Rexbuilder_Util.editorMode)v.perfectGridGalleryEditor({editorMode:Rexbuilder_Util.editorMode});else{for(var e=Rexbuilder_Util.chooseLayout(),t=(Rexbuilder_Util.handleLayoutChange(e),Array.prototype.slice.call(document.getElementsByClassName("perfect-grid-gallery"))),i=t.length,n=0,n=0;n<i;n++){var r=new RexGrid(t[n]);U.push(r)}for(n=0;n<i;n++)L&&Rexbuilder_Util.hasClass(U[n].section,"sticky-section")&&StickySection.prepare(U[n].section);window.FastLoad.init()}if(Rexbuilder_Rexbutton.init(),Rexbuilder_Rexelement.init(),Rexbuilder_Rexwpcf7.init(),Rexbuilder_Util.editorMode)Rex_Save_Listeners.init(),Rexbuilder_Rexelement_Editor.init(),Rexbuilder_Rexwpcf7_Editor.init(),Rexbuilder_CreateBlocks.init(),Rexbuilder_Util_Editor.init(),Rexbuilder_Color_Palette.init(),Rexbuilder_Overlay_Palette.init(),Rexbuilder_Section.init(),Rexbuilder_Section_Editor.init(),Rexbuilder_Block.init(),Rexbuilder_Block_Editor.init(),Rexbuilder_Live_Utilities.addBuilderListeners(),CKEditor_Handler.init(),Rexbuilder_Section_Editor.triggerRowDataChange();else for(var l,o,a=[].slice.call(document.getElementsByClassName("rex-button-wrapper")),s=a.length,d=0,d=0;d<s;d++)a[d].querySelector(".rex-button-container")||((l=document.createElement("span")).className="rex-button-container",(o=a[d].querySelector(".rex-button-background")).parentNode.insertBefore(l,o),l.appendChild(o));if(Rex_Navigator.init(),Rexbuilder_Util.editorMode||"undefined"!=typeof Rexbuilder_FormFixes&&Rexbuilder_FormFixes.init(),Rexbuilder_Util.editorMode&&Rexbuilder_Util.launchEditDomLayout(),!Rexbuilder_Util.editorMode){y.each(function(e,t){0===t.getElementsByClassName("pswp-figure").length&&Rexbuilder_Util.removeClass(t,"photoswipe-gallery")});for(var c=[].slice.call(document.getElementsByClassName("rex-num-spin")),u=c.length,p=0;p<u;p++){var f=C(c[p]);f&&(R.push(f),Rexbuilder_Util.hasClass(c[p],"rex-num-spin__block-scrolled")?P(c[p]).parents(".perfect-grid-item").one("rs-scrolled-complete",{el:c[p]},function(e){e.data.el.innerHTML=e.data.el.getAttribute("data-final-value")}):Rexbuilder_Util.hasClass(c[p],"rex-num-spin__stopped")||P(c[p]).rexScrolled({callback:function(e){e.innerHTML=e.getAttribute("data-final-value")}}))}e=Rexbuilder_Util.$body.find(".rex-slideshow");0<e.length&&e.rexSlideshow()}if(1==_plugin_frontend_settings.native_scroll_animation){for(var g=['[href="#"]',".no-smoothing",".vertical-nav-link",".rex-vertical-nav-link",".woocommerce-review-link",".distance-accordion-toggle"],m=Rexbuilder_Util.$body.find('a[href*="#"]'),x=0,_=g.length;x<_;x++)m=m.not(g[x]);(m=m.not(h)).on("click",function(e){if(!(Rexbuilder_Util.editorMode&&e.currentTarget.matches(".rex-button-container")||location.pathname.replace(/^\//,"")!=this.pathname.replace(/^\//,"")||location.hostname!=this.hostname)){e=P(this.hash);if((e=e.length?e:Rexbuilder_Util.$rexContainer.find("[name="+this.hash.slice(1)+"]")).length)return Rexbuilder_Util.smoothScroll(e),!1}});var h=function(e){return 0!=P(this).parents(".woocommerce-tabs").length}}Rexbuilder_Util.editorMode||Rexbuilder_Util.$body.find(".open-accordion-section").on("click",function(e){this.classList.contains("open")?(e.preventDefault(),e.stopImmediatePropagation(),P(this.getAttribute("href")).rexAccordion("close_single_accordion")):(this.classList.toggle("close"),this.classList.toggle("open"))}),b(),Rexbuilder_Util.editorMode&&(Rexbuilder_Util.$document.on("rexlive:editDomLayoutEnd",RexSlider.init),Rexbuilder_Util.launchVideoPlugins(),Rexbuilder_Util.playAllVideos(),w(),k(),E())},load:function(){if(Rexbuilder_Util.editorMode)CKEditor_Handler.load(),Rexbuilder_Util_Editor.load(),Rexbuilder_Live_Utilities.load();else{for(var e=U.length,t=0;t<e;t++)U[t].fixAfterLoad();RexSlider.init(),Rexbuilder_Util.launchVideoPlugins(),Rexbuilder_Util.playAllVideos(),w(),k(),E()}var i,n;0!==(n=P(".text-fill-container-canvas")).length&&(n.textFill({relative:!0,relativeWrap:".perfect-grid-item",fontFamily:_plugin_frontend_settings.textFill.font_family,fontWeight:_plugin_frontend_settings.textFill.font_weight}),n.on("textfill-render-complete",function(){Rexbuilder_Util.$window.resize()})),RexSlider.startAutoPlay(),s(),d(),Rexbuilder_Util.galleryPluginActive=!0,r&&!Rexbuilder_Util.editorMode&&"navigate"!==(n=performance.getEntriesByType("navigation")[0].type)&&"prerender"!==n&&void 0!==(i=store.get("scrollPosition"))&&setTimeout(function(){window.scrollTo(0,i)},0)},handleLiveResize:function(){Rexbuilder_Util_Editor.elementIsResizing||(Rexbuilder_Util.windowIsResizing=!0,Rexbuilder_Util.loadWidth!==Rexbuilder_Util.globalViewport.width&&Rexbuilder_Util.doneResizing())},handleFrontEndResize:function(){for(var e=Rexbuilder_Util.findFrontLayout(),t=U.length,i=(Rexbuilder_Util.startFrontLayout!=e&&(Rexbuilder_Util.changedFrontLayout=!0,Rexbuilder_Util.startFrontLayout=e),Rexbuilder_Util.changedFrontLayout&&(S("builder_before_layout_change"),e=Rexbuilder_Util.chooseLayout(),Rexbuilder_Util.handleLayoutChange(e)),RexGrid.updateViewportSize(),0),n=0,r=null;i<t;i++){if((r=A?SplitScrollable.data(U[i].section):r)&&Rexbuilder_Util.changedFrontLayout&&Rexbuilder_Util.globalViewport.width<_plugin_frontend_settings.splitScrollable.minViewportWidth)for(r.destroy(),U[i].properties.gridHeightSettable=!(r=null),n=0;n<U[i].gridBlocksTotal;n++)U[i].gridBlocks[n].setHeight=!0,U[i].gridBlocks[n].setTop=!0;Rexbuilder_Util.changedFrontLayout&&U[i].endChangeLayout(),U[i].endResize(),r&&(Rexbuilder_Util.changedFrontLayout&&(o(r,U[i]),a(r,U[i]),r.refreshScrollableIndex()),r.callFixStickyHeight()),L&&Rexbuilder_Util.changedFrontLayout&&StickySection.data(U[i].section)&&StickySection.prepare(U[i].section)}Rexbuilder_Util.changedFrontLayout&&(window.FastLoad.destroy(),window.FastLoad.init(),s(),Rexbuilder_Util.editorMode||"undefined"!=typeof RexIndicator&&RexIndicator.destroyAll(),d()),Rex_Navigator.getNavigationDotsPosition(),Rexbuilder_Util.changedFrontLayout=!1},addAction:function(e,t){void 0===c[e]&&(c[e]=[]),c[e].push(t)},getRexGridInstance:u,destroyRexGridInstance:V}}(jQuery);
!function(){"use strict";var i,e=!1;function t(){var e;return window.matchMedia("(orientation: portrait)").matches&&(e="portrait"),(e=window.matchMedia("(orientation: landscape)").matches?"landscape":e)!=i&&(i=e,1)}(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4)))&&(e=!0),t(),document.addEventListener("DOMContentLoaded",Rexbuilder_App.init),window.addEventListener("load",Rexbuilder_App.load);var o,a,n,r,d=Rexbuilder_Util.editorMode?1e3:100,l=(window.addEventListener("resize",(o=function(){Rexbuilder_Util.globalViewport=Rexbuilder_Util.viewport(),Rexbuilder_Util.editorMode?Rexbuilder_App.handleLiveResize():(e&&t()||!e)&&Rexbuilder_App.handleFrontEndResize()},a=d,function(){var e=this,i=arguments,t=n&&!r;clearTimeout(r),r=setTimeout(function(){r=null,n||o.apply(e,i)},a),t&&o.apply(e,i)})),/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor));window.addEventListener("beforeunload",function(){l&&!Rexbuilder_Util.editorMode&&store.set("scrollPosition",window.pageYOffset||document.documentElement.scrollTop)})}();