reupload
This commit is contained in:
commit
326c677e8d
2800 files changed
+1489388
No files matched your search
@@ -0,0 +1 @@
|
||||
(()=>{"use strict";var e,t={964:(e,t,n)=>{var o={};function r(e,t){const n=Object.create(null),o=e.split(",");for(let e=0;e<o.length;e++)n[o[e]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}n.r(o),n.d(o,{BaseTransition:()=>xo,Comment:()=>hs,EffectScope:()=>de,Fragment:()=>fs,KeepAlive:()=>Io,ReactiveEffect:()=>Oe,Static:()=>ms,Suspense:()=>no,Teleport:()=>us,Text:()=>ds,Transition:()=>oc,TransitionGroup:()=>xc,VueElement:()=>Yi,assertNumber:()=>cn,callWithAsyncErrorHandling:()=>an,callWithErrorHandling:()=>ln,camelize:()=>ee,capitalize:()=>oe,cloneVNode:()=>Ls,compatUtils:()=>Ri,computed:()=>pi,createApp:()=>el,createBlock:()=>ws,createCommentVNode:()=>Bs,createElementBlock:()=>Es,createElementVNode:()=>As,createHydrationRenderer:()=>ts,createPropsRestProxy:()=>bi,createRenderer:()=>es,createSSRApp:()=>tl,createSlots:()=>pr,createStaticVNode:()=>$s,createTextVNode:()=>Fs,createVNode:()=>Vs,customRef:()=>Qt,defineAsyncComponent:()=>Ro,defineComponent:()=>No,defineCustomElement:()=>Gi,defineEmits:()=>di,defineExpose:()=>hi,defineProps:()=>fi,defineSSRCustomElement:()=>qi,devtools:()=>Nn,effect:()=>Pe,effectScope:()=>he,getCurrentInstance:()=>Js,getCurrentScope:()=>ge,getTransitionRawChildren:()=>Oo,guardReactiveProps:()=>Ms,h:()=>xi,handleError:()=>un,hydrate:()=>Qc,initCustomFormatter:()=>wi,initDirectivesForSSR:()=>rl,inject:()=>ao,isMemoSame:()=>Ti,isProxy:()=>Lt,isReactive:()=>Vt,isReadonly:()=>It,isRef:()=>Ht,isRuntimeOnly:()=>si,isShallow:()=>Mt,isVNode:()=>ks,markRaw:()=>$t,mergeDefaults:()=>_i,mergeProps:()=>Hs,nextTick:()=>bn,normalizeClass:()=>f,normalizeProps:()=>d,normalizeStyle:()=>c,onActivated:()=>Lo,onBeforeMount:()=>Wo,onBeforeUnmount:()=>qo,onBeforeUpdate:()=>Ko,onDeactivated:()=>Fo,onErrorCaptured:()=>Qo,onMounted:()=>zo,onRenderTracked:()=>Xo,onRenderTriggered:()=>Zo,onScopeDispose:()=>ve,onServerPrefetch:()=>Yo,onUnmounted:()=>Jo,onUpdated:()=>Go,openBlock:()=>ys,popScopeId:()=>Kn,provide:()=>lo,proxyRefs:()=>Zt,pushScopeId:()=>zn,queuePostFlushCb:()=>Cn,reactive:()=>Ot,readonly:()=>Pt,ref:()=>Wt,registerRuntimeCompiler:()=>ri,render:()=>Xc,renderList:()=>ur,renderSlot:()=>fr,resolveComponent:()=>rr,resolveDirective:()=>cr,resolveDynamicComponent:()=>ir,resolveFilter:()=>Pi,resolveTransitionHooks:()=>Eo,setBlockTracking:()=>xs,setDevtoolsHook:()=>Vn,setTransitionHooks:()=>To,shallowReactive:()=>Nt,shallowReadonly:()=>Rt,shallowRef:()=>zt,ssrContextKey:()=>Ci,ssrUtils:()=>Ni,stop:()=>Re,toDisplayString:()=>x,toHandlerKey:()=>re,toHandlers:()=>hr,toRaw:()=>Ft,toRef:()=>nn,toRefs:()=>en,transformVNodeArgs:()=>Os,triggerRef:()=>qt,unref:()=>Jt,useAttrs:()=>vi,useCssModule:()=>Zi,useCssVars:()=>Xi,useSSRContext:()=>Ei,useSlots:()=>gi,useTransitionState:()=>bo,vModelCheckbox:()=>Pc,vModelDynamic:()=>Fc,vModelRadio:()=>Ac,vModelSelect:()=>Vc,vModelText:()=>Nc,vShow:()=>zc,version:()=>Oi,warn:()=>sn,watch:()=>mo,watchEffect:()=>uo,watchPostEffect:()=>po,watchSyncEffect:()=>fo,withAsyncContext:()=>Si,withCtx:()=>qn,withDefaults:()=>mi,withDirectives:()=>er,withKeys:()=>Wc,withMemo:()=>ki,withModifiers:()=>jc,withScopeId:()=>Gn});const s={1:"TEXT",2:"CLASS",4:"STYLE",8:"PROPS",16:"FULL_PROPS",32:"HYDRATE_EVENTS",64:"STABLE_FRAGMENT",128:"KEYED_FRAGMENT",256:"UNKEYED_FRAGMENT",512:"NEED_PATCH",1024:"DYNAMIC_SLOTS",2048:"DEV_ROOT_FRAGMENT",[-1]:"HOISTED",[-2]:"BAIL"},i=r("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt");function c(e){if(M(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],r=U(o)?p(o):c(o);if(r)for(const e in r)t[e]=r[e]}return t}return U(e)||H(e)?e:void 0}const l=/;(?![^(]*\))/g,a=/:([^]+)/,u=/\/\*.*?\*\//gs;function p(e){const t={};return e.replace(u,"").split(l).forEach((e=>{if(e){const n=e.split(a);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function f(e){let t="";if(U(e))t=e;else if(M(e))for(let n=0;n<e.length;n++){const o=f(e[n]);o&&(t+=o+" ")}else if(H(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function d(e){if(!e)return null;let{class:t,style:n}=e;return t&&!U(t)&&(e.class=f(t)),n&&(e.style=c(n)),e}const h=r("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"),m=r("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,fLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
||||
@@ -0,0 +1,2 @@
|
||||
/*! For license information please see cart-page-container.js.LICENSE.txt */
|
||||
(()=>{"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(){e=function(){return r};var r={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof d?e:d,a=Object.create(o.prototype),c=new O(n||[]);return i(a,"_invoke",{value:L(t,r,c)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=h;var f={};function d(){}function y(){}function v(){}var m={};l(m,c,(function(){return this}));var g=Object.getPrototypeOf,w=g&&g(g(k([])));w&&w!==n&&o.call(w,c)&&(m=w);var b=v.prototype=d.prototype=Object.create(m);function x(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function S(e,r){function n(i,a,c,u){var s=p(e[i],e,a);if("throw"!==s.type){var l=s.arg,h=l.value;return h&&"object"==t(h)&&o.call(h,"__await")?r.resolve(h.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):r.resolve(h).then((function(t){l.value=t,c(l)}),(function(t){return n("throw",t,c,u)}))}u(s.arg)}var a;i(this,"_invoke",{value:function(t,e){function o(){return new r((function(r,o){n(t,e,r,o)}))}return a=a?a.then(o,o):o()}})}function L(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return j()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var c=P(a,r);if(c){if(c===f)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=p(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function P(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,P(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;var o=p(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,f;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function k(t){if(t){var e=t[c];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:j}}function j(){return{value:void 0,done:!0}}return y.prototype=v,i(b,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:y,configurable:!0}),y.displayName=l(v,s,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,l(t,s,"GeneratorFunction")),t.prototype=Object.create(b),t},r.awrap=function(t){return{__await:t}},x(S.prototype),l(S.prototype,u,(function(){return this})),r.AsyncIterator=S,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new S(h(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(b),l(b,s,"Generator"),l(b,c,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},r.values=k,O.prototype={constructor:O,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
||||
@@ -0,0 +1,2 @@
|
||||
/*! For license information please see cart-sidebar.js.LICENSE.txt */
|
||||
(()=>{"use strict";function t(r){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(r)}function r(){r=function(){return e};var e={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,r,e){t[r]=e.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",f=a.toStringTag||"@@toStringTag";function s(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{s({},"")}catch(t){s=function(t,r,e){return t[r]=e}}function l(t,r,e,n){var o=r&&r.prototype instanceof v?r:v,a=Object.create(o.prototype),c=new S(n||[]);return i(a,"_invoke",{value:E(t,e,c)}),a}function h(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var p={};function v(){}function y(){}function d(){}var m={};s(m,c,(function(){return this}));var g=Object.getPrototypeOf,w=g&&g(g(k([])));w&&w!==n&&o.call(w,c)&&(m=w);var b=d.prototype=v.prototype=Object.create(m);function L(t){["next","throw","return"].forEach((function(r){s(t,r,(function(t){return this._invoke(r,t)}))}))}function x(r,e){function n(i,a,c,u){var f=h(r[i],r,a);if("throw"!==f.type){var s=f.arg,l=s.value;return l&&"object"==t(l)&&o.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):e.resolve(l).then((function(t){s.value=t,c(s)}),(function(t){return n("throw",t,c,u)}))}u(f.arg)}var a;i(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return a=a?a.then(o,o):o()}})}function E(t,r,e){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return P()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var c=j(a,e);if(c){if(c===p)continue;return c}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if("suspendedStart"===n)throw n="completed",e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n="executing";var u=h(t,r,e);if("normal"===u.type){if(n=e.done?"completed":"suspendedYield",u.arg===p)continue;return{value:u.arg,done:e.done}}"throw"===u.type&&(n="completed",e.method="throw",e.arg=u.arg)}}}function j(t,r){var e=r.method,n=t.iterator[e];if(void 0===n)return r.delegate=null,"throw"===e&&t.iterator.return&&(r.method="return",r.arg=void 0,j(t,r),"throw"===r.method)||"return"!==e&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+e+"' method")),p;var o=h(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,p;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,p):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)}function O(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function _(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function k(t){if(t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var e=-1,n=function r(){for(;++e<t.length;)if(o.call(t,e))return r.value=t[e],r.done=!1,r;return r.value=void 0,r.done=!0,r};return n.next=n}}return{next:P}}function P(){return{value:void 0,done:!0}}return y.prototype=d,i(b,"constructor",{value:d,configurable:!0}),i(d,"constructor",{value:y,configurable:!0}),y.displayName=s(d,f,"GeneratorFunction"),e.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===y||"GeneratorFunction"===(r.displayName||r.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,f,"GeneratorFunction")),t.prototype=Object.create(b),t},e.awrap=function(t){return{__await:t}},L(x.prototype),s(x.prototype,u,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(b),s(b,f,"Generator"),s(b,c,(function(){return this})),s(b,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var r=Object(t),e=[];for(var n in r)e.push(n);return e.reverse(),function t(){for(;e.length;){var n=e.pop();if(n in r)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=k,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!t)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=void 0)},stop:function(){this.done=!0;var t=this.tLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
||||
@@ -0,0 +1,3 @@
|
||||
$(function () {
|
||||
|
||||
})();
|
||||
@@ -0,0 +1,362 @@
|
||||
const Toast = Swal.mixin({
|
||||
toast: true,
|
||||
position: 'top-end',
|
||||
showConfirmButton: false,
|
||||
timer: 3000,
|
||||
timerProgressBar: true,
|
||||
didOpen: (toast) => {
|
||||
toast.addEventListener('mouseenter', Swal.stopTimer)
|
||||
toast.addEventListener('mouseleave', Swal.resumeTimer)
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function(e) {
|
||||
Event.listen('cartsUpdatedFromSidebar', event => {
|
||||
showProductShowButton();
|
||||
})
|
||||
|
||||
let pageURL = new URL(location);
|
||||
if (pageURL.searchParams.has('sorting')) {
|
||||
document.getElementById('SortBy').value = pageURL.searchParams.get('sorting');
|
||||
}
|
||||
|
||||
let productPerPageSelect = document.getElementById('show-product-count-select');
|
||||
|
||||
if (pageURL.searchParams.has('perPage')) {
|
||||
productPerPageSelect.value = pageURL.searchParams.get('perPage');
|
||||
} else {
|
||||
if (productPerPageSelect) {
|
||||
productPerPageSelect.value = 32;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function subscribeUserToNewsletter(event) {
|
||||
event.preventDefault();
|
||||
|
||||
$.ajax({
|
||||
method: event.target.method,
|
||||
url: event.target.action,
|
||||
data: Object.fromEntries(new FormData(event.target).entries()),
|
||||
success: (response) => {
|
||||
Swal.fire('Üstünlikli goşuldy', '', 'success');
|
||||
},
|
||||
error: (exception) => {
|
||||
Swal.fire('Üstünlikli goşuldy', '', 'success') ;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function loginAction(event) {
|
||||
event.preventDefault();
|
||||
|
||||
// let phoneINPUT = document.getElementById('PopupCustomerPhoneContainer');
|
||||
let verificationINPUT = document.getElementById('PopupCustomerVerificationCodeContainer');
|
||||
|
||||
$.ajax({
|
||||
method: event.target.method,
|
||||
url: window.Lara.routes.auth.twoFactor,
|
||||
data: Object.fromEntries(new FormData(event.target).entries()),
|
||||
success(response) {
|
||||
console.log({response});
|
||||
|
||||
if (response.message == 'Login') {
|
||||
window.location.reload(true);
|
||||
}
|
||||
|
||||
if (response.message != 'success') {
|
||||
return;
|
||||
}
|
||||
|
||||
verificationINPUT.classList.remove('d-none');
|
||||
verificationINPUT.setAttribute('required', 'required');
|
||||
},
|
||||
error(exception) {
|
||||
console.log({exception});
|
||||
// Swal.fire('Üstünlikli goşuldy', '', 'success') ;
|
||||
},
|
||||
done(data) {
|
||||
console.log({a: data});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function updateLikeCount() {
|
||||
let wishlistCount = document.getElementById('wishlist-count');
|
||||
// let sidebarWishlistCount = document.getElementById('sidebar-wishlist-count');
|
||||
|
||||
$.ajax({
|
||||
method: 'POST',
|
||||
url: window.Lara.routes.products.likeCount,
|
||||
data: {_token: document.querySelector('meta[name=csrf-token]').getAttribute('value')},
|
||||
success: (response) => {
|
||||
wishlistCount.innerText = response.count;
|
||||
},
|
||||
error: (exception) => {
|
||||
console.log({exception});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function toggleProductLike(event, elem, id) {
|
||||
event.preventDefault();
|
||||
|
||||
if (! window.Lara.auth.status) {
|
||||
return;
|
||||
}
|
||||
|
||||
let formData = {
|
||||
id: id,
|
||||
_token: document.querySelector('meta[name=csrf-token]').getAttribute('value'),
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
method: 'POST',
|
||||
url: window.Lara.routes.products.like,
|
||||
data: formData,
|
||||
success: (response) => {
|
||||
if (response.attached) {
|
||||
document.getElementById(id + '-favourite-icon-dislike')?.classList.add('d-none');
|
||||
document.getElementById(id + '-favourite-icon-like')?.classList.remove('d-none');
|
||||
|
||||
Toast.fire({
|
||||
icon: 'success',
|
||||
title: window.Lara.translations.favouries.liked
|
||||
})
|
||||
} else {
|
||||
document.getElementById(id + '-favourite-icon-dislike')?.classList.remove('d-none');
|
||||
document.getElementById(id + '-favourite-icon-like')?.classList.add('d-none');
|
||||
|
||||
Toast.fire({
|
||||
icon: 'info',
|
||||
title: window.Lara.translations.favouries.unliked
|
||||
})
|
||||
}
|
||||
|
||||
Event.fire('likesUpdated');
|
||||
},
|
||||
error: (exception) => {
|
||||
console.log({exception});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function toggleLikeProductShowButton(event, product_id) {
|
||||
let addToLikeButtonMessage = document.getElementById('add-to-like-button-message');
|
||||
let addedToLikeButtonMessage = document.getElementById('added-to-like-button-message');
|
||||
|
||||
toggleProductLike(event, event.target, product_id);
|
||||
|
||||
if (addToLikeButtonMessage.classList.contains('d-none')) {
|
||||
addToLikeButtonMessage.classList.remove('d-none');
|
||||
addToLikeButtonMessage.classList.add('d-flex');
|
||||
addedToLikeButtonMessage.classList.remove('d-flex');
|
||||
addedToLikeButtonMessage.classList.add('d-none');
|
||||
} else {
|
||||
addToLikeButtonMessage.classList.add('d-none');
|
||||
addToLikeButtonMessage.classList.remove('d-flex');
|
||||
addedToLikeButtonMessage.classList.add('d-flex');
|
||||
addedToLikeButtonMessage.classList.remove('d-none');
|
||||
}
|
||||
}
|
||||
|
||||
function addToCart(product_id, with_count) {
|
||||
if (! window.Lara.auth.status) {
|
||||
return;
|
||||
}
|
||||
|
||||
let quantity = with_count ? document.getElementById('product-quantity')?.value : null;
|
||||
|
||||
product_id = window.Lara.productOnCart ? window.Lara.productOnCart : product_id;
|
||||
|
||||
let formData = {
|
||||
product_id: product_id,
|
||||
_token: document.querySelector('meta[name=csrf-token]').getAttribute('value'),
|
||||
quantity: quantity
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
method: 'POST',
|
||||
url: window.Lara.routes.carts.add,
|
||||
data: formData,
|
||||
success: (response) => {
|
||||
Event.fire('cartsUpdated');
|
||||
},
|
||||
error: (exception) => {
|
||||
if (exception.status == 422) {
|
||||
if (validationMessage = exception.responseJSON.data.validations['product_out_of_stock_count']) {
|
||||
alert(validationMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function removeCartItem(product_id) {
|
||||
if (! window.Lara.auth.status) {
|
||||
return;
|
||||
}
|
||||
|
||||
let formData = {
|
||||
product_id: product_id,
|
||||
_token: document.querySelector('meta[name=csrf-token]').getAttribute('value'),
|
||||
};
|
||||
|
||||
fetch(window.Lara.routes.carts.remove, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Accept': 'application/json, text/plain, */*',
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
credentials: 'same-origin',
|
||||
body: JSON.stringify(formData)
|
||||
}).then(response => response.json())
|
||||
.then(data => {
|
||||
Event.fire('cartsUpdated');
|
||||
});
|
||||
}
|
||||
|
||||
function updateCart(product_id, increment_by_one) {
|
||||
if (! window.Lara.auth.status) {
|
||||
return;
|
||||
}
|
||||
|
||||
let quantity = new Number(document.getElementById('product-quantity')?.value);
|
||||
|
||||
if (increment_by_one || quantity == 0) {
|
||||
quantity += 1;
|
||||
}
|
||||
|
||||
let formData = {
|
||||
product_id: product_id,
|
||||
_token: document.querySelector('meta[name=csrf-token]').getAttribute('value'),
|
||||
quantity: quantity
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
method: 'POST',
|
||||
url: window.Lara.routes.carts.update,
|
||||
data: formData,
|
||||
success: (response) => {
|
||||
Event.fire('cartsUpdated');
|
||||
},
|
||||
error: (exception) => {
|
||||
console.log({exception});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function updateProductShowButton() {
|
||||
let addToCartMessage = document.getElementById('add-to-cart-button-message');
|
||||
let removeFromCartMessage = document.getElementById('remove-from-cart-button-message');
|
||||
let removeTrashIcon = document.getElementById('remove-from-cart-trash');
|
||||
|
||||
addToCartMessage.classList.remove('d-flex');
|
||||
addToCartMessage.classList.add('d-none');
|
||||
removeFromCartMessage.classList.remove('d-none');
|
||||
removeFromCartMessage.classList.add('d-flex');
|
||||
removeTrashIcon.classList.remove('d-none');
|
||||
}
|
||||
|
||||
function showProductShowButton() {
|
||||
let addToCartMessage = document.getElementById('add-to-cart-button-message');
|
||||
let removeFromCartMessage = document.getElementById('remove-from-cart-button-message');
|
||||
let removeTrashIcon = document.getElementById('remove-from-cart-trash');
|
||||
let productQuantity = document.getElementById('product-quantity');
|
||||
|
||||
addToCartMessage.classList.remove('d-none');
|
||||
addToCartMessage.classList.add('d-flex');
|
||||
removeFromCartMessage.classList.remove('d-flex');
|
||||
removeFromCartMessage.classList.add('d-none');
|
||||
removeTrashIcon.classList.add('d-none');
|
||||
productQuantity.value = 1;
|
||||
}
|
||||
|
||||
function productShowCounterChanged(product_id, event) {
|
||||
let addToCartMessage = document.getElementById('add-to-cart-button-message');
|
||||
|
||||
if (! addToCartMessage.classList.contains('d-flex')) {
|
||||
updateCart(product_id, event.type == 'click');
|
||||
}
|
||||
}
|
||||
|
||||
async function postData(url = '', data = {}) {
|
||||
const response = await fetch(url, {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
cache: 'no-cache',
|
||||
credentials: 'same-origin',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
referrerPolicy: 'no-referrer',
|
||||
body: JSON.stringify(data)
|
||||
});
|
||||
|
||||
return response.json();
|
||||
}
|
||||
|
||||
async function globalSearch(q) {
|
||||
let response = await fetch(window.Lara.routes.app.globalSearch + '?q=' + q);
|
||||
|
||||
return response.json();
|
||||
}
|
||||
|
||||
function addSorting(value) {
|
||||
addUrlParam('sorting', value);
|
||||
}
|
||||
|
||||
function addUrlParam(key, value, update = true) {
|
||||
let pageURL = new URL(location);
|
||||
|
||||
pageURL.searchParams.delete(key)
|
||||
pageURL.searchParams.append(key, value);
|
||||
|
||||
if (update) {
|
||||
location.href = pageURL.href;
|
||||
}
|
||||
}
|
||||
|
||||
function sideScroll(element,direction,speed,distance,step){
|
||||
scrollAmount = 0;
|
||||
var slideTimer = setInterval(function(){
|
||||
if (direction == 'left'){
|
||||
element.scrollLeft -= step;
|
||||
} else {
|
||||
element.scrollLeft += step;
|
||||
}
|
||||
scrollAmount += step;
|
||||
if (scrollAmount >= distance) {
|
||||
window.clearInterval(slideTimer);
|
||||
}
|
||||
}, speed);
|
||||
}
|
||||
|
||||
|
||||
function scrollToClosest(position, elem, selector, points = 1000) {
|
||||
if (position == 'left') {
|
||||
let box = $(elem).parent().find(selector);
|
||||
|
||||
let x = ((box.width() / 2)) + box.scrollLeft();
|
||||
box.animate({
|
||||
scrollLeft: x,
|
||||
});
|
||||
|
||||
// $(elem).parent().find(selector).scrollLeft(-points);
|
||||
} else {
|
||||
// $(elem).parent().find(selector).scrollLeft(+points);
|
||||
}
|
||||
}
|
||||
|
||||
// function orderDeliveryTimeChanged(event) {
|
||||
// let clientTime = document.getElementById('order-client-time-container');
|
||||
|
||||
// if (event.target.value == 'standart') {
|
||||
// clientTime.classList.remove('d-none');
|
||||
// } else {
|
||||
// clientTime.classList.add('d-none');
|
||||
// }
|
||||
// }
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
createApp({data:function(){return{locale:window.Lara.locale,routes:window.Lara.routes,likedProducts:[],wishlist_count:0}},methods:{routeFor:function(t){return this.routes.products.show.replace("slug",t)},imageFor:function(t){return t+" 1x, "+t+" 2x"},getLikedProducts:function(){var t=this;fetch(this.routes.user.likesCount).then((function(t){return t.json()})).then((function(e){t.wishlist_count=e.count,document.getElementById("wishlist-count").innerText=e.count,Array.from(document.getElementsByClassName("favourites-icon-count")).forEach((function(t){t.innerText=e.count}))})),fetch(this.routes.user.likes).then((function(t){return t.json()})).then((function(e){t.likedProducts=e.data}))},clearWishlist:function(){this.likedProducts=[],this.wishlist_count=0,postData(this.routes.likes.clear,{_token:document.querySelector("meta[name=csrf-token]").getAttribute("value")}).then((function(t){return"success"==t.message?location.reload(!0):""}))}},mounted:function(){var t=this;window.Lara.auth.status&&this.getLikedProducts(),Event.listen("likesUpdated",(function(e){t.getLikedProducts()})),Event.listen("clearWishlist",(function(e){t.clearWishlist()}))}}).mount("#likes-sidebar");
|
||||
@@ -0,0 +1 @@
|
||||
createApp({data:function(){return{routes:window.Lara.routes,locale:window.Lara.locale,all_categories:window.Lara.navigation.categories,categories_dropdown_hidden:!0,categories_to_show:new Object,activeLinks:[]}},methods:{hideCategoryDropdown:function(){this.categories_dropdown_hidden=!0},showCategoriesDropdown:function(){this.categories_dropdown_hidden=!1},showCategoriesFor:function(o){var t=this;this.categories_to_show=this.all_categories.find((function(t){return t.id==o})),this.all_categories.forEach((function(o){return t.activeLinks[o.slug]=!1})),this.activeLinks[this.categories_to_show.slug]=!0},categoryShowRouteFor:function(o){return this.routes.categories.products.replace("slug",o)}},mounted:function(){var o=this;this.all_categories.forEach((function(t,e){0==e?(o.categories_to_show=t,o.activeLinks[t.slug]=!0):o.activeLinks[t.slug]=!1})),Event.listen("showCategoriesDropdownEvent",(function(){o.showCategoriesDropdown()}))}}).mount("#categories-navigation");
|
||||
@@ -0,0 +1 @@
|
||||
document.addEventListener("DOMContentLoaded",(function(){var e=document.getElementById("pagination-next"),a=document.querySelector('div[data-widget="carousel-container"]');if(e){var n=!1,t=!1;elementAppeared(e,(function(){if(!n&&!t){n=!0,e.innerText="Ýüklenilýär";var r=new URL(location.href);r.searchParams.set("page",new URL(e.href).searchParams.get("page")),r.searchParams.has("sorting")&&r.searchParams.set("sorting",r.searchParams.get("sorting")),history.pushState({},"",r.href),$.ajax(location.href,{success:function(r){r.pagination.next_page_url||(e.style.display="none",t=!0),e.href=r.pagination.next_page_url,a.insertAdjacentHTML("beforeend",r.products),n=!1,new LazyLoad({elements_selector:".lazyload",threshold:100})}})}}))}}));
|
||||
@@ -0,0 +1,9 @@
|
||||
$(document).ready(function () {
|
||||
$('#PopupCustomerPhone').inputmask("+(\\9\\93)-69-99-99-99");
|
||||
|
||||
$('#ContactFormPhone').inputmask("+(\\9\\93)-69-99-99-99");
|
||||
})
|
||||
|
||||
function maskMe(el) {
|
||||
$(el).inputmask("+(\\9\\93)-69-99-99-99")
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
var Vue=function(e){"use strict";function t(e,t){const n=Object.create(null),o=e.split(",");for(let r=0;r<o.length;r++)n[o[r]]=!0;return t?e=>!!n[e.toLowerCase()]:e=>!!n[e]}const n=t("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt"),o=t("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function r(e){return!!e||""===e}function s(e){if(N(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],r=R(o)?c(o):s(o);if(r)for(const e in r)t[e]=r[e]}return t}return R(e)||P(e)?e:void 0}const i=/;(?![^(]*\))/g,l=/:(.+)/;function c(e){const t={};return e.split(i).forEach((e=>{if(e){const n=e.split(l);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function a(e){let t="";if(R(e))t=e;else if(N(e))for(let n=0;n<e.length;n++){const o=a(e[n]);o&&(t+=o+" ")}else if(P(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const u=t("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"),p=t("svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"),f=t("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr");function d(e,t){if(e===t)return!0;let n=O(e),o=O(t);if(n||o)return!(!n||!o)&&e.getTime()===t.getTime();if(n=A(e),o=A(t),n||o)return e===t;if(n=N(e),o=N(t),n||o)return!(!n||!o)&&function(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=d(e[o],t[o]);return n}(e,t);if(n=P(e),o=P(t),n||o){if(!n||!o)return!1;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e){const o=e.hasOwnProperty(n),r=t.hasOwnProperty(n);if(o&&!r||!o&&r||!d(e[n],t[n]))return!1}}return String(e)===String(t)}function h(e,t){return e.findIndex((e=>d(e,t)))}const m=(e,t)=>t&&t.__v_isRef?m(e,t.value):E(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n])=>(e[`${t} =>`]=n,e)),{})}:$(t)?{[`Set(${t.size})`]:[...t.values()]}:!P(t)||N(t)||B(t)?t:String(t),g={},v=[],y=()=>{},b=()=>!1,_=/^on[^a-z]/,S=e=>_.test(e),x=e=>e.startsWith("onUpdate:"),C=Object.assign,w=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},k=Object.prototype.hasOwnProperty,T=(e,t)=>k.call(e,t),N=Array.isArray,E=e=>"[object Map]"===I(e),$=e=>"[object Set]"===I(e),O=e=>"[object Date]"===I(e),F=e=>"function"==typeof e,R=e=>"string"==typeof e,A=e=>"symbol"==typeof e,P=e=>null!==e&&"object"==typeof e,M=e=>P(e)&&F(e.then)&&F(e.catch),V=Object.prototype.toString,I=e=>V.call(e),B=e=>"[object Object]"===I(e),L=e=>R(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,j=t(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),U=t("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),D=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},H=/-(\w)/g,W=D((e=>e.replace(H,((e,t)=>t?t.toUpperCase():"")))),z=/\B([A-Z])/g,K=D((e=>e.replace(z,"-$1").toLowerCase())),G=D((e=>e.charAt(0).toUpperCase()+e.slice(1))),q=D((e=>e?`on${G(e)}`:"")),J=(e,t)=>!Object.is(e,t),Y=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},Z=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Q=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let X;let ee;class te{constructor(e=!1){this.active=!0,this.effects=[],this.cleanups=[],!e&&ee&&(this.parent=ee,this.index=(ee.scopes||(ee.scopes=[])).push(this)-1)}run(e){if(this.active){const t=ee;try{return ee=this,e()}finally{ee=t}}}on(){ee=this}off(){ee=this.parent}stop(e){if(this.active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(this.parent&&!e){const e=this.parent.scopes.pop();e&&e!==this&&(this.parent.scopes[this.index]=e,e.index=this.index)}this.active=!1}}}funLine truncated
|
||||
@@ -0,0 +1,50 @@
|
||||
theme.ButtonsBlocksVisibility = function() {
|
||||
|
||||
function ButtonsBlocksVisibility() {
|
||||
this.selectors = {
|
||||
buttons: '.js-button-block-visibility'
|
||||
};
|
||||
|
||||
this.load();
|
||||
};
|
||||
|
||||
ButtonsBlocksVisibility.prototype = $.extend({}, ButtonsBlocksVisibility.prototype, {
|
||||
load: function() {
|
||||
$('[data-block-visibility]').each(function () {
|
||||
var $this = $(this),
|
||||
name = $this.attr('data-block-visibility');
|
||||
|
||||
if(window.location.href.indexOf(name) != -1) {
|
||||
$this.removeClass('d-none-important');
|
||||
|
||||
$this.find('[data-block-visibility-focus]').focus();
|
||||
}
|
||||
});
|
||||
|
||||
$body.on('click', this.selectors.buttons, function (e) {
|
||||
var $this = $(this),
|
||||
name = $this.attr('data-block-link'),
|
||||
$block = $('[data-block-visibility="' + name + '"]');
|
||||
|
||||
if($block.length) {
|
||||
var close_popup = $this.attr('data-action-close-popup');
|
||||
|
||||
$block[$this.attr('data-action') === 'close' ? 'addClass' : $this.attr('data-action') === 'open' ? 'removeClass' : 'toggleClass']('d-none-important');
|
||||
|
||||
if(close_popup) theme.Popups.closeByName(close_popup);
|
||||
|
||||
if(!$block.hasClass('d-none-important')) $block.find('[data-block-visibility-focus]').focus();
|
||||
|
||||
e.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
theme.ButtonsBlocksVisibility = new ButtonsBlocksVisibility;
|
||||
};
|
||||
|
||||
$(function() {
|
||||
theme.ButtonsBlocksVisibility();
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.ButtonsBlocksVisibility=function(){function t(){this.selectors={buttons:".js-button-block-visibility"},this.load()}t.prototype=$.extend({},t.prototype,{load:function(){$("[data-block-visibility]").each(function(){var t=$(this),i=t.attr("data-block-visibility");-1!=window.location.href.indexOf(i)&&(t.removeClass("d-none-important"),t.find("[data-block-visibility-focus]").focus())}),$body.on("click",this.selectors.buttons,function(t){var i=$(this),o=i.attr("data-block-link"),s=$('[data-block-visibility="'+o+'"]');if(s.length){var a=i.attr("data-action-close-popup");return s["close"===i.attr("data-action")?"addClass":"open"===i.attr("data-action")?"removeClass":"toggleClass"]("d-none-important"),a&&theme.Popups.closeByName(a),s.hasClass("d-none-important")||s.find("[data-block-visibility-focus]").focus(),t.preventDefault(),!1}})}}),theme.ButtonsBlocksVisibility=new t},$(function(){theme.ButtonsBlocksVisibility()});
|
||||
@@ -0,0 +1,24 @@
|
||||
theme.Collections = function() {
|
||||
|
||||
function Collections() {
|
||||
this.dom = {
|
||||
$collections: $('.js-collections')
|
||||
};
|
||||
|
||||
if(this.dom.$collections.length) {
|
||||
this.load();
|
||||
}
|
||||
};
|
||||
|
||||
Collections.prototype = $.extend({}, Collections.prototype, {
|
||||
load: function () {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
theme.Collections = new Collections;
|
||||
};
|
||||
|
||||
$(function() {
|
||||
theme.Collections();
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.Collections=function(){function o(){this.dom={$collections:$(".js-collections")},this.dom.$collections.length&&this.load()}o.prototype=$.extend({},o.prototype,{load:function(){}}),theme.Collections=new o},$(function(){theme.Collections()});
|
||||
@@ -0,0 +1,28 @@
|
||||
theme.DynamicCheckout = function() {
|
||||
|
||||
function DynamicCheckout() {
|
||||
this.load();
|
||||
};
|
||||
|
||||
DynamicCheckout.prototype = $.extend({}, DynamicCheckout.prototype, {
|
||||
load: function() {
|
||||
function update() {
|
||||
var $this = $(this),
|
||||
$dynamic_checkout = $this.parents('.js-dynamic-checkout'),
|
||||
$button_wrapper = $dynamic_checkout.find('[data-js-dynamic-checkout-button-wrapper]');
|
||||
|
||||
$button_wrapper[$this.is(':checked') ? 'removeClass' : 'addClass']('disabled');
|
||||
};
|
||||
|
||||
$body.on('change', '.js-dynamic-checkout [data-js-dynamic-checkout-confirmation]', update);
|
||||
|
||||
$('.js-dynamic-checkout [data-js-dynamic-checkout-confirmation]').each(update);
|
||||
}
|
||||
});
|
||||
|
||||
theme.DynamicCheckout = new DynamicCheckout;
|
||||
};
|
||||
|
||||
$(function() {
|
||||
theme.DynamicCheckout();
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.DynamicCheckout=function(){function c(){this.load()}c.prototype=$.extend({},c.prototype,{load:function(){function c(){var c=$(this);c.parents(".js-dynamic-checkout").find("[data-js-dynamic-checkout-button-wrapper]")[c.is(":checked")?"removeClass":"addClass"]("disabled")}$body.on("change",".js-dynamic-checkout [data-js-dynamic-checkout-confirmation]",c),$(".js-dynamic-checkout [data-js-dynamic-checkout-confirmation]").each(c)}}),theme.DynamicCheckout=new c},$(function(){theme.DynamicCheckout()});
|
||||
@@ -0,0 +1,55 @@
|
||||
theme.Masonry = function() {
|
||||
|
||||
function Masonry() {
|
||||
jQueryBridget('masonry', window.Masonry, $);
|
||||
|
||||
this.load();
|
||||
};
|
||||
|
||||
Masonry.prototype = $.extend({}, Masonry.prototype, {
|
||||
load: function() {
|
||||
this.init();
|
||||
},
|
||||
init: function (is_first) {
|
||||
var _ = this,
|
||||
$masonry = $('.masonry'),
|
||||
params = {
|
||||
itemSelector: '[class*="col-"]'
|
||||
};
|
||||
|
||||
this.$masonry = $masonry;
|
||||
|
||||
function load() {
|
||||
$masonry.masonry(params).removeClass('invisible');
|
||||
|
||||
setTimeout(function () {
|
||||
_.update();
|
||||
}, 100);
|
||||
};
|
||||
|
||||
if(is_first) {
|
||||
load();
|
||||
} else {
|
||||
$(function () {
|
||||
load();
|
||||
|
||||
$(window).on('load', function () {
|
||||
_.update();
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
update: function () {
|
||||
this.$masonry.masonry('layout');
|
||||
},
|
||||
destroy: function () {
|
||||
this.$masonry.masonry('destroy');
|
||||
}
|
||||
});
|
||||
|
||||
theme.Masonry = new Masonry;
|
||||
};
|
||||
|
||||
$(function() {
|
||||
theme.Masonry();
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.Masonry=function(){function n(){jQueryBridget("masonry",window.Masonry,$),this.load()}n.prototype=$.extend({},n.prototype,{load:function(){this.init()},init:function(n){var o=this,t=$(".masonry"),i={itemSelector:'[class*="col-"]'};function e(){t.masonry(i).removeClass("invisible"),setTimeout(function(){o.update()},100)}this.$masonry=t,n?e():$(function(){e(),$(window).on("load",function(){o.update()})})},update:function(){this.$masonry.masonry("layout")},destroy:function(){this.$masonry.masonry("destroy")}}),theme.Masonry=new n},$(function(){theme.Masonry()});
|
||||
@@ -0,0 +1,301 @@
|
||||
theme.Notifications = function() {
|
||||
|
||||
function Notifications() {
|
||||
this.selectors = {
|
||||
elems: '.js-notification'
|
||||
};
|
||||
|
||||
this.settings = {
|
||||
close_limit: 40,
|
||||
translate_limit: 50,
|
||||
opacity_limit: 0.4
|
||||
};
|
||||
|
||||
this.load();
|
||||
};
|
||||
|
||||
Notifications.prototype = $.extend({}, Notifications.prototype, {
|
||||
load: function() {
|
||||
var _ = this,
|
||||
dif;
|
||||
|
||||
$body.on('mousedown', this.selectors.elems, function(e) {
|
||||
if(e.target.tagName === 'A' || $(e.target).parents('[data-js-action]').length) {
|
||||
return;
|
||||
}
|
||||
|
||||
_.is_holded = true;
|
||||
|
||||
var $this = $(this),
|
||||
start_posX = e.screenX;
|
||||
|
||||
dif = 0;
|
||||
|
||||
$this.addClass('animate');
|
||||
setTimeout(function () {
|
||||
$this.addClass('pressed');
|
||||
}, 0);
|
||||
|
||||
$body.on('mousemove.notification', function(e) {
|
||||
var posX = e.screenX,
|
||||
set_posX = Math.min(start_posX + _.settings.translate_limit, Math.max(start_posX - _.settings.translate_limit, posX));
|
||||
|
||||
dif = set_posX - start_posX;
|
||||
|
||||
$this.removeClass('animate');
|
||||
|
||||
setTimeout(function () {
|
||||
$this.css({
|
||||
transform: 'translateX(' + dif + 'px) scale(0.95)',
|
||||
opacity: Math.max((_.settings.translate_limit - Math.abs(dif)) / _.settings.translate_limit, _.settings.opacity_limit)
|
||||
});
|
||||
}, 0);
|
||||
|
||||
setTimeout(function () {
|
||||
$this.addClass('animate');
|
||||
}, 0);
|
||||
});
|
||||
|
||||
$body.one('mouseup.notification', function() {
|
||||
$this.trigger('mouseup');
|
||||
});
|
||||
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
|
||||
$body.on('mouseup', this.selectors.elems, function() {
|
||||
var $this = $(this);
|
||||
|
||||
_.is_holded = false;
|
||||
|
||||
$body.unbind('mousemove.notification mouseup.notification');
|
||||
|
||||
setTimeout(function () {
|
||||
if(Math.abs(dif) > _.settings.close_limit) {
|
||||
var $notification = $this.find('[data-js-notification-inner]'),
|
||||
$btn_close = $notification.find('[data-js-action="close"]').first();
|
||||
|
||||
if($notification.hasClass('d-none')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this.one('transitionend', function() {
|
||||
dif = 0;
|
||||
|
||||
$this.trigger('mouseup').trigger('transitionend');
|
||||
|
||||
$btn_close.trigger('click');
|
||||
$notification.trigger('transitionend');
|
||||
|
||||
$this.trigger('onpressedend');
|
||||
});
|
||||
|
||||
$this.css({
|
||||
transform: 'translateX(' + (dif + 20) + 'px) scale(0.95)',
|
||||
opacity: 0
|
||||
});
|
||||
} else {
|
||||
$this.removeClass('pressed');
|
||||
|
||||
$this.one('transitionend' ,function () {
|
||||
$this.removeClass('animate');
|
||||
$this.trigger('onpressedend');
|
||||
});
|
||||
|
||||
$this.css({
|
||||
transform: '',
|
||||
opacity: ''
|
||||
});
|
||||
}
|
||||
|
||||
if($this.css('transition-duration') === '0s') {
|
||||
$this.trigger('transitionend');
|
||||
}
|
||||
}, 0);
|
||||
});
|
||||
|
||||
$body.on('close', this.selectors.elems, function() {
|
||||
var $this = $(this);
|
||||
|
||||
$body.unbind('mousemove.notification');
|
||||
$this.trigger('mouseup').trigger('transitionend');
|
||||
});
|
||||
},
|
||||
_cookies: function($container) {
|
||||
var _ = this,
|
||||
$notification = $container.find('.js-notification-cookies');
|
||||
|
||||
if($notification.length) {
|
||||
var $btn_close = $notification.find('[data-js-action="close"]'),
|
||||
cookie = $.cookie('notification-cookies'),
|
||||
show_once = $notification.attr('data-js-show-once'),
|
||||
delay = +$notification.attr('data-js-delay'),
|
||||
cookies_life = +$notification.attr('data-js-cookies-life');
|
||||
|
||||
if(cookie !== 'off') {
|
||||
setTimeout(function () {
|
||||
_._show($notification, function () {
|
||||
$btn_close.one('click', function() {
|
||||
if(show_once === 'true') {
|
||||
var date = new Date(),
|
||||
timer = 24 * 60 * 60 * 1000 * cookies_life;
|
||||
|
||||
date.setTime(date.getTime() + timer);
|
||||
|
||||
$.cookie('notification-cookies', 'off', {
|
||||
expires: date,
|
||||
path: '/'
|
||||
});
|
||||
}
|
||||
|
||||
$(this).off();
|
||||
|
||||
_._hide($notification, function () {
|
||||
$notification.remove();
|
||||
});
|
||||
});
|
||||
});
|
||||
}, delay * 1000);
|
||||
}
|
||||
|
||||
return $btn_close;
|
||||
}
|
||||
},
|
||||
_products: function($container) {
|
||||
var _ = this,
|
||||
$notification = $container.find('.js-notification-products');
|
||||
|
||||
if(!$notification.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
var $btns_close = $notification.find('[data-js-action="close"]'),
|
||||
$items = $notification.find('[data-js-notification-products-item]'),
|
||||
delay = +$notification.attr('data-js-delay'),
|
||||
interval_min = +$notification.attr('data-js-interval-min'),
|
||||
interval_max = +$notification.attr('data-js-interval-max'),
|
||||
max_time_life = +$notification.attr('data-js-max-time-life'),
|
||||
$current_item,
|
||||
interval_random,
|
||||
max_time_life_interval;
|
||||
|
||||
function randomInteger(min, max) {
|
||||
return Math.round(min - 0.5 + Math.random() * (max - min + 1));
|
||||
};
|
||||
|
||||
function hide() {
|
||||
_._hide($notification, function () {
|
||||
autoplay();
|
||||
});
|
||||
};
|
||||
|
||||
function autoplay() {
|
||||
clearInterval(max_time_life_interval);
|
||||
if(!$notification.hasClass('d-none') || _.is_holded) {
|
||||
if(_.is_holded) {
|
||||
$notification.parents('.js-notification').one('onpressedend', function() {
|
||||
hide();
|
||||
});
|
||||
} else if($notification.is(':hover')) {
|
||||
$notification.one('mouseleave', function() {
|
||||
hide();
|
||||
});
|
||||
} else {
|
||||
hide();
|
||||
}
|
||||
} else {
|
||||
$current_item = $items.eq(randomInteger(0, $items.length - 1));
|
||||
interval_random = randomInteger(interval_min, interval_max);
|
||||
|
||||
$items.addClass('d-none');
|
||||
$current_item.removeClass('d-none');
|
||||
|
||||
_._show($notification, function () {
|
||||
setTimeout(function () {
|
||||
autoplay();
|
||||
}, interval_random * 1000);
|
||||
|
||||
if(max_time_life !== 0) {
|
||||
max_time_life_interval = setTimeout(function () {
|
||||
_._hide($notification);
|
||||
}, max_time_life * 1000);
|
||||
}
|
||||
}, function(onVisible) {
|
||||
onVisible();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
setTimeout(function () {
|
||||
autoplay();
|
||||
}, delay * 1000);
|
||||
|
||||
$btns_close.on('click', function() {
|
||||
_._hide($notification);
|
||||
});
|
||||
|
||||
return $btns_close;
|
||||
},
|
||||
_show: function ($notification, callback, beforeShow) {
|
||||
$notification.unbind('transitionend');
|
||||
|
||||
if(callback) {
|
||||
$notification.one('transitionend', function () {
|
||||
callback();
|
||||
});
|
||||
}
|
||||
|
||||
$notification.removeClass('d-none');
|
||||
$notification.addClass('animate');
|
||||
|
||||
function onVisible() {
|
||||
setTimeout(function () {
|
||||
$notification.addClass('visible');
|
||||
}, 0);
|
||||
|
||||
if($notification.css('transition-duration') === '0s') {
|
||||
$notification.trigger('transitionend');
|
||||
}
|
||||
};
|
||||
|
||||
if(beforeShow) {
|
||||
beforeShow(onVisible);
|
||||
} else {
|
||||
onVisible();
|
||||
}
|
||||
},
|
||||
_hide: function ($notification, callback) {
|
||||
$notification.unbind('transitionend');
|
||||
|
||||
$notification.one('transitionend', function () {
|
||||
$notification.addClass('d-none').removeClass('animate').removeAttr('style');
|
||||
|
||||
$notification.parents('.js-notification').trigger('close');
|
||||
|
||||
if(callback) {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
|
||||
$notification.removeClass('visible');
|
||||
|
||||
if($notification.css('transition-duration') === '0s') {
|
||||
$notification.trigger('transitionend');
|
||||
}
|
||||
},
|
||||
init: function ($container) {
|
||||
this._products($container);
|
||||
this._cookies($container);
|
||||
},
|
||||
destroy: function ($container) {
|
||||
$container.find('.js-notification-cookies, .js-notification-products').find('[data-js-action="close"]').off();
|
||||
}
|
||||
});
|
||||
|
||||
theme.Notifications = new Notifications;
|
||||
};
|
||||
|
||||
$(function() {
|
||||
theme.Notifications();
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.Notifications=function(){function t(){this.selectors={elems:".js-notification"},this.settings={close_limit:40,translate_limit:50,opacity_limit:.4},this.load()}t.prototype=$.extend({},t.prototype,{load:function(){var s,a=this;$body.on("mousedown",this.selectors.elems,function(t){if("A"!==t.target.tagName&&!$(t.target).parents("[data-js-action]").length){a.is_holded=!0;var e=$(this),o=t.screenX;return s=0,e.addClass("animate"),setTimeout(function(){e.addClass("pressed")},0),$body.on("mousemove.notification",function(t){var i=t.screenX,n=Math.min(o+a.settings.translate_limit,Math.max(o-a.settings.translate_limit,i));s=n-o,e.removeClass("animate"),setTimeout(function(){e.css({transform:"translateX("+s+"px) scale(0.95)",opacity:Math.max((a.settings.translate_limit-Math.abs(s))/a.settings.translate_limit,a.settings.opacity_limit)})},0),setTimeout(function(){e.addClass("animate")},0)}),$body.one("mouseup.notification",function(){e.trigger("mouseup")}),t.preventDefault(),!1}}),$body.on("mouseup",this.selectors.elems,function(){var n=$(this);a.is_holded=!1,$body.unbind("mousemove.notification mouseup.notification"),setTimeout(function(){if(Math.abs(s)>a.settings.close_limit){var t=n.find("[data-js-notification-inner]"),i=t.find('[data-js-action="close"]').first();if(t.hasClass("d-none"))return;n.one("transitionend",function(){s=0,n.trigger("mouseup").trigger("transitionend"),i.trigger("click"),t.trigger("transitionend"),n.trigger("onpressedend")}),n.css({transform:"translateX("+(s+20)+"px) scale(0.95)",opacity:0})}else n.removeClass("pressed"),n.one("transitionend",function(){n.removeClass("animate"),n.trigger("onpressedend")}),n.css({transform:"",opacity:""});"0s"===n.css("transition-duration")&&n.trigger("transitionend")},0)}),$body.on("close",this.selectors.elems,function(){var t=$(this);$body.unbind("mousemove.notification"),t.trigger("mouseup").trigger("transitionend")})},_cookies:function(t){var n=this,e=t.find(".js-notification-cookies");if(e.length){var i=e.find('[data-js-action="close"]'),o=$.cookie("notification-cookies"),s=e.attr("data-js-show-once"),a=+e.attr("data-js-delay"),r=+e.attr("data-js-cookies-life");return"off"!==o&&setTimeout(function(){n._show(e,function(){i.one("click",function(){if("true"===s){var t=new Date,i=864e5*r;t.setTime(t.getTime()+i),$.cookie("notification-cookies","off",{expires:t,path:"/"})}$(this).off(),n._hide(e,function(){e.remove()})})})},1e3*a),i}},_products:function(t){var i=this,n=t.find(".js-notification-products");if(n.length){var e,o,s,a=n.find('[data-js-action="close"]'),r=n.find("[data-js-notification-products-item]"),c=+n.attr("data-js-delay"),d=+n.attr("data-js-interval-min"),f=+n.attr("data-js-interval-max"),u=+n.attr("data-js-max-time-life");return setTimeout(function(){h()},1e3*c),a.on("click",function(){i._hide(n)}),a}function l(t,i){return Math.round(t-.5+Math.random()*(i-t+1))}function m(){i._hide(n,function(){h()})}function h(){clearInterval(s),!n.hasClass("d-none")||i.is_holded?i.is_holded?n.parents(".js-notification").one("onpressedend",function(){m()}):n.is(":hover")?n.one("mouseleave",function(){m()}):m():(e=r.eq(l(0,r.length-1)),o=l(d,f),r.addClass("d-none"),e.removeClass("d-none"),i._show(n,function(){setTimeout(function(){h()},1e3*o),0!==u&&(s=setTimeout(function(){i._hide(n)},1e3*u))},function(t){t()}))}},_show:function(t,i,n){function e(){setTimeout(function(){t.addClass("visible")},0),"0s"===t.css("transition-duration")&&t.trigger("transitionend")}t.unbind("transitionend"),i&&t.one("transitionend",function(){i()}),t.removeClass("d-none"),t.addClass("animate"),n?n(e):e()},_hide:function(t,i){t.unbind("transitionend"),t.one("transitionend",function(){t.addClass("d-none").removeClass("animate").removeAttr("style"),t.parents(".js-notification").trigger("close"),i&&i()}),t.removeClass("visible"),"0s"===t.css("transition-duration")&&t.trigger("transitionend")},init:function(t){this._products(t),this._cookies(t)},destroy:function(t){t.find(".js-notification-cookies, .js-notification-products").find('[data-js-action="close"]').off()}}),theme.Notifications=new t},$(function(){theme.Notifications()});
|
||||
@@ -0,0 +1,137 @@
|
||||
theme.Parallax = function() {
|
||||
|
||||
function Parallax() {
|
||||
this.load();
|
||||
};
|
||||
|
||||
Parallax.prototype = $.extend({}, Parallax.prototype, {
|
||||
load: function () {
|
||||
$.widget( 'ui.parallax', {
|
||||
options: {
|
||||
ratio: 1.2
|
||||
},
|
||||
params: {},
|
||||
_create: function() {
|
||||
var _ = this;
|
||||
|
||||
this.params.start_width = this.element.width();
|
||||
this.params.start_height = this.element.height();
|
||||
this.params.start_ratio_height = this.params.start_height / this.params.start_width;
|
||||
|
||||
this._setOption('ratio', this.element.data('ratio'), true);
|
||||
this._setOption('height', this.element.data('height'), true);
|
||||
this._setOption('minHeight', this.element.data('min-height'), true);
|
||||
|
||||
if(this.options.height) {
|
||||
var height_arr = this.options.height.split(',');
|
||||
|
||||
this.options.height = {
|
||||
xs: height_arr[4],
|
||||
sm: height_arr[3],
|
||||
md: height_arr[2],
|
||||
lg: height_arr[1],
|
||||
xl: height_arr[0]
|
||||
};
|
||||
} else {
|
||||
this.element.css({
|
||||
paddingTop: _.params.start_ratio_height * 100 + '%'
|
||||
});
|
||||
}
|
||||
|
||||
if(this.options.minHeight) {
|
||||
this.element.css({
|
||||
minHeight: this.options.minHeight + 'px'
|
||||
});
|
||||
}
|
||||
|
||||
this.$content = this.element.children().first();
|
||||
|
||||
this._calculateSize();
|
||||
this._calculatePosition();
|
||||
|
||||
this.element.css({
|
||||
overflow: 'hidden',
|
||||
position: 'relative'
|
||||
});
|
||||
|
||||
this.$content.css({
|
||||
position: 'absolute',
|
||||
top: '0',
|
||||
left: '50%',
|
||||
transform: 'translateX(-50%)'
|
||||
});
|
||||
|
||||
$window.on('theme.resize.parallax', function () {
|
||||
_._calculateSize();
|
||||
_._calculatePosition();
|
||||
});
|
||||
|
||||
$window.on('scroll.parallax', function () {
|
||||
_._calculatePosition();
|
||||
});
|
||||
|
||||
this.element.addClass('parallax--init');
|
||||
},
|
||||
_calculateSize: function() {
|
||||
this.params.current_width = this.element.width();
|
||||
|
||||
if(this.options.height) {
|
||||
this.element.css({
|
||||
paddingTop: this.options.height[theme.current.bp]
|
||||
});
|
||||
}
|
||||
|
||||
this.params.current_height = this.element.height();
|
||||
|
||||
this.params.current_scale_width = this.params.current_width * this.options.ratio;
|
||||
this.params.current_scale_height = this.params.current_height * this.options.ratio;
|
||||
|
||||
this.params.stroke_scroll = this.params.current_height + window.innerHeight;
|
||||
this.params.stroke_content = this.params.current_scale_height - this.params.current_height;
|
||||
this.params.stroke_ratio = this.params.stroke_scroll / this.params.stroke_content;
|
||||
|
||||
this.$content.width(this.params.current_scale_width);
|
||||
},
|
||||
_calculatePosition: function() {
|
||||
this.params.stroke_current = this.params.stroke_scroll - this.element[0].getBoundingClientRect().bottom;
|
||||
|
||||
this.params.stroke_current = Math.max(this.params.stroke_current, 0);
|
||||
this.params.stroke_current = Math.min(this.params.stroke_current, this.params.stroke_scroll);
|
||||
|
||||
this.params.current_top = this.params.stroke_content * -1 + (this.params.stroke_current / this.params.stroke_ratio);
|
||||
|
||||
this.$content.css({
|
||||
transform: 'translate(-50%, ' + this.params.current_top + 'px)'
|
||||
});
|
||||
},
|
||||
_init: function () {
|
||||
|
||||
},
|
||||
_setOption: function(key, value) {
|
||||
$.Widget.prototype._setOption.apply(this, arguments);
|
||||
},
|
||||
destroy: function() {
|
||||
$window.unbind('theme.resize.parallax scroll.parallax');
|
||||
|
||||
$.Widget.prototype.destroy.call(this);
|
||||
}
|
||||
});
|
||||
},
|
||||
init: function($parallax) {
|
||||
if(!$parallax.hasClass('parallax--init')) {
|
||||
$parallax.parallax();
|
||||
}
|
||||
},
|
||||
destroy: function ($parallax) {
|
||||
if($parallax.hasClass('parallax--init')) {
|
||||
$parallax.parallax('destroy');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
theme.Parallax = new Parallax;
|
||||
};
|
||||
|
||||
$(function() {
|
||||
theme.Parallax();
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.Parallax=function(){function t(){this.load()}t.prototype=$.extend({},t.prototype,{load:function(){$.widget("ui.parallax",{options:{ratio:1.2},params:{},_create:function(){var t=this;if(this.params.start_width=this.element.width(),this.params.start_height=this.element.height(),this.params.start_ratio_height=this.params.start_height/this.params.start_width,this._setOption("ratio",this.element.data("ratio"),!0),this._setOption("height",this.element.data("height"),!0),this._setOption("minHeight",this.element.data("min-height"),!0),this.options.height){var i=this.options.height.split(",");this.options.height={xs:i[4],sm:i[3],md:i[2],lg:i[1],xl:i[0]}}else this.element.css({paddingTop:100*t.params.start_ratio_height+"%"});this.options.minHeight&&this.element.css({minHeight:this.options.minHeight+"px"}),this.$content=this.element.children().first(),this._calculateSize(),this._calculatePosition(),this.element.css({overflow:"hidden",position:"relative"}),this.$content.css({position:"absolute",top:"0",left:"50%",transform:"translateX(-50%)"}),$window.on("theme.resize.parallax",function(){t._calculateSize(),t._calculatePosition()}),$window.on("scroll.parallax",function(){t._calculatePosition()}),this.element.addClass("parallax--init")},_calculateSize:function(){this.params.current_width=this.element.width(),this.options.height&&this.element.css({paddingTop:this.options.height[theme.current.bp]}),this.params.current_height=this.element.height(),this.params.current_scale_width=this.params.current_width*this.options.ratio,this.params.current_scale_height=this.params.current_height*this.options.ratio,this.params.stroke_scroll=this.params.current_height+window.innerHeight,this.params.stroke_content=this.params.current_scale_height-this.params.current_height,this.params.stroke_ratio=this.params.stroke_scroll/this.params.stroke_content,this.$content.width(this.params.current_scale_width)},_calculatePosition:function(){this.params.stroke_current=this.params.stroke_scroll-this.element[0].getBoundingClientRect().bottom,this.params.stroke_current=Math.max(this.params.stroke_current,0),this.params.stroke_current=Math.min(this.params.stroke_current,this.params.stroke_scroll),this.params.current_top=-1*this.params.stroke_content+this.params.stroke_current/this.params.stroke_ratio,this.$content.css({transform:"translate(-50%, "+this.params.current_top+"px)"})},_init:function(){},_setOption:function(t,i){$.Widget.prototype._setOption.apply(this,arguments)},destroy:function(){$window.unbind("theme.resize.parallax scroll.parallax"),$.Widget.prototype.destroy.call(this)}})},init:function(t){t.hasClass("parallax--init")||t.parallax()},destroy:function(t){t.hasClass("parallax--init")&&t.parallax("destroy")}}),theme.Parallax=new t},$(function(){theme.Parallax()});
|
||||
@@ -0,0 +1,60 @@
|
||||
theme.PopupSubscription = function() {
|
||||
|
||||
function PopupSubscription() {
|
||||
this.settings = {
|
||||
popup_name: 'subscription'
|
||||
};
|
||||
|
||||
this.selectors = {
|
||||
popup: '.popup-subscription'
|
||||
};
|
||||
|
||||
this.load();
|
||||
};
|
||||
|
||||
PopupSubscription.prototype = $.extend({}, PopupSubscription.prototype, {
|
||||
load: function() {
|
||||
var $popup = theme.Popups.getByName(this.settings.popup_name);
|
||||
|
||||
if($body.attr('id') !== 'index') {
|
||||
return;
|
||||
}
|
||||
|
||||
if($popup.length) {
|
||||
var $subscription = $(this.selectors.popup),
|
||||
cookie = $.cookie('subscription');
|
||||
|
||||
if(cookie !== 'off') {
|
||||
var $dont_show = $subscription.find('[data-js-popup-subscription-dont-show]'),
|
||||
show_once = $subscription.attr('data-js-show-once') || false,
|
||||
delay = +$subscription.attr('data-js-delay') || 3,
|
||||
cookies_life = +$subscription.attr('data-js-cookies-life') || 1;
|
||||
|
||||
theme.Popups.addHandler(this.settings.popup_name, 'close.after', function() {
|
||||
if(show_once === 'true' || $dont_show.is(':checked')) {
|
||||
var date = new Date(),
|
||||
timer = 24 * 60 * 60 * 1000 * cookies_life;
|
||||
|
||||
date.setTime(date.getTime() + timer);
|
||||
|
||||
$.cookie('subscription', 'off', {
|
||||
expires: date,
|
||||
path: '/'
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
setTimeout(function () {
|
||||
theme.Popups.callByName('subscription');
|
||||
}, delay * 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
theme.PopupSubscription = new PopupSubscription;
|
||||
};
|
||||
|
||||
$(function() {
|
||||
theme.PopupSubscription();
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.PopupSubscription=function(){function t(){this.settings={popup_name:"subscription"},this.selectors={popup:".popup-subscription"},this.load()}t.prototype=$.extend({},t.prototype,{load:function(){var t=theme.Popups.getByName(this.settings.popup_name);if("index"===$body.attr("id")&&t.length){var e=$(this.selectors.popup);if("off"!==$.cookie("subscription")){var o=e.find("[data-js-popup-subscription-dont-show]"),i=e.attr("data-js-show-once")||!1,p=+e.attr("data-js-delay")||3,s=+e.attr("data-js-cookies-life")||1;theme.Popups.addHandler(this.settings.popup_name,"close.after",function(){if("true"===i||o.is(":checked")){var t=new Date,e=864e5*s;t.setTime(t.getTime()+e),$.cookie("subscription","off",{expires:t,path:"/"})}}),setTimeout(function(){theme.Popups.callByName("subscription")},1e3*p)}}}}),theme.PopupSubscription=new t},$(function(){theme.PopupSubscription()});
|
||||
@@ -0,0 +1,169 @@
|
||||
theme.Presentation = function() {
|
||||
|
||||
function Presentation() {
|
||||
this.settings = {
|
||||
sections_control_container: [
|
||||
'header',
|
||||
'gallery',
|
||||
'home-builder',
|
||||
'information-line',
|
||||
'footer'
|
||||
],
|
||||
actions: ['container', 'rtl', 'animation']
|
||||
};
|
||||
|
||||
this.dom = {
|
||||
$presentation: $('.js-presentation')
|
||||
};
|
||||
|
||||
this.load();
|
||||
};
|
||||
|
||||
Presentation.prototype = $.extend({}, Presentation.prototype, {
|
||||
load: function() {
|
||||
var _ = this,
|
||||
animations = {};
|
||||
|
||||
for(var key in theme.animations) {
|
||||
animations[key] = {};
|
||||
|
||||
for(var k in theme.animations[key]) {
|
||||
animations[key][k] = theme.animations[key][k];
|
||||
}
|
||||
}
|
||||
|
||||
function toggleState(action, enable) {
|
||||
if(action === 'container') {
|
||||
$.each(_.settings.sections_control_container, function() {
|
||||
$('[data-section-type="' + this + '"]').each(function () {
|
||||
var $this = $(this);
|
||||
|
||||
if(enable) {
|
||||
if($this.hasClass('container')) {
|
||||
$this.attr('data-has-container', true);
|
||||
}
|
||||
|
||||
$this.addClass('container presentation-container-enabled');
|
||||
|
||||
if($this.attr('data-boxed-without-paddings') === 'true') {
|
||||
$this.addClass('px-0');
|
||||
}
|
||||
} else {
|
||||
if(!$this[0].hasAttribute('data-has-container')) {
|
||||
$this.removeClass();
|
||||
} else {
|
||||
$this.removeAttr('data-has-container');
|
||||
}
|
||||
|
||||
if($this.attr('data-boxed-without-paddings') === 'true') {
|
||||
$this.removeClass('px-0');
|
||||
}
|
||||
|
||||
$this.removeClass('presentation-container-enabled');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$window.trigger('resize');
|
||||
|
||||
if(theme.Masonry) {
|
||||
theme.Masonry.update();
|
||||
}
|
||||
} else if(action === 'rtl') {
|
||||
$html.attr('dir', enable ? 'rtl' : 'ltr');
|
||||
theme.rtl = enable;
|
||||
|
||||
$('.slick-slider.slick-initialized').not('.slick-vertical').each(function () {
|
||||
var $this = $(this),
|
||||
options = $this.slick('getSlick').originalSettings;
|
||||
|
||||
options.rtl = theme.rtl;
|
||||
|
||||
$this.slick('unslick');
|
||||
$this.slick(options);
|
||||
});
|
||||
|
||||
$window.trigger('resize');
|
||||
} else if(action === 'animation') {
|
||||
$body[enable ? 'addClass' : 'removeClass']('theme-css-animate');
|
||||
|
||||
if(enable) {
|
||||
for(var key in animations) {
|
||||
for(var k in animations[key]) {
|
||||
theme.animations[key][k] = animations[key][k];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
theme.animations.tooltip.show_duration = 0;
|
||||
theme.animations.tooltip.hide_duration = 0;
|
||||
theme.animations.sticky_header.duration = 0;
|
||||
theme.animations.header_tape.duration = 0;
|
||||
theme.animations.menu.duration = 0;
|
||||
theme.animations.dropdown.duration = 0;
|
||||
theme.animations.accordion.duration = 0;
|
||||
theme.animations.tabs.duration = 0;
|
||||
theme.animations.tabs.scroll_duration = 0;
|
||||
theme.animations.backtotop.scroll_duration = 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
$.each(this.settings.actions, function(i, v) {
|
||||
var $button = _.dom.$presentation.find('[data-js-action="' + this + '"]');
|
||||
|
||||
if($.cookie('presentation-' + this) === 'enabled' && $button.attr('data-invert') !== 'true' && !$button.is(':checked')) {
|
||||
toggleState(v, true);
|
||||
$button.prop('checked', 'checked');
|
||||
} else if($.cookie('presentation-' + this) === 'enabled' && $button.attr('data-invert') === 'true' && $button.is(':checked')) {
|
||||
toggleState(v, false);
|
||||
$button.removeAttr('checked');
|
||||
}
|
||||
});
|
||||
|
||||
this.dom.$presentation.on('change', '[data-js-action]', function() {
|
||||
var $this = $(this),
|
||||
action = $this.attr('data-js-action'),
|
||||
enable = $this.is(':checked'),
|
||||
state = enable;
|
||||
|
||||
if($this.attr('data-invert') === 'true') {
|
||||
state = !state;
|
||||
}
|
||||
|
||||
$.cookie('presentation-' + action, state ? 'enabled' : null, {
|
||||
expires: 60 * 60 * 1000,
|
||||
path: '/'
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
toggleState(action, enable);
|
||||
}, theme.animations.css.duration * 1000);
|
||||
});
|
||||
|
||||
this.dom.$presentation.on('click', '[data-js-presentation-close]', function() {
|
||||
if(_.dom.$presentation.hasClass('open')) {
|
||||
_.dom.$presentation.removeClass('open');
|
||||
} else {
|
||||
_.dom.$presentation.addClass('open');
|
||||
}
|
||||
});
|
||||
|
||||
theme.Global.responsiveHandler({
|
||||
namespace: '.presentation',
|
||||
element: this.dom.$presentation,
|
||||
on_desktop: true,
|
||||
events: {
|
||||
'mouseenter mouseleave': function(e) {
|
||||
_.dom.$presentation[e.type === 'mouseenter' ? 'addClass' : 'removeClass']('open');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
theme.Presentation = new Presentation;
|
||||
};
|
||||
|
||||
$(function() {
|
||||
theme.Presentation();
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.Presentation=function(){function t(){this.settings={sections_control_container:["header","gallery","home-builder","information-line","footer"],actions:["container","rtl","animation"]},this.dom={$presentation:$(".js-presentation")},this.load()}t.prototype=$.extend({},t.prototype,{load:function(){var i=this,o={};for(var t in theme.animations)for(var e in o[t]={},theme.animations[t])o[t][e]=theme.animations[t][e];function s(t,e){if("container"===t)$.each(i.settings.sections_control_container,function(){$('[data-section-type="'+this+'"]').each(function(){var t=$(this);e?(t.hasClass("container")&&t.attr("data-has-container",!0),t.addClass("container presentation-container-enabled"),"true"===t.attr("data-boxed-without-paddings")&&t.addClass("px-0")):(t[0].hasAttribute("data-has-container")?t.removeAttr("data-has-container"):t.removeClass(),"true"===t.attr("data-boxed-without-paddings")&&t.removeClass("px-0"),t.removeClass("presentation-container-enabled"))})}),$window.trigger("resize"),theme.Masonry&&theme.Masonry.update();else if("rtl"===t)$html.attr("dir",e?"rtl":"ltr"),theme.rtl=e,$(".slick-slider.slick-initialized").not(".slick-vertical").each(function(){var t=$(this),e=t.slick("getSlick").originalSettings;e.rtl=theme.rtl,t.slick("unslick"),t.slick(e)}),$window.trigger("resize");else if("animation"===t)if($body[e?"addClass":"removeClass"]("theme-css-animate"),e)for(var n in o)for(var a in o[n])theme.animations[n][a]=o[n][a];else theme.animations.tooltip.show_duration=0,theme.animations.tooltip.hide_duration=0,theme.animations.sticky_header.duration=0,theme.animations.header_tape.duration=0,theme.animations.menu.duration=0,theme.animations.dropdown.duration=0,theme.animations.accordion.duration=0,theme.animations.tabs.duration=0,theme.animations.tabs.scroll_duration=0,theme.animations.backtotop.scroll_duration=0}$.each(this.settings.actions,function(t,e){var n=i.dom.$presentation.find('[data-js-action="'+this+'"]');"enabled"!==$.cookie("presentation-"+this)||"true"===n.attr("data-invert")||n.is(":checked")?"enabled"===$.cookie("presentation-"+this)&&"true"===n.attr("data-invert")&&n.is(":checked")&&(s(e,!1),n.removeAttr("checked")):(s(e,!0),n.prop("checked","checked"))}),this.dom.$presentation.on("change","[data-js-action]",function(){var t=$(this),e=t.attr("data-js-action"),n=t.is(":checked"),a=n;"true"===t.attr("data-invert")&&(a=!a),$.cookie("presentation-"+e,a?"enabled":null,{expires:36e5,path:"/"}),setTimeout(function(){s(e,n)},1e3*theme.animations.css.duration)}),this.dom.$presentation.on("click","[data-js-presentation-close]",function(){i.dom.$presentation.hasClass("open")?i.dom.$presentation.removeClass("open"):i.dom.$presentation.addClass("open")}),theme.Global.responsiveHandler({namespace:".presentation",element:this.dom.$presentation,on_desktop:!0,events:{"mouseenter mouseleave":function(t){i.dom.$presentation["mouseenter"===t.type?"addClass":"removeClass"]("open")}}})}}),theme.Presentation=new t},$(function(){theme.Presentation()});
|
||||
@@ -0,0 +1,68 @@
|
||||
theme.ProductFootbar = function() {
|
||||
|
||||
function ProductFootbar() {
|
||||
|
||||
};
|
||||
|
||||
ProductFootbar.prototype = $.extend({}, ProductFootbar.prototype, {
|
||||
duration: function () {
|
||||
return theme.animations.footbar_product.duration * 1000;
|
||||
},
|
||||
init: function($container) {
|
||||
var _ = this,
|
||||
$footbar = $container.find('.js-footbar-product'),
|
||||
$limit = $('[data-js-footbar-product-limit]');
|
||||
|
||||
if($footbar.length && $limit.length) {
|
||||
$window.on('theme.resize.productFootbar scroll.productFootbar', function () {
|
||||
_._update($footbar, $limit);
|
||||
});
|
||||
|
||||
this._update($footbar, $limit);
|
||||
}
|
||||
},
|
||||
_update: function ($footbar, $limit) {
|
||||
var limit = $limit[0].getBoundingClientRect(),
|
||||
topSpacing = theme.StickyHeader && theme.StickyHeader.$sticky ? theme.StickyHeader.$sticky.stickyHeader('getStickyHeight') : 0;
|
||||
|
||||
if(limit.top < topSpacing && !$footbar.hasClass('show')) {
|
||||
$footbar.addClass('show animate');
|
||||
|
||||
$footbar.velocity('stop', true);
|
||||
|
||||
$footbar.velocity('slideDown', {
|
||||
duration: this.duration(),
|
||||
begin: function () {
|
||||
setTimeout(function () {
|
||||
$footbar.addClass('visible');
|
||||
}, 0);
|
||||
},
|
||||
complete: function () {
|
||||
$footbar.removeAttr('style');
|
||||
}
|
||||
});
|
||||
} else if(limit.top >= topSpacing && $footbar.hasClass('visible')) {
|
||||
$footbar.velocity('stop', true);
|
||||
|
||||
$footbar.velocity('slideUp', {
|
||||
duration: this.duration(),
|
||||
begin: function () {
|
||||
$footbar.removeClass('visible');
|
||||
},
|
||||
complete: function () {
|
||||
$footbar.removeClass('show animate').removeAttr('style');
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
destroy: function () {
|
||||
$window.unbind('theme.resize.productFootbar scroll.productFootbar');
|
||||
}
|
||||
});
|
||||
|
||||
theme.ProductFootbar = new ProductFootbar;
|
||||
};
|
||||
|
||||
$(function() {
|
||||
theme.ProductFootbar();
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.ProductFootbar=function(){function t(){}t.prototype=$.extend({},t.prototype,{duration:function(){return 1e3*theme.animations.footbar_product.duration},init:function(t){var o=this,e=t.find(".js-footbar-product"),i=$("[data-js-footbar-product-limit]");e.length&&i.length&&($window.on("theme.resize.productFootbar scroll.productFootbar",function(){o._update(e,i)}),this._update(e,i))},_update:function(t,o){var e=o[0].getBoundingClientRect(),i=theme.StickyHeader&&theme.StickyHeader.$sticky?theme.StickyHeader.$sticky.stickyHeader("getStickyHeight"):0;e.top<i&&!t.hasClass("show")?(t.addClass("show animate"),t.velocity("stop",!0),t.velocity("slideDown",{duration:this.duration(),begin:function(){setTimeout(function(){t.addClass("visible")},0)},complete:function(){t.removeAttr("style")}})):e.top>=i&&t.hasClass("visible")&&(t.velocity("stop",!0),t.velocity("slideUp",{duration:this.duration(),begin:function(){t.removeClass("visible")},complete:function(){t.removeClass("show animate").removeAttr("style")}}))},destroy:function(){$window.unbind("theme.resize.productFootbar scroll.productFootbar")}}),theme.ProductFootbar=new t},$(function(){theme.ProductFootbar()});
|
||||
@@ -0,0 +1,108 @@
|
||||
theme.ProductsView = function() {
|
||||
|
||||
function ProductsView() {
|
||||
this.selectors = {
|
||||
view: '.js-products-view'
|
||||
};
|
||||
|
||||
this.init();
|
||||
};
|
||||
|
||||
ProductsView.prototype = $.extend({}, ProductsView.prototype, {
|
||||
init: function() {
|
||||
var _ = this,
|
||||
obj_view = localStorage.getItem('products-view');
|
||||
|
||||
if(window.location.href.indexOf('products-view=reset') !== -1) {
|
||||
obj_view = null;
|
||||
localStorage.setItem('products-view', null);
|
||||
}
|
||||
|
||||
if(obj_view) {
|
||||
var $wrappers = $(this.selectors.view + ' [data-js-products-grid-buttons]');
|
||||
|
||||
obj_view = JSON.parse(obj_view);
|
||||
|
||||
$wrappers.each(function () {
|
||||
var $wrapper = $(this),
|
||||
is_default = true;
|
||||
|
||||
$.each(obj_view, function (k, v) {
|
||||
if($wrapper.attr('data-value-' + k) !== v) {
|
||||
var active_attr = 'data-active-' + k;
|
||||
|
||||
$wrapper.attr('data-value-' + k, v);
|
||||
$wrapper.find('[data-value]').removeAttr(active_attr);
|
||||
$wrapper.find('[data-value="' + v + '"]').attr(active_attr, true);
|
||||
|
||||
is_default = false;
|
||||
}
|
||||
});
|
||||
|
||||
if(!is_default) {
|
||||
_.update($wrapper);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$body.on('click', this.selectors.view + ' [data-js-products-grid-buttons] [data-value]', function() {
|
||||
var $this = $(this),
|
||||
$wrapper = $this.parents('[data-js-products-grid-buttons]'),
|
||||
value = $this.attr('data-value'),
|
||||
bp = theme.current.bp,
|
||||
active_attr = 'data-active-' + bp;
|
||||
|
||||
if(!$this[0].hasAttribute(active_attr)) {
|
||||
var obj_values = {};
|
||||
|
||||
$wrapper.find('[data-value]').removeAttr(active_attr);
|
||||
$this.attr(active_attr, true);
|
||||
$wrapper.attr('data-value-' + bp, value);
|
||||
|
||||
_.update($wrapper);
|
||||
|
||||
$.each(theme.breakpoints.values, function (k, v) {
|
||||
obj_values[k] = $wrapper.attr('data-value-' + k);
|
||||
});
|
||||
|
||||
localStorage.setItem('products-view', JSON.stringify(obj_values));
|
||||
}
|
||||
});
|
||||
},
|
||||
update: function ($wrapper) {
|
||||
var $products = $wrapper.parents(this.selectors.view).find('[data-js-products]'),
|
||||
$buttons = $('[data-js-products-grid-buttons]'),
|
||||
grid_class = '';
|
||||
|
||||
if(!$buttons.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
$.each(theme.breakpoints.values, function(k) {
|
||||
var grid_value = $buttons.attr('data-value-' + k),
|
||||
column_size = (grid_value === 'list' ? 12 : 12 / +grid_value);
|
||||
|
||||
$products[+grid_value === 1 ? 'addClass' : 'removeClass']('products-view-centered-' + k);
|
||||
$products[grid_value === 'list' ? 'addClass' : 'removeClass']('products-view-list-' + k);
|
||||
|
||||
grid_class += ' col-';
|
||||
|
||||
if(k !== 'xs') {
|
||||
grid_class += k + '-';
|
||||
}
|
||||
|
||||
grid_class += column_size;
|
||||
});
|
||||
|
||||
$products.find('[data-js-product]').parent().attr('class', grid_class);
|
||||
|
||||
$window.trigger('checkImages');
|
||||
}
|
||||
});
|
||||
|
||||
theme.ProductsView = new ProductsView;
|
||||
};
|
||||
|
||||
$(function() {
|
||||
theme.ProductsView();
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.ProductsView=function(){function t(){this.selectors={view:".js-products-view"},this.init()}t.prototype=$.extend({},t.prototype,{init:function(){var o=this,t=localStorage.getItem("products-view");if(-1!==window.location.href.indexOf("products-view=reset")&&(t=null,localStorage.setItem("products-view",null)),t){var a=$(this.selectors.view+" [data-js-products-grid-buttons]");t=JSON.parse(t),a.each(function(){var s=$(this),r=!0;$.each(t,function(t,a){if(s.attr("data-value-"+t)!==a){var e="data-active-"+t;s.attr("data-value-"+t,a),s.find("[data-value]").removeAttr(e),s.find('[data-value="'+a+'"]').attr(e,!0),r=!1}}),r||o.update(s)})}$body.on("click",this.selectors.view+" [data-js-products-grid-buttons] [data-value]",function(){var t=$(this),e=t.parents("[data-js-products-grid-buttons]"),a=t.attr("data-value"),s=theme.current.bp,r="data-active-"+s;if(!t[0].hasAttribute(r)){var i={};e.find("[data-value]").removeAttr(r),t.attr(r,!0),e.attr("data-value-"+s,a),o.update(e),$.each(theme.breakpoints.values,function(t,a){i[t]=e.attr("data-value-"+t)}),localStorage.setItem("products-view",JSON.stringify(i))}})},update:function(t){var s=t.parents(this.selectors.view).find("[data-js-products]"),r=$("[data-js-products-grid-buttons]"),i="";r.length&&($.each(theme.breakpoints.values,function(t){var a=r.attr("data-value-"+t),e="list"===a?12:12/+a;s[1==+a?"addClass":"removeClass"]("products-view-centered-"+t),s["list"===a?"addClass":"removeClass"]("products-view-list-"+t),i+=" col-","xs"!==t&&(i+=t+"-"),i+=e}),s.find("[data-js-product]").parent().attr("class",i),$window.trigger("checkImages"))}}),theme.ProductsView=new t},$(function(){theme.ProductsView()});
|
||||
@@ -0,0 +1,73 @@
|
||||
theme.RangeOfPrice = function() {
|
||||
|
||||
function RangeOfPrice() {
|
||||
this.dom = {};
|
||||
};
|
||||
|
||||
RangeOfPrice.prototype = $.extend({}, RangeOfPrice.prototype, {
|
||||
init: function() {
|
||||
this.dom.$range = $('.js-range-of-price');
|
||||
|
||||
if(this.dom.$range.length) {
|
||||
var params = {
|
||||
type: "double",
|
||||
force_edges: true,
|
||||
prettify: function (data) {
|
||||
return data;
|
||||
}
|
||||
};
|
||||
|
||||
if (Currency) {
|
||||
this.dom.$range.on('change', function () {
|
||||
theme.ProductCurrency.update();
|
||||
});
|
||||
|
||||
$.extend(params, {
|
||||
onStart: function () {
|
||||
setTimeout(function () {
|
||||
theme.ProductCurrency.update();
|
||||
}, 0);
|
||||
},
|
||||
onFinish: function () {
|
||||
theme.ProductCurrency.update();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
this.dom.$range.ionRangeSlider(params);
|
||||
}
|
||||
},
|
||||
destroy: function () {
|
||||
if(this.dom.$range && this.dom.$range.data('ionRangeSlider')) {
|
||||
this.dom.$range.ionRangeSlider('destroy');
|
||||
delete this.dom;
|
||||
}
|
||||
},
|
||||
update: function(from, to) {
|
||||
if(this.dom.$range) {
|
||||
var api = this.dom.$range.data('ionRangeSlider');
|
||||
|
||||
api.update({
|
||||
from: from,
|
||||
to: to
|
||||
});
|
||||
}
|
||||
},
|
||||
reset: function() {
|
||||
if(this.dom.$range.length) {
|
||||
var api = this.dom.$range.data('ionRangeSlider');
|
||||
|
||||
api.update({
|
||||
from: api.result.min,
|
||||
to: api.result.max
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
theme.RangeOfPrice = new RangeOfPrice;
|
||||
};
|
||||
|
||||
$(function() {
|
||||
theme.RangeOfPrice();
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.RangeOfPrice=function(){function e(){this.dom={}}e.prototype=$.extend({},e.prototype,{init:function(){if(this.dom.$range=$(".js-range-of-price"),this.dom.$range.length){var e={type:"double",force_edges:!0,prettify:function(e){return e}};Currency&&(this.dom.$range.on("change",function(){theme.ProductCurrency.update()}),$.extend(e,{onStart:function(){setTimeout(function(){theme.ProductCurrency.update()},0)},onFinish:function(){theme.ProductCurrency.update()}})),this.dom.$range.ionRangeSlider(e)}},destroy:function(){this.dom.$range&&this.dom.$range.data("ionRangeSlider")&&(this.dom.$range.ionRangeSlider("destroy"),delete this.dom)},update:function(e,t){this.dom.$range&&this.dom.$range.data("ionRangeSlider").update({from:e,to:t})},reset:function(){if(this.dom.$range.length){var e=this.dom.$range.data("ionRangeSlider");e.update({from:e.result.min,to:e.result.max})}}}),theme.RangeOfPrice=new e},$(function(){theme.RangeOfPrice()});
|
||||
@@ -0,0 +1,69 @@
|
||||
theme.ShippingRatesCalculation = function() {
|
||||
|
||||
function ShippingRatesCalculation() {
|
||||
this.load();
|
||||
};
|
||||
|
||||
ShippingRatesCalculation.prototype = $.extend({}, ShippingRatesCalculation.prototype, {
|
||||
load: function() {
|
||||
var $calculator = $('#shipping-calculator');
|
||||
|
||||
if($calculator.length) {
|
||||
var $info = $('.shipping-calculator-info');
|
||||
|
||||
Shopify.Cart.ShippingCalculator.show({
|
||||
submitButton: theme.strings.shippingCalcSubmitButton,
|
||||
submitButtonDisabled: theme.strings.shippingCalcSubmitButtonDisabled,
|
||||
customerIsLoggedIn: theme.strings.shippingCalcCustomerIsLoggedIn,
|
||||
moneyFormat: theme.strings.shippingCalcMoneyFormat
|
||||
});
|
||||
|
||||
$calculator.on('updated', function () {
|
||||
setTimeout(function () {
|
||||
var $result = $('#shipping-rates-feedback.success'),
|
||||
html = $result.text(),
|
||||
data = {
|
||||
zip: $('#address_zip').val(),
|
||||
province: $('#address_province').val(),
|
||||
country: $('#address_country').val()
|
||||
},
|
||||
info = '';
|
||||
|
||||
$result.html(html);
|
||||
|
||||
var $price = $('<span>').addClass('price'),
|
||||
$money = $result.find('span');
|
||||
|
||||
$money.replaceWith($price);
|
||||
$price.append($money);
|
||||
|
||||
theme.ProductCurrency.update();
|
||||
|
||||
if($('#shipping-rates-feedback.success').length) {
|
||||
$.each(data, function () {
|
||||
if(this) {
|
||||
if(info) info += ', ';
|
||||
info += this;
|
||||
}
|
||||
});
|
||||
|
||||
$info.text(theme.strings.cart.general.shipping_calculator_data_info.replace('{{ data }}', info)).fadeIn({
|
||||
complete: function () {
|
||||
$info.removeAttr('style');
|
||||
}
|
||||
}).removeClass('d-none');
|
||||
} else {
|
||||
$info.text('').addClass('d-none');
|
||||
}
|
||||
}, 100);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
theme.ShippingRatesCalculation = new ShippingRatesCalculation;
|
||||
};
|
||||
|
||||
$(function() {
|
||||
theme.ShippingRatesCalculation();
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.ShippingRatesCalculation=function(){function t(){this.load()}t.prototype=$.extend({},t.prototype,{load:function(){var t=$("#shipping-calculator");if(t.length){var o=$(".shipping-calculator-info");Shopify.Cart.ShippingCalculator.show({submitButton:theme.strings.shippingCalcSubmitButton,submitButtonDisabled:theme.strings.shippingCalcSubmitButtonDisabled,customerIsLoggedIn:theme.strings.shippingCalcCustomerIsLoggedIn,moneyFormat:theme.strings.shippingCalcMoneyFormat}),t.on("updated",function(){setTimeout(function(){var t=$("#shipping-rates-feedback.success"),e=t.text(),n={zip:$("#address_zip").val(),province:$("#address_province").val(),country:$("#address_country").val()},i="";t.html(e);var a=$("<span>").addClass("price"),s=t.find("span");s.replaceWith(a),a.append(s),theme.ProductCurrency.update(),$("#shipping-rates-feedback.success").length?($.each(n,function(){this&&(i&&(i+=", "),i+=this)}),o.text(theme.strings.cart.general.shipping_calculator_data_info.replace("{{ data }}",i)).fadeIn({complete:function(){o.removeAttr("style")}}).removeClass("d-none")):o.text("").addClass("d-none")},100)})}}}),theme.ShippingRatesCalculation=new t},$(function(){theme.ShippingRatesCalculation()});
|
||||
@@ -0,0 +1,221 @@
|
||||
theme.StickyHeader = function() {
|
||||
|
||||
function StickyHeader() {
|
||||
|
||||
};
|
||||
|
||||
StickyHeader.prototype = $.extend({}, StickyHeader.prototype, {
|
||||
init: function($sticky, params) {
|
||||
var effect = $sticky.attr('data-sticky-effect') || 1;
|
||||
|
||||
if ($sticky.length) {
|
||||
var stickyHeader = {
|
||||
_create: function() {
|
||||
var _ = this,
|
||||
$elem = this.bindings,
|
||||
$sticky_m = $elem.find(this.options.mobile && this.options.mobile.sticky ? this.options.mobile.sticky : ''),
|
||||
$sticky_d = $elem.find(this.options.desktop && this.options.desktop.sticky ? this.options.desktop.sticky : ''),
|
||||
$spacer_m = $('<div>').addClass('header__spacer header__spacer--m').insertBefore($sticky_m),
|
||||
$spacer_d = $('<div>').addClass('header__spacer header__spacer--d').insertBefore($sticky_d);
|
||||
|
||||
this.sticky_class = 'header__content--sticky';
|
||||
|
||||
function fix() {
|
||||
_._fix(_.$sticky, _.$spacer);
|
||||
_._move(_.options[_.bp]);
|
||||
};
|
||||
|
||||
function unfix() {
|
||||
_._unfix(_.$sticky, _.$spacer);
|
||||
_._return(_.options[_.bp]);
|
||||
};
|
||||
|
||||
function on_resize() {
|
||||
var is_desktop = theme.current.is_desktop;
|
||||
|
||||
_.bp = is_desktop ? 'desktop' : 'mobile';
|
||||
_.$sticky = is_desktop ? $sticky_d : $sticky_m;
|
||||
_.$spacer = is_desktop ? $spacer_d : $spacer_m;
|
||||
|
||||
if(!_.$sticky.length) return;
|
||||
|
||||
if (is_desktop) {
|
||||
$spacer_m.removeClass('header__spacer--visible');
|
||||
$spacer_d.addClass('header__spacer--visible');
|
||||
|
||||
if ($sticky_m.hasClass(_.sticky_class)) {
|
||||
_._unfix($sticky_m, $spacer_m);
|
||||
_._return(_.options.mobile);
|
||||
}
|
||||
} else {
|
||||
$spacer_d.removeClass('header__spacer--visible');
|
||||
$spacer_m.addClass('header__spacer--visible');
|
||||
|
||||
if ($sticky_d.hasClass(_.sticky_class)) {
|
||||
_._unfix($sticky_d, $spacer_d);
|
||||
_._return(_.options.desktop);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function on_scroll() {
|
||||
if(!_.$sticky.length) return;
|
||||
|
||||
var limit = _.options[_.bp].limit ? _.options[_.bp].limit : 0,
|
||||
spacer_pos = _.$spacer[0].getBoundingClientRect();
|
||||
|
||||
if (limit === 'bottom') {
|
||||
limit = _.$sticky.hasClass(_.sticky_class) ? _.$spacer.innerHeight() : _.$sticky.innerHeight();
|
||||
}
|
||||
|
||||
limit *= -1;
|
||||
|
||||
if (spacer_pos.top < limit) {
|
||||
if (!_.$sticky.hasClass(_.sticky_class)) {
|
||||
fix();
|
||||
}
|
||||
|
||||
if(!ie) {
|
||||
_._check_height(_.$sticky, _.options[_.bp]);
|
||||
}
|
||||
} else {
|
||||
if (_.$sticky.hasClass(_.sticky_class)) {
|
||||
unfix();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
on_resize();
|
||||
on_scroll();
|
||||
|
||||
$window.on({
|
||||
'theme.resize.stickyHeader': function() {
|
||||
on_resize();
|
||||
on_scroll();
|
||||
},
|
||||
'scroll.stickyHeader': on_scroll
|
||||
});
|
||||
},
|
||||
_fix: function($sticky, $spacer) {
|
||||
var height = $sticky.innerHeight();
|
||||
|
||||
$spacer.height(height);
|
||||
|
||||
if(this.options[this.bp].fade) {
|
||||
$sticky.css({ 'opacity': 0 }).velocity({ 'opacity': theme.animations.sticky_header.opacity }, this.options[this.bp].duration());
|
||||
}
|
||||
|
||||
$sticky.addClass(this.sticky_class);
|
||||
},
|
||||
_unfix: function($sticky, $spacer) {
|
||||
$spacer.removeAttr('style');
|
||||
|
||||
if(this.options[this.bp].fade) {
|
||||
$sticky.velocity('stop', true);
|
||||
}
|
||||
|
||||
$sticky.removeAttr('style').removeClass(this.sticky_class);
|
||||
},
|
||||
_move: function(obj) {
|
||||
if (!obj.move) return;
|
||||
|
||||
$.each(obj.move, function() {
|
||||
var $elem = $(this.elem),
|
||||
$to = $(this.to),
|
||||
method = this.method || 'append';
|
||||
|
||||
this.$elem = $elem;
|
||||
this.$parent = $elem.parent();
|
||||
|
||||
$to[method]($elem);
|
||||
});
|
||||
},
|
||||
_return: function(obj) {
|
||||
if (!obj.move) return;
|
||||
|
||||
$.each(obj.move, function() {
|
||||
var method = this.method || 'append';
|
||||
|
||||
this.$parent[method](this.$elem);
|
||||
this.$elem = null;
|
||||
this.$parent = null;
|
||||
});
|
||||
},
|
||||
_check_height: function($sticky, obj) {
|
||||
if(!obj.height) return;
|
||||
|
||||
var spacer_pos = this.$spacer[0].getBoundingClientRect(),
|
||||
height = spacer_pos.bottom <= obj.height ? obj.height : spacer_pos.bottom;
|
||||
|
||||
$sticky.css({ 'min-height': height });
|
||||
},
|
||||
getStickyHeight: function() {
|
||||
return this.options[this.bp] ? (this.options[this.bp].height || $(this.options[this.bp].sticky).innerHeight()) : 0;
|
||||
},
|
||||
destroy: function() {
|
||||
$(window).unbind('resize.stickyHeader scroll.stickyHeader');
|
||||
|
||||
$.Widget.prototype.destroy.call(this);
|
||||
}
|
||||
};
|
||||
|
||||
$.widget('ui.stickyHeader', stickyHeader);
|
||||
|
||||
$sticky.stickyHeader(params);
|
||||
|
||||
this.$sticky = $sticky;
|
||||
|
||||
return {
|
||||
destroy: function() {
|
||||
$sticky.stickyHeader('destroy');
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
theme.StickyHeader = new StickyHeader;
|
||||
};
|
||||
|
||||
$(function() {
|
||||
theme.StickyHeader();
|
||||
});
|
||||
|
||||
/*DOCUMENTATION*/
|
||||
|
||||
//params example
|
||||
/*
|
||||
{
|
||||
bp: 1024,
|
||||
mobile: {
|
||||
sticky: '.tt-header__nav',
|
||||
limit: 400,
|
||||
fade: true,
|
||||
duration: 400
|
||||
},
|
||||
desktop: {
|
||||
sticky: '.tt-header__menu',
|
||||
height: 60,
|
||||
move: [
|
||||
{
|
||||
elem: '.tt-header__sidebar',
|
||||
to: '.tt-header__menu',
|
||||
method: 'append'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
//params info
|
||||
bp - responsive breakpoint (number)
|
||||
mobile, desktop - breakpoint params (object)
|
||||
bp.sticky - sticky element (selector)
|
||||
bp.limit - breakpoint to start sticky (number, 'bottom')
|
||||
bp.height - change sticky element height (number)
|
||||
bp.fade - fade effect (bool)
|
||||
bp.duration - effects duration (number)
|
||||
bp.move - move elements inside sticky (array of objects)
|
||||
bp.move.elem - items that are moved (selector)
|
||||
bp.move.to - element to which to move (selector)
|
||||
bp.move.method - jquery method move (string)
|
||||
*/
|
||||
@@ -0,0 +1 @@
|
||||
theme.StickyHeader=function(){function t(){}t.prototype=$.extend({},t.prototype,{init:function(t,i){t.attr("data-sticky-effect");if(t.length){var e={_create:function(){var e=this,t=this.bindings,i=t.find(this.options.mobile&&this.options.mobile.sticky?this.options.mobile.sticky:""),s=t.find(this.options.desktop&&this.options.desktop.sticky?this.options.desktop.sticky:""),o=$("<div>").addClass("header__spacer header__spacer--m").insertBefore(i),n=$("<div>").addClass("header__spacer header__spacer--d").insertBefore(s);function c(){var t=theme.current.is_desktop;e.bp=t?"desktop":"mobile",e.$sticky=t?s:i,e.$spacer=t?n:o,e.$sticky.length&&(t?(o.removeClass("header__spacer--visible"),n.addClass("header__spacer--visible"),i.hasClass(e.sticky_class)&&(e._unfix(i,o),e._return(e.options.mobile))):(n.removeClass("header__spacer--visible"),o.addClass("header__spacer--visible"),s.hasClass(e.sticky_class)&&(e._unfix(s,n),e._return(e.options.desktop))))}function a(){if(e.$sticky.length){var t=e.options[e.bp].limit?e.options[e.bp].limit:0,i=e.$spacer[0].getBoundingClientRect();"bottom"===t&&(t=e.$sticky.hasClass(e.sticky_class)?e.$spacer.innerHeight():e.$sticky.innerHeight()),t*=-1,i.top<t?(e.$sticky.hasClass(e.sticky_class)||(e._fix(e.$sticky,e.$spacer),e._move(e.options[e.bp])),ie||e._check_height(e.$sticky,e.options[e.bp])):e.$sticky.hasClass(e.sticky_class)&&(e._unfix(e.$sticky,e.$spacer),e._return(e.options[e.bp]))}}this.sticky_class="header__content--sticky",c(),a(),$window.on({"theme.resize.stickyHeader":function(){c(),a()},"scroll.stickyHeader":a})},_fix:function(t,i){var e=t.innerHeight();i.height(e),this.options[this.bp].fade&&t.css({opacity:0}).velocity({opacity:theme.animations.sticky_header.opacity},this.options[this.bp].duration()),t.addClass(this.sticky_class)},_unfix:function(t,i){i.removeAttr("style"),this.options[this.bp].fade&&t.velocity("stop",!0),t.removeAttr("style").removeClass(this.sticky_class)},_move:function(t){t.move&&$.each(t.move,function(){var t=$(this.elem),i=$(this.to),e=this.method||"append";this.$elem=t,this.$parent=t.parent(),i[e](t)})},_return:function(t){t.move&&$.each(t.move,function(){var t=this.method||"append";this.$parent[t](this.$elem),this.$elem=null,this.$parent=null})},_check_height:function(t,i){if(i.height){var e=this.$spacer[0].getBoundingClientRect(),s=e.bottom<=i.height?i.height:e.bottom;t.css({"min-height":s})}},getStickyHeight:function(){return this.options[this.bp]?this.options[this.bp].height||$(this.options[this.bp].sticky).innerHeight():0},destroy:function(){$(window).unbind("resize.stickyHeader scroll.stickyHeader"),$.Widget.prototype.destroy.call(this)}};return $.widget("ui.stickyHeader",e),t.stickyHeader(i),this.$sticky=t,{destroy:function(){t.stickyHeader("destroy")}}}}}),theme.StickyHeader=new t},$(function(){theme.StickyHeader()});
|
||||
@@ -0,0 +1,112 @@
|
||||
theme.StickySidebar = function() {
|
||||
function StickySidebar() {
|
||||
this.selectors = {
|
||||
elements: '.js-sticky-sidebar'
|
||||
};
|
||||
};
|
||||
|
||||
StickySidebar.prototype = $.extend({}, StickySidebar.prototype, {
|
||||
init: function ($container, is_parent) {
|
||||
if(edge || ie) {
|
||||
return;
|
||||
}
|
||||
|
||||
var $sticky = $container[is_parent ? 'parents' : 'find'](this.selectors.elements);
|
||||
|
||||
if($sticky.length) {
|
||||
if(moz && $sticky[0].hasAttribute('data-disable-moz')) {
|
||||
return;
|
||||
}
|
||||
|
||||
function calculate($sticky) {
|
||||
$sticky.each(function () {
|
||||
var $this = $(this),
|
||||
$inner = $this.find('[data-sticky-sidebar-inner]');
|
||||
|
||||
if(theme.current.is_desktop) {
|
||||
if(!$this.hasClass('initialize')) {
|
||||
var $parent = $this.parents('[data-sticky-sidebar-parent]'),
|
||||
topSpacing = theme.StickyHeader && theme.StickyHeader.$sticky ? theme.StickyHeader.$sticky.stickyHeader('getStickyHeight') : 0,
|
||||
bottomSpacing = 0,
|
||||
own_topSpacing = $this.attr('data-top-spacing'),
|
||||
own_bottomSpacing = $this.attr('data-bottom-spacing');
|
||||
|
||||
if(own_topSpacing !== undefined) {
|
||||
topSpacing += +own_topSpacing;
|
||||
}
|
||||
|
||||
if(own_bottomSpacing !== undefined) {
|
||||
bottomSpacing += +own_bottomSpacing;
|
||||
}
|
||||
|
||||
$this.stickySidebar({
|
||||
containerSelector: $parent,
|
||||
innerWrapperSelector: $inner,
|
||||
topSpacing: topSpacing,
|
||||
bottomSpacing: bottomSpacing
|
||||
}).addClass('initialize active');
|
||||
} else if(!$this.hasClass('active')) {
|
||||
$this.stickySidebar('updateSticky');
|
||||
$this.addClass('active');
|
||||
}
|
||||
} else {
|
||||
if($this.hasClass('initialize active')) {
|
||||
$this.stickySidebar('destroy');
|
||||
$this.removeClass('initialize active');
|
||||
$this.removeAttr('style');
|
||||
$inner.removeAttr('style');
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$window.on('theme.changed.breakpoint.sticky-sidebar', function () {
|
||||
calculate($sticky);
|
||||
});
|
||||
|
||||
calculate($sticky);
|
||||
}
|
||||
},
|
||||
update: function ($sticky) {
|
||||
if(edge || ie) {
|
||||
return;
|
||||
}
|
||||
|
||||
if($sticky.length && theme.current.is_desktop) {
|
||||
if(moz && $sticky[0].hasAttribute('data-disable-moz')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$sticky.each(function() {
|
||||
var $this = $(this);
|
||||
|
||||
if($this.hasClass('initialize active')) {
|
||||
$this.stickySidebar('updateSticky');
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
destroy: function ($container, is_parent) {
|
||||
if(edge || ie) {
|
||||
return;
|
||||
}
|
||||
|
||||
var $sticky = $container[is_parent ? 'parents' : 'find'](this.selectors.elements);
|
||||
|
||||
if($sticky.length && $sticky.hasClass('initialize')) {
|
||||
if(moz && $sticky[0].hasAttribute('data-disable-moz')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$window.unbind('theme.changed.breakpoint.sticky-sidebar');
|
||||
$sticky.stickySidebar('destroy');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
theme.StickySidebar = new StickySidebar;
|
||||
};
|
||||
|
||||
$(function() {
|
||||
theme.StickySidebar();
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.StickySidebar=function(){function e(){this.selectors={elements:".js-sticky-sidebar"}}e.prototype=$.extend({},e.prototype,{init:function(e,t){if(!edge&&!ie){var i=e[t?"parents":"find"](this.selectors.elements);if(i.length){if(moz&&i[0].hasAttribute("data-disable-moz"))return;function a(e){e.each(function(){var e=$(this),t=e.find("[data-sticky-sidebar-inner]");if(theme.current.is_desktop)if(e.hasClass("initialize"))e.hasClass("active")||(e.stickySidebar("updateSticky"),e.addClass("active"));else{var i=e.parents("[data-sticky-sidebar-parent]"),a=theme.StickyHeader&&theme.StickyHeader.$sticky?theme.StickyHeader.$sticky.stickyHeader("getStickyHeight"):0,s=0,n=e.attr("data-top-spacing"),r=e.attr("data-bottom-spacing");void 0!==n&&(a+=+n),void 0!==r&&(s+=+r),e.stickySidebar({containerSelector:i,innerWrapperSelector:t,topSpacing:a,bottomSpacing:s}).addClass("initialize active")}else e.hasClass("initialize active")&&(e.stickySidebar("destroy"),e.removeClass("initialize active"),e.removeAttr("style"),t.removeAttr("style"))})}$window.on("theme.changed.breakpoint.sticky-sidebar",function(){a(i)}),a(i)}}},update:function(e){if(!edge&&!ie&&e.length&&theme.current.is_desktop){if(moz&&e[0].hasAttribute("data-disable-moz"))return;e.each(function(){var e=$(this);e.hasClass("initialize active")&&e.stickySidebar("updateSticky")})}},destroy:function(e,t){if(!edge&&!ie){var i=e[t?"parents":"find"](this.selectors.elements);if(i.length&&i.hasClass("initialize")){if(moz&&i[0].hasAttribute("data-disable-moz"))return;$window.unbind("theme.changed.breakpoint.sticky-sidebar"),i.stickySidebar("destroy")}}}}),theme.StickySidebar=new e},$(function(){theme.StickySidebar()});
|
||||
@@ -0,0 +1,361 @@
|
||||
theme.Tabs = function() {
|
||||
|
||||
function Tabs() {
|
||||
|
||||
this.selectors = {
|
||||
elements: '[data-js-tabs]'
|
||||
};
|
||||
|
||||
this.load();
|
||||
};
|
||||
|
||||
Tabs.prototype = $.extend({}, Tabs.prototype, {
|
||||
init: function ($tabs) {
|
||||
var $tabs = $tabs || $('.js-tabs').not('.tabs--init');
|
||||
|
||||
var tabsObj = {
|
||||
singleOpen: true,
|
||||
anim_tab_duration: function () {
|
||||
return theme.animations.tabs.duration * 1000;
|
||||
},
|
||||
anim_scroll_duration: function () {
|
||||
return theme.animations.tabs.scroll_duration * 1000;
|
||||
},
|
||||
toggleOnDesktop: true,
|
||||
scrollToOpenMobile: true,
|
||||
effect: 'slide',
|
||||
offsetTop: '.header__content.header__content--sticky'
|
||||
};
|
||||
|
||||
if($tabs.hasClass('product-tabs')) {
|
||||
tabsObj = $.extend(tabsObj, {
|
||||
goToTab: [
|
||||
{
|
||||
elem: '.spr-badge-caption',
|
||||
tab: 'reviews'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
$tabs.ttTabs(tabsObj);
|
||||
},
|
||||
load: function() {
|
||||
$.fn.ttTabs = function (options) {
|
||||
function ttTabs(tabs) {
|
||||
var $tabs = $(tabs),
|
||||
$head = $tabs.find('[data-js-tabs-head]'),
|
||||
$slider = $tabs.find('[data-js-tabs-slider]'),
|
||||
$head_btns = $tabs.find('[data-js-tabs-btn]'),
|
||||
$body_btns = $tabs.find('[data-js-tabs-btn-mobile]'),
|
||||
$body_tabs = $tabs.find('[data-js-tabs-tab]'),
|
||||
$btn_prev = $tabs.find('[data-js-tabs-nav-prev]'),
|
||||
$btn_next = $tabs.find('[data-js-tabs-nav-next]'),
|
||||
breakpoint = 1024,
|
||||
type = $tabs.attr('data-type'),
|
||||
scrollToOpenMobile = (options.scrollToOpenMobile !== undefined) ? options.scrollToOpenMobile : true,
|
||||
singleOpen = (options.singleOpen !== undefined) ? options.singleOpen : true,
|
||||
toggleOnDesktop = (options.toggleOnDesktop !== undefined) ? options.toggleOnDesktop : true,
|
||||
effect = (options.effect !== undefined) ? options.effect : 'slide',
|
||||
goToTab = options.goToTab;
|
||||
|
||||
function _closeTab($btn, data) {
|
||||
var $animElem,
|
||||
this_effect = data.effect || effect,
|
||||
anim_obj = {
|
||||
duration: options.anim_tab_duration(),
|
||||
complete: function () {
|
||||
$(this).removeAttr('style');
|
||||
}
|
||||
};
|
||||
|
||||
function _anim_func($animElem) {
|
||||
switch(this_effect) {
|
||||
case 'toggle':
|
||||
$animElem.hide().removeAttr('style');
|
||||
break;
|
||||
case 'slide':
|
||||
$animElem.velocity('slideUp', anim_obj);
|
||||
break;
|
||||
default:
|
||||
$animElem.velocity('slideUp', anim_obj);
|
||||
}
|
||||
};
|
||||
|
||||
if(data.desktop || singleOpen) {
|
||||
$head_btns.removeClass('active');
|
||||
$animElem = $body_tabs.filter('.active').removeClass('active').find('[data-js-tabs-content]').stop();
|
||||
|
||||
_anim_func($animElem);
|
||||
} else {
|
||||
var index = $head_btns.index($btn);
|
||||
|
||||
$btn.removeClass('active');
|
||||
$animElem = $body_tabs.eq(index).removeClass('active').find('[data-js-tabs-content]').stop();
|
||||
|
||||
_anim_func($animElem);
|
||||
}
|
||||
};
|
||||
|
||||
function _openTab($btn, data) {
|
||||
var index = $head_btns.index($btn),
|
||||
$body_tab_act = $body_tabs.eq(index),
|
||||
$animElem,
|
||||
$sticky = $('.js-sticky-sidebar'),
|
||||
this_effect = data.effect || effect,
|
||||
anim_obj = {
|
||||
duration: options.anim_tab_duration(),
|
||||
progress: function () {
|
||||
if(theme.StickySidebar) {
|
||||
theme.StickySidebar.update($sticky);
|
||||
}
|
||||
},
|
||||
complete: function () {
|
||||
if(data.after) {
|
||||
data.after($body_tab_act);
|
||||
}
|
||||
|
||||
if(theme.StickySidebar) {
|
||||
theme.StickySidebar.update($sticky);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function _anim_func($animElem) {
|
||||
if($slider.hasClass('slick-initialized')) {
|
||||
var btn_l = $btn.last().get(0).getBoundingClientRect().left,
|
||||
btn_r = $btn.last().get(0).getBoundingClientRect().right,
|
||||
slider_l = $slider.get(0).getBoundingClientRect().left,
|
||||
slider_r = $slider.get(0).getBoundingClientRect().right;
|
||||
|
||||
if(btn_r > slider_r) $slider.slick('slickNext');
|
||||
else if(btn_l < slider_l) $slider.slick('slickPrev');
|
||||
}
|
||||
|
||||
switch(this_effect) {
|
||||
case 'toggle':
|
||||
$animElem.show();
|
||||
if(data.after) {
|
||||
data.after($body_tab_act);
|
||||
}
|
||||
break;
|
||||
case 'slide':
|
||||
$animElem.velocity('slideDown', anim_obj);
|
||||
break;
|
||||
default:
|
||||
$animElem.velocity('slideDown', anim_obj);
|
||||
}
|
||||
};
|
||||
|
||||
$btn.addClass('active');
|
||||
$animElem = $body_tab_act.addClass('active').find('> div').stop();
|
||||
|
||||
_anim_func($animElem);
|
||||
};
|
||||
|
||||
function _toTab(tab) {
|
||||
var wind_w = window.innerWidth,
|
||||
desktop = wind_w > breakpoint,
|
||||
$btn = $head_btns.filter('[data-tab="' + tab + '"]');
|
||||
|
||||
function afterOpen() {
|
||||
var tob_t = type === 'horizontal' && desktop ? $tabs.offset().top : $body_btns.eq($head_btns.index($btn)).offset().top,
|
||||
header_h = theme.StickyHeader && theme.StickyHeader.$sticky ? theme.StickyHeader.$sticky.stickyHeader('getStickyHeight') : 0;
|
||||
|
||||
$('html, body').velocity( 'scroll' , {
|
||||
offset: tob_t - header_h,
|
||||
duration: options.anim_scroll_duration()
|
||||
});
|
||||
};
|
||||
|
||||
if(!$btn.hasClass('active')) {
|
||||
_closeTab($btn, {
|
||||
desktop: desktop,
|
||||
effect: 'toggle'
|
||||
});
|
||||
|
||||
_openTab($btn, {
|
||||
desktop: desktop,
|
||||
effect: 'toggle',
|
||||
after: function () {
|
||||
afterOpen();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
afterOpen();
|
||||
}
|
||||
};
|
||||
|
||||
function _btn_disabled(currentSlide) {
|
||||
var btn_last_r = $head_btns.last().get(0).getBoundingClientRect().right,
|
||||
slider_r = $slider.get(0).getBoundingClientRect().right;
|
||||
|
||||
if(currentSlide === 0) $btn_prev.addClass('disabled');
|
||||
else $btn_prev.removeClass('disabled');
|
||||
|
||||
if(btn_last_r <= slider_r) $btn_next.addClass('disabled');
|
||||
else $btn_next.removeClass('disabled');
|
||||
};
|
||||
|
||||
function _slider_init() {
|
||||
if($slider.hasClass('slick-initialized')) return;
|
||||
|
||||
$head.addClass('tabs__head--slider');
|
||||
|
||||
$slider.slick({
|
||||
infinite: false,
|
||||
slidesToShow: 1,
|
||||
variableWidth: true,
|
||||
draggable: false,
|
||||
dots: false,
|
||||
arrows: false
|
||||
});
|
||||
|
||||
$btn_prev.addClass('disabled');
|
||||
|
||||
$slider.on('afterChange', function(e, slick, currentSlide) {
|
||||
_btn_disabled(currentSlide);
|
||||
});
|
||||
|
||||
$btn_prev.on('click', function() {
|
||||
if($(this).hasClass('disabled')) return;
|
||||
$slider.slick('slickPrev');
|
||||
});
|
||||
|
||||
$btn_next.on('click', function() {
|
||||
if($(this).hasClass('disabled')) return;
|
||||
$slider.slick('slickNext');
|
||||
});
|
||||
};
|
||||
|
||||
function _slider_destroy() {
|
||||
if(!$slider.hasClass('slick-initialized')) return;
|
||||
|
||||
$($slider, $btn_prev, $btn_next).off();
|
||||
|
||||
$slider.slick('unslick');
|
||||
|
||||
$head.removeClass('tabs__head--slider');
|
||||
};
|
||||
|
||||
$head_btns.on('click', function (e, trigger) {
|
||||
var $this = $(this),
|
||||
wind_w = window.innerWidth,
|
||||
desktop = wind_w > breakpoint,
|
||||
trigger = (trigger === 'trigger') ? true : false;
|
||||
|
||||
if($this.hasClass('active')) {
|
||||
if(desktop && !toggleOnDesktop) return;
|
||||
|
||||
_closeTab($this, {
|
||||
desktop: desktop
|
||||
});
|
||||
} else {
|
||||
_closeTab($this, {
|
||||
desktop: desktop
|
||||
});
|
||||
|
||||
_openTab($this, {
|
||||
desktop: desktop,
|
||||
after: function ($body_tab_act) {
|
||||
if (!desktop && !trigger && scrollToOpenMobile) {
|
||||
var tob_t = $body_tab_act.find('[data-js-tabs-btn-mobile]').offset().top,
|
||||
header_h = theme.StickyHeader && theme.StickyHeader.$sticky ? theme.StickyHeader.$sticky.stickyHeader('getStickyHeight') : 0;
|
||||
|
||||
$('html, body').velocity('stop').velocity('scroll', {
|
||||
offset: tob_t - header_h,
|
||||
duration: options.anim_scroll_duration()
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$body_btns.on('click', function () {
|
||||
var $this = $(this),
|
||||
$parent = $this.parent(),
|
||||
index = $body_tabs.index($parent);
|
||||
|
||||
$head_btns.eq(index).trigger('click');
|
||||
});
|
||||
|
||||
if($.isArray(goToTab) && goToTab.length) {
|
||||
$(goToTab).each(function () {
|
||||
var _ = this;
|
||||
|
||||
$body.on('click', this.elem, function (e) {
|
||||
_toTab(_.tab, _.scrollTo, _.focus);
|
||||
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if(type === 'horizontal') {
|
||||
$(window).on('theme.resize updateTabs', function () {
|
||||
var wind_w = window.innerWidth,
|
||||
desktop = wind_w > breakpoint,
|
||||
head_w = $slider.innerWidth(),
|
||||
btns_w = 0;
|
||||
|
||||
$head_btns.each(function () {
|
||||
btns_w += $(this).innerWidth();
|
||||
});
|
||||
|
||||
if(desktop) {
|
||||
var $btn_act = $head_btns.filter('.active');
|
||||
|
||||
if(!singleOpen && $btn_act.length > 1) {
|
||||
var $save_active = $btn_act.first();
|
||||
|
||||
_closeTab('', {
|
||||
desktop: desktop
|
||||
});
|
||||
|
||||
_openTab($save_active, {
|
||||
desktop: desktop
|
||||
});
|
||||
}
|
||||
|
||||
if(btns_w > head_w) {
|
||||
_slider_init();
|
||||
if($slider.hasClass('slick-initialized')) {
|
||||
setTimeout(function() {
|
||||
_btn_disabled($head_btns.index($('[data-js-tabs-btn].slick-current')));
|
||||
}, 0);
|
||||
}
|
||||
} else {
|
||||
_slider_destroy();
|
||||
}
|
||||
} else {
|
||||
_slider_destroy();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$head_btns.filter('[data-active="true"]').trigger('click', ['trigger']);
|
||||
|
||||
$(window).trigger('updateTabs');
|
||||
|
||||
$tabs.addClass('tabs--init');
|
||||
|
||||
return $tabs;
|
||||
};
|
||||
|
||||
$(this).each(function() {
|
||||
new ttTabs(this);
|
||||
});
|
||||
};
|
||||
|
||||
this.init();
|
||||
}
|
||||
});
|
||||
|
||||
theme.Tabs = new Tabs;
|
||||
};
|
||||
|
||||
$(function() {
|
||||
theme.Tabs();
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.Tabs=function(){function t(){this.selectors={elements:"[data-js-tabs]"},this.load()}t.prototype=$.extend({},t.prototype,{init:function(t){var e={singleOpen:!0,anim_tab_duration:function(){return 1e3*theme.animations.tabs.duration},anim_scroll_duration:function(){return 1e3*theme.animations.tabs.scroll_duration},toggleOnDesktop:!0,scrollToOpenMobile:!0,effect:"slide",offsetTop:".header__content.header__content--sticky"};(t=t||$(".js-tabs").not(".tabs--init")).hasClass("product-tabs")&&(e=$.extend(e,{goToTab:[{elem:".spr-badge-caption",tab:"reviews"}]})),t.ttTabs(e)},load:function(){$.fn.ttTabs=function(w){function t(t){var n=$(t),o=n.find("[data-js-tabs-head]"),c=n.find("[data-js-tabs-slider]"),r=n.find("[data-js-tabs-btn]"),d=n.find("[data-js-tabs-btn-mobile]"),f=n.find("[data-js-tabs-tab]"),l=n.find("[data-js-tabs-nav-prev]"),h=n.find("[data-js-tabs-nav-next]"),u=1024,b=n.attr("data-type"),g=void 0===w.scrollToOpenMobile||w.scrollToOpenMobile,k=void 0===w.singleOpen||w.singleOpen,v=void 0===w.toggleOnDesktop||w.toggleOnDesktop,p=void 0!==w.effect?w.effect:"slide",e=w.goToTab;function m(t,e){var i=e.effect||p,a={duration:w.anim_tab_duration(),complete:function(){$(this).removeAttr("style")}};function s(t){switch(i){case"toggle":t.hide().removeAttr("style");break;case"slide":t.velocity("slideUp",a);break;default:t.velocity("slideUp",a)}}if(e.desktop||k)r.removeClass("active"),s(f.filter(".active").removeClass("active").find("[data-js-tabs-content]").stop());else{var n=r.index(t);t.removeClass("active"),s(f.eq(n).removeClass("active").find("[data-js-tabs-content]").stop())}}function y(s,n){var t=r.index(s),o=f.eq(t),e=$(".js-sticky-sidebar"),d=n.effect||p,l={duration:w.anim_tab_duration(),progress:function(){theme.StickySidebar&&theme.StickySidebar.update(e)},complete:function(){n.after&&n.after(o),theme.StickySidebar&&theme.StickySidebar.update(e)}};s.addClass("active"),function(t){if(c.hasClass("slick-initialized")){var e=s.last().get(0).getBoundingClientRect().left,i=s.last().get(0).getBoundingClientRect().right,a=c.get(0).getBoundingClientRect().left;c.get(0).getBoundingClientRect().right<i?c.slick("slickNext"):e<a&&c.slick("slickPrev")}switch(d){case"toggle":t.show(),n.after&&n.after(o);break;case"slide":t.velocity("slideDown",l);break;default:t.velocity("slideDown",l)}}(o.addClass("active").find("> div").stop())}function C(t){var e=r.last().get(0).getBoundingClientRect().right,i=c.get(0).getBoundingClientRect().right;0===t?l.addClass("disabled"):l.removeClass("disabled"),e<=i?h.addClass("disabled"):h.removeClass("disabled")}function _(){c.hasClass("slick-initialized")&&($(c,l,h).off(),c.slick("unslick"),o.removeClass("tabs__head--slider"))}return r.on("click",function(t,a){var e=$(this),i=window.innerWidth,s=u<i;a="trigger"===a;if(e.hasClass("active")){if(s&&!v)return;m(e,{desktop:s})}else m(e,{desktop:s}),y(e,{desktop:s,after:function(t){if(!s&&!a&&g){var e=t.find("[data-js-tabs-btn-mobile]").offset().top,i=theme.StickyHeader&&theme.StickyHeader.$sticky?theme.StickyHeader.$sticky.stickyHeader("getStickyHeight"):0;$("html, body").velocity("stop").velocity("scroll",{offset:e-i,duration:w.anim_scroll_duration()})}}})}),d.on("click",function(){var t=$(this).parent(),e=f.index(t);r.eq(e).trigger("click")}),$.isArray(e)&&e.length&&$(e).each(function(){var e=this;$body.on("click",this.elem,function(t){return function(t){var e=window.innerWidth,i=u<e,a=r.filter('[data-tab="'+t+'"]');function s(){var t="horizontal"===b&&i?n.offset().top:d.eq(r.index(a)).offset().top,e=theme.StickyHeader&&theme.StickyHeader.$sticky?theme.StickyHeader.$sticky.stickyHeader("getStickyHeight"):0;$("html, body").velocity("scroll",{offset:t-e,duration:w.anim_scroll_duration()})}a.hasClass("active")?s():(m(a,{desktop:i,effect:"toggle"}),y(a,{desktop:i,effect:"toggle",after:function(){s()}}))}(e.tab,e.scrollTo,e.focus),t.preventDefault(),!1})}),"horizontal"===b&&$(window).on("theme.resize updateTabs",function(){var t=window.innerWidth,e=u<t,i=c.innerWidth(),a=0;if(r.each(function(){a+=$(this).innerWidth()}),e){var s=r.filter(".active");if(!k&&1<s.length){var n=s.first();m("",{desktop:e}),y(n,{desktop:e})}i<a?(c.hasClass("slick-initialized")||(o.addClass("tabs__head--slider"),c.slick({infinite:!1,slidesToShow:1,variableWidth:!0,draggable:!1,dots:!1,arrows:!1}),l.addClass("disabled"),c.on("afterChange",function(t,e,i){C(i)}),l.on("click",function(){$(this).hasClass("disabled")||c.slick("slickPrev")}),h.on("click",function(){$(this).hasClass("disabled")||c.slick("slickNext")})),c.hasClass("slick-initialized")&&setTimeout(function(){C(r.index($("[data-js-tabs-btn].slick-current")))},0)):_()}else _()}),r.filter('[data-active="true"]').trigger("click",["trigger"]),$(window).trigger("updateTabs"),n.addClass("tabs--init"),n}$(this).each(function(){new t(this)})},this.init()}}),theme.Tabs=new t},$(function(){theme.Tabs()});
|
||||
@@ -0,0 +1,55 @@
|
||||
theme.Tooltip = function() {
|
||||
|
||||
function Tooltip() {
|
||||
this.params = {
|
||||
size: 'small',
|
||||
arrow: true,
|
||||
animation: 'fade',
|
||||
inertia: false,
|
||||
duration: [200, 0],
|
||||
delay: 0,
|
||||
theme: 'shella'
|
||||
};
|
||||
|
||||
this.load();
|
||||
};
|
||||
|
||||
Tooltip.prototype = $.extend({}, Tooltip.prototype, {
|
||||
load: function () {
|
||||
this.params = $.extend(this.params, {
|
||||
animation: window.theme.animations.tooltip.type,
|
||||
inertia: window.theme.animations.tooltip.inertia,
|
||||
touch: false
|
||||
});
|
||||
|
||||
this.init();
|
||||
},
|
||||
init: function (obj) {
|
||||
this.params = $.extend(this.params, {
|
||||
duration: [window.theme.animations.tooltip.show_duration * 1000, window.theme.animations.tooltip.hide_duration * 1000]
|
||||
});
|
||||
|
||||
if(obj) {
|
||||
this.params = $.extend(this.params, obj);
|
||||
}
|
||||
|
||||
this.api = tippy('[data-js-tooltip]', this.params);
|
||||
},
|
||||
reinit: function (obj) {
|
||||
this.destroy();
|
||||
this.init(obj);
|
||||
},
|
||||
destroy: function () {
|
||||
if(this.api) {
|
||||
this.api.destroyAll();
|
||||
this.api = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
theme.Tooltip = new Tooltip;
|
||||
};
|
||||
|
||||
$(function() {
|
||||
theme.Tooltip();
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.Tooltip=function(){function t(){this.params={size:"small",arrow:!0,animation:"fade",inertia:!1,duration:[200,0],delay:0,theme:"shella"},this.load()}t.prototype=$.extend({},t.prototype,{load:function(){this.params=$.extend(this.params,{animation:window.theme.animations.tooltip.type,inertia:window.theme.animations.tooltip.inertia,touch:!1}),this.init()},init:function(t){this.params=$.extend(this.params,{duration:[1e3*window.theme.animations.tooltip.show_duration,1e3*window.theme.animations.tooltip.hide_duration]}),t&&(this.params=$.extend(this.params,t)),this.api=tippy("[data-js-tooltip]",this.params)},reinit:function(t){this.destroy(),this.init(t)},destroy:function(){this.api&&(this.api.destroyAll(),this.api=null)}}),theme.Tooltip=new t},$(function(){theme.Tooltip()});
|
||||
@@ -0,0 +1,27 @@
|
||||
theme.Trigger = function() {
|
||||
|
||||
function Trigger() {
|
||||
this.load();
|
||||
};
|
||||
|
||||
Trigger.prototype = $.extend({}, Trigger.prototype, {
|
||||
load: function () {
|
||||
var _ = this;
|
||||
|
||||
$body.on('click', '[data-js-trigger]', function () {
|
||||
_.process($(this).attr('data-js-trigger'));
|
||||
});
|
||||
},
|
||||
process: function (id, event) {
|
||||
event = event || 'click';
|
||||
|
||||
$('[data-js-trigger-id="' + id + '"]').trigger(event);
|
||||
}
|
||||
});
|
||||
|
||||
theme.Trigger = new Trigger;
|
||||
};
|
||||
|
||||
$(function() {
|
||||
theme.Trigger();
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.Trigger=function(){function t(){this.load()}t.prototype=$.extend({},t.prototype,{load:function(){var t=this;$body.on("click","[data-js-trigger]",function(){t.process($(this).attr("data-js-trigger"))})},process:function(t,e){e=e||"click",$('[data-js-trigger-id="'+t+'"]').trigger(e)}}),theme.Trigger=new t},$(function(){theme.Trigger()});
|
||||
@@ -0,0 +1,5 @@
|
||||
/*!
|
||||
* Fotorama 4.6.4 | http://fotorama.io/license/
|
||||
*/
|
||||
fotoramaVersion="4.6.4",function(a,b,c,d,e){"use strict";function f(a){var b="bez_"+d.makeArray(arguments).join("_").replace(".","p");if("function"!=typeof d.easing[b]){var c=function(a,b){var c=[null,null],d=[null,null],e=[null,null],f=function(f,g){return e[g]=3*a[g],d[g]=3*(b[g]-a[g])-e[g],c[g]=1-e[g]-d[g],f*(e[g]+f*(d[g]+f*c[g]))},g=function(a){return e[0]+a*(2*d[0]+3*c[0]*a)},h=function(a){for(var b,c=a,d=0;++d<14&&(b=f(c,0)-a,!(Math.abs(b)<.001));)c-=b/g(c);return c};return function(a){return f(h(a),1)}};d.easing[b]=function(b,d,e,f,g){return f*c([a[0],a[1]],[a[2],a[3]])(d/g)+e}}return b}function g(){}function h(a,b,c){return Math.max(isNaN(b)?-1/0:b,Math.min(isNaN(c)?1/0:c,a))}function i(a){return a.match(/ma/)&&a.match(/-?\d+(?!d)/g)[a.match(/3d/)?12:4]}function j(a){return Ic?+i(a.css("transform")):+a.css("left").replace("px","")}function k(a){var b={};return Ic?b.transform="translate3d("+a+"px,0,0)":b.left=a,b}function l(a){return{"transition-duration":a+"ms"}}function m(a,b){return isNaN(a)?b:a}function n(a,b){return m(+String(a).replace(b||"px",""))}function o(a){return/%$/.test(a)?n(a,"%"):e}function p(a,b){return m(o(a)/100*b,n(a))}function q(a){return(!isNaN(n(a))||!isNaN(n(a,"%")))&&a}function r(a,b,c,d){return(a-(d||0))*(b+(c||0))}function s(a,b,c,d){return-Math.round(a/(b+(c||0))-(d||0))}function t(a){var b=a.data();if(!b.tEnd){var c=a[0],d={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",msTransition:"MSTransitionEnd",transition:"transitionend"};T(c,d[uc.prefixed("transition")],function(a){b.tProp&&a.propertyName.match(b.tProp)&&b.onEndFn()}),b.tEnd=!0}}function u(a,b,c,d){var e,f=a.data();f&&(f.onEndFn=function(){e||(e=!0,clearTimeout(f.tT),c())},f.tProp=b,clearTimeout(f.tT),f.tT=setTimeout(function(){f.onEndFn()},1.5*d),t(a))}function v(a,b){if(a.length){var c=a.data();Ic?(a.css(l(0)),c.onEndFn=g,clearTimeout(c.tT)):a.stop();var d=w(b,function(){return j(a)});return a.css(k(d)),d}}function w(){for(var a,b=0,c=arguments.length;c>b&&(a=b?arguments[b]():arguments[b],"number"!=typeof a);b++);return a}function x(a,b){return Math.round(a+(b-a)/1.5)}function y(){return y.p=y.p||("https:"===c.protocol?"https://":"http://"),y.p}function z(a){var c=b.createElement("a");return c.href=a,c}function A(a,b){if("string"!=typeof a)return a;a=z(a);var c,d;if(a.host.match(/youtube\.com/)&&a.search){if(c=a.search.split("v=")[1]){var e=c.indexOf("&");-1!==e&&(c=c.substring(0,e)),d="youtube"}}else a.host.match(/youtube\.com|youtu\.be/)?(c=a.pathname.replace(/^\/(embed\/|v\/)?/,"").replace(/\/.*/,""),d="youtube"):a.host.match(/vimeo\.com/)&&(d="vimeo",c=a.pathname.replace(/^\/(video\/)?/,"").replace(/\/.*/,""));return c&&d||!b||(c=a.href,d="custom"),c?{id:c,type:d,s:a.search.replace(/^\?/,""),p:y()}:!1}function B(a,b,c){var e,f,g=a.video;return"youtube"===g.type?(f=y()+"img.youtube.com/vi/"+g.id+"/default.jpg",e=f.replace(/\/default.jpg$/,"/hqdefault.jpg"),a.thumbsReady=!0):"vimeo"===g.type?d.ajax({url:y()+"vimeo.com/api/v2/video/"+g.id+".json",dataType:"jsonp",success:function(d){a.thumbsReady=!0,C(b,{img:d[0].thumbnail_large,thumb:d[0].thumbnail_small},a.i,c)}}):a.thumbsReady=!0,{img:e,thumb:f}}function C(a,b,c,e){for(var f=0,g=a.length;g>f;f++){var h=a[f];if(h.i===c&&h.thumbsReady){var i={videoReady:!0};i[Xc]=i[Zc]=i[Yc]=!1,e.splice(f,1,d.extend({},h,i,b));break}}}function D(a){function b(a,b,e){var f=a.children("img").eq(0),g=a.attr("href"),h=a.attr("src"),i=f.attr("src"),j=b.video,k=e?A(g,j===!0):!1;k?g=!1:k=j,c(a,f,d.extend(b,{video:k,img:b.img||g||h||i,thumb:b.thumb||i||h||g}))}function c(a,b,c){var e=c.thumb&&c.img!==c.thumb,f=n(c.width||a.attr("width")),g=n(c.height||a.attr("height"));d.extend(c,{width:f,height:g,thumbratio:S(c.thumbratio||n(c.thumbwidth||b&&b.attr("width")||e||f)/n(c.thumbheight||b&&b.attr("height")||e||g))})}var e=[];return a.children().each(function(){var a=d(this),f=R(d.extend(a.data(),{id:a.attr("id")}));if(a.is("a, img"))b(a,f,!0);else{if(a.is(":empty"))return;c(a,null,d.extend(f,{html:this,_html:a.html()}))}e.push(f)}),e}function E(a){return 0===a.offsetWidth&&0===a.offsetHeight}function F(a){return!d.contains(b.documentElement,a)}function G(a,b,c,d){return G.i||(G.i=1,G.ii=[!0]),d=d||G.i,"undefined"==typeof G.ii[d]&&(G.ii[d]=!0),a()?b():G.ii[d]&&setTimeout(function(){G.ii[d]&&G(a,b,c,d)},c||100),G.i++}function H(a){c.replace(c.protocol+"//"+c.host+c.pathname.replace(/^\/?/,"/")+c.search+"#"+a)}function I(a,b,c,d){var e=a.data(),f=e.measures;if(f&&(!e.l||e.l.W!==f.width||e.l.H!==f.height||e.l.r!==f.ratio||e.l.w!==b.w||e.l.h!==b.h||e.l.m!==c||e.l.p!==d)){var g=f.width,i=f.height,j=b.w/b.h,k=f.ratio>=j,l="scaledown"===c,m="contain"===c,n="cover"===c,o=$(d);k&&(l||m)||!k&&n?(g=h(b.w,0,l?g:1/0),i=g/f.ratio):(k&&n||!k&&(l||m))&&(i=h(b.h,0,l?i:1/0),g=i*f.ratio),a.css({width:g,height:i,left:p(o.x,b.w-g),top:p(o.y,b.h-i)}),e.l={W:f.width,H:f.height,r:f.ratio,w:b.w,h:b.h,m:c,p:d}}return!0}function J(a,b){var c=a[0];c.styLine truncated
|
||||
qe[Xc]=d(N(yb)),qe[Zc]=d(N(Mb+" "+Ob+rc,N(ic))),qe[Yc]=d(N(Mb+" "+Nb+rc,N(hc))),Qe[Xc]=[],Qe[Zc]=[],Qe[Yc]=[],Re[Xc]={},qe.addClass(Ic?mb:lb).toggleClass(qb,!e.controlsonstart),ne.fotorama=this,ie.startAutoplay=function(a){return ie.autoplay?this:(ce=de=!1,t(a||e.autoplay),jd(),this)},ie.stopAutoplay=function(){return ie.autoplay&&(ce=de=!0,jd()),this},ie.show=function(a){var b;"object"!=typeof a?(b=a,a={}):b=a.index,b=">"===b?Gd+1:"<"===b?Gd-1:"<<"===b?0:">>"===b?zd-1:b,b=isNaN(b)?L(b,yd,!0):b,b="undefined"==typeof b?Je||0:b,ie.activeIndex=Je=z(b),Id=E(Je),Jd=U(Je),Kd=x(Je+(Yd?-1:1)),Ed=[Je,Id,Jd],Gd=Md?b:Je;var c=Math.abs(Hd-Gd),d=w(a.time,function(){return Math.min(Vd*(1+(c-1)/12),2*Vd)}),f=a.overPos;a.slow&&(d*=10);var g=Dd;ie.activeFrame=Dd=yd[Je];var i=g===Dd&&!a.user;md(Cd,Dd.i!==yd[x(Fd)].i),lc(Ed,"stage"),tc(Mc?[Gd]:[Gd,E(Gd),U(Gd)]),rd("go",!0),i||fd("show",{user:a.user,time:d}),ce=!0;var j=ie.show.onEnd=function(b){if(!j.ok){if(j.ok=!0,b||cd(!0),i||fd("showend",{user:a.user}),!b&&Wd&&Wd!==e.transition)return ie.setOptions({transition:Wd}),void(Wd=!1);Sb(),Pb(Ed,"stage"),rd("go",!1),Hc(),od(),id(),jd()}};if(Sd){var k=Dd[Xc],l=Je!==Hd?yd[Hd][Xc]:null;ab(k,l,te,{time:d,method:e.transition,onEnd:j},Te)}else _(se,{pos:-r(Gd,Le.w,e.margin,Fd),overPos:f,time:d,onEnd:j});if(Gc(),Nd){Tc();var m=y(Je+h(Gd-Hd,-1,1));Rc({time:d,coo:m!==Je&&a.coo,guessIndex:"undefined"!=typeof a.coo?m:Je,keep:i}),Od&&Oc(d)}return be="undefined"!=typeof Hd&&Hd!==Je,Hd=Je,e.hash&&be&&!ie.eq&&H(Dd.id||Je+1),this},ie.requestFullScreen=function(){return Qd&&!ie.fullScreen&&(_d=Ec.scrollTop(),ae=Ec.scrollLeft(),Q(Ec),rd("x",!0),ee=d.extend({},Le),a.addClass(Zb).appendTo(Dc.addClass(jb)),Cc.addClass(jb),md(Cd,!0,!0),ie.fullScreen=!0,Rd&&vc.request(le),ie.resize(),Pb(Ed,"stage"),Sb(),fd("fullscreenenter")),this},ie.cancelFullScreen=function(){return Rd&&vc.is()?vc.cancel(b):kd(),this},ie.toggleFullScreen=function(){return ie[(ie.fullScreen?"cancel":"request")+"FullScreen"]()},T(b,vc.event,function(){!yd||vc.is()||Cd||kd()}),ie.resize=function(a){if(!yd)return this;var b=arguments[1]||0,c=arguments[2];ed(ie.fullScreen?{width:"100%",maxwidth:null,minwidth:null,height:"100%",maxheight:null,minheight:null}:R(a),[Le,c||ie.fullScreen||e]);var d=Le.width,f=Le.height,g=Le.ratio,i=Ec.height()-(Nd?ye.height():0);return q(d)&&(qe.addClass(ub).css({width:d,minWidth:Le.minwidth||0,maxWidth:Le.maxwidth||ad}),d=Le.W=Le.w=qe.width(),Le.nw=Nd&&p(e.navwidth,d)||d,e.glimpse&&(Le.w-=Math.round(2*(p(e.glimpse,d)||0))),se.css({width:Le.w,marginLeft:(Le.W-Le.w)/2}),f=p(f,i),f=f||g&&d/g,f&&(d=Math.round(d),f=Le.h=Math.round(h(f,p(Le.minheight,i),p(Le.maxheight,i))),re.stop().animate({width:d,height:f},b,function(){qe.removeClass(ub)}),cd(),Nd&&(ye.stop().animate({width:Le.nw},b),Rc({guessIndex:Je,time:b,keep:!0}),Od&&wc.nav&&Oc(b)),$d=c||!0,xd())),Se=re.offset().left,this},ie.setOptions=function(a){return d.extend(e,a),vd(),this},ie.shuffle=function(){return yd&&O(yd)&&vd(),this},ie.destroy=function(){return ie.cancelFullScreen(),ie.stopAutoplay(),yd=ie.data=null,j(),Ed=[],bd(Xc),vd.ok=!1,this},ie.playVideo=function(){var a=Dd,b=a.video,c=Je;return"object"==typeof b&&a.videoReady&&(Rd&&ie.fullScreen&&ie.cancelFullScreen(),G(function(){return!vc.is()||c!==Je},function(){c===Je&&(a.$video=a.$video||d(d.Fotorama.jst.video(b)),a.$video.appendTo(a[Xc]),qe.addClass(nb),Cd=a.$video,o(),we.blur(),De.blur(),fd("loadvideo"))})),this},ie.stopVideo=function(){return md(Cd,!0,!0),this},re.on("mousemove",od),Me=db(se,{onStart:gd,onMove:function(a,b){ld(re,b.edge)},onTouchEnd:hd,onEnd:function(a){ld(re);var b=(Nc&&!ge||a.touch)&&e.arrows&&"always"!==e.arrows;if(a.moved||b&&a.pos!==a.newPos&&!a.control){var c=s(a.newPos,Le.w,e.margin,Fd);ie.show({index:c,time:Sd?Vd:a.time,overPos:a.overPos,user:!0})}else a.aborted||a.control||qd(a.startEvent,b)},timeLow:1,timeHigh:1,friction:2,select:"."+Xb+", ."+Xb+" *",$wrap:re}),Oe=db(ze,{onStart:gd,onMove:function(a,b){ld(ye,b.edge)},onTouchEnd:hd,onEnd:function(a){function b(){Rc.l=a.newPos,id(),jd(),uc(a.newPos,!0)}if(a.moved)a.pos!==a.newPos?(ce=!0,_(ze,{time:a.time,pos:a.newPos,overPos:a.overPos,onEnd:b}),uc(a.newPos),Xd&&ld(ye,K(a.newPos,Oe.min,Oe.max))):b();else{var c=a.$target.closest("."+Mb,ze)[0];c&&sd.call(c,a.startEvent)}},timeLow:.5,timeHigh:2,friction:5,$wrap:ye}),Ne=eb(re,{shift:!0,onEnd:function(a,b){gd(),hd(),ie.show({index:b,slow:a.altKey})}}),Pe=eb(ye,{onEnd:function(a,b){gd(),hd();var c=v(ze)+.25*b;ze.css(k(h(c,Oe.min,Oe.max))),Xd&&ld(ye,K(c,Oe.min,Oe.max)),Pe.prevent={"<":c>=Oe.max,">":c<=Oe.min},clearTimeout(Pe.t),Pe.t=setTimeout(function(){Rc.l=c,uc(c,!0)},Pc),uc(c)}}),qe.hover(function(){setTimeout(function(){fe||nd(!(ge=!0))},0)},function(){ge&&nd(!(ge=!1))}),M(we,function(a){Y(a),td.call(this,a)},{onStart:function(){gd(),Me.control=!0},onTouchEnd:hd}),we.each(function(){W(this,function(a){td.call(this,a)}),ud(this)}),W(Ee,ie.toggleFullScreen),ud(Ee),d.each("load push pop shift unshift reverse sort splice".spliLine truncated
|
||||
@@ -0,0 +1,2 @@
|
||||
// Generated by CoffeeScript 1.9.3
|
||||
(function(){var e;e=function(){function e(e,t){var n,r;this.options={target:"instafeed",get:"popular",resolution:"thumbnail",sortBy:"none",links:!0,mock:!1,useHttp:!1};if(typeof e=="object")for(n in e)r=e[n],this.options[n]=r;this.context=t!=null?t:this,this.unique=this._genKey()}return e.prototype.hasNext=function(){return typeof this.context.nextUrl=="string"&&this.context.nextUrl.length>0},e.prototype.next=function(){return this.hasNext()?this.run(this.context.nextUrl):!1},e.prototype.run=function(t){var n,r,i;if(typeof this.options.clientId!="string"&&typeof this.options.accessToken!="string")throw new Error("Missing clientId or accessToken.");if(typeof this.options.accessToken!="string"&&typeof this.options.clientId!="string")throw new Error("Missing clientId or accessToken.");return this.options.before!=null&&typeof this.options.before=="function"&&this.options.before.call(this),typeof document!="undefined"&&document!==null&&(i=document.createElement("script"),i.id="instafeed-fetcher",i.src=t||this._buildUrl(),n=document.getElementsByTagName("head"),n[0].appendChild(i),r="instafeedCache"+this.unique,window[r]=new e(this.options,this),window[r].unique=this.unique),!0},e.prototype.parse=function(e){var t,n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D;if(typeof e!="object"){if(this.options.error!=null&&typeof this.options.error=="function")return this.options.error.call(this,"Invalid JSON data"),!1;throw new Error("Invalid JSON response")}if(e.meta.code!==200){if(this.options.error!=null&&typeof this.options.error=="function")return this.options.error.call(this,e.meta.error_message),!1;throw new Error("Error from Instagram: "+e.meta.error_message)}if(e.data.length===0){if(this.options.error!=null&&typeof this.options.error=="function")return this.options.error.call(this,"No images were returned from Instagram"),!1;throw new Error("No images were returned from Instagram")}this.options.success!=null&&typeof this.options.success=="function"&&this.options.success.call(this,e),this.context.nextUrl="",e.pagination!=null&&(this.context.nextUrl=e.pagination.next_url);if(this.options.sortBy!=="none"){this.options.sortBy==="random"?M=["","random"]:M=this.options.sortBy.split("-"),O=M[0]==="least"?!0:!1;switch(M[1]){case"random":e.data.sort(function(){return.5-Math.random()});break;case"recent":e.data=this._sortBy(e.data,"created_time",O);break;case"liked":e.data=this._sortBy(e.data,"likes.count",O);break;case"commented":e.data=this._sortBy(e.data,"comments.count",O);break;default:throw new Error("Invalid option for sortBy: '"+this.options.sortBy+"'.")}}if(typeof document!="undefined"&&document!==null&&this.options.mock===!1){m=e.data,A=parseInt(this.options.limit,10),this.options.limit!=null&&m.length>A&&(m=m.slice(0,A)),u=document.createDocumentFragment(),this.options.filter!=null&&typeof this.options.filter=="function"&&(m=this._filter(m,this.options.filter));if(this.options.template!=null&&typeof this.options.template=="string"){f="",d="",w="",D=document.createElement("div");for(c=0,N=m.length;c<N;c++){h=m[c],p=h.images[this.options.resolution];if(typeof p!="object")throw o="No image found for resolution: "+this.options.resolution+".",new Error(o);E=p.width,y=p.height,b="square",E>y&&(b="landscape"),E<y&&(b="portrait"),v=p.url,l=window.location.protocol.indexOf("http")>=0,l&&!this.options.useHttp&&(v=v.replace(/https?:\/\//,"//")),d=this._makeTemplate(this.options.template,{model:h,id:h.id,link:h.link,type:h.type,image:v,width:E,height:y,orientation:b,caption:this._getObjectProperty(h,"caption.text"),likes:h.likes.count,comments:h.comments.count,location:this._getObjectProperty(h,"location.name")}),f+=d}D.innerHTML=f,i=[],r=0,n=D.childNodes.length;while(r<n)i.push(D.childNodes[r]),r+=1;for(x=0,C=i.length;x<C;x++)L=i[x],u.appendChild(L)}else for(T=0,k=m.length;T<k;T++){h=m[T],g=document.createElement("img"),p=h.images[this.options.resolution];if(typeof p!="object")throw o="No image found for resolution: "+this.options.resolution+".",new Error(o);v=p.url,l=window.location.protocol.indexOf("http")>=0,l&&!this.options.useHttp&&(v=v.replace(/https?:\/\//,"//")),g.src=v,this.options.links===!0?(t=document.createElement("a"),t.href=h.link,t.appendChild(g),u.appendChild(t)):u.appendChild(g)}_=this.options.target,typeof _=="string"&&(_=document.getElementById(_));if(_==null)throw o='No element with id="'+this.options.target+'" on page.',new Error(o);_.appendChild(u),a=document.getElementsByTagName("head")[0],a.removeChild(document.getElementById("instafeed-fetcher")),S="instafeedCache"+this.unique,window[S]=void 0;try{delete window[S]}catch(P){s=P}}return this.options.after!=null&&typeof this.options.after=="function"&&this.options.after.call(this),!0},e.prototype._buildUrl=function(){var e,t,n;e="https://api.instagram.com/v1";switch(this.options.get){case"popular":t="media/popular";break;case"tagged":if(!this.options.tagName)throw new Error("No tag name specified. Use the 'tagName' option.");t="tags/"Line truncated
|
||||
@@ -0,0 +1,76 @@
|
||||
// Ion.RangeSlider | version 2.1.4 | https://github.com/IonDen/ion.rangeSlider
|
||||
;(function(g){"function"===typeof define&&define.amd?define(["jquery"],function(q){g(q,document,window,navigator)}):g(jQuery,document,window,navigator)})(function(g,q,h,t,v){var u=0,p=function(){var a=t.userAgent,b=/msie\s\d+/i;return 0<a.search(b)&&(a=b.exec(a).toString(),a=a.split(" ")[1],9>a)?(g("html").addClass("lt-ie9"),!0):!1}();Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,d=[].slice;if("function"!=typeof b)throw new TypeError;var c=d.call(arguments,1),e=function(){if(this instanceof
|
||||
e){var f=function(){};f.prototype=b.prototype;var f=new f,l=b.apply(f,c.concat(d.call(arguments)));return Object(l)===l?l:f}return b.apply(a,c.concat(d.call(arguments)))};return e});Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var d;if(null==this)throw new TypeError('"this" is null or not defined');var c=Object(this),e=c.length>>>0;if(0===e)return-1;d=+b||0;Infinity===Math.abs(d)&&(d=0);if(d>=e)return-1;for(d=Math.max(0<=d?d:e-Math.abs(d),0);d<e;){if(d in c&&c[d]===a)return d;d++}return-1});
|
||||
var r=function(a,b,d){this.VERSION="2.1.4";this.input=a;this.plugin_count=d;this.old_to=this.old_from=this.update_tm=this.calc_count=this.current_plugin=0;this.raf_id=this.old_min_interval=null;this.is_update=this.is_key=this.no_diapason=this.force_redraw=this.dragging=!1;this.is_start=!0;this.is_click=this.is_resize=this.is_active=this.is_finish=!1;this.$cache={win:g(h),body:g(q.body),input:g(a),cont:null,rs:null,min:null,max:null,from:null,to:null,single:null,bar:null,line:null,s_single:null,s_from:null,
|
||||
s_to:null,shad_single:null,shad_from:null,shad_to:null,edge:null,grid:null,grid_labels:[]};this.coords={x_gap:0,x_pointer:0,w_rs:0,w_rs_old:0,w_handle:0,p_gap:0,p_gap_left:0,p_gap_right:0,p_step:0,p_pointer:0,p_handle:0,p_single_fake:0,p_single_real:0,p_from_fake:0,p_from_real:0,p_to_fake:0,p_to_real:0,p_bar_x:0,p_bar_w:0,grid_gap:0,big_num:0,big:[],big_w:[],big_p:[],big_x:[]};this.labels={w_min:0,w_max:0,w_from:0,w_to:0,w_single:0,p_min:0,p_max:0,p_from_fake:0,p_from_left:0,p_to_fake:0,p_to_left:0,
|
||||
p_single_fake:0,p_single_left:0};var c=this.$cache.input;a=c.prop("value");var e;d={type:"single",min:10,max:100,from:null,to:null,step:1,min_interval:0,max_interval:0,drag_interval:!1,values:[],p_values:[],from_fixed:!1,from_min:null,from_max:null,from_shadow:!1,to_fixed:!1,to_min:null,to_max:null,to_shadow:!1,prettify_enabled:!0,prettify_separator:" ",prettify:null,force_edges:!1,keyboard:!1,keyboard_step:5,grid:!1,grid_margin:!0,grid_num:4,grid_snap:!1,hide_min_max:!1,hide_from_to:!1,prefix:"",
|
||||
postfix:"",max_postfix:"",decorate_both:!0,values_separator:" \u2014 ",input_values_separator:";",disable:!1,onStart:null,onChange:null,onFinish:null,onUpdate:null};c={type:c.data("type"),min:c.data("min"),max:c.data("max"),from:c.data("from"),to:c.data("to"),step:c.data("step"),min_interval:c.data("minInterval"),max_interval:c.data("maxInterval"),drag_interval:c.data("dragInterval"),values:c.data("values"),from_fixed:c.data("fromFixed"),from_min:c.data("fromMin"),from_max:c.data("fromMax"),from_shadow:c.data("fromShadow"),
|
||||
to_fixed:c.data("toFixed"),to_min:c.data("toMin"),to_max:c.data("toMax"),to_shadow:c.data("toShadow"),prettify_enabled:c.data("prettifyEnabled"),prettify_separator:c.data("prettifySeparator"),force_edges:c.data("forceEdges"),keyboard:c.data("keyboard"),keyboard_step:c.data("keyboardStep"),grid:c.data("grid"),grid_margin:c.data("gridMargin"),grid_num:c.data("gridNum"),grid_snap:c.data("gridSnap"),hide_min_max:c.data("hideMinMax"),hide_from_to:c.data("hideFromTo"),prefix:c.data("prefix"),postfix:c.data("postfix"),
|
||||
max_postfix:c.data("maxPostfix"),decorate_both:c.data("decorateBoth"),values_separator:c.data("valuesSeparator"),input_values_separator:c.data("inputValuesSeparator"),disable:c.data("disable")};c.values=c.values&&c.values.split(",");for(e in c)c.hasOwnProperty(e)&&(c[e]||0===c[e]||delete c[e]);a&&(a=a.split(c.input_values_separator||b.input_values_separator||";"),a[0]&&a[0]==+a[0]&&(a[0]=+a[0]),a[1]&&a[1]==+a[1]&&(a[1]=+a[1]),b&&b.values&&b.values.length?(d.from=a[0]&&b.values.indexOf(a[0]),d.to=
|
||||
a[1]&&b.values.indexOf(a[1])):(d.from=a[0]&&+a[0],d.to=a[1]&&+a[1]));g.extend(d,b);g.extend(d,c);this.options=d;this.validate();this.result={input:this.$cache.input,slider:null,min:this.options.min,max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null};this.init()};r.prototype={init:function(a){this.no_diapason=!1;this.coords.p_step=this.convertToPercent(this.options.step,!0);this.target="base";this.toggleInput();this.append();this.setMinMax();
|
||||
a?(this.force_redraw=!0,this.calc(!0),this.callOnUpdate()):(this.force_redraw=!0,this.calc(!0),this.callOnStart());this.updateScene()},append:function(){this.$cache.input.before('<span class="irs js-irs-'+this.plugin_count+'"></span>');this.$cache.input.prop("readonly",!0);this.$cache.cont=this.$cache.input.prev();this.result.slider=this.$cache.cont;this.$cache.cont.html('<span class="irs"><span class="irs-line" tabindex="-1"><span class="irs-line-left"></span><span class="irs-line-mid"></span><span class="irs-line-right"></span></span><span class="irs-min">0</span><span class="irs-max">1</span><span class="irs-from">0</span><span class="irs-to">0</span><span class="irs-single">0</span></span><span class="irs-grid"></span><span class="irs-bar"></span>');
|
||||
this.$cache.rs=this.$cache.cont.find(".irs");this.$cache.min=this.$cache.cont.find(".irs-min");this.$cache.max=this.$cache.cont.find(".irs-max");this.$cache.from=this.$cache.cont.find(".irs-from");this.$cache.to=this.$cache.cont.find(".irs-to");this.$cache.single=this.$cache.cont.find(".irs-single");this.$cache.bar=this.$cache.cont.find(".irs-bar");this.$cache.line=this.$cache.cont.find(".irs-line");this.$cache.grid=this.$cache.cont.find(".irs-grid");"single"===this.options.type?(this.$cache.cont.append('<span class="irs-bar-edge"></span><span class="irs-shadow shadow-single"></span><span class="irs-slider single"></span>'),
|
||||
this.$cache.edge=this.$cache.cont.find(".irs-bar-edge"),this.$cache.s_single=this.$cache.cont.find(".single"),this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.shad_single=this.$cache.cont.find(".shadow-single")):(this.$cache.cont.append('<span class="irs-shadow shadow-from"></span><span class="irs-shadow shadow-to"></span><span class="irs-slider from"></span><span class="irs-slider to"></span>'),this.$cache.s_from=this.$cache.cont.find(".from"),
|
||||
this.$cache.s_to=this.$cache.cont.find(".to"),this.$cache.shad_from=this.$cache.cont.find(".shadow-from"),this.$cache.shad_to=this.$cache.cont.find(".shadow-to"),this.setTopHandler());this.options.hide_from_to&&(this.$cache.from[0].style.display="none",this.$cache.to[0].style.display="none",this.$cache.single[0].style.display="none");this.appendGrid();this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.cont.removeClass("irs-disabled"),this.$cache.input[0].disabled=
|
||||
!1,this.bindEvents());this.options.drag_interval&&(this.$cache.bar[0].style.cursor="ew-resize")},setTopHandler:function(){var a=this.options.max,b=this.options.to;this.options.from>this.options.min&&b===a?this.$cache.s_from.addClass("type_last"):b<a&&this.$cache.s_to.addClass("type_last")},changeLevel:function(a){switch(a){case "single":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_single_fake);break;case "from":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake);
|
||||
this.$cache.s_from.addClass("state_hover");this.$cache.s_from.addClass("type_last");this.$cache.s_to.removeClass("type_last");break;case "to":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_to_fake);this.$cache.s_to.addClass("state_hover");this.$cache.s_to.addClass("type_last");this.$cache.s_from.removeClass("type_last");break;case "both":this.coords.p_gap_left=this.toFixed(this.coords.p_pointer-this.coords.p_from_fake),this.coords.p_gap_right=this.toFixed(this.coords.p_to_fake-
|
||||
this.coords.p_pointer),this.$cache.s_to.removeClass("type_last"),this.$cache.s_from.removeClass("type_last")}},appendDisableMask:function(){this.$cache.cont.append('<span class="irs-disable-mask"></span>');this.$cache.cont.addClass("irs-disabled")},remove:function(){this.$cache.cont.remove();this.$cache.cont=null;this.$cache.line.off("keydown.irs_"+this.plugin_count);this.$cache.body.off("touchmove.irs_"+this.plugin_count);this.$cache.body.off("mousemove.irs_"+this.plugin_count);this.$cache.win.off("touchend.irs_"+
|
||||
this.plugin_count);this.$cache.win.off("mouseup.irs_"+this.plugin_count);p&&(this.$cache.body.off("mouseup.irs_"+this.plugin_count),this.$cache.body.off("mouseleave.irs_"+this.plugin_count));this.$cache.grid_labels=[];this.coords.big=[];this.coords.big_w=[];this.coords.big_p=[];this.coords.big_x=[];cancelAnimationFrame(this.raf_id)},bindEvents:function(){if(!this.no_diapason){this.$cache.body.on("touchmove.irs_"+this.plugin_count,this.pointerMove.bind(this));this.$cache.body.on("mousemove.irs_"+this.plugin_count,
|
||||
this.pointerMove.bind(this));this.$cache.win.on("touchend.irs_"+this.plugin_count,this.pointerUp.bind(this));this.$cache.win.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this));this.$cache.line.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"));this.$cache.line.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"));this.options.drag_interval&&"double"===this.options.type?(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,
|
||||
"both")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"))):(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")));"single"===this.options.type?(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),
|
||||
this.$cache.shad_single.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.edge.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_single.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))):(this.$cache.single.on("touchstart.irs_"+
|
||||
this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),
|
||||
this.$cache.shad_from.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("mousedown.irs_"+
|
||||
this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")));if(this.options.keyboard)this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard"));p&&(this.$cache.body.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.body.on("mouseleave.irs_"+this.plugin_count,this.pointerUp.bind(this)))}},
|
||||
pointerMove:function(a){this.dragging&&(this.coords.x_pointer=(a.pageX||a.originalEvent.touches&&a.originalEvent.touches[0].pageX)-this.coords.x_gap,this.calc())},pointerUp:function(a){if(this.current_plugin===this.plugin_count&&this.is_active){this.is_active=!1;this.$cache.cont.find(".state_hover").removeClass("state_hover");this.force_redraw=!0;p&&g("*").prop("unselectable",!1);this.updateScene();this.restoreOriginalMinInterval();if(g.contains(this.$cache.cont[0],a.target)||this.dragging)this.is_finish=
|
||||
!0,this.callOnFinish();this.dragging=!1}},pointerDown:function(a,b){b.preventDefault();var d=b.pageX||b.originalEvent.touches&&b.originalEvent.touches[0].pageX;2!==b.button&&("both"===a&&this.setTempMinInterval(),a||(a=this.target),this.current_plugin=this.plugin_count,this.target=a,this.dragging=this.is_active=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=d-this.coords.x_gap,this.calcPointerPercent(),this.changeLevel(a),p&&g("*").prop("unselectable",!0),this.$cache.line.trigger("focus"),
|
||||
this.updateScene())},pointerClick:function(a,b){b.preventDefault();var d=b.pageX||b.originalEvent.touches&&b.originalEvent.touches[0].pageX;2!==b.button&&(this.current_plugin=this.plugin_count,this.target=a,this.is_click=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=+(d-this.coords.x_gap).toFixed(),this.force_redraw=!0,this.calc(),this.$cache.line.trigger("focus"))},key:function(a,b){if(!(this.current_plugin!==this.plugin_count||b.altKey||b.ctrlKey||b.shiftKey||b.metaKey)){switch(b.which){case 83:case 65:case 40:case 37:b.preventDefault();
|
||||
this.moveByKey(!1);break;case 87:case 68:case 38:case 39:b.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(a){var b=this.coords.p_pointer,b=a?b+this.options.keyboard_step:b-this.options.keyboard_step;this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*b);this.is_key=!0;this.calc()},setMinMax:function(){this.options&&(this.options.hide_min_max?(this.$cache.min[0].style.display="none",this.$cache.max[0].style.display="none"):(this.options.values.length?(this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])),
|
||||
this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]))):(this.$cache.min.html(this.decorate(this._prettify(this.options.min),this.options.min)),this.$cache.max.html(this.decorate(this._prettify(this.options.max),this.options.max))),this.labels.w_min=this.$cache.min.outerWidth(!1),this.labels.w_max=this.$cache.max.outerWidth(!1)))},setTempMinInterval:function(){var a=this.result.to-this.result.from;null===this.old_min_interval&&(this.old_min_interval=this.options.min_interval);
|
||||
this.options.min_interval=a},restoreOriginalMinInterval:function(){null!==this.old_min_interval&&(this.options.min_interval=this.old_min_interval,this.old_min_interval=null)},calc:function(a){if(this.options){this.calc_count++;if(10===this.calc_count||a)this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.calcHandlePercent();if(this.coords.w_rs){this.calcPointerPercent();a=this.getHandleX();"click"===this.target&&(this.coords.p_gap=this.coords.p_handle/2,a=this.getHandleX(),this.target=
|
||||
this.options.drag_interval?"both_one":this.chooseHandle(a));switch(this.target){case "base":var b=(this.options.max-this.options.min)/100;a=(this.result.from-this.options.min)/b;b=(this.result.to-this.options.min)/b;this.coords.p_single_real=this.toFixed(a);this.coords.p_from_real=this.toFixed(a);this.coords.p_to_real=this.toFixed(b);this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max);this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,
|
||||
this.options.from_min,this.options.from_max);this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max);this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);this.target=null;break;case "single":if(this.options.from_fixed)break;this.coords.p_single_real=this.convertToRealPercent(a);this.coords.p_single_real=
|
||||
this.calcWithStep(this.coords.p_single_real);this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max);this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);break;case "from":if(this.options.from_fixed)break;this.coords.p_from_real=this.convertToRealPercent(a);this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real);this.coords.p_from_real>this.coords.p_to_real&&(this.coords.p_from_real=this.coords.p_to_real);
|
||||
this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from");this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from");this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case "to":if(this.options.to_fixed)break;this.coords.p_to_real=this.convertToRealPercent(a);this.coords.p_to_real=
|
||||
this.calcWithStep(this.coords.p_to_real);this.coords.p_to_real<this.coords.p_from_real&&(this.coords.p_to_real=this.coords.p_from_real);this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max);this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to");this.coords.p_to_real=this.checkMaxInterval(this.coords.p_to_real,this.coords.p_from_real,"to");this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);
|
||||
break;case "both":if(this.options.from_fixed||this.options.to_fixed)break;a=this.toFixed(a+.1*this.coords.p_handle);this.coords.p_from_real=this.convertToRealPercent(a)-this.coords.p_gap_left;this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real);this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from");this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);
|
||||
this.coords.p_to_real=this.convertToRealPercent(a)+this.coords.p_gap_right;this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real);this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max);this.coords.p_to_real=this.checkMinInterval(this.coords.p_to_real,this.coords.p_from_real,"to");this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break;case "both_one":if(!this.options.from_fixed&&!this.options.to_fixed){var d=this.convertToRealPercent(a);
|
||||
a=this.result.to_percent-this.result.from_percent;var c=a/2,b=d-c,d=d+c;0>b&&(b=0,d=b+a);100<d&&(d=100,b=d-a);this.coords.p_from_real=this.calcWithStep(b);this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);this.coords.p_to_real=this.calcWithStep(d);this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max);this.coords.p_to_fake=
|
||||
this.convertToFakePercent(this.coords.p_to_real)}}"single"===this.options.type?(this.coords.p_bar_x=this.coords.p_handle/2,this.coords.p_bar_w=this.coords.p_single_fake,this.result.from_percent=this.coords.p_single_real,this.result.from=this.convertToValue(this.coords.p_single_real),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from])):(this.coords.p_bar_x=this.toFixed(this.coords.p_from_fake+this.coords.p_handle/2),this.coords.p_bar_w=this.toFixed(this.coords.p_to_fake-
|
||||
this.coords.p_from_fake),this.result.from_percent=this.coords.p_from_real,this.result.from=this.convertToValue(this.coords.p_from_real),this.result.to_percent=this.coords.p_to_real,this.result.to=this.convertToValue(this.coords.p_to_real),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from],this.result.to_value=this.options.values[this.result.to]));this.calcMinMax();this.calcLabels()}}},calcPointerPercent:function(){this.coords.w_rs?(0>this.coords.x_pointer||isNaN(this.coords.x_pointer)?
|
||||
this.coords.x_pointer=0:this.coords.x_pointer>this.coords.w_rs&&(this.coords.x_pointer=this.coords.w_rs),this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)):this.coords.p_pointer=0},convertToRealPercent:function(a){return a/(100-this.coords.p_handle)*100},convertToFakePercent:function(a){return a/100*(100-this.coords.p_handle)},getHandleX:function(){var a=100-this.coords.p_handle,b=this.toFixed(this.coords.p_pointer-this.coords.p_gap);0>b?b=0:b>a&&(b=a);return b},calcHandlePercent:function(){this.coords.w_handle=
|
||||
"single"===this.options.type?this.$cache.s_single.outerWidth(!1):this.$cache.s_from.outerWidth(!1);this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100)},chooseHandle:function(a){return"single"===this.options.type?"single":a>=this.coords.p_from_real+(this.coords.p_to_real-this.coords.p_from_real)/2?this.options.to_fixed?"from":"to":this.options.from_fixed?"to":"from"},calcMinMax:function(){this.coords.w_rs&&(this.labels.p_min=this.labels.w_min/this.coords.w_rs*100,this.labels.p_max=
|
||||
this.labels.w_max/this.coords.w_rs*100)},calcLabels:function(){this.coords.w_rs&&!this.options.hide_from_to&&("single"===this.options.type?(this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=this.coords.p_single_fake+this.coords.p_handle/2-this.labels.p_single_fake/2):(this.labels.w_from=this.$cache.from.outerWidth(!1),this.labels.p_from_fake=this.labels.w_from/this.coords.w_rs*100,this.labels.p_from_left=
|
||||
this.coords.p_from_fake+this.coords.p_handle/2-this.labels.p_from_fake/2,this.labels.p_from_left=this.toFixed(this.labels.p_from_left),this.labels.p_from_left=this.checkEdges(this.labels.p_from_left,this.labels.p_from_fake),this.labels.w_to=this.$cache.to.outerWidth(!1),this.labels.p_to_fake=this.labels.w_to/this.coords.w_rs*100,this.labels.p_to_left=this.coords.p_to_fake+this.coords.p_handle/2-this.labels.p_to_fake/2,this.labels.p_to_left=this.toFixed(this.labels.p_to_left),this.labels.p_to_left=
|
||||
this.checkEdges(this.labels.p_to_left,this.labels.p_to_fake),this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=(this.labels.p_from_left+this.labels.p_to_left+this.labels.p_to_fake)/2-this.labels.p_single_fake/2,this.labels.p_single_left=this.toFixed(this.labels.p_single_left)),this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake))},updateScene:function(){this.raf_id&&
|
||||
(cancelAnimationFrame(this.raf_id),this.raf_id=null);clearTimeout(this.update_tm);this.update_tm=null;this.options&&(this.drawHandles(),this.is_active?this.raf_id=requestAnimationFrame(this.updateScene.bind(this)):this.update_tm=setTimeout(this.updateScene.bind(this),300))},drawHandles:function(){this.coords.w_rs=this.$cache.rs.outerWidth(!1);if(this.coords.w_rs){this.coords.w_rs!==this.coords.w_rs_old&&(this.target="base",this.is_resize=!0);if(this.coords.w_rs!==this.coords.w_rs_old||this.force_redraw)this.setMinMax(),
|
||||
this.calc(!0),this.drawLabels(),this.options.grid&&(this.calcGridMargin(),this.calcGridLabels()),this.force_redraw=!0,this.coords.w_rs_old=this.coords.w_rs,this.drawShadow();if(this.coords.w_rs&&(this.dragging||this.force_redraw||this.is_key)){if(this.old_from!==this.result.from||this.old_to!==this.result.to||this.force_redraw||this.is_key){this.drawLabels();this.$cache.bar[0].style.left=this.coords.p_bar_x+"%";this.$cache.bar[0].style.width=this.coords.p_bar_w+"%";if("single"===this.options.type)this.$cache.s_single[0].style.left=
|
||||
this.coords.p_single_fake+"%",this.$cache.single[0].style.left=this.labels.p_single_left+"%",this.options.values.length?this.$cache.input.prop("value",this.result.from_value):this.$cache.input.prop("value",this.result.from),this.$cache.input.data("from",this.result.from);else{this.$cache.s_from[0].style.left=this.coords.p_from_fake+"%";this.$cache.s_to[0].style.left=this.coords.p_to_fake+"%";if(this.old_from!==this.result.from||this.force_redraw)this.$cache.from[0].style.left=this.labels.p_from_left+
|
||||
"%";if(this.old_to!==this.result.to||this.force_redraw)this.$cache.to[0].style.left=this.labels.p_to_left+"%";this.$cache.single[0].style.left=this.labels.p_single_left+"%";this.options.values.length?this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value):this.$cache.input.prop("value",this.result.from+this.options.input_values_separator+this.result.to);this.$cache.input.data("from",this.result.from);this.$cache.input.data("to",this.result.to)}this.old_from===
|
||||
this.result.from&&this.old_to===this.result.to||this.is_start||this.$cache.input.trigger("change");this.old_from=this.result.from;this.old_to=this.result.to;this.is_resize||this.is_update||this.is_start||this.is_finish||this.callOnChange();if(this.is_key||this.is_click)this.is_click=this.is_key=!1,this.callOnFinish();this.is_finish=this.is_resize=this.is_update=!1}this.force_redraw=this.is_click=this.is_key=this.is_start=!1}}},drawLabels:function(){if(this.options){var a=this.options.values.length,
|
||||
b=this.options.p_values,d;if(!this.options.hide_from_to)if("single"===this.options.type)a=a?this.decorate(b[this.result.from]):this.decorate(this._prettify(this.result.from),this.result.from),this.$cache.single.html(a),this.calcLabels(),this.$cache.min[0].style.visibility=this.labels.p_single_left<this.labels.p_min+1?"hidden":"visible",this.$cache.max[0].style.visibility=this.labels.p_single_left+this.labels.p_single_fake>100-this.labels.p_max-1?"hidden":"visible";else{a?(this.options.decorate_both?
|
||||
(a=this.decorate(b[this.result.from]),a+=this.options.values_separator,a+=this.decorate(b[this.result.to])):a=this.decorate(b[this.result.from]+this.options.values_separator+b[this.result.to]),d=this.decorate(b[this.result.from]),b=this.decorate(b[this.result.to])):(this.options.decorate_both?(a=this.decorate(this._prettify(this.result.from),this.result.from),a+=this.options.values_separator,a+=this.decorate(this._prettify(this.result.to),this.result.to)):a=this.decorate(this._prettify(this.result.from)+
|
||||
this.options.values_separator+this._prettify(this.result.to),this.result.to),d=this.decorate(this._prettify(this.result.from),this.result.from),b=this.decorate(this._prettify(this.result.to),this.result.to));this.$cache.single.html(a);this.$cache.from.html(d);this.$cache.to.html(b);this.calcLabels();b=Math.min(this.labels.p_single_left,this.labels.p_from_left);a=this.labels.p_single_left+this.labels.p_single_fake;d=this.labels.p_to_left+this.labels.p_to_fake;var c=Math.max(a,d);this.labels.p_from_left+
|
||||
this.labels.p_from_fake>=this.labels.p_to_left?(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",this.result.from===this.result.to?("from"===this.target?this.$cache.from[0].style.visibility="visible":"to"===this.target?this.$cache.to[0].style.visibility="visible":this.target||(this.$cache.from[0].style.visibility="visible"),this.$cache.single[0].style.visibility="hidden",c=d):(this.$cache.from[0].style.visibility=
|
||||
"hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",c=Math.max(a,d))):(this.$cache.from[0].style.visibility="visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden");this.$cache.min[0].style.visibility=b<this.labels.p_min+1?"hidden":"visible";this.$cache.max[0].style.visibility=c>100-this.labels.p_max-1?"hidden":"visible"}}},drawShadow:function(){var a=this.options,b=this.$cache,d="number"===typeof a.from_min&&
|
||||
!isNaN(a.from_min),c="number"===typeof a.from_max&&!isNaN(a.from_max),e="number"===typeof a.to_min&&!isNaN(a.to_min),f="number"===typeof a.to_max&&!isNaN(a.to_max);"single"===a.type?a.from_shadow&&(d||c)?(d=this.convertToPercent(d?a.from_min:a.min),c=this.convertToPercent(c?a.from_max:a.max)-d,d=this.toFixed(d-this.coords.p_handle/100*d),c=this.toFixed(c-this.coords.p_handle/100*c),d+=this.coords.p_handle/2,b.shad_single[0].style.display="block",b.shad_single[0].style.left=d+"%",b.shad_single[0].style.width=
|
||||
c+"%"):b.shad_single[0].style.display="none":(a.from_shadow&&(d||c)?(d=this.convertToPercent(d?a.from_min:a.min),c=this.convertToPercent(c?a.from_max:a.max)-d,d=this.toFixed(d-this.coords.p_handle/100*d),c=this.toFixed(c-this.coords.p_handle/100*c),d+=this.coords.p_handle/2,b.shad_from[0].style.display="block",b.shad_from[0].style.left=d+"%",b.shad_from[0].style.width=c+"%"):b.shad_from[0].style.display="none",a.to_shadow&&(e||f)?(e=this.convertToPercent(e?a.to_min:a.min),a=this.convertToPercent(f?
|
||||
a.to_max:a.max)-e,e=this.toFixed(e-this.coords.p_handle/100*e),a=this.toFixed(a-this.coords.p_handle/100*a),e+=this.coords.p_handle/2,b.shad_to[0].style.display="block",b.shad_to[0].style.left=e+"%",b.shad_to[0].style.width=a+"%"):b.shad_to[0].style.display="none")},callOnStart:function(){if(this.options.onStart&&"function"===typeof this.options.onStart)this.options.onStart(this.result)},callOnChange:function(){if(this.options.onChange&&"function"===typeof this.options.onChange)this.options.onChange(this.result)},
|
||||
callOnFinish:function(){if(this.options.onFinish&&"function"===typeof this.options.onFinish)this.options.onFinish(this.result)},callOnUpdate:function(){if(this.options.onUpdate&&"function"===typeof this.options.onUpdate)this.options.onUpdate(this.result)},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input")},convertToPercent:function(a,b){var d=this.options.max-this.options.min;return d?this.toFixed((b?a:a-this.options.min)/(d/100)):(this.no_diapason=!0,0)},convertToValue:function(a){var b=
|
||||
this.options.min,d=this.options.max,c=b.toString().split(".")[1],e=d.toString().split(".")[1],f,l,g=0,k=0;if(0===a)return this.options.min;if(100===a)return this.options.max;c&&(g=f=c.length);e&&(g=l=e.length);f&&l&&(g=f>=l?f:l);0>b&&(k=Math.abs(b),b=+(b+k).toFixed(g),d=+(d+k).toFixed(g));a=(d-b)/100*a+b;(b=this.options.step.toString().split(".")[1])?a=+a.toFixed(b.length):(a/=this.options.step,a*=this.options.step,a=+a.toFixed(0));k&&(a-=k);k=b?+a.toFixed(b.length):this.toFixed(a);k<this.options.min?
|
||||
k=this.options.min:k>this.options.max&&(k=this.options.max);return k},calcWithStep:function(a){var b=Math.round(a/this.coords.p_step)*this.coords.p_step;100<b&&(b=100);100===a&&(b=100);return this.toFixed(b)},checkMinInterval:function(a,b,d){var c=this.options;if(!c.min_interval)return a;a=this.convertToValue(a);b=this.convertToValue(b);"from"===d?b-a<c.min_interval&&(a=b-c.min_interval):a-b<c.min_interval&&(a=b+c.min_interval);return this.convertToPercent(a)},checkMaxInterval:function(a,b,d){var c=
|
||||
this.options;if(!c.max_interval)return a;a=this.convertToValue(a);b=this.convertToValue(b);"from"===d?b-a>c.max_interval&&(a=b-c.max_interval):a-b>c.max_interval&&(a=b+c.max_interval);return this.convertToPercent(a)},checkDiapason:function(a,b,d){a=this.convertToValue(a);var c=this.options;"number"!==typeof b&&(b=c.min);"number"!==typeof d&&(d=c.max);a<b&&(a=b);a>d&&(a=d);return this.convertToPercent(a)},toFixed:function(a){a=a.toFixed(9);return+a},_prettify:function(a){return this.options.prettify_enabled?
|
||||
this.options.prettify&&"function"===typeof this.options.prettify?this.options.prettify(a):this.prettify(a):a},prettify:function(a){return a.toString().replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+this.options.prettify_separator)},checkEdges:function(a,b){if(!this.options.force_edges)return this.toFixed(a);0>a?a=0:a>100-b&&(a=100-b);return this.toFixed(a)},validate:function(){var a=this.options,b=this.result,d=a.values,c=d.length,e,f;"string"===typeof a.min&&(a.min=+a.min);"string"===typeof a.max&&
|
||||
(a.max=+a.max);"string"===typeof a.from&&(a.from=+a.from);"string"===typeof a.to&&(a.to=+a.to);"string"===typeof a.step&&(a.step=+a.step);"string"===typeof a.from_min&&(a.from_min=+a.from_min);"string"===typeof a.from_max&&(a.from_max=+a.from_max);"string"===typeof a.to_min&&(a.to_min=+a.to_min);"string"===typeof a.to_max&&(a.to_max=+a.to_max);"string"===typeof a.keyboard_step&&(a.keyboard_step=+a.keyboard_step);"string"===typeof a.grid_num&&(a.grid_num=+a.grid_num);a.max<a.min&&(a.max=a.min);if(c)for(a.p_values=
|
||||
[],a.min=0,a.max=c-1,a.step=1,a.grid_num=a.max,a.grid_snap=!0,f=0;f<c;f++)e=+d[f],isNaN(e)?e=d[f]:(d[f]=e,e=this._prettify(e)),a.p_values.push(e);if("number"!==typeof a.from||isNaN(a.from))a.from=a.min;if("number"!==typeof a.to||isNaN(a.from))a.to=a.max;if("single"===a.type)a.from<a.min&&(a.from=a.min),a.from>a.max&&(a.from=a.max);else{if(a.from<a.min||a.from>a.max)a.from=a.min;if(a.to>a.max||a.to<a.min)a.to=a.max;a.from>a.to&&(a.from=a.to)}if("number"!==typeof a.step||isNaN(a.step)||!a.step||0>a.step)a.step=
|
||||
1;if("number"!==typeof a.keyboard_step||isNaN(a.keyboard_step)||!a.keyboard_step||0>a.keyboard_step)a.keyboard_step=5;"number"===typeof a.from_min&&a.from<a.from_min&&(a.from=a.from_min);"number"===typeof a.from_max&&a.from>a.from_max&&(a.from=a.from_max);"number"===typeof a.to_min&&a.to<a.to_min&&(a.to=a.to_min);"number"===typeof a.to_max&&a.from>a.to_max&&(a.to=a.to_max);if(b){b.min!==a.min&&(b.min=a.min);b.max!==a.max&&(b.max=a.max);if(b.from<b.min||b.from>b.max)b.from=a.from;if(b.to<b.min||b.to>
|
||||
b.max)b.to=a.to}if("number"!==typeof a.min_interval||isNaN(a.min_interval)||!a.min_interval||0>a.min_interval)a.min_interval=0;if("number"!==typeof a.max_interval||isNaN(a.max_interval)||!a.max_interval||0>a.max_interval)a.max_interval=0;a.min_interval&&a.min_interval>a.max-a.min&&(a.min_interval=a.max-a.min);a.max_interval&&a.max_interval>a.max-a.min&&(a.max_interval=a.max-a.min)},decorate:function(a,b){var d="",c=this.options;c.prefix&&(d+=c.prefix);d+=a;c.max_postfix&&(c.values.length&&a===c.p_values[c.max]?
|
||||
(d+=c.max_postfix,c.postfix&&(d+=" ")):b===c.max&&(d+=c.max_postfix,c.postfix&&(d+=" ")));c.postfix&&(d+=c.postfix);return d},updateFrom:function(){this.result.from=this.options.from;this.result.from_percent=this.convertToPercent(this.result.from);this.options.values&&(this.result.from_value=this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to;this.result.to_percent=this.convertToPercent(this.result.to);this.options.values&&(this.result.to_value=this.options.values[this.result.to])},
|
||||
updateResult:function(){this.result.min=this.options.min;this.result.max=this.options.max;this.updateFrom();this.updateTo()},appendGrid:function(){if(this.options.grid){var a=this.options,b,d;b=a.max-a.min;var c=a.grid_num,e=0,f=0,g=4,h,k,m=0,n="";this.calcGridMargin();a.grid_snap?(c=b/a.step,e=this.toFixed(a.step/(b/100))):e=this.toFixed(100/c);4<c&&(g=3);7<c&&(g=2);14<c&&(g=1);28<c&&(g=0);for(b=0;b<c+1;b++){h=g;f=this.toFixed(e*b);100<f&&(f=100,h-=2,0>h&&(h=0));this.coords.big[b]=f;k=(f-e*(b-1))/
|
||||
(h+1);for(d=1;d<=h&&0!==f;d++)m=this.toFixed(f-k*d),n+='<span class="irs-grid-pol small" style="left: '+m+'%"></span>';n+='<span class="irs-grid-pol" style="left: '+f+'%"></span>';m=this.convertToValue(f);m=a.values.length?a.p_values[m]:this._prettify(m);n+='<span class="irs-grid-text js-grid-text-'+b+'" style="left: '+f+'%">'+m+"</span>"}this.coords.big_num=Math.ceil(c+1);this.$cache.cont.addClass("irs-with-grid");this.$cache.grid.html(n);this.cacheGridLabels()}},cacheGridLabels:function(){var a,
|
||||
b,d=this.coords.big_num;for(b=0;b<d;b++)a=this.$cache.grid.find(".js-grid-text-"+b),this.$cache.grid_labels.push(a);this.calcGridLabels()},calcGridLabels:function(){var a,b;b=[];var d=[],c=this.coords.big_num;for(a=0;a<c;a++)this.coords.big_w[a]=this.$cache.grid_labels[a].outerWidth(!1),this.coords.big_p[a]=this.toFixed(this.coords.big_w[a]/this.coords.w_rs*100),this.coords.big_x[a]=this.toFixed(this.coords.big_p[a]/2),b[a]=this.toFixed(this.coords.big[a]-this.coords.big_x[a]),d[a]=this.toFixed(b[a]+
|
||||
this.coords.big_p[a]);this.options.force_edges&&(b[0]<-this.coords.grid_gap&&(b[0]=-this.coords.grid_gap,d[0]=this.toFixed(b[0]+this.coords.big_p[0]),this.coords.big_x[0]=this.coords.grid_gap),d[c-1]>100+this.coords.grid_gap&&(d[c-1]=100+this.coords.grid_gap,b[c-1]=this.toFixed(d[c-1]-this.coords.big_p[c-1]),this.coords.big_x[c-1]=this.toFixed(this.coords.big_p[c-1]-this.coords.grid_gap)));this.calcGridCollision(2,b,d);this.calcGridCollision(4,b,d);for(a=0;a<c;a++)b=this.$cache.grid_labels[a][0],
|
||||
b.style.marginLeft=-this.coords.big_x[a]+"%"},calcGridCollision:function(a,b,d){var c,e,f,g=this.coords.big_num;for(c=0;c<g;c+=a){e=c+a/2;if(e>=g)break;f=this.$cache.grid_labels[e][0];f.style.visibility=d[c]<=b[e]?"visible":"hidden"}},calcGridMargin:function(){this.options.grid_margin&&(this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&(this.coords.w_handle="single"===this.options.type?this.$cache.s_single.outerWidth(!1):this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/
|
||||
this.coords.w_rs*100),this.coords.grid_gap=this.toFixed(this.coords.p_handle/2-.1),this.$cache.grid[0].style.width=this.toFixed(100-this.coords.p_handle)+"%",this.$cache.grid[0].style.left=this.coords.grid_gap+"%"))},update:function(a){this.input&&(this.is_update=!0,this.options.from=this.result.from,this.options.to=this.result.to,this.options=g.extend(this.options,a),this.validate(),this.updateResult(a),this.toggleInput(),this.remove(),this.init(!0))},reset:function(){this.input&&(this.updateResult(),
|
||||
this.update())},destroy:function(){this.input&&(this.toggleInput(),this.$cache.input.prop("readonly",!1),g.data(this.input,"ionRangeSlider",null),this.remove(),this.options=this.input=null)}};g.fn.ionRangeSlider=function(a){return this.each(function(){g.data(this,"ionRangeSlider")||g.data(this,"ionRangeSlider",new r(this,a,u++))})};(function(){for(var a=0,b=["ms","moz","webkit","o"],d=0;d<b.length&&!h.requestAnimationFrame;++d)h.requestAnimationFrame=h[b[d]+"RequestAnimationFrame"],h.cancelAnimationFrame=
|
||||
h[b[d]+"CancelAnimationFrame"]||h[b[d]+"CancelRequestAnimationFrame"];h.requestAnimationFrame||(h.requestAnimationFrame=function(b,d){var f=(new Date).getTime(),g=Math.max(0,16-(f-a)),p=h.setTimeout(function(){b(f+g)},g);a=f+g;return p});h.cancelAnimationFrame||(h.cancelAnimationFrame=function(a){clearTimeout(a)})})()});
|
||||
@@ -0,0 +1 @@
|
||||
!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("jquery")):t.jQueryBridget=e(t,t.jQuery)}(window,function(t,e){"use strict";function i(i,r,a){function h(t,e,n){var o,r="$()."+i+'("'+e+'")';return t.each(function(t,h){var u=a.data(h,i);if(!u)return void s(i+" not initialized. Cannot call methods, i.e. "+r);var d=u[e];if(!d||"_"==e.charAt(0))return void s(r+" is not a valid method");var l=d.apply(u,n);o=void 0===o?l:o}),void 0!==o?o:t}function u(t,e){t.each(function(t,n){var o=a.data(n,i);o?(o.option(e),o._init()):(o=new r(n,e),a.data(n,i,o))})}a=a||e||t.jQuery,a&&(r.prototype.option||(r.prototype.option=function(t){a.isPlainObject(t)&&(this.options=a.extend(!0,this.options,t))}),a.fn[i]=function(t){if("string"==typeof t){var e=o.call(arguments,1);return h(this,t,e)}return u(this,t),this},n(a))}function n(t){!t||t&&t.bridget||(t.bridget=i)}var o=Array.prototype.slice,r=t.console,s="undefined"==typeof r?function(){}:function(t){r.error(t)};return n(e||t.jQuery),i}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{},n=i[t]=i[t]||{};return n[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=0,o=i[n];e=e||[];for(var r=this._onceEvents&&this._onceEvents[t];o;){var s=r&&r[o];s&&(this.off(t,o),delete r[o]),o.apply(this,e),n+=s?0:1,o=i[n]}return this}},t}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("get-size/get-size",[],function(){return e()}):"object"==typeof module&&module.exports?module.exports=e():t.getSize=e()}(window,function(){"use strict";function t(t){var e=parseFloat(t),i=-1==t.indexOf("%")&&!isNaN(e);return i&&e}function e(){}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;u>e;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);r.isBoxSizeOuter=s=200==t(o.width),i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,E=d&&s,b=t(r.width);b!==!1&&(a.width=b+(E?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(E?0:g+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+z),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i],o=n+"MatchesSelector";if(t[o])return o}}();return function(e,i){return e[t](i)}}),function(t,e){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["desandro-matches-selector/matches-selector"],function(i){return e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,require("desandro-matches-selector")):t.fizzyUIUtils=e(t,t.matchesSelector)}(window,function(t,e){var i={};i.extend=function(t,e){for(var i in e)t[i]=e[i];return t},i.modulo=function(t,e){return(t%e+e)%e},i.makeArray=function(t){var e=[];if(Array.isArray(t))e=t;else if(t&&"object"==typeof t&&"number"==tLine truncated
|
||||
@@ -0,0 +1,5 @@
|
||||
/*
|
||||
Copyright (C) Federico Zivolo 2018
|
||||
Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
|
||||
*/(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function e(e){return e&&'[object Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var o=getComputedStyle(e,null);return t?o[t]:o}function o(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function n(e){if(!e)return document.body;switch(e.nodeName){case'HTML':case'BODY':return e.ownerDocument.body;case'#document':return e.body;}var i=t(e),r=i.overflow,p=i.overflowX,s=i.overflowY;return /(auto|scroll|overlay)/.test(r+s+p)?e:n(o(e))}function r(e){return 11===e?re:10===e?pe:re||pe}function p(e){if(!e)return document.documentElement;for(var o=r(10)?document.body:null,n=e.offsetParent;n===o&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TD','TABLE'].indexOf(n.nodeName)&&'static'===t(n,'position')?p(n):n:e?e.ownerDocument.documentElement:document.documentElement}function s(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||p(e.firstElementChild)===e)}function d(e){return null===e.parentNode?e:d(e.parentNode)}function a(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=o?e:t,i=o?t:e,r=document.createRange();r.setStart(n,0),r.setEnd(i,0);var l=r.commonAncestorContainer;if(e!==l&&t!==l||n.contains(i))return s(l)?l:p(l);var f=d(e);return f.host?a(f.host,t):a(e,d(t).host)}function l(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:'top',o='top'===t?'scrollTop':'scrollLeft',n=e.nodeName;if('BODY'===n||'HTML'===n){var i=e.ownerDocument.documentElement,r=e.ownerDocument.scrollingElement||i;return r[o]}return e[o]}function f(e,t){var o=2<arguments.length&&void 0!==arguments[2]&&arguments[2],n=l(t,'top'),i=l(t,'left'),r=o?-1:1;return e.top+=n*r,e.bottom+=n*r,e.left+=i*r,e.right+=i*r,e}function m(e,t){var o='x'===t?'Left':'Top',n='Left'==o?'Right':'Bottom';return parseFloat(e['border'+o+'Width'],10)+parseFloat(e['border'+n+'Width'],10)}function h(e,t,o,n){return J(t['offset'+e],t['scroll'+e],o['client'+e],o['offset'+e],o['scroll'+e],r(10)?parseInt(o['offset'+e])+parseInt(n['margin'+('Height'===e?'Top':'Left')])+parseInt(n['margin'+('Height'===e?'Bottom':'Right')]):0)}function c(e){var t=e.body,o=e.documentElement,n=r(10)&&getComputedStyle(o);return{height:h('Height',t,o,n),width:h('Width',t,o,n)}}function g(e){return le({},e,{right:e.left+e.width,bottom:e.top+e.height})}function u(e){var o={};try{if(r(10)){o=e.getBoundingClientRect();var n=l(e,'top'),i=l(e,'left');o.top+=n,o.left+=i,o.bottom+=n,o.right+=i}else o=e.getBoundingClientRect()}catch(t){}var p={left:o.left,top:o.top,width:o.right-o.left,height:o.bottom-o.top},s='HTML'===e.nodeName?c(e.ownerDocument):{},d=s.width||e.clientWidth||p.right-p.left,a=s.height||e.clientHeight||p.bottom-p.top,f=e.offsetWidth-d,h=e.offsetHeight-a;if(f||h){var u=t(e);f-=m(u,'x'),h-=m(u,'y'),p.width-=f,p.height-=h}return g(p)}function b(e,o){var i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],p=r(10),s='HTML'===o.nodeName,d=u(e),a=u(o),l=n(e),m=t(o),h=parseFloat(m.borderTopWidth,10),c=parseFloat(m.borderLeftWidth,10);i&&s&&(a.top=J(a.top,0),a.left=J(a.left,0));var b=g({top:d.top-a.top-h,left:d.left-a.left-c,width:d.width,height:d.height});if(b.marginTop=0,b.marginLeft=0,!p&&s){var y=parseFloat(m.marginTop,10),w=parseFloat(m.marginLeft,10);b.top-=h-y,b.bottom-=h-y,b.left-=c-w,b.right-=c-w,b.marginTop=y,b.marginLeft=w}return(p&&!i?o.contains(l):o===l&&'BODY'!==l.nodeName)&&(b=f(b,o)),b}function y(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=e.ownerDocument.documentElement,n=b(e,o),i=J(o.clientWidth,window.innerWidth||0),r=J(o.clientHeight,window.innerHeight||0),p=t?0:l(o),s=t?0:l(o,'left'),d={top:p-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:i,height:r};return g(d)}function w(e){var n=e.nodeName;return'BODY'===n||'HTML'===n?!1:'fixed'===t(e,'position')||w(o(e))}function E(e){if(!e||!e.parentElement||r())return document.documentElement;for(var o=e.parentElement;o&&'none'===t(o,'transform');)o=o.parentElement;return o||document.documentElement}function v(e,t,i,r){var p=4<arguments.length&&void 0!==arguments[4]&&arguments[4],s={top:0,left:0},d=p?E(e):a(e,t);if('viewport'===r)s=y(d,p);else{var l;'scrollParent'===r?(l=n(o(t)),'BODY'===l.nodeName&&(l=e.ownerDocument.documentElement)):'window'===r?l=e.ownerDocument.documentElement:l=r;var f=b(l,d,p);if('HTML'===l.nodeName&&!w(d)){var m=c(e.ownerDocument),h=m.height,g=m.width;s.top+=f.top-f.marginTop,s.bottom=h+f.top,s.left+=f.left-f.marginLeft,s.right=g+f.left}else s=f}i=i||0;var u='number'==typeof i;return s.left+=u?i:i.left||0,s.top+=u?i:i.top||0,s.right-=u?i:i.right||0,s.bottom-=u?i:i.bottom||0,s}function x(e){var t=e.width,o=e.height;return t*o}function O(e,t,o,n,i){var r=5<arguments.length&&void 0!==arguments[5]?argumLine truncated
|
||||
//# sourceMappingURL=popper.min.js.map
|
||||
@@ -0,0 +1,202 @@
|
||||
/********************************************
|
||||
- THEMEPUNCH TOOLS Ver. 1.0 -
|
||||
Last Update of Tools 08.03.2018
|
||||
*********************************************/
|
||||
|
||||
|
||||
/*
|
||||
* @fileOverview TouchSwipe - jQuery Plugin
|
||||
* @version 1.6.9
|
||||
*
|
||||
* @author Matt Bryson http://www.github.com/mattbryson
|
||||
* @see https://github.com/mattbryson/TouchSwipe-Jquery-Plugin
|
||||
* @see http://labs.skinkers.com/touchSwipe/
|
||||
* @see http://plugins.jquery.com/project/touchSwipe
|
||||
*
|
||||
* Copyright (c) 2010 Matt Bryson
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
(function(a){if(typeof define==="function"&&define.amd&&define.amd.jQuery){define(["jquery"],a)}else{a(jQuery)}}(function(f){var y="1.6.9",p="left",o="right",e="up",x="down",c="in",A="out",m="none",s="auto",l="swipe",t="pinch",B="tap",j="doubletap",b="longtap",z="hold",E="horizontal",u="vertical",i="all",r=10,g="start",k="move",h="end",q="cancel",a="ontouchstart" in window,v=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,d=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,C="TouchSwipe";var n={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:true,triggerOnTouchLeave:false,allowPageScroll:"auto",fallbackToMouseEvents:true,excludedElements:"label, button, input, select, textarea, a, .noSwipe",preventDefaultEvents:true};f.fn.swipetp=function(H){var G=f(this),F=G.data(C);if(F&&typeof H==="string"){if(F[H]){return F[H].apply(this,Array.prototype.slice.call(arguments,1))}else{f.error("Method "+H+" does not exist on jQuery.swipetp")}}else{if(!F&&(typeof H==="object"||!H)){return w.apply(this,arguments)}}return G};f.fn.swipetp.version=y;f.fn.swipetp.defaults=n;f.fn.swipetp.phases={PHASE_START:g,PHASE_MOVE:k,PHASE_END:h,PHASE_CANCEL:q};f.fn.swipetp.directions={LEFT:p,RIGHT:o,UP:e,DOWN:x,IN:c,OUT:A};f.fn.swipetp.pageScroll={NONE:m,HORIZONTAL:E,VERTICAL:u,AUTO:s};f.fn.swipetp.fingers={ONE:1,TWO:2,THREE:3,ALL:i};function w(F){if(F&&(F.allowPageScroll===undefined&&(F.swipe!==undefined||F.swipeStatus!==undefined))){F.allowPageScroll=m}if(F.click!==undefined&&F.tap===undefined){F.tap=F.click}if(!F){F={}}F=f.extend({},f.fn.swipetp.defaults,F);return this.each(function(){var H=f(this);var G=H.data(C);if(!G){G=new D(this,F);H.data(C,G)}})}function D(a5,aw){var aA=(a||d||!aw.fallbackToMouseEvents),K=aA?(d?(v?"MSPointerDown":"pointerdown"):"touchstart"):"mousedown",az=aA?(d?(v?"MSPointerMove":"pointermove"):"touchmove"):"mousemove",V=aA?(d?(v?"MSPointerUp":"pointerup"):"touchend"):"mouseup",T=aA?null:"mouseleave",aE=(d?(v?"MSPointerCancel":"pointercancel"):"touchcancel");var ah=0,aQ=null,ac=0,a2=0,a0=0,H=1,ar=0,aK=0,N=null;var aS=f(a5);var aa="start";var X=0;var aR=null;var U=0,a3=0,a6=0,ae=0,O=0;var aX=null,ag=null;try{aS.bind(K,aO);aS.bind(aE,ba)}catch(al){f.error("events not supported "+K+","+aE+" on jQuery.swipetp")}this.enable=function(){aS.bind(K,aO);aS.bind(aE,ba);return aS};this.disable=function(){aL();return aS};this.destroy=function(){aL();aS.data(C,null);aS=null};this.option=function(bd,bc){if(aw[bd]!==undefined){if(bc===undefined){return aw[bd]}else{aw[bd]=bc}}else{f.error("Option "+bd+" does not exist on jQuery.swipetp.options")}return null};function aO(be){if(aC()){return}if(f(be.target).closest(aw.excludedElements,aS).length>0){return}var bf=be.originalEvent?be.originalEvent:be;var bd,bg=bf.touches,bc=bg?bg[0]:bf;aa=g;if(bg){X=bg.length}else{be.preventDefault()}ah=0;aQ=null;aK=null;ac=0;a2=0;a0=0;H=1;ar=0;aR=ak();N=ab();S();if(!bg||(X===aw.fingers||aw.fingers===i)||aY()){aj(0,bc);U=au();if(X==2){aj(1,bg[1]);a2=a0=av(aR[0].start,aR[1].start)}if(aw.swipeStatus||aw.pinchStatus){bd=P(bf,aa)}}else{bd=false}if(bd===false){aa=q;P(bf,aa);return bd}else{if(aw.hold){ag=setTimeout(f.proxy(function(){aS.trigger("hold",[bf.target]);if(aw.hold){bd=aw.hold.call(aS,bf,bf.target)}},this),aw.longTapThreshold)}ap(true)}return null}function a4(bf){var bi=bf.originalEvent?bf.originalEvent:bf;if(aa===h||aa===q||an()){return}var be,bj=bi.touches,bd=bj?bj[0]:bi;var bg=aI(bd);a3=au();if(bj){X=bj.length}if(aw.hold){clearTimeout(ag)}aa=k;if(X==2){if(a2==0){aj(1,bj[1]);a2=a0=av(aR[0].start,aR[1].start)}else{aI(bj[1]);a0=av(aR[0].end,aR[1].end);aK=at(aR[0].end,aR[1].end)}H=a8(a2,a0);ar=Math.abs(a2-a0)}if((X===aw.fingers||aw.fingers===i)||!bj||aY()){aQ=aM(bg.start,bg.end);am(bf,aQ);ah=aT(bg.start,bg.end);ac=aN();aJ(aQ,ah);if(aw.swipeStatus||aw.pinchStatus){be=P(bi,aa)}if(!aw.triggerOnTouchEnd||aw.triggerOnTouchLeave){var bc=true;if(aw.triggerOnTouchLeave){var bh=aZ(this);bc=F(bg.end,bh)}if(!aw.triggerOnTouchEnd&&bc){aa=aD(k)}else{if(aw.triggerOnTouchLeave&&!bc){aa=aD(h)}}if(aa==q||aa==h){P(bi,aa)}}}else{aa=q;P(bi,aa)}if(be===false){aa=q;P(bi,aa)}}function M(bc){var bd=bc.originalEvent?bc.originalEvent:bc,be=bd.touches;if(be){if(be.length){G();return true}}if(an()){X=ae}a3=au();ac=aN();if(bb()||!ao()){aa=q;P(bd,aa)}else{if(aw.triggerOnTouchEnd||(aw.triggerOnTouchEnd==false&&aa===k)){bc.preventDefault();aa=h;P(bd,aa)}else{if(!aw.triggerOnTouchEnd&&a7()){aa=h;aG(bd,aa,B)}else{if(aa===k){aa=q;P(bd,aa)}}}}ap(false);return null}function ba(){X=0;a3=0;U=0;a2=0;a0=0;H=1;S();ap(false)}function L(bc){var bd=bc.originalEvent?bc.originalEvent:bc;if(aw.triggerOnTouchLeave){aa=aD(h);P(bd,aa)}}function aL(){aS.Line truncated
|
||||
|
||||
if(typeof(console) === 'undefined') {
|
||||
var console = {};
|
||||
console.log = console.error = console.info = console.debug = console.warn = console.trace = console.dir = console.dirxml = console.group = console.groupEnd = console.time = console.timeEnd = console.assert = console.profile = console.groupCollapsed = function() {};
|
||||
}
|
||||
|
||||
if (window.tplogs==true)
|
||||
try {
|
||||
console.groupCollapsed("ThemePunch GreenSocks Logs");
|
||||
} catch(e) { }
|
||||
|
||||
|
||||
var oldgs = window.GreenSockGlobals;
|
||||
oldgs_queue = window._gsQueue;
|
||||
|
||||
var punchgs = window.GreenSockGlobals = {};
|
||||
|
||||
if (window.tplogs==true)
|
||||
try {
|
||||
console.info("Build GreenSock SandBox for ThemePunch Plugins");
|
||||
console.info("GreenSock TweenLite Engine Initalised by ThemePunch Plugin");
|
||||
} catch(e) {}
|
||||
|
||||
|
||||
/* TWEEN LITE */
|
||||
/*!
|
||||
* VERSION: 1.19.1
|
||||
* DATE: 2017-01-17
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2017, GreenSock. All rights reserved.
|
||||
* This work is subject to the terms at http://greensock.com/standard-license or for
|
||||
* Club GreenSock members, the software agreement that was issued with your membership.
|
||||
*
|
||||
* @author: Jack Doyle, jack@greensock.com
|
||||
*/
|
||||
!function(a,b){"use strict";var c={},d=a.document,e=a.GreenSockGlobals=a.GreenSockGlobals||a;if(!e.TweenLite){var f,g,h,i,j,k=function(a){var b,c=a.split("."),d=e;for(b=0;b<c.length;b++)d[c[b]]=d=d[c[b]]||{};return d},l=k("com.greensock"),m=1e-10,n=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},o=function(){},p=function(){var a=Object.prototype.toString,b=a.call([]);return function(c){return null!=c&&(c instanceof Array||"object"==typeof c&&!!c.push&&a.call(c)===b)}}(),q={},r=function(d,f,g,h){this.sc=q[d]?q[d].sc:[],q[d]=this,this.gsClass=null,this.func=g;var i=[];this.check=function(j){for(var l,m,n,o,p,s=f.length,t=s;--s>-1;)(l=q[f[s]]||new r(f[s],[])).gsClass?(i[s]=l.gsClass,t--):j&&l.sc.push(this);if(0===t&&g){if(m=("com.greensock."+d).split("."),n=m.pop(),o=k(m.join("."))[n]=this.gsClass=g.apply(g,i),h)if(e[n]=c[n]=o,p="undefined"!=typeof module&&module.exports,!p&&"function"==typeof define&&define.amd)define((a.GreenSockAMDPath?a.GreenSockAMDPath+"/":"")+d.split(".").pop(),[],function(){return o});else if(p)if(d===b){module.exports=c[b]=o;for(s in c)o[s]=c[s]}else c[b]&&(c[b][n]=o);for(s=0;s<this.sc.length;s++)this.sc[s].check()}},this.check(!0)},s=a._gsDefine=function(a,b,c,d){return new r(a,b,c,d)},t=l._class=function(a,b,c){return b=b||function(){},s(a,[],function(){return b},c),b};s.globals=e;var u=[0,0,1,1],v=t("easing.Ease",function(a,b,c,d){this._func=a,this._type=c||0,this._power=d||0,this._params=b?u.concat(b):u},!0),w=v.map={},x=v.register=function(a,b,c,d){for(var e,f,g,h,i=b.split(","),j=i.length,k=(c||"easeIn,easeOut,easeInOut").split(",");--j>-1;)for(f=i[j],e=d?t("easing."+f,null,!0):l.easing[f]||{},g=k.length;--g>-1;)h=k[g],w[f+"."+h]=w[h+f]=e[h]=a.getRatio?a:a[h]||new a};for(h=v.prototype,h._calcEnd=!1,h.getRatio=function(a){if(this._func)return this._params[0]=a,this._func.apply(null,this._params);var b=this._type,c=this._power,d=1===b?1-a:2===b?a:.5>a?2*a:2*(1-a);return 1===c?d*=d:2===c?d*=d*d:3===c?d*=d*d*d:4===c&&(d*=d*d*d*d),1===b?1-d:2===b?d:.5>a?d/2:1-d/2},f=["Linear","Quad","Cubic","Quart","Quint,Strong"],g=f.length;--g>-1;)h=f[g]+",Power"+g,x(new v(null,null,1,g),h,"easeOut",!0),x(new v(null,null,2,g),h,"easeIn"+(0===g?",easeNone":"")),x(new v(null,null,3,g),h,"easeInOut");w.linear=l.easing.Linear.easeIn,w.swing=l.easing.Quad.easeInOut;var y=t("events.EventDispatcher",function(a){this._listeners={},this._eventTarget=a||this});h=y.prototype,h.addEventListener=function(a,b,c,d,e){e=e||0;var f,g,h=this._listeners[a],k=0;for(this!==i||j||i.wake(),null==h&&(this._listeners[a]=h=[]),g=h.length;--g>-1;)f=h[g],f.c===b&&f.s===c?h.splice(g,1):0===k&&f.pr<e&&(k=g+1);h.splice(k,0,{c:b,s:c,up:d,pr:e})},h.removeEventListener=function(a,b){var c,d=this._listeners[a];if(d)for(c=d.length;--c>-1;)if(d[c].c===b)return void d.splice(c,1)},h.dispatchEvent=function(a){var b,c,d,e=this._listeners[a];if(e)for(b=e.length,b>1&&(e=e.slice(0)),c=this._eventTarget;--b>-1;)d=e[b],d&&(d.up?d.c.call(d.s||c,{type:a,target:c}):d.c.call(d.s||c))};var z=a.requestAnimationFrame,A=a.cancelAnimationFrame,B=Date.now||function(){return(new Date).getTime()},C=B();for(f=["ms","moz","webkit","o"],g=f.length;--g>-1&&!z;)z=a[f[g]+"RequestAnimationFrame"],A=a[f[g]+"CancelAnimationFrame"]||a[f[g]+"CancelRequestAnimationFrame"];t("Ticker",function(a,b){var c,e,f,g,h,k=this,l=B(),n=b!==!1&&z?"auto":!1,p=500,q=33,r="tick",s=function(a){var b,d,i=B()-C;i>p&&(l+=i-q),C+=i,k.time=(C-l)/1e3,b=k.time-h,(!c||b>0||a===!0)&&(k.frame++,h+=b+(b>=g?.004:g-b),d=!0),a!==!0&&(f=e(s)),d&&k.dispatchEvent(r)};y.call(k),k.time=k.frame=0,k.tick=function(){s(!0)},k.lagSmoothing=function(a,b){p=a||1/m,q=Math.min(b,p,0)},k.sleep=function(){null!=f&&(n&&A?A(f):clearTimeout(f),e=o,f=null,k===i&&(j=!1))},k.wake=function(a){null!==f?k.sleep():a?l+=-C+(C=B()):k.frame>10&&(C=B()-p+5),e=0===c?o:n&&z?z:function(a){return setTimeout(a,1e3*(h-k.time)+1|0)},k===i&&(j=!0),s(2)},k.fps=function(a){return arguments.length?(c=a,g=1/(c||60),h=this.time+g,void k.wake()):c},k.useRAF=function(a){return arguments.length?(k.sleep(),n=a,void k.fps(c)):n},k.fps(a),setTimeout(function(){"auto"===n&&k.frame<5&&"hidden"!==d.visibilityState&&k.useRAF(!1)},1500)}),h=l.Ticker.prototype=new l.events.EventDispatcher,h.constructor=l.Ticker;var D=t("core.Animation",function(a,b){if(this.vars=b=b||{},this._duration=this._totalDuration=a||0,this._delay=Number(b.delay)||0,this._timeScale=1,this._active=b.immediateRender===!0,this.data=b.data,this._reversed=b.reversed===!0,W){j||i.wake();var c=this.vars.useFrames?V:W;c.add(this,c._time),this.vars.paused&&this.paused(!0)}});i=D.ticker=new l.Ticker,h=D.prototype,h._dirty=h._gc=h._initted=h._paused=!1,h._totalTime=h._time=0,h._rawPrevTime=-1,h._next=h._last=h._onUpdate=h._timeline=h.timeline=null,h._paused=!1;var E=function(){j&&B()-C>2e3&&i.wake(),setTimeout(E,2e3)};E(),h.play=function(a,b){return null!=a&&this.seek(a,b),this.reversed(!1).paused(!1)},h.pause=function(a,b){return null!=a&&this.seek(a,b),this.pLine truncated
|
||||
/* TIME LINE LITE */
|
||||
/*!
|
||||
* VERSION: 1.17.0
|
||||
* DATE: 2015-05-27
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2015, GreenSock. All rights reserved.
|
||||
* This work is subject to the terms at http://greensock.com/standard-license or for
|
||||
* Club GreenSock members, the software agreement that was issued with your membership.
|
||||
*
|
||||
* @author: Jack Doyle, jack@greensock.com
|
||||
*/
|
||||
var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(t,e,i){var s=function(t){e.call(this,t),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var i,s,r=this.vars;for(s in r)i=r[s],h(i)&&-1!==i.join("").indexOf("{self}")&&(r[s]=this._swapSelfInParams(i));h(r.tweens)&&this.add(r.tweens,0,r.align,r.stagger)},r=1e-10,n=i._internals,a=s._internals={},o=n.isSelector,h=n.isArray,l=n.lazyTweens,_=n.lazyRender,u=[],f=_gsScope._gsDefine.globals,c=function(t){var e,i={};for(e in t)i[e]=t[e];return i},p=a.pauseCallback=function(t,e,i,s){var n,a=t._timeline,o=a._totalTime,h=t._startTime,l=0>t._rawPrevTime||0===t._rawPrevTime&&a._reversed,_=l?0:r,f=l?r:0;if(e||!this._forcingPlayhead){for(a.pause(h),n=t._prev;n&&n._startTime===h;)n._rawPrevTime=f,n=n._prev;for(n=t._next;n&&n._startTime===h;)n._rawPrevTime=_,n=n._next;e&&e.apply(s||a.vars.callbackScope||a,i||u),(this._forcingPlayhead||!a._paused)&&a.seek(o)}},m=function(t){var e,i=[],s=t.length;for(e=0;e!==s;i.push(t[e++]));return i},d=s.prototype=new e;return s.version="1.17.0",d.constructor=s,d.kill()._gc=d._forcingPlayhead=!1,d.to=function(t,e,s,r){var n=s.repeat&&f.TweenMax||i;return e?this.add(new n(t,e,s),r):this.set(t,s,r)},d.from=function(t,e,s,r){return this.add((s.repeat&&f.TweenMax||i).from(t,e,s),r)},d.fromTo=function(t,e,s,r,n){var a=r.repeat&&f.TweenMax||i;return e?this.add(a.fromTo(t,e,s,r),n):this.set(t,r,n)},d.staggerTo=function(t,e,r,n,a,h,l,_){var u,f=new s({onComplete:h,onCompleteParams:l,callbackScope:_,smoothChildTiming:this.smoothChildTiming});for("string"==typeof t&&(t=i.selector(t)||t),t=t||[],o(t)&&(t=m(t)),n=n||0,0>n&&(t=m(t),t.reverse(),n*=-1),u=0;t.length>u;u++)r.startAt&&(r.startAt=c(r.startAt)),f.to(t[u],e,c(r),u*n);return this.add(f,a)},d.staggerFrom=function(t,e,i,s,r,n,a,o){return i.immediateRender=0!=i.immediateRender,i.runBackwards=!0,this.staggerTo(t,e,i,s,r,n,a,o)},d.staggerFromTo=function(t,e,i,s,r,n,a,o,h){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,this.staggerTo(t,e,s,r,n,a,o,h)},d.call=function(t,e,s,r){return this.add(i.delayedCall(0,t,e,s),r)},d.set=function(t,e,s){return s=this._parseTimeOrLabel(s,0,!0),null==e.immediateRender&&(e.immediateRender=s===this._time&&!this._paused),this.add(new i(t,0,e),s)},s.exportRoot=function(t,e){t=t||{},null==t.smoothChildTiming&&(t.smoothChildTiming=!0);var r,n,a=new s(t),o=a._timeline;for(null==e&&(e=!0),o._remove(a,!0),a._startTime=0,a._rawPrevTime=a._time=a._totalTime=o._time,r=o._first;r;)n=r._next,e&&r instanceof i&&r.target===r.vars.onComplete||a.add(r,r._startTime-r._delay),r=n;return o.add(a,0),a},d.add=function(r,n,a,o){var l,_,u,f,c,p;if("number"!=typeof n&&(n=this._parseTimeOrLabel(n,0,!0,r)),!(r instanceof t)){if(r instanceof Array||r&&r.push&&h(r)){for(a=a||"normal",o=o||0,l=n,_=r.length,u=0;_>u;u++)h(f=r[u])&&(f=new s({tweens:f})),this.add(f,l),"string"!=typeof f&&"function"!=typeof f&&("sequence"===a?l=f._startTime+f.totalDuration()/f._timeScale:"start"===a&&(f._startTime-=f.delay())),l+=o;return this._uncache(!0)}if("string"==typeof r)return this.addLabel(r,n);if("function"!=typeof r)throw"Cannot add "+r+" into the timeline; it is not a tween, timeline, function, or string.";r=i.delayedCall(0,r)}if(e.prototype.add.call(this,r,n),(this._gc||this._time===this._duration)&&!this._paused&&this._duration<this.duration())for(c=this,p=c.rawTime()>r._startTime;c._timeline;)p&&c._timeline.smoothChildTiming?c.totalTime(c._totalTime,!0):c._gc&&c._enabled(!0,!1),c=c._timeline;return this},d.remove=function(e){if(e instanceof t)return this._remove(e,!1);if(e instanceof Array||e&&e.push&&h(e)){for(var i=e.length;--i>-1;)this.remove(e[i]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},d._remove=function(t,i){e.prototype._remove.call(this,t,i);var s=this._last;return s?this._time>s._startTime+s._totalDuration/s._timeScale&&(this._time=this.duration(),this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},d.append=function(t,e){return this.add(t,this._parseTimeOrLabel(null,e,!0,t))},d.insert=d.insertMultiple=function(t,e,i,s){return this.add(t,e||0,i,s)},d.appendMultiple=function(t,e,i,s){return this.add(t,this._parseTimeOrLabel(null,e,!0,t),i,s)},d.addLabel=function(t,e){return this._labels[t]=this._parseTimeOrLabel(e),this},d.addPause=function(t,e,s,r){var n=i.delayedCall(0,p,["{self}",e,s,r],this);return n.data="isPause",this.add(n,t)},d.removeLabel=function(t){return delete this._labels[t],this},d.getLabelTime=function(t){return null!=this._labels[t]?this._labels[t]:-1},d._parseTimeOrLabel=function(e,i,s,r){var n;if(r instancLine truncated
|
||||
|
||||
|
||||
/* EASING PLUGIN*/
|
||||
/*!
|
||||
* VERSION: 1.15.5
|
||||
* DATE: 2016-07-08
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2016, GreenSock. All rights reserved.
|
||||
* This work is subject to the terms at http://greensock.com/standard-license or for
|
||||
* Club GreenSock members, the software agreement that was issued with your membership.
|
||||
*
|
||||
* @author: Jack Doyle, jack@greensock.com
|
||||
**/
|
||||
var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("easing.Back",["easing.Ease"],function(a){var b,c,d,e=_gsScope.GreenSockGlobals||_gsScope,f=e.com.greensock,g=2*Math.PI,h=Math.PI/2,i=f._class,j=function(b,c){var d=i("easing."+b,function(){},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,d},k=a.register||function(){},l=function(a,b,c,d,e){var f=i("easing."+a,{easeOut:new b,easeIn:new c,easeInOut:new d},!0);return k(f,a),f},m=function(a,b,c){this.t=a,this.v=b,c&&(this.next=c,c.prev=this,this.c=c.v-b,this.gap=c.t-a)},n=function(b,c){var d=i("easing."+b,function(a){this._p1=a||0===a?a:1.70158,this._p2=1.525*this._p1},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,e.config=function(a){return new d(a)},d},o=l("Back",n("BackOut",function(a){return(a-=1)*a*((this._p1+1)*a+this._p1)+1}),n("BackIn",function(a){return a*a*((this._p1+1)*a-this._p1)}),n("BackInOut",function(a){return(a*=2)<1?.5*a*a*((this._p2+1)*a-this._p2):.5*((a-=2)*a*((this._p2+1)*a+this._p2)+2)})),p=i("easing.SlowMo",function(a,b,c){b=b||0===b?b:.7,null==a?a=.7:a>1&&(a=1),this._p=1!==a?b:0,this._p1=(1-a)/2,this._p2=a,this._p3=this._p1+this._p2,this._calcEnd=c===!0},!0),q=p.prototype=new a;return q.constructor=p,q.getRatio=function(a){var b=a+(.5-a)*this._p;return a<this._p1?this._calcEnd?1-(a=1-a/this._p1)*a:b-(a=1-a/this._p1)*a*a*a*b:a>this._p3?this._calcEnd?1-(a=(a-this._p3)/this._p1)*a:b+(a-b)*(a=(a-this._p3)/this._p1)*a*a*a:this._calcEnd?1:b},p.ease=new p(.7,.7),q.config=p.config=function(a,b,c){return new p(a,b,c)},b=i("easing.SteppedEase",function(a){a=a||1,this._p1=1/a,this._p2=a+1},!0),q=b.prototype=new a,q.constructor=b,q.getRatio=function(a){return 0>a?a=0:a>=1&&(a=.999999999),(this._p2*a>>0)*this._p1},q.config=b.config=function(a){return new b(a)},c=i("easing.RoughEase",function(b){b=b||{};for(var c,d,e,f,g,h,i=b.taper||"none",j=[],k=0,l=0|(b.points||20),n=l,o=b.randomize!==!1,p=b.clamp===!0,q=b.template instanceof a?b.template:null,r="number"==typeof b.strength?.4*b.strength:.4;--n>-1;)c=o?Math.random():1/l*n,d=q?q.getRatio(c):c,"none"===i?e=r:"out"===i?(f=1-c,e=f*f*r):"in"===i?e=c*c*r:.5>c?(f=2*c,e=f*f*.5*r):(f=2*(1-c),e=f*f*.5*r),o?d+=Math.random()*e-.5*e:n%2?d+=.5*e:d-=.5*e,p&&(d>1?d=1:0>d&&(d=0)),j[k++]={x:c,y:d};for(j.sort(function(a,b){return a.x-b.x}),h=new m(1,1,null),n=l;--n>-1;)g=j[n],h=new m(g.x,g.y,h);this._prev=new m(0,0,0!==h.t?h:h.next)},!0),q=c.prototype=new a,q.constructor=c,q.getRatio=function(a){var b=this._prev;if(a>b.t){for(;b.next&&a>=b.t;)b=b.next;b=b.prev}else for(;b.prev&&a<=b.t;)b=b.prev;return this._prev=b,b.v+(a-b.t)/b.gap*b.c},q.config=function(a){return new c(a)},c.ease=new c,l("Bounce",j("BounceOut",function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}),j("BounceIn",function(a){return(a=1-a)<1/2.75?1-7.5625*a*a:2/2.75>a?1-(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?1-(7.5625*(a-=2.25/2.75)*a+.9375):1-(7.5625*(a-=2.625/2.75)*a+.984375)}),j("BounceInOut",function(a){var b=.5>a;return a=b?1-2*a:2*a-1,a=1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375,b?.5*(1-a):.5*a+.5})),l("Circ",j("CircOut",function(a){return Math.sqrt(1-(a-=1)*a)}),j("CircIn",function(a){return-(Math.sqrt(1-a*a)-1)}),j("CircInOut",function(a){return(a*=2)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)})),d=function(b,c,d){var e=i("easing."+b,function(a,b){this._p1=a>=1?a:1,this._p2=(b||d)/(1>a?a:1),this._p3=this._p2/g*(Math.asin(1/this._p1)||0),this._p2=g/this._p2},!0),f=e.prototype=new a;return f.constructor=e,f.getRatio=c,f.config=function(a,b){return new e(a,b)},e},l("Elastic",d("ElasticOut",function(a){return this._p1*Math.pow(2,-10*a)*Math.sin((a-this._p3)*this._p2)+1},.3),d("ElasticIn",function(a){return-(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*this._p2))},.3),d("ElasticInOut",function(a){return(a*=2)<1?-.5*(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(a-=1))*Math.sin((a-this._p3)*this._p2)*.5+1},.45)),l("Expo",j("ExpoOut",function(a){return 1-Math.pow(2,-10*a)}),j("ExpoIn",function(a){return Math.pow(2,10*(a-1))-.001}),j("ExpoInOut",function(a){return(a*=2)<1?.5*Math.pow(2,10*(a-1)):.5*(2-Math.pow(2,-10*(a-1)))})),l("Sine",j("SineOut",function(a){return Math.sin(a*h)}),j("SineIn",function(a){return-Math.cos(a*h)+1}),j("SineInOut",function(a){return-.5*(Math.cos(Math.PI*a)-1)})),i("easing.EaseLookup",{find:function(b){return a.map[b]}},!0),k(e.SlowMo,"SlowMo","ease,"),k(c,"RoughEase","ease,"),k(b,"SteppedEase","ease,"),o},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(){"use strict";var a=function(){return _gsScope.GreenSockGlobals||_gsScope};"function"==typeof define&&define.amd?define(["TweenLite"],a):"undefined"!Line truncated
|
||||
|
||||
|
||||
/* CSS PLUGIN */
|
||||
/*!
|
||||
* VERSION: 1.19.1
|
||||
* DATE: 2017-01-17
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2017, GreenSock. All rights reserved.
|
||||
* This work is subject to the terms at http://greensock.com/standard-license or for
|
||||
* Club GreenSock members, the software agreement that was issued with your membership.
|
||||
*
|
||||
* @author: Jack Doyle, jack@greensock.com
|
||||
*/
|
||||
var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(a,b){var c,d,e,f,g=function(){a.call(this,"css"),this._overwriteProps.length=0,this.setRatio=g.prototype.setRatio},h=_gsScope._gsDefine.globals,i={},j=g.prototype=new a("css");j.constructor=g,g.version="1.19.1",g.API=2,g.defaultTransformPerspective=0,g.defaultSkewType="compensated",g.defaultSmoothOrigin=!0,j="px",g.suffixMap={top:j,right:j,bottom:j,left:j,width:j,height:j,fontSize:j,padding:j,margin:j,perspective:j,lineHeight:""};var k,l,m,n,o,p,q,r,s=/(?:\-|\.|\b)(\d|\.|e\-)+/g,t=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,u=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,v=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,w=/(?:\d|\-|\+|=|#|\.)*/g,x=/opacity *= *([^)]*)/i,y=/opacity:([^;]*)/i,z=/alpha\(opacity *=.+?\)/i,A=/^(rgb|hsl)/,B=/([A-Z])/g,C=/-([a-z])/gi,D=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,E=function(a,b){return b.toUpperCase()},F=/(?:Left|Right|Width)/i,G=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,H=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,I=/,(?=[^\)]*(?:\(|$))/gi,J=/[\s,\(]/i,K=Math.PI/180,L=180/Math.PI,M={},N={style:{}},O=_gsScope.document||{createElement:function(){return N}},P=function(a,b){return O.createElementNS?O.createElementNS(b||"http://www.w3.org/1999/xhtml",a):O.createElement(a)},Q=P("div"),R=P("img"),S=g._internals={_specialProps:i},T=(_gsScope.navigator||{}).userAgent||"",U=function(){var a=T.indexOf("Android"),b=P("a");return m=-1!==T.indexOf("Safari")&&-1===T.indexOf("Chrome")&&(-1===a||parseFloat(T.substr(a+8,2))>3),o=m&&parseFloat(T.substr(T.indexOf("Version/")+8,2))<6,n=-1!==T.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(T)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(T))&&(p=parseFloat(RegExp.$1)),b?(b.style.cssText="top:1px;opacity:.55;",/^0.55/.test(b.style.opacity)):!1}(),V=function(a){return x.test("string"==typeof a?a:(a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100:1},W=function(a){_gsScope.console&&console.log(a)},X="",Y="",Z=function(a,b){b=b||Q;var c,d,e=b.style;if(void 0!==e[a])return a;for(a=a.charAt(0).toUpperCase()+a.substr(1),c=["O","Moz","ms","Ms","Webkit"],d=5;--d>-1&&void 0===e[c[d]+a];);return d>=0?(Y=3===d?"ms":c[d],X="-"+Y.toLowerCase()+"-",Y+a):null},$=O.defaultView?O.defaultView.getComputedStyle:function(){},_=g.getStyle=function(a,b,c,d,e){var f;return U||"opacity"!==b?(!d&&a.style[b]?f=a.style[b]:(c=c||$(a))?f=c[b]||c.getPropertyValue(b)||c.getPropertyValue(b.replace(B,"-$1").toLowerCase()):a.currentStyle&&(f=a.currentStyle[b]),null==e||f&&"none"!==f&&"auto"!==f&&"auto auto"!==f?f:e):V(a)},aa=S.convertToPixels=function(a,c,d,e,f){if("px"===e||!e)return d;if("auto"===e||!d)return 0;var h,i,j,k=F.test(c),l=a,m=Q.style,n=0>d,o=1===d;if(n&&(d=-d),o&&(d*=100),"%"===e&&-1!==c.indexOf("border"))h=d/100*(k?a.clientWidth:a.clientHeight);else{if(m.cssText="border:0 solid red;position:"+_(a,"position")+";line-height:0;","%"!==e&&l.appendChild&&"v"!==e.charAt(0)&&"rem"!==e)m[k?"borderLeftWidth":"borderTopWidth"]=d+e;else{if(l=a.parentNode||O.body,i=l._gsCache,j=b.ticker.frame,i&&k&&i.time===j)return i.width*d/100;m[k?"width":"height"]=d+e}l.appendChild(Q),h=parseFloat(Q[k?"offsetWidth":"offsetHeight"]),l.removeChild(Q),k&&"%"===e&&g.cacheWidths!==!1&&(i=l._gsCache=l._gsCache||{},i.time=j,i.width=h/d*100),0!==h||f||(h=aa(a,c,d,e,!0))}return o&&(h/=100),n?-h:h},ba=S.calculateOffset=function(a,b,c){if("absolute"!==_(a,"position",c))return 0;var d="left"===b?"Left":"Top",e=_(a,"margin"+d,c);return a["offset"+d]-(aa(a,b,parseFloat(e),e.replace(w,""))||0)},ca=function(a,b){var c,d,e,f={};if(b=b||$(a,null))if(c=b.length)for(;--c>-1;)e=b[c],(-1===e.indexOf("-transform")||Da===e)&&(f[e.replace(C,E)]=b.getPropertyValue(e));else for(c in b)(-1===c.indexOf("Transform")||Ca===c)&&(f[c]=b[c]);else if(b=a.currentStyle||a.style)for(c in b)"string"==typeof c&&void 0===f[c]&&(f[c.replace(C,E)]=b[c]);return U||(f.opacity=V(a)),d=Ra(a,b,!1),f.rotation=d.rotation,f.skewX=d.skewX,f.scaleX=d.scaleX,f.scaleY=d.scaleY,f.x=d.x,f.y=d.y,Fa&&(f.z=d.z,f.rotationX=d.rotationX,f.rotationY=d.rotationY,f.scaleZ=d.scaleZ),f.filters&&delete f.filters,f},da=function(a,b,c,d,e){var f,g,h,i={},j=a.style;for(g in c)"cssText"!==g&&"length"!==g&&isNaN(g)&&(b[g]!==(f=c[g])||e&&e[g])&&-1===g.indexOf("Origin")&&("number"==typeof f||"string"==typeof f)&&(i[g]="auto"!==f||"left"!==g&&"top"!==g?""!==f&&"auto"!==f&&"none"!==f||"string"!=typeof b[g]||""===b[g].replace(v,"")?f:0:ba(a,g),void 0!==j[g]&&(h=new sa(j,g,j[g],h)));if(d)for(g in d)"className"!==g&&(i[g]=d[g]);return{difs:i,firstMPT:h}},ea={width:["Left","Right"],height:["Top","Bottom"]},fa=["marginLeft","marginRight","marginTop","marginBottom"],ga=function(a,b,c){if("svg"===(a.nodeName+"").toLowerCase())return(c||$(a))[b]||0;if(a.getCTLine truncated
|
||||
b=this.format(b).split(",").join(j)):(h=this.format(_(a,this.p,e,!1,this.dflt)),b=this.format(b)),this.parseComplex(a.style,h,b,f,g)}}),ya("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),ya("autoRound,strictUnits",{parser:function(a,b,c,d,e){return e}}),ya("border",{defaultValue:"0px solid #000",parser:function(a,b,c,d,f,g){var h=_(a,"borderTopWidth",e,!1,"0px"),i=this.format(b).split(" "),j=i[0].replace(w,"");return"px"!==j&&(h=parseFloat(h)/aa(a,"borderTopWidth",1,j)+j),this.parseComplex(a.style,this.format(h+" "+_(a,"borderTopStyle",e,!1,"solid")+" "+_(a,"borderTopColor",e,!1,"#000")),i.join(" "),f,g)},color:!0,formatter:function(a){var b=a.split(" ");return b[0]+" "+(b[1]||"solid")+" "+(a.match(pa)||["#000"])[0]}}),ya("borderWidth",{parser:ra("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),ya("float,cssFloat,styleFloat",{parser:function(a,b,c,d,e,f){var g=a.style,h="cssFloat"in g?"cssFloat":"styleFloat";return new ta(g,h,0,0,e,-1,c,!1,0,g[h],b)}});var Ua=function(a){var b,c=this.t,d=c.filter||_(this.data,"filter")||"",e=this.s+this.c*a|0;100===e&&(-1===d.indexOf("atrix(")&&-1===d.indexOf("radient(")&&-1===d.indexOf("oader(")?(c.removeAttribute("filter"),b=!_(this.data,"filter")):(c.filter=d.replace(z,""),b=!0)),b||(this.xn1&&(c.filter=d=d||"alpha(opacity="+e+")"),-1===d.indexOf("pacity")?0===e&&this.xn1||(c.filter=d+" alpha(opacity="+e+")"):c.filter=d.replace(x,"opacity="+e))};ya("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(a,b,c,d,f,g){var h=parseFloat(_(a,"opacity",e,!1,"1")),i=a.style,j="autoAlpha"===c;return"string"==typeof b&&"="===b.charAt(1)&&(b=("-"===b.charAt(0)?-1:1)*parseFloat(b.substr(2))+h),j&&1===h&&"hidden"===_(a,"visibility",e)&&0!==b&&(h=0),U?f=new ta(i,"opacity",h,b-h,f):(f=new ta(i,"opacity",100*h,100*(b-h),f),f.xn1=j?1:0,i.zoom=1,f.type=2,f.b="alpha(opacity="+f.s+")",f.e="alpha(opacity="+(f.s+f.c)+")",f.data=a,f.plugin=g,f.setRatio=Ua),j&&(f=new ta(i,"visibility",0,0,f,-1,null,!1,0,0!==h?"inherit":"hidden",0===b?"hidden":"inherit"),f.xs0="inherit",d._overwriteProps.push(f.n),d._overwriteProps.push(c)),f}});var Va=function(a,b){b&&(a.removeProperty?(("ms"===b.substr(0,2)||"webkit"===b.substr(0,6))&&(b="-"+b),a.removeProperty(b.replace(B,"-$1").toLowerCase())):a.removeAttribute(b))},Wa=function(a){if(this.t._gsClassPT=this,1===a||0===a){this.t.setAttribute("class",0===a?this.b:this.e);for(var b=this.data,c=this.t.style;b;)b.v?c[b.p]=b.v:Va(c,b.p),b=b._next;1===a&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};ya("className",{parser:function(a,b,d,f,g,h,i){var j,k,l,m,n,o=a.getAttribute("class")||"",p=a.style.cssText;if(g=f._classNamePT=new ta(a,d,0,0,g,2),g.setRatio=Wa,g.pr=-11,c=!0,g.b=o,k=ca(a,e),l=a._gsClassPT){for(m={},n=l.data;n;)m[n.p]=1,n=n._next;l.setRatio(1)}return a._gsClassPT=g,g.e="="!==b.charAt(1)?b:o.replace(new RegExp("(?:\\s|^)"+b.substr(2)+"(?![\\w-])"),"")+("+"===b.charAt(0)?" "+b.substr(2):""),a.setAttribute("class",g.e),j=da(a,k,ca(a),i,m),a.setAttribute("class",o),g.data=j.firstMPT,a.style.cssText=p,g=g.xfirst=f.parse(a,j.difs,g,h)}});var Xa=function(a){if((1===a||0===a)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var b,c,d,e,f,g=this.t.style,h=i.transform.parse;if("all"===this.e)g.cssText="",e=!0;else for(b=this.e.split(" ").join("").split(","),d=b.length;--d>-1;)c=b[d],i[c]&&(i[c].parse===h?e=!0:c="transformOrigin"===c?Ea:i[c].p),Va(g,c);e&&(Va(g,Ca),f=this.t._gsTransform,f&&(f.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(ya("clearProps",{parser:function(a,b,d,e,f){return f=new ta(a,d,0,0,f,2),f.setRatio=Xa,f.e=b,f.pr=-10,f.data=e._tween,c=!0,f}}),j="bezier,throwProps,physicsProps,physics2D".split(","),wa=j.length;wa--;)za(j[wa]);j=g.prototype,j._firstPT=j._lastParsedTransform=j._transform=null,j._onInitTween=function(a,b,h,j){if(!a.nodeType)return!1;this._target=q=a,this._tween=h,this._vars=b,r=j,k=b.autoRound,c=!1,d=b.suffixMap||g.suffixMap,e=$(a,""),f=this._overwriteProps;var n,p,s,t,u,v,w,x,z,A=a.style;if(l&&""===A.zIndex&&(n=_(a,"zIndex",e),("auto"===n||""===n)&&this._addLazySet(A,"zIndex",0)),"string"==typeof b&&(t=A.cssText,n=ca(a,e),A.cssText=t+";"+b,n=da(a,n,ca(a)).difs,!U&&y.test(b)&&(n.opacity=parseFloat(RegExp.$1)),b=n,A.cssText=t),b.className?this._firstPT=p=i.className.parse(a,b.className,"className",this,null,null,b):this._firstPT=p=this.parse(a,b,null),this._transformType){for(z=3===this._transformType,Ca?m&&(l=!0,""===A.zIndex&&(w=_(a,"zIndex",e),("auto"===w||""===w)&&this._addLazySet(A,"zIndex",0)),o&&this._addLazySet(A,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(z?"visible":"hidden"))):A.zoom=1,s=p;s&&s._next;)s=s._next;x=new ta(a,"transform",0,0,null,2),this._linkCSSP(x,null,s),x.setRatio=Ca?Ta:Sa,x.data=this._transform||Ra(a,e,!0),x.tween=h,x.pr=-1,f.pop()}if(c){for(;Line truncated
|
||||
|
||||
|
||||
/* SPLIT TEXT UTIL */
|
||||
/*!
|
||||
* VERSION: 0.5.6
|
||||
* DATE: 2017-01-17
|
||||
* UPDATES AND DOCS AT: http://greensock.com
|
||||
*
|
||||
* @license Copyright (c) 2008-2017, GreenSock. All rights reserved.
|
||||
* SplitText is a Club GreenSock membership benefit; You must have a valid membership to use
|
||||
* this code without violating the terms of use. Visit http://greensock.com/club/ to sign up or get more details.
|
||||
* This work is subject to the software agreement that was issued with your membership.
|
||||
*
|
||||
* @author: Jack Doyle, jack@greensock.com
|
||||
*/
|
||||
var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;!function(a){"use strict";var b=a.GreenSockGlobals||a,c=function(a){var c,d=a.split("."),e=b;for(c=0;c<d.length;c++)e[d[c]]=e=e[d[c]]||{};return e},d=c("com.greensock.utils"),e=function(a){var b=a.nodeType,c="";if(1===b||9===b||11===b){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===b||4===b)return a.nodeValue;return c},f=document,g=f.defaultView?f.defaultView.getComputedStyle:function(){},h=/([A-Z])/g,i=function(a,b,c,d){var e;return(c=c||g(a,null))?(a=c.getPropertyValue(b.replace(h,"-$1").toLowerCase()),e=a||c.length?a:c[b]):a.currentStyle&&(c=a.currentStyle,e=c[b]),d?e:parseInt(e,10)||0},j=function(a){return a.length&&a[0]&&(a[0].nodeType&&a[0].style&&!a.nodeType||a[0].length&&a[0][0])?!0:!1},k=function(a){var b,c,d,e=[],f=a.length;for(b=0;f>b;b++)if(c=a[b],j(c))for(d=c.length,d=0;d<c.length;d++)e.push(c[d]);else e.push(c);return e},l=/(?:\r|\n|\t\t)/g,m=/(?:\s\s+)/g,n=55296,o=56319,p=56320,q=127462,r=127487,s=127995,t=127999,u=function(a){return(a.charCodeAt(0)-n<<10)+(a.charCodeAt(1)-p)+65536},v=f.all&&!f.addEventListener,w=" style='position:relative;display:inline-block;"+(v?"*display:inline;*zoom:1;'":"'"),x=function(a,b){a=a||"";var c=-1!==a.indexOf("++"),d=1;return c&&(a=a.split("++").join("")),function(){return"<"+b+w+(a?" class='"+a+(c?d++:"")+"'>":">")}},y=d.SplitText=b.SplitText=function(a,b){if("string"==typeof a&&(a=y.selector(a)),!a)throw"cannot split a null element.";this.elements=j(a)?k(a):[a],this.chars=[],this.words=[],this.lines=[],this._originals=[],this.vars=b||{},this.split(b)},z=function(a,b,c){var d=a.nodeType;if(1===d||9===d||11===d)for(a=a.firstChild;a;a=a.nextSibling)z(a,b,c);else(3===d||4===d)&&(a.nodeValue=a.nodeValue.split(b).join(c))},A=function(a,b){for(var c=b.length;--c>-1;)a.push(b[c])},B=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},C=function(a,b,c){for(var d;a&&a!==b;){if(d=a._next||a.nextSibling)return d.textContent.charAt(0)===c;a=a.parentNode||a._parent}return!1},D=function(a){var b,c,d=B(a.childNodes),e=d.length;for(b=0;e>b;b++)c=d[b],c._isSplit?D(c):(b&&3===c.previousSibling.nodeType?c.previousSibling.nodeValue+=3===c.nodeType?c.nodeValue:c.firstChild.nodeValue:3!==c.nodeType&&a.insertBefore(c.firstChild,c),a.removeChild(c))},E=function(a,b,c,d,e,h,j){var k,l,m,n,o,p,q,r,s,t,u,v,w=g(a),x=i(a,"paddingLeft",w),y=-999,B=i(a,"borderBottomWidth",w)+i(a,"borderTopWidth",w),E=i(a,"borderLeftWidth",w)+i(a,"borderRightWidth",w),F=i(a,"paddingTop",w)+i(a,"paddingBottom",w),G=i(a,"paddingLeft",w)+i(a,"paddingRight",w),H=.2*i(a,"fontSize"),I=i(a,"textAlign",w,!0),J=[],K=[],L=[],M=b.wordDelimiter||" ",N=b.span?"span":"div",O=b.type||b.split||"chars,words,lines",P=e&&-1!==O.indexOf("lines")?[]:null,Q=-1!==O.indexOf("words"),R=-1!==O.indexOf("chars"),S="absolute"===b.position||b.absolute===!0,T=b.linesClass,U=-1!==(T||"").indexOf("++"),V=[];for(P&&1===a.children.length&&a.children[0]._isSplit&&(a=a.children[0]),U&&(T=T.split("++").join("")),l=a.getElementsByTagName("*"),m=l.length,o=[],k=0;m>k;k++)o[k]=l[k];if(P||S)for(k=0;m>k;k++)n=o[k],p=n.parentNode===a,(p||S||R&&!Q)&&(v=n.offsetTop,P&&p&&Math.abs(v-y)>H&&"BR"!==n.nodeName&&(q=[],P.push(q),y=v),S&&(n._x=n.offsetLeft,n._y=v,n._w=n.offsetWidth,n._h=n.offsetHeight),P&&((n._isSplit&&p||!R&&p||Q&&p||!Q&&n.parentNode.parentNode===a&&!n.parentNode._isSplit)&&(q.push(n),n._x-=x,C(n,a,M)&&(n._wordEnd=!0)),"BR"===n.nodeName&&n.nextSibling&&"BR"===n.nextSibling.nodeName&&P.push([])));for(k=0;m>k;k++)n=o[k],p=n.parentNode===a,"BR"!==n.nodeName?(S&&(s=n.style,Q||p||(n._x+=n.parentNode._x,n._y+=n.parentNode._y),s.left=n._x+"px",s.top=n._y+"px",s.position="absolute",s.display="block",s.width=n._w+1+"px",s.height=n._h+"px"),!Q&&R?n._isSplit?(n._next=n.nextSibling,n.parentNode.appendChild(n)):n.parentNode._isSplit?(n._parent=n.parentNode,!n.previousSibling&&n.firstChild&&(n.firstChild._isFirst=!0),n.nextSibling&&" "===n.nextSibling.textContent&&!n.nextSibling.nextSibling&&V.push(n.nextSibling),n._next=n.nextSibling&&n.nextSibling._isFirst?null:n.nextSibling,n.parentNode.removeChild(n),o.splice(k--,1),m--):p||(v=!n.nextSibling&&C(n.parentNode,a,M),n.parentNode._parent&&n.parentNode._parent.appendChild(n),v&&n.parentNode.appendChild(f.createTextNode(" ")),b.span&&(n.style.display="inline"),J.push(n)):n.parentNode._isSplit&&!n._isSplit&&""!==n.innerHTML?K.push(n):R&&!n._isSplit&&(b.span&&(n.style.display="inline"),J.push(n))):P||S?(n.parentNode&&n.parentNode.removeChild(n),o.splice(k--,1),m--):Q||a.appendChild(n);for(k=V.length;--k>-1;)V[k].parentNode.removeChild(V[k]);if(P){for(S&&(t=f.createElement(N),a.appendChild(t),u=t.offsetWidth+"px",v=t.offsetParent===a?0:a.offsetLeft,a.removeChild(t)),s=a.style.cssText,a.style.cssText="display:none;";a.firstChild;)a.removeChild(a.firstChild);for(r=" "===M&&(!S||!Q&&!R),k=0;k<P.length;k++){for(q=P[k],t=f.creatLine truncated
|
||||
|
||||
|
||||
try{
|
||||
window.GreenSockGlobals = null;
|
||||
window._gsQueue = null;
|
||||
window._gsDefine = null;
|
||||
|
||||
delete(window.GreenSockGlobals);
|
||||
delete(window._gsQueue);
|
||||
delete(window._gsDefine);
|
||||
} catch(e) {}
|
||||
|
||||
try{
|
||||
window.GreenSockGlobals = oldgs;
|
||||
window._gsQueue = oldgs_queue;
|
||||
} catch(e) {}
|
||||
|
||||
if (window.tplogs==true)
|
||||
try {
|
||||
console.groupEnd();
|
||||
} catch(e) {}
|
||||
|
||||
(function(e,t){
|
||||
e.waitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage"]};e.expr[":"].uncached=function(t){var n=document.createElement("img");n.src=t.src;return e(t).is('img[src!=""]')&&!n.complete};e.fn.waitForImages=function(t,n,r){if(e.isPlainObject(arguments[0])){n=t.each;r=t.waitForAll;t=t.finished}t=t||e.noop;n=n||e.noop;r=!!r;if(!e.isFunction(t)||!e.isFunction(n)){throw new TypeError("An invalid callback was supplied.")}return this.each(function(){var i=e(this),s=[];if(r){var o=e.waitForImages.hasImageProperties||[],u=/url\((['"]?)(.*?)\1\)/g;i.find("*").each(function(){var t=e(this);if(t.is("img:uncached")){s.push({src:t.attr("src"),element:t[0]})}e.each(o,function(e,n){var r=t.css(n);if(!r){return true}var i;while(i=u.exec(r)){s.push({src:i[2],element:t[0]})}})})}else{i.find("img:uncached").each(function(){s.push({src:this.src,element:this})})}var f=s.length,l=0;if(f==0){t.call(i[0])}e.each(s,function(r,s){var o=new Image;e(o).bind("load error",function(e){l++;n.call(s.element,l,f,e.type=="load");if(l==f){t.call(i[0]);return false}});o.src=s.src})})};
|
||||
})(jQuery);
|
||||
|
||||
/**************************************************************************
|
||||
* jquery.themepunch.revolution.js - jQuery Plugin for Revolution Slider
|
||||
* @version: 5.4.8 (10.06.2018)
|
||||
* @requires jQuery v1.7 or later (tested on 1.9)
|
||||
* @author ThemePunch
|
||||
**************************************************************************/
|
||||
!function(jQuery,undefined){"use strict";var version={core:"5.4.8","revolution.extensions.actions.min.js":"2.1.0","revolution.extensions.carousel.min.js":"1.2.1","revolution.extensions.kenburn.min.js":"1.3.1","revolution.extensions.layeranimation.min.js":"3.6.5","revolution.extensions.navigation.min.js":"1.3.5","revolution.extensions.parallax.min.js":"2.2.3","revolution.extensions.slideanims.min.js":"1.8","revolution.extensions.video.min.js":"2.2.2"};jQuery.fn.extend({revolution:function(i){var e={delay:9e3,responsiveLevels:4064,visibilityLevels:[2048,1024,778,480],gridwidth:960,gridheight:500,minHeight:0,autoHeight:"off",sliderType:"standard",sliderLayout:"auto",fullScreenAutoWidth:"off",fullScreenAlignForce:"off",fullScreenOffsetContainer:"",fullScreenOffset:"0",hideCaptionAtLimit:0,hideAllCaptionAtLimit:0,hideSliderAtLimit:0,disableProgressBar:"off",stopAtSlide:-1,stopAfterLoops:-1,shadow:0,dottedOverlay:"none",startDelay:0,lazyType:"smart",spinner:"spinner0",shuffle:"off",viewPort:{enable:!1,outof:"wait",visible_area:"60%",presize:!1},fallbacks:{isJoomla:!1,panZoomDisableOnMobile:"off",simplifyAll:"on",nextSlideOnWindowFocus:"off",disableFocusListener:!0,ignoreHeightChanges:"off",ignoreHeightChangesSize:0,allowHTML5AutoPlayOnAndroid:!0},parallax:{type:"off",levels:[10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85],origo:"enterpoint",speed:400,bgparallax:"off",opacity:"on",disable_onmobile:"off",ddd_shadow:"on",ddd_bgfreeze:"off",ddd_overflow:"visible",ddd_layer_overflow:"visible",ddd_z_correction:65,ddd_path:"mouse"},scrolleffect:{fade:"off",blur:"off",scale:"off",grayscale:"off",maxblur:10,on_layers:"off",on_slidebg:"off",on_static_layers:"off",on_parallax_layers:"off",on_parallax_static_layers:"off",direction:"both",multiplicator:1.35,multiplicator_layers:.5,tilt:30,disable_on_mobile:"on"},carousel:{easing:punchgs.Power3.easeInOut,speed:800,showLayersAllTime:"off",horizontal_align:"center",vertical_align:"center",infinity:"on",space:0,maxVisibleItems:3,stretch:"off",fadeout:"on",maxRotation:0,minScale:0,vary_fade:"off",vary_rotation:"on",vary_scale:"off",border_radius:"0px",padding_top:0,padding_bottom:0},navigation:{keyboardNavigation:"off",keyboard_direction:"horizontal",mouseScrollNavigation:"off",onHoverStop:"on",touch:{touchenabled:"off",touchOnDesktop:"off",swipe_treshold:75,swipe_min_touches:1,drag_block_vertical:!1,swipe_direction:"horizontal"},arrows:{style:"",enable:!1,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,tmp:"",rtl:!1,left:{h_align:"left",v_align:"center",h_offset:20,v_offset:0,container:"slider"},right:{h_align:"right",v_align:"center",h_offset:20,v_offset:0,container:"slider"}},bullets:{container:"slider",rtl:!1,style:"",enable:!1,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,direction:"horizontal",h_align:"left",v_align:"center",space:0,h_offset:20,v_offset:0,tmp:'<span class="tp-bullet-image"></span><span class="tp-bullet-title"></span>'},thumbnails:{container:"slider",rtl:!1,style:"",enable:!1,width:100,height:50,min_width:100,wrapper_padding:2,wrapper_color:"#f5f5f5",wrapper_opacity:1,tmp:'<span class="tp-thumb-image"></span><span class="tp-thumb-title"></span>',visibleAmount:5,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,direction:"horizontal",span:!1,position:"inner",space:2,h_align:"left",v_align:"center",h_offset:20,v_offset:0},tabs:{container:"slider",rtl:!1,style:"",enable:!1,width:100,min_width:100,height:50,wrapper_padding:10,wrapper_color:"#f5f5f5",wrapper_opacity:1,tmp:'<span class="tp-tab-image"></span>',visibleAmount:5,hide_onmobile:!1,hide_onleave:!0,hide_delay:200,hide_delay_mobile:1200,hide_under:0,hide_over:9999,direction:"horizontal",span:!1,space:0,position:"inner",h_align:"left",v_align:"center",h_offset:20,v_offset:0}},extensions:"",extensions_suffix:".min.js",debugMode:!1};return i=jQuery.extend(!0,{},e,i),this.each(function(){var e=jQuery(this);i.minHeight=i.minHeight!=undefined?parseInt(i.minHeight,0):i.minHeight,i.scrolleffect.on="on"===i.scrolleffect.fade||"on"===i.scrolleffect.scale||"on"===i.scrolleffect.blur||"on"===i.scrolleffect.grayscale,"hero"==i.sliderType&&e.find(">ul>li").each(function(e){0<e&&jQuery(this).remove()}),i.jsFileLocation=i.jsFileLocation||getScriptLocation("themepunch.revolution.min.js"),i.jsFileLocation=i.jsFileLocation+i.extensions,i.scriptsneeded=getNeededScripts(i,e),i.curWinRange=0,i.rtl=!0,i.navigation!=undefined&&i.navigation.touch!=undefined&&(i.navigation.touch.swipe_min_touches=5<i.navigation.touch.swipe_min_touches?1:i.navigation.touch.swipe_min_touches),jQuery(this).on("scriptsloaded",function(){if(i.modulesfailing)return e.html('<div style="margin:auto;line-height:40px;font-size:14px;color:#fff;padding:15px;background:#e74c3c;margin:20px 0px;">!! Error at loading Slider Revolution 5.0 Extrensions.'+i.errorm+"</div>").show(),!1;_R.migration!=undefined&&(i=_R.mLine truncated
|
||||
|
||||
/********************************************
|
||||
* REVOLUTION 5.4.6.4 EXTENSION - ACTIONS
|
||||
* @version: 2.1.0 (22.11.2017)
|
||||
* @requires jquery.themepunch.revolution.js
|
||||
* @author ThemePunch
|
||||
*********************************************/
|
||||
|
||||
!function($){"use strict";function getScrollRoot(){var e,t=document.documentElement,o=document.body,a=(void 0!==window.pageYOffset?window.pageYOffset:null)||o.scrollTop||t.scrollTop;return t.scrollTop=o.scrollTop=a+(a>0)?-1:1,e=t.scrollTop!==a?t:o,e.scrollTop=a,e}var _R=jQuery.fn.revolution,_ISM=_R.is_mobile(),extension={alias:"Actions Min JS",name:"revolution.extensions.actions.min.js",min_core:"5.4.5",version:"2.1.0"};jQuery.extend(!0,_R,{checkActions:function(e,t,o){if("stop"===_R.compare_version(extension).check)return!1;checkActions_intern(e,t,o)}});var checkActions_intern=function(e,t,o){o&&jQuery.each(o,function(o,a){a.delay=parseInt(a.delay,0)/1e3,e.addClass("tp-withaction"),t.fullscreen_esclistener||"exitfullscreen"!=a.action&&"togglefullscreen"!=a.action||(jQuery(document).keyup(function(t){27==t.keyCode&&jQuery("#rs-go-fullscreen").length>0&&e.trigger(a.event)}),t.fullscreen_esclistener=!0);var r="backgroundvideo"==a.layer?jQuery(".rs-background-video-layer"):"firstvideo"==a.layer?jQuery(".tp-revslider-slidesli").find(".tp-videolayer"):jQuery("#"+a.layer);switch(-1!=jQuery.inArray(a.action,["toggleslider","toggle_mute_video","toggle_global_mute_video","togglefullscreen"])&&e.data("togglelisteners",!0),a.action){case"togglevideo":jQuery.each(r,function(t,o){var a=(o=jQuery(o)).data("videotoggledby");void 0==a&&(a=new Array),a.push(e),o.data("videotoggledby",a)});break;case"togglelayer":jQuery.each(r,function(t,o){var r=(o=jQuery(o)).data("layertoggledby");void 0==r&&(r=new Array),r.push(e),o.data("layertoggledby",r),o.data("triggered_startstatus",a.layerstatus)});break;case"toggle_mute_video":case"toggle_global_mute_video":jQuery.each(r,function(t,o){var a=(o=jQuery(o)).data("videomutetoggledby");void 0==a&&(a=new Array),a.push(e),o.data("videomutetoggledby",a)});break;case"toggleslider":void 0==t.slidertoggledby&&(t.slidertoggledby=new Array),t.slidertoggledby.push(e);break;case"togglefullscreen":void 0==t.fullscreentoggledby&&(t.fullscreentoggledby=new Array),t.fullscreentoggledby.push(e)}switch(e.on(a.event,function(){if("click"===a.event&&e.hasClass("tp-temporarydisabled"))return!1;var o="backgroundvideo"==a.layer?jQuery(".active-revslide .slotholder .rs-background-video-layer"):"firstvideo"==a.layer?jQuery(".active-revslide .tp-videolayer").first():jQuery("#"+a.layer);if("stoplayer"==a.action||"togglelayer"==a.action||"startlayer"==a.action){if(o.length>0){var r=o.data();void 0!==r.clicked_time_stamp&&(new Date).getTime()-r.clicked_time_stamp>150&&(clearTimeout(r.triggerdelayIn),clearTimeout(r.triggerdelayOut)),r.clicked_time_stamp=(new Date).getTime(),"startlayer"==a.action||"togglelayer"==a.action&&"in"!=o.data("animdirection")?(r.animdirection="in",r.triggerstate="on",_R.toggleState(r.layertoggledby),_R.playAnimationFrame&&(clearTimeout(r.triggerdelayIn),r.triggerdelayIn=setTimeout(function(){_R.playAnimationFrame({caption:o,opt:t,frame:"frame_0",triggerdirection:"in",triggerframein:"frame_0",triggerframeout:"frame_999"})},1e3*a.delay))):("stoplayer"==a.action||"togglelayer"==a.action&&"out"!=o.data("animdirection"))&&(r.animdirection="out",r.triggered=!0,r.triggerstate="off",_R.stopVideo&&_R.stopVideo(o,t),_R.unToggleState(r.layertoggledby),_R.endMoveCaption&&(clearTimeout(r.triggerdelayOut),r.triggerdelayOut=setTimeout(function(){_R.playAnimationFrame({caption:o,opt:t,frame:"frame_999",triggerdirection:"out",triggerframein:"frame_0",triggerframeout:"frame_999"})},1e3*a.delay)))}}else!_ISM||"playvideo"!=a.action&&"stopvideo"!=a.action&&"togglevideo"!=a.action&&"mutevideo"!=a.action&&"unmutevideo"!=a.action&&"toggle_mute_video"!=a.action&&"toggle_global_mute_video"!=a.action?(a.delay="NaN"===a.delay||NaN===a.delay?0:a.delay,_R.isSafari11()?actionSwitches(o,t,a,e):punchgs.TweenLite.delayedCall(a.delay,function(){actionSwitches(o,t,a,e)},[o,t,a,e])):actionSwitches(o,t,a,e)}),a.action){case"togglelayer":case"startlayer":case"playlayer":case"stoplayer":var l=(r=jQuery("#"+a.layer)).data();r.length>0&&void 0!==l&&(void 0!==l.frames&&"bytrigger"!=l.frames[0].delay||void 0===l.frames&&"bytrigger"!==l.start)&&(l.triggerstate="on")}})},actionSwitches=function(tnc,opt,a,_nc){switch(a.action){case"scrollbelow":a.speed=void 0!==a.speed?a.speed:400,a.ease=void 0!==a.ease?a.ease:punchgs.Power2.easeOut,_nc.addClass("tp-scrollbelowslider"),_nc.data("scrolloffset",a.offset),_nc.data("scrolldelay",a.delay),_nc.data("scrollspeed",a.speed),_nc.data("scrollease",a.ease);var off=getOffContH(opt.fullScreenOffsetContainer)||0,aof=parseInt(a.offset,0)||0;off=off-aof||0,opt.scrollRoot=jQuery(document);var sobj={_y:opt.scrollRoot.scrollTop()};punchgs.TweenLite.to(sobj,a.speed/1e3,{_y:opt.c.offset().top+jQuery(opt.li[0]).height()-off,ease:a.ease,onUpdate:function(){opt.scrollRoot.scrollTop(sobj._y)}});break;case"callback":eval(a.callback);break;case"jumptoslide":switch(a.slide.toLowerCase()){case"+1":case"next":opt.sc_indicator="arrow",_R.callingNewSlide(opt.c,1);break;case"previous":case"prev":case"-1":opt.sc_indicLine truncated
|
||||
|
||||
/************************************************
|
||||
* REVOLUTION 5.4.6.5 EXTENSION - LAYER ANIMATION
|
||||
* @version: 3.6.5 (10.06.2018)
|
||||
* @requires jquery.themepunch.revolution.js
|
||||
* @author ThemePunch
|
||||
************************************************/
|
||||
!function(e){"use strict";var A=jQuery.fn.revolution,l=(A.is_mobile(),A.is_android(),{alias:"LayerAnimation Min JS",name:"revolution.extensions.layeranimation.min.js",min_core:"5.4.6.4",version:"3.6.5"});jQuery.extend(!0,A,{updateMarkup:function(e,t){var i=jQuery(e).data();if(void 0!==i.start&&!i.frames_added&&void 0===i.frames){var a=new Array,n=F(B(),i.transform_in,void 0,!1),r=F(B(),i.transform_out,void 0,!1),o=F(B(),i.transform_hover,void 0,!1);jQuery.isNumeric(i.end)&&jQuery.isNumeric(i.start)&&jQuery.isNumeric(n.speed)&&(i.end=parseInt(i.end,0)-(parseInt(i.start,0)+parseFloat(n.speed,0))),a.push({frame:"0",delay:i.start,from:i.transform_in,to:i.transform_idle,split:i.splitin,speed:n.speed,ease:n.anim.ease,mask:i.mask_in,splitdelay:i.elementdelay}),a.push({frame:"5",delay:i.end,to:i.transform_out,split:i.splitout,speed:r.speed,ease:r.anim.ease,mask:i.mask_out,splitdelay:i.elementdelay}),i.transform_hover&&a.push({frame:"hover",to:i.transform_hover,style:i.style_hover,speed:o.speed,ease:o.anim.ease,splitdelay:i.elementdelay}),i.frames=a}if(!i.frames_added){if(i.inframeindex=0,i.outframeindex=-1,i.hoverframeindex=-1,void 0!==i.frames)for(var s=0;s<i.frames.length;s++)void 0!==i.frames[s].sfx_effect&&0<=i.frames[s].sfx_effect.indexOf("block")&&(0===s?(i.frames[s].from="o:0",i.frames[s].to="o:1"):i.frames[s].to="o:0",i._sfx="block"),void 0===i.frames[0].from&&(i.frames[0].from="o:inherit"),0===i.frames[0].delay&&(i.frames[0].delay=20),"hover"===i.frames[s].frame?i.hoverframeindex=s:"frame_999"!==i.frames[s].frame&&"frame_out"!==i.frames[s].frame&&"last"!==i.frames[s].frame&&"end"!==i.frames[s].frame||(i.outframeindex=s),void 0!==i.frames[s].split&&i.frames[s].split.match(/chars|words|lines/g)&&(i.splittext=!0);i.outframeindex=-1===i.outframeindex?-1===i.hoverframeindex?i.frames.length-1:i.frames.length-2:i.outframeindex,i.frames_added=!0}},animcompleted:function(e,t){var i=e.data(),a=i.videotype,n=i.autoplay,r=i.autoplayonlyfirsttime;null!=a&&"none"!=a&&(1==n||"true"==n||"on"==n||"1sttime"==n||r?(("carousel"!==t.sliderType||"carousel"===t.sliderType&&"on"===t.carousel.showLayersAllTime&&e.closest("li").hasClass("active-revslide")||"carousel"===t.sliderType&&"on"!==t.carousel.showLayersAllTime&&e.closest("li").hasClass("active-revslide"))&&A.playVideo(e,t),A.toggleState(e.data("videotoggledby")),(r||"1sttime"==n)&&(i.autoplayonlyfirsttime=!1,i.autoplay="off")):("no1sttime"==n&&(i.datasetautoplay="on"),A.unToggleState(e.data("videotoggledby"))))},handleStaticLayers:function(e,t){var i=parseInt(e.data("startslide"),0),a=parseInt(e.data("endslide"),0);i<0&&(i=0),a<0&&(a=t.realslideamount),0===i&&a===t.realslideamount-1&&(a=t.realslideamount+1),e.data("startslide",i),e.data("endslide",a)},animateTheCaptions:function(e){if("stop"===A.compare_version(l).check)return!1;var p=e.opt,t=e.slide,n=e.recall,i=e.maintimeline,r=e.preset,o=e.startslideanimat,s="carousel"===p.sliderType?0:p.width/2-p.gridwidth[p.curWinRange]*p.bw/2,a=t.data("index");if(p.layers=p.layers||new Object,p.layers[a]=p.layers[a]||t.find(".tp-caption"),p.layers.static=p.layers.static||p.c.find(".tp-static-layers").find(".tp-caption"),void 0===p.timelines&&A.createTimelineStructure(p),p.conh=p.c.height(),p.conw=p.c.width(),p.ulw=p.ul.width(),p.ulh=p.ul.height(),p.debugMode){t.addClass("indebugmode"),t.find(".helpgrid").remove(),p.c.find(".hglayerinfo").remove(),t.append('<div class="helpgrid" style="width:'+p.gridwidth[p.curWinRange]*p.bw+"px;height:"+p.gridheight[p.curWinRange]*p.bw+'px;"></div>');var d=t.find(".helpgrid");d.append('<div class="hginfo">Zoom:'+Math.round(100*p.bw)+"% Device Level:"+p.curWinRange+" Grid Preset:"+p.gridwidth[p.curWinRange]+"x"+p.gridheight[p.curWinRange]+"</div>"),p.c.append('<div class="hglayerinfo"></div>'),d.append('<div class="tlhg"></div>')}void 0!==a&&p.layers[a]&&jQuery.each(p.layers[a],function(e,t){var i=jQuery(this);A.updateMarkup(this,p),A.prepareSingleCaption({caption:i,opt:p,offsetx:s,offsety:0,index:e,recall:n,preset:r}),r&&0!==o||A.buildFullTimeLine({caption:i,opt:p,offsetx:s,offsety:0,index:e,recall:n,preset:r,regenerate:0===o}),n&&"carousel"===p.sliderType&&"on"===p.carousel.showLayersAllTime&&A.animcompleted(i,p)}),p.layers.static&&jQuery.each(p.layers.static,function(e,t){var i=jQuery(this),a=i.data();!0!==a.hoveredstatus&&!0!==a.inhoveroutanimation?(A.updateMarkup(this,p),A.prepareSingleCaption({caption:i,opt:p,offsetx:s,offsety:0,index:e,recall:n,preset:r}),r&&0!==o||!0===a.veryfirstststic||(A.buildFullTimeLine({caption:i,opt:p,offsetx:s,offsety:0,index:e,recall:n,preset:r,regenerate:0===o}),a.veryfirstststic=!0),n&&"carousel"===p.sliderType&&"on"===p.carousel.showLayersAllTime&&A.animcompleted(i,p)):A.prepareSingleCaption({caption:i,opt:p,offsetx:s,offsety:0,index:e,recall:n,preset:r})});var g=-1===p.nextSlide||void 0===p.nextSlide?0:p.nextSlide;void 0!==p.rowzones&&(g=g>p.rowzones.length?p.rowzones.length:g),null!=p.rowzones&&0<p.rowzones.length&&null!=p.rowLine truncated
|
||||
|
||||
/********************************************
|
||||
* REVOLUTION 5.4.6.5 EXTENSION - NAVIGATION
|
||||
* @version: 1.3.5 (06.04.2017)
|
||||
* @requires jquery.themepunch.revolution.js
|
||||
* @author ThemePunch
|
||||
*********************************************/
|
||||
!function(a){"use strict";var b=jQuery.fn.revolution,c=b.is_mobile(),d={alias:"Navigation Min JS",name:"revolution.extensions.navigation.min.js",min_core:"5.4.0",version:"1.3.5"};jQuery.extend(!0,b,{hideUnHideNav:function(a){var b=a.c.width(),c=a.navigation.arrows,d=a.navigation.bullets,e=a.navigation.thumbnails,f=a.navigation.tabs;m(c)&&y(a.c.find(".tparrows"),c.hide_under,b,c.hide_over),m(d)&&y(a.c.find(".tp-bullets"),d.hide_under,b,d.hide_over),m(e)&&y(a.c.parent().find(".tp-thumbs"),e.hide_under,b,e.hide_over),m(f)&&y(a.c.parent().find(".tp-tabs"),f.hide_under,b,f.hide_over),x(a)},resizeThumbsTabs:function(a,b){if(a.navigation&&a.navigation.tabs.enable||a.navigation&&a.navigation.thumbnails.enable){var c=(jQuery(window).width()-480)/500,d=new punchgs.TimelineLite,e=a.navigation.tabs,g=a.navigation.thumbnails,h=a.navigation.bullets;if(d.pause(),c=c>1?1:c<0?0:c,m(e)&&(b||e.width>e.min_width)&&f(c,d,a.c,e,a.slideamount,"tab"),m(g)&&(b||g.width>g.min_width)&&f(c,d,a.c,g,a.slideamount,"thumb"),m(h)&&b){var i=a.c.find(".tp-bullets");i.find(".tp-bullet").each(function(a){var b=jQuery(this),c=a+1,d=b.outerWidth()+parseInt(void 0===h.space?0:h.space,0),e=b.outerHeight()+parseInt(void 0===h.space?0:h.space,0);"vertical"===h.direction?(b.css({top:(c-1)*e+"px",left:"0px"}),i.css({height:(c-1)*e+b.outerHeight(),width:b.outerWidth()})):(b.css({left:(c-1)*d+"px",top:"0px"}),i.css({width:(c-1)*d+b.outerWidth(),height:b.outerHeight()}))})}d.play(),x(a)}return!0},updateNavIndexes:function(a){function d(a){c.find(a).lenght>0&&c.find(a).each(function(a){jQuery(this).data("liindex",a)})}var c=a.c;d(".tp-tab"),d(".tp-bullet"),d(".tp-thumb"),b.resizeThumbsTabs(a,!0),b.manageNavigation(a)},manageNavigation:function(a){var c=b.getHorizontalOffset(a.c.parent(),"left"),d=b.getHorizontalOffset(a.c.parent(),"right");m(a.navigation.bullets)&&("fullscreen"!=a.sliderLayout&&"fullwidth"!=a.sliderLayout&&(a.navigation.bullets.h_offset_old=void 0===a.navigation.bullets.h_offset_old?a.navigation.bullets.h_offset:a.navigation.bullets.h_offset_old,a.navigation.bullets.h_offset="center"===a.navigation.bullets.h_align?a.navigation.bullets.h_offset_old+c/2-d/2:a.navigation.bullets.h_offset_old+c-d),t(a.c.find(".tp-bullets"),a.navigation.bullets,a)),m(a.navigation.thumbnails)&&t(a.c.parent().find(".tp-thumbs"),a.navigation.thumbnails,a),m(a.navigation.tabs)&&t(a.c.parent().find(".tp-tabs"),a.navigation.tabs,a),m(a.navigation.arrows)&&("fullscreen"!=a.sliderLayout&&"fullwidth"!=a.sliderLayout&&(a.navigation.arrows.left.h_offset_old=void 0===a.navigation.arrows.left.h_offset_old?a.navigation.arrows.left.h_offset:a.navigation.arrows.left.h_offset_old,a.navigation.arrows.left.h_offset="right"===a.navigation.arrows.left.h_align?a.navigation.arrows.left.h_offset_old+d:a.navigation.arrows.left.h_offset_old+c,a.navigation.arrows.right.h_offset_old=void 0===a.navigation.arrows.right.h_offset_old?a.navigation.arrows.right.h_offset:a.navigation.arrows.right.h_offset_old,a.navigation.arrows.right.h_offset="right"===a.navigation.arrows.right.h_align?a.navigation.arrows.right.h_offset_old+d:a.navigation.arrows.right.h_offset_old+c),t(a.c.find(".tp-leftarrow.tparrows"),a.navigation.arrows.left,a),t(a.c.find(".tp-rightarrow.tparrows"),a.navigation.arrows.right,a)),m(a.navigation.thumbnails)&&e(a.c.parent().find(".tp-thumbs"),a.navigation.thumbnails),m(a.navigation.tabs)&&e(a.c.parent().find(".tp-tabs"),a.navigation.tabs)},createNavigation:function(a,f){if("stop"===b.compare_version(d).check)return!1;var g=a.parent(),j=f.navigation.arrows,n=f.navigation.bullets,r=f.navigation.thumbnails,s=f.navigation.tabs,t=m(j),v=m(n),x=m(r),y=m(s);h(a,f),i(a,f),t&&q(a,j,f),f.li.each(function(b){var c=jQuery(f.li[f.li.length-1-b]),d=jQuery(this);v&&(f.navigation.bullets.rtl?u(a,n,c,f):u(a,n,d,f)),x&&(f.navigation.thumbnails.rtl?w(a,r,c,"tp-thumb",f):w(a,r,d,"tp-thumb",f)),y&&(f.navigation.tabs.rtl?w(a,s,c,"tp-tab",f):w(a,s,d,"tp-tab",f))}),a.bind("revolution.slide.onafterswap revolution.nextslide.waiting",function(){var b=0==a.find(".next-revslide").length?a.find(".active-revslide").data("index"):a.find(".next-revslide").data("index");a.find(".tp-bullet").each(function(){var a=jQuery(this);a.data("liref")===b?a.addClass("selected"):a.removeClass("selected")}),g.find(".tp-thumb, .tp-tab").each(function(){var a=jQuery(this);a.data("liref")===b?(a.addClass("selected"),a.hasClass("tp-tab")?e(g.find(".tp-tabs"),s):e(g.find(".tp-thumbs"),r)):a.removeClass("selected")});var c=0,d=!1;f.thumbs&&jQuery.each(f.thumbs,function(a,e){c=!1===d?a:c,d=e.id===b||a===b||d});var h=c>0?c-1:f.slideamount-1,i=c+1==f.slideamount?0:c+1;if(!0===j.enable){var k=j.tmp;if(void 0!=f.thumbs[h]&&jQuery.each(f.thumbs[h].params,function(a,b){k=k.replace(b.from,b.to)}),j.left.j.html(k),k=j.tmp,i>f.slideamount)return;jQuery.each(f.thumbs[i].params,function(a,b){k=k.replace(b.from,b.to)}),j.right.j.html(k),j.rtl?(punchgs.TweenLite.set(j.left.j.find(".tp-arr-imgholder"),{backgroundImage:"url("+f.thumbs[i].src+")Line truncated
|
||||
|
||||
/********************************************
|
||||
* REVOLUTION 5.4.6.5 EXTENSION - PARALLAX
|
||||
* @version: 2.2.3 (17.05.2017)
|
||||
* @requires jquery.themepunch.revolution.js
|
||||
* @author ThemePunch
|
||||
*********************************************/
|
||||
!function(a){"use strict";function e(a,b){a.lastscrolltop=b}var b=jQuery.fn.revolution,c=b.is_mobile(),d={alias:"Parallax Min JS",name:"revolution.extensions.parallax.min.js",min_core:"5.4.5",version:"2.2.3"};jQuery.extend(!0,b,{checkForParallax:function(a,e){function g(a){if("3D"==f.type||"3d"==f.type){a.find(".slotholder").wrapAll('<div class="dddwrapper" style="width:100%;height:100%;position:absolute;top:0px;left:0px;overflow:hidden"></div>'),a.find(".tp-parallax-wrap").wrapAll('<div class="dddwrapper-layer" style="width:100%;height:100%;position:absolute;top:0px;left:0px;z-index:5;overflow:'+f.ddd_layer_overflow+';"></div>'),a.find(".rs-parallaxlevel-tobggroup").closest(".tp-parallax-wrap").wrapAll('<div class="dddwrapper-layertobggroup" style="position:absolute;top:0px;left:0px;z-index:50;width:100%;height:100%"></div>');var b=a.find(".dddwrapper"),c=a.find(".dddwrapper-layer");a.find(".dddwrapper-layertobggroup").appendTo(b),"carousel"==e.sliderType&&("on"==f.ddd_shadow&&b.addClass("dddwrappershadow"),punchgs.TweenLite.set(b,{borderRadius:e.carousel.border_radius})),punchgs.TweenLite.set(a,{overflow:"visible",transformStyle:"preserve-3d",perspective:1600}),punchgs.TweenLite.set(b,{force3D:"auto",transformOrigin:"50% 50%"}),punchgs.TweenLite.set(c,{force3D:"auto",transformOrigin:"50% 50%",zIndex:5}),punchgs.TweenLite.set(e.ul,{transformStyle:"preserve-3d",transformPerspective:1600})}}if("stop"===b.compare_version(d).check)return!1;var f=e.parallax;if(!f.done){if(f.done=!0,c&&"on"==f.disable_onmobile)return!1;"3D"!=f.type&&"3d"!=f.type||(punchgs.TweenLite.set(e.c,{overflow:f.ddd_overflow}),punchgs.TweenLite.set(e.ul,{overflow:f.ddd_overflow}),"carousel"!=e.sliderType&&"on"==f.ddd_shadow&&(e.c.prepend('<div class="dddwrappershadow"></div>'),punchgs.TweenLite.set(e.c.find(".dddwrappershadow"),{force3D:"auto",transformPerspective:1600,transformOrigin:"50% 50%",width:"100%",height:"100%",position:"absolute",top:0,left:0,zIndex:0}))),e.li.each(function(){g(jQuery(this))}),("3D"==f.type||"3d"==f.type)&&e.c.find(".tp-static-layers").length>0&&(punchgs.TweenLite.set(e.c.find(".tp-static-layers"),{top:0,left:0,width:"100%",height:"100%"}),g(e.c.find(".tp-static-layers"))),f.pcontainers=new Array,f.pcontainer_depths=new Array,f.bgcontainers=new Array,f.bgcontainer_depths=new Array,e.c.find(".tp-revslider-slidesli .slotholder, .tp-revslider-slidesli .rs-background-video-layer").each(function(){var a=jQuery(this),b=a.data("bgparallax")||e.parallax.bgparallax;void 0!==(b="on"==b?1:b)&&"off"!==b&&(f.bgcontainers.push(a),f.bgcontainer_depths.push(e.parallax.levels[parseInt(b,0)-1]/100))});for(var h=1;h<=f.levels.length;h++)e.c.find(".rs-parallaxlevel-"+h).each(function(){var a=jQuery(this),b=a.closest(".tp-parallax-wrap");b.data("parallaxlevel",f.levels[h-1]),b.addClass("tp-parallax-container"),f.pcontainers.push(b),f.pcontainer_depths.push(f.levels[h-1])});"mouse"!=f.type&&"scroll+mouse"!=f.type&&"mouse+scroll"!=f.type&&"3D"!=f.type&&"3d"!=f.type||(a.mouseenter(function(b){var c=a.find(".active-revslide"),d=a.offset().top,e=a.offset().left,f=b.pageX-e,g=b.pageY-d;c.data("enterx",f),c.data("entery",g)}),a.on("mousemove.hoverdir, mouseleave.hoverdir, trigger3dpath",function(b,c){var d=c&&c.li?c.li:a.find(".active-revslide");if("enterpoint"==f.origo){var g=a.offset().top,h=a.offset().left;void 0==d.data("enterx")&&d.data("enterx",b.pageX-h),void 0==d.data("entery")&&d.data("entery",b.pageY-g);var i=d.data("enterx")||b.pageX-h,j=d.data("entery")||b.pageY-g,k=i-(b.pageX-h),l=j-(b.pageY-g),m=f.speed/1e3||.4}else var g=a.offset().top,h=a.offset().left,k=e.conw/2-(b.pageX-h),l=e.conh/2-(b.pageY-g),m=f.speed/1e3||3;"mouseleave"==b.type&&(k=f.ddd_lasth||0,l=f.ddd_lastv||0,m=1.5);for(var n=0;n<f.pcontainers.length;n++){var o=f.pcontainers[n],p=f.pcontainer_depths[n],q="3D"==f.type||"3d"==f.type?p/200:p/100,r=k*q,s=l*q;"scroll+mouse"==f.type||"mouse+scroll"==f.type?punchgs.TweenLite.to(o,m,{force3D:"auto",x:r,ease:punchgs.Power3.easeOut,overwrite:"all"}):punchgs.TweenLite.to(o,m,{force3D:"auto",x:r,y:s,ease:punchgs.Power3.easeOut,overwrite:"all"})}if("3D"==f.type||"3d"==f.type){var t=".tp-revslider-slidesli .dddwrapper, .dddwrappershadow, .tp-revslider-slidesli .dddwrapper-layer, .tp-static-layers .dddwrapper-layer";"carousel"===e.sliderType&&(t=".tp-revslider-slidesli .dddwrapper, .tp-revslider-slidesli .dddwrapper-layer, .tp-static-layers .dddwrapper-layer"),e.c.find(t).each(function(){var a=jQuery(this),c=f.levels[f.levels.length-1]/200,d=k*c,g=l*c,h=0==e.conw?0:Math.round(k/e.conw*c*100)||0,i=0==e.conh?0:Math.round(l/e.conh*c*100)||0,j=a.closest("li"),n=0,o=!1;a.hasClass("dddwrapper-layer")&&(n=f.ddd_z_correction||65,o=!0),a.hasClass("dddwrapper-layer")&&(d=0,g=0),j.hasClass("active-revslide")||"carousel"!=e.sliderType?"on"!=f.ddd_bgfreeze||o?punchgs.TweenLite.to(a,m,{rotationX:i,rotationY:-h,x:d,z:n,y:g,ease:punchgs.Power3.easeOut,overwrite:"all"}):punchgs.TweenLite.to(a,.5,{force3D:"auto",rotationY:0,rotationX:0,z:0,easeLine truncated
|
||||
|
||||
/************************************************
|
||||
* REVOLUTION 5.4.6.5 EXTENSION - SLIDE ANIMATIONS
|
||||
* @version: 1.8 (17.05.2017)
|
||||
* @requires jquery.themepunch.revolution.js
|
||||
* @author ThemePunch
|
||||
************************************************/
|
||||
!function(t){"use strict";var L=jQuery.fn.revolution,l={alias:"SlideAnimations Min JS",name:"revolution.extensions.slideanims.min.js",min_core:"5.4.5",version:"1.8"};jQuery.extend(!0,L,{animateSlide:function(t,e,o,a,i,n,r,s){return"stop"===L.compare_version(l).check?s:d(t,e,o,a,i,n,r,s)}});var ct=function(t,e,o,a){var i=t,n=i.find(".defaultimg"),r=n.data("mediafilter"),s=i.data("zoomstart"),l=i.data("rotationstart");null!=n.data("currotate")&&(l=n.data("currotate")),null!=n.data("curscale")&&"box"==a?s=100*n.data("curscale"):null!=n.data("curscale")&&(s=n.data("curscale")),L.slotSize(n,e);var d=n.attr("src"),h=n.data("bgcolor"),f=e.width,c=e.height,u=n.data("fxof");void 0===h&&(h=n.css("backgroundColor")),"on"==e.autoHeight&&(c=e.c.height()),null==u&&(u=0);var p=0,g=n.data("bgfit"),w=n.data("bgrepeat"),m=n.data("bgposition");null==g&&(g="cover"),null==w&&(w="no-repeat"),null==m&&(m="center center");var v="";switch(v=void 0!==h&&0<=h.indexOf("gradient")?"background:"+h:"background-color:"+h+";background-image:url("+d+");background-repeat:"+w+";background-size:"+g+";background-position:"+m,a){case"box":for(var y=0,x=0,T=0;T<e.slots;T++){for(var z=x=0;z<e.slots;z++)i.append('<div class="slot" style="position:absolute;top:'+(0+x)+"px;left:"+(u+y)+"px;width:"+e.slotw+"px;height:"+e.sloth+'px;overflow:hidden;"><div class="slotslide '+r+'" data-x="'+y+'" data-y="'+x+'" style="position:absolute;top:0px;left:0px;width:'+e.slotw+"px;height:"+e.sloth+'px;overflow:hidden;"><div style="position:absolute;top:'+(0-x)+"px;left:"+(0-y)+"px;width:"+f+"px;height:"+c+"px;"+v+';"></div></div></div>'),x+=e.sloth,null!=s&&null!=l&&punchgs.TweenLite.set(i.find(".slot").last(),{rotationZ:l});y+=e.slotw}break;case"vertical":case"horizontal":if("horizontal"==a){if(!o)p=0-e.slotw;for(z=0;z<e.slots;z++)i.append('<div class="slot" style="position:absolute;top:0px;left:'+(u+z*e.slotw)+"px;overflow:hidden;width:"+(e.slotw+.3)+"px;height:"+c+'px"><div class="slotslide '+r+'" style="position:absolute;top:0px;left:'+p+"px;width:"+(e.slotw+.6)+"px;height:"+c+'px;overflow:hidden;"><div style="position:absolute;top:0px;left:'+(0-z*e.slotw)+"px;width:"+f+"px;height:"+c+"px;"+v+';"></div></div></div>'),null!=s&&null!=l&&punchgs.TweenLite.set(i.find(".slot").last(),{rotationZ:l})}else{if(!o)p=0-e.sloth;for(z=0;z<e.slots+2;z++)i.append('<div class="slot" style="position:absolute;top:'+(0+z*e.sloth)+"px;left:"+u+"px;overflow:hidden;width:"+f+"px;height:"+e.sloth+'px"><div class="slotslide '+r+'" style="position:absolute;top:'+p+"px;left:0px;width:"+f+"px;height:"+e.sloth+'px;overflow:hidden;"><div style="position:absolute;top:'+(0-z*e.sloth)+"px;left:0px;width:"+f+"px;height:"+c+"px;"+v+';"></div></div></div>'),null!=s&&null!=l&&punchgs.TweenLite.set(i.find(".slot").last(),{rotationZ:l})}}};var ut=function(t,e){return null==e||jQuery.isNumeric(t)?t:null==t?t:t.split(",")[e]},d=function(a,t,e,o,i,n,r,s){var l=e[0].opt,d=i.index(),h=o.index()<d?1:0;"arrow"==l.sc_indicator&&(h=l.sc_indicator_dir);var f=function(t,o,e,a){var i=t[0].opt,n=punchgs.Power1.easeIn,r=punchgs.Power1.easeOut,s=punchgs.Power1.easeInOut,l=punchgs.Power2.easeIn,d=punchgs.Power2.easeOut,h=punchgs.Power2.easeInOut,f=(punchgs.Power3.easeIn,punchgs.Power3.easeOut),c=punchgs.Power3.easeInOut,u=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],p=[16,17,18,19,20,21,22,23,24,25,27],g=0,w=1,m=0,v=0,y=(new Array,[["boxslide",0,1,10,0,"box",!1,null,0,r,r,500,6],["boxfade",1,0,10,0,"box",!1,null,1,s,s,700,5],["slotslide-horizontal",2,0,0,200,"horizontal",!0,!1,2,h,h,700,3],["slotslide-vertical",3,0,0,200,"vertical",!0,!1,3,h,h,700,3],["curtain-1",4,3,0,0,"horizontal",!0,!0,4,r,r,300,5],["curtain-2",5,3,0,0,"horizontal",!0,!0,5,r,r,300,5],["curtain-3",6,3,25,0,"horizontal",!0,!0,6,r,r,300,5],["slotzoom-horizontal",7,0,0,400,"horizontal",!0,!0,7,r,r,300,7],["slotzoom-vertical",8,0,0,0,"vertical",!0,!0,8,d,d,500,8],["slotfade-horizontal",9,0,0,1e3,"horizontal",!0,null,9,d,d,2e3,10],["slotfade-vertical",10,0,0,1e3,"vertical",!0,null,10,d,d,2e3,10],["fade",11,0,1,300,"horizontal",!0,null,11,h,h,1e3,1],["crossfade",11,1,1,300,"horizontal",!0,null,11,h,h,1e3,1],["fadethroughdark",11,2,1,300,"horizontal",!0,null,11,h,h,1e3,1],["fadethroughlight",11,3,1,300,"horizontal",!0,null,11,h,h,1e3,1],["fadethroughtransparent",11,4,1,300,"horizontal",!0,null,11,h,h,1e3,1],["slideleft",12,0,1,0,"horizontal",!0,!0,12,c,c,1e3,1],["slideup",13,0,1,0,"horizontal",!0,!0,13,c,c,1e3,1],["slidedown",14,0,1,0,"horizontal",!0,!0,14,c,c,1e3,1],["slideright",15,0,1,0,"horizontal",!0,!0,15,c,c,1e3,1],["slideoverleft",12,7,1,0,"horizontal",!0,!0,12,c,c,1e3,1],["slideoverup",13,7,1,0,"horizontal",!0,!0,13,c,c,1e3,1],["slideoverdown",14,7,1,0,"horizontal",!0,!0,14,c,c,1e3,1],["slideoverright",15,7,1,0,"horizontal",!0,!0,15,c,c,1e3,1],["slideremoveleft",12,8,1,0,"horizontal",!0,!0,12,c,c,1e3,1],["slideremoveup",13,8,1,0,"horizontal",!0,!0,13,c,c,1e3,1],["slideremovedown",14,8,1,0,"horLine truncated
|
||||
|
||||
/********************************************
|
||||
* REVOLUTION 5.4.6.5 EXTENSION - VIDEO FUNCTIONS
|
||||
* @version: 2.2.2 (04.06.2018)
|
||||
* @requires jquery.themepunch.revolution.js
|
||||
* @author ThemePunch
|
||||
*********************************************/
|
||||
;!function(e){"use strict";var I=jQuery.fn.revolution,_=I.is_mobile(),S=(I.is_android(),{alias:"Video Min JS",name:"revolution.extensions.video.min.js",min_core:"5.4.8",version:"2.2.2"});function j(e){return null==e?-1:jQuery.isNumeric(e)?e:1<e.split(":").length?60*parseInt(e.split(":")[0],0)+parseInt(e.split(":")[1],0):e}jQuery.extend(!0,I,{preLoadAudio:function(e,a){if("stop"===I.compare_version(S).check)return!1;e.find(".tp-audiolayer").each(function(){var e=jQuery(this),t={};0===e.find("audio").length&&(t.src=null!=e.data("videomp4")?e.data("videomp4"):"",t.pre=e.data("videopreload")||"",void 0===e.attr("id")&&e.attr("audio-layer-"+Math.round(199999*Math.random())),t.id=e.attr("id"),t.status="prepared",t.start=jQuery.now(),t.waittime=1e3*e.data("videopreloadwait")||5e3,"auto"!=t.pre&&"canplaythrough"!=t.pre&&"canplay"!=t.pre&&"progress"!=t.pre||(void 0===a.audioqueue&&(a.audioqueue=[]),a.audioqueue.push(t),I.manageVideoLayer(e,a)))})},preLoadAudioDone:function(a,e,i){e.audioqueue&&0<e.audioqueue.length&&jQuery.each(e.audioqueue,function(e,t){a.data("videomp4")!==t.src||t.pre!==i&&"auto"!==t.pre||(t.status="loaded")})},resetVideo:function(e,t,a,i){var o=e.data();switch(o.videotype){case"youtube":o.player;try{if("on"==o.forcerewind){var d=-1==(l=j(e.data("videostartat"))),n=1===o.bgvideo||0<e.find(".tp-videoposter").length;null!=o.player&&(l=-1==l?0:l,o.player.seekTo(l),o.player.pauseVideo())}}catch(e){}0==e.find(".tp-videoposter").length&&1!==o.bgvideo&&!0!==a&&punchgs.TweenLite.to(e.find("iframe"),.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut});break;case"vimeo":var r=e.data("vimeoplayer");try{if("on"==o.forcerewind){var l=j(o.videostartat);d=-1==l,n=1===o.bgvideo||0<e.find(".tp-videoposter").length;(0!==(l=-1==l?0:l)&&!d||n)&&r.pause().then(function(){r.setCurrentTime(l)})}}catch(e){}0==e.find(".tp-videoposter").length&&1!==o.bgvideo&&!0!==a&&punchgs.TweenLite.to(e.find("iframe"),.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut});break;case"html5":if(_&&1==o.disablevideoonmobile)return!1;var s="html5"==o.audio?"audio":"video",u=e.find(s),p=u[0];if(punchgs.TweenLite.to(u,.3,{autoAlpha:1,display:"block",ease:punchgs.Power3.easeInOut}),"on"==o.forcerewind&&!e.hasClass("videoisplaying"))try{l=j(o.videostartat);p.currentTime=-1==l?0:l}catch(e){}("mute"==o.volume||I.lastToggleState(e.videomutetoggledby)||!0===t.globalmute)&&(p.muted=!0)}},isVideoMuted:function(e,t){var a=!1,i=e.data();switch(i.videotype){case"youtube":try{a=i.player.isMuted()}catch(e){}break;case"vimeo":try{"mute"==i.volume&&(a=!0)}catch(e){}break;case"html5":var o="html5"==i.audio?"audio":"video";e.find(o)[0].muted&&(a=!0)}return a},muteVideo:function(e,t){var a=e.data();switch(a.videotype){case"youtube":try{a.player.mute()}catch(e){}break;case"vimeo":try{var i=e.data("vimeoplayer");e.data("volume","mute"),i.setVolume(0)}catch(e){}break;case"html5":var o="html5"==a.audio?"audio":"video";e.find(o)[0].muted=!0}},unMuteVideo:function(e,t){if(!0!==t.globalmute){var a=e.data();switch(a.videotype){case"youtube":try{a.player.unMute()}catch(e){}break;case"vimeo":try{var i=e.data("vimeoplayer");e.data("volume","1"),i.setVolume(1)}catch(e){}break;case"html5":var o="html5"==a.audio?"audio":"video";e.find(o)[0].muted=!1}}},stopVideo:function(e,t){var a=e.data();switch(t.leaveViewPortBasedStop||(t.lastplayedvideos=[]),t.leaveViewPortBasedStop=!1,a.videotype){case"youtube":try{var i=a.player;if(2===i.getPlayerState()||5===i.getPlayerState())return;i.pauseVideo(),a.youtubepausecalled=!0,setTimeout(function(){a.youtubepausecalled=!1},80)}catch(e){console.log("Issue at YouTube Video Pause:"),console.log(e)}break;case"vimeo":try{e.data("vimeoplayer").pause(),a.vimeopausecalled=!0,setTimeout(function(){a.vimeopausecalled=!1},80)}catch(e){console.log("Issue at Vimeo Video Pause:"),console.log(e)}break;case"html5":var o="html5"==a.audio?"audio":"video",d=e.find(o),n=d[0];null!=d&&null!=n&&n.pause()}},playVideo:function(a,i){clearTimeout(a.data("videoplaywait"));var e=a.data();switch(e.videotype){case"youtube":if(0==a.find("iframe").length)a.append(a.data("videomarkup")),O(a,i,!0);else if(null!=e.player.playVideo){var t=j(a.data("videostartat")),o=e.player.getCurrentTime();1==a.data("nextslideatend-triggered")&&(o=-1,a.data("nextslideatend-triggered",0)),-1!=t&&o<t&&e.player.seekTo(t),!0!==e.youtubepausecalled&&e.player.playVideo()}else a.data("videoplaywait",setTimeout(function(){!0!==e.youtubepausecalled&&I.playVideo(a,i)},50));break;case"vimeo":if(0==a.find("iframe").length)a.removeData("vimeoplayer"),a.append(a.data("videomarkup")),O(a,i,!0);else if(a.hasClass("rs-apiready")){var d,n=a.find("iframe").attr("id");a.data("vimeoplayer")?d=a.data("vimeoplayer"):(d=new Vimeo.Player(n),a.data("vimeoplayer",d)),d.getPaused()?setTimeout(function(){var e=j(a.data("videostartat")),t=a.data("currenttime");t||(t=0),1==a.data("nextslideatend-triggered")&&(t=-1,a.data("nextslideatend-triggered",0)),-1!=e&&t<e&&d.setCurrentTime(e),d.play()},510Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
"object"==typeof Countries&&(Countries.updateProvinceLabel=function(e,t){if("string"==typeof e&&Countries[e]&&Countries[e].provinces){if("object"!=typeof t&&(t=document.getElementById("address_province_label"),null===t))return;t.innerHTML=Countries[e].label;var r=jQuery(t).parent();r.find("select");r.find(".custom-style-select-box-inner").html(Countries[e].provinces[0])}}),"undefined"==typeof Shopify.Cart&&(Shopify.Cart={}),Shopify.Cart.ShippingCalculator=function(){var _config={submitButton:"Calculate shipping",submitButtonDisabled:"Calculating...",templateId:"shipping-calculator-response-template",wrapperId:"wrapper-response",customerIsLoggedIn:!1,moneyFormat:"${{amount}}"},_render=function(e){var t=jQuery("#"+_config.templateId),r=jQuery("#"+_config.wrapperId);if(t.length&&r.length){var templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var n=Handlebars.compile(jQuery.trim(t.text())),a=n(e);if(jQuery(a).appendTo(r),"undefined"!=typeof Currency&&"function"==typeof Currency.convertAll){var i="";jQuery("[name=currencies]").size()?i=jQuery("[name=currencies]").val():jQuery("#currencies span.selected").size()&&(i=jQuery("#currencies span.selected").attr("data-currency")),""!==i&&Currency.convertAll(shopCurrency,i,"#wrapper-response span.money, #estimated-shipping span.money")}}},_enableButtons=function(){jQuery(".get-rates").removeAttr("disabled").removeClass("disabled").val(_config.submitButton);jQuery("#shipping-calculator").trigger("updated")},_disableButtons=function(){jQuery(".get-rates").val(_config.submitButtonDisabled).attr("disabled","disabled").addClass("disabled")},_getCartShippingRatesForDestination=function(e){var t={type:"POST",url:"/cart/prepare_shipping_rates",data:jQuery.param({shipping_address:e}),success:_pollForCartShippingRatesForDestination(e),error:_onError};jQuery.ajax(t)},_pollForCartShippingRatesForDestination=function(e){var t=function(){jQuery.ajax("/cart/async_shipping_rates",{dataType:"json",success:function(r,n,a){200===a.status?_onCartShippingRatesUpdate(r.shipping_rates,e):setTimeout(t,500)},error:_onError})};return t},_fullMessagesFromErrors=function(e){var t=[];return jQuery.each(e,function(e,r){jQuery.each(r,function(r,n){t.push(e+" "+n)})}),t},_onError=function(XMLHttpRequest,textStatus){jQuery("#estimated-shipping").hide(),jQuery("#estimated-shipping em").empty(),_enableButtons();var feedback="",data=eval("("+XMLHttpRequest.responseText+")");feedback=data.message?data.message+"("+data.status+"): "+data.description:"Error : "+_fullMessagesFromErrors(data).join("; ")+".","Error : country is not supported."===feedback&&(feedback="We do not ship to this destination."),_render({rates:[],errorFeedback:feedback,success:!1}),jQuery("#"+_config.wrapperId).show()},_onCartShippingRatesUpdate=function(e,t){_enableButtons();var r="";if(t.zip&&(r+=t.zip+", "),t.province&&(r+=t.province+", "),r+=t.country,e.length){"0.00"==e[0].price?jQuery("#estimated-shipping em").html("FREE"):jQuery("#estimated-shipping em").html(_formatRate(e[0].price));for(var n=0;n<e.length;n++)e[n].price=_formatRate(e[n].price)}_render({rates:e,address:r,success:!0}),jQuery("#"+_config.wrapperId+", #estimated-shipping").fadeIn()},_formatRate=function(e){function t(e,t){return"undefined"==typeof e?t:e}function r(e,r,n,a){if(r=t(r,2),n=t(n,","),a=t(a,"."),isNaN(e)||null==e)return 0;e=(e/100).toFixed(r);var i=e.split("."),o=i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+n),s=i[1]?a+i[1]:"";return o+s}if("function"==typeof Shopify.formatMoney)return Shopify.formatMoney(e,_config.moneyFormat);"string"==typeof e&&(e=e.replace(".",""));var n="",a=/\{\{\s*(\w+)\s*\}\}/,i=_config.moneyFormat;switch(i.match(a)[1]){case"amount":n=r(e,2);break;case"amount_no_decimals":n=r(e,0);break;case"amount_with_comma_separator":n=r(e,2,".",",");break;case"amount_no_decimals_with_comma_separator":n=r(e,0,".",",")}return i.replace(a,n)};return _init=function(){new Shopify.CountryProvinceSelector("address_country","address_province",{hideElement:"address_province_container"});var e=jQuery("#address_country"),t=jQuery("#address_province_label").get(0);"undefined"!=typeof Countries&&(Countries.updateProvinceLabel(e.val(),t),e.change(function(){Countries.updateProvinceLabel(e.val(),t)})),jQuery(".get-rates").click(function(){_disableButtons(),jQuery("#"+_config.wrapperId).empty().hide();var e={};e.zip=jQuery("#address_zip").val()||"",e.country=jQuery("#address_country").val()||"",e.province=jQuery("#address_province").val()||"",_getCartShippingRatesForDestination(e)}),_config.customerIsLoggedIn&&jQuery(".get-rates:eq(0)").trigger("click")},{show:function(e){e=e||{},jQuery.extend(_config,e),jQuery(function(){_init()})},getConfig:function(){return _config},formatRate:function(e){return _formatRate(e)}}}();
|
||||
@@ -0,0 +1 @@
|
||||
!function(a){function b(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$sidebar=a(c),this.$sidebarInner=!1,this.$container=this.$sidebar.closest(this.options.containerSelector),this.affixedType="static",this._initialized=!1,this._breakpoint=!1,this._resizeListeners=[],this.dimensions={translateY:0,topSpacing:0,bottomSpacing:0,sidebarHeight:0,sidebarWidth:0,containerTop:0,containerHeight:0,viewportHeight:0,viewportTop:0,lastViewportTop:0},this.initialize()}function c(c){return this.each(function(){var d=a(this),e=a(this).data("stickySidebar");if(e||(e=new b(this,"object"==typeof c&&c),d.data("stickySidebar",e)),"string"==typeof c){if(void 0===e[c]&&-1===["destroy","updateSticky"].indexOf(c))throw new Error('No method named "'+c+'"');e[c]()}})}var d=a(window);b.VERSION="1.0.0",b.EVENT_KEY=".sticky",b.DEFAULTS={topSpacing:0,bottomSpacing:0,containerSelector:!1,innerWrapperSelector:".inner-wrapper-sticky",stickyClass:"is-affixed",resizeSensor:!0,minWidth:!1},b.isIE=function(){return Boolean(navigator.userAgent.match(/Trident/))},b.supportTransform=function(b){var c=!1,d=b?"perspective":"transform",e=d.charAt(0).toUpperCase()+d.slice(1),f="Webkit Moz O ms".split(" "),g=a("<support>").get(0).style;return a.each((d+" "+f.join(e+" ")+e).split(" "),function(a,b){if(void 0!==g[b])return c=b,!1}),c},b.prototype={initialize:function(){if(this.$sidebar.trigger("initialize"+b.EVENT_KEY),this.options.innerWrapperSelector&&(this.$sidebarInner=this.$sidebar.find(this.options.innerWrapperSelector),0===this.$sidebarInner.length&&(this.$sidebarInner=!1)),!this.$sidebarInner){var c=a('<div class="inner-wrapper-sticky" />');this.$sidebar.wrapInner(c),this.$sidebarInner=this.$sidebar.find(".inner-wrapper-sticky")}this.$container.length||(this.$container=this.$sidebar.parent()),"function"!=typeof this.options.topSpacing&&(this.options.topSpacing=parseInt(this.options.topSpacing)||0),"function"!=typeof this.options.bottomSpacing&&(this.options.bottomSpacing=parseInt(this.options.bottomSpacing)||0),this._widthBreakpoint(),this.calcDimensions(),this.stickyPosition(),this.bindEvents(),this._initialized=!0,this.$sidebar.trigger("initialized"+b.EVENT_KEY)},bindEvents:function(){this.options;d.on("resize"+b.EVENT_KEY,a.proxy(this._onResize,this)).on("scroll"+b.EVENT_KEY,a.proxy(this._onScroll,this)),this.$sidebar.on("update"+b.EVENT_KEY,a.proxy(this.updateSticky,this)),this.options.resizeSensor&&(this.addResizerListener(this.$sidebarInner,a.proxy(this.updateSticky,this)),this.addResizerListener(this.$container,a.proxy(this.updateSticky,this)))},_onScroll:function(a){this.$sidebar.is(":visible")&&this.stickyPosition()},_onResize:function(a){this._widthBreakpoint(),this.updateSticky()},calcDimensions:function(){if(!this._breakpoint){var a=this.dimensions;a.containerTop=this.$container.offset().top,a.containerHeight=this.$container.outerHeight(),a.containerBottom=a.containerTop+a.containerHeight,a.sidebarHeight=this.$sidebarInner.outerHeight(),a.sidebarWidth=this.$sidebar.outerWidth(),a.viewportHeight=d.prop("innerHeight"),this._calcDimensionsWithScroll()}},_calcDimensionsWithScroll:function(){var a=this.dimensions;a.sidebarLeft=this.$sidebar.offset().left,a.viewportTop=document.documentElement.scrollTop||document.body.scrollTop,a.viewportBottom=a.viewportTop+a.viewportHeight,a.viewportLeft=document.documentElement.scrollLeft||document.body.scrollLeft,a.topSpacing=this.options.topSpacing,a.bottomSpacing=this.options.bottomSpacing,"function"==typeof a.topSpacing&&(a.topSpacing=parseInt(a.topSpacing(this.$sidebar))||0),"function"==typeof a.bottomSpacing&&(a.bottomSpacing=parseInt(a.bottomSpacing(this.$sidebar))||0)},isSidebarFitsViewport:function(){return this.dimensions.sidebarHeight<this.dimensions.viewportHeight},isScrollingTop:function(){return this.dimensions.viewportTop<this.dimensions.lastViewportTop},getAffixType:function(){var a=this.dimensions,b=!1;this._calcDimensionsWithScroll();var c=a.sidebarHeight+a.containerTop,d=a.viewportTop+a.topSpacing,e=a.viewportBottom-a.bottomSpacing;return this.isScrollingTop()?d<=a.containerTop?(a.translateY=0,b="STATIC"):d<=a.translateY+a.containerTop?(a.translateY=d-a.containerTop,b="VIEWPORT-TOP"):!this.isSidebarFitsViewport()&&a.containerTop<=d&&(b="VIEWPORT-UNBOTTOM"):this.isSidebarFitsViewport()?a.sidebarHeight+d>=a.containerBottom?(a.translateY=a.containerBottom-c,b="CONTAINER-BOTTOM"):d>=a.containerTop&&(a.translateY=d-a.containerTop,b="VIEWPORT-TOP"):a.containerBottom<=e?(a.translateY=a.containerBottom-c,b="CONTAINER-BOTTOM"):c+a.translateY<=e?(a.translateY=e-c,b="VIEWPORT-BOTTOM"):a.containerTop+a.translateY<=d&&(b="VIEWPORT-UNBOTTOM"),a.lastViewportTop=a.viewportTop,b},_getStyle:function(c){if(void 0!==c){var d={inner:{},outer:{}},e=this.dimensions;switch(c){case"VIEWPORT-TOP":d.inner={position:"fixed",top:this.options.topSpacing,left:e.sidebarLeft-e.viewportLeft,width:e.sidebarWidth};break;case"VIEWPORT-BOTTOM":d.inner={position:"fixed",top:"auto",left:e.sidebarLeft,bottom:this.options.Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.tippy=t()})(this,function(){'use strict';function e(e){return e&&'[object Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var a=getComputedStyle(e,null);return t?a[t]:a}function a(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function r(e){if(!e)return document.body;switch(e.nodeName){case'HTML':case'BODY':return e.ownerDocument.body;case'#document':return e.body;}var p=t(e),o=p.overflow,i=p.overflowX,n=p.overflowY;return /(auto|scroll|overlay)/.test(o+n+i)?e:r(a(e))}function p(e){return 11===e?fe:10===e?he:fe||he}function o(e){if(!e)return document.documentElement;for(var a=p(10)?document.body:null,r=e.offsetParent;r===a&&e.nextElementSibling;)r=(e=e.nextElementSibling).offsetParent;var i=r&&r.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TD','TABLE'].indexOf(r.nodeName)&&'static'===t(r,'position')?o(r):r:e?e.ownerDocument.documentElement:document.documentElement}function n(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||o(e.firstElementChild)===e)}function s(e){return null===e.parentNode?e:s(e.parentNode)}function l(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var a=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=a?e:t,p=a?t:e,i=document.createRange();i.setStart(r,0),i.setEnd(p,0);var d=i.commonAncestorContainer;if(e!==d&&t!==d||r.contains(p))return n(d)?d:o(d);var c=s(e);return c.host?l(c.host,t):l(e,s(t).host)}function d(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:'top',a='top'===t?'scrollTop':'scrollLeft',r=e.nodeName;if('BODY'===r||'HTML'===r){var p=e.ownerDocument.documentElement,o=e.ownerDocument.scrollingElement||p;return o[a]}return e[a]}function c(e,t){var a=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2],r=d(t,'top'),p=d(t,'left'),o=a?-1:1;return e.top+=r*o,e.bottom+=r*o,e.left+=p*o,e.right+=p*o,e}function m(e,t){var a='x'===t?'Left':'Top',r='Left'===a?'Right':'Bottom';return parseFloat(e['border'+a+'Width'],10)+parseFloat(e['border'+r+'Width'],10)}function f(e,t,a,r){return ae(t['offset'+e],t['scroll'+e],a['client'+e],a['offset'+e],a['scroll'+e],p(10)?parseInt(a['offset'+e])+parseInt(r['margin'+('Height'===e?'Top':'Left')])+parseInt(r['margin'+('Height'===e?'Bottom':'Right')]):0)}function h(e){var t=e.body,a=e.documentElement,r=p(10)&&getComputedStyle(a);return{height:f('Height',t,a,r),width:f('Width',t,a,r)}}function b(e){return ge({},e,{right:e.left+e.width,bottom:e.top+e.height})}function u(e){var a={};try{if(p(10)){a=e.getBoundingClientRect();var r=d(e,'top'),o=d(e,'left');a.top+=r,a.left+=o,a.bottom+=r,a.right+=o}else a=e.getBoundingClientRect()}catch(t){}var i={left:a.left,top:a.top,width:a.right-a.left,height:a.bottom-a.top},n='HTML'===e.nodeName?h(e.ownerDocument):{},s=n.width||e.clientWidth||i.right-i.left,l=n.height||e.clientHeight||i.bottom-i.top,c=e.offsetWidth-s,f=e.offsetHeight-l;if(c||f){var y=t(e);c-=m(y,'x'),f-=m(y,'y'),i.width-=c,i.height-=f}return b(i)}function y(e,a){var o=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2],i=p(10),n='HTML'===a.nodeName,s=u(e),l=u(a),d=r(e),m=t(a),f=parseFloat(m.borderTopWidth,10),h=parseFloat(m.borderLeftWidth,10);o&&n&&(l.top=ae(l.top,0),l.left=ae(l.left,0));var y=b({top:s.top-l.top-f,left:s.left-l.left-h,width:s.width,height:s.height});if(y.marginTop=0,y.marginLeft=0,!i&&n){var g=parseFloat(m.marginTop,10),x=parseFloat(m.marginLeft,10);y.top-=f-g,y.bottom-=f-g,y.left-=h-x,y.right-=h-x,y.marginTop=g,y.marginLeft=x}return(i&&!o?a.contains(d):a===d&&'BODY'!==d.nodeName)&&(y=c(y,a)),y}function g(e){var t=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1],a=e.ownerDocument.documentElement,r=y(e,a),p=ae(a.clientWidth,window.innerWidth||0),o=ae(a.clientHeight,window.innerHeight||0),i=t?0:d(a),n=t?0:d(a,'left'),s={top:i-r.top+r.marginTop,left:n-r.left+r.marginLeft,width:p,height:o};return b(s)}function x(e){var r=e.nodeName;return'BODY'!==r&&'HTML'!==r&&('fixed'===t(e,'position')||x(a(e)))}function w(e){if(!e||!e.parentElement||p())return document.documentElement;for(var a=e.parentElement;a&&'none'===t(a,'transform');)a=a.parentElement;return a||document.documentElement}function v(e,t,p,o){var i=!!(4<arguments.length&&void 0!==arguments[4])&&arguments[4],n={top:0,left:0},s=i?w(e):l(e,t);if('viewport'===o)n=g(s,i);else{var d;'scrollParent'===o?(d=r(a(t)),'BODY'===d.nodeName&&(d=e.ownerDocument.documentElement)):'window'===o?d=e.ownerDocument.documentElement:d=o;var c=y(d,s,i);if('HTML'===d.nodeName&&!x(s)){var m=h(e.ownerDocument),f=m.height,b=m.width;n.top+=c.top-c.marginTop,n.bottom=f+c.top,n.left+=c.left-c.marginLeft,n.right=b+c.left}else n=c}p=p||0;var u='number'==typeof p;return n.left+=u?p:p.left||0,n.top+=u?p:p.top||0,n.right-=u?p:p.right||0,n.bottom-=u?p:p.bottom||0,n}function k(e){var t=e.width,a=e.height;return t*a}function E(e,t,a,r,p){var o=5<arguments.length&&void 0!==Line truncated
|
||||
@@ -0,0 +1,76 @@
|
||||
theme.ArticleBody = (function() {
|
||||
|
||||
function ArticleBody(container) {
|
||||
this.$container = $(container);
|
||||
|
||||
//var sectionId = this.$container.attr('data-section-id');
|
||||
|
||||
//this.settings = {};
|
||||
|
||||
this.namespace = '.article-body';
|
||||
|
||||
this.onLoad();
|
||||
};
|
||||
|
||||
ArticleBody.prototype = $.extend({}, Section.prototype, ArticleBody.prototype, {
|
||||
slider: {
|
||||
init: function ($container) {
|
||||
var $slider = $container.find('.article-slider'),
|
||||
$insert = $('#article-slider');
|
||||
|
||||
if($insert.length && $slider.length) {
|
||||
$insert.append($slider);
|
||||
|
||||
var $slick = $slider.find('.article-slider__slick'),
|
||||
$dots = $slider.find('.article-slider__dots'),
|
||||
autoplay = $slick.attr('data-autoplay') === 'true' ? true : false,
|
||||
speed = +$slick.attr('data-speed'),
|
||||
infinite = $slick.attr('data-infinite') === 'true' ? true : false;
|
||||
|
||||
$slider.removeClass('d-none');
|
||||
|
||||
$slick.slick({
|
||||
prevArrow: '<div class="slick-prev d-none d-md-flex flex-center position-absolute left-0 ml-10 rounded-circle overflow-hidden cursor-pointer"><i class="position-relative mr-2">' + theme.Global.getIcon('006', true) + '</i></div>',
|
||||
nextArrow: '<div class="slick-next d-none d-md-flex flex-center position-absolute right-0 mr-10 rounded-circle overflow-hidden cursor-pointer"><i class="position-relative ml-3">' + theme.Global.getIcon('007', true) + '</i></div>',
|
||||
dots: true,
|
||||
appendDots: $dots,
|
||||
dotsClass: 'slick-dots d-flex flex-wrap flex-center list-unstyled m-0 my-15',
|
||||
adaptiveHeight: true,
|
||||
autoplay: autoplay,
|
||||
autoplaySpeed: speed,
|
||||
infinite: infinite,
|
||||
rtl: theme.rtl
|
||||
});
|
||||
|
||||
$slider.removeClass('invisible');
|
||||
|
||||
this.$dom = $slick;
|
||||
}
|
||||
},
|
||||
destroy: function () {
|
||||
if(this.$dom) {
|
||||
this.$dom.slick('destroy');
|
||||
this.$dom = null;
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad: function() {
|
||||
if(theme.is_loaded) {
|
||||
theme.ImagesLazyLoad.update();
|
||||
}
|
||||
|
||||
this.slider.init(this.$container);
|
||||
},
|
||||
onUnload: function() {
|
||||
this.$container.off(this.namespace);
|
||||
|
||||
this.slider.destroy();
|
||||
}
|
||||
});
|
||||
|
||||
return ArticleBody;
|
||||
})();
|
||||
|
||||
$(function() {
|
||||
theme.sections.register('article-body', theme.ArticleBody);
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.ArticleBody=function(){function e(e){this.$container=$(e),this.namespace=".article-body",this.onLoad()}return e.prototype=$.extend({},Section.prototype,e.prototype,{slider:{init:function(e){var t=e.find(".article-slider"),i=$("#article-slider");if(i.length&&t.length){i.append(t);var o=t.find(".article-slider__slick"),n=t.find(".article-slider__dots"),r="true"===o.attr("data-autoplay"),s=+o.attr("data-speed"),l="true"===o.attr("data-infinite");t.removeClass("d-none"),o.slick({prevArrow:'<div class="slick-prev d-none d-md-flex flex-center position-absolute left-0 ml-10 rounded-circle overflow-hidden cursor-pointer"><i class="position-relative mr-2">'+theme.Global.getIcon("006",!0)+"</i></div>",nextArrow:'<div class="slick-next d-none d-md-flex flex-center position-absolute right-0 mr-10 rounded-circle overflow-hidden cursor-pointer"><i class="position-relative ml-3">'+theme.Global.getIcon("007",!0)+"</i></div>",dots:!0,appendDots:n,dotsClass:"slick-dots d-flex flex-wrap flex-center list-unstyled m-0 my-15",adaptiveHeight:!0,autoplay:r,autoplaySpeed:s,infinite:l,rtl:theme.rtl}),t.removeClass("invisible"),this.$dom=o}},destroy:function(){this.$dom&&(this.$dom.slick("destroy"),this.$dom=null)}},onLoad:function(){theme.is_loaded&&theme.ImagesLazyLoad.update(),this.slider.init(this.$container)},onUnload:function(){this.$container.off(this.namespace),this.slider.destroy()}}),e}(),$(function(){theme.sections.register("article-body",theme.ArticleBody)});
|
||||
@@ -0,0 +1,38 @@
|
||||
theme.BlogBody = (function() {
|
||||
|
||||
function BlogBody(container) {
|
||||
this.$container = $(container);
|
||||
|
||||
//var sectionId = this.$container.attr('data-section-id');
|
||||
|
||||
//this.settings = {};
|
||||
|
||||
this.namespace = '.blog-body';
|
||||
|
||||
this.onLoad();
|
||||
};
|
||||
|
||||
BlogBody.prototype = $.extend({}, Section.prototype, BlogBody.prototype, {
|
||||
onLoad: function() {
|
||||
if(theme.is_loaded) {
|
||||
theme.ImagesLazyLoad.update();
|
||||
if(theme.Masonry) {
|
||||
theme.Masonry.init(true);
|
||||
}
|
||||
}
|
||||
},
|
||||
onUnload: function() {
|
||||
this.$container.off(this.namespace);
|
||||
|
||||
if(theme.Masonry) {
|
||||
theme.Masonry.destroy();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return BlogBody;
|
||||
})();
|
||||
|
||||
$(function() {
|
||||
theme.sections.register('blog-body', theme.BlogBody);
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.BlogBody=function(){function e(e){this.$container=$(e),this.namespace=".blog-body",this.onLoad()}return e.prototype=$.extend({},Section.prototype,e.prototype,{onLoad:function(){theme.is_loaded&&(theme.ImagesLazyLoad.update(),theme.Masonry&&theme.Masonry.init(!0))},onUnload:function(){this.$container.off(this.namespace),theme.Masonry&&theme.Masonry.destroy()}}),e}(),$(function(){theme.sections.register("blog-body",theme.BlogBody)});
|
||||
@@ -0,0 +1,37 @@
|
||||
theme.BlogSidebar = (function() {
|
||||
|
||||
function BlogSidebar(container) {
|
||||
this.$container = $(container);
|
||||
|
||||
//var sectionId = this.$container.attr('data-section-id');
|
||||
|
||||
//this.settings = {};
|
||||
|
||||
this.namespace = '.blog-sidebar';
|
||||
|
||||
this.onLoad();
|
||||
};
|
||||
|
||||
BlogSidebar.prototype = $.extend({}, Section.prototype, BlogSidebar.prototype, {
|
||||
onLoad: function() {
|
||||
if(theme.StickySidebar) {
|
||||
theme.StickySidebar.init(this.$container);
|
||||
}
|
||||
|
||||
if(theme.is_loaded) theme.ImagesLazyLoad.update();
|
||||
},
|
||||
onUnload: function() {
|
||||
this.$container.off(this.namespace);
|
||||
|
||||
if(theme.StickySidebar) {
|
||||
theme.StickySidebar.destroy(this.$container);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return BlogSidebar;
|
||||
})();
|
||||
|
||||
$(function() {
|
||||
theme.sections.register('blog-sidebar', theme.BlogSidebar);
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.BlogSidebar=function(){function e(e){this.$container=$(e),this.namespace=".blog-sidebar",this.onLoad()}return e.prototype=$.extend({},Section.prototype,e.prototype,{onLoad:function(){theme.StickySidebar&&theme.StickySidebar.init(this.$container),theme.is_loaded&&theme.ImagesLazyLoad.update()},onUnload:function(){this.$container.off(this.namespace),theme.StickySidebar&&theme.StickySidebar.destroy(this.$container)}}),e}(),$(function(){theme.sections.register("blog-sidebar",theme.BlogSidebar)});
|
||||
@@ -0,0 +1,118 @@
|
||||
theme.CarouselArticles = (function() {
|
||||
|
||||
function CarouselArticles(container) {
|
||||
this.$container = $(container);
|
||||
|
||||
//var sectionId = this.$container.attr('data-section-id');
|
||||
|
||||
//this.settings = {};
|
||||
|
||||
this.namespace = '.carousel-articles';
|
||||
|
||||
this.onLoad();
|
||||
};
|
||||
|
||||
CarouselArticles.prototype = $.extend({}, Section.prototype, CarouselArticles.prototype, {
|
||||
onLoad: function() {
|
||||
var $carousel = this.$container.find('[data-js-carousel]'),
|
||||
$slick = $carousel.find('[data-js-carousel-slick]');
|
||||
|
||||
if($slick.length) {
|
||||
var $prev = $carousel.find('[data-js-carousel-prev]'),
|
||||
$next = $carousel.find('[data-js-carousel-next]'),
|
||||
$arrows = $prev.add($next),
|
||||
count = +$carousel.attr('data-count'),
|
||||
autoplay = $carousel.attr('data-autoplay') === 'true' ? true : false,
|
||||
speed = +$carousel.attr('data-speed'),
|
||||
infinite = $carousel.attr('data-infinite') === 'true' ? true : false,
|
||||
arrows = $carousel.attr('data-arrows') === 'true' ? true : false,
|
||||
bullets = $carousel.attr('data-bullets') === 'true' ? true : false;
|
||||
|
||||
this.$slick = $slick;
|
||||
|
||||
if(arrows) {
|
||||
function arrowsPosition() {
|
||||
var max_height = 0;
|
||||
|
||||
$slick.find('.carousel__item img').each(function () {
|
||||
max_height = Math.max(max_height, $(this).innerHeight());
|
||||
});
|
||||
|
||||
$arrows.css({ top: max_height/2 });
|
||||
};
|
||||
|
||||
$window.on('theme.resize.carousel-articles', arrowsPosition);
|
||||
}
|
||||
|
||||
$slick.on('init', function() {
|
||||
if(arrows) {
|
||||
arrowsPosition();
|
||||
}
|
||||
|
||||
$carousel.removeClass('invisible');
|
||||
|
||||
theme.Loader.unset($carousel.parent());
|
||||
});
|
||||
|
||||
$slick.slick({
|
||||
lazyLoad: false,
|
||||
arrows: arrows,
|
||||
prevArrow: $prev,
|
||||
nextArrow: $next,
|
||||
dots: bullets,
|
||||
dotsClass: 'slick-dots d-flex flex-wrap flex-center list-unstyled mt-35',
|
||||
adaptiveHeight: true,
|
||||
autoplay: autoplay,
|
||||
autoplaySpeed: speed,
|
||||
infinite: infinite,
|
||||
slidesToShow: count,
|
||||
slidesToScroll: count,
|
||||
rtl: theme.rtl,
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: theme.breakpoints.values.xl,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
slidesToScroll: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: theme.breakpoints.values.lg,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
slidesToScroll: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: theme.breakpoints.values.sm,
|
||||
settings: {
|
||||
slidesToShow: 1,
|
||||
slidesToScroll: 1
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
if(theme.is_loaded) {
|
||||
theme.ImagesLazyLoad.update();
|
||||
}
|
||||
}
|
||||
},
|
||||
onUnload: function() {
|
||||
this.$container.off(this.namespace);
|
||||
|
||||
if(this.$slick) {
|
||||
this.$slick.slick('destroy').off();
|
||||
this.$slick = null;
|
||||
|
||||
$window.unbind('theme.resize.carousel-articles');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return CarouselArticles;
|
||||
})();
|
||||
|
||||
$(function() {
|
||||
theme.sections.register('carousel-articles', theme.CarouselArticles);
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.CarouselArticles=function(){function e(e){this.$container=$(e),this.namespace=".carousel-articles",this.onLoad()}return e.prototype=$.extend({},Section.prototype,e.prototype,{onLoad:function(){var e=this.$container.find("[data-js-carousel]"),t=e.find("[data-js-carousel-slick]");if(t.length){var s=e.find("[data-js-carousel-prev]"),a=e.find("[data-js-carousel-next]"),i=s.add(a),o=+e.attr("data-count"),r="true"===e.attr("data-autoplay"),n=+e.attr("data-speed"),l="true"===e.attr("data-infinite"),d="true"===e.attr("data-arrows"),c="true"===e.attr("data-bullets");if(this.$slick=t,d){function u(){var e=0;t.find(".carousel__item img").each(function(){e=Math.max(e,$(this).innerHeight())}),i.css({top:e/2})}$window.on("theme.resize.carousel-articles",u)}t.on("init",function(){d&&u(),e.removeClass("invisible"),theme.Loader.unset(e.parent())}),t.slick({lazyLoad:!1,arrows:d,prevArrow:s,nextArrow:a,dots:c,dotsClass:"slick-dots d-flex flex-wrap flex-center list-unstyled mt-35",adaptiveHeight:!0,autoplay:r,autoplaySpeed:n,infinite:l,slidesToShow:o,slidesToScroll:o,rtl:theme.rtl,responsive:[{breakpoint:theme.breakpoints.values.xl,settings:{slidesToShow:2,slidesToScroll:2}},{breakpoint:theme.breakpoints.values.lg,settings:{slidesToShow:2,slidesToScroll:2}},{breakpoint:theme.breakpoints.values.sm,settings:{slidesToShow:1,slidesToScroll:1}}]}),theme.is_loaded&&theme.ImagesLazyLoad.update()}},onUnload:function(){this.$container.off(this.namespace),this.$slick&&(this.$slick.slick("destroy").off(),this.$slick=null,$window.unbind("theme.resize.carousel-articles"))}}),e}(),$(function(){theme.sections.register("carousel-articles",theme.CarouselArticles)});
|
||||
@@ -0,0 +1,125 @@
|
||||
theme.CarouselBrands = (function() {
|
||||
|
||||
function CarouselBrands(container) {
|
||||
this.$container = $(container);
|
||||
|
||||
//var sectionId = this.$container.attr('data-section-id');
|
||||
|
||||
//this.settings = {};
|
||||
|
||||
this.namespace = '.carousel-brands';
|
||||
|
||||
this.onLoad();
|
||||
};
|
||||
|
||||
CarouselBrands.prototype = $.extend({}, Section.prototype, CarouselBrands.prototype, {
|
||||
onLoad: function() {
|
||||
var $carousel = this.$container.find('[data-js-carousel]'),
|
||||
$slick = $carousel.find('[data-js-carousel-slick]');
|
||||
|
||||
if($slick.length) {
|
||||
var $prev = $carousel.find('[data-js-carousel-prev]'),
|
||||
$next = $carousel.find('[data-js-carousel-next]'),
|
||||
$arrows = $prev.add($next),
|
||||
count = +$carousel.attr('data-count'),
|
||||
autoplay = $carousel.attr('data-autoplay') === 'true' ? true : false,
|
||||
speed = +$carousel.attr('data-speed'),
|
||||
infinite = $carousel.attr('data-infinite') === 'true' ? true : false,
|
||||
arrows = $carousel.attr('data-arrows') === 'true' ? true : false,
|
||||
bullets = $carousel.attr('data-bullets') === 'true' ? true : false;
|
||||
|
||||
this.$slick = $slick;
|
||||
|
||||
if(arrows) {
|
||||
function arrowsPosition() {
|
||||
var max_height = 0;
|
||||
|
||||
$slick.find('.carousel__item').each(function () {
|
||||
max_height = Math.max(max_height, $(this).innerHeight());
|
||||
});
|
||||
|
||||
$arrows.css({ top: max_height/2 });
|
||||
};
|
||||
|
||||
$window.on('theme.resize.carousel-brands', arrowsPosition);
|
||||
}
|
||||
|
||||
$slick.on('init', function() {
|
||||
if(arrows) {
|
||||
arrowsPosition();
|
||||
}
|
||||
|
||||
$carousel.removeClass('invisible');
|
||||
|
||||
theme.Loader.unset($carousel.parent());
|
||||
});
|
||||
|
||||
$slick.slick({
|
||||
lazyLoad: false,
|
||||
arrows: arrows,
|
||||
prevArrow: $prev,
|
||||
nextArrow: $next,
|
||||
dots: bullets,
|
||||
dotsClass: 'slick-dots d-flex flex-wrap flex-center list-unstyled mt-40',
|
||||
adaptiveHeight: true,
|
||||
autoplay: autoplay,
|
||||
autoplaySpeed: speed,
|
||||
infinite: infinite,
|
||||
slidesToShow: count,
|
||||
slidesToScroll: count,
|
||||
rtl: theme.rtl,
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: theme.breakpoints.values.xl,
|
||||
settings: {
|
||||
slidesToShow: 5,
|
||||
slidesToScroll: 5
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: theme.breakpoints.values.lg,
|
||||
settings: {
|
||||
slidesToShow: 4,
|
||||
slidesToScroll: 4
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: theme.breakpoints.values.md,
|
||||
settings: {
|
||||
slidesToShow: 3,
|
||||
slidesToScroll: 3
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: theme.breakpoints.values.sm,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
slidesToScroll: 2
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
if(theme.is_loaded) {
|
||||
theme.ImagesLazyLoad.update();
|
||||
}
|
||||
}
|
||||
},
|
||||
onUnload: function() {
|
||||
this.$container.off(this.namespace);
|
||||
|
||||
if(this.$slick) {
|
||||
this.$slick.slick('destroy').off();
|
||||
this.$slick = null;
|
||||
|
||||
$window.unbind('theme.resize.carousel-brands');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return CarouselBrands;
|
||||
})();
|
||||
|
||||
$(function() {
|
||||
theme.sections.register('carousel-brands', theme.CarouselBrands);
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.CarouselBrands=function(){function e(e){this.$container=$(e),this.namespace=".carousel-brands",this.onLoad()}return e.prototype=$.extend({},Section.prototype,e.prototype,{onLoad:function(){var e=this.$container.find("[data-js-carousel]"),t=e.find("[data-js-carousel-slick]");if(t.length){var s=e.find("[data-js-carousel-prev]"),a=e.find("[data-js-carousel-next]"),o=s.add(a),i=+e.attr("data-count"),n="true"===e.attr("data-autoplay"),r=+e.attr("data-speed"),l="true"===e.attr("data-infinite"),d="true"===e.attr("data-arrows"),c="true"===e.attr("data-bullets");if(this.$slick=t,d){function u(){var e=0;t.find(".carousel__item").each(function(){e=Math.max(e,$(this).innerHeight())}),o.css({top:e/2})}$window.on("theme.resize.carousel-brands",u)}t.on("init",function(){d&&u(),e.removeClass("invisible"),theme.Loader.unset(e.parent())}),t.slick({lazyLoad:!1,arrows:d,prevArrow:s,nextArrow:a,dots:c,dotsClass:"slick-dots d-flex flex-wrap flex-center list-unstyled mt-40",adaptiveHeight:!0,autoplay:n,autoplaySpeed:r,infinite:l,slidesToShow:i,slidesToScroll:i,rtl:theme.rtl,responsive:[{breakpoint:theme.breakpoints.values.xl,settings:{slidesToShow:5,slidesToScroll:5}},{breakpoint:theme.breakpoints.values.lg,settings:{slidesToShow:4,slidesToScroll:4}},{breakpoint:theme.breakpoints.values.md,settings:{slidesToShow:3,slidesToScroll:3}},{breakpoint:theme.breakpoints.values.sm,settings:{slidesToShow:2,slidesToScroll:2}}]}),theme.is_loaded&&theme.ImagesLazyLoad.update()}},onUnload:function(){this.$container.off(this.namespace),this.$slick&&(this.$slick.slick("destroy").off(),this.$slick=null,$window.unbind("theme.resize.carousel-brands"))}}),e}(),$(function(){theme.sections.register("carousel-brands",theme.CarouselBrands)});
|
||||
@@ -0,0 +1,257 @@
|
||||
theme.CarouselProducts = (function() {
|
||||
|
||||
function CarouselProducts(container) {
|
||||
this.$container = $(container);
|
||||
|
||||
//var sectionId = this.$container.attr('data-section-id');
|
||||
|
||||
//this.settings = {};
|
||||
|
||||
this.namespace = '.carousel-products';
|
||||
|
||||
this.onLoad();
|
||||
};
|
||||
|
||||
CarouselProducts.prototype = $.extend({}, Section.prototype, CarouselProducts.prototype, {
|
||||
_checkProduct: function ($slide, beforeAjax) {
|
||||
var _ = this,
|
||||
handle = $slide.attr('data-handle');
|
||||
|
||||
if(handle) {
|
||||
if(beforeAjax) {
|
||||
beforeAjax($slide);
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: 'https://' + window.location.hostname + '/products/' + handle,
|
||||
data: {
|
||||
view: 'collection'
|
||||
},
|
||||
cache: false,
|
||||
dataType: 'html',
|
||||
success: function (data) {
|
||||
var $data = $(data).clone();
|
||||
|
||||
$data.find('img').one('load', function () {
|
||||
$slide.add(_.$slick.find('.slick-cloned[data-handle="' + handle + '"]')).html($data).removeAttr('data-handle');
|
||||
});
|
||||
|
||||
$slide.trigger('loaded');
|
||||
}
|
||||
});
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
onLoad: function() {
|
||||
var _ = this,
|
||||
$carousel = this.$container.find('[data-js-carousel]'),
|
||||
$slick = this.$container.find('[data-js-carousel-slick]'),
|
||||
$control = this.$container.find('[data-carousel-control]'),
|
||||
$products = this.$container.find('[data-carousel-items]'),
|
||||
xhr = null;
|
||||
|
||||
this.$control = $control;
|
||||
|
||||
if($slick.length) {
|
||||
var $slides = $slick.find('> *'),
|
||||
$prev = $carousel.find('[data-js-carousel-prev]'),
|
||||
$next = $carousel.find('[data-js-carousel-next]'),
|
||||
$arrows = $prev.add($next),
|
||||
count = +$carousel.attr('data-count'),
|
||||
autoplay = $carousel.attr('data-autoplay') === 'true' ? true : false,
|
||||
speed = +$carousel.attr('data-speed'),
|
||||
infinite = $carousel.attr('data-infinite') === 'true' ? true : false,
|
||||
arrows = $carousel.attr('data-arrows') === 'true' ? true : false,
|
||||
bullets = $carousel.attr('data-bullets') === 'true' ? true : false;
|
||||
|
||||
this.$slick = $slick;
|
||||
|
||||
if(arrows) {
|
||||
function arrowsPosition() {
|
||||
var max_height = 0;
|
||||
|
||||
$slick.find('.carousel__item img').each(function () {
|
||||
max_height = Math.max(max_height, $(this).innerHeight());
|
||||
});
|
||||
|
||||
$arrows.css({top: max_height / 2});
|
||||
};
|
||||
|
||||
$window.on('theme.resize.carousel-products', arrowsPosition);
|
||||
}
|
||||
|
||||
function initSlick() {
|
||||
$slick.one('init', function() {
|
||||
if(arrows) {
|
||||
arrowsPosition();
|
||||
}
|
||||
|
||||
$carousel.removeClass('invisible');
|
||||
|
||||
theme.Loader.unset($carousel.parent());
|
||||
});
|
||||
|
||||
$slick.on('beforeChange', function (event, slick, currentSlide, nextSlide) {
|
||||
var check_before = nextSlide - 1,
|
||||
check_after = nextSlide + count;
|
||||
|
||||
function beforeAjax($slide) {
|
||||
$slides.unbind('loaded');
|
||||
|
||||
$slide.one('loaded', function () {
|
||||
theme.ProductReview.update();
|
||||
});
|
||||
};
|
||||
|
||||
_._checkProduct($slick.find('[data-slick-index="' + check_before + '"]'), beforeAjax);
|
||||
|
||||
for(var i = check_after; i > currentSlide + 1; i--) {
|
||||
_._checkProduct($slick.find('[data-slick-index="' + i + '"]'), beforeAjax);
|
||||
}
|
||||
});
|
||||
|
||||
if(theme.Tooltip) {
|
||||
$slick.on('afterChange', function () {
|
||||
theme.Tooltip.init();
|
||||
});
|
||||
}
|
||||
|
||||
$slick.slick({
|
||||
lazyLoad: false,
|
||||
arrows: arrows,
|
||||
prevArrow: $prev,
|
||||
nextArrow: $next,
|
||||
dots: bullets,
|
||||
dotsClass: 'slick-dots d-flex flex-wrap flex-center list-unstyled mt-7',
|
||||
adaptiveHeight: true,
|
||||
autoplay: autoplay,
|
||||
autoplaySpeed: speed,
|
||||
infinite: infinite,
|
||||
slidesToShow: count,
|
||||
slidesToScroll: count,
|
||||
rtl: theme.rtl,
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: theme.breakpoints.values.xl,
|
||||
settings: {
|
||||
slidesToShow: 3,
|
||||
slidesToScroll: 3
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: theme.breakpoints.values.md,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
slidesToScroll: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
breakpoint: theme.breakpoints.values.sm,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
slidesToScroll: 2
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
};
|
||||
|
||||
initSlick();
|
||||
|
||||
$control.on('click', 'a', function (e) {
|
||||
var $this = $(this);
|
||||
|
||||
if(!$this.hasClass('active')) {
|
||||
if(xhr) {
|
||||
xhr.abort();
|
||||
}
|
||||
|
||||
theme.Loader.set($carousel);
|
||||
|
||||
$carousel.css({
|
||||
'min-height': $products.innerHeight()
|
||||
});
|
||||
|
||||
var collection = $this.attr('data-collection');
|
||||
|
||||
xhr = $.ajax({
|
||||
type: 'GET',
|
||||
url: '/collections/' + collection,
|
||||
cache: false,
|
||||
data: {
|
||||
view: 'carousel',
|
||||
constraint: 'max_count=' + $products.attr('data-max-count') + '+products_pre_row=' + $products.attr('data-products-pre-row') + '+async_ajax_loading=' + $products.attr('data-async-ajax-loading')
|
||||
},
|
||||
dataType: 'html',
|
||||
success: function (data) {
|
||||
$carousel.addClass('invisible');
|
||||
|
||||
$slick.slick('destroy').off();
|
||||
|
||||
$slick.one('init', function () {
|
||||
$carousel.removeAttr('style');
|
||||
|
||||
theme.Loader.unset($carousel);
|
||||
});
|
||||
|
||||
$products.html(data);
|
||||
|
||||
$slides = $slick.find('> *');
|
||||
|
||||
initSlick();
|
||||
|
||||
theme.ImagesLazyLoad.update();
|
||||
theme.ProductReview.update();
|
||||
if(theme.Tooltip) {
|
||||
theme.Tooltip.init();
|
||||
}
|
||||
|
||||
$control.find('a').removeClass('active');
|
||||
$this.addClass('active');
|
||||
|
||||
xhr = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
|
||||
if(theme.is_loaded) {
|
||||
theme.ImagesLazyLoad.update();
|
||||
theme.ProductReview.update();
|
||||
if(theme.Tooltip) {
|
||||
theme.Tooltip.init();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
onUnload: function() {
|
||||
this.$container.off(this.namespace);
|
||||
|
||||
if(this.$slick) {
|
||||
this.$slick.slick('destroy').off();
|
||||
this.$slick = null;
|
||||
|
||||
$window.unbind('theme.resize.carousel-products');
|
||||
}
|
||||
|
||||
this.$control.off();
|
||||
|
||||
if(theme.Tooltip) {
|
||||
theme.Tooltip.destroy();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return CarouselProducts;
|
||||
})();
|
||||
|
||||
$(function() {
|
||||
theme.sections.register('carousel-products', theme.CarouselProducts);
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.CarouselProducts=function(){function t(t){this.$container=$(t),this.namespace=".carousel-products",this.onLoad()}return t.prototype=$.extend({},Section.prototype,t.prototype,{_checkProduct:function(a,t){var o=this,i=a.attr("data-handle");return!!i&&(t&&t(a),$.ajax({type:"GET",url:"https://"+window.location.hostname+"/products/"+i,data:{view:"collection"},cache:!1,dataType:"html",success:function(t){var e=$(t).clone();e.find("img").one("load",function(){a.add(o.$slick.find('.slick-cloned[data-handle="'+i+'"]')).html(e).removeAttr("data-handle")}),a.trigger("loaded")}}),!0)},onLoad:function(){var d=this,o=this.$container.find("[data-js-carousel]"),l=this.$container.find("[data-js-carousel-slick]"),i=this.$container.find("[data-carousel-control]"),n=this.$container.find("[data-carousel-items]"),s=null;if(this.$control=i,l.length){var c=l.find("> *"),t=o.find("[data-js-carousel-prev]"),e=o.find("[data-js-carousel-next]"),a=t.add(e),u=+o.attr("data-count"),r="true"===o.attr("data-autoplay"),h=+o.attr("data-speed"),p="true"===o.attr("data-infinite"),f="true"===o.attr("data-arrows"),m="true"===o.attr("data-bullets");if(this.$slick=l,f){function v(){var t=0;l.find(".carousel__item img").each(function(){t=Math.max(t,$(this).innerHeight())}),a.css({top:t/2})}$window.on("theme.resize.carousel-products",v)}function k(){l.one("init",function(){f&&v(),o.removeClass("invisible"),theme.Loader.unset(o.parent())}),l.on("beforeChange",function(t,e,a,o){var i=o-1,n=o+u;function s(t){c.unbind("loaded"),t.one("loaded",function(){theme.ProductReview.update()})}d._checkProduct(l.find('[data-slick-index="'+i+'"]'),s);for(var r=n;a+1<r;r--)d._checkProduct(l.find('[data-slick-index="'+r+'"]'),s)}),theme.Tooltip&&l.on("afterChange",function(){theme.Tooltip.init()}),l.slick({lazyLoad:!1,arrows:f,prevArrow:t,nextArrow:e,dots:m,dotsClass:"slick-dots d-flex flex-wrap flex-center list-unstyled mt-7",adaptiveHeight:!0,autoplay:r,autoplaySpeed:h,infinite:p,slidesToShow:u,slidesToScroll:u,rtl:theme.rtl,responsive:[{breakpoint:theme.breakpoints.values.xl,settings:{slidesToShow:3,slidesToScroll:3}},{breakpoint:theme.breakpoints.values.md,settings:{slidesToShow:2,slidesToScroll:2}},{breakpoint:theme.breakpoints.values.sm,settings:{slidesToShow:2,slidesToScroll:2}}]})}k(),i.on("click","a",function(t){var e=$(this);if(!e.hasClass("active")){s&&s.abort(),theme.Loader.set(o),o.css({"min-height":n.innerHeight()});var a=e.attr("data-collection");s=$.ajax({type:"GET",url:"/collections/"+a,cache:!1,data:{view:"carousel",constraint:"max_count="+n.attr("data-max-count")+"+products_pre_row="+n.attr("data-products-pre-row")+"+async_ajax_loading="+n.attr("data-async-ajax-loading")},dataType:"html",success:function(t){o.addClass("invisible"),l.slick("destroy").off(),l.one("init",function(){o.removeAttr("style"),theme.Loader.unset(o)}),n.html(t),c=l.find("> *"),k(),theme.ImagesLazyLoad.update(),theme.ProductReview.update(),theme.Tooltip&&theme.Tooltip.init(),i.find("a").removeClass("active"),e.addClass("active"),s=null}})}return t.preventDefault(),!1}),theme.is_loaded&&(theme.ImagesLazyLoad.update(),theme.ProductReview.update(),theme.Tooltip&&theme.Tooltip.init())}},onUnload:function(){this.$container.off(this.namespace),this.$slick&&(this.$slick.slick("destroy").off(),this.$slick=null,$window.unbind("theme.resize.carousel-products")),this.$control.off(),theme.Tooltip&&theme.Tooltip.destroy()}}),t}(),$(function(){theme.sections.register("carousel-products",theme.CarouselProducts)});
|
||||
@@ -0,0 +1,38 @@
|
||||
theme.CollectionBody = (function() {
|
||||
|
||||
function CollectionBody(container) {
|
||||
this.$container = $(container);
|
||||
|
||||
//var sectionId = this.$container.attr('data-section-id');
|
||||
|
||||
//this.settings = {};
|
||||
|
||||
this.namespace = '.collection-body';
|
||||
|
||||
this.onLoad();
|
||||
};
|
||||
|
||||
CollectionBody.prototype = $.extend({}, Section.prototype, CollectionBody.prototype, {
|
||||
onLoad: function() {
|
||||
if(theme.is_loaded) {
|
||||
theme.ImagesLazyLoad.update();
|
||||
if(theme.Tooltip) {
|
||||
theme.Tooltip.init();
|
||||
}
|
||||
}
|
||||
},
|
||||
onUnload: function() {
|
||||
this.$container.off(this.namespace);
|
||||
|
||||
if(theme.Tooltip) {
|
||||
theme.Tooltip.destroy();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return CollectionBody;
|
||||
})();
|
||||
|
||||
$(function() {
|
||||
theme.sections.register('collection-body', theme.CollectionBody);
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.CollectionBody=function(){function o(o){this.$container=$(o),this.namespace=".collection-body",this.onLoad()}return o.prototype=$.extend({},Section.prototype,o.prototype,{onLoad:function(){theme.is_loaded&&(theme.ImagesLazyLoad.update(),theme.Tooltip&&theme.Tooltip.init())},onUnload:function(){this.$container.off(this.namespace),theme.Tooltip&&theme.Tooltip.destroy()}}),o}(),$(function(){theme.sections.register("collection-body",theme.CollectionBody)});
|
||||
@@ -0,0 +1,31 @@
|
||||
theme.CollectionHead = (function() {
|
||||
|
||||
function CollectionHead(container) {
|
||||
this.$container = $(container);
|
||||
|
||||
//var sectionId = this.$container.attr('data-section-id');
|
||||
|
||||
//this.settings = {};
|
||||
|
||||
this.namespace = '.collection-head';
|
||||
|
||||
this.onLoad();
|
||||
};
|
||||
|
||||
CollectionHead.prototype = $.extend({}, Section.prototype, CollectionHead.prototype, {
|
||||
onLoad: function() {
|
||||
if(theme.is_loaded) {
|
||||
theme.ImagesLazyLoad.update();
|
||||
}
|
||||
},
|
||||
onUnload: function() {
|
||||
this.$container.off(this.namespace);
|
||||
}
|
||||
});
|
||||
|
||||
return CollectionHead;
|
||||
})();
|
||||
|
||||
$(function() {
|
||||
theme.sections.register('collection-head', theme.CollectionHead);
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.CollectionHead=function(){function e(e){this.$container=$(e),this.namespace=".collection-head",this.onLoad()}return e.prototype=$.extend({},Section.prototype,e.prototype,{onLoad:function(){theme.is_loaded&&theme.ImagesLazyLoad.update()},onUnload:function(){this.$container.off(this.namespace)}}),e}(),$(function(){theme.sections.register("collection-head",theme.CollectionHead)});
|
||||
@@ -0,0 +1,56 @@
|
||||
theme.CollectionSidebar = (function() {
|
||||
|
||||
function CollectionSidebar(container) {
|
||||
this.$container = $(container);
|
||||
|
||||
//var sectionId = this.$container.attr('data-section-id');
|
||||
|
||||
//this.settings = {};
|
||||
|
||||
this.namespace = '.collection-sidebar';
|
||||
|
||||
this.onLoad();
|
||||
};
|
||||
|
||||
CollectionSidebar.prototype = $.extend({}, Section.prototype, CollectionSidebar.prototype, {
|
||||
_rangePrice: {
|
||||
init: function() {
|
||||
if(theme.RangeOfPrice) {
|
||||
theme.RangeOfPrice.init();
|
||||
}
|
||||
},
|
||||
destroy: function() {
|
||||
if(theme.RangeOfPrice) {
|
||||
theme.RangeOfPrice.destroy();
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad: function() {
|
||||
if(theme.StickySidebar) {
|
||||
theme.StickySidebar.init(this.$container, true);
|
||||
}
|
||||
|
||||
this._rangePrice.init();
|
||||
|
||||
if(theme.is_loaded) {
|
||||
theme.ImagesLazyLoad.update();
|
||||
theme.ProductReview.update();
|
||||
}
|
||||
},
|
||||
onUnload: function() {
|
||||
this.$container.off(this.namespace);
|
||||
|
||||
if(theme.StickySidebar) {
|
||||
theme.StickySidebar.destroy(this.$container, true);
|
||||
}
|
||||
|
||||
this._rangePrice.destroy();
|
||||
}
|
||||
});
|
||||
|
||||
return CollectionSidebar;
|
||||
})();
|
||||
|
||||
$(function() {
|
||||
theme.sections.register('collection-sidebar', theme.CollectionSidebar);
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.CollectionSidebar=function(){function e(e){this.$container=$(e),this.namespace=".collection-sidebar",this.onLoad()}return e.prototype=$.extend({},Section.prototype,e.prototype,{_rangePrice:{init:function(){theme.RangeOfPrice&&theme.RangeOfPrice.init()},destroy:function(){theme.RangeOfPrice&&theme.RangeOfPrice.destroy()}},onLoad:function(){theme.StickySidebar&&theme.StickySidebar.init(this.$container,!0),this._rangePrice.init(),theme.is_loaded&&(theme.ImagesLazyLoad.update(),theme.ProductReview.update())},onUnload:function(){this.$container.off(this.namespace),theme.StickySidebar&&theme.StickySidebar.destroy(this.$container,!0),this._rangePrice.destroy()}}),e}(),$(function(){theme.sections.register("collection-sidebar",theme.CollectionSidebar)});
|
||||
@@ -0,0 +1,43 @@
|
||||
theme.Footbar = (function() {
|
||||
function Footbar(container) {
|
||||
this.$container = $(container);
|
||||
|
||||
//var sectionId = this.$container.attr('data-section-id');
|
||||
|
||||
//this.settings = {};
|
||||
|
||||
this.namespace = '.footbar';
|
||||
|
||||
this.onLoad();
|
||||
};
|
||||
|
||||
Footbar.prototype = $.extend({}, Section.prototype, Footbar.prototype, {
|
||||
onLoad: function() {
|
||||
if(theme.Notifications) {
|
||||
theme.Notifications.init(this.$container);
|
||||
}
|
||||
|
||||
if(theme.ProductFootbar) {
|
||||
theme.ProductFootbar.init(this.$container);
|
||||
}
|
||||
|
||||
},
|
||||
onUnload: function() {
|
||||
this.$container.off(this.namespace);
|
||||
|
||||
if(theme.Notifications) {
|
||||
theme.Notifications.destroy(this.$container);
|
||||
}
|
||||
|
||||
if(theme.ProductFootbar) {
|
||||
theme.ProductFootbar.destroy();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return Footbar;
|
||||
})();
|
||||
|
||||
$(function() {
|
||||
theme.sections.register('footbar', theme.Footbar);
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.Footbar=function(){function t(t){this.$container=$(t),this.namespace=".footbar",this.onLoad()}return t.prototype=$.extend({},Section.prototype,t.prototype,{onLoad:function(){theme.Notifications&&theme.Notifications.init(this.$container),theme.ProductFootbar&&theme.ProductFootbar.init(this.$container)},onUnload:function(){this.$container.off(this.namespace),theme.Notifications&&theme.Notifications.destroy(this.$container),theme.ProductFootbar&&theme.ProductFootbar.destroy()}}),t}(),$(function(){theme.sections.register("footbar",theme.Footbar)});
|
||||
@@ -0,0 +1,153 @@
|
||||
theme.Footer = (function() {
|
||||
|
||||
function Footer(container) {
|
||||
this.$container = $(container);
|
||||
|
||||
//var sectionId = this.$container.attr('data-section-id');
|
||||
|
||||
//this.settings = {};
|
||||
|
||||
this.namespace = '.footer';
|
||||
|
||||
this.onLoad();
|
||||
};
|
||||
|
||||
Footer.prototype = $.extend({}, Section.prototype, Footer.prototype, {
|
||||
_back_to_top: {
|
||||
init: function(namespace) {
|
||||
var _ = this,
|
||||
$button = $('[data-js-button-back-to-top]'),
|
||||
namespace = namespace + '.buttonToTop';
|
||||
|
||||
if($button.length) {
|
||||
var bp = $button.attr('data-js-button-back-to-top') || 1000,
|
||||
duration = function () {
|
||||
return theme.animations.backtotop.scroll_duration * 1000;
|
||||
},
|
||||
is_animate = false,
|
||||
unbind = true;
|
||||
|
||||
$(window).on('scroll' + namespace + ' resize' + namespace, function () {
|
||||
var scroll_t = pageYOffset || Math.max($('body').scrollTop(), $('html').scrollTop());
|
||||
|
||||
if(!$button.attr('data-bind')) {
|
||||
$button[scroll_t > bp ? 'addClass' : 'removeClass']('show');
|
||||
}
|
||||
|
||||
if(scroll_t > bp && unbind) {
|
||||
$button.removeAttr('data-bind');
|
||||
}
|
||||
});
|
||||
|
||||
$button.on('click', function(e) {
|
||||
if(!is_animate) {
|
||||
is_animate = true;
|
||||
|
||||
var bind = $button.attr('data-bind');
|
||||
|
||||
if(bind) {
|
||||
$('html, body').velocity('stop').velocity( 'scroll' , {
|
||||
offset: bind,
|
||||
duration: duration(),
|
||||
complete: function () {
|
||||
$button.removeAttr('data-bind');
|
||||
|
||||
is_animate = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
var scroll_t = pageYOffset || Math.max($('body').scrollTop(), $('html').scrollTop());
|
||||
|
||||
unbind = false;
|
||||
|
||||
$button.attr('data-bind', scroll_t);
|
||||
|
||||
$('html, body').velocity('stop').velocity( 'scroll' , {
|
||||
offset: 0,
|
||||
duration: duration(),
|
||||
complete: function () {
|
||||
is_animate = false;
|
||||
unbind = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
return false;
|
||||
});
|
||||
|
||||
this.destroy = function() {
|
||||
$(window).unbind('scroll' + namespace + ' resize' + namespace);
|
||||
$button.off();
|
||||
delete _.destroy;
|
||||
};
|
||||
}
|
||||
},
|
||||
destroy: function() {
|
||||
if(this.destroy) {
|
||||
this.destroy();
|
||||
}
|
||||
}
|
||||
},
|
||||
_fixed: {
|
||||
init: function ($footer, namespace) {
|
||||
if($footer.length && $footer[0].hasAttribute('data-js-footer-fixed')) {
|
||||
var $parent = $footer.parent(),
|
||||
$main = $('#MainContent');
|
||||
|
||||
function calculate() {
|
||||
var footer_height = $footer.innerHeight(),
|
||||
can_fix = $main.innerHeight() > footer_height + window.innerHeight;
|
||||
|
||||
$footer[can_fix && theme.current.is_desktop ? 'addClass' : 'removeClass']('footer--fixed');
|
||||
|
||||
$footer.css({
|
||||
width: theme.current.is_desktop && $parent.hasClass('container') ? $parent.width() + 'px' : ''
|
||||
});
|
||||
|
||||
$main.css({
|
||||
marginBottom: can_fix && theme.current.is_desktop ? footer_height + parseInt($footer.css('margin-top')) : ''
|
||||
});
|
||||
};
|
||||
|
||||
$window.on('theme.resize' + namespace, calculate);
|
||||
|
||||
calculate();
|
||||
}
|
||||
},
|
||||
destroy: function (namespace) {
|
||||
$window.unbind('theme.resize' + namespace);
|
||||
}
|
||||
},
|
||||
onLoad: function() {
|
||||
var $footer = $('.js-footer');
|
||||
|
||||
this._fixed.init($footer, this.namespace);
|
||||
this._back_to_top.init(this.namespace);
|
||||
|
||||
if(theme.is_loaded) {
|
||||
if(theme.Tooltip) {
|
||||
theme.Tooltip.init();
|
||||
}
|
||||
}
|
||||
},
|
||||
onUnload: function() {
|
||||
this.$container.off(this.namespace);
|
||||
|
||||
this._fixed.destroy(this.namespace);
|
||||
this._back_to_top.destroy(this.namespace);
|
||||
|
||||
if(theme.Tooltip) {
|
||||
theme.Tooltip.destroy();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return Footer;
|
||||
})();
|
||||
|
||||
$(function() {
|
||||
theme.sections.register('footer', theme.Footer);
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.Footer=function(){function t(t){this.$container=$(t),this.namespace=".footer",this.onLoad()}return t.prototype=$.extend({},Section.prototype,t.prototype,{_back_to_top:{init:function(t){var o=this,i=$("[data-js-button-back-to-top]");t+=".buttonToTop";if(i.length){var e=i.attr("data-js-button-back-to-top")||1e3,n=function(){return 1e3*theme.animations.backtotop.scroll_duration},s=!1,a=!0;$(window).on("scroll"+t+" resize"+t,function(){var t=pageYOffset||Math.max($("body").scrollTop(),$("html").scrollTop());i.attr("data-bind")||i[e<t?"addClass":"removeClass"]("show"),e<t&&a&&i.removeAttr("data-bind")}),i.on("click",function(t){if(!s){s=!0;var o=i.attr("data-bind");if(o)$("html, body").velocity("stop").velocity("scroll",{offset:o,duration:n(),complete:function(){i.removeAttr("data-bind"),s=!1}});else{var e=pageYOffset||Math.max($("body").scrollTop(),$("html").scrollTop());a=!1,i.attr("data-bind",e),$("html, body").velocity("stop").velocity("scroll",{offset:0,duration:n(),complete:function(){a=!(s=!1)}})}}return t.preventDefault(),t.stopPropagation(),!1}),this.destroy=function(){$(window).unbind("scroll"+t+" resize"+t),i.off(),delete o.destroy}}},destroy:function(){this.destroy&&this.destroy()}},_fixed:{init:function(e,t){if(e.length&&e[0].hasAttribute("data-js-footer-fixed")){var i=e.parent(),n=$("#MainContent");function o(){var t=e.innerHeight(),o=n.innerHeight()>t+window.innerHeight;e[o&&theme.current.is_desktop?"addClass":"removeClass"]("footer--fixed"),e.css({width:theme.current.is_desktop&&i.hasClass("container")?i.width()+"px":""}),n.css({marginBottom:o&&theme.current.is_desktop?t+parseInt(e.css("margin-top")):""})}$window.on("theme.resize"+t,o),o()}},destroy:function(t){$window.unbind("theme.resize"+t)}},onLoad:function(){var t=$(".js-footer");this._fixed.init(t,this.namespace),this._back_to_top.init(this.namespace),theme.is_loaded&&theme.Tooltip&&theme.Tooltip.init()},onUnload:function(){this.$container.off(this.namespace),this._fixed.destroy(this.namespace),this._back_to_top.destroy(this.namespace),theme.Tooltip&&theme.Tooltip.destroy()}}),t}(),$(function(){theme.sections.register("footer",theme.Footer)});
|
||||
@@ -0,0 +1,78 @@
|
||||
theme.Gallery = (function() {
|
||||
|
||||
function Gallery(container) {
|
||||
this.$container = $(container);
|
||||
|
||||
//var sectionId = this.$container.attr('data-section-id');
|
||||
|
||||
//this.settings = {};
|
||||
|
||||
this.namespace = '.gallery';
|
||||
|
||||
this.onLoad();
|
||||
};
|
||||
|
||||
Gallery.prototype = $.extend({}, Section.prototype, Gallery.prototype, {
|
||||
onLoad: function() {
|
||||
if(theme.is_loaded) {
|
||||
theme.ImagesLazyLoad.update();
|
||||
if(theme.Masonry) {
|
||||
theme.Masonry.init(true);
|
||||
}
|
||||
}
|
||||
|
||||
var $gallery = $('.gallery'),
|
||||
$fotorama = $gallery.find('.gallery__fotorama');
|
||||
|
||||
var fotorama = $fotorama.fotorama({
|
||||
thumbmargin: 0,
|
||||
thumbborderwidth: 0
|
||||
}).data('fotorama');
|
||||
|
||||
$fotorama.addClass('d-none-important');
|
||||
|
||||
this.fotorama = fotorama;
|
||||
|
||||
$('.fotorama__arr--prev').append($('<i>').append(theme.Global.getIcon('006')));
|
||||
$('.fotorama__arr--next').append($('<i>').append(theme.Global.getIcon('007')));
|
||||
$('.fotorama__fullscreen-icon').append($('<i>').append(theme.Global.getIcon('164')));
|
||||
|
||||
$gallery.on('click', '.gallery__item', function () {
|
||||
var index = $(this).attr('data-index'),
|
||||
scroll_t = Math.max($html.scrollTop(), $body.scrollTop());
|
||||
|
||||
fotorama.show({
|
||||
index: index,
|
||||
time: 0
|
||||
});
|
||||
|
||||
$fotorama.removeClass('d-none-important invisible position-absolute');
|
||||
fotorama.requestFullScreen();
|
||||
$html.scrollTop(scroll_t);
|
||||
});
|
||||
|
||||
$fotorama.on('fotorama:fullscreenexit', function () {
|
||||
$fotorama.addClass('d-none-important invisible position-absolute');
|
||||
});
|
||||
},
|
||||
onUnload: function() {
|
||||
this.$container.off(this.namespace);
|
||||
|
||||
if(theme.Masonry) {
|
||||
theme.Masonry.destroy();
|
||||
}
|
||||
|
||||
if(this.fotorama) {
|
||||
this.fotorama.destroy();
|
||||
this.fotorama = null;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
return Gallery;
|
||||
})();
|
||||
|
||||
$(function() {
|
||||
theme.sections.register('gallery', theme.Gallery);
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.Gallery=function(){function e(e){this.$container=$(e),this.namespace=".gallery",this.onLoad()}return e.prototype=$.extend({},Section.prototype,e.prototype,{onLoad:function(){theme.is_loaded&&(theme.ImagesLazyLoad.update(),theme.Masonry&&theme.Masonry.init(!0));var e=$(".gallery"),t=e.find(".gallery__fotorama"),a=t.fotorama({thumbmargin:0,thumbborderwidth:0}).data("fotorama");t.addClass("d-none-important"),this.fotorama=a,$(".fotorama__arr--prev").append($("<i>").append(theme.Global.getIcon("006"))),$(".fotorama__arr--next").append($("<i>").append(theme.Global.getIcon("007"))),$(".fotorama__fullscreen-icon").append($("<i>").append(theme.Global.getIcon("164"))),e.on("click",".gallery__item",function(){var e=$(this).attr("data-index"),o=Math.max($html.scrollTop(),$body.scrollTop());a.show({index:e,time:0}),t.removeClass("d-none-important invisible position-absolute"),a.requestFullScreen(),$html.scrollTop(o)}),t.on("fotorama:fullscreenexit",function(){t.addClass("d-none-important invisible position-absolute")})},onUnload:function(){this.$container.off(this.namespace),theme.Masonry&&theme.Masonry.destroy(),this.fotorama&&(this.fotorama.destroy(),this.fotorama=null)}}),e}(),$(function(){theme.sections.register("gallery",theme.Gallery)});
|
||||
@@ -0,0 +1,345 @@
|
||||
theme.Header = (function() {
|
||||
|
||||
var selectors = {
|
||||
menu: '.js-menu'
|
||||
};
|
||||
|
||||
function Header(container) {
|
||||
this.$container = $(container);
|
||||
|
||||
//var sectionId = this.$container.attr('data-section-id');
|
||||
|
||||
//this.settings = {};
|
||||
|
||||
this.namespace = '.header';
|
||||
|
||||
this.onLoad();
|
||||
};
|
||||
|
||||
Header.prototype = $.extend({}, Section.prototype, Header.prototype, {
|
||||
_tape: function () {
|
||||
var $tape = this.$container.find('.js-header-tape'),
|
||||
duration = function () {
|
||||
return theme.animations.header_tape.duration * 1000;
|
||||
};
|
||||
|
||||
if($tape.length) {
|
||||
var $btn_close = $tape.find('[data-js-action="close"]'),
|
||||
cookie = $.cookie('header-tape'),
|
||||
show_once = $tape.attr('data-js-show-once'),
|
||||
delay = +$tape.attr('data-js-delay'),
|
||||
cookies_life = +$tape.attr('data-js-cookies-life');
|
||||
|
||||
if(cookie !== 'off') {
|
||||
setTimeout(function () {
|
||||
$tape.removeClass('d-none');
|
||||
|
||||
$tape.velocity('slideDown', {
|
||||
duration: duration(),
|
||||
complete: function () {
|
||||
$tape.removeAttr('style');
|
||||
}
|
||||
});
|
||||
}, delay * 1000);
|
||||
|
||||
$btn_close.on('click', function() {
|
||||
if(show_once === 'true') {
|
||||
var date = new Date(),
|
||||
timer = 24 * 60 * 60 * 1000 * cookies_life;
|
||||
|
||||
date.setTime(date.getTime() + timer);
|
||||
|
||||
$.cookie('header-tape', 'off', {
|
||||
expires: date,
|
||||
path: '/'
|
||||
});
|
||||
}
|
||||
|
||||
$(this).off();
|
||||
|
||||
$tape.velocity('slideUp', {
|
||||
duration: duration(),
|
||||
complete: function () {
|
||||
$tape.remove();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
this._registerHansler($btn_close);
|
||||
}
|
||||
},
|
||||
_menu: {
|
||||
init: function(namespace) {
|
||||
var $menu = $(selectors.menu);
|
||||
|
||||
if($menu.length) {
|
||||
this.$menu = $menu;
|
||||
|
||||
this.api = theme.Menu.init($menu, {
|
||||
namespace: namespace
|
||||
});
|
||||
}
|
||||
},
|
||||
destroy: function() {
|
||||
if(this.api) {
|
||||
this.$menu.unbind('mouseenter');
|
||||
|
||||
this.api.destroy();
|
||||
this.api = null;
|
||||
}
|
||||
|
||||
if(this.handler) {
|
||||
this.handler.destroy();
|
||||
}
|
||||
}
|
||||
},
|
||||
_sticky: {
|
||||
init: function() {
|
||||
var $sticky = $('.js-header-sticky'),
|
||||
sticky = $sticky.attr('data-js-sticky'),
|
||||
need_sidebar = $sticky.attr('data-js-desktop-sticky-sidebar');
|
||||
|
||||
if($sticky.length) {
|
||||
var params = {
|
||||
bp: 1024
|
||||
};
|
||||
|
||||
if(sticky === 'desktop_and_mobile' || sticky === 'desktop') {
|
||||
$.extend(params, {
|
||||
desktop: {
|
||||
sticky: '[data-js-desktop-sticky]',
|
||||
limit: 'bottom',
|
||||
fade: true,
|
||||
duration: function () {
|
||||
return theme.animations.sticky_header.duration * 1000;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if(need_sidebar === 'true') {
|
||||
$.extend(params.desktop, {
|
||||
move: [
|
||||
{
|
||||
elem: '[data-js-sticky-replace-element="logo"]',
|
||||
to: '[data-js-sticky-replace-here="logo"]'
|
||||
},
|
||||
{
|
||||
elem: '[data-js-sticky-replace-element="cart"]',
|
||||
to: '[data-js-sticky-replace-here="cart"]'
|
||||
},
|
||||
{
|
||||
elem: '[data-js-sticky-replace-element="wishlist"]',
|
||||
to: '[data-js-sticky-replace-here="wishlist"]'
|
||||
},
|
||||
{
|
||||
elem: '[data-js-sticky-replace-element="compare"]',
|
||||
to: '[data-js-sticky-replace-here="compare"]'
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if(sticky === 'desktop_and_mobile' || sticky === 'mobile') {
|
||||
$.extend(params, {
|
||||
mobile: {
|
||||
sticky: '[data-js-mobile-sticky]',
|
||||
limit: 'bottom',
|
||||
fade: false
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if(theme.StickyHeader) {
|
||||
this.api = theme.StickyHeader.init($sticky, params);
|
||||
}
|
||||
}
|
||||
},
|
||||
destroy: function() {
|
||||
if(this.api) {
|
||||
this.api.destroy();
|
||||
this.api = null;
|
||||
}
|
||||
}
|
||||
},
|
||||
_languages: {
|
||||
init: function() {
|
||||
var _ = this;
|
||||
|
||||
$(window).on('load', function() {
|
||||
var $languages = $('.js-languages-list'),
|
||||
$weglot = $('.weglot-container').eq(0);
|
||||
|
||||
if($languages.length && $weglot.length) {
|
||||
var $weglot_current = $weglot.find('.wgcurrent'),
|
||||
$weglot_list = $weglot.find('ul'),
|
||||
$header_current = $languages.find('.header__btn-language span'),
|
||||
$header_list = $languages.find('ul');
|
||||
|
||||
_.$header_list = $header_list;
|
||||
|
||||
function insert() {
|
||||
var current_html = $weglot_current.find('a').html(),
|
||||
$span = $('<span>').html(current_html),
|
||||
$li = $('<li>').addClass('active').attr('data-l', $weglot_current.attr('data-l')).append($span);
|
||||
|
||||
$header_current.html(current_html);
|
||||
|
||||
$header_list.html('').append($li);
|
||||
|
||||
$weglot_list.find('li').each(function() {
|
||||
var $this = $(this),
|
||||
$span = $('<span>').html($this.find('a').html()),
|
||||
$li = $('<li>').attr('data-l', $this.attr('data-l')).append($span);
|
||||
|
||||
$header_list.append($li);
|
||||
});
|
||||
};
|
||||
|
||||
function update() {
|
||||
var current_code = $weglot_current.attr('data-l'),
|
||||
current_html = $weglot_current.find('a').html();
|
||||
|
||||
$header_current.html(current_html);
|
||||
|
||||
$header_list.find('li').removeClass('active').filter('[data-l="' + current_code + '"]').addClass('active');
|
||||
};
|
||||
|
||||
insert();
|
||||
|
||||
$languages.removeClass('d-none-important');
|
||||
|
||||
$header_list.on('click', 'li:not(.active)', function() {
|
||||
var $this = $(this);
|
||||
|
||||
$weglot_list.find('li[data-l="' + $this.attr('data-l') + '"] a').trigger('click');
|
||||
|
||||
update();
|
||||
|
||||
$this.parents('[data-js-dropdown]').trigger('hide');
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
destroy: function() {
|
||||
if(this.api) {
|
||||
this.api.destroy();
|
||||
this.api = null;
|
||||
}
|
||||
|
||||
if(this.$header_list) {
|
||||
this.$header_list.off();
|
||||
}
|
||||
}
|
||||
},
|
||||
_currency: {
|
||||
init: function(namespace) {
|
||||
var $currencies = $('.js-currencies-list');
|
||||
|
||||
if($currencies.length && theme.ProductCurrency) {
|
||||
var namespace = namespace + '.currencies',
|
||||
$current_currency = $currencies.find('[data-current-currency]'),
|
||||
cookieCurrency;
|
||||
|
||||
try {
|
||||
cookieCurrency = Currency.cookie.read();
|
||||
} catch(err) {}
|
||||
|
||||
function cheackList(currentCurrency) {
|
||||
var active_button_name;
|
||||
|
||||
$currencies.find('li').each(function () {
|
||||
var $this = $(this);
|
||||
|
||||
if ($this.data('currency-code') == currentCurrency) {
|
||||
$this.addClass('active');
|
||||
|
||||
active_button_name = $this.attr('data-button-name') || currentCurrency;
|
||||
} else {
|
||||
$this.removeClass('active');
|
||||
}
|
||||
});
|
||||
|
||||
return active_button_name;
|
||||
};
|
||||
|
||||
if(cookieCurrency != null && cookieCurrency !== Currency.shopCurrency) {
|
||||
var button_name = cheackList(cookieCurrency);
|
||||
|
||||
$current_currency.html(button_name);
|
||||
}
|
||||
|
||||
$currencies.on('click' + namespace, 'li', function (e) {
|
||||
var $this = $(this);
|
||||
|
||||
if(!$this.hasClass('active')) {
|
||||
var newCurrency = $this.data('currency-code'),
|
||||
button_name = $this.attr('data-button-name') || newCurrency;
|
||||
|
||||
theme.ProductCurrency.setCurrency(newCurrency);
|
||||
|
||||
cheackList(newCurrency);
|
||||
$current_currency.html(button_name);
|
||||
|
||||
if(theme.current.is_desktop) {
|
||||
$this.parents('[data-js-dropdown]').trigger('hide');
|
||||
} else {
|
||||
theme.Popups.closeByName('navigation');
|
||||
}
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
return false;
|
||||
});
|
||||
|
||||
this.api = {
|
||||
destroy: function() {
|
||||
$body.unbind('click' + namespace);
|
||||
}
|
||||
};
|
||||
}
|
||||
},
|
||||
destroy: function() {
|
||||
if(this.api) {
|
||||
this.api.destroy();
|
||||
this.api = null;
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad: function() {
|
||||
if(theme.is_loaded) {
|
||||
theme.Position.update('menu');
|
||||
theme.Position.update('currency');
|
||||
if(theme.Tooltip) {
|
||||
theme.Tooltip.init();
|
||||
}
|
||||
}
|
||||
|
||||
theme.StoreLists.updateHeaderCount();
|
||||
|
||||
this._menu.init(this.namespace);
|
||||
this._sticky.init();
|
||||
this._tape();
|
||||
this._languages.init();
|
||||
this._currency.init(this.namespace);
|
||||
},
|
||||
onUnload: function() {
|
||||
this.$container.off(this.namespace);
|
||||
this._offHanslers();
|
||||
this._menu.destroy();
|
||||
this._sticky.destroy();
|
||||
this._languages.init();
|
||||
this._currency.destroy();
|
||||
if(theme.Tooltip) {
|
||||
theme.Tooltip.destroy();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return Header;
|
||||
})();
|
||||
|
||||
$(function() {
|
||||
theme.sections.register('header', theme.Header);
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.Header=function(){var i=".js-menu";function t(t){this.$container=$(t),this.namespace=".header",this.onLoad()}return t.prototype=$.extend({},Section.prototype,t.prototype,{_tape:function(){var i=this.$container.find(".js-header-tape"),a=function(){return 1e3*theme.animations.header_tape.duration};if(i.length){var t=i.find('[data-js-action="close"]'),e=$.cookie("header-tape"),n=i.attr("data-js-show-once"),s=+i.attr("data-js-delay"),r=+i.attr("data-js-cookies-life");"off"!==e&&(setTimeout(function(){i.removeClass("d-none"),i.velocity("slideDown",{duration:a(),complete:function(){i.removeAttr("style")}})},1e3*s),t.on("click",function(){if("true"===n){var t=new Date,e=864e5*r;t.setTime(t.getTime()+e),$.cookie("header-tape","off",{expires:t,path:"/"})}$(this).off(),i.velocity("slideUp",{duration:a(),complete:function(){i.remove()}})})),this._registerHansler(t)}},_menu:{init:function(t){var e=$(i);e.length&&(this.$menu=e,this.api=theme.Menu.init(e,{namespace:t}))},destroy:function(){this.api&&(this.$menu.unbind("mouseenter"),this.api.destroy(),this.api=null),this.handler&&this.handler.destroy()}},_sticky:{init:function(){var t=$(".js-header-sticky"),e=t.attr("data-js-sticky"),i=t.attr("data-js-desktop-sticky-sidebar");if(t.length){var a={bp:1024};"desktop_and_mobile"!==e&&"desktop"!==e||($.extend(a,{desktop:{sticky:"[data-js-desktop-sticky]",limit:"bottom",fade:!0,duration:function(){return 1e3*theme.animations.sticky_header.duration}}}),"true"===i&&$.extend(a.desktop,{move:[{elem:'[data-js-sticky-replace-element="logo"]',to:'[data-js-sticky-replace-here="logo"]'},{elem:'[data-js-sticky-replace-element="cart"]',to:'[data-js-sticky-replace-here="cart"]'},{elem:'[data-js-sticky-replace-element="wishlist"]',to:'[data-js-sticky-replace-here="wishlist"]'},{elem:'[data-js-sticky-replace-element="compare"]',to:'[data-js-sticky-replace-here="compare"]'}]})),"desktop_and_mobile"!==e&&"mobile"!==e||$.extend(a,{mobile:{sticky:"[data-js-mobile-sticky]",limit:"bottom",fade:!1}}),theme.StickyHeader&&(this.api=theme.StickyHeader.init(t,a))}},destroy:function(){this.api&&(this.api.destroy(),this.api=null)}},_languages:{init:function(){var c=this;$(window).on("load",function(){var t,e,i,a=$(".js-languages-list"),n=$(".weglot-container").eq(0);if(a.length&&n.length){var s=n.find(".wgcurrent"),r=n.find("ul"),o=a.find(".header__btn-language span"),d=a.find("ul");c.$header_list=d,t=s.find("a").html(),e=$("<span>").html(t),i=$("<li>").addClass("active").attr("data-l",s.attr("data-l")).append(e),o.html(t),d.html("").append(i),r.find("li").each(function(){var t=$(this),e=$("<span>").html(t.find("a").html()),i=$("<li>").attr("data-l",t.attr("data-l")).append(e);d.append(i)}),a.removeClass("d-none-important"),d.on("click","li:not(.active)",function(){var t,e,i=$(this);r.find('li[data-l="'+i.attr("data-l")+'"] a').trigger("click"),t=s.attr("data-l"),e=s.find("a").html(),o.html(e),d.find("li").removeClass("active").filter('[data-l="'+t+'"]').addClass("active"),i.parents("[data-js-dropdown]").trigger("hide")})}})},destroy:function(){this.api&&(this.api.destroy(),this.api=null),this.$header_list&&this.$header_list.off()}},_currency:{init:function(t){var a=$(".js-currencies-list");if(a.length&&theme.ProductCurrency){t=t+".currencies";var e,n=a.find("[data-current-currency]");try{e=Currency.cookie.read()}catch(t){}function s(e){var i;return a.find("li").each(function(){var t=$(this);t.data("currency-code")==e?(t.addClass("active"),i=t.attr("data-button-name")||e):t.removeClass("active")}),i}if(null!=e&&e!==Currency.shopCurrency){var i=s(e);n.html(i)}a.on("click"+t,"li",function(t){var e=$(this);if(!e.hasClass("active")){var i=e.data("currency-code"),a=e.attr("data-button-name")||i;theme.ProductCurrency.setCurrency(i),s(i),n.html(a),theme.current.is_desktop?e.parents("[data-js-dropdown]").trigger("hide"):theme.Popups.closeByName("navigation")}return t.preventDefault(),!1}),this.api={destroy:function(){$body.unbind("click"+t)}}}},destroy:function(){this.api&&(this.api.destroy(),this.api=null)}},onLoad:function(){theme.is_loaded&&(theme.Position.update("menu"),theme.Position.update("currency"),theme.Tooltip&&theme.Tooltip.init()),theme.StoreLists.updateHeaderCount(),this._menu.init(this.namespace),this._sticky.init(),this._tape(),this._languages.init(),this._currency.init(this.namespace)},onUnload:function(){this.$container.off(this.namespace),this._offHanslers(),this._menu.destroy(),this._sticky.destroy(),this._languages.init(),this._currency.destroy(),theme.Tooltip&&theme.Tooltip.destroy()}}),t}(),$(function(){theme.sections.register("header",theme.Header)});
|
||||
@@ -0,0 +1,176 @@
|
||||
theme.HomeBuilder = (function() {
|
||||
|
||||
function HomeBuilder(container) {
|
||||
this.$container = $(container);
|
||||
|
||||
//var sectionId = this.$container.attr('data-section-id');
|
||||
|
||||
//this.settings = {};
|
||||
|
||||
this.namespace = '.home-builder';
|
||||
|
||||
this.onLoad();
|
||||
};
|
||||
|
||||
HomeBuilder.prototype = $.extend({}, Section.prototype, HomeBuilder.prototype, {
|
||||
onLoad: function() {
|
||||
var _ = this,
|
||||
$slider = this.$container.find('.rev_slider'),
|
||||
$slider_02 = this.$container.find('.slider'),
|
||||
$instafeed = this.$container.find('#instafeed'),
|
||||
$promobox = this.$container.find('.promobox'),
|
||||
$products = $('.product-featured');
|
||||
|
||||
$slider.each(function () {
|
||||
var $this = $(this),
|
||||
gridwidth = $this.data('gridwidth').split(','),
|
||||
gridheight = $this.data('gridheight').split(','),
|
||||
minheight = $this.data('minheight');
|
||||
|
||||
var revapi = $this.show().revolution({
|
||||
sliderLayout: 'auto',
|
||||
responsiveLevels: [1259, 1024, 777, 540],
|
||||
gridwidth: [+gridwidth[0], +gridwidth[1], +gridwidth[2], +gridwidth[3]],
|
||||
gridheight: [+gridheight[0], +gridheight[1], +gridheight[2], +gridheight[3]],
|
||||
minHeight: minheight !== undefined ? minheight : false,
|
||||
visibilityLevels:[1259, 1024, 777, 540],
|
||||
delay: $this.data('delay') * 1000,
|
||||
disableProgressBar: 'on',
|
||||
lazyType: 'single',
|
||||
spinner: 'none',
|
||||
navigation: {
|
||||
arrows: {
|
||||
enable: $this.data('arrows'),
|
||||
style: 'uranus',
|
||||
hide_onleave: false
|
||||
},
|
||||
bullets: {
|
||||
enable: $this.data('bullets'),
|
||||
h_align: 'center',
|
||||
v_align: 'bottom',
|
||||
h_offset: 0,
|
||||
v_offset: 74,
|
||||
space: 24,
|
||||
hide_onleave: false,
|
||||
tmp: ''
|
||||
},
|
||||
touch: {
|
||||
touchenabled: 'on'
|
||||
}
|
||||
},
|
||||
parallax: {
|
||||
type: 'mouse',
|
||||
origo: 'slidercenter',
|
||||
speed: 400,
|
||||
levels: [2,4,6,8,10,12,14,16,18,20,25,30,35,40,45,50],
|
||||
disable_onmobile: 'on'
|
||||
}
|
||||
});
|
||||
|
||||
_.$container.one('section.unload', function () {
|
||||
revapi.revkill();
|
||||
});
|
||||
});
|
||||
|
||||
$slider_02.each(function() {
|
||||
var $this = $(this),
|
||||
$slick = $this.find('[data-js-slider-slick]'),
|
||||
$prev = $this.find('[data-js-slider-prev]'),
|
||||
$next = $this.find('[data-js-slider-next]'),
|
||||
speed = +$slick.attr('data-speed') * 1000,
|
||||
arrows = $slick.attr('data-arrows') === 'true' ? true : false,
|
||||
bullets = $slick.attr('data-bullets') === 'true' ? true : false;
|
||||
|
||||
_.$slick = $slick;
|
||||
|
||||
$slick.on('init', function() {
|
||||
$slick.removeClass('invisible');
|
||||
|
||||
theme.Loader.unset($slick.parent());
|
||||
});
|
||||
|
||||
$slick.slick({
|
||||
lazyLoad: false,
|
||||
arrows: arrows,
|
||||
prevArrow: $prev,
|
||||
nextArrow: $next,
|
||||
dots: bullets,
|
||||
dotsClass: 'slick-dots d-none d-lg-flex flex-wrap flex-center position-absolute list-unstyled mt-35',
|
||||
adaptiveHeight: true,
|
||||
autoplay: true,
|
||||
autoplaySpeed: speed,
|
||||
fade: true,
|
||||
infinite: true,
|
||||
slidesToShow: 1,
|
||||
slidesToScroll: 1,
|
||||
rtl: theme.rtl
|
||||
});
|
||||
});
|
||||
|
||||
if($instafeed.length) {
|
||||
var template = $($instafeed.find('template')[0].content).children().html();
|
||||
|
||||
var feed = new Instafeed({
|
||||
get: 'user',
|
||||
sortBy: 'most-liked',
|
||||
resolution: "standard_resolution",
|
||||
userId: $instafeed.data('userid'),
|
||||
clientId: $instafeed.data('clientid'),
|
||||
accessToken: $instafeed.data('accesstoken'),
|
||||
limit: $instafeed.data('limit'),
|
||||
template: template.replace(/{\\{/g, '{{').replace(/post-link/g, '{{link}}').replace(/post-image/g, '{{image}}'),
|
||||
after: function () {
|
||||
theme.ImagesLazyLoad.update();
|
||||
}
|
||||
});
|
||||
|
||||
$instafeed.html('').removeClass('d-none');
|
||||
|
||||
feed.run();
|
||||
}
|
||||
|
||||
if(theme.Parallax && $promobox.length) {
|
||||
theme.Parallax.init(_.$container.find('.js-parallax'));
|
||||
}
|
||||
|
||||
if($promobox.length || $products.length) {
|
||||
if(theme.is_loaded) {
|
||||
theme.ImagesLazyLoad.update();
|
||||
}
|
||||
}
|
||||
|
||||
if($products.length) {
|
||||
if(theme.is_loaded) {
|
||||
theme.ProductReview.update();
|
||||
if(theme.Tooltip) {
|
||||
theme.Tooltip.init();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
onUnload: function() {
|
||||
this.$container.off(this.namespace);
|
||||
|
||||
this.$container.trigger('section.unload');
|
||||
|
||||
if(this.$slick) {
|
||||
this.$slick.slick('destroy').off();
|
||||
this.$slick = null;
|
||||
}
|
||||
|
||||
if(theme.Tooltip) {
|
||||
theme.Tooltip.destroy();
|
||||
}
|
||||
|
||||
if(theme.Parallax) {
|
||||
theme.Parallax.destroy(this.$container.find('.js-parallax'));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return HomeBuilder;
|
||||
})();
|
||||
|
||||
$(function() {
|
||||
theme.sections.register('home-builder', theme.HomeBuilder);
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.HomeBuilder=function(){function e(e){this.$container=$(e),this.namespace=".home-builder",this.onLoad()}return e.prototype=$.extend({},Section.prototype,e.prototype,{onLoad:function(){var s=this,e=this.$container.find(".rev_slider"),t=this.$container.find(".slider"),i=this.$container.find("#instafeed"),a=this.$container.find(".promobox"),n=$(".product-featured");if(e.each(function(){var e=$(this),t=e.data("gridwidth").split(","),i=e.data("gridheight").split(","),a=e.data("minheight"),n=e.show().revolution({sliderLayout:"auto",responsiveLevels:[1259,1024,777,540],gridwidth:[+t[0],+t[1],+t[2],+t[3]],gridheight:[+i[0],+i[1],+i[2],+i[3]],minHeight:void 0!==a&&a,visibilityLevels:[1259,1024,777,540],delay:1e3*e.data("delay"),disableProgressBar:"on",lazyType:"single",spinner:"none",navigation:{arrows:{enable:e.data("arrows"),style:"uranus",hide_onleave:!1},bullets:{enable:e.data("bullets"),h_align:"center",v_align:"bottom",h_offset:0,v_offset:74,space:24,hide_onleave:!1,tmp:""},touch:{touchenabled:"on"}},parallax:{type:"mouse",origo:"slidercenter",speed:400,levels:[2,4,6,8,10,12,14,16,18,20,25,30,35,40,45,50],disable_onmobile:"on"}});s.$container.one("section.unload",function(){n.revkill()})}),t.each(function(){var e=$(this),t=e.find("[data-js-slider-slick]"),i=e.find("[data-js-slider-prev]"),a=e.find("[data-js-slider-next]"),n=1e3*+t.attr("data-speed"),o="true"===t.attr("data-arrows"),l="true"===t.attr("data-bullets");(s.$slick=t).on("init",function(){t.removeClass("invisible"),theme.Loader.unset(t.parent())}),t.slick({lazyLoad:!1,arrows:o,prevArrow:i,nextArrow:a,dots:l,dotsClass:"slick-dots d-none d-lg-flex flex-wrap flex-center position-absolute list-unstyled mt-35",adaptiveHeight:!0,autoplay:!0,autoplaySpeed:n,fade:!0,infinite:!0,slidesToShow:1,slidesToScroll:1,rtl:theme.rtl})}),i.length){var o=$(i.find("template")[0].content).children().html(),l=new Instafeed({get:"user",sortBy:"most-liked",resolution:"standard_resolution",userId:i.data("userid"),clientId:i.data("clientid"),accessToken:i.data("accesstoken"),limit:i.data("limit"),template:o.replace(/{\\{/g,"{{").replace(/post-link/g,"{{link}}").replace(/post-image/g,"{{image}}"),after:function(){theme.ImagesLazyLoad.update()}});i.html("").removeClass("d-none"),l.run()}theme.Parallax&&a.length&&theme.Parallax.init(s.$container.find(".js-parallax")),(a.length||n.length)&&theme.is_loaded&&theme.ImagesLazyLoad.update(),n.length&&theme.is_loaded&&(theme.ProductReview.update(),theme.Tooltip&&theme.Tooltip.init())},onUnload:function(){this.$container.off(this.namespace),this.$container.trigger("section.unload"),this.$slick&&(this.$slick.slick("destroy").off(),this.$slick=null),theme.Tooltip&&theme.Tooltip.destroy(),theme.Parallax&&theme.Parallax.destroy(this.$container.find(".js-parallax"))}}),e}(),$(function(){theme.sections.register("home-builder",theme.HomeBuilder)});
|
||||
@@ -0,0 +1,39 @@
|
||||
theme.listCollections = (function() {
|
||||
|
||||
function listCollections(container) {
|
||||
this.$container = $(container);
|
||||
|
||||
//var sectionId = this.$container.attr('data-section-id');
|
||||
|
||||
//this.settings = {};
|
||||
|
||||
this.namespace = '.list-collections';
|
||||
|
||||
this.onLoad();
|
||||
};
|
||||
|
||||
listCollections.prototype = $.extend({}, Section.prototype, listCollections.prototype, {
|
||||
onLoad: function() {
|
||||
if(theme.is_loaded) {
|
||||
theme.ImagesLazyLoad.update();
|
||||
|
||||
if(theme.Masonry) {
|
||||
theme.Masonry.init(true);
|
||||
}
|
||||
}
|
||||
},
|
||||
onUnload: function() {
|
||||
this.$container.off(this.namespace);
|
||||
|
||||
if(theme.Masonry) {
|
||||
theme.Masonry.destroy();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return listCollections;
|
||||
})();
|
||||
|
||||
$(function() {
|
||||
theme.sections.register('list-collections', theme.listCollections);
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.listCollections=function(){function t(t){this.$container=$(t),this.namespace=".list-collections",this.onLoad()}return t.prototype=$.extend({},Section.prototype,t.prototype,{onLoad:function(){theme.is_loaded&&(theme.ImagesLazyLoad.update(),theme.Masonry&&theme.Masonry.init(!0))},onUnload:function(){this.$container.off(this.namespace),theme.Masonry&&theme.Masonry.destroy()}}),t}(),$(function(){theme.sections.register("list-collections",theme.listCollections)});
|
||||
@@ -0,0 +1,83 @@
|
||||
theme.LookBook = (function() {
|
||||
|
||||
function LookBook(container) {
|
||||
this.$container = $(container);
|
||||
|
||||
//var sectionId = this.$container.attr('data-section-id');
|
||||
|
||||
//this.settings = {};
|
||||
|
||||
this.namespace = '.lookbook';
|
||||
|
||||
this.onLoad();
|
||||
};
|
||||
|
||||
LookBook.prototype = $.extend({}, Section.prototype, LookBook.prototype, {
|
||||
onLoad: function() {
|
||||
var $items = this.$container.find('.lookbook__item');
|
||||
|
||||
theme.Global.responsiveHandler({
|
||||
namespace: '.lookbook',
|
||||
element: $items,
|
||||
delegate: '[data-lookbook-picker-button]',
|
||||
on_desktop: true,
|
||||
events: {
|
||||
'click': function() {
|
||||
var $this = $(this),
|
||||
$product = $this.parents('[data-lookbook-picker]').find('[data-lookbook-product]');
|
||||
|
||||
$this[$this.hasClass('open') ? 'removeClass' : 'addClass']('open');
|
||||
$product[$this.hasClass('open') ? 'removeClass' : 'addClass']('d-none');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
theme.Global.responsiveHandler({
|
||||
namespace: '.lookbook',
|
||||
element: $items,
|
||||
delegate: '[data-lookbook-picker]',
|
||||
on_desktop: true,
|
||||
events: {
|
||||
'mouseenter mouseleave': function(e) {
|
||||
var $this = $(this),
|
||||
$btn = $this.find('[data-lookbook-product-button]'),
|
||||
$product = $this.find('[data-lookbook-product]');
|
||||
|
||||
if(!$btn.hasClass('open')) {
|
||||
$product[e.type === 'mouseenter' ? 'removeClass' : 'addClass']('d-none');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
theme.Global.responsiveHandler({
|
||||
namespace: '.lookbook',
|
||||
element: $items,
|
||||
delegate: '[data-lookbook-product-close]',
|
||||
on_desktop: true,
|
||||
events: {
|
||||
'click': function() {
|
||||
$(this).parents('[data-lookbook-picker]').find('[data-lookbook-picker-button]').addClass('open').trigger('click');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if($items.length && theme.is_loaded) {
|
||||
theme.ImagesLazyLoad.update();
|
||||
}
|
||||
},
|
||||
onUnload: function() {
|
||||
this.$container.off(this.namespace);
|
||||
|
||||
this.$container.trigger('section.unload');
|
||||
|
||||
this.$container.find('.lookbook__item').unbind();
|
||||
}
|
||||
});
|
||||
|
||||
return LookBook;
|
||||
})();
|
||||
|
||||
$(function() {
|
||||
theme.sections.register('lookbook', theme.LookBook);
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.LookBook=function(){function o(o){this.$container=$(o),this.namespace=".lookbook",this.onLoad()}return o.prototype=$.extend({},Section.prototype,o.prototype,{onLoad:function(){var o=this.$container.find(".lookbook__item");theme.Global.responsiveHandler({namespace:".lookbook",element:o,delegate:"[data-lookbook-picker-button]",on_desktop:!0,events:{click:function(){var o=$(this),e=o.parents("[data-lookbook-picker]").find("[data-lookbook-product]");o[o.hasClass("open")?"removeClass":"addClass"]("open"),e[o.hasClass("open")?"removeClass":"addClass"]("d-none")}}}),theme.Global.responsiveHandler({namespace:".lookbook",element:o,delegate:"[data-lookbook-picker]",on_desktop:!0,events:{"mouseenter mouseleave":function(o){var e=$(this),t=e.find("[data-lookbook-product-button]"),n=e.find("[data-lookbook-product]");t.hasClass("open")||n["mouseenter"===o.type?"removeClass":"addClass"]("d-none")}}}),theme.Global.responsiveHandler({namespace:".lookbook",element:o,delegate:"[data-lookbook-product-close]",on_desktop:!0,events:{click:function(){$(this).parents("[data-lookbook-picker]").find("[data-lookbook-picker-button]").addClass("open").trigger("click")}}}),o.length&&theme.is_loaded&&theme.ImagesLazyLoad.update()},onUnload:function(){this.$container.off(this.namespace),this.$container.trigger("section.unload"),this.$container.find(".lookbook__item").unbind()}}),o}(),$(function(){theme.sections.register("lookbook",theme.LookBook)});
|
||||
@@ -0,0 +1,31 @@
|
||||
theme.PasswordPageContent = (function() {
|
||||
|
||||
function PasswordPageContent(container) {
|
||||
this.$container = $(container);
|
||||
|
||||
//var sectionId = this.$container.attr('data-section-id');
|
||||
|
||||
//this.settings = {};
|
||||
|
||||
this.namespace = '.password-page-content';
|
||||
|
||||
this.onLoad();
|
||||
};
|
||||
|
||||
PasswordPageContent.prototype = $.extend({}, Section.prototype, PasswordPageContent.prototype, {
|
||||
onLoad: function() {
|
||||
if(theme.is_loaded) {
|
||||
theme.ImagesLazyLoad.update();
|
||||
}
|
||||
},
|
||||
onUnload: function() {
|
||||
this.$container.off(this.namespace);
|
||||
}
|
||||
});
|
||||
|
||||
return PasswordPageContent;
|
||||
})();
|
||||
|
||||
$(function() {
|
||||
theme.sections.register('password-page-content', theme.PasswordPageContent);
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.PasswordPageContent=function(){function e(e){this.$container=$(e),this.namespace=".password-page-content",this.onLoad()}return e.prototype=$.extend({},Section.prototype,e.prototype,{onLoad:function(){theme.is_loaded&&theme.ImagesLazyLoad.update()},onUnload:function(){this.$container.off(this.namespace)}}),e}(),$(function(){theme.sections.register("password-page-content",theme.PasswordPageContent)});
|
||||
@@ -0,0 +1,93 @@
|
||||
theme.ProductPage = (function() {
|
||||
|
||||
function ProductPage(container) {
|
||||
this.$container = $(container);
|
||||
|
||||
//var sectionId = this.$container.attr('data-section-id');
|
||||
|
||||
//this.settings = {};
|
||||
|
||||
this.namespace = '.product-page';
|
||||
|
||||
this.onLoad();
|
||||
}
|
||||
|
||||
ProductPage.prototype = $.extend({}, ProductPage.prototype, {
|
||||
onLoad: function () {
|
||||
var $product = this.$container.find('[data-js-product]'),
|
||||
$gallery = $product.find('[data-js-product-gallery]'),
|
||||
$countdown = $product.find('[data-js-product-countdown] .js-countdown'),
|
||||
$text_countdown = $product.find('.js-text-countdown'),
|
||||
$visitors = $product.find('.js-visitors');
|
||||
|
||||
if($gallery.length) {
|
||||
this.$gallery = $gallery;
|
||||
|
||||
if(this.$gallery.find('[data-js-product-gallery-main]').attr('data-js-product-gallery-main') === 'mobile') {
|
||||
function initGallery() {
|
||||
if(theme.current.is_mobile) {
|
||||
theme.ProductGallery.init($gallery);
|
||||
}
|
||||
};
|
||||
|
||||
$window.on('theme.resize', initGallery);
|
||||
|
||||
initGallery();
|
||||
} else {
|
||||
theme.ProductGallery.init($gallery);
|
||||
}
|
||||
}
|
||||
|
||||
if(theme.is_loaded) {
|
||||
theme.ProductReview.update();
|
||||
if(theme.Tooltip) {
|
||||
theme.Tooltip.init();
|
||||
}
|
||||
|
||||
if($countdown.length) {
|
||||
theme.ProductCountdown.init($countdown);
|
||||
}
|
||||
|
||||
if($text_countdown.length) {
|
||||
theme.ProductTextCountdown.init($text_countdown);
|
||||
}
|
||||
|
||||
if($visitors.length) {
|
||||
theme.ProductVisitors.init($visitors);
|
||||
}
|
||||
|
||||
theme.StoreLists.checkProductStatus($product);
|
||||
|
||||
if(theme.Tabs) {
|
||||
theme.Tabs.init();
|
||||
}
|
||||
}
|
||||
|
||||
if(theme.StickySidebar) {
|
||||
theme.StickySidebar.init(this.$container);
|
||||
}
|
||||
},
|
||||
onUnload: function() {
|
||||
this.$container.off(this.namespace);
|
||||
|
||||
if(this.$gallery && this.$gallery.length) {
|
||||
theme.ProductGallery.destroy(this.$gallery);
|
||||
this.$gallery = null;
|
||||
}
|
||||
|
||||
if(theme.StickySidebar) {
|
||||
theme.StickySidebar.destroy(this.$container);
|
||||
}
|
||||
|
||||
if(theme.Tooltip) {
|
||||
theme.Tooltip.destroy();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return ProductPage;
|
||||
})();
|
||||
|
||||
$(function() {
|
||||
theme.sections.register('product-page', theme.ProductPage);
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.ProductPage=function(){function t(t){this.$container=$(t),this.namespace=".product-page",this.onLoad()}return t.prototype=$.extend({},t.prototype,{onLoad:function(){var t=this.$container.find("[data-js-product]"),e=t.find("[data-js-product-gallery]"),i=t.find("[data-js-product-countdown] .js-countdown"),o=t.find(".js-text-countdown"),n=t.find(".js-visitors");if(e.length)if(this.$gallery=e,"mobile"===this.$gallery.find("[data-js-product-gallery-main]").attr("data-js-product-gallery-main")){function r(){theme.current.is_mobile&&theme.ProductGallery.init(e)}$window.on("theme.resize",r),r()}else theme.ProductGallery.init(e);theme.is_loaded&&(theme.ProductReview.update(),theme.Tooltip&&theme.Tooltip.init(),i.length&&theme.ProductCountdown.init(i),o.length&&theme.ProductTextCountdown.init(o),n.length&&theme.ProductVisitors.init(n),theme.StoreLists.checkProductStatus(t),theme.Tabs&&theme.Tabs.init()),theme.StickySidebar&&theme.StickySidebar.init(this.$container)},onUnload:function(){this.$container.off(this.namespace),this.$gallery&&this.$gallery.length&&(theme.ProductGallery.destroy(this.$gallery),this.$gallery=null),theme.StickySidebar&&theme.StickySidebar.destroy(this.$container),theme.Tooltip&&theme.Tooltip.destroy()}}),t}(),$(function(){theme.sections.register("product-page",theme.ProductPage)});
|
||||
@@ -0,0 +1,37 @@
|
||||
theme.SliderRevolution = (function() {
|
||||
|
||||
function SliderRevolution(container) {
|
||||
this.$container = $(container);
|
||||
|
||||
//var sectionId = this.$container.attr('data-section-id');
|
||||
|
||||
//this.settings = {};
|
||||
|
||||
this.namespace = '.slider-revolution';
|
||||
|
||||
this.onLoad();
|
||||
};
|
||||
|
||||
SliderRevolution.prototype = $.extend({}, Section.prototype, SliderRevolution.prototype, {
|
||||
onLoad: function() {
|
||||
try {
|
||||
this.revapi = page.RevolutionInit();
|
||||
} catch(e) {
|
||||
console.log('JavaScript Error', e);
|
||||
}
|
||||
},
|
||||
onUnload: function() {
|
||||
this.$container.off(this.namespace);
|
||||
|
||||
if(this.revapi) {
|
||||
this.revapi.revkill();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return SliderRevolution;
|
||||
})();
|
||||
|
||||
$(function() {
|
||||
theme.sections.register('slider-revolution', theme.SliderRevolution);
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.SliderRevolution=function(){function t(t){this.$container=$(t),this.namespace=".slider-revolution",this.onLoad()}return t.prototype=$.extend({},Section.prototype,t.prototype,{onLoad:function(){try{this.revapi=page.RevolutionInit()}catch(t){console.log("JavaScript Error",t)}},onUnload:function(){this.$container.off(this.namespace),this.revapi&&this.revapi.revkill()}}),t}(),$(function(){theme.sections.register("slider-revolution",theme.SliderRevolution)});
|
||||
@@ -0,0 +1,40 @@
|
||||
theme.SortingCollections = (function() {
|
||||
|
||||
function SortingCollections(container) {
|
||||
this.$container = $(container);
|
||||
|
||||
//var sectionId = this.$container.attr('data-section-id');
|
||||
|
||||
//this.settings = {};
|
||||
|
||||
this.namespace = '.sorting-collections';
|
||||
|
||||
this.onLoad();
|
||||
};
|
||||
|
||||
SortingCollections.prototype = $.extend({}, Section.prototype, SortingCollections.prototype, {
|
||||
onLoad: function() {
|
||||
var $control = this.$container.find('[data-sorting-collections-control]'),
|
||||
$products = this.$container.find('[data-sorting-collections-items]'),
|
||||
xhr = null;
|
||||
|
||||
this.$control = $control;
|
||||
|
||||
if(theme.is_loaded) {
|
||||
theme.ImagesLazyLoad.update();
|
||||
theme.ProductReview.update();
|
||||
}
|
||||
},
|
||||
onUnload: function() {
|
||||
this.$container.off(this.namespace);
|
||||
|
||||
this.$control.off();
|
||||
}
|
||||
});
|
||||
|
||||
return SortingCollections;
|
||||
})();
|
||||
|
||||
$(function() {
|
||||
theme.sections.register('sorting-collections', theme.SortingCollections);
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
theme.SortingCollections=function(){function t(t){this.$container=$(t),this.namespace=".sorting-collections",this.onLoad()}return t.prototype=$.extend({},Section.prototype,t.prototype,{onLoad:function(){var t=this.$container.find("[data-sorting-collections-control]");this.$container.find("[data-sorting-collections-items]");this.$control=t,theme.is_loaded&&(theme.ImagesLazyLoad.update(),theme.ProductReview.update())},onUnload:function(){this.$container.off(this.namespace),this.$control.off()}}),t}(),$(function(){theme.sections.register("sorting-collections",theme.SortingCollections)});
|
||||
File diff suppressed because it is too large.
Load diff
+1
@@ -0,0 +1 @@
|
||||
"use strict";window.theme=window.theme||{},theme.Global=function(){function t(){this.settings={set_offset_with_fixed_body:[".header__content--sticky",".footbar",".footer--fixed","#admin_bar_iframe","#preview-bar-iframe"]},this.dom={},this.load()}t.prototype=$.extend({},t.prototype,{load:function(){var t,e=window.navigator.userAgent.toLowerCase(),a=$(".scroll-offset-example");function n(){theme.current.width=window.innerWidth,theme.current.height=window.innerHeight}function o(){theme.current.is_mobile=theme.current.width<theme.breakpoints.main,theme.current.is_desktop=!theme.current.is_mobile,$.each(theme.breakpoints.values,function(t,e){if(e>theme.current.width)return!1;theme.current.bp=t}),t&&t!=theme.current.bp&&$(window).trigger("theme.changed.breakpoint"),t=theme.current.bp}function i(){var t=$("style.scroll-offset-style");if(theme.current.scroll_w=a[0].offsetWidth-a[0].clientWidth,0<theme.current.scroll_w){if(!t.length){var e="body.overflow-hidden.offset-scroll{padding-right:"+theme.current.scroll_w+"px;}.fixed-elem.offset-scroll{padding-right:"+theme.current.scroll_w+"px;}";$("head").append($("<style>").addClass("scroll-offset-style").html(e))}}else t.remove()}window.ie=/trident/gi.test(e)||/msie/gi.test(e),window.edge=document.documentMode||/edge/.test(e),window.ios=navigator.userAgent.match(/like Mac OS X/i),window.moz="undefined"!=typeof InstallTrigger,window.$window=$(window),window.$document=$(document),window.$html=$("html"),window.$body=$html.find("body"),ios?$html.addClass("is-ios"):edge?$html.addClass("is-edge"):ie?$html.addClass("is-ie"):moz&&$html.addClass("is-moz"),this.dom.$icons=$("#theme-icons"),theme.rtl="rtl"===$html.attr("dir"),theme.breakpoints={values:{xs:0,sm:541,md:778,lg:1025,xl:1260}},theme.breakpoints.main=theme.breakpoints.values.lg,theme.current={},$(window).on("resize",$.debounce(250,function(){n(),o(),$(window).trigger("theme.resize")})),$(window).on("theme.changed.breakpoint",function(){i()}),n(),o(),i(),$(window).on("load",function(){theme.is_loaded=!0})},bodyHasScroll:function(t){var e=document,a=e.documentElement,n=e.body,o="client"+t,i="scroll"+t;return/CSS/.test(e.compatMode)?a[o]<a[i]:n[o]<n[i]},fixBody:function(){this.bodyHasScroll("Height")&&($body.addClass("offset-scroll"),$.each(this.settings.set_offset_with_fixed_body,function(){$(this).addClass("offset-scroll fixed-elem")})),this._fixed_scroll_top=pageYOffset,$body.css({top:-1*pageYOffset}),$body.addClass("overflow-hidden position-fixed left-0 w-100"),theme.StickySidebar&&theme.StickySidebar.update($(".js-sticky-sidebar"))},unfixBody:function(){$body.removeClass("offset-scroll overflow-hidden position-fixed left-0 w-100"),$body.add($html).scrollTop(this._fixed_scroll_top),this._fixed_scroll_top=null,$body.css({top:""}),$.each(this.settings.set_offset_with_fixed_body,function(){$(this).removeClass("fixed-elem offset-scroll")}),theme.StickySidebar&&theme.StickySidebar.update($(".js-sticky-sidebar"))},responsiveHandler:function(a){var t,n=a.namespace?a.namespace:".widthHandler";function e(){$.each(a.events,function(t){$(a.element).unbind(t+n)})}function o(){theme.current.is_mobile!==t&&(t=theme.current.is_mobile,a.on_desktop&&theme.current.is_desktop||a.on_mobile&&theme.current.is_mobile?$.each(a.events,function(t,e){a.delegate?$(a.element).on(t+n,a.delegate,e):$(a.element).on(t+n,e)}):e())}return $(window).on("theme.resize"+n,function(){o()}),o(),{unbind:function(){$(window).unbind("theme.resize"+n),e()}}},getIcon:function(t,e){var a=this.dom.$icons.find(".icon-theme-"+t);return e?a.parent().html():a.clone()},handleize:function(t){return t.toLowerCase().replace(/[-!"#$₹%&'* ,./:;<=>?@[\\\]_`{|}~]+/g,"-").replace(/[()]+/g,"").replace(/^-+|-+$/g,"")}}),theme.Global=new t},theme.ImagesLazyLoad=function(){function t(){this.load()}t.prototype=$.extend({},t.prototype,{load:function(){this.init(),this.page_is_loaded=!0},init:function(){var n=this;function t(){$(".lazyload.loaded").each(function(){var t=$(this),e=t.attr("data-master");e&&(t.attr("data-bg")?t.css({"background-image":n.buildSrcset(t,e,"bg")}):t.attr("srcset",n.buildSrcset(t,e,"srcset")))})}this.api=new LazyLoad({elements_selector:".lazyload",threshold:100,callback_enter:function(t){var e,a=$(t);a.attr("data-bg")?(e=a.attr("data-master")||a.attr("data-bg"),a.css({"background-image":n.buildSrcset(a,e,"bg")})):(e=a.attr("data-master")||a.attr("data-srcset"),a.attr("data-srcset",n.buildSrcset(a,e,"srcset")))},callback_load:function(t){$(t).trigger("lazyloaded")}}),$window.on("load",function(){$window.on("theme.resize.lazyload checkImages",t)})},update:function(){this.page_is_loaded&&this.api.update()},buildSrcset:function(t,e,a){var n,o,i,s,r,d=+t.attr("data-scale")||1;return"bg"===a?(i=t.width(),i*=d,0<(i=Math.ceil(i))?e.replace("[width]",i):t.attr("data-bg")):(i=(n=t.parent()).width(),s=n.innerHeight(),o=t.attr("data-aspect-ratio"),r=+t.attr("data-scale-perspective")||1,i*=d,s*=d,theme.current.is_desktop&&(i*=r,s*=r),0<(i=Math.ceil(Math.max(i,s*o)))&&-1!Line truncated
|
||||
+391
@@ -0,0 +1,391 @@
|
||||
// modernizr
|
||||
/*! modernizr 3.3.1 (Custom Build) | MIT *
|
||||
* https://modernizr.com/download/?-csstransforms-csstransforms3d-flexbox-placeholder-svg-touchevents-domprefixes-prefixes-setclasses-testallprops-testprop-teststyles !*/
|
||||
!function(e,t,n){function r(e,t){return typeof e===t}function s(){var e,t,n,s,o,i,a;for(var f in w)if(w.hasOwnProperty(f)){if(e=[],t=w[f],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n<t.options.aliases.length;n++)e.push(t.options.aliases[n].toLowerCase());for(s=r(t.fn,"function")?t.fn():t.fn,o=0;o<e.length;o++)i=e[o],a=i.split("."),1===a.length?Modernizr[a[0]]=s:(!Modernizr[a[0]]||Modernizr[a[0]]instanceof Boolean||(Modernizr[a[0]]=new Boolean(Modernizr[a[0]])),Modernizr[a[0]][a[1]]=s),y.push((s?"":"no-")+a.join("-"))}}function o(e){var t=S.className,n=Modernizr._config.classPrefix||"";if(_&&(t=t.baseVal),Modernizr._config.enableJSClass){var r=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(r,"$1"+n+"js$2")}Modernizr._config.enableClasses&&(t+=" "+n+e.join(" "+n),_?S.className.baseVal=t:S.className=t)}function i(){return"function"!=typeof t.createElement?t.createElement(arguments[0]):_?t.createElementNS.call(t,"http://www.w3.org/2000/svg",arguments[0]):t.createElement.apply(t,arguments)}function a(e,t){return!!~(""+e).indexOf(t)}function f(e){return e.replace(/([a-z])-([a-z])/g,function(e,t,n){return t+n.toUpperCase()}).replace(/^-/,"")}function l(){var e=t.body;return e||(e=i(_?"svg":"body"),e.fake=!0),e}function u(e,n,r,s){var o,a,f,u,d="modernizr",p=i("div"),c=l();if(parseInt(r,10))for(;r--;)f=i("div"),f.id=s?s[r]:d+(r+1),p.appendChild(f);return o=i("style"),o.type="text/css",o.id="s"+d,(c.fake?c:p).appendChild(o),c.appendChild(p),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(t.createTextNode(e)),p.id=d,c.fake&&(c.style.background="",c.style.overflow="hidden",u=S.style.overflow,S.style.overflow="hidden",S.appendChild(c)),a=n(p,e),c.fake?(c.parentNode.removeChild(c),S.style.overflow=u,S.offsetHeight):p.parentNode.removeChild(p),!!a}function d(e,t){return function(){return e.apply(t,arguments)}}function p(e,t,n){var s;for(var o in e)if(e[o]in t)return n===!1?e[o]:(s=t[e[o]],r(s,"function")?d(s,n||t):s);return!1}function c(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function m(t,r){var s=t.length;if("CSS"in e&&"supports"in e.CSS){for(;s--;)if(e.CSS.supports(c(t[s]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var o=[];s--;)o.push("("+c(t[s])+":"+r+")");return o=o.join(" or "),u("@supports ("+o+") { #modernizr { position: absolute; } }",function(e){return"absolute"==getComputedStyle(e,null).position})}return n}function h(e,t,s,o){function l(){d&&(delete k.style,delete k.modElem)}if(o=r(o,"undefined")?!1:o,!r(s,"undefined")){var u=m(e,s);if(!r(u,"undefined"))return u}for(var d,p,c,h,v,g=["modernizr","tspan","samp"];!k.style&&g.length;)d=!0,k.modElem=i(g.shift()),k.style=k.modElem.style;for(c=e.length,p=0;c>p;p++)if(h=e[p],v=k.style[h],a(h,"-")&&(h=f(h)),k.style[h]!==n){if(o||r(s,"undefined"))return l(),"pfx"==t?h:!0;try{k.style[h]=s}catch(y){}if(k.style[h]!=v)return l(),"pfx"==t?h:!0}return l(),!1}function v(e,t,n,s,o){var i=e.charAt(0).toUpperCase()+e.slice(1),a=(e+" "+E.join(i+" ")+i).split(" ");return r(t,"string")||r(t,"undefined")?h(a,t,s,o):(a=(e+" "+T.join(i+" ")+i).split(" "),p(a,t,n))}function g(e,t,r){return v(e,n,n,t,r)}var y=[],w=[],x={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){w.push({name:e,fn:t,options:n})},addAsyncTest:function(e){w.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=x,Modernizr=new Modernizr,Modernizr.addTest("svg",!!t.createElementNS&&!!t.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect);var C=x._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];x._prefixes=C;var S=t.documentElement,_="svg"===S.nodeName.toLowerCase(),b="Moz O ms Webkit",T=x._config.usePrefixes?b.toLowerCase().split(" "):[];x._domPrefixes=T;var z="CSS"in e&&"supports"in e.CSS,P="supportsCSS"in e;Modernizr.addTest("supports",z||P),Modernizr.addTest("placeholder","placeholder"in i("input")&&"placeholder"in i("textarea"));var E=x._config.usePrefixes?b.split(" "):[];x._cssomPrefixes=E;var N=x.testStyles=u;Modernizr.addTest("touchevents",function(){var n;if("ontouchstart"in e||e.DocumentTouch&&t instanceof DocumentTouch)n=!0;else{var r=["@media (",C.join("touch-enabled),("),"heartz",")","{#modernizr{top:9px;position:absolute}}"].join("");N(r,function(e){n=9===e.offsetTop})}return n});var j={elem:i("modernizr")};Modernizr._q.push(function(){delete j.elem});var k={style:j.elem.style};Modernizr._q.unshift(function(){delete k.style});x.testProp=function(e,t,r){return h([e],n,t,r)};x.testAllProps=v,x.testAllProps=g,Modernizr.addTest("csstransforms",function(){return-1===navigator.userAgent.indexOf("Android 2.")&&g("transform","scale(1)",!0)}),Modernizr.addTest("csstransforms3d",function(){var e=!!g("perspective","1px",!0),t=Modernizr._config.usePrefixes;if(e&&(!t||"webkitPerspective"in S.style)){var n,r="#moderLine truncated
|
||||
// jquery
|
||||
/*! jQuery v2.2.3 | (c) jQuery Foundation | jquery.org/license */
|
||||
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="2.2.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isPlainObject:function(a){var b;if("object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype||{},"isPrototypeOf"))return!1;for(b in a);return void 0===b||k.call(a,b)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=d.createElement("script"),b.text=a,d.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:h.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(d=e.call(arguments,2),f=function(){return a.apply(b||this,d.concat(e.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new ReLine truncated
|
||||
}catch(e){}O.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return O.hasData(a)||N.hasData(a)},data:function(a,b,c){return O.access(a,b,c)},removeData:function(a,b){O.remove(a,b)},_data:function(a,b,c){return N.access(a,b,c)},_removeData:function(a,b){N.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=O.get(f),1===f.nodeType&&!N.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),R(f,d,e[d])));N.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){O.set(this,a)}):K(this,function(b){var c,d;if(f&&void 0===b){if(c=O.get(f,a)||O.get(f,a.replace(Q,"-$&").toLowerCase()),void 0!==c)return c;if(d=n.camelCase(a),c=O.get(f,d),void 0!==c)return c;if(c=R(f,d,void 0),void 0!==c)return c}else d=n.camelCase(a),this.each(function(){var c=O.get(this,d);O.set(this,d,b),a.indexOf("-")>-1&&void 0!==c&&O.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){O.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=N.get(a,b),c&&(!d||n.isArray(c)?d=N.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return N.get(a,c)||N.access(a,c,{empty:n.Callbacks("once memory").add(function(){N.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=N.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)};function W(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return n.css(a,b,"")},i=h(),j=c&&c[3]||(n.cssNumber[b]?"":"px"),k=(n.cssNumber[b]||"px"!==j&&+i)&&T.exec(n.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,n.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var X=/^(?:checkbox|radio)$/i,Y=/<([\w:-]+)/,Z=/^$|\/(?:java|ecma)script/i,$={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};$.optgroup=$.option,$.tbody=$.tfoot=$.colgroup=$.caption=$.thead,$.th=$.td;function _(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function aa(a,b){for(var c=0,d=a.length;d>c;c++)N.set(a[c],"globalEval",!b||N.get(b[c],"globalEval"))}var ba=/<|&#?\w+;/;function ca(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],o=0,p=a.length;p>o;o++)if(f=a[o],f||0===f)if("object"===n.type(f))n.merge(m,f.nodeType?[f]:f);else if(ba.test(f)){g=g||l.appendChild(b.createElement("div")),h=(Y.exec(f)||["",""])[1].toLowerCase(),i=$[h]||$._default,g.innerHTML=i[1]+n.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;n.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",o=0;while(f=m[o++])if(d&&n.inArray(f,d)>-1)e&&e.push(f);else if(j=n.contains(f.ownerDocument,f),g=_(l.appendChild(f),"script"),j&&aa(g),c){k=0;while(f=g[k++])Z.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var da=/^key/,ea=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,fa=/^([^.]*)(?:\.(.+)|)/;function ga(){return!0}function ha(){return!1}function ia(){try{return d.activeElement}catch(a){}}function ja(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);forLine truncated
|
||||
e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):cb.test(a.nodeName)||db.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var eb=/[\t\r\n\f]/g;function fb(a){return a.getAttribute&&a.getAttribute("class")||""}n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,fb(this)))});if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=fb(c),d=1===c.nodeType&&(" "+e+" ").replace(eb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=n.trim(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,fb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=fb(c),d=1===c.nodeType&&(" "+e+" ").replace(eb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=n.trim(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):n.isFunction(a)?this.each(function(c){n(this).toggleClass(a.call(this,c,fb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=n(this),f=a.match(G)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=fb(this),b&&N.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":N.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+fb(c)+" ").replace(eb," ").indexOf(b)>-1)return!0;return!1}});var gb=/\r/g,hb=/[\x20\t\r\n\f]+/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(gb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a)).replace(hb," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&(l.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(n.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>-1:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var ib=/^(?:focusinfocus|focusoutblur)$/;n.extend(n.event,{trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!ib.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),l=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},f||!o.trigger||o.trigger.apply(e,c)!==!1)){if(!f&&!o.noBubble&&!n.isWindow(e)){for(j=o.delegateType||q,ib.test(j+q)||(h=h.parentNode);h;h=h.parentNode)p.push(h),i=h;i===(e.ownerDocument||d)&&p.push(i.defaultView||i.parentWindow||a)}g=0;while((h=p[g++])&&!b.isPropagationStopped())b.type=g>1?j:o.bindType||q,m=(N.get(h,"events")||{})[b.type]&&N.get(h,"handle"),m&&m.apply(h,c),m=l&&h[l],m&&m.apply&&L(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=q,f||b.isDefaultPrevented()||o._default&&o._defauLine truncated
|
||||
// debounce
|
||||
/*
|
||||
* jQuery throttle / debounce - v1.1 - 3/7/2010
|
||||
* http://benalman.com/projects/jquery-throttle-debounce-plugin/
|
||||
*
|
||||
* Copyright (c) 2010 "Cowboy" Ben Alman
|
||||
* Dual licensed under the MIT and GPL licenses.
|
||||
* http://benalman.com/about/license/
|
||||
*/
|
||||
(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this);
|
||||
// lazyload
|
||||
/*DOCUMENTATION https://github.com/verlok/lazyload*/
|
||||
var _extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(e,t){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.LazyLoad=t()}(this,function(){"use strict";var e=function(e){var t={elements_selector:"img",container:document,threshold:300,data_src:"src",data_srcset:"srcset",class_loading:"loading",class_loaded:"loaded",class_error:"error",callback_load:null,callback_error:null,callback_set:null,callback_enter:null};return _extends({},t,e)},t=function(e,t){return e.getAttribute("data-"+t)},n=function(e,t,n){return e.setAttribute("data-"+t,n)},r=function(e){return e.filter(function(e){return!t(e,"was-processed")})},s=function(e,t){var n,r=new e(t);try{n=new CustomEvent("LazyLoad::Initialized",{detail:{instance:r}})}catch(e){(n=document.createEvent("CustomEvent")).initCustomEvent("LazyLoad::Initialized",!1,!1,{instance:r})}window.dispatchEvent(n)},o=function(e,n,r){for(var s,o=0;s=e.children[o];o+=1)if("SOURCE"===s.tagName){var i=t(s,r);i&&s.setAttribute(n,i)}},i=function(e,t,n){n&&e.setAttribute(t,n)},a=function(e,n){var r=n.data_src,s=t(e,r),a=e.tagName;if("IMG"===a){var c=n.data_srcset,l=t(e,c),u=e.parentNode;return u&&"PICTURE"===u.tagName&&o(u,"srcset",c),i(e,"srcset",l),void i(e,"src",s)}if("IFRAME"!==a)return"VIDEO"===a?(o(e,"src",r),void i(e,"src",s)):void(s&&(e.style.backgroundImage='url("'+s+'")'));i(e,"src",s)},c="undefined"!=typeof window,l=c&&"IntersectionObserver"in window,u=c&&"classList"in document.createElement("p"),d=function(e,t){u?e.classList.add(t):e.className+=(e.className?" ":"")+t},f=function(e,t){u?e.classList.remove(t):e.className=e.className.replace(new RegExp("(^|\\s+)"+t+"(\\s+|$)")," ").replace(/^\s+/,"").replace(/\s+$/,"")},v=function(e,t){e&&e(t)},_=function(e,t,n){e.removeEventListener("load",t),e.removeEventListener("error",n)},m=function(e,t){var n=function n(s){b(s,!0,t),_(e,n,r)},r=function r(s){b(s,!1,t),_(e,n,r)};e.addEventListener("load",n),e.addEventListener("error",r)},b=function(e,t,n){var r=e.target;f(r,n.class_loading),d(r,t?n.class_loaded:n.class_error),v(t?n.callback_load:n.callback_error,r)},h=function(e,t){v(t.callback_enter,e),["IMG","IFRAME","VIDEO"].indexOf(e.tagName)>-1&&(m(e,t),d(e,t.class_loading)),a(e,t),n(e,"was-processed",!0),v(t.callback_set,e)},p=function(e){return e.isIntersecting||e.intersectionRatio>0},y=function(t,n){this._settings=e(t),this._setObserver(),this.update(n)};y.prototype={_setObserver:function(){var e=this;if(l){var t=this._settings,n={root:t.container===document?null:t.container,rootMargin:t.threshold+"px"};this._observer=new IntersectionObserver(function(t){t.forEach(function(t){if(p(t)){var n=t.target;h(n,e._settings),e._observer.unobserve(n)}}),e._elements=r(e._elements)},n)}},loadAll:function(){var e=this._settings;this._elements.forEach(function(t){h(t,e)}),this._elements=r(this._elements)},update:function(e){var t=this,n=this._settings,s=e||n.container.querySelectorAll(n.elements_selector);this._elements=r(Array.prototype.slice.call(s)),this._observer?this._elements.forEach(function(e){t._observer.observe(e)}):this.loadAll()},destroy:function(){var e=this;this._observer&&(r(this._elements).forEach(function(t){e._observer.unobserve(t)}),this._observer=null),this._elements=null,this._settings=null}};var g=window.lazyLoadOptions;return c&&g&&function(e,t){if(t.length)for(var n,r=0;n=t[r];r+=1)s(e,n);else s(e,t)}(y,g),y});
|
||||
// ui
|
||||
/*! jQuery UI - v1.12.1 - 2017-07-27
|
||||
* http://jqueryui.com
|
||||
* Includes: widget.js
|
||||
* Copyright jQuery Foundation and other contributors; Licensed MIT */
|
||||
|
||||
(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)})(function(t){t.ui=t.ui||{},t.ui.version="1.12.1";var e=0,i=Array.prototype.slice;t.cleanData=function(e){return function(i){var s,n,o;for(o=0;null!=(n=i[o]);o++)try{s=t._data(n,"events"),s&&s.remove&&t(n).triggerHandler("remove")}catch(a){}e(i)}}(t.cleanData),t.widget=function(e,i,s){var n,o,a,r={},l=e.split(".")[0];e=e.split(".")[1];var h=l+"-"+e;return s||(s=i,i=t.Widget),t.isArray(s)&&(s=t.extend.apply(null,[{}].concat(s))),t.expr[":"][h.toLowerCase()]=function(e){return!!t.data(e,h)},t[l]=t[l]||{},n=t[l][e],o=t[l][e]=function(t,e){return this._createWidget?(arguments.length&&this._createWidget(t,e),void 0):new o(t,e)},t.extend(o,n,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(s,function(e,s){return t.isFunction(s)?(r[e]=function(){function t(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}(),void 0):(r[e]=s,void 0)}),o.prototype=t.widget.extend(a,{widgetEventPrefix:n?a.widgetEventPrefix||e:e},r,{constructor:o,namespace:l,widgetName:e,widgetFullName:h}),n?(t.each(n._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete n._childConstructors):i._childConstructors.push(o),t.widget.bridge(e,o),o},t.widget.extend=function(e){for(var s,n,o=i.call(arguments,1),a=0,r=o.length;r>a;a++)for(s in o[a])n=o[a][s],o[a].hasOwnProperty(s)&&void 0!==n&&(e[s]=t.isPlainObject(n)?t.isPlainObject(e[s])?t.widget.extend({},e[s],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,s){var n=s.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=i.call(arguments,1),l=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(l=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):l=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new s(o,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(i,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),i),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return
Line truncated
|
||||
// jquery bridget
|
||||
/**
|
||||
* Bridget makes jQuery widgets
|
||||
* v2.0.1
|
||||
* MIT license
|
||||
*/
|
||||
|
||||
/* jshint browser: true, strict: true, undef: true, unused: true */
|
||||
|
||||
( function( window, factory ) {
|
||||
// universal module definition
|
||||
/*jshint strict: false */ /* globals define, module, require */
|
||||
if ( typeof define == 'function' && define.amd ) {
|
||||
// AMD
|
||||
define( [ 'jquery' ], function( jQuery ) {
|
||||
return factory( window, jQuery );
|
||||
});
|
||||
} else if ( typeof module == 'object' && module.exports ) {
|
||||
// CommonJS
|
||||
module.exports = factory(
|
||||
window,
|
||||
require('jquery')
|
||||
);
|
||||
} else {
|
||||
// browser global
|
||||
window.jQueryBridget = factory(
|
||||
window,
|
||||
window.jQuery
|
||||
);
|
||||
}
|
||||
|
||||
}( window, function factory( window, jQuery ) {
|
||||
'use strict';
|
||||
|
||||
// ----- utils ----- //
|
||||
|
||||
var arraySlice = Array.prototype.slice;
|
||||
|
||||
// helper function for logging errors
|
||||
// $.error breaks jQuery chaining
|
||||
var console = window.console;
|
||||
var logError = typeof console == 'undefined' ? function() {} :
|
||||
function( message ) {
|
||||
console.error( message );
|
||||
};
|
||||
|
||||
// ----- jQueryBridget ----- //
|
||||
|
||||
function jQueryBridget( namespace, PluginClass, $ ) {
|
||||
$ = $ || jQuery || window.jQuery;
|
||||
if ( !$ ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// add option method -> $().plugin('option', {...})
|
||||
if ( !PluginClass.prototype.option ) {
|
||||
// option setter
|
||||
PluginClass.prototype.option = function( opts ) {
|
||||
// bail out if not an object
|
||||
if ( !$.isPlainObject( opts ) ){
|
||||
return;
|
||||
}
|
||||
this.options = $.extend( true, this.options, opts );
|
||||
};
|
||||
}
|
||||
|
||||
// make jQuery plugin
|
||||
$.fn[ namespace ] = function( arg0 /*, arg1 */ ) {
|
||||
if ( typeof arg0 == 'string' ) {
|
||||
// method call $().plugin( 'methodName', { options } )
|
||||
// shift arguments by 1
|
||||
var args = arraySlice.call( arguments, 1 );
|
||||
return methodCall( this, arg0, args );
|
||||
}
|
||||
// just $().plugin({ options })
|
||||
plainCall( this, arg0 );
|
||||
return this;
|
||||
};
|
||||
|
||||
// $().plugin('methodName')
|
||||
function methodCall( $elems, methodName, args ) {
|
||||
var returnValue;
|
||||
var pluginMethodStr = '$().' + namespace + '("' + methodName + '")';
|
||||
|
||||
$elems.each( function( i, elem ) {
|
||||
// get instance
|
||||
var instance = $.data( elem, namespace );
|
||||
if ( !instance ) {
|
||||
logError( namespace + ' not initialized. Cannot call methods, i.e. ' +
|
||||
pluginMethodStr );
|
||||
return;
|
||||
}
|
||||
|
||||
var method = instance[ methodName ];
|
||||
if ( !method || methodName.charAt(0) == '_' ) {
|
||||
logError( pluginMethodStr + ' is not a valid method' );
|
||||
return;
|
||||
}
|
||||
|
||||
// apply method, get return value
|
||||
var value = method.apply( instance, args );
|
||||
// set return value if value is returned, use only first value
|
||||
returnValue = returnValue === undefined ? value : returnValue;
|
||||
});
|
||||
|
||||
return returnValue !== undefined ? returnValue : $elems;
|
||||
}
|
||||
|
||||
function plainCall( $elems, options ) {
|
||||
$elems.each( function( i, elem ) {
|
||||
var instance = $.data( elem, namespace );
|
||||
if ( instance ) {
|
||||
// set options & init
|
||||
instance.option( options );
|
||||
instance._init();
|
||||
} else {
|
||||
// initialize new instance
|
||||
instance = new PluginClass( elem, options );
|
||||
$.data( elem, namespace, instance );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
updateJQuery( $ );
|
||||
|
||||
}
|
||||
|
||||
// ----- updateJQuery ----- //
|
||||
|
||||
// set $.bridget for v1 backwards compatibility
|
||||
function updateJQuery( $ ) {
|
||||
if ( !$ || ( $ && $.bridget ) ) {
|
||||
return;
|
||||
}
|
||||
$.bridget = jQueryBridget;
|
||||
}
|
||||
|
||||
updateJQuery( jQuery || window.jQuery );
|
||||
|
||||
// ----- ----- //
|
||||
|
||||
return jQueryBridget;
|
||||
|
||||
}));
|
||||
// velocity
|
||||
/*! VelocityJS.org (1.5.0). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */
|
||||
/*! VelocityJS.org jQuery Shim (1.0.1). (C) 2014 The jQuery Foundation. MIT @license: en.wikipedia.org/wiki/MIT_License. */
|
||||
!function(a){"use strict";function b(a){var b=a.length,d=c.type(a);return"function"!==d&&!c.isWindow(a)&&(!(1!==a.nodeType||!b)||("array"===d||0===b||"number"==typeof b&&b>0&&b-1 in a))}if(!a.jQuery){var c=function(a,b){return new c.fn.init(a,b)};c.isWindow=function(a){return a&&a===a.window},c.type=function(a){return a?"object"==typeof a||"function"==typeof a?e[g.call(a)]||"object":typeof a:a+""},c.isArray=Array.isArray||function(a){return"array"===c.type(a)},c.isPlainObject=function(a){var b;if(!a||"object"!==c.type(a)||a.nodeType||c.isWindow(a))return!1;try{if(a.constructor&&!f.call(a,"constructor")&&!f.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(d){return!1}for(b in a);return b===undefined||f.call(a,b)},c.each=function(a,c,d){var e=0,f=a.length,g=b(a);if(d){if(g)for(;e<f&&c.apply(a[e],d)!==!1;e++);else for(e in a)if(a.hasOwnProperty(e)&&c.apply(a[e],d)===!1)break}else if(g)for(;e<f&&c.call(a[e],e,a[e])!==!1;e++);else for(e in a)if(a.hasOwnProperty(e)&&c.call(a[e],e,a[e])===!1)break;return a},c.data=function(a,b,e){if(e===undefined){var f=a[c.expando],g=f&&d[f];if(b===undefined)return g;if(g&&b in g)return g[b]}else if(b!==undefined){var h=a[c.expando]||(a[c.expando]=++c.uuid);return d[h]=d[h]||{},d[h][b]=e,e}},c.removeData=function(a,b){var e=a[c.expando],f=e&&d[e];f&&(b?c.each(b,function(a,b){delete f[b]}):delete d[e])},c.extend=function(){var a,b,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;for("boolean"==typeof h&&(k=h,h=arguments[i]||{},i++),"object"!=typeof h&&"function"!==c.type(h)&&(h={}),i===j&&(h=this,i--);i<j;i++)if(f=arguments[i])for(e in f)f.hasOwnProperty(e)&&(a=h[e],d=f[e],h!==d&&(k&&d&&(c.isPlainObject(d)||(b=c.isArray(d)))?(b?(b=!1,g=a&&c.isArray(a)?a:[]):g=a&&c.isPlainObject(a)?a:{},h[e]=c.extend(k,g,d)):d!==undefined&&(h[e]=d)));return h},c.queue=function(a,d,e){if(a){d=(d||"fx")+"queue";var f=c.data(a,d);return e?(!f||c.isArray(e)?f=c.data(a,d,function(a,c){var d=c||[];return a&&(b(Object(a))?function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;)a[e++]=b[d++];if(c!==c)for(;b[d]!==undefined;)a[e++]=b[d++];a.length=e,a}(d,"string"==typeof a?[a]:a):[].push.call(d,a)),d}(e)):f.push(e),f):f||[]}},c.dequeue=function(a,b){c.each(a.nodeType?[a]:a,function(a,d){b=b||"fx";var e=c.queue(d,b),f=e.shift();"inprogress"===f&&(f=e.shift()),f&&("fx"===b&&e.unshift("inprogress"),f.call(d,function(){c.dequeue(d,b)}))})},c.fn=c.prototype={init:function(a){if(a.nodeType)return this[0]=a,this;throw new Error("Not a DOM node.")},offset:function(){var b=this[0].getBoundingClientRect?this[0].getBoundingClientRect():{top:0,left:0};return{top:b.top+(a.pageYOffset||document.scrollTop||0)-(document.clientTop||0),left:b.left+(a.pageXOffset||document.scrollLeft||0)-(document.clientLeft||0)}},position:function(){var a=this[0],b=function(a){for(var b=a.offsetParent;b&&"html"!==b.nodeName.toLowerCase()&&b.style&&"static"===b.style.position;)b=b.offsetParent;return b||document}(a),d=this.offset(),e=/^(?:body|html)$/i.test(b.nodeName)?{top:0,left:0}:c(b).offset();return d.top-=parseFloat(a.style.marginTop)||0,d.left-=parseFloat(a.style.marginLeft)||0,b.style&&(e.top+=parseFloat(b.style.borderTopWidth)||0,e.left+=parseFloat(b.style.borderLeftWidth)||0),{top:d.top-e.top,left:d.left-e.left}}};var d={};c.expando="velocity"+(new Date).getTime(),c.uuid=0;for(var e={},f=e.hasOwnProperty,g=e.toString,h="Boolean Number String Function Array Date RegExp Object Error".split(" "),i=0;i<h.length;i++)e["[object "+h[i]+"]"]=h[i].toLowerCase();c.fn.init.prototype=c.fn,a.Velocity={Utilities:c}}}(window),function(a){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a():"function"==typeof define&&define.amd?define(a):a()}(function(){"use strict";return function(a,b,c,d){function e(a){for(var b=-1,c=a?a.length:0,d=[];++b<c;){var e=a[b];e&&d.push(e)}return d}function f(a){return u.isWrapped(a)?a=s.call(a):u.isNode(a)&&(a=[a]),a}function g(a){var b=o.data(a,"velocity");return null===b?d:b}function h(a,b){var c=g(a);c&&c.delayTimer&&!c.delayPaused&&(c.delayRemaining=c.delay-b+c.delayBegin,c.delayPaused=!0,clearTimeout(c.delayTimer.setTimeout))}function i(a,b){var c=g(a);c&&c.delayTimer&&c.delayPaused&&(c.delayPaused=!1,c.delayTimer.setTimeout=setTimeout(c.delayTimer.next,c.delayRemaining))}function j(a){return function(b){return Math.round(b*a)*(1/a)}}function k(a,c,d,e){function f(a,b){return 1-3*b+3*a}function g(a,b){return 3*b-6*a}function h(a){return 3*a}function i(a,b,c){return((f(b,c)*a+g(b,c))*a+h(b))*a}function j(a,b,c){return 3*f(b,c)*a*a+2*g(b,c)*a+h(b)}function k(b,c){for(var e=0;e<p;++e){var f=j(c,a,d);if(0===f)return c;c-=(i(c,a,d)-b)/f}return c}function l(){for(var b=0;b<t;++b)x[b]=i(b*u,a,d)}function m(b,c,e){var f,g,h=0;do{g=c+(e-c)/2,f=i(g,a,d)-b,f>0?e=g:c=g}while(Math.abs(f)>r&&++h<s);return g}function n(b){for(var c=0,e=1,f=t-1;e!==f&&x[e]<=b;++e)c+=u;--e;var g=(b-x[e])/(x[e+1]-x[e]),h=c+g*u,i=j(h,a,d);return i>=q?k(b,h):0===i?h:m(b,c,c+u)}function o(){y=!0,a===Line truncated
|
||||
;if(!(k&&k.isSVG||"tween"===l||A.Names.prefixCheck(l)[1]!==!1||A.Normalizations.registered[l]!==d))return void(y.debug&&console.log("Skipping ["+l+"] due to a lack of browser support."));(i.display!==d&&null!==i.display&&"none"!==i.display||i.visibility!==d&&"hidden"!==i.visibility)&&/opacity|filter/.test(e)&&!r&&0!==p&&(r=0),i._cacheValues&&n&&n[e]?(r===d&&(r=n[e].endValue+n[e].unitType),m=k.rootPropertyValueCache[l]):A.Hooks.registered[e]?r===d?(m=A.getPropertyValue(a,l),r=A.getPropertyValue(a,e,m)):m=A.Hooks.templates[l][1]:r===d&&(r=A.getPropertyValue(a,e));var s,t,v,w=!1,x=function(a,b){var c,d;return d=(b||"0").toString().toLowerCase().replace(/[%A-z]+$/,function(a){return c=a,""}),c||(c=A.Values.getUnitType(a)),[d,c]};if(r!==p&&u.isString(r)&&u.isString(p)){g="";var z=0,B=0,C=[],D=[],E=0,F=0,G=0;for(r=A.Hooks.fixColors(r),p=A.Hooks.fixColors(p);z<r.length&&B<p.length;){var H=r[z],I=p[B];if(/[\d\.-]/.test(H)&&/[\d\.-]/.test(I)){for(var J=H,K=I,L=".",N=".";++z<r.length;){if((H=r[z])===L)L="..";else if(!/\d/.test(H))break;J+=H}for(;++B<p.length;){if((I=p[B])===N)N="..";else if(!/\d/.test(I))break;K+=I}var O=A.Hooks.getUnit(r,z),P=A.Hooks.getUnit(p,B);if(z+=O.length,B+=P.length,O===P)J===K?g+=J+O:(g+="{"+C.length+(F?"!":"")+"}"+O,C.push(parseFloat(J)),D.push(parseFloat(K)));else{var Q=parseFloat(J),R=parseFloat(K);g+=(E<5?"calc":"")+"("+(Q?"{"+C.length+(F?"!":"")+"}":"0")+O+" + "+(R?"{"+(C.length+(Q?1:0))+(F?"!":"")+"}":"0")+P+")",Q&&(C.push(Q),D.push(0)),R&&(C.push(0),D.push(R))}}else{if(H!==I){E=0;break}g+=H,z++,B++,0===E&&"c"===H||1===E&&"a"===H||2===E&&"l"===H||3===E&&"c"===H||E>=4&&"("===H?E++:(E&&E<5||E>=4&&")"===H&&--E<5)&&(E=0),0===F&&"r"===H||1===F&&"g"===H||2===F&&"b"===H||3===F&&"a"===H||F>=3&&"("===H?(3===F&&"a"===H&&(G=1),F++):G&&","===H?++G>3&&(F=G=0):(G&&F<(G?5:4)||F>=(G?4:3)&&")"===H&&--F<(G?5:4))&&(F=G=0)}}z===r.length&&B===p.length||(y.debug&&console.error('Trying to pattern match mis-matched strings ["'+p+'", "'+r+'"]'),g=d),g&&(C.length?(y.debug&&console.log('Pattern found "'+g+'" -> ',C,D,"["+r+","+p+"]"),r=C,p=D,t=v=""):g=d)}g||(s=x(e,r),r=s[0],v=s[1],s=x(e,p),p=s[0].replace(/^([+-\/*])=/,function(a,b){return w=b,""}),t=s[1],r=parseFloat(r)||0,p=parseFloat(p)||0,"%"===t&&(/^(fontSize|lineHeight)$/.test(e)?(p/=100,t="em"):/^scale/.test(e)?(p/=100,t=""):/(Red|Green|Blue)$/i.test(e)&&(p=p/100*255,t="")));if(/[\/*]/.test(w))t=v;else if(v!==t&&0!==r)if(0===p)t=v;else{h=h||function(){var d={myParent:a.parentNode||c.body,position:A.getPropertyValue(a,"position"),fontSize:A.getPropertyValue(a,"fontSize")},e=d.position===M.lastPosition&&d.myParent===M.lastParent,f=d.fontSize===M.lastFontSize;M.lastParent=d.myParent,M.lastPosition=d.position,M.lastFontSize=d.fontSize;var g={};if(f&&e)g.emToPx=M.lastEmToPx,g.percentToPxWidth=M.lastPercentToPxWidth,g.percentToPxHeight=M.lastPercentToPxHeight;else{var h=k&&k.isSVG?c.createElementNS("http://www.w3.org/2000/svg","rect"):c.createElement("div");y.init(h),d.myParent.appendChild(h),o.each(["overflow","overflowX","overflowY"],function(a,b){y.CSS.setPropertyValue(h,b,"hidden")}),y.CSS.setPropertyValue(h,"position",d.position),y.CSS.setPropertyValue(h,"fontSize",d.fontSize),y.CSS.setPropertyValue(h,"boxSizing","content-box"),o.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],function(a,b){y.CSS.setPropertyValue(h,b,"100%")}),y.CSS.setPropertyValue(h,"paddingLeft","100em"),g.percentToPxWidth=M.lastPercentToPxWidth=(parseFloat(A.getPropertyValue(h,"width",null,!0))||1)/100,g.percentToPxHeight=M.lastPercentToPxHeight=(parseFloat(A.getPropertyValue(h,"height",null,!0))||1)/100,g.emToPx=M.lastEmToPx=(parseFloat(A.getPropertyValue(h,"paddingLeft"))||1)/100,d.myParent.removeChild(h)}return null===M.remToPx&&(M.remToPx=parseFloat(A.getPropertyValue(c.body,"fontSize"))||16),null===M.vwToPx&&(M.vwToPx=parseFloat(b.innerWidth)/100,M.vhToPx=parseFloat(b.innerHeight)/100),g.remToPx=M.remToPx,g.vwToPx=M.vwToPx,g.vhToPx=M.vhToPx,y.debug>=1&&console.log("Unit ratios: "+JSON.stringify(g),a),g}();var S=/margin|padding|left|right|width|text|word|letter/i.test(e)||/X$/.test(e)||"x"===e?"x":"y";switch(v){case"%":r*="x"===S?h.percentToPxWidth:h.percentToPxHeight;break;case"px":break;default:r*=h[v+"ToPx"]}switch(t){case"%":r*=1/("x"===S?h.percentToPxWidth:h.percentToPxHeight);break;case"px":break;default:r*=1/h[t+"ToPx"]}}switch(w){case"+":p=r+p;break;case"-":p=r-p;break;case"*":p*=r;break;case"/":p=r/p}j[e]={rootPropertyValue:m,startValue:r,currentValue:r,endValue:p,unitType:t,easing:q},g&&(j[e].pattern=g),y.debug&&console.log("tweensContainer ("+e+"): "+JSON.stringify(j[e]),a)};for(var I in s)if(s.hasOwnProperty(I)){var J=A.Names.camelCase(I),K=function(b,c){var d,f,g;return u.isFunction(b)&&(b=b.call(a,e,C)),u.isArray(b)?(d=b[0],!u.isArray(b[1])&&/^[\d-]/.test(b[1])||u.isFunction(b[1])||A.RegEx.isHex.test(b[1])?g=b[1]:u.isString(b[1])&&!A.RegEx.isHex.test(b[1])&&y.Easings[b[1]]||u.isArray(b[1])?(f=c?b[1]:l(b[1],i.duration),g=b[2]):g=b[1]||b[2]):d=b,c|Line truncated
|
||||
// countdown
|
||||
/*!
|
||||
* The Final Countdown for jQuery v2.2.0 (http://hilios.github.io/jQuery.countdown/)
|
||||
* Copyright (c) 2016 Edson Hilios
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";function b(a){if(a instanceof Date)return a;if(String(a).match(g))return String(a).match(/^[0-9]*$/)&&(a=Number(a)),String(a).match(/\-/)&&(a=String(a).replace(/\-/g,"/")),new Date(a);throw new Error("Couldn't cast `"+a+"` to a date object.")}function c(a){var b=a.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return new RegExp(b)}function d(a){return function(b){var d=b.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(d)for(var f=0,g=d.length;f<g;++f){var h=d[f].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),j=c(h[0]),k=h[1]||"",l=h[3]||"",m=null;h=h[2],i.hasOwnProperty(h)&&(m=i[h],m=Number(a[m])),null!==m&&("!"===k&&(m=e(l,m)),""===k&&m<10&&(m="0"+m.toString()),b=b.replace(j,m.toString()))}return b=b.replace(/%%/,"%")}}function e(a,b){var c="s",d="";return a&&(a=a.replace(/(:|;|\s)/gi,"").split(/\,/),1===a.length?c=a[0]:(d=a[0],c=a[1])),Math.abs(b)>1?c:d}var f=[],g=[],h={precision:100,elapse:!1,defer:!1};g.push(/^[0-9]*$/.source),g.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g=new RegExp(g.join("|"));var i={Y:"years",m:"months",n:"daysToMonth",d:"daysToWeek",w:"weeks",W:"weeksToMonth",H:"hours",M:"minutes",S:"seconds",D:"totalDays",I:"totalHours",N:"totalMinutes",T:"totalSeconds"},j=function(b,c,d){this.el=b,this.$el=a(b),this.interval=null,this.offset={},this.options=a.extend({},h),this.instanceNumber=f.length,f.push(this),this.$el.data("countdown-instance",this.instanceNumber),d&&("function"==typeof d?(this.$el.on("update.countdown",d),this.$el.on("stoped.countdown",d),this.$el.on("finish.countdown",d)):this.options=a.extend({},h,d)),this.setFinalDate(c),this.options.defer===!1&&this.start()};a.extend(j.prototype,{start:function(){null!==this.interval&&clearInterval(this.interval);var a=this;this.update(),this.interval=setInterval(function(){a.update.call(a)},this.options.precision)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},toggle:function(){this.interval?this.stop():this.start()},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this),f[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(a){this.finalDate=b(a)},update:function(){if(0===this.$el.closest("html").length)return void this.remove();var b,c=void 0!==a._data(this.el,"events"),d=new Date;b=this.finalDate.getTime()-d.getTime(),b=Math.ceil(b/1e3),b=!this.options.elapse&&b<0?0:Math.abs(b),this.totalSecsLeft!==b&&c&&(this.totalSecsLeft=b,this.elapsed=d>=this.finalDate,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToWeek:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToMonth:Math.floor(this.totalSecsLeft/60/60/24%30.4368),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),weeksToMonth:Math.floor(this.totalSecsLeft/60/60/24/7)%4,months:Math.floor(this.totalSecsLeft/60/60/24/30.4368),years:Math.abs(this.finalDate.getFullYear()-d.getFullYear()),totalDays:Math.floor(this.totalSecsLeft/60/60/24),totalHours:Math.floor(this.totalSecsLeft/60/60),totalMinutes:Math.floor(this.totalSecsLeft/60),totalSeconds:this.totalSecsLeft},this.options.elapse||0!==this.totalSecsLeft?this.dispatchEvent("update"):(this.stop(),this.dispatchEvent("finish")))},dispatchEvent:function(b){var c=a.Event(b+".countdown");c.finalDate=this.finalDate,c.elapsed=this.elapsed,c.offset=a.extend({},this.offset),c.strftime=d(this.offset),this.$el.trigger(c)}}),a.fn.countdown=function(){var b=Array.prototype.slice.call(arguments,0);return this.each(function(){var c=a(this).data("countdown-instance");if(void 0!==c){var d=f[c],e=b[0];j.prototype.hasOwnProperty(e)?d[e].apply(d,b.slice(1)):null===String(e).match(/^[$A-Z_][0-9A-Z_$]*$/i)?(d.setFinalDate.call(d,e),d.start()):a.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,e))}else new j(this,b[0],b[1])})}});
|
||||
// cookie
|
||||
/*!
|
||||
* jQuery Cookie Plugin v1.4.1
|
||||
* https://github.com/carhartl/jquery-cookie
|
||||
*
|
||||
* Copyright 2013 Klaus Hartl
|
||||
* Released under the MIT license
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof exports === 'object') {
|
||||
// CommonJS
|
||||
factory(require('jquery'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
|
||||
var pluses = /\+/g;
|
||||
|
||||
function encode(s) {
|
||||
return config.raw ? s : encodeURIComponent(s);
|
||||
}
|
||||
|
||||
function decode(s) {
|
||||
return config.raw ? s : decodeURIComponent(s);
|
||||
}
|
||||
|
||||
function stringifyCookieValue(value) {
|
||||
return encode(config.json ? JSON.stringify(value) : String(value));
|
||||
}
|
||||
|
||||
function parseCookieValue(s) {
|
||||
if (s.indexOf('"') === 0) {
|
||||
// This is a quoted cookie as according to RFC2068, unescape...
|
||||
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
|
||||
}
|
||||
|
||||
try {
|
||||
// Replace server-side written pluses with spaces.
|
||||
// If we can't decode the cookie, ignore it, it's unusable.
|
||||
// If we can't parse the cookie, ignore it, it's unusable.
|
||||
s = decodeURIComponent(s.replace(pluses, ' '));
|
||||
return config.json ? JSON.parse(s) : s;
|
||||
} catch(e) {}
|
||||
}
|
||||
|
||||
function read(s, converter) {
|
||||
var value = config.raw ? s : parseCookieValue(s);
|
||||
return $.isFunction(converter) ? converter(value) : value;
|
||||
}
|
||||
|
||||
var config = $.cookie = function (key, value, options) {
|
||||
|
||||
// Write
|
||||
|
||||
if (value !== undefined && !$.isFunction(value)) {
|
||||
options = $.extend({}, config.defaults, options);
|
||||
|
||||
if (typeof options.expires === 'number') {
|
||||
var days = options.expires, t = options.expires = new Date();
|
||||
t.setTime(+t + days * 864e+5);
|
||||
}
|
||||
|
||||
return (document.cookie = [
|
||||
encode(key), '=', stringifyCookieValue(value),
|
||||
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
||||
options.path ? '; path=' + options.path : '',
|
||||
options.domain ? '; domain=' + options.domain : '',
|
||||
options.secure ? '; secure' : ''
|
||||
].join(''));
|
||||
}
|
||||
|
||||
// Read
|
||||
|
||||
var result = key ? undefined : {};
|
||||
|
||||
// To prevent the for loop in the first place assign an empty array
|
||||
// in case there are no cookies at all. Also prevents odd result when
|
||||
// calling $.cookie().
|
||||
var cookies = document.cookie ? document.cookie.split('; ') : [];
|
||||
|
||||
for (var i = 0, l = cookies.length; i < l; i++) {
|
||||
var parts = cookies[i].split('=');
|
||||
var name = decode(parts.shift());
|
||||
var cookie = parts.join('=');
|
||||
|
||||
if (key && key === name) {
|
||||
// If second argument (value) is a function it's a converter...
|
||||
result = read(cookie, value);
|
||||
break;
|
||||
}
|
||||
|
||||
// Prevent storing a cookie that we couldn't decode.
|
||||
if (!key && (cookie = read(cookie)) !== undefined) {
|
||||
result[name] = cookie;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
config.defaults = {};
|
||||
|
||||
$.removeCookie = function (key, options) {
|
||||
if ($.cookie(key) === undefined) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Must not alter options, thus extending a fresh object...
|
||||
$.cookie(key, '', $.extend({}, options, { expires: -1 }));
|
||||
return !$.cookie(key);
|
||||
};
|
||||
|
||||
}));
|
||||
// shopify api
|
||||
/* shopify.api.min.js */
|
||||
function floatToString(e,t){var n=e.toFixed(t).toString();return n.match(/^\.\d+/)?"0"+n:n}function attributeToString(e){return"string"!=typeof e&&(e+="","undefined"===e&&(e="")),jQuery.trim(e)}"undefined"==typeof window.Shopify&&(window.Shopify={}),Shopify.money_format="${{amount}}",Shopify.onError=function(e,t){var n=eval("("+e.responseText+")");n.message?alert(n.message+"("+n.status+"): "+n.description):alert("Error : "+Shopify.fullMessagesFromErrors(n).join("; ")+".")},Shopify.fullMessagesFromErrors=function(e){var t=[];return jQuery.each(e,function(e,n){jQuery.each(n,function(n,r){t.push(e+" "+r)})}),t},Shopify.onCartUpdate=function(e){alert("There are now "+e.item_count+" items in the cart.")},Shopify.onCartShippingRatesUpdate=function(e,t){var n="";t.zip&&(n+=t.zip+", "),t.province&&(n+=t.province+", "),n+=t.country,alert("There are "+e.length+" shipping rates available for "+n+", starting at "+Shopify.formatMoney(e[0].price)+".")},Shopify.onItemAdded=function(e){alert(e.title+" was added to your shopping cart.")},Shopify.onProduct=function(e){alert("Received everything we ever wanted to know about "+e.title)},Shopify.formatMoney=function(e,t){function n(e,t){return"undefined"==typeof e?t:e}function r(e,t,r,i){if(t=n(t,2),r=n(r,","),i=n(i,"."),isNaN(e)||null==e)return 0;e=(e/100).toFixed(t);var o=e.split("."),a=o[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+r),s=o[1]?i+o[1]:"";return a+s}"string"==typeof e&&(e=e.replace(".",""));var i="",o=/\{\{\s*(\w+)\s*\}\}/,a=t||this.money_format;switch(a.match(o)[1]){case"amount":i=r(e,2);break;case"amount_no_decimals":i=r(e,0);break;case"amount_with_comma_separator":i=r(e,2,".",",");break;case"amount_no_decimals_with_comma_separator":i=r(e,0,".",",")}return a.replace(o,i)},Shopify.resizeImage=function(e,t){try{if("original"==t)return e;var n=e.match(/(.*\/[\w\-\_\.]+)\.(\w{2,4})/);return n[1]+"_"+t+"."+n[2]}catch(r){return e}},Shopify.addItem=function(e,t,n){var t=t||1,r={type:"POST",url:"/cart/add.js",data:"quantity="+t+"&id="+e,dataType:"json",success:function(e){"function"==typeof n?n(e):Shopify.onItemAdded(e)},error:function(e,t){Shopify.onError(e,t)}};jQuery.ajax(r)},Shopify.addItemFromForm=function(e,t){var n={type:"POST",url:"/cart/add.js",data:jQuery("#"+e).serialize(),dataType:"json",success:function(e){"function"==typeof t?t(e):Shopify.onItemAdded(e)},error:function(e,t){Shopify.onError(e,t)}};jQuery.ajax(n)},Shopify.getCart=function(e){},Shopify.pollForCartShippingRatesForDestination=function(e,t,n){n=n||Shopify.onError;var r=function(){jQuery.ajax("/cart/async_shipping_rates",{dataType:"json",success:function(n,i,o){200===o.status?"function"==typeof t?t(n.shipping_rates,e):Shopify.onCartShippingRatesUpdate(n.shipping_rates,e):setTimeout(r,500)},error:n})};return r},Shopify.getCartShippingRatesForDestination=function(e,t,n){n=n||Shopify.onError;var r={type:"POST",url:"/cart/prepare_shipping_rates",data:Shopify.param({shipping_address:e}),success:Shopify.pollForCartShippingRatesForDestination(e,t,n),error:n};jQuery.ajax(r)},Shopify.getProduct=function(e,t){jQuery.getJSON("/products/"+e+".js",function(e,n){"function"==typeof t?t(e):Shopify.onProduct(e)})},Shopify.changeItem=function(e,t,n){var r={type:"POST",url:"/cart/change.js",data:"quantity="+t+"&id="+e,dataType:"json",success:function(e){"function"==typeof n?n(e):Shopify.onCartUpdate(e)},error:function(e,t){Shopify.onError(e,t)}};jQuery.ajax(r)},Shopify.removeItem=function(e,t){var n={type:"POST",url:"/cart/change.js",data:"quantity=0&id="+e,dataType:"json",success:function(e){"function"==typeof t?t(e):Shopify.onCartUpdate(e)},error:function(e,t){Shopify.onError(e,t)}};jQuery.ajax(n)},Shopify.clear=function(e){var t={type:"POST",url:"/cart/clear.js",data:"",dataType:"json",success:function(t){"function"==typeof e?e(t):Shopify.onCartUpdate(t)},error:function(e,t){Shopify.onError(e,t)}};jQuery.ajax(t)},Shopify.updateCartFromForm=function(e,t){var n={type:"POST",url:"/cart/update.js",data:jQuery("#"+e).serialize(),dataType:"json",success:function(e){"function"==typeof t?t(e):Shopify.onCartUpdate(e)},error:function(e,t){Shopify.onError(e,t)}};jQuery.ajax(n)},Shopify.updateCartAttributes=function(e,t){var n="";jQuery.isArray(e)?jQuery.each(e,function(e,t){var r=attributeToString(t.key);""!==r&&(n+="attributes["+r+"]="+attributeToString(t.value)+"&")}):"object"==typeof e&&null!==e&&jQuery.each(e,function(e,t){n+="attributes["+attributeToString(e)+"]="+attributeToString(t)+"&"});var r={type:"POST",url:"/cart/update.js",data:n,dataType:"json",success:function(e){"function"==typeof t?t(e):Shopify.onCartUpdate(e)},error:function(e,t){Shopify.onError(e,t)}};jQuery.ajax(r)},Shopify.updateCartNote=function(e,t){var n={type:"POST",url:"/cart/update.js",data:"note="+attributeToString(e),dataType:"json",success:function(e){"function"==typeof t?t(e):Shopify.onCartUpdate(e)},error:function(e,t){Shopify.onError(e,t)}};jQuery.ajax(n)},jQuery.fn.jquery>="1.4"?Shopify.param=jQuery.param:(Shopify.param=function(e){var t=Line truncated
|
||||
// slick
|
||||
!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};(e=function(){var e=0;return function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(t),appendDots:i(t),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('<button type="button" />').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden="hidden",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(t),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(t).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,void 0!==document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(n.hidden="webkitHidden",n.visibilityChange="webkitvisibilitychange"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.instanceUid=e++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}}()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(t<0||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):!0===o?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("data-slick-index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),!0===s.options.rtl&&!1===s.options.vertical&&(e=-e),!1===s.transformsEnabled?!1===s.options.vertical?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):!1===s.cssTransitions?(!0===s.options.rtl&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),!1===s.options.vertical?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),!1===s.options.vertical?o[s.animType]="translate3d("+e+"px, 0px, 0px)":o[s.animType]="translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.getNavTarget=function(){var e=this,t=e.options.asNavFor;return t&&null!==t&&(t=i(t).not(e.$slider)),t},e.prototype.asNavFor=function(e){var t=this.getNavTarget();null!==t&&"object"==typeof t&&t.each(fuLine truncated
|
||||
// elevate zoom
|
||||
/* jQuery elevateZoom 3.0.8 - Demo's and documentation: - www.elevateweb.co.uk/image-zoom - Copyright (c) 2013 Andrew Eades - www.elevateweb.co.uk - Dual licensed under the LGPL licenses. - http://en.wikipedia.org/wiki/MIT_License - http://en.wikipedia.org/wiki/GNU_General_Public_License */
|
||||
"function"!==typeof Object.create&&(Object.create=function(d){function h(){}h.prototype=d;return new h});
|
||||
(function(d,h,l,m){var k={init:function(b,a){var c=this;c.elem=a;c.$elem=d(a);c.imageSrc=c.$elem.data("zoom-image")?c.$elem.data("zoom-image"):c.$elem.attr("src");c.options=d.extend({},d.fn.elevateZoom.options,b);c.options.tint&&(c.options.lensColour="none",c.options.lensOpacity="1");"inner"==c.options.zoomType&&(c.options.showLens=!1);c.$elem.parent().removeAttr("title").removeAttr("alt");c.zoomImage=c.imageSrc;c.refresh(1);d("#"+c.options.gallery+" a").click(function(a){c.options.galleryActiveClass&&
|
||||
(d("#"+c.options.gallery+" a").removeClass(c.options.galleryActiveClass),d(this).addClass(c.options.galleryActiveClass));a.preventDefault();d(this).data("zoom-image")?c.zoomImagePre=d(this).data("zoom-image"):c.zoomImagePre=d(this).data("image");c.swaptheimage(d(this).data("image"),c.zoomImagePre);return!1})},refresh:function(b){var a=this;setTimeout(function(){a.fetch(a.imageSrc)},b||a.options.refresh)},fetch:function(b){var a=this,c=new Image;c.onload=function(){a.largeWidth=c.width;a.largeHeight=
|
||||
c.height;a.startZoom();a.currentImage=a.imageSrc;a.options.onZoomedImageLoaded(a.$elem)};c.src=b},startZoom:function(){var b=this;b.nzWidth=b.$elem.width();b.nzHeight=b.$elem.height();b.isWindowActive=!1;b.isLensActive=!1;b.isTintActive=!1;b.overWindow=!1;b.options.imageCrossfade&&(b.zoomWrap=b.$elem.wrap('<div style="height:'+b.nzHeight+"px;width:"+b.nzWidth+'px;" class="zoomWrapper" />'),b.$elem.css("position","absolute"));b.zoomLock=1;b.scrollingLock=!1;b.changeBgSize=!1;b.currentZoomLevel=b.options.zoomLevel;
|
||||
b.nzOffset=b.$elem.offset();b.widthRatio=b.largeWidth/b.currentZoomLevel/b.nzWidth;b.heightRatio=b.largeHeight/b.currentZoomLevel/b.nzHeight;"window"==b.options.zoomType&&(b.zoomWindowStyle="overflow: hidden;background-position: 0px 0px;text-align:center;background-color: "+String(b.options.zoomWindowBgColour)+";width: "+String(b.options.zoomWindowWidth)+"px;height: "+String(b.options.zoomWindowHeight)+"px;float: left;background-size: "+b.largeWidth/b.currentZoomLevel+"px "+b.largeHeight/b.currentZoomLevel+
|
||||
"px;display: none;z-index:100;border: "+String(b.options.borderSize)+"px solid "+b.options.borderColour+";background-repeat: no-repeat;position: absolute;");if("inner"==b.options.zoomType){var a=b.$elem.css("border-left-width");b.zoomWindowStyle="overflow: hidden;margin-left: "+String(a)+";margin-top: "+String(a)+";background-position: 0px 0px;width: "+String(b.nzWidth)+"px;height: "+String(b.nzHeight)+"px;float: left;display: none;cursor:"+b.options.cursor+";px solid "+b.options.borderColour+";background-repeat: no-repeat;position: absolute;"}"window"==
|
||||
b.options.zoomType&&(lensHeight=b.nzHeight<b.options.zoomWindowWidth/b.widthRatio?b.nzHeight:String(b.options.zoomWindowHeight/b.heightRatio),lensWidth=b.largeWidth<b.options.zoomWindowWidth?b.nzWidth:b.options.zoomWindowWidth/b.widthRatio,b.lensStyle="background-position: 0px 0px;width: "+String(b.options.zoomWindowWidth/b.widthRatio)+"px;height: "+String(b.options.zoomWindowHeight/b.heightRatio)+"px;float: right;display: none;overflow: hidden;z-index: 999;-webkit-transform: translateZ(0);opacity:"+
|
||||
b.options.lensOpacity+";filter: alpha(opacity = "+100*b.options.lensOpacity+"); zoom:1;width:"+lensWidth+"px;height:"+lensHeight+"px;background-color:"+b.options.lensColour+";cursor:"+b.options.cursor+";border: "+b.options.lensBorderSize+"px solid "+b.options.lensBorderColour+";background-repeat: no-repeat;position: absolute;");b.tintStyle="display: block;position: absolute;background-color: "+b.options.tintColour+";filter:alpha(opacity=0);opacity: 0;width: "+b.nzWidth+"px;height: "+b.nzHeight+"px;";
|
||||
b.lensRound="";"lens"==b.options.zoomType&&(b.lensStyle="background-position: 0px 0px;float: left;display: none;border: "+String(b.options.borderSize)+"px solid "+b.options.borderColour+";width:"+String(b.options.lensSize)+"px;height:"+String(b.options.lensSize)+"px;background-repeat: no-repeat;position: absolute;");"round"==b.options.lensShape&&(b.lensRound="border-top-left-radius: "+String(b.options.lensSize/2+b.options.borderSize)+"px;border-top-right-radius: "+String(b.options.lensSize/2+b.options.borderSize)+
|
||||
"px;border-bottom-left-radius: "+String(b.options.lensSize/2+b.options.borderSize)+"px;border-bottom-right-radius: "+String(b.options.lensSize/2+b.options.borderSize)+"px;");b.zoomContainer=d('<div class="zoomContainer" style="-webkit-transform: translateZ(0);position:absolute;left:'+b.nzOffset.left+"px;top:"+b.nzOffset.top+"px;height:"+b.nzHeight+"px;width:"+b.nzWidth+'px;"></div>');d("body").append(b.zoomContainer);b.options.containLensZoom&&"lens"==b.options.zoomType&&b.zoomContainer.css("overflow",
|
||||
"hidden");"inner"!=b.options.zoomType&&(b.zoomLens=d("<div class='zoomLens' style='"+b.lensStyle+b.lensRound+"'> </div>").appendTo(b.zoomContainer).click(function(){b.$elem.trigger("click")}),b.options.tint&&(b.tintContainer=d("<div/>").addClass("tintContainer"),b.zoomTint=d("<div class='zoomTint' style='"+b.tintStyle+"'></div>"),b.zoomLens.wrap(b.tintContainer),b.zoomTintcss=b.zoomLens.after(b.zoomTint),b.zoomTintImage=d('<img src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=" style="position: absolute; left: 0px; top: 0px; max-width: none; width: '+
|
||||
b.nzWidth+"px; height: "+b.nzHeight+'px;" src="'+b.imageSrc+'">').appendTo(b.zoomLens).click(function(){b.$elem.trigger("click")})));isNaN(b.options.zoomWindowPosition)?b.zoomWindow=d("<div style='z-index:999;left:"+b.windowOffsetLeft+"px;top:"+b.windowOffsetTop+"px;"+b.zoomWindowStyle+"' class='zoomWindow'> </div>").appendTo("body").click(function(){b.$elem.trigger("click")}):b.zoomWindow=d("<div style='z-index:999;left:"+b.windowOffsetLeft+"px;top:"+b.windowOffsetTop+"px;"+b.zoomWindowStyle+
|
||||
"' class='zoomWindow'> </div>").appendTo(b.zoomContainer).click(function(){b.$elem.trigger("click")});b.zoomWindowContainer=d("<div/>").addClass("zoomWindowContainer").css("width",b.options.zoomWindowWidth);b.zoomWindow.wrap(b.zoomWindowContainer);"lens"==b.options.zoomType&&b.zoomLens.css({backgroundImage:"url('"+b.imageSrc+"')"});"window"==b.options.zoomType&&b.zoomWindow.css({backgroundImage:"url('"+b.imageSrc+"')"});"inner"==b.options.zoomType&&b.zoomWindow.css({backgroundImage:"url('"+b.imageSrc+
|
||||
"')"});b.$elem.bind("touchmove",function(a){a.preventDefault();b.setPosition(a.originalEvent.touches[0]||a.originalEvent.changedTouches[0])});b.zoomContainer.bind("touchmove",function(a){"inner"==b.options.zoomType&&b.showHideWindow("show");a.preventDefault();b.setPosition(a.originalEvent.touches[0]||a.originalEvent.changedTouches[0])});b.zoomContainer.bind("touchend",function(a){b.showHideWindow("hide");b.options.showLens&&b.showHideLens("hide");b.options.tint&&"inner"!=b.options.zoomType&&b.showHideTint("hide")});
|
||||
b.$elem.bind("touchend",function(a){b.showHideWindow("hide");b.options.showLens&&b.showHideLens("hide");b.options.tint&&"inner"!=b.options.zoomType&&b.showHideTint("hide")});b.options.showLens&&(b.zoomLens.bind("touchmove",function(a){a.preventDefault();b.setPosition(a.originalEvent.touches[0]||a.originalEvent.changedTouches[0])}),b.zoomLens.bind("touchend",function(a){b.showHideWindow("hide");b.options.showLens&&b.showHideLens("hide");b.options.tint&&"inner"!=b.options.zoomType&&b.showHideTint("hide")}));
|
||||
b.$elem.bind("mousemove",function(a){!1==b.overWindow&&b.setElements("show");if(b.lastX!==a.clientX||b.lastY!==a.clientY)b.setPosition(a),b.currentLoc=a;b.lastX=a.clientX;b.lastY=a.clientY});b.zoomContainer.bind("mousemove",function(a){!1==b.overWindow&&b.setElements("show");if(b.lastX!==a.clientX||b.lastY!==a.clientY)b.setPosition(a),b.currentLoc=a;b.lastX=a.clientX;b.lastY=a.clientY});"inner"!=b.options.zoomType&&b.zoomLens.bind("mousemove",function(a){if(b.lastX!==a.clientX||b.lastY!==a.clientY)b.setPosition(a),
|
||||
b.currentLoc=a;b.lastX=a.clientX;b.lastY=a.clientY});b.options.tint&&"inner"!=b.options.zoomType&&b.zoomTint.bind("mousemove",function(a){if(b.lastX!==a.clientX||b.lastY!==a.clientY)b.setPosition(a),b.currentLoc=a;b.lastX=a.clientX;b.lastY=a.clientY});"inner"==b.options.zoomType&&b.zoomWindow.bind("mousemove",function(a){if(b.lastX!==a.clientX||b.lastY!==a.clientY)b.setPosition(a),b.currentLoc=a;b.lastX=a.clientX;b.lastY=a.clientY});b.zoomContainer.add(b.$elem).mouseenter(function(){!1==b.overWindow&&
|
||||
b.setElements("show")}).mouseleave(function(){b.scrollLock||b.setElements("hide")});"inner"!=b.options.zoomType&&b.zoomWindow.mouseenter(function(){b.overWindow=!0;b.setElements("hide")}).mouseleave(function(){b.overWindow=!1});b.minZoomLevel=b.options.minZoomLevel?b.options.minZoomLevel:2*b.options.scrollZoomIncrement;b.options.scrollZoom&&b.zoomContainer.add(b.$elem).bind("mousewheel DOMMouseScroll MozMousePixelScroll",function(a){b.scrollLock=!0;clearTimeout(d.data(this,"timer"));d.data(this,"timer",
|
||||
setTimeout(function(){b.scrollLock=!1},250));var e=a.originalEvent.wheelDelta||-1*a.originalEvent.detail;a.stopImmediatePropagation();a.stopPropagation();a.preventDefault();0<e/120?b.currentZoomLevel>=b.minZoomLevel&&b.changeZoomLevel(b.currentZoomLevel-b.options.scrollZoomIncrement):b.options.maxZoomLevel?b.currentZoomLevel<=b.options.maxZoomLevel&&b.changeZoomLevel(parseFloat(b.currentZoomLevel)+b.options.scrollZoomIncrement):b.changeZoomLevel(parseFloat(b.currentZoomLevel)+b.options.scrollZoomIncrement);
|
||||
return!1})},setElements:function(b){if(!this.options.zoomEnabled)return!1;"show"==b&&this.isWindowSet&&("inner"==this.options.zoomType&&this.showHideWindow("show"),"window"==this.options.zoomType&&this.showHideWindow("show"),this.options.showLens&&this.showHideLens("show"),this.options.tint&&"inner"!=this.options.zoomType&&this.showHideTint("show"));"hide"==b&&("window"==this.options.zoomType&&this.showHideWindow("hide"),this.options.tint||this.showHideWindow("hide"),this.options.showLens&&this.showHideLens("hide"),
|
||||
this.options.tint&&this.showHideTint("hide"))},setPosition:function(b){if(!this.options.zoomEnabled)return!1;this.nzHeight=this.$elem.height();this.nzWidth=this.$elem.width();this.nzOffset=this.$elem.offset();this.options.tint&&"inner"!=this.options.zoomType&&(this.zoomTint.css({top:0}),this.zoomTint.css({left:0}));this.options.responsive&&!this.options.scrollZoom&&this.options.showLens&&(lensHeight=this.nzHeight<this.options.zoomWindowWidth/this.widthRatio?this.nzHeight:String(this.options.zoomWindowHeight/
|
||||
this.heightRatio),lensWidth=this.largeWidth<this.options.zoomWindowWidth?this.nzWidth:this.options.zoomWindowWidth/this.widthRatio,this.widthRatio=this.largeWidth/this.nzWidth,this.heightRatio=this.largeHeight/this.nzHeight,"lens"!=this.options.zoomType&&(lensHeight=this.nzHeight<this.options.zoomWindowWidth/this.widthRatio?this.nzHeight:String(this.options.zoomWindowHeight/this.heightRatio),lensWidth=this.options.zoomWindowWidth<this.options.zoomWindowWidth?this.nzWidth:this.options.zoomWindowWidth/
|
||||
this.widthRatio,this.zoomLens.css("width",lensWidth),this.zoomLens.css("height",lensHeight),this.options.tint&&(this.zoomTintImage.css("width",this.nzWidth),this.zoomTintImage.css("height",this.nzHeight))),"lens"==this.options.zoomType&&this.zoomLens.css({width:String(this.options.lensSize)+"px",height:String(this.options.lensSize)+"px"}));this.zoomContainer.css({top:this.nzOffset.top});this.zoomContainer.css({left:this.nzOffset.left});this.mouseLeft=parseInt(b.pageX-this.nzOffset.left);this.mouseTop=
|
||||
parseInt(b.pageY-this.nzOffset.top);"window"==this.options.zoomType&&(this.Etoppos=this.mouseTop<this.zoomLens.height()/2,this.Eboppos=this.mouseTop>this.nzHeight-this.zoomLens.height()/2-2*this.options.lensBorderSize,this.Eloppos=this.mouseLeft<0+this.zoomLens.width()/2,this.Eroppos=this.mouseLeft>this.nzWidth-this.zoomLens.width()/2-2*this.options.lensBorderSize);"inner"==this.options.zoomType&&(this.Etoppos=this.mouseTop<this.nzHeight/2/this.heightRatio,this.Eboppos=this.mouseTop>this.nzHeight-
|
||||
this.nzHeight/2/this.heightRatio,this.Eloppos=this.mouseLeft<0+this.nzWidth/2/this.widthRatio,this.Eroppos=this.mouseLeft>this.nzWidth-this.nzWidth/2/this.widthRatio-2*this.options.lensBorderSize);0>=this.mouseLeft||0>this.mouseTop||this.mouseLeft>this.nzWidth||this.mouseTop>this.nzHeight?this.setElements("hide"):(this.options.showLens&&(this.lensLeftPos=String(this.mouseLeft-this.zoomLens.width()/2),this.lensTopPos=String(this.mouseTop-this.zoomLens.height()/2)),this.Etoppos&&(this.lensTopPos=0),
|
||||
this.Eloppos&&(this.tintpos=this.lensLeftPos=this.windowLeftPos=0),"window"==this.options.zoomType&&(this.Eboppos&&(this.lensTopPos=Math.max(this.nzHeight-this.zoomLens.height()-2*this.options.lensBorderSize,0)),this.Eroppos&&(this.lensLeftPos=this.nzWidth-this.zoomLens.width()-2*this.options.lensBorderSize)),"inner"==this.options.zoomType&&(this.Eboppos&&(this.lensTopPos=Math.max(this.nzHeight-2*this.options.lensBorderSize,0)),this.Eroppos&&(this.lensLeftPos=this.nzWidth-this.nzWidth-2*this.options.lensBorderSize)),
|
||||
"lens"==this.options.zoomType&&(this.windowLeftPos=String(-1*((b.pageX-this.nzOffset.left)*this.widthRatio-this.zoomLens.width()/2)),this.windowTopPos=String(-1*((b.pageY-this.nzOffset.top)*this.heightRatio-this.zoomLens.height()/2)),this.zoomLens.css({backgroundPosition:this.windowLeftPos+"px "+this.windowTopPos+"px"}),this.changeBgSize&&(this.nzHeight>this.nzWidth?("lens"==this.options.zoomType&&this.zoomLens.css({"background-size":this.largeWidth/this.newvalueheight+"px "+this.largeHeight/this.newvalueheight+
|
||||
"px"}),this.zoomWindow.css({"background-size":this.largeWidth/this.newvalueheight+"px "+this.largeHeight/this.newvalueheight+"px"})):("lens"==this.options.zoomType&&this.zoomLens.css({"background-size":this.largeWidth/this.newvaluewidth+"px "+this.largeHeight/this.newvaluewidth+"px"}),this.zoomWindow.css({"background-size":this.largeWidth/this.newvaluewidth+"px "+this.largeHeight/this.newvaluewidth+"px"})),this.changeBgSize=!1),this.setWindowPostition(b)),this.options.tint&&"inner"!=this.options.zoomType&&
|
||||
this.setTintPosition(b),"window"==this.options.zoomType&&this.setWindowPostition(b),"inner"==this.options.zoomType&&this.setWindowPostition(b),this.options.showLens&&(this.fullwidth&&"lens"!=this.options.zoomType&&(this.lensLeftPos=0),this.zoomLens.css({left:this.lensLeftPos+"px",top:this.lensTopPos+"px"})))},showHideWindow:function(b){"show"!=b||this.isWindowActive||(this.options.zoomWindowFadeIn?this.zoomWindow.stop(!0,!0,!1).fadeIn(this.options.zoomWindowFadeIn):this.zoomWindow.show(),this.isWindowActive=
|
||||
!0);"hide"==b&&this.isWindowActive&&(this.options.zoomWindowFadeOut?this.zoomWindow.stop(!0,!0).fadeOut(this.options.zoomWindowFadeOut):this.zoomWindow.hide(),this.isWindowActive=!1)},showHideLens:function(b){"show"!=b||this.isLensActive||(this.options.lensFadeIn?this.zoomLens.stop(!0,!0,!1).fadeIn(this.options.lensFadeIn):this.zoomLens.show(),this.isLensActive=!0);"hide"==b&&this.isLensActive&&(this.options.lensFadeOut?this.zoomLens.stop(!0,!0).fadeOut(this.options.lensFadeOut):this.zoomLens.hide(),
|
||||
this.isLensActive=!1)},showHideTint:function(b){"show"!=b||this.isTintActive||(this.options.zoomTintFadeIn?this.zoomTint.css({opacity:this.options.tintOpacity}).animate().stop(!0,!0).fadeIn("slow"):(this.zoomTint.css({opacity:this.options.tintOpacity}).animate(),this.zoomTint.show()),this.isTintActive=!0);"hide"==b&&this.isTintActive&&(this.options.zoomTintFadeOut?this.zoomTint.stop(!0,!0).fadeOut(this.options.zoomTintFadeOut):this.zoomTint.hide(),this.isTintActive=!1)},setLensPostition:function(b){},
|
||||
setWindowPostition:function(b){var a=this;if(isNaN(a.options.zoomWindowPosition))a.externalContainer=d("#"+a.options.zoomWindowPosition),a.externalContainerWidth=a.externalContainer.width(),a.externalContainerHeight=a.externalContainer.height(),a.externalContainerOffset=a.externalContainer.offset(),a.windowOffsetTop=a.externalContainerOffset.top,a.windowOffsetLeft=a.externalContainerOffset.left;else switch(a.options.zoomWindowPosition){case 1:a.windowOffsetTop=a.options.zoomWindowOffety;a.windowOffsetLeft=
|
||||
+a.nzWidth;break;case 2:a.options.zoomWindowHeight>a.nzHeight&&(a.windowOffsetTop=-1*(a.options.zoomWindowHeight/2-a.nzHeight/2),a.windowOffsetLeft=a.nzWidth);break;case 3:a.windowOffsetTop=a.nzHeight-a.zoomWindow.height()-2*a.options.borderSize;a.windowOffsetLeft=a.nzWidth;break;case 4:a.windowOffsetTop=a.nzHeight;a.windowOffsetLeft=a.nzWidth;break;case 5:a.windowOffsetTop=a.nzHeight;a.windowOffsetLeft=a.nzWidth-a.zoomWindow.width()-2*a.options.borderSize;break;case 6:a.options.zoomWindowHeight>
|
||||
a.nzHeight&&(a.windowOffsetTop=a.nzHeight,a.windowOffsetLeft=-1*(a.options.zoomWindowWidth/2-a.nzWidth/2+2*a.options.borderSize));break;case 7:a.windowOffsetTop=a.nzHeight;a.windowOffsetLeft=0;break;case 8:a.windowOffsetTop=a.nzHeight;a.windowOffsetLeft=-1*(a.zoomWindow.width()+2*a.options.borderSize);break;case 9:a.windowOffsetTop=a.nzHeight-a.zoomWindow.height()-2*a.options.borderSize;a.windowOffsetLeft=-1*(a.zoomWindow.width()+2*a.options.borderSize);break;case 10:a.options.zoomWindowHeight>a.nzHeight&&
|
||||
(a.windowOffsetTop=-1*(a.options.zoomWindowHeight/2-a.nzHeight/2),a.windowOffsetLeft=-1*(a.zoomWindow.width()+2*a.options.borderSize));break;case 11:a.windowOffsetTop=a.options.zoomWindowOffety;a.windowOffsetLeft=-1*(a.zoomWindow.width()+2*a.options.borderSize);break;case 12:a.windowOffsetTop=-1*(a.zoomWindow.height()+2*a.options.borderSize);a.windowOffsetLeft=-1*(a.zoomWindow.width()+2*a.options.borderSize);break;case 13:a.windowOffsetTop=-1*(a.zoomWindow.height()+2*a.options.borderSize);a.windowOffsetLeft=
|
||||
0;break;case 14:a.options.zoomWindowHeight>a.nzHeight&&(a.windowOffsetTop=-1*(a.zoomWindow.height()+2*a.options.borderSize),a.windowOffsetLeft=-1*(a.options.zoomWindowWidth/2-a.nzWidth/2+2*a.options.borderSize));break;case 15:a.windowOffsetTop=-1*(a.zoomWindow.height()+2*a.options.borderSize);a.windowOffsetLeft=a.nzWidth-a.zoomWindow.width()-2*a.options.borderSize;break;case 16:a.windowOffsetTop=-1*(a.zoomWindow.height()+2*a.options.borderSize);a.windowOffsetLeft=a.nzWidth;break;default:a.windowOffsetTop=
|
||||
a.options.zoomWindowOffety,a.windowOffsetLeft=a.nzWidth}a.isWindowSet=!0;a.windowOffsetTop+=a.options.zoomWindowOffety;a.windowOffsetLeft+=a.options.zoomWindowOffetx;a.zoomWindow.css({top:a.windowOffsetTop});a.zoomWindow.css({left:a.windowOffsetLeft});"inner"==a.options.zoomType&&(a.zoomWindow.css({top:0}),a.zoomWindow.css({left:0}));a.windowLeftPos=String(-1*((b.pageX-a.nzOffset.left)*a.widthRatio-a.zoomWindow.width()/2));a.windowTopPos=String(-1*((b.pageY-a.nzOffset.top)*a.heightRatio-a.zoomWindow.height()/
|
||||
2));a.Etoppos&&(a.windowTopPos=0);a.Eloppos&&(a.windowLeftPos=0);a.Eboppos&&(a.windowTopPos=-1*(a.largeHeight/a.currentZoomLevel-a.zoomWindow.height()));a.Eroppos&&(a.windowLeftPos=-1*(a.largeWidth/a.currentZoomLevel-a.zoomWindow.width()));a.fullheight&&(a.windowTopPos=0);a.fullwidth&&(a.windowLeftPos=0);if("window"==a.options.zoomType||"inner"==a.options.zoomType)1==a.zoomLock&&(1>=a.widthRatio&&(a.windowLeftPos=0),1>=a.heightRatio&&(a.windowTopPos=0)),a.largeHeight<a.options.zoomWindowHeight&&(a.windowTopPos=
|
||||
0),a.largeWidth<a.options.zoomWindowWidth&&(a.windowLeftPos=0),a.options.easing?(a.xp||(a.xp=0),a.yp||(a.yp=0),a.loop||(a.loop=setInterval(function(){a.xp+=(a.windowLeftPos-a.xp)/a.options.easingAmount;a.yp+=(a.windowTopPos-a.yp)/a.options.easingAmount;a.scrollingLock?(clearInterval(a.loop),a.xp=a.windowLeftPos,a.yp=a.windowTopPos,a.xp=-1*((b.pageX-a.nzOffset.left)*a.widthRatio-a.zoomWindow.width()/2),a.yp=-1*((b.pageY-a.nzOffset.top)*a.heightRatio-a.zoomWindow.height()/2),a.changeBgSize&&(a.nzHeight>
|
||||
a.nzWidth?("lens"==a.options.zoomType&&a.zoomLens.css({"background-size":a.largeWidth/a.newvalueheight+"px "+a.largeHeight/a.newvalueheight+"px"}),a.zoomWindow.css({"background-size":a.largeWidth/a.newvalueheight+"px "+a.largeHeight/a.newvalueheight+"px"})):("lens"!=a.options.zoomType&&a.zoomLens.css({"background-size":a.largeWidth/a.newvaluewidth+"px "+a.largeHeight/a.newvalueheight+"px"}),a.zoomWindow.css({"background-size":a.largeWidth/a.newvaluewidth+"px "+a.largeHeight/a.newvaluewidth+"px"})),
|
||||
a.changeBgSize=!1),a.zoomWindow.css({backgroundPosition:a.windowLeftPos+"px "+a.windowTopPos+"px"}),a.scrollingLock=!1,a.loop=!1):(a.changeBgSize&&(a.nzHeight>a.nzWidth?("lens"==a.options.zoomType&&a.zoomLens.css({"background-size":a.largeWidth/a.newvalueheight+"px "+a.largeHeight/a.newvalueheight+"px"}),a.zoomWindow.css({"background-size":a.largeWidth/a.newvalueheight+"px "+a.largeHeight/a.newvalueheight+"px"})):("lens"!=a.options.zoomType&&a.zoomLens.css({"background-size":a.largeWidth/a.newvaluewidth+
|
||||
"px "+a.largeHeight/a.newvaluewidth+"px"}),a.zoomWindow.css({"background-size":a.largeWidth/a.newvaluewidth+"px "+a.largeHeight/a.newvaluewidth+"px"})),a.changeBgSize=!1),a.zoomWindow.css({backgroundPosition:a.xp+"px "+a.yp+"px"}))},16))):(a.changeBgSize&&(a.nzHeight>a.nzWidth?("lens"==a.options.zoomType&&a.zoomLens.css({"background-size":a.largeWidth/a.newvalueheight+"px "+a.largeHeight/a.newvalueheight+"px"}),a.zoomWindow.css({"background-size":a.largeWidth/a.newvalueheight+"px "+a.largeHeight/
|
||||
a.newvalueheight+"px"})):("lens"==a.options.zoomType&&a.zoomLens.css({"background-size":a.largeWidth/a.newvaluewidth+"px "+a.largeHeight/a.newvaluewidth+"px"}),a.largeHeight/a.newvaluewidth<a.options.zoomWindowHeight?a.zoomWindow.css({"background-size":a.largeWidth/a.newvaluewidth+"px "+a.largeHeight/a.newvaluewidth+"px"}):a.zoomWindow.css({"background-size":a.largeWidth/a.newvalueheight+"px "+a.largeHeight/a.newvalueheight+"px"})),a.changeBgSize=!1),a.zoomWindow.css({backgroundPosition:a.windowLeftPos+
|
||||
"px "+a.windowTopPos+"px"}))},setTintPosition:function(b){this.nzOffset=this.$elem.offset();this.tintpos=String(-1*(b.pageX-this.nzOffset.left-this.zoomLens.width()/2));this.tintposy=String(-1*(b.pageY-this.nzOffset.top-this.zoomLens.height()/2));this.Etoppos&&(this.tintposy=0);this.Eloppos&&(this.tintpos=0);this.Eboppos&&(this.tintposy=-1*(this.nzHeight-this.zoomLens.height()-2*this.options.lensBorderSize));this.Eroppos&&(this.tintpos=-1*(this.nzWidth-this.zoomLens.width()-2*this.options.lensBorderSize));
|
||||
this.options.tint&&(this.fullheight&&(this.tintposy=0),this.fullwidth&&(this.tintpos=0),this.zoomTintImage.css({left:this.tintpos+"px"}),this.zoomTintImage.css({top:this.tintposy+"px"}))},swaptheimage:function(b,a){var c=this,e=new Image;c.options.loadingIcon&&(c.spinner=d("<div style=\"background: url('"+c.options.loadingIcon+"') no-repeat center;height:"+c.nzHeight+"px;width:"+c.nzWidth+'px;z-index: 2000;position: absolute; background-position: center center;"></div>'),c.$elem.after(c.spinner));
|
||||
c.options.onImageSwap(c.$elem);e.onload=function(){c.largeWidth=e.width;c.largeHeight=e.height;c.zoomImage=a;c.zoomWindow.css({"background-size":c.largeWidth+"px "+c.largeHeight+"px"});c.zoomWindow.css({"background-size":c.largeWidth+"px "+c.largeHeight+"px"});c.swapAction(b,a)};e.src=a},swapAction:function(b,a){var c=this,e=new Image;e.onload=function(){c.nzHeight=e.height;c.nzWidth=e.width;c.options.onImageSwapComplete(c.$elem);c.doneCallback()};e.src=b;c.currentZoomLevel=c.options.zoomLevel;c.options.maxZoomLevel=
|
||||
!1;"lens"==c.options.zoomType&&c.zoomLens.css({backgroundImage:"url('"+a+"')"});"window"==c.options.zoomType&&c.zoomWindow.css({backgroundImage:"url('"+a+"')"});"inner"==c.options.zoomType&&c.zoomWindow.css({backgroundImage:"url('"+a+"')"});c.currentImage=a;if(c.options.imageCrossfade){var f=c.$elem,g=f.clone();c.$elem.attr("src",b);c.$elem.after(g);g.stop(!0).fadeOut(c.options.imageCrossfade,function(){d(this).remove()});c.$elem.width("auto").removeAttr("width");c.$elem.height("auto").removeAttr("height");
|
||||
f.fadeIn(c.options.imageCrossfade);c.options.tint&&"inner"!=c.options.zoomType&&(f=c.zoomTintImage,g=f.clone(),c.zoomTintImage.attr("src",a),c.zoomTintImage.after(g),g.stop(!0).fadeOut(c.options.imageCrossfade,function(){d(this).remove()}),f.fadeIn(c.options.imageCrossfade),c.zoomTint.css({height:c.$elem.height()}),c.zoomTint.css({width:c.$elem.width()}));c.zoomContainer.css("height",c.$elem.height());c.zoomContainer.css("width",c.$elem.width());"inner"!=c.options.zoomType||c.options.constrainType||
|
||||
(c.zoomWrap.parent().css("height",c.$elem.height()),c.zoomWrap.parent().css("width",c.$elem.width()),c.zoomWindow.css("height",c.$elem.height()),c.zoomWindow.css("width",c.$elem.width()))}else c.$elem.attr("src",b),c.options.tint&&(c.zoomTintImage.attr("src",a),c.zoomTintImage.attr("height",c.$elem.height()),c.zoomTintImage.css({height:c.$elem.height()}),c.zoomTint.css({height:c.$elem.height()})),c.zoomContainer.css("height",c.$elem.height()),c.zoomContainer.css("width",c.$elem.width());c.options.imageCrossfade&&
|
||||
(c.zoomWrap.css("height",c.$elem.height()),c.zoomWrap.css("width",c.$elem.width()));c.options.constrainType&&("height"==c.options.constrainType&&(c.zoomContainer.css("height",c.options.constrainSize),c.zoomContainer.css("width","auto"),c.options.imageCrossfade?(c.zoomWrap.css("height",c.options.constrainSize),c.zoomWrap.css("width","auto"),c.constwidth=c.zoomWrap.width()):(c.$elem.css("height",c.options.constrainSize),c.$elem.css("width","auto"),c.constwidth=c.$elem.width()),"inner"==c.options.zoomType&&
|
||||
(c.zoomWrap.parent().css("height",c.options.constrainSize),c.zoomWrap.parent().css("width",c.constwidth),c.zoomWindow.css("height",c.options.constrainSize),c.zoomWindow.css("width",c.constwidth)),c.options.tint&&(c.tintContainer.css("height",c.options.constrainSize),c.tintContainer.css("width",c.constwidth),c.zoomTint.css("height",c.options.constrainSize),c.zoomTint.css("width",c.constwidth),c.zoomTintImage.css("height",c.options.constrainSize),c.zoomTintImage.css("width",c.constwidth))),"width"==
|
||||
c.options.constrainType&&(c.zoomContainer.css("height","auto"),c.zoomContainer.css("width",c.options.constrainSize),c.options.imageCrossfade?(c.zoomWrap.css("height","auto"),c.zoomWrap.css("width",c.options.constrainSize),c.constheight=c.zoomWrap.height()):(c.$elem.css("height","auto"),c.$elem.css("width",c.options.constrainSize),c.constheight=c.$elem.height()),"inner"==c.options.zoomType&&(c.zoomWrap.parent().css("height",c.constheight),c.zoomWrap.parent().css("width",c.options.constrainSize),c.zoomWindow.css("height",
|
||||
c.constheight),c.zoomWindow.css("width",c.options.constrainSize)),c.options.tint&&(c.tintContainer.css("height",c.constheight),c.tintContainer.css("width",c.options.constrainSize),c.zoomTint.css("height",c.constheight),c.zoomTint.css("width",c.options.constrainSize),c.zoomTintImage.css("height",c.constheight),c.zoomTintImage.css("width",c.options.constrainSize))))},doneCallback:function(){this.options.loadingIcon&&this.spinner.hide();this.nzOffset=this.$elem.offset();this.nzWidth=this.$elem.width();
|
||||
this.nzHeight=this.$elem.height();this.currentZoomLevel=this.options.zoomLevel;this.widthRatio=this.largeWidth/this.nzWidth;this.heightRatio=this.largeHeight/this.nzHeight;"window"==this.options.zoomType&&(lensHeight=this.nzHeight<this.options.zoomWindowWidth/this.widthRatio?this.nzHeight:String(this.options.zoomWindowHeight/this.heightRatio),lensWidth=this.options.zoomWindowWidth<this.options.zoomWindowWidth?this.nzWidth:this.options.zoomWindowWidth/this.widthRatio,this.zoomLens&&(this.zoomLens.css("width",
|
||||
lensWidth),this.zoomLens.css("height",lensHeight)))},getCurrentImage:function(){return this.zoomImage},getGalleryList:function(){var b=this;b.gallerylist=[];b.options.gallery?d("#"+b.options.gallery+" a").each(function(){var a="";d(this).data("zoom-image")?a=d(this).data("zoom-image"):d(this).data("image")&&(a=d(this).data("image"));a==b.zoomImage?b.gallerylist.unshift({href:""+a+"",title:d(this).find("img").attr("title")}):b.gallerylist.push({href:""+a+"",title:d(this).find("img").attr("title")})}):
|
||||
b.gallerylist.push({href:""+b.zoomImage+"",title:d(this).find("img").attr("title")});return b.gallerylist},changeZoomLevel:function(b){this.scrollingLock=!0;this.newvalue=parseFloat(b).toFixed(2);newvalue=parseFloat(b).toFixed(2);maxheightnewvalue=this.largeHeight/(this.options.zoomWindowHeight/this.nzHeight*this.nzHeight);maxwidthtnewvalue=this.largeWidth/(this.options.zoomWindowWidth/this.nzWidth*this.nzWidth);"inner"!=this.options.zoomType&&(maxheightnewvalue<=newvalue?(this.heightRatio=this.largeHeight/
|
||||
maxheightnewvalue/this.nzHeight,this.newvalueheight=maxheightnewvalue,this.fullheight=!0):(this.heightRatio=this.largeHeight/newvalue/this.nzHeight,this.newvalueheight=newvalue,this.fullheight=!1),maxwidthtnewvalue<=newvalue?(this.widthRatio=this.largeWidth/maxwidthtnewvalue/this.nzWidth,this.newvaluewidth=maxwidthtnewvalue,this.fullwidth=!0):(this.widthRatio=this.largeWidth/newvalue/this.nzWidth,this.newvaluewidth=newvalue,this.fullwidth=!1),"lens"==this.options.zoomType&&(maxheightnewvalue<=newvalue?
|
||||
(this.fullwidth=!0,this.newvaluewidth=maxheightnewvalue):(this.widthRatio=this.largeWidth/newvalue/this.nzWidth,this.newvaluewidth=newvalue,this.fullwidth=!1)));"inner"==this.options.zoomType&&(maxheightnewvalue=parseFloat(this.largeHeight/this.nzHeight).toFixed(2),maxwidthtnewvalue=parseFloat(this.largeWidth/this.nzWidth).toFixed(2),newvalue>maxheightnewvalue&&(newvalue=maxheightnewvalue),newvalue>maxwidthtnewvalue&&(newvalue=maxwidthtnewvalue),maxheightnewvalue<=newvalue?(this.heightRatio=this.largeHeight/
|
||||
newvalue/this.nzHeight,this.newvalueheight=newvalue>maxheightnewvalue?maxheightnewvalue:newvalue,this.fullheight=!0):(this.heightRatio=this.largeHeight/newvalue/this.nzHeight,this.newvalueheight=newvalue>maxheightnewvalue?maxheightnewvalue:newvalue,this.fullheight=!1),maxwidthtnewvalue<=newvalue?(this.widthRatio=this.largeWidth/newvalue/this.nzWidth,this.newvaluewidth=newvalue>maxwidthtnewvalue?maxwidthtnewvalue:newvalue,this.fullwidth=!0):(this.widthRatio=this.largeWidth/newvalue/this.nzWidth,this.newvaluewidth=
|
||||
newvalue,this.fullwidth=!1));scrcontinue=!1;"inner"==this.options.zoomType&&(this.nzWidth>this.nzHeight&&(this.newvaluewidth<=maxwidthtnewvalue?scrcontinue=!0:(scrcontinue=!1,this.fullwidth=this.fullheight=!0)),this.nzHeight>this.nzWidth&&(this.newvaluewidth<=maxwidthtnewvalue?scrcontinue=!0:(scrcontinue=!1,this.fullwidth=this.fullheight=!0)));"inner"!=this.options.zoomType&&(scrcontinue=!0);scrcontinue&&(this.zoomLock=0,this.changeZoom=!0,this.options.zoomWindowHeight/this.heightRatio<=this.nzHeight&&
|
||||
(this.currentZoomLevel=this.newvalueheight,"lens"!=this.options.zoomType&&"inner"!=this.options.zoomType&&(this.changeBgSize=!0,this.zoomLens.css({height:String(this.options.zoomWindowHeight/this.heightRatio)+"px"})),"lens"==this.options.zoomType||"inner"==this.options.zoomType)&&(this.changeBgSize=!0),this.options.zoomWindowWidth/this.widthRatio<=this.nzWidth&&("inner"!=this.options.zoomType&&this.newvaluewidth>this.newvalueheight&&(this.currentZoomLevel=this.newvaluewidth),"lens"!=this.options.zoomType&&
|
||||
"inner"!=this.options.zoomType&&(this.changeBgSize=!0,this.zoomLens.css({width:String(this.options.zoomWindowWidth/this.widthRatio)+"px"})),"lens"==this.options.zoomType||"inner"==this.options.zoomType)&&(this.changeBgSize=!0),"inner"==this.options.zoomType&&(this.changeBgSize=!0,this.nzWidth>this.nzHeight&&(this.currentZoomLevel=this.newvaluewidth),this.nzHeight>this.nzWidth&&(this.currentZoomLevel=this.newvaluewidth)));this.setPosition(this.currentLoc)},closeAll:function(){self.zoomWindow&&self.zoomWindow.hide();
|
||||
self.zoomLens&&self.zoomLens.hide();self.zoomTint&&self.zoomTint.hide()},changeState:function(b){"enable"==b&&(this.options.zoomEnabled=!0);"disable"==b&&(this.options.zoomEnabled=!1)}};d.fn.elevateZoom=function(b){return this.each(function(){var a=Object.create(k);a.init(b,this);d.data(this,"elevateZoom",a)})};d.fn.elevateZoom.options={zoomActivation:"hover",zoomEnabled:!0,preloading:1,zoomLevel:1,scrollZoom:!1,scrollZoomIncrement:0.1,minZoomLevel:!1,maxZoomLevel:!1,easing:!1,easingAmount:12,lensSize:200,
|
||||
zoomWindowWidth:400,zoomWindowHeight:400,zoomWindowOffetx:0,zoomWindowOffety:0,zoomWindowPosition:1,zoomWindowBgColour:"#fff",lensFadeIn:!1,lensFadeOut:!1,debug:!1,zoomWindowFadeIn:!1,zoomWindowFadeOut:!1,zoomWindowAlwaysShow:!1,zoomTintFadeIn:!1,zoomTintFadeOut:!1,borderSize:4,showLens:!0,borderColour:"#888",lensBorderSize:1,lensBorderColour:"#000",lensShape:"square",zoomType:"window",containLensZoom:!1,lensColour:"white",lensOpacity:0.4,lenszoom:!1,tint:!1,tintColour:"#333",tintOpacity:0.4,gallery:!1,
|
||||
galleryActiveClass:"zoomGalleryActive",imageCrossfade:!1,constrainType:!1,constrainSize:!1,loadingIcon:!1,cursor:"default",responsive:!0,onComplete:d.noop,onZoomedImageLoaded:function(){},onImageSwap:d.noop,onImageSwapComplete:d.noop}})(jQuery,window,document);
|
||||
Reference in new issue
Block a user