1(()=>{var Vp=Object.create;var Ma=Object.defineProperty;var Hp=Object.getOwnPropertyDescriptor;var qp=Object.getOwnPropertyNames;var Wp=Object.getPrototypeOf,Gp=Object.prototype.hasOwnProperty;var Q=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Xp=(e,t)=>{for(var r in t)Ma(e,r,{get:t[r],enumerable:!0})},$p=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of qp(t))!Gp.call(e,o)&&o!==r&&Ma(e,o,{get:()=>t[o],enumerable:!(n=Hp(t,o))||n.enumerable});return e};var $t=(e,t,r)=>(r=e!=null?Vp(Wp(e)):{},$p(t||!e||!e.__esModule?Ma(r,"default",{value:e,enumerable:!0}):r,e));var Cl=Q((Pa,Ra)=>{(function(e,t){typeof Pa=="object"&&typeof Ra!="undefined"?Ra.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis!="undefined"?globalThis:e||self).LazyLoad=t()})(Pa,function(){"use strict";function e(){return e=Object.assign||function(v){for(var x=1;x<arguments.length;x++){var T=arguments[x];for(var C in T)Object.prototype.hasOwnProperty.call(T,C)&&(v[C]=T[C])}return v},e.apply(this,arguments)}var t=typeof window!="undefined",r=t&&!("onscroll"in window)||typeof navigator!="undefined"&&/(gle|ing|ro)bot|crawl|spider/i.test(navigator.userAgent),n=t&&"IntersectionObserver"in window,o=t&&"classList"in document.createElement("p"),a=t&&window.devicePixelRatio>1,i={elements_selector:".lazy",container:r||t?document:null,threshold:300,thresholds:null,data_src:"src",data_srcset:"srcset",data_sizes:"sizes",data_bg:"bg",data_bg_hidpi:"bg-hidpi",data_bg_multi:"bg-multi",data_bg_multi_hidpi:"bg-multi-hidpi",data_bg_set:"bg-set",data_poster:"poster",class_applied:"applied",class_loading:"loading",class_loaded:"loaded",class_error:"error",class_entered:"entered",class_exited:"exited",unobserve_completed:!0,unobserve_entered:!1,cancel_on_exit:!0,callback_enter:null,callback_exit:null,callback_applied:null,callback_loading:null,callback_loaded:null,callback_error:null,callback_finish:null,callback_cancel:null,use_native:!1,restore_on_error:!1},l=function(v){return e({},i,v)},c=function(v,x){var T,C="LazyLoad::Initialized",D=new v(x);try{T=new CustomEvent(C,{detail:{instance:D}})}catch(V){(T=document.createEvent("CustomEvent")).initCustomEvent(C,!1,!1,{instance:D})}window.dispatchEvent(T)},s="src",u="srcset",f="sizes",d="poster",p="llOriginalAttrs",m="data",w="loading",y="loaded",I="applied",j="error",q="native",F="data-",N="ll-status",L=function(v,x){return v.getAttribute(F+x)},W=function(v){return L(v,N)},B=function(v,x){return function(T,C,D){var V="data-ll-status";D!==null?T.setAttribute(V,D):T.removeAttribute(V)}(v,0,x)},U=function(v){return B(v,null)},ie=function(v){return W(v)===null},he=function(v){return W(v)===q},ye=[w,y,I,j],be=function(v,x,T,C){v&&(C===void 0?T===void 0?v(x):v(x,T):v(x,T,C))},E=function(v,x){o?v.classList.add(x):v.className+=(v.className?" ":"")+x},A=function(v,x){o?v.classList.remove(x):v.className=v.className.replace(new RegExp("(^|\\s+)"+x+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},h=function(v){return v.llTempImage},S=function(v,x){if(x){var T=x._observer;T&&T.unobserve(v)}},O=function(v,x){v&&(v.loadingCount+=x)},k=function(v,x){v&&(v.toLoadCount=x)},X=function(v){for(var x,T=[],C=0;x=v.children[C];C+=1)x.tagName==="SOURCE"&&T.push(x);return T},Z=function(v,x){var T=v.parentNode;T&&T.tagName==="PICTURE"&&X(T).forEach(x)},te=function(v,x){X(v).forEach(x)},re=[s],_e=[s,d],Te=[s,u,f],gt=[m],Re=function(v){return!!v[p]},Xe=function(v){return v[p]},yt=function(v){return delete v[p]},it=function(v,x){if(!Re(v)){var T={};x.forEach(function(C){T[C]=v.getAttribute(C)}),v[p]=T}},Qe=function(v,x){if(Re(v)){var T=Xe(v);x.forEach(function(C){(function(D,V,R){R?D.setAttribute(V,R):D.removeAttribute(V)})(v,C,T[C])})}},Lt=function(v,x,T){E(v,x.class_applied),B(v,I),T&&(x.unobserve_completed&&S(v,x),be(x.callback_applied,v,T))},Ft=function(v,x,T){E(v,x.class_loading),B(v,w),T&&(O(T,1),be(x.callback_loading,v,T))},$e=function(v,x,T){T&&v.setAttribute(x,T)},Xt=function(v,x){$e(v,f,L(v,x.data_sizes)),$e(v,u,L(v,x.data_srcset)),$e(v,s,L(v,x.data_src))},je={IMG:function(v,x){Z(v,function(T){it(T,Te),Xt(T,x)}),it(v,Te),Xt(v,x)},IFRAME:function(v,x){it(v,re),$e(v,s,L(v,x.data_src))},VIDEO:function(v,x){te(v,function(T){it(T,re),$e(T,s,L(T,x.data_src))}),it(v,_e),$e(v,d,L(v,x.data_poster)),$e(v,s,L(v,x.data_src)),v.load()},OBJECT:function(v,x){it(v,gt),$e(v,m,L(v,x.data_src))}},st=["IMG","IFRAME","VIDEO","OBJECT"],$r=function(v,x){!x||function(T){return T.loadingCount>0}(x)||function(T){return T.toLoadCount>0}(x)||be(v.callback_finish,x)},Yr=function(v,x,T){v.addEventListener(x,T),v.llEvLisnrs[x]=T},Fp=function(v,x,T){v.removeEventListener(x,T)},Ea=function(v){return!!v.llEvLisnrs},Aa=function(v){if(Ea(v)){var x=v.llEvLisnrs;for(var T in x){var C=x[T];Fp(v,T,C)}delete v.llEvLisnrs}},wl=function(v,x,T){(function(C){delete C.llTempImage})(v),O(T,-1),function(C){C&&(C.toLoadCount-=1)}(T),A(v,x.class_loading),x.unobserve_completed&&S(v,T)},Ia=function(v,x,T){var C=h(v)||v;Ea(C)||function(D,V,R){Ea(D)||(D.llEvLisnrs={});var H=D.tagName==="VIDEO"?"loadeddata":"load";Yr(D,H,V),Yr(D,"error",R)}(C,function(D){(function(V,R,H,ee){var de=he(R);wl(R,H,ee),E(R,H.class_loaded),B(R,y),be(H.callback_loaded,R,ee),de||$r(H,ee)})(0,v,x,T),Aa(C)},function(D){(function(V,R,H,ee){var de=he(R);wl(R,H,ee),E(R,H.class_error),B(R,j),be(H.callback_error,R,ee),H.restore_on_error&&Qe(R,Te),de||$r(H,ee)})(0,v,x,T),Aa(C)})},Ca=function(v,x,T){(function(C){return st.indexOf(C.tagName)>-1})(v)?function(C,D,V){Ia(C,D,V),function(R,H,ee){var de=je[R.tagName];de&&(de(R,H),Ft(R,H,ee))}(C,D,V)}(v,x,T):function(C,D,V){(function(R){R.llTempImage=document.createElement("IMG")})(C),Ia(C,D,V),function(R){Re(R)||(R[p]={backgroundImage:R.style.backgroundImage})}(C),function(R,H,ee){var de=L(R,H.data_bg),Ee=L(R,H.data_bg_hidpi),Ae=a&&Ee?Ee:de;Ae&&(R.style.backgroundImage='url("'.concat(Ae,'")'),h(R).setAttribute(s,Ae),Ft(R,H,ee))}(C,D,V),function(R,H,ee){var de=L(R,H.data_bg_multi),Ee=L(R,H.data_bg_multi_hidpi),Ae=a&&Ee?Ee:de;Ae&&(R.style.backgroundImage=Ae,Lt(R,H,ee))}(C,D,V),function(R,H,ee){var de=L(R,H.data_bg_set);if(de){var Ee=de.split("|"),Ae=Ee.map(function(lt){return"image-set(".concat(lt,")")});R.style.backgroundImage=Ae.join(),R.style.backgroundImage===""&&(Ae=Ee.map(function(lt){return"-webkit-image-set(".concat(lt,")")}),R.style.backgroundImage=Ae.join()),Lt(R,H,ee)}}(C,D,V)}(v,x,T)},bl=function(v){v.removeAttribute(s),v.removeAttribute(u),v.removeAttribute(f)},xl=function(v){Z(v,function(x){Qe(x,Te)}),Qe(v,Te)},Np={IMG:xl,IFRAME:function(v){Qe(v,re)},VIDEO:function(v){te(v,function(x){Qe(x,re)}),Qe(v,_e),v.load()},OBJECT:function(v){Qe(v,gt)}}
1,Qp=function(v,x){(function(T){var C=Np[T.tagName];C?C(T):function(D){if(Re(D)){var V=Xe(D);D.style.backgroundImage=V.backgroundImage}}(T)})(v),function(T,C){ie(T)||he(T)||(A(T,C.class_entered),A(T,C.class_exited),A(T,C.class_applied),A(T,C.class_loading),A(T,C.class_loaded),A(T,C.class_error))}(v,x),U(v),yt(v)},Bp=["IMG","IFRAME","VIDEO"],Tl=function(v){return v.use_native&&"loading"in HTMLImageElement.prototype},zp=function(v,x,T){v.forEach(function(C){return function(D){return D.isIntersecting||D.intersectionRatio>0}(C)?function(D,V,R,H){var ee=function(de){return ye.indexOf(W(de))>=0}(D);B(D,"entered"),E(D,R.class_entered),A(D,R.class_exited),function(de,Ee,Ae){Ee.unobserve_entered&&S(de,Ae)}(D,R,H),be(R.callback_enter,D,V,H),ee||Ca(D,R,H)}(C.target,C,x,T):function(D,V,R,H){ie(D)||(E(D,R.class_exited),function(ee,de,Ee,Ae){Ee.cancel_on_exit&&function(lt){return W(lt)===w}(ee)&&ee.tagName==="IMG"&&(Aa(ee),function(lt){Z(lt,function(Sa){bl(Sa)}),bl(lt)}(ee),xl(ee),A(ee,Ee.class_loading),O(Ae,-1),U(ee),be(Ee.callback_cancel,ee,de,Ae))}(D,V,R,H),be(R.callback_exit,D,V,H))}(C.target,C,x,T)})},El=function(v){return Array.prototype.slice.call(v)},Zn=function(v){return v.container.querySelectorAll(v.elements_selector)},Up=function(v){return function(x){return W(x)===j}(v)},Al=function(v,x){return function(T){return El(T).filter(ie)}(v||Zn(x))},Kr=function(v,x){var T=l(v);this._settings=T,this.loadingCount=0,function(C,D){n&&!Tl(C)&&(D._observer=new IntersectionObserver(function(V){zp(V,C,D)},function(V){return{root:V.container===document?null:V.container,rootMargin:V.thresholds||V.threshold+"px"}}(C)))}(T,this),function(C,D){t&&(D._onlineHandler=function(){(function(V,R){var H;(H=Zn(V),El(H).filter(Up)).forEach(function(ee){A(ee,V.class_error),U(ee)}),R.update()})(C,D)},window.addEventListener("online",D._onlineHandler))}(T,this),this.update(x)};return Kr.prototype={update:function(v){var x,T,C=this._settings,D=Al(v,C);k(this,D.length),!r&&n?Tl(C)?function(V,R,H){V.forEach(function(ee){Bp.indexOf(ee.tagName)!==-1&&function(de,Ee,Ae){de.setAttribute("loading","lazy"),Ia(de,Ee,Ae),function(lt,Sa){var Il=je[lt.tagName];Il&&Il(lt,Sa)}(de,Ee),B(de,q)}(ee,R,H)}),k(H,0)}(D,C,this):(T=D,function(V){V.disconnect()}(x=this._observer),function(V,R){R.forEach(function(H){V.observe(H)})}(x,T)):this.loadAll(D)},destroy:function(){this._observer&&this._observer.disconnect(),t&&window.removeEventListener("online",this._onlineHandler),Zn(this._settings).forEach(function(v){yt(v)}),delete this._observer,delete this._settings,delete this._onlineHandler,delete this.loadingCount,delete this.toLoadCount},loadAll:function(v){var x=this,T=this._settings;Al(v,T).forEach(function(C){S(C,x),Ca(C,T,x)})},restoreAll:function(){var v=this._settings;Zn(v).forEach(function(x){Qp(x,v)})}},Kr.load=function(v,x){var T=l(x);Ca(v,T)},Kr.resetStatus=function(v){U(v)},t&&function(v,x){if(x)if(x.length)for(var T,C=0;T=x[C];C+=1)c(v,T);else c(v,x)}(Kr,window.lazyLoadOptions),Kr})});var nc=Q((rc,pi)=>{(function(e){"use strict";var t=function(){},r=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(s){return setTimeout(s,16)};function n(){var s=this;s.reads=[],s.writes=[],s.raf=r.bind(e),t("initialized",s)}n.prototype={constructor:n,runTasks:function(s){t("run tasks");for(var u;u=s.shift();)u()},measure:function(s,u){t("measure");var f=u?s.bind(u):s;return this.reads.push(f),o(this),f},mutate:function(s,u){t("mutate");var f=u?s.bind(u):s;return this.writes.push(f),o(this),f},clear:function(s){return t("clear",s),i(this.reads,s)||i(this.writes,s)},extend:function(s){if(t("extend",s),typeof s!="object")throw new Error("expected object");var u=Object.create(this);return l(u,s),u.fastdom=this,u.initialize&&u.initialize(),u},catch:null};function o(s){s.scheduled||(s.scheduled=!0,s.raf(a.bind(null,s)),t("flush scheduled"))}function a(s){t("flush");var u=s.writes,f=s.reads,d;try{t("flushing reads",f.length),s.runTasks(f),t("flushing writes",u.length),s.runTasks(u)}
1catch(p){d=p}if(s.scheduled=!1,(f.length||u.length)&&o(s),d)if(t("task errored",d.message),s.catch)s.catch(d);else throw d}function i(s,u){var f=s.indexOf(u);return!!~f&&!!s.splice(f,1)}function l(s,u){for(var f in u)u.hasOwnProperty(f)&&(s[f]=u[f])}var c=e.fastdom=e.fastdom||new n;typeof define=="function"?define(function(){return c}):typeof pi=="object"&&(pi.exports=c)})(typeof window!="undefined"?window:rc)});var ff=Q((oa,cf)=>{(function(e,t){typeof oa=="object"&&typeof cf!="undefined"?t(oa):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.dynamicMarquee={}))})(oa,function(e){"use strict";function t(E,A){if(!(E instanceof A))throw new TypeError("Cannot call a class as a function")}function r(E,A){for(var h=0;h<A.length;h++){var S=A[h];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(E,S.key,S)}}function n(E,A,h){return A&&r(E.prototype,A),h&&r(E,h),Object.defineProperty(E,"prototype",{writable:!1}),E}function o(E){return a(E)||i(E)||l(E)||s()}function a(E){if(Array.isArray(E))return c(E)}function i(E){if(typeof Symbol!="undefined"&&E[Symbol.iterator]!=null||E["@@iterator"]!=null)return Array.from(E)}function l(E,A){if(E){if(typeof E=="string")return c(E,A);var h=Object.prototype.toString.call(E).slice(8,-1);if(h==="Object"&&E.constructor&&(h=E.constructor.name),h==="Map"||h==="Set")return Array.from(E);if(h==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h))return c(E,A)}}function c(E,A){(A==null||A>E.length)&&(A=E.length);for(var h=0,S=new Array(A);h<A;h++)S[h]=E[h];return S}function s(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 2In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var u=function(){function E(A){var h=A.onEnter,S=A.onExit;this._execution=null,this.inBoundary=this.inBoundary.bind(this),this.enter=this.enter.bind(this),this._onEnter=h||null,this._onExit=S||null}return E.prototype.inBoundary=function(){return!!this._execution},E.prototype.enter=function(A){if(this._execution)return A?A(this._execution.onEnterResult):void 0;var h=this._execution={onEnterResult:void 0},S=void 0,O=!1,k=void 0;try{this._onEnter&&(h.onEnterResult=this._onEnter()),A&&(S=A(h.onEnterResult))}catch(Z){O=!0,k=Z}this._execution=null;var X=!O;if(this._onExit)try{this._onExit({onEnterResult:h.onEnterResult,exceptionOccurred:O,retrieveException:function(){return X=!0,k}})}catch(Z){if(X)throw Z}if(!X)throw k;return S},E}(),f={RIGHT:"right",DOWN:"down"},d=/px$/;function p(E){if(!d.test(E))throw new Error("String missing `px` suffix");return parseFloat(E.slice(0,-2))}var m=function(){function E(A){var h=this,S;t(this,E),this._$el=A,this._width=null,this._height=null,this._observer="ResizeObserver"in window?new ResizeObserver(function(O){var k=O[O.length-1],X=k.borderBoxSize[0]||k.borderBoxSize;h._width=X.inlineSize,h._height=X.blockSize}):null,(S=this._observer)===null||S===void 0||S.observe(A)}return n(E,[{key:"getWidth",value:function(){if(this._width!==null)return this._width;var h=p(window.getComputedStyle(this._$el).width);return this._observer&&(this._width=h),h}},{key:"getHeight",value:function(){if(this._height!==null)return this._height;var h=p(window.getComputedStyle(this._$el).height);return this._observer&&(this._height=h),h}},{key:"tearDown",value:function(){var h;(h=this._observer)===null||h===void 0||h.disconnect(),this._observer=null}}]),E}(),w=function(){function E(A,h,S){t(this,E);var O=document.createElement("div");O.style.display="block",O.style.opacity="0",O.style.position="absolute",O.style.margin="0",O.style.padding="0",h===f.RIGHT&&(O.style.whiteSpace="nowrap"),this._sizeWatcher=new m(O),O.appendChild(A),this._$container=O,this._$el=A,this._direction=h,this._metadata=S,this._offset=null}return n(E,[{key:"getSize",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},S=h.inverse,O=S===void 0?!1:S,k=this._direction;return O&&(k=k===f.RIGHT?f.DOWN:f.RIGHT),k===f.RIGHT?this._sizeWatcher.getWidth():this._sizeWatcher.getHeight()}}
2,{key:"setOffset",value:function(h){this._offset!==h&&(this._offset=h,this._$container.style.opacity="1",this._direction===f.RIGHT?this._$container.style.left="".concat(h,"px"):this._$container.style.top="".concat(h,"px"))}},{key:"remove",value:function(){this._sizeWatcher.tearDown(),this._$container.parentNode.removeChild(this._$container)}},{key:"getContainer",value:function(){return this._$container}},{key:"getOriginalEl",value:function(){return this._$el}},{key:"getMetadata",value:function(){return this._metadata}}]),E}(),y=3e4,I=function(){function E(A,h){t(this,E),this._$el=A,this._direction=h,this._transitionState=null}return n(E,[{key:"setOffset",value:function(h,S,O){var k=this._transitionState,X=!k||k.rate!==S;if(k&&!O){var Z=performance.now()-k.time;if(Z<y-1e4&&!X)return}if((O||X)&&(this._direction===f.RIGHT?this._$el.style.transform="translateX(".concat(h,"px)"):this._$el.style.transform="translateY(".concat(h,"px)"),this._$el.style.transition="none",this._$el.offsetLeft),S&&(O||X)&&(this._$el.style.transition="transform ".concat(y,"ms linear")),S){var te=h+S/1e3*y;this._direction===f.RIGHT?this._$el.style.transform="translateX(".concat(te,"px)"):this._$el.style.transform="translateY(".concat(te,"px)")}this._transitionState={time:performance.now(),rate:S}}}]),E}();function j(E){window.setTimeout(function(){return E()},0)}function q(E){try{return E()}catch(A){j(function(){throw A})}}function F(E){if(typeof E=="string"||typeof E=="number"){var A=document.createElement("div");return A.textContent=E+"",A}return E}function N(E){return E.length?E[E.length-1]:null}function L(E){return E.length?E[0]:null}var W=5e5,B=100,U=function(){function E(A){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=h.rate,O=S===void 0?-25:S,k=h.upDown,X=k===void 0?!1:k,Z=h.startOnScreen,te=Z===void 0?!1:Z;t(this,E),this._boundary=new u({onEnter:function(){return{callbacks:[]}},onExit:function(gt){var Re=gt.onEnterResult.callbacks;Re.forEach(function(Xe){return j(function(){return Xe()})})}}),this._waitingForItem=!0,this._nextItemWouldBeTouching=te,this._rate=O,this._lastEffectiveRate=O,this._justReversedRate=!1,this._correlation=null,this._direction=X?f.DOWN:f.RIGHT,this._onItemRequired=[],this._onItemRemoved=[],this._onAllItemsRemoved=[],this._windowOffset=0,this._containerSize=0,this._containerSizeWatcher=null,this._items=[],this._pendingItem=null,this._visible=!!document.hidden;var re=document.createElement("div");re.style.display="block",re.style.overflow="hidden",re.style.position="relative",this._direction===f.DOWN&&(re.style.height="100%"),this._$window=re,this.windowInverseSize=null,this._updateWindowInverseSize();var _e=document.createElement("div");this._$moving=_e,_e.style.display="block",_e.style.position="absolute",_e.style.left="0",_e.style.right="0",this._slider=new I(_e,this._direction),re.appendChild(_e),A.appendChild(re)}return n(E,[{key:"onItemRequired",value:function(h){this._onItemRequired.push(h)}},{key:"onItemRemoved",value:function(h){this._onItemRemoved.push(h)}},{key:"onAllItemsRemoved",value:function(h){this._onAllItemsRemoved.push(h)}},{key:"getNumItems",value:function(){return this._items.length}},{key:"setRate",value:function(h){h!==this._rate&&(h*this._lastEffectiveRate<0&&(this._justReversedRate=!this._justReversedRate),this._rate=h,h?(this._lastEffectiveRate=h,this._items.length||(this._waitingForItem=!0)):this._waitingForItem=!1,this._tick())}},{key:"getRate",value:function(){return this._rate}},{key:"clear",value:function(){var h=this;this._boundary.enter(function(){h._items.forEach(function(S){var O=S.item;return h._removeItem(O)}),h._items=[],h._waitingForItem=!0,h._nextItemWouldBeTouching=!1,h._updateWindowInverseSize(),h._cleanup()})}},{key:"isWaitingForItem",value:function(){return this._waitingForItem}},{key:"appendItem",value:function(h){var S=this,O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=O.metadata,X=k===void 0?null:k;this._boundary.enter(function(){if(!S._waitingForItem)throw new Error("No room for item.");h=F(h);var Z=S._items.some(function(te){var re=te.item;return re.getOriginalEl()===h});if(Z)throw new Error("Item already exists.");S._waitingForItem=!1,S._pendingItem=new w(h,S._direction,X),S._tick()})}},{key:"_removeItem",value:function(h){var S=this;this._boundary.enter(function(O){var k=O.callbacks;h.remove(),S._items.splice(S._items.indexOf(h),1),S._onItemRemoved.forEach(function(X){k.push(function(){return X(h.getOriginalEl())})})})}},{key:"_updateWindowInverseSize",value:function(){if(this._direction!==f.DOWN){var h=Math.max.apply(Math,o(this._items.map(function(S){var O=S.item;return O.getSize({inverse:!0})})));this.windowInverseSize!==h&&(this.windowInverseSize=h,this._$window.style.height="".concat(h,"px"))}}},{key:"_scheduleRender",value:function(){var h=this;this._renderTimer||(this._renderTimer=window.setTimeout(function(){return h._tick()},B))}},{key:"_cleanup",value:function(){var h;(h=this._containerSizeWatcher)===null||h===void 0||h.tearDown(),this._containerSizeWatcher=null,this._correlation=null,this._windowOffset=0}},{key:"_tick",value:function(){var h=this;this._boundary.enter(function(S){var O=S.callbacks;
2if(h._renderTimer&&clearTimeout(h._renderTimer),h._renderTimer=null,!h._items.length&&!h._pendingItem){h._cleanup();return}if(h._scheduleRender(),!h._$window.isConnected){h._correlation=null;return}h._containerSizeWatcher||(h._containerSizeWatcher=new m(h._$window));var k=performance.now(),X=!1;if(h._correlation){var Z=k-h._correlation.time;h._windowOffset=h._correlation.offset+h._correlation.rate*-1*(Z/1e3)}else X=!0;if(Math.abs(h._windowOffset)>W){X=!0;var te=h._windowOffset;h._items.forEach(function(je){return je.offset-=te}),h._correlation=null,h._windowOffset=0}var re=!document.hidden,_e=re&&h._visible!==re;h._visible=re,h._slider.setOffset(h._windowOffset*-1,h._rate,X||_e),(!h._correlation||h._correlation.rate!==h._rate)&&(h._correlation={time:k,offset:h._windowOffset,rate:h._rate}),h._containerSize=h._direction===f.RIGHT?h._containerSizeWatcher.getWidth():h._containerSizeWatcher.getHeight();var Te=Math.max(h._containerSize,1),gt=h._justReversedRate;h._justReversedRate=!1;var Re=h._nextItemWouldBeTouching;h._nextItemWouldBeTouching=null;var Xe=null;if(h._pendingItem){h._$moving.appendChild(h._pendingItem.getContainer());var yt=h._rate<=0?N(h._items):L(h._items);h._rate<=0?h._items=[].concat(o(h._items),[{item:h._pendingItem,appendRate:h._rate,offset:Re?yt?yt.offset+yt.item.getSize():h._windowOffset:h._windowOffset+Te}]):h._items=[{item:h._pendingItem,appendRate:h._rate,offset:Re?yt?yt.offset-h._pendingItem.getSize():h._windowOffset+Te-h._pendingItem.getSize():h._windowOffset-h._pendingItem.getSize()}].concat(o(h._items)),h._pendingItem=null}var it=B/1e3*Math.abs(h._rate),Qe=!1;if(!h._waitingForItem&&h._items.length){var Lt=L(h._items),Ft=N(h._items),$e=h._rate<=0?Ft:Lt;(h._rate<=0&&Ft.offset+$e.item.getSize()-h._windowOffset<=Te+it||h._rate>0&&$e.offset-h._windowOffset>-1*it)&&(h._waitingForItem=Qe=!0,Xe=gt?null:{$el:$e.item.getOriginalEl(),metadata:$e.item.getMetadata()})}if(Xe&&(h._nextItemWouldBeTouching=!0),h._items=o(h._items).filter(function(je){var st=je.item,$r=je.offset,Yr=h._rate<0?$r+st.getSize()>h._windowOffset:$r<h._windowOffset+Te;return Yr||h._removeItem(st),Yr}),h._items.length||h._onAllItemsRemoved.forEach(function(je){return O.push(je)}),h._items.reduce(function(je,st){return je!==null&&st.offset<je&&(st.offset=je),st.item.setOffset(st.offset),st.offset+st.item.getSize()},null),h._updateWindowInverseSize(),Qe){var Xt;h._onItemRequired.some(function(je){return q(function(){return Xt=je({immediatelyFollowsPrevious:!!Xe,touching:Xe}),!!Xt})}),Xt&&h.appendItem(Xt),h._nextItemWouldBeTouching=!1}})}}]),E}(),ie=function(E){var A={};return E.forEach(function(h,S){A[h]=A[h]||[],A[h].push(S)}),A},he=function(E,A){var h={startString1:0,startString2:0,length:0},S=ie(E),O=[];return A.forEach(function(k,X){var Z,te=[],re=S[k]||[];re.forEach(function(_e){Z=(_e&&O[_e-1]||0)+1,Z>h.length&&(h.length=Z,h.startString1=_e-Z+1,h.startString2=X-Z+1),te[_e]=Z}),O=te}),h},ye=he;function be(E){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,S=-1,O=A.slice(),k=function(){var te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,re=(S+te)%O.length;return{builder:O[re],index:re}},X=function(te){var re;if(!(!O.length||!E.isWaitingForItem())){if(h&&te&&((re=te.metadata)===null||re===void 0?void 0:re.isSeperator)!==!0){var _e=F(h());E.appendItem(_e,{metadata:{isSeperator:!0}});return}var Te=k(),gt=Te.builder,Re=Te.index;S=Re,E.appendItem(F(gt()))}};return E.onItemRequired(function(Z){var te=Z.touching;return X(te)}),X(),{update:function(te){var re=function(){var Te=O.map(function(Qe,Lt){var Ft=O.indexOf(Qe);return Ft<Lt?Ft:Lt}),gt=te.map(function(Qe,Lt){return O.indexOf(Qe)}),Re=ye(Te,gt),Xe=Re.startString1,yt=Re.startString2,it=Re.length;return S>=Xe&&S<Xe+it?S+(yt-Xe):-1};S=re(),O=te.slice(),X(!1)}}}e.Marquee=U,e.loop=be,Object.defineProperty(e,"__esModule",{value:!0})})});var _f=Q((Cj,yf)=>{yf.exports
vendor: 12,864 bytes, lines 2-405
2=[{name:"Bounce",paramsTypes:{shadow_colour:"vec4",shadow_height:"float",bounces:"float"},defaultParams:{shadow_colour:[0,0,0,.6],shadow_height:.075,bounces:3},glsl:`// Author: Adrian Purser 3// License: MIT 4 5uniform vec4 shadow_colour; // = vec4(0.,0.,0.,.6) 6uniform float shadow_height; // = 0.075 7uniform float bounces; // = 3.0 8 9const float PI = 3.14159265358; 10 11vec4 transition (vec2 uv) { 12 float time = progress; 13 float stime = sin(time * PI / 2.); 14 float phase = time * PI * bounces; 15 float y = (abs(cos(phase))) * (1.0 - stime); 16 float d = uv.y - y; 17 return mix( 18 mix( 19 getToColor(uv), 20 shadow_colour, 21 step(d, shadow_height) * (1. - mix( 22 ((d / shadow_height) * shadow_colour.a) + (1.0 - shadow_colour.a), 23 1.0, 24 smoothstep(0.95, 1., progress) // fade-out the shadow at the end 25 )) 26 ), 27 getFromColor(vec2(uv.x, uv.y + (1.0 - y))), 28 step(d, 0.0) 29 ); 30} 31`,author:"Adrian Purser",license:"MIT",createdAt:"Fri, 10 Nov 2017 17:01:45 +0000",updatedAt:"Sat, 11 Nov 2017 08:50:40 +0100"},{name:"BowTieHorizontal",paramsTypes:{},defaultParams:{},glsl:`// Author: huynx 32// License: MIT 33 34vec2 bottom_left = vec2(0.0, 1.0); 35vec2 bottom_right = vec2(1.0, 1.0); 36vec2 top_left = vec2(0.0, 0.0); 37vec2 top_right = vec2(1.0, 0.0); 38vec2 center = vec2(0.5, 0.5); 39 40float check(vec2 p1, vec2 p2, vec2 p3) 41{ 42 return (p1.x - p3.x) * (p2.y - p3.y) - (p2.x - p3.x) * (p1.y - p3.y); 43} 44 45bool PointInTriangle (vec2 pt, vec2 p1, vec2 p2, vec2 p3) 46{ 47 bool b1, b2, b3; 48 b1 = check(pt, p1, p2) < 0.0; 49 b2 = check(pt, p2, p3) < 0.0; 50 b3 = check(pt, p3, p1) < 0.0; 51 return ((b1 == b2) && (b2 == b3)); 52} 53 54bool in_left_triangle(vec2 p){ 55 vec2 vertex1, vertex2, vertex3; 56 vertex1 = vec2(progress, 0.5); 57 vertex2 = vec2(0.0, 0.5-progress); 58 vertex3 = vec2(0.0, 0.5+progress); 59 if (PointInTriangle(p, vertex1, vertex2, vertex3)) 60 { 61 return true; 62 } 63 return false; 64} 65 66bool in_right_triangle(vec2 p){ 67 vec2 vertex1, vertex2, vertex3; 68 vertex1 = vec2(1.0-progress, 0.5); 69 vertex2 = vec2(1.0, 0.5-progress); 70 vertex3 = vec2(1.0, 0.5+progress); 71 if (PointInTriangle(p, vertex1, vertex2, vertex3)) 72 { 73 return true; 74 } 75 return false; 76} 77 78float blur_edge(vec2 bot1, vec2 bot2, vec2 top, vec2 testPt) 79{ 80 vec2 lineDir = bot1 - top; 81 vec2 perpDir = vec2(lineDir.y, -lineDir.x); 82 vec2 dirToPt1 = bot1 - testPt; 83 float dist1 = abs(dot(normalize(perpDir), dirToPt1)); 84 85 lineDir = bot2 - top; 86 perpDir = vec2(lineDir.y, -lineDir.x); 87 dirToPt1 = bot2 - testPt; 88 float min_dist = min(abs(dot(normalize(perpDir), dirToPt1)), dist1); 89 90 if (min_dist < 0.005) { 91 return min_dist / 0.005; 92 } 93 else { 94 return 1.0; 95 }; 96} 97 98 99vec4 transition (vec2 uv) { 100 if (in_left_triangle(uv)) 101 { 102 if (progress < 0.1) 103 { 104 return getFromColor(uv); 105 } 106 if (uv.x < 0.5) 107 { 108 vec2 vertex1 = vec2(progress, 0.5); 109 vec2 vertex2 = vec2(0.0, 0.5-progress); 110 vec2 vertex3 = vec2(0.0, 0.5+progress); 111 return mix( 112 getFromColor(uv), 113 getToColor(uv), 114 blur_edge(vertex2, vertex3, vertex1, uv) 115 ); 116 } 117 else 118 { 119 if (progress > 0.0) 120 { 121 return getToColor(uv); 122 } 123 else 124 { 125 return getFromColor(uv); 126 } 127 } 128 } 129 else if (in_right_triangle(uv)) 130 { 131 if (uv.x >= 0.5) 132 { 133 vec2 vertex1 = vec2(1.0-progress, 0.5); 134 vec2 vertex2 = vec2(1.0, 0.5-progress); 135 vec2 vertex3 = vec2(1.0, 0.5+progress); 136 return mix( 137 getFromColor(uv), 138 getToColor(uv), 139 blur_edge(vertex2, vertex3, vertex1, uv) 140 ); 141 } 142 else 143 { 144 return getFromColor(uv); 145 } 146 } 147 else { 148 return getFromColor(uv); 149 } 150}`,author:"huynx",license:"MIT",createdAt:"Sat, 24 Mar 2018 12:54:26 +0100",updatedAt:"Sat, 24 Mar 2018 12:54:26 +0100"},{name:"BowTieVertical",paramsTypes:{},defaultParams:{},glsl:`// Author: huynx\r 151// License: MIT\r 152\r 153float check(vec2 p1, vec2 p2, vec2 p3)\r 154{\r 155 return (p1.x - p3.x) * (p2.y - p3.y) - (p2.x - p3.x) * (p1.y - p3.y);\r 156}\r 157\r 158bool PointInTriangle (vec2 pt, vec2 p1, vec2 p2, vec2 p3)\r 159{\r 160 bool b1, b2, b3;\r 161 b1 = check(pt, p1, p2) < 0.0;\r 162 b2 = check(pt, p2, p3) < 0.0;\r 163 b3 = check(pt, p3, p1) < 0.0;\r 164 return ((b1 == b2) && (b2 == b3));\r 165}\r 166\r 167bool in_top_triangle(vec2 p){\r 168 vec2 vertex1, vertex2, vertex3;\r 169 vertex1 = vec2(0.5, progress);\r 170 vertex2 = vec2(0.5-progress, 0.0);\r 171 vertex3 = vec2(0.5+progress, 0.0);\r 172 if (PointInTriangle(p, vertex1, vertex2, vertex3))\r 173 {\r 174 return true;\r 175 }\r 176 return false;\r 177}\r 178\r 179bool in_bottom_triangle(vec2 p){\r 180 vec2 vertex1, vertex2, vertex3;\r 181 vertex1 = vec2(0.5, 1.0 - progress);\r 182 vertex2 = vec2(0.5-progress, 1.0);\r 183 vertex3 = vec2(0.5+progress, 1.0);\r 184 if (PointInTriangle(p, vertex1, vertex2, vertex3))\r 185 {\r 186 return true;\r 187 }\r 188 return false;\r 189}\r 190\r 191float blur_edge(vec2 bot1, vec2 bot2, vec2 top, vec2 testPt)\r 192{\r 193 vec2 lineDir = bot1 - top;\r 194 vec2 perpDir = vec2(lineDir.y, -lineDir.x);\r 195 vec2 dirToPt1 = bot1 - testPt;\r 196 float dist1 = abs(dot(normalize(perpDir), dirToPt1));\r 197 \r 198 lineDir = bot2 - top;\r 199 perpDir = vec2(lineDir.y, -lineDir.x);\r 200 dirToPt1 = bot2 - testPt;\r 201 float min_dist = min(abs(dot(normalize(perpDir), dirToPt1)), dist1);\r 202 \r 203 if (min_dist < 0.005) {\r 204 return min_dist / 0.005;\r 205 }\r 206 else {\r 207 return 1.0;\r 208 };\r 209}\r 210\r 211\r 212vec4 transition (vec2 uv) {\r 213 if (in_top_triangle(uv))\r 214 {\r 215 if (progress < 0.1)\r 216 {\r 217 return getFromColor(uv);\r 218 }\r 219 if (uv.y < 0.5)\r 220 {\r 221 vec2 vertex1 = vec2(0.5, progress);\r 222 vec2 vertex2 = vec2(0.5-progress, 0.0);\r 223 vec2 vertex3 = vec2(0.5+progress, 0.0);\r 224 return mix(\r 225 getFromColor(uv),\r 226 getToColor(uv),\r 227 blur_edge(vertex2, vertex3, vertex1, uv)\r 228 );\r 229 }\r 230 else\r 231 {\r 232 if (progress > 0.0)\r 233 {\r 234 return getToColor(uv);\r 235 }\r 236 else\r 237 {\r 238 return getFromColor(uv);\r 239 }\r 240 } \r 241 }\r 242 else if (in_bottom_triangle(uv))\r 243 {\r 244 if (uv.y >= 0.5)\r 245 {\r 246 vec2 vertex1 = vec2(0.5, 1.0-progress);\r 247 vec2 vertex2 = vec2(0.5-progress, 1.0);\r 248 vec2 vertex3 = vec2(0.5+progress, 1.0);\r 249 return mix(\r 250 getFromColor(uv),\r 251 getToColor(uv),\r 252 blur_edge(vertex2, vertex3, vertex1, uv)\r 253 ); \r 254 }\r 255 else\r 256 {\r 257 return getFromColor(uv);\r 258 }\r 259 }\r 260 else {\r 261 return getFromColor(uv);\r 262 }\r 263}`,author:"huynx",license:"MIT",createdAt:"Tue, 27 Mar 2018 10:07:54 +0700",updatedAt:"Tue, 27 Mar 2018 10:07:54 +0700"},{name:"ButterflyWaveScrawler",paramsTypes:{amplitude:"float",waves:"float",colorSeparation:"float"},defaultParams:{amplitude:1,waves:30,colorSeparation:.3},glsl:`// Author: mandubian 264// License: MIT 265uniform float amplitude; // = 1.0 266uniform float waves; // = 30.0 267uniform float colorSeparation; // = 0.3 268float PI = 3.14159265358979323846264; 269float compute(vec2 p, float progress, vec2 center) { 270vec2 o = p*sin(progress * amplitude)-center; 271// horizontal vector 272vec2 h = vec2(1., 0.); 273// butterfly polar function (don't ask me why this one :)) 274float theta = acos(dot(o, h)) * waves; 275return (exp(cos(theta)) - 2.*cos(4.*theta) + pow(sin((2.*theta - PI) / 24.), 5.)) / 10.; 276} 277vec4 transition(vec2 uv) { 278 vec2 p = uv.xy / vec2(1.0).xy; 279 float inv = 1. - progress; 280 vec2 dir = p - vec2(.5); 281 float dist = length(dir); 282 float disp = compute(p, progress, vec2(0.5, 0.5)) ; 283 vec4 texTo = getToColor(p + inv*disp); 284 vec4 texFrom = vec4( 285 getFromColor(p + progress*disp*(1.0 - colorSeparation)).r, 286 getFromColor(p + progress*disp).g, 287 getFromColor(p + progress*disp*(1.0 + colorSeparation)).b, 288 1.0); 289 return texTo*progress + texFrom*inv; 290} 291`,author:"mandubian",license:"MIT",createdAt:"Thu, 1 Jun 2017 11:47:17 +0200",updatedAt:"Thu, 1 Jun 2017 11:47:17 +0200"},{name:"CircleCrop",paramsTypes:{bgcolor:"vec4"},defaultParams:{bgcolor:[0,0,0,1]},glsl:`// License: MIT 292// Author: fkuteken 293// ported by gre from https://gist.github.com/fkuteken/f63e3009c1143950dee9063c3b83fb88 294 295uniform vec4 bgcolor; // = vec4(0.0, 0.0, 0.0, 1.0) 296 297vec2 ratio2 = vec2(1.0, 1.0 / ratio); 298float s = pow(2.0 * abs(progress - 0.5), 3.0); 299 300vec4 transition(vec2 p) { 301 float dist = length((vec2(p) - 0.5) * ratio2); 302 return mix( 303 progress < 0.5 ? getFromColor(p) : getToColor(p), // branching is ok here as we statically depend on progress uniform (branching won't change over pixels) 304 bgcolor, 305 step(s, dist) 306 ); 307} 308`,license:"MIT",author:"fkuteken",createdAt:"Mon, 12 Jun 2017 12:52:34 +0800",updatedAt:"Mon, 12 Jun 2017 12:52:34 +0800"},{name:"ColourDistance",paramsTypes:{power:"float"},defaultParams:{power:5},glsl:`// License: MIT 309// Author: P-Seebauer 310// ported by gre from https://gist.github.com/P-Seebauer/2a5fa2f77c883dd661f9 311 312uniform float power; // = 5.0 313 314vec4 transition(vec2 p) { 315 vec4 fTex = getFromColor(p); 316 vec4 tTex = getToColor(p); 317 float m = step(distance(fTex, tTex), progress); 318 return mix( 319 mix(fTex, tTex, m), 320 tTex, 321 pow(progress, power) 322 ); 323} 324`,license:"MIT",author:"P-Seebauer",createdAt:"Mon, 12 Jun 2017 12:57:42 +0800",updatedAt:"Mon, 12 Jun 2017 12:57:42 +0800"},{name:"CrazyParametricFun",paramsTypes:{a:"float",b:"float",amplitude:"float",smoothness:"float"},defaultParams:{a:4,b:1,amplitude:120,smoothness:.1},glsl:`// Author: mandubian 325// License: MIT 326 327uniform float a; // = 4 328uniform float b; // = 1 329uniform float amplitude; // = 120 330uniform float smoothness; // = 0.1 331 332vec4 transition(vec2 uv) { 333 vec2 p = uv.xy / vec2(1.0).xy; 334 vec2 dir = p - vec2(.5); 335 float dist = length(dir); 336 float x = (a - b) * cos(progress) + b * cos(progress * ((a / b) - 1.) ); 337 float y = (a - b) * sin(progress) - b * sin(progress * ((a / b) - 1.)); 338 vec2 offset = dir * vec2(sin(progress * dist * amplitude * x), sin(progress * dist * amplitude * y)) / smoothness; 339 return mix(getFromColor(p + offset), getToColor(p), smoothstep(0.2, 1.0, progress)); 340} 341`,author:"mandubian",license:"MIT",createdAt:"Thu, 1 Jun 2017 13:03:12 +0200",updatedAt:"Thu, 1 Jun 2017 13:03:12 +0200"},{name:"CrossZoom",paramsTypes:{strength:"float"},defaultParams:{strength:.4},glsl:`// License: MIT 342// Author: rectalogic 343// ported by gre from https://gist.github.com/rectalogic/b86b90161503a0023231 344 345// Converted from https://github.com/rectalogic/rendermix-basic-effects/blob/master/assets/com/rendermix/CrossZoom/CrossZoom.frag 346// Which is based on https://github.com/evanw/glfx.js/blob/master/src/filters/blur/zoomblur.js 347// With additional easing functions from https://github.com/rectalogic/rendermix-basic-effects/blob/master/assets/com/rendermix/Easing/Easing.glsllib 348 349uniform float strength; // = 0.4 350 351const float PI = 3.141592653589793; 352 353float Linear_ease(in float begin, in float change, in float duration, in float time) { 354 return change * time / duration + begin; 355} 356 357float Exponential_easeInOut(in float begin, in float change, in float duration, in float time) { 358 if (time == 0.0) 359 return begin; 360 else if (time == duration) 361 return begin + change; 362 time = time / (duration / 2.0); 363 if (time < 1.0) 364 return change / 2.0 * pow(2.0, 10.0 * (time - 1.0)) + begin; 365 return change / 2.0 * (-pow(2.0, -10.0 * (time - 1.0)) + 2.0) + begin; 366} 367 368float Sinusoidal_easeInOut(in float begin, in float change, in float duration, in float time) { 369 return -change / 2.0 * (cos(PI * time / duration) - 1.0) + begin; 370} 371 372float rand (vec2 co) { 373 return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); 374} 375 376vec3 crossFade(in vec2 uv, in float dissolve) { 377 return mix(getFromColor(uv).rgb, getToColor(uv).rgb, dissolve); 378} 379 380vec4 transition(vec2 uv) { 381 vec2 texCoord = uv.xy / vec2(1.0).xy; 382 383 // Linear interpolate center across center half of the image 384 vec2 center = vec2(Linear_ease(0.25, 0.5, 1.0, progress), 0.5); 385 float dissolve = Exponential_easeInOut(0.0, 1.0, 1.0, progress); 386 387 // Mirrored sinusoidal loop. 0->strength then strength->0 388 float strength = Sinusoidal_easeInOut(0.0, strength, 0.5, progress); 389 390 vec3 color = vec3(0.0); 391 float total = 0.0; 392 vec2 toCenter = center - texCoord; 393 394 /* randomize the lookup values to hide the fixed number of samples */ 395 float offset = rand(uv); 396 397 for (float t = 0.0; t <= 40.0; t++) { 398 float percent = (t + offset) / 40.0; 399 float weight = 4.0 * (percent - percent * percent); 400 color += crossFade(texCoord + toCenter * percent * strength, dissolve) * weight; 401 total += weight; 402 } 403 return vec4(color / total, 1.0); 404} 405`,license:"MIT",author:"rectalogic",createdAt:"Mon, 12 Jun 2017 12:33:07 +0800",updatedAt:"Mon, 12 Jun 2017 12:33:07 +0800"},{name:"Directional",paramsTypes:{direction:"vec2"},defaultParams:{direction:[0,1]},glsl:`// Author: Ga
405\xEBtan Renaudeau 406// License: MIT 407 408uniform vec2 direction; // = vec2(0.0, 1.0) 409 410vec4 transition (vec2 uv) { 411 vec2 p = uv + progress * sign(direction); 412 vec2 f = fract(p); 413 return mix( 414 getToColor(f), 415 getFromColor(f), 416 step(0.0, p.y) * step(p.y, 1.0) * step(0.0, p.x) * step(p.x, 1.0) 417 ); 418} 419`,author:"Ga\xEB
vendor: 30,834 bytes, lines 419-1256
419tan Renaudeau",license:"MIT",createdAt:"Thu, 19 Apr 2018 12:20:29 +0200",updatedAt:"Thu, 19 Apr 2018 12:20:29 +0200"},{name:"DoomScreenTransition",paramsTypes:{bars:"int",amplitude:"float",noise:"float",frequency:"float",dripScale:"float"},defaultParams:{bars:30,amplitude:2,noise:.1,frequency:.5,dripScale:.5},glsl:`// Author: Zeh Fernando 420// License: MIT 421 422 423// Transition parameters -------- 424 425// Number of total bars/columns 426uniform int bars; // = 30 427 428// Multiplier for speed ratio. 0 = no variation when going down, higher = some elements go much faster 429uniform float amplitude; // = 2 430 431// Further variations in speed. 0 = no noise, 1 = super noisy (ignore frequency) 432uniform float noise; // = 0.1 433 434// Speed variation horizontally. the bigger the value, the shorter the waves 435uniform float frequency; // = 0.5 436 437// How much the bars seem to "run" from the middle of the screen first (sticking to the sides). 0 = no drip, 1 = curved drip 438uniform float dripScale; // = 0.5 439 440 441// The code proper -------- 442 443float rand(int num) { 444 return fract(mod(float(num) * 67123.313, 12.0) * sin(float(num) * 10.3) * cos(float(num))); 445} 446 447float wave(int num) { 448 float fn = float(num) * frequency * 0.1 * float(bars); 449 return cos(fn * 0.5) * cos(fn * 0.13) * sin((fn+10.0) * 0.3) / 2.0 + 0.5; 450} 451 452float drip(int num) { 453 return sin(float(num) / float(bars - 1) * 3.141592) * dripScale; 454} 455 456float pos(int num) { 457 return (noise == 0.0 ? wave(num) : mix(wave(num), rand(num), noise)) + (dripScale == 0.0 ? 0.0 : drip(num)); 458} 459 460vec4 transition(vec2 uv) { 461 int bar = int(uv.x * (float(bars))); 462 float scale = 1.0 + pos(bar) * amplitude; 463 float phase = progress * scale; 464 float posY = uv.y / vec2(1.0).y; 465 vec2 p; 466 vec4 c; 467 if (phase + posY < 1.0) { 468 p = vec2(uv.x, uv.y + mix(0.0, vec2(1.0).y, phase)) / vec2(1.0).xy; 469 c = getFromColor(p); 470 } else { 471 p = uv.xy / vec2(1.0).xy; 472 c = getToColor(p); 473 } 474 475 // Finally, apply the color 476 return c; 477} 478`,author:"Zeh Fernando",license:"MIT",createdAt:"Tue, 30 May 2017 09:39:09 -0700",updatedAt:"Tue, 30 May 2017 09:39:09 -0700"},{name:"Dreamy",paramsTypes:{},defaultParams:{},glsl:`// Author: mikolalysenko 479// License: MIT 480 481vec2 offset(float progress, float x, float theta) { 482 float phase = progress*progress + progress + theta; 483 float shifty = 0.03*progress*cos(10.0*(progress+x)); 484 return vec2(0, shifty); 485} 486vec4 transition(vec2 p) { 487 return mix(getFromColor(p + offset(progress, p.x, 0.0)), getToColor(p + offset(1.0-progress, p.x, 3.14)), progress); 488} 489`,author:"mikolalysenko",license:"MIT",createdAt:"Mon, 12 Jun 2017 12:27:38 +0800",updatedAt:"Mon, 12 Jun 2017 12:27:38 +0800"},{name:"DreamyZoom",paramsTypes:{rotation:"float",scale:"float"},defaultParams:{rotation:6,scale:1.2},glsl:`// Author: Zeh Fernando 490// License: MIT 491 492// Definitions -------- 493#define DEG2RAD 0.03926990816987241548078304229099 // 1/180*PI 494 495 496// Transition parameters -------- 497 498// In degrees 499uniform float rotation; // = 6 500 501// Multiplier 502uniform float scale; // = 1.2 503 504 505// The code proper -------- 506 507vec4 transition(vec2 uv) { 508 // Massage parameters 509 float phase = progress < 0.5 ? progress * 2.0 : (progress - 0.5) * 2.0; 510 float angleOffset = progress < 0.5 ? mix(0.0, rotation * DEG2RAD, phase) : mix(-rotation * DEG2RAD, 0.0, phase); 511 float newScale = progress < 0.5 ? mix(1.0, scale, phase) : mix(scale, 1.0, phase); 512 513 vec2 center = vec2(0, 0); 514 515 // Calculate the source point 516 vec2 assumedCenter = vec2(0.5, 0.5); 517 vec2 p = (uv.xy - vec2(0.5, 0.5)) / newScale * vec2(ratio, 1.0); 518 519 // This can probably be optimized (with distance()) 520 float angle = atan(p.y, p.x) + angleOffset; 521 float dist = distance(center, p); 522 p.x = cos(angle) * dist / ratio + 0.5; 523 p.y = sin(angle) * dist + 0.5; 524 vec4 c = progress < 0.5 ? getFromColor(p) : getToColor(p); 525 526 // Finally, apply the color 527 return c + (progress < 0.5 ? mix(0.0, 1.0, phase) : mix(1.0, 0.0, phase)); 528} 529`,author:"Zeh Fernando",license:"MIT",createdAt:"Tue, 30 May 2017 10:44:06 -0700",updatedAt:"Tue, 30 May 2017 10:44:06 -0700"},{name:"GlitchDisplace",paramsTypes:{},defaultParams:{},glsl:`// Author: Matt DesLauriers 530// License: MIT 531 532highp float random(vec2 co) 533{ 534 highp float a = 12.9898; 535 highp float b = 78.233; 536 highp float c = 43758.5453; 537 highp float dt= dot(co.xy ,vec2(a,b)); 538 highp float sn= mod(dt,3.14); 539 return fract(sin(sn) * c); 540} 541float voronoi( in vec2 x ) { 542 vec2 p = floor( x ); 543 vec2 f = fract( x ); 544 float res = 8.0; 545 for( float j=-1.; j<=1.; j++ ) 546 for( float i=-1.; i<=1.; i++ ) { 547 vec2 b = vec2( i, j ); 548 vec2 r = b - f + random( p + b ); 549 float d = dot( r, r ); 550 res = min( res, d ); 551 } 552 return sqrt( res ); 553} 554 555vec2 displace(vec4 tex, vec2 texCoord, float dotDepth, float textureDepth, float strength) { 556 float b = voronoi(.003 * texCoord + 2.0); 557 float g = voronoi(0.2 * texCoord); 558 float r = voronoi(texCoord - 1.0); 559 vec4 dt = tex * 1.0; 560 vec4 dis = dt * dotDepth + 1.0 - tex * textureDepth; 561 562 dis.x = dis.x - 1.0 + textureDepth*dotDepth; 563 dis.y = dis.y - 1.0 + textureDepth*dotDepth; 564 dis.x *= strength; 565 dis.y *= strength; 566 vec2 res_uv = texCoord ; 567 res_uv.x = res_uv.x + dis.x - 0.0; 568 res_uv.y = res_uv.y + dis.y; 569 return res_uv; 570} 571 572float ease1(float t) { 573 return t == 0.0 || t == 1.0 574 ? t 575 : t < 0.5 576 ? +0.5 * pow(2.0, (20.0 * t) - 10.0) 577 : -0.5 * pow(2.0, 10.0 - (t * 20.0)) + 1.0; 578} 579float ease2(float t) { 580 return t == 1.0 ? t : 1.0 - pow(2.0, -10.0 * t); 581} 582 583 584 585vec4 transition(vec2 uv) { 586 vec2 p = uv.xy / vec2(1.0).xy; 587 vec4 color1 = getFromColor(p); 588 vec4 color2 = getToColor(p); 589 vec2 disp = displace(color1, p, 0.33, 0.7, 1.0-ease1(progress)); 590 vec2 disp2 = displace(color2, p, 0.33, 0.5, ease2(progress)); 591 vec4 dColor1 = getToColor(disp); 592 vec4 dColor2 = getFromColor(disp2); 593 float val = ease1(progress); 594 vec3 gray = vec3(dot(min(dColor2, dColor1).rgb, vec3(0.299, 0.587, 0.114))); 595 dColor2 = vec4(gray, 1.0); 596 dColor2 *= 2.0; 597 color1 = mix(color1, dColor2, smoothstep(0.0, 0.5, progress)); 598 color2 = mix(color2, dColor1, smoothstep(1.0, 0.5, progress)); 599 return mix(color1, color2, val); 600 //gl_FragColor = mix(gl_FragColor, dColor, smoothstep(0.0, 0.5, progress)); 601 602 //gl_FragColor = mix(texture2D(from, p), texture2D(to, p), progress); 603} 604`,author:"Matt DesLauriers",license:"MIT",createdAt:"Tue, 30 May 2017 14:53:04 -0400",updatedAt:"Tue, 30 May 2017 14:53:04 -0400"},{name:"GlitchMemories",paramsTypes:{},defaultParams:{},glsl:`// author: Gunnar Roth 605// based on work from natewave 606// license: MIT 607vec4 transition(vec2 p) { 608 vec2 block = floor(p.xy / vec2(16)); 609 vec2 uv_noise = block / vec2(64); 610 uv_noise += floor(vec2(progress) * vec2(1200.0, 3500.0)) / vec2(64); 611 vec2 dist = progress > 0.0 ? (fract(uv_noise) - 0.5) * 0.3 *(1.0 -progress) : vec2(0.0); 612 vec2 red = p + dist * 0.2; 613 vec2 green = p + dist * .3; 614 vec2 blue = p + dist * .5; 615 616 return vec4(mix(getFromColor(red), getToColor(red), progress).r,mix(getFromColor(green), getToColor(green), progress).g,mix(getFromColor(blue), getToColor(blue), progress).b,1.0); 617} 618 619`,author:"Gunnar Roth",license:"MIT",createdAt:"Wed, 21 Feb 2018 00:52:15 +0100",updatedAt:"Wed, 21 Feb 2018 19:32:02 +0100"},{name:"GridFlip",paramsTypes:{size:"ivec2",pause:"float",dividerWidth:"float",bgcolor:"vec4",randomness:"float"},defaultParams:{size:[4,4],pause:.1,dividerWidth:.05,bgcolor:[0,0,0,1],randomness:.1},glsl:`// License: MIT 620// Author: TimDonselaar 621// ported by gre from https://gist.github.com/TimDonselaar/9bcd1c4b5934ba60087bdb55c2ea92e5 622 623uniform ivec2 size; // = ivec2(4) 624uniform float pause; // = 0.1 625uniform float dividerWidth; // = 0.05 626uniform vec4 bgcolor; // = vec4(0.0, 0.0, 0.0, 1.0) 627uniform float randomness; // = 0.1 628 629float rand (vec2 co) { 630 return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); 631} 632 633float getDelta(vec2 p) { 634 vec2 rectanglePos = floor(vec2(size) * p); 635 vec2 rectangleSize = vec2(1.0 / vec2(size).x, 1.0 / vec2(size).y); 636 float top = rectangleSize.y * (rectanglePos.y + 1.0); 637 float bottom = rectangleSize.y * rectanglePos.y; 638 float left = rectangleSize.x * rectanglePos.x; 639 float right = rectangleSize.x * (rectanglePos.x + 1.0); 640 float minX = min(abs(p.x - left), abs(p.x - right)); 641 float minY = min(abs(p.y - top), abs(p.y - bottom)); 642 return min(minX, minY); 643} 644 645float getDividerSize() { 646 vec2 rectangleSize = vec2(1.0 / vec2(size).x, 1.0 / vec2(size).y); 647 return min(rectangleSize.x, rectangleSize.y) * dividerWidth; 648} 649 650vec4 transition(vec2 p) { 651 if(progress < pause) { 652 float currentProg = progress / pause; 653 float a = 1.0; 654 if(getDelta(p) < getDividerSize()) { 655 a = 1.0 - currentProg; 656 } 657 return mix(bgcolor, getFromColor(p), a); 658 } 659 else if(progress < 1.0 - pause){ 660 if(getDelta(p) < getDividerSize()) { 661 return bgcolor; 662 } else { 663 float currentProg = (progress - pause) / (1.0 - pause * 2.0); 664 vec2 q = p; 665 vec2 rectanglePos = floor(vec2(size) * q); 666 667 float r = rand(rectanglePos) - randomness; 668 float cp = smoothstep(0.0, 1.0 - r, currentProg); 669 670 float rectangleSize = 1.0 / vec2(size).x; 671 float delta = rectanglePos.x * rectangleSize; 672 float offset = rectangleSize / 2.0 + delta; 673 674 p.x = (p.x - offset)/abs(cp - 0.5)*0.5 + offset; 675 vec4 a = getFromColor(p); 676 vec4 b = getToColor(p); 677 678 float s = step(abs(vec2(size).x * (q.x - delta) - 0.5), abs(cp - 0.5)); 679 return mix(bgcolor, mix(b, a, step(cp, 0.5)), s); 680 } 681 } 682 else { 683 float currentProg = (progress - 1.0 + pause) / pause; 684 float a = 1.0; 685 if(getDelta(p) < getDividerSize()) { 686 a = currentProg; 687 } 688 return mix(bgcolor, getToColor(p), a); 689 } 690} 691`,license:"MIT",author:"TimDonselaar",createdAt:"Mon, 12 Jun 2017 11:32:51 +0800",updatedAt:"Mon, 12 Jun 2017 11:32:51 +0800"},{name:"InvertedPageCurl",paramsTypes:{},defaultParams:{},glsl:`// author: Hewlett-Packard 692// license: BSD 3 Clause 693// Adapted by Sergey Kosarevsky from: 694// http://rectalogic.github.io/webvfx/examples_2transition-shader-pagecurl_8html-example.html 695 696/* 697Copyright (c) 2010 Hewlett-Packard Development Company, L.P. All rights reserved. 698 699Redistribution and use in source and binary forms, with or without 700modification, are permitted provided that the following conditions are 701met: 702 703 * Redistributions of source code must retain the above copyright 704 notice, this list of conditions and the following disclaimer. 705 * Redistributions in binary form must reproduce the above 706 copyright notice, this list of conditions and the following disclaimer 707 in the documentation and/or other materials provided with the 708 distribution. 709 * Neither the name of Hewlett-Packard nor the names of its 710 contributors may be used to endorse or promote products derived from 711 this software without specific prior written permission. 712 713THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 714"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 715LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 716A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 717OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 718SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 719LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 720DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 721THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 722(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 723OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 724in vec2 texCoord; 725*/ 726 727const float MIN_AMOUNT = -0.16; 728const float MAX_AMOUNT = 1.5; 729float amount = progress * (MAX_AMOUNT - MIN_AMOUNT) + MIN_AMOUNT; 730 731const float PI = 3.141592653589793; 732 733const float scale = 512.0; 734const float sharpness = 3.0; 735 736float cylinderCenter = amount; 737// 360 degrees * amount 738float cylinderAngle = 2.0 * PI * amount; 739 740const float cylinderRadius = 1.0 / PI / 2.0; 741 742vec3 hitPoint(float hitAngle, float yc, vec3 point, mat3 rrotation) 743{ 744 float hitPoint = hitAngle / (2.0 * PI); 745 point.y = hitPoint; 746 return rrotation * point; 747} 748 749vec4 antiAlias(vec4 color1, vec4 color2, float distanc) 750{ 751 distanc *= scale; 752 if (distanc < 0.0) return color2; 753 if (distanc > 2.0) return color1; 754 float dd = pow(1.0 - distanc / 2.0, sharpness); 755 return ((color2 - color1) * dd) + color1; 756} 757 758float distanceToEdge(vec3 point) 759{ 760 float dx = abs(point.x > 0.5 ? 1.0 - point.x : point.x); 761 float dy = abs(point.y > 0.5 ? 1.0 - point.y : point.y); 762 if (point.x < 0.0) dx = -point.x; 763 if (point.x > 1.0) dx = point.x - 1.0; 764 if (point.y < 0.0) dy = -point.y; 765 if (point.y > 1.0) dy = point.y - 1.0; 766 if ((point.x < 0.0 || point.x > 1.0) && (point.y < 0.0 || point.y > 1.0)) return sqrt(dx * dx + dy * dy); 767 return min(dx, dy); 768} 769 770vec4 seeThrough(float yc, vec2 p, mat3 rotation, mat3 rrotation) 771{ 772 float hitAngle = PI - (acos(yc / cylinderRadius) - cylinderAngle); 773 vec3 point = hitPoint(hitAngle, yc, rotation * vec3(p, 1.0), rrotation); 774 if (yc <= 0.0 && (point.x < 0.0 || point.y < 0.0 || point.x > 1.0 || point.y > 1.0)) 775 { 776 return getToColor(p); 777 } 778 779 if (yc > 0.0) return getFromColor(p); 780 781 vec4 color = getFromColor(point.xy); 782 vec4 tcolor = vec4(0.0); 783 784 return antiAlias(color, tcolor, distanceToEdge(point)); 785} 786 787vec4 seeThroughWithShadow(float yc, vec2 p, vec3 point, mat3 rotation, mat3 rrotation) 788{ 789 float shadow = distanceToEdge(point) * 30.0; 790 shadow = (1.0 - shadow) / 3.0; 791 792 if (shadow < 0.0) shadow = 0.0; else shadow *= amount; 793 794 vec4 shadowColor = seeThrough(yc, p, rotation, rrotation); 795 shadowColor.r -= shadow; 796 shadowColor.g -= shadow; 797 shadowColor.b -= shadow; 798 799 return shadowColor; 800} 801 802vec4 backside(float yc, vec3 point) 803{ 804 vec4 color = getFromColor(point.xy); 805 float gray = (color.r + color.b + color.g) / 15.0; 806 gray += (8.0 / 10.0) * (pow(1.0 - abs(yc / cylinderRadius), 2.0 / 10.0) / 2.0 + (5.0 / 10.0)); 807 color.rgb = vec3(gray); 808 return color; 809} 810 811vec4 behindSurface(vec2 p, float yc, vec3 point, mat3 rrotation) 812{ 813 float shado = (1.0 - ((-cylinderRadius - yc) / amount * 7.0)) / 6.0; 814 shado *= 1.0 - abs(point.x - 0.5); 815 816 yc = (-cylinderRadius - cylinderRadius - yc); 817 818 float hitAngle = (acos(yc / cylinderRadius) + cylinderAngle) - PI; 819 point = hitPoint(hitAngle, yc, point, rrotation); 820 821 if (yc < 0.0 && point.x >= 0.0 && point.y >= 0.0 && point.x <= 1.0 && point.y <= 1.0 && (hitAngle < PI || amount > 0.5)) 822 { 823 shado = 1.0 - (sqrt(pow(point.x - 0.5, 2.0) + pow(point.y - 0.5, 2.0)) / (71.0 / 100.0)); 824 shado *= pow(-yc / cylinderRadius, 3.0); 825 shado *= 0.5; 826 } 827 else 828 { 829 shado = 0.0; 830 } 831 return vec4(getToColor(p).rgb - shado, 1.0); 832} 833 834vec4 transition(vec2 p) { 835 836 const float angle = 100.0 * PI / 180.0; 837 float c = cos(-angle); 838 float s = sin(-angle); 839 840 mat3 rotation = mat3( c, s, 0, 841 -s, c, 0, 842 -0.801, 0.8900, 1 843 ); 844 c = cos(angle); 845 s = sin(angle); 846 847 mat3 rrotation = mat3( c, s, 0, 848 -s, c, 0, 849 0.98500, 0.985, 1 850 ); 851 852 vec3 point = rotation * vec3(p, 1.0); 853 854 float yc = point.y - cylinderCenter; 855 856 if (yc < -cylinderRadius) 857 { 858 // Behind surface 859 return behindSurface(p,yc, point, rrotation); 860 } 861 862 if (yc > cylinderRadius) 863 { 864 // Flat surface 865 return getFromColor(p); 866 } 867 868 float hitAngle = (acos(yc / cylinderRadius) + cylinderAngle) - PI; 869 870 float hitAngleMod = mod(hitAngle, 2.0 * PI); 871 if ((hitAngleMod > PI && amount < 0.5) || (hitAngleMod > PI/2.0 && amount < 0.0)) 872 { 873 return seeThrough(yc, p, rotation, rrotation); 874 } 875 876 point = hitPoint(hitAngle, yc, point, rrotation); 877 878 if (point.x < 0.0 || point.y < 0.0 || point.x > 1.0 || point.y > 1.0) 879 { 880 return seeThroughWithShadow(yc, p, point, rotation, rrotation); 881 } 882 883 vec4 color = backside(yc, point); 884 885 vec4 otherColor; 886 if (yc < 0.0) 887 { 888 float shado = 1.0 - (sqrt(pow(point.x - 0.5, 2.0) + pow(point.y - 0.5, 2.0)) / 0.71); 889 shado *= pow(-yc / cylinderRadius, 3.0); 890 shado *= 0.5; 891 otherColor = vec4(0.0, 0.0, 0.0, shado); 892 } 893 else 894 { 895 otherColor = getFromColor(p); 896 } 897 898 color = antiAlias(color, otherColor, cylinderRadius - abs(yc)); 899 900 vec4 cl = seeThroughWithShadow(yc, p, point, rotation, rrotation); 901 float dist = distanceToEdge(point); 902 903 return antiAlias(color, cl, dist); 904} 905`,author:"Hewlett-Packard",license:"BSD 3 Clause",createdAt:"Wed, 21 Feb 2018 01:13:49 +0100",updatedAt:"Wed, 21 Feb 2018 16:00:02 +0100"},{name:"LinearBlur",paramsTypes:{intensity:"float"},defaultParams:{intensity:.1},glsl:`// author: gre 906// license: MIT 907uniform float intensity; // = 0.1 908const int passes = 6; 909 910vec4 transition(vec2 uv) { 911 vec4 c1 = vec4(0.0); 912 vec4 c2 = vec4(0.0); 913 914 float disp = intensity*(0.5-distance(0.5, progress)); 915 for (int xi=0; xi<passes; xi++) 916 { 917 float x = float(xi) / float(passes) - 0.5; 918 for (int yi=0; yi<passes; yi++) 919 { 920 float y = float(yi) / float(passes) - 0.5; 921 vec2 v = vec2(x,y); 922 float d = disp; 923 c1 += getFromColor( uv + d*v); 924 c2 += getToColor( uv + d*v); 925 } 926 } 927 c1 /= float(passes*passes); 928 c2 /= float(passes*passes); 929 return mix(c1, c2, progress); 930} 931`,author:"gre",license:"MIT",createdAt:"Fri, 23 Feb 2018 15:18:22 +0100",updatedAt:"Fri, 23 Feb 2018 15:18:22 +0100"},{name:"Mosaic",paramsTypes:{endx:"int",endy:"int"},defaultParams:{endx:2,endy:-1},glsl:`// License: MIT 932// Author: Xaychru 933// ported by gre from https://gist.github.com/Xaychru/130bb7b7affedbda9df5 934 935#define PI 3.14159265358979323 936#define POW2(X) X*X 937#define POW3(X) X*X*X 938uniform int endx; // = 2 939uniform int endy; // = -1 940 941float Rand(vec2 v) { 942 return fract(sin(dot(v.xy ,vec2(12.9898,78.233))) * 43758.5453); 943} 944vec2 Rotate(vec2 v, float a) { 945 mat2 rm = mat2(cos(a), -sin(a), 946 sin(a), cos(a)); 947 return rm*v; 948} 949float CosInterpolation(float x) { 950 return -cos(x*PI)/2.+.5; 951} 952vec4 transition(vec2 uv) { 953 vec2 p = uv.xy / vec2(1.0).xy - .5; 954 vec2 rp = p; 955 float rpr = (progress*2.-1.); 956 float z = -(rpr*rpr*2.) + 3.; 957 float az = abs(z); 958 rp *= az; 959 rp += mix(vec2(.5, .5), vec2(float(endx) + .5, float(endy) + .5), POW2(CosInterpolation(progress))); 960 vec2 mrp = mod(rp, 1.); 961 vec2 crp = rp; 962 bool onEnd = int(floor(crp.x))==endx&&int(floor(crp.y))==endy; 963 if(!onEnd) { 964 float ang = float(int(Rand(floor(crp))*4.))*.5*PI; 965 mrp = vec2(.5) + Rotate(mrp-vec2(.5), ang); 966 } 967 if(onEnd || Rand(floor(crp))>.5) { 968 return getToColor(mrp); 969 } else { 970 return getFromColor(mrp); 971 } 972} 973`,license:"MIT",author:"Xaychru",createdAt:"Mon, 12 Jun 2017 10:26:51 +0800",updatedAt:"Mon, 12 Jun 2017 10:26:51 +0800"},{name:"PolkaDotsCurtain",paramsTypes:{dots:"float",center:"vec2"},defaultParams:{dots:20,center:[0,0]},glsl:`// author: bobylito 974// license: MIT 975const float SQRT_2 = 1.414213562373; 976uniform float dots;// = 20.0; 977uniform vec2 center;// = vec2(0, 0); 978 979vec4 transition(vec2 uv) { 980 bool nextImage = distance(fract(uv * dots), vec2(0.5, 0.5)) < ( progress / distance(uv, center)); 981 return nextImage ? getToColor(uv) : getFromColor(uv); 982} 983`,author:"bobylito",license:"MIT",createdAt:"Tue, 20 Feb 2018 23:41:45 +0100",updatedAt:"Tue, 20 Feb 2018 23:41:45 +0100"},{name:"Radial",paramsTypes:{smoothness:"float"},defaultParams:{smoothness:1},glsl:`// License: MIT 984// Author: Xaychru 985// ported by gre from https://gist.github.com/Xaychru/ce1d48f0ce00bb379750 986 987uniform float smoothness; // = 1.0 988 989const float PI = 3.141592653589; 990 991vec4 transition(vec2 p) { 992 vec2 rp = p*2.-1.; 993 return mix( 994 getToColor(p), 995 getFromColor(p), 996 smoothstep(0., smoothness, atan(rp.y,rp.x) - (progress-.5) * PI * 2.5) 997 ); 998} 999`,license:"MIT",author:"Xaychru",createdAt:"Mon, 12 Jun 2017 10:36:24 +0800",updatedAt:"Mon, 12 Jun 2017 10:36:24 +0800"},{name:"SimpleZoom",paramsTypes:{zoom_quickness:"float"},defaultParams:{zoom_quickness:.8},glsl:`// Author: 0gust1 1000// License: MIT 1001 1002uniform float zoom_quickness; // = 0.8 1003float nQuick = clamp(zoom_quickness,0.2,1.0); 1004 1005vec2 zoom(vec2 uv, float amount) { 1006 return 0.5 + ((uv - 0.5) * (1.0-amount)); 1007} 1008 1009vec4 transition (vec2 uv) { 1010 return mix( 1011 getFromColor(zoom(uv, smoothstep(0.0, nQuick, progress))), 1012 getToColor(uv), 1013 smoothstep(nQuick-0.2, 1.0, progress) 1014 ); 1015}`,author:"0gust1",license:"MIT",createdAt:"Tue, 6 Mar 2018 00:43:47 +0100",updatedAt:"Tue, 6 Mar 2018 00:43:47 +0100"},{name:"StereoViewer",paramsTypes:{zoom:"float",corner_radius:"float"},defaultParams:{zoom:.88,corner_radius:.22},glsl:`// Tunable parameters 1016// How much to zoom (out) for the effect ~ 0.5 - 1.0 1017uniform float zoom; // = 0.88 1018// Corner radius as a fraction of the image height 1019uniform float corner_radius; // = 0.22 1020 1021// author: Ted Schundler 1022// license: BSD 2 Clause 1023// Free for use and modification by anyone with credit 1024 1025// Copyright (c) 2016, Theodore K Schundler 1026// All rights reserved. 1027 1028// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1029 1030// 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 1031 1032// 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 1033 1034// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1035 1036/////////////////////////////////////////////////////////////////////////////// 1037// Stereo Viewer Toy Transition // 1038// // 1039// Inspired by ViewMaster / Image3D image viewer devices. // 1040// This effect is similar to what you see when you press the device's lever. // 1041// There is a quick zoom in / out to make the transition 'valid' for GLSL.io // 1042/////////////////////////////////////////////////////////////////////////////// 1043 1044const vec4 black = vec4(0.0, 0.0, 0.0, 1.0); 1045const vec2 c00 = vec2(0.0, 0.0); // the four corner points 1046const vec2 c01 = vec2(0.0, 1.0); 1047const vec2 c11 = vec2(1.0, 1.0); 1048const vec2 c10 = vec2(1.0, 0.0); 1049 1050// Check if a point is within a given corner 1051bool in_corner(vec2 p, vec2 corner, vec2 radius) { 1052 // determine the direction we want to be filled 1053 vec2 axis = (c11 - corner) - corner; 1054 1055 // warp the point so we are always testing the bottom left point with the 1056 // circle centered on the origin 1057 p = p - (corner + axis * radius); 1058 p *= axis / radius; 1059 return (p.x > 0.0 && p.y > -1.0) || (p.y > 0.0 && p.x > -1.0) || dot(p, p) < 1.0; 1060} 1061 1062// Check all four corners 1063// return a float for v2 for anti-aliasing? 1064bool test_rounded_mask(vec2 p, vec2 corner_size) { 1065 return 1066 in_corner(p, c00, corner_size) && 1067 in_corner(p, c01, corner_size) && 1068 in_corner(p, c10, corner_size) && 1069 in_corner(p, c11, corner_size); 1070} 1071 1072// Screen blend mode - https://en.wikipedia.org/wiki/Blend_modes 1073// This more closely approximates what you see than linear blending 1074vec4 screen(vec4 a, vec4 b) { 1075 return 1.0 - (1.0 - a) * (1.0 -b); 1076} 1077 1078// Given RGBA, find a value that when screened with itself 1079// will yield the original value. 1080vec4 unscreen(vec4 c) { 1081 return 1.0 - sqrt(1.0 - c); 1082} 1083 1084// Grab a pixel, only if it isn't masked out by the rounded corners 1085vec4 sample_with_corners_from(vec2 p, vec2 corner_size) { 1086 p = (p - 0.5) / zoom + 0.5; 1087 if (!test_rounded_mask(p, corner_size)) { 1088 return black; 1089 } 1090 return unscreen(getFromColor(p)); 1091} 1092 1093vec4 sample_with_corners_to(vec2 p, vec2 corner_size) { 1094 p = (p - 0.5) / zoom + 0.5; 1095 if (!test_rounded_mask(p, corner_size)) { 1096 return black; 1097 } 1098 return unscreen(getToColor(p)); 1099} 1100 1101// special sampling used when zooming - extra zoom parameter and don't unscreen 1102vec4 simple_sample_with_corners_from(vec2 p, vec2 corner_size, float zoom_amt) { 1103 p = (p - 0.5) / (1.0 - zoom_amt + zoom * zoom_amt) + 0.5; 1104 if (!test_rounded_mask(p, corner_size)) { 1105 return black; 1106 } 1107 return getFromColor(p); 1108} 1109 1110vec4 simple_sample_with_corners_to(vec2 p, vec2 corner_size, float zoom_amt) { 1111 p = (p - 0.5) / (1.0 - zoom_amt + zoom * zoom_amt) + 0.5; 1112 if (!test_rounded_mask(p, corner_size)) { 1113 return black; 1114 } 1115 return getToColor(p); 1116} 1117 1118// Basic 2D affine transform matrix helpers 1119// These really shouldn't be used in a fragment shader - I should work out the 1120// the math for a translate & rotate function as a pair of dot products instead 1121 1122mat3 rotate2d(float angle, float ratio) { 1123 float s = sin(angle); 1124 float c = cos(angle); 1125 return mat3( 1126 c, s ,0.0, 1127 -s, c, 0.0, 1128 0.0, 0.0, 1.0); 1129} 1130 1131mat3 translate2d(float x, float y) { 1132 return mat3( 1133 1.0, 0.0, 0, 1134 0.0, 1.0, 0, 1135 -x, -y, 1.0); 1136} 1137 1138mat3 scale2d(float x, float y) { 1139 return mat3( 1140 x, 0.0, 0, 1141 0.0, y, 0, 1142 0, 0, 1.0); 1143} 1144 1145// Split an image and rotate one up and one down along off screen pivot points 1146vec4 get_cross_rotated(vec3 p3, float angle, vec2 corner_size, float ratio) { 1147 angle = angle * angle; // easing 1148 angle /= 2.4; // works out to be a good number of radians 1149 1150 mat3 center_and_scale = translate2d(-0.5, -0.5) * scale2d(1.0, ratio); 1151 mat3 unscale_and_uncenter = scale2d(1.0, 1.0/ratio) * translate2d(0.5,0.5); 1152 mat3 slide_left = translate2d(-2.0,0.0); 1153 mat3 slide_right = translate2d(2.0,0.0); 1154 mat3 rotate = rotate2d(angle, ratio); 1155 1156 mat3 op_a = center_and_scale * slide_right * rotate * slide_left * unscale_and_uncenter; 1157 mat3 op_b = center_and_scale * slide_left * rotate * slide_right * unscale_and_uncenter; 1158 1159 vec4 a = sample_with_corners_from((op_a * p3).xy, corner_size); 1160 vec4 b = sample_with_corners_from((op_b * p3).xy, corner_size); 1161 1162 return screen(a, b); 1163} 1164 1165// Image stays put, but this time move two masks 1166vec4 get_cross_masked(vec3 p3, float angle, vec2 corner_size, float ratio) { 1167 angle = 1.0 - angle; 1168 angle = angle * angle; // easing 1169 angle /= 2.4; 1170 1171 vec4 img; 1172 1173 mat3 center_and_scale = translate2d(-0.5, -0.5) * scale2d(1.0, ratio); 1174 mat3 unscale_and_uncenter = scale2d(1.0 / zoom, 1.0 / (zoom * ratio)) * translate2d(0.5,0.5); 1175 mat3 slide_left = translate2d(-2.0,0.0); 1176 mat3 slide_right = translate2d(2.0,0.0); 1177 mat3 rotate = rotate2d(angle, ratio); 1178 1179 mat3 op_a = center_and_scale * slide_right * rotate * slide_left * unscale_and_uncenter; 1180 mat3 op_b = center_and_scale * slide_left * rotate * slide_right * unscale_and_uncenter; 1181 1182 bool mask_a = test_rounded_mask((op_a * p3).xy, corner_size); 1183 bool mask_b = test_rounded_mask((op_b * p3).xy, corner_size); 1184 1185 if (mask_a || mask_b) { 1186 img = sample_with_corners_to(p3.xy, corner_size); 1187 return screen(mask_a ? img : black, mask_b ? img : black); 1188 } else { 1189 return black; 1190 } 1191} 1192 1193vec4 transition(vec2 uv) { 1194 float a; 1195 vec2 p=uv.xy/vec2(1.0).xy; 1196 vec3 p3 = vec3(p.xy, 1.0); // for 2D matrix transforms 1197 1198 // corner is warped to represent to size after mapping to 1.0, 1.0 1199 vec2 corner_size = vec2(corner_radius / ratio, corner_radius); 1200 1201 if (progress <= 0.0) { 1202 // 0.0: start with the base frame always 1203 return getFromColor(p); 1204 } else if (progress < 0.1) { 1205 // 0.0-0.1: zoom out and add rounded corners 1206 a = progress / 0.1; 1207 return simple_sample_with_corners_from(p, corner_size * a, a); 1208 } else if (progress < 0.48) { 1209 // 0.1-0.48: Split original image apart 1210 a = (progress - 0.1)/0.38; 1211 return get_cross_rotated(p3, a, corner_size, ratio); 1212 } else if (progress < 0.9) { 1213 // 0.48-0.52: black 1214 // 0.52 - 0.9: unmask new image 1215 return get_cross_masked(p3, (progress - 0.52)/0.38, corner_size, ratio); 1216 } else if (progress < 1.0) { 1217 // zoom out and add rounded corners 1218 a = (1.0 - progress) / 0.1; 1219 return simple_sample_with_corners_to(p, corner_size * a, a); 1220 } else { 1221 // 1.0 end with base frame 1222 return getToColor(p); 1223 } 1224} 1225`,author:"Ted Schundler",license:"BSD 2 Clause",createdAt:"Tue, 20 Feb 2018 23:20:29 +0100",updatedAt:"Wed, 21 Feb 2018 15:42:00 +0100"},{name:"Swirl",paramsTypes:{},defaultParams:{},glsl:`// License: MIT 1226// Author: Sergey Kosarevsky 1227// ( http://www.linderdaum.com ) 1228// ported by gre from https://gist.github.com/corporateshark/cacfedb8cca0f5ce3f7c 1229 1230vec4 transition(vec2 UV) 1231{ 1232 float Radius = 1.0; 1233 1234 float T = progress; 1235 1236 UV -= vec2( 0.5, 0.5 ); 1237 1238 float Dist = length(UV); 1239 1240 if ( Dist < Radius ) 1241 { 1242 float Percent = (Radius - Dist) / Radius; 1243 float A = ( T <= 0.5 ) ? mix( 0.0, 1.0, T/0.5 ) : mix( 1.0, 0.0, (T-0.5)/0.5 ); 1244 float Theta = Percent * Percent * A * 8.0 * 3.14159; 1245 float S = sin( Theta ); 1246 float C = cos( Theta ); 1247 UV = vec2( dot(UV, vec2(C, -S)), dot(UV, vec2(S, C)) ); 1248 } 1249 UV += vec2( 0.5, 0.5 ); 1250 1251 vec4 C0 = getFromColor(UV); 1252 vec4 C1 = getToColor(UV); 1253 1254 return mix( C0, C1, T ); 1255} 1256`,license:"MIT",author:"Sergey Kosarevsky",createdAt:"Mon, 12 Jun 2017 12:38:27 +0800",updatedAt:"Mon, 12 Jun 2017 12:38:27 +0800"},{name:"WaterDrop",paramsTypes:{amplitude:"float",speed:"float"},defaultParams:{amplitude:30,speed:30},glsl:`// author: Pawe
1256\u0142 P\u0142\xF3ciennik 1257// license: MIT 1258uniform float amplitude; // = 30 1259uniform float speed; // = 30 1260 1261vec4 transition(vec2 p) { 1262 vec2 dir = p - vec2(.5); 1263 float dist = length(dir); 1264 1265 if (dist > progress) { 1266 return mix(getFromColor( p), getToColor( p), progress); 1267 } else { 1268 vec2 offset = dir * sin(dist * amplitude - progress * speed); 1269 return mix(getFromColor( p + offset), getToColor( p), progress); 1270 } 1271} 1272`,author:"Pawe\u0142 P\u0142\xF3ciennik",license:"MIT",createdAt:"Wed, 21 Feb 2018 19:37:15 +0100",updatedAt:"Wed, 21 Feb 2018 19:37:15 +0100"},{name:"ZoomInCircles",paramsTypes:{},defaultParams:{},glsl:`// License: MIT 1273// Author: dycm8009 1274// ported by gre from https://gist.github.com/dycm8009/948e99b1800e81ad909a 1275 1276vec2 zoom(vec2 uv, float amount) { 1277 return 0.5 + ((uv - 0.5) * amount); 1278} 1279 1280vec2 ratio2 = vec2(1.0, 1.0 / ratio); 1281 1282vec4 transition(vec2 uv) { 1283 // TODO: some timing are hardcoded but should be one or many parameters 1284 // TODO: should also be able to configure how much circles 1285 // TODO: if() branching should be avoided when possible, prefer use of step() & other functions 1286 vec2 r = 2.0 * ((vec2(uv.xy) - 0.5) * ratio2); 1287 float pro = progress / 0.8; 1288 float z = pro * 0.2; 1289 float t = 0.0; 1290 if (pro > 1.0) { 1291 z = 0.2 + (pro - 1.0) * 5.; 1292 t = clamp((progress - 0.8) / 0.07, 0.0, 1.0); 1293 } 1294 if (length(r) < 0.5+z) { 1295 // uv = zoom(uv, 0.9 - 0.1 * pro); 1296 } 1297 else if (length(r) < 0.8+z*1.5) { 1298 uv = zoom(uv, 1.0 - 0.15 * pro); 1299 t = t * 0.5; 1300 } 1301 else if (length(r) < 1.2+z*2.5) { 1302 uv = zoom(uv, 1.0 - 0.2 * pro); 1303 t = t * 0.2; 1304 } 1305 else { 1306 uv = zoom(uv, 1.0 - 0.25 * pro); 1307 } 1308 return mix(getFromColor(uv), getToColor(uv), t); 1309} 1310`,license:"MIT",author:"dycm8009",createdAt:"Mon, 12 Jun 2017 11:24:34 +0800",updatedAt:"Mon, 12 Jun 2017 11:24:34 +0800"},{name:"angular",paramsTypes:{startingAngle:"float"},defaultParams:{startingAngle:90},glsl:`// Author: Fernando Kuteken 1311// License: MIT 1312 1313#define PI 3.141592653589 1314 1315uniform float startingAngle; // = 90; 1316 1317vec4 transition (vec2 uv) { 1318 1319 float offset = startingAngle * PI / 180.0; 1320 float angle = atan(uv.y - 0.5, uv.x - 0.5) + offset; 1321 float normalizedAngle = (angle + PI) / (2.0 * PI); 1322 1323 normalizedAngle = normalizedAngle - floor(normalizedAngle); 1324 1325 return mix( 1326 getFromColor(uv), 1327 getToColor(uv), 1328 step(normalizedAngle, progress) 1329 ); 1330} 1331`,author:"Fernando Kuteken",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Tue, 30 May 2017 14:26:44 +0200"},{name:"burn",paramsTypes:{color:"vec3"},defaultParams:{color:[.9,.4,.2]},glsl:`// author: gre 1332// License: MIT 1333uniform vec3 color /* = vec3(0.9, 0.4, 0.2) */; 1334vec4 transition (vec2 uv) { 1335 return mix( 1336 getFromColor(uv) + vec4(progress*color, 1.0), 1337 getToColor(uv) + vec4((1.0-progress)*color, 1.0), 1338 progress 1339 ); 1340} 1341`,author:"gre",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Tue, 30 May 2017 14:26:44 +0200"},{name:"cannabisleaf",paramsTypes:{},defaultParams:{},glsl:`// Author: @Flexi23 1342// License: MIT 1343 1344// inspired by http://www.wolframalpha.com/input/?i=cannabis+curve 1345 1346vec4 transition (vec2 uv) { 1347 if(progress == 0.0){ 1348 return getFromColor(uv); 1349 } 1350 vec2 leaf_uv = (uv - vec2(0.5))/10./pow(progress,3.5); 1351 leaf_uv.y += 0.35; 1352 float r = 0.18; 1353 float o = atan(leaf_uv.y, leaf_uv.x); 1354 return mix(getFromColor(uv), getToColor(uv), 1.-step(1. - length(leaf_uv)+r*(1.+sin(o))*(1.+0.9 * cos(8.*o))*(1.+0.1*cos(24.*o))*(0.9+0.05*cos(200.*o)), 1.)); 1355} 1356`,author:"@Flexi23",license:"MIT",createdAt:"Thu, 1 Jun 2017 15:58:58 +0200",updatedAt:"Thu, 1 Jun 2017 15:58:58 +0200"},{name:"circle",paramsTypes:{center:"vec2",backColor:"vec3"},defaultParams:{center:[.5,.5],backColor:[.1,.1,.1]},glsl:`// Author: Fernando Kuteken 1357// License: MIT 1358 1359uniform vec2 center; // = vec2(0.5, 0.5); 1360uniform vec3 backColor; // = vec3(0.1, 0.1, 0.1); 1361 1362vec4 transition (vec2 uv) { 1363 1364 float distance = length(uv - center); 1365 float radius = sqrt(8.0) * abs(progress - 0.5); 1366 1367 if (distance > radius) { 1368 return vec4(backColor, 1.0); 1369 } 1370 else { 1371 if (progress < 0.5) return getFromColor(uv); 1372 else return getToColor(uv); 1373 } 1374} 1375`,author:"Fernando Kuteken",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Tue, 30 May 2017 14:26:44 +0200"},{name:"circleopen",paramsTypes:{smoothness:"float",opening:"bool"},defaultParams:{smoothness:.3,opening:!0},glsl:`// author: gre 1376// License: MIT 1377uniform float smoothness; // = 0.3 1378uniform bool opening; // = true 1379 1380const vec2 center = vec2(0.5, 0.5); 1381const float SQRT_2 = 1.414213562373; 1382 1383vec4 transition (vec2 uv) { 1384 float x = opening ? progress : 1.-progress; 1385 float m = smoothstep(-smoothness, 0.0, SQRT_2*distance(center, uv) - x*(1.+smoothness)); 1386 return mix(getFromColor(uv), getToColor(uv), opening ? 1.-m : m); 1387} 1388`,author:"gre",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Tue, 30 May 2017 14:26:44 +0200"},{name:"colorphase",paramsTypes:{fromStep:"vec4",toStep:"vec4"},defaultParams:{fromStep:[0,.2,.4,0],toStep:[.6,.8,1,1]},glsl:`// Author: gre 1389// License: MIT 1390 1391// Usage: fromStep and toStep must be in [0.0, 1.0] range 1392// and all(fromStep) must be < all(toStep) 1393 1394uniform vec4 fromStep; // = vec4(0.0, 0.2, 0.4, 0.0) 1395uniform vec4 toStep; // = vec4(0.6, 0.8, 1.0, 1.0) 1396 1397vec4 transition (vec2 uv) { 1398 vec4 a = getFromColor(uv); 1399 vec4 b = getToColor(uv); 1400 return mix(a, b, smoothstep(fromStep, toStep, vec4(progress))); 1401} 1402`,author:"gre",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Tue, 30 May 2017 14:26:44 +0200"},{name:"crosshatch",paramsTypes:{center:"vec2",threshold:"float",fadeEdge:"float"},defaultParams:{center:[.5,.5],threshold:3,fadeEdge:.1},glsl:`// License: MIT 1403// Author: pthrasher 1404// adapted by gre from https://gist.github.com/pthrasher/04fd9a7de4012cbb03f6 1405 1406uniform vec2 center; // = vec2(0.5) 1407uniform float threshold; // = 3.0 1408uniform float fadeEdge; // = 0.1 1409 1410float rand(vec2 co) { 1411 return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); 1412} 1413vec4 transition(vec2 p) { 1414 float dist = distance(center, p) / threshold; 1415 float r = progress - min(rand(vec2(p.y, 0.0)), rand(vec2(0.0, p.x))); 1416 return mix(getFromColor(p), getToColor(p), mix(0.0, mix(step(dist, r), 1.0, smoothstep(1.0-fadeEdge, 1.0, progress)), smoothstep(0.0, fadeEdge, progress))); 1417} 1418`,license:"MIT",author:"pthrasher",createdAt:"Mon, 12 Jun 2017 10:02:12 +0800",updatedAt:"Mon, 12 Jun 2017 10:02:12 +0800"},{name:"crosswarp",paramsTypes:{},defaultParams:{},glsl:`// Author: Eke P\xE9ter <[email protected]> 1419// License: MIT 1420vec4 transition(vec2 p) { 1421 float x = progress; 1422 x=smoothstep(.0,1.0,(x*2.0+p.x-1.0)); 1423 return mix(getFromColor((p-.5)*(1.-x)+.5), getToColor((p-.5)*x+.5), x); 1424} 1425`,author:"Eke P\xE9
vendor: 12,314 bytes, lines 1425-1775
1425ter <[email protected]>",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Tue, 30 May 2017 14:26:44 +0200"},{name:"cube",paramsTypes:{persp:"float",unzoom:"float",reflection:"float",floating:"float"},defaultParams:{persp:.7,unzoom:.3,reflection:.4,floating:3},glsl:`// Author: gre 1426// License: MIT 1427uniform float persp; // = 0.7 1428uniform float unzoom; // = 0.3 1429uniform float reflection; // = 0.4 1430uniform float floating; // = 3.0 1431 1432vec2 project (vec2 p) { 1433 return p * vec2(1.0, -1.2) + vec2(0.0, -floating/100.); 1434} 1435 1436bool inBounds (vec2 p) { 1437 return all(lessThan(vec2(0.0), p)) && all(lessThan(p, vec2(1.0))); 1438} 1439 1440vec4 bgColor (vec2 p, vec2 pfr, vec2 pto) { 1441 vec4 c = vec4(0.0, 0.0, 0.0, 1.0); 1442 pfr = project(pfr); 1443 // FIXME avoid branching might help perf! 1444 if (inBounds(pfr)) { 1445 c += mix(vec4(0.0), getFromColor(pfr), reflection * mix(1.0, 0.0, pfr.y)); 1446 } 1447 pto = project(pto); 1448 if (inBounds(pto)) { 1449 c += mix(vec4(0.0), getToColor(pto), reflection * mix(1.0, 0.0, pto.y)); 1450 } 1451 return c; 1452} 1453 1454// p : the position 1455// persp : the perspective in [ 0, 1 ] 1456// center : the xcenter in [0, 1] \\ 0.5 excluded 1457vec2 xskew (vec2 p, float persp, float center) { 1458 float x = mix(p.x, 1.0-p.x, center); 1459 return ( 1460 ( 1461 vec2( x, (p.y - 0.5*(1.0-persp) * x) / (1.0+(persp-1.0)*x) ) 1462 - vec2(0.5-distance(center, 0.5), 0.0) 1463 ) 1464 * vec2(0.5 / distance(center, 0.5) * (center<0.5 ? 1.0 : -1.0), 1.0) 1465 + vec2(center<0.5 ? 0.0 : 1.0, 0.0) 1466 ); 1467} 1468 1469vec4 transition(vec2 op) { 1470 float uz = unzoom * 2.0*(0.5-distance(0.5, progress)); 1471 vec2 p = -uz*0.5+(1.0+uz) * op; 1472 vec2 fromP = xskew( 1473 (p - vec2(progress, 0.0)) / vec2(1.0-progress, 1.0), 1474 1.0-mix(progress, 0.0, persp), 1475 0.0 1476 ); 1477 vec2 toP = xskew( 1478 p / vec2(progress, 1.0), 1479 mix(pow(progress, 2.0), 1.0, persp), 1480 1.0 1481 ); 1482 // FIXME avoid branching might help perf! 1483 if (inBounds(fromP)) { 1484 return getFromColor(fromP); 1485 } 1486 else if (inBounds(toP)) { 1487 return getToColor(toP); 1488 } 1489 return bgColor(op, fromP, toP); 1490} 1491`,author:"gre",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Tue, 30 May 2017 14:26:44 +0200"},{name:"directionalwarp",paramsTypes:{direction:"vec2"},defaultParams:{direction:[-1,1]},glsl:`// Author: pschroen 1492// License: MIT 1493 1494uniform vec2 direction; // = vec2(-1.0, 1.0) 1495 1496const float smoothness = 0.5; 1497const vec2 center = vec2(0.5, 0.5); 1498 1499vec4 transition (vec2 uv) { 1500 vec2 v = normalize(direction); 1501 v /= abs(v.x) + abs(v.y); 1502 float d = v.x * center.x + v.y * center.y; 1503 float m = 1.0 - smoothstep(-smoothness, 0.0, v.x * uv.x + v.y * uv.y - (d - 0.5 + progress * (1.0 + smoothness))); 1504 return mix(getFromColor((uv - 0.5) * (1.0 - m) + 0.5), getToColor((uv - 0.5) * m + 0.5), m); 1505} 1506`,author:"pschroen",license:"MIT",createdAt:"Wed, 13 Dec 2017 12:08:49 -0500",updatedAt:"Wed, 13 Dec 2017 12:08:49 -0500"},{name:"directionalwipe",paramsTypes:{direction:"vec2",smoothness:"float"},defaultParams:{direction:[1,-1],smoothness:.5},glsl:`// Author: gre 1507// License: MIT 1508 1509uniform vec2 direction; // = vec2(1.0, -1.0) 1510uniform float smoothness; // = 0.5 1511 1512const vec2 center = vec2(0.5, 0.5); 1513 1514vec4 transition (vec2 uv) { 1515 vec2 v = normalize(direction); 1516 v /= abs(v.x)+abs(v.y); 1517 float d = v.x * center.x + v.y * center.y; 1518 float m = 1519 (1.0-step(progress, 0.0)) * // there is something wrong with our formula that makes m not equals 0.0 with progress is 0.0 1520 (1.0 - smoothstep(-smoothness, 0.0, v.x * uv.x + v.y * uv.y - (d-0.5+progress*(1.+smoothness)))); 1521 return mix(getFromColor(uv), getToColor(uv), m); 1522} 1523`,author:"gre",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Tue, 30 May 2017 14:26:44 +0200"},{name:"displacement",paramsTypes:{displacementMap:"sampler2D",strength:"float"},defaultParams:{displacementMap:null,strength:.5},glsl:`// Author: Travis Fischer 1524// License: MIT 1525// 1526// Adapted from a Codrops article by Robin Delaporte 1527// https://tympanus.net/Development/DistortionHoverEffect 1528 1529uniform sampler2D displacementMap; 1530 1531uniform float strength; // = 0.5 1532 1533vec4 transition (vec2 uv) { 1534 float displacement = texture2D(displacementMap, uv).r * strength; 1535 1536 vec2 uvFrom = vec2(uv.x + progress * displacement, uv.y); 1537 vec2 uvTo = vec2(uv.x - (1.0 - progress) * displacement, uv.y); 1538 1539 return mix( 1540 getFromColor(uvFrom), 1541 getToColor(uvTo), 1542 progress 1543 ); 1544} 1545`,author:"Travis Fischer",license:"MIT",createdAt:"Tue, 10 Apr 2018 23:03:38 -0400",updatedAt:"Tue, 10 Apr 2018 23:03:38 -0400"},{name:"doorway",paramsTypes:{reflection:"float",perspective:"float",depth:"float"},defaultParams:{reflection:.4,perspective:.4,depth:3},glsl:`// author: gre 1546// License: MIT 1547uniform float reflection; // = 0.4 1548uniform float perspective; // = 0.4 1549uniform float depth; // = 3 1550 1551const vec4 black = vec4(0.0, 0.0, 0.0, 1.0); 1552const vec2 boundMin = vec2(0.0, 0.0); 1553const vec2 boundMax = vec2(1.0, 1.0); 1554 1555bool inBounds (vec2 p) { 1556 return all(lessThan(boundMin, p)) && all(lessThan(p, boundMax)); 1557} 1558 1559vec2 project (vec2 p) { 1560 return p * vec2(1.0, -1.2) + vec2(0.0, -0.02); 1561} 1562 1563vec4 bgColor (vec2 p, vec2 pto) { 1564 vec4 c = black; 1565 pto = project(pto); 1566 if (inBounds(pto)) { 1567 c += mix(black, getToColor(pto), reflection * mix(1.0, 0.0, pto.y)); 1568 } 1569 return c; 1570} 1571 1572 1573vec4 transition (vec2 p) { 1574 vec2 pfr = vec2(-1.), pto = vec2(-1.); 1575 float middleSlit = 2.0 * abs(p.x-0.5) - progress; 1576 if (middleSlit > 0.0) { 1577 pfr = p + (p.x > 0.5 ? -1.0 : 1.0) * vec2(0.5*progress, 0.0); 1578 float d = 1.0/(1.0+perspective*progress*(1.0-middleSlit)); 1579 pfr.y -= d/2.; 1580 pfr.y *= d; 1581 pfr.y += d/2.; 1582 } 1583 float size = mix(1.0, depth, 1.-progress); 1584 pto = (p + vec2(-0.5, -0.5)) * vec2(size, size) + vec2(0.5, 0.5); 1585 if (inBounds(pfr)) { 1586 return getFromColor(pfr); 1587 } 1588 else if (inBounds(pto)) { 1589 return getToColor(pto); 1590 } 1591 else { 1592 return bgColor(p, pto); 1593 } 1594} 1595`,author:"gre",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Tue, 30 May 2017 14:26:44 +0200"},{name:"fade",paramsTypes:{},defaultParams:{},glsl:`// author: gre 1596// license: MIT 1597 1598vec4 transition (vec2 uv) { 1599 return mix( 1600 getFromColor(uv), 1601 getToColor(uv), 1602 progress 1603 ); 1604} 1605`,author:"gre",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Tue, 30 May 2017 14:26:44 +0200"},{name:"fadecolor",paramsTypes:{color:"vec3",colorPhase:"float"},defaultParams:{color:[0,0,0],colorPhase:.4},glsl:`// author: gre 1606// License: MIT 1607uniform vec3 color;// = vec3(0.0) 1608uniform float colorPhase/* = 0.4 */; // if 0.0, there is no black phase, if 0.9, the black phase is very important 1609vec4 transition (vec2 uv) { 1610 return mix( 1611 mix(vec4(color, 1.0), getFromColor(uv), smoothstep(1.0-colorPhase, 0.0, progress)), 1612 mix(vec4(color, 1.0), getToColor(uv), smoothstep( colorPhase, 1.0, progress)), 1613 progress); 1614} 1615`,author:"gre",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Tue, 30 May 2017 14:26:44 +0200"},{name:"fadegrayscale",paramsTypes:{intensity:"float"},defaultParams:{intensity:.3},glsl:`// Author: gre 1616// License: MIT 1617 1618uniform float intensity; // = 0.3; // if 0.0, the image directly turn grayscale, if 0.9, the grayscale transition phase is very important 1619 1620vec3 grayscale (vec3 color) { 1621 return vec3(0.2126*color.r + 0.7152*color.g + 0.0722*color.b); 1622} 1623 1624vec4 transition (vec2 uv) { 1625 vec4 fc = getFromColor(uv); 1626 vec4 tc = getToColor(uv); 1627 return mix( 1628 mix(vec4(grayscale(fc.rgb), 1.0), fc, smoothstep(1.0-intensity, 0.0, progress)), 1629 mix(vec4(grayscale(tc.rgb), 1.0), tc, smoothstep( intensity, 1.0, progress)), 1630 progress); 1631} 1632`,author:"gre",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Tue, 30 May 2017 14:26:44 +0200"},{name:"flyeye",paramsTypes:{size:"float",zoom:"float",colorSeparation:"float"},defaultParams:{size:.04,zoom:50,colorSeparation:.3},glsl:`// Author: gre 1633// License: MIT 1634uniform float size; // = 0.04 1635uniform float zoom; // = 50.0 1636uniform float colorSeparation; // = 0.3 1637 1638vec4 transition(vec2 p) { 1639 float inv = 1. - progress; 1640 vec2 disp = size*vec2(cos(zoom*p.x), sin(zoom*p.y)); 1641 vec4 texTo = getToColor(p + inv*disp); 1642 vec4 texFrom = vec4( 1643 getFromColor(p + progress*disp*(1.0 - colorSeparation)).r, 1644 getFromColor(p + progress*disp).g, 1645 getFromColor(p + progress*disp*(1.0 + colorSeparation)).b, 1646 1.0); 1647 return texTo*progress + texFrom*inv; 1648} 1649`,author:"gre",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Tue, 30 May 2017 14:26:44 +0200"},{name:"heart",paramsTypes:{},defaultParams:{},glsl:`// Author: gre 1650// License: MIT 1651 1652float inHeart (vec2 p, vec2 center, float size) { 1653 if (size==0.0) return 0.0; 1654 vec2 o = (p-center)/(1.6*size); 1655 float a = o.x*o.x+o.y*o.y-0.3; 1656 return step(a*a*a, o.x*o.x*o.y*o.y*o.y); 1657} 1658vec4 transition (vec2 uv) { 1659 return mix( 1660 getFromColor(uv), 1661 getToColor(uv), 1662 inHeart(uv, vec2(0.5, 0.4), progress) 1663 ); 1664} 1665`,author:"gre",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Tue, 30 May 2017 14:26:44 +0200"},{name:"hexagonalize",paramsTypes:{steps:"int",horizontalHexagons:"float"},defaultParams:{steps:50,horizontalHexagons:20},glsl:`// Author: Fernando Kuteken 1666// License: MIT 1667// Hexagonal math from: http://www.redblobgames.com/grids/hexagons/ 1668 1669uniform int steps; // = 50; 1670uniform float horizontalHexagons; //= 20; 1671 1672struct Hexagon { 1673 float q; 1674 float r; 1675 float s; 1676}; 1677 1678Hexagon createHexagon(float q, float r){ 1679 Hexagon hex; 1680 hex.q = q; 1681 hex.r = r; 1682 hex.s = -q - r; 1683 return hex; 1684} 1685 1686Hexagon roundHexagon(Hexagon hex){ 1687 1688 float q = floor(hex.q + 0.5); 1689 float r = floor(hex.r + 0.5); 1690 float s = floor(hex.s + 0.5); 1691 1692 float deltaQ = abs(q - hex.q); 1693 float deltaR = abs(r - hex.r); 1694 float deltaS = abs(s - hex.s); 1695 1696 if (deltaQ > deltaR && deltaQ > deltaS) 1697 q = -r - s; 1698 else if (deltaR > deltaS) 1699 r = -q - s; 1700 else 1701 s = -q - r; 1702 1703 return createHexagon(q, r); 1704} 1705 1706Hexagon hexagonFromPoint(vec2 point, float size) { 1707 1708 point.y /= ratio; 1709 point = (point - 0.5) / size; 1710 1711 float q = (sqrt(3.0) / 3.0) * point.x + (-1.0 / 3.0) * point.y; 1712 float r = 0.0 * point.x + 2.0 / 3.0 * point.y; 1713 1714 Hexagon hex = createHexagon(q, r); 1715 return roundHexagon(hex); 1716 1717} 1718 1719vec2 pointFromHexagon(Hexagon hex, float size) { 1720 1721 float x = (sqrt(3.0) * hex.q + (sqrt(3.0) / 2.0) * hex.r) * size + 0.5; 1722 float y = (0.0 * hex.q + (3.0 / 2.0) * hex.r) * size + 0.5; 1723 1724 return vec2(x, y * ratio); 1725} 1726 1727vec4 transition (vec2 uv) { 1728 1729 float dist = 2.0 * min(progress, 1.0 - progress); 1730 dist = steps > 0 ? ceil(dist * float(steps)) / float(steps) : dist; 1731 1732 float size = (sqrt(3.0) / 3.0) * dist / horizontalHexagons; 1733 1734 vec2 point = dist > 0.0 ? pointFromHexagon(hexagonFromPoint(uv, size), size) : uv; 1735 1736 return mix(getFromColor(point), getToColor(point), progress); 1737 1738} 1739`,author:"Fernando Kuteken",license:"MIT",createdAt:"Tue, 30 May 2017 21:55:47 -0300",updatedAt:"Tue, 30 May 2017 21:55:47 -0300"},{name:"kaleidoscope",paramsTypes:{speed:"float",angle:"float",power:"float"},defaultParams:{speed:1,angle:1,power:1.5},glsl:`// Author: nwoeanhinnogaehr 1740// License: MIT 1741 1742uniform float speed; // = 1.0; 1743uniform float angle; // = 1.0; 1744uniform float power; // = 1.5; 1745 1746vec4 transition(vec2 uv) { 1747 vec2 p = uv.xy / vec2(1.0).xy; 1748 vec2 q = p; 1749 float t = pow(progress, power)*speed; 1750 p = p -0.5; 1751 for (int i = 0; i < 7; i++) { 1752 p = vec2(sin(t)*p.x + cos(t)*p.y, sin(t)*p.y - cos(t)*p.x); 1753 t += angle; 1754 p = abs(mod(p, 2.0) - 1.0); 1755 } 1756 abs(mod(p, 1.0)); 1757 return mix( 1758 mix(getFromColor(q), getToColor(q), progress), 1759 mix(getFromColor(p), getToColor(p), progress), 1.0 - 2.0*abs(progress - 0.5)); 1760} 1761`,author:"nwoeanhinnogaehr",license:"MIT",createdAt:"Wed, 31 May 2017 21:48:26 -0400",updatedAt:"Wed, 31 May 2017 21:48:26 -0400"},{name:"luma",paramsTypes:{luma:"sampler2D"},defaultParams:{luma:null},glsl:`// Author: gre 1762// License: MIT 1763 1764uniform sampler2D luma; 1765 1766vec4 transition(vec2 uv) { 1767 return mix( 1768 getToColor(uv), 1769 getFromColor(uv), 1770 step(progress, texture2D(luma, uv).r) 1771 ); 1772} 1773`,author:"gre",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Tue, 30 May 2017 14:26:44 +0200"},{name:"luminance_melt",paramsTypes:{direction:"bool",l_threshold:"float",above:"bool"},defaultParams:{direction:!0,l_threshold:.8,above:!1},glsl:`// Author: 0gust1 1774// License: MIT 1775//My own first transition
1775\u2014
vendor: 19,467 bytes, lines 1775-2335
1775 based on crosshatch code (from pthrasher), using simplex noise formula (copied and pasted) 1776//-> cooler with high contrasted images (isolated dark subject on light background f.e.) 1777//TODO : try to rebase it on DoomTransition (from zeh)? 1778//optimizations : 1779//luminance (see http://stackoverflow.com/questions/596216/formula-to-determine-brightness-of-rgb-color#answer-596241) 1780// Y = (R+R+B+G+G+G)/6 1781//or Y = (R+R+R+B+G+G+G+G)>>3 1782 1783 1784//direction of movement : 0 : up, 1, down 1785uniform bool direction; // = 1 1786//luminance threshold 1787uniform float l_threshold; // = 0.8 1788//does the movement takes effect above or below luminance threshold ? 1789uniform bool above; // = false 1790 1791 1792//Random function borrowed from everywhere 1793float rand(vec2 co){ 1794 return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); 1795} 1796 1797 1798// Simplex noise : 1799// Description : Array and textureless GLSL 2D simplex noise function. 1800// Author : Ian McEwan, Ashima Arts. 1801// Maintainer : ijm 1802// Lastmod : 20110822 (ijm) 1803// License : MIT 1804// 2011 Ashima Arts. All rights reserved. 1805// Distributed under the MIT License. See LICENSE file. 1806// https://github.com/ashima/webgl-noise 1807// 1808 1809vec3 mod289(vec3 x) { 1810 return x - floor(x * (1.0 / 289.0)) * 289.0; 1811} 1812 1813vec2 mod289(vec2 x) { 1814 return x - floor(x * (1.0 / 289.0)) * 289.0; 1815} 1816 1817vec3 permute(vec3 x) { 1818 return mod289(((x*34.0)+1.0)*x); 1819} 1820 1821float snoise(vec2 v) 1822 { 1823 const vec4 C = vec4(0.211324865405187, // (3.0-sqrt(3.0))/6.0 1824 0.366025403784439, // 0.5*(sqrt(3.0)-1.0) 1825 -0.577350269189626, // -1.0 + 2.0 * C.x 1826 0.024390243902439); // 1.0 / 41.0 1827// First corner 1828 vec2 i = floor(v + dot(v, C.yy) ); 1829 vec2 x0 = v - i + dot(i, C.xx); 1830 1831// Other corners 1832 vec2 i1; 1833 //i1.x = step( x0.y, x0.x ); // x0.x > x0.y ? 1.0 : 0.0 1834 //i1.y = 1.0 - i1.x; 1835 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0); 1836 // x0 = x0 - 0.0 + 0.0 * C.xx ; 1837 // x1 = x0 - i1 + 1.0 * C.xx ; 1838 // x2 = x0 - 1.0 + 2.0 * C.xx ; 1839 vec4 x12 = x0.xyxy + C.xxzz; 1840 x12.xy -= i1; 1841 1842// Permutations 1843 i = mod289(i); // Avoid truncation effects in permutation 1844 vec3 p = permute( permute( i.y + vec3(0.0, i1.y, 1.0 )) 1845 + i.x + vec3(0.0, i1.x, 1.0 )); 1846 1847 vec3 m = max(0.5 - vec3(dot(x0,x0), dot(x12.xy,x12.xy), dot(x12.zw,x12.zw)), 0.0); 1848 m = m*m ; 1849 m = m*m ; 1850 1851// Gradients: 41 points uniformly over a line, mapped onto a diamond. 1852// The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287) 1853 1854 vec3 x = 2.0 * fract(p * C.www) - 1.0; 1855 vec3 h = abs(x) - 0.5; 1856 vec3 ox = floor(x + 0.5); 1857 vec3 a0 = x - ox; 1858 1859// Normalise gradients implicitly by scaling m 1860// Approximation of: m *= inversesqrt( a0*a0 + h*h ); 1861 m *= 1.79284291400159 - 0.85373472095314 * ( a0*a0 + h*h ); 1862 1863// Compute final noise value at P 1864 vec3 g; 1865 g.x = a0.x * x0.x + h.x * x0.y; 1866 g.yz = a0.yz * x12.xz + h.yz * x12.yw; 1867 return 130.0 * dot(m, g); 1868} 1869 1870// Simplex noise -- end 1871 1872float luminance(vec4 color){ 1873 //(0.299*R + 0.587*G + 0.114*B) 1874 return color.r*0.299+color.g*0.587+color.b*0.114; 1875} 1876 1877vec2 center = vec2(1.0, direction); 1878 1879vec4 transition(vec2 uv) { 1880 vec2 p = uv.xy / vec2(1.0).xy; 1881 if (progress == 0.0) { 1882 return getFromColor(p); 1883 } else if (progress == 1.0) { 1884 return getToColor(p); 1885 } else { 1886 float x = progress; 1887 float dist = distance(center, p)- progress*exp(snoise(vec2(p.x, 0.0))); 1888 float r = x - rand(vec2(p.x, 0.1)); 1889 float m; 1890 if(above){ 1891 m = dist <= r && luminance(getFromColor(p))>l_threshold ? 1.0 : (progress*progress*progress); 1892 } 1893 else{ 1894 m = dist <= r && luminance(getFromColor(p))<l_threshold ? 1.0 : (progress*progress*progress); 1895 } 1896 return mix(getFromColor(p), getToColor(p), m); 1897 } 1898} 1899`,author:"0gust1",license:"MIT",createdAt:"Wed, 24 Jan 2018 19:02:32 +0100",updatedAt:"Wed, 24 Jan 2018 19:02:32 +0100"},{name:"morph",paramsTypes:{strength:"float"},defaultParams:{strength:.1},glsl:`// Author: paniq 1900// License: MIT 1901uniform float strength; // = 0.1 1902 1903vec4 transition(vec2 p) { 1904 vec4 ca = getFromColor(p); 1905 vec4 cb = getToColor(p); 1906 1907 vec2 oa = (((ca.rg+ca.b)*0.5)*2.0-1.0); 1908 vec2 ob = (((cb.rg+cb.b)*0.5)*2.0-1.0); 1909 vec2 oc = mix(oa,ob,0.5)*strength; 1910 1911 float w0 = progress; 1912 float w1 = 1.0-w0; 1913 return mix(getFromColor(p+oc*w0), getToColor(p-oc*w1), progress); 1914} 1915`,author:"paniq",license:"MIT",createdAt:"Thu, 10 Aug 2017 00:27:36 +0200",updatedAt:"Thu, 10 Aug 2017 00:32:01 +0200"},{name:"multiply_blend",paramsTypes:{},defaultParams:{},glsl:`// Author: Fernando Kuteken 1916// License: MIT 1917 1918vec4 blend(vec4 a, vec4 b) { 1919 return a * b; 1920} 1921 1922vec4 transition (vec2 uv) { 1923 1924 vec4 blended = blend(getFromColor(uv), getToColor(uv)); 1925 1926 if (progress < 0.5) 1927 return mix(getFromColor(uv), blended, 2.0 * progress); 1928 else 1929 return mix(blended, getToColor(uv), 2.0 * progress - 1.0); 1930} 1931 1932`,author:"Fernando Kuteken",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Tue, 30 May 2017 14:26:44 +0200"},{name:"perlin",paramsTypes:{scale:"float",smoothness:"float",seed:"float"},defaultParams:{scale:4,smoothness:.01,seed:12.9898},glsl:`// Author: Rich Harris 1933// License: MIT 1934 1935#ifdef GL_ES 1936precision mediump float; 1937#endif 1938 1939uniform float scale; // = 4.0 1940uniform float smoothness; // = 0.01 1941 1942uniform float seed; // = 12.9898 1943 1944// http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/ 1945float random(vec2 co) 1946{ 1947 highp float a = seed; 1948 highp float b = 78.233; 1949 highp float c = 43758.5453; 1950 highp float dt= dot(co.xy ,vec2(a,b)); 1951 highp float sn= mod(dt,3.14); 1952 return fract(sin(sn) * c); 1953} 1954 1955// 2D Noise based on Morgan McGuire @morgan3d 1956// https://www.shadertoy.com/view/4dS3Wd 1957float noise (in vec2 st) { 1958 vec2 i = floor(st); 1959 vec2 f = fract(st); 1960 1961 // Four corners in 2D of a tile 1962 float a = random(i); 1963 float b = random(i + vec2(1.0, 0.0)); 1964 float c = random(i + vec2(0.0, 1.0)); 1965 float d = random(i + vec2(1.0, 1.0)); 1966 1967 // Smooth Interpolation 1968 1969 // Cubic Hermine Curve. Same as SmoothStep() 1970 vec2 u = f*f*(3.0-2.0*f); 1971 // u = smoothstep(0.,1.,f); 1972 1973 // Mix 4 coorners porcentages 1974 return mix(a, b, u.x) + 1975 (c - a)* u.y * (1.0 - u.x) + 1976 (d - b) * u.x * u.y; 1977} 1978 1979vec4 transition (vec2 uv) { 1980 vec4 from = getFromColor(uv); 1981 vec4 to = getToColor(uv); 1982 float n = noise(uv * scale); 1983 1984 float p = mix(-smoothness, 1.0 + smoothness, progress); 1985 float lower = p - smoothness; 1986 float higher = p + smoothness; 1987 1988 float q = smoothstep(lower, higher, n); 1989 1990 return mix( 1991 from, 1992 to, 1993 1.0 - q 1994 ); 1995} 1996`,author:"Rich Harris",license:"MIT",createdAt:"Tue, 23 Jan 2018 21:35:10 -0500",updatedAt:"Wed, 24 Jan 2018 07:35:04 -0500"},{name:"pinwheel",paramsTypes:{speed:"float"},defaultParams:{speed:2},glsl:`// Author: Mr Speaker 1997// License: MIT 1998 1999uniform float speed; // = 2.0; 2000 2001vec4 transition(vec2 uv) { 2002 2003 vec2 p = uv.xy / vec2(1.0).xy; 2004 2005 float circPos = atan(p.y - 0.5, p.x - 0.5) + progress * speed; 2006 float modPos = mod(circPos, 3.1415 / 4.); 2007 float signed = sign(progress - modPos); 2008 2009 return mix(getToColor(p), getFromColor(p), step(signed, 0.5)); 2010 2011} 2012`,author:"Mr Speaker",license:"MIT",createdAt:"Tue, 30 May 2017 09:04:31 -0400",updatedAt:"Tue, 30 May 2017 09:04:31 -0400"},{name:"pixelize",paramsTypes:{squaresMin:"ivec2",steps:"int"},defaultParams:{squaresMin:[20,20],steps:50},glsl:`// Author: gre 2013// License: MIT 2014// forked from https://gist.github.com/benraziel/c528607361d90a072e98 2015 2016uniform ivec2 squaresMin/* = ivec2(20) */; // minimum number of squares (when the effect is at its higher level) 2017uniform int steps /* = 50 */; // zero disable the stepping 2018 2019float d = min(progress, 1.0 - progress); 2020float dist = steps>0 ? ceil(d * float(steps)) / float(steps) : d; 2021vec2 squareSize = 2.0 * dist / vec2(squaresMin); 2022 2023vec4 transition(vec2 uv) { 2024 vec2 p = dist>0.0 ? (floor(uv / squareSize) + 0.5) * squareSize : uv; 2025 return mix(getFromColor(p), getToColor(p), progress); 2026} 2027`,author:"gre",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Wed, 31 May 2017 10:58:26 +0200"},{name:"polar_function",paramsTypes:{segments:"int"},defaultParams:{segments:5},glsl:`// Author: Fernando Kuteken 2028// License: MIT 2029 2030#define PI 3.14159265359 2031 2032uniform int segments; // = 5; 2033 2034vec4 transition (vec2 uv) { 2035 2036 float angle = atan(uv.y - 0.5, uv.x - 0.5) - 0.5 * PI; 2037 float normalized = (angle + 1.5 * PI) * (2.0 * PI); 2038 2039 float radius = (cos(float(segments) * angle) + 4.0) / 4.0; 2040 float difference = length(uv - vec2(0.5, 0.5)); 2041 2042 if (difference > radius * progress) 2043 return getFromColor(uv); 2044 else 2045 return getToColor(uv); 2046} 2047`,author:"Fernando Kuteken",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Tue, 30 May 2017 14:26:44 +0200"},{name:"randomsquares",paramsTypes:{size:"ivec2",smoothness:"float"},defaultParams:{size:[10,10],smoothness:.5},glsl:`// Author: gre 2048// License: MIT 2049 2050uniform ivec2 size; // = ivec2(10, 10) 2051uniform float smoothness; // = 0.5 2052 2053float rand (vec2 co) { 2054 return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); 2055} 2056 2057vec4 transition(vec2 p) { 2058 float r = rand(floor(vec2(size) * p)); 2059 float m = smoothstep(0.0, -smoothness, r - (progress * (1.0 + smoothness))); 2060 return mix(getFromColor(p), getToColor(p), m); 2061} 2062`,author:"gre",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Tue, 30 May 2017 14:26:44 +0200"},{name:"ripple",paramsTypes:{amplitude:"float",speed:"float"},defaultParams:{amplitude:100,speed:50},glsl:`// Author: gre 2063// License: MIT 2064uniform float amplitude; // = 100.0 2065uniform float speed; // = 50.0 2066 2067vec4 transition (vec2 uv) { 2068 vec2 dir = uv - vec2(.5); 2069 float dist = length(dir); 2070 vec2 offset = dir * (sin(progress * dist * amplitude - progress * speed) + .5) / 30.; 2071 return mix( 2072 getFromColor(uv + offset), 2073 getToColor(uv), 2074 smoothstep(0.2, 1.0, progress) 2075 ); 2076} 2077`,author:"gre",license:"MIT",createdAt:"Tue, 30 May 2017 15:15:27 +0200",updatedAt:"Tue, 30 May 2017 15:15:27 +0200"},{name:"rotate_scale_fade",paramsTypes:{center:"vec2",rotations:"float",scale:"float",backColor:"vec4"},defaultParams:{center:[.5,.5],rotations:1,scale:8,backColor:[.15,.15,.15,1]},glsl:`// Author: Fernando Kuteken 2078// License: MIT 2079 2080#define PI 3.14159265359 2081 2082uniform vec2 center; // = vec2(0.5, 0.5); 2083uniform float rotations; // = 1; 2084uniform float scale; // = 8; 2085uniform vec4 backColor; // = vec4(0.15, 0.15, 0.15, 1.0); 2086 2087vec4 transition (vec2 uv) { 2088 2089 vec2 difference = uv - center; 2090 vec2 dir = normalize(difference); 2091 float dist = length(difference); 2092 2093 float angle = 2.0 * PI * rotations * progress; 2094 2095 float c = cos(angle); 2096 float s = sin(angle); 2097 2098 float currentScale = mix(scale, 1.0, 2.0 * abs(progress - 0.5)); 2099 2100 vec2 rotatedDir = vec2(dir.x * c - dir.y * s, dir.x * s + dir.y * c); 2101 vec2 rotatedUv = center + rotatedDir * dist / currentScale; 2102 2103 if (rotatedUv.x < 0.0 || rotatedUv.x > 1.0 || 2104 rotatedUv.y < 0.0 || rotatedUv.y > 1.0) 2105 return backColor; 2106 2107 return mix(getFromColor(rotatedUv), getToColor(rotatedUv), progress); 2108} 2109`,author:"Fernando Kuteken",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Tue, 30 May 2017 14:26:44 +0200"},{name:"squareswire",paramsTypes:{squares:"ivec2",direction:"vec2",smoothness:"float"},defaultParams:{squares:[10,10],direction:[1,-.5],smoothness:1.6},glsl:`// Author: gre 2110// License: MIT 2111 2112uniform ivec2 squares;// = ivec2(10,10) 2113uniform vec2 direction;// = vec2(1.0, -0.5) 2114uniform float smoothness; // = 1.6 2115 2116const vec2 center = vec2(0.5, 0.5); 2117vec4 transition (vec2 p) { 2118 vec2 v = normalize(direction); 2119 v /= abs(v.x)+abs(v.y); 2120 float d = v.x * center.x + v.y * center.y; 2121 float offset = smoothness; 2122 float pr = smoothstep(-offset, 0.0, v.x * p.x + v.y * p.y - (d-0.5+progress*(1.+offset))); 2123 vec2 squarep = fract(p*vec2(squares)); 2124 vec2 squaremin = vec2(pr/2.0); 2125 vec2 squaremax = vec2(1.0 - pr/2.0); 2126 float a = (1.0 - step(progress, 0.0)) * step(squaremin.x, squarep.x) * step(squaremin.y, squarep.y) * step(squarep.x, squaremax.x) * step(squarep.y, squaremax.y); 2127 return mix(getFromColor(p), getToColor(p), a); 2128} 2129`,author:"gre",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Tue, 30 May 2017 14:26:44 +0200"},{name:"squeeze",paramsTypes:{colorSeparation:"float"},defaultParams:{colorSeparation:.04},glsl:`// Author: gre 2130// License: MIT 2131 2132uniform float colorSeparation; // = 0.04 2133 2134vec4 transition (vec2 uv) { 2135 float y = 0.5 + (uv.y-0.5) / (1.0-progress); 2136 if (y < 0.0 || y > 1.0) { 2137 return getToColor(uv); 2138 } 2139 else { 2140 vec2 fp = vec2(uv.x, y); 2141 vec2 off = progress * vec2(0.0, colorSeparation); 2142 vec4 c = getFromColor(fp); 2143 vec4 cn = getFromColor(fp - off); 2144 vec4 cp = getFromColor(fp + off); 2145 return vec4(cn.r, c.g, cp.b, c.a); 2146 } 2147} 2148`,author:"gre",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Tue, 30 May 2017 14:26:44 +0200"},{name:"swap",paramsTypes:{reflection:"float",perspective:"float",depth:"float"},defaultParams:{reflection:.4,perspective:.2,depth:3},glsl:`// Author: gre 2149// License: MIT 2150// General parameters 2151uniform float reflection; // = 0.4 2152uniform float perspective; // = 0.2 2153uniform float depth; // = 3.0 2154 2155const vec4 black = vec4(0.0, 0.0, 0.0, 1.0); 2156const vec2 boundMin = vec2(0.0, 0.0); 2157const vec2 boundMax = vec2(1.0, 1.0); 2158 2159bool inBounds (vec2 p) { 2160 return all(lessThan(boundMin, p)) && all(lessThan(p, boundMax)); 2161} 2162 2163vec2 project (vec2 p) { 2164 return p * vec2(1.0, -1.2) + vec2(0.0, -0.02); 2165} 2166 2167vec4 bgColor (vec2 p, vec2 pfr, vec2 pto) { 2168 vec4 c = black; 2169 pfr = project(pfr); 2170 if (inBounds(pfr)) { 2171 c += mix(black, getFromColor(pfr), reflection * mix(1.0, 0.0, pfr.y)); 2172 } 2173 pto = project(pto); 2174 if (inBounds(pto)) { 2175 c += mix(black, getToColor(pto), reflection * mix(1.0, 0.0, pto.y)); 2176 } 2177 return c; 2178} 2179 2180vec4 transition(vec2 p) { 2181 vec2 pfr, pto = vec2(-1.); 2182 2183 float size = mix(1.0, depth, progress); 2184 float persp = perspective * progress; 2185 pfr = (p + vec2(-0.0, -0.5)) * vec2(size/(1.0-perspective*progress), size/(1.0-size*persp*p.x)) + vec2(0.0, 0.5); 2186 2187 size = mix(1.0, depth, 1.-progress); 2188 persp = perspective * (1.-progress); 2189 pto = (p + vec2(-1.0, -0.5)) * vec2(size/(1.0-perspective*(1.0-progress)), size/(1.0-size*persp*(0.5-p.x))) + vec2(1.0, 0.5); 2190 2191 if (progress < 0.5) { 2192 if (inBounds(pfr)) { 2193 return getFromColor(pfr); 2194 } 2195 if (inBounds(pto)) { 2196 return getToColor(pto); 2197 } 2198 } 2199 if (inBounds(pto)) { 2200 return getToColor(pto); 2201 } 2202 if (inBounds(pfr)) { 2203 return getFromColor(pfr); 2204 } 2205 return bgColor(p, pfr, pto); 2206} 2207`,author:"gre",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Sun, 18 Feb 2018 17:45:50 +0100"},{name:"undulatingBurnOut",paramsTypes:{smoothness:"float",center:"vec2",color:"vec3"},defaultParams:{smoothness:.03,center:[.5,.5],color:[0,0,0]},glsl:`// License: MIT 2208// Author: pthrasher 2209// adapted by gre from https://gist.github.com/pthrasher/8e6226b215548ba12734 2210 2211uniform float smoothness; // = 0.03 2212uniform vec2 center; // = vec2(0.5) 2213uniform vec3 color; // = vec3(0.0) 2214 2215const float M_PI = 3.14159265358979323846; 2216 2217float quadraticInOut(float t) { 2218 float p = 2.0 * t * t; 2219 return t < 0.5 ? p : -p + (4.0 * t) - 1.0; 2220} 2221 2222float getGradient(float r, float dist) { 2223 float d = r - dist; 2224 return mix( 2225 smoothstep(-smoothness, 0.0, r - dist * (1.0 + smoothness)), 2226 -1.0 - step(0.005, d), 2227 step(-0.005, d) * step(d, 0.01) 2228 ); 2229} 2230 2231float getWave(vec2 p){ 2232 vec2 _p = p - center; // offset from center 2233 float rads = atan(_p.y, _p.x); 2234 float degs = degrees(rads) + 180.0; 2235 vec2 range = vec2(0.0, M_PI * 30.0); 2236 vec2 domain = vec2(0.0, 360.0); 2237 float ratio = (M_PI * 30.0) / 360.0; 2238 degs = degs * ratio; 2239 float x = progress; 2240 float magnitude = mix(0.02, 0.09, smoothstep(0.0, 1.0, x)); 2241 float offset = mix(40.0, 30.0, smoothstep(0.0, 1.0, x)); 2242 float ease_degs = quadraticInOut(sin(degs)); 2243 float deg_wave_pos = (ease_degs * magnitude) * sin(x * offset); 2244 return x + deg_wave_pos; 2245} 2246 2247vec4 transition(vec2 p) { 2248 float dist = distance(center, p); 2249 float m = getGradient(getWave(p), dist); 2250 vec4 cfrom = getFromColor(p); 2251 vec4 cto = getToColor(p); 2252 return mix(mix(cfrom, cto, m), mix(cfrom, vec4(color, 1.0), 0.75), step(m, -2.0)); 2253} 2254`,license:"MIT",author:"pthrasher",createdAt:"Mon, 12 Jun 2017 10:23:37 +0800",updatedAt:"Mon, 12 Jun 2017 10:23:37 +0800"},{name:"wind",paramsTypes:{size:"float"},defaultParams:{size:.2},glsl:`// Author: gre 2255// License: MIT 2256 2257// Custom parameters 2258uniform float size; // = 0.2 2259 2260float rand (vec2 co) { 2261 return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); 2262} 2263 2264vec4 transition (vec2 uv) { 2265 float r = rand(vec2(0, uv.y)); 2266 float m = smoothstep(0.0, -size, uv.x*(1.0-size) + size*r - (progress * (1.0 + size))); 2267 return mix( 2268 getFromColor(uv), 2269 getToColor(uv), 2270 m 2271 ); 2272} 2273`,author:"gre",license:"MIT",createdAt:"Tue, 30 May 2017 14:26:44 +0200",updatedAt:"Tue, 30 May 2017 14:26:44 +0200"},{name:"windowblinds",paramsTypes:{},defaultParams:{},glsl:`// Author: Fabien Benetou 2274// License: MIT 2275 2276vec4 transition (vec2 uv) { 2277 float t = progress; 2278 2279 if (mod(floor(uv.y*100.*progress),2.)==0.) 2280 t*=2.-.5; 2281 2282 return mix( 2283 getFromColor(uv), 2284 getToColor(uv), 2285 mix(t, progress, smoothstep(0.8, 1.0, progress)) 2286 ); 2287} 2288`,author:"Fabien Benetou",license:"MIT",createdAt:"Wed, 31 May 2017 14:11:48 +0200",updatedAt:"Wed, 31 May 2017 14:11:48 +0200"},{name:"windowslice",paramsTypes:{count:"float",smoothness:"float"},defaultParams:{count:10,smoothness:.5},glsl:`// Author: gre 2289// License: MIT 2290 2291uniform float count; // = 10.0 2292uniform float smoothness; // = 0.5 2293 2294vec4 transition (vec2 p) { 2295 float pr = smoothstep(-smoothness, 0.0, p.x - progress * (1.0 + smoothness)); 2296 float s = step(pr, fract(count * p.x)); 2297 return mix(getFromColor(p), getToColor(p), s); 2298} 2299`,author:"gre",license:"MIT",createdAt:"Wed, 28 Mar 2018 17:23:26 +0200",updatedAt:"Wed, 28 Mar 2018 17:23:26 +0200"},{name:"wipeDown",paramsTypes:{},defaultParams:{},glsl:`// Author: Jake Nelson 2300// License: MIT 2301 2302vec4 transition(vec2 uv) { 2303 vec2 p=uv.xy/vec2(1.0).xy; 2304 vec4 a=getFromColor(p); 2305 vec4 b=getToColor(p); 2306 return mix(a, b, step(1.0-p.y,progress)); 2307} 2308`,author:"Jake Nelson",license:"MIT",createdAt:"Wed, 1 Nov 2017 15:26:01 -0500",updatedAt:"Thu, 2 Nov 2017 18:39:26 -0500"},{name:"wipeLeft",paramsTypes:{},defaultParams:{},glsl:`// Author: Jake Nelson 2309// License: MIT 2310 2311vec4 transition(vec2 uv) { 2312 vec2 p=uv.xy/vec2(1.0).xy; 2313 vec4 a=getFromColor(p); 2314 vec4 b=getToColor(p); 2315 return mix(a, b, step(1.0-p.x,progress)); 2316} 2317`,author:"Jake Nelson",license:"MIT",createdAt:"Wed, 1 Nov 2017 15:26:28 -0500",updatedAt:"Fri, 3 Nov 2017 18:03:50 +0100"},{name:"wipeRight",paramsTypes:{},defaultParams:{},glsl:`// Author: Jake Nelson 2318// License: MIT 2319 2320vec4 transition(vec2 uv) { 2321 vec2 p=uv.xy/vec2(1.0).xy; 2322 vec4 a=getFromColor(p); 2323 vec4 b=getToColor(p); 2324 return mix(a, b, step(0.0+p.x,progress)); 2325} 2326`,author:"Jake Nelson",license:"MIT",createdAt:"Wed, 1 Nov 2017 15:27:02 -0500",updatedAt:"Thu, 2 Nov 2017 18:40:22 -0500"},{name:"wipeUp",paramsTypes:{},defaultParams:{},glsl:`// Author: Jake Nelson 2327// License: MIT 2328 2329vec4 transition(vec2 uv) { 2330 vec2 p=uv.xy/vec2(1.0).xy; 2331 vec4 a=getFromColor(p); 2332 vec4 b=getToColor(p); 2333 return mix(a, b, step(0.0+p.y,progress)); 2334} 2335`,author:"Jake Nelson",license:"MIT",createdAt:"Wed, 1 Nov 2017 15:24:36 -0500",updatedAt:"Thu, 2 Nov 2017 18:37:42 -0500"}]
2335});var Ms=Q((Sj,wf)=>{"use strict";wf.exports=ly;function ly(e,t){for(var r={},n=0;n<e.length;++n)for(var o=e[n].name,a=o.split("."),i=r,l=0;l<a.length;++l){var c=a[l].split("[");if(c.length>1){c[0]in i||(i[c[0]]=[]),i=i[c[0]];for(var s=1;s<c.length;++s){var u=parseInt(c[s]);s<c.length-1||l<a.length-1?(u in i||(s<c.length-1?i[u]=[]:i[u]={}),i=i[u]):t?i[u]=n:i[u]=e[n].type}}else l<a.length-1?(c[0]in i||(i[c[0]]={}),i=i[c[0]]):t?i[c[0]]=n:i[c[0]]=e[n].type}return r}});var qn=Q((Mj,bf)=>{function Hn(e,t,r){this.shortMessage=t||"",this.longMessage=r||"",this.rawError=e||"",this.message="gl-shader: "+(t||e||"")+(r?` 2336`+r:""),this.stack=new Error().stack}Hn.prototype=new Error;Hn.prototype.name="GLError";Hn.prototype.constructor=Hn;bf.exports=Hn});var Ef=Q((Pj,Tf)=>{"use strict";var uy=Ms(),pr=qn();Tf.exports=cy;function xf(e){return function(){return e}}function Ps(e,t){for(var r=new Array(e),n=0;n<e;++n)r[n]=t;return r}function cy(e,t,r,n){function o(f){return function(d,p,m){return d.getUniform(p.program,m[f])}}function a(f){return function(p){for(var m=i("",f),w=0;w<m.length;++w){var y=m[w],I=y[0],j=y[1];if(n[j]){var q=p;
vendor: 9,191 bytes, line 2336
2336if(typeof I=="string"&&(I.indexOf(".")===0||I.indexOf("[")===0)){var F=I;if(I.indexOf(".")===0&&(F=I.slice(1)),F.indexOf("]")===F.length-1){var N=F.indexOf("["),L=F.slice(0,N),W=F.slice(N+1,F.length-1);q=L?p[L][W]:p[W]}else q=p[F]}var B=r[j].type,U;switch(B){case"bool":case"int":case"sampler2D":case"samplerCube":e.uniform1i(n[j],q);break;case"float":e.uniform1f(n[j],q);break;default:var ie=B.indexOf("vec");if(0<=ie&&ie<=1&&B.length===4+ie){if(U=B.charCodeAt(B.length-1)-48,U<2||U>4)throw new pr("","Invalid data type");switch(B.charAt(0)){case"b":case"i":e["uniform"+U+"iv"](n[j],q);break;case"v":e["uniform"+U+"fv"](n[j],q);break;default:throw new pr("","Unrecognized data type for vector "+name+": "+B)}}else if(B.indexOf("mat")===0&&B.length===4){if(U=B.charCodeAt(B.length-1)-48,U<2||U>4)throw new pr("","Invalid uniform dimension type for matrix "+name+": "+B);e["uniformMatrix"+U+"fv"](n[j],!1,q);break}else throw new pr("","Unknown uniform data type for "+name+": "+B)}}}}}function i(f,d){if(typeof d!="object")return[[f,d]];var p=[];for(var m in d){var w=d[m],y=f;parseInt(m)+""===m?y+="["+m+"]":y+="."+m,typeof w=="object"?p.push.apply(p,i(y,w)):p.push([y,w])}return p}function l(f){switch(f){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var d=f.indexOf("vec");if(0<=d&&d<=1&&f.length===4+d){var p=f.charCodeAt(f.length-1)-48;if(p<2||p>4)throw new pr("","Invalid data type");return f.charAt(0)==="b"?Ps(p,!1):Ps(p,0)}else if(f.indexOf("mat")===0&&f.length===4){var p=f.charCodeAt(f.length-1)-48;if(p<2||p>4)throw new pr("","Invalid uniform dimension type for matrix "+name+": "+f);return Ps(p*p,0)}else throw new pr("","Unknown uniform data type for "+name+": "+f)}}function c(f,d,p){if(typeof p=="object"){var m=s(p);Object.defineProperty(f,d,{get:xf(m),set:a(p),enumerable:!0,configurable:!1})}else n[p]?Object.defineProperty(f,d,{get:o(p),set:a(p),enumerable:!0,configurable:!1}):f[d]=l(r[p].type)}function s(f){var d;if(Array.isArray(f)){d=new Array(f.length);for(var p=0;p<f.length;++p)c(d,p,f[p])}else{d={};for(var m in f)c(d,m,f[m])}return d}var u=uy(r,!0);return{get:xf(s(u)),set:a(u),enumerable:!0,configurable:!0}}});var Cf=Q((Rj,If)=>{"use strict";If.exports=hy;var Rs=qn();function Af(e,t,r,n,o,a){this._gl=e,this._wrapper=t,this._index=r,this._locations=n,this._dimension=o,this._constFunc=a}var ks=Af.prototype;ks.pointer=function(t,r,n,o){var a=this,i=a._gl,l=a._locations[a._index];i.vertexAttribPointer(l,a._dimension,t||i.FLOAT,!!r,n||0,o||0),i.enableVertexAttribArray(l)};ks.set=function(e,t,r,n){return this._constFunc(this._locations[this._index],e,t,r,n)};Object.defineProperty(ks,"location",{get:function(){return this._locations[this._index]},set:function(e){return e!==this._locations[this._index]&&(this._locations[this._index]=e|0,this._wrapper.program=null),e|0}});var fy=[function(e,t,r){return r.length===void 0?e.vertexAttrib1f(t,r):e.vertexAttrib1fv(t,r)},function(e,t,r,n){return r.length===void 0?e.vertexAttrib2f(t,r,n):e.vertexAttrib2fv(t,r)},function(e,t,r,n,o){return r.length===void 0?e.vertexAttrib3f(t,r,n,o):e.vertexAttrib3fv(t,r)},function(e,t,r,n,o,a){return r.length===void 0?e.vertexAttrib4f(t,r,n,o,a):e.vertexAttrib4fv(t,r)}];function js(e,t,r,n,o,a,i){var l=fy[o],c=new Af(e,t,r,n,o,l);Object.defineProperty(a,i,{set:function(s){return e.disableVertexAttribArray(n[r]),l(e,n[r],s),s},get:function(){return c},enumerable:!0})}function dy(e,t,r,n,o,a,i){for(var l=new Array(o),c=new Array(o),s=0;s<o;++s)js(e,t,r[s],n,o,l,s),c[s]=l[s];Object.defineProperty(l,"location",{set:function(d){if(Array.isArray(d))for(var p=0;p<o;++p)c[p].location=d[p];else for(var p=0;p<o;++p)c[p].location=d+p;return d},get:function(){for(var d=new Array(o),p=0;p<o;++p)d[p]=n[r[p]];return d},enumerable:!0}),l.pointer=function(d,p,m,w){d=d||e.FLOAT,p=!!p,m=m||o*o,w=w||0;for(var y=0;y<o;++y){var I=n[r[y]];e.vertexAttribPointer(I,o,d,p,m,w+y*o),e.enableVertexAttribArray(I)}};var u=new Array(o),f=e["vertexAttrib"+o+"fv"];Object.defineProperty(a,i,{set:function(d){for(var p=0;p<o;++p){var m=n[r[p]];if(e.disableVertexAttribArray(m),Array.isArray(d[0]))f.call(e,m,d[p]);else{for(var w=0;w<o;++w)u[w]=d[o*p+w];f.call(e,m,u)}}return d},get:function(){return l},enumerable:!0})}function hy(e,t,r,n){for(var o={},a=0,i=r.length;a<i;++a){var l=r[a],c=l.name,s=l.type,u=l.locations;switch(s){case"bool":case"int":case"float":js(e,t,u[0],n,1,o,c);break;default:if(s.indexOf("vec")>=0){var f=s.charCodeAt(s.length-1)-48;if(f<2||f>4)throw new Rs("","Invalid data type for attribute "+c+": "+s);js(e,t,u[0],n,f,o,c)}else if(s.indexOf("mat")>=0){var f=s.charCodeAt(s.length-1)-48;if(f<2||f>4)throw new Rs("","Invalid data type for attribute "+c+": "+s);dy(e,t,u,n,f,o,c)}else throw new Rs("","Unknown data type for attribute "+c+": "+s);break}}return o}});var Sf=Q(la=>{(function(){"use strict";var e={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function t(i){return n(a(i),arguments)}function r(i,l){return t.apply(null,[i].concat(l||[]))}function n(i,l){var c=1,s=i.length,u,f="",d,p,m,w,y,I,j,q;for(d=0;d<s;d++)if(typeof i[d]=="string")f+=i[d];else if(typeof i[d]=="object"){if(m=i[d],m.keys)for(u=l[c],p=0;p<m.keys.length;p++){if(u==null)throw new Error(t('[sprintf] Cannot access property "%s" of undefined value "%s"',m.keys[p],m.keys[p-1]));u=u[m.keys[p]]}else m.param_no?u=l[m.param_no]:u=l[c++];if(e.not_type.test(m.type)&&e.not_primitive.test(m.type)&&u instanceof Function&&(u=u()),e.numeric_arg.test(m.type)&&typeof u!="number"&&isNaN(u))throw new TypeError(t("[sprintf] expecting number but found %T",u));switch(e.number.test(m.type)&&(j=u>=0),m.type){case"b":u=parseInt(u,10).toString(2);break;case"c":u=String.fromCharCode(parseInt(u,10));break;case"d":case"i":u=parseInt(u,10);break;case"j":u=JSON.stringify(u,null,m.width?parseInt(m.width):0);break;case"e":u=m.precision?parseFloat(u).toExponential(m.precision):parseFloat(u).toExponential();break;case"f":u=m.precision?parseFloat(u).toFixed(m.precision):parseFloat(u);break;case"g":u=m.precision?String(Number(u.toPrecision(m.precision))):parseFloat(u);break;case"o":u=(parseInt(u,10)>>>0).toString(8);break;case"s":u=String(u),u=m.precision?u.substring(0,m.precision):u;break;case"t":u=String(!!u),u=m.precision?u.substring(0,m.precision):u;break;case"T":u=Object.prototype.toString.call(u).slice(8,-1).toLowerCase(),u=m.precision?u.substring(0,m.precision):u;break;case"u":u=parseInt(u,10)>>>0;break;case"v":u=u.valueOf(),u=m.precision?u.substring(0,m.precision):u;break;case"x":u=(parseInt(u,10)>>>0).toString(16);break;case"X":u=(parseInt(u,10)>>>0).toString(16).toUpperCase();break}e.json.test(m.type)?f+=u:(e.number.test(m.type)&&(!j||m.sign)?(q=j?"+":"-",u=u.toString().replace(e.sign,"")):q="",y=m.pad_char?m.pad_char==="0"?"0":m.pad_char.charAt(1):" ",I=m.width-(q+u).length,w=m.width&&I>0?y.repeat(I):"",f+=m.align?q+u+w:y==="0"?q+w+u:w+q+u)}return f}var o=Object.create(null);function a(i){if(o[i])return o[i];for(var l=i,c,s=[],u=0;l;){if((c=e.text.exec(l))!==null)s.push(c[0]);else if((c=e.modulo.exec(l))!==null)s.push("%");else if((c=e.placeholder.exec(l))!==null){if(c[2]){u|=1;var f=[],d=c[2],p=[];if((p=e.key.exec(d))!==null)for(f.push(p[1]);(d=d.substring(p[0].length))!=="";)if((p=e.key_access.exec(d))!==null)f.push(p[1]);else if((p=e.index_access.exec(d))!==null)f.push(p[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");c[2]=f}else u|=2;if(u===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");s.push({placeholder:c[0],param_no:c[1],keys:c[2],sign:c[3],pad_char:c[4],align:c[5],width:c[6],precision:c[7],type:c[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");l=l.substring(c[0].length)}return o[i]=s}typeof la!="undefined"&&(la.sprintf=t,la.vsprintf=r),typeof window!="undefined"&&(window.sprintf=t,window.vsprintf=r,typeof define=="function"&&define.amd&&define(function(){return{sprintf:t,vsprintf:r}}))})()});var Pf=Q((kj,Mf)=>{Mf.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMA
2336SK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_
2336SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}});var jf=Q((Dj,Rf)=>{var py=Pf();Rf.exports=function(t){return py[t]}});var Ds=Q((Oj,kf)=>{kf.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]});var Of=Q((Lj,Df)=>{Df.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]});var Os=Q((Fj,Lf)=>{Lf.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]});var Nf=Q((Nj,Ff)=>{var my=Ds();Ff.exports=my.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subrout
2336ine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])});var Bf=Q((Qj,Qf)=>{var Ls=Os();Ls=Ls.slice().filter(function(e){return!/^(gl\_|texture)/.test(e)});Qf.exports=Ls.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])});var $f=Q((Bj,Xf)=>{Xf.exports=Ay;var vy=Ds(),zf=Of(),gy=Os(),yy=Nf(),_y=Bf(),pt=999,Uf=9999,Fs=0,Ns=1,Vf=2,Hf=3,qf=4,Wn=5,wy=6,by=7,xy=8,Wf=9,Ty=10,Gf=11,Ey=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"];function Ay(e){var t=0,r=0,n=pt,o,a,i=[],l=[],c=0,s=0,u=1,f=0,d=0,p=!1,m=!1,w="",y;e=e||{};var I=gy,j=vy;e.version==="300 es"&&(I=_y,j=yy);for(var q={},F={},t=0;t<I.length;t++)q[I[t]]=!0;for(var t=0;t<j.length;t++)F[j[t]]=!0;return function(k){return l=[],k!==null?L(k):W()};function N(k){k.length&&l.push({type:Ey[n],data:k,position:d,line:u,column:f})}function L(k){t=0,k.toString&&(k=k.toString()),w+=k.replace(/\r\n/g,` 2337`),y=w.length;for(var X;o=w[t],t<y;){switch(X=t,n){case Fs:t=ye();break;case Ns:t=he();break;case Vf:t=ie();break;case Hf:t=be();break;case qf:t=h();break;case Gf:t=A();break;case Wn:t=S();break;case Uf:t=O();break;case Wf:t=U();break;case pt:t=B();break}if(X!==t)switch(w[X]){case` 2338`:f=0,++u;break;default:++f;break}}return r+=t,w=w.slice(t),l}function W(k){return i.length&&N(i.join("")),n=Ty,N("(eof)"),l}function B(){return i=i.length?[]:i,a==="/"&&o==="*"?(d=r+t-1,n=Fs,a=o,t+1):a==="/"&&o==="/"?(d=r+t-1,n=Ns,a=o,t+1):o==="#"?(n=Vf,d=r+t,t):/\s/.test(o)?(n=Wf,d=r+t,t):(p=/\d/.test(o),m=/[^\w_]/.test(o),d=r+t,n=p?qf:m?Hf:Uf,t)}function U(){return/[^\s]/g.test(o)?(N(i.join("")),n=pt,t):(i.push(o),a=o,t+1)}function ie(){return(o==="\r"||o===` 2339`)&&a!=="\\"?(N(i.join("")),n=pt,t):(i.push(o),a=o,t+1)}function he(){return ie()}function ye(){return o==="/"&&a==="*"?(i.push(o),N(i.join("")),n=pt,t+1):(i.push(o),a=o,t+1)}function be(){if(a==="."&&/\d/.test(o))return n=Wn,t;if(a==="/"&&o==="*")return n=Fs,t;if(a==="/"&&o==="/")return n=Ns,t;if(o==="."&&i.length){for(;E(i););return n=Wn,t}if(o===";"||o===")"||o==="("){if(i.length)for(;E(i););return N(o),n=pt,t+1}var k=i.length===2&&o!=="=";if(/[\w_\d\s]/.test(o)||k){for(;E(i););return n=pt,t}return i.push(o),a=o,t+1}function E(k){var X=0,Z,te;do{if(Z=zf.indexOf(k.slice(0,k.length+X).join("")),te=zf[Z],Z===-1){if(X--+k.length>0)continue;te=k.slice(0,1).join("")}return N(te),d+=te.length,i=i.slice(te.length),i.length}while(1)}function A(){return/[^a-fA-F0-9]/.test(o)?(N(i.join("")),n=pt,t):(i.push(o),a=o,t+1)}function h(){return o==="."||/[eE]/.test(o)?(i.push(o),n=Wn,a=o,t+1):o==="x"&&i.length===1&&i[0]==="0"?(n=Gf,i.push(o),a=o,t+1):/[^\d]/.test(o)?(N(i.join("")),n=pt,t):(i.push(o),a=o,t+1)}function S(){return o==="f"&&(i.push(o),a=o,t+=1),/[eE]/.test(o)||(o==="-"||o==="+")&&/[eE]/.test(a)?(i.push(o),a=o,t+1):/[^\d]/.test(o)?(N(i.join("")),n=pt,t):(i.push(o),a=o,t+1)}function O(){if(/[^\d\w_]/.test(o)){var k=i.join("");return F[k]?n=xy:q[k]?n=by:n=wy,N(i.join("")),n=pt,t}return i.push(o),a=o,t+1}}});var Kf=Q((zj,Yf)=>{var Iy=$f();
2339Yf.exports=Cy;function Cy(e,t){var r=Iy(t),n=[];return n=n.concat(r(e)),n=n.concat(r(null)),n}});var Zf=Q((Uj,Jf)=>{Jf.exports=function(t){return atob(t)}});var td=Q((Vj,ed)=>{var Sy=Kf(),My=Zf();ed.exports=Py;function Py(e){for(var t=Array.isArray(e)?e:Sy(e),r=0;r<t.length;r++){var n=t[r];if(n.type==="preprocessor"){var o=n.data.match(/\#define\s+SHADER_NAME(_B64)?\s+(.+)$/);if(o&&o[2]){var a=o[1],i=o[2];return(a?My(i):i).trim()}}}}});var nd=Q((Hj,rd)=>{"use strict";var Dt="",Qs;rd.exports=Ry;function Ry(e,t){if(typeof e!="string")throw new TypeError("expected a string");if(t===1)return e;if(t===2)return e+e;var r=e.length*t;if(Qs!==e||typeof Qs=="undefined")Qs=e,Dt="";else if(Dt.length>=r)return Dt.substr(0,r);for(;r>Dt.length&&t>1;)t&1&&(Dt+=e),t>>=1,e+=e;return Dt+=e,Dt=Dt.substr(0,r),Dt}});var ad=Q((qj,od)=>{"use strict";var jy=nd();od.exports=function(t,r,n){return n=typeof n!="undefined"?n+"":" ",jy(n,r)+t}});var sd=Q((Wj,id)=>{var ky=ad();id.exports=Dy;function Dy(e,t,r){t=typeof t=="number"?t:1,r=r||": ";var n=e.split(/\r?\n/),o=String(n.length+t-1).length;return n.map(function(a,i){var l=i+t,c=String(l).length,s=ky(l,o-c);return s+r+a}).join(` 2340`)}});var ud=Q((Gj,ld)=>{var ua=Sf().sprintf,Oy=jf(),Ly=td(),Fy=sd();ld.exports=Ny;function Ny(e,t,r){"use strict";var n=Ly(t)||"of unknown name (see npm glsl-shader-name)",o="unknown type";r!==void 0&&(o=r===Oy.FRAGMENT_SHADER?"fragment":"vertex");for(var a=ua(`Error compiling %s shader %s: 2341`,o,n),i=ua("%s%s",a,e),l=e.split(` 2342`),c={},s=0;s<l.length;s++){var u=l[s];if(!(u===""||u==="\0")){var f=parseInt(u.split(":")[2]);if(isNaN(f))throw new Error(ua("Could not parse error: %s",u));c[f]=u}}for(var d=Fy(t).split(` 2343`),s=0;s<d.length;s++)if(!(!c[s+3]&&!c[s+2]&&!c[s+1])){var p=d[s];if(a+=p+` 2344`,c[s+1]){var m=c[s+1];m=m.substr(m.split(":",3).join(":").length+1).trim(),a+=ua(`^^^ %s 2345 2346`,m)}}return{long:a.trim(),short:i.trim()}}});var fd=Q((Xj,cd)=>{cd.exports=Qy;function Qy(e,t){var r={identity:t},n=e.valueOf;return Object.defineProperty(e,"valueOf",{value:function(o){return o!==t?n.apply(this,arguments):r},writable:!0}),r}});var hd=Q(($j,dd)=>{var By=fd();dd.exports=zy;function zy(){var e={};return function(t){if((typeof t!="object"||t===null)&&typeof t!="function")throw new Error("Weakmap-shim: Key must be object");var r=t.valueOf(e);return r&&r.identity===e?r:By(t,e)}}});var md=Q((Yj,pd)=>{var Uy=hd();pd.exports=Vy;function Vy(){var e=Uy();return{get:function(t,r){var n=e(t);return n.hasOwnProperty("value")?n.value:r},set:function(t,r){return e(t).value=r,this},has:function(t){return"value"in e(t)},delete:function(t){return delete e(t).value}}}});var bd=Q(zs=>{"use strict";zs.shader=$y;zs.program=Yy;var Bs=qn(),Hy=ud(),qy=typeof WeakMap=="undefined"?md():WeakMap,vd=new qy,Wy=0;function gd(e,t,r,n,o,a,i){this.id=e,this.src=t,this.type=r,this.shader=n,this.count=a,this.programs=[],this.cache=i}gd.prototype.dispose=function(){if(--this.count===0){for(var e=this.cache,t=e.gl,r=this.programs,n=0,o=r.length;n<o;++n){var a=e.programs[r[n]];a&&(delete e.programs[n],t.deleteProgram(a))}t.deleteShader(this.shader),delete e.shaders[this.type===t.FRAGMENT_SHADER|0][this.src]}};function yd(e){this.gl=e,this.shaders=[{},{}],this.programs={}}var _d=yd.prototype;function Gy(e,t,r){var n=e.createShader(t);if(e.shaderSource(n,r),e.compileShader(n),!e.getShaderParameter(n,e.COMPILE_STATUS)){var o=e.getShaderInfoLog(n);try{var a=Hy(o,r,t)}catch(i){throw console.warn("Failed to format compiler error: "+i),new Bs(o,`Error compiling shader: 2347`+o)}throw new Bs(o,a.short,a.long)}return n}_d.getShaderReference=function(e,t){var r=this.gl,n=this.shaders[e===r.FRAGMENT_SHADER|0],o=n[t];if(!o||!r.isShader(o.shader)){var a=Gy(r,e,t);o=n[t]=new gd(Wy++,t,e,a,[],1,this)}else o.count+=1;return o};function Xy(e,t,r,n,o){var a=e.createProgram();e.attachShader(a,t),e.attachShader(a,r);for(var i=0;i<n.length;++i)e.bindAttribLocation(a,o[i],n[i]);if(e.linkProgram(a),!e.getProgramParameter(a,e.LINK_STATUS)){var l=e.getProgramInfoLog(a);throw new Bs(l,"Error linking program: "+l)}return a}_d.getProgram=function(e,t,r,n){var o=[e.id,t.id,r.join(":"),n.join(":")].join("@"),a=this.programs[o];
2347return(!a||!this.gl.isProgram(a))&&(this.programs[o]=a=Xy(this.gl,e.shader,t.shader,r,n),e.programs.push(o),t.programs.push(o)),a};function wd(e){var t=vd.get(e);return t||(t=new yd(e),vd.set(e,t)),t}function $y(e,t,r){return wd(e).getShaderReference(t,r)}function Yy(e,t,r,n,o){return wd(e).getProgram(t,r,n,o)}});var Ed=Q(Us=>{"use strict";Us.uniforms=Ky;Us.attributes=Jy;var xd={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},ca=null;function Td(e,t){if(!ca){var r=Object.keys(xd);ca={};for(var n=0;n<r.length;++n){var o=r[n];ca[e[o]]=xd[o]}}return ca[t]}function Ky(e,t){for(var r=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),n=[],o=0;o<r;++o){var a=e.getActiveUniform(t,o);if(a){var i=Td(e,a.type);if(a.size>1)for(var l=0;l<a.size;++l)n.push({name:a.name.replace("[0]","["+l+"]"),type:i});else n.push({name:a.name,type:i})}}return n}function Jy(e,t){for(var r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),n=[],o=0;o<r;++o){var a=e.getActiveAttrib(t,o);a&&n.push({name:a.name,type:Td(e,a.type)})}return n}});var Md=Q((Zj,Sd)=>{"use strict";var Zy=Ef(),e_=Cf(),Ad=Ms(),Vs=bd(),Id=Ed(),t_=qn();function Cd(e){this.gl=e,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var Hs=Cd.prototype;Hs.bind=function(){this.program||this._relink();var e,t=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),r=this.gl.lastAttribCount;if(t>r)for(e=r;e<t;e++)this.gl.enableVertexAttribArray(e);else if(r>t)for(e=t;e<r;e++)this.gl.disableVertexAttribArray(e);this.gl.lastAttribCount=t,this.gl.useProgram(this.program)};Hs.dispose=function(){for(var e=this.gl.lastAttribCount,t=0;t<e;t++)this.gl.disableVertexAttribArray(t);this.gl.lastAttribCount=0,this._fref&&this._fref.dispose(),this._vref&&this._vref.dispose(),this.attributes=this.types=this.vertShader=this.fragShader=this.program=this._relink=this._fref=this._vref=null};function r_(e,t){return e.name<t.name?-1:1}Hs.update=function(e,t,r,n){if(!t||arguments.length===1){var o=e;
vendor: 4,739 bytes, lines 2347-2354
2347e=o.vertex,t=o.fragment,r=o.uniforms,n=o.attributes}var a=this,i=a.gl,l=a._vref;a._vref=Vs.shader(i,i.VERTEX_SHADER,e),l&&l.dispose(),a.vertShader=a._vref.shader;var c=this._fref;if(a._fref=Vs.shader(i,i.FRAGMENT_SHADER,t),c&&c.dispose(),a.fragShader=a._fref.shader,!r||!n){var s=i.createProgram();if(i.attachShader(s,a.fragShader),i.attachShader(s,a.vertShader),i.linkProgram(s),!i.getProgramParameter(s,i.LINK_STATUS)){var u=i.getProgramInfoLog(s);throw new t_(u,"Error linking program:"+u)}r=r||Id.uniforms(i,s),n=n||Id.attributes(i,s),i.deleteProgram(s)}n=n.slice(),n.sort(r_);var f=[],d=[],p=[],m;for(m=0;m<n.length;++m){var w=n[m];if(w.type.indexOf("mat")>=0){for(var y=w.type.charAt(w.type.length-1)|0,I=new Array(y),j=0;j<y;++j)I[j]=p.length,d.push(w.name+"["+j+"]"),typeof w.location=="number"?p.push(w.location+j):Array.isArray(w.location)&&w.location.length===y&&typeof w.location[j]=="number"?p.push(w.location[j]|0):p.push(-1);f.push({name:w.name,type:w.type,locations:I})}else f.push({name:w.name,type:w.type,locations:[p.length]}),d.push(w.name),typeof w.location=="number"?p.push(w.location|0):p.push(-1)}var q=0;for(m=0;m<p.length;++m)if(p[m]<0){for(;p.indexOf(q)>=0;)q+=1;p[m]=q}var F=new Array(r.length);function N(){a.program=Vs.program(i,a._vref,a._fref,d,p);for(var L=0;L<r.length;++L)F[L]=i.getUniformLocation(a.program,r[L].name)}N(),a._relink=N,a.types={uniforms:Ad(r),attributes:Ad(n)},a.attributes=e_(i,a,f,p),Object.defineProperty(a,"uniforms",Zy(i,a,r,F))};function n_(e,t,r,n,o){var a=new Cd(e);return a.update(t,r,n,o),a}Sd.exports=n_});var Pd=Q(qs=>{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});var o_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a_=Md(),i_=s_(a_);function s_(e){return e&&e.__esModule?e:{default:e}}var l_=`attribute vec2 _p; 2348varying vec2 _uv; 2349void main() { 2350gl_Position = vec4(_p,0.0,1.0); 2351_uv = vec2(0.5, 0.5) * (_p+vec2(1.0, 1.0)); 2352}`,u_={cover:function(t){return".5+(uv-.5)*vec2(min(ratio/"+t+",1.),min("+t+"/ratio,1.))"},contain:function(t){return".5+(uv-.5)*vec2(max(ratio/"+t+",1.),max("+t+"/ratio,1.))"},stretch:function(){return"uv"}},c_=function(t,r){var n=u_[r];if(!n)throw new Error("invalid resizeMode="+r);return"precision highp float;varying vec2 _uv;uniform sampler2D from, to;uniform float progress, ratio, _fromR, _toR;vec4 getFromColor(vec2 uv){return texture2D(from,"+n("_fromR")+");}vec4 getToColor(vec2 uv){return texture2D(to,"+n("_toR")+`);} 2353`+t+` 2354void main(){gl_FragColor=transition(_uv);}`};qs.default=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=o_({resizeMode:"cover"},r),o=n.resizeMode,a=(0,i_.default)(e,l_,c_(t.glsl,o));return a.bind(),a.attributes._p.pointer(),{draw:function(l,c,s){var u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:e.drawingBufferWidth,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:e.drawingBufferHeight,d=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};a.bind(),a.uniforms.ratio=u/f,a.uniforms.progress=l,a.uniforms.from=c.bind(0),a.uniforms.to=s.bind(1),a.uniforms._fromR=c.shape[0]/c.shape[1],a.uniforms._toR=s.shape[0]/s.shape[1];var p=2;for(var m in t.paramsTypes){var w=m in d?d[m]:t.defaultParams[m];if(t.paramsTypes[m]==="sampler2D")if(!w)console.warn("uniform["+m+"]: A texture MUST be defined for uniform sampler2D of a texture");else{if(typeof w.bind!="function")throw new Error("uniform["+m+"]: A gl-texture2d API-like object was expected");a.uniforms[m]=w.bind(p++)}else a.uniforms[m]=w}e.drawArrays(e.TRIANGLES,0,3)},dispose:function(){a.dispose()}}}});var jd=Q((t4,Rd)=>{"use strict";function f_(e){for(var t=new Array(e),r=0;r<e;++r)t[r]=r;return t}Rd.exports=f_});var Od=Q((r4,Dd)=>{Dd.exports=function(e){return e!=null&&(kd(e)||d_(e)||!!e._isBuffer)};function kd(e){return!!e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function d_(e){return typeof e.readFloatLE=="function"&&typeof e.slice=="function"&&kd(e.slice(0,0))}});var Fd=Q((n4,Ld)=>{var h_=jd(),p_=Od(),m_=typeof Float64Array!="undefined";function v_(e,t){return e[0]-t[0]}function g_(){var e=this.stride,t=new Array(e.length),r;for(r=0;r<t.length;++r)t[r]=[Math.abs(e[r]),r];t.sort(v_);var n=new Array(t.length);for(r=0;r<n.length;++r)n[r]=t[r][1];return n}function y_(e,t){var r=["View",t,"d",e].join("");t<0&&(r="View_Nil"+e);var n=e==="generic";if(t===-1){var o="function "+r+"(a){this.data=a;};var proto="+r+".prototype;proto.dtype='"+e+"';proto.index=function(){return -1};proto.size=0;proto.dimension=-1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function(){return new "+r
vendor: 12,894 bytes, lines 2354-2368
2354+"(this.data);};proto.get=proto.set=function(){};proto.pick=function(){return null};return function construct_"+r+"(a){return new "+r+"(a);}",w=new Function(o);return w()}else if(t===0){var o="function "+r+"(a,d) {this.data = a;this.offset = d};var proto="+r+".prototype;proto.dtype='"+e+"';proto.index=function(){return this.offset};proto.dimension=0;proto.size=1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function "+r+"_copy() {return new "+r+"(this.data,this.offset)};proto.pick=function "+r+"_pick(){return TrivialArray(this.data);};proto.valueOf=proto.get=function "+r+"_get(){return "+(n?"this.data.get(this.offset)":"this.data[this.offset]")+"};proto.set=function "+r+"_set(v){return "+(n?"this.data.set(this.offset,v)":"this.data[this.offset]=v")+"};return function construct_"+r+"(a,b,c,d){return new "+r+"(a,d)}",w=new Function("TrivialArray",o);return w(fa[e][0])}var o=["'use strict'"],a=h_(t),i=a.map(function(y){return"i"+y}),l="this.offset+"+a.map(function(y){return"this.stride["+y+"]*i"+y}).join("+"),c=a.map(function(y){return"b"+y}).join(","),s=a.map(function(y){return"c"+y}).join(",");o.push("function "+r+"(a,"+c+","+s+",d){this.data=a","this.shape=["+c+"]","this.stride=["+s+"]","this.offset=d|0}","var proto="+r+".prototype","proto.dtype='"+e+"'","proto.dimension="+t),o.push("Object.defineProperty(proto,'size',{get:function "+r+"_size(){return "+a.map(function(y){return"this.shape["+y+"]"}).join("*"),"}})"),t===1?o.push("proto.order=[0]"):(o.push("Object.defineProperty(proto,'order',{get:"),t<4?(o.push("function "+r+"_order(){"),t===2?o.push("return (Math.abs(this.stride[0])>Math.abs(this.stride[1]))?[1,0]:[0,1]}})"):t===3&&o.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):o.push("ORDER})")),o.push("proto.set=function "+r+"_set("+i.join(",")+",v){"),n?o.push("return this.data.set("+l+",v)}"):o.push("return this.data["+l+"]=v}"),o.push("proto.get=function "+r+"_get("+i.join(",")+"){"),n?o.push("return this.data.get("+l+")}"):o.push("return this.data["+l+"]}"),o.push("proto.index=function "+r+"_index(",i.join(),"){return "+l+"}"),o.push("proto.hi=function "+r+"_hi("+i.join(",")+"){return new "+r+"(this.data,"+a.map(function(y){return["(typeof i",y,"!=='number'||i",y,"<0)?this.shape[",y,"]:i",y,"|0"].join("")}).join(",")+","+a.map(function(y){return"this.stride["+y+"]"}).join(",")+",this.offset)}");var u=a.map(function(y){return"a"+y+"=this.shape["+y+"]"}),f=a.map(function(y){return"c"+y+"=this.stride["+y+"]"});o.push("proto.lo=function "+r+"_lo("+i.join(",")+"){var b=this.offset,d=0,"+u.join(",")+","+f.join(","));for(var d=0;d<t;++d)o.push("if(typeof i"+d+"==='number'&&i"+d+">=0){d=i"+d+"|0;b+=c"+d+"*d;a"+d+"-=d}");o.push("return new "+r+"(this.data,"+a.map(function(y){return"a"+y}).join(",")+","+a.map(function(y){return"c"+y}).join(",")+",b)}"),o.push("proto.step=function "+r+"_step("+i.join(",")+"){var "+a.map(function(y){return"a"+y+"=this.shape["+y+"]"}).join(",")+","+a.map(function(y){return"b"+y+"=this.stride["+y+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(var d=0;d<t;++d)o.push("if(typeof i"+d+"==='number'){d=i"+d+"|0;if(d<0){c+=b"+d+"*(a"+d+"-1);a"+d+"=ceil(-a"+d+"/d)}else{a"+d+"=ceil(a"+d+"/d)}b"+d+"*=d}");o.push("return new "+r+"(this.data,"+a.map(function(y){return"a"+y}).join(",")+","+a.map(function(y){return"b"+y}).join(",")+",c)}");for(var p=new Array(t),m=new Array(t),d=0;d<t;++d)p[d]="a[i"+d+"]",m[d]="b[i"+d+"]";o.push("proto.transpose=function "+r+"_transpose("+i+"){"+i.map(function(y,I){return y+"=("+y+"===undefined?"+I+":"+y+"|0)"}).join(";"),"var a=this.shape,b=this.stride;return new "+r+"(this.data,"+p.join(",")+","+m.join(",")+",this.offset)}"),o.push("proto.pick=function "+r+"_pick("+i+"){var a=[],b=[],c=this.offset");for(var d=0;d<t;++d)o.push("if(typeof i"+d+"==='number'&&i"+d+">=0){c=(c+this.stride["+d+"]*i"+d+")|0}else{a.push(this.shape["+d+"]);b.push(this.stride["+d+"])}");o.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),o.push("return function construct_"+r+"(data,shape,stride,offset){return new "+r+"(data,"+a.map(function(y){return"shape["+y+"]"}).join(",")+","+a.map(function(y){return"stride["+y+"]"}).join(",")+",offset)}");var w=new Function("CTOR_LIST","ORDER",o.join(` 2355`));return w(fa[e],g_)}function __(e){if(p_(e))return"buffer";if(m_)switch(Object.prototype.toString.call(e)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(e)?"array":"generic"}var fa={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],bigint64:[],biguint64:[],buffer:[],generic:[]};function w_(e,t,r,n){if(e===void 0){var s=fa.array[0];return s([])}else typeof e=="number"&&(e=[e]);t===void 0&&(t=[e.length]);var o=t.length;if(r===void 0){r=new Array(o);for(var a=o-1,i=1;a>=0;--a)r[a]=i,i*=t[a]}if(n===void 0){n=0;for(var a=0;a<o;++a)r[a]<0&&(n-=(t[a]-1)*r[a])}for(var l=__(e),c=fa[l];c.length<=o+1;)c.push(y_(l,c.length-1));var s=c[o+1];return s(e,t,r,n)}Ld.exports=w_});var Qd=Q((o4,Nd)=>{"use strict";function b_(e,t){for(var r=1,n=e.length,o=e[0],a=e[0],i=1;i<n;++i)if(a=o,o=e[i],t(o,a)){if(i===r){r++;continue}e[r++]=o}return e.length=r,e}function x_(e){for(var t=1,r=e.length,n=e[0],o=e[0],a=1;a<r;++a,o=n)if(o=n,n=e[a],n!==o){if(a===t){t++;continue}e[t++]=n}return e.length=t,e}function T_(e,t,r){return e.length===0?e:t?(r||e.sort(t),b_(e,t)):(r||e.sort(),x_(e))}Nd.exports=T_});var Ud=Q((a4,zd)=>{"use strict";var E_=Qd();function Bd(e,t,r){var n=e.length,o=t.arrayArgs.length,a=t.indexArgs.length>0,i=[],l=[],c=0,s=0,u,f;for(u=0;u<n;++u)l.push(["i",u,"=0"].join(""));for(f=0;f<o;++f)for(u=0;u<n;++u)s=c,c=e[u],u===0?l.push(["d",f,"s",u,"=t",f,"p",c].join("")):l.push(["d",f,"s",u,"=(t",f,"p",c,"-s",s,"*t",f,"p",s,")"].join(""));for(l.length>0&&i.push("var "+l.join(",")),u=n-1;u>=0;--u)c=e[u],i.push(["for(i",u,"=0;i",u,"<s",c,";++i",u,"){"].join(""));for(i.push(r),u=0;u<n;++u){for(s=c,c=e[u],f=0;f<o;++f)i.push(["p",f,"+=d",f,"s",u].join(""));a&&(u>0&&i.push(["index[",s,"]-=s",s].join("")),i.push(["++index[",c,"]"].join(""))),i.push("}")}return i.join(` 2356`)}function A_(e,t,r,n){for(var o=t.length,a=r.arrayArgs.length,i=r.blockSize,l=r.indexArgs.length>0,c=[],s=0;s<a;++s)c.push(["var offset",s,"=p",s].join(""));for(var s=e;s<o;++s)c.push(["for(var j"+s+"=SS[",t[s],"]|0;j",s,">0;){"].join("")),c.push(["if(j",s,"<",i,"){"].join("")),c.push(["s",t[s],"=j",s].join("")),c.push(["j",s,"=0"].join("")),c.push(["}else{s",t[s],"=",i].join("")),c.push(["j",s,"-=",i,"}"].join("")),l&&c.push(["index[",t[s],"]=j",s].join(""));for(var s=0;s<a;++s){for(var u=["offset"+s],f=e;f<o;++f)u.push(["j",f,"*t",s,"p",t[f]].join(""));c.push(["p",s,"=(",u.join("+"),")"].join(""))}c.push(Bd(t,r,n));for(var s=e;s<o;++s)c.push("}");return c.join(` 2357`)}function I_(e){for(var t=0,r=e[0].length;t<r;){for(var n=1;n<e.length;++n)if(e[n][t]!==e[0][t])return t;++t}return t}function Ws(e,t,r){for(var n=e.body,o=[],a=[],i=0;i<e.args.length;++i){var l=e.args[i];if(!(l.count<=0)){var c=new RegExp(l.name,"g"),s="",u=t.arrayArgs.indexOf(i);switch(t.argTypes[i]){case"offset":var f=t.offsetArgIndex.indexOf(i),d=t.offsetArgs[f];u=d.array,s="+q"+f;case"array":s="p"+u+s;var p="l"+i,m="a"+u;if(t.arrayBlockIndices[u]===0)l.count===1?r[u]==="generic"?l.lvalue?(o.push(["var ",p,"=",m,".get(",s,")"].join("")),n=n.replace(c,p),a.push([m,".set(",s,",",p,")"].join(""))):n=n.replace(c,[m,".get(",s,")"].join("")):n=n.replace(c,[m,"[",s,"]"].join("")):r[u]==="generic"?(o.push(["var ",p,"=",m,".get(",s,")"].join("")),n=n.replace(c,p),l.lvalue&&a.push([m,".set(",s,",",p,")"].join(""))):(o.push(["var ",p,"=",m,"[",s,"]"].join("")),n=n.replace(c,p),l.lvalue&&a.push([m,"[",s,"]=",p].join("")));else{for(var w=[l.name],y=[s],I=0;I<Math.abs(t.arrayBlockIndices[u]);I++)w.push("\\s*\\[([^\\]]+)\\]"),y.push("$"+(I+1)+"*t"+u+"b"+I);if(c=new RegExp(w.join(""),"g"),s=y.join("+"),r[u]==="generic")throw new Error("cwise: Generic arrays not supported in combination with blocks!");n=n.replace(c,[m,"[",s,"]"].join(""))}break;case"scalar":n=n.replace(c,"Y"+t.scalarArgs.indexOf(i));break;case"index":n=n.replace(c,"index");break;case"shape":n=n.replace(c,"shape");break}}}return[o.join(` 2358`),n,a.join(` 2359`)].join(` 2360`).trim()}function C_(e){for(var t=new Array(e.length),r=!0,n=0;n<e.length;++n){var o=e[n],a=o.match(/\d+/);a?a=a[0]:a="",o.charAt(0)===0?t[n]="u"+o.charAt(1)+a:t[n]=o.charAt(0)+a,n>0&&(r=r&&t[n]===t[n-1])}return r?t[0]:t.join("")}function S_(e,t){for(var r=t[1].length-Math.abs(e.arrayBlockIndices[0])|0,n=new Array(e.arrayArgs.length),o=new Array(e.arrayArgs.length),a=0;a<e.arrayArgs.length;++a)o[a]=t[2*a],n[a]=t[2*a+1];for(var i=[],l=[],c=[],s=[],u=[],a=0;a<e.arrayArgs.length;++a){e.arrayBlockIndices[a]<0?(c.push(0),s.push(r),i.push(r),l.push(r+e.arrayBlockIndices[a])):(c.push(e.arrayBlockIndices[a]),s.push(e.arrayBlockIndices[a]+r),i.push(0),l.push(e.arrayBlockIndices[a]));for(var f=[],d=0;d<n[a].length;d++)c[a]<=n[a][d]&&n[a][d]<s[a]&&f.push(n[a][d]-c[a]);u.push(f)}for(var p=["SS"],m=["'use strict'"],w=[],d=0;d<r;++d)w.push(["s",d,"=SS[",d,"]"].join(""));for(var a=0;a<e.arrayArgs.length;++a){p.push("a"+a),p.push("t"+a),p.push("p"+a);for(var d=0;d<r;++d)w.push(["t",a,"p",d,"=t",a,"[",c[a]+d,"]"].join(""));for(var d=0;d<Math.abs(e.arrayBlockIndices[a]);++d)w.push(["t",a,"b",d,"=t",a,"[",i[a]+d,"]"].join(""))}for(var a=0;a<e.scalarArgs.length;++a)p.push("Y"+a);if(e.shapeArgs.length>0&&w.push("shape=SS.slice(0)"),e.indexArgs.length>0){for(var y=new Array(r),a=0;a<r;++a)y[a]="0";w.push(["index=[",y.join(","),"]"].join(""))}for(var a=0;a<e.offsetArgs.length;++a){for(var I=e.offsetArgs[a],j=[],d=0;d<I.offset.length;++d)I.offset[d]!==0&&(I.offset[d]===1?j.push(["t",I.array,"p",d].join("")):j.push([I.offset[d],"*t",I.array,"p",d].join("")));j.length===0?w.push("q"+a+"=0"):w.push(["q",a,"=",j.join("+")].join(""))}var q=E_([].concat(e.pre.thisVars).concat(e.body.thisVars).concat(e.post.thisVars));w=w.concat(q),w.length>0&&m.push("var "+w.join(","));for(var a=0;a<e.arrayArgs.length;++a)m.push("p"+a+"|=0");e.pre.body.length>3&&m.push(Ws(e.pre,e,o));var F=Ws(e.body,e,o),N=I_(u);N<r?m.push(A_(N,u[0],e,F)):m.push(Bd(u[0],e,F)),e.post.body.length>3&&m.push(Ws(e.post,e,o)),e.debug&&console.log("-----Generated cwise routine for ",t,`: 2361`+m.join(` 2362`)+` 2363----------`);var L=[e.funcName||"unnamed","_cwise_loop_",n[0].join("s"),"m",N,C_(o)].join(""),W=new Function(["function ",L,"(",p.join(","),"){",m.join(` 2364`),"} return ",L].join(""));return W()}zd.exports=S_});var Hd=Q((i4,Vd)=>{"use strict";var M_=Ud();function P_(e){var t=["'use strict'","var CACHED={}"],r=[],n=e.funcName+"_cwise_thunk";t.push(["return function ",n,"(",e.shimArgs.join(","),"){"].join(""));for(var o=[],a=[],i=[["array",e.arrayArgs[0],".shape.slice(",Math.max(0,e.arrayBlockIndices[0]),e.arrayBlockIndices[0]<0?","+e.arrayBlockIndices[0]+")":")"].join("")],l=[],c=[],s=0;s<e.arrayArgs.length;++s){var u=e.arrayArgs[s];r.push(["t",u,"=array",u,".dtype,","r",u,"=array",u,".order"].join("")),o.push("t"+u),o.push("r"+u),a.push("t"+u),a.push("r"+u+".join()"),i.push("array"+u+".data"),i.push("array"+u+".stride"),i.push("array"+u+".offset|0"),s>0&&(l.push("array"+e.arrayArgs[0]+".shape.length===array"+u+".shape.length+"+(Math.abs(e.arrayBlockIndices[0])-Math.abs(e.arrayBlockIndices[s]))),c.push("array"+e.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,e.arrayBlockIndices[0])+"]===array"+u+".shape[shapeIndex+"+Math.max(0,e.arrayBlockIndices[s])+"]"))}e.arrayArgs.length>1&&(t.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),t.push("for(var shapeIndex=array"+e.arrayArgs[0]+".shape.length-"+Math.abs(e.arrayBlockIndices[0])+"; shapeIndex-->0;) {"),t.push("if (!("+c.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),t.push("}"));for(var s=0;s<e.scalarArgs.length;++s)i.push("scalar"+e.scalarArgs[s]);r.push(["type=[",a.join(","),"].join()"].join("")),r.push("proc=CACHED[type]"),t.push("var "+r.join(",")),t.push(["if(!proc){","CACHED[type]=proc=compile([",o.join(","),"])}","return proc(",i.join(","),")}"].join("")),e.debug&&console.log(`-----Generated thunk: 2365`+t.join(` 2366`)+` 2367----------`);var f=new Function("compile",t.join(` 2368`));
vendor: 14,567 bytes, line 2368
2368return f(M_.bind(void 0,e))}Vd.exports=P_});var Wd=Q((s4,qd)=>{"use strict";var R_=Hd();function j_(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}function k_(e){var t=new j_;t.pre=e.pre,t.body=e.body,t.post=e.post;var r=e.args.slice(0);t.argTypes=r;for(var n=0;n<r.length;++n){var o=r[n];if(o==="array"||typeof o=="object"&&o.blockIndices){if(t.argTypes[n]="array",t.arrayArgs.push(n),t.arrayBlockIndices.push(o.blockIndices?o.blockIndices:0),t.shimArgs.push("array"+n),n<t.pre.args.length&&t.pre.args[n].count>0)throw new Error("cwise: pre() block may not reference array args");if(n<t.post.args.length&&t.post.args[n].count>0)throw new Error("cwise: post() block may not reference array args")}else if(o==="scalar")t.scalarArgs.push(n),t.shimArgs.push("scalar"+n);else if(o==="index"){if(t.indexArgs.push(n),n<t.pre.args.length&&t.pre.args[n].count>0)throw new Error("cwise: pre() block may not reference array index");if(n<t.body.args.length&&t.body.args[n].lvalue)throw new Error("cwise: body() block may not write to array index");if(n<t.post.args.length&&t.post.args[n].count>0)throw new Error("cwise: post() block may not reference array index")}else if(o==="shape"){if(t.shapeArgs.push(n),n<t.pre.args.length&&t.pre.args[n].lvalue)throw new Error("cwise: pre() block may not write to array shape");if(n<t.body.args.length&&t.body.args[n].lvalue)throw new Error("cwise: body() block may not write to array shape");if(n<t.post.args.length&&t.post.args[n].lvalue)throw new Error("cwise: post() block may not write to array shape")}else if(typeof o=="object"&&o.offset)t.argTypes[n]="offset",t.offsetArgs.push({array:o.array,offset:o.offset}),t.offsetArgIndex.push(n);else throw new Error("cwise: Unknown argument type "+r[n])}if(t.arrayArgs.length<=0)throw new Error("cwise: No array arguments specified");if(t.pre.args.length>r.length)throw new Error("cwise: Too many arguments in pre() block");if(t.body.args.length>r.length)throw new Error("cwise: Too many arguments in body() block");if(t.post.args.length>r.length)throw new Error("cwise: Too many arguments in post() block");return t.debug=!!e.printCode||!!e.debug,t.funcName=e.funcName||"cwise",t.blockSize=e.blockSize||64,R_(t)}qd.exports=k_});var Zd=Q(G=>{"use strict";var qe=Wd(),da={body:"",args:[],thisVars:[],localVars:[]};function Gs(e){if(!e)return da;for(var t=0;t<e.args.length;++t){var r=e.args[t];t===0?e.args[t]={name:r,lvalue:!0,rvalue:!!e.rvalue,count:e.count||1}:e.args[t]={name:r,lvalue:!1,rvalue:!0,count:1}}return e.thisVars||(e.thisVars=[]),e.localVars||(e.localVars=[]),e}function D_(e){return qe({args:e.args,pre:Gs(e.pre),body:Gs(e.body),post:Gs(e.proc),funcName:e.funcName})}function pe(e){for(var t=[],r=0;r<e.args.length;++r)t.push("a"+r);var n=new Function("P",["return function ",e.funcName,"_ndarrayops(",t.join(","),") {P(",t.join(","),");return a0}"].join(""));return n(D_(e))}var Gd={add:"+",sub:"-",mul:"*",div:"/",mod:"%",band:"&",bor:"|",bxor:"^",lshift:"<<",rshift:">>",rrshift:">>>"};(function(){for(var e in Gd){var t=Gd[e];G[e]=pe({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+t+"c"},funcName:e}),G[e+"eq"]=pe({args:["array","array"],body:{args:["a","b"],body:"a"+t+"=b"},rvalue:!0,funcName:e+"eq"}),G[e+"s"]=pe({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+t+"s"},funcName:e+"s"}),G[e+"seq"]=pe({args:["array","scalar"],body:{args:["a","s"],body:"a"+t+"=s"},rvalue:!0,funcName:e+"seq"})}})();var Xd={not:"!",bnot:"~",neg:"-",recip:"1.0/"};(function(){for(var e in Xd){var t=Xd[e];G[e]=pe({args:["array","array"],body:{args:["a","b"],body:"a="+t+"b"},funcName:e}),G[e+"eq"]=pe({args:["array"],body:{args:["a"],body:"a="+t+"a"},rvalue:!0,count:2,funcName:e+"eq"})}})();var $d={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};(function(){for(var e in $d){var t=$d[e];G[e]=pe({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+t+"c"},funcName:e}),G[e+"s"]=pe({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+t+"s"},funcName:e+"s"}),G[e+"eq"]=pe({args:["array","array"],body:{args:["a","b"],body:"a=a"+t+"b"},rvalue:!0,count:2,funcName:e+"eq"}),G[e+"seq"]=pe({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+t+"s"},rvalue:!0,count:2,funcName:e+"seq"})}})();var Yd=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];(function(){for(var e=0;e<Yd.length;++e){var t=Yd[e];G[t]=pe({args:["array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b)",thisVars:["this_f"]},funcName:t}),G[t+"eq"]=pe({args:["array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a"],body:"a=this_f(a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"eq"})}})();var Kd=["max","min","atan2","pow"];(function(){for(var e=0;e<Kd.length;++e){var t=Kd[e];G[t]=pe({args:["array","array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(b,c)",thisVars:["this_f"]},funcName:t}),G[t+"s"]=pe({args:["array","array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(b,c)",thisVars:["this_f"]},funcName:t+"s"}),G[t+"eq"]=pe({args:["array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(a,b)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"eq"}),G[t+"seq"]=pe({args:["array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(a,b)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"seq"})}})();var Jd=["atan2","pow"];(function(){for(var e=0;e<Jd.length;++e){var t=Jd[e];G[t+"op"]=pe({args:["array","array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(c,b)",thisVars:["this_f"]},funcName:t+"op"}),G[t+"ops"]=pe({args:["array","array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(c,b)",thisVars:["this_f"]},funcName:t+"ops"}),G[t+"opeq"]=pe({args:["array","array"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b,a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"opeq"}),G[t+"opseq"]=pe({args:["array","scalar"],pre:{args:[],body:"this_f=Math."+t,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b,a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:t+"opseq"})}})();G.any=qe({args:["array"],pre:da,body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"if(a){return true}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return false"},funcName:"any"});G.all=qe({args:["array"],pre:da,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1}],body:"if(!x){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"all"});G.sum=qe({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"this_s+=a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"sum"});G.prod=qe({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=1"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"this_s*=a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"prod"});G.norm2squared=qe({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:2}],body:"this_s+=a*a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm2squared"});G.norm2=qe({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:2}],body:"this_s+=a*a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return Math.sqrt(this_s)"},funcName:"norm2"});G.norminf=qe({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:4}],body:"if(-a>this_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"});G.norm1=qe({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"});G.sup=qe({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}});G.inf=qe({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_<this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}});G.argmin=qe({args:["index","array","shape"],pre:{body:"{this_v=Infinity;this_i=_inline_0_arg2_.slice(0)}",args:[{name:"_inline_0_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_i","this_v"],localVars:[]},body:{body:"{if(_inline_1_arg1_<this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}});G.argmax=qe({args:["index","array","shape"],pre:{body:"{this_v=-Infinity;this_i=_inline_0_arg2_.slice(0)}",args:[{name:"_inline_0_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_i","this_v"],localVars:[]},body:{body:"{if(_inline_1_arg1_>this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}});G.random=pe({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"});G.assign=pe({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"});G.assigns=pe({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"});G.equals=qe({args:["array","array"],pre:da,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})});var th=Q(ve=>{"use strict";var Xs=32;ve.INT_BITS=Xs;ve.INT_MAX=2147483647;ve.INT_MIN=-1<<Xs-1;ve.sign=function(e){return(e>0)-(e<0)};ve.abs=function(e){var t=e>>Xs-1;return(e^t)-t};ve.min=function(e,t){return t^(e^t)&-(e<t)};ve.max=function(e,t){return e^(e^t)&-(e<t)};ve.isPow2=function(e){return!(e&e-1)&&!!e};ve.log2=function(e){var t,r;return t=(e>65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,t|=r,t|e>>1};ve.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0};ve.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function eh(e){var t=32;return e&=-e,e&&t--,e&65535&&(t-=16),e&16711935&&(t-=8),e&252645135&&(t-=4),e&858993459&&(t-=2),e&1431655765&&(t-=1),t}ve.countTrailingZeros=eh;ve.nextPow2=function(e){return e+=e===0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1};ve.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};ve.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var Gn=new Array(256);(function(e){for(var t=0;t<256;++t){var r=t,n=t,o=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=r&1,--o;e[t]=n<<o&255}})(Gn);ve.reverse=function(e){return Gn[e&255]<<24|Gn[e>>>8&255]<<16|Gn[e>>>16&255]<<8|Gn[e>>>24&255]};ve.interleave2=function(e,t){return e&=65535,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t&=65535,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1};ve.deinterleave2=function(e,t){return e=e>>>t&1431655765,e=(e|e>>>1)&858993459,e=(e|e>>>2)&252645135,e=(e|e>>>4)&16711935,e=(e|e>>>16)&65535,e<<16>>16};ve.interleave3=function(e,t,r){return e&=1023,e=(e|e<<16)&4278190335,e=(e|e<<8)&251719695,e=(e|e<<4)&3272356035,e=(e|e<<2)&1227133513,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,e|=t<<1,r&=1023,r=(r|r<<16)&4278190335,r=(r|r<<8)&251719695,r=(r|r<<4)&3272356035,r=(r|r<<2)&1227133513,e|r<<2};ve.deinterleave3=function(e,t){return e=e>>>t&1227133513,e=(e|e>>>2)&3272356035,e=(e|e>>>4)&251719695,e=(e|e>>>8)&4278190335,e=(e|e>>>16)&1023,e<<22>>22};ve.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>eh(e)+1}});var oh=Q((c4,nh)=>{"use strict";function rh(e,t,r){var n=e[r]|0;if(n<=0)return[];var o=new Array(n),a;if(r===e.length-1)for(a=0;a<n;++a)o[a]=t;else for(a=0;a<n;++a)o[a]=rh(e,t,r+1);return o}function O_(e,t){var r,n;for(r=new Array(e),n=0;n<e;++n)r[n]=t;return r}function L_(e,t){switch(typeof t=="undefined"&&(t=0),typeof e){case"number":if(e>0)return O_(e|0,t);break;case"object":if(typeof e.length=="number")return rh(e,t,0);break}return[]}nh.exports=L_});var sh=Q(ha=>{"use strict";ha.byteLength=N_;ha.toByteArray=B_;ha.fromByteArray=V_;var Ct=[],ot=[],F_=typeof Uint8Array!="undefined"?Uint8Array:Array,$s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
vendor: 23,515 bytes, line 2368
2368+/";for(mr=0,ah=$s.length;mr<ah;++mr)Ct[mr]=$s[mr],ot[$s.charCodeAt(mr)]=mr;var mr,ah;ot["-".charCodeAt(0)]=62;ot["_".charCodeAt(0)]=63;function ih(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function N_(e){var t=ih(e),r=t[0],n=t[1];return(r+n)*3/4-n}function Q_(e,t,r){return(t+r)*3/4-r}function B_(e){var t,r=ih(e),n=r[0],o=r[1],a=new F_(Q_(e,n,o)),i=0,l=o>0?n-4:n,c;for(c=0;c<l;c+=4)t=ot[e.charCodeAt(c)]<<18|ot[e.charCodeAt(c+1)]<<12|ot[e.charCodeAt(c+2)]<<6|ot[e.charCodeAt(c+3)],a[i++]=t>>16&255,a[i++]=t>>8&255,a[i++]=t&255;return o===2&&(t=ot[e.charCodeAt(c)]<<2|ot[e.charCodeAt(c+1)]>>4,a[i++]=t&255),o===1&&(t=ot[e.charCodeAt(c)]<<10|ot[e.charCodeAt(c+1)]<<4|ot[e.charCodeAt(c+2)]>>2,a[i++]=t>>8&255,a[i++]=t&255),a}function z_(e){return Ct[e>>18&63]+Ct[e>>12&63]+Ct[e>>6&63]+Ct[e&63]}function U_(e,t,r){for(var n,o=[],a=t;a<r;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),o.push(z_(n));return o.join("")}function V_(e){for(var t,r=e.length,n=r%3,o=[],a=16383,i=0,l=r-n;i<l;i+=a)o.push(U_(e,i,i+a>l?l:i+a));return n===1?(t=e[r-1],o.push(Ct[t>>2]+Ct[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],o.push(Ct[t>>10]+Ct[t>>4&63]+Ct[t<<2&63]+"=")),o.join("")}});var lh=Q(Ys=>{Ys.read=function(e,t,r,n,o){var a,i,l=o*8-n-1,c=(1<<l)-1,s=c>>1,u=-7,f=r?o-1:0,d=r?-1:1,p=e[t+f];for(f+=d,a=p&(1<<-u)-1,p>>=-u,u+=l;u>0;a=a*256+e[t+f],f+=d,u-=8);for(i=a&(1<<-u)-1,a>>=-u,u+=n;u>0;i=i*256+e[t+f],f+=d,u-=8);if(a===0)a=1-s;else{if(a===c)return i?NaN:(p?-1:1)*(1/0);i=i+Math.pow(2,n),a=a-s}return(p?-1:1)*i*Math.pow(2,a-n)};Ys.write=function(e,t,r,n,o,a){var i,l,c,s=a*8-o-1,u=(1<<s)-1,f=u>>1,d=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,m=n?1:-1,w=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,i=u):(i=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-i))<1&&(i--,c*=2),i+f>=1?t+=d/c:t+=d*Math.pow(2,1-f),t*c>=2&&(i++,c/=2),i+f>=u?(l=0,i=u):i+f>=1?(l=(t*c-1)*Math.pow(2,o),i=i+f):(l=t*Math.pow(2,f-1)*Math.pow(2,o),i=0));o>=8;e[r+p]=l&255,p+=m,l/=256,o-=8);for(i=i<<o|l,s+=o;s>0;e[r+p]=i&255,p+=m,i/=256,s-=8);e[r+p-m]|=w*128}});var Ah=Q(qr=>{"use strict";var Ks=sh(),Vr=lh(),uh=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;qr.Buffer=b;qr.SlowBuffer=$_;qr.INSPECT_MAX_BYTES=50;var pa=2147483647;qr.kMaxLength=pa;b.TYPED_ARRAY_SUPPORT=H_();!b.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function H_(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(b.prototype,"parent",{enumerable:!0,get:function(){if(b.isBuffer(this))return this.buffer}});Object.defineProperty(b.prototype,"offset",{enumerable:!0,get:function(){if(b.isBuffer(this))return this.byteOffset}});function Ot(e){if(e>pa)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,b.prototype),t}function b(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return tl(e)}return hh(e,t,r)}b.poolSize=8192;function hh(e,t,r){if(typeof e=="string")return W_(e,t);if(ArrayBuffer.isView(e))return G_(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(St(e,ArrayBuffer)||e&&St(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(St(e,SharedArrayBuffer)||e&&St(e.buffer,SharedArrayBuffer)))return Zs(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return b.from(n,t,r);let o=X_(e);if(o)return o;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return b.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}b.from=function(e,t,r){return hh(e,t,r)};Object.setPrototypeOf(b.prototype,Uint8Array.prototype);Object.setPrototypeOf(b,Uint8Array);function ph(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function q_(e,t,r){return ph(e),e<=0?Ot(e):t!==void 0?typeof r=="string"?Ot(e).fill(t,r):Ot(e).fill(t):Ot(e)}b.alloc=function(e,t,r){return q_(e,t,r)};function tl(e){return ph(e),Ot(e<0?0:rl(e)|0)}b.allocUnsafe=function(e){return tl(e)};b.allocUnsafeSlow=function(e){return tl(e)};function W_(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!b.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=mh(e,t)|0,n=Ot(r),o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}function Js(e){let t=e.length<0?0:rl(e.length)|0,r=Ot(t);for(let n=0;n<t;n+=1)r[n]=e[n]&255;return r}function G_(e){if(St(e,Uint8Array)){let t=new Uint8Array(e);return Zs(t.buffer,t.byteOffset,t.byteLength)}return Js(e)}function Zs(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return t===void 0&&r===void 0?n=new Uint8Array(e):r===void 0?n=new Uint8Array(e,t):n=new Uint8Array(e,t,r),Object.setPrototypeOf(n,b.prototype),n}function X_(e){if(b.isBuffer(e)){let t=rl(e.length)|0,r=Ot(t);return r.length===0||e.copy(r,0,0,t),r}if(e.length!==void 0)return typeof e.length!="number"||ol(e.length)?Ot(0):Js(e);if(e.type==="Buffer"&&Array.isArray(e.data))return Js(e.data)}function rl(e){if(e>=pa)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+pa.toString(16)+" bytes");return e|0}function $_(e){return+e!=e&&(e=0),b.alloc(+e)}b.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==b.prototype};b.compare=function(t,r){if(St(t,Uint8Array)&&(t=b.from(t,t.offset,t.byteLength)),St(r,Uint8Array)&&(r=b.from(r,r.offset,r.byteLength)),!b.isBuffer(t)||!b.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let n=t.length,o=r.length;for(let a=0,i=Math.min(n,o);a<i;++a)if(t[a]!==r[a]){n=t[a],o=r[a];break}return n<o?-1:o<n?1:0};b.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};b.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return b.alloc(0);let n;if(r===void 0)for(r=0,n=0;n<t.length;++n)r+=t[n].length;let o=b.allocUnsafe(r),a=0;for(n=0;n<t.length;++n){let i=t[n];if(St(i,Uint8Array))a+i.length>o.length?(b.isBuffer(i)||(i=b.from(i)),i.copy(o,a)):Uint8Array.prototype.set.call(o,i,a);else if(b.isBuffer(i))i.copy(o,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=i.length}return o};function mh(e,t){if(b.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||St(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return el(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Eh(e).length;default:if(o)return n?-1:el(e).length;t=(""+t).toLowerCase(),o=!0}}b.byteLength=mh;function Y_(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return iw(this,t,r);case"utf8":case"utf-8":return gh(this,t,r);case"ascii":return ow(this,t,r);case"latin1":case"binary":return aw(this,t,r);case"base64":return rw(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return sw(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}b.prototype._isBuffer=!0;function vr(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}b.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<t;r+=2)vr(this,r,r+1);return this};b.prototype.swap32=function(){let t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<t;r+=4)vr(this,r,r+3),vr(this,r+1,r+2);return this};b.prototype.swap64=function(){let t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<t;r+=8)vr(this,r,r+7),vr(this,r+1,r+6),vr(this,r+2,r+5),vr(this,r+3,r+4);return this};b.prototype.toString=function(){let t=this.length;return t===0?"":arguments.length===0?gh(this,0,t):Y_.apply(this,arguments)};b.prototype.toLocaleString=b.prototype.toString;b.prototype.equals=function(t){if(!b.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:b.compare(this,t)===0};b.prototype.inspect=function(){let t="",r=qr.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"};uh&&(b.prototype[uh]=b.prototype.inspect);b.prototype.compare=function(t,r,n,o,a){if(St(t,Uint8Array)&&(t=b.from(t,t.offset,t.byteLength)),!b.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),o===void 0&&(o=0),a===void 0&&(a=this.length),r<0||n>t.length||o<0||a>this.length)throw new RangeError("out of range index");if(o>=a&&r>=n)return 0;if(o>=a)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,o>>>=0,a>>>=0,this===t)return 0;let i=a-o,l=n-r,c=Math.min(i,l),s=this.slice(o,a),u=t.slice(r,n);for(let f=0;f<c;++f)if(s[f]!==u[f]){i=s[f],l=u[f];break}return i<l?-1:l<i?1:0};function vh(e,t,r,n,o){if(e.length===0)return-1;if(typeof r=="string"?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,ol(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0)if(o)r=0;else return-1;if(typeof t=="string"&&(t=b.from(t,n)),b.isBuffer(t))return t.length===0?-1:ch(e,t,r,n,o);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):ch(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function ch(e,t,r,n,o){let a=1,i=e.length,l=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;a=2,i/=2,l/=2,r/=2}function c(u,f){return a===1?u[f]:u.readUInt16BE(f*a)}let s;if(o){let u=-1;for(s=r;s<i;s++)if(c(e,s)===c(t,u===-1?0:s-u)){if(u===-1&&(u=s),s-u+1===l)return u*a}else u!==-1&&(s-=s-u),u=-1}else for(r+l>i&&(r=i-l),s=r;s>=0;s--){let u=!0;for(let f=0;f<l;f++)if(c(e,s+f)!==c(t,f)){u=!1;break}if(u)return s}return-1}b.prototype.includes=function(t,r,n){return this.indexOf(t,r,n)!==-1};b.prototype.indexOf=function(t,r,n){return vh(this,t,r,n,!0)};b.prototype.lastIndexOf=function(t,r,n){return vh(this,t,r,n,!1)};function K_(e,t,r,n){r=Number(r)||0;let o=e.length-r;n?(n=Number(n),n>o&&(n=o)):n=o;let a=t.length;n>a/2&&(n=a/2);let i;for(i=0;i<n;++i){let l=parseInt(t.substr(i*2,2),16);if(ol(l))return i;e[r+i]=l}return i}function J_(e,t,r,n){return ma(el(t,e.length-r),e,r,n)}function Z_(e,t,r,n){return ma(fw(t),e,r,n)}function ew(e,t,r,n){return ma(Eh(t),e,r,n)}function tw(e,t,r,n){return ma(dw(t,e.length-r),e,r,n)}b.prototype.write=function(t,r,n,o){if(r===void 0)o="utf8",n=this.length,r=0;else if(n===void 0&&typeof r=="string")o=r,n=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(n)?(n=n>>>0,o===void 0&&(o="utf8")):(o=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let a=this.length-r;if((n===void 0||n>a)&&(n=a),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");let i=!1;for(;;)switch(o){case"hex":return K_(this,t,r,n);case"utf8":case"utf-8":return J_(this,t,r,n);case"ascii":case"latin1":case"binary":return Z_(this,t,r,n);case"base64":return ew(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return tw(this,t,r,n);default:if(i)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),i=!0}};b.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function rw(e,t,r){return t===0&&r===e.length?Ks.fromByteArray(e):Ks.fromByteArray(e.slice(t,r))}function gh(e,t,r){r=Math.min(e.length,r);let n=[],o=t;for(;o<r;){let a=e[o],i=null,l=a>239?4:a>223?3:a>191?2:1;if(o+l<=r){let c,s,u,f;switch(l){case 1:a<128&&(i=a);break;case 2:c=e[o+1],(c&192)===128&&(f=(a&31)<<6|c&63,f>127&&(i=f));break;case 3:c=e[o+1],s=e[o+2],(c&192)===128&&(s&192)===128&&(f=(a&15)<<12|(c&63)<<6|s&63,f>2047&&(f<55296||f>57343)&&(i=f));break;case 4:c=e[o+1],s=e[o+2],u=e[o+3],(c&192)===128&&(s&192)===128&&(u&192)===128&&(f=(a&15)<<18|(c&63)<<12|(s&63)<<6|u&63,f>65535&&f<1114112&&(i=f))}}i===null?(i=65533,l=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|i&1023),n.push(i),o+=l}return nw(n)}var fh=4096;function nw(e){let t=e.length;if(t<=fh)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=fh));return r}function ow(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]&127);return n}function aw(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}function iw(e,t,r){let n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let a=t;a<r;++a)o+=hw[e[a]];return o}function sw(e,t,r){let n=e.slice(t,r),o="";for(let a=0;a<n.length-1;a+=2)o+=String.fromCharCode(n[a]+n[a+1]*256);return o}b.prototype.slice=function(t,r){let n=this.length;t=~~t,r=r===void 0?n:~~r,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),r<t&&(r=t);let o=this.subarray(t,r);return Object.setPrototypeOf(o,b.prototype),o};function xe(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}b.prototype.readUintLE=b.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||xe(t,r,this.length);let o=this[t],a=1,i=0;for(;++i<r&&(a*=256);)o+=this[t+i]*a;return o};b.prototype.readUintBE=b.prototype.readUIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||xe(t,r,this.length);let o=this[t+--r],a=1;for(;r>0&&(a*=256);)o+=this[t+--r]*a;return o};b.prototype.readUint8=b.prototype.readUInt8=function(t,r){return t=t>>>0,r||xe(t,1,this.length),this[t]};b.prototype.readUint16LE=b.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||xe(t,2,this.length),this[t]|this[t+1]<<8};b.prototype.readUint16BE=b.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||xe(t,2,this.length),this[t]<<8|this[t+1]};b.prototype.readUint32LE=b.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||xe(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};b.prototype.readUint32BE=b.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||xe(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};b.prototype.readBigUInt64LE=Wt(function(t){t=t>>>0,Hr(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Xn(t,this.length-8);let o=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,a=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(o)+(BigInt(a)<<BigInt(32))});b.prototype.readBigUInt64BE=Wt(function(t){t=t>>>0,Hr(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Xn(t,this.length-8);let o=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],a=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(o)<<BigInt(32))+BigInt(a)});b.prototype.readIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||xe(t,r,this.length);let o=this[t],a=1,i=0;for(;++i<r&&(a*=256);)o+=this[t+i]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*r)),o};b.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||xe(t,r,this.length);let o=r,a=1,i=this[t+--o];for(;o>0&&(a*=256);)i+=this[t+--o]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*r)),i};b.prototype.readInt8=function(t,r){return t=t>>>0,r||xe(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};b.prototype.readInt16LE=function(t,r){t=t>>>0,r||xe(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};b.prototype.readInt16BE=function(t,r){t=t>>>0,r||xe(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};b.prototype.readInt32LE=function(t,r){return t=t>>>0,r||xe(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};b.prototype.readInt32BE=function(t,r){return t=t>>>0,r||xe(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};b.prototype.readBigInt64LE=Wt(function(t){t=t>>>0,Hr(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Xn(t,this.length-8);let o=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(o)<<BigInt(32))+BigInt(r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24)});b.prototype.readBigInt64BE=Wt(function(t){t=t>>>0,Hr(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&Xn(t,this.length-8);let o=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(o)<<BigInt(32))+BigInt(this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n)});b.prototype.readFloatLE=function(t,r){return t=t>>>0,r||xe(t,4,this.length),Vr.read(this,t,!0,23,4)};b.prototype.readFloatBE=function(t,r){return t=t>>>0,r||xe(t,4,this.length),Vr.read(this,t,!1,23,4)};b.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||xe(t,8,this.length),Vr.read(this,t,!0,52,8)};b.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||xe(t,8,this.length),Vr.read(this,t,!1,52,8)};function We(e,t,r,n,o,a){if(!b.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}b.prototype.writeUintLE=b.prototype.writeUIntLE=function(t,r,n,o){if(t=+t,r=r>>>0,n=n>>>0,!o){let l=Math.pow(2,8*n)-1;We(this,t,r,n,l,0)}let a=1,i=0;for(this[r]=t&255;++i<n&&(a*=256);)this[r+i]=t/a&255;return r+n};b.prototype.writeUintBE=b.prototype.writeUIntBE=function(t,r,n,o){if(t=+t,r=r>>>0,n=n>>>0,!o){let l=Math.pow(2,8*n)-1;We(this,t,r,n,l,0)}let a=n-1,i=1;for(this[r+a]=t&255;--a>=0&&(i*=256);)this[r+a]=t/i&255;return r+n};b.prototype.writeUint8=b.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||We(this,t,r,1,255,0),this[r]=t&255,r+1};b.prototype.writeUint16LE=b.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||We(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};b.prototype.writeUint16BE=b.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||We(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};b.prototype.writeUint32LE=b.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||We(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};b.prototype.writeUint32BE=b.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||We(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function yh(e,t,r,n,o){Th(t,n,o,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a,a=a>>8,e[r++]=a;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i,r}function _h(e,t,r,n,o){Th(t,n,o,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a=a>>8,e[r+6]=a,a=a>>8,e[r+5]=a,a=a>>8,e[r+4]=a;let i=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=i,i=i>>8,e[r+2]=i,i=i>>8,e[r+1]=i,i=i>>8,e[r]=i,r+8}b.prototype.writeBigUInt64LE=Wt(function(t,r=0){return yh(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});b.prototype.writeBigUInt64BE=Wt(function(t,r=0){return _h(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});b.prototype.writeIntLE=function(t,r,n,o){if(t=+t,r=r>>>0,!o){let c=Math.pow(2,8*n-1);We(this,t,r,n,c-1,-c)}let a=0,i=1,l=0;for(this[r]=t&255;++a<n&&(i*=256);)t<0&&l===0&&this[r+a-1]!==0&&(l=1),this[r+a]=(t/i>>0)-l&255;return r+n};b.prototype.writeIntBE=function(t,r,n,o){if(t=+t,r=r>>>0,!o){let c=Math.pow(2,8*n-1);We(this,t,r,n,c-1,-c)}let a=n-1,i=1,l=0;for(this[r+a]=t&255;--a>=0&&(i*=256);)t<0&&l===0&&this[r+a+1]!==0&&(l=1),this[r+a]=(t/i>>0)-l&255;return r+n};b.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||We(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};b.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||We(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};b.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||We(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};b.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||We(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};b.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||We(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};b.prototype.writeBigInt64LE=Wt(function(t,r=0){return yh(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});b.prototype.writeBigInt64BE=Wt(function(t,r=0){return _h(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function wh(e,t,r,n,o,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function bh(e,t,r,n,o){return t=+t,r=r>>>0,o||wh(e,t,r,4,34028234663852886e22,-34028234663852886e22),Vr.write(e,t,r,n,23,4),r+4}b.prototype.writeFloatLE=function(t,r,n){return bh(this,t,r,!0,n)};b.prototype.writeFloatBE=function(t,r,n){return bh(this,t,r,!1,n)};function xh(e,t,r,n,o){return t=+t,r=r>>>0,o||wh(e,t,r,8,17976931348623157e292,-17976931348623157e292),Vr.write(e,t,r,n,52,8),r+8}b.prototype.writeDoubleLE=function(t,r,n){return xh(this,t,r,!0,n)};b.prototype.writeDoubleBE=function(t,r,n){return xh(this,t,r,!1,n)};b.prototype.copy=function(t,r,n,o){if(!b.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!o&&o!==0&&(o=this.length),r>=t.length&&(r=t.length),r||(r=0),o>0&&o<n&&(o=n),o===n||t.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-r<o-n&&(o=t.length-r+n);let a=o-n;return this===t&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,n,o):Uint8Array.prototype.set.call(t,this.subarray(n,o),r),a};b.prototype.fill=function(t,r,n,o){if(typeof t=="string"){if(typeof r=="string"?(o=r,r=0,n=this.length):typeof n=="string"&&(o=n,n=this.length),o!==void 0&&typeof o!="string")throw new TypeError("encoding must be a string");
2368if(typeof o=="string"&&!b.isEncoding(o))throw new TypeError("Unknown encoding: "+o);if(t.length===1){let i=t.charCodeAt(0);(o==="utf8"&&i<128||o==="latin1")&&(t=i)}}else typeof t=="number"?t=t&255:typeof t=="boolean"&&(t=Number(t));if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;r=r>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let a;if(typeof t=="number")for(a=r;a<n;++a)this[a]=t;else{let i=b.isBuffer(t)?t:b.from(t,o),l=i.length;if(l===0)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(a=0;a<n-r;++a)this[a+r]=i[a%l]}return this};var Ur={};function nl(e,t,r){Ur[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(o){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:o,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}nl("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);nl("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError);nl("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>2**32?o=dh(String(r)):typeof r=="bigint"&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=dh(o)),o+="n"),n+=` It must be ${t}. Received ${o}`,n},RangeError);function dh(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function lw(e,t,r){Hr(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Xn(t,e.length-(r+1))}function Th(e,t,r,n,o,a){if(e>r||e<t){let i=typeof t=="bigint"?"n":"",l;throw a>3?t===0||t===BigInt(0)?l=`>= 0${i} and < 2${i} ** ${(a+1)*8}${i}`:l=`>= -(2${i} ** ${(a+1)*8-1}${i}) and < 2 ** ${(a+1)*8-1}${i}`:l=`>= ${t}${i} and <= ${r}${i}`,new Ur.ERR_OUT_OF_RANGE("value",l,e)}lw(n,o,a)}function Hr(e,t){if(typeof e!="number")throw new Ur.ERR_INVALID_ARG_TYPE(t,"number",e)}function Xn(e,t,r){throw Math.floor(e)!==e?(Hr(e,r),new Ur.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Ur.ERR_BUFFER_OUT_OF_BOUNDS:new Ur.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var uw=/[^+/0-9A-Za-z-_]/g;function cw(e){if(e=e.split("=")[0],e=e.trim().replace(uw,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function el(e,t){t=t||1/0;let r,n=e.length,o=null,a=[];for(let i=0;i<n;++i){if(r=e.charCodeAt(i),r>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}else if(i+1===n){(t-=3)>-1&&a.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function fw(e){let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r)&255);return t}function dw(e,t){let r,n,o,a=[];for(let i=0;i<e.length&&!((t-=2)<0);++i)r=e.charCodeAt(i),n=r>>8,o=r%256,a.push(o),a.push(n);return a}function Eh(e){return Ks.toByteArray(cw(e))}function ma(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function St(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function ol(e){return e!==e}var hw=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function Wt(e){return typeof BigInt=="undefined"?pw:e}function pw(){throw new Error("BigInt not supported")}});var Bh=Q(Y=>{"use strict";var Gt=th(),Se=oh(),Ih=Ah().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:Se([32,0]),UINT16:Se([32,0]),UINT32:Se([32,0]),BIGUINT64:Se([32,0]),INT8:Se([32,0]),INT16:Se([32,0]),INT32:Se([32,0]),BIGINT64:Se([32,0]),FLOAT:Se([32,0]),DOUBLE:Se([32,0]),DATA:Se([32,0]),UINT8C:Se([32,0]),BUFFER:Se([32,0])});var mw=typeof Uint8ClampedArray!="undefined",vw=typeof BigUint64Array!="undefined",gw=typeof BigInt64Array!="undefined",ge=window.__TYPEDARRAY_POOL;ge.UINT8C||(ge.UINT8C=Se([32,0]));ge.BIGUINT64||(ge.BIGUINT64=Se([32,0]));ge.BIGINT64||(ge.BIGINT64=Se([32,0]));ge.BUFFER||(ge.BUFFER=Se([32,0]));var va=ge.DATA,ga=ge.BUFFER;Y.free=function(t){if(Ih.isBuffer(t))ga[Gt.log2(t.length)].push(t);else{if(Object.prototype.toString.call(t)!=="[object ArrayBuffer]"&&(t=t.buffer),!t)return;var r=t.length||t.byteLength,n=Gt.log2(r)|0;va[n].push(t)}};function Ch(e){if(e){var t=e.length||e.byteLength,r=Gt.log2(t);va[r].push(e)}}function yw(e){Ch(e.buffer)}Y.freeUint8=Y.freeUint16=Y.freeUint32=Y.freeBigUint64=Y.freeInt8=Y.freeInt16=Y.freeInt32=Y.freeBigInt64=Y.freeFloat32=Y.freeFloat=Y.freeFloat64=Y.freeDouble=Y.freeUint8Clamped=Y.freeDataView=yw;Y.freeArrayBuffer=Ch;Y.freeBuffer=function(t){ga[Gt.log2(t.length)].push(t)};Y.malloc=function(t,r){if(r===void 0||r==="arraybuffer")return Ge(t);switch(r){case"uint8":return al(t);case"uint16":return Sh(t);case"uint32":return Mh(t);case"int8":return Ph(t);case"int16":return Rh(t);case"int32":return jh(t);case"float":case"float32":return kh(t);case"double":case"float64":return Dh(t);case"uint8_clamped":return Oh(t);case"bigint64":return Fh(t);case"biguint64":return Lh(t);case"buffer":return Qh(t);case"data":case"dataview":return Nh(t);default:return null}return null};function Ge(t){var t=Gt.nextPow2(t),r=Gt.log2(t),n=va[r];return n.length>0?n.pop():new ArrayBuffer(t)}Y.mallocArrayBuffer=Ge;function al(e){return new Uint8Array(Ge(e),0,e)}Y.mallocUint8=al;function Sh(e){return new Uint16Array(Ge(2*e),0,e)}Y.mallocUint16=Sh;function Mh(e){return new Uint32Array(Ge(4*e),0,e)}Y.mallocUint32=Mh;function Ph(e){return new Int8Array(Ge(e),0,e)}Y.mallocInt8=Ph;function Rh(e){return new Int16Array(Ge(2*e),0,e)}Y.mallocInt16=Rh;function jh(e){return new Int32Array(Ge(4*e),0,e)}Y.mallocInt32=jh;function kh(e){return new Float32Array(Ge(4*e),0,e)}Y.mallocFloat32=Y.mallocFloat=kh;function Dh(e){return new Float64Array(Ge(8*e),0,e)}Y.mallocFloat64=Y.mallocDouble=Dh;function Oh(e){return mw?new Uint8ClampedArray(Ge(e),0,e):al(e)}Y.mallocUint8Clamped=Oh;function Lh(e){return vw?new BigUint64Array(Ge(8*e),0,e):null}Y.mallocBigUint64=Lh;function Fh(e){return gw?new BigInt64Array(Ge(8*e),0,e):null}Y.mallocBigInt64=Fh;function Nh(e){return new DataView(Ge(e),0,e)}Y.mallocDataView=Nh;function Qh(e){e=Gt.nextPow2(e);var t=Gt.log2(e),r=ga[t];return r.length>0?r.pop():new Ih(e)}Y.mallocBuffer=Qh;Y.clearCache=function(){for(var t=0;t<32;++t)ge.UINT8[t].length=0,ge.UINT16[t].length=0,ge.UINT32[t].length=0,ge.INT8[t].length=0,ge.INT16[t].length=0,ge.INT32[t].length=0,ge.FLOAT[t].length=0,ge.DOUBLE[t].length=0,ge.BIGUINT64[t].length=0,ge.BIGINT64[t].length=0,ge.UINT8C[t].length=0,va[t].length=0,ga[t].length=0}});var Wh=Q((v4,qh)=>{"use strict";var _a=Fd(),ll=Zd(),Wr=Bh();qh.exports=Tw;
vendor: 5,921 bytes, line 2368
2368var wa=null,sl=null,ya=null;function _w(e){wa=[e.LINEAR,e.NEAREST_MIPMAP_LINEAR,e.LINEAR_MIPMAP_NEAREST,e.LINEAR_MIPMAP_NEAREST],sl=[e.NEAREST,e.LINEAR,e.NEAREST_MIPMAP_NEAREST,e.NEAREST_MIPMAP_LINEAR,e.LINEAR_MIPMAP_NEAREST,e.LINEAR_MIPMAP_LINEAR],ya=[e.REPEAT,e.CLAMP_TO_EDGE,e.MIRRORED_REPEAT]}function Uh(e){return typeof HTMLCanvasElement!="undefined"&&e instanceof HTMLCanvasElement||typeof HTMLImageElement!="undefined"&&e instanceof HTMLImageElement||typeof HTMLVideoElement!="undefined"&&e instanceof HTMLVideoElement||typeof ImageData!="undefined"&&e instanceof ImageData}var Vh=function(e,t){ll.muls(e,t,255)};function il(e,t,r){var n=e.gl,o=n.getParameter(n.MAX_TEXTURE_SIZE);if(t<0||t>o||r<0||r>o)throw new Error("gl-texture2d: Invalid texture size");return e._shape=[t,r],e.bind(),n.texImage2D(n.TEXTURE_2D,0,e.format,t,r,0,e.format,e.type,null),e._mipLevels=[0],e}function ba(e,t,r,n,o,a){this.gl=e,this.handle=t,this.format=o,this.type=a,this._shape=[r,n],this._mipLevels=[0],this._magFilter=e.NEAREST,this._minFilter=e.NEAREST,this._wrapS=e.CLAMP_TO_EDGE,this._wrapT=e.CLAMP_TO_EDGE,this._anisoSamples=1;var i=this,l=[this._wrapS,this._wrapT];Object.defineProperties(l,[{get:function(){return i._wrapS},set:function(s){return i.wrapS=s}},{get:function(){return i._wrapT},set:function(s){return i.wrapT=s}}]),this._wrapVector=l;var c=[this._shape[0],this._shape[1]];Object.defineProperties(c,[{get:function(){return i._shape[0]},set:function(s){return i.width=s}},{get:function(){return i._shape[1]},set:function(s){return i.height=s}}]),this._shapeVector=c}var $n=ba.prototype;Object.defineProperties($n,{minFilter:{get:function(){return this._minFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&wa.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),sl.indexOf(e)<0)throw new Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,e),this._minFilter=e}},magFilter:{get:function(){return this._magFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&wa.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),sl.indexOf(e)<0)throw new Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,e),this._magFilter=e}},mipSamples:{get:function(){return this._anisoSamples},set:function(e){var t=this._anisoSamples;if(this._anisoSamples=Math.max(e,1)|0,t!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(e){if(this.bind(),ya.indexOf(e)<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,e),this._wrapS=e}},wrapT:{get:function(){return this._wrapT},set:function(e){if(this.bind(),ya.indexOf(e)<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,e),this._wrapT=e}},wrap:{get:function(){return this._wrapVector},set:function(e){if(Array.isArray(e)||(e=[e,e]),e.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var t=0;t<2;++t)if(ya.indexOf(e[t])<0)throw new Error("gl-texture2d: Unknown wrap mode "+e);this._wrapS=e[0],this._wrapT=e[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),e}},shape:{get:function(){return this._shapeVector},set:function(e){if(!Array.isArray(e))e=[e|0,e|0];else if(e.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return il(this,e[0]|0,e[1]|0),[e[0]|0,e[1]|0]}},width:{get:function(){return this._shape[0]},set:function(e){return e=e|0,il(this,e,this._shape[1]),e}},height:{get:function(){return this._shape[1]},set:function(e){return e=e|0,il(this,this._shape[0],e),e}}});$n.bind=function(e){var t=this.gl;return e!==void 0&&t.activeTexture(t.TEXTURE0+(e|0)),t.bindTexture(t.TEXTURE_2D,this.handle),e!==void 0?e|0:t.getParameter(t.ACTIVE_TEXTURE)-t.TEXTURE0};$n.dispose=function(){this.gl.deleteTexture(this.handle)};$n.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var e=Math.min(this._shape[0],this._shape[1]),t=0;e>0;++t,e>>>=1)this._mipLevels.indexOf(t)<0&&this._mipLevels.push(t)};$n.setPixels=function(e,t,r,n){var o=this.gl;this.bind(),Array.isArray(t)?(n=r,r=t[1]|0,t=t[0]|0):(t=t||0,r=r||0),n=n||0;var a=Uh(e)?e:e.raw;if(a){var i=this._mipLevels.indexOf(n)<0;i?(o.texImage2D(o.TEXTURE_2D,0,this.format,this.format,this.type,a),this._mipLevels.push(n)):o.texSubImage2D(o.TEXTURE_2D,n,t,r,this.format,this.type,a)}else if(e.shape&&e.stride&&e.data){if(e.shape.length<2||t+e.shape[1]>this._shape[1]>>>n||r+e.shape[0]>this._shape[0]>>>n||t<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");ww(o,t,r,n,this.format,this.type,this._mipLevels,e)}else throw new Error("gl-texture2d: Unsupported data type")};function Hh(e,t){return e.length===3?t[2]===1&&t[1]===e[0]*e[2]&&t[0]===e[2]:t[0]===1&&t[1]===e[0]}function ww(e,t,r,n,o,a,i,l){var c=l.dtype,s=l.shape.slice();if(s.length<2||s.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var u=0,f=0,d=Hh(s,l.stride.slice());c==="float32"?u=e.FLOAT:c==="float64"?(u=e.FLOAT,d=!1,c="float32"):c==="uint8"?u=e.UNSIGNED_BYTE:(u=e.UNSIGNED_BYTE,d=!1,c="uint8");var p=1;if(s.length===2)f=e.LUMINANCE,s=[s[0],s[1],1],l=_a(l.data,s,[l.stride[0],l.stride[1],1],l.offset);else if(s.length===3){if(s[2]===1)f=e.ALPHA;else if(s[2]===2)f=e.LUMINANCE_ALPHA;else if(s[2]===3)f=e.RGB;else if(s[2]===4)f=e.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");p=s[2]}else throw new Error("gl-texture2d: Invalid shape for texture");
2368if((f===e.LUMINANCE||f===e.ALPHA)&&(o===e.LUMINANCE||o===e.ALPHA)&&(f=o),f!==o)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var m=l.size,w=i.indexOf(n)<0;if(w&&i.push(n),u===a&&d)l.offset===0&&l.data.length===m?w?e.texImage2D(e.TEXTURE_2D,n,o,s[0],s[1],0,o,a,l.data):e.texSubImage2D(e.TEXTURE_2D,n,t,r,s[0],s[1],o,a,l.data):w?e.texImage2D(e.TEXTURE_2D,n,o,s[0],s[1],0,o,a,l.data.subarray(l.offset,l.offset+m)):e.texSubImage2D(e.TEXTURE_2D,n,t,r,s[0],s[1],o,a,l.data.subarray(l.offset,l.offset+m));else{var y;a===e.FLOAT?y=Wr.mallocFloat32(m):y=Wr.mallocUint8(m);var I=_a(y,s,[s[2],s[2]*s[0],1]);u===e.FLOAT&&a===e.UNSIGNED_BYTE?Vh(I,l):ll.assign(I,l),w?e.texImage2D(e.TEXTURE_2D,n,o,s[0],s[1],0,o,a,y.subarray(0,m)):e.texSubImage2D(e.TEXTURE_2D,n,t,r,s[0],s[1],o,a,y.subarray(0,m)),a===e.FLOAT?Wr.freeFloat32(y):Wr.freeUint8(y)}}function ul(e){var t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t}function zh(e,t,r,n,o){var a=e.getParameter(e.MAX_TEXTURE_SIZE);if(t<0||t>a||r<0||r>a)throw new Error("gl-texture2d: Invalid texture shape");if(o===e.FLOAT&&!e.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var i=ul(e);return e.texImage2D(e.TEXTURE_2D,0,n,t,r,0,n,o,null),new ba(e,i,t,r,n,o)}function bw(e,t,r,n,o,a){var i=ul(e);return e.texImage2D(e.TEXTURE_2D,0,o,o,a,t),new ba(e,i,r,n,o,a)}function xw(e,t){var r=t.dtype,n=t.shape.slice(),o=e.getParameter(e.MAX_TEXTURE_SIZE);if(n[0]<0||n[0]>o||n[1]<0||n[1]>o)throw new Error("gl-texture2d: Invalid texture size");var a=Hh(n,t.stride.slice()),i=0;r==="float32"?i=e.FLOAT:r==="float64"?(i=e.FLOAT,a=!1,r="float32"):r==="uint8"?i=e.UNSIGNED_BYTE:(i=e.UNSIGNED_BYTE,a=!1,r="uint8");var l=0;if(n.length===2)l=e.LUMINANCE,n=[n[0],n[1],1],t=_a(t.data,n,[t.stride[0],t.stride[1],1],t.offset);else if(n.length===3)if(n[2]===1)l=e.ALPHA;else if(n[2]===2)l=e.LUMINANCE_ALPHA;else if(n[2]===3)l=e.RGB;else if(n[2]===4)l=e.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");i===e.FLOAT&&!e.getExtension("OES_texture_float")&&(i=e.UNSIGNED_BYTE,a=!1);var c,s,u=t.size;if(a)t.offset===0&&t.data.length===u?c=t.data:c=t.data.subarray(t.offset,t.offset+u);else{var f=[n[2],n[2]*n[0],1];s=Wr.malloc(u,r);var d=_a(s,n,f,0);(r==="float32"||r==="float64")&&i===e.UNSIGNED_BYTE?Vh(d,t):ll.assign(d,t),c=s.subarray(0,u)}var p=ul(e);return e.texImage2D(e.TEXTURE_2D,0,l,n[0],n[1],0,l,i,c),a||Wr.free(s),new ba(e,p,n[0],n[1],l,i)}function Tw(e){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(wa||_w(e),typeof arguments[1]=="number")return zh(e,arguments[1],arguments[2],arguments[3]||e.RGBA,arguments[4]||e.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return zh(e,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||e.RGBA,arguments[3]||e.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var t=arguments[1],r=Uh(t)?t:t.raw;if(r)return bw(e,r,t.width|0,t.height|0,arguments[2]||e.RGBA,arguments[3]||e.UNSIGNED_BYTE);if(t.shape&&t.data&&t.stride)return xw(e,t)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}});var Ap=Q((pl,ml)=>{(function(e,t){typeof pl=="object"&&typeof ml!="undefined"?ml.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis!="undefined"?globalThis:e||self,e["micro-memoize"]=t())})(pl,function(){"use strict";var e={isEqual:!0,isMatchingKey:!0,isPromise:!0,maxSize:!0,onCacheAdd:!0,onCacheChange:!0,onCacheHit:!0,transformKey:!0},t=Array.prototype.slice;function r(s){var u=s.length;return u?u===1?[s[0]]:u===2?[s[0],s[1]]:u===3?[s[0],s[1],s[2]]:t.call(s,0):[]}function n(s){var u={};for(var f in s)e[f]||(u[f]=s[f]);return u}function o(s){return typeof s=="function"&&s.isMemoized}function a(s,u){return s===u||s!==s&&u!==u}function i(s,u){var f={};for(var d in s)f[d]=s[d];for(var d in u)f[d]=u[d];return f}var l=function(){function s(u){this.keys=[],this.values=[],this.options=u;var f=typeof u.isMatchingKey=="function";f?this.getKeyIndex=this._getKeyIndexFromMatchingKey:u.maxSize>1?this.getKeyIndex=this._getKeyIndexForMany:this.getKeyIndex=this._getKeyIndexForSingle,this.canTransformKey=typeof u.transformKey=="function",this.shouldCloneArguments=this.canTransformKey||f,this.shouldUpdateOnAdd=typeof u.onCacheAdd=="function",this.shouldUpdateOnChange=typeof u.onCacheChange=="function",this.shouldUpdateOnHit=typeof u.onCacheHit=="function"}return Object.defineProperty(s.prototype,"size",{get:function(){return this.keys.length}
2368,enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"snapshot",{get:function(){return{keys:r(this.keys),size:this.size,values:r(this.values)}},enumerable:!1,configurable:!0}),s.prototype._getKeyIndexFromMatchingKey=function(u){var f=this.options,d=f.isMatchingKey,p=f.maxSize,m=this.keys,w=m.length;if(!w)return-1;if(d(m[0],u))return 0;if(p>1){for(var y=1;y<w;y++)if(d(m[y],u))return y}return-1},s.prototype._getKeyIndexForMany=function(u){var f=this.options.isEqual,d=this.keys,p=d.length;if(!p)return-1;if(p===1)return this._getKeyIndexForSingle(u);var m=u.length,w,y;if(m>1){for(var I=0;I<p;I++)if(w=d[I],w.length===m){for(y=0;y<m&&f(w[y],u[y]);y++);if(y===m)return I}}else for(var I=0;I<p;I++)if(w=d[I],w.length===m&&f(w[0],u[0]))return I;return-1},s.prototype._getKeyIndexForSingle=function(u){var f=this.keys;if(!f.length)return-1;var d=f[0],p=d.length;if(u.length!==p)return-1;var m=this.options.isEqual;if(p>1){for(var w=0;w<p;w++)if(!m(d[w],u[w]))return-1;return 0}return m(d[0],u[0])?0:-1},s.prototype.orderByLru=function(u,f,d){for(var p=this.keys,m=this.values,w=p.length,y=d;y--;)p[y+1]=p[y],m[y+1]=m[y];p[0]=u,m[0]=f;var I=this.options.maxSize;w===I&&d===w?(p.pop(),m.pop()):d>=I&&(p.length=m.length=I)},s.prototype.updateAsyncCache=function(u){var f=this,d=this.options,p=d.onCacheChange,m=d.onCacheHit,w=this.keys[0],y=this.values[0];this.values[0]=y.then(function(I){return f.shouldUpdateOnHit&&m(f,f.options,u),f.shouldUpdateOnChange&&p(f,f.options,u),I},function(I){var j=f.getKeyIndex(w);throw j!==-1&&(f.keys.splice(j,1),f.values.splice(j,1)),I})},s}();function c(s,u){if(u===void 0&&(u={}),o(s))return c(s.fn,i(s.options,u));if(typeof s!="function")throw new TypeError("You must pass a function to `memoize`.");var f=u.isEqual,d=f===void 0?a:f,p=u.isMatchingKey,m=u.isPromise,w=m===void 0?!1:m,y=u.maxSize,I=y===void 0?1:y,j=u.onCacheAdd,q=u.onCacheChange,F=u.onCacheHit,N=u.transformKey,L=i({isEqual:d,isMatchingKey:p,isPromise:w,maxSize:I,onCacheAdd:j,onCacheChange:q,onCacheHit:F,transformKey:N},n(u)),W=new l(L),B=W.keys,U=W.values,ie=W.canTransformKey,he=W.shouldCloneArguments,ye=W.shouldUpdateOnAdd,be=W.shouldUpdateOnChange,E=W.shouldUpdateOnHit,A=function(){var h=he?r(arguments):arguments;ie&&(h=N(h));var S=B.length?W.getKeyIndex(h):-1;if(S!==-1)E&&F(W,L,A),S&&(W.orderByLru(B[S],U[S],S),be&&q(W,L,A));else{var O=s.apply(this,arguments),k=he?h:r(arguments);W.orderByLru(k,O,B.length),w&&W.updateAsyncCache(A),ye&&j(W,L,A),be&&q(W,L,A)}return U[0]};return A.cache=W,A.fn=s,A.isMemoized=!0,A.options=L,A}return c})});var Yp={triggerNewProjectPageLayoutObj:function(e){window.laytheme.trigger("newprojectpagelayoutobj",e),window.Frontend.GlobalEvents.trigger("newprojectpagelayoutobj",e)},triggerProjectPageShown:function(){window.laytheme.trigger("projectpageshown"),window.Frontend.GlobalEvents.trigger("projectpageshown")},triggerNewPage:function(e,t,r){window.laytheme.trigger("newpage",e,t,r),window.Frontend.GlobalEvents.trigger("newpage",e,t,r)},triggerNewPageShown:function(e,t,r){console.log("trigger new page shown"),window.laytheme.trigger("newpageshown",e,t,r),window.Frontend.GlobalEvents.trigger("newpageshown",e,t,r)},triggerSwitchedDesktopLayoutToCustomPhoneLayout:function(){window.laytheme.trigger("switched_desktoplayout_to_customphonelayout")},triggerSwitchedCustomPhoneLayoutToDesktopLayout:function(){window.laytheme.trigger("switched_customphonelayout_to_desktoplayout")},triggerGridShown:function(e,t,r,n){window.laytheme.trigger("gridshown",e,t,r,n)},triggerSizeChanged:function(e){window.laytheme.trigger("sizechanged",e)},triggerPushState:function(){window.laytheme.trigger("pushstate")}},Mt=Yp;var _r=$t(Cl());var eo=function(e){if(e.hasClass("setsizes")){if(e.attr("sizes")==""){var t=e[0].getBoundingClientRect(),r=yr(t.width);jQuery(this).attr("sizes",r+"px").attr("data-sizes",r+"px")}var n=e.attr("data-srcset");e.attr({srcset:n})}else if(e.hasClass("lay-gif")||e.hasClass("lay-image-original")){var o=e.attr("data-src");e.attr("src",o)}},Sl=function(e,t=0){var r=jQuery("html").hasClass("fp-enabled");if(!r||r&&jQuery(e).closest(".row").length>0&&window.getComputedStyle(jQuery(e).closest(".row")[0]).visibility!="hidden"){var n=e.getBoundingClientRect();if(n.bottom>0&&n.top<window.innerHeight+t&&n.right>0&&n.left<window.innerWidth)return!0}return!1},Kp=function(e,t,r){return e==!0};function Jp(e){var t=e,r=[],n=[],o=[],a=function(){var l=t.find("img.setsizes, img.lay-gif, img.lay-image-original");l.each(function(){Sl(this)?(r.push(this),n.push(!1)):o.push(this)});for(var c=0;c<r.length;c++)(function(u){var f=jQuery(r[u]);eo(f),f[0].complete?n[u]=!0:(f[0].addEventListener("load",function(){n[u]=!0}),f[0].addEventListener("error",function(){n[u]=!0}))})(c);if(r.length>0)var s=setInterval(function(){n.every(Kp)&&(i(),clearInterval(s))},30);else i()},i=function(){for(var l=0;l<o.length;l++){var c=jQuery(o[l]);eo(c)}};return{loadImages:a}}var Zp=function(e){if(e.length>0)if(g.isTouchDevice){var t=e.find("img.setsizes, img.lay-gif, img.lay-image-original");t.each(function(){eo(jQuery(this))})}else{var r=new Jp(e);r.loadImages()}}
2368,_t={initLoadImages:Zp,loadImage:eo,isInsideViewportHeight:Sl};var ka=Backbone.Radio.channel("events");window.lazySizes={loader:{unveil:function(e){}}};var em=function(){window.laytheme.on("newpageshown",function(){let e=document.querySelector("body>.lay-content #footer-region");e&&e.addEventListener("scroll",()=>{ka.trigger("scroll")});let t=document.querySelector("body>.lay-content #grid");t&&t.addEventListener("scroll",()=>{ka.trigger("scroll")})})},M={initModule:function(){Ml(),jQuery(window).trigger("window_width_changed",Ml),mm(),om(),em(),vm(),gm(),Dl(),kl(),pm(),wm(),ym(),_m(),tm(),nm()},map:function(e,t,r,n,o){return hm(e,t,r,n,o)},filterURL:function(e){return to(e)},isInternUrl:function(e){return lm(e)},stringStartsWith:function(e,t){return im(e,t)},fixBody:function(){bm()},unfixBody:function(){xm()},stringifyCatIds:function(e){return Rl(e)},parseIdsString:function(e){return am(e)},fadeInImageOnLoadViaParent:function(e){Da(e)},setSrcAndSrcSetViaParent:function(e){jl(e)},setBodyClasses:function(e){dm(e)},setImageSizesAttribute:function(e){Jr(e)},getImageSrcAndSrcSet:function(e){return rm(e)}},g={orientation:window.innerWidth>window.innerHeight?"landscape":"portrait",previousOrientation:window.innerWidth>window.innerHeight?"landscape":"portrait",isPhoneSize:null,isDesktopSize:null,isTabletSize:null,isNotPhoneSize:null,screenSize:null,breakpoint:parseInt(frontendPassedData.breakpoint,10),tabletBreakpoint:parseInt(frontendPassedData.tabletbreakpoint,10),phoneBreakpoint:parseInt(frontendPassedData.breakpoint,10),isTouchDevice:!1,supportsPlaysInline:!1,showOriginalImages:frontendPassedData.misc_options_showoriginalimages=="on",imageSizes:["265","512","768","1024","1280","1920","2560","3200","3840","4096"]};window.layUpdateImageSizes=function(){Jr(),window.lazyLoadInstance!=null&&window.lazyLoadInstance.update()};var ja=function(){setTimeout(function(){window.lazyLoadInstance==null?window.lazyLoadInstance=new _r.default({elements_selector:".lazyload",class_loaded:"lazyloaded",class_error:"loaded-error",class_loading:"lazyloading"}):window.lazyLoadInstance.update()},0)},tm=function(){window.laytheme.on("newpageshown",function(e,t,r){Jr(),fm(),ja(),Da(),cm()}),window.laytheme.on("searchresultshown",function(){var e=jQuery("#search-region");Jr(e),jl(e),Da(e),ja()}),jQuery(document.body).on("updated_cart_totals",function(){ja()})},Me=function(e){var t=void 0;switch(e){case"desktop":{var r=[];jQuery(".lay-content").each(function(){r=r.concat(Array.from(this.querySelectorAll("#grid, .cover-region-desktop, #footer")))}),r=r.concat(Array.from(document.querySelectorAll("#lay-woocommerce"))),t=jQuery(r);break}case"phone":{var r=[];jQuery(".lay-content").each(function(){var o=jQuery(this).find("#footer-custom-phone-grid").length!=0,a=jQuery(this).find("#custom-phone-grid").length!=0;o&&a?r=r.concat(Array.from(this.querySelectorAll("#custom-phone-grid, .cover-region-phone, #footer-custom-phone-grid"))):!o&&a?r=r.concat(Array.from(this.querySelectorAll("#custom-phone-grid, .cover-region-phone, #footer"))):o&&!a?r=r.concat(Array.from(this.querySelectorAll("#grid, .cover-region-desktop, #footer-custom-phone-grid"))):!o&&!a&&(r=r.concat(Array.from(this.querySelectorAll("#grid, .cover-region-desktop, #footer"))))}),r=r.concat(Array.from(document.querySelectorAll("#lay-woocommerce"))),t=jQuery(r);break}}return t},Ml=function(){let e=window.innerWidth-document.body.clientWidth;document.body.style.setProperty("--scrollbarWidth",e+"px")},rm=function(e){var t="",r="",n=e.sizes.full;n=to(n);var o=["_265","_512","_768","_1024","_1280","_1920","_2560","_3200","_3840","_4096"],a=e.sizes;for(var i in a)if(i!="full"){var l=a[i];l=to(l),t=l+" "+i.substring(1)+"w, "+t;var c=o.indexOf(i);c!==-1&&o.splice(c,1)}for(var s=0;s<o.length;s++)t+=n+" "+o[s].substring(1)+"w, ";t=t.slice(0,-2);var u=a.hasOwnProperty("_265")!=-1?a._265:!1;return u==""||u==!1?r=n:r=u,r=to(r),{src:r,srcset:t}},nm=function(){jQuery(window).on("fpAfterRender",function(){setTimeout(function(){La()},0)})},Da=function(e){typeof e=="undefined"&&(e=jQuery(".lay-content")),e.find("img.setsizes, img.lay-gif, img.lay-image-original").each(function(){var t=this;t.complete?t.classList.add("loaded"):t.addEventListener("load",function(){t.classList.add("loaded")})})},om=function(){var e=0;jQuery(document).on("scroll",()=>{ka.trigger("scroll"),window.scrollY>e?document.body.classList.add("lay-scrolled-down"):document.body.classList.remove("lay-scrolled-down"),e=window.scrollY})},Rl=function(e){if(e==""||typeof e=="undefined"||e==null)return"[]";if(typeof e=="string")return e;for(var t=0;t<e.length;t++)e[t]=parseInt(e[t],10);return JSON.stringify(e)},am=function(t){if(t==""||typeof t=="undefined"||t==null)return[];if(Array.isArray(t))return t;for(var t=JSON.parse(t),r=0;r<t.length;r++)t[r]=parseInt(t[r],10);return t},im=function(e,t){return e.slice(0,t.length).toLowerCase()==t.toLowerCase()},sm=function(e,t,r){if(t.indexOf("*")===-1)return e.removeClass(t),r?e.addClass(r):e;var n=new RegExp("\\s"+t.replace(/\*/g,"[A-Za-z0-9-_]+").split(" ").join("\\s|\\s")+"\\s","g");return e.each(function(o,a){for(var i=" "+a.className+" ";n.test(i);)i=i.replace(n," ");a.className=jQuery.trim(i)}),r?e.addClass(r):e},lm=function(e){var t=frontendPassedData.siteUrl;t.startsWith("http://")?t=t.substr(7):t.startsWith("https://")&&(t=t.
2368substr(8)),t.startsWith("www.")&&(t=t.substr(4));var r=e;if(r.startsWith("http://")?r=r.substr(7):r.startsWith("https://")&&(r=r.substr(8)),r.startsWith("www.")&&(r=r.substr(4)),r.startsWith(t))return!0},to=function(e){if(e!==null&&e!=""&&typeof e!="undefined"){if(e.indexOf("cloudfront.net")!==-1)return e;e=um(e);var t=e.substring(0,5);if(t=="http:"&&frontendPassedData.is_ssl==!0){var r=e.substring(5);e="https:"+r}else if(t=="https"&&(frontendPassedData.is_ssl==!1||frontendPassedData.is_ssl=="")){var r=e.substring(5);e="http"+r}if(frontendPassedData.has_www==1){if(frontendPassedData.is_ssl==!0){if(e.substring(0,12)!="https://www."){var r=e.substring(8);e="https://www."+r}}else if(e.substring(0,11)!="http://www."){var r=e.substring(7);e="http://www."+r}}else if(frontendPassedData.is_ssl==!0){if(e.substring(0,12)=="https://www."){var r=e.substring(12);e="https://"+r}}else if(e.substring(0,11)=="http://www."){var r=e.substring(11);e="http://"+r}}return e},um=function(e){return e.startsWith("mailto:")||e.startsWith("#")||e.startsWith("tel:")?e:e.substr(0,1)=="/"?frontendPassedData.siteUrl+e:e},cm=function(){setTimeout(function(){typeof window.instgrm!="undefined"&&window.instgrm.Embeds.process()},0)},fm=function(){},jl=function(e){e.find("img.setsizes").each(function(){var t=jQuery(this).attr("data-srcset"),r=jQuery(this).attr("data-src");jQuery(this).attr({src:r,srcset:t})}),e.find("img.lay-gif, img.lay-image-original").each(function(){var t=jQuery(this).attr("data-src");jQuery(this).attr("src",t)})},Jr=function(e){typeof e=="undefined"&&(e=jQuery("body")),e.find("img.setsizes:not(img.setsizes-objectfit-cover), img.lazyload").each(function(){var t=this.getBoundingClientRect().width;if(t==0){var r=jQuery(this).attr("data-ar"),n=this.clientHeight;t=n/r}if(jQuery(this).attr("data-parent-fit")=="cover"){var t=parseInt(jQuery(this).attr("data-w"),10),n=parseInt(jQuery(this).attr("data-h"),10),o=this.parentNode.getBoundingClientRect();if(t/n<o.width/o.height)t=o.width;else{var a=o.height;t=t/n*a}}t=yr(t),jQuery(this).attr("sizes",t+"px").attr("data-sizes",t+"px")}),La()},yr=function(e){for(var t=[265,512,768,1024,1280,1920,2560,3200,3840,4096],r=e,n,n=0;n<t.length;n++)if(t[n]>=e){r=t[n];break}return r},La=function(e){typeof e=="undefined"&&(e=jQuery("body")),e.find(".background-image img.setsizes.setsizes-objectfit-cover").each(function(){var t=this.parentNode.getBoundingClientRect(),r=parseInt(jQuery(this).attr("data-w"),10),n=parseInt(jQuery(this).attr("data-h"),10),o=0;if(r/n<t.width/t.height)o=t.width;else{var a=t.height;o=n/r*a}o=yr(o),jQuery(this).attr("sizes",parseInt(o,10)+"px")})},dm=function(e){var t="type-"+e.type+" id-"+e.id+" slug-"+e.slug+" page-id-"+e.id+" postid-"+e.id;if(typeof e.catid!="undefined")for(var r=0;r<e.catid.length;r++)t+=" category-"+e.catid[r]+" ";sm(jQuery("body"),"type-* id-* slug-* page-id-* postid-* category-*",t),jQuery("body").attr({"data-type":e.type,"data-id":e.id,"data-slug":e.slug,"data-catid":Rl(e.catid),"data-footerid":e.footerid});var n=window.location.href,o=n.substring(n.length-1),a=frontendPassedData.siteUrl.substring(frontendPassedData.siteUrl.length-1);o=="/"&&a!="/"&&(n=n.slice(0,-1)),n==frontendPassedData.siteUrl?jQuery("body").addClass("home"):jQuery("body").removeClass("home")},hm=function(e,t,r,n,o){return n+(o-n)*((e-t)/(r-t))},pm=function(){g.isTouchDevice=navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/),g.isTouchDevice==null&&(g.isTouchDevice=!1)},mm=function(){var e=window.innerWidth;jQuery(window).on("resize",function(){e!=window.innerWidth&&jQuery(window).trigger("window_width_changed"),e=window.innerWidth})},vm=function(){jQuery(window).on("orientationchange window_width_changed",function(){Dl(),kl()}),jQuery(window).on("window_width_changed",_.debounce(function(){Jr()},300))},kl=function(){g.orientation=window.innerWidth>window.innerHeight?"landscape":"portrait",g.orientation!=g.previousOrientation&&window.laytheme.trigger("orientationchanged",g.orientation),g.previousOrientation=g.orientation},gm=function(){window.innerWidth<=g.phoneBreakpoint?g.screenSize="phone":window.innerWidth<=g.tabletBreakp
2368oint?g.screenSize="tablet":g.screenSize="desktop"},Dl=function(){var e=g.screenSize;switch(window.innerWidth<=g.phoneBreakpoint?g.screenSize="phone":window.innerWidth<=g.tabletBreakpoint?g.screenSize="tablet":g.screenSize="desktop",g.screenSize){case"desktop":jQuery("html").addClass("desktop-size").removeClass("tablet-size phone-size"),g.isPhoneSize=!1,g.isTabletSize=!1,g.isDesktopSize=!0,g.isDesktopOrTabletSize=!0;break;case"tablet":jQuery("html").addClass("tablet-size").removeClass("desktop-size phone-size"),g.isPhoneSize=!1,g.isTabletSize=!0,g.isDesktopSize=!1,g.isDesktopOrTabletSize=!0;break;case"phone":jQuery("html").addClass("phone-size").removeClass("desktop-size tablet-size"),g.isPhoneSize=!0,g.isTabletSize=!1,g.isDesktopSize=!1,g.isDesktopOrTabletSize=!1;break}e!=g.screenSize&&Mt.triggerSizeChanged(g.screenSize)},ym=function(){frontendPassedData.image_loading=="instant_load"&&window.laytheme.on("newpageshown",function(){var e=jQuery(".img img.lazyload, .thumb img.lazyload, .background-image img.lazyload").get();e.forEach(function(t){window.lazyLoadInstance&&_r.default.load&&_r.default.load(t)}),setTimeout(function(){var t=jQuery(".lay-carousel-slide.is-selected img").get();t.forEach(function(r){window.lazyLoadInstance&&_r.default.load&&_r.default.load(r)})},200)})},_m=function(){Modernizr.objectfit||(window.laytheme.on("newpageshown",Pl),jQuery(window).on("resize orientationchange",Pl))},Pl=function(){setTimeout(function(){jQuery(".background-image img").each(function(){var e=jQuery(this).attr("data-ar"),t=this.parentNode.getBoundingClientRect(),r=t.height/t.width;typeof e!="undefined"?e>r?(this.classList.add("bgw100"),this.classList.remove("bgh100")):(this.classList.add("bgh100"),this.classList.remove("bgw100")):(this.classList.add("bgw100"),this.classList.remove("bgh100"))}),La(),jQuery(".background-video video").each(function(){var e=jQuery(this).attr("data-ar"),t=this.parentNode.getBoundingClientRect(),r=t.height/t.width;typeof e!="undefined"?e>r?(this.classList.add("w100"),this.classList.remove("h100")):(this.classList.add("h100"),this.classList.remove("w100")):(this.classList.add("w100"),this.classList.remove("h100"))})},0)},wm=function(){if(g.supportsPlaysInline=!1,g.isTouchDevice){var e=new MobileDetect(window.navigator.userAgent);if(e.os()=="iOS"&&e.userAgent()=="Safari"&&e.version("Safari")>=10){g.supportsPlaysInline=!0;return}if(e.os()=="AndroidOS"&&e.userAgent()=="Chrome"&&e.version("Chrome")>=53){g.supportsPlaysInline=!0;return}
2368g.supportsPlaysInline=!0}},ro=!1,Oa=0,bm=function(){if(!ro&&(ro=!0,jQuery("html").css("overflow-y","hidden"),g.isTouchDevice&&(Oa=document.documentElement.scrollTop,document.body.style.top=-Oa+"px",setTimeout(function(){document.body.style.position="fixed"},0),jQuery("body").addClass("body-position-fixed")),jQuery.fn.fullpage))try{jQuery.fn.fullpage.setAllowScrolling(!1)}catch(e){}},xm=function(){if(ro&&(ro=!1,jQuery("html").css("overflow-y",""),g.isTouchDevice&&(document.body.style.position="",jQuery(document).scrollTop(Oa),jQuery("body").removeClass("body-position-fixed")),jQuery.fn.fullpage))try{jQuery.fn.fullpage.setAllowScrolling(!0)}catch(e){}},no=function(e){for(var t=new jQuery.Deferred,r=[],n=0;n<e.length;n++)r.push(!1);for(var n=0;n<e.length;n++)(function(i){var l=e[i];if(l.classList.contains("masonry-initialized"))r[i]=!0;else{var c=new MutationObserver(()=>{l.classList.contains("masonry-initialized")&&(r[i]=!0)});c.observe(l,{attributes:!0,attributeFilter:["class"]})}})(n);var o=setInterval(function(){r.every(Tm)&&(t.resolve(),clearInterval(o))},30);return t.promise()},oo=function(e){var t=e.find(".contains-masonry-layout");if(t.length==0&&(t=e.closest(".contains-masonry-layout")),t.length==0)return[];var r=[];return t.each(function(){ut(this)&&r.push(this)}),r},Tm=function(e,t,r){return e==!0},ut=function(e){var t=e.getBoundingClientRect();return t.bottom>0&&t.top<window.innerHeight&&t.right>0&&t.left<window.innerWidth},Ol=function(e,t,r){var n=e.getBoundingClientRect(),o=t.getBoundingClientRect(),a=!1,i=n.left-r,l=n.right+r;o.left>=i&&o.left<=l&&(a=!0),o.right>=i&&o.right<=l&&(a=!0);var c=o.left+o.width/2;return c>=i&&c<=l&&(a=!0),a};var Fa=Backbone.Radio.channel("events"),Em={initModule:function(){Am()}},Ql=Em,Zr={$cover:null},ke={doDarken:!1,doParallax:!1,enabled:!1,frame:!1},Am=function(){frontendPassedData.misc_options_cover=="on"&&(ke.enabled=!0,frontendPassedData.cover_darken_when_scrolling=="on"&&(ke.doDarken=!0),frontendPassedData.cover_parallaxmove_when_scrolling=="on"&&(ke.doParallax=!0),window.laytheme.on("newpage",function(e,t,r){Na()}),window.laytheme.on("newpageshown",function(){Na(),Zr.$cover=jQuery(".cover-region"),Zr.$cover.length>0?(jQuery("html").addClass("prevent-overscroll"),Cm(),g.isPhoneSize&&frontendPassedData.cover_disable_for_phone==!0?ke.enabled=!1:ke.enabled=!0,Mm(),Bl(),Im(),zl()):jQuery("html").removeClass("prevent-overscroll")}))},Ll=function(e){switch(e){case"desktop":case"tablet":frontendPassedData.cover_disable_for_phone==!0&&ke.enabled==!1&&(ke.enabled=!0,zl());break;case"phone":frontendPassedData.cover_disable_for_phone==!0&&(ke.enabled=!1,Zr.$cover.attr("style",""),jQuery(".cover-region").removeClass("clickable-cover"),jQuery(".cover-region").on("click"),Na());break}},Im=function(){jQuery(window).off("window_width_changed",Fl),jQuery(window).on("window_width_changed",Fl)},Cm=function(){window.laytheme.off("sizechanged",Ll),window.laytheme.on("sizechanged",Ll)},Fl=function(){Sm()},Bl=function(){jQuery(".cover-region").css({top:"",height:"","min-height":""}),jQuery(".cover-region-placeholder, .cover-region .row, .cover-region .row-inner, .cover-region .column-wrap, .cover-inner").css({height:"","min-height":""})},Sm=function(){if(Zr.$cover.is(":visible")&&ke.enabled&&g.isPhoneSize){var e=jQuery(".navbar").height();jQuery(".navbar").is(":visible")||(e=0),jQuery(".cover-region").css({top:e+"px",height:window.innerHeight-e+"px","min-height":window.innerHeight-e+"px"}),jQuery(".cover-region-placeholder, .cover-region .row, .cover-region .row-inner, .cover-region .column-wrap, .cover-inner").css({height:window.innerHeight-e+"px","min-height":window.innerHeight-e+"px"})}else Bl()},Na=function(){Fa.off("scroll",Qa)},zl=function(){Fa.off("scroll",Qa),Fa.on("scroll",Qa)},Qa=function(){var e=window.scrollY;if(e<=window.innerHeight&&ke.enabled){var t={};if(ke.doDarken){var r=M.map(e,0,window.innerHeight,1,.2);r>1&&(r=1),t.filter="brightness("+r+")",t["-webkit-filter"]="brightness("+r+")"}if(ke.doParallax){var n=M.map(e,0,window.innerHeight,0,window.innerHeight/3);t.transform="translate3d(0,-"+n+"px,0)",t["-webkit-transform"]="translate3d(0,-"+n+"px,0)"}(ke.doParallax||ke.doDarken)&&Zr.$cover.css(t)}},Mm=function(){frontendPassedData.cover_scrolldown_on_click=="on"&&ke.enabled&&(jQuery(".cover-region").addClass("clickable-cover"),jQuery(".cover-region").on("click",function(){var e=jQuery("html, body"),t=jQuery(".cover-content-desktop").offset().top+1,r=g.screenSize;r=="phone"&&(t=jQuery(".cover-content-phone").length>0?jQuery(".cover-content-phone").offset().top+1:t),e.animate({scrollTop:t},400,"easeOutSine",function(){e.off("scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove",Nl)}),e.on("scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove",e,Nl)}))},Nl=function(e){e.data.stop()};var Ul={initModule:function(){frontendPassedData.phone_layout_active=="on"&&(window.laytheme.on("newpageshown",Pm),Rm())}},Pt={mainHasCustomPhoneGrid:!1,footerHasCustomPhoneGrid:!1};var Pm=function(){Pt.mainHasCustomPhoneGrid=jQuery("#custom-phone-grid").length==1,Pt.footerHasCustomPhoneGrid=jQuery("#footer-custom-phone-grid").length==1},Rm=function(){var e=g.screenSize;jQuery(window).on("window_width_changed orientationchange",function(){(g.screenSize=="phone"&&e=="tablet"||g.screenSize=="phone"&&e=="desktop")&&(Pt.mainHasCustomPhoneGrid!=!1||Pt.footerHasCustomPhoneGrid!=!1)?Mt.triggerSwitchedDesktopLayoutToCustomPhoneLayout():(g.screenSize=="tablet"&&e=="phone"||g.screenSize=="desktop"&&e=="phone")&&(Pt.mainHasCustomPhoneGrid!=!1||Pt.footerHasCustomPhoneGrid!=!1)&&Mt.triggerSwitchedCustomPhoneLayoutToDesktopLayout(),e=g.screenSize})};window.laytheme.on("newpageshown",function(){jQuery(".password-form").length>0&&(jQuery(".password-ok").on("click",function(){Vl()}),jQuery(".password-form input").on("keyup",function(e){e.keyCode===13&&Vl()}))});function Vl(){var e=jQuery(".password-form input").val();Yt.showLayout(e)}var Hl=function(){jQuery(".password-form").addClass("wrong-password"),setTimeout(function(){jQuery(".password-form").removeClass("wrong-password")},300)};var Gl=["easeInQuad","easeInCubic","easeInQuart","easeInQuint","easeInSine","easeInExpo","easeInCirc","easeInBack","easeOutQuad","easeOutCubic","easeOutQuart","easeOutQuint","easeOutSine","easeOutExpo","easeOutCirc","easeOutBack","easeInBounce","easeInOutQuad","easeInOutCubic","easeInOutQuart","easeInOutQuint","easeInOutSine","easeInOutExpo","easeInOutCirc","easeInOutBack","easeInOutBounce","easeOutBounce","easeOutInQuad","easeOutInCubic","easeOutInQuart","easeOutInQuint","easeOutInSine","easeOutInExpo","easeOutInCirc","easeOutInBack","easeOutInBounce"];Gl.indexOf(frontendPassedData.navigation_transition_in_easing)===-1&&(frontendPassedData.navigation_transition_in_easing="easeInSine");Gl.indexOf(frontendPassedData.navigation_transition_out_easing)===-1&&(frontendPassedData.navigation_transition_out_easing="easeOutSine");console.log("frontendPassedData.navigation_transition_in_easing",frontendPassedData.navigation_transition_in_easing);console.log("frontendPassedData.navigation_transition_out_easing",frontendPassedData.navigation_transition_out_easing);var ao="",jm=frontendPassedData.element_transition_on_scroll=="on",km={initModule:function(){Dm(),Nm(),Bm(),zm()},setTransitionStatus:function(e){ao=e},getTransitionStatus:function(){return ao},doAfterComplete:function(){Kl()}},Dm=function(){window.laytheme.on("before_content_replacement",function(){(parseInt(frontendPassedData.navigation_transition_out_duration,10)==0||frontendPassedData.navigation_transition_out=="none")&&parseInt(frontendPassedData.navigation_transition_in_duration,10)!=0&&frontendPassedData.navigation_transition_in!="none"&&Xl()})},Ba=function(){Ua==!0&&frontendPassedData.navigation_transition_use_reveal
2368ing_transition_on_first_visit=="on"&&Lm(),Ua=!1},Om=function(){var e=document.getElementById("lay-hide-wrap-css");e&&e.remove()},Xl=function(){var e=document.getElementById("lay-hide-wrap-css");if(!e){var t=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(t),t.id="lay-hide-wrap-css",t.appendChild(document.createTextNode("body>.lay-content{opacity: 0;}/* because we need to wait for masonry to initalize before starting animation */.col.type-thumbnailgrid .thumbnail-wrap{opacity: 0;}.col.type-elementgrid .element-wrap{opacity: 0;}"))}},$l=function(e,t){var r=[],n=document.documentElement.classList.contains("fp-enabled"),o=t.indexOf("stagger")!=-1||t.indexOf("up")!=-1||t.indexOf("down")!=-1;return e.each(function(){if(ut(this)){var a=this.closest(".row");if(!n||this.classList.contains("place-freely")||n&&a&&window.getComputedStyle(a).visibility!="hidden")if(o&&this.classList.contains("type-elementgrid"))jQuery(this).find(".element-wrap").each(function(){ut(this)&&r.push(this)});else if(o&&this.classList.contains("type-thumbnailgrid")){var i=jQuery(this).find(".lay-thumbnailgrid-filter-wrap");i.length>0&&ut(i[0])&&r.push(i[0]),jQuery(this).find(".thumbnail-wrap").each(function(){ut(this)&&r.push(this)})}else o&&this.classList.contains("type-productsgrid")?jQuery(this).find(".lay-product").each(function(){ut(this)&&r.push(this)}):o&&this.classList.contains("type-carousel")?jQuery(this).find(".lay-carousel-wrap").each(function(){ut(this)&&r.push(this)}):o&&this.classList.contains("type-news")?jQuery(this).find(".lay-news-element-row, .lay-news-load-more-wrap").each(function(){ut(this)&&r.push(this)}):r.push(this)}}),r},Lm=function(){jQuery("head").append('<style id="lay-show-sitetitle-menubar-menu-etc">.sitetitle, .overlay-burger, .laynav, #lay_canvas, .navbar, .lay-fadein, .mobile-title, .burger-wrap, body #fp-nav, body .fp-slidesNav, .mobile-menu-style-style_desktop_menu{opacity: 1;}</style>'),setTimeout(function(){var e=document.getElementById("lay-hide-sitetitle-menubar-menu-etc");e&&e.remove(),e=document.getElementById("lay-show-sitetitle-menubar-menu-etc"),e&&e.remove()},frontendPassedData.navigation_transition_in_duration)};function ql(e,t,r,n){let o=r-e,a=n-t;return Math.sqrt(a*a+o*o)}var Yl=function(e,t){for(var r=[],n=0;n<e.length;n++){var o=e[n].getBoundingClientRect(),a;typeof t!="undefined"&&t=="stagger-down"?a=ql(0,window.innerHeight,o.left,o.top):a=ql(0,0,o.left,o.top),r.push(a)}e.sort(function(i,l){var c=e.indexOf(i),s=e.indexOf(l);return r[c]-r[s]})},Fm=function(e,t,r){return e==!0},Nm=function(){window.laytheme.on("newpageshown",function(){jQuery("img").each(function(){this.addEventListener("error",function(){this.classList.add("loaded-error")})})})},Qm=function(e,t){var r=[],n=[];if(e.find("img.lazyload, img.lay-gif, img.lay-image-original, img.setsizes, img.lay-image-responsive, img.carousel-img").each(function(){if(this.classList.contains("carousel-img")){if(ut(this)){var l=this.closest(".lay-carousel");if(l.classList.contains("transition-fading")||l.classList.contains("transition-immediate")){var c=this.closest(".lay-carousel-slide");c.classList.contains("is-selected")&&(r.push(this),n.push(!1))}else Ol(l,this,-80)&&(r.push(this),n.push(!1))}}else ut(this)&&(r.push(this),n.push(!1))}),r.length==0){t();return}for(var o=0;o<r.length;o++)(function(l){var c=r[l];if(c.classList.contains("lazyloaded")||c.classList.contains("loaded")||c.classList.contains("loaded-error"))n[l]=!0;else{var s=new MutationObserver(()=>{(c.classList.contains("lazyloaded")||c.classList.contains("loaded")||c.classList.contains("loaded-error"))&&(n[l]=!0)});s.observe(c,{attributes:!0,attributeFilter:["class"]})}})(o);if(r.length>0)var a=setTimeout(function(){t(),clearInterval(i)},2500),i=setInterval(function(){n.every(Fm)&&(t(),clearInterval(i),clearTimeout(a))},30);else t()},Ua=!0,Pe,Bm=function(){window.laytheme.on("content_ready",function(e){switch(Pe=void 0,e){case"desktop":Pe=["body>.lay-content #grid","body>.lay-content .cover-region-desktop","body>.lay-content #footer"];break;case"phone":var t=jQuery("body>.lay-content #footer-custom-phone-grid").length!=0,r=jQuery("body>.lay-content #custom-phone-grid").length!=0;t&&r?Pe=["body>.lay-content #custom-phone-grid","body>.lay-content .cover-region-phone","body>.lay-content #footer-custom-phone-grid"]:!t&&r?Pe=["body>.lay-content #custom-phone-grid","body>.lay-content .cover-region-phone","body>.lay-content #footer"]:t&&!r?Pe=["body>.lay-content #grid","body>.lay-content .cover-region-desktop","body>.lay-content #footer-custom-phone-grid"]:!t&&!r&&(Pe=["body>.lay-content #grid","body>.lay-content .cover-region-desktop","body>.lay-content #footer"]);break}if(Array.isArray(Pe)&&Pe!=null)for(let n=0;n<Pe.length;n++)Pe[n]=Pe[n]+' .row[data-collapsed="false"] .col:not(.type-stack), '+Pe[n]+" .col.place-freely";
2368Ua==!0&&frontendPassedData.navigation_transition_use_revealing_transition_on_first_visit=="on"&&window.laytheme.trigger("transition_in")})},Kl=function(){ao="ended",window.laytheme.trigger("transition_navigation_out_completed"),jQuery("a.sitetitle, .laynav a").css("pointer-events",""),Xl()},zm=function(){window.laytheme.on("transition_out",function(){var e=g.isPhoneSize?parseInt(frontendPassedData.navigation_transition_y_translate_phone,10):parseInt(frontendPassedData.navigation_transition_y_translate_desktop,10),t=jQuery(Pe.join(",")),r=$l(t,frontendPassedData.navigation_transition_out);frontendPassedData.navigation_transition_out.indexOf("stagger")!=-1&&r.length>1&&Yl(r,frontendPassedData.navigation_transition_out);var n=anime.timeline({begin:function(){jQuery('.row[data-collapsed="true"] .col').css("display","none"),jQuery("a.sitetitle, .laynav a, body>.lay-content a, body>.lay-content .col, .clickable-cover").css("pointer-events","none"),jQuery(".thumbnail-wrap, .element-wrap").css({"transition-delay":"",transition:"none"}),jm&&(jQuery(".col").css({"transition-delay":"",transition:"none"}),jQuery("body.lay-transition-elements-on-scroll .row.no-y-offsets:last-child").css("overflow","visible"))},complete:function(){Kl()}}),o=frontendPassedData.navigation_transition_out=="none";if(o)switch(frontendPassedData.navigation_transition_out){case"fade":n.add({targets:"body>.lay-content",opacity:0,easing:frontendPassedData.navigation_transition_out_easing,duration:frontendPassedData.navigation_transition_out_duration});break}else{switch(frontendPassedData.navigation_transition_out){case"stagger-fade":n.add({targets:r,opacity:0,easing:frontendPassedData.navigation_transition_out_easing,duration:frontendPassedData.navigation_transition_out_duration,delay:anime.stagger(100)});break;case"stagger-down":n.add({targets:r,translateY:e,opacity:0,easing:frontendPassedData.navigation_transition_out_easing,duration:frontendPassedData.navigation_transition_out_duration,delay:anime.stagger(100)});break;case"stagger-up":n.add({targets:r,translateY:-e,opacity:0,easing:frontendPassedData.navigation_transition_out_easing,duration:frontendPassedData.navigation_transition_out_duration,delay:anime.stagger(100)});break;case"down":n.add({targets:r,translateY:e,opacity:0,easing:frontendPassedData.navigation_transition_out_easing,duration:frontendPassedData.navigation_transition_out_duration});break;case"up":n.add({targets:r,translateY:-e,opacity:0,easing:frontendPassedData.navigation_transition_out_easing,duration:frontendPassedData.navigation_transition_out_duration});break}n.add({targets:"body>.lay-content",opacity:0,easing:"easeOutSine",duration:100})}}),window.laytheme.on("transition_in",function(){setTimeout(function(){var e=jQuery(Pe.join(",")),t=oo(e);t.length>0?jQuery.when(no(t)).then(function(){setTimeout(function(){Wl()},50)}).catch(function(r){console.log(r),console.log("Promise Rejected")}):Wl()},0)})},Wl=function(){ao="started";var e=g.isPhoneSize?parseInt(frontendPassedData.navigation_transition_y_translate_phone,10):parseInt(frontendPassedData.navigation_transition_y_translate_desktop,10),t=jQuery(Pe.join(",")),r=$l(t,frontendPassedData.navigation_transition_in);if(r.length==0){Ba(),za([]);return}if(frontendPassedData.navigation_transition_out.indexOf("stagger")!=-1&&r.length>1&&Yl(r,frontendPassedData.navigation_transition_in),frontendPassedData.navigation_transition_in!="none")for(var n=0;n<r.length;n++){var o=r[n];o.classList.add("disable-css-transitions")}var a=anime.timeline({autoplay:!1,begin:function(){Ba()},complete:function(){za(r)}}),i=frontendPassedData.navigation_transition_in=="none"||frontendPassedData.navigation_transition_in=="fade";if(i)switch(frontendPassedData.navigation_transition_in){case"none":a.add({targets:"body>.lay-content",opacity:1,easing:frontendPassedData.navigation_transition_in_easing,duration:0});break;case"fade":a.add({targets:"body>.lay-content",opacity:[0,1],easing:frontendPassedData.navigation_transition_in_easing,duration:frontendPassedData.navigation_transition_in_duration});break}else if(r!=null&&Array.isArray(r)&&r.length>0)switch(a.add({targets:"body>.lay-content",opacity:1,easing:"easeOutSine",duration:100}),frontendPassedData.navigation_transition_in){case"stagger-fade":a.add({targets:r,opacity:[0,1],easing:frontendPassedData.navigation_transition_in_easing,duration:frontendPassedData.navigation_transition_in_duration,delay:anime.stagger(100)});break;case"stagger-up":a.add({targets:r,translateY:[e,0],opacity:[0,1],easing:frontendPassedData.navigation_transition_in_easing,duration:frontendPassedData.navigation_transition_in_duration,delay:anime.stagger(100)});break;case"stagger-down":a.add({targets:r,translateY:[-e,0],opacity:[0,1],easing:frontendPassedData.navigation_transition_in_easing,duration:frontendPassedData.navigation_transition_in_duration,delay:anime.stagger(100)});break;case"up":a.add({targets:r,translateY:[e,0],opacity:[0,1],easing:frontendPassedData.navigation_transition_in_easing,duration:frontendPassedData.navigation_transition_in_duration});break;case"down":a.add({targets:r,translateY:[-e,0],opacity:[0,1],easing:frontendPassedData.navigation_transition_in_easing,duration:frontendPassedData.navigation_transition_in_duration});break}if(frontendPassedData.navigation_transition_in=="none")a.play(),za(r),Ba();else{var t=jQuery(Pe.join(","));window.location.href.indexOf("#")!=-1?a.play():Qm(t,function(){a.play()})}},za=function(e){Om(),jQuery("body>.lay-content").attr("style","");for(var t=0;t<e.length;t++){var r=e[t];r.classList.remove("disable-css-transitions")}for(var t=0;t<e.length;t++){var r=e[t];r.style.opacity="",!r.classList.contains("has-parallax")&&!r.hasAttribute("data-offsetx")&&!r.hasAttribute("data-offsety")&&(r.style.transform="")}jQuery("a.sitetitle, .laynav a").css("pointer-events",""),window.laytheme.trigger("transition_navigation_in_completed")},Kt=km;var Um={showLayout:function(e="",t=""){qm(e,t)},initModule:function(){Gm()},hideRegions:function(){Wm()}},Vm={type:null,isFirstLoad:!0,gridObj:null},Ha={$body:null},Hm=function(){Ha.$body=jQuery("body")};var Va=null,qm=function(e,t){var r=Ha.$body.attr("data-type"),n=Ha.$body.attr("data-id");Vm.type=r;var o={action:"get_laytheme_layout",id:n,type:r,password:e};
2368Va&&Va.abort(),Va=jQuery.ajax({url:frontendPassedData.ajax_url,data:o,type:"post",success:a=>{var i=window.JSON.parse(a);if(i.layout.notification=="wrongpassword")Hl();else{e!=""&&(Kt.doAfterComplete(),l=="ended");var l=Kt.getTransitionStatus();l=="ended"?(jQuery("#lay-overlays").html(i.overlays),Jl(t,i.layout)):window.laytheme.once("transition_navigation_out_completed",function(){jQuery("#lay-overlays").html(i.overlays),Jl(t,i.layout)})}},error:a=>{console.log("error loading page"),console.log(a)}})},qa=-1,Jl=function(e,t){window.laytheme.trigger("before_content_replacement"),typeof e=="function"&&e(),frontendPassedData.never_change_scrolling_position=="on"?($resultMarkup=jQuery(t.markup),jQuery("body>.lay-content").find("#grid").replaceWith($resultMarkup.find("#grid")),jQuery("body>.lay-content").find("#custom-phone-grid").length>0&&jQuery("body>.lay-content").find("#custom-phone-grid").replaceWith($resultMarkup.find("#custom-phone-grid")),t.obj.footerid!=qa&&jQuery("body>.lay-content").find("#footer-region").replaceWith($resultMarkup.find("#footer-region")),qa=t.obj.footerid):jQuery("body>.lay-content").replaceWith(t.markup),M.setBodyClasses(t.obj),Mt.triggerNewPageShown({},t.type,t.obj),setTimeout(function(){window.laytheme.trigger("transition_in")},0)},Wm=function(){window.laytheme.trigger("transition_out")},Gm=function(){Hm(),window.laytheme.once("newpageshown",function(e,t,r){qa=r.footerid})},Yt=Um;var Xm={initModule:function(){Jm()}},io=Backbone.Radio.channel("events"),Zl=Xm,oe={cols:[],scrollY:0,parallaxActive:!1},eu=function(e){return{"-webkit-transform":e,"-moz-transform":e,"-ms-transform":e,transform:e}},so=function(){oe.scrollY=window.pageYOffset||document.documentElement.scrollTop;for(var e=0;e<oe.cols.length;e++)if(oe.cols[e][1]!=0){var t=oe.cols[e][7],r=oe.cols[e][6],n=oe.cols[e][0][0].getBoundingClientRect(),o=n.top+oe.scrollY,a=o-window.innerHeight-oe.cols[e][2];a<0&&(a=0);var i=o+n.height-oe.cols[e][2],l=M.map(oe.scrollY,a,i,0,100);if(!(l<0||l>100)){oe.cols[e][2]=l*oe.cols[e][1]*11.2;var c=oe.cols[e][2];switch(r){case"px":c+=parseFloat(oe.cols[e][3],10);break;case"vw":case"%":c+=window.innerWidth/100*oe.cols[e][3];break}var s=oe.cols[e][4];oe.cols[e][0].css(eu("translate("+s+t+", "+c+"px)"))}}},$m=function(){var e=g.screenSize;jQuery(window).on("window_width_changed orientationchange",function(){g.screenSize=="phone"&&e=="tablet"&&Pt.mainHasCustomPhoneGrid==!1?oe.parallaxActive==!0&&(jQuery(".col").css(eu("")),io.off("scroll",so),oe.parallaxActive=!1):g.screenSize=="tablet"&&e=="phone"&&oe.parallaxActive==!1&&oe.cols.length>0&&(io.on("scroll",so),oe.parallaxActive=!0),oe.parallaxActive&&jQuery(window).trigger("scroll"),e=g.screenSize})},Ym=function(){window.laytheme.on("newpageshown",function(){oe.cols=[],jQuery(".col[data-yvel]").each(function(){var e=jQuery(this).attr("data-yvel");e<1&&(e=1),e=parseFloat(e),e-=1,e=-e;var t=0,r=jQuery(this).attr("data-offsety");typeof r=="undefined"&&(r=0);var n=jQuery(this).attr("data-offsetx");typeof n=="undefined"&&(n=0);var o=jQuery(this).attr("data-offsetymu");o==null&&(o="");var a=jQuery(this).attr("data-offsetxmu");a==null&&(a="");var i=!1;jQuery(this.parentNode.parentNode).hasClass("_100vh")&&this.classList.contains("align-middle")&&(jQuery(this).attr("data-type")=="text"||jQuery(this).attr("data-type")=="html"||this.classList.contains("absolute-position"))&&(i=!0);var l=[jQuery(this),e,t,r,n,i,o,a];oe.cols.push(l)}),io.off("scroll",so),oe.scrollY=0,oe.cols.length>0&&(g.isDesktopOrTabletSize||Pt.mainHasCustomPhoneGrid)&&(io.on("scroll",so),oe.parallaxActive=!0)})},Km=function(){Ym(),$m()},Jm=function(){frontendPassedData.simple_parallax=="on"&&Km()};var tu=typeof window.WeakMap=="function"&&typeof window.Map=="function",Wa=function(){if(tu)return window.WeakMap;function e(t,r){let n=-1;return t.some((o,a)=>{let i=o[0]===r;return i&&(n=a),i}),n}return class{constructor(){this.__entries__=[]}get(t){let r=e(this.__entries__,t);return this.__entries__[r][1]}set(t,r){let n=e(this.__entries__,t);~n?this.__entries__[n][1]=r:this.__entries__.push([t,r])}delete(t){let r=this.__entries__,n=e(r,t);~n&&r.splice(n,1)}has(t){return!!~e(this.__entries__,t)}}}(),ru=function(){return tu?window.Map:class extends Wa{get size(){return this.__entries__.length}clear(){this.__entries__.splice(0,this.__entries__.length)}entries(){return this.__entries__.slice()}keys(){return this.__entries__.map(e=>e[0])}values(){return this.__entries__.map(e=>e[1])}forEach(e,t=null){for(let r of this.__entries__)e.call(t,r[1],r[0])}}}();var wr=function(){return window.performance&&window.performance.now?()=>window.performance.now():()=>Date.now()}();var nu=typeof window.MutationObserver=="function",Zm=function(){return window.requestAnimationFrame?window.requestAnimationFrame:e=>setTimeout(()=>e(wr()),1e3/60)}();function ou(e,t=0){let r=!1;return function(...n){r!==!1&&clearTimeout(r),r=setTimeout(()=>{r=!1,e.apply(this,n)},t)}}var en=class{constructor(t=50,r=!1){this._idleTimeout=t,this._trackHovers=r,this._cycleStartTime=-1,this._isUpdateScheduled=!1,this._repeatCycle=!1,this._hoverInitiated=!1,this._mutationsObserver=null,this._isListening=!1,this._observers=[],this.startUpd
2368ateCycle=this.startUpdateCycle.bind(this),this.scheduleUpdate=this.scheduleUpdate.bind(this),this._onMutation=this._onMutation.bind(this),this._repeatHandler=ou(this.scheduleUpdate,200),this._onMouseOver=ou(this.startUpdateCycle,200)}get idleTimeout(){return this._idleTimeout}set idleTimeout(t){this._idleTimeout=t}connect(t){this.isConnected(t)||this._observers.push(t),this._isListening||this._initListeners()}disconnect(t){let r=this._observers,n=r.indexOf(t);~n&&r.splice(n,1),!r.length&&this._isListening&&this._removeListeners()}isConnected(t){return!!~this._observers.indexOf(t)}_updateObservers(){let t=!1;for(let r of this._observers)r.updateObservations()&&(t=!0),r.hasEntries()&&r.notifySubscriber();return t}startUpdateCycle(){this._cycleStartTime=wr(),this.scheduleUpdate()}scheduleUpdate(t){if(typeof t=="number"){let n=this._updateObservers();if(this._isUpdateScheduled=!1,!this._wasCycleStarted())return;n?this.startUpdateCycle():this._hasIdleTimeEnded()?this._onCycleEnded():this.scheduleUpdate()}else this._isUpdateScheduled||(Zm(this.scheduleUpdate),this._isUpdateScheduled=!0)}_hasIdleTimeEnded(){return wr()-this._cycleStartTime>this._idleTimeout}_wasCycleStarted(){return this._cycleStartTime!==-1}_onCycleEnded(){this._cycleStartTime=-1,this._repeatCycle&&(this._cycleStartTime=0,this._repeatHandler())}_initListeners(){this._isListening||(this._isListening=!0,window.addEventListener("resize",this.startUpdateCycle,!0),window.addEventListener("scroll",this.scheduleUpdate,!0),this._trackHovers&&this._addHoverListener(),nu?(this._mutationsObserver=new MutationObserver(this._onMutation),this._mutationsObserver.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(this._repeatCycle=!0,window.addEventListener("click",this.startUpdateCycle,!0),this.startUpdateCycle()))}_removeListeners(){this._isListening&&(window.removeEventListener("resize",this.startUpdateCycle,!0),window.removeEventListener("scroll",this.scheduleUpdate,!0),this._removeHoverListener(),nu?this._mutationsObserver&&(this._mutationsObserver.disconnect(),this._mutationsObserver=null):(this._repeatCycle=!1,window.removeEventListener("click",this.startUpdateCycle,!0)),this._isListening=!1)}enableHover(){this._trackHovers=!0,this._isListening&&this._addHoverListener()}disableHover(){this._trackHovers=!1,this._removeHoverListener()}isHoverEnabled(){return this._trackHovers}_addHoverListener(){this._hoverInitiated||(window.addEventListener("mouseover",this._onMouseOver,!0),this._hoverInitiated=!0)}_removeHoverListener(){this._hoverInitiated&&(window.removeEventListener("mouseover",this._onMouseOver,!0),this._hoverInitiated=!1)}_onMutation(t){t.every(n=>n.type!=="attributes")?this.scheduleUpdate():this.startUpdateCycle()}};function Ga(e){let t={};for(let r of Object.keys(e))t[r]={value:e[r]};return Object.defineProperties({},t)}function lo(e=0,t=0,r=0,n=0){return{left:e,top:t,width:r,height:n,bottom:t+n,right:e+r}}function Jt(e){return e===document.documentElement?lo(0,0,e.clientWidth,e.clientHeight):e.getBoundingClientRect()}function Xa(e){return e.width*e.height}function au(e){return e.height===0&&e.width===0}function iu(e,t){return e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}var tn=class{constructor(t,r,n,o,a,i){Object.defineProperties(this,{boundingClientRect:{value:r},intersectionRatio:{value:o},intersectionRect:{value:Ga(n)},rootBounds:{value:Ga(a)},target:{value:t},time:{value:i}})}};var $a=lo();function ev(e,t){let r=document.documentElement;return e!==r&&!r.contains(e)||!e.contains(t)}function tv(e,t){let r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),a=Math.min(t.bottom,e.bottom),i=n-r,l=a-o;return lo(r,o,i,l)}function rv(e,t,r,n){let o=n,a=t.parentNode,i=!1;for(;!i;){let l=null;a===e||a.nodeType!==1?(i=!0,l=r):window.getComputedStyle(a).overflow!=="visible"&&(l=Jt(a)),l&&(o=tv(o,l)),a=a.parentNode}return o}var rn=class{constructor(t,r){this.target=t,this.observer=r,this.prevTargetRect=$a,this.prevThreshold=0,this.prevRatio=0}updateIntersection(t,r){let n=Jt(this.target),o=this.getIntersectionData(t,r,n),a=+o.exists,i=o.ratio!==this.prevRatio,l=!iu(n,this.prevTargetRect),c;if(o.exists&&!au(n)&&(a=this.observer.getThresholdGreaterThan(o.ratio)),c=a!==this.prevThreshold,this.prevTargetRect=n,this.prevThreshold=a,this.prevRatio=o.ratio,o.exists||(o.ratio=0,o.rect=$a),c){let s=new tn(this.target,n,o.rect,o.ratio,r,wr());this.observer.queueEntry(s)}return{ratioChanged:i,thresholdChanged:c,targetRectChanged:l}}getIntersectionData(t,r,n){let o=this.target;n||(n=Jt(this.target)),r||(r=Jt(t));let a=ev(t,o),i=a?$a:rv(t,o,r,n),l=!a&&i.width>=0&&i.height>=0,c=Xa(i)/Xa(n)||0;return{rect:i,ratio:c,exists:l}}};function nv(e=0){let t=e;return Array.isArray(e)?e.length||(t=[0]):t=[e],t.map(r=>{if(r=Number(r),window.isFinite(r)){if(r<0||r>1)throw new RangeError("Threshold values must be between 0 and 1.")}else throw new TypeError("The provided double value is non-finite.");return r}).sort()}function ov(e="0px"){if(e=(e+"").split(/\s+/),e.length>4)throw new Error("Extra text found at the end of rootMargin.");e[0]=e[0]||"0px",e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1];let t=e.join(" "),r=e.map(n=>{let[,o,a]=/^(-?\d*\.?\d+)(px|%)$/.exec(n)||[],i=a==="px";if(o=parseFloat(o),!window.isFinite(o))throw new Error("rootMargin must be specified in pixels or percent.");
2368return i||(o/=100),{value:o,pixels:i}});return{rawData:t,parsedData:r}}function av(e,t){t=t.map((n,o)=>{let a=n.value;return n.pixels||(a*=o%2?e.width:e.height),a});let r={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};return r.width=r.right-r.left,r.height=r.bottom-r.top,r}var nn=class{constructor(t,r={},n,o){if(typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");if(typeof r!="object")throw new TypeError("parameter 2 is not an object.");if("root"in r&&!(r.root instanceof Element))throw new TypeError("member root is not of type Element.");let a=nv(r.threshold),i=ov(r.rootMargin);this.root=r.root||null,this.rootMargin=i.rawData,this.thresholds=Object.freeze(a),this._root=r.root||document.documentElement,this._callback=t,this._rootMargin=i.parsedData,this._targets=new ru,this._quedEntries=[],this._publicObserver=o||this,this.controller=n}observe(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(t instanceof Element))throw new TypeError('parameter 1 is not of type "Element".');let r=this._targets;r.has(t)||(r.set(t,new rn(t,this)),this.controller.isConnected(this)||this.controller.connect(this),this.controller.startUpd
2368ateCycle())}unobserve(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(t instanceof Element))throw new TypeError('parameter 1 is not of type "Element".');let r=this._targets;r.has(t)&&r.delete(t),r.size||this.disconnect()}disconnect(){this._targets.clear(),this.controller.disconnect(this)}takeRecords(){return this._quedEntries.splice(0)}notifySubscriber(){let t=this.takeRecords(),r=this._publicObserver;t.length&&this._callback.call(r,t,r)}queueEntry(t){this._quedEntries.push(t)}hasEntries(){return!!this._quedEntries.length}updateObservations(){let t=this._root,r=this.getRootRect(),n=!1;return this._targets.forEach(o=>{let a=o.updateIntersection(t,r);(a.ratioChanged||a.targetRectChanged)&&(n=!0)}),n}getThresholdGreaterThan(t){let r=this.thresholds,n=r.length,o=0;for(;o<n&&r[o]<=t;)++o;return o}getRootRect(){let t=Jt(this._root);return av(t,this._rootMargin)}};var br=new en,su=new Wa,uo=class{constructor(t,r){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");let n=new nn(t,r,br,this);Object.defineProperties(this,{root:{value:n.root},thresholds:{value:n.thresholds},rootMargin:{value:n.rootMargin}}),su.set(this,n)}static get idleTimeout(){return br.idleTimeout}static set idleTimeout(t){if(typeof t!="number")throw new TypeError('type of "idleTimeout" value must be a number.');if(typeof t<0)throw new TypeError('"idleTimeout" value must be greater than 0.');br.idleTimeout=t}static get trackHovers(){return br.isHoverEnabled()}static set trackHovers(t){if(typeof t!="boolean")throw new TypeError('type of "trackHovers" value must be a boolean.');t?br.enableHover():br.disableHover()}};["observe","unobserve","disconnect","takeRecords"].forEach(e=>{uo.prototype[e]=function(){return su.get(this)[e](...arguments)}});var lu=uo;var Ya;typeof window.IntersectionObserver=="function"?Ya=window.IntersectionObserver:Ya=lu;var Nt=Ya;var iv=function(e){e.find("video.video-lazyload").each(function(){for(var t in this.children){var r=this.children[t];typeof r.tagName=="string"&&r.tagName==="SOURCE"&&r.dataset.src!=null&&(r.src=r.dataset.src)}this.setAttribute("preload","auto");try{this.load()}catch(n){console.log(err)}this.classList.remove("video-lazyload"),this.classList.add("loaded"),this.classList.contains("autoplay")&&this.setAttribute("autoplay","")})},sv=function(e){if(e.classList.contains("video-lazyload")){for(var t in e.children){var r=e.children[t];typeof r.tagName=="string"&&r.tagName==="SOURCE"&&r.dataset.src!=null&&(r.src=r.dataset.src)}e.setAttribute("preload","auto");try{e.load()}catch(n){console.log(n)}e.classList.remove("video-lazyload"),e.classList.add("loaded"),e.classList.contains("autoplay")&&e.setAttribute("autoplay","")}};function lv(t){var t=t,r=function(){var n=t.find("video.video-lazyload");if("IntersectionObserver"in window){var o=new Nt(function(a,i){a.forEach(function(l){if(l.isIntersecting){try{for(var c in l.target.children){var s=l.target.children[c];typeof s.tagName=="string"&&s.tagName==="SOURCE"&&s.dataset.src!=null&&(s.src=s.dataset.src)}l.target.setAttribute("preload","auto"),l.target.load()}catch(u){console.log(u)}l.target.classList.remove("video-lazyload"),l.target.classList.add("loaded"),l.target.classList.contains("autoplay")&&l.target.setAttribute("autoplay",""),o.unobserve(l.target)}})});n.each(function(){o.observe(this)})}};return{init:r}}var uv=function(e){var t=new lv(e);t.init()},cv={loadVideosInstantly:function(e){iv(e)},initLazyLoadVideosOnScroll:function(e){uv(e)},loadSpecificVideo:function(e){sv(e)}},wt=cv;var Ka={isIOS:!1,isTouchDevice:!1},fv={initModule:function(){mv()}},uu=fv,dv=function(){jQuery(document).on("click",".lay-mute-unmute-button",function(e){e.stopPropagation(),e.preventDefault(),jQuery(this).toggleClass("unmuted");var t=jQuery(this.parentNode).find("video")[0];if(t.muted=!t.muted,jQuery(this.parentNode).hasClass("video-slide")&&t.muted==!1){var r=jQuery(this).closest(".lay-carousel").find(".lay-mute-unmute-button"),n=jQuery(this);r.each(function(){if(!jQuery(this).is(n)){jQuery(this).removeClass("unmuted");var o=jQuery(this.parentNode).find("video")[0];o.muted=!0}
2368})}})},hv=function(){jQuery(".html5video video").each(function(){var t=this,r=jQuery(this.parentNode).find(".html5video-customplayicon"),n=jQuery(this.parentNode).find(".html5-video-placeholder-image");r.on("click",function(){jQuery(t).one("canplay",function(){this.play()}),wt.loadSpecificVideo(t),jQuery(t).addClass("userinteractedwith-playing"),jQuery(t).removeClass("userinteractedwith-paused"),jQuery(t).show(),jQuery(t)[0].play(),jQuery(this).hide(),n.hide()})}),jQuery(".html5video .html5-video-placeholder-image.playpauseonclick").each(function(){var t=jQuery(this.parentNode).find("video")[0],r=jQuery(this.parentNode).find(".html5video-customplayicon");jQuery(this).on("click",function(){jQuery(t).one("canplay",function(){this.play()}),wt.loadSpecificVideo(t),jQuery(t).addClass("userinteractedwith-playing"),jQuery(t).removeClass("userinteractedwith-paused"),jQuery(t).show(),jQuery(t)[0].play(),jQuery(this).hide(),r.hide()})});var e=".html5video video.playpauseonclick";jQuery(e).on("click",function(){this.paused?(jQuery(this).one("canplay",function(){this.play()}),wt.loadSpecificVideo(this),this.play(),jQuery(this.parentNode).find(".html5video-customplayicon").hide(),this.classList.add("userinteractedwith-playing"),jQuery(this).removeClass("userinteractedwith-paused")):(this.pause(),jQuery(this.parentNode).find(".html5video-customplayicon").show(),jQuery(this).removeClass("userinteractedwith-playing"),this.classList.add("userinteractedwith-paused"))})},pv=function(){frontendPassedData.video_thumbnail_mouseover_behaviour=="play_on_mouseover"&&(jQuery("body").on("mouseenter",".thumb-rel",function(){var e=jQuery(this).find("video");e.length>0&&(jQuery(e[0]).one("canplay",function(){this.play()}),wt.loadSpecificVideo(e[0]),e[0].play())}),jQuery("body").on("mouseleave",".thumb-rel",function(){var e=jQuery(this).find("video");e.length>0&&e[0].pause()}))},mv=function(){Ka.isIOS=/iPad|iPhone|iPod/.test(navigator.platform),Ka.isTouchDevice=navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/),window.laytheme.on("newpageshown",hv),Ka.isTouchDevice||pv(),dv()};var vv={getProjectLinkAttrs:function(e){return wv(e)},getCatId:function(e){return xv(e)},getCatLength:function(e){return ho(e)},showHideProjectArrows:function(e){cu(e)},maybeHideProjectArrowsOnInit:function(e){yv(e)},initModule:function(){Ev()}},fo=vv,K={id:null,catid:null,type:null,projectsMeta:[]},De={$pa_next:null,$pa_prev:null,$body:null},gv=function(){K.catid=M.parseIdsString(De.$body.attr("data-catid")),K.id=De.$body.attr("data-id"),K.type=De.$body.attr("data-type")},Ja=function(e){e==null&&(e=jQuery("body")),jQuery("body").attr("data-type")=="project"&&(e.find('a[href="#laynextproject"], a.laynextproject').each(function(){var t=co("next");typeof t!="undefined"&&jQuery(this).attr({"data-type":"project",href:t.url,"data-catid":M.stringifyCatIds(t.catid),"data-id":t.id,"data-title":t.title})}),e.find('a[href="#layprevproject"], a.layprevproject').each(function(){var t=co("prev");typeof t!="undefined"&&jQuery(this).attr({"data-type":"project",href:t.url,"data-catid":M.stringifyCatIds(t.catid),"data-id":t.id,"data-title":t.title})}))},yv=function(e){if(e.type=="project"&&frontendPassedData.show_arrows=="on"){var t=ho(e.catid);t<=1&&jQuery(".project-arrow").addClass("hide")}e.type!="project"&&jQuery(".project-arrow").addClass("hide")},cu=function(e){if(frontendPassedData.show_arrows=="on"){if(e==null)return;var t=e.type;if(e.type!="project"&&jQuery(".project-arrow").addClass("hide"),e.type=="project"){var r=ho(e.catid);r<=1?jQuery(".project-arrow").addClass("hide"):frontendPassedData.pa_type!="project-thumbnails"&&jQuery(".project-arrow").removeClass("hide")}t=="project"&&e.type=="project"&&frontendPassedData.pa_type=="project-thumbnails"&&jQuery(".project-arrow").addClass("hide")}},_v=function(e){switch(frontendPassedData.prevnext_navigate_through){case"same_category":var n,o,a=K.id,t=K.catid,r=Za(t);if(typeof K.projectsMeta[r]=="undefined")return 0;var i=K.projectsMeta[r].length;for(o=0;o<i;o++)if(a==K.projectsMeta[r][o].id){n=o;break}return e=="next"?(n++,n==i&&(n=0)):e=="prev"&&(n--,n<0&&(n=i-1)),n;break;case"all_projects":var n,o,a=K.id,i=K.projectsMeta.length;for(o=0;o<i;o++)if(a==K.projectsMeta[o].id){n=o;break}return e=="next"?(n++,n==i&&(n=0)):e=="prev"&&(n--,n<0&&(n=i-1)),n;break}},wv=function(e){if(typeof obj!="undefined")return'href="'+obj.url+'" data-catid="'+obj.catid+'" data-id="'+obj.id+'" data-title="'+obj.title+'" data-type="project"'},co=function(e){var t=_v(e);
2368if(jQuery.isNumeric(t))switch(frontendPassedData.prevnext_navigate_through){case"same_category":var r=K.catid,n=Za(r);if(typeof n!="undefined")return{title:K.projectsMeta[n][t].title,url:K.projectsMeta[n][t].url,id:K.projectsMeta[n][t].id,catid:K.projectsMeta[n][t].catid,thumb:K.projectsMeta[n][t].thumb,thumbar:K.projectsMeta[n][t].thumbar};break;case"all_projects":return{title:K.projectsMeta[t].title,url:K.projectsMeta[t].url,id:K.projectsMeta[t].id,catid:K.projectsMeta[t].catid,thumb:K.projectsMeta[t].thumb,thumbar:K.projectsMeta[t].thumbar}}};var bv=function(){if(frontendPassedData.show_arrows=="on"&&De.$body.attr("data-type")=="project"){var e=co("next"),t=co("prev");if(typeof e!="undefined"&&De.$pa_next.attr({"data-title":e.title,"data-catid":M.stringifyCatIds(e.catid),"data-id":e.id,href:e.url}),typeof t!="undefined"&&De.$pa_prev.attr({"data-title":t.title,"data-catid":M.stringifyCatIds(t.catid),"data-id":t.id,href:t.url}),frontendPassedData.pa_type=="project-thumbnails"){if(typeof e!="undefined"){var r='<img src="'+e.thumb._512+'" alt="">';De.$pa_next.html('<div class="pa-thumb-wrap" style="padding-bottom:'+e.thumbar*100+'%;">'+r+"</div>")}if(typeof t!="undefined"){var n='<img src="'+t.thumb._512+'" alt="">';De.$pa_prev.html('<div class="pa-thumb-wrap" style="padding-bottom:'+t.thumbar*100+'%;">'+n+"</div>")}if(frontendPassedData.prevnext_navigate_through=="same_category"){var o=ho(K.catid);o>1&&(De.$pa_next.removeClass("hide"),De.$pa_prev.removeClass("hide"))}else De.$pa_next.removeClass("hide"),De.$pa_prev.removeClass("hide")}}},ho=function(e){if(typeof e!="undefined"&&e!="")if(frontendPassedData.prevnext_navigate_through=="same_category"){var t=Za(e);return K.projectsMeta[t].length}else return K.projectsMeta.length},xv=function(e){var t=[];switch(frontendPassedData.prevnext_navigate_through){case"same_category":for(var r in K.projectsMeta)for(var n=0;n<K.projectsMeta[r].length;n++)K.projectsMeta[r][n].id==e&&t.push(r);break;case"all_projects":for(var n=0;n<K.projectsMeta.length;n++)e==K.projectsMeta[n].id&&t.push(K.projectsMeta[n].catid);break}return t},Za=function(e){return Array.isArray(e)?e[0]:e},Tv=function(){De.$pa_next=jQuery(".pa-next"),De.$pa_prev=jQuery(".pa-prev"),De.$body=jQuery("body")},Ev=function(){Tv(),K.projectsMeta=JSON.parse(frontendPassedData.projectsMeta),window.laytheme.on("newpageshown",function(){cu(window.history.state),gv(),bv(),Ja()})};var Av={initModule:function(){Iv()}},Iv=function(){fu(),Ye.newsMeta=JSON.parse(frontendPassedData.newsMeta),window.laytheme.on("newpageshown",function(){fu(),ei()})},hu=Av,Ye={id:null,catid:null,type:null,newsMeta:[]},fu=function(){Ye.catid=M.parseIdsString(jQuery("body").attr("data-catid")),Ye.id=jQuery("body").attr("data-id"),Ye.type=jQuery("body").attr("data-type")},Cv=function(e){var t,r,n=Ye.id,o=Ye.newsMeta.length;for(r=0;r<o;r++)if(n==Ye.newsMeta[r].id){t=r;break}return e=="next"?(t++,t==o&&(t=0)):e=="prev"&&(t--,t<0&&(t=o-1)),t},du=function(e){var t=Cv(e);if(jQuery.isNumeric(t))return{title:Ye.newsMeta[t].title,url:Ye.newsMeta[t].url,id:Ye.newsMeta[t].id,catid:Ye.newsMeta[t].catid,thumb:Ye.newsMeta[t].thumb,thumbar:Ye.newsMeta[t].thumbar}},ei=function(e){e==null&&(e=jQuery("body")),jQuery("body").attr("data-type")=="lay_news"&&(e.find('a[href="#laynextproject"], a.laynextproject').each(function(){var t=du("next");typeof t!="undefined"&&jQuery(this).attr({"data-type":"news",href:t.url,"data-catid":M.stringifyCatIds(t.catid),"data-id":t.id,"data-title":t.title})}),e.find('a[href="#layprevproject"], a.layprevproject').each(function(){var t=du("prev");typeof t!="undefined"&&jQuery(this).attr({"data-type":"news",href:t.url,"data-catid":M.stringifyCatIds(t.catid),"data-id":t.id,"data-title":t.title})}))};var Sv={initModule:function(){on.$htmlbody=jQuery("html, body"),window.laytheme.on("newpageshown",Mv)}},pu=Sv,on={$htmlbody:null},Mv=function(){jQuery(".scrolltotop").on("click",function(e){e.preventDefault(),e.stopPropagation(),jQuery("html").hasClass("fp-enabled")?jQuery.fn.fullpage.moveTo(1,0):(on.$htmlbody.animate({scrollTop:0},600,"easeOutQuint",function(){on.$htmlbody.off("scroll wheel DOMMouseScroll mousewheel touchmove")}),on.$htmlbody.on("scroll wheel DOMMouseScroll mousewheel touchmove",function(){on.$htmlbody.stop()}))})};var ti=20,an=[],Oe=function(e){this.identifier=e,this.$nav_el=jQuery("nav."+e),this.suffix=e=="primary"?"":"_"+e,this.nav_hide=frontendPassedData.nav_customizer_properties["nav_hide"+this.suffix],this.nav_hidewhenscrollingdown=frontendPassedData.nav_customizer_properties["nav_hidewhenscrollingdown"+this.suffix],this.nav_fadeout_whenscrollingdown=frontendPassedData.nav_customizer_properties["nav_fadeout_whenscrollingdown"+this.suffix],this.max_translate_bottom=-1,this.max_translate_top=-1,this.nav_hidewhenscrolling_show_on_mouseover=frontendPassedData.nav_customizer_properties["nav_hidewhenscrolling_show_on_mouseover"+this.suffix],this.nav_position=frontendPassedData.nav_customizer_properties["nav_position"+this.suffix],this.rect=null,this.height_and_space_around=null,this.set_height_and_space_around()};Oe.prototype.setRect=function(){this.rect=this.$nav_el[0].getBoundingClientRect()};Oe.prototype.set_height_and_space_around=function(){this.setRect(),this.height_and_space_around=this.$nav_el.outerHeight(),this.nav_position.indexOf("top")!=-1?this.height_and_space_around+=this.rect.top:this.height_and_space_around+=window.innerHeight-this.rect.bottom,this.height_and_space_around+=ti};Oe.prototype.show_on_mouseover=function(e){this.nav_hidewhenscrolling_show_on_mouseover&&this.nav_position.indexOf(e)!=-1&&this.show()};Oe.prototype.show=function(){this.nav_hidewhenscrollingdown&&!this.nav_hide&&(window.lay_lightbox_opened==!1||typeof window.lay_lightbox_opened=="undefined")&&this.$nav_el.hasClass("hidden")&&this.$nav_el.removeClass("hidden").css({transform:"",opacity:"","pointer-events":""}),this.nav_fadeout_whenscrollingdown&&!this.nav_hide&&(window.lay_lightbox_opened==!1||typeof window.lay_lightbox_opened=="undefined")&&this.$nav_el.hasClass("hidden")&&this.$nav_el.removeClass("hidden").css({transform:"",opacity:"","pointer-events":""})};Oe.prototype.hide=function(){if((this.nav_fadeout_whenscrollingdown||this.nav_hidewhenscrollingdown)&&g.isDesktopOrTabletSize&&!this.nav_hide){if(this.nav_fadeout_whenscrollingdown&&(this.$nav_el.hasClass("hidden")||this.$nav_el.css({opacity:0,"pointer-events":"none"})),this.setRect(),this.nav_hidewhenscrollingdown&&!this.$nav_el.hasClass("hidden")){var e=0;if(this.nav_position.indexOf("center")!=-1&&(e="-50%"),this.nav_position.indexOf("top")!=-1){var t=this.rect.bottom+ti;t>this.max_translate_top?this.max_translate_top=t:t=this.max_translate_top,this.$nav_el.css("transform","translate("+e+",-"+t+"px)")}else{var t=window.innerHeight-this.rect.top+ti;t>this.max_translate_bottom?this.max_translate_bottom=t:t=this.max_translate_bottom,this.$nav_el.css("transform","translate("+e+","+t+"px)")}}this.$nav_el.addClass("hidden")}};var Pv=function(){switch(parseInt(frontendPassedData.nav_amount,10)){case 1:var e=new Oe("primary");an=[e];break;case 2:var e=new Oe("primary"),t=new Oe("second_menu");an=[e,t];break;case 3:var e=new Oe("primary"),t=new Oe("second_menu"),r=new Oe("third_menu");an=[e,t,r];break;case 4:var e=new Oe("primary"),t=new Oe("second_menu"),r=new Oe("third_menu"),n=new Oe("fourth_menu");an=[e,t,r,n];break}};jQuery(document).ready(function(){Pv()});var Rv=function(){return an},Zt=Rv;var jv=Backbone.Radio.channel("events"),kv={initModule:function(){Bv()},showAll:function(){vu()},hideAll:function(){zv()},setJqueryMap:function(){mu()},hideSt:function(){vo()},hideNav:function(){go()},hideNavBar:function(){ri()},showSt:function(){er()},getStPos:function(){return Dv()}},sn=kv,Qt={safetyOffset:20,scrollThreshold:50},P={oldScrollY:0,stheight:0,st_pos:"top",st_hidewhenscrollingdown:!1,st_fadeout_whenscrollingdown:!1,st_exists:!0,navbar_exists:!0,navbar_hidewhenscrollingdown:!1,navbar_fadeout_whenscrollingdown:!1,mouseover_target_area_bottom:0,mouseover_target_area_top:0},me={$navbar:null,$st:null},Dv=function(){return P.st_pos},er=function(){(P.st_hidewhenscrollingdown||P.st_fadeout_whenscrollingdown)&&P.st_exists&&(window.lay_lightbox_opened==!1||typeof window.lay_lightbox_opened=="undefined")&&me.$st.hasClass("hidden")&&me.$st.removeClass("hidden").css({transform:"","pointer-events":"",opacity:""})},vo=function(){if((P.st_hidewhenscrollingdown||P.st_fadeout_whenscrollingdown)&&g.isDesktopOrTabletSize&&P.st_exists&&!me.$st.hasClass("hidden")){if(P.st_hidewhenscrollingdown){var e=me.$st[0].getBoundingClientRect(),t=0;if(frontendPassedData.st_position.indexOf("center")!=-1&&(t="-50%"),P.st_pos=="top"){var r=e.bottom+Qt.safetyOffset;me.$st.css("transform","translate("+t+",-"+r+"px)")}else if(P.st_pos=="bottom"){var r=window.innerHeight-e.top+Qt.safetyOffset;me.$st.css("transform","translate("+t+","+r+"px)")}}P.st_fadeout_whenscrollingdown&&me.$st.css({opacity:0,"pointer-events":"none"}),me.$st.addClass("hidden")}},Ov=function(){jv.on("scroll",function(){var e=window.scrollY;e>0&&e<document.documentElement.scrollHeight-window.innerHeight&&g.isDesktopOrTabletSize&&(e>P.oldScrollY&&e>Qt.scrollThreshold&&(P.startedScrollingUpY=e,go(),vo(),ri()),e<P.oldScrollY&&e<P.startedScrollingUpY-Qt.scrollThreshold/2&&(po(),er(),xr()),e<Qt.scrollThreshold&&(po(),er(),xr()),P.oldScrollY=e)}),jQuery(window).on("fpOnLeave",function(e,t){switch(t.direction){case"up":po(),er(),xr();break;case"down":go(),vo(),ri();break}})},go=function(){for(var e=Zt(),t=0;t<e.length;t++)e[t].hide()},po=function(){for(var e=Zt(),t=0;t<e.length;t++)e[t].show()},mu=function(){P.navbar_exists&&(me.$navbar=jQuery(".navbar")),P.st_exists&&(me.$st=jQuery(".sitetitle"))},ri=function(){if(P.navbar_exists&&(P.navbar_hidewhenscrollingdown||P.navbar_fadeout_whenscrollingdown)&&g.isDesktopOrTabletSize&&!me.$navbar.hasClass("hidden")){if(P.navbar_hidewhenscrollingdown){var e=me.$navbar[0].getBoundingClientRect();if(frontendPassedData.navbar_position=="top"){var t=e.height+Qt.safetyOffset;me.$navbar.css("transform","translateY("+-t+"px)")}else if(frontendPassedData.navbar_position=="bottom"){var t=e.height+Qt.safetyOffset;me.$navbar.css("transform","translateY("+t+"px)")}}P.navbar_fadeout_whenscrollingdown&&me.$navbar.css({opacity:0,"pointer-events":"none"}),me.$navbar.addClass("hidden")}},xr=function(){P.navbar_exists&&(P.navbar_hidewhenscrollingdown||P.navbar_fadeout_whenscrollingdown)&&(window.lay_lightbox_opened==!1||typeof window.lay_lightbox_opened=="undefined")&&me.$navbar.removeClass("hidden").css({transform:"","pointer-events":"",opacity:"1"})},mo=function(){if(P.stheight=0,P.st_exists&&(P.st_hidewhenscrollingdown||P.st_fadeout_whenscrollingdown)){var e=me.$st.outerHeight();P.st_pos=="top"||P.st_pos=="center"?e+=me.$st[0].getBoundingClientRect().top:P.st_pos=="bottom"&&(e+=window.innerHeight-me.$st[0].getBoundingClientRect().bottom),e+=Qt.safetyOffset,P.stheight=e}},Lv=function(){jQuery(window).on("window_width_changed",_.debounce(function(){mo();for(var e=Zt(),t=0;t<e.length;t++)e[t].set_height_and_space_around()},300))},Fv=function(){jQuery(window).on("mousemove",_.throttle(function(e){if(g.isDesktopOrTabletSize){var t=Zt();
2368if(e.clientY<=P.mouseover_target_area_top){for(var r=0;r<t.length;r++)t[r].show_on_mouseover("top");P.st_pos=="top"&&er(),frontendPassedData.navbar_position=="top"&&xr()}if(e.clientY>=window.innerHeight-P.mouseover_target_area_bottom){for(var r=0;r<t.length;r++)t[r].show_on_mouseover("bottom");P.st_pos=="bottom"&&er(),frontendPassedData.navbar_position=="bottom"&&xr()}}},100))},Nv=function(){var e=0;P.st_pos=="top"&&(e=P.stheight);for(var t=Zt(),r=0;r<t.length;r++)if(t[r].nav_position.indexOf("top")!=-1){var n=t[r].height_and_space_around;n>e&&(e=n)}if(frontendPassedData.navbar_position=="top"&&P.navbar_exists){var o=me.$navbar.height();e=e<o?o:e}P.mouseover_target_area_top=e},Qv=function(){var e=0;P.st_pos=="bottom"&&(e=P.stheight);for(var t=Zt(),r=0;r<t.length;r++)if(t[r].nav_position.indexOf("bottom")!=-1){var n=t[r].height_and_space_around;n>e&&(e=n)}if(frontendPassedData.navbar_position=="bottom"&&P.navbar_exists){var o=me.$navbar.height();e=e<o?o:e}P.mouseover_target_area_bottom=e},Bv=function(){if(frontendPassedData.st_position.indexOf("top")!=-1?P.st_pos="top":frontendPassedData.st_position.indexOf("bottom")!=-1?P.st_pos="bottom":P.st_pos="center",frontendPassedData.st_hidewhenscrollingdown==1?P.st_hidewhenscrollingdown=!0:P.st_hidewhenscrollingdown=!1,frontendPassedData.st_fadeout_whenscrollingdown==1?P.st_fadeout_whenscrollingdown=!0:P.st_fadeout_whenscrollingdown=!1,frontendPassedData.st_hide==1?P.st_exists=!1:P.st_exists=!0,frontendPassedData.navbar_hide==1?P.navbar_exists=!1:P.navbar_exists=!0,frontendPassedData.navbar_fadeout_whenscrollingdown==1?P.navbar_fadeout_whenscrollingdown=!0:P.navbar_fadeout_whenscrollingdown=!1,frontendPassedData.navbar_hidewhenscrollingdown==1?P.navbar_hidewhenscrollingdown=!0:P.navbar_hidewhenscrollingdown=!1,mu(),mo(),Ov(),Lv(),Fv(),Nv(),Qv(),jQuery(".sitetitle").hasClass("img")){var e=jQuery(".sitetitle img")[0];e.complete?mo():e.onload=function(){mo()}}window.laytheme.on("newpageshown",function(){vu()})},zv=function(){go(),vo(),typeof hideNavBar=="function"&&hideNavBar()},vu=function(){po(),er(),xr()};var Uv={initModule:function(){Wv()}},gu=Uv,Tr=0,se={$body:null,$nav:null,$st:null},Vv=function(){se.$body=jQuery("body"),se.$nav=jQuery("nav.primary"),se.$nav2=jQuery("nav.second_menu"),se.$nav3=jQuery("nav.third_menu"),se.$nav4=jQuery("nav.fourth_menu"),se.$st=jQuery(".sitetitle")},Hv=function(){Tr=parseInt(frontendPassedData.maxwidth,10),Vv(),qv(),yu()},qv=function(){jQuery(window).on("window_width_changed",yu)},yu=function(){var e=se.$body.innerWidth(),t=frontendPassedData.nav_customizer_properties,r=parseFloat(frontendPassedData.frame_left),n=parseFloat(frontendPassedData.frame_right);if(frontendPassedData.frame_leftright_mu=="%"&&(r=Tr/100*r,n=Tr/100*n),e>Tr&&g.isDesktopOrTabletSize){var o=(e-Tr)/2+r,a=(e-Tr)/2+n;frontendPassedData.st_position.indexOf("left")!=-1?se.$st.css("left",o+"px"):frontendPassedData.st_position.indexOf("right")!=-1&&se.$st.css("right",a+"px"),t.nav_position.indexOf("left")!=-1?se.$nav.css("left",o+"px"):t.nav_position.indexOf("right")!=-1&&se.$nav.css("right",a+"px"),frontendPassedData.nav_amount>=2&&(t.nav_position_second_menu.indexOf("left")!=-1?se.$nav2.css("left",o+"px"):t.nav_position_second_menu.indexOf("right")!=-1&&se.$nav2.css("right",a+"px")),frontendPassedData.nav_amount>=3&&(t.nav_position_third_menu.indexOf("left")!=-1?se.$nav3.css("left",o+"px"):t.nav_position_third_menu.indexOf("right")!=-1&&se.$nav3.css("right",a+"px")),frontendPassedData.nav_amount>=4&&(t.nav_position_fourth_menu.indexOf("left")!=-1?se.$nav4.css("left",o+"px"):t.nav_position_fourth_menu.indexOf("right")!=-1&&se.$nav4.css("right",a+"px"))}else frontendPassedData.st_position.indexOf("left")!=-1?se.$st.css("left",""):frontendPassedData.st_position.indexOf("right")!=-1&&se.$st.css("right",""),t.nav_position.indexOf("left")!=-1?se.$nav.css("left",""):t.nav_position.indexOf("right")!=-1&&se.$nav.css("right",""),frontendPassedData.nav_amount>=2&&(t.nav_position_second_menu.indexOf("left")!=-1?se.$nav2.css("left",""):t.nav_position_second_menu.indexOf("right")!=-1&&se.$nav2.css("right","")),frontendPassedData.nav_amount>=3&&(t.nav_position_third_menu.indexOf("left")!=-1?se.$nav3.css("left",""):t.nav_position_third_menu.indexOf("right")!=-1&&se.$nav3.css("right","")),frontendPassedData.nav_amount>=4&&(t.nav_position_fourth_menu.indexOf("left")!=-1?se.$nav4.css("left",""):t.nav_position_fourth_menu.indexOf("right")!=-1&&se.$nav4.css("right",""))},Wv=function(){frontendPassedData.misc_options_max_width_apply_to_logo_and_nav=="on"&&frontendPassedData.maxwidth!=0&&Hv()};var _u=Backbone.Radio.channel("events"),Gv={initModule:function(){frontendPassedData.mobile_menu_style!="style_desktop_menu"&&eg()},hideMenu:function(){frontendPassedData.mobile_menu_style!="style_desktop_menu"&&_o()},hideMobileMenu:function(){frontendPassedData.mobile_menu_style!="style_desktop_menu"&&Er()}},bt=Gv,Rt={wWidth:window.innerWidth,oldInnerWidth:window.innerWidth,isOpen:!1},le={$nav:null,$navul:null,$burger:null},Xv=function(){switch(frontendPassedData.mobile_burger_type){case"default":case"default_thin":jQuery(".burger-wrap-default").on("click",wu);break;case"new":jQuery(".burger-wrap-new").on("click",wu);break;
2368case"custom":jQuery(".burger-custom-wrap-close").on("click",function(){le.$nav.hasClass("active")&&_o()}),jQuery(".burger-custom-wrap-open").on("click",function(){le.$nav.hasClass("active")||bu()});break}},bu=function(){switch(le.$nav.addClass("active"),jQuery("body").addClass("mobile-menu-open").removeClass("lay-hide-phone-menu"),Rt.isOpen=!0,frontendPassedData.mobile_menu_style){case"style_1":var e=0;frontendPassedData.mobile_hide_menubar!="1"&&(e=jQuery(".navbar")[0].getBoundingClientRect().height),jQuery("body").addClass("animate-mobile-menu"),le.$nav.on("transitionend",function(){jQuery("body").removeClass("animate-mobile-menu")}),le.$nav.css({transform:"translateY("+e+"px)","-webkit-transform":"translateY("+e+"px)",top:0});break;case"style_2":break;case"style_3":var e=0;frontendPassedData.mobile_hide_menubar!="1"&&(e=jQuery(".navbar")[0].getBoundingClientRect().height);var t=e;frontendPassedData.woocommerce_active&&jQuery(".woocommerce-store-notice").length>0&&jQuery(".woocommerce-store-notice").is(":visible")&&(t+=jQuery(".woocommerce-store-notice").outerHeight()),le.$nav.css({height:"calc(100vh - "+e+"px)",top:t+"px"});break}},wu=function(){if(le.$nav.hasClass("active"))_o();else{switch(frontendPassedData.mobile_burger_type){case"new":case"default":case"default_thin":frontendPassedData.mobile_menu_style!="style_2"&&le.$burger.addClass("active");break}bu()}},$v=function(){jQuery(window).on("resize orientationchange",function(){Rt.oldInnerWidth=Rt.wWidth,Rt.wWidth=window.innerWidth,g.isDesktopOrTabletSize?Rt.oldInnerWidth<=g.breakpoint&&(Yv(),le.$nav.css({transform:"","-webkit-transform":""}),le.$nav.removeClass("active transition"),frontendPassedData.mobile_menu_style!="style_2"&&le.$burger.removeClass("active"),jQuery("body").removeClass("mobile-menu-open")):(Rt.oldInnerWidth>g.breakpoint&&(le.$nav.hasClass("active")||_o(),sn.showAll()),xu())})},xu=function(){if(!g.isDesktopOrTabletSize)switch(frontendPassedData.mobile_menu_style){case"style_1":var e=jQuery(".navbar").outerHeight(),t=window.innerHeight-e;le.$nav.css("max-height",t+"px");break;case"style_2":var t=window.innerHeight;le.$nav.css("max-height",t+"px");break}},Yv=function(){g.isDesktopOrTabletSize&&le.$nav.css("max-height","")},_o=function(){Rt.isOpen=!1,g.isPhoneSize?Er():(frontendPassedData.mobile_menu_style!="style_2"&&le.$burger.removeClass("active"),jQuery("body").removeClass("mobile-menu-open"),le.$nav.removeClass("active").css({transform:"","-webkit-transform":""}))},Er=function(){if(g.isPhoneSize)switch(Rt.isOpen=!1,le.$nav.removeClass("active"),jQuery("body").removeClass("mobile-menu-open"),frontendPassedData.mobile_menu_style!="style_2"&&le.$burger.removeClass("active"),frontendPassedData.mobile_menu_style){case"style_1":var e=le.$navul.outerHeight();e*=-1;var t=jQuery(".navbar").outerHeight();e-=t,jQuery("body").addClass("animate-mobile-menu"),le.$nav.on("transitionend",function(){jQuery("body").removeClass("animate-mobile-menu")}),le.$nav.css({transform:"translateY("+e+"px)","-webkit-transform":"translateY("+e+"px)"});break;case"style_2":break;case"style_3":le.$nav.css({height:""});break}},Kv=function(){le.$nav=jQuery("nav.mobile-nav"),le.$navul=le.$nav.find("ul"),le.$burger=jQuery(".burger-default, .burger-new")},Jv=function(){jQuery("nav.mobile-nav a").on("dragstart",function(e){e.preventDefault()})},yo,ln,ni,Zv=function(){if(frontendPassedData.mobile_navbar_fixed!="")switch(yo=jQuery(".woocommerce-store-notice"),ln=jQuery(".mobile-nav"),ni=jQuery(".navbar"),frontendPassedData.mobile_menu_style){case"style_1":yo.length>0&&ln.length>0&&ni.length>0&&_u.on("scroll",function(){if(Rt.isOpen){var e=ni[0].getBoundingClientRect(),t=e.bottom;ln.css("transform","translateY("+t+"px)")}});break;case"style_2":break;case"style_3":yo.length>0&&ln.length>0&&_u.on("scroll",function(){var e=yo[0].getBoundingClientRect(),t=window.scrollY;t>=e.height&&(t=e.height),ln.css("transform","translateY(-"+t+"px)")});break}},eg=function(){Jv(),Kv(),Zv(),$v(),Xv(),xu(),WebFont.load({custom:{families:frontendPassedData.m_st_fontfamily},active:function(){Er()},classes:!1}),Er(),setTimeout(function(){jQuery("body").addClass("mobile-menu-animation-possible")},0),jQuery(document).ready(function(){setTimeout(function(){window.laytheme.on("newpage",Er)},100)}),window.laytheme.on("searchshown",Er)};var tg={maybeReload:function(e){return rg(e)}},Tu=tg,rg=function(e){var t=e;if(t==null)return!1;var r=t.id,n=t.type,o=!1;switch(n){case"project":var a=frontendPassedData.footer_active_in_projects;if(a=="all")o=frontendPassedData.projectsFooterId;else if(a=="individual"&&frontendPassedData.individual_project_footers!=""){var i=JSON.parse(frontendPassedData.individual_project_footers);_.isObject(i)&&typeof i[r]!="undefined"&&(o=i[r])}break;case"page":var l=frontendPassedData.footer_active_in_pages;if(l=="all")o=frontendPassedData.pagesFooterId;else if(l=="individual"&&frontendPassedData.individual_page_footers!=""){var i=JSON.parse(frontendPassedData.individual_page_footers);_.isObject(i)&&typeof i[r]!="undefined"&&(o=i[r])}break;case"category":var c=frontendPassedData.footer_active_in_categories;if(c=="all")o=frontendPassedData.categoriesFooterId;else if(c=="individual"&&frontendPassedData.individual_category_footers!=""){var i=JSON.parse(frontendPassedData.individual_category_footers);_.isObject(i)&&typeof i[r]!="undefined"&&(o=i[r])}break}var s=frontendPassedData.shortcodes;if(jQuery.isArray(s)&&o!=!1)for(var u=0;u<s.length;u++){var f=s[u];if(f.info.type=="post"&&f.info.id==o)return!0}if((n=="project"||n=="page")&&(n="post"),jQuery.isArray(s)){for(var u=0;u<s.length;u++)if(s[u].info.type==n&&s[u].info.id==r)return!0}return!1};var Eu=function(e){var t=!1,r=!1;return jQuery(".lay-overlay").each(function(){var n=M.filterURL(jQuery(this).attr("data-link"));e==n&&(t=!0),jQuery(this).attr("data-disable-scroll")=="on"&&(r=!0)}),xt(e),t&&(r&&M.fixBody(),setTimeout(function(){jQuery('.lay-overlay[data-link="'+e+'"]').one("transitionend",function(){typeof window.layCarouselFadeCarousel!="undefined"&&typeof window.layCarouselFadeCarousel.loadFirstLazyImage!="undefined"&&window.layCarouselFadeCarousel.loadFirstLazyImage(jQuery(this))}),jQuery('.lay-overlay[data-link="'+e+'"]').addClass("lay-show-overlay"),jQuery('.lay-overlay-bg[data-link="'+e+'"]').addClass("lay-show-overlay-bg"),jQuery("body").addClass("lay-overlay-open")},0)),t},ng=function(){jQuery(document).on("click",".lay-overlay-bg",function(){xt(
2368)}),jQuery(document).on("click",".overlay-close",function(){xt()})},og=function(e){switch(e.which){case 27:M.unfixBody(),setTimeout(function(){xt()},0);break}},xt=function(e){M.unfixBody(),setTimeout(function(){e?(jQuery(".lay-overlay.lay-show-overlay").each(function(){jQuery(this).attr("data-link")!=e&&(this.classList.contains("lay-fade")&&(g.isDesktopSize||g.isTabletSize)||this.classList.contains("lay-phone-fade")&&g.isPhoneSize?(jQuery(this).one("animationend",function(){this.classList.remove("lay-fadeout"),this.classList.remove("lay-show-overlay")}),this.classList.add("lay-fadeout")):jQuery(this).removeClass("lay-show-overlay"))}),jQuery(".lay-overlay-bg.lay-show-overlay-bg").each(function(){jQuery(this).attr("data-link")!=e&&jQuery(this).removeClass("lay-show-overlay-bg")}),jQuery(".lay-overlay.lay-show-overlay").length>0&&jQuery("body").removeClass("lay-overlay-open")):(jQuery(".lay-overlay.lay-show-overlay").each(function(){this.classList.contains("lay-fade")&&(g.isDesktopSize||g.isTabletSize)||this.classList.contains("lay-phone-fade")&&g.isPhoneSize?(jQuery(this).one("animationend",function(){this.classList.remove("lay-fadeout"),this.classList.remove("lay-show-overlay")}),this.classList.add("lay-fadeout")):jQuery(this).removeClass("lay-show-overlay")}),jQuery(".lay-overlay-bg").removeClass("lay-show-overlay-bg"),jQuery("body").removeClass("lay-overlay-open")),jQuery(".lay-overlay.lay-show-overlay").each(function(){ag(jQuery(this))})},0)},ag=function(e){typeof e!="undefined"&&(e.find("iframe[src^='//player.vimeo.com/']").each(function(){if(typeof Vimeo!="undefined"){var t=new Vimeo.Player(this);t.pause()}}),e.find("iframe[src^='//www.youtube.com']").each(function(){var t=jQuery(this).data("ytplayer");typeof t=="undefined"&&window.youtubeApiReady?(t=new YT.Player(this,{events:{onReady:function(r){r.target.stopVideo()}}}),jQuery(this).data("ytplayer",t)):typeof t!="undefined"&&typeof t.stopVideo=="function"&&t.stopVideo()}),e.find("video").each(function(){this.pause()}))},ig=function(){document.addEventListener("keydown",og)},sg=function(){window.laytheme.on("newpageshown",function(){lg()})},lg=function(){jQuery(".lay-overlay a").removeClass("current-link");var e=jQuery('.lay-overlay a[data-id="'+window.history.state.id+'"][data-type="'+window.history.state.type+'"]');e.length!=0&&e.each(function(){this.classList.add("current-link")});var t=window.history.state.catid;Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var n=t[r],e=jQuery('.lay-overlay a[data-catid="'+n+'"][data-type="category"]');e.length!=0&&e.each(function(){this.classList.add("current-link")})}},Au=function(){ng(),ig(),sg()};var Iu=function(){jQuery(document).on("click",'a[data-type]:not([target="_blank"])',function(e){if(jQuery(this.parentNode).hasClass("laycart")&&frontendPassedData.sideCartPluginActive==!0){e.preventDefault(),e.stopPropagation();return}var t=jQuery(this),r=t.attr("href");r=M.filterURL(r);var n=Eu(r);if(n){e.preventDefault(),e.stopPropagation();return}else{if(frontendPassedData.is_customize||window.navigator.userAgent.indexOf("Instagram")!=-1)return;if(jQuery("body").attr("data-type")==jQuery(this).attr("data-type")&&jQuery("body").attr("data-id")==jQuery(this).attr("data-id"))e.preventDefault(),bt.hideMobileMenu();else if(jQuery(this).attr("data-type")!="custom"&&!e.metaKey&&!e.ctrlKey){e.preventDefault();var o=passedDataHistory.title,a=t.attr("data-title");typeof a!="undefined"&&a!=""&&(o=passedDataHistory.titleprefix+_.unescape(t.attr("data-title")));var i=M.parseIdsString(t.attr("data-catid"));Ar.pushState({type:t.attr("data-type"),id:t.attr("data-id"),catid:i},o,r)}}})};var Ke={animationTimer:null,animationInterval:null,animDur:300},ug=function(){Ke.animationTimer=0,clearInterval(Ke.animationInterval),Ke.animationInterval=setInterval(function(){Ke.animationTimer+=50,Ke.animationTimer>=Ke.animDur&&(window.laytheme.trigger("content_fadeout_transition_ended"),clearInterval(Ke.animationInterval))},50)},cg=function(){return clearInterval(Ke.animationInterval),Ke.animationTimer>=Ke.animDur||wo?0:Ke.animDur-Ke.animationTimer},fg=function(){Ke.animDur=parseInt(frontendPassedData.navigation_transition_duration,10)/2,window.laytheme.on("transition_navigation_in_started",function(){wo=!1}),window.laytheme.on("transition_navigation_out_completed",function(){wo=!0})},wo=!1,bo={initModule:function(){fg()},startTimer:function(){ug()},hasElementTransitionEnded:function(){return wo},getTimeToWait:function(){return cg()}};var oi=function(){frontendPassedData.woocommerce_active||(jQuery(".current-menu-parent").removeClass("current-menu-parent"),jQuery(".current-menu-ancestor").removeClass("current-menu-ancestor"),jQuery(".current-menu-item:not(.qtranxs-lang-menu-item)").removeClass("current-menu-item"),jQuery(".current_page_item:not(.qtranxs-lang-menu-item)").removeClass("current_page_item"));var e=jQuery('nav a[data-id="'+window.history.state.id+'"][data-type="'+window.history.state.type+'"]');e.length!=0&&e.each(function(){jQuery(this.parentNode).addClass("current-menu-item"),jQuery(this.parentNode.parentNode).closest("li.menu-item").addClass("current-menu-parent")});var t=window.history.state.catid;Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var n=t[r],e=jQuery('nav a[data-catid="'+n+'"][data-type="category"]');e.length!=0&&e.each(function(){jQuery(this.parentNode).addClass("current-menu-item"),jQuery(this.parentNode.parentNode).closest("li.menu-item").addClass("current-menu-parent")})}};var Cu=0,ai=0,Mu=0,Su=0,ii=0,rr={$body:null},dg=function(){return window.history.state},hg=function(){"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual");var e=window.location.href,t={scrollpos:window.scrollY,fullscreenSliderPos:0,type:rr.$body.attr("data-type"),id:rr.$body.attr("data-id"),catid:M.parseIdsString(rr.$body.attr("data-catid"))};window.history.replaceState(t,jQuery("title").text(),e),oi(),fo.maybeHideProjectArrowsOnInit(window.history.state)},pg=function(e,t,r){mg(e)||(ku(),window.history.pushState(e,t,r),document.title=t,Mt.triggerPushState(),Pu(e))},mg=function(e){return window.history.state==null?!1:window.history.state.id==e.id&&window.history.state.type==e.type},vg=function(){window.addEventListener("popstate",function(e){if(window.location.href.indexOf("#")!=-1,e.state===null&&window.location.href.indexOf("#")!=-1){var t={scrollpos:window.scrollY,type:rr.$body.attr("data-type"),id:rr.$body.attr("data-id"),catid:M.parseIdsString(rr.$body.attr("data-catid"))},r=window.location.href;window.history.replaceState(t,jQuery("title").text(),r)}else window.laytheme.trigger("popstate"),e.state.type==jQuery("body").attr("data-type")&&e.state.id==jQuery("body").attr("data-id")||(Ru(e.state),Pu(e.state))})},gg=function(){document.querySelector("#footer-region")!=null&&(Mu=document.querySelector("#footer-region").scrollTop)},Pu=function(e){bo.startTimer(),ai=Cu,Cu=window.scrollY,ii=Su,Su=si;var t=Tu.maybeReload(e);if(frontendPassedData.misc_options_disable_ajax=="on"&&(t=!0),t)window.location.reload(!1);else{xt();var r=!1;parseInt(frontendPassedData.navigation_transition_out_duration,10)!=0&&(r=!0),frontendPassedData.navigation_transition_out=="none"&&(r=!1),r?Yt.hideRegions():(Kt.setTransitionStatus("ended"),window.laytheme.trigger("transition_navigation_out_completed")),jQuery("body").attr({"data-type":e.type,"data-id":e.id,"data-catid":M.stringifyCatIds(e.catid)}),oi(),Yt.showLayout("",gg),window.laytheme.trigger("newpage")}},Ru=function(e){window.laytheme.off("newpageshown",Du),window.laytheme.on("newpageshown",ju)},ju=function(){var e=!0;if(window.location.href.indexOf("#")!=-1&&(e=!1,window.location.href.indexOf("#category-")!=-1&&(e=!0)),frontendPassedData.never_change_scrolling_position=="on"&&g.screenSize!="phone"&&(e=!1),e)if(typeof jQuery.fn.fullpage!="undefined"&&typeof magneticSlidesPassedData!="undefined"&&typeof jQuery.fn.fullpage.silentMoveTo=="function")magneticSlidesPassedData.ms_direction=="horizontal"?jQuery.fn.fullpage.silentMoveTo(1,ii):jQuery.fn.fullpage.silentMoveTo(ii,0);else{var t=jQuery(tr.join(",")),r=oo(t);r.length>0?jQuery.when(no(r)).then(function(){window.scrollTo(0,ai)}).catch(function(n){console.log(n),console.log("Promise Rejected")}):window.scrollTo(0,ai)}window.laytheme.off("newpageshown",Ru)},ku=function(){window.laytheme.off("newpageshown",ju),window.laytheme.on("newpageshown",Du)},Du=function(){frontendPassedData.never_change_scrolling_position=="on"&&g.screenSize!="phone"?document.querySelector("#footer-region")!=null&&document.querySelector("#footer-region").scrollTo(0,Mu):window.location.href.indexOf("#")==-1&&window.scrollTo(0,0),window.laytheme.off("newpageshown",ku)},si=0,yg=function(){typeof magneticSlidesPassedData!="undefined"&&(magneticSlidesPassedData.ms_direction=="horizontal"?jQuery(window).on("fpAfterSlideLoad",function(e,t){si=t.slideIndex}):jQuery(window).on("fpAfterLoad",function(e,t){si=t.index}))},tr,_g=function(){window.laytheme.on("content_ready",function(e){switch(tr=void 0,e){case"de
2368sktop":tr=["#grid",".cover-region-desktop","#footer"];break;case"phone":var t=jQuery("#footer-custom-phone-grid").length!=0,r=jQuery("#custom-phone-grid").length!=0;t&&r?tr=["#custom-phone-grid",".cover-region-phone","#footer-custom-phone-grid"]:!t&&r?tr=["#custom-phone-grid",".cover-region-phone","#footer"]:t&&!r?tr=["#grid",".cover-region-desktop","#footer-custom-phone-grid"]:!t&&!r&&(tr=["#grid",".cover-region-desktop","#footer"]);break}})},wg=function(){_g(),rr.$body=jQuery("body"),hg(),Iu(),vg(),setTimeout(function(){yg()},0)},bg={initModule:wg,getState:dg,pushState:pg},Ar=bg;var xg={initModule:function(){g.isTouchDevice&&Tg()}},Ou=xg,Tg=function(){if(frontendPassedData.fi_mo_touchdevice_behaviour=="mo_on_tap"){jQuery(document).on("click","a.thumb[data-type]",function(r){r.stopPropagation(),r.preventDefault()});var e=!1,t;jQuery(document).on("touchstart","a.thumb[data-type]",function(r){clearTimeout(t),this.classList.contains("hover")||(e=!0,t=setTimeout(function(){e=!1},100),r.stopPropagation(),r.preventDefault(),jQuery("a.thumb").removeClass("hover"),this.classList.add("hover"))}),jQuery(document).on("tap","a.thumb[data-type]",function(r){r.stopPropagation(),r.preventDefault(),e==!1&&this.classList.contains("hover")&&Eg(jQuery(this))})}},Eg=function(e){if(frontendPassedData.is_customize)return!1;var t=e.attr("href");if(t=M.filterURL(t),jQuery("body").attr("data-type")==jQuery(this).attr("data-type")&&jQuery("body").attr("data-id")==jQuery(this).attr("data-id"))event.preventDefault(),bt.hideMobileMenu();else if(jQuery(this).attr("data-type")!="custom"&&!event.metaKey&&!event.ctrlKey){event.preventDefault();var r=passedDataHistory.title;typeof e.attr("data-title")!="undefined"&&(r=passedDataHistory.titleprefix+_.unescape(e.attr("data-title")));var n=M.parseIdsString(e.attr("data-catid"));Ar.pushState({type:e.attr("data-type"),id:e.attr("data-id"),catid:n},r,t)}};var Ag={polyfill_flexbox:function(){xo()},initModule:function(){Ig(),Fu()}},Lu=Ag,xo=function(){Modernizr.flexbox||(jQuery(".col.align-middle").each(function(){var e=!1,t=jQuery(this);if(g.isPhoneSize?(t.css("margin-top","0"),jQuery(t[0].parentNode.parentNode).hasClass("_100vh")&&jQuery(t[0].parentNode).find(".col").length==1&&(e=!0)):e=!0,e){var r=jQuery(this.parentNode).height(),n=t.height(),o=(r-n)/2;t.css("margin-top",o+"px")}}),jQuery(".col.align-bottom").each(function(){var e=!1,t=jQuery(this);if(g.isPhoneSize?(t.css("margin-top","0"),jQuery(t[0].parentNode.parentNode).hasClass("_100vh")&&jQuery(t[0].parentNode).find(".col").length==1&&(e=!0)):jQuery(t[0].parentNode.parentNode).hasClass("_100vh")&&(e=!0),e){var r=jQuery(this.parentNode).height(),n=t.height(),o=r-n;t.css("margin-top",o+"px")}}))},Ig=function(){Fu(),window.laytheme.on("newpageshown",function(){xo()})},Fu=function(){jQuery(window).on("resize",function(){xo()}),jQuery(window).on("orientationchange",function(){setTimeout(function(){xo()},400)})};var Cg=Marionette.View.extend({tagName:"div",template:_.template(`<div class="mediawrap <%= getSizingClassName() %> <%= getFollowMovementClassName() %>"> 2369 <%= getMedia() %> 2370 </div>`),events:{click:"onHideClick"},onHideClick:function(){Bt.hide()},onRender:function(){setTimeout(function(){Bt.setReferences(),Bt.prepareBoundary()},0)},onAttach:function(){Bt.initHideAfter()},onResize:function(){var e=window.innerWidth/window.innerHeight,t=this.model.get("width")/this.model.get("height"),r=e>t?"w100":"h100";this.$el.find(".mediawrap").removeClass("w100 h100").addClass(r)},templateContext:function(){return{getFollowMovementClassName:function(){return frontendPassedData.intro_movement==1?"followmovement":""},getMedia:function(){switch(this.type){case"video":return'<video class="media loaded" data-ar="'+this.getAr()+'" playsinline muted autoplay loop src="'+this.url+'"></video>';case"image":return'<img class="lazyload js-intro-image media" data-ar="'+this.getAr()+'" sizes="'+this.getSizes()+'" data-srcset="'+this.getSrcset()+'" src="" alt="">'}},getSizes:function(){var e=1.15*this.width*window.innerHeight/this.height/window.innerWidth;return e=Math.round(Math.max(e,1.15)*100),e+"vw"},getSizingClassName:function(){var e=window.innerWidth/window.innerHeight,t=this.width/this.height,r=e>t?"w100":"h100";return r},getSrcset:function(){var e=[];for(var t in g.imageSizes){var r=this.sizes["_"+g.imageSizes[t]];r=r+" "+g.imageSizes[t]+"w",e.push(r)}return e.join(", ")},getAr:function(){return this.width/this.height},getText:function(){return this.text}}}}),Nu=Cg;
2370var Sg=Marionette.View.extend({className:"intro",template:_.template(` 2371 <div class="intro-media-region"></div> 2372 <div class="intro-svg-wrap"><%= getSVGOverlay() %></div> 2373 <div class="intro_text `+frontendPassedData.intro_text_textformat+`"><%= getText() %></div> 2374 `),regions:{mediaRegion:".intro-media-region"},templateContext:function(){return{getSVGOverlay:function(){if(frontendPassedData.intro_use_svg_overlay==!0)return'<img class="intro-svg-overlay" src="'+frontendPassedData.intro_svg_url+'" alt="">'},getText:function(){if(frontendPassedData.intro_use_text_overlay==!0)return frontendPassedData.intro_text}}}}),Qu=Sg;var zu={init:function(e){Vu(e)},hide:function(){Ir()},destroy:function(){un()},unbind:function(){unbind()},initHideAfter:function(){Rg()},getBoundaries:function(){return{boundaryX:tt.boundaryX,boundaryY:tt.boundaryY}},setReferences:function(){Pg()},prepareBoundary:function(){ci()},cancelLoading:function(){Mg()}},Bt=zu,ui,To,zt=null,Eo,Uu,tt={boundaryX:0,boundaryY:0,intro:null},Bu={mediaScale:115};window.laytheme.on("customizer_showintro",function(){un(),Vu()});window.laytheme.on("customizer_hideintro",function(){Ir(),jQuery("body").removeClass("intro-loading")});var Mg=function(){jQuery("body").removeClass("intro-loading")},li=function(){var e=null;g.orientation==="landscape"?e=new Backbone.Model(frontendPassedData.intro_landscape):e=new Backbone.Model(frontendPassedData.intro_portrait),To=new Nu({model:e});var t=new Qu,r=Marionette.Application.extend({region:"#intro-region",onStart:function(){this.showView(t),t.showChildView("mediaRegion",To),jQuery("body").removeClass("intro-loading")}}),n=new r;n.start()},Vu=function(){if(jQuery("#intro-region").removeClass("hide"),jQuery("body").removeClass("intro-loading"),!!frontendPassedData.is_frontpage&&frontendPassedData.intro_active){var e=!1;if(g.orientation==="landscape"?jQuery.isEmptyObject(frontendPassedData.intro_landscape)||(e=!0):jQuery.isEmptyObject(frontendPassedData.intro_portrait)||(e=!0),frontendPassedData.intro_use_svg_overlay==!0&&frontendPassedData.intro_svg_url!=""&&(e=!0),frontendPassedData.intro_use_text_overlay==!0&&frontendPassedData.intro_text!=""&&(e=!0),frontendPassedData.intro_hide_on_phone&&window.innerWidth<parseInt(frontendPassedData.breakpoint,10)&&(e=!1),e==!1){un();return}Eo=jQuery("body"),zt=new Particle(0,0),li(),window.laytheme.on("orientationchanged",li),setTimeout(function(){frontendPassedData.intro_movement==!0&&(jg(),Gu())},0),jQuery(window).on("resize",Xu),jQuery(document).on("scroll",Hu)}},Pg=function(){ui=jQuery(".intro .mediawrap"),tt.intro=frontendPassedData.intro_landscape,g.orientation==="portrait"&&(tt.intro=frontendPassedData.intro_portrait)},Hu=function(){window.scrollY>10&&Ir()},Rg=function(){var e=parseInt(frontendPassedData.intro_hide_after,10);if(e!=0){var t=To.model.get("type");if(typeof t=="undefined")setTimeout(function(){Ir()},e);else switch(t){case"video":jQuery(".intro video").on("playing",function(){setTimeout(function(){Ir()},e)});break;default:case"image":jQuery(".js-intro-image").length>0&&(jQuery(".js-intro-image")[0].onload=function(){setTimeout(function(){Ir()},e)});break}}},Tt=function(e,t,r,n,o){return n+(o-n)*((Math.min(r,Math.max(t,e))-t)/(r-t))},ci=function(){var e=jQuery(".intro .mediawrap").height(),t=0,r=0;ui.hasClass("h100")?(r=e*Bu.mediaScale/100,t=r*tt.intro.width/tt.intro.height):(t=Eo.innerWidth()*Bu.mediaScale/100,r=t*tt.intro.height/tt.intro.width),tt.boundaryX=(t-Eo.innerWidth())/2,tt.boundaryY=(r-e)/2,tt.boundaryX-=2,tt.boundaryY-=2},we=1,jg=function(){ci(),g.isTouchDevice?window.addEventListener("deviceorientation",Wu):jQuery(window).on("mousemove",qu)},qu=function(e){var t=Tt(e.clientX,0,Eo.innerWidth(),we,-we),r=Tt(e.clientY,0,window.innerHeight,we,-we);zt.updateDestination(t,r)},Wu=function(e){var t=e.gamma,r=e.beta;window.orientation==90?(t=Tt(e.beta,-45,45,we,-we),r=Tt(-e.gamma,-20,70,we,-we)):window.orientation==-90?(t=Tt(-e.beta,-45,45,we,-we),r=Tt(e.gamma,-20,70,we,-we)):window.orientation==180?(t=Tt(-e.gamma,-45,45,we,-we),r=Tt(-e.beta,-20,70,we,-we)):(t=Tt(e.gamma,-45,45,we,-we),r=Tt(e.beta,-20,70,we,-we)),zt.updateDestination(t,r)}
2374,Gu=function(){zt.update(),ui.css({transform:"translate3d("+zt.x+"px, "+zt.y+"px, 0)","-webkit-transform":"translate3d("+zt.x+"px, "+zt.y+"px, 0)"}),Uu=requestAnimationFrame(Gu)},un=function(){jQuery("body").removeClass("intro-enabled").addClass("intro-disabled"),jQuery("#intro-region").html("").addClass("hide"),window.laytheme.off("orientationchanged",li),cancelAnimationFrame(Uu),window.removeEventListener("deviceorientation",Wu),jQuery(window).off("mousemove",qu),jQuery(window).off("resize",Xu),clearTimeout(kg)},Xu=function(){To.triggerMethod("resize"),ci()},kg,Ir=function(e){frontendPassedData.intro_transition_duration==0?un():(jQuery(".intro").on("transitionend",function(){un()}),jQuery(".intro").addClass("animatehide")),typeof e=="function"&&e(),jQuery(document).off("scroll",Hu)};(function(){function e(t,r){this.x=t,this.y=r,this.virtualX=t,this.virtualY=r,this.destX=t,this.destY=r,this.xvelocity=0,this.yvelocity=0}e.prototype.update=function(){var t=zu.getBoundaries();this.xvelocity=this.destX-this.virtualX,this.yvelocity=this.destY-this.virtualY,Math.abs(this.xvelocity)>.002&&(this.xvelocity*=.03),Math.abs(this.yvelocity)>.002&&(this.yvelocity*=.03),this.virtualX+=this.xvelocity,this.virtualY+=this.yvelocity,this.x=Math.min(1,Math.max(-1,this.virtualX))*t.boundaryX,this.y=Math.min(1,Math.max(-1,this.virtualY))*t.boun
2374daryY},e.prototype.updateDestination=function(t,r){this.destX=t,this.destY=r},window.Particle=e})();var Dg=frontendPassedData.search_placeholder_text,fi=!1,$u=Marionette.View.extend({className:function(){return"search-view "+this.getOption("hasNoResultsClass")},hasNoResultsClass:"search-has-no-results",hasResultsClass:"search-has-or-had-results",template:_.template(` 2375 <div class="close-search"></div> 2376 <div class="search-inputs"> 2377 <input id="search-query" type="search" class="search-query" placeholder="`+Dg+`" autocomplete="off" spellcheck="false"> 2378 <div id="search-autosuggest-list"></div> 2379 </div> 2380 <div id="search-results-region"></div> 2381 `),regions:{results:"#search-results-region",search_autosuggest_list:"#search-autosuggest-list"},events:{"input #search-query":"onInput","focus #search-query":"onFocus","blur #search-query":"onBlur","click .close-search":"onHide"},val:"",onAddClassForHasResults:function(){this.$el.removeClass(this.hasNoResultsClass),this.$el.addClass(this.hasResultsClass)},onAddClassForNoResults:function(){this.$el.addClass(this.hasNoResultsClass),this.$el.removeClass(this.hasResultsClass)},onFocus:function(){this.$el.find("#search-autosuggest-list").show()},onBlur:function(){setTimeout(()=>{this.$el.find("#search-autosuggest-list").hide()},100)},onInput:function(){this.val=this.$el.find("#search-query").val(),Cr.search()},onShow:function(){fi=!0,this.$el.addClass("show"),M.fixBody(),jQuery("#search-query").focus()},onHide:function(){fi&&(this.$el.addClass("hide").removeClass("show"),M.unfixBody(),this.$el.find("#search-query").val(""),this.val="",this.triggerMethod("blur"),Cr.search(),this.triggerMethod("add:class:for:no:results"),fi=!1)},onRender:function(){var e=this;window.laytheme.on("content_fadeout_transition_ended",function(){e.triggerMethod("hide")})}}),Og=Marionette.View.extend({className:"suggest-item",template:_.template(` 2382 <span class="suggest"><span class="suggest-prefix"><%= suggestPrefix() %></span><span class="suggest-suffix"><%= suggestSuffix() %></span></span> 2383 `),events:{click:"clickSuggestItem"},clickSuggestItem:function(e){e.preventDefault(),e.stopPropagation(),Cr.clickSuggestItem(this.$el)},templateContext:function(){return{suggestSuffix:function(){var e=this.suggest,t=this.query;return M.stringStartsWith(e,t)?e.slice(t.length):e},query:jQuery("#search-query").val(),suggestPrefix:function(){var e=this.suggest,t=this.query;return M.stringStartsWith(e,t)?this.query:""}}}}),Yu=Marionette.CollectionView.extend({className:"suggest-collection",childView:Og,id:"suggest-results"});var hi=jQuery.Deferred(),Ku=!1,Zu,Sr,ct,rt,di=3,Lg={shouldSort:!0,includeScore:!1,threshold:.1,location:0,distance:100,maxPatternLength:32,minMatchCharLength:3,ignoreLocation:!0,keys:["title","descr","cats","tags"]},ec=function(){Ku||jQuery.ajax({url:frontendPassedData.wpapiroot+"laytheme/search/",success:function(e){Zu=new Fuse(e,Lg),Ku=!0,hi.resolve()}})},Fg=function(){hi.state()=="resolved"?Ju():jQuery.when(hi).then(function(){Ju()})},Ju=_.debounce(function(){var e=jQuery("#search-query").val();if(ct=e.toLowerCase(),e.length==0){jQuery("#search-autosuggest-list").html(""),jQuery("#search-results-region").html("");return}Sr=Zu.search(e),Sr.length>0&&rt.triggerMethod("add:class:for:has:results");var t=Vg(Sr);t=JSON.stringify(t);var r={action:"get_search_result",found_posts:t};jQuery.ajax({url:frontendPassedData.ajax_url,data:r,type:"post",success:n=>{jQuery("#search-results-region").html(n),setTimeout(function(){window.laytheme.trigger("searchresultshown")},0)},error:n=>{console.log("search error"),console.log(n)}}),frontendPassedData.search_autosuggest_hide==!1&&Ng()},200),Ng=function(){var e=[];for(var t of Sr){t.title.toLowerCase().startsWith(ct)&&e.indexOf(t.title)==-1&&e.push(t.title),t.descr.toLowerCase().startsWith(ct)&&e.indexOf(t.descr)==-1&&e.push(t.descr);for(var r=0;r<t.cats.length;r++){var n=t.cats[r];n.toLowerCase().startsWith(ct)&&e.indexOf(n)==-1&&e.push(n)}for(var r=0;r<t.tags.length;r++){var o=t.tags[r];o.toLowerCase().startsWith(ct)&&e.indexOf(o)==-1&&e.push(o)}if(e.length>di)break}if(e.length!=0&&ct==e[0].toLowerCase()&&e.splice(0,1),e.length==0)for(var t of Sr){t.title.toLowerCase().indexOf(ct)!==-1&&e.indexOf(t.title)==-1&&e.push(t.title),t.descr.toLowerCase().indexOf(ct)!==-1&&e.indexOf(t.descr)==-1&&e.push(t.descr);for(var r=0;r<t.cats.length;r++){var n=t.cats[r];n.toLowerCase().startsWith(ct)&&e.indexOf(n)==-1&&e.push(n)}for(var r=0;r<t.tags.length;r++){var o=t.tags[r];o.toLowerCase().startsWith(ct)&&e.indexOf(o)==-1&&e.push(o)}if(e.length>di)break}if(e.length!=0&&ct==e[0].toLowerCase()&&e.splice(0,1),Sr.length!=0){var a=new Yu({collection:new Backbone.Collection(e.slice(0,di).map(i=>({suggest:i})))});rt.getRegion("search_autosuggest_list").show(a)}else rt.getRegion("search_autosuggest_list").empty()},Qg=function(e){var t=e.find(".suggest").text();jQuery("#search-query").val(t),setTimeout(function(){rt.getRegion("search_autosuggest_list").empty(),rt.triggerMethod("input")},0)},Bg=function(){jQuery('[href="#search"]').on("click",function(e){ec(),e.preventDefault(),e.stopPropagation(),rt.triggerMethod("show"),window.laytheme.trigger("searchshown")})},zg=function(){rt=new $u;var e=Marionette.Application.extend({region:"#search-region",onStart:function(){this.showView(rt)}}),t=new e;t.start()},Ug=function(){jQuery(document).keyup(function(e){e.which==27&&rt.triggerMethod("hide")})},Vg=function(e){for(var t=[],r=0;r<e.length;r++){var n=e[r].postid;t.push(n)}return t},Hg=function(){window.laytheme.on("customizer_showsearch",function(){ec(),rt.triggerMethod("show")}),window.laytheme.on("customizer_hidesearch",function(){rt.triggerMethod("hide")}),window.laytheme.on("newpageshown",function(){rt.triggerMethod("hide")})},qg=function(){window.laytheme.on("searchresultshown",function(){wt.loadVideosInstantly(jQuery("#search-results-region"))})},Wg={initModule:function(){Bg(),zg(),Ug(),Hg(),qg()},search:function(){Fg()},clickSuggestItem:function(e){Qg(e)}},Cr=Wg;var Io,Ao,Je=[],Gg=function(){Io=document.querySelectorAll("video.autoplay[playsinline][muted]"),Xg(),tc()}
2383,Xg=function(){Je=[],Io.forEach((e,t)=>{Je[t]={playing:!1,playPromise:null}})};window.laytheme.on("content_ready",function(e){switch(e){case"desktop":Ao=jQuery("#grid, .cover-region-desktop");break;case"phone":Ao=jQuery("#custom-phone-grid, .cover-region-phone"),Ao.length==0&&(Ao=jQuery("#grid, .cover-region-desktop"));break}Gg(),tc()});var $g=(e,t)=>{e.forEach(r=>{var n=Array.from(Io).indexOf(r.target);if(r.isIntersecting){if(typeof Je[n]!=null&&Je[n].playing==!1&&!r.target.ended&&!jQuery(r.target).hasClass("userinteractedwith-paused"))try{r.target.readyState>=2?(Je[n].playPromise=r.target.play(),Je[n].playPromise.then(function(){Je[n].playing=!0})):function(o){r.target.addEventListener("canplay",a=>{Je[o].playPromise=r.target.play(),Je[o].playPromise.then(function(){Je[o].playing=!0})})}(n)}catch(o){console.log(o)}}else Je[n]&&Je[n].playing==!0&&(r.target.pause(),Je[n].playing=!1)})},tc=function(){let e=new Nt($g);Io.forEach(t=>{e.observe(t)})};var Co=$t(nc()),Yg=Backbone.Radio.channel("events"),Kg=function(){let e;window.frontendPassedData.element_transition_on_scroll=="on"&&(window.laytheme.on("newpageshown",function(){let t={threshold:0},r=new Nt(Zg,t);e=document.querySelectorAll(".col.no-parallax.no-offset.no-sticky,.col.no-parallax.no-offset.type-thumbnailgrid a.thumb,.col.no-parallax.no-offset.type-elementgrid .element-wrap,.col.no-parallax.no-offset.type-productsgrid li,.lay-thumbnailgrid-filter-wrap"),setTimeout(function(){e.forEach(n=>{Co.default.measure(()=>{var o=n.getBoundingClientRect().top;Co.default.mutate(()=>{o>window.innerHeight&&!n.classList.contains("no-animation")&&n.classList.add("below")})})})},50),e.forEach(n=>{r.observe(n)})}),Yg.on("scroll",function(){if(window.innerHeight+window.scrollY>=document.body.scrollHeight-90)for(let t=0;t<e.length;t++){let r=e[t];if(r.classList.contains("below")){let n=ic();r.style.transitionDelay=n+"ms",r.classList.remove("below"),r.classList.add("in-view")}}}),jQuery(window).on("fpAfterLoad",function(t,r){e.forEach(n=>{n.closest(".row-"+(r.index-1))?(n.classList.remove("below"),n.classList.add("in-view")):(n.classList.remove("in-view"),n.classList.add("below"))})}),jQuery(window).on("fpAfterSlideLoad",function(t,r){e.forEach(n=>{n.closest(".row-"+r.slideIndex)?(n.classList.remove("below"),n.classList.add("in-view")):(n.classList.remove("in-view"),n.classList.add("below"))})}))};window.laytheme.on("pushstate",function(){ac()});window.laytheme.on("popstate",function(){ac()});window.laytheme.on("newpageshown",function(){setTimeout(function(){Jg()},50)});var gi=!0,Jg=function(){gi=!0},ac=function(){gi=!1},Zg=(e,t)=>{e.forEach(r=>{gi&&Co.default.mutate(()=>{if(r.isIntersecting==!0&&r.target.classList.contains("below")&&(r.boundingClientRect.top>0||r.boundingClientRect.bottom>0)){let n=ic();r.target.style.transitionDelay=n+"ms",r.target.classList.remove("below"),r.target.classList.add("in-view")}r.isIntersecting==!1&&r.boundingClientRect.top>window.innerHeight&&!r.target.classList.contains("no-animation")&&(r.target.style.transitionDelay=0,r.target.classList.add("below"),r.target.classList.remove("in-view"))})})},oc,mi=!1,vi=0,ic=function(){return clearTimeout(oc),oc=setTimeout(function(){mi=!1,vi=0},50),mi&&(vi+=50),mi=!0,vi},e0={initModule:Kg},sc=e0;var Ut=void 0,lc=function(){return jQuery(".vertical-fullpage").length>0?"vertical":jQuery(".horizontal-fullpage").length>0?"horizontal":"none"},So=function(e){if(typeof Ut!="undefined"){var t=Ut.find(e),r=t.closest(".row");if(r.length==0)return console.error("no row found"),0;var n=Ut.find(".row"),o=n.index(r);return o}return 0},t0=function(e){var t=window.location.href,r=t.indexOf("#");
2383if(r!==-1&&(t=t.substr(0,r)),e.attr("href").substr(0,1)=="#"||e[0].hasAttribute("data-id")&&e[0].hasAttribute("data-type")&&e.attr("data-id")==jQuery("body").attr("data-id")&&e.attr("data-type")==jQuery("body").attr("data-type"))return!0;var n=e.attr("href"),o=n.indexOf("#"),a=n.substr(0,o);return a==t||a.substr(0,a.length-1)==t||a==t.substr(0,t.length-1)||a.substr(0,a.length-1)==t.substr(0,t.length-1)},r0=function(){jQuery(document).on("click",'.lay-content a[href*="#"]:not([href="#search"]):not([href="#"]):not([href="#laynextproject"]):not([href="#layprevproject"]):not(.scrolltotop), .laynav a[href*="#"]:not([href="#search"]):not([href="#laynextproject"]):not([href="#layprevproject"]):not(.scrolltotop)',function(e){if(jQuery(this).closest("#fp-nav").length>0||jQuery(this).closest(".fp-slidesNav").length>0){e.preventDefault();return}if(t0(jQuery(this))){e.preventDefault(),bt.hideMobileMenu();var t=jQuery(this).attr("href"),r=t.indexOf("#"),n=t.substring(r),o=lc(),a=Ut.find(n);switch(jQuery(a).closest(".lay-overlay").length>0&&(o="none"),o){case"none":if(a.length!=0)if(jQuery(a).closest(".lay-overlay").length>0){var i=a.offset().top;i=cn(i),jQuery(a).closest(".lay-content").animate({scrollTop:i},300,"easeInOutQuad",function(){})}else if(M.unfixBody(),setTimeout(function(){xt()},0),frontendPassedData.never_change_scrolling_position=="on"&&g.screenSize!="phone"){var i=a[0].getBoundingClientRect().top;let f=jQuery("body>.lay-content #grid");jQuery(a).closest("#footer-region").length>0&&(f=jQuery("#footer-region")),i+=f[0].scrollTop,i=cn(i),jQuery(f).animate({scrollTop:i},300,"easeInOutQuad",function(){})}else{var i=a.offset().top;i=cn(i),jQuery("html").animate({scrollTop:i},300,"easeInOutQuad",function(){window.location.hash=n,window.scroll(0,i)})}break;case"vertical":M.unfixBody(),setTimeout(function(){xt()},0);var c=So(n),l=c+1;jQuery(window).one("fpAfterLoad",function(){window.location.hash=n}),jQuery.fn.fullpage.moveTo(l,0);break;case"horizontal":M.unfixBody(),setTimeout(function(){xt()},0);var c=So(n),s=c;jQuery(window).one("fpAfterSlideLoad",function(){window.location.hash=n}),jQuery.fn.fullpage.moveTo(1,s);break}}})},cn=function(e){switch(g.screenSize){case"desktop":case"tablet":jQuery(".navbar").is(":visible")&&(e-=parseInt(jQuery(".navbar").height(),10)),frontendPassedData.anchorscroll_offset_desktop!=""&&jQuery.isNumeric(parseInt(frontendPassedData.anchorscroll_offset_desktop,10))&&(e-=parseInt(frontendPassedData.anchorscroll_offset_desktop,10));break;case"phone":jQuery(".navbar").is(":visible")&&frontendPassedData.mobile_navbar_fixed=="1"&&(e-=parseInt(jQuery(".navbar").height(),10)),frontendPassedData.anchorscroll_offset_phone!=""&&jQuery.isNumeric(parseInt(frontendPassedData.anchorscroll_offset_phone,10))&&(e-=parseInt(frontendPassedData.anchorscroll_offset_phone,10));break}return e},uc=function(){var e=window.location.hash,t=Ut.find(e);if(t.length>0){var r=lc();switch(r){case"none":var n=t.offset().top;if(n=cn(n),frontendPassedData.never_change_scrolling_position=="on"&&g.screenSize!="phone"){let l=jQuery("body>.lay-content #grid");jQuery(t).closest("#footer-region").length>0&&(l=jQuery("#footer-region")),l[0].scroll(0,n)}else window.scroll(0,n);break;case"vertical":var a=So(e),o=a+1;jQuery.fn.fullpage.silentMoveTo(o,0),magneticSlidesPassedData.ms_autoScrolling=="on"&&magneticSlidesPassedData.ms_scrollBar==""&&window.scrollTo(0,0);break;case"horizontal":var a=So(e),i=a;jQuery.fn.fullpage.silentMoveTo(1,i),window.scrollTo(0,0);break}}},n0=function(){jQuery(window).on("hashchange",function(){var e=window.location.hash;Ut!=null&&uc()})},o0=function(){r0(),n0(),window.laytheme.on("content_ready",function(e){Ut=void 0,Ut=Me(e),setTimeout(function(){uc()},50)})},a0={initModule:o0,addSpaceTop:cn},Mo=a0;var i0=navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/),_i;i0===null?_i=!1:_i=!0;var s0=_i?"is-touchdevice":"no-touchdevice";jQuery("body").addClass(s0);var hc=/(iPad|iPhone|iPod)/g.test(navigator.userAgent),cc=window.devicePixelRatio||1,Be={width:window.screen.width*cc,height:window.screen.height*cc},Ro=navigator.userAgent.match(/(Macintosh)/),pc=!!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/),wi=!1;Ro===null?Ro=!1:Ro=!0;var nr=!1,bi=!1;Be.width==2048&&Be.height==2732&&(nr=!0,bi=!0);Be.width==1668&&Be.height==2388&&(nr=!0,bi=!0);Be.width==2732&&Be.height==2048&&(nr=!0);
2383Be.width==1536&&Be.height==2048&&(nr=!0);Be.width==1620&&Be.height==2160&&(nr=!0);Be.width==1536&&Be.height==2048&&(nr=!0);Ro==!0&&pc==!0&&nr&&(wi=!0);hc===!0||wi?document.documentElement.classList.add("is-ios"):document.documentElement.classList.add("no-ios");var l0=/(iPad)/g.test(navigator.userAgent);l0===!0||wi?bi?document.documentElement.classList.add("is-ipad-without-homebutton"):document.documentElement.classList.add("is-ipad"):document.documentElement.classList.add("no-ipad");var u0=/(iPhone)/g.test(navigator.userAgent),fc=[{name:"iPhone 14 Plus",w:1284,h:2778},{name:"iPhone 14 Pro Max",w:1290,h:2796},{name:"iPhone 14 Pro",w:1179,h:2556},{name:"iPhone 14",w:1170,h:2532},{name:"iPhone 13",w:1170,h:2532},{name:"iPhone 13 mini",w:1080,h:2340},{name:"iPhone 13 Pro Max",w:1284,h:2778},{name:"iPhone 13 Pro",w:1170,h:2532},{name:"iPhone 12",w:1170,h:2532},{name:"iPhone 12 mini",w:1080,h:2340},{name:"iPhone 12 Pro Max",w:1284,h:2778},{name:"iPhone 12 Pro",w:1170,h:2532},{name:"iPhone 11 Pro Max",w:1242,h:2688},{name:"iPhone 11 Pro",w:1125,h:2436},{name:"iPhone 11",w:828,h:1792},{name:"iPhone XR",w:828,h:1792},{name:"iPhone XS Max",w:1242,h:2688},{name:"iPhone XS",w:1125,h:2436},{name:"iPhone X",w:1125,h:2436}],mc=!1;if(hc===!0){for(Po=0;Po<fc.length;Po++)if(yi=fc[Po],Be.width===yi.w&&Be.height===yi.h){mc=!0;break}}var yi,Po;mc?document.documentElement.classList.add("is-iphone-no-homebutton"):u0===!0?document.documentElement.classList.add("is-iphone"):document.documentElement.classList.add("no-iphone");var dc=window.chrome,xi=window.navigator,c0=xi.vendor,f0=typeof window.opr!="undefined",d0=xi.userAgent.indexOf("Edge")>-1,h0=xi.userAgent.match("CriOS"),fn="no-chrome-no-safari";(h0||dc!==null&&typeof dc!="undefined"&&c0==="Google Inc."&&f0===!1&&d0===!1)&&(fn="is-chrome");var p0=navigator.userAgent.toLowerCase(),m0=p0.indexOf("android")>-1;m0===!0&&document.documentElement.classList.add("is-android");pc===!0&&(fn="is-safari");document.documentElement.classList.add(fn);fn!="is-chrome"&&document.documentElement.classList.add("no-chrome");var v0=navigator.userAgent.indexOf("Instagram")>-1;v0?document.documentElement.classList.add("is-instagram-browser"):document.documentElement.classList.add("no-instagram-browser");var Ts={};Xp(Ts,{VERSION:()=>jo,after:()=>is,all:()=>Yo,allKeys:()=>ft,any:()=>Ko,assign:()=>sr,before:()=>Sn,bind:()=>qo,bindAll:()=>Uc,chain:()=>Zi,chunk:()=>xs,clone:()=>Vi,collect:()=>Ve,compact:()=>gs,compose:()=>as,constant:()=>vn,contains:()=>Fe,countBy:()=>$c,create:()=>Ui,debounce:()=>ns,default:()=>tf,defaults:()=>Uo,defer:()=>Vc,delay:()=>Wo,detect:()=>Fr,difference:()=>Zo,drop:()=>hr,each:()=>Ce,escape:()=>Nc,every:()=>Yo,extend:()=>zo,extendOwn:()=>sr,filter:()=>nt,find:()=>Fr,findIndex:()=>Lr,findKey:()=>Mn,findLastIndex:()=>Go,findWhere:()=>ss,first:()=>Nn,flatten:()=>ys,foldl:()=>$o,foldr:()=>ls,forEach:()=>Ce,functions:()=>kr,get:()=>Tn,groupBy:()=>Gc,has:()=>qi,head:()=>Nn,identity:()=>ur,include:()=>Fe,includes:()=>Fe,indexBy:()=>Xc,indexOf:()=>Xo,initial:()=>Fn,inject:()=>$o,intersection:()=>_s,invert:()=>bn,invoke:()=>Wc,isArguments:()=>Rr,isArray:()=>ze,isArrayBuffer:()=>Fo,isBoolean:()=>pn,isDataView:()=>or,isDate:()=>Tc,isElement:()=>Ri,isEmpty:()=>Oi,isEqual:()=>Fi,isError:()=>Ac,isFinite:()=>Di,isFunction:()=>ue,isMap:()=>Dc,isMatch:()=>wn,isNaN:()=>mn,isNull:()=>Pi,isNumber:()=>Oo,isObject:()=>Le,isRegExp:()=>Ec,isSet:()=>Lc,isString:()=>Mr,isSymbol:()=>Lo,isTypedArray:()=>Qo,isUndefined:()=>hn,isWeakMap:()=>Oc,isWeakSet:()=>Fc,iteratee:()=>Dr,keys:()=>$,last:()=>vs,lastIndexOf:()=>qc,map:()=>Ve,mapObject:()=>Wi,matcher:()=>At,matches:()=>At,max:()=>Dn,memoize:()=>ts,methods:()=>kr,min:()=>fs,mixin:()=>Qn,negate:()=>fr,noop:()=>An,now:()=>Vt,object:()=>ws,omit:()=>Kc,once:()=>Hc,pairs:()=>zi,partial:()=>Ht,partition:()=>Yc,pick:()=>Jo,pluck:()=>dr,property:()=>cr,propertyOf:()=>Gi,random:()=>Or,range:()=>bs,reduce:()=>$o,reduceRight:()=>ls,reject:()=>us,rest:()=>hr,restArguments:()=>ae,result:()=>Ki,sample:()=>Ln,select:()=>nt,shuffle:()=>ds,size:()=>ps,some:()=>Ko,sortBy:()=>hs,sortedIndex:()=>Rn,tail:()=>hr,take:()=>Nn,tap:()=>Hi,template:()=>Yi,templateSettings:()=>zc,throttle:()=>rs,times:()=>Xi,toArray:()=>On,toPath:()=>Vo,transpose:()=>Qr,unescape:()=>Bc,union:()=>Zc,uniq:()=>Nr,unique:()=>Nr,uniqueId:()=>Ji,unzip:()=>Qr,values:()=>Ze,where:()=>cs,without:()=>Jc,wrap:()=>os,zip:()=>ef});var jo="1.13.6",Ti=typeof self=="object"&&self.self===self&&self||typeof window=="object"&&window.global===window&&window||Function("return this")()||{},dn=Array.prototype,ko=Object.prototype,Ei=typeof Symbol!="undefined"?Symbol.prototype:null,vc=dn.push,Et=dn.slice,jt=ko.toString,gc=ko.hasOwnProperty,Ai=typeof ArrayBuffer!="undefined",yc=typeof DataView!="undefined",_c=Array.isArray,Ii=Object.keys,Ci=Object.create,Si=Ai&&ArrayBuffer.isView,wc=isNaN,bc=isFinite,Do=!{toString:null}.propertyIsEnumerable("toString"),Mi=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleStr
2383ing"],xc=Math.pow(2,53)-1;function ae(e,t){return t=t==null?e.length-1:+t,function(){for(var r=Math.max(arguments.length-t,0),n=Array(r),o=0;o<r;o++)n[o]=arguments[o+t];switch(t){case 0:return e.call(this,n);case 1:return e.call(this,arguments[0],n);case 2:return e.call(this,arguments[0],arguments[1],n)}var a=Array(t+1);for(o=0;o<t;o++)a[o]=arguments[o];return a[t]=n,e.apply(this,a)}}function Le(e){var t=typeof e;return t==="function"||t==="object"&&!!e}function Pi(e){return e===null}function hn(e){return e===void 0}function pn(e){return e===!0||e===!1||jt.call(e)==="[object Boolean]"}function Ri(e){return!!(e&&e.nodeType===1)}function J(e){var t="[object "+e+"]";return function(r){return jt.call(r)===t}}var Mr=J("String");var Oo=J("Number");var Tc=J("Date");var Ec=J("RegExp");var Ac=J("Error");var Lo=J("Symbol");var Fo=J("ArrayBuffer");var Ic=J("Function"),g0=Ti.document&&Ti.document.childNodes;typeof/./!="function"&&typeof Int8Array!="object"&&typeof g0!="function"&&(Ic=function(e){return typeof e=="function"||!1});var ue=Ic;var ji=J("Object");var No=yc&&ji(new DataView(new ArrayBuffer(8))),Pr=typeof Map!="undefined"&&ji(new Map);var y0=J("DataView");function _0(e){return e!=null&&ue(e.getInt8)&&Fo(e.buffer)}var or=No?_0:y0;var ze=_c||J("Array");function Ie(e,t){return e!=null&&gc.call(e,t)}var ki=J("Arguments");(function(){ki(arguments)||(ki=function(e){return Ie(e,"callee")})})();var Rr=ki;function Di(e){return!Lo(e)&&bc(e)&&!isNaN(parseFloat(e))}function mn(e){return Oo(e)&&wc(e)}function vn(e){return function(){return e}}function gn(e){return function(t){var r=e(t);return typeof r=="number"&&r>=0&&r<=xc}}function yn(e){return function(t){return t==null?void 0:t[e]}}var ar=yn("byteLength");var Cc=gn(ar);var w0=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function b0(e){return Si?Si(e)&&!or(e):Cc(e)&&w0.test(jt.call(e))}var Qo=Ai?b0:vn(!1);var ce=yn("length");function x0(e){for(var t={},r=e.length,n=0;n<r;++n)t[e[n]]=!0;return{contains:function(o){return t[o]===!0},push:function(o){return t[o]=!0,e.push(o)}}}function _n(e,t){t=x0(t);var r=Mi.length,n=e.constructor,o=ue(n)&&n.prototype||ko,a="constructor";for(Ie(e,a)&&!t.contains(a)&&t.push(a);r--;)a=Mi[r],a in e&&e[a]!==o[a]&&!t.contains(a)&&t.push(a)}function $(e){if(!Le(e))return[];if(Ii)return Ii(e);var t=[];for(var r in e)Ie(e,r)&&t.push(r);return Do&&_n(e,t),t}function Oi(e){if(e==null)return!0;var t=ce(e);return typeof t=="number"&&(ze(e)||Mr(e)||Rr(e))?t===0:ce($(e))===0}function wn(e,t){var r=$(t),n=r.length;if(e==null)return!n;for(var o=Object(e),a=0;a<n;a++){var i=r[a];if(t[i]!==o[i]||!(i in o))return!1}return!0}function z(e){if(e instanceof z)return e;if(!(this instanceof z))return new z(e);this._wrapped=e}z.VERSION=jo;z.prototype.value=function(){return this._wrapped};z.prototype.valueOf=z.prototype.toJSON=z.prototype.value;z.prototype.toString=function(){return String(this._wrapped)};function Bo(e){return new Uint8Array(e.buffer||e,e.byteOffset||0,ar(e))}var Sc="[object DataView]";function Li(e,t,r,n){if(e===t)return e!==0||1/e===1/t;if(e==null||t==null)return!1;if(e!==e)return t!==t;var o=typeof e;return o!=="function"&&o!=="object"&&typeof t!="object"?!1:Mc(e,t,r,n)}function Mc(e,t,r,n){e instanceof z&&(e=e._wrapped),t instanceof z&&(t=t._wrapped);var o=jt.call(e);if(o!==jt.call(t))return!1;if(No&&o=="[object Object]"&&or(e)){if(!or(t))return!1;o=Sc}switch(o){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:+e==0?1/+e===1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return Ei.valueOf.call(e)===Ei.valueOf.call(t);case"[object ArrayBuffer]":case Sc:return Mc(Bo(e),Bo(t),r,n)}var a=o==="[object Array]";if(!a&&Qo(e)){var i=ar(e);if(i!==ar(t))return!1;if(e.buffer===t.buffer&&e.byteOffset===t.byteOffset)return!0;a=!0}if(!a){if(typeof e!="object"||typeof t!="object")return!1;var l=e.constructor,c=t.constructor;if(l!==c&&!(ue(l)&&l instanceof l&&ue(c)&&c instanceof c)&&"constructor"in e&&"constructor"in t)return!1}r=r||[],n=n||[];for(var s=r.length;s--;)if(r[s]===e)return n[s]===t;if(r.push(e),n.push(t),a){if(s=e.length,s!==t.length)return!1;for(;s--;)if(!Li(e[s],t[s],r,n))return!1}else{var u=$(e),f;if(s=u.length,$(t).length!==s)return!1;for(;s--;)if(f=u[s],!(Ie(t,f)&&Li(e[f],t[f],r,n)))return!1}return r.pop(),n.pop(),!0}function Fi(e,t){return Li(e,t)}function ft(e){if(!Le(e))return[];var t=[];for(var r in e)t.push(r);return Do&&_n(e,t),t}function jr(e){var t=ce(e);return function(r){if(r==null)return!1;var n=ft(r);if(ce(n))return!1;for(var o=0;o<t;o++)if(!ue(r[e[o]]))return!1;return e!==Bi||!ue(r[Ni])}}
2383var Ni="forEach",Pc="has",Qi=["clear","delete"],Rc=["get",Pc,"set"],jc=Qi.concat(Ni,Rc),Bi=Qi.concat(Rc),kc=["add"].concat(Qi,Ni,Pc);var Dc=Pr?jr(jc):J("Map");var Oc=Pr?jr(Bi):J("WeakMap");var Lc=Pr?jr(kc):J("Set");var Fc=J("WeakSet");function Ze(e){for(var t=$(e),r=t.length,n=Array(r),o=0;o<r;o++)n[o]=e[t[o]];return n}function zi(e){for(var t=$(e),r=t.length,n=Array(r),o=0;o<r;o++)n[o]=[t[o],e[t[o]]];return n}function bn(e){for(var t={},r=$(e),n=0,o=r.length;n<o;n++)t[e[r[n]]]=r[n];return t}function kr(e){var t=[];for(var r in e)ue(e[r])&&t.push(r);return t.sort()}function ir(e,t){return function(r){var n=arguments.length;if(t&&(r=Object(r)),n<2||r==null)return r;for(var o=1;o<n;o++)for(var a=arguments[o],i=e(a),l=i.length,c=0;c<l;c++){var s=i[c];(!t||r[s]===void 0)&&(r[s]=a[s])}return r}}var zo=ir(ft);var sr=ir($);var Uo=ir(ft,!0);function T0(){return function(){}}function xn(e){if(!Le(e))return{};if(Ci)return Ci(e);var t=T0();t.prototype=e;var r=new t;return t.prototype=null,r}function Ui(e,t){var r=xn(e);return t&&sr(r,t),r}function Vi(e){return Le(e)?ze(e)?e.slice():zo({},e):e}function Hi(e,t){return t(e),e}function Vo(e){return ze(e)?e:[e]}z.toPath=Vo;function dt(e){return z.toPath(e)}function lr(e,t){for(var r=t.length,n=0;n<r;n++){if(e==null)return;e=e[t[n]]}return r?e:void 0}function Tn(e,t,r){var n=lr(e,dt(t));return hn(n)?r:n}
2383function qi(e,t){t=dt(t);for(var r=t.length,n=0;n<r;n++){var o=t[n];if(!Ie(e,o))return!1;e=e[o]}return!!r}function ur(e){return e}function At(e){return e=sr({},e),function(t){return wn(t,e)}}function cr(e){return e=dt(e),function(t){return lr(t,e)}}function ht(e,t,r){if(t===void 0)return e;switch(r==null?3:r){case 1:return function(n){return e.call(t,n)};case 3:return function(n,o,a){return e.call(t,n,o,a)};case 4:return function(n,o,a,i){return e.call(t,n,o,a,i)}}return function(){return e.apply(t,arguments)}}function En(e,t,r){return e==null?ur:ue(e)?ht(e,t,r):Le(e)&&!ze(e)?At(e):cr(e)}function Dr(e,t){return En(e,t,1/0)}z.iteratee=Dr;function ne(e,t,r){return z.iteratee!==Dr?z.iteratee(e,t):En(e,t,r)}function Wi(e,t,r){t=ne(t,r);for(var n=$(e),o=n.length,a={},i=0;i<o;i++){var l=n[i];a[l]=t(e[l],l,e)}return a}function An(){}function Gi(e){return e==null?An:function(t){return Tn(e,t)}}function Xi(e,t,r){var n=Array(Math.max(0,e));t=ht(t,r,1);for(var o=0;o<e;o++)n[o]=t(o);return n}function Or(e,t){return t==null&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))}var Vt=Date.now||function(){return new Date().getTime()};function In(e){var t=function(a){return e[a]},r="(?:"+$(e).join("|")+")",n=RegExp(r),o=RegExp(r,"g");return function(a){return a=a==null?"":""+a,n.test(a)?a.replace(o,t):a}}var Ho={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"};var Nc=In(Ho);var Qc=bn(Ho);var Bc=In(Qc);var zc=z.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var $i=/(.)^/,E0={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},A0=/\\|'|\r|\n|\u2028|\u2029/g;function I0(e){return"\\"+E0[e]}var C0=/^\s*(\w|\$)+\s*$/;function Yi(e,t,r){!t&&r&&(t=r),t=Uo({},t,z.templateSettings);var n=RegExp([(t.escape||$i).source,(t.interpolate||$i).source,(t.evaluate||$i).source].join("|")+"|$","g"),o=0,a="__p+='";e.replace(n,function(s,u,f,d,p){return a+=e.slice(o,p).replace(A0,I0),o=p+s.length,u?a+=`'+ 2384((__t=(`+u+`))==null?'':_.escape(__t))+ 2385'`:f?a+=`'+ 2386((__t=(`+f+`))==null?'':__t)+ 2387'`:d&&(a+=`'; 2388`+d+` 2389__p+='`),s}),a+=`'; 2390`;var i=t.variable;if(i){if(!C0.test(i))throw new Error("variable is not a bare identifier: "+i)}else a=`with(obj||{}){ 2391`+a+`} 2392`,i="obj";a=`var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');}; 2393`+a+`return __p; 2394`;var l;try{l=new Function(i,"_",a)}catch(s){throw s.source=a,s}var c=function(s){return l.call(this,s,z)};return c.source="function("+i+`){ 2395`+a+"}",c}function Ki(e,t,r){t=dt(t);var n=t.length;if(!n)return ue(r)?r.call(e):r;for(var o=0;o<n;o++){var a=e==null?void 0:e[t[o]];a===void 0&&(a=r,o=n),e=ue(a)?a.call(e):a}return e}var S0=0;function Ji(e){var t=++S0+"";return e?e+t:t}function Zi(e){var t=z(e);return t._chain=!0,t}function Cn(e,t,r,n,o){if(!(n instanceof t))return e.apply(r,o);var a=xn(e.prototype),i=e.apply(a,o);return Le(i)?i:a}var es=ae(function(e,t){var r=es.placeholder,n=function(){for(var o=0,a=t.length,i=Array(a),l=0;l<a;l++)i[l]=t[l]===r?arguments[o++]:t[l];for(;o<arguments.length;)i.push(arguments[o++]);return Cn(e,n,this,this,i)};return n});es.placeholder=z;var Ht=es;var qo=ae(function(e,t,r){if(!ue(e))throw new TypeError("Bind must be called on a function");var n=ae(function(o){return Cn(e,n,t,this,r.concat(o))});return n});var fe=gn(ce);function Ue(e,t,r,n){if(n=n||[],!t&&t!==0)t=1/0;else if(t<=0)return n.concat(e);for(var o=n.length,a=0,i=ce(e);a<i;a++){var l=e[a];if(fe(l)&&(ze(l)||Rr(l)))if(t>1)Ue(l,t-1,r,n),o=n.length;else for(var c=0,s=l.length;c<s;)n[o++]=l[c++];else r||(n[o++]=l)}return n}var Uc=ae(function(e,t){t=Ue(t,!1,!1);var r=t.length;if(r<1)throw new Error("bindAll must be passed function names");for(;r--;){var n=t[r];e[n]=qo(e[n],e)}return e});function ts(e,t){var r=function(n){var o=r.cache,a=""+(t?t.apply(this,arguments):n);return Ie(o,a)||(o[a]=e.apply(this,arguments)),o[a]};return r.cache={},r}var Wo=ae(function(e,t,r){return setTimeout(function(){return e.apply(null,r)},t)});var Vc=Ht(Wo,z,1);function rs(e,t,r){var n,o,a,i,l=0;r||(r={});var c=function(){l=r.leading===!1?0:Vt(),n=null,i=e.apply(o,a),n||(o=a=null)}
2395,s=function(){var u=Vt();!l&&r.leading===!1&&(l=u);var f=t-(u-l);return o=this,a=arguments,f<=0||f>t?(n&&(clearTimeout(n),n=null),l=u,i=e.apply(o,a),n||(o=a=null)):!n&&r.trailing!==!1&&(n=setTimeout(c,f)),i};return s.cancel=function(){clearTimeout(n),l=0,n=o=a=null},s}function ns(e,t,r){var n,o,a,i,l,c=function(){var u=Vt()-o;t>u?n=setTimeout(c,t-u):(n=null,r||(i=e.apply(l,a)),n||(a=l=null))},s=ae(function(u){return l=this,a=u,o=Vt(),n||(n=setTimeout(c,t),r&&(i=e.apply(l,a))),i});return s.cancel=function(){clearTimeout(n),n=a=l=null},s}function os(e,t){return Ht(t,e)}function fr(e){return function(){return!e.apply(this,arguments)}}function as(){var e=arguments,t=e.length-1;return function(){for(var r=t,n=e[t].apply(this,arguments);r--;)n=e[r].call(this,n);return n}}function is(e,t){return function(){if(--e<1)return t.apply(this,arguments)}}function Sn(e,t){var r;return function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=null),r}}var Hc=Ht(Sn,2);function Mn(e,t,r){t=ne(t,r);for(var n=$(e),o,a=0,i=n.length;a<i;a++)if(o=n[a],t(e[o],o,e))return o}function Pn(e){return function(t,r,n){r=ne(r,n);for(var o=ce(t),a=e>0?0:o-1;a>=0&&a<o;a+=e)if(r(t[a],a,t))return a;return-1}}var Lr=Pn(1);var Go=Pn(-1);function Rn(e,t,r,n){r=ne(r,n,1);for(var o=r(t),a=0,i=ce(e);a<i;){var l=Math.floor((a+i)/2);r(e[l])<o?a=l+1:i=l}return a}function jn(e,t,r){return function(n,o,a){var i=0,l=ce(n);if(typeof a=="number")e>0?i=a>=0?a:Math.max(a+l,i):l=a>=0?Math.min(a+1,l):a+l+1;else if(r&&a&&l)return a=r(n,o),n[a]===o?a:-1;if(o!==o)return a=t(Et.call(n,i,l),mn),a>=0?a+i:-1;for(a=e>0?i:l-1;a>=0&&a<l;a+=e)if(n[a]===o)return a;return-1}}var Xo=jn(1,Lr,Rn);var qc=jn(-1,Go);function Fr(e,t,r){var n=fe(e)?Lr:Mn,o=n(e,t,r);if(o!==void 0&&o!==-1)return e[o]}function ss(e,t){return Fr(e,At(t))}function Ce(e,t,r){t=ht(t,r);var n,o;if(fe(e))for(n=0,o=e.length;n<o;n++)t(e[n],n,e);else{var a=$(e);for(n=0,o=a.length;n<o;n++)t(e[a[n]],a[n],e)}return e}function Ve(e,t,r){t=ne(t,r);for(var n=!fe(e)&&$(e),o=(n||e).length,a=Array(o),i=0;i<o;i++){var l=n?n[i]:i;a[i]=t(e[l],l,e)}return a}function kn(e){var t=function(r,n,o,a){var i=!fe(r)&&$(r),l=(i||r).length,c=e>0?0:l-1;for(a||(o=r[i?i[c]:c],c+=e);c>=0&&c<l;c+=e){var s=i?i[c]:c;o=n(o,r[s],s,r)}return o};return function(r,n,o,a){var i=arguments.length>=3;return t(r,ht(n,a,4),o,i)}}var $o=kn(1);var ls=kn(-1);function nt(e,t,r){var n=[];return t=ne(t,r),Ce(e,function(o,a,i){t(o,a,i)&&n.push(o)}),n}function us(e,t,r){return nt(e,fr(ne(t)),r)}function Yo(e,t,r){t=ne(t,r);for(var n=!fe(e)&&$(e),o=(n||e).length,a=0;a<o;a++){var i=n?n[a]:a;if(!t(e[i],i,e))return!1}return!0}function Ko(e,t,r){t=ne(t,r);for(var n=!fe(e)&&$(e),o=(n||e).length,a=0;a<o;a++){var i=n?n[a]:a;if(t(e[i],i,e))return!0}return!1}function Fe(e,t,r,n){return fe(e)||(e=Ze(e)),(typeof r!="number"||n)&&(r=0),Xo(e,t,r)>=0}var Wc=ae(function(e,t,r){var n,o;return ue(t)?o=t:(t=dt(t),n=t.slice(0,-1),t=t[t.length-1]),Ve(e,function(a){var i=o;if(!i){if(n&&n.length&&(a=lr(a,n)),a==null)return;i=a[t]}return i==null?i:i.apply(a,r)})});function dr(e,t){return Ve(e,cr(t))}function cs(e,t){return nt(e,At(t))}function Dn(e,t,r){var n=-1/0,o=-1/0,a,i;if(t==null||typeof t=="number"&&typeof e[0]!="object"&&e!=null){e=fe(e)?e:Ze(e);for(var l=0,c=e.length;l<c;l++)a=e[l],a!=null&&a>n&&(n=a)}else t=ne(t,r),Ce(e,function(s,u,f){i=t(s,u,f),(i>o||i===-1/0&&n===-1/0)&&(n=s,o=i)});return n}function fs(e,t,r){var n=1/0,o=1/0,a,i;if(t==null||typeof t=="number"&&typeof e[0]!="object"&&e!=null){e=fe(e)?e:Ze(e);for(var l=0,c=e.length;l<c;l++)a=e[l],a!=null&&a<n&&(n=a)}else t=ne(t,r),Ce(e,function(s,u,f){i=t(s,u,f),(i<o||i===1/0&&n===1/0)&&(n=s,o=i)});return n}var M0=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function On(e){return e?ze(e)?Et.call(e):Mr(e)?e.match(M0):fe(e)?Ve(e,ur):Ze(e):[]}function Ln(e,t,r){if(t==null||r)return fe(e)||(e=Ze(e)),e[Or(e.length-1)];var n=On(e),o=ce(n);t=Math.max(Math.min(t,o),0);for(var a=o-1,i=0;i<t;i++){var l=Or(i,a),c=n[i];n[i]=n[l],n[l]=c}return n.slice(0,t)}function ds(e){return Ln(e,1/0)}function hs(e,t,r){var n=0;return t=ne(t,r),dr(Ve(e,function(o,a,i){return{value:o,index:n++,criteria:t(o,a,i)}}).sort(function(o,a){var i=o.criteria,l=a.criteria;if(i!==l){if(i>l||i===void 0)return 1;if(i<l||l===void 0)return-1}return o.index-a.index}),"value")}function kt(e,t){return function(r,n,o){var a=t?[[],[]]:{};return n=ne(n,o),Ce(r,function(i,l){var c=n(i,l,r);e(a,i,c)}),a}}var Gc=kt(function(e,t,r){Ie(e,r)?e[r].push(t):e[r]=[t]});var Xc=kt(function(e,t,r){e[r]=t});var $c=kt(function(e,t,r){Ie(e,r)?e[r]++:e[r]=1});var Yc=kt(function(e,t,r){e[r?0:1].push(t)},!0);function ps(e){return e==null?0:fe(e)?e.length:$(e).length}function ms(e,t,r){return t in r}var Jo=ae(function(e,t){var r={},n=t[0];if(e==null)return r;ue(n)?(t.length>1&&(n=ht(n,t[1])),t=ft(e)):(n=ms,t=Ue(t,!1,!1),e=Object(e));for(var o=0,a=t.length;o<a;o++){var i=t[o],l=e[i];n(l,i,e)&&(r[i]=l)}return r});var Kc=ae(function(e,t){var r=t[0],n;return ue(r)?(r=fr(r),t.length>1&&(n=t[1])):(t=Ve(Ue(t,!1,!1),String),r=function(o,a){return!Fe(t,a)}),Jo(e,r,n)});function Fn(e,t,r){return Et.call(e,0,Math.max(0,e.length-(t==null||r?1:t)))}function Nn(e,t,r){return e==null||e.length<1?t==null||r?void 0:[]:t==null||r?e[0]:Fn(e,e.length-t)}function hr(e,t,r){return Et.call(e,t==null||r?1:t)}function vs(e,t,r){return e==null||e.length<1?t==null||r?void 0:[]:t==null||r?e[e.length-1]:hr(e,Math.max(0,e.length-t))}function gs(e){return nt(e,Boolean)}function ys(e,t){return Ue(e,t,!1)}var Zo=ae(function(e,t){return t=Ue(t,!0,!0),nt(e,function(r){return!Fe(t,r)})});var Jc=ae(function(e,t){return Zo(e,t)});function Nr(e,t,r,n){pn(t)||(n=r,r=t,t=!1),r!=null&&(r=ne(r,n));for(var o=[],a=[],i=0,l=ce(e);i<l;i++){var c=e[i],s=r?r(c,i,e):c;t&&!r?((!i||a!==s)&&o.push(c),a=s):r?Fe(a,s)||(a.push(s),o.push(c)):Fe(o,c)||o.push(c)}return o}var Zc=ae(function(e){return Nr(Ue(e,!0,!0))});function _s(e){for(var t=[],r=arguments.length,n=0,o=ce(e);n<o;n++){var a=e[n];if(!Fe(t,a)){var i;for(i=1;i<r&&Fe(arguments[i],a);i++);i===r&&t.push(a)}}return t}function Qr(e){for(var t=e&&Dn(e,ce).length||0,r=Array(t),n=0;n<t;n++)r[n]=dr(e,n);return r}var ef=ae(Qr);function ws(e,t){for(var r={},n=0,o=ce(e);n<o;n++)t?r[e[n]]=t[n]:r[e[n][0]]=e[n][1];return r}function bs(e,t,r){t==null&&(t=e||0,e=0),r||(r=t<e?-1:1);for(var n=Math.max(Math.ceil((t-e)/r),0),o=Array(n),a=0;a<n;a++,e+=r)o[a]=e;return o}function xs(e,t){if(t==null||t<1)return[];for(var r=[],n=0,o=e.length;n<o;)r.push(Et.call(e,n,n+=t));return r}function Br(e,t){return e._chain?z(t).chain():t}function Qn(e){return Ce(kr(e),function(t){var r=z[t]=e[t];z.prototype[t]=function(){var n=[this._wrapped];
2395return vc.apply(n,arguments),Br(this,r.apply(z,n))}}),z}Ce(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=dn[e];z.prototype[e]=function(){var r=this._wrapped;return r!=null&&(t.apply(r,arguments),(e==="shift"||e==="splice")&&r.length===0&&delete r[0]),Br(this,r)}});Ce(["concat","join","slice"],function(e){var t=dn[e];z.prototype[e]=function(){var r=this._wrapped;return r!=null&&(r=t.apply(r,arguments)),Br(this,r)}});var tf=z;var Es=Qn(Ts);Es._=Es;var He=Es;var ta,As=Backbone.Radio.channel("events"),P0=function(){typeof ta!="undefined"&&ta.each(function(){var e=jQuery(this),t=e.data("config");It(e,t)})},It=function(e,t){var r=g.screenSize,n=t[r].colGutter,o=t[r].colCount,a=typeof t[r].rowGutterMu=="undefined"?"%":t[r].rowGutterMu,i=typeof t[r].colGutterMu=="undefined"?"%":t[r].colGutterMu,l=(1-1/o)*t[r].colGutter,c="calc( 100% / "+o+" - "+l+i+")";e.find(".thumbnail-wrap").css({width:c,"margin-bottom":t[r].rowGutter+a});var s=t.layoutType;switch(s){case"masonry":e.find(".lay-thumbnailgrid-gutter-sizer").css("width",n+i),e.find(".lay-thumbnailgrid-col-sizer").css("width",c);var u=e.data("masonry");typeof u!="undefined"&&u.layout();break;default:e.find(".thumb-collection").css("gap",n+i);break}},zr=function(e,t){var r=g.screenSize;switch(t.layoutType){case"masonry":e.find(".thumb-collection").append('<div class="lay-thumbnailgrid-gutter-sizer"></div><div class="lay-thumbnailgrid-col-sizer"></div>');var n=e.find(".thumb-collection")[0],o=".lay-thumbnailgrid-gutter-sizer",a=typeof t[r].colGutterMu=="undefined"?"%":t[r].colGutterMu;a==="px"&&(o=t[r].colGutter);var i=new Masonry(n,{itemSelector:".thumbnail-wrap",columnWidth:".lay-thumbnailgrid-col-sizer",gutter:o,percentPosition:!0,transitionDuration:0});i.once("layoutComplete",function(){e.closest(".col").addClass("masonry-initialized")}),e.data("masonry",i);break;default:break}},R0=function(){Q0(),jQuery(window).on("window_width_changed",P0),k0(),j0()},nf=function(){var e=window.location.hash;if(ra!=null){var t=ra.find(".thumbs-collection-region.use-filter");t.length>0&&t.each(function(){var r=jQuery(this);Cs(r);var n,o=[];if(e.startsWith("#category-")){var a=e.substr(10),i=jQuery('[data-slug="'+a+'"]');i.length>0&&(n=i.attr("data-id"),o=zn(r),Bn(r,n,!0,o))}else if(e==""){var i=jQuery(".lay-filter-default");i.length>0&&(n=i.attr("data-id"),o=zn(r),Bn(r,n,!0,o))}na(r,n,o)})}},j0=function(){jQuery(window).on("hashchange",nf)},na=function(e,t,r){var n=e.data("config"),o=!1;n!=!1&&He.has(n,"showfilter")&&(o=n.showfilter);var a="OR";n!=!1&&He.has(n,"tagFilterBehaviour")&&(a=n.tagFilterBehaviour);var i=!1;n!=!1&&He.has(n,"showtagfilter")&&(i=n.showtagfilter);var l=[];o==!0?e.find('.thumbnail-wrap[data-filterid="'+t+'"]').each(function(){for(var m=jQuery(this).attr("data-tags"),w=M.parseIdsString(m),y=0;y<w.length;y++){var I=w[y];l.indexOf(I)==-1&&l.push(I)}}):i==!0&&o==!1&&(e.find(".thumbnail-wrap").each(function(){for(var m=jQuery(this).attr("data-tags"),w=M.parseIdsString(m),y=0;y<w.length;y++){var I=w[y];l.indexOf(I)==-1&&l.push(I)}}),e.find(".tag-bubble:not(.deselect-tags)").each(function(){var m=parseInt(jQuery(this).attr("data-tag_id"),10);l.indexOf(m)==-1&&jQuery(this).remove()}));var c=e.find(".tag-bubble.lay-tag-active");switch(c.length>0?e.find(".deselect-tags").css("display","").removeClass("lay-filter-hidden"):e.find(".deselect-tags").addClass("lay-filter-hidden"),a){case"AND":var c=e.find(".tag-bubble.lay-tag-active");if(c.length>0){var s=[];c.each(function(){s.push(parseInt(jQuery(this).attr("data-tag_id"),10))});for(var u=[],f=0;f<r.length;f++){var d=r[f];d.show==!0&&(u=He.union(d.ids,u))}for(var f=0;f<l.length;f++){var p=l[f];s.length>0&&He.intersection(s,u).length>0&&u.indexOf(p)!=-1?e.find('.tag-bubble[data-tag_id="'+p+'"]').css("display",""):e.find('.tag-bubble[data-tag_id="'+p+'"]').css("display","none")}}else{e.find(".tag-bubble:not(.deselect-tags)").css("display","none");for(var f=0;f<l.length;f++){var p=l[f];e.find('.tag-bubble[data-tag_id="'+p+'"]').css("display","")}}break;case"OR":default:if(o){e.find(".tag-bubble:not(.deselect-tags)").css("display","none");for(var f=0;f<l.length;f++){var p=l[f];e.find('.tag-bubble[data-tag_id="'+p+'"]').css("display","")}}break}},Cs=function(e,t){var r=e.find(".lay-thumbnailgrid-tagfilter");t!=null&&t!=!1&&t.length>0?t.removeClass("lay-tag-active"):e.find(".tag-bubble").removeClass("lay-tag-active");var n=r.find(".tag-bubble"),o=[],a=e.data("config"),i=a!=!1&&He.has(a,"reorder_tags")?a.reorder_tags:!0;if(i){n.each(function(){if(!jQuery(this).hasClass("lay-tag-active")){var s=jQuery(this).attr("data-ix");o.push([this,s])}}),o.sort(function(s,u){return s[1]==u[1]?0:s[1]>u[1]?1:-1});var l="";r.find(".deselect-tags").length>0&&(l+=r.find(".deselect-tags")[0].outerHTML),r.find(".lay-tag-active").each(function(){l+=this.outerHTML});for(var c=0;c<o.length;c++)o[c][0].classList.contains("deselect-tags")||(l+=o[c][0].outerHTML);r.html(l)}},ra=void 0,k0=function(){window.laytheme.on("content_ready",function(e){ra=Me(e);var t=ra.find(".thumbs-collection-region");t.length>0&&t.each(function(){var r=jQuery(this),n=r.data("config"),o=!1;D0(r,n),zr(r,n),It(r,n);var a=window.location.hash;if(a.startsWith("#category-")&&jQuery(this).hasClass("use-filter")){var i=a.substring(10),l=jQuery(this).find('[data-slug="'+i+'"]');if(l.length>0){o=l.attr("data-id");var c=zn(r);Bn(r,o,!1,c)}}else o=n.cat_id,ea(r,n);na(r,o,c),F0(r),L0(r),O0(r),r.addClass("initialized")}),t.each(function(){var r=jQuery(this),n=r.data("config");zr(r,n),It(r,n),jQuery(this).addClass("sized")}),M.setImageSizesAttribute(t)})},D0=function(e,t){if(t.randomorder&&!e.hasClass("was-randomized")){var r=e.find(".thumbnail-wrap").toArray();let n=r.map(o=>({value:o,sort:Math.random()})).sort((o,a)=>o.sort-a.sort).map(({value:o})=>o);e.find(".thumb-collection").html(n),e.addClass("was-randomized")}},ea=function(e,t){if((e.hasClass("use-filter")||e.hasClass("use-tags-filter"))&&He.has(t,"limitThumbn
2395ails")&&t.limitThumbnails>0){let r=0,n=e.find(".show-filtered").length>0;e.find(".thumbnail-wrap").each(function(){(jQuery(this).hasClass("show-filtered")||!n)&&(r++,r>t.limitThumbnails?jQuery(this).addClass("hide-because-limit"):jQuery(this).removeClass("hide-because-limit"))})}},O0=function(e){e.off("click",".deselect-tags"),e.on("click",".deselect-tags",function(t){jQuery(this).addClass("lay-filter-hidden");var r=jQuery(t.delegateTarget);Cs(r);var n=r.find(".lay-thumbnailgrid-filter-anchor.lay-filter-active"),o=!1;n.length>0&&(o=parseInt(r.find(".lay-thumbnailgrid-filter-anchor.lay-filter-active").attr("data-id"),10));var a=zn(r);Bn(r,o,!0,a);var i=r.data("config"),l="OR";i!=!1&&He.has(i,"tagFilterBehaviour")&&(l=i.tagFilterBehaviour,l=l.toUpperCase()),l=="AND"&&na(r,o,a)})},L0=function(e){e.off("click",".tag-bubble:not(.deselect-tags)"),e.on("click",".tag-bubble:not(.deselect-tags)",function(t){var r=jQuery(t.delegateTarget),n=jQuery(this),o=r.find(".lay-thumbnailgrid-tagfilter"),a=r.data("config"),i=a!=!1&&He.has(a,"reorder_tags")?a.reorder_tags:!0;if(n.hasClass("lay-tag-active"))Cs(r,n);else{if(i){var l=o.find(".lay-tag-active").last();l.length>0?n.insertAfter(l):r.find(".deselect-tags").length>0?n.insertAfter(r.find(".deselect-tags")):o.prepend(n)}n.addClass("lay-tag-active");var c=r[0].querySelector(".lay-thumbnailgrid-tagfilter.mobile-one-line"),s=!0;a.hasOwnProperty("reorder_tags")&&(s=a.reorder_tags),c&&s&&c.scrollTo({top:0,left:0,behavior:"smooth"})}var u=r.find(".lay-thumbnailgrid-filter-anchor.lay-filter-active"),f=!1;u.length>0&&(f=parseInt(r.find(".lay-thumbnailgrid-filter-anchor.lay-filter-active").attr("data-id"),10));var d=zn(r);Bn(r,f,!0,d),na(r,f,d)})},F0=function(e){e.off("click",".lay-thumbnailgrid-filter-anchor"),e.on("click",".lay-thumbnailgrid-filter-anchor",function(t){if(jQuery(this).hasClass("lay-filter-active"))jQuery(t.delegateTarget).find(".lay-tag-active").length>0&&nf();else{var r=jQuery(this).attr("data-slug");window.location.hash="category-"+r}})},Bn=function(e,t,r=!0,n=[]){e.find(".lay-filter-active").removeClass("lay-filter-active"),t!==!1&&jQuery('.lay-thumbnailgrid-filter-anchor[data-id="'+t+'"]').addClass("lay-filter-active");var o=e.find(".thumbnail-wrap"),a=e.data("config");if(frontendPassedData.tgf_transition=="fade_out_fade_in"&&r)e.addClass("lay-disable-click lay-transition"),e.find(".thumb-collection").css("opacity",0),setTimeout(function(){switch(Is(n),ea(e,a),a.layoutType){case"masonry":It(e,a);break;default:zr(e,a),It(e,a);break}M.setImageSizesAttribute(e),rf(o,function(){e.find(".thumb-collection").css("opacity",1),setTimeout(function(){e.removeClass("lay-disable-click lay-transition")},500)}),As.trigger("thumbnailGridWasFiltered")},500);else if(frontendPassedData.tgf_transition=="fade_out_fade_in_2"&&r)e.addClass("lay-disable-click"),o.css("transitionDelay","0ms"),o.removeClass("in-view").addClass("below"),setTimeout(function(){switch(Is(n),ea(e,a),a.layoutType){case"masonry":It(e,a);break;default:zr(e,a),It(e,a);break}M.setImageSizesAttribute(e),rf(o,function(){var i=0;o.each(function(){var l=jQuery(this);l.css("display")=="block"?(l[0].style.transitionDelay=i*100+"ms",i++,l.removeClass("below").addClass("in-view")):l.removeClass("below in-view")}),e.removeClass("lay-disable-click")}),As.trigger("thumbnailGridWasFiltered")},550);else{switch(Is(n),ea(e,a),a.layoutType){case"masonry":It(e,a);break;default:zr(e,a),It(e,a);break}M.setImageSizesAttribute(e),As.trigger("thumbnailGridWasFiltered")}},zn=function(e){var t=window.location.hash,r=!1;if(t.startsWith("#category-")){var n=t.substr(10),o=jQuery('[data-slug="'+n+'"]');o.length>0&&(r=o.attr("data-id"))}else if(t==""){var o=jQuery(".lay-filter-default");o.length>0&&(r=o.attr("data-id"))}var a=[];e.find(".tag-bubble.lay-tag-active").each(function(){var u=parseInt(jQuery(this).attr("data-tag_id"),10);a.push(u)});var i=e.find(".thumbnail-wrap"),l=e.data("config"),c=[],s="OR";return l!=!1&&He.has(l,"tagFilterBehaviour")&&(s=l.tagFilterBehaviour,s=s.toUpperCase()),i.each(function(){var u=jQuery(this),f=u.attr("data-tags"),d=M.parseIdsString(f),p={show:!1,$el:u,ids:d},m=!1;switch(s){case"AND":m=He.intersection(d,a).length==a.length;break;case"OR":default:m=He.intersection(d,a).length>0;break}a.length==0&&r!==!1&&parseInt(u.attr("data-filterid"),10)==r||a.length>0&&m&&r!==!1&&parseInt(u.attr("data-filterid"),10)==r||a.length>0&&m&&r===!1||r===!1&&a.length==0?p.show=!0:p.show=!1,c.push(p)}),c},Is=function(e){for(var t=0;t<e.length;t++){var r=e[t];r.show==!0?r.$el.css("display","block").addClass("show-filtered").removeClass("hide-filtered"):r.$el.css("display","none").addClass("hide-filtered").removeClass("show-filtered")}},N0=function(e,t,r){return e==!0},rf=function(e,t){var r=[],n=[];
2395e.find("img").each(function(){_t.isInsideViewportHeight(this,90)&&(r.push(this),n.push(!1))});for(var o=0;o<r.length;o++)(function(i){var l=jQuery(r[i]);if(l.hasClass("loaded")||l.hasClass("lazyloaded"))n[i]=!0;else{var c=new MutationObserver(()=>{(l.hasClass("loaded")||l.hasClass("lazyloaded"))&&(n[i]=!0)});c.observe(l[0],{attributes:!0,attributeFilter:["class"]})}})(o);if(r.length>0)var a=setInterval(function(){n.every(N0)&&(t(),clearInterval(a))},30);else t()},Q0=function(){window.laytheme.on("searchresultshown",function(){ta=jQuery(".thumbs-collection-region"),ta.each(function(){if(!jQuery(this).hasClass("initialized")){var e=jQuery(this),t=e.data("config");zr(e,t),It(e,t),jQuery(this).addClass("initialized sized"),t.layoutType=="masonry"&&e.closest(".col").addClass("masonry-initialized")}})})},B0={initModule:R0},of=B0;var qt,z0=function(){typeof qt!="undefined"&&qt.each(function(){var e=jQuery(this),t=e.data("config");sf(e,t)})},sf=function(e,t){var r=g.screenSize,n=t[r].colGutter,o=t[r].colCount,a=typeof t[r].rowGutterMu=="undefined"?"%":t[r].rowGutterMu,i=typeof t[r].colGutterMu=="undefined"?"%":t[r].colGutterMu,l=(1-1/o)*t[r].colGutter,c="calc( 100% / "+o+" - "+l+i+")",s={desktop:200,tablet:150,phone:80};let u=typeof t[r].elementHeight=="undefined"?s[r]:t[r].elementHeight;var f=t.layoutType;switch(f){case"masonry":e.find(".element-wrap").css({width:c,"margin-bottom":t[r].rowGutter+a}),e.find(".lay-elementgrid-gutter-sizer").css("width",n+i),e.find(".lay-elementgrid-col-sizer").css("width",c),lf(e,t);break;case"same-height":e.find(".element-wrap").css({"margin-bottom":t[r].rowGutter+a}).find("img, video").css("height",u+"px"),e.find(".element-wrap").css("margin-right",n+i);break;default:e.find(".element-wrap").css({width:c,"margin-bottom":t[r].rowGutter+a}),e.find(".element-wrap").css("margin-right",n+i),e.find(".element-wrap:nth-child("+o+"n)").css("margin-right",0);break}},lf=function(e,t){var r=g.screenSize;switch(t.layoutType){case"masonry":e.find(".lay-elementgrid-gutter-sizer").length==0&&e.find(".element-collection").append('<div class="lay-elementgrid-gutter-sizer"></div><div class="lay-elementgrid-col-sizer"></div>');var n=e.find(".element-collection")[0],o=".lay-elementgrid-gutter-sizer",a=typeof t[r].colGutterMu=="undefined"?"%":t[r].colGutterMu;a==="px"&&(o=t[r].colGutter);var i=new Masonry(n,{itemSelector:".element-wrap",columnWidth:".lay-elementgrid-col-sizer",gutter:o,percentPosition:!0,transitionDuration:0});i.once("layoutComplete",function(){e.closest(".col").addClass("masonry-initialized")}),e.data("masonry",i);break;case"same-height":var l=e.find(".element-wrap"),c=e.find(".elementgrid-row .element-wrap");c.length>0&&c.unwrap();break;default:var l=e.find(".element-wrap"),c=e.find(".elementgrid-row .element-wrap");c.length>0&&c.unwrap();for(var s=t[r].colCount,u=0;u<l.length;u+=s)l.slice(u,u+s).wrapAll('<div class="elementgrid-row '+t.layoutType+'"></div>');break}},af=function(){typeof qt!="undefined"&&qt.each(function(){var e=jQuery(this),t=e.data("config"),r=t.layoutType;if(r==="masonry"){var n=e.data("masonry");typeof n!="undefined"&&n.layout()}})},U0=function(){jQuery(window).on("window_width_changed",af),window.laytheme.on("sizechanged",z0),V0(),setTimeout(function(){af()},1e3)},V0=function(){window.laytheme.on("content_ready",function(e){qt=void 0;var t;t=Me(e),qt=t.find(".elements-collection-region"),qt.each(function(){var r=jQuery(this),n=r.data("config");lf(r,n),sf(r,n),this.classList.add("initialized"),n.layoutType=="masonry"&&r.closest(".col").addClass("masonry-initialized")}),M.setImageSizesAttribute(qt)})},H0={initModule:U0},uf=H0;var Vn=$t(ff());document.fonts.onloadingdone=function(){setTimeout(function(){jQuery(window).trigger("resize")},0)};var Ss,Un=[],q0=function(){};var W0=function(e,t){this.control,this.marquee,this.wasInitialized,this.$marquee=e,this.config=t,this.resizeObserver=null,this.height=0,this.previousHeight=0;function r(){this.marquee!==null&&(this.control=(0,Vn.loop)(this.marquee,[]),this.marquee.clear(),e.empty())}function n(){var o=g.screenSize,a=e[0],i=this.config.speed,l=this.config.reversedirection,c=this.config.startonscreen,s=this.config.textformat,u=this.config.separator,f=this.config[o].imageheight,d=this.config.hasOwnProperty("startonhover")?this.config.startonhover:!1,p=this.config.elements;if(l===!1&&(i*=-1),d===!0&&(i=0),e.length>0&&e.is(":visible")){this.marquee=new Vn.Marquee(a,{rate:i,upDown:!1,startOnScreen:c});for(var m=[],w=0;w<p.length;w++)(function(y,I,j){var q=function(){var F=j[y],N;switch(F.type){case"text":N=jQuery(F.cont),Ja(N),ei(N),N.addClass("_"+I+"_no_spaces");break;case"img":var L="";F.sizes.hasOwnProperty("full")&&(L=M.filterURL(F.sizes.full));var W=M.getImageSrcAndSrcSet(F),B=F.w/F.h*f,U="";if(F.hasOwnProperty("imagelink")&&F.imagelink!=null){var ie=F.imagelink.newtab?'target="_blank"':"";U+='<a href="'+M.filterURL(F.imagelink.url)+'" '+ie+' data-type="'+F.imagelink.type+'" data-id="'+F.imagelink.id+'" data-catid="['+F.imagelink.catid+']" data-title="'+F.imagelink.title+'">'}L.indexOf(".gif")!==-1||L.indexOf(".png")!==-1?U+='<img style="width:'+B+"px; height:"+f+'px;" src="'+L+'">':U+='<img sizes="'+B+'px" style="width:'+B+"px; height:"+f+'px;" src="'+W.src+'" srcset="'+W.srcset+'">',F.hasOwnProperty("imagelink")&&F.imagelink!=null&&(U+="</a>"),N=jQuery(U);break}return N[0]};m.push(q)})(w,s,p);this.control=(0,Vn.loop)(this.marquee,m,function(){var y=document.createElement("span");return y.classList.add("_"+s),y.innerHTML=u,y}),this.$marquee.data("lay-marquee",this.marquee)}this.wasInitialized=!0}this.init=n,this.destroy=r},G0=function(){jQuery(window).on("window_width_changed",q0),K0(),Y0(),$0()},X0=function(){if(Un.length>0){for(var e=0;e<Un.length;e++){var t=Un[e];t.destroy()}Un=[]}},$0=function(){jQuery("body").on("mouseenter",".marquee-start-on-hover",function(e){var t=jQuery(this).data("c
2395onfig"),r=t.speed,n=t.reversedirection;n==!1&&(r*=-1);var o=jQuery(this).data("lay-marquee");o.setRate(r)}).on("mouseleave",".marquee-start-on-hover",function(e){var t=jQuery(this).data("lay-marquee");t.setRate(0)})},Y0=function(){jQuery("body").on("mouseenter",".marquee-pause-on-hover",function(e){var t=jQuery(this).data("lay-marquee");t.setRate(0)}).on("mouseleave",".marquee-pause-on-hover",function(e){var t=jQuery(this).data("config"),r=t.speed,n=t.reversedirection;n==!1&&(r*=-1);var o=jQuery(this).data("lay-marquee");o.setRate(r)})},K0=function(){window.laytheme.on("content_ready",function(e){Ss=void 0;var t;switch(e){case"desktop":t=jQuery("#grid, .cover-region-desktop, #footer");break;case"phone":var r=jQuery("#footer-custom-phone-grid").length!=0,n=jQuery("#custom-phone-grid").length!=0;r&&n?t=jQuery("#custom-phone-grid, .cover-region-phone, #footer-custom-phone-grid"):!r&&n?t=jQuery("#custom-phone-grid, .cover-region-phone, #footer"):r&&!n?t=jQuery("#grid, .cover-region-desktop, #footer-custom-phone-grid"):!r&&!n&&(t=jQuery("#grid, .cover-region-desktop, #footer"));break}X0(),Ss=t.find(".lay-marquee"),Ss.each(function(){var o=jQuery(this);if(o){var a=o.data("config"),i=new W0(o,a);i.init(),Un.push(i)}})})},J0={initModule:G0},df=J0;var ia,Z0=function(){typeof ia!="undefined"&&ia.each(function(){var e=jQuery(this),t=e.data("config");hf(e,t),pf(e,t)})},aa=function(e){return isNaN(Number(e))||e.trim()===""},hf=function(e,t){for(var r=t[g.screenSize].sortedColumns,n=[],o=[],a=0;a<r.length;a++){var i=r[a];n.push(i.name),o.push(i.visible)}var l=[],c=-1,s=-1;e.find(".lay-projectindex-filter").each(function(u){var f=0;this.classList.contains("lay-projectindex-filter-title")?f=n.indexOf("title"):this.classList.contains("lay-projectindex-filter-categories")?f=n.indexOf("categories"):this.classList.contains("lay-projectindex-filter-tags")?f=n.indexOf("tags"):this.classList.contains("lay-projectindex-filter-year")&&(f=n.indexOf("year")),jQuery(this).css("order",f),f>c&&o[f]==!0&&(c=f,s=u)}),e.find(".lay-projectindex-filter-wrap").find(".last-visible-projectindex-col").removeClass("last-visible-projectindex-col"),s!=-1&&e.find(".lay-projectindex-filter:nth-child("+(s+1)+")").addClass("last-visible-projectindex-col"),e.find(".lay-projectindex-row").each(function(){var u=jQuery(this),f=-1,d=-1;u.find(">div").each(function(p){var m=0;switch(this.classList[0]){case"lay-projectindex-col-title":m=n.indexOf("title");break;case"lay-projectindex-col-categories":m=n.indexOf("categories");break;case"lay-projectindex-col-tags":m=n.indexOf("tags");break;case"lay-projectindex-col-year":m=n.indexOf("year");break}jQuery(this).css("order",m),m>f&&o[m]==!0&&!this.classList.contains("lay-projectindex-col-empty")&&(f=m,d=p)}),u.find(".last-visible-projectindex-col").removeClass("last-visible-projectindex-col"),d!=-1&&u.find(">div:nth-child("+(d+1)+")").addClass("last-visible-projectindex-col")})},pf=function(e,t){for(var r=e.find(".lay-projectindex-col-title, .lay-projectindex-filter-title"),n=e.find(".lay-projectindex-col-categories, .lay-projectindex-filter-categories"),o=e.find(".lay-projectindex-col-tags, .lay-projectindex-filter-tags"),a=e.find(".lay-projectindex-col-year, .lay-projectindex-filter-year"),i=typeof t.style=="undefined"?"table":t.style,l=aa(t[g.screenSize].tagsWidth),c=aa(t[g.screenSize].categoriesWidth),s=aa(t[g.screenSize].titleWidth),u=aa(t[g.screenSize].yearWidth),f,d,p,m,w=0;w<t[g.screenSize].sortedColumns.length;w++){var y=t[g.screenSize].sortedColumns[w];switch(y.name){case"title":f=y.visible;break;case"categories":d=y.visible;break;case"year":m=y.visible;break;case"tags":p=y.visible;break}}for(var I=[],w=0;w<t[g.screenSize].sortedColumns.length;w++){var y=t[g.screenSize].sortedColumns[w];y.visible===!0&&I.push(y)}for(var j=100,q,F,N,L,W=I.length,B=W,w=0;w<I.length;w++){var y=I[w];switch(y.name){case"title":s||(j-=Number(t[g.screenSize].titleWidth),B--);break;case"categories":c||(j-=Number(t[g.screenSize].categoriesWidth),B--);break;case"tags":l||(j-=Number(t[g.screenSize].tagsWidth),B--);break;case"year":u?(L=15,j-=L,B--):(j-=Number(t[g.screenSize].yearWidth),B--);break}}for(var w=0;w<I.length;w++){var y=I[w];switch(y.name){case"title":s?q=j/B:q=t[g.screenSize].titleWidth;break;case"categories":c?F=j/B:F=t[g.screenSize].categoriesWidth;break;case"tags":l?N=j/B:N=t[g.screenSize].tagsWidth;break;case"year":u?L=15:L=t[g.screenSize].yearWidth;break}}p?(o.show(),i=="table"&&o.css("width",N+"%")):o.hide(),d?(n.show(),i=="table"&&n.css("width",F+"%")):n.hide(),m?(a.show(),i=="table"&&a.css("width",L+"%")):a.hide(),f?(r.show(),i=="table"&&r.css("width",q+"%")):r.hide()},ey=function(e,t){e.find(".lay-projectindex-filter-inner").off("click"),e.find(".lay-projectindex-filter-inner").on("click",function(){var r=jQuery(this.parentNode),n=jQuery(this).closest(".lay-projectindex"),o=n.find(".lay-projectindex-row"),a="DESC";r.hasClass("projectindex-filter-active")?r.hasClass("order-ASC")?(r.removeClass("order-ASC").addClass("order-DESC"),a="DESC"):(r.removeClass("order-DESC").addClass("order-ASC"),a="ASC"):(n.find(".projectindex-filter-active").removeClass("projectindex-filter-active"),r.hasClass("lay-projectindex-filter-year")?(r.removeClass("order-ASC").addClass("projectindex-filter-active order-DESC"),a="DESC"):(r.removeClass("order-DESC").addClass("projectindex-filter-active order-ASC"),a="ASC"));var i="";r.hasClass("lay-projectindex-filter-title")?i="title":r.hasClass("lay-projectindex-filter-categories")?i="categories":r.hasClass("lay-projectindex-filter-tags")?i="tags":r.hasClass("lay-projectindex-filter-year")&&(i="date");var l=[];switch(o.each(function(u){switch(i){case"title":l.push({domIx:u,text:jQuery(this).find(".lay-projectindex-col-title").text()});break;case"categories":l.push({domIx:u,text:jQuery(this).find(".lay-projectindex-col-categories").text()});break;
2395case"tags":l.push({domIx:u,text:jQuery(this).find(".lay-projectindex-col-tags").text()});break;case"date":l.push({domIx:u,text:jQuery(this).find(".lay-projectindex-col-year").attr("data-date")});break}}),i){case"title":case"categories":l.sort((u,f)=>u.text.localeCompare(f.text));break;case"tags":l.sort((u,f)=>u.text.localeCompare(f.text,void 0,{numeric:!0,sensitivity:"base"}));break;case"date":l.sort(function(u,f){var d=parseInt(u.text,10),p=parseInt(f.text,10);return d-p});break}a=="DESC"&&(l=l.reverse()),jQuery(".lay-projectindex-first-row").css("border-top",""),jQuery(".lay-projectindex-first-row").removeClass("lay-projectindex-first-row");for(var c=0;c<l.length;c++){var s=l[c];o.eq(s.domIx).css("order",c),c==0&&o.eq(s.domIx).addClass("lay-projectindex-first-row")}jQuery(".lay-projectindex-first-row").css("border-top",t.lineStrokeWidth+"px solid "+t.lineColor),window.laytheme.trigger("projectindex_reordered")})},ty=function(){window.laytheme.on("sizechanged",Z0),ry()},ry=function(){window.laytheme.on("newpageshown",function(){ia=jQuery(".lay-projectindex"),ia.each(function(){var e=jQuery(this),t=e.data("config");hf(e,t),pf(e,t),ey(e,t),this.classList.add("initialized")})})},ny={initModule:ty},mf=ny;var sa,oy=function(){typeof sa!="undefined"&&sa.each(function(){var e=jQuery(this),t=e.data("config");vf(e,t)})},vf=function(e,t){var r=g.screenSize,n=t[r],o=n.width,a=n.height,i=n.spacebetween,l=t.setwidthorheight;switch(e.find(".lay-icon-inner").css({paddingLeft:i/2+"px",paddingRight:i/2+"px"}),l){case"width":e.find(".lay-icon-inner").css({width:o+"px",height:""});break;case"height":e.find(".lay-icon-inner").css({width:"",height:a+"px"});break}},ay=function(){window.laytheme.on("sizechanged",oy),iy()},iy=function(){window.laytheme.on("newpageshown",function(){sa=jQuery(".lay-socialmedia-icons"),sa.each(function(){var e=jQuery(this),t=e.data("config");vf(e,t),this.classList.add("initialized")})})},sy={initModule:ay},gf=sy;var Xh=$t(_f()),$h=$t(Pd()),Yh=$t(Wh()),Gh=void 0,cl=void 0,Ew=function(){window.laytheme.on("content_ready",function(e){Gh=Me(e),cl=Gh.find(".lay-webgl-slideshow"),cl.length>0&&setTimeout(()=>{Iw()},100)})},Aw=function(e){if(e.classList.contains("webgl-initialized"))return;e.classList.add("webgl-initialized"),this.el=e;let t={value:0},r=0,n=!0,o,a,i,l=parseInt(e.dataset.transitionspeed,10),c=parseInt(e.dataset.autoplayspeed,10),s=parseInt(e.dataset.autoplaydelay,10),u=e.dataset.transition,f=[];e.querySelectorAll("img").forEach(function(U){var E;let ie=U.src,he=(E=U.dataset)==null?void 0:E.sizes;if(he){he=he.replace("px","");var ye=U.getAttribute("srcset");if(ye){var be=ye.split(", ");be.every(A=>{var h=A.split(" ");return h[1]=parseInt(h[1].replace("w",""),10),h[1]>he?(ie=h[0],!1):!0})}}f.push(ie)});let p=[],m,w,y=e.clientWidth,I=e.clientHeight,j=U=>new Promise((ie,he)=>{let ye=new Image;ye.crossOrigin="anonymous",ye.onload=()=>ie(ye),ye.onerror=he,ye.src=U}),q=()=>{w=this.el.querySelector("canvas"),w.width=y,w.height=I,m=w.getContext("webgl")||w.getContext("experimental-webgl"),m.pixelStorei(m.UNPACK_FLIP_Y_WEBGL,!0);let U=m.createBuffer();m.bindBuffer(m.ARRAY_BUFFER,U),m.bufferData(m.ARRAY_BUFFER,new Float32Array([-1,-1,-1,4,4,-1]),m.STATIC_DRAW),m.viewport(0,0,y,I)},F=U=>{U.forEach(ie=>{let he=(0,Yh.default)(m,ie);he.minFilter=m.LINEAR,he.magFilter=m.LINEAR,p.push(he)})},N,L=(U,ie=l)=>{U=="next"?(r++,r>f.length-1&&(r=0)):r=U,o=a,a=p[r],N=anime({targets:t,value:[0,1],elasticity:0,easing:"easeInOutCubic",autoplay:!0,duration:ie,begin:()=>{},complete:()=>{setTimeout(()=>{n&&L("next")},c)},update:he=>{this.transition.draw(t.value,o,a,w.width,w.height)}})},W=()=>{setTimeout(()=>{n&&L("next")},s)};document.addEventListener("visibilitychange",function(U){document.hidden?N&&(N.pause(),n=!1):N&&(N.play(),n=!0)});let B=()=>{o=p[p.length-1],a=p[0],this.transition.draw(1,o,a,w.width,w.height),this.el.classList.add("lay-webgl-reveal")};Promise.all(f.map(j)).then(U=>{q(),F(U),o=p[p.length-1],a=p[0],this.transition=(0,$h.default)(m,Xh.default.find(ye=>ye.name===u));let ie=(ye,be)=>{ye.forEach(E=>{E.isIntersecting&&(N||(B(),W()))})};
2395new Nt(ie).observe(e)})},Iw=function(){cl.each(function(){new Aw(this)})},Cw=function(){Ew(),jQuery(window).on("window_width_changed",function(){})},Sw={initModule:Cw},Kh=Sw;jQuery(document).on("click",".lay-news-load-more",function(){var e=jQuery(this.parentNode.parentNode).find(".lay-news-element[data-amount]"),t=e.attr("data-amount");console.log("amt",t);var r=e.find(".hide-news");r.each(function(o){console.log("index",o),console.log("amt",t),o<t&&jQuery(this).addClass("show-news").removeClass("hide-news")});var n=e.find(".hide-news");n.length==0&&jQuery(this).hide()});var Gr,Mw=function(){typeof Gr!="undefined"&&Gr.each(function(){var e=jQuery(this),t=e.data("config");Jh(e,t)})},Jh=function(e,t){var r=g.screenSize,n=t[r].colGutter,o=t[r].colCount,a=typeof t[r].rowGutterMu=="undefined"?"%":t[r].rowGutterMu,i=typeof t[r].colGutterMu=="undefined"?"%":t[r].colGutterMu,l=(1-1/o)*t[r].colGutter,c="calc( 100% / "+o+" - "+l+i+")";e.find("li").css({width:c,"margin-bottom":t[r].rowGutter+a,"margin-left":0});var s=t.layoutType;switch(s){case"masonry":e.find(".lay-productsgrid-gutter-sizer").css("width",n+i),e.find(".lay-productsgrid-col-sizer").css("width",c);var u=e.data("masonry");typeof u!="undefined"&&u.layout();break;default:e.find("li").css("margin-right",n+i),e.find("li:nth-child("+o+"n)").css("margin-right",0);break}},Pw=function(e,t){switch(t.layoutType){case"masonry":var r=e.find("ul.lay-products")[0],n=new Masonry(r,{itemSelector:"li",columnWidth:".lay-productsgrid-col-sizer",gutter:".lay-productsgrid-gutter-sizer",percentPosition:!0,transitionDuration:0});n.once("layoutComplete",function(){e.closest(".col").addClass("masonry-initialized")}),e.data("masonry",n);break;default:break}},Rw=function(){jQuery(window).on("window_width_changed",Mw),jw()},jw=function(){window.laytheme.on("content_ready",function(e){Gr=void 0;var t;t=Me(e),Gr=t.find(".lay-products-thumbnails-grid"),Gr.each(function(){var r=jQuery(this),n=r.data("config");Pw(r,n),Jh(r,n),r.addClass("sized")}),M.setImageSizesAttribute(Gr)})},kw={initModule:Rw},Zh=kw;var Dw={updateLanguageSwitcherUrls:function(){ep()},initModule:function(){Ow()}},Ow=function(){frontendPassedData.is_qtranslate_active==1&&window.laytheme.on("newpage",ep)},ep=function(){frontendPassedData.is_qtranslate_active==1&&jQuery.ajax({url:frontendPassedData.wpapiroot+"laytheme/v1/get_qtranslate_langswitcher_urls/",data:{url:window.location.href},method:"GET",success:function(e){for(var t=JSON.parse(e),r=0;r<t.length;r++)jQuery(".qtranxs-lang-menu-item-"+t[r][0]+" a").attr("href",t[r][1])}})},tp=Dw;var Lw={updateLanguageSwitcherUrls:function(){rp()},initModule:function(){Fw()}},Fw=function(){frontendPassedData.is_polylang_active==1&&window.laytheme.on("newpageshown",rp)},rp=function(){frontendPassedData.is_polylang_active==1&&jQuery.ajax({url:frontendPassedData.wpapiroot+"laytheme/v1/get_polylang_langswitcher_urls/",data:{id:jQuery("body").attr("data-id"),type:jQuery("body").attr("data-type")},method:"GET",success:function(e){var t=JSON.parse(e);if(Array.isArray(t))for(var r=0;r<t.length;r++)typeof t[r][0]=="string"&&jQuery(".lang-item-"+t[r][1]+" a").each(function(){console.log("each!"),jQuery(this).attr("href",t[r][0])})}})},np=Lw;var Ne,Nw={initModule:function(){Qw()}},mt={desktopContentLoaded:!1,CplContentLoaded:!1},vt={desktopContentLoaded:!1,CplContentLoaded:!1},Qw=function(){ap(),window.laytheme.on("newpageshown",ap),window.laytheme.on("newpageshown",function(){setTimeout(function(){op()},0)}),window.laytheme.on("sizechanged",function(){op()})},op=function(){switch(g.screenSize){case"desktop":case"tablet":Uw();break;case"phone":Vw();break}Bw(),zw(),setTimeout(function(){var e=g.screenSize=="desktop"||g.screenSize=="tablet"?"desktop":"phone";window.laytheme.trigger("content_ready",e,Ne)},0)},Bw=function(){var e=jQuery("#lay-woocommerce");switch(frontendPassedData.image_loading){case"instant_load":_t.initLoadImages(e),M.fadeInImageOnLoadViaParent(e);break;case"lazy_load":break}},zw=function(){document.querySelectorAll("video").forEach(function(e){jQuery(e).is(":visible")||e.pause()})},Uw=function(){if(!mt.desktopContentLoaded){var e=[];document.querySelectorAll(".lay-content").forEach(function(t){e=e.concat(Array.from(t.querySelectorAll("#grid, .cover-region-desktop")))}),Ne=jQuery(e),Xr(Ne),mt.desktopContentLoaded=!0}vt.desktopContentLoaded||(Ne=jQuery("#footer"),Ne.length>0&&Xr(Ne),vt.desktopContentLoaded=!0)},Vw=function(){if(document.querySelector("body>.lay-content #custom-phone-grid")?mt.hasCPL=!0:mt.hasCPL=!1,document.querySelector("body>.lay-content #footer-custom-phone-grid")?vt.hasCPL=!0:vt.hasCPL=!1,mt.hasCPL){if(!mt.CplContentLoaded){var e=[];document.querySelectorAll(".lay-content").forEach(function(t){e=e.concat(Array.from(t.querySelectorAll("#custom-phone-grid, .cover-region-phone")))}),Ne=jQuery(e),Xr(Ne),mt.CplContentLoaded=!0}}else if(!mt.desktopContentLoaded){var e=[];document.querySelectorAll(".lay-content").forEach(function(r){e=e.concat(Array.from(r.querySelectorAll("#grid, .cover-region-desktop, #custom-phone-grid")))}),Ne=jQuery(e),Xr(Ne),mt.desktopContentLoaded=!0}vt.hasCPL?vt.CplContentLoaded||(Ne=jQuery("#footer-custom-phone-grid"),Xr(Ne),vt.CplContentLoaded=!0):vt.desktopContentLoaded||(Ne=jQuery("#footer"),Ne.length>0&&Xr(Ne),vt.desktopContentLoaded=!0)},Xr=function(e){switch(frontendPassedData.image_loading){case"instant_load":console.log("instant load"),_t.initLoadImages(e),M.fadeInImageOnLoadViaParent(e);break;case"lazy_load":break}switch(frontendPassedData.image_loading){case"instant_load":wt.loadVideosInstantly(e);break;case"lazy_load":wt.initLazyLoadVideosOnScroll(e);break}e.find("iframe[data-src]").each(function(){var t=jQuery(this).attr("data-src");jQuery(this).attr("src",t)}),e.find("[data-embed]").each(function(){var t=jQuery(this).attr("data-embed");jQuery(this).html(t)}),typeof window.layCarousel!="undefined"&&typeof window.layCarousel.loadNotLazyloadingImagesIn!="undefined"&&window.layCarousel.loadNotLazyloadingImagesIn(e),typeof window.layCarouselFadeCarousel!="undefined"&&typeof window.layCarouselFadeCarousel.loadFirstLazyImage!="undefined"&&window.layCarouselFadeCarousel.loadFirstLazyImage(e)},ap=function(){mt.desktopContentLoaded=!1,mt.CplContentLoaded=!1,vt.desktopContentLoaded=!1,vt.CplContentLoaded=!1},ip=Nw;
2395var sp=function(){switch(g.screenSize){case"desktop":case"tablet":if(jQuery(".lay-sitewide-background-video").length>0&&jQuery(".lay-sitewide-background-video").attr("src")==null){var e=jQuery(".lay-sitewide-background-video").attr("data-src");jQuery(".lay-sitewide-background-video").attr("src",e)}jQuery(".lay-sitewide-background-video").length>0&&jQuery(".lay-sitewide-background-video")[0].play();break;case"phone":if(jQuery(".lay-sitewide-background-video-mobile").length>0&&jQuery(".lay-sitewide-background-video-mobile").attr("src")==null){var e=jQuery(".lay-sitewide-background-video-mobile").attr("data-src");jQuery(".lay-sitewide-background-video-mobile").attr("src",e)}jQuery(".lay-sitewide-background-video-mobile").length>0&&jQuery(".lay-sitewide-background-video-mobile")[0].play();break}},Hw=function(){sp(),window.laytheme.on("sizechanged",function(){sp()})},qw={initModule:Hw},lp=qw;function Ww(e){var t=this;this.$container=null,this.$select=e,this.default=this.$select.attr("placeholder");var r=this.$select.attr("name");this.$lay_custom_select_el="",this.init=function(n){t.$container=n;var o=this.$select.find("option:selected");o.val()!=""&&(t.default=o.text()),this.initMarkup(),this.showVariationImage(t.default),setTimeout(function(){t.bindNewSelect()},0)},this.initMarkup=function(){var n='<div class="lay-woocommerce-variations-select" data-lvs-id="'+this.$select.attr("id")+'" data-lvs-name="'+this.$select.attr("name")+'"><div class="lay-woocommerce-variations-select-selected-field" placeholder="'+this.$select.attr("placeholder")+'">'+this.default+'</div><div class="lay-woocommerce-variations-select-selected-list">';this.$select.find("option").each(function(){if(jQuery(this).attr("value")!=""){var i=this.outerHTML.replace("<option ","<div ").replace("</option>","</div>");n+=i}}),n+="</div></div>";var o=jQuery(n),a=t.$container.find('.lay-woocommerce-variations-select[data-lvs-id="'+this.$select.attr("id")+'"]');a.length>0?(a.after(o),a.remove()):t.$container.append(o),t.$lay_custom_select_el=o},this.showVariationImage=function(){jQuery(".lay-duplicate-image").show(),jQuery(".lay-woocommerce-product-variation-slide").hide();var n=null,o="";if(jQuery(".variations select").each(function(){o+="[data-"+jQuery(this).attr("name")+'="'+this.value+'"]'}),n=jQuery(".lay-woocommerce-product-variation-slide"+o),n.length>0){n.show();var a=n.first()[0].getBoundingClientRect(),i=yr(a.width);n.find("img").attr("sizes",i+"px").attr("data-sizes",i+"px"),jQuery('.lay-woocommerce-gallery .swiper-slide img[data-id="'+n.find("img").attr("data-id")+'"]').not(n.find("img")).each(function(){jQuery(this.parentNode).hide().addClass("lay-duplicate-image")}),g.screenSize!="phone"&&!jQuery(".lay-woocommerce-single-product-wrap").hasClass("carousel")&&(console.log("scroll to!"),a.bottom<400&&jQuery("html").animate({scrollTop:n.first().offset().top},300,"easeInOutQuad",function(){})),window.laytheme.trigger("variation_image_updated")}},this.bindNewSelect=function(){this.$lay_custom_select_el.find(".lay-woocommerce-variations-select-selected-field").on("click",function(){t.$lay_custom_select_el.toggleClass("lay-dropdown-active"),jQuery(".lay-woocommerce-variations-select").not(t.$lay_custom_select_el).removeClass("lay-dropdown-active"),t.$lay_custom_select_el.hasClass("lay-dropdown-active")}),this.$lay_custom_select_el.find(".lay-woocommerce-variations-select-selected-list>div").on("click",function(){var n=jQuery(this).attr("value"),o=jQuery(this).text();t.$lay_custom_select_el.find(".lay-woocommerce-variations-select-selected-field").text(o),t.$select.find("option").removeAttr("selected"),t.$select.find('option[value="'+n+'"]')[0].selected="selected",t.$select.trigger("change"),t.$lay_custom_select_el.removeClass("lay-dropdown-active"),jQuery(".woocommerce-variation-add-to-cart .button").removeClass("added"),t.showVariationImage(n),window.laytheme.trigger("variation_selected",t.$select)})},this.getCustomSelectEl=function(){return this.$lay_custom_select_el}}var Gw=function(){jQuery(document).on("click",function(e){jQuery(e.target).closest(".lay-woocommerce-variations-select").length==0&&jQuery(".lay-woocommerce-variations-select").removeClass("lay-dropdown-active")})},up=function(){Gw();var e=[];window.laytheme.on("newpageshown",function(){setTimeout(function(){jQuery(".variations_form").length>0&&jQuery(".variations select").each(function(){var t=new Ww(jQuery(this)),r=jQuery(".lay-variable-products-select-container");t.init(r),e.push(t)})},100),window.laytheme.off("variation_selected"),window.laytheme.on("variation_selected",function(t){if(jQuery(".variations select").length>1)for(var r=jQuery(".lay-variable-products-select-container"),n=0;n<e.length;n++)t.is(e[n].$select)||e[n].init(r)})})};var dp,et=0,cp=et,gr=!1,hl=0,xa=!1,hp=function(){gr=jQuery("body").hasClass("lay-woocommerce-show-store-notice")},Xw=function(){gr&&(jQuery(".sitetitle.position-top, .laynav.position-top, .navbar.position-top").css("margin-top",et+"px"),!jQuery("body").hasClass("woocommerce-page")&&frontendPassedData.lay_sticky_footer=="on"&&jQuery(".lay-content").css("min-height","calc( 100vh - "+et+"px )"),jQuery(".fp-slidesNav.bottom").css("transform","translate(-50%, -"+et+"px)")),jQuery("body").css("padding-top","")},$w=function(){gr&&(jQuery("body").css("padding-top",hl+et+"px"),jQuery(".navbar, .mobile-title, .lay-mobile-icons-wrap, .mobile-nav.mobile-menu-style-style_desktop_menu").css("margin-top",et+"px"),jQuery(".fp-slidesNav.bottom").css("transform","translate(-50%, -"+et+"px)"))},Yw=function(){jQuery(".sitetitle.position-top, .laynav.position-top, .navbar").css("margin-top",""),jQuery(".navbar, .mobile-title, .lay-mobile-icons-wrap, .mobile-nav.mobile-menu-style-style_desktop_menu").css("margin-top",""),jQuery(".fp-slidesNav.bottom").css("transform",""),jQuery("body").css("padding-top",""),jQuery(".lay-content").css("min-height",""),xa=!1}
2395,fl=function(e){switch(e){case"desktop":case"tablet":Xw();break;case"phone":$w();break}},Kw=function(){var e=Backbone.Radio.channel("events"),t=!1;window.laytheme.on("newpageshown",function(){t=!1}),e.on("scroll",function(){if(gr){var r=window.pageYOffset||document.documentElement.scrollTop;r>=et&&t==!1?(t=!0,jQuery("body").addClass("lay-woocommerce-store-notice-scrolled-down")):r<et&&t==!0&&(t=!1,jQuery("body").removeClass("lay-woocommerce-store-notice-scrolled-down"))}})},Jw=function(){jQuery(".woocommerce-store-notice__dismiss-link").on("click",function(){Yw(),jQuery("body").removeClass("lay-woocommerce-show-store-notice").addClass("lay-woocommerce-hide-store-notice"),hp(),jQuery("body").removeClass("lay-woocommerce-store-notice-scrolled-down")})},dl=function(){et=dp.outerHeight()},fp=function(){switch(g.screenSize){case"phone":xa==!1&&(hl=parseInt(jQuery("body").css("padding-top"),10),xa=!0);break;case"tablet":case"desktop":hl=0,xa=!1;break}},pp=function(){Jw(),dp=jQuery(".woocommerce-store-notice.demo_store"),hp(),gr&&(fp(),dl(),fl(g.screenSize),jQuery(window).on("fpAfterRender",function(){jQuery(".fp-slidesNav.bottom").css("transform","translate(-50%, -"+et+"px)")})),Kw(),window.laytheme.on("sizechanged",function(e){gr&&(fp(),dl(),fl(e))}),jQuery(window).on("window_width_changed",function(){gr&&(cp=et,dl(),et!=cp&&fl(g.screenSize))})};var Zw=function(){frontendPassedData.image_loading=="instant_load"?jQuery(".xoo-wsc-container .xoo-wsc-img-col img").each(function(){this.classList.contains("loaded")||_t.loadImage(jQuery(this))}):window.lazyLoadInstance&&window.lazyLoadInstance.update&&window.lazyLoadInstance.update()},e1=function(){jQuery(document.body).on("updated_cart_totals",function(){frontendPassedData.image_loading=="instant_load"&&jQuery(".lay-woocommerce-cart-wrap img").each(function(){this.classList.contains("loaded")||(_t.loadImage(jQuery(this)),this.classList.add("loaded"))})})},t1=function(){jQuery(document.body).on("wc_fragments_refreshed",function(){setTimeout(function(){Zw()},0)})},r1=function(){frontendPassedData.sideCartPluginActive==!0&&jQuery(document).on("click",".laycart a, .lay-cart-icon-wrap",function(e){e.preventDefault(),e.stopPropagation(),vp()})},vp=function(){jQuery("body").addClass("xoo-wsc-cart-active"),jQuery(".xoo-wsc-modal").addClass("xoo-wsc-cart-active"),jQuery(document.body).trigger("xoo_wsc_cart_toggled",["show"]),g.isPhoneSize&&bt.hideMobileMenu()},n1=function(){jQuery(".xoo-wsch-close").trigger("click")},o1=function(){if(typeof MutationObserver!="undefined"&&jQuery(".laycart").length>0){var e=jQuery(".desktop-nav .laycart span"),t=jQuery(".lay-cart-icon-wrap"),r=jQuery(".mobile-nav .laycart span"),n=document.getElementsByClassName("xoo-wsc-modal")[0];if(typeof e!="undefined"&&typeof n!="undefined"){var o=new MutationObserver(function(i){var l=jQuery(".xoo-wscb-count").text();(l==""||l==!1||typeof l=="undefined")&&(l=0),l==0?(jQuery(".lay-cart-icon-wrap").addClass("laycarticon-empty").removeClass("laycarticon-not-empty"),jQuery(".laycart").addClass("laycart-empty").removeClass("laycart-not-empty")):(jQuery(".lay-cart-icon-wrap").removeClass("laycarticon-empty").addClass("laycarticon-not-empty"),jQuery(".laycart").removeClass("laycart-empty").addClass("laycart-not-empty"));var c=e.text(),s=c.indexOf("("),u=c.substr(0,s),f=u+="("+l+")";e.text(f),t.text(l)});o.observe(n,{childList:!0});var a=new MutationObserver(function(i){var l=jQuery(".xoo-wscb-count").text();(l==""||l==!1||typeof l=="undefined")&&(l=0);var c=r.text(),s=c.indexOf("("),u=c.substr(0,s),f=u+="("+l+")";r.text(f),t.text(l)});a.observe(n,{childList:!0})}}},Yn,mp=function(){if(jQuery(".lay-woocommerce-single-product-wrap .lay-woocommerce-gallery").length>0&&jQuery(".swiper-slide").length>1)if(g.isPhoneSize||jQuery(".lay-woocommerce-single-product-wrap").hasClass("carousel")){var e=jQuery(".lay-woocommerce-gallery").hasClass("lay-woocommerce-gallery-navigation-enabled");e==!0&&(e={nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}),Yn=new Swiper(".lay-woocommerce-gallery",{containerModifierClass:"lay-woocommerce-gallery-container-",pagination:{el:".swiper-pagination",type:"bullets",clickable:!0},navigation:e,spaceBetween:0,breakpoints:{[parseInt(frontendPassedData.breakpoint,10)]:{spaceBetween:20}}}),window.laytheme.off("variation_image_updated"),window.laytheme.on("variation_image_updated",function(){Yn.update(),Yn.slideTo(0,100)})}else typeof Yn!="undefined"&&(window.laytheme.off("variation_image_updated"),Yn.destroy(!0,!0))},a1=function(){window.laytheme.on("newpageshown",function(){mp()}),window.laytheme.on("sizechanged",function(e){mp()})},i1=function(){jQuery(document).on("click",".js-lay-woocommerce-plus-qty",function(e){var t=jQuery(e.target).closest(".lay-woocommerce-qty-wrap").find("input"),r=parseInt(t.val(),10),n=r,o=parseInt(t.attr("max"),10);r++,r>o&&(r=o),t.val(r),n!=r&&t.trigger("input")}),jQuery(document).on("click",".js-lay-woocommerce-minus-qty",function(e){var t=jQuery(e.target).closest(".lay-woocommerce-qty-wrap").find("input"),r=parseInt(t.val(),10),n=r;r--,r<1&&(r=1),t.val(r),n!=r&&t.trigger("input")})},s1=function(){jQuery(document).on(".cart_item input.input-text.qty:not
2395(#coupon_code)","input",function(){var e=jQuery(this).closest(".cart_item");e.find(".lay-woocommerce-update-cart-button").removeClass("lay-woocommerce-button-disabled")})},l1=function(){jQuery(document).on("click",".lay-woocommerce-tab-title",function(e){this.classList.contains("active")?(jQuery(this).removeClass("active"),jQuery(this).next().removeClass("active")):(jQuery(".lay-woocommerce-tab-title.active").removeClass("active"),this.classList.add("active"),jQuery(".lay-woocommerce-tab-content.active").removeClass("active"),jQuery(this).next().addClass("active"))})},u1=function(){window.laytheme.on("customizer_show_sidecart",function(){vp()}),window.laytheme.on("customizer_hide_sidecart",function(){n1()})},c1=function(){jQuery(function(e){e.scroll_to_notices=function(t){t.length}})},gp=function(){var e=jQuery(".lay-woocommerce-related-products-scroller");e.length>0&&e.each(function(){var t=0;jQuery(this).find("li").each(function(){var r=window.getComputedStyle(this);t+=parseInt(this.getBoundingClientRect().width,10)+parseInt(r.marginRight,10)}),jQuery(this).find("ul").css("width",t+5)})},f1=function(){var e=jQuery(".lay-woocommerce-related-products-scroller");e.length>0&&e.find("ul").css("width","")},d1=function(){jQuery(window).on("window_width_changed",function(){g.screenSize=="phone"?gp():f1()})},h1=function(){jQuery(document).on("input","#coupon_code",function(){jQuery(this).val()!=""?jQuery('.button[name="apply_coupon"]').removeClass("disabled"):jQuery('.button[name="apply_coupon"]').addClass("disabled")})},p1=function(){jQuery("textarea").attr("spellcheck","false"),jQuery("#coupon_code").attr("autocomplete","off")},yp=function(){jQuery(".checkout.woocommerce-checkout input.input-text").each(function(){var e=jQuery(this).val(),t=jQuery(this).closest(".form-row");e!=""&&t.addClass("lay-minimize-label"),t.addClass("lay-show-label")})},m1=function(){jQuery(document).on("focusin",".checkout.woocommerce-checkout input.input-text",function(){var e=jQuery(this).closest(".form-row");e.addClass("lay-label-transition"),setTimeout(function(){e.addClass("lay-minimize-label")},0)}),jQuery(document).on("focusout",".checkout.woocommerce-checkout input.input-text",function(){var e=jQuery(this).closest(".form-row"),t=jQuery(this).val();t==""&&(e.addClass("lay-label-transition"),setTimeout(function(){e.removeClass("lay-minimize-label")},0))})},v1=function(){jQuery(".checkout.woocommerce-checkout select").each(function(){jQuery(this).selectize({create:!1,sortField:"text"})});var e=0,t=0,r=!0;jQuery(document.body).on("country_to_state_changed",function(n,o,a){if(typeof a!="undefined"){a.find(".form-row").removeClass("last-child");var i=a.find(".form-row:last-child").prev(),l=a.find(".form-row:last-child");l.is(":visible")||i.addClass("last-child")}if(o==""&&typeof a!="undefined"){var c="";jQuery(a).find("input#billing_state").length>0?(c=jQuery(a).find("input#billing_state").closest(".form-row").find("label").text(),jQuery(a).find("input#billing_state").attr("placeholder",c)):jQuery(a).find("input#shipping_state").length>0&&(c=jQuery(a).find("input#shipping_state").closest(".form-row").find("label").text(),jQuery(a).find("input#shipping_state").attr("placeholder",c));return}if(typeof a!="undefined"){var s=a.find("select.state_select")[0];if(typeof s=="undefined")return;if(e=jQuery(s).find("option").length,typeof s.selectize!="undefined"&&e!=t&&r==!1&&e!=1){if(jQuery(s).find("option").length>0){var u=s.selectize;jQuery(s).find("option").each(function(){var f=jQuery(this).attr("value"),d=jQuery(this).text();u.addOption({value:f,text:d})}),u.refreshOptions(),setTimeout(function(){u.settings.placeholder=jQuery(s).closest(".form-row").find("label").text(),u.updatePlaceholder()},0)}}else jQuery(s).selectize({create:!1,sortField:"text"});setTimeout(function(){var f=a.find("select.state_select")[0];if(typeof f!="undefined"){var d=f.selectize;d.settings.placeholder=jQuery(f).closest(".form-row").find("label").text(),d.updatePlaceholder()}},0),setTimeout(function(){jQuery(".selectize-control").addClass("select2-container"),yp()},0),t=e,r=!1}})},g1=function(){jQuery("body").on("keydown input","textarea#order_comments",function(){this.style.removeProperty("height"),this.style.height=this.scrollHeight+2+"px"}).on("mousedown","textarea#order_comments",function(){this.style.removeProperty("height"),this.style.height=this.scrollHeight+2+"px"})},y1=function(){jQuery("form.checkout_coupon").appendTo("#lay-coupon-target")},_1=function(){jQuery(".woocommerce-notices-wrapper").on("click",function(){jQuery(this).fadeOut()})},w1=function(){jQuery(document.body).on("updated_cart_totals",function(){})},b1=function(){yp(),m1(),v1(),c1(),a1(),r1(),e1(),o1(),u1(),i1(),s1(),l1(),t1(),d1(),h1(),p1(),y1(),g1(),frontendPassedData.sideCartPluginActive||w1(),g.screenSize=="phone"&&(gp(),_1())},x1={initModule:function(){b1(),up(),pp()}},_p=x1;var T1={initModule:function(){return A1()}},E1=function(){var e=!1;jQuery(".laynav.mobile-nav").hasClass("mobile-menu-style-style_desktop_menu")&&(e=!0),jQuery(".laynav.mobile-nav .menu-item-has-children>a").on("click",function(t){t.preventDefault(),t.stopPropagation(),e&&jQuery(".show-submenu-mobile").not(jQuery(this).closest(".menu-item-has-children")).removeClass("show-submenu-mobile"),jQuery(this).closest(".menu-item-has-children").toggleClass("show-submenu-mobile"),e&&jQuery(this).closest(".menu-item-has-children").hasClass("show-submenu-mobile")&&jQuery(window).one("click",function(){jQuery(".show-submenu-mobile").removeClass("show-submenu-mobile")})}),(g.isTouchDevice||frontendPassedData.menu_submenu_show_on=="click")&&jQuery(".laynav.desktop-nav .menu-item-has-children>a").on("click",function(t){t.preventDefault(),t.stopPropagation();var r=jQuery(this).closest(".menu-item-has-children");jQuery(".show-submenu-desktop").not(r).removeClass("show-submenu-desktop"),r.toggleClass("show-submenu-desktop"),r.hasClass("show-submenu-desktop")&&wp()})},wp=function(){jQuery(window).one("click",function(e){frontendPassedData.menu_submenu_keep_open==!0&&jQuery(e.target).closest(".show-submenu-desktop").length==1?wp():jQuery(".show-submenu-desktop").removeClass("show-submenu-desktop")})},A1=function(){E1()},bp=T1;var xp=void 0,I1=function(){window.laytheme.on("content_ready",function(e){x
2395p=Me(e);var t=xp.find(".thumbs-collection-region");t.length>0&&Tp()})},Tp=function(){switch(g.screenSize){case"desktop":case"tablet":jQuery(".one-col-row .lay-thumbnailgrid-filter-wrap").each(function(){var e=jQuery(this).find(".lay-thumbnailgrid-tagfilter");e.length>0&&e.hasClass("mobile-one-line")&&e.css({width:"",paddingLeft:"",paddingRight:"",transform:""});var t=jQuery(this).find(".lay-thumbnailgrid-filter");t.length>0&&t.hasClass("mobile-one-line")&&t.css({width:"",paddingLeft:"",paddingRight:"",transform:""})});break;case"phone":jQuery(".one-col-row .lay-thumbnailgrid-filter-wrap").each(function(){var e=jQuery(this).find(".lay-thumbnailgrid-tagfilter"),t=0;if(e.length>0&&e.hasClass("mobile-one-line")){var r=e[0].getBoundingClientRect().left,n=e.find(".tag-bubble").first();if(n.length>0){var o=n[0].currentStyle||window.getComputedStyle(n[0]),a=o.marginRight;a=parseInt(a,10);var i=jQuery(this).closest(".row"),l=i[0].currentStyle||window.getComputedStyle(i[0]);e.css({width:window.innerWidth+"px",paddingLeft:l.paddingRight,paddingRight:l.paddingRight}),r!=0&&e.css({transform:"translateX( -"+r+"px )"})}}var c=jQuery(this).find(".lay-thumbnailgrid-filter");if(c.length>0&&c.hasClass("mobile-one-line")){var s=jQuery(this).closest(".col")[0].getBoundingClientRect().left,r=c[0].getBoundingClientRect().left;c.css({width:window.innerWidth+"px",paddingLeft:s+"px",paddingRight:s+"px"}),r!=0&&c.css({transform:"translateX( -"+r+"px )"})}});break}},C1=function(){I1(),jQuery(window).on("window_width_changed",function(){Tp()})},S1={initModule:C1},Ep=S1;var Ip=$t(Ap()),at,M1=function(e,t,r){for(var n=e.split(" "),o=[],a=0;a<n.length;a++){var i=n[a];if(i.indexOf("vh")!==-1||i.indexOf("lvh")!==-1||i.indexOf("svh")!==-1){i=i.replace("vh",""),i=i.replace("svh",""),i=i.replace("lvh","");var l=parseFloat(i);l=t/100*l,o.push(l)}else if(i.indexOf("vw")!==-1){i=i.replace("vw","");let u=parseFloat(i);u=r/100*u,o.push(u)}else if(i.indexOf("px")!==-1){i=i.replace("px","");var l=parseFloat(i);o.push(l)}else o.push(i)}var c=o.join(""),s=Math.round(Cp(c));return s},P1=(0,Ip.default)(M1),vl=function(){if(typeof at!="undefined"&&at.length>0){var e,t,r,n;r=document.styleSheets;var o=!1;for(e=0;e<r.length;e++)t=r[e],t.ownerNode!=null&&t.ownerNode.id=="frontend-style-css"&&(o=t);t.crossOrigin="anonymous";try{var a=[];if(o!=!1){for(var e=0;e<o.cssRules.length;e++){var i=o.cssRules[e];typeof i.selectorText!="undefined"&&i.selectorText.indexOf("_100vh")!=-1&&a.push(i)}at.each(function(){var l="";if(this.classList.contains("_100vh")){var c=this;for(e=0;e<a.length;e++){var s=a[e];c.matches(s.selectorText)&&(l=s.style.minHeight)}jQuery(this).attr("data-original-100vh-height",l)}else if(this.classList.contains("rowcustomheight")){var c=this,u=jQuery(c).clone();for(u[0].classList.add("_100vh"),e=0;e<a.length;e++){var s=a[e];u[0].matches(s.selectorText)&&(l=s.style.minHeight)}jQuery(this).attr("data-original-100vh-height",l);var f=jQuery(this).find(".row-inner.rowcustomheight"),d=f.attr("style");if(typeof d!="undefined"&&d.indexOf("min-height:calc(")!==-1){var p=d.replace("min-height:calc(","");p=p.replace(");",""),jQuery(this).attr("data-original-rowcustomheight",p)}}})}}catch(l){console.error(l)}}};function Cp(e){return Function(`"use strict";return (${e})`)()}var Sp=function(e){if(typeof at!="undefined"&&at.length>0){var t=jQuery(e).attr("data-original-100vh-height");if(typeof t!="undefined"){if(t=="100vh"||t=="100lvh")return window.innerHeight;if(t.indexOf("calc(")!=-1){var r=t.indexOf("calc("),n=t.indexOf(")"),o=t.substring(r+5,n);o=o.replace("100vh","window.innerHeight"),o=o.replace("100svh","window.innerHeight"),o=o.replace("100lvh","window.innerHeight"),o=o.replace("100vw","window.innerWidth"),o=o.replace("px","");var a=Cp(o);return a}}return window.innerHeight}},Kn=function(){R1(),D1()},R1=function(){typeof at!="undefined"&&at.length>0&&at.each(function(){if(jQuery(this).attr("data-collapsed")=="false"){if(this.classList.contains("_100vh"))j1(this);else if(this.classList.contains("rowcustomheight")){var e=k1(this);jQuery(this).css("min-height",e),jQuery(this).find(".rowcustomheight").css("min-height",e)}}})},j1=function(e){if(!jQuery("html").hasClass("fp-enabled")){var t=Sp(e),r=-1;jQuery(e).find(".col.absolute-position").each(function(){var n=this.getBoundingClientRect();n.height>r&&(r=n.height)}),r!==-1&&t<r?(jQuery(e).css("min-height",r),jQuery(e).find("._100vh").css("min-height",r)):(jQuery(e).css("min-height",""),jQuery(e).find("._100vh").css("min-height",""))}},k1=function(e){var t=Sp(e),r=jQuery(e).attr("data-original-rowcustomheight"),n=P1(r,t,window.innerWidth),o=-1;return jQuery(e).find(".col.absolute-position").each(function(){var a=this.getBoundingClientRect();a.height>o&&(o=a.height)}),o!==-1&&n<o?o:r},D1=function(){if(typeof at!="undefined"&&at.length>0){var e=!0,t=jQuery("#custom-phone-grid").length!=0;g.isPhoneSize&&!t&&(e=!1)}},O1=function(){window.laytheme.on("content_ready",function(e){at=void 0;var t;t=Me(e),at=t.find(".row"),vl(),Kn(),setTimeout(function(){Kn()},1e3)})},L1=function(){g.isTouchDevice===!0?(window.laytheme.on("sizechanged",function(){vl()}),jQuery(window).on("window_width_changed orientationchange",function(){})):(window.laytheme.on("sizechanged",function(){vl()}),jQuery(window).on("resize",Kn)),O1()},F1={initModule:L1,doPositioning:Kn},Ta=F1;var N1=function(){if(frontendPassedData.shownag=="show"){var e=Date.now();jQuery("body").prepend('<a class="_ts_'+e+'" href="https://laytheme.com" target="_blank">Created with Laytheme.com</a><style>@keyframes fadeIn {0% { opacity: 0; }100% { opacity: 1; }}._ts_'+e+"{color:black;text-decoration:none;border-bottom:none;letter-spacing:0.01em;animation: fadeIn 0.2s;animation-fill-mode: forwards;background:white;position:fixed;bottom:10px;right:10px;color:black;z-index:99999999999999999999999999;font-size:12px;line-height:25px;height:25px;padding-left:10px;padding-right:10px;border:1px solid rgb(230,230,230);border-radius:20px;font-family: Helvetica, sans-serif;transition: opacity 200ms ease;}</style>")}},Q1={initModule:function(){N1()}},Mp=Q1;var Jn=void 0,B1=function(){q1()},z1=function(){},gl=function(e){var t=[];if(e.indexOf(",")===-1)t.push(e);else if(e.indexOf(",")!==-1){let n=e.split(",");for(var r=0;r<n.length;r++)t.push(n[r])}else t.push(e);return t},Pp=function(e){var t=e.attr("data-replacementtext");if(t!=""&&t!=null){var r=_.escape(e.html());e.html(_.unescape(t)),e.attr("data-replacementtext",r),e.toggleClass("lay-text-replaced")}},Rp=function(e){e.toggleClass("expand-link-clicked")}
2395,U1=function(){Jn.find("a[data-expand]").off("click"),Jn.find("a[data-expand]").on("click",function(e){e.stopPropagation(),e.preventDefault();var t=jQuery(this),r=t.attr("data-expand"),n=t.attr("data-animationtiming");n.slice(-1)==";"&&(n=n.substring(0,n.length-1));var o=t.attr("data-animation"),a=gl(r),i=t.attr("data-collapseotherrows"),l=t.attr("data-scrolltoexpandedrow");Pp(t),Rp(t);for(var c=null,s=0;s<a.length;s++){var u=jQuery(this).closest(".grid").find(".row-id-"+a[s]);if(u.length>0){var f=u[0].getAttribute("data-collapsed")==="true";f?(H1(u[0],n,o),u[0].setAttribute("data-collapsed","false"),c=u):jp(u[0],n,o)}}if(l=="true"&&c!=null&&c.length>0&&setTimeout(function(){var w=c.offset().top;w=Mo.addSpaceTop(w),t.closest(".lay-overlay").length>0?t.closest(".lay-content").animate({scrollTop:w},300,"easeInOutQuad",function(){var y=c.attr("id");typeof y!="undefined"&&y!=""&&y!=!1&&(window.location.hash=y)}):jQuery("html").animate({scrollTop:w},300,"easeInOutQuad",function(){var y=c.attr("id");typeof y!="undefined"&&y!=""&&y!=!1&&(window.location.hash=y)})},o),i=="true")for(var d=V1(),p=0;p<d.length;p++){var m=d[p];if(a.indexOf(m)==-1){var u=jQuery(this).closest(".grid").find('.row[data-collapsed="false"].row-id-'+m);u.length>0&&(jp(u[0],n,o),jQuery(this).closest(".grid").find('a[href="#expandrow"].lay-text-replaced').each(function(){var y=jQuery(this),I=y.attr("data-expand"),j=gl(I);j.indexOf(m)!=-1&&(Pp(y),Rp(y))}))}}})},V1=function(){var e=[];return Jn.find('a[href="#expandrow"]').each(function(){var t=jQuery(this).attr("data-expand"),r=gl(t);e=_.union(e,r)}),e};function jp(e,t,r){jQuery(e).css({transition:"height "+r+"ms "+t+", min-height "+r+"ms "+t}),e.classList.add("hide-overflow");var n=e.scrollHeight,o=e.style.transition;e.style.transition="",requestAnimationFrame(function(){e.style.height=n+"px",e.style.transition=o,jQuery(e).one("transitionend",function(a){window.laytheme.trigger("lay_row_collapsed")}),requestAnimationFrame(function(){e.style.height="0px",(e.classList.contains("rowcustomheight")||e.classList.contains("_100vh"))&&(e.style.minHeight="0px")})}),e.setAttribute("data-collapsed","true")}function H1(e,t,r){console.log("expandRow"),console.log(e),jQuery(e).css({transition:"height "+r+"ms "+t+", min-height "+r+"ms "+t});var n=e.scrollHeight;e.style.height=n+"px",jQuery(e).one("transitionend",function(o){jQuery(this).attr("data-collapsed")=="false"&&(this.style.height=null,this.classList.remove("hide-overflow"),(e.classList.contains("rowcustomheight")||e.classList.contains("_100vh"))&&Ta.doPositioning()),window.laytheme.trigger("lay_row_expanded")}),e.setAttribute("data-collapsed","false")}var q1=function(){window.laytheme.on("content_ready",function(e){Jn=void 0,Jn=Me(e),z1(),U1()})},W1={initModule:B1},kp=W1;var Dp=function(){var e=function(){jQuery(".sitetitle, nav, .navbar, .mobile-title, .lay-mobile-icons-wrap, #lay_canvas").css("display","")},t=function(){jQuery(".sitetitle, nav, .navbar, .mobile-title, .lay-mobile-icons-wrap, #lay_canvas").css("display","none")},r=function(){document.webkitFullscreenElement==null?e():t()};document.onwebkitfullscreenchange=function(){r()}};var G1=Backbone.Radio.channel("events"),Op=0;G1.on("scroll",function(){window.scrollY>Op?document.body.classList.contains("mobile-menu-open")||document.body.classList.add("lay-hide-phone-menu"):document.body.classList.remove("lay-hide-phone-menu"),Op=window.scrollY});Au();ip.initModule();tp.initModule();np.initModule();frontendPassedData.is_customize!=!0?Bt.init():Bt.cancelLoading();fo.initModule();hu.initModule();Ar.initModule();M.initModule();Ul.initModule();Yt.initModule();Zl.initModule();uu.initModule();pu.initModule();sn.initModule();gu.initModule();bt.initModule();Ou.initModule();Lu.initModule();Ql.initModule();Cr.initModule();sc.initModule();Mo.initModule();of.initModule();uf.initModule();df.initModule();mf.initModule();gf.initModule();Zh.initModule();bo.initModule();lp.initModule();bp.initModule();Ep.initModule();Ta.initModule();Mp.initModule();kp.initModule();Dp();Kt.initModule();Kh.initModule();var Lp=document.body.dataset.type,X1=document.body.dataset.id,$1=document.body.dataset.slug,Y1=document.body.dataset.catid,K1=document.body.dataset.footerid;document.addEventListener("DOMContentLoaded",function(){_p.initModule(
2395),setTimeout(function(){window.laytheme.trigger("newpage"),window.laytheme.trigger("newpageshown",{},Lp,{id:X1,type:Lp,slug:$1,catid:Y1,footerid:K1})},0)});window.lt_load_visible_images_then_rest_controller={};window.lt_load_visible_images_then_rest_controller.load_visible_images_then_rest_controller=_t;window.lt_utility_controller={};window.lt_utility_controller.Utility=g;window.lt_utility_controller.utility_controller=M;window.lt_showhide_onscroll_controller={};window.lt_showhide_onscroll_controller.default=sn;frontendPassedData.youtube=="on"&&(yl=document.createElement("script"),yl.src="https://www.youtube.com/iframe_api",_l=document.getElementsByTagName("script")[0],_l.parentNode.insertBefore(yl,_l));var yl,_l;})(); 2396/*! Bundled license information: 2397 2398repeat-string/index.js: 2399 (*! 2400 * repeat-string <https://github.com/jonschlinkert/repeat-string> 2401 * 2402 * Copyright (c) 2014-2015, Jon Schlinkert. 2403 * Licensed under the MIT License. 2404 *) 2405 2406pad-left/index.js: 2407 (*! 2408 * pad-left <https://github.com/jonschlinkert/pad-left> 2409 * 2410 * Copyright (c) 2014-2015, Jon Schlinkert. 2411 * Licensed under the MIT license. 2412 *) 2413 2414is-buffer/index.js: 2415 (*! 2416 * Determine if an object is a Buffer 2417 * 2418 * @author Feross Aboukhadijeh <https://feross.org> 2419 * @license MIT 2420 *) 2421 2422ieee754/index.js: 2423 (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *) 2424 2425buffer/index.js: 2426 (*! 2427 * The buffer module from node.js, for the browser. 2428 * 2429 * @author Feross Aboukhadijeh <https://feross.org> 2430 * @license MIT 2431 *) 2432*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.