window.F$=window.F$||function(){function e(e){return null==e?String(e):G[J.call(e)]||"object"}function t(t){return"function"==e(t)}function i(e){return null!=e&&e==e.window}function r(e){return null!=e&&e.nodeType==e.DOCUMENT_NODE}function n(t){return"object"==e(t)}function a(e){return n(e)&&!i(e)&&Object.getPrototypeOf(e)==Object.prototype}function s(e){var t=!!e&&"length"in e&&e.length,r=x.type(e);return"function"!=r&&!i(e)&&("array"==r||0===t||"number"==typeof t&&t>0&&t-1 in e)}function o(e){return P.call(e,(function(e){return null!=e}))}function c(e){return e.length>0?x.fn.concat.apply([],e):e}function l(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function d(e){return e in L?L[e]:L[e]=new RegExp("(^|\\s)"+e+"(\\s|$)")}function u(e,t){return"number"!=typeof t||M[l(e)]?t:t+"px"}function p(e){var t,i;return E[e]||(t=A.createElement(e),A.body.appendChild(t),i=getComputedStyle(t,"").getPropertyValue("display"),t.parentNode.removeChild(t),"none"==i&&(i="block"),E[e]=i),E[e]}function h(e){return"children"in e?I.call(e.children):x.map(e.childNodes,(function(e){if(1==e.nodeType)return e}))}function f(e,t){var i,r=e?e.length:0;for(i=0;i]*>/,D=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,q=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,B=/^(?:body|html)$/i,U=/([A-Z])/g,N=["val","css","html","text","data","width","height","offset"],j=["after","prepend","before","append"],V=A.createElement("table"),z=A.createElement("tr"),W={tr:A.createElement("tbody"),tbody:V,thead:V,tfoot:V,td:z,th:z,"*":A.createElement("div")},H=/^[\w-]*$/,G={},J=G.toString,Z={},Y=A.createElement("div"),K={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},X=Array.isArray||function(e){return e instanceof Array};return Z.matches=function(e,t){if(!t||!e||1!==e.nodeType)return!1;var i=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.matchesSelector;if(i)return i.call(e,t);var r,n=e.parentNode,a=!n;return a&&(n=Y).appendChild(e),r=~Z.qsa(n,t).indexOf(e),a&&Y.removeChild(e),r},k=function(e){return e.replace(/-+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))},T=function(e){return P.call(e,(function(t,i){return e.indexOf(t)==i}))},Z.fragment=function(e,t,i){var r,n,s;return D.test(e)&&(r=x(A.createElement(RegExp.$1))),r||(e.replace&&(e=e.replace(q,"<$1>")),t===C&&(t=O.test(e)&&RegExp.$1),t in W||(t="*"),(s=W[t]).innerHTML=""+e,r=x.each(I.call(s.childNodes),(function(){s.removeChild(this)}))),a(i)&&(n=x(r),x.each(i,(function(e,t){N.indexOf(e)>-1?n[e](t):n.attr(e,t)}))),r},Z.Z=function(e,t){return new f(e,t)},Z.isZ=function(e){return e instanceof Z.Z||e.__proto__&&e.__proto__.zepto},Z.init=function(e,i){var r;if(!e)return Z.Z();if("string"==typeof e)if("<"==(e=e.trim())[0]&&O.test(e))r=Z.fragment(e,RegExp.$1,i),e=null;else{if(i!==C)return x(i).find(e);r=Z.qsa(A,e)}else{if(t(e))return x(A).ready(e);if(Z.isZ(e))return e;if(X(e))r=o(e);else if(n(e))r=[e],e=null;else if(O.test(e))r=Z.fragment(e.trim(),RegExp.$1,i),e=null;else{if(i!==C)return x(i).find(e);r=Z.qsa(A,e)}}return Z.Z(r,e)},(x=function(e,t){return Z.init(e,t)}).extend=function(e){var t,i=I.call(arguments,1);return"boolean"==typeof e&&(t=e,e=i.shift()),i.forEach((function(i){m(e,i,t)})),e},Z.qsa=function(e,t){var i,r="#"==t[0],n=!r&&"."==t[0],a=r||n?t.slice(1):t,s=H.test(a);return e.getElementById&&s&&r?(i=e.getElementById(a))?[i]:[]:1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType?[]:I.call(s&&!r&&e.getElementsByClassName?n?e.getElementsByClassName(a):e.getElementsByTagName(t):e.querySelectorAll(t))},x.contains=A.documentElement.contains?function(e,t){return e!==t&&e.contains(t)}:function(e,t){for(;t&&(t=t.parentNode);)if(t===e)return!0;return!1},x.type=e,x.isFunction=t,x.isWindow=i,x.isArray=X,x.isPlainObject=a,x.isEmptyObject=function(e){var t;for(t in e)return!1;return!0},x.isNumeric=function(e){var t=Number(e),i=typeof e;return null!=e&&"boolean"!=i&&("string"!=i||e.length)&&!isNaN(t)&&isFinite(t)||!1},x.inArray=function(e,t,i){return $.indexOf.call(t,e,i)},x.camelCase=k,x.trim=function(e){return null==e?"":String.prototype.trim.call(e)},x.uuid=0,x.support={},x.expr={},x.noop=function(){},x.map=function(e,t){var i,r,n,a=[];if(s(e))for(r=0;r=0?e:e+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each((function(){null!=this.parentNode&&this.parentNode.removeChild(this)}))},each:function(e){return $.every.call(this,(function(t,i){return!1!==e.call(t,i,t)})),this},filter:function(e){return t(e)?this.not(this.not(e)):x(P.call(this,(function(t){return Z.matches(t,e)})))},add:function(e,t){return x(T(this.concat(x(e,t))))},is:function(e){return"string"==typeof e?this.length>0&&Z.matches(this[0],e):e&&this.selector==e.selector},not:function(e){var i=[];if(t(e)&&e.call!==C)this.each((function(t){e.call(this,t)||i.push(this)}));else{var r="string"==typeof e?this.filter(e):s(e)&&t(e.item)?I.call(e):x(e);this.forEach((function(e){r.indexOf(e)<0&&i.push(e)}))}return x(i)},has:function(e){return this.filter((function(){return n(e)?x.contains(this,e):x(this).find(e).size()}))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){var e=this[0];return e&&!n(e)?e:x(e)},last:function(){var e=this[this.length-1];return e&&!n(e)?e:x(e)},find:function(e){var t=this;return e?"object"==typeof e?x(e).filter((function(){var e=this;return $.some.call(t,(function(t){return x.contains(t,e)}))})):1==this.length?x(Z.qsa(this[0],e)):this.map((function(){return Z.qsa(this,e)})):x()},closest:function(e,t){var i=[],n="object"==typeof e&&x(e);return this.each((function(a,s){for(;s&&!(n?n.indexOf(s)>=0:Z.matches(s,e));)s=s!==t&&!r(s)&&s.parentNode;s&&i.indexOf(s)<0&&i.push(s)})),x(i)},parents:function(e){for(var t=[],i=this;i.length>0;)i=x.map(i,(function(e){if((e=e.parentNode)&&!r(e)&&t.indexOf(e)<0)return t.push(e),e}));return g(t,e)},parent:function(e){return g(T(this.pluck("parentNode")),e)},children:function(e){return g(this.map((function(){return h(this)})),e)},contents:function(){return this.map((function(){return this.contentDocument||I.call(this.childNodes)}))},siblings:function(e){return g(this.map((function(e,t){return P.call(h(t.parentNode),(function(e){return e!==t}))})),e)},empty:function(){return this.each((function(){this.innerHTML=""}))},pluck:function(e){return x.map(this,(function(t){return t[e]}))},show:function(){return this.each((function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=p(this.nodeName))}))},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){var i=t(e);if(this[0]&&!i)var r=x(e).get(0),n=r.parentNode||this.length>1;return this.each((function(t){x(this).wrapAll(i?e.call(this,t):n?r.cloneNode(!0):r)}))},wrapAll:function(e){if(this[0]){var t;for(x(this[0]).before(e=x(e));(t=e.children()).length;)e=t.first();x(e).append(this)}return this},wrapInner:function(e){var i=t(e);return this.each((function(t){var r=x(this),n=r.contents(),a=i?e.call(this,t):e;n.length?n.wrapAll(a):r.append(a)}))},unwrap:function(){return this.parent().each((function(){x(this).replaceWith(x(this).children())})),this},clone:function(){return this.map((function(){return this.cloneNode(!0)}))},hide:function(){return this.css("display","none")},toggle:function(e){return this.each((function(){var t=x(this);(e===C?"none"==t.css("display"):e)?t.show():t.hide()}))},prev:function(e){return x(this.pluck("previousElementSibling")).filter(e||"*")},next:function(e){return x(this.pluck("nextElementSibling")).filter(e||"*")},html:function(e){return 0 in arguments?this.each((function(t){var i=this.innerHTML;x(this).empty().append(v(this,e,t,i))})):0 in this?this[0].innerHTML:null},text:function(e){return 0 in arguments?this.each((function(t){var i=v(this,e,t,this.textContent);this.textContent=null==i?"":""+i})):0 in this?this.pluck("textContent").join(""):null},attr:function(e,t){var i;return"string"!=typeof e||1 in arguments?this.each((function(i){if(1===this.nodeType)if(n(e))for(S in e)_(this,S,e[S]);else _(this,e,v(this,t,i,this.getAttribute(e)))})):0 in this&&1==this[0].nodeType&&null!=(i=this[0].getAttribute(e))?i:C},removeAttr:function(e){return this.each((function(){1===this.nodeType&&e.split(" ").forEach((function(e){_(this,e)}),this)}))},prop:function(e,t){return"string"!=typeof(e=K[e]||e)||1 in arguments?this.each((function(i){if(n(e))for(S in e)this[K[S]||S]=e[S];else this[e]=v(this,t,i,this[e])})):this[0]&&this[0][e]},removeProp:function(e){return e=K[e]||e,this.each((function(){delete this[e]}))},data:function(e,t){var i="data-"+e.replace(U,"-$1").toLowerCase(),r=1 in arguments?this.attr(i,t):this.attr(i);return null!==r?y(r):C},val:function(e){return 0 in arguments?(null==e&&(e=""),this.each((function(t){this.value=v(this,e,t,this.value)}))):this[0]&&(this[0].multiple?x(this[0]).find("option").filter((function(){return this.selected})).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each((function(t){var i=x(this),r=v(this,e,t,i.offset()),n=i.offsetParent().offset(),a={top:r.top-n.top,left:r.left-n.left};"static"==i.css("position")&&(a.position="relative"),i.css(a)}));if(!this.length)return null;if(A.documentElement!==this[0]&&!x.contains(A.documentElement,this[0]))return{top:0,left:0};var t=this[0].getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,width:Math.round(t.width),height:Math.round(t.height)}},css:function(t,i){if(arguments.length<2){var r=this[0];if("string"==typeof t){if(!r)return;return r.style[k(t)]||getComputedStyle(r,"").getPropertyValue(t)}if(X(t)){if(!r)return;var n={},a=getComputedStyle(r,"");return x.each(t,(function(e,t){n[t]=r.style[k(t)]||a.getPropertyValue(t)})),n}}var s="";if("string"==e(t))i||0===i?s=l(t)+":"+u(t,i):this.each((function(){this.style.removeProperty(l(t))}));else for(S in t)t[S]||0===t[S]?s+=l(S)+":"+u(S,t[S])+";":this.each((function(){this.style.removeProperty(l(S))}));return this.each((function(){this.style.cssText+=";"+s}))},index:function(e){return e?this.indexOf(x(e)[0]):this.parent().children().indexOf(this[0])},hasClass:function(e){return!!e&&$.some.call(this,(function(e){return this.test(w(e))}),d(e))},addClass:function(e){return e?this.each((function(t){if("className"in this){F=[];var i=w(this);v(this,e,t,i).split(/\s+/g).forEach((function(e){x(this).hasClass(e)||F.push(e)}),this),F.length&&w(this,i+(i?" ":"")+F.join(" "))}})):this},removeClass:function(e){return this.each((function(t){if("className"in this){if(e===C)return w(this,"");F=w(this),v(this,e,t,F).split(/\s+/g).forEach((function(e){F=F.replace(d(e)," ")})),w(this,F.trim())}}))},toggleClass:function(e,t){return e?this.each((function(i){var r=x(this);v(this,e,i,w(this)).split(/\s+/g).forEach((function(e){(t===C?!r.hasClass(e):t)?r.addClass(e):r.removeClass(e)}))})):this},scrollTop:function(e){if(this.length){var t="scrollTop"in this[0];return e===C?t?this[0].scrollTop:this[0].pageYOffset:this.each(t?function(){this.scrollTop=e}:function(){this.scrollTo(this.scrollX,e)})}},scrollLeft:function(e){if(this.length){var t="scrollLeft"in this[0];return e===C?t?this[0].scrollLeft:this[0].pageXOffset:this.each(t?function(){this.scrollLeft=e}:function(){this.scrollTo(e,this.scrollY)})}},position:function(){if(this.length){var e=this[0],t=this.offsetParent(),i=this.offset(),r=B.test(t[0].nodeName)?{top:0,left:0}:t.offset();return i.top-=parseFloat(x(e).css("margin-top"))||0,i.left-=parseFloat(x(e).css("margin-left"))||0,r.top+=parseFloat(x(t[0]).css("border-top-width"))||0,r.left+=parseFloat(x(t[0]).css("border-left-width"))||0,{top:i.top-r.top,left:i.left-r.left}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent||A.body;e&&!B.test(e.nodeName)&&"static"==x(e).css("position");)e=e.offsetParent;return e}))}},x.fn.detach=x.fn.remove,["width","height"].forEach((function(e){var t=e.replace(/./,(function(e){return e[0].toUpperCase()}));x.fn[e]=function(n){var a,s=this[0];return n===C?i(s)?s["inner"+t]:r(s)?s.documentElement["scroll"+t]:(a=this.offset())&&a[e]:this.each((function(t){(s=x(this)).css(e,v(this,n,t,s[e]()))}))}})),j.forEach((function(t,i){var r=i%2;x.fn[t]=function(){var t,n,a=x.map(arguments,(function(i){var r=[];return"array"==(t=e(i))?(i.forEach((function(e){return e.nodeType!==C?r.push(e):x.zepto.isZ(e)?r=r.concat(e.get()):void(r=r.concat(Z.fragment(e)))})),r):"object"==t||null==i?i:Z.fragment(i)})),s=this.length>1;return a.length<1?this:this.each((function(e,t){n=r?t:t.parentNode,t=0==i?t.nextSibling:1==i?t.firstChild:2==i?t:null;var o=x.contains(A.documentElement,n);a.forEach((function(e){if(e=x.zepto.isZ(e)?e.get(0):e,s)e=e.cloneNode(!0);else if(!n)return x(e).remove();n.insertBefore(e,t),o&&b(e,(function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var t=e.ownerDocument?e.ownerDocument.defaultView:window;t.eval.call(t,e.innerHTML)}}))}))}))},x.fn[r?t+"To":"insert"+(i?"Before":"After")]=function(e){return x(e)[t](this),this}})),Z.Z.prototype=f.prototype=x.fn,Z.uniq=T,Z.deserializeValue=y,x.zepto=Z,x}(),function(e){function t(e){return e._zid||(e._zid=p++)}function i(e,i,a,s){if((i=r(i)).ns)var o=n(i.ns);return(g[t(e)]||[]).filter((function(e){return e&&(!i.e||e.e==i.e)&&(!i.ns||o.test(e.ns))&&(!a||t(e.fn)===t(a))&&(!s||e.sel==s)}))}function r(e){var t=(""+e).split(".");return{e:t[0],ns:t.slice(1).sort().join(" ")}}function n(e){return new RegExp("(?:^| )"+e.replace(" "," .* ?")+"(?: |$)")}function a(e,t){return e.del&&!_&&e.e in w||!!t}function s(e){return y[e]||_&&w[e]||e}function o(i,n,o,c,d,p,h){var f=t(i),m=g[f]||(g[f]=[]);n.split(/\s/).forEach((function(t){if("ready"==t)return e(document).ready(o);var n=r(t);n.fn=o,n.sel=d,n.e in y&&(o=function(t){var i=t.relatedTarget;if(!i||i!==this&&!e.contains(this,i))return n.fn.apply(this,arguments)}),n.del=p;var f=p||o;n.proxy=function(e){if(!(e=l(e)).isImmediatePropagationStopped()){e.data=c;var t=f.apply(i,e._args==u?[e]:[e].concat(e._args));return!1===t&&(e.preventDefault(),e.stopPropagation()),t}},n.i=m.length,m.push(n),"addEventListener"in i&&i.addEventListener(s(n.e),n.proxy,a(n,h))}))}function c(e,r,n,o,c){var l=t(e);(r||"").split(/\s/).forEach((function(t){i(e,t,n,o).forEach((function(t){delete g[l][t.i],"removeEventListener"in e&&e.removeEventListener(s(t.e),t.proxy,a(t,c))}))}))}function l(t,i){if(i||!t.isDefaultPrevented){i||(i=t),e.each(x,(function(e,r){var n=i[e];t[e]=function(){return this[r]=b,n&&n.apply(i,arguments)},t[r]=C}));try{t.timeStamp||(t.timeStamp=Date.now())}catch(e){}(i.defaultPrevented!==u?i.defaultPrevented:"returnValue"in i?!1===i.returnValue:i.getPreventDefault&&i.getPreventDefault())&&(t.isDefaultPrevented=b)}return t}function d(e){var t,i={originalEvent:e};for(t in e)S.test(t)||e[t]===u||(i[t]=e[t]);return l(i,e)}var u,p=1,h=Array.prototype.slice,f=e.isFunction,m=function(e){return"string"==typeof e},g={},v={},_="onfocusin"in window,w={focus:"focusin",blur:"focusout"},y={mouseenter:"mouseover",mouseleave:"mouseout"};v.click=v.mousedown=v.mouseup=v.mousemove="MouseEvents",e.event={add:o,remove:c},e.proxy=function(i,r){var n=2 in arguments&&h.call(arguments,2);if(f(i)){var a=function(){return i.apply(r,n?n.concat(h.call(arguments)):arguments)};return a._zid=t(i),a}if(m(r))return n?(n.unshift(i[r],i),e.proxy.apply(null,n)):e.proxy(i[r],i);throw new TypeError("expected function")},e.fn.bind=function(e,t,i){return this.on(e,t,i)},e.fn.unbind=function(e,t){return this.off(e,t)},e.fn.one=function(e,t,i,r){return this.on(e,t,i,r,1)};var b=function(){return!0},C=function(){return!1},S=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,x={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};e.fn.delegate=function(e,t,i){return this.on(t,e,i)},e.fn.undelegate=function(e,t,i){return this.off(t,e,i)},e.fn.live=function(t,i){return e(document.body).delegate(this.selector,t,i),this},e.fn.die=function(t,i){return e(document.body).undelegate(this.selector,t,i),this},e.fn.on=function(t,i,r,n,a){var s,l,p=this;return t&&!m(t)?(e.each(t,(function(e,t){p.on(e,i,r,t,a)})),p):(m(i)||f(n)||!1===n||(n=r,r=i,i=u),n!==u&&!1!==r||(n=r,r=u),!1===n&&(n=C),p.each((function(u,p){a&&(s=function(e){return c(p,e.type,n),n.apply(this,arguments)}),i&&(l=function(t){var r,a=e(t.target).closest(i,p).get(0);if(a&&a!==p)return r=e.extend(d(t),{currentTarget:a,liveFired:p}),(s||n).apply(a,[r].concat(h.call(arguments,1)))}),o(p,t,n,r,i,l||s)})))},e.fn.off=function(t,i,r){var n=this;return t&&!m(t)?(e.each(t,(function(e,t){n.off(e,i,t)})),n):(m(i)||f(r)||!1===r||(r=i,i=u),!1===r&&(r=C),n.each((function(){c(this,t,r,i)})))},e.fn.trigger=function(t,i){return(t=m(t)||e.isPlainObject(t)?e.Event(t):l(t))._args=i,this.each((function(){t.type in w&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,i)}))},e.fn.triggerHandler=function(t,r){var n,a;return this.each((function(s,o){(n=d(m(t)?e.Event(t):t))._args=r,n.target=o,e.each(i(o,t.type||t),(function(e,t){if(a=t.proxy(n),n.isImmediatePropagationStopped())return!1}))})),a},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach((function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}})),e.Event=function(e,t){m(e)||(e=(t=e).type);var i=document.createEvent(v[e]||"Events"),r=!0;if(t)for(var n in t)"bubbles"==n?r=!!t[n]:i[n]=t[n];return i.initEvent(e,r,!0),l(i)}}(F$),function(e){function t(t,i,r){var n=e.Event(i);return e(t).trigger(n,r),!n.isDefaultPrevented()}function i(e,i,r,n){if(e.global)return t(i||w,r,n)}function r(t){t.global&&0==e.active++&&i(t,null,"ajaxStart")}function n(t){t.global&&!--e.active&&i(t,null,"ajaxStop")}function a(e,t){var r=t.context;if(!1===t.beforeSend.call(r,e,t)||!1===i(t,r,"ajaxBeforeSend",[e,t]))return!1;i(t,r,"ajaxSend",[e,t])}function s(e,t,r,n){var a=r.context,s="success";r.success.call(a,e,s,t),n&&n.resolveWith(a,[e,s,t]),i(r,a,"ajaxSuccess",[t,r,e]),c(s,t,r)}function o(e,t,r,n,a){var s=n.context;n.error.call(s,r,t,e),a&&a.rejectWith(s,[r,t,e]),i(n,s,"ajaxError",[r,n,e||t]),c(t,r,n)}function c(e,t,r){var a=r.context;r.complete.call(a,t,e),i(r,a,"ajaxComplete",[t,r]),n(r)}function l(e,t,i){if(i.dataFilter==d)return e;var r=i.context;return i.dataFilter.call(r,e,t)}function d(){}function u(e){return e&&(e=e.split(";",2)[0]),e&&(e==x?"html":e==S?"json":b.test(e)?"script":C.test(e)&&"xml")||"text"}function p(e,t){return""==t?e:(e+"&"+t).replace(/[&?]{1,2}/,"?")}function h(t){t.processData&&t.data&&"string"!=e.type(t.data)&&(t.data=e.param(t.data,t.traditional)),!t.data||t.type&&"GET"!=t.type.toUpperCase()&&"jsonp"!=t.dataType||(t.url=p(t.url,t.data),t.data=void 0)}function f(t,i,r,n){return e.isFunction(i)&&(n=r,r=i,i=void 0),e.isFunction(r)||(n=r,r=void 0),{url:t,data:i,success:r,dataType:n}}function m(t,i,r,n){var a,s=e.isArray(i),o=e.isPlainObject(i);e.each(i,(function(i,c){a=e.type(c),n&&(i=r?n:n+"["+(o||"object"==a||"array"==a?i:"")+"]"),!n&&s?t.add(c.name,c.value):"array"==a||!r&&"object"==a?m(t,c,r,i):t.add(i,c)}))}var g,v,_=+new Date,w=window.document,y=/)<[^<]*)*<\/script>/gi,b=/^(?:text|application)\/javascript/i,C=/^(?:text|application)\/xml/i,S="application/json",x="text/html",F=/^\s*$/,k=w.createElement("a");k.href=window.location.href,e.active=0,e.ajaxJSONP=function(t,i){if(!("type"in t))return e.ajax(t);var r,n,c=t.jsonpCallback,l=(e.isFunction(c)?c():c)||"Zepto"+_++,d=w.createElement("script"),u=window[l],p=function(t){e(d).triggerHandler("error",t||"abort")},h={abort:p};return i&&i.promise(h),e(d).on("load error",(function(a,c){clearTimeout(n),e(d).off().remove(),"error"!=a.type&&r?s(r[0],h,t,i):o(null,c||"error",h,t,i),window[l]=u,r&&e.isFunction(u)&&u(r[0]),u=r=void 0})),!1===a(h,t)?(p("abort"),h):(window[l]=function(){r=arguments},d.src=t.url.replace(/\?(.+)=\?/,"?$1="+l),w.head.appendChild(d),t.timeout>0&&(n=setTimeout((function(){p("timeout")}),t.timeout)),h)},e.ajaxSettings={type:"GET",beforeSend:d,success:d,error:d,complete:d,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:S,xml:"application/xml, text/xml",html:x,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:d},e.ajax=function(t){var i,n,c=e.extend({},t||{}),f=e.Deferred&&e.Deferred();for(g in e.ajaxSettings)void 0===c[g]&&(c[g]=e.ajaxSettings[g]);r(c),c.crossDomain||((i=w.createElement("a")).href=c.url,i.href=i.href,c.crossDomain=k.protocol+"//"+k.host!=i.protocol+"//"+i.host),c.url||(c.url=window.location.toString()),(n=c.url.indexOf("#"))>-1&&(c.url=c.url.slice(0,n)),h(c);var m=c.dataType,_=/\?.+=\?/.test(c.url);if(_&&(m="jsonp"),!1!==c.cache&&(t&&!0===t.cache||"script"!=m&&"jsonp"!=m)||(c.url=p(c.url,"_="+Date.now())),"jsonp"==m)return _||(c.url=p(c.url,c.jsonp?c.jsonp+"=?":!1===c.jsonp?"":"callback=?")),e.ajaxJSONP(c,f);var y,b=c.accepts[m],C={},S=function(e,t){C[e.toLowerCase()]=[e,t]},x=/^([\w-]+:)\/\//.test(c.url)?RegExp.$1:window.location.protocol,T=c.xhr(),$=T.setRequestHeader;if(f&&f.promise(T),c.crossDomain||S("X-Requested-With","XMLHttpRequest"),S("Accept",b||"*/*"),(b=c.mimeType||b)&&(b.indexOf(",")>-1&&(b=b.split(",",2)[0]),T.overrideMimeType&&T.overrideMimeType(b)),(c.contentType||!1!==c.contentType&&c.data&&"GET"!=c.type.toUpperCase())&&S("Content-Type",c.contentType||"application/x-www-form-urlencoded"),c.headers)for(v in c.headers)S(v,c.headers[v]);if(T.setRequestHeader=S,T.onreadystatechange=function(){if(4==T.readyState){T.onreadystatechange=d,clearTimeout(y);var t,i=!1;if(T.status>=200&&T.status<300||304==T.status||0==T.status&&"file:"==x){if(m=m||u(c.mimeType||T.getResponseHeader("content-type")),"arraybuffer"==T.responseType||"blob"==T.responseType)t=T.response;else{t=T.responseText;try{t=l(t,m,c),"script"==m?(0,eval)(t):"xml"==m?t=T.responseXML:"json"==m&&(t=F.test(t)?null:e.parseJSON(t))}catch(e){i=e}if(i)return o(i,"parsererror",T,c,f)}s(t,T,c,f)}else o(T.statusText||null,T.status?"error":"abort",T,c,f)}},!1===a(T,c))return T.abort(),o(null,"abort",T,c,f),T;var R=!("async"in c)||c.async;if(T.open(c.type,c.url,R,c.username,c.password),c.xhrFields)for(v in c.xhrFields)T[v]=c.xhrFields[v];for(v in C)$.apply(T,C[v]);return c.timeout>0&&(y=setTimeout((function(){T.onreadystatechange=d,T.abort(),o(null,"timeout",T,c,f)}),c.timeout)),T.send(c.data?c.data:null),T},e.get=function(){return e.ajax(f.apply(null,arguments))},e.post=function(){var t=f.apply(null,arguments);return t.type="POST",e.ajax(t)},e.getJSON=function(){var t=f.apply(null,arguments);return t.dataType="json",e.ajax(t)},e.fn.load=function(t,i,r){if(!this.length)return this;var n,a=this,s=t.split(/\s/),o=f(t,i,r),c=o.success;return s.length>1&&(o.url=s[0],n=s[1]),o.success=function(t){a.html(n?e("
").html(t.replace(y,"")).find(n):t),c&&c.apply(a,arguments)},e.ajax(o),this};var T=encodeURIComponent;e.param=function(t,i){var r=[];return r.add=function(t,i){e.isFunction(i)&&(i=i()),null==i&&(i=""),this.push(T(t)+"="+T(i))},m(r,t,i),r.join("&").replace(/%20/g,"+")}}(F$),function(e){e.fn.serializeArray=function(){var t,i,r=[],n=function(e){if(e.forEach)return e.forEach(n);r.push({name:t,value:e})};return this[0]&&e.each(this[0].elements,(function(r,a){i=a.type,(t=a.name)&&"fieldset"!=a.nodeName.toLowerCase()&&!a.disabled&&"submit"!=i&&"reset"!=i&&"button"!=i&&"file"!=i&&("radio"!=i&&"checkbox"!=i||a.checked)&&n(e(a).val())})),r},e.fn.serialize=function(){var e=[];return this.serializeArray().forEach((function(t){e.push(encodeURIComponent(t.name)+"="+encodeURIComponent(t.value))})),e.join("&")},e.fn.submit=function(t){if(0 in arguments)this.bind("submit",t);else if(this.length){var i=e.Event("submit");this.eq(0).trigger(i),i.isDefaultPrevented()||this.get(0).submit()}return this}}(F$),function(e){function t(e,t){var i=this.os={},r=this.browser={},n=e.match(/Web[kK]it[\/]{0,1}([\d.]+)/),a=e.match(/(Android);?[\s\/]+([\d.]+)?/),s=!!e.match(/\(Macintosh\; Intel /),o=e.match(/(iPad).*OS\s([\d_]+)/),c=e.match(/(iPod)(.*OS\s([\d_]+))?/),l=!o&&e.match(/(iPhone\sOS)\s([\d_]+)/),d=e.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),u=/Win\d{2}|Windows/.test(t),p=e.match(/Windows Phone ([\d.]+)/),h=d&&e.match(/TouchPad/),f=e.match(/Kindle\/([\d.]+)/),m=e.match(/Silk\/([\d._]+)/),g=e.match(/(BlackBerry).*Version\/([\d.]+)/),v=e.match(/(BB10).*Version\/([\d.]+)/),_=e.match(/(RIM\sTablet\sOS)\s([\d.]+)/),w=e.match(/PlayBook/),y=e.match(/Chrome\/([\d.]+)/)||e.match(/CriOS\/([\d.]+)/),b=e.match(/Firefox\/([\d.]+)/),C=e.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),S=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),x=!y&&e.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),F=x||e.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);(r.webkit=!!n)&&(r.version=n[1]),a&&(i.android=!0,i.version=a[2]),l&&!c&&(i.ios=i.iphone=!0,i.version=l[2].replace(/_/g,".")),o&&(i.ios=i.ipad=!0,i.version=o[2].replace(/_/g,".")),c&&(i.ios=i.ipod=!0,i.version=c[3]?c[3].replace(/_/g,"."):null),p&&(i.wp=!0,i.version=p[1]),d&&(i.webos=!0,i.version=d[2]),h&&(i.touchpad=!0),g&&(i.blackberry=!0,i.version=g[2]),v&&(i.bb10=!0,i.version=v[2]),_&&(i.rimtabletos=!0,i.version=_[2]),w&&(r.playbook=!0),f&&(i.kindle=!0,i.version=f[1]),m&&(r.silk=!0,r.version=m[1]),!m&&i.android&&e.match(/Kindle Fire/)&&(r.silk=!0),y&&(r.chrome=!0,r.version=y[1]),b&&(r.firefox=!0,r.version=b[1]),C&&(i.firefoxos=!0,i.version=C[1]),S&&(r.ie=!0,r.version=S[1]),F&&(s||i.ios||u)&&(r.safari=!0,i.ios||(r.version=F[1])),x&&(r.webview=!0),i.tablet=!!(o||w||a&&!e.match(/Mobile/)||b&&e.match(/Tablet/)||S&&!e.match(/Phone/)&&e.match(/Touch/)),i.phone=!(i.tablet||i.ipod||!(a||l||d||g||v||y&&e.match(/Android/)||y&&e.match(/CriOS\/([\d.]+)/)||b&&e.match(/Mobile/)||S&&e.match(/Touch/)))}t.call(e,navigator.userAgent,navigator.platform),e.__detect=t}(F$),function(e,t){function i(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()}function r(e){return n?n+e:e.toLowerCase()}var n,a,s,o,c,l,d,u,p,h,f="",m={Webkit:"webkit",Moz:"",O:"o"},g=document.createElement("div"),v=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,_={};g.style.transform===t&&e.each(m,(function(e,i){if(g.style[e+"TransitionProperty"]!==t)return f="-"+e.toLowerCase()+"-",n=i,!1})),a=f+"transform",_[s=f+"transition-property"]=_[o=f+"transition-duration"]=_[l=f+"transition-delay"]=_[c=f+"transition-timing-function"]=_[d=f+"animation-name"]=_[u=f+"animation-duration"]=_[h=f+"animation-delay"]=_[p=f+"animation-timing-function"]="",e.fx={off:n===t&&g.style.transitionProperty===t,speeds:{_default:400,fast:200,slow:600},cssPrefix:f,transitionEnd:r("TransitionEnd"),animationEnd:r("AnimationEnd")},e.fn.animate=function(i,r,n,a,s){return e.isFunction(r)&&(a=r,n=t,r=t),e.isFunction(n)&&(a=n,n=t),e.isPlainObject(r)&&(n=r.easing,a=r.complete,s=r.delay,r=r.duration),r&&(r=("number"==typeof r?r:e.fx.speeds[r]||e.fx.speeds._default)/1e3),s&&(s=parseFloat(s)/1e3),this.anim(i,r,n,a,s)},e.fn.anim=function(r,n,f,m,g){var w,y,b,C={},S="",x=this,F=e.fx.transitionEnd,k=!1;if(n===t&&(n=e.fx.speeds._default/1e3),g===t&&(g=0),e.fx.off&&(n=0),"string"==typeof r)C[d]=r,C[u]=n+"s",C[h]=g+"s",C[p]=f||"linear",F=e.fx.animationEnd;else{for(w in y=[],r)v.test(w)?S+=w+"("+r[w]+") ":(C[w]=r[w],y.push(i(w)));S&&(C[a]=S,y.push(a)),n>0&&"object"==typeof r&&(C[s]=y.join(", "),C[o]=n+"s",C[l]=g+"s",C[c]=f||"linear")}return b=function(t){if(void 0!==t){if(t.target!==t.currentTarget)return;e(t.target).unbind(F,b)}else e(this).unbind(F,b);k=!0,e(this).css(_),m&&m.call(this)},n>0&&(this.bind(F,b),setTimeout((function(){k||b.call(x)}),1e3*(n+g)+25)),this.size()&&this.get(0).clientLeft,this.css(C),n<=0&&setTimeout((function(){x.each((function(){b.call(this)}))}),0),this},g=null}(F$),function(e,t){function i(i,r,n,a,s){"function"!=typeof r||s||(s=r,r=t);var o={opacity:n};return a&&(o.scale=a,i.css(e.fx.cssPrefix+"transform-origin","0 0")),i.animate(o,r,null,s)}function r(t,r,n,s){return i(t,r,0,n,(function(){a.call(e(this)),s&&s.call(this)}))}window.document;var n=e.fn.show,a=e.fn.hide,s=e.fn.toggle;e.fn.show=function(e,r){return n.call(this),e===t?e=0:this.css("opacity",0),i(this,e,1,"1,1",r)},e.fn.hide=function(e,i){return e===t?a.call(this):r(this,e,"0,0",i)},e.fn.toggle=function(i,r){return i===t||"boolean"==typeof i?s.call(this,i):this.each((function(){var t=e(this);t["none"==t.css("display")?"show":"hide"](i,r)}))},e.fn.fadeTo=function(e,t,r){return i(this,e,t,null,r)},e.fn.fadeIn=function(e,t){var i=this.css("opacity");return i>0?this.css("opacity",0):i=1,n.call(this).fadeTo(e,i,t)},e.fn.fadeOut=function(e,t){return r(this,e,null,t)},e.fn.fadeToggle=function(t,i){return this.each((function(){var r=e(this);r[0==r.css("opacity")||"none"==r.css("display")?"fadeIn":"fadeOut"](t,i)}))}}(F$),function(e){function t(t,r){var c=t[o],l=c&&n[c];if(void 0===r)return l||i(t);if(l){if(r in l)return l[r];var d=s(r);if(d in l)return l[d]}return a.call(e(t),r)}function i(t,i,a){var c=t[o]||(t[o]=++e.uuid),l=n[c]||(n[c]=r(t));return void 0!==i&&(l[s(i)]=a),l}function r(t){var i={};return e.each(t.attributes||c,(function(t,r){0==r.name.indexOf("data-")&&(i[s(r.name.replace("data-",""))]=e.zepto.deserializeValue(r.value))})),i}var n={},a=e.fn.data,s=e.camelCase,o=e.expando="Zepto"+ +new Date,c=[];e.fn.data=function(r,n){return void 0===n?e.isPlainObject(r)?this.each((function(t,n){e.each(r,(function(e,t){i(n,e,t)}))})):0 in this?t(this[0],r):void 0:this.each((function(){i(this,r,n)}))},e.data=function(t,i,r){return e(t).data(i,r)},e.hasData=function(t){var i=t[o],r=i&&n[i];return!!r&&!e.isEmptyObject(r)},e.fn.removeData=function(t){return"string"==typeof t&&(t=t.split(/\s+/)),this.each((function(){var i=this[o],r=i&&n[i];r&&e.each(t||r,(function(e){delete r[t?s(this):e]}))}))},["remove","empty"].forEach((function(t){var i=e.fn[t];e.fn[t]=function(){var e=this.find("*");return"remove"===t&&(e=e.add(this)),e.removeData(),i.call(this)}})) }(F$),function(e){function t(t){return!(!(t=e(t)).width()&&!t.height())&&"none"!==t.css("display")}function i(e,t){e=e.replace(/=#\]/g,'="#"]');var i,r,n=o.exec(e);if(n&&n[2]in s&&(i=s[n[2]],r=n[3],e=n[1],r)){var a=Number(r);r=isNaN(a)?r.replace(/^["']|["']$/g,""):a}return t(e,i,r)}var r=e.zepto,n=r.qsa,a=r.matches,s=e.expr[":"]={visible:function(){if(t(this))return this},hidden:function(){if(!t(this))return this},selected:function(){if(this.selected)return this},checked:function(){if(this.checked)return this},parent:function(){return this.parentNode},first:function(e){if(0===e)return this},last:function(e,t){if(e===t.length-1)return this},eq:function(e,t,i){if(e===i)return this},contains:function(t,i,r){if(e(this).text().indexOf(r)>-1)return this},has:function(e,t,i){if(r.qsa(this,i).length)return this},input(){if(-1!==["input","textarea","select"].indexOf(this.tagName.toLowerCase()))return this}},o=new RegExp("(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*"),c=/^\s*>/,l="Zepto"+ +new Date;r.qsa=function(t,a){return i(a,(function(i,s,o){try{var d;!i&&s?i="*":c.test(i)&&(d=e(t).addClass(l),i="."+l+" "+i);var u=n(t,i)}catch(e){throw console.error("error performing selector: %o",a),e}finally{d&&d.removeClass(l)}return s?r.uniq(e.map(u,(function(e,t){return s.call(e,t,u,o)}))):u}))},r.matches=function(e,t){return i(t,(function(t,i,r){return(!t||a(e,t))&&(!i||i.call(e,null,r)===e)}))}}(F$),window.Fera=window.Fera||{},window.BananaStand=window.BananaStand||window.Fera,Fera.App=function(opts){this.version="2.7.15.21";var self=this,containers,config,api,currProductId,customerId,visitorId,platformAdapter,section,containerAutoUpdateTimer,contentUpdatesStarted=!1,isViewingProductPage=!1,pushedViewEvent=!1,showedDevGreeting=!1,pushMethodReady=!1,currProduct,compiledCss="",variantId;opts=opts||{};var updateRequestInProgress=!1,eventListeners={},init=function(){opts.app=self,self.parentWindow=opts.parentWindow,Fera.Util.checkLocalStorageEnabled()?messageStatusToParent("fera_starting"):messageStatusToParent("storage_unsupported"),self.cookieJar=opts.cookieJar=new Fera.CookieJar,self.localStorage=opts.localStorage=new Fera.LocalStorageJar(opts),self.opts=opts.optionsParser=new Fera.OptionsParser(opts),parseModes(),self.logger=Fera.logger=opts.logger=new Fera.Logger(opts),self.timeTracker=opts.timeTracker=new Fera.TimeTracker(opts),self.engagementTracker=opts.engagementTracker=new Fera.EngagementRegistry(opts),self.abTests=new Fera.AbTests.Manager(opts),opts.optionsParser.hasUrlFlag("clear_cache")&&self.clearCache(),Fera.Util.ie()&&opts.logger.warn("Fera.ai is not optimized for Microsoft Internet Explorer. You should really update to a more modern browser!"),opts.logger.log("~~ Loaded app.js version "+self.version+" ~~"),self.geo=opts.geo=new Fera.Geo(opts),self.inactivityDetector=opts.inactivityDetector=new Fera.InactivityDetector({logger:opts.logger}),self.deepLinker=new Fera.DeepLinker(opts),self.deepLinker.attachAndWatch(),self.geo.getLocationInfo((function(e){opts.shopperLocation=e,delete opts.shopperLocation.ip,loadSupportModules();var t=opts.sandboxMode?Fera.Preview_Api:Fera.Api;api=new t(opts),self.api=opts.api=api,F$("[data-fera-container][data-app-instance],[data-fera-container][data-app-instance-id]").each(((e,t)=>{this._appInstanceId||(this._appInstanceId=t.getAttribute("data-app-instance")||t.getAttribute("data-app-instance-id"),self.configure({app_instance_id:this._appInstanceId}))})),loadPushBuffer({only:"configure"}),ensureVisitorId(),opts.visitorId=visitorId,ensureBodyContainersPresent(),loadPushBuffer({only:"loadPlatformAdapter"}),abortLoading()?loadAdmin(!1):(self.i18n=Fera.i18n=new Fera.I18n(opts),self.t=(e,t=null)=>self.i18n.t(e,t),Fera.t=function(e,t=null){return Fera.i18n.t(e,t)},Fera.isSupportedLanguage=function(e){return Fera.i18n.isSupportedLanguage(e)},Fera.Liquid.Template.registerFilter({t:(e,t=null)=>self.t(e,t)}),loadPushBuffer({only:"setLocale"}),loadPushBuffer({only:"setDefaultLocale"}),self.cart=new Fera.Cart(opts),platformAdapter&&platformAdapter.cartAdapter&&(self.cart.setAdapter(platformAdapter.cartAdapter),self.trigger("cart.ready")),api.checkConfig(!1)?(self.verifier=new Fera.Verifier(opts),loadContainers(),loadPushBuffer({except:["loadPlatformAdapter","configure","setLocale","setDefaultLocale"]}),api.waitForApiConfig((function(){api.checkConfig()?(self.clickTracker=opts.clickTracker=new Fera.ClickRegistry(opts),contentUpdatesStarted||waitForSupportModules((function(){setTimeout(startServerUpdating,1)})),self.isReady=!0,self.trigger("init ready"),loadAdmin(!0)):loadAdmin(!1)}))):loadAdmin(!1))}),!0)},abortLoading=function(){if(window.location.pathname&&(0===window.location.pathname.indexOf("/password")||!self.api.validConfig()&&"undefined"!=typeof Shopify&&Shopify.Checkout&&Shopify.Checkout.isOrderStatusPage))return Fera.logger.log("Intentionally aborted loading, likely due to a missing API key on the page."),self.aborted=!0,!0;return self.opts.sandboxMode&&self.opts.sandboxError},loadAdmin=function(e){if(opts.adminMode){if((e=void 0===e||e)||opts.api.configure({api_url:decodeURIComponent(opts.cookieJar.getCookie("Fera.Admin.BaseApiUrl")),store_pk:opts.cookieJar.getCookie("Fera.Admin.Store.PublicKey")}),void 0!==Fera.AdminPanel)return setupAdmin(e);var t="";-1!==opts.api.baseAppPath.indexOf("app.")?t+=opts.api.baseAppPath.replace("app.","cdn.")+"/js/fera.admin.js?v="+self.version:t=-1!==opts.api.baseAppPath.indexOf("ngrok.")||-1!==opts.api.baseAppPath.indexOf("localhost")||-1!==opts.api.baseAppPath.indexOf("test-")||-1!==opts.api.baseAppPath.indexOf("127.0.0.1")?opts.api.baseAppPath+"/assets/public/fera.admin.js?v="+self.version:"https://cdn.fera.ai/js/fera.admin.js?v="+self.version;var i=opts.debugMode?1:900;new FeraCachedAsset({name:"Fera.Admin.Js",url:t,expiresIn:i}).load((function(){setupAdmin(e)}))}},setupAdmin=function(e){try{opts.sandboxMode&&(messageStatusToParent("fera_admin_starting"),opts.app.previewer=opts.previewer=new Fera.AdminPreviewer(opts,e),self.parentWindow!==window.opener&&null!=self.parentWindow||(opts.adminPanel=new Fera.AdminPanel(opts),opts.adminPanel.managePreviewMode()));var t=opts.optionsParser.parseCheckIntegration();t&&new Fera.AdminIntegrationChecker(opts).check(t)}catch(e){if(opts.debugMode)throw e}},messageStatusToParent=function(e){try{let t=opts.api&&opts.api.baseAppPath?opts.api.baseAppPath:"*";t=t.replace(/\/$/,""),opts.parentWindow&&opts.parentWindow.postMessage(JSON.stringify({methodName:"sandbox_previewer.status.update",params:{status:e}}),t)}catch(e){}};self.push=function(e,t){if(pushMethodReady){if(opts.debugMode)return _push(e,t);try{return _push(e,t)}catch(e){window.console&&!Fera.Util.ie()&&window.console.error(e)}}else opts.pushBuffer=opts.pushBuffer||[],opts.pushBuffer.push(e),void 0!==t&&opts.pushBuffer.push(t)},self.setSection=function(e){return section=e,self},self.getSection=function(){return section},self.dispatchEvent=function(e,t,i){i=i||function(){},containers.dispatchEvent(e,t,i)},self.loadPlatformAdapter=function(code,params){if(platformAdapter)return platformAdapter;const _opts=opts||{};if(_opts.params=params,_opts.addToCartCallback=self.pushAddToCartEvent,-1!==opts.supportedPlatforms.indexOf(code)){const adapterKlassName=`Fera.${Fera.Util.capitalizeFirstLetter(code)}Adapter`;let adapterKlass;try{adapterKlass=eval(adapterKlassName)}catch(e){return void(adapterKlass=null)}if(!adapterKlass)return void Fera.logger.log(`Adapter class ${adapterKlassName} not loaded.`);platformAdapter=new adapterKlass(_opts)}else{if("function"!=typeof code)return opts.logger.logWarning("Unknown platform code supplied: '"+code+"'. Valid codes are: "+opts.supportedPlatforms.join(",")),self.loadPlatformAdapter("custom",params);platformAdapter=code(_opts)}},self.setProduct=function(e){var t=currProduct;return void 0!==(currProduct=e).id&&self.setProductId(currProduct.id),isViewingProductPage=!0,t&&t!=currProduct&&(self.trigger("product.change",{old:t,new:currProduct}),self.refreshContent()),!t&&currProduct&&self.trigger("product.set"),self},self.setProductId=function(e){e&&e.trim&&(e=e.trim());var t=currProductId;return isViewingProductPage=!0,t!=(currProductId=e)&&(contentUpdatesStarted&&self.trigger("product.change",{old:{id:t},new:{id:currProductId}}),self.getVariantId()&&t&&self.setVariantId(null,!1)),!t&&currProductId&&self.trigger("product.set"),self},self.getProductId=function(){if(currProductId)return currProductId;if(currProduct){if(currProduct.id)return currProduct.id;if("function"==typeof currProduct.getId)return currProduct.getId()}return currProductId},self.getProduct=function(){return currProduct},self.setVariantId=function(e){var t=variantId;return variantId=e,t&&t!==variantId&&self.trigger("variant.change",{old:{id:t},new:{id:variantId}}),self},self.setDesignMode=function(e){return self.opts.designMode=!!e,e&&Fera.logger.log("Design mode activated."),this},self.setAdminMode=function(e){return self.opts.adminMode=!!e,e&&Fera.logger.log("Admin mode activated."),this},self.isDesignMode=function(){return!!self.opts.designMode},self.showContentSubmission=function(e){return getContentSubmitter().show(e)},self.showContentSubmitter=self.showContentSubmission,self.showContentSubmit=self.showContentSubmission,self.showSubmissionModal=self.showContentSubmission,self.writeReview=self.showContentSubmission,self.editReview=function(e){return e.edit=!0,getContentSubmitter().show(e)},self.getVariantId=function(){return variantId},self.setCart=function(e){return self.cart.loadCartData(e),self},self.setShopper=function(e){if(Fera.Util.sizeOfParams(e)>1024)opts.logger.error("Error: parameter size is larger than 1024 bytes");else{var t=getShopperAttributes();opts.cookieJar.setCookieObject(shopperAttributesKey(),F$.extend(t,e),1)}};var getShopperAttributes=function(){return opts.cookieJar.getCookieObject(shopperAttributesKey())},shopperAttributesKey=function(){return"Fera.App.currentShopper"};self.getVisitorId=function(){return visitorId},self.getShopperId=self.getVisitorId,self.pushOrder=function(e,t){var i;void 0!==e.data?i=e:(i={type:"order_create"},void 0!==e.order?i.data=e:i.data={order:e}),i.data.ab_tests=self.ab_tests,api.pushEvent(i,t)},self.pushConversion=self.pushOrderEvent=self.pushConversionEvent=self.pushOrder,self.setCustomerId=function(e){return customerId=e,self},self.setCustomer=function(e){self._customerData=e},self.getCustomerId=function(){return customerId},self.configure=function(e){config=F$.extend(config||{},e),api.configure(config)},self.pushAddToCartEvent=function(e){var t={type:"product_add_to_cart"};e&&(e.data?t.data=e.data:t.data=e),self.trigger("cart.add",e),self.pushEvent(t)},self.addProductToCart=function(e,t){platformAdapter&&"function"==typeof platformAdapter.addProductToCart&&platformAdapter.addProductToCart(e,t)},self.triggerWidget=function(e,t){containers.triggerSkill(e,t)},self.triggerSkill=self.triggerWidget,self.trigger=function(e,t){e=e.split(" ");for(var i=0;i0&&(r.contexts=JSON.stringify(a));var s={};Object.keys(a).forEach((e=>{const t=$(`[data-fera-context="${e}"]`);if(!(t.length<1)){var i=t.data("settings");i&&(s[e]={settings:i})}})),Object.keys(s).length>0&&(r.transient_settings=JSON.stringify(s)),self.getState((function(n){if(r.state=n,r.content_requests=void 0===i?containers.getContentRequest({defaultProductId:currProductId}):i,r.content_requests.length<1&&!e)return t();if(r.content_requests_json=JSON.stringify(r.content_requests),delete r.content_requests,updateRequestInProgress=!0,!opts.sandboxMode){var a=getShopperAttributes();a&&(r.shopper_attributes=a),loadCompiledCssFromCache(),!self.storeSettings&&self.localStorage.getObject("storeSettings")&&(self.storeSettings=self.localStorage.getObject("storeSettings",{}),setTranslationSettings(),containers.updateContentFromCache())}api.getContent(r,(function(e){e&&(updateRequestInProgress=!1,Fera.Util.isSpeedMode()?opts.inactivityDetector.afterFirstInteraction((function(){callBackFromGetContent(e,t)}),2e4):callBackFromGetContent(e,t))}),(function(){updateRequestInProgress=!1}))}))};var pushLegacyViewEvent=function(){if(opts.sandboxMode)return!1;if(pushedViewEvent)return!1;pushedViewEvent=!0;var e=()=>{const e={type:"page_view"};isViewingProductPage&&(e.associated_to="product"),self.pushEvent(e)};if(self.storeSettings&&self.storeSettings.when_to_send_events){var t=self.storeSettings.when_to_send_events.page_view;self.getProductId()&&(t=self.storeSettings.when_to_send_events.product_view),null==t&&(t=0),t>=0&&opts.inactivityDetector.afterFirstInteraction((function(){setTimeout(e,1e3*t+1)}),1e3*t+1)}else e();return!0},callBackFromGetContent=function(e,t){self.displayDevGreeting(),updateCompiledCssFromServer(e),e.store&&(self.storeSettings=e.store,setTranslationSettings(),opts.sandboxMode||self.localStorage.setObject("storeSettings",self.storeSettings)),!e.section||self.getSection()&&"other"!==self.getSection()||self.setSection(e.section),self.abTests.updateBuckets(e.ab_tests),containers.updateContent(e,currProductId,t),pushLegacyViewEvent(),self.clickTracker.register(),setTimeout((function(){self.trigger("load widgets.show"),self.loaded=!0}),1)};self.clearCache=function(){new Fera.LocalStorageJar({namespace:"Fera.AssetCache"}).clear(),new Fera.LocalStorageJar({namespace:"BananaStand.AssetCache"}).clear(),new Fera.LocalStorageJar({namespace:"Fera.Cache"}).clear(),document.querySelectorAll('[href*="/fera.css"],[src*="/fera.js"],[src*="/bananastand.js"],[src*="/fera.standalone.js"]').forEach((e=>{const t=e.href||e.src;fetch(t,{cache:"reload"})})),Fera.logger.log("CLEARED Fera cache.")};var loadContentRequestContexts=function(){var e={},t=[];$("[data-fera-container]").each((function(){var i,r=$(this),n=r.data("fera-container"),a=r.data("product-id")||r.data("productId")||r.data("product_id");if(a||"string"!=typeof r.data("product")||r.data("product").match(/^{/)||(a=r.data("product")),a&&a.toString&&a.toString().match(/{{\s*product\.id\s*}}/)){if(Fera.logger.warn("TAG NOT SETUP PROPERLY (product ID not rendered). Please contact our support team for help.",r),!self.getProductId())return;a=self.getProductId(),r.data("product-id",a)}if(a&&a.trim&&(a=a.trim()),"string"==typeof n&&n.match(/^[a-z_]+$/i)){var s=r.data("block-id")||r.data("block_id")||r.data("block"),o=r.data("editor-id")||r.data("editor_id")||r.data("editor");s||(s=Fera.Util.generateUUID()),o&&-1===s.indexOf("#")&&(s=`${o}#${s}`),r.attr("data-block-id")||r.attr("data-block-id",s),r.attr("data-block")&&r.prop("data-block",!1),r.attr("data-block_id")&&r.prop("data-block_id",!1),r.attr("data-editor-id")||r.attr("data-editor-id",o),r.attr("data-editor")&&r.prop("data-editor",!1),r.attr("data-editor_id")&&r.prop("data-editor_id",!1),i=s?`${n}.${s}`:n,r.attr("data-fera-context",i)}else{if(!a)return;i=n}e[i]=e[i]||[],a&&e[i].push(a),-1===t.indexOf(i)&&t.push(i)})),$(".banana-list-container").each((function(){var t=$(this),i=t.data("product-id")||t.data("productId")||t.data("product_id");i&&(e.list=e.list||[],e.list.push(i))})),$("[data-fera-context]").each((function(){e.list=e.list||[];var t=$(this).data("product-id");t&&e.list.push(t)}));for(var i=0;i0||$("body").append('')},ensureBodyContainersPresent=function(){setInterval(addBodyContainers,10),addBodyContainers()},updateCompiledCssFromServer=function(e){if(e&&e.content_responses){var t=e.compiled_css;t&&(compiledCss.replace(/\s/gi,"").indexOf(t.replace(/\s/gi,""))&&(compiledCss=self.opts.testMode||self.opts.previewMode?t:(compiledCss+" "+t).trim(),updateCompiledCss(compiledCss)),saveCompiledCssToCache(compiledCss))}},saveCompiledCssToCache=function(e){self.localStorage.setItem("Cache.CompiledCss",e,36e5)},loadCompiledCssFromCache=function(){if(self._madeFirstRequest)return!1;if(self.opts.testMode||self.opts.adminMode||self.opts.previewMode)return!1;var e=self.localStorage.getItem("Cache.CompiledCss","");return!!e&&(updateCompiledCss(e),!0)},updateCompiledCss=function(e){var t=$("#feraCompiledCss");t.length<1&&(t=$(''),$("body").append(t)),t.html("")},startServerUpdating=function(e){opts.logger.log("Starting server update timer..."),e=e||function(){},contentUpdatesStarted?opts.logger.log("startServerUpdating was already called, so returning..."):(startCheckIns(),containers.startWatchingForChanges(),contentUpdatesStarted=!0,self.updateContainers(!pushedViewEvent,e),self._madeFirstRequest=!0,self.on("cart.changed",(function(){self.markAllContainersAsDirty()})))},startCheckIns=function(){var e=config.page_view_check_interval||3e5,t=e;if(Fera.Util.isSpeedMode())return!1;setInterval((function(){(t-=1e3)<=0&&opts.inactivityDetector.isActive()&&(isViewingProductPage&&currProductId&&self.checkIn(),t=e)}),1e3)},parseModes=function(){self.opts.debugMode=opts.debugMode=opts.optionsParser.parseDebugMode(),self.opts.testMode=opts.testMode=opts.optionsParser.parseTestMode(),self.opts.adminMode=opts.adminMode=opts.optionsParser.parseAdminMode(),self.opts.sandboxMode=opts.sandboxMode=opts.optionsParser.parseSandboxMode(),self.opts.showErrors=opts.showErrors=self.opts.debugMode||opts.optionsParser.parseShowErrors(),F$('[data-fera-container][data-design-mode="true"]').length>0&&(self.opts.designMode=!0),(self.opts.adminMode||self.opts.testMode||self.opts.debugMode||self.opts.sandboxMode||self.opts.designMode||self.opts.feraParams&&self.opts.feraParams.quiet)&&(Fera.Util.setIsBot(!1),Fera.Util.setIsSpeedMode(!1))},loadContainers=function(){(containers=new Fera.ContainerCollection(opts)).updateContainers=self.updateContainers,containers.getContext=loadContentRequestContexts,opts.contentUpdater=containers,opts.containers=containers},loadPushBuffer=function(e){var t=void 0!==(e=e||{}).except&&e.except,i=void 0!==e.only&&e.only;if(opts.pushBuffer=opts.pushBuffer||[],pushMethodReady=!0,"object"==typeof opts.pushBuffer&&opts.pushBuffer.length&&opts.pushBuffer.length>0)for(var r=!1,n=0;n1&&(e="zh"==t[0]?"zh-TW":t[0]),self.locale=e,self.i18n&&(self.i18n.locale=e)},self.setDefaultLocale=function(e){self.locale!==e&&self.i18n&&self.i18n.setDefaultLocale(e)},self.getLocaleWithFallback=function(){return self.i18n?self.i18n.localeWithFallback:self.locale},self.isUsingDefaultLocale=function(){return!self.i18n||self.i18n.usingDefaultLocale},init()},Fera.Api=class{constructor(e){this._opts=e||{},this._$=Fera.Util.$(),this._config={},this._app=this._opts.app,this._pageLoaded=!1,this._apiClientDescriptor="fera.js-"+this._opts.app.version,this._DEFAULT_BASE_URL="https://app.fera.ai",this._$(document).ready((()=>this._pageLoaded=!0)),this._requestCache={}}configure(e){this._config=this._$.extend(this._config||{},e);var t=this._opts.cookieJar.getCookie("Fera.Api.ServerNum",Math.random()<.5?1:2);this._opts.cookieJar.setCookie("Fera.Api.ServerNum",t,30);var i=`api${t&&t>1?t:""}.`;(!this._config.api_url||this._config.api_url.length<=0)&&(this._config.api_url=this._DEFAULT_BASE_URL.replace("//app.","//"+i)),this._config.api_url=this._config.api_url.replace(/\/v\d/,""),"/"!==this._config.api_url[this._config.api_url.length-1]&&(this._config.api_url=this._config.api_url+"/"),this.baseApiUrl=this._config.api_url,this.baseApiUrl=Fera.Util.htmlDecode(this.baseApiUrl),this.baseLegacyApiUrl=this.baseApiUrl.replace(/\/\/api[1-9]?\./,"//api0."),this.baseAppPath=this._config.app_url||this.baseApiUrl.replace(/^(https?:\/\/.*)\/api(\/v[0-9])?/i,"$1").replace(/(https?:\/\/)api[0-9]?\./i,"$1app.").replace(/\/$/,""),this._isBot=Fera.Util.isBot()&&this.baseApiUrl.match(/\.fera\.ai/i)&&!this.baseApiUrl.match(/staging|test/i)}get _shopperDisabled(){return this._isBot||Fera.Util.isSpeedMode()||this._app.isDesignMode()}checkConfig(e=!0){return!!this.validConfig()||(e&&this._opts.logger.error("Missing Fera API key. This usually means the footer script is missing (usually because your store theme was changed by someone or something).\nTry navigating to "+this._DEFAULT_BASE_URL+"/installation?reinstall=1 to fix this or contact our support team for help."),!1)}waitForApiConfig(e){var t,i=1e4,r=0,n=1,a=()=>this.validConfig()?(t&&clearInterval(t),e(),!0):((r+=n)===i&&this._opts.logger.warn("Waited more than "+i/1e3+" seconds for Fera api credentials and still don't have them. Please contact our support team for help if this is unexpected."),!1);a()||(t=setInterval(a,n))}validConfig(){return this._config&&(this._config.store_pk||this._config.app_instance_id)}checkIn(e,t={}){var i=void 0===t.callback?()=>{}:t.callback;if(this._shopperDisabled)return i&&i();var r=JSON.parse(JSON.stringify(e));r.id=this._opts.visitorId,e.productId&&(r.product_id=e.productId,delete r.productId),e.customerId&&(r.customer_id=e.customerId,delete r.customerId),this._opts.testMode?this._opts.logger.warn("[TEST MODE] Not checking in because test mode is enabled, but the rest of the JS will think we did..",r):this._performImageRequest("v2/public/check.gif",r,i,this.baseLegacyApiUrl)}mergeShoppers(e,t){return!this._shopperDisabled&&this._$.ajax({method:"POST",type:"POST",data:{},headers:{"API-CLIENT":this._apiClientDescriptor},dataType:"html",url:this._url("v2/public/shoppers/"+e+"/merge",{other_id:t},this.baseLegacyApiUrl)})}pushEvent(e,t={}){var i=t.callback||t.then||(()=>{});if(this._shopperDisabled)return i&&i();"view"===e.type&&(void 0!==e.state.product_id&&(e.associated_to="product"),e.state=e.state||{},e.state.event_history=this._trackAndReturnHistory(e)),this._opts.testMode?this._opts.logger.warn("[TEST MODE] Not pushing event to the api because test mode is enabled, but the rest of the JS will think we did.",e):("object"==typeof e.state&&(e.state_json=JSON.stringify(e.state),delete e.state),"object"==typeof e.data&&(e.data_json=JSON.stringify(e.data),delete e.data),this._pageLoaded?this._sendEventData(e,i):this._$(document).ready((()=>this._sendEventData(e,i))))}getFeeds(e,t,i){this._opts.testMode?(e.test_mode=this._opts.testMode, this._cachedTestFeedResponse?t(this._cachedTestFeed(e.types)):this._request("GET",this._url("v2/public/feeds.json",e,this.baseLegacyApiUrl),(i=>{this._cachedTestFeedResponse=i,t(this._cachedTestFeed(e.types))}),i)):this._request("GET",this._url("v2/public/feeds.json",e,this.baseLegacyApiUrl),t,i)}_cachedTestFeed(e){for(var t=[],i=0;i{let i;return e.meta&&(i=e.meta.total_count),i=i||0,t&&t(e.data,i)}))}getProductRating(e,t){if(!e)return t&&t([],0);this._request("GET",this._v3_url("products/"+e+"/rating.json"),(e=>t&&t(e)))}getStoreRating(e){this._request("GET",this._v3_url("store_rating.json"),(t=>e&&e(t)),e)}getRating(e,t){if("function"==typeof e)return this.getStoreRating(e);if("string"!=typeof e&&"number"!=typeof e||"function"!=typeof t)throw new TypeError("getRating requires either a product ID and callback, or just a callback");return this.getProductRating(e,t)}getReviewsV3(e,t){this._request("GET",this._v3_url("reviews.json",e),(e=>{let i;return e.meta&&(i=e.meta.total_count),i=i||0,t&&t(e.data,i)}))}getMediaV3(e,t){this._request("GET",this._v3_url("media.json",e),(e=>{let i;return e.meta&&(i=e.meta.total_count),i=i||0,t&&t(e.data,i)}))}getReviews(e,t,i){if(this._useSampleData){e.test_mode=this._useSampleData,e.page=e.page||1,e.limit=e.limit||5,e.samples=this._useSampleData;var r=JSON.stringify(e);const n=this._app.storeSettings.cache_data.last_updated.customer_review||"0";if(this._requestCache.customer_reviews=this._requestCache.customer_reviews||{},this._requestCache.customer_reviews[n]=this._requestCache.customer_reviews[n]||{},this._requestCache.customer_reviews[n]&&this._requestCache.customer_reviews[n][r]){if(void 0===this._requestCache.customer_reviews[n][r].result)return this._requestCache.customer_reviews[n][r].onSuccess.push((e=>t(e.result,e.count)));{const e=this._requestCache.customer_reviews[n][r];return t(e.result,e.count)}}this._requestCache.customer_reviews[n][r]={result:void 0,onSuccess:[e=>t(e.result,e.count)],onError:[e=>i&&i(e.result,e.count)],count:null},this._request("GET",this._url("v2/public/reviews.json",e),((e,t,i)=>{this._requestCache.customer_reviews[n][r].result=e,this._requestCache.customer_reviews[n][r].count=this.cachedTestReviewTotalCount=parseInt(i.getResponseHeader("Total-Count"))||0,this._requestCache.customer_reviews[n][r].onSuccess.forEach((e=>e(this._requestCache.customer_reviews[n][r]))),this._requestCache.customer_reviews[n][r].onSuccess=[]}),(e=>{this._requestCache.customer_reviews[n][r].onError.forEach((t=>t(e))),delete this._requestCache.customer_reviews[n][r]}))}else this._request("GET",this._url("v2/public/reviews.json",e),((e,i,r)=>{var n=parseInt(r.getResponseHeader("Total-Count"))||0;return t&&t(e,n)}),i)}getPhotos(e,t,i){const r=this._app.storeSettings.cache_data.last_updated.customer_photo||"0";if(this._requestCache.customer_photos=this._requestCache.customer_photos||{},this._requestCache.customer_photos[r]=this._requestCache.customer_photos[r]||{},this._requestCache.customer_photos[r][e]){const i=this._requestCache.customer_photos[r][e];return t(i.result,i.totalCount)}this._request("GET",this._url("v2/public/photos.json",e),((i,n,a)=>{var s=parseInt(a.getResponseHeader("Total-Count"))||0;return this._requestCache.customer_photos[r][e]={totalCount:s,result:i},t&&t(i,s)}),i)}getCustomerMedia(e,t,i){var r=t=>e.only_photos?t.filter((function(e){return"photo"===e.type})):e.only_videos?t.filter((function(e){return"video"===e.type})):t;if(e.media_ids&&e.media_ids.length>0&&(e.media_ids=e.media_ids.filter((e=>!!e))),this._useSampleData){e.test_mode=this._useSampleData,e.page=e.page||1,e.limit=e.limit||0,e.samples=this._useSampleData;var n=(e.page||e.offset)+"x"+e.limit;if(this._cachedTestCustomerMediaResponse&&this._cachedTestCustomerMediaResponse[n]&&!e.media_ids)return t(r(this._cachedTestCustomerMediaResponse[n]),this._cachedTestCustomerMediaTotalCount[n]);this._request("GET",this._url("v2/public/customer_media.json",e),((i,a,s)=>{var o=parseInt(s.getResponseHeader("Total-Count"))||0;if(e.media_ids)return t(i,o);this._cachedTestCustomerMediaResponse=this._cachedTestCustomerMediaResponse||{},this._cachedTestCustomerMediaTotalCount=this._cachedTestCustomerMediaTotalCount||{},this._cachedTestCustomerMediaResponse[n]=i,this._cachedTestCustomerMediaTotalCount[n]=o,t(r(this._cachedTestCustomerMediaResponse[n]),this._cachedTestCustomerMediaTotalCount[n])}),i)}else{let r=this._app.storeSettings.cache_data.last_updated.customer_photo||"0";r+=this._app.storeSettings.cache_data.last_updated.customer_video||"0",this._requestCache.customer_media=this._requestCache.customer_media||{},this._requestCache.customer_media[r]=this._requestCache.customer_media[r]||{};const n=e.cache_key+(e.page||e.offset)+"x"+e.limit;if(delete e.cache_key,this._requestCache.customer_media[r][n]){const e=this._requestCache.customer_media[r][n];return t(e.result,e.totalCount)}this._request("GET",this._url("v2/public/customer_media.json",e),((e,i,a)=>{var s=parseInt(a.getResponseHeader("Total-Count"))||0;return this._requestCache.customer_media[r][n]={totalCount:s,result:e},t&&t(e,s)}),i)}}getContent(e,t,i){if(t=t||(()=>{}),e.visitor_id=this._opts.visitorId,e.api_client=encodeURIComponent(this._apiClientDescriptor),e.state=e.state||{},e.push_view_event){var r=this._$.extend(e,{type:"view"});e.state.event_history=this._trackAndReturnHistory(r)}e.test_mode=this._opts.testMode||this._useSampleData,e.testMode||delete e.testMode,this._opts.optionsParser.hasPreviewFilterById()&&(e.fera_preview=this._opts.optionsParser.getPreviewId());var n=this._url("v2/public/content.json");e.state_json=JSON.stringify(e.state),delete e.state;var a=Fera.Util.sizeOfParams(e)>Fera.Util.maxGetRequestChars()?"POST":"GET";return this._$.ajax({method:a,type:a,data:e,url:n,success:(e,i,r)=>{r.getResponseHeader("api-client-outdated")&&this._opts.app.clearCache(),this.requestFailCount=0,t(e,i,r)},error:e=>{this.requestFailCount+=1,i&&i(e)}})}getSection(e,t){const i={visitor_id:this._opts.visitorId,api_client:encodeURIComponent(this._apiClientDescriptor),test_mode:this._opts.testMode};return this._$.ajax({method:"GET",type:"GET",data:i,url:this._url("v2/public/section.json"),success:(t,i,r)=>{r.getResponseHeader("api-client-outdated")&&this._opts.app.clearCache(),e(t.section,i,r)},error:e=>{t&&t(e)}})}getProducts(e,t,i){this._requestCache.getProducts=this._requestCache.getProducts||{};const r=JSON.stringify(e);this._requestCache.getProducts[r]=this._requestCache.getProducts[r]||{successCallbacks:[],errorCallbacks:[]};const n=this._requestCache.getProducts[r];if(n.response){if(!0===n.response.success)return t(n.response.data);if(!1===n.response.success)return i(n.response.data)}this._requestCache.getProducts[r].successCallbacks.push(t),this._requestCache.getProducts[r].errorCallbacks.push(i),this._requestCache.getProducts[r].called||(this._requestCache.getProducts[r].called=!0,this._request("GET",this._url("v2/public/products.json",e),(e=>{this._requestCache.getProducts[r].response={data:e,success:!0},this._requestCache.getProducts[r].successCallbacks.forEach((t=>t(e)))}),(e=>{this._requestCache.getProducts[r].response={data:e,success:!1},this._requestCache.getProducts[r].errorCallbacks.forEach((t=>t(e)))})))}contentSubmission(e,t=""){this._$.ajax({url:this._url("v2/public/content_submissions"+t,e.params),method:"POST",type:"POST",data:e.data,contentType:!1,processData:!1,success:e.success,error:e.error})}requestContentSubmissionTemplate(e){const t=this._$.extend({visitor_id:this._opts.app.getVisitorId(),language:this._opts.app.locale},e.params);var i=this._url("v2/public/content_submissions/template",t);this._request("GET",i,e.success,e.error)}triggerActions(e={},t={}){this._opts.app.getState((i=>((e=this._$.extend({},i,e)).visitor_id=this._opts.visitorId,this._opts.testMode&&(e.test_mode=this._opts.testMode),this._opts.optionsParser.hasPreviewFilterById()&&(e.fera_preview=this._opts.optionsParser.getPreviewId()),this._$.ajax({method:"POST",type:"POST",data:e,url:this._url("v2/public/shoppers/"+this._opts.visitorId+"/trigger_skill_actions",{},this.baseLegacyApiUrl),success:(e,i,r)=>{this.requestFailCount=0,t.success&&t.success&&t.success(e,i,r)},error:e=>{this.requestFailCount+=1,t.error&&t.error&&t.error(e)}}))))}getShopper(e,t){return this._request("GET",this._url("v2/public/shoppers/"+e,{},this.baseLegacyApiUrl),t,t)}deleteShopper(e,t){return this._request("DELETE",this._url("v2/public/shoppers/"+e,{},this.baseLegacyApiUrl),t,t)}_v3_url(e,t={},i=this.baseApiUrl){return i+="v3/public/",this._url(e,t,i)}_url(e,t={},i=this.baseApiUrl){return this._config.store_pk&&(t.public_key=this._config.store_pk),this._config.app_instance_id&&(t.app_instance_id=this._config.app_instance_id),this._opts.adminMode&&(t.adminSessionToken&&(t.admin_session_token=this._opts.adminSessionToken),t.admin=this._opts.adminMode),this._opts.debugMode&&(t.debug_mode=!0),this._opts.app.visitorManager.isNew&&(t.first=!0),(this._opts.app.opts.hasUrlFlag("cache")||this._opts.app.opts.hasUrlFlagOff("cache"))&&(t.cache=this._opts.app.opts.hasUrlFlag("cache")),e=e||"",-1===i.indexOf("public/")&&-1===e.indexOf("public/")&&(i+="public/"),i.match(/\/v\d/)&&e.match(/v\d/)&&(i=i.replace(/\/v\d/,""),opts.logger.logWarning("Removed version number from API URL because it was already in the URI.")),i+e+"?"+this._$.param(t)}_trackAndReturnHistory(e){var t=this._opts.localStorage.getObject("EventHistory",{}),i=(new Date).getTime(),r=e.associated_to||(void 0!==e.state.product_id?"product":"any"),n="any"===r?"any":r+"-"+e.state.product_id;return t[e.type]=t[e.type]||{},t[e.type][n]=t[e.type][n]||[],t[e.type][n].push(i/1e3),t[e.type][n].length>2&&t[e.type][n].splice(1,1),this._opts.localStorage.setObject("EventHistory",t),t[e.type][n]}_performImageRequest(e,t,i,r=this.baseApiUrl){const n=document.createElement("img");t.api_client=this._apiClientDescriptor,n.src=this._url(e,t,r),this._$(n).on("load error",(()=>i(this._$(n))))}_sendEventData(e,t){t=t||(()=>{});const i=Fera.Util.httpMethodToUse(e),r=["campaign_engagement","element_click","page_view","product_add_to_cart","product_view"].includes(e.type)?this.baseLegacyApiUrl:this.baseApiUrl;if("GET"!==i){const n={method:i,data:JSON.stringify(e),url:this._url("v2/public/events.json",{},r),dataType:"html",success:t=>{this._opts.logger.log("Successfully sent event",e,t)},error:i=>{if(i.status<300)return t&&t(i);var r="unknown error";try{r=JSON.parse(i.responseText).error_message}catch(e){}this._opts.logger.warn("Event failed to send: "+r,e,i)},complete:t};return this._ajax(n)}this._performImageRequest("v2/public/e.gif",e,t,r)}_ajax(e){return e.type=e.method,"GET"==e.method.toUpperCase()?-1===e.url.indexOf("api_client")&&(e.url+=(-1===e.url.indexOf("?")?"?":"&")+"api_client="+this._apiClientDescriptor):e.headers={"API-CLIENT":this._apiClientDescriptor},this._$.ajax(e)}_request(e,t,i,r){return this._ajax({method:e,url:t,success:i,error:r})}},Fera.State=class{constructor(e){this._opts=e,this._app=e.app}getData(e){var t={current_page:{url:window.location.toString(),referrer:document.referrer,title:document.title,path:window.location.pathname},location:this._opts.shopperLocation||{}};return(this._app.opts.debugMode||this._app.opts.adminMode)&&(t.device={width:window.screen&&window.screen.width,height:window.screen&&window.screen.height,agent:navigator&&navigator.userAgent,language:navigator&&navigator.language,is_bot:Fera.Util.isBot(),is_speed_mode:Fera.Util.isSpeedMode()}),this._app.opts.adminMode&&(t.is_admin=!0),!Fera.Util.isBot()&&this._opts.timeTracker&&(t.customer_id=this._app.getCustomerId()||"",t.interaction_time=this._opts.timeTracker.getTotalInteractionTime(),t.time_since_first_seen=this._opts.timeTracker.getTimeSinceFirstSeen(),t.session_time=this._opts.timeTracker.getSessionTime(),t.time_on_current_page=this._opts.timeTracker.getTimeOnCurrentPage(),t.inactive_time_on_current_page=this._opts.timeTracker.getInactiveTimeOnPage()),this._app.getSection()&&(t.section=this._app.getSection()),this._app.getProductId()&&(t.product_id=this._app.getProductId()),this._app.getProduct()&&(t.product=this._app.getProduct()),this._app.getVariantId()&&(t.variant_id=this._app.getVariantId()),Fera.Util.isBot()||(this._app.cart&&this._app.cart.hasData()&&(this._app.cart.validateData()?t.cart=this._app.cart.getData():Fera.logger.warn("Invalid cart data",this._app.cart)),this._app.abTests&&this._app.abTests.present()&&(t.test_buckets=this._app.abTests.getBuckets())),e(t),t}},Fera.VisitorManager=function(e){var t,i=this,r=(e=e||{}).cookieJar,n=1825,a=function(){};i.ensureVisitorId=function(){return t=i.getId(),s(),t?(i.isNew=!1,o()):(i.isNew=!0,c()),t},i.setId=function(e){-1!==(t=e).indexOf(" path=/")&&(t=t.replace(" path=/","")),r.setCookie("banana_stand_visitor_id",t,n)},i.getId=function(){return r.getCookie("banana_stand_visitor_id")};var s=function(){var i=e.optionsParser.feraParams.shopper;i&&(i=i.toLowerCase(),t?t!==i&&(Fera.logger.log("Shopper (visitor) ID was changed from URL. Merge operation impending.",t,i),e.api.mergeShoppers(t,i)):Fera.logger.log("Shopper (visitor) ID was set from URL.",t),t=i)},o=function(){i.setId(t)},c=function(){var e=Fera.Util.generateUUID();i.setId(e)};a()},Fera.Base=class{constructor(){this.$=Fera.Util.$()}_error(){return Fera.logger.error.apply(this,arguments)}};var FeraCachedAsset=function(e){var t=this;this.version="0.2.7";var i=e.name||e.url.split("?")[0].split("#")[0],r="Fera.AssetCache."+i,n=(new Date).getTime()/1e3,a=e.type||(-1!==e.url.indexOf(".html")?"text/template":-1!==e.url.indexOf(".css")?"text/css":"text/javascript");t.load=function(i){return i=i||function(){},t.content?i(t.content):(s((function(){t.content?i(t.content):l(e.url,(function(e){t.content=e,o((function(){c(t.content),t.save(t.content),i(t.content)}))}))})),!0)},t.save=function(t){var a=n+(e.expiresIn||900);if(!d()||!t)return!1;var s={name:i,url:e.url,expires:a,content:t};return window.localStorage.setItem(r,JSON.stringify(s)),!0},t.clear=function(){return window.localStorage.removeItem(r),!1};var s=function(i){if(!d())return i(!1);var a=window.localStorage.getItem(r);if(!a||"string"!=typeof a)return i(!1);var s=JSON.parse(a);if(s.expiresthis.locateAndAttachLinks()),1e3),Fera.Util.isSpeedMode()||this.locateAndAttachLinks()}locateAndAttachLinks(){this.$("[data-fera-action]").each(((e,t)=>this._attachDeepLink(this.$(t))))}_attachDeepLink(e){if(!e.data("fera-deep-link-attached")){var t=e.data("fera-action");-1!==["writeReview","submitPhotos","submitVideos","submitContent","submitMedia","showContentSubmission"].indexOf(t)&&(t="showContentSubmitter"),t&&this.app[t]&&this._attachClickListener(e,t)}}_attachClickListener(e,t){e.on("click",(i=>{i.preventDefault(),i.stopPropagation();var r=e.data()||{};this.app[t](r)})),e.data("fera-deep-link-attached",!0)}},Fera.EngagementRegistry=function(e){e=e||{};var t,i=this,r=[],n=[],a=[],s=function(){l()};i.isEnabled=function(){return e.app.storeSettings&&e.app.storeSettings.when_to_send_events&&e.app.storeSettings.when_to_send_events.campaign_engagement>=0};var o=function(){return!e.sandboxMode&&(!e.designMode&&(!!i.isEnabled()&&(!Fera.Util.isBot()&&!Fera.Util.isSpeedMode())))};i.register=function(t){if(!t)throw"Campaign ID can't be blank";o()&&(c(t)?-1===r.indexOf(t)&&-1===n.indexOf(t)&&n.push(t):r.push(t),a.push(t),e.inactivityDetector.afterFirstInteraction(u,1e3*e.app.storeSettings.when_to_send_events.campaign_engagement+1500))},i.pushEvent=function(){if(!(r.length<1&&n.length<1)){var t={type:"campaign_engagement",data:{engagements:{first_time:r,recurring:n}}};e.app.pushEvent(t),i.flush()}},i.state=function(){return{firstTime:r,recurring:n,historicalEngagements:a}},i.reset=function(){r=[],n=[],a=[],d()},i.flush=function(){r=[],n=[],d()};var c=function(e){return-1!==a.indexOf(e)},l=function(){a=e.localStorage.getObject("Fera.EngagementRegistry.historicalEngagements")||[]},d=function(){e.localStorage.setObject("Fera.EngagementRegistry.historicalEngagements",a)},u=Fera.Util.debounce((function(){try{i.pushEvent()}catch(i){throw t&&clearTimeout(t),e.logger.warn("Aborted watching for engagements since we got an error: ",i.message),i}}),3e3);s()},Fera.ExitIntentDetector=function(e){e=e||{};var t,i=Fera.Util.$(),r=e.sensitivity||300,n=function(){i(window).on("mouseleave",a),i(window).on("mouseenter",s)},a=function(i){i.clientY>0||(t&&clearTimeout(t),r<=0?e.onExitIntent&&(Fera.logger.log("Exit intent detected."),e.onExitIntent()):t=setTimeout((function(){t=null,e.onExitIntent&&(Fera.logger.log("Exit intent detected."),e.onExitIntent())}),r))},s=function(){t&&(clearTimeout(t),t=null)};n()},Fera.Geo=function(e){var t=this,i="https://geo.bananastand.io/json/",r=Fera.Util.$(),n=e.localStorage||new Fera.LocalStorageJar(e),a=function(){t.ipResult=null,s()||o()},s=function(){return!(!Fera.Util.isSpeedMode()&&!Fera.Util.isBot())&&(t.ipResult={ip:"99.250.99.99",continent:"NA",country_code:"CA",country_name:"Canada",region_code:"ON",region_name:"Ontario",city:"Waterloo",zip_code:"N2A",time_zone:"America/Toronto",latitude:43.4551002,longitude:-80.5413999},!0)};this.hasStoredInfo=function(){return null!==t.ipResult},this.getLocationInfo=function(e){t.ipResult?e(t.ipResult):t.geolocateIp(e)},this.geolocateIp=function(e,n){e=e||function(){},r.ajax({method:"GET",type:"GET",url:i,success:function(i){c(i),e(t.ipResult)},dataType:-1!==window.location.toString().match("/checkouts|/cart")?"json":"jsonp",error:function(){n&&e({})}})};var o=function(){if(void 0!==n)try{t.ipResult=n.getObject(l())}catch(e){}},c=function(e){t.ipResult=e,void 0!==n&&n.setObject&&n.setObject(l(),t.ipResult,72e5)},l=function(){return"Geo.geolocateIp.result"};a()},Fera.I18n=class{constructor(e){e.optionsParser&&e.optionsParser.feraParams&&e.optionsParser.feraParams.locale?this.locale=e.optionsParser.feraParams.locale:e.app&&e.app.locale?this.locale=e.app.locale:this.locale=document.documentElement.lang||"en"}get translations(){const e=this.localeWithFallback.split("-")[0];return this.constructor.TRANSLATIONS[e]}get localeWithFallback(){return this.isSupportedLanguage(this.locale)?this.locale:this.defaultLocale&&this.isSupportedLanguage(this.defaultLocale)?this.defaultLocale:"en"}get usingDefaultLocale(){return this.defaultLocale?this.localeWithFallback===this.defaultLocale:this.isSupportedLanguage(this.locale)}setTranslatedStrings(e){Object.keys(e).forEach((t=>{const i=t.split("-")[0];e[i]||(e[i]=e[t])})),this.translatedStrings=e}setDefaultLocale(e){this.locale!==e&&(this.defaultLocale=e)}isSupportedLanguage(e){const t=e.split("-")[0];return this.supportedLanguages().includes(t)}supportedLanguages(){return["en",...Object.keys(this.constructor.TRANSLATIONS)]}t(e,t=null){if("object"==typeof e)return this.translateElementText(e);if("string"==typeof t)try{t=JSON.parse(t)}catch(e){t=null}let i=e;if(!e)return i;if(this.translations)if(this.translations[e])i=this.translations[e];else{const t=Object.keys(this.translations).find((t=>t.toLowerCase()===e.toLowerCase()));t?i=this.translations[t]:Fera.logger.logWarning(`'${t}' I18n key missing for '${this.localeWithFallback}' locale.`)}if(this.translatedStrings){const e=this.translatedStrings[this.localeWithFallback];e&&e[i]&&(i=e[i])}return t&&i.match(/\{[{%]/)&&(i=Fera.Liquid.parse(i).render(t)),i}translateElementText(e){e.zepto||(e=F$(e)),e.each(((e,t)=>{const i=F$(t);if(i.data("fera-translated"))return!0;const r=i.html().trim(),n=this.t(r).trim();r!==n&&i.html(n),i.data("fera-translated",!0)}))}customTranslate(e,t){const i=this.t(e),r=t[this.localeWithFallback];return r&&r[i]?r[i]:i}static _getShopifyLocale(){let e=document.getElementById("shopify-features");if(e)return e=JSON.parse(e.innerHTML),e.locale}static get TRANSLATIONS(){return{de:{"Real shoppers":"Echter K\xe4ufer",Anonymous:"Anonym","verified by Fera.ai":"verifiziert von Fera.ai","{{ review_count }} review{% if review_count != 1 %}s{% endif %}":"{{ review_count }} Produktbewertung{% if review_count != 1 %}en{% endif %}","Product Reviews":"Produktrezensionen","Customer Reviews":"Kundenrezensionen",Reviews:"Bewertungen","Product:":"Produkt:","Write a review":"Eine Rezension schreiben","Review The Store":"\xdcberpr\xfcfen Sie den Laden","How was your experience?":"Wie war deine Erfahrung?","Reviews From Similar Products":"Bewertungen von \xe4hnlichen Produkten","Show More":"Zeig Mehr","No reviews for this product yet.":"Es gibt noch keine Bewertungen f\xfcr dieses Produkt.","Replied:":"antwortete:","{{ store_name }} replied:":"{{ store_name }} antwortete:","We're adding a 2nd item to your cart now!":"Wir legen jetzt einen zweiten Artikel in Ihren Warenkorb!","{{ user.name }} from {{ store.name }}":"{{ user.name }} von {{ store.name }}","Loading...":"wird geladen...",Submit:"Einreichen",Skip:"Auslassen",Testimonials:"Referenzen","This product doesn't have any reviews yet, so check out these other reviews instead.":"Dieses Produkt hat noch keine Bewertungen. Schauen Sie sich stattdessen diese anderen Bewertungen an.","Average Store Rating":"Durchschnittliche Store -Bewertung","Rated by Verified Users":"Bewertet von verifizierten Benutzern","Over {{ count }} Customer Reviews":"\xdcber {{ count }} Kundenbewertungen","Rated by over {{ count }} Customers":"Bewertet von \xfcber {{ count }} Kunden","Rated By Users":"Von Benutzern bewertet","{{ rating }} Rating":"{{ rating }} Bewertung"},es:{"Real shoppers":"Compradores reales",Anonymous:"An\xf3nimo","verified by Fera.ai":"verificado por Fera.ai","{{ review_count }} review{% if review_count != 1 %}s{% endif %}":"{{ review_count }} opini{% if review_count == 1 %}\xf3n{% else %}ones{% endif %}","Product Reviews":"Rese\xf1as de productos","Customer Reviews":"Rese\xf1as de clientes",Reviews:"Rese\xf1as","Product:":"Producto:","Write a review":"Escribe una rese\xf1a","How was your experience?":"\xbfC\xf3mo fue tu experiencia?","Reviews From Similar Products":"Rese\xf1as de productos similares","Review The Store":"Revisar la tienda","Show More":"Mostrar M\xe1s","No reviews for this product yet.":"No hay comentarios para este producto todav\xeda.","Replied:":"respondi\xf3:","{{ store_name }} replied:":"{{ store_name }} respondi\xf3:","We're adding a 2nd item to your cart now!":"\xa1Estamos agregando un segundo art\xedculo a su carrito ahora!","{{ user.name }} from {{ store.name }}":"{{ user.name }} para {{ store.name }}","Loading...":"cargando...",Submit:"Enviar",Skip:"Omitir",Testimonials:"Testimonios","This product doesn't have any reviews yet, so check out these other reviews instead.":"This product doesn't have any reviews yet, so check out these other reviews instead.","Average Store Rating":"Calificaci\xf3n promedio de la tienda","Rated by Verified Users":"Calificado por usuarios verificados","Over {{ count }} Customer Reviews":"Over {{ count }} Revisiones de clientes","Rated by over {{ count }} Customers":"Calificado por Over {{ count }} clientes","Rated By Users":"Calificado por los usuarios","{{ rating }} Rating":"Calificaci\xf3n {{ rating }}"},fr:{"Real shoppers":"De vrais acheteurs",Anonymous:"Anonyme","verified by Fera.ai":"v\xe9rifi\xe9 par Fera.ai","{{ review_count }} review{% if review_count != 1 %}s{% endif %}":"{{ review_count }} critique{% if review_count != 1 %}s{% endif %}","Product Reviews":"Avis sur les produits","Customer Reviews":"Avis des clients",Reviews:"Commentaires","Product:":"Produit:","Write a review":"\xc9crire une critique","How was your experience?":"Comment \xe9tait ton exp\xe9rience?","Reviews From Similar Products":"Commentaires de produits similaires","Review The Store":"Donnez votre avis sur le magasin","Show More":"Montre Plus","No reviews for this product yet.":"Il n'y a pas encore de commentaire pour ce produit.","Replied:":"a r\xe9pondu:","{{ store_name }} replied:":"{{ store_name }} a r\xe9pondu:","We're adding a 2nd item to your cart now!":"Nous ajoutons un deuxi\xe8me article \xe0 votre panier maintenant!","{{ user.name }} from {{ store.name }}":"{{ user.name }} de {{ store.name }}","Loading...":"chargement en cours...",Submit:"Soumettre",Skip:"Ignorer",Testimonials:"T\xe9moignages","This product doesn't have any reviews yet, so check out these other reviews instead.":"Ce produit n'a pas encore de critiques, alors consultez ces autres avis \xe0 la place.","Average Store Rating":"Note moyenne de magasin","Rated by Verified Users":"Class\xe9 par les utilisateurs v\xe9rifi\xe9s","Over {{ count }} Customer Reviews":"Sur {{ count }} avis des clients","Rated by over {{ count }} Customers":"Class\xe9 par des clients sur {{ count }}","Rated By Users":"Class\xe9 par les utilisateurs","{{ rating }} Rating":"{{ rating }} note"},id:{"Real shoppers":"Pembeli sungguhan",Anonymous:"Anonim","verified by Fera.ai":"diverifikasi oleh Fera.ai","{{ review_count }} review{% if review_count != 1 %}s{% endif %}":"{{ review_count }} ulasan","Product Reviews":"Ulasan produk","Customer Reviews":"Ulasan Pelanggan",Reviews:"Ulasan","Product:":"Produk:","Write a review":"Menulis review","How was your experience?":"Bagaimana pengalaman Anda?","Reviews From Similar Products":"Review Dari Produk Sejenis","Review The Store":"Tinjau Toko","Show More":"Menampilkan Lebih Banyak","No reviews for this product yet.":"Belum ada review untuk produk ini.","Replied:":"menjawab:","{{ store_name }} replied:":"{{ store_name }} menjawab:","We're adding a 2nd item to your cart now!":"Kami menambahkan item kedua ke keranjang Anda sekarang!","{{ user.name }} from {{ store.name }}":"{{ user.name }} dari {{ store.name }}","Loading...":"memuat...",Submit:"Kirimkan",Skip:"Melewati",Testimonials:"Testimonial","This product doesn't have any reviews yet, so check out these other reviews instead.":"Produk ini belum memiliki ulasan apa pun, jadi lihat ulasan lain ini sebagai gantinya.","Average Store Rating":"Peringkat toko rata -rata","Rated by Verified Users":"Dinilai oleh Pengguna Terverifikasi","Over {{ count }} Customer Reviews":"Over {{ count }} ulasan pelanggan","Rated by over {{ count }} Customers":"Dinilai oleh lebih dari {{ count }} pelanggan","Rated By Users":"Dinilai oleh pengguna","{{ rating }} Rating":"{{ rating }} peringkat"},it:{"Real shoppers":"Veri clienti",Anonymous:"Anonimo","verified by Fera.ai":"verificato da Fera.ai", "{{ review_count }} review{% if review_count != 1 %}s{% endif %}":"{{ review_count }} recension{% if review_count == 1 %}e{% else %}i{% endif %}","Product Reviews":"Recensioni dei prodotti","Customer Reviews":"Recensioni dei clienti",Reviews:"Recensioni","Product:":"Prodotto:","Write a review":"Scrivi una recensione","How was your experience?":"Come \xe8 stata la tua esperienza?","Reviews From Similar Products":"Recensioni di prodotti simili","Review The Store":"Rivedi il negozio","Show More":"Mostra Di Pi\xf9","No reviews for this product yet.":"Nessuna recensione per questo prodotto ancora.","Replied:":"ha risposto:","{{ store_name }} replied:":"{{ store_name }} ha risposto:","We're adding a 2nd item to your cart now!":"Stiamo aggiungendo un secondo articolo al tuo carrello ora!","{{ user.name }} from {{ store.name }}":"{{ user.name }} da {{ store.name }}","Loading...":"caricamento in corso...",Submit:"Invia",Skip:"Omettere",Testimonials:"Testimonianze","This product doesn't have any reviews yet, so check out these other reviews instead.":"Questo prodotto non ha ancora recensioni, quindi dai un'occhiata a queste altre recensioni.","Average Store Rating":"Valutazione del negozio medio","Rated by Verified Users":"Valutato dagli utenti verificati","Over {{ count }} Customer Reviews":"Over {{ count }} recensioni dei clienti","Rated by over {{ count }} Customers":"Valutato da Over {{ count }} clienti","Rated By Users":"Valutato dagli utenti","{{ rating }} Rating":"{{ rating }} Valutazione"},nl:{"Real shoppers":"Echte kopers",Anonymous:"Anoniem","verified by Fera.ai":"geverifieerd door Fera.ai","{{ review_count }} review{% if review_count != 1 %}s{% endif %}":"{{ review_count }} productbeoordeling{% if review_count != 1 %}en{% endif %}","Product Reviews":"Productrecensies","Customer Reviews":"Klantrecensies",Reviews:"Beoordelingen","Product:":"Product:","Write a review":"Schrijf een recensie","How was your experience?":"Hoe was je ervaring?","Reviews From Similar Products":"Recensies van vergelijkbare producten","Review The Store":"Beoordeel De winkel","Show More":"Laat Meer Zien","No reviews for this product yet.":"Er zijn nog geen beoordelingen voor dit product.","Replied:":"respondeu:","{{ store_name }} replied:":"{{ store_name }} respondeu:","We're adding a 2nd item to your cart now!":"We voegen nu een tweede artikel toe aan uw winkelwagen!","{{ user.name }} from {{ store.name }}":"{{ user.name }} van {{ store.name }}","Loading...":"bezig met laden...",Submit:"Verzenden",Skip:"Negeren",Testimonials:"Getuigenissen","This product doesn't have any reviews yet, so check out these other reviews instead.":"Dit product heeft nog geen beoordelingen, dus bekijk in plaats daarvan deze andere beoordelingen.","Average Store Rating":"Gemiddelde winkelbeoordeling","Rated by Verified Users":"Beoordeeld door geverifieerde gebruikers","Over {{ count }} Customer Reviews":"Over {{ count }} klantrecensies","Rated by over {{ count }} Customers":"Beoordeeld door meer dan {{ count }} klanten","Rated By Users":"Beoordeeld door gebruikers","{{ rating }} Rating":"{{ rating }} Beoordeling"},no:{"Real shoppers":"Ekte shoppere",Anonymous:"Anonym","verified by Fera.ai":"bekreftet av Fera.ai","{{ review_count }} review{% if review_count != 1 %}s{% endif %}":"{{ review_count }} produktanmeldelse{% if review_count != 1 %}r{% endif %}","Product Reviews":"Produktomtaler","Customer Reviews":"Kunde anmeldelser",Reviews:"Anmeldelser","Product:":"Produkt:","Write a review":"Skrive en omtale","How was your experience?":"Hvordan var opplevelsen din?","Reviews From Similar Products":"Anmeldelser Fra Lignende Produkter","Review The Store":"Anmeld butikken","Show More":"Vis Mer","No reviews for this product yet.":"Ingen anmeldelser for dette produktet enn\xe5.","Replied:":"svarte:","{{ store_name }} replied:":"{{ store_name }} svarte:","We're adding a 2nd item to your cart now!":"Vi legger til en ny vare i handlekurven din n\xe5!","{{ user.name }} from {{ store.name }}":"{{ user.name }} fra {{ store.name }}","Loading...":"laster inn ...",Submit:"Sende inn",Skip:"Overse",Testimonials:"Attester","This product doesn't have any reviews yet, so check out these other reviews instead.":"Dette produktet har ingen anmeldelser enn\xe5, s\xe5 sjekk ut disse andre anmeldelsene i stedet.","Average Store Rating":"Gjennomsnittlig butikkvurdering","Rated by Verified Users":"Vurdert av bekreftede brukere","Over {{ count }} Customer Reviews":"Over {{ count }} kundeanmeldelser","Rated by over {{ count }} Customers":"Vurdert av over {{ count }} kunder","Rated By Users":"Rangert av brukere","{{ rating }} Rating":"{{ rating }} Rating"},pt:{"Real shoppers":"Compradores reais",Anonymous:"An\xf4nimo","verified by Fera.ai":"verificado por Fera.ai","{{ review_count }} review{% if review_count != 1 %}s{% endif %}":"{{ review_count }} an\xe1lise{% if review_count != 1 %}s{% endif %}","Product Reviews":"Revis\xe3o de Produtos","Customer Reviews":"Opini\xe3o dos consumidores",Reviews:"Avalia\xe7\xf5es","Product:":"Produtos:","Write a review":"Escreva uma cr\xedtica","How was your experience?":"Como foi sua experiencia","Reviews From Similar Products":"Avalia\xe7\xf5es de produtos semelhantes","Review The Store":"Avalie a loja","Show More":"Mostre Mais","No reviews for this product yet.":"Ainda n\xe3o h\xe1 coment\xe1rios para este produto.","Replied:":"respondeu","{{ store_name }} replied:":"{{ store_name }} respondeu","We're adding a 2nd item to your cart now!":"Estamos adicionando um segundo item ao seu carrinho agora!","{{ user.name }} from {{ store.name }}":"{{ user.name }} de {{ store.name }}","Loading...":"carregando...",Submit:"Enviar",Skip:"Ignorar",Testimonials:"Testemunhos","This product doesn't have any reviews yet, so check out these other reviews instead.":"Este produto ainda n\xe3o possui coment\xe1rios, ent\xe3o confira essas outras revis\xf5es.","Average Store Rating":"Classifica\xe7\xe3o m\xe9dia da loja","Rated by Verified Users":"Classificado por usu\xe1rios verificados","Over {{ count }} Customer Reviews":"Sobre {{ count }} avalia\xe7\xf5es do cliente","Rated by over {{ count }} Customers":"Classificado por mais de {{ count }} clientes","Rated By Users":"Classificado pelos usu\xe1rios","{{ rating }} Rating":"{{ rating }} Classifica\xe7\xe3o"},ro:{"Real shoppers":"Cump\u0103r\u0103tori adev\u0103ra\u021bi",Anonymous:"Anonim","verified by Fera.ai":"verificat de Fera.ai","{{ review_count }} review{% if review_count != 1 %}s{% endif %}":"{{ review_count }} recenzi{% if review_count == 1 %}e{% else %}i{% endif %}","Product Reviews":"Recenzii despre produs","Customer Reviews":"Recenziile clien\u021bilor",Reviews:"Recenzii","Product:":"Produs:","Write a review":"Scrie o recenzie","How was your experience?":"Cum a fost experien\u021ba ta?","Reviews From Similar Products":"Recenzii de la produse similare","Review The Store":"Revizuie\u0219te Magazinul","Show More":"Afi\u0219a\u021bi Mai Multe","No reviews for this product yet.":"Nu exist\u0103 \xeenc\u0103 recenzii pentru acest produs.","Replied:":"a r\u0103spuns:","{{ store_name }} replied:":"{{ store_name }} a r\u0103spuns:","We're adding a 2nd item to your cart now!":"Acum ad\u0103ug\u0103m un al doilea articol \xeen co\u0219!","{{ user.name }} from {{ store.name }}":"{{ user.name }} de la {{ store.name }}","Loading...":"se \xeencarc\u0103...",Submit:"Trimite",Skip:"Ignora",Testimonials:"M\u0103rturii","This product doesn't have any reviews yet, so check out these other reviews instead.":"Acest produs nu are \xeenc\u0103 recenzii, a\u0219a c\u0103 consulta\u021bi aceste alte recenzii.","Average Store Rating":"Evaluarea medie a magazinului","Rated by Verified Users":"Evaluat de utilizatori verifica\u021bi","Over {{ count }} Customer Reviews":"Peste {{ count }} recenzii ale clien\u021bilor","Rated by over {{ count }} Customers":"Evaluat de clien\u021bii peste {{ count }}","Rated By Users":"Evaluat de utilizatori","{{ rating }} Rating":"{{ rating }} rating"},ru:{"Real shoppers":"\u041d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0435 \u043f\u043e\u043a\u0443\u043f\u0430\u0442\u0435\u043b\u0438",Anonymous:"\u0410\u043d\u043e\u043d\u0438\u043c\u043d\u044b\u0439","verified by Fera.ai":"\u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043e Fera.ai","{{ review_count }} review{% if review_count != 1 %}s{% endif %}":"{% assign mod_t = review_count | modulo: 10 %}{{ review_count }} \u043e\u0442\u0437\u044b\u0432{% if mod_t > 1 and mod_t < 5 and review_count < 12 or review_count > 14 %}\u0430{% elsif mod_t != 1 or review_count == 11 %}\u043e\u0432{% endif %}","Product Reviews":"\u041e\u0431\u0437\u043e\u0440\u044b \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432","Customer Reviews":"\u041e\u0442\u0437\u044b\u0432\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432",Reviews:"\u041e\u0442\u0437\u044b\u0432\u044b","Product:":"\u041f\u0440\u043e\u0434\u0443\u043a\u0442:","Write a review":"\u041d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0440\u0435\u0446\u0435\u043d\u0437\u0438\u044e","How was your experience?":"\u041a\u0430\u043a\u0438\u043c \u0431\u044b\u043b \u0442\u0432\u043e\u0439 \u043e\u043f\u044b\u0442?","Reviews From Similar Products":"\u041e\u0442\u0437\u044b\u0432\u044b \u043e \u043f\u043e\u0445\u043e\u0436\u0438\u0445 \u0442\u043e\u0432\u0430\u0440\u0430\u0445","Review The Store":"\u041e\u0431\u0437\u043e\u0440 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430","Show More":"\u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435","No reviews for this product yet.":"\u041d\u0435\u0442 \u043e\u0442\u0437\u044b\u0432\u043e\u0432 \u043e\u0431 \u044d\u0442\u043e\u043c \u0442\u043e\u0432\u0430\u0440\u0435 \u0435\u0449\u0435.","Replied:":"\u043e\u0442\u0432\u0435\u0442\u0438\u043b:","{{ store_name }} replied:":"{{ store_name }} \u043e\u0442\u0432\u0435\u0442\u0438\u043b:","We're adding a 2nd item to your cart now!":"\u041c\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0432\u0430\u0448\u0443 \u043a\u043e\u0440\u0437\u0438\u043d\u0443 \u0432\u0442\u043e\u0440\u043e\u0439 \u0442\u043e\u0432\u0430\u0440!","{{ user.name }} from {{ store.name }}":"{{ user.name }} \u0438\u0437 {{ store.name }}","Loading...":"\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 ...",Submit:"\u0420\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c",Skip:"\u043f\u0440\u043e\u043f\u0443\u0441\u043a",Testimonials:"\u041e\u0442\u0437\u044b\u0432\u044b","This product doesn't have any reviews yet, so check out these other reviews instead.":"\u0423 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u043f\u043e\u043a\u0430 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043e\u0442\u0437\u044b\u0432\u043e\u0432, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u044c\u0442\u0435\u0441\u044c \u0441 \u044d\u0442\u0438\u043c\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043e\u0431\u0437\u043e\u0440\u0430\u043c\u0438.","Average Store Rating":"\u0421\u0440\u0435\u0434\u043d\u0438\u0439 \u0440\u0435\u0439\u0442\u0438\u043d\u0433 \u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430","Rated by Verified Users":"\u041e\u0446\u0435\u043d\u043a\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c\u0438","Over {{ count }} Customer Reviews":"Over {{ count }} \u043e\u0442\u0437\u044b\u0432\u044b \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432","Rated by over {{ count }} Customers":"\u041e\u0446\u0435\u043d\u043a\u0430 \u0437\u0430 {{ count }} \u043a\u043b\u0438\u0435\u043d\u0442\u044b","Rated By Users":"\u041e\u0446\u0435\u043d\u043a\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439","{{ rating }} Rating":"{{ rating }} \u0420\u0435\u0439\u0442\u0438\u043d\u0433"},sk:{"Real shoppers":"Skuto\u010dn\xed kupuj\xfaci",Anonymous:"Anonymn\xfd","verified by Fera.ai":"overen\xe9 Fera.ai","{{ review_count }} review{% if review_count != 1 %}s{% endif %}":"{{ review_count }} recenzi{% if review_count == 1 %}a{% elsif review_count > 1 and review_count < 5 %}e{% else %}\xed{% endif %}","Product Reviews":"Recenzie produktu","Customer Reviews":"Z\xe1kazn\xedcke recenzie",Reviews:"Recenzie","Product:":"V\xfdrobok:","Write a review":"Nap\xedsa\u0165 recenziu","How was your experience?":"Ak\xe1 bola va\u0161a sk\xfasenos\u0165?","Reviews From Similar Products":"Recenzie z podobn\xfdch produktov","Review The Store":"Recenzia Obchod","Show More":"Zobrazi\u0165 Viac","No reviews for this product yet.":"Zatia\u013e nie s\xfa k tomuto produktu \u017eiadne recenzie.","Replied:":"je odgovoril:","{{ store_name }} replied:":"{{ store_name }} je odgovoril:","We're adding a 2nd item to your cart now!":"Teraz do v\xe1\u0161ho ko\u0161\xedka prid\xe1vame druh\xfa polo\u017eku!","{{ user.name }} from {{ store.name }}":"{{ user.name }} z {{ store.name }}","Loading...":"na\u010d\xedtava...",Submit:"Predlo\u017ei\u0165",Skip:"Ignorova\u0165",Testimonials:"Ohlasy","This product doesn't have any reviews yet, so check out these other reviews instead.":"Tento produkt zatia\u013e nem\xe1 \u017eiadne recenzie, tak\u017ee si pozrite tieto \u010fal\u0161ie recenzie.","Average Store Rating":"Priemern\xe9 hodnotenie obchodu","Rated by Verified Users":"Hodnoten\xe9 overen\xfdmi pou\u017e\xedvate\u013emi","Over {{ count }} Customer Reviews":"Nad {{ count }} recenzie z\xe1kazn\xedkov","Rated by over {{ count }} Customers":"Hodnoten\xe9 nad {{ count }} z\xe1kazn\xedkmi","Rated By Users":"Hodnoten\xe9 pou\u017e\xedvate\u013emi","{{ rating }} Rating":"{{ rating }} hodnotenia"},sv:{"Real shoppers":"Riktiga shoppare",Anonymous:"Anonym","verified by Fera.ai":"verifierad av Fera.ai","{{ review_count }} review{% if review_count != 1 %}s{% endif %}":"{{ review_count }} produktrecension{% if review_count != 1 %}er{% endif %}","Product Reviews":"Produktrecensioner","Customer Reviews":"Kundrecensioner",Reviews:"Recensioner","Product:":"Produkt:","Write a review":"Skriva en recension","How was your experience?":"Hur var din upplevelse?","Reviews From Similar Products":"Recensioner fr\xe5n liknande produkter","Review The Store":"Recensera butiken","Show More":"Visa Mer","No reviews for this product yet.":"Inga recensioner f\xf6r denna produkt \xe4nnu.","Replied:":"svarade:","{{ store_name }} replied:":"{{ store_name }} svarade:","We're adding a 2nd item to your cart now!":"Vi l\xe4gger till en andra artikel i din kundvagn nu!","{{ user.name }} from {{ store.name }}":"{{ user.name }} fr\xe5n {{ store.name }}","Loading...":"l\xe4ser in...",Submit:"Skicka in",Skip:"Ignorera",Testimonials:"Vittnesm\xe5l","This product doesn't have any reviews yet, so check out these other reviews instead.":"Den h\xe4r produkten har inga recensioner \xe4nnu, s\xe5 kolla in dessa andra recensioner ist\xe4llet.","Average Store Rating":"Genomsnittlig butiksbetyg","Rated by Verified Users":"Betygsatt av verifierade anv\xe4ndare","Over {{ count }} Customer Reviews":"\xd6ver {{ count }} kundrecensioner","Rated by over {{ count }} Customers":"Klassad av \xf6ver {{ count }} kunder","Rated By Users":"Betygsatt av anv\xe4ndare","{{ rating }} Rating":"{{ rating }} betyg"},th:{"Real shoppers":"\u0e1c\u0e39\u0e49\u0e0b\u0e37\u0e49\u0e2d\u0e08\u0e23\u0e34\u0e07",Anonymous:"\u0e44\u0e21\u0e48\u0e23\u0e30\u0e1a\u0e38\u0e0a\u0e37\u0e48\u0e2d","verified by Fera.ai":"\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a\u0e42\u0e14\u0e22 Fera.ai","{{ review_count }} review{% if review_count != 1 %}s{% endif %}":"{{ review_count }} \u0e04\u0e27\u0e32\u0e21\u0e04\u0e34\u0e14\u0e40\u0e2b\u0e47\u0e19\u0e15\u0e48\u0e2d\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32","Product Reviews":"\u0e1a\u0e17\u0e27\u0e34\u0e08\u0e32\u0e23\u0e13\u0e4c\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32","Customer Reviews":"\u0e04\u0e27\u0e32\u0e21\u0e04\u0e34\u0e14\u0e40\u0e2b\u0e47\u0e19\u0e02\u0e2d\u0e07\u0e25\u0e39\u0e01\u0e04\u0e49\u0e32",Reviews:"\u0e04\u0e27\u0e32\u0e21\u0e04\u0e34\u0e14\u0e40\u0e2b\u0e47\u0e19","Product:":"\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32:","Write a review":"\u0e41\u0e2a\u0e14\u0e07\u0e04\u0e27\u0e32\u0e21\u0e04\u0e34\u0e14\u0e40\u0e2b\u0e47\u0e19","How was your experience?":"\u0e1b\u0e23\u0e30\u0e2a\u0e1a\u0e01\u0e32\u0e23\u0e13\u0e4c\u0e02\u0e2d\u0e07\u0e04\u0e38\u0e13\u0e40\u0e1b\u0e47\u0e19\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e44\u0e23?","Reviews From Similar Products":"\u0e1a\u0e17\u0e27\u0e34\u0e08\u0e32\u0e23\u0e13\u0e4c\u0e08\u0e32\u0e01\u0e1c\u0e25\u0e34\u0e15\u0e20\u0e31\u0e13\u0e11\u0e4c\u0e17\u0e35\u0e48\u0e04\u0e25\u0e49\u0e32\u0e22\u0e04\u0e25\u0e36\u0e07\u0e01\u0e31\u0e19","Review The Store":"\u0e23\u0e35\u0e27\u0e34\u0e27\u0e23\u0e49\u0e32\u0e19","Show More":"\u0e41\u0e2a\u0e14\u0e07\u0e21\u0e32\u0e01\u0e02\u0e36\u0e49\u0e19","No reviews for this product yet.":"\u0e22\u0e31\u0e07\u0e44\u0e21\u0e48\u0e21\u0e35\u0e01\u0e32\u0e23\u0e23\u0e35\u0e27\u0e34\u0e27\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32\u0e19\u0e35\u0e49","Replied:":"\u0e15\u0e2d\u0e1a\u0e01\u0e25\u0e31\u0e1a:","{{ store_name }} replied:":"{{ store_name }} \u0e15\u0e2d\u0e1a\u0e01\u0e25\u0e31\u0e1a:","We're adding a 2nd item to your cart now!":"\u0e40\u0e23\u0e32\u0e01\u0e33\u0e25\u0e31\u0e07\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e2a\u0e34\u0e19\u0e04\u0e49\u0e32\u0e0a\u0e34\u0e49\u0e19\u0e17\u0e35\u0e48\u0e2a\u0e2d\u0e07\u0e43\u0e19\u0e23\u0e16\u0e40\u0e02\u0e47\u0e19\u0e02\u0e2d\u0e07\u0e04\u0e38\u0e13\u0e15\u0e2d\u0e19\u0e19\u0e35\u0e49!","{{ user.name }} from {{ store.name }}":"{{ user.name }} \u0e08\u0e32\u0e01 {{ store.name }}","Loading...":"\u0e01\u0e33\u0e25\u0e31\u0e07\u0e42\u0e2b\u0e25\u0e14 ...",Submit:"\u0e2a\u0e48\u0e07",Skip:"\u0e44\u0e21\u0e48\u0e2a\u0e19\u0e43\u0e08",Testimonials:"\u0e02\u0e49\u0e2d\u0e04\u0e27\u0e32\u0e21\u0e23\u0e31\u0e1a\u0e23\u0e2d\u0e07","This product doesn't have any reviews yet, so check out these other reviews instead.":"\u0e1c\u0e25\u0e34\u0e15\u0e20\u0e31\u0e13\u0e11\u0e4c\u0e19\u0e35\u0e49\u0e22\u0e31\u0e07\u0e44\u0e21\u0e48\u0e21\u0e35\u0e23\u0e35\u0e27\u0e34\u0e27\u0e43\u0e14 \u0e46 \u0e14\u0e31\u0e07\u0e19\u0e31\u0e49\u0e19\u0e25\u0e2d\u0e07\u0e14\u0e39\u0e1a\u0e17\u0e27\u0e34\u0e08\u0e32\u0e23\u0e13\u0e4c\u0e2d\u0e37\u0e48\u0e19 \u0e46 \u0e40\u0e2b\u0e25\u0e48\u0e32\u0e19\u0e35\u0e49\u0e41\u0e17\u0e19","Average Store Rating":"\u0e04\u0e30\u0e41\u0e19\u0e19\u0e23\u0e49\u0e32\u0e19\u0e04\u0e49\u0e32\u0e40\u0e09\u0e25\u0e35\u0e48\u0e22","Rated by Verified Users":"\u0e43\u0e2b\u0e49\u0e04\u0e30\u0e41\u0e19\u0e19\u0e42\u0e14\u0e22\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49\u0e17\u0e35\u0e48\u0e44\u0e14\u0e49\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e22\u0e37\u0e19\u0e22\u0e31\u0e19","Over {{ count }} Customer Reviews":"\u0e21\u0e32\u0e01\u0e01\u0e27\u0e48\u0e32 {{ count }} \u0e1a\u0e17\u0e27\u0e34\u0e08\u0e32\u0e23\u0e13\u0e4c\u0e02\u0e2d\u0e07\u0e25\u0e39\u0e01\u0e04\u0e49\u0e32","Rated by over {{ count }} Customers":"\u0e44\u0e14\u0e49\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e08\u0e31\u0e14\u0e2d\u0e31\u0e19\u0e14\u0e31\u0e1a\u0e42\u0e14\u0e22\u0e25\u0e39\u0e01\u0e04\u0e49\u0e32 {{ count }} \u0e25\u0e39\u0e01\u0e04\u0e49\u0e32","Rated By Users":"\u0e43\u0e2b\u0e49\u0e04\u0e30\u0e41\u0e19\u0e19\u0e42\u0e14\u0e22\u0e1c\u0e39\u0e49\u0e43\u0e0a\u0e49","{{ rating }} Rating":"{{ rating }} \u0e04\u0e30\u0e41\u0e19\u0e19"},zh:{"Real shoppers":"\u771f\u6b63\u7684\u8d2d\u7269\u8005",Anonymous:"\u533f\u540d\u7684","verified by Fera.ai":"\u7531Fera.ai\u9a8c\u8bc1","{{ review_count }} review{% if review_count != 1 %}s{% endif %}":"{{ review_count }} {% if review_count == 1 %}\u4e2a\u4ea7{% else %}\u4ef6\u5546{% endif %}\u54c1\u8bc4\u8bba","Product Reviews":"\u7522\u54c1\u8a55\u8ad6","Customer Reviews":"\u9867\u5ba2\u8a55\u8ad6",Reviews:"\u8a55\u8ad6","Product:":"\u7522\u54c1\uff1a","Write a review":"\u5beb\u4e00\u7bc7\u8a55\u8ad6","How was your experience?":"\u4f60\u7684\u7d93\u6b77\u600e\u9ebc\u6a23\uff1f","Reviews From Similar Products":"\u4f86\u81ea\u985e\u4f3c\u7522\u54c1\u7684\u8a55\u8ad6","Review The Store":"\u8a55\u8ad6\u5546\u5e97","Show More":"\u986f\u793a\u66f4\u591a","No reviews for this product yet.":"\u8fd9\u4ef6\u5546\u54c1\u8fd8\u6ca1\u6709\u4efb\u4f55\u8bc4\u8bba\u3002","Replied:":"\u56de\u7b54\uff1a","{{ store_name }} replied:":"{{ store_name }} \u56de\u7b54\uff1a","We're adding a 2nd item to your cart now!":"\u6211\u5011\u73fe\u5728\u5c07\u7b2c\u4e8c\u4ef6\u5546\u54c1\u6dfb\u52a0\u5230\u60a8\u7684\u8cfc\u7269\u8eca\uff01","{{ user.name }} from {{ store.name }}":"\u4ee3\u8868 {{ store.name }} \u7684 {{ user.name }}","Loading...":"\u8f09\u5165\u4e2d...",Submit:"\u63d0\u4ea4",Skip:"\u8df3\u904e",Testimonials:"\u611f\u8a00","This product doesn't have any reviews yet, so check out these other reviews instead.":"\u8a72\u7522\u54c1\u9084\u6c92\u6709\u4efb\u4f55\u8a55\u8ad6\uff0c\u56e0\u6b64\u8acb\u67e5\u770b\u5176\u4ed6\u8a55\u8ad6\u3002","Average Store Rating":"\u666e\u901a\u5546\u5e97\u8a55\u7d1a","Rated by Verified Users":"\u7531\u7d93\u904e\u9a57\u8b49\u7684\u7528\u6236\u8a55\u7d1a","Over {{ count }} Customer Reviews":"\u8d85\u904e{{ count }}\u5ba2\u6236\u8a55\u8ad6","Rated by over {{ count }} Customers":"\u7531Over {{ count }}\u5ba2\u6236\u8a55\u5206","Rated By Users":"\u7531\u7528\u6236\u8a55\u7d1a","{{ rating }} Rating":"{{ rating }}\u8a55\u5206"}}}},Fera.InactivityDetector=function(e){e=e||{};var t,i=this,r=!1,n=Fera.Util.$(),a=void 0===e.reactToWindowBlurs||e.reactToWindowBlurs,s=[],o=[],c=[],l=!0;i.hadInteraction=!1;var d=function(){e.timeLimit=e.timeLimit||6e4,f()};i.attachToFrames=function(){for(var t=0;t0)return!1;if("number"==typeof e)return!1;for(var t in e)if(e[t])return!1;return!0},Fera.Liquid.extensions.stringTools={},Fera.Liquid.extensions.stringTools.capitalize=function(e){return e.charAt(0).toUpperCase()+e.substring(1).toLowerCase()},Fera.Liquid.extensions.stringTools.strip=function(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")},Fera.Liquid.extensions.arrayTools={},Fera.Liquid.extensions.arrayTools.last=function(e){return e[e.length-1]},Fera.Liquid.extensions.arrayTools.indexOf=function(e,t){for(var i=0;i=0},function(){var e=!1,t=/xyz/.test((function(){xyz}))?/\b_super\b/:/.*/;this.Class=function(){},this.Class.extend=function(i){function r(){!e&&this.init&&this.init.apply(this,arguments)}var n=this.prototype;e=!0;var a=new this;for(var s in e=!1,i)a[s]="function"==typeof i[s]&&"function"==typeof n[s]&&t.test(i[s])?function(e,t){return function(){var i=this._super;this._super=n[e];var r=t.apply(this,arguments);return this._super=i,r}}(s,i[s]):i[s];return r.prototype=a,r.prototype.constructor=r,r.extend=arguments.callee,r}}.call(Fera.Liquid),Fera.Liquid.Tag=Fera.Liquid.Class.extend({init:function(e,t,i){this.tagName=e,this.markup=t,this.nodelist=this.nodelist||[],this.parse(i)},parse:function(){},render:function(){return""}}),Fera.Liquid.Block=Fera.Liquid.Tag.extend({init:function(e,t,i){this.blockName=e,this.blockDelimiter="end"+this.blockName,this._super(e,t,i)},parse:function(e){this.nodelist||(this.nodelist=[]),this.nodelist.length=0;var t=e.shift();for(e.push("");e.length;){if(/^\{\%/.test(t)){this.whitespaceHandler(t,e);var i=t.match(/^\{\%-?\s*(\w+)\s*(.*?)-?\%\}$/);if(!i)throw"Tag '"+t+"' was not properly terminated with: %}";if(this.blockDelimiter==i[1])return void this.endTag();i[1]in Fera.Liquid.Template.tags?this.nodelist.push(new Fera.Liquid.Template.tags[i[1]](i[1],i[2],e)):this.unknownTag(i[1],i[2],e)}else/^\{\{/.test(t)?(this.whitespaceHandler(t,e),this.nodelist.push(this.createVariable(t))):this.nodelist.push(t);t=e.shift()}this.assertMissingDelimitation()},endTag:function(){},unknownTag:function(e){switch(e){case"else":throw this.blockName+" tag does not expect else tag";case"end":throw"'end' is not a valid delimiter for "+this.blockName+" tags. use "+this.blockDelimiter;default:throw"Unknown tag: "+e}},createVariable:function(e){var t=e.match(/^\{\{-?(.*?)-?\}\}$/);if(t)return new Fera.Liquid.Variable(t[1]);throw"Variable '"+e+"' was not properly terminated with: }}"},render:function(e){return this.renderAll(this.nodelist,e)},renderAll:function(e,t){return Fera.Liquid.extensions.arrayTools.map(e||[],(function(e){var i="";try{i=e.render?e.render(t):e}catch(e){i=t.handleError(e)}return i}))},assertMissingDelimitation:function(){throw this.blockName+" tag was never closed"},whitespaceHandler:function(e,t){"-"==e[2]&&this.nodelist.length>0&&""===this.nodelist[this.nodelist.length-1].trim()&&this.nodelist.pop(),"-"===e[e.length-3]&&t.length>0&&""===t[0].trim()&&t.shift()}}),Fera.Liquid.Document=Fera.Liquid.Block.extend({init:function(e){this.blockDelimiter=[],this.parse(e)},assertMissingDelimitation:function(){}}),Fera.Liquid.Strainer=Fera.Liquid.Class.extend({init:function(e){this.context=e},respondTo:function(e){return!(e=e.toString()).match(/^__/)&&(!Fera.Liquid.extensions.arrayTools.include(Fera.Liquid.Strainer.requiredMethods,e)&&e in this)}}),Fera.Liquid.Strainer.filters={},Fera.Liquid.Strainer.globalFilter=function(e){for(var t in e)Fera.Liquid.Strainer.filters[t]=e[t]},Fera.Liquid.Strainer.requiredMethods=["respondTo","context"],Fera.Liquid.Strainer.create=function(e){var t=new Fera.Liquid.Strainer(e);for(var i in Fera.Liquid.Strainer.filters)t[i]=Fera.Liquid.Strainer.filters[i];return t},Fera.Liquid.Context=Fera.Liquid.Class.extend({init:function(e,t,i){this.scopes=[e||{}],this.registers=t||{},this.errors=[],this.rethrowErrors=i,this.strainer=Fera.Liquid.Strainer.create(this)},get:function(e){return this.resolve(e)},set:function(e,t){this.scopes[0][e]=t},hasKey:function(e){return!!this.resolve(e)},push:function(){var e={};return this.scopes.unshift(e),e},merge:function(e){return Fera.Liquid.extensions.object.update.call(this.scopes[0],e)},pop:function(){if(1==this.scopes.length)throw"Context stack error";return this.scopes.shift()},stack:function(e,t){var i=null;this.push();try{i=e.apply(t||this.strainer)}finally{this.pop()}return i},invoke:function(e,t){return this.strainer.respondTo(e)?this.strainer[e].apply(this.strainer,t):0==t.length?null:t[0]},resolve:function(e){switch(e){case null:case"nil":case"null":case"":return null;case"true":return!0;case"false":return!1;case"blank":case"empty":return"";default:if(/^'(.*)'$/.test(e))return e.replace(/^'(.*)'$/,"$1");if(/^"(.*)"$/.test(e))return e.replace(/^"(.*)"$/,"$1");if(/^(\d+)$/.test(e))return parseInt(e.replace(/^(\d+)$/,"$1"));if(/^(\d[\d\.]+)$/.test(e))return parseFloat(e.replace(/^(\d[\d\.]+)$/,"$1"));if(/^\((\S+)\.\.(\S+)\)$/.test(e)){var t=e.match(/^\((\S+)\.\.(\S+)\)$/),i=parseInt(t[1]),r=parseInt(t[2]),n=[];if(isNaN(i)){var a=this.resolve(t[1]);if(i=parseInt(a),isNaN(i))throw new Error("Incorrect param for range: "+e)}if(isNaN(r)){var s=this.resolve(t[2]);if(r=parseInt(s),isNaN(r))throw new Error("Incorrect param for range: "+e)}for(var o=r-i+1,c=0;c"}}),Fera.Liquid.Condition.operators={"==":function(e,t){return e==t},"=":function(e,t){return e==t},"!=":function(e,t){return e!=t},"<>":function(e,t){return e!=t},"<":function(e,t){return e":function(e,t){return e>t},"<=":function(e,t){return e<=t},">=":function(e,t){return e>=t},contains:function(e,t){return"[object Array]"===Object.prototype.toString.call(e)?Fera.Liquid.extensions.arrayTools.indexOf(e,t)>=0:e.match(t)},hasKey:function(e,t){return Fera.Liquid.extensions.object.hasKey.call(e,t)},hasValue:function(e,t){return Fera.Liquid.extensions.object.hasValue.call(e,t)}},Fera.Liquid.ElseCondition=Fera.Liquid.Condition.extend({isElse:!0,evaluate:function(){return!0},toString:function(){return""}}),Fera.Liquid.Drop=Fera.Liquid.Class.extend({setContext:function(e){this.context=e},beforeMethod:function(){},invokeDrop:function(e){var t=this.beforeMethod();return!t&&e in this&&(t=this[e].apply(this)),t},hasKey:function(){return!0}});var hackObjectEach=function(e){if("function"!=typeof e)throw"Object.each requires first argument to be a function";var t=0,i=arguments[1];for(var r in this){var n=this[r],a=[r,n];a.key=r,a.value=n,e.call(i,a,t,this),t++}return null},split;Fera.Liquid.Template.registerTag("assign",Fera.Liquid.Tag.extend({tagSyntax:/((?:\(?[\w\-\.\[\]]\)?)+)\s*=\s*(.+)/,init:function(e,t,i){var r=t.match(this.tagSyntax);if(!r)throw"Syntax error in 'assign' - Valid syntax: assign [var] = [source]";this.to=r[1],this.from=r[2],this._super(e,t,i)},render:function(e){var t=new Fera.Liquid.Variable(this.from);return Fera.Liquid.extensions.arrayTools.last(e.scopes)[this.to.toString()]=t.render(e),""}})),Fera.Liquid.Template.registerTag("cache",Fera.Liquid.Block.extend({tagSyntax:/(\w+)/,init:function(e,t,i){var r=t.match(this.tagSyntax);if(!r)throw"Syntax error in 'cache' - Valid syntax: cache [var]";this.to=r[1],this._super(e,t,i)},render:function(e){var t=this._super(e);return Fera.Liquid.extensions.arrayTools.last(e.scopes)[this.to]=Fera.Liquid.extensions.arrayTools.flatten([t]).join(""),""}})),Fera.Liquid.Template.registerTag("capture",Fera.Liquid.Block.extend({tagSyntax:/(\w+)/,init:function(e,t,i){var r=t.match(this.tagSyntax);if(!r)throw"Syntax error in 'capture' - Valid syntax: capture [var]";this.to=r[1],this._super(e,t,i)},render:function(e){var t=this._super(e);return Fera.Liquid.extensions.arrayTools.last(e.scopes)[this.to.toString()]=Fera.Liquid.extensions.arrayTools.flatten([t]).join(""),""}})),Fera.Liquid.Template.registerTag("case",Fera.Liquid.Block.extend({tagSyntax:/("[^"]+"|'[^']+'|[^\s,|]+)/,tagWhenSyntax:/("[^"]+"|'[^']+'|[^\s,|]+)(?:(?:\s+or\s+|\s*\,\s*)("[^"]+"|'[^']+'|[^\s,|]+.*))?/,init:function(e,t,i){this.blocks=[],this.nodelist=[];var r=t.match(this.tagSyntax);if(!r)throw"Syntax error in 'case' - Valid syntax: case [condition]";this.left=r[1],this._super(e,t,i)},unknownTag:function(e,t,i){switch(e){case"when":this.recordWhenCondition(t);break;case"else":this.recordElseCondition(t);break;default:this._super(e,t,i)}},render:function(e){var t=this,i=[],r=!0;return e.stack((function(){for(var n=0;na-z_]+)?\s*("[^"]+"|'[^']+'|[^\s,|]+)?/,init:function(e,t,i){this.nodelist=[],this.blocks=[],this.pushBlock("if",t),this._super(e,t,i)},unknownTag:function(e,t,i){Fera.Liquid.extensions.arrayTools.include(["elsif","else"],e)?this.pushBlock(e,t):this._super(e,t,i)},render:function(e){var t=this,i="";return e.stack((function(){for(var r=0;r0;){var a,s=r.shift();if(!(a=r.shift().match(this.tagSyntax)))throw"Syntax Error in tag '"+e+"' - Valid syntax: "+e+" [expression]";var o=new Fera.Liquid.Condition(a[1],a[2],a[3]);o[s](n),n=o}i=n}i.attach([]),this.blocks.push(i),this.nodelist=i.attachment}})),Fera.Liquid.Template.registerTag("ifchanged",Fera.Liquid.Block.extend({render:function(e){var t=this,i="";return e.stack((function(){var r=t.renderAll(t.nodelist,e).join("");r!=e.registers.ifchanged&&(i=r,e.registers.ifchanged=i)})),i}})),Fera.Liquid.Template.registerTag("include",Fera.Liquid.Tag.extend({tagSyntax:/((?:"[^"]+"|'[^']+'|[^\s,|]+)+)(\s+(?:with|for)\s+((?:"[^"]+"|'[^']+'|[^\s,|]+)+))?/,init:function(e,t,i){var r=(t||"").match(this.tagSyntax);if(!r)throw"Error in tag 'include' - Valid syntax: include '[template]' (with|for) [object|collection]";this.templateName=r[1],this.templateNameVar=this.templateName.substring(1,this.templateName.length-1),this.variableName=r[3],this.attributes={};var n=t.match(/(\w*?)\s*\:\s*("[^"]+"|'[^']+'|[^\s,|]+)/g);n&&Fera.Liquid.extensions.arrayTools.each(n,(function(e){e=e.split(":"),this.attributes[Fera.Liquid.extensions.stringTools.strip(e[0])]=Fera.Liquid.extensions.stringTools.strip(e[1])}),this),this._super(e,t,i)},render:function(e){var t=this,i=Fera.Liquid.readTemplateFile(e.get(this.templateName)),r=Fera.Liquid.parse(i),n=e.get(this.variableName||this.templateNameVar),a="";return e.stack((function(){t.attributes.each=hackObjectEach,t.attributes.each((function(t){e.set(t.key,e.get(t.value))})),n instanceof Array?a=Fera.Liquid.extensions.arrayTools.map(n,(function(i){return e.set(t.templateNameVar,i),r.render(e)})):(e.set(t.templateNameVar,n),a=r.render(e))})),a=Fera.Liquid.extensions.arrayTools.flatten([a]).join("")}})),Fera.Liquid.Template.registerTag("unless",Fera.Liquid.Template.tags.if.extend({render:function(e){var t=this,i="";return e.stack((function(){if((n=t.blocks[0]).evaluate(e))for(var r=1;r":">","<":"<",'"':""","'":"'"},size:function(e){return e.length?e.length:0},downcase:function(e){return e.toString().toLowerCase()},upcase:function(e){return e.toString().toUpperCase()},capitalize:function(e){return Fera.Liquid.extensions.stringTools.capitalize(e.toString())},escape:function(e){var t=this;return e.replace(/[&<>"']/g,(function(e){return t._HTML_ESCAPE_MAP[e]}))},h:function(e){var t=this;return e.replace(/[&<>"']/g,(function(e){return t._HTML_ESCAPE_MAP[e]}))},default:function(e,t){return Fera.Liquid.extensions.object.isEmpty(e)?t:e},truncate:function(e,t,i){if(!e||""==e)return"";t=t||50,i=i||"...";e.slice(0,t);return e.length>t?e.slice(0,t)+i:e},truncatewords:function(e,t,i){if(!e||""==e)return"";t=parseInt(t||15),i=i||"...";var r=e.toString().split(" "),n=Math.max(t,0);return r.length>n?r.slice(0,n).join(" ")+i:e},truncate_words:function(e,t,i){if(!e||""==e)return"";t=parseInt(t||15),i=i||"...";var r=e.toString().split(" "),n=Math.max(t,0);return r.length>n?r.slice(0,n).join(" ")+i:e},strip_html:function(e){return e.toString().replace(/<.*?>/g,"")},strip_newlines:function(e){return e.toString().replace(/\n/g,"")},join:function(e,t){return t=t||" ",e.join(t)},split:function(e,t){return t=t||" ",e.split(t)},sort:function(e){return e.sort()},reverse:function(e){return e.reverse()},replace:function(e,t,i){return i=i||"",e.toString().replace(new RegExp(t,"g"),i)},replace_first:function(e,t,i){return i=i||"",e.toString().replace(new RegExp(t,""),i)},newline_to_br:function(e){return e.toString().replace(/\n/g,"
\n")},date:function(e,t){var i;return e instanceof Date&&(i=e),i instanceof Date||"now"!=e||(i=new Date),i instanceof Date||"number"!=typeof e||(i=new Date(1e3*e)),i instanceof Date||"string"!=typeof e||(i=new Date(Date.parse(e))),i instanceof Date?i.strftime(t):e},first:function(e){return e[0]},last:function(e){return(e=e)[e.length-1]},minus:function(e,t){return(Number(e)||0)-(Number(t)||0)},plus:function(e,t){return(Number(e)||0)+(Number(t)||0)},times:function(e,t){return(Number(e)||0)*(Number(t)||0)},divided_by:function(e,t){return(Number(e)||0)/(Number(t)||0)},modulo:function(e,t){return(Number(e)||0)%(Number(t)||0)},map:function(e,t){e=e||[];for(var i=[],r=0;r<']|&(?!([a-zA-Z]+|(#\d+));)/g,(function(e){return t._HTML_ESCAPE_MAP[e]}))},remove:function(e,t){return e.toString().replace(new RegExp(t,"g"),"")},remove_first:function(e,t){return e.toString().replace(t,"")},prepend:function(e,t){return""+(t||"").toString()+(e||"").toString()},append:function(e,t){return""+(e||"").toString()+(t||"").toString()}}),(new Date).strftime||(Date.ext={},Date.ext.util={},Date.ext.util.xPad=function(e,t,i){for(void 0===i&&(i=10);parseInt(e,10)1;i/=10)e=t.toString()+e;return e.toString()},Date.prototype.locale="en-GB",document.getElementsByTagName("html")&&document.getElementsByTagName("html")[0].lang&&(Date.prototype.locale=document.getElementsByTagName("html")[0].lang),Date.ext.locales={},Date.ext.locales.en={a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a %d %b %Y %T %Z",p:["AM","PM"],P:["am","pm"],x:"%d/%m/%y",X:"%T"},"undefined"!=typeof JSON?Date.ext.locales["en-US"]=JSON.parse(JSON.stringify(Date.ext.locales.en)):Date.ext.locales["en-US"]=Date.ext.locales.en,Date.ext.locales["en-US"].c="%a %d %b %Y %r %Z",Date.ext.locales["en-US"].x="%D",Date.ext.locales["en-US"].X="%r",Date.ext.locales["en-GB"]=Date.ext.locales.en,Date.ext.locales["en-AU"]=Date.ext.locales["en-GB"],Date.ext.formats={a:function(e){return Date.ext.locales[e.locale].a[e.getDay()]},A:function(e){return Date.ext.locales[e.locale].A[e.getDay()]},b:function(e){return Date.ext.locales[e.locale].b[e.getMonth()]},B:function(e){return Date.ext.locales[e.locale].B[e.getMonth()]},c:"toLocaleString",C:function(e){return Date.ext.util.xPad(parseInt(e.getFullYear()/100,10),0)},d:["getDate","0"],e:["getDate"," "],g:function(e){return Date.ext.util.xPad(parseInt(Date.ext.util.G(e)/100,10),0)},G:function(e){var t=e.getFullYear(),i=parseInt(Date.ext.formats.V(e),10),r=parseInt(Date.ext.formats.W(e),10);return r>i?t++:0===r&&i>=52&&t--,t},H:["getHours","0"],I:function(e){var t=e.getHours()%12;return Date.ext.util.xPad(0===t?12:t,0)},j:function(e){var t=e-new Date(e.getFullYear()+"/1/1 GMT");t+=6e4*e.getTimezoneOffset();var i=parseInt(t/6e4/60/24,10)+1;return Date.ext.util.xPad(i,0,100)},m:function(e){return Date.ext.util.xPad(e.getMonth()+1,0)},M:["getMinutes","0"],p:function(e){return Date.ext.locales[e.locale].p[e.getHours()>=12?1:0]},P:function(e){return Date.ext.locales[e.locale].P[e.getHours()>=12?1:0]},S:["getSeconds","0"],u:function(e){var t=e.getDay();return 0===t?7:t},U:function(e){var t=parseInt(Date.ext.formats.j(e),10),i=6-e.getDay(),r=parseInt((t+i)/7,10);return Date.ext.util.xPad(r,0)},V:function(e){var t=parseInt(Date.ext.formats.W(e),10),i=new Date(e.getFullYear()+"/1/1").getDay(),r=t+(i>4||i<=1?0:1);return 53==r&&new Date(e.getFullYear()+"/12/31").getDay()<4?r=1:0===r&&(r=Date.ext.formats.V(new Date(e.getFullYear()-1+"/12/31"))),Date.ext.util.xPad(r,0)},w:"getDay",W:function(e){var t=parseInt(Date.ext.formats.j(e),10),i=7-Date.ext.formats.u(e),r=parseInt((t+i)/7,10);return Date.ext.util.xPad(r,0,10)},y:function(e){return Date.ext.util.xPad(e.getFullYear()%100,0)},Y:"getFullYear",z:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+Date.ext.util.xPad(parseInt(Math.abs(t/60),10),0)+Date.ext.util.xPad(t%60,0)},Z:function(e){return e.toString().replace(/^.*\(([^)]+)\)$/,"$1")},"%":function(){return"%"}},Date.ext.aggregates={c:"locale",D:"%m/%d/%y",h:"%b",n:"\n",r:"%I:%M:%S %p",R:"%H:%M",t:"\t",T:"%H:%M:%S",x:"locale",X:"locale"},Date.ext.aggregates.z=Date.ext.formats.z(new Date),Date.ext.aggregates.Z=Date.ext.formats.Z(new Date),Date.ext.unsupported={},Date.prototype.strftime=function(e){this.locale in Date.ext.locales||(this.locale.replace(/-[a-zA-Z]+$/,"")in Date.ext.locales?this.locale=this.locale.replace(/-[a-zA-Z]+$/,""):this.locale="en-GB");for(var t=this;e.match(/%[cDhnrRtTxXzZ]/);)e=e.replace(/%([cDhnrRtTxXzZ])/g,(function(e,i){var r=Date.ext.aggregates[i];return"locale"==r?Date.ext.locales[t.locale][i]:r}));var i=e.replace(/%([aAbBCdegGHIjmMpPSuUVwWyY%])/g,(function(e,i){var r=Date.ext.formats[i];return"string"==typeof r?t[r]():"function"==typeof r?r.call(t,t):"object"==typeof r&&"string"==typeof r[0]?Date.ext.util.xPad(t[r[0]](),r[1]):i}));return t=null,i}),split=split||function(e){var t,i=String.prototype.split,r=/()??/.exec("")[1]===e;return t=function(t,n,a){if("[object RegExp]"!==Object.prototype.toString.call(n))return i.call(t,n,a);var s,o,c,l,d=[],u=(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.extended?"x":"")+(n.sticky?"y":""),p=0;n=new RegExp(n.source,u+"g");for(t+="",r||(s=new RegExp("^"+n.source+"$(?!\\s)",u)),a=a===e?-1>>>0:a>>>0;(o=n.exec(t))&&!((c=o.index+o[0].length)>p&&(d.push(t.slice(p,o.index)),!r&&o.length>1&&o[0].replace(s,(function(){for(var t=1;t1&&o.index=a));)n.lastIndex===o.index&&n.lastIndex++;return p===t.length?!l&&n.test("")||d.push(""):d.push(t.slice(p)),d.length>a?d.slice(0,a):d},String.prototype.split=function(e,i){return t(this,e,i)},t}(),Fera.LocalStorageJar=function(e){var t=this;t.localStorageEnabled=!0,e="string"==typeof e?{namespace:e}:e||{};var i=function(){t.cookieJar=e.cookieJar||new Fera.CookieJar,t.namespace=e.namespace||"Fera",t.localStorageEnabled=Fera.Util.checkLocalStorageEnabled()};t.clear=function(){if(!t.localStorageEnabled)return!0;for(var e=Object.keys(window.localStorage),i=0;i{const i=this.$(t);let r;if(r=i.data("feraMediaGalleryItem")?i:i.find("[data-fera-media-gallery-item]"),!this.$thumbnails.toArray().includes(r.get(0))){if(this.items.push(i),this.$currentItem=this.$currentItem||i,"video"===r.data("feraMediaGalleryItem")){if(!r.attr("src")||r.attr("src")===this.constructor.PLACEHOLDER_THUMB_URL.video){const e=this._createVideoElement(r,!1);e.attr("data-fera-media-gallery-item","video"),e.attr("data-url",r.data("url")),r.get(0).classList.forEach((t=>e.addClass(t))),i.prepend(e),r.remove(),r=e}if(r.siblings("[data-fera-media-gallery-video-play-btn]").length<1){const e=this.$(this._playBtnTpl);i.append(e),e.on("click",(()=>this._showLightbox(i)))}}r.attr("src")||r.attr("src",this.constructor.PLACEHOLDER_THUMB_URL[r.data("feraMediaGalleryItem")||"photo"]||this.constructor.PLACEHOLDER_THUMB_URL.photo),this._isPlaceholderMedia(r.attr("src"))&&i.addClass("fera-mediaViewer-thumbnail--placeholder"),this.$thumbnails.push(r),this._opts.navThumbnails&&(this._renderNav(i.find("[data-fera-media-gallery-item-nav]"),(e=>"prev"===e?this._showPrevThumb():this._showNextThumb())),r.on("swipeLeft",(()=>this._showNextThumb())),r.on("swipeRight",(()=>this._showPrevThumb()))),r.on("click",(e=>{e.preventDefault(),this._showLightbox(i)}))}})),this._hideEmptyThumbnailNav()}_hideEmptyThumbnailNav(){this.items.forEach((e=>{const t=e.find("[data-fera-media-gallery-item-nav]");t.length>0&&(t.css("display",this.items.length<=1?"none":""),this.$currentItem.get(0)!==e.get(0)&&e.hide())}))}_renderNav(e,t){if(!(e.length<1)){if(e.find('[data-fera-media-nav-btn-action="prev"]').length<1){const i=this.$(this._navBtnTpl);i.addClass("fera-media-nav-btn--prev"),i.attr("data-fera-media-nav-btn-action","prev"),i.on("click",(e=>{e.preventDefault(),t("prev")})),e.append(i)}if(e.find('[data-fera-media-nav-btn-action="next"]').length<1){const i=this.$(this._navBtnTpl);i.addClass("fera-media-nav-btn--next"),i.attr("data-fera-media-nav-btn-action","next"),i.on("click",(e=>{e.preventDefault(),t("next")})),e.append(i)}}}_render(){this._rendered=!0,this.$nav=this.$el.find(".fera-media-nav"),this.items.length>1&&this._renderNav(this.$nav,(e=>"prev"===e?this._showPrev():this._showNext())),this.$el.find(".fera-mediaViewer-container").on("click",this._hide.bind(this)),this.$(document).on("keydown",(e=>{if(!this.isShowing)return;const t=e.keyCode||e.which;27===t&&this._hide(),37===t&&this._showPrev(),39===t&&this._showNext()})),this.$closeIcon=this.$el.find(".fera-mediaViewer-close-btn"),this.$closeIcon.on("click",(e=>{e.preventDefault(),e.stopPropagation(),this._hide()}))}_preloadNextPhoto(){if(!this.isShowing)return;if(this._currentItemIndex===this.items.length-1)return;if(!this._$nextItem)return;if(this._$nextItem.length<1)return;const e=this._$nextItem.find("[data-fera-media-gallery-item]");("video"===e.data("feraMediaGalleryItem")?document.createElement("video"):new Image).src=e.data("url")||e.data("videoUrl")||e.data("imageUrl")}_showPrevThumb(){const e=this.$currentItem;this.$currentItem=this._$prevItem,this._swapCurrentThumb(e)}_showNextThumb(){if(!this._opts.navThumbnails)return;const e=this.$currentItem;this.$currentItem=this._$nextItem,this._swapCurrentThumb(e)}_showPrev(){const e=this.$currentItem;this._showLightbox(this._$prevItem),this._swapCurrentThumb(e)}_swapCurrentThumb(e){this._opts.navThumbnails&&e.get(0)!==this.$currentItem.get(0)&&(e.hasClass("fadingIn")||e.addClass("fadingOut").fadeOut(200,(()=>e.removeClass("fadingOut").addClass("fadedOut"))),this.$currentItem.hasClass("fadingOut")||this.$currentItem.addClass("fadingIn").fadeIn(200,(()=>this.$currentItem.removeClass("fadingIn").addClass("fadedIn"))))}_showNext(){const e=this.$currentItem;this._showLightbox(this._$nextItem),this._swapCurrentThumb(e)}get _$prevItem(){return this.$(this.items[this._currentItemIndex<=0?this.items.length-1:this._currentItemIndex-1])}get _$nextItem(){return this.$(this.items[this._currentItemIndex>=this.items.length-1?0:this._currentItemIndex+1])}get _currentItemIndex(){return this.items.indexOf(this.$currentItem)}_showLightbox(e){if(this._rendered||this._render(),(!e||e.length<1)&&(e=this.items[0]),this.isShowing&&this.$currentItem&&e&&this.$currentItem.get(0)===e.get(0))return;const t=e.find("[data-fera-media-gallery-item]");this.$currentLightboxedMedia&&this.$currentLightboxedMedia.remove(),this.$currentItem=e;const i=t.data("feraMediaGalleryItem");if(t.data("imageUrl")||"photo"===i&&t.data("url")){const e=t.data("imageUrl")||t.data("url"),i=t.attr("src"),r=new Image;r.src=e,this.$currentLightboxedMedia=this.$(``),r.addEventListener("load",(()=>{this.$currentLightboxedMedia.attr("src")===i&&(this.$currentLightboxedMedia.removeClass("fera-mediaViewer-media--loading"),this.$currentLightboxedMedia.attr("src",e)),this._preloadNextPhoto()})),this.$currentLightboxedMedia.on("click",(e=>{e.offsetX>.75*this.$currentLightboxedMedia.width()&&this._showNext(),e.offsetX<.25*this.$currentLightboxedMedia.width()&&this._showPrev()}))}else(t.data("videoUrl")||"video"===i&&t.data("url"))&&(this.$currentLightboxedMedia=this._createVideoElement(t),this.$currentLightboxedMedia.attr("autoplay",!0),this._preloadNextPhoto());this.$currentLightboxedMedia.attr("data-id",e.data("id")),this.$currentLightboxedMedia.on("swipeLeft",(()=>this._showNext())),this.$currentLightboxedMedia.on("swipeRight",(()=>this._showPrev())),this.$currentLightboxedMedia.addClass(`fera-mediaViewer-media fera-mediaViewer-media--${i||"photo"}`),this.$el.toggleClass("fera-mediaViewer--showingPlaceholder",this._isPlaceholderMedia(this.$currentLightboxedMedia.attr("src"))),this.$el.removeClass("fera-hidden"),this.$el.find(".fera-mediaViewer").append(this.$currentLightboxedMedia),this.$body.addClass("fera-modal--open"),this.$.contains(document.body,this.$el.get(0))||this.$body.append(this.$el),this.isShowing=!0}_isPlaceholderMedia(e){return!!e.match(/uploads\.fera\..+\/placeholders?(\/|[a-z-_]*\.[a-z]+)/)}_createVideoElement(e,t=!0){const i=e.data("videoUrl")||e.data("url"),r=this._getVideoType(i);let n;return n="url"!==r?this.$(this.getImportedVideoTpl(i,r)):this.$(`
"),this.$el=this.$(e.settings.target_selector).replaceWith(this.$movePlaceHolder)):(this.$el=this.$(e.html.replace(//g,"").trim()),this.$el.attr("data-fera-widget",e.widgetId),this.$el.attr("data-fera-skill",e.widgetId))}update(e){return this.isStillThere()?this._updateBlock(e):this.run(e),!0}remove(){this.$el.remove(),this.$movePlaceHolder&&this.$movePlaceHolder.replaceWith(this.$el)}_updateBlock(e){"move"!==e.settings.target_action&&"hide"!==e.settings.target_action&&this.$el.html(this.$(e.html.replace(//g,"").trim()).html())}},Fera.Actions.CustomBlocks.AppendAction=class extends Fera.Actions.CustomBlocks.Base{makeChange(){this.$targetEl.append(this.$el)}isStillThere(){return this.$.contains(this.$targetEl.get(0),this.$el.get(0))}},Fera.Actions.CustomBlocks.HideAction=class extends Fera.Actions.CustomBlocks.Base{makeChange(){this.$targetEl.hide()}isStillThere(){return"none"==this.$targetEl.css("display")}remove(){this.$targetEl.show()}},Fera.Actions.CustomBlocks.InsertAfterAction=class extends Fera.Actions.CustomBlocks.Base{makeChange(){this.$targetEl.after(this.$el)}isStillThere(){return this.$.contains(this.$targetEl.parent().get(0),this.$el.get(0))}refreshOnTargetChange(){return!0}},Fera.Actions.CustomBlocks.InsertBeforeAction=class extends Fera.Actions.CustomBlocks.Base{makeChange(){this.$targetEl.before(this.$el)}isStillThere(){return this.$.contains(this.$targetEl.parent().get(0),this.$el.get(0))}refreshOnTargetChange(){return!0}},Fera.Actions.CustomBlocks.PrependAction=class extends Fera.Actions.CustomBlocks.Base{makeChange(){this.$targetEl.prepend(this.$el)}},Fera.Actions.CustomBlocks.ReplaceAction=class extends Fera.Actions.CustomBlocks.Base{makeChange(){this.$oldElement=this.$targetEl.replaceWith(this.$el)}remove(){this.$el.replaceWith(this.$oldElement),super.remove()}},Fera.Actions.CustomBlocks.ReplaceContentAction=class extends Fera.Actions.CustomBlocks.Base{makeChange(){this.$targetEl.empty(),this.$targetEl.append(this.$el)}},Fera.CustomContainer=function CustomContainer(opts){opts=opts||{};var self=this,$=Fera.Util.$(),campaignSettings,ran=!1,registeredEngagement=!1,keyNamespace,feraSkill,eventPrefix,previousSection,previousProductIdOrContext,actions=new Fera.ActionCollection,triggered=!1,triggerDelay,init=function(){self.$globalTopContainer=opts.container.$container,self.$container=$(''),self.$container.appendTo(self.$globalTopContainer)};this.create=function(jsonResponse,removeCallback,afterCreate,beforeRun){ran=!1;var continueCreate=!0;assignLocalVarsFromServer(jsonResponse),triggerBeforeCreateEvents(eventPrefix),eval(self.lastDisplayerResponse.js),"function"==typeof FeraWidget?feraSkill=new FeraWidget(self):"function"==typeof FeraSkill&&(feraSkill=new FeraSkill(self)),prepare(feraSkill,(function(e,t){return self.removed?(afterCreate&&afterCreate(!1),!1):!1===e?(Fera.logger.log("Widget hidden by beforeRender",t,self),self.createInProgress=!1,afterCreate&&afterCreate(!1),!1):void generateStateVars((function(){if(self.removed)return afterCreate&&afterCreate(!1),!1;if(!self.isPreview&&opts.app.storeSettings.use_client_side_processing){if(!checkConditions())return self.createInProgress=!1,afterCreate&&afterCreate(!1),!1;if(!checkAbTests())return self.createInProgress=!1,afterCreate&&afterCreate(!1),!1}!self.html&&self.lastDisplayerResponse.renders_template_client_side&&_renderTemplate(),setupShopperActionTriggers(),setupTriggerDelays(),waitForRun((function(){if(self.removed)return afterCreate&&afterCreate(!1),!1;beforeRun&&beforeRun(),feraSkill&&feraSkill.run&&(continueCreate=feraSkill.run()),!1!==continueCreate?(Fera.Util.showWithoutTransform(self.$container),campaignSettings.target_selector&&pullElementsFromTarget(),self.isPreview||(markSeen(),self.registerEngagement(jsonResponse.campaign_id)),triggerAfterCreateEvents(eventPrefix),feraSkill&&feraSkill.afterCreate&&feraSkill.afterCreate(),self.$el&&-1===["replace","replace_content"].indexOf(campaignSettings.integration_selector_action)&&self.$el.each((function(e,t){Fera.Util.onRemove(t,removeCallback||function(){})})),afterCreate&&afterCreate(!0)):(opts.logger.log("Creation blocked by Fera widget returned response.",feraSkill),afterCreate&&afterCreate(!1)),self.createInProgress=!1}))}))}))};var assignLocalVarsFromServer=function(e){self.lastDisplayerResponse=e,(campaignSettings=self.lastDisplayerResponse.settings).id=self.lastDisplayerResponse.campaign_id,self.app=opts.app,self.api=opts.api,self.adminMode=opts.adminMode,self.memory=new Fera.SkillsLocalStorage({logger:opts.logger,cookieJar:opts.cookieJar,namespace:keyNamespace}),self.localStorage=self.memory,self.lastDisplayerResponse.html&&(self.html=self.lastDisplayerResponse.html),self.options=self.settings=campaignSettings,self.storeSettings=self.app.storeSettings||self.lastDisplayerResponse.store||self.lastDisplayerResponse.store_settings||{},self.widgetId=self.skillId=self.lastDisplayerResponse.campaign_id,self.isPreview=e.isPreview||opts.optionsParser.getPreviewId()==self.widgetId,self.type=self.lastDisplayerResponse.type,self.context=self.lastDisplayerResponse.context,previousSection=opts.app.getSection(),previousProductIdOrContext=opts.app.getProductId()||self.context,keyNamespace="Fera.Widget."+self.widgetId,eventPrefix="widget."+self.widgetId};self.needsUpdate=function(){return!(self.settings&&!self.settings.needs_updates)||(opts.app.getSection()!=previousSection||(opts.app.getProductId()||self.context)!=previousProductIdOrContext)};var triggerBeforeCreateEvents=function(e){triggerFeraEvent(e+".create:before"),triggerFeraEvent("widget.create:before"),triggerEvent("Fera.Skill."+self.widgetId+"-create-before"),triggerEvent("fera-skill-create-before"),triggerFeraEvent(e.replace("widget","skill")+".create:before"),triggerFeraEvent("skill.create:before")},triggerAfterCreateEvents=function(e){triggerFeraEvent(e+".create"),triggerFeraEvent(e+".create:after"),triggerFeraEvent("widget.create"),triggerFeraEvent("widget.create:after"),triggerEvent("Fera.Skill."+self.widgetId+"-create-after"),triggerEvent("fera-skill-create-after"),triggerFeraEvent("skill.create"),triggerFeraEvent("skill.create:after"),triggerFeraEvent(e.replace("widget","skill")+".create"),triggerFeraEvent(e.replace("widget","skill")+".create:after")},prepare=function(e,t){return self.lastDisplayerResponse.renders_template_client_side&&e?e.beforeRender?(self.renderInProgress=new Date,e.beforeRender((function(e,i){delete self.renderInProgress,!1===e?t(!1,i):(self.vars=e,t())}))):void t():t()},checkConditions=function(){return!self.lastDisplayerResponse.conditions||new Fera.Conditions_Evaluator(self.lastDisplayerResponse.conditions,self.vars).isTrue()},checkAbTests=function(){return!self.app.abTests||(!!self.app.abTests.onFor(self.skillId)||(opts.logger.log("Widget blocked by AB Test running (wait 15min if recently changed).",self),!1))},generateStateVars=function(e){opts.app.getState((function(t){self.vars=$.extend({},{options:self.options,store:self.storeSettings,shopper:{location:t.location,customer_id:t.customer_id}},t,self.vars||{}),e(self.vars)}))},_renderTemplate=function(){var e=self.options.template;if(!e||""===e.trim())return"";try{var t=e.replace(new RegExp(/\s*({%-)/g,"g"),"{%").replace(new RegExp(/(-%})\s*/,"g"),"%}");self.lastDisplayerResponse.html=self.html=Fera.Liquid.parse(t).render(self.vars)}catch(t){if(opts.debugMode)throw t;console.error(t),self.lastDisplayerResponse.html=self.html=e}};this.isTransient=function(){return self.lastDisplayerResponse.transient},this.registerEngagement=function(e){if(e=e||self.widgetId,!self.isTransient())return!registeredEngagement&&!0!==self.skipRegisterEngagement&&!opts.testMode&&(opts.engagementTracker&&opts.engagementTracker.register(e),registeredEngagement=!0,!0)};var canRunWithoutRepeating=function(){if(self.isPreview)return!0;if(!campaignSettings.trigger_repeat)return!0;var e=self.memory.get("last_seen");if(!e)return!0;var t=parseInt(e)+1e3*parseInt(campaignSettings.trigger_repeat);return(new Date).getTime()>t},markSeen=function(){self.memory.set("last_seen",(new Date).getTime())};this.getState=opts.app.getState,this.update=function(e,t){if(!self.removed)if(ran){self.lastDisplayerResponse=e,campaignSettings=self.lastDisplayerResponse.settings,self.lastDisplayerResponse.html&&(self.html=self.lastDisplayerResponse.html),self.settings=self.options=campaignSettings,triggerEvent("Fera.Skill."+e.campaign_id+"-update-before"),triggerEvent("fera-skill-update-before");var i=!0;waitForRun((function(){if(self.removed)return t&&t(!1),!1;generateStateVars((function(){if(self.removed)return t&&t(!1),!1;if(!self.isPreview&&opts.app.storeSettings.use_client_side_processing){if(!checkConditions())return t&&t(!1),!1;if(!checkAbTests())return t&&t(!1),!1}!self.lastDisplayerResponse.html&&self.lastDisplayerResponse.renders_template_client_side&&_renderTemplate(),updateActions(),feraSkill&&feraSkill.update&&(i=feraSkill.update()),!1!==i?(triggerFeraEvent(eventPrefix+".update"),triggerEvent("Fera.Skill."+e.campaign_id+"-update-after"),triggerEvent("fera-skill-update-after"),triggerFeraEvent(eventPrefix.replace("widget","skill")+".update"),feraSkill&&feraSkill.afterUpdate&&feraSkill.afterUpdate(),t&&t(!0)):(opts.logger.log("Update blocked by Fera Widget",feraSkill),t&&t(!1))}))}))}else t&&t(!1)},this.hide=function(){self.$container&&self.$container.hide()},this.remove=function(){self.removed||(self.removed=!0,self.$el&&self.$el.each((function(e,t){Fera.Util.disconnectRemoveHandlers(t)})),feraSkill&&feraSkill.remove&&feraSkill.remove(),actions.remove(),self.$container.remove())},this.triggerWidget=function(){return!triggered&&(!self.removed&&(triggered=!0,!0))},this.triggerSkill=this.triggerWidget;var setupTriggerDelays=function(){if(campaignSettings.trigger_value&&-1!==["after_time_on_page","after_time_on_site","after_inactive_time_on_page","after_time_since_first_seen"].indexOf(campaignSettings.trigger))if("string"==typeof campaignSettings.trigger_value)if(campaignSettings.trigger_value.match(/^[0-9]+$/))triggerDelay=parseInt(campaignSettings.trigger_value);else{var e=0,t=15;"random_1_to_15_sec"===campaignSettings.trigger_value||("random_15_to_60_sec"===campaignSettings.trigger_value?(e=15,t=60):"random_1_to_5_min"===campaignSettings.trigger_value?(e=60,t=900):Fera.logger.warn("Widget settings for trigger random range are invalid. Fell back on 1-15 seconds range.",campaignSettings)),(triggerDelay=Math.round(Math.random()*t)+e)<1&&(triggerDelay=1)}else triggerDelay=parseInt(campaignSettings.trigger_value)},setupShopperActionTriggers=function(){if("on_exit_intent"===campaignSettings.trigger)Fera.ExitIntentDetector&&new Fera.ExitIntentDetector({onExitIntent:self.triggerWidget});else if(-1!==["on_click","on_mouseenter","on_mouseleave"].indexOf(campaignSettings.trigger)){var e=campaignSettings.trigger.replace("on_","");$(campaignSettings.trigger_value).on(e,self.triggerWidget)}},waitForRun=function(e){if(ran)return e();if("custom_action"==self.type||"change_block"==self.type)return e();if(!1===runActions())return self.remove(),e();if(ran)return e();var t=setInterval((function(){if(!self.removed)return runActions(),ran?(clearInterval(t),e()):void 0;clearInterval(t)}),10)},updateActions=function(){foreachTargetEl((function(e,t){if(!self.removed){var i=actions.get(t);if(i){if(i.$targetEl.get(0)!==e.get(0)){if(!i.refreshOnTargetChange())return;i.$targetEl=e}i.update(self),e.data("feraFoundExisting",!0)}}})),foreachTargetEl((function(e){if(e.data("feraFoundExisting"));else{var t=createNewAction(e);actions.add(t),t.run(self.lastDisplayerResponse)}e.data("feraFoundExisting",null)})),pullElementsFromActions()},triggerConditionsMet=function(){if(triggered)return!0;if(self.isPreview&&opts.app.sandboxMode)return!0;if(!campaignSettings.trigger||"on_load"===campaignSettings.trigger)return!0;if("after_time_on_page"===campaignSettings.trigger){if(opts.timeTracker&&opts.timeTracker.getTimeOnCurrentPage()>=triggerDelay)return!0}else if("after_time_on_site"===campaignSettings.trigger){if(opts.timeTracker&&opts.timeTracker.getSessionTime()>=triggerDelay)return!0}else if("after_inactive_time_on_page"===campaignSettings.trigger){if(opts.timeTracker&&opts.timeTracker.getInactiveTimeOnPage()>=triggerDelay)return!0}else{if("after_time_since_first_seen"!==campaignSettings.trigger)return-1===["manual","on_click","on_mouseenter","on_mouseleave","on_exit_intent"].indexOf(campaignSettings.trigger)&&(Fera.logger.logWarning("Unknown trigger conditions so triggering now.",campaignSettings,self),!0);if(opts.timeTracker&&opts.timeTracker.getTimeSinceFirstSeen()>=triggerDelay)return!0}return!1},runActions=function(){if(triggerConditionsMet()&&canRunWithoutRepeating()){if(new Fera.IntegrationLocator(opts.app).repositionWidget(campaignSettings,self.context),"tag"==campaignSettings.integration_mode&&(campaignSettings.integration_selector_action="replace_content"),campaignSettings.integration_selector&&campaignSettings.integration_selector_action){if(!1===createActions())return!1}else{if(!campaignSettings.has_location_on_page&&"custom_popup"!=self.type&&"custom_push_notif"!=self.type)return!1;ran=!0}actions.run(self),pullElementsFromActions()}},pullElementsFromActions=function(){self.$el=$([]),actions.each((function(e){e.$el&&(self.$el=self.$el.add(e.$el))})),self.$el.data("fera-preview-container")&&1===self.$el.children().length&&(self.$el=self.$el.children()),self.$el.attr("data-fera-widget",self.widgetId),self.$el.attr("data-fera-skill",self.widgetId)},pullElementsFromTarget=function(){var e=$(campaignSettings.target_selector);e&&(self.$el=self.$el||$([]),self.$el=self.$el.add(e),self.$el.attr("data-fera-widget",self.widgetId),self.$el.attr("data-fera-skill",self.widgetId))},foreachTargetEl=function(e){var t=$(campaignSettings.integration_selector);if(t.length<1)return!1;t.each((function(t){var i=$(this);e(i,t)}))},createActions=function(){if(!self.lastDisplayerResponse.html)return!1;var e=!1;if(!1===foreachTargetEl((function(t){var i=createNewAction(t);i&&(actions.add(i),e=!0)}))&&self.isPreview)return!1;e&&(ran=!0)},createNewAction=function(e){var t=campaignSettings.integration_selector_action;return"insert_after"===t?new Fera.Actions.CustomBlocks.InsertAfterAction(e):"insert_before"===t?new Fera.Actions.CustomBlocks.InsertBeforeAction(e):"append_to"===t?new Fera.Actions.CustomBlocks.AppendAction(e):"prepend_to"===t?new Fera.Actions.CustomBlocks.PrependAction(e):"replace"===t?new Fera.Actions.CustomBlocks.ReplaceAction(e):"replace_content"===t?new Fera.Actions.CustomBlocks.ReplaceContentAction(e):(opts.logger.error("Unknown integration selector location configured.",campaignSettings),null)},triggerEvent=function(e){!function(t){try{t(document).trigger(e,self)}catch(e){opts.logger.error(e),opts.adminMode&&opts.optionsParser.hasPreviewFilterById()&&alert("Your custom widget produced an error: "+e.message+" (see console for more info).\n\n**THIS MESSAGE WILL NOT APPEAR TO YOUR SHOPPERS ***")}}($)},triggerFeraEvent=function(e){try{opts.app.trigger(e,self)}catch(e){opts.logger.error(e),opts.adminMode&&opts.optionsParser.hasPreviewFilterById()&&alert("Your custom widget produced an error: "+e.message+" (see console for more info).\n\n**THIS MESSAGE WILL NOT APPEAR TO YOUR SHOPPERS ***")}};init()},Fera.IntegrationLocator=class{constructor(e){this.$=Fera.Util.$(),this.app=e}repositionWidget(e,t){const i=new Date(e.updated_at),r=new Date("2021-02-18T19:10:00.000Z");let n=null==e.integration_mode&&null==e.integration_selector;if(n=n||"preset"===e.integration_mode&&i>r,n){const i=this.findBestLocation(e.presets,t);i?(e.designer_css=this._applyDefaultDesignerCss(e,i),"product_view"==this.app.getSection()&&t&&this.app.getProductId()==t?e.integration_selector=i.selector:e.integration_selector=this._applyContext(i.selector,t),e.integration_selector_action=i.action||"insert_after"):e.integration_selector=this._applyContext(e.integration_selector,t)}else if("chooser"==e.integration_mode){const i=(e.integration_selector||"").split(",").map((e=>e.trim()));if("product_view"==this.app.getSection()&&t&&this.app.getProductId()==t);else{const r=this._applyContext(e.integration_selector,t)||"";r.split(",").map((e=>e.trim())).forEach((e=>{i.some((t=>e==t))||i.push(r)}))}e.integration_selector=i.join(", ")}else e.integration_selector=this._applyContext(e.integration_selector,t,!1)}findBestLocation(e,t){if(!e)return null;let i=e[this.app.getSection()]||[];i=i.concat(e.any||[]);const r=this.constructor.PRESET_LOCATIONS;for(const e of i)for(const i of r[e]){let e=i.selector;"product_view"==this.app.getSection()&&this.app.getProductId()==t||(e=this._applyContext(e,t));const r=this.$(e);if(1===r.length||r.length>0&&i.multi)return i}return null}_applyDefaultDesignerCss(e,t){if(null!=e.integration_mode&&"preset"!=e.integration_mode)return e.designer_css;if(null!=e.integration_selector&&"preset"!=e.integration_mode)return e.designer_css;if(null!=e.designer_css)return e.designer_css;if(null==t.custom_styler)return null;const i=t.custom_styler.map((t=>""+(0===t.id.indexOf("container_")?`.fera-widget-${e.id} { ${t.values.map((e=>`${e.attribute}: ${e.value};`)).join("\n")} }`:""))).join("\n");if(this.$(`#widget-${e.id}-defaultDesignerCss`).length>0)return i;const r=``;return this.$("body").append(r),i}_applyContext(e,t,i=!0){if(!t||e.includes("[data-product_id='"))return e;const r=[`${e}[data-product_id='${t}']`];return i?(r.push(`[data-product='${t}'] ${e}`),r.push(`[data-product-id='${t}'] ${e}`)):(r.push(r[0].replace("product_id","product-id")),r.push(r[0].replace("product_id","product"))),r.join(", ")}static selectorIsPreset(e){const t=this.PRESET_LOCATIONS;for(const i in t)if("string"==typeof i)for(const r of t[i])if(e===r.selector)return!0;return!1}static get PRESET_LOCATIONS(){const e={id:"container_margin",values:[{id:"campaign_container_margin_margin_top",value:"6px",attribute:"margin-top"},{value:"inline-block",attribute:"display"}]},t={id:"container_margin",values:[{id:"campaign_container_margin_margin_top",value:"32px",attribute:"margin-top"},{id:"campaign_container_margin_margin_left",value:"auto",attribute:"margin-left"},{id:"campaign_container_margin_margin_right",value:"auto",attribute:"margin-right"}]},i={id:"container_padding",values:[{id:"campaign_container_padding_padding_left",value:"16px",attribute:"padding-left"},{id:"campaign_container_padding_padding_right",value:"16px",attribute:"padding-right"}]},r={id:"container_margin",values:[{id:"campaign_container_margin_margin_bottom",value:"60px",attribute:"margin-bottom"}]},n={id:"container_margin",values:[{id:"campaign_container_margin_margin_bottom",value:"32px",attribute:"margin-bottom"}]},a={id:"container_margin",values:[{id:"campaign_container_margin_margin_top",value:"72px",attribute:"margin-top"},{id:"campaign_container_margin_margin_left",value:"auto",attribute:"margin-left"},{id:"campaign_container_margin_margin_right",value:"auto",attribute:"margin-right"}]},s={id:"container_max_width",values:[{id:"campaign_container_width_max_width",value:"1200px",attribute:"max-width"}]};return{page:[{selector:"main",action:"append_to",custom_styler:[s,i,a]},{selector:"body",action:"append_to",custom_styler:[s,i,a]}],"add to cart button":[{selector:'form[action~="/cart/add"] .product-single__add-to-cart',action:"insert_before",custom_styler:[e]},{selector:'form[action~="/cart/add"] button[type=submit]',action:"insert_before",custom_styler:[e]},{selector:'form[action~="/cart/add"] input[type=submit]',action:"insert_before",custom_styler:[e]},{selector:".product-form__cart-submit",action:"insert_before",custom_styler:[e]},{selector:".add-to-cart",action:"insert_before",custom_styler:[e]},{selector:".addToCart",action:"insert_before",custom_styler:[e]},{selector:".add_to_cart",action:"insert_before",custom_styler:[e]},{selector:"#addToCart",action:"insert_before",custom_styler:[e]},{selector:"#add-to-cart",action:"insert_before",custom_styler:[e]},{selector:"#add_to_cart",action:"insert_before",custom_styler:[e]},{selector:".add-to-cart input.button",action:"insert_before",custom_styler:[e]},{selector:".btn-addtocart",action:"insert_before",custom_styler:[e]},{selector:'[data-hook="add-to-cart"]',action:"insert_before",custom_styler:[e]}],"first shopify section":[{selector:".template-index > #PageContainer.drawer-page-content",action:"insert_after",custom_styler:[r,a]},{selector:"main > .shopify-section:not(#shopify-section-header):not(#shopify-section-footer):first",action:"insert_before",custom_styler:[r,a]},{selector:"body > .shopify-section:not(#shopify-section-header):not(#shopify-section-footer):first",action:"insert_before",custom_styler:[r,a]},{selector:"#shopify-section-header",action:"insert_after",custom_styler:[r,a]},{selector:"main#MainContent",action:"prepend_to",custom_styler:[r,a]},{selector:"main section:first-of-type",action:"insert_after",custom_styler:[r,a]}],"last shopify section":[{selector:".template-index .drawer-page-content main",action:"insert_after",custom_styler:[r,a]},{selector:"main > .shopify-section:not(#shopify-section-header):not(#shopify-section-footer):last",action:"insert_after",custom_styler:[r,a]},{selector:"body > .shopify-section:not(#shopify-section-header):not(#shopify-section-footer):last",action:"insert_after",custom_styler:[r,a]},{selector:"main#MainContent",action:"append_to",custom_styler:[r,a]},{selector:"#shopify-section-footer",action:"insert_before",custom_styler:[r,a]},{selector:"main section:last-of-type",action:"insert_after",custom_styler:[r,a]},{selector:"#SITE_PAGES > #SITE_PAGES_TRANSITION_GROUP > div:last-child",action:"append_to",custom_styler:[s,i,a]},{selector:"#SITE_PAGES",action:"append_to",custom_styler:[s,i,a]}],"first header":[{selector:"h1",custom_styler:[e,n,{id:"container_margin",values:[{id:"campaign_container_margin_margin_left",value:"auto",attribute:"margin-left"},{id:"campaign_container_margin_margin_right",value:"auto",attribute:"margin-right"}]}]}],"cart form":[{selector:'form[action~="/cart"]'}],"cart footer":[{selector:".cart__footer",action:"insert_before"}],"cart header":[{selector:".cart-header",action:"insert_before",custom_styler:[n]}],"checkout button":[{selector:'form[action~="/cart"] .cart-footer .btn-group'},{selector:" .cart__submit-controls"}],"checkout footer":[{selector:".edit_checkout .step__footer"}],"checkout total":[{selector:".sidebar .total-line-table"}],"product title":[{selector:'[data-hook="product-title"]',action:"insert_after"}],"product content":[{selector:".product__content .grid",action:"insert_after",custom_styler:[t]},{selector:".product__content .grid .grid__item",action:"append_to",custom_styler:[t]},{selector:'[data-section-id="product-template"] .product-single + .product-single__description',custom_styler:[a]},{selector:'[data-section-id="product-template"] .product-single',custom_styler:[a]},{selector:".shopify-section .product.grid",custom_styler:[a]},{selector:".product-page > .wrapper > .grid.product-single",custom_styler:[a]},{selector:".grid.product-single",custom_styler:[a]},{selector:"#shopify-section-product-template",action:"insert_after",custom_styler:[{id:"container_padding",values:[{id:"campaign_container_padding_padding_bottom",value:"60px",attribute:"padding-bottom"}]},a]},{selector:".index-section--featured-product",custom_styler:[a]},{selector:'[data-section-id="product"]', action:"insert_after",custom_styler:[t]},{selector:'[data-hook="product-page"]',action:"append_to",custom_styler:[a]},{selector:'[data-hook="bottom-placeholder"]',action:"append_to",custom_styler:[s,i,a]}],"product description":[{selector:"#shopify-product-reviews",action:"replace"},{selector:" .product-single__description",action:"insert_before"},{selector:'[data-hook="description"]',action:"insert_before"}],"before footer":[{selector:"#SITE_PAGES > #SITE_PAGES_TRANSITION_GROUP > div:last-child",action:"append_to",custom_styler:[s,i,a]},{selector:"#SITE_PAGES > div:last-child",action:"append_to",custom_styler:[s,i,a]},{selector:"main section:last-of-type",action:"insert_after",custom_styler:[s,i,a]},{selector:"body > section:last-of-type",action:"insert_after",custom_styler:[s,i,a]},{selector:"footer",action:"insert_before",custom_styler:[s,i,a]},{selector:"#SITE_PAGES_TRANSITION_GROUP",action:"append_to",custom_styler:[s,i,a]},{selector:"#SITE_PAGES",action:"append_to",custom_styler:[s,i,a]}],footer:[{selector:'[data-section-id="footer"] .site-footer__content',action:"insert_after"},{selector:"footer > .site-footer__linklist",action:"insert_after"},{selector:"footer .grid-uniform",action:"insert_before"},{selector:"footer .footer__content",action:"insert_before"},{selector:"footer .hr--small",action:"insert_before"},{selector:"footer .site-footer__bottom",action:"insert_before"},{selector:"footer .flex-footer",action:"insert_before"},{selector:'[data-section-id="footer"] .grid:last',action:"insert_before"},{selector:"footer .footer__blocks-wrapper",action:"insert_before"},{selector:"#SITE_FOOTERinlineContent",action:"prepend_to"}],"bottom of product list items":[{selector:'[data-container_type="list"]',action:"append_to",multi:!0},{selector:'[data-hook="product-item-product-details"]',action:"append_to",multi:!0},{selector:'[data-hook="product-widget-layout"] [data-hook="product-details"]',action:"append_to",multi:!0},{selector:'[data-hook="product-item-name-and-price-layout"]',action:"append_to",multi:!0}],"bottom of product content":[{selector:'#shopify-section-product-template [data-section-id="product-template"][itemscope][itemtype="http://schema.org/Product"]',action:"append_to"},{selector:'#shopify-section-product-template [data-section-id="product-template"][itemscope][itemtype="https://schema.org/Product"]',action:"append_to"},{selector:'[data-hook="bottom-placeholder"]',action:"append_to",custom_styler:[s,i,a]},{selector:"#SITE_PAGES > #SITE_PAGES_TRANSITION_GROUP > div:last-child",action:"append_to",custom_styler:[s,i,a]},{selector:"#SITE_PAGES > div:last-child",action:"append_to",custom_styler:[s,i,a]}]}}},Fera.AntiSpySupport=class{constructor(e){this._opts=e,this.removeSpies(),setInterval((()=>this.removeSpies()),5e3)}removeSpies(){F$(".ppspy-message").parents(".extension-container").remove(),F$("#shopify-raise-container, #shopify-Hunt-container").remove()}},Fera.InstantClickSupport=function(e){var t=Fera.Util.$();e=e||{};var i=function(){"undefined"!=typeof InstantClick&&(e.logger.log("Instant Click was detected, so support module was loaded."),r())},r=function(){InstantClick.on("change",(function(){var i=t(".banana-view-container").first(),r=e.app.getProductId();if(i&&i.length>0){var n=i.data("product_id");e.app.push("setProductId",{id:n})}else r&&e.app.push("setProductId",{id:null});e.app.refreshContent()}))};i()},Fera.ShogunSupport=class{constructor(e){return this._opts=e,this.$=Fera.Util.$(),this.isReady=!1,"undefined"==typeof __shgProductInits?this._ready():(Fera.logger.log("Shogun page was detected, so support module was loaded."),__shgProductInits.length<1?this._ready():(this._shogunProductData=__shgProductInits[0],void this._fetchProductData()))}_ready(){this.isReady=!0}_fetchProductData(){if(!this._shogunProductData)return this._ready();var e="/products/"+this._shogunProductData.productHandle+".js";this.$.ajax({url:e,method:"GET",type:"GET",dataType:"json",success:e=>{e&&e.id&&(this._opts.app.setProductId(e.id),this._opts.app.setSection("product_view")),this._ready()},error:()=>{this._ready()}})}},Fera.WeglotSupport=function(e){Fera.Util.$();e=e||{};var t=function(){"undefined"!=typeof Weglot&&(e.logger.log("Weglot was detected, so support module was loaded."),i())},i=function(){Weglot.on("languageChanged",(function(t){e.app.setLocale(t),e.app.forceRefreshContent()}))};t()},Fera.SkillsLocalStorage=function(e){var t,i=this,r=function(){t=new Fera.LocalStorageJar(e),i.memory=t.getObject("memory")||{}};i.set=function(e,t,r){return i.memory[e]={value:t,expiry:o(r)},n(),i},i.get=function(e,t){return void 0===i.memory[e]||s(e)?t:i.memory[e].value},i.reset=function(){return i.memory={},n(),a("Local storage was reset.",e.namespace),i};var n=function(){t.setObject("memory",i.memory)},a=function(){e.logger&&e.logger.log&&-1===Fera.Util.detectBrowser().indexOf("MSIE")&&e.logger.log.apply(this,arguments)},s=function(e){return null!==i.memory[e].expiry&&Date.now()>i.memory[e].expiry},o=function(e){return"number"!=typeof e?null:Date.now()+e};r()},Fera.ActionCollection=class{constructor(){this._actions=[]}add(e){this._actions.push(e)}run(...e){this._actions.forEach((t=>{t.run&&t.run(...e)}))}update(...e){this._actions.forEach((t=>{t.update&&t.update(...e)}))}each(e){this._actions.forEach(e)}remove(...e){this._actions.forEach((t=>{t.remove&&t.remove(...e)}))}get(e){return this._actions[e]}},Fera.Components=Fera.Components||{},Fera.Components.Base=class{constructor(e={}){this._opts=e,this._listeners=e.listeners||e.on||{},this.$globalTopContainer=Fera.Util.$()(".banana-globalTop-container")}on(e,t){return(-1===e.indexOf(" ")?[e]:e.split(" ")).forEach((e=>{this._listeners[e]=this._listeners[e]||[],this._listeners[e].push(t)})),this}render(){setTimeout((()=>this._afterRenderComplete()),1)}_afterRenderComplete(){}clearListeners(e){this._listeners[e]=[]}trigger(e,t){return(-1===e.indexOf(" ")?[e]:e.split(" ")).forEach((e=>{const i=this._listeners[e];!i||i.length<1||i.forEach((e=>{e(this,t)}))})),this}_log(){Fera.logger.log.apply(this,arguments)}_warn(){Fera.logger.warn.apply(this,arguments)}},Fera.Components.BaseModal=class extends Fera.Components.Base{constructor(e){super(e),this.$=Fera.Util.$(),this.titleCaption=e.titleCaption||"",this.classPrefix=e.classPrefix||"fera"}show(){this.rendered||this._render();const e=this.$("body");e.find(`.${this.classPrefix}-fera-modal`).length<1&&e.append(this.$el),this.$el.show()}hide(){this.$el.hide()}_render(){this.$el=this.$(this._tpl()),this.$modal=this.$el.find(".fera-modal"),this.$closeButton=this.$el.find(".fera-modal-close"),this.$modalBody=this.$el.find(".fera-modal-body"),this._setupCloseListeners(),this.rendered=!0}_setupCloseListeners(){this.$closeButton.on("click",(e=>{e.preventDefault(),e.stopPropagation(),this.hide()})),window.onclick=e=>{this.$(e.target).hasClass("fera-modal")&&(e.stopPropagation(),this.hide())}}_tpl(){return``}},Fera.Components.Pagination=class extends Fera.Components.Base{constructor(e){super(e),this.$=Fera.Util.$(),this.app=e.app,this.prefix=e.prefix,this._hideIfOnePage=!1!==this._opts.hideIfOnePage,this._onClick=this._opts.onClick||(()=>{}),this._noNavHelpers=this._opts.noNavHelpers,this.update(this._opts)}render(){return this.prerendered||(this.$el=this.$(this._tpl()),this.rendered=!0,this._initialize()),this.$el}_initialize(){this.$items=this.$el.find(".pagination"),this._updateView()}update(e){this.currentPage=e.currentPage||0,this.totalCount=e.totalCount||0,this.pageSize=e.pageSize||10,this.numPages=this.totalCount>0?Math.ceil(this.totalCount/this.pageSize):0,this.rendered&&this._updateView()}isVisible(){return this.$el.is(":visible")}_updateView(){this.totalCount<1||this._hideIfOnePage&&1==this.numPages?this.$el.hide():this.$el.show(),this._renderItems()}_renderItems(){this.$items.children().remove();const e=2;if(this._noNavHelpers){for(let e=1;e<=this.numPages;e++)this.$items.append(this._renderItem(e,e));return}this.currentPage>e&&this.numPages>e&&this.$items.append(this._renderItem(1,this._first(),"first")),this.currentPage>1&&this.$items.append(this._renderItem(this.currentPage-1,this._prev(),"prev"));const t=Math.max(this.currentPage-e,1),i=Math.min(this.currentPage+e,this.numPages);for(let e=t;e<=i;e++)this.$items.append(this._renderItem(e,e));this.currentPagee&&this.$items.append(this._renderItem(this.numPages,this._last(),"last"))}_renderItem(e,t,i){i=i||"basic";const r=this.currentPage==e?"active":"",n=this.$(this._itemTpl(e,t,i,r));return n.find("a").on("click",(t=>{t.preventDefault(),t.stopPropagation(),n.hasClass("active")||this._onClick(e)})),n}_first(){return this._iconTpl(this._firstIcon())}_last(){return this._iconTpl(this._lastIcon())}_prev(){return this._iconTpl(this._prevIcon())}_next(){return this._iconTpl(this._nextIcon())}_iconTpl(e,t=""){return`${e}`}_firstIcon(){return''}_lastIcon(){return''}_prevIcon(){return''}_nextIcon(){return''}_itemTpl(e,t,i,r){return`
  • \n ${t}\n
  • `}_tpl(){return`\n\n `}},Fera.ClickRegistry=function(e){e=e||{};var t=this,i=Fera.Util.$(),r="ClickEvent",n=!0,a=null,s=["iframe","lang","body","!doctype","doctype","applet","article","aside","audio","basefont","body","br","colgroup","frame","frameset","head","header","html","iframe","p","main","meta","ol","param","script","tr","ul"],o=function(){e.sandboxMode||e.designMode||Fera.Util.isBot()||Fera.Util.isSpeedMode()||window.addEventListener("pagehide",(function(){c()}))};t.isEnabled=function(){return e.app.storeSettings&&e.app.storeSettings.when_to_send_events&&e.app.storeSettings.when_to_send_events.element_click>=0},t.register=function(){if(!t.isEnabled())return;i(document).on("mousedown","*",(function(e){if(void 0!==e.originalEvent&&2!==e.button&&e.target!==a&&-1===s.indexOf(e.target.tagName.toLowerCase())){var r=i(e.target);r.hasClass("fera-highlight-placeholder")||r.find("* > * > * > *").length>0||(l(t.getEventData(e)),a=e.target)}}));const r=1e3*e.app.storeSettings.when_to_send_events.element_click+1;setInterval(d,r),setInterval((function(){a=null}),r+1500)},t.sendElementClick=function(t){e.app.pushEvent({type:"element_click",data:t})},t.getEventData=function(e){var t={};return p(e.target,t),t.client_x=e.pageX,t.client_y=e.pageY,t};var c=function(){n=!1},l=function(t){e.localStorage&&t&&e.localStorage.setObject(r,t)},d=function(){if(n){var i=e.localStorage.getObject(r);i&&(e.localStorage.removeItem(r),t.sendElementClick(i))}},u=function(e){var t=i(e).parents();return!(t.length<1)&&-1!==(t=t.map((function(){return this.tagName})).get()).indexOf("BUTTON")},p=function(e,t){u(e)&&(e=i(e).parents("button")[0]);var r=i(e);g(r,t),t.element_attributes=v(e),t.element_text=w(h(r)),t.element_tag_name=e.tagName,t.element_html=w(f(r)),r.is("select")&&(t.select_options=_(e)),t.element_css_path=m(e)},h=function(e){var t=e.clone();return t.find("style, svg").remove(),t.find(":hidden").remove(),t.text()},f=function(e){var t=e.clone();return t.find(":hidden").remove(),t.html()},m=function(e){var t=new Fera.CssPathGenerator(e,{skipDataAttributes:!0,skipAttributes:!0,skipTags:!0}).getPath();return""!==t||""===(t=new Fera.CssPathGenerator(e,{skipDataAttributes:!0,skipAttributes:!0}).getPath())||""===(t=new Fera.CssPathGenerator(e,{skipDataAttributes:!0}).getPath())?t:t=new Fera.CssPathGenerator(e).getPath()},g=function(e,t){var i=e.data("fera-widget")||e.data("fera-skill");void 0===i&&(i=(i=e.parents("[data-fera-widget],[data-fera-skill]").data("fera-widget"))||e.parents("[data-fera-widget],[data-fera-skill]").data("fera-skill")),void 0!==i&&(t.campaign_id=i,t.created_by="campaign")},v=function(e){var t={};return i.each(e.attributes,(function(){t[w(this.name,50)]=w(this.value)})),t},_=function(e){var t=[];return i.each(e.options,(function(){t.push(this.text)})),t},w=function(e,t){return t=t||300,e.replace(/\s\s+/gm," ").trim().substring(0,t)};o()},Fera.CssPathGenerator=function(e,t){var i=this;t=t||{};var r=Fera.Util.$(),n=r(e).parents(),a=[],s=t.maxDataAttrSize||50,o=function(){};i.getPath=function(){a=[];var t=c(e);return t&&""!==t&&a.push(t),n.each((function(){(t=c(this))&&""!==t&&a.push(t)})),a.slice(0,5).join(" > ")};var c=function(e){var i=r(e),n=t.skipTags?"":e.tagName;n+=l(i.attr("id")),n+=d(i.attr("class"));var a=[];return t.skipAttributes||u(e.attributes,a),t.skipDataAttributes||p(i.data(),a),a.length>0&&(n+=a.slice(0,5).join("")),n},l=function(e){return f(e)?"":"#"+e},d=function(e){return f(e)?"":e.replace(/\s\s+/gm," ").trim().split(" ").map((function(e){return e?"."+e:""})).join("")},u=function(e,t){for(var i=0;i{this.$errorContainer.text(Fera.t("There was an unexpected error. Please try again")).removeClass("fera-hidden"),this.$submitBtn.text(Fera.t("Submit")),this.$submitBtn.prop("disabled",!1),this.opts.app.opts.debugMode&&console.error(e)}},e)}_onCustomerUpdated(e){this.name=e.customer_name,this.email=e.customer_email,this._saveToLocalStorage(),this.successCallback()}_tpl(){return`\n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n\n \n
    \n `}},Fera.ContentSubmission.Customer.KEY="ContentSubmission_Customer",Fera.ContentSubmission=Fera.ContentSubmission||{},Fera.ContentSubmission.Submitter=class{constructor(e={}){this._opts=e,this.$=Fera.Util.$(),this.urlParams=this._opts.app.opts.urlParams||{},this.$body=this.$("body")}show(e={}){this.customerMessageToken=e.cmt||e.customer_message_token||e.customerMessageToken||this.urlParams.cmt||this.urlParams.customer_message_token||this.urlParams.customerMessageToken,this.contentCampaignToken=e.cct||e.content_campaign_token||e.contentCampaignToken||this.urlParams.cct||this.urlParams.content_campaign_token||this.urlParams.contentCampaignToken,this.productId=e.product||e.product_id||e.productId||this._opts.app.opts.detectProductId(),this.prefilledRating=e.rating||this.urlParams.rating,this.prefilledRating=Number(this.prefilledRating),this.orderId=this.urlParams.order||this.urlParams.order_id||this.urlParams.fera_order_id||this.urlParams.fera_order,this.customerName=this._opts.app.opts.detectCustomerName(),this.customerEmail=this._opts.app.opts.detectCustomerEmail(),this.attributionCode=e.attribution_code||e.attributionCode||this.urlParams.attribution_code||this.urlParams.attributionCode,this._edit=e.edit||this.urlParams.edit;const t=this._showLoadingState();this.$loadingStateContainer=t.find(".fera-contentSubmission--loading"),e.rt&&(this._reviewToken=e.rt),this._requestTemplate()}hide(e){this._closeWindow(e)}_requestTemplate(){const e={};if(this.customerMessageToken||this.contentCampaignToken)this.customerMessageToken&&(e.customer_message_token=this.customerMessageToken),this.contentCampaignToken&&(e.content_campaign_token=this.contentCampaignToken);else{const t=this.productId||this._opts.app.getProductId();t&&(e.product_id=t)}this.prefilledRating&&(e.rating=this.prefilledRating,this.customerMessageToken&&(e.customer_message_token=this.customerMessageToken),this.contentCampaignToken&&(e.content_campaign_token=this.contentCampaignToken)),this._opts.visitorId&&(e.visitor_id=this._opts.visitorId),this._reviewToken&&(e.review_token=this._reviewToken),this._autoRequestingStoreReview&&(e.auto_requesting_store_review=this._autoRequestingStoreReview),this.reviewType&&(e.review_type=this.reviewType),this._edit&&(e.edit=!0),this._opts.app.opts.testMode&&(e.test=!0),this.orderId&&(e.order_id=this.orderId),this.customerName&&(e.customer_name=this.customerName),this.customerEmail&&(e.customer_email=this.customerEmail),this._opts.app.opts.debugMode&&(e.debug=!0),this._opts.api.requestContentSubmissionTemplate({params:e,success:e=>this._processTemplateResponse(e),error:()=>this._handTemplateErrorResponse()})}_processTemplateResponse(e){if(e.reviewed||e.no_product){const t=this.$(this._getHtml(e.template)),i=this.$loadingStateContainer.find(".fera-container");return i.html(`\n
    ${t.data("caption-already-submitted-feedback")}
    \n \n `),void i.find("button").on("click",(()=>this._hideLoadingState()))}e.draft_created&&(this.draft_mode=e.draft_created),this._html=this._getHtml(e.template);const t=e.compiled_css;this._products=e.products,this._totalCount=this._products.length,this._edit?this._previousReview=e.previous_review:this._totalCount<1?this._previousReview=e.previous_store_review:this._previousReview=e.previous_product_review,this._shouldAutoRequestStoreReview=e.auto_request_store_review&&!this._edit,this._alreadyReviewedStore=!!e.previous_store_review,this._requestReview=e.request_review,this._requiredReviewFields=e.required_review_fields,this._requestPhoto=(e.request_media||this._requestReview)&&e.allow_photo,this._requestVideo=(e.request_media||this._requestReview)&&e.allow_video,this.videoFiles=[];const i=this._renderTemplate(this._html,t);this._opts.app.opts.testMode&&i.addClass("fera-testMode"),this._loadCustomTitle(i),this._hideLoadingState(!1),this._initElementsAndListeners(i),this._edit&&this._reviewToken&&this.$submissionForm.append(``),this._opts.app.trigger("submitter.show",{submitter:this})}_handTemplateErrorResponse(){const e=this.$loadingStateContainer.find(".fera-container"),t="We're unable to accept your feedback at this time because of an unexpected error.
    Our engineers have been notified and we'll have it fixed in no time. Sorry about that! :(";e.html(`
    ${t}
    `),e.find("button").on("click",(()=>this._hideLoadingState()))}_loadCustomTitle(e){this.customTitle=this._opts.app.opts.feraParams.title||this._opts.app.opts.feraParams.heading||this._opts.app.opts.urlParams.title||this._opts.app.opts.urlParams.heading;const t=e.find(".fera-submissionForm .fera-contentSubmission-title");this.customTitle?t.text(this.customTitle):this._edit&&t.text(t.data("caption-edit"))}_getHtml(e,t={}){if(!e||""===e.trim())return"";try{const i=e.replace(new RegExp(/\s*({%-)/g,"g"),"{%").replace(new RegExp(/(-%})\s*/,"g"),"%}");return t&&Object.keys(t).length>0?Fera.Liquid.parse(i).render(t):i}catch(t){if(this._opts.app.opts.debugMode)throw t;return console.error(t),e}}_renderTemplate(e,t){this.$body.addClass("fera-modal--open");const i=this.$(`
    ${e}
    `);return this.$body.append(i),this.$body.append(``),this._$renderedContainers=this._$renderedContainers||[],this._$renderedContainers.push(i),i}_initElementsAndListeners(e=null){e&&(this.$submissionFormContainer=e.find(".fera-submissionForm"),this.$submissionRewardContainer=e.find(".fera-submissionReward"),this.$submissionSuccessContainer=e.find(".fera-submissionSuccess")),this.$submissionForm=this.$submissionFormContainer.find("form"),this.$submissionFormTitle=this.$submissionFormContainer.find(".fera-contentSubmission-title"),this.$viewTermContainer=this.$submissionFormContainer.find(".fera-contentSubmission-termPreview"),this.$viewTermTitle=this.$submissionFormContainer.find(".fera-contentSubmission-termTitle"),this.$ratingInput=this.$submissionForm.find('[name="fera-rating"]'),this.$summaryInput=this.$submissionForm.find('[name="fera-summary"]'),this.$agreedTermInput=this.$submissionForm.find('[name="fera-agreed-terms"]'),this.$bodyInput=this.$submissionForm.find('[name="fera-body"]'),this.$filesInput=this.$submissionForm.find('[name="fera-files"]'),this.$errorContainer=this.$submissionForm.find(".fera-errorContainer"),this.$noticeContainer=this.$submissionForm.find(".fera-noticeContainer"),this.$translationContainer=this.$submissionForm.find(".fera-translatedStringContainer,.fera-translatedStringContainer"),this.$viewTermBtn=this.$submissionForm.find(".fera-viewTerm-Btn"),this.$closeTermBtn=this.$viewTermContainer.find(".fera-contentSubmission-termPreview-closeBtn"),this.$summaryInput.on("change",(()=>{this.$summaryInput.data("fera-modified",!0)})),this.$agreedTermInput.data("term-enabled")&&this.$agreedTermInput.prop("checked",this.$agreedTermInput.data("checked-by-default")),this.$viewTermBtn.on("click",(e=>{e.preventDefault(),e.stopPropagation(),this.showTermModal()})),this.$closeTermBtn.on("click",(e=>{e.preventDefault(),e.stopPropagation(),this.closeTermModal()})),this.$totalCount=this.$submissionFormContainer.find("[data-fera-contentSubmission-info]"),this.$totalCount.html(`${this._totalCount-this._products.length+1} / ${this._totalCount}`),this._totalCount<=1&&this.$totalCount.hide(),this._initReviewSections(),this._initUploadArea(),this._initSubmitAndReviewNextBtns(),this.prefilledRating&&this._applyRating(null,this.prefilledRating),this.draft_mode&&!this._opts.testMode&&this._initDraftTracking(),this.customer=new Fera.ContentSubmission.Customer(this.$.extend({},this._opts,{$container:this.$submissionFormContainer,$translationContainer:this.$translationContainer})),this.customer.name&&(this.customerName=this.customer.name),this.customer.email&&(this.customerEmail=this.customer.email),this.$submissionFormContainer.find("[data-fera-contentSubmission-closeBtn]").on("click",(e=>this._closeWindow(e))),this.$submissionSuccessContainer.find("[data-fera-contentSubmission-closeBtn]").on("click",(e=>this._closeWindow(e))),this.$submissionSuccessContainer.find("[data-fera-contentSubmission-skipBtn]").on("click",(e=>this._closeWindow(e)))}_initUploadArea(){if(!this.$filesInput.data("media-enabled")||!this._requestPhoto&&!this._requestVideo)return void this.$filesInput.closest(".fera-contentSubmission-formControl-uploadRow").remove();const e=this.$submissionForm.find(".fera-uploadLabel");this._requestVideo&&this._requestPhoto?e.text(e.data("caption-photos-or-videos")):this._requestPhoto?e.text(e.data("caption-photos")):e.text(e.data("caption-videos")),this.$filesInput.on("change",(e=>this._onFileChange(e))),this._initDropArea()}_initDropArea(){const e=this.$submissionForm.find(".fera-contentSubmission-formControl-uploadArea");e.on("dragenter dragover",(t=>{t.preventDefault();(t.dataTransfer||t.originalEvent&&t.originalEvent.dataTransfer).dropEffect="copy",e.addClass("fera-dropzone")})),e.on("dragleave drop",(t=>{if(t.preventDefault(),e.removeClass("fera-dropzone"),"drop"===t.type){const e=t.dataTransfer||t.originalEvent&&t.originalEvent.dataTransfer,i=e&&e.files||[];[...i].every((e=>e.type.match(/image|video/)))?(this.$filesInput.prop("files",i).trigger("change"),this.$errorContainer.addClass("fera-hidden")):this.$errorContainer.text(this.$errorContainer.data("caption-only-certain-files-allowed")).removeClass("fera-hidden")}}))}_onFileChange(e){let t="";const i=e.target.files;if(i.length>0){if(this.videoFiles=Array.from(this.$filesInput.prop("files")||[]).filter((e=>e.type.match(/video/))),i.length>1){const e=this.$filesInput.data("caption-files-selected");t=Fera.Liquid.parse(e).render({count:i.length})}else t=i[0].name;1===this.videoFiles.length&&this._loadVideoFileMeta()}this.$submissionForm.find(".fera-uploadLabel").text(t),this.$(".fera-contentSubmission-termRow").removeClass("fera-hidden")}_initReviewSections(){if(!this._requestReview)return void this.$submissionForm.find(".fera-contentSubmission-row").remove();const e=this._products[0];if(e&&e.name){const e=this._products[0],t=`${e.name.length<=27?e.name:e.name.substr(0,27)+"..."}`;this.$submissionForm.find(".fera-productTitle").html(t),this.reviewType="product"}else this.$submissionForm.find(".fera-productTitle").closest(".fera-contentSubmission-row").hide(),this._totalFilesUploaded>0&&this.$submissionForm.find(".fera-contentSubmission-formControl-uploadRow").hide(),this.customTitle||this._edit||this.$submissionFormTitle.text(Fera.t("How was your experience?")),this.reviewType="store";this.$submissionForm.find("[data-fera-contentsubmission-star]").on("click",(e=>this._applyRating(e))),this.$summaryInput.focus(),this._previousReview&&!this.$.isEmptyObject(this._previousReview)?(this.$noticeContainer.text(this.$noticeContainer.data("caption-already-reviewed")).removeClass("fera-hidden"),this._populatePreviousReview()):this._opts.app.opts.testMode&&this.$noticeContainer.text("This submission will be marked as a test.").removeClass("fera-hidden")}_initDraftTracking(){var e=Fera.Util.debounce((()=>this._updateDraft()),5e3);this.$ratingInput.on("change",(()=>e())),this.$summaryInput.on("keypress change",(()=>e())),this.$bodyInput.on("keypress change",(()=>e()))}_updateDraft(){if(this.submitting)return;const e=new FormData,t=this._products[0],i=this.$ratingInput.val(),r=this.$bodyInput.val(),n=this.$summaryInput.val();e.append("customer_review[rating]",i||""),e.append("customer_review[heading]",n||""),e.append("customer_review[body]",r||"");const a={visitor_id:this._opts.visitorId,update_draft:!0};this.customerName&&(a.customer_name=this.customerName),this.customerEmail&&(a.customer_email=this.customerEmail),this.orderId&&(a.order_id=this.orderId),t&&(a.product_id=t.id),this.customerMessageToken&&(a.customer_message_token=t.customer_message_token),this.contentCampaignToken&&(a.content_campaign_token=t.content_campaign_token),this.reviewType&&(a.review_type=this.reviewType),this._opts.api.contentSubmission({data:e,params:a})}showTermModal(){this.$submissionForm.addClass("fera-hidden"),this.$submissionFormTitle.addClass("fera-hidden"),this.$viewTermContainer.removeClass("fera-hidden"),this.$viewTermTitle.removeClass("fera-hidden")}closeTermModal(){this.$submissionForm.removeClass("fera-hidden"), this.$submissionFormTitle.removeClass("fera-hidden"),this.$viewTermContainer.addClass("fera-hidden"),this.$viewTermTitle.addClass("fera-hidden")}clearNotice(){this.$noticeContainer.empty().addClass("fera-hidden")}_applyRating(e,t=null){if(t=t||this.$(e.target).data("rating"),this.$ratingInput.val(t).trigger("change"),this.$submissionForm.find("[data-fera-contentSubmission-star]").each(((e,i)=>{ethis._submitForm(e))),this.$submissionSuccessContainer.find("[data-fera-contentSubmission-reviewNextBtn]").on("click",(e=>this._reviewNextItem(e)))}_submitForm(e){e.preventDefault(),this.$errorContainer.addClass("fera-hidden"),this.clearNotice(),this.submitting=!0;const t=this.$(e.target),i=new FormData,r=Array.from(this.$filesInput.prop("files")||[]),n=r.length>0,a=this.$filesInput.data("media-enabled")&&(this._requestVideo||this._requestPhoto)&&(this.$filesInput.data("media-required")||!this._requestReview),s=this._products[0],o=this.$ratingInput.val(),c=this.$bodyInput.val(),l=!!c,d=this.$summaryInput.val(),u=!!d,p=this.$agreedTermInput.data("term-enabled"),h=this.$agreedTermInput.is(":checked"),f=5,m=1;if(r.length>f){const e=Fera.Liquid.parse(this.$errorContainer.data("caption-max-files-reached")).render({limit:f});return this.$errorContainer.text(e).removeClass("fera-hidden")}if(this.videoFiles.length>m){const e=Fera.Liquid.parse(this.$errorContainer.data("caption-one-video-allowed")).render({limit:m});return this.$errorContainer.text(e).removeClass("fera-hidden")}if(this.videoFiles.length){const e=this._getVideoDurationValidationErrorMsg(this.videoFiles[0]);if(e)return this.$errorContainer.text(e).removeClass("fera-hidden")}if(this._requestReview&&this._requiredReviewFields&&this._requiredReviewFields.rating&&!o)return this.$errorContainer.text(this.$errorContainer.data("caption-rating-required")).removeClass("fera-hidden");if(this._requestReview&&this._requiredReviewFields&&this._requiredReviewFields.heading&&!u)return this.$errorContainer.text(this.$errorContainer.data("caption-heading-required")).removeClass("fera-hidden");if(this._requestReview&&this._requiredReviewFields&&this._requiredReviewFields.body&&!l)return this.$errorContainer.text(this.$errorContainer.data("caption-body-required")).removeClass("fera-hidden");if(this._requestReview&&p&&!h)return this.$errorContainer.text(this.$errorContainer.data("caption-agreed-terms-required")).removeClass("fera-hidden");if(a&&!n)return this.$errorContainer.text(this.$errorContainer.data("caption-files-required")).removeClass("fera-hidden");t.text(Fera.t("Loading...")),t.prop("disabled",!0),i.append("submission_details",JSON.stringify({submitted_via:"legacy submitter"})),i.append("customer_review[rating]",o||""),i.append("customer_review[heading]",d||""),i.append("customer_review[body]",c||""),p&&i.append("customer_review[agreed_to_terms]",h),r.forEach((e=>{i.append("customer_review[files][]",e,e.name.replace(/\s+/g,"-"))}));const g={visitor_id:this._opts.visitorId};this.customerName&&(g.customer_name=this.customerName),this.customerEmail&&(g.customer_email=this.customerEmail),s&&s.id&&(g.product_id=s.id),this.customerMessageToken&&(g.customer_message_token=this.customerMessageToken),this.contentCampaignToken&&(g.content_campaign_token=this.contentCampaignToken),this._edit&&this._reviewToken&&(g.id_token=this._reviewToken),this.reviewType&&(g.review_type=this.reviewType),this._opts.app.opts.testMode&&(g.test=!0),this.orderId&&(g.order_id=this.orderId),this.attributionCode&&(g.attribution_code=this.attributionCode),this._opts.api.contentSubmission({data:i,params:g,success:this._onContentSubmitted.bind(this),error:e=>{const i=this._genErrorMessage(e);this.$errorContainer.text(i).removeClass("fera-hidden"),t.text(Fera.t("Submit")),t.prop("disabled",!1)}})}_genErrorMessage(e){let t;try{t=JSON.parse(e.response)}catch(t){Fera.logger.warn(`ERROR! Content from server was NOT JSON. Error was: ${t.message}. Response was: ${e.response} ...`)}if(t){if(t.duration)return this.$errorContainer.data("caption-video-min-duration-required");if(t.error||t.errors){let e=t.error||t.errors;return Array.isArray(e)&&(e=e[0]),e}if(t.file&&this.$.isArray(t.file))return t.file[0].match(/less than|smaller than/)?`Uploads ${t.file[0]}. Please try another file.`:`Your file could not be uploaded because it ${t.file[0]}.`;{const e=Object.keys(t);if(e.length>0){let i=e[0];return i=Fera.Util.toTitleCase(i.replace(/_/g," ")),`${i} ${t[e[0]]}. Please try another file.`}}}return this.$errorContainer.data("caption-server-error")}_getVideoDurationValidationErrorMsg(e){return e.duration<5?Fera.Liquid.parse(this.$errorContainer.data("caption-video-min-duration-required")).render({duration:5}):e.duration>300?Fera.Liquid.parse(this.$errorContainer.data("caption-video-max-duration-exceeded")).render({duration:5}):null}_loadVideoFileMeta(){const e=document.createElement("video");e.preload="metadata",e.onloadedmetadata=()=>{window.URL.revokeObjectURL(e.src),this.videoFiles[0].duration=e.duration},e.src=URL.createObjectURL(this.videoFiles[0])}_onContentSubmitted(e){void 0===this._totalFilesUploaded&&(this._totalFilesUploaded=0),this._totalFilesUploaded=this._totalFilesUploaded+e.file_count,e.created_store_review&&(this._alreadyReviewedStore=!!e.created_store_review),this._opts.app.trigger("submitter.submit",{submitter:this}),e.has_customer||this.customer.isPresent()?this._checkForNextReview():(this.customer.update(e.content_submission_token,this._checkForNextReview.bind(this)),this.customer.requestDetails())}_checkForNextReview(){if(this._products.shift(),this._autoRequestingStoreReview=!1,this._products.length>0&&this.$ratingInput.val()>1)this.$submissionSuccessContainer.removeClass("fera-hidden"),window.__feraTestMode?(this.$submissionRewardContainer.hide(),this.$submissionFormContainer.hide(),this.$submissionSuccessContainer.show()):(this.$submissionRewardContainer.fadeOut(),this.$submissionFormContainer.fadeOut(),this.$submissionSuccessContainer.fadeIn());else{if(!this._alreadyReviewedStore&&this._shouldAutoRequestStoreReview&&this.$ratingInput.val()>1)return this._closeFormAndPromptStoreReview();this._closeFormAndShowReward()}this._opts.app.trigger("submitter.complete",{submitter:this})}_closeFormAndShowReward(){this.$submissionRewardContainer.removeClass("fera-hidden"),window.__feraTestMode?(this.$submissionFormContainer.hide(),this.$submissionRewardContainer.show()):(this.$submissionFormContainer.fadeOut(),this.$submissionRewardContainer.fadeIn()),this.$submissionRewardContainer.find("[data-fera-contentSubmission-closeBtn]").on("click",(e=>this._closeWindow(e))),this.$submissionRewardContainer.find("[data-fera-contentSubmission-closeWindowBtn]").on("click",(e=>this._closeWindow(e)))}_closeFormAndPromptStoreReview(){window.__feraTestMode?(this.$submissionRewardContainer.hide(),this.$submissionFormContainer.hide()):(this.$submissionRewardContainer.fadeOut(),this.$submissionFormContainer.fadeOut()),this._totalCount=0,this._previousReview={},this._reviewToken=null,this.$submissionSuccessContainer.find("[data-fera-contentSubmission-reviewNextBtn]").text(Fera.t("Review The Store")),this.$submissionSuccessContainer.find("[data-fera-contentSubmission-skipBtn]").removeClass("fera-hidden"),this._autoRequestingStoreReview=!0,this.$submissionSuccessContainer.removeClass("fera-hidden"),window.__feraTestMode?this.$submissionSuccessContainer.show():this.$submissionSuccessContainer.fadeIn()}_closeWindow(e){this.$submissionFormContainer.remove(),this.$submissionRewardContainer.remove(),this.$submissionSuccessContainer.remove(),this.$loadingStateContainer.remove(),this.$(".fera-contentSubmission--overlay").remove(),this.$body.removeClass("fera-modal--open"),e&&e.preventDefault&&(e.preventDefault(),e.stopPropagation()),this._opts.app.trigger("submitter.hide",{submitter:this})}_reviewNextItem(e){window.__feraTestMode?(this.$submissionSuccessContainer.hide(),this.$submissionFormContainer.show()):(this.$submissionSuccessContainer.fadeOut(),this.$submissionFormContainer.fadeIn());const t=this.$(this._html).find("form");this.$submissionForm.replaceWith(t),this._initElementsAndListeners(),e&&e.preventDefault&&(e.preventDefault(),e.stopPropagation())}_redirectToHomeOrProductPage(){let e="/";this._products&&this._products.length>0&&(e=this._products[0].url),location.href=e}_showLoadingState(){const e='\n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n ',t="\n body.fera-modal--open {\n overflow: hidden !important;\n }\n body.fera-modal--open #admin-bar-iframe,\n body.fera-modal--open #omnisend-dynamic-container {\n display: none !important;\n }\n @keyframes fera-spin {\n from { transform:rotate(0deg); }\n to { transform:rotate(360deg); }\n }\n .fera-spinner {\n animation-name: fera-spin;\n animation-duration: 1500ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n }\n .fera-contentSubmission-modal {\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 10px;\n color: #1E2139;\n }\n .fera-contentSubmission-loading,\n .fera-contentSubmission {\n position: relative;\n background-color: white;\n padding: 50px 45px 50px;\n border-radius: 5px;\n box-shadow: 0px 3px 20px rgba(0, 0, 0, 0.2);\n width: 100%;\n max-width: 500px;\n max-height: 90vh;\n display: flex;\n justify-content: center;\n flex-direction: column;\n z-index: 9999999;\n }\n .fera-contentSubmission--overlay,\n .fera-submissionForm,\n .fera-submissionReward,\n .fera-submissionSuccess,\n .fera-contentSubmission--loading {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n position: fixed;\n z-index: 9999999;\n }\n\n .fera-contentSubmission-termTitle {\n font-size: 29px;\n font-weight: bold;\n letter-spacing: 1px;\n }\n\n .fera-contentSubmission-termPreview-content {\n overflow-y: scroll;\n max-height: 45vh;\n }\n\n .fera-contentSubmission-termPreview-content h1,\n .fera-contentSubmission-termPreview-content h2,\n .fera-contentSubmission-termPreview-content h3,\n .fera-contentSubmission-termPreview-content h4,\n .fera-contentSubmission-termPreview-content h5,\n .fera-contentSubmission-termPreview-content h6,\n .fera-contentSubmission-termPreview-content p,\n .fera-contentSubmission-termPreview-content li {\n margin: 0 0 16px;\n padding: 0;\n font-size: 16px;\n }\n .fera-contentSubmission-termPreview-content ul {\n list-style-type: disc;\n margin: 0 0 16px;\n }\n\n .fera-contentSubmission-termPreview-closeBtn {\n background: #00070c;\n color: white;\n margin-top: 32px;\n width: 112px;\n height: 40px;\n outline: none;\n border: none;\n border-radius: 3px;\n text-align: center;\n font-weight: bold;\n letter-spacing: 1px;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .fera-contentSubmission-termPreview-closeBtn span {\n margin-left: 6px;\n }\n\n .fera-contentSubmission--overlay {\n background: rgba(0,0,0,0.3);\n z-index: 9999998;\n }\n\n .fera-contentSubmission--overlay:empty {\n display: block;\n }\n\n .fera-contentSubmission-loading .fera-container {\n text-align: center;\n font-size: 20px;\n }\n .fera-contentSubmission-loading button {\n color: white;\n border: none;\n padding: 12px 20px;\n border-radius: 5px;\n font-size: 14px;\n background-color: #1E2139;\n margin-top: 40px;\n }\n .fera-contentSubmission-loading button:hover {\n background-color: black;\n }\n .fera-hidden {\n display: none !important;\n }\n @media(max-width: 480px) {\n .fera-contentSubmission {\n width: 100%;\n margin: 0;\n max-height: 100%;\n border-radius: 0;\n padding: 42px 32px 42px;\n }\n\n .fera-contentSubmission-termTitle {\n font-size: 24px;\n }\n }\n ";return this._renderTemplate(e,t)}_hideLoadingState(e=!0){this.$loadingStateContainer.addClass("fera-hidden"),e&&this._redirectToHomeOrProductPage()}},Fera.CustomerResources=Fera.CustomerResources||{},Fera.CustomerResources.CustomerReviews=Fera.CustomerResources.CustomerReviews||{},Fera.CustomerResources.CustomerReviews.Base=class extends Fera.Components.Base{constructor(e){super(e),this.app=e.app,this.$=Fera.Util.$(),this.totalReviewCount=e.totalReviewCount||0,this.isSubmitHidden=void 0!==e.isSubmitHidden&&e.isSubmitHidden,this.prefix=e.prefix||"fera-productReviews",this.layoutCode=e.layoutCode||"list",this.pageSize=e.pageSize||5,this.numberOfColumnsOnMobile=e.numberOfColumnsOnMobile||1,this.paginationMode=e.paginationMode,this.sortBy=e.sortBy||"most_recent",this.tplVars=e.tplVars||{},this.reviewOptions=e.reviewOptions||{},e.template&&(this.prerendered=!0,this.$el=e.template,this._initialize()),this._triggerDebouncedResize=Fera.Util.debounce((()=>this._updateWidthClass()),100),this.$(window).on("resize",(()=>this._triggerDebouncedResize())),setInterval((()=>this._updateWidthClass(!0)),500)}render(){if(this.prerendered)return this.$el;var e=this._renderTpl(this._tpl(),this.tplVars);return this.$el=this.$(e),this._initialize(),this.$el}clear(){this.reviewList.clear()}refresh(){this.reviewList.refresh()}_updateWidthClass(e=!1){if(e&&this._resizedByTimer)return!1;this.$el&&this.$el.length>0&&(this.$el.toggleClass("fera-container--thin",this.$el.width()<576),this.$el.toggleClass("fera-container--wide",this.$el.width()>1440),this._resizedByTimer=e)}_initialize(){this.$totalReviewCount=this.$el.find(`.${this.prefix}-count-total, .fera-reviews-count`),this.$headerTitle=this.$el.find(`.${this.prefix}-heading-header, .fera-reviews-header-title`),this.$el.addClass(`${this.prefix}--${this.layoutCode}`),this._setupWriteReview(),this._setupReviewList(),Fera.t(this.$headerTitle),this._updateCountDependentDisplays(this.totalReviewCount),this._updateWidthClass()}_setupWriteReview(){this.$writeReview=this.$el.find('[data-fera-action="showContentSubmission"]'),this.$writeReview.each(((e,t)=>{const i=this.$(t);Fera.t(i),i.data("fera-deep-link-attached")||(i.on("click",(e=>{e.preventDefault(),e.stopPropagation(),this.app.showContentSubmission({attributionCode:"direct_from_site"})})),i.data("fera-deep-link-attached",!0))})),this.$el.toggleClass(`${this.prefix}--submitHidden`,!!this.isSubmitHidden)}_setupReviewList(){this.reviewListOpts=this.reviewListOpts||{},this.prerendered&&(this.reviewListOpts.template=this.$el),this.reviewList=new Fera.CustomerResources.CustomerReviews.List(this.reviewListOpts),this.reviewList.on("listUpdate",((e,t)=>{this._updateCountDependentDisplays(t)})),this.reviewList.on("render",(()=>this.trigger("reviewList.render"))),this.prerendered||(this.$body=this.$el.find(`.${this.prefix}-content`),this.$body.append(this.reviewList.render()))}_updateCountDependentDisplays(e){this._updateReviewCountStr(e),this._updateSeoAttributes(e),this._normalizeRatingWidths()}_normalizeRatingWidths(){this.$el.find(".fera-stars").each(((e,t)=>{const i=t.querySelector(".fera-stars-rating");if(!i)return;const r=getComputedStyle(t);if(!r.letterSpacing.match(/px$/))return;const n=parseFloat(r.letterSpacing.replace(/px$/,"")||0),a=parseFloat(r.width.replace(/px$/,"")||0)-5*n,s=t.dataset.rating||0;if(!s||s<=0)return;const o=a*(s/5)+Math.floor(s)*n;i.style.width=`${o}px`}))}_updateSeoAttributes(e){}static removeSeoAttributes(e){var t=Fera.Util.$();e.removeAttr("itemprop").removeAttr("itemtype").removeAttr("itemscope"),e.find("[itemprop],[itemtype],[itemscope]").each(((e,i)=>{t(i).removeAttr("itemprop").removeAttr("itemtype").removeAttr("itemscope")}))}_updateReviewCountStr(e){var t;if(this.$totalReviewCount.length<1)return;const i=`.${this.prefix}-reviewCount,[itemprop="reviewCount"]`;let r=Fera.t("{{ review_count }} review{% if review_count != 1 %}s{% endif %}");r=r.replace(/^\{\{ review_count }}/,"{{ formatted_review_count }}");const n=this.$el.find("[data-fera-review-count-str]");if(n.length>0){const t=n.find("[data-fera-rating-count-number]");if(t.length>0){const i=Fera.Liquid.parse(r).render({review_count:e,formatted_review_count:t.get(0).outerHTML});n.html(`(${i})`)}}if(this.$totalReviewCount.find("[data-fera-rating-count-number]").length>0)return void this.$totalReviewCount.find("[data-fera-rating-count-number]").text(Fera.Util.niceNum(e));if(this.$countStr?(this.$countStr.remove(),t=this.$countStr.find(i)):t=this.$totalReviewCount.find(i),t.length<1)return;t.get(0).innerHTML=e;const a=Fera.Liquid.parse(r).render({review_count:e,formatted_review_count:Fera.Util.niceNum(e)});this.$countStr=this.$(`${a.replace(Fera.Util.niceNum(e),t.get(0).outerHTML)}`),t.remove(),this.$totalReviewCount.append(this.$countStr)}_renderTpl(e,t){var i=e.replace(new RegExp(/\s*({%-)/g,"g"),"{%").replace(new RegExp(/(-%})\s*/,"g"),"%}").trim();if(!i)return Fera.logger.error("Template is empty or not valid.",e,t),"";var r=Fera.Liquid.parse(i);return r?r.render(t):(Fera.logger.error("Failed to parse template: ",r,t),"")}_tpl(){console.error("Fera.CustomerResources.CustomerReviews.Base template was not implemented.")}},Fera.CustomerResources=Fera.CustomerResources||{},Fera.CustomerResources.CustomerReviews=Fera.CustomerResources.CustomerReviews||{},Fera.CustomerResources.CustomerReviews.AllReviews=class extends Fera.CustomerResources.CustomerReviews.Base{constructor(e){super(e)}_setupReviewList(){this.reviewListOpts={app:this.app,singleProduct:!1,layoutCode:this.layoutCode,pageSize:this.pageSize,paginationMode:this.paginationMode,sortBy:this.sortBy,totalReviewCount:this.totalReviewCount,reviewOptions:this.reviewOptions,typesToShow:this._opts.typesToShow,prefix:this.prefix,showProducts:this._opts.showProducts,numberOfColumnsOnMobile:this._opts.numberOfColumnsOnMobile},super._setupReviewList()}_updateSeoAttributes(e){this.$el&&this.constructor.removeSeoAttributes(this.$el)}_tpl(){return'
    \n
    \n
    \n

    {{ header }}

    \n Write a review\n
    \n
    \n
    \n
    \n {{ average_rating }}\n
    \n
    \n
    \n
    \n {% if ratings_enabled %}\n
    \n
    \u2605\u2605\u2605\u2605\u2605
    \n
    \n
    \n {% endif %}\n
    \n
    \n
    \n {{ review_count || 0 }}\n {{ review_count || 0 }}\n
    \n
    \n
    \n
    \n
    \n
    \n
    '}},Fera.CustomerResources=Fera.CustomerResources||{},Fera.CustomerResources.CustomerMedia=class extends Fera.Components.Base{constructor(e={}){super(e),this.app=e.app,this.singleProduct=!!e.singleProduct,this.$=Fera.Util.$(),this.options=e.options,this.$el=e.$template,this._initialize()}refresh(){this.offset=0,this._setLimit(),this.customerMedia=[],this.renderer=new Fera.CustomerResources.CustomerMedia.Renderer({$el:this.$customerMediaContent,themeCode:this.options.theme_code}),this.clear(),this._fetchNextPage()}_setLimit(){this.isMobile=this.$el.width()<=500,this.limit=this.isMobile?this.options.max_to_show_on_mobile:this.options.max_to_show_on_desktop,"string"==typeof this.limit&&(this.limit=parseInt(this.limit)),this.limit=this.limit||6}clear(){this.$customerMediaContent.empty(),this.renderer.reset()}_initialize(){this._setupHeader(),this._setupCustomerMediaContent(),this._setupLoadMore(),this.renderer=new Fera.CustomerResources.CustomerMedia.Renderer({$el:this.$customerMediaContent,themeCode:this.options.theme_code}),this.renderer.on("limit:change",((e,t)=>{if(this.isMobile)return this.limit=4;this.limit=t})),this._refreshOnWindowResize()}_refreshOnWindowResize(){this.previousWidth=this.windowWidth;const e=Fera.Util.debounce((()=>{const e=this.windowWidth;Math.abs(this.previousWidth-e)>20&&this.refresh(),this.previousWidth=e}),300);this.$(window).on("resize",(()=>e()))}get windowWidth(){return document.body.offsetWidth||this.$(window).width()}get _headers(){return{media:"Customer Photos & Videos",photos:"Customer Photos",videos:"Customer Videos"}}_setupHeader(){this.$header=this.$el.find(".fera-customerMedia-header"),this.$header.toggleClass("fera-hidden",!this.options.header_enabled);let e="";this.options.images_enabled&&this.options.videos_enabled?e="media":this.options.images_enabled?e="photos":this.options.videos_enabled&&(e="videos"),Object.values(this._headers).includes(this.options.header)?this.$header.text(this._headers[e]):this.$header.text(this.options.header)}_setupCustomerMediaContent(){this.$customerMediaContent=this.$el.find(".fera-customerMedia-content"),this.$noCustomerMedia=this.$el.find(".fera-customerMedia-noCustomerMedia")}_setupLoadMore(){this.$footer=this.$el.find(".fera-customerMedia-footer"),this.$spinner=this.$el.find(".fera-loading-spinner").clone().removeClass("fera-hidden"),this.$loadMoreBtn=this.$el.find(".fera-customerMedia-loadMoreBtn"),this.$loadMoreBtn.on("click",(e=>{e.preventDefault(),e.stopPropagation(),this._fetchNextPage()}))}_fetchNextPage(){const e={offset:this.offset,limit:this.limit,only_photos:this.options.images_enabled&&!this.options.videos_enabled,only_videos:this.options.videos_enabled&&!this.options.images_enabled,media_source:this.options.media_source,cache_key:this.singleProduct?"product":"store"},t=this._opts.productId||this.app.getProductId();if(this.singleProduct&&void 0!==t&&t.trim().length>0&&(e.product_id=t),"choose"===this.options.media_source){let t=this.options.media_ids;t="string"==typeof t?JSON.parse(t):t,e.media_ids=t.length>0?t:[-1],e.product_id=null}this.$loadMoreBtn.html(this.$spinner).append(Fera.t("Loading...")).prop("disabled",!0),this.app.api.getCustomerMedia(e,((e,t)=>{if(this.totalCount=t,this.totalCount<1)this.clear(),this.$noCustomerMedia.removeClass("fera-hidden"),"hide"!==this.options.when_no_media||this.app.opts.testMode||this.$el.hide();else{this.customerMedia=[...this.customerMedia,...e],this.offset=this.customerMedia.length;const t=this.totalCount>this.customerMedia.length;this.renderer.render(e,t)}this.$loadMoreBtn.text(Fera.t("Show More")).prop("disabled",null),this.$footer.toggleClass("fera-hidden",!this._showLoadMore())}))}_showLoadMore(){return!!this.customerMedia&&this.customerMedia.length\n \n
    `}},Fera.CustomerResources=Fera.CustomerResources||{},Fera.CustomerResources.CustomerMedia=Fera.CustomerResources.CustomerMedia||{},Fera.CustomerResources.CustomerMedia.Renderer=class extends Fera.Components.Base{constructor(e={}){super(e),this.$el=e.$el,this.$=Fera.Util.$(),this.themeCode=e.themeCode,this.customerMedia=[],this.previousCustomerMedia=[],this.mediaViewer=new Fera.MediaViewer,this.hasMoreItems=!0}render(e,t){this.customerMedia=e,this.hasMoreItems=t,this._usePreviousAndCurrentMedia(),this._renderItems()}reset(){this.$el.empty(),this.previousItemsCountPerRow=null,this.firstRowFilled=!1,this.hasMoreItems=!0,this.previousCustomerMedia=[]}_usePreviousAndCurrentMedia(){this.firstRowFilled||(this.customerMedia=[...this.previousCustomerMedia,...this.customerMedia],this.previousCustomerMedia=[...this.customerMedia],this.$el.empty())}get _minItemWidths(){return{"customer_media.default":121,"customer_media.padded":170,"customer_media.rounded":145,"customer_media.circles":145}}_renderItems(){if(this.customerMedia&&!(this.customerMedia.length<1)){for(this.containerWidth=this.$el[0].offsetWidth||this.$el.width(),this.itemsCount=this.customerMedia.length,this.minItemWidth=this._minItemWidths[this.themeCode]||121,this.itemSpacing=this._getItemSpacing()||0,this.itemSpacing&&(this.minItemWidth+=this.itemSpacing),this.rowsCount=1,this.itemsCountPerRow=Math.round(this.itemsCount/this.rowsCount);this.containerWidth/this.itemsCountPerRowthis._renderRow(e)))}}_renderRow(e){const t=e*this.itemsCountPerRow,i=t+this.itemsCountPerRow;let r=this.customerMedia.slice(t,i);e+1===this.rowsCount&&(r=this.customerMedia.slice(t),this.itemsCountPerRow=this.hasMoreItems||r.length>this.previousItemsCountPerRow?r.length:this.previousItemsCountPerRow);const n=this.$(this._rowTpl());this._render(r,n),this.itemSpacing&&n.find(".fera-customerMedia-thumbnail").css({marginRight:this.itemSpacing}),this._resizeRowItems(n),this.$el.append(n),this.previousItemsCountPerRow=this.itemsCountPerRow}_resizeRowItems(e){let t=this.containerWidth/this.itemsCountPerRow;this.firstRowFilled||(t>2*this.minItemWidth&&(t=2*this.minItemWidth),t*this.itemsCountPerRow>=this.containerWidth&&(this.firstRowFilled=!0,this.trigger("limit:change",this.itemsCountPerRow))),this.itemSpacing&&(t-=this.itemSpacing,e.css({marginTop:this.itemSpacing})),e.find(".fera-customerMedia-thumbnail").css({width:`${t}px`,height:`${t}px`})}_getItemSpacing(){const e=this.$el.css("grid-gap");if(!e)return;const t=e.split("px")[0];return t?parseInt(t):void 0}_render(e,t){e.forEach((e=>{const i=new Fera.CustomerResources.CustomerMedia.Item({model:e}).render();this.mediaViewer.init(i),t.append(i)}))}_rowTpl(){return'
    '}},Fera.CustomerResources=Fera.CustomerResources||{},Fera.CustomerResources.CustomerReviews=Fera.CustomerResources.CustomerReviews||{},Fera.CustomerResources.CustomerReviews.ProductReviews=class extends Fera.CustomerResources.CustomerReviews.Base{constructor(e){super(e),this.prerendered&&this._tryToTranslateHeader()}_setupReviewList(){this.reviewListOpts={app:this.app,singleProduct:!0,productId:this._opts.productId,layoutCode:this.layoutCode,pageSize:this.pageSize,sortBy:this.sortBy,totalReviewCount:this.totalReviewCount,reviewOptions:this.reviewOptions,paginationMode:this.paginationMode,prefix:this.prefix,typesToShow:"product",reviewTpl:this._opts.reviewTpl,numberOfColumnsOnMobile:this._opts.numberOfColumnsOnMobile}, super._setupReviewList()}_tryToTranslateHeader(){this.$header=this.$el.find(".fera-productReviews-heading-header"),Fera.t(this.$header)}_updateSeoAttributes(e){if(super._updateSeoAttributes(e),e>0){this.constructor.addReviewDataToSeoScripts(this.$el);const e=this.$el.parents("[itemType]");(e.length<1||!e.first().attr("itemType").match(/\/Product$/))&&(this.constructor.copySeoAttributesToProductContext(this.$el),Fera.CustomerResources.CustomerReviews.Base.removeSeoAttributes(this.$el)),this.constructor.removeDuplicateAggregateRatingSeoAttr()}else Fera.CustomerResources.CustomerReviews.Base.removeSeoAttributes(this.$el)}static copySeoAttributesToProductContext(e){e=e.first();const t=Fera.Util.$();this.repairProductSchemas();const i=t('[itemType*="/Product"][itemscope]');if(i.length<1)return Fera.logger.log("Tried to copy object to optimize for SEO but could not find parent product SEO item type."),!1;if(i.length>0){const t=e.clone();t.hide(),t.removeAttr("class").removeAttr("data-fera-skill").removeAttr("data-fera-widget").removeAttr("id"),t.find("[class]").removeAttr("class").removeAttr("id"),i.first().append(t)}return!0}static repairProductSchemas(){const e=Fera.Util.$(),t=e('[itemType*="/Product"]:not([itemscope])');t.length<1||t.each(((t,i)=>{const r=e(i);if(r.find('[itemProp="name"]').length<1)return;r.attr("itemscope","");const n=r.find('[itemType*="/Offer"]:not([itemscope])');n.length<1||n.each(((t,i)=>{e(i).attr("itemscope","")}))}))}static addReviewDataToSeoScripts(e){const t=Fera.Util.$(),i=t('script[type="application/ld+json"]');i.length<1?Fera.logger.log("Could not find any SEO script definitions."):i.each(((i,r)=>{const n=t(r),a=n.html().replace(/[\n\t\r]/g," ").trim();if(!a)return;let s;try{s=JSON.parse(a)}catch(e){Fera.logger.log("Encountered an error while trying to parse JSON for application/ld+json. Reading will be skipped.",e,n)}if(!s)return void Fera.logger.warn("Failed to properly parse your application/ld+json. This could indicate that your site code/theme is not properly handling SEO elements. Contact our team for help.");if(!s["@type"])return;if(!s["@type"].match(/Product$/))return;s.aggregateRating=s.aggregateRating||{},s.aggregateRating["@type"]="AggregateRating";const o=e.find('[itemprop="aggregateRating"] '),c=o.find('[itemprop="ratingValue"]').text(),l=o.find('[itemprop="ratingCount"]').text(),d=o.find('[itemprop="reviewCount"]').text();c&&(s.aggregateRating.ratingValue=c.trim()),l&&(s.aggregateRating.ratingCount=l.trim()),d&&(s.aggregateRating.reviewCount=d.trim().replace(/,/g,"")),s.review=s.review||[],s.aggregateRating.reviewCount||s.aggregateRating.ratingCount||delete s.aggregateRating,s.aggregateRating&&e.find('[itemprop="review"]').each(((e,i)=>{const r=t(i),n=r.find('[itemprop="datePublished"]').attr("content"),a=r.find('[itemprop="author"]').text(),o=r.find('[itemprop="ratingValue"]').text(),c=r.find('[itemprop="description"]').text()||"";if(!n||!a)return;if(s.review.find((e=>e.datePublished==n.trim()&&e.author==a.trim())))return;const l={"@context":"https://schema.org/","@type":"Review",datePublished:n,author:{"@type":"Person",name:a},reviewBody:c.trim(),reviewRating:{"@type":"Rating"}};o&&(l.reviewRating.ratingValue=o.trim()),l.reviewBody&&s.review.push(l)})),n.text(JSON.stringify(s))}))}static removeDuplicateAggregateRatingSeoAttr(){const e=Fera.Util.$(),t=e('[itemType*="Product"]').find('[itemType*="AggregateRating"]');e('script[type="application/ld+json"]');if(t.length>0){let i;t.each(((t,r)=>{const n=e(r),a=n.parents("[itemType]").first();a&&a.attr("itemType").match(/\/Product$/)&&!i?i=n:Fera.CustomerResources.CustomerReviews.Base.removeSeoAttributes(n)}))}return!0}_tpl(){return'
    \n
    \n
    \n

    {{ header }}

    \n Write a review\n
    \n
    \n
    \n
    \n {{ average_rating }}\n
    \n
    \n
    \n
    \n {% if ratings_enabled %}\n
    \n
    \u2605\u2605\u2605\u2605\u2605
    \n
    \n
    \n {% endif %}\n
    \n
    \n
    \n {{ review_count | default: 0 }}\n {{ review_count | default: 0 }}\n
    \n
    \n
    \n
    \n
    \n
    \n
    '}},Fera.CustomerResources.ProductReviewsModal=class extends Fera.Components.BaseModal{constructor(e){super(e),this.classPrefix=e.classPrefix||"reviews",this.app=e.app,this.totalReviewCount=e.totalReviewCount,this.tplVars=e.tplVars||{},this.reviewOptions=e.reviewOptions||{}}show(e=!1){super.show(),this._setupReviewBlock(),this.reviewBlock.refresh()}hide(){super.hide(),this.reviewBlock.clear(),this.$el&&this.$el.remove(),this.reviewBlock&&delete this.reviewBlock,this.rendered=!1}_setupReviewBlock(){this.reviewBlock||(this.reviewBlock=new Fera.CustomerResources.CustomerReviews.ProductReviews({productId:this._opts.productId,app:this.app,totalReviewCount:this.totalReviewCount,tplVars:this.tplVars,reviewOptions:this.reviewOptions,reviewTpl:this._opts.reviewTpl}),this.$modalBody.append(this.reviewBlock.render()))}},Fera.CustomerResources=Fera.CustomerResources||{},Fera.CustomerResources.CustomerReviews=Fera.CustomerResources.CustomerReviews||{},Fera.CustomerResources.CustomerReviews.RelatedReviews=class extends Fera.CustomerResources.CustomerReviews.Base{constructor(e){super(e)}refresh(){super.refresh(),this.reviewList.forceInitialLoad()}_initialize(){super._initialize(),this.relatedHeader=(Fera.t(this._opts.relatedHeader)||Fera.t("Reviews From Similar Products")).trim(),this.$header=this.$el.find(".fera-productReviews-heading-header"),this.$header.each(((e,t)=>{const i=this.$(t);i.html().trim()!==this.relatedHeader&&(i.html(this.relatedHeader),i.data("fera-translated",!0))})),this.$el.toggleClass("fera-productReviews--showingRelated",!0)}_setupReviewList(){this.reviewListOpts={app:this.app,singleProduct:!1,pageSize:this.pageSize,layoutCode:this.layoutCode,sortBy:this.sortBy,paginationMode:this.paginationMode,totalReviewCount:this.totalReviewCount,reviewOptions:this.reviewOptions,prefix:this.prefix,typesToShow:this._opts.typesToShow,showProducts:this._opts.showProducts},super._setupReviewList(),this.reviewList.clearListeners("listUpdate"),this.reviewList.on("listUpdate",((e,t)=>{this._updateCountDependentDisplays(t),t>1&&this.trigger("reviewsFound",!0)}))}_updateSeoAttributes(e){Fera.CustomerResources.CustomerReviews.Base.removeSeoAttributes(this.$el)}_tpl(){return'
    \n
    \n \n
    \n
    \n
    '}},Fera.CustomerResources=Fera.CustomerResources||{},Fera.CustomerResources.ProductReview=function(e){var t=this,i="https://cdn.fera.ai/img/shoppers/placeholder2.png",r=Fera.Util.$(),n=function(){t.layoutCode=e.layoutCode||"list",t.prefix=e.prefix||"fera-productReviews"};this.render=function(){const i=e.tpl||R().replace(/fera-__W__/g,t.prefix);return t.$el=r(f(i,e)),t.$reply=t.$el.find(".fera-review-reply"),t.$body=t.$el.find(".fera-review-body"),t.$el.find('[data-fera-action="review.reply.expand"]').on("click",(e=>s(e))),t.$el.find('[data-fera-action="review.reply.collapse"]').on("click",(e=>a(e))),c(),l(),d(),"grid"===t.layoutCode&&e.options&&e.options.headings_enabled&&u(),p(),t.$el.toggleClass("noHeading",!e.review.heading),t.$el.toggleClass("noBody",!e.review.body),t.$el.toggleClass("noRating",!e.review.rating),t.$el.toggleClass("noReply",!e.review.store_reply),t.$el.toggleClass("noAvatar",!e.options.avatar_images_enabled),t.$el.toggleClass("verified",!!e.review.verified),t._hasLocation=e.review.customer_location&&e.review.customer_location!=e.review.customer_name,t.$el.toggleClass("hasLocation",!!t._hasLocation),t.$el.toggleClass("noLocation",!t._hasLocation),h(),o(),t.$el};var a=function(e){e&&(e.preventDefault(),e.stopPropagation()),t.$reply.removeClass("fera-review-reply--expanded"),t.$reply.addClass("fera-review-reply--collapsed"),window.dispatchEvent(new Event("resize"))},s=function(e){e&&(e.preventDefault(),e.stopPropagation()),t.$reply.addClass("fera-review-reply--expanded"),t.$reply.removeClass("fera-review-reply--collapsed"),window.dispatchEvent(new Event("resize"))},o=function(){!1===e.itemProp&&(t.$el.removeAttr("itemprop"),t.$el.find("[itemprop],[itemscope],[itemtype]").each((function(){r(this).removeAttr("itemprop"),r(this).removeAttr("itemscope"),r(this).removeAttr("itemtype")})))},c=function(){var i=!e.options||void 0===e.options.show_verification||e.options.show_verification;t.$verifications=t.$el.find('[data-fera-verified="true"].'+t.prefix+'-review-customer-verification, [data-fera-verified="true"].fera-review-customer-verification'),e.options&&!i&&t.$verifications.addClass("fera-verified-hidden"),t.$verifications.each((function(t,i){e.verifier.addVerificationIcon(r(i),{height:16})}))},l=function(){t.$names=t.$el.find("."+t.prefix+"-review-customer-name, .fera-review-customer-name"),t.$names.removeClass(t.prefix+"-review-customer-name--truncated"),t.$names.removeClass("fera-review-customer-name--truncated"),setTimeout((function(){Fera.Util.truncateTextToMaxWidth(t.$names)}),500)},d=function(){t.$dateVals=t.$el.find("."+t.prefix+"-review-date-val, .fera-review-date-val"),t.$dateVals.each((function(){var t=r(this);if(t.data("value")){var i=new Fera.TimeAgo({language:Fera.i18n.locale||e.language,time:t.data("value")});t.text(i.toString()),t.data("fera-timeAgo",i)}}))},u=function(){var e=t.$el.find("."+t.prefix+"-review-heading");e.click((function(){e.css("white-space","normal")}))},p=function(){t.$el.find(".fera-allReviews-review-body, .fera-allReviews-reply-body, [data-fera-truncate]").each(((e,t)=>{const i=r(t),n=i.data("fera-truncate")||92,a=String(i.text()).trim();!a||a.length${a.slice(0,n)}...${Fera.t("Show More")}
    \n`),i.find(".fera-truncation-showMore").on("click",(e=>{e.preventDefault(),i.find(".truncated-text").hide(),i.find(".full-text").show(),window.dispatchEvent(new Event("resize")),e.stopPropagation()})))}))},h=function(){const e=t.$el.find("[data-fera-media-gallery-items]"),i=e.children();i.length<=0||(t.mediaViewer=new Fera.MediaViewer({navThumbnails:e.data("feraMediaGallery")}),t.mediaViewer.init(i))},f=function(e,i){i.customer_display_name=m(),i.layout_code=t.layoutCode,void 0===i.showProduct&&(i.showProduct=!1);var r=e.replace(new RegExp(/\s*({%-)/g,"g"),"{%").replace(new RegExp(/(-%})\s*/,"g"),"%}").trim();if(!r)return Fera.logger.error("Template is empty or not valid.",e,i),"";var n=Fera.Liquid.parse(r);return n?n.render(i):(Fera.logger.error("Failed to parse template: ",n,i),"")},m=function(){return e.review.customer_name||Fera.t("Anonymous")},g=function(){return'{% if options.avatar_images_enabled %}
    {{ '+w()+"
    {% endif %}"},v=function(){return'{% if review.review_type == "product" and (options.product_images_enabled != false and review.product.url != blank) %}
    {%- if review.product.url -%}{%- endif -%} Product image {%- if review.product.url -%}{%- endif -%}
    {% endif %}'},_=function(){return'
    '+w()+'
    {% if review.customer_location and review.customer_location != review.customer_name %}
    {{ review.customer_location }}
    {% endif %}
    '},w=function(){if("Trustpilot"==e.review.integration_name)return"";let i="This review was originally posted on {{ review.integration_name }}.";return e.review.is_from_supplier&&(i="Submitted on supplier's website"),'{% if review.integration_icon %} {{ review.integration_name }} icon{% elsif review.verified %}{% endif %}'},y=function(){return'{%- if options.ratings_enabled -%}
    {{ review.rating }}
    \u2605\u2605\u2605\u2605\u2605
    {%- endif -%}'},b=function(){var e='{%- if options.headings_enabled and review.heading -%}
    ';return"grid"===t.layoutCode?e+="{{ review.heading }}":e+="{{ review.heading }}",e+="
    {%- endif -%}"},C=function(){const i=e.options.show_replies?72:92;return'{%- if options.bodies_enabled and review.body and review.body != "" -%}
    {{ review.body | newline_to_br }}
    {%- endif -%}'},S=function(){return`{% if options.customer_uploads_enabled and review.media and review.media.length > 0 %}\n
    \n {% if review.media and review.media.length > 0 %}\n {% for media in review.media %}\n
    \n {{ \n
    \n {% endfor %}\n {% endif %}\n
    \n {%- endif -%}`},x=function(){return'
    {{ review.date }}
    '},F=function(e){var i=t.prefix+"-reply";return e&&(i+=" "+t.prefix+"-reply--"+e),'{% if options.show_replies and review.store_reply and review.store_reply != empty %}
    {% if store.icon_url %} {{ store.name }} logo icon {{ "Replied:" | t }} {%- elsif store.logo_url -%} : {%- else -%} {{ review.store_name }} {{ "Replied:" | t }} {%- endif -%}
    {{- review.store_reply | newline_to_br -}}
    {{ review.store_replied_at }}
    {%- endif -%}'},k=function(){return'{% if showProduct %}{% if review.review_type == "product" and review.product and review.product.name and review.product.url %}
    {{ "Product:" | t }} {% if review.product.url %}{% endif %}{{ review.product.name }}{% if review.product.url %}{% endif %}
    {% endif %}{% endif %}'},T=function(){return'
    '+g()+_()+'
    '+y()+b()+C()+k()+S()+x()+F("wide")+"
    "+F("thin")+"
    "},$=function(){return'
    '+v()+'
    '+x()+y()+b()+C()+k()+S()+'
    '+g()+_()+"
    "+F()+"
    "},R=function(){return"grid"===t.layoutCode?$():T()};n()},Fera.CustomerResources=Fera.CustomerResources||{},Fera.CustomerResources.CustomerReviews=Fera.CustomerResources.CustomerReviews||{},Fera.CustomerResources.CustomerReviews.List=class extends Fera.Components.Base{constructor(e){super(e),this.$=Fera.Util.$(),this.app=e.app,this.prefix=e.prefix,this.layoutCode=e.layoutCode||"list",this.singleProduct=void 0!==e.singleProduct&&e.singleProduct,this.paginationMode=e.paginationMode||"show_more",this.totalCount=e.totalReviewCount||0,this.limit=e.pageSize||5,this.currentPage=1,this.sortBy=e.sortBy||"most_recent",this._processReviewOptions(e.reviewOptions),this.reviews=[],e.template&&(this.prerendered=!0,this.$el=e.template,this._translateShowMore(),this._initialize())}render(){return this.prerendered||(this.$el=this.$(this._tpl()),this._initialize()),this.$el}clear(){this.$reviewContainer.empty(),"show_more"===this.paginationMode&&this.$showMore.hide()}refresh(){this.currentPage=1,this.reviews=[],this.clear(),this.totalCount>0||this.app.opts.designMode||this.app.opts.testMode?(this._showLoading(),this._fetchPage(1)):this.$reviewContainer.append(this.$noReviews)}forceInitialLoad(){this._showLoading(),this._fetchPage(1)}_processReviewOptions(e){this.reviewOptions={},this.reviewOptions.language=e.language||"en",delete e.language,this.reviewOptions.itemProp=void 0===e.itemProp||e.itemProp,delete e.itemProp;var t={avatar_images_enabled:!0,product_images_enabled:!0,customer_uploads_enabled:!0,ratings_enabled:!0,headings_enabled:!0,bodies_enabled:!0,videos_enabled:!0,show_replies:!0};this.reviewOptions.reviewFields=this.$.extend(t,e)}_translateShowMore(){const e=this.$el.find(`.${this.prefix}-footer .${this.prefix}-showMore-btn`);Fera.i18n.translateElementText(e)}_initialize(){this.$reviewContainer=this.$el.find(`.${this.prefix}-reviews, [data-fera-widget-section="body"]`),this.reviewTpl=this._opts.reviewTpl||this.$el.find('script[type="template/liquid"][data-fera-template="review.item"]').html(),this.$showMore=this.$el.find(`.${this.prefix}-showMore, [data-fera-action="reviews.showMore"]`),this.$footer=this.$el.find(`.${this.prefix}-footer, [data-fera-widget-section="footer"]`),this.$noReviews=this.$(Fera.Liquid.parse(this._noReviewsTpl()).render()),this.$showMore.hide(),"show_more"===this.paginationMode?this._setupShowMore():this._setupPagination(),this.$el.find("[data-fera-translate-contents]").each(((e,t)=>this.app.i18n.translateElementText(t)))}_setupShowMore(){this.$showMore.on("click",(e=>{e.preventDefault(),e.stopPropagation(),this._fetchNextPage()}))}_setupPagination(){this.paginationComponent=new Fera.Components.Pagination({prefix:this.prefix,hideIfOnePage:!0,currentPage:this.currentPage,totalCount:this.totalCount,pageSize:this.limit,onClick:e=>this._pageChangeHandler(e)}),this.$footer.append(this.paginationComponent.render())}_fetchNextPage(){this.currentPage++,this._fetchPage(this.currentPage)}_pageChangeHandler(e){this._showLoading(),Fera.Util.isScrolledIntoView(this.$reviewContainer)||Fera.Util.scrollToElement(this.$reviewContainer,{duration:200}),this.currentPage=e,this._fetchPage(e)}_fetchPage(e){var t={page:e,limit:this.limit,sort_by:this.sortBy};this.singleProduct&&(t.product_id=this._opts.productId||this.app.getProductId()),this._opts.typesToShow&&(t.review_type=this._opts.typesToShow),"choose"==this._opts.reviewOptions.review_source&&this._opts.reviewOptions.review_ids&&("string"==typeof this._opts.reviewOptions.review_ids?t.ids=JSON.parse(this._opts.reviewOptions.review_ids):t.ids=this._opts.reviewOptions.review_ids||[],t.ids=t.ids.join(",")),this.app.api.getReviews(t,((e,i)=>{this._hideLoading(),this.totalCount=i,this.totalCount<1?(this.clear(),this.$reviewContainer.append(this.$noReviews)):(this.$noReviews.remove(),"pagination"===this.paginationMode&&this.clear(),this._shouldShowRandomReviews(t.product_id)?this._renderReviews(Fera.Util.shuffleArray(e)):this._renderReviews(e)),this._updateFooter(),this.trigger("listUpdate",this.totalCount)}))}_shouldShowRandomReviews(e){const t=this._opts.reviewOptions.when_no_reviews;return("show_from_related"==t||"show_related"==t)&&!e}_renderReviews(e){for(var t=0;tthis.reviews.length?this.$showMore.show():this.$showMore.hide()}_showLoading(){this.$reviewContainer.toggleClass("loading",!0),this.currentlyLoading=!0}_hideLoading(){this.currentlyLoading&&(this.$reviewContainer.toggleClass("loading",!1),this.currentlyLoading=!1)}_noReviewsTpl(){return`
    {{ "No reviews for this product yet." | t }}
    `}_showMoreTpl(){return``}_tpl(){return`
    \n
    \n
    \n
    \n \n
    `}},Fera.Conditions_Comparison=class{constructor(e,t,i){this.stateValue=e,this.ruleValue=t,this.operator=i}isTrue(){return this[this.operator]()}equal(){return this.stateValue==this.ruleValue}not_equal(){return!this.equal()}equal_i(){return this.equal()}not_equal_i(){return!this.equal_i()}contains(){return this.stateValue==this.ruleValue}not_contains(){return!this.contains()}less(){return this.stateValuethis.ruleValue}greater_or_equal(){return this.stateValue>=this.ruleValue}between(){return this.greater()||this.less()}not_between(){return!this.between()}},Fera.Conditions_Comparison_String=class extends Fera.Conditions_Comparison{constructor(e,t,i){super(String(e).trim(),String(t).trim(),i)}equal(){return this.stateValue==this.ruleValue}equal_i(){return this.stateValue.toLowerCase()==this.ruleValue.toLowerCase()}contains(){return-1!==this.stateValue.toLowerCase().indexOf(this.ruleValue.toLowerCase())}less(){return parseFloat(this.stateValue)parseFloat(this.ruleValue)}greater_or_equal(){return parseFloat(this.stateValue)>=parseFloat(this.ruleValue)}between(){return-1!==this.ruleValue.indexOf(this.stateValue)}begins_with(){return this.stateValue&&0===this.stateValue.indexOf(this.ruleValue||"")}},Fera.Conditions_Comparison_Array=class extends Fera.Conditions_Comparison{constructor(e,t,i){super(e,t,i),"string"!=typeof this.stateValue&&(this.stateValue=String(this.stateValue).split(",")),this.stateValue=this.stateValue.sort()}equal(){let e=this.ruleValue;return"object"!=typeof this.ruleValue&&(e=String(this.ruleValue).split(",")),this.stateValue.join(",")==e.sort().join(",")}contains(){return-1!==this.stateValue.indexOf(this.ruleValue)}less(){return this.stateValue.lengththis.ruleValue}greater_or_equal(){return this.stateValue.length>=this.ruleValue}between(){return this.ruleValue.every((e=>-1!==this.stateValue.indexOf(e)))}},Fera.Conditions_Comparison_Param=class extends Fera.Conditions_Comparison_String{constructor(e,t,i){super(e,t.value,i)}},Fera.Conditions_Rule=class{constructor(e,t={}){this._opts=t,this.rule=e,this.atomic=!0,this.comparisonClass=this._determineComparisonClass()}isTrue(e){const t=e.fetchValue(this.rule.field,this.rule.value);if(null==t)return!1;return new this.comparisonClass(t,this.rule.value,this.rule.operator).isTrue()}debug(e){const t=e.fetchValue(this.rule.field,this.rule.value);return`(${this.rule.field}: ${JSON.stringify(t)} ${this.rule.operator} ${JSON.stringify(this.rule.value)})`}_determineComparisonClass(){switch(this.rule.type){case"string":return this.rule.field.match(/_param$/)&&"object"==typeof this.rule.value?Fera.Conditions_Comparison_Param:Fera.Conditions_Comparison_String;case"array":return Fera.Conditions_Comparison_Array}return Fera.Conditions_Comparison}},Fera.Conditions_Group=class{constructor(e,t={}){this._opts=t,this.conditions=e,this.rules=this.conditions.rules.map((e=>e.condition?new this.constructor(e):new Fera.Conditions_Rule(e))),this.separator=this.conditions.condition}isTrue(e){return!this.rules||this.rules.length<1||("AND"==this.separator?this.rules.every((t=>t.isTrue(e))):this.rules.some((t=>t.isTrue(e))))}debug(e){return this.rules.map((t=>t.atomic?`${t.debug(e)}=${t.isTrue(e)}`:`(${t.debug(e)})=${t.isTrue(e)}`)).join(` ${this.separator} `)}},Fera.Conditions_State=class{constructor(e,t={}){this._opts=t,this.data=e,this.data.product=this.data.product||{},this.data.cart=this.data.cart||{}}fetchValue(e,t){const i=this.data.current_page.url.toLowerCase();switch(e){case"shopper_country_code":return this.data.location.country_code;case"shopper_country_name":return this.data.location.country_name;case"shopper_city":return this.data.location.city;case"shopper_region_code":return this.data.location.region_code;case"shopper_region_name":return this.data.location.region_name;case"shopper_time_zone":return this.data.location.time_zone;case"shopper_continent":return this.data.location.continent;case"shopper_from_gdpr":return-1!==this.constructor.GDPR_COUNTRY_CODES.indexOf(this.data.location.country_code);case"shopper_not_from_gdpr":return-1===this.constructor.GDPR_COUNTRY_CODES.indexOf(this.data.location.country_code);case"cart_total":return this.data.cart.total;case"cart_item_count":return this.data.cart.item_count;case"cart_total_weight":return this.data.cart.total_weight;case"cart_item_product_ids":return this.data.cart.items.map((e=>e.product_id));case"cart_item_names":return this.data.cart.items.map((e=>e.name));case"cart_item_variant_ids":return this.data.cart.items.map((e=>e.variant_id));case"request_url":return i;case"request_title":return this.data.current_page.title.toLowerCase();case"request_referrer":return this.data.current_page.referrer.toLowerCase();case"request_path":return this.data.current_page.path;case"request_is_root":return-1!==["","/"].indexOf(this.data.current_page.path);case"request_url_param":return this._getUrlParamValue(i,t);case"shopper_total_interaction_time":return this.data.interaction_time;case"shopper_time_since_first_seen":return this.data.time_since_first_seen;case"shopper_session_time":return this.data.session_time;case"shopper_time_on_current_page": return this.data.time_on_current_page;case"shopper_inactive_time_on_current_page":return this.data.inactive_time_on_current_page;case"is_mobile":case"is_not_mobile":return this.constructor.isUserAgentMobile()?1:0;case"product_id":return this.data.product_id;case"product_exists":return!!this.data.product_id;case"product_tags":return this.data.product.tags;case"product_name":return this.data.product.name}return null}_getUrlParamValue(e,t){const i=e.split("?")[1]||"";if(void 0===t.value)return i;{const e=i.split("&").find((e=>e.split("=")[0]==t.param));return e?e.split("=")[1]:""}}static isUserAgentMobile(){return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(navigator.userAgent.substr(0,4))}static get GDPR_COUNTRY_CODES(){return["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","GB"]}},Fera.Conditions_Evaluator=class{constructor(e,t,i={}){this._opts=i,this.group=new Fera.Conditions_Group(e,this._opts),this.state=new Fera.Conditions_State(t,this._opts)}isTrue(){return this.group.isTrue(this.state)}debug(){return this.group.debug(this.state)}},Fera.AbTests=Fera.AbTests||{},Fera.AbTests.Manager=class{constructor(e){this._opts=e,this._storage=new Fera.LocalStorageJar("Fera.AbTests"),this._changed=!1,this._loadBuckets()}updateBuckets(e){if(e)return Object.keys(e).forEach((t=>{if(void 0!==this.buckets[t])return;let i;i=!!this._opts.app.opts.isAdminMode()||("boolean"==typeof e[t].on?e[t].on:e[t].next_bucket_on),this.updateBucket(t,i)})),this._expireBuckets(),this.save()}reset(){this.buckets={},this._changed=!0,this.save()}updateBucket(e,t){this.buckets[e]={on:t,expires:(new Date).getTime()+9e5},this._changed=!0}onFor(e){return this._expireBuckets(),void 0===this.buckets[e]||this.buckets[e].on}present(){return this._expireBuckets(),Object.keys(this.buckets).length>0}getBuckets(){if(!this.buckets||this.buckets=={}||"object"!=typeof this.buckets)return{};const e={};return Object.keys(this.buckets).forEach((t=>{var i=this.buckets[t];e[t]="boolean"==typeof i?i:i.on})),e}save(){return!!this._changed&&(this._storage.setObject("buckets",this.buckets),this._changed=!1,!0)}_expireBuckets(e=!0){return Object.keys(this.buckets).forEach((e=>{this.buckets[e].expires<(new Date).getTime()&&(delete this.buckets[e],this._changed=!0)})),e&&this._changed&&this.save(),this}_loadBuckets(){if(this._storage.localStorageEnabled)return this.buckets=this._storage.getObject("buckets",{}),Object.keys(this.buckets).forEach((e=>{if("object"!=typeof this.buckets[e]){const t=this.buckets[e];this.updateBucket(e,t)}})),this._changed&&this.save(),this.buckets}},Fera.Preview_Api=class extends Fera.Api{checkConfig(){return!0}waitForApiConfig(e){return e(!0)}validConfig(){return!0}checkIn(e,t={}){return t.callback&&t.callback()}mergeShoppers(e,t){return!0}pushEvent(e,t={}){const i=t.callback||t.then||(()=>{});return this._opts.testMode&&this._opts.logger.warn("[TEST MODE] Not pushing event to the api because test mode is enabled, but the rest of the JS will think we did.",e),i(!1)}getContent(e,t,i){this._app.previewer.getContent((i=>{let r=JSON.parse(e.content_requests_json).find((e=>"global_bottom"===e.container_type));if(r)this._globalBottomContainer=this._$.extend({},r);else{if(!this._globalBottomContainer)return t({});r=this._$.extend({},this._globalBottomContainer)}if(!i)return Fera.logger.warn("Fera preview API hit getContent callback without displayerResponse. There may be a problem."),t({});i.isPreview=!0,r.abstract_blocks=[i];const n={compiled_css:i.css,content_responses:[r],store:i.store};t(n)}))}},Fera.Preview_State=class extends Fera.State{getData(e){if(this._app.previewer)this._app.previewer.getState(e);else{const t=setInterval((()=>{this._app.previewer&&(clearInterval(t),this.getData(e))}),100)}}},Fera.ShopifyCartAdapter=function(e){var t=this,i=Fera.Util.$(),r=function(){n(),e.app.on("cart.ready",(function(){a()}))},n=function(){i(document).on("ajaxComplete",(function(t,i,r){if(!(i.status>=300)&&e.app.cart)if(r&&-1!==r.url.indexOf("/cart.js"))e.app.cart.loadCartData(JSON.parse(i.responseText));else if(r&&/\/cart\/(add|update|clear|change)/.test(r.url)){var n=JSON.parse(i.responseText);-1===r.url.indexOf("/cart/add")||n.items?e.app.cart.loadCartData(n):e.app.cart.loadItemData(n),e.app.updateAllContainers()}}))},a=function(){-1!==window.location.toString().indexOf("/thank_you")&&e.app.cart&&e.app.cart.reset()};t.startCheckout=function(){var e=Fera.Util.updateURLParameter(window.location.toString(),"ensure_loaded_cart","0");e=Fera.Util.updateURLParameter(e,"go_to_checkout","0"),window.location=e.replace("/cart","/checkout")},t.downloadData=function(e){i.getJSON("/cart.js",(function(t){"function"==typeof e&&e(t)}))},t.clear=function(e){i.ajax({method:"GET",type:"GET",data:{},dataType:"json",url:"/cart/clear",complete:function(){"function"==typeof e&&e()}})},t.parseCartData=function(e){var t={},i=null;if(!e)return null;i=s(),t.item_count=e.item_count,"string"==typeof e.currency&&(t.currency=e.currency),t.total=e.total_price/i/100,t.total_weight=e.total_weight,t.total_discount=e.total_discount/i/100,t.items=[];for(var r=0;r0))continue;if((o-=l.quantity)<0){a[l.variant_id]=0-o;break}}}a[l.variant_id]=0}}return 0!==Object.keys(a).length&&(i.ajax({method:"POST",type:"POST",data:{updates:a},dataType:"json",url:"/cart/update.js",complete:n.afterAdd||n.then||function(){}}),!0)},t.addProduct=function(e,t,r){var n={id:t.variant_id||t.variant||t.variantId,quantity:t.quantity||1};i.ajax({method:"POST",type:"POST",data:n,dataType:"json",url:"/cart/add.js",complete:function(){var t=arguments;o(e,(function(){(r.afterAdd||r.then||function(){}).apply(this,t)}))}})};var o=function(t,i){if(e.app.cart.getProductQuantity(t)>=1)return i();setTimeout((function(){e.app.cart.update((function(){o(t,i)}),!1)}),500)};r()},Fera.ShopifyAdapter=function(e){var t=this,i=Fera.Util.$();e=e||{};var r=[];this.cartAdapter=new Fera.ShopifyCartAdapter(e);var n=function(){e.logger.log("Shopify adapter initialized."),v(),l(),g(),a(),t.variantLoader=new Fera.VariantLoader(e),o()?c():(d(),setInterval((function(){d()}),250)),s()},a=function(){"undefined"!=typeof __st&&__st.cid&&(e.logger.log(`Set currently logged in customer as ${__st.cid}`),e.app.setCustomerId(__st.cid))},s=function(){"undefined"!=typeof Shopify&&Shopify.designMode&&(e.app.setDesignMode(!0),e.app.setAdminMode(!0))};this.formatCurrency=function(e){if("undefined"==typeof Shopify||!Shopify||!Shopify.currency||!Shopify.currency.rate||"undefined"==typeof theme||!theme.moneyFormat&&!theme.strings.moneyFormat)return null;var t=parseFloat(Shopify.currency.rate)*e,i=theme.moneyFormat;theme.moneyFormat||(i=theme.strings.moneyFormat);var r=i.replace(/{{[ ]?amount[ ]?}}/,t.toFixed(2).toString().replace(/\B(?=(\d{3})+(?!\d))/g,","));return r=(r=r.replace(/{{[ ]?amount_no_decimals[ ]?}}/,Math.round(t).toFixed(2).toString().replace(/\B(?=(\d{3})+(?!\d))/g,",").replace(/^(.+)\.00$/,"$1"))).replace(/{{[ ]?amount_with_comma_separator[ ]?}}/,t.toFixed(2).toString().replace(".",","))};var o=function(){if(-1!==window.location.toString().indexOf("/password"))return!0;var e=i('link[rel="canonical"]').attr("href");return!(!e||-1===e.indexOf("/password"))},c=function(){if(e.app.opts.sandboxMode)return i('a[href="/admin"]').on("click",(function(e){e.preventDefault(),alert("Please enter your storefront password instead. You can find it at YOUR_STORE_URL/admin/online_store/preferences.")})),setTimeout((function(){var e=i('a[href="#LoginModal"],.password__open-modal');e.length<=0||Fera.Util.scrollToElement(e,{callback:function(){}})}),1e3),!0},l=function(){-1!==window.location.toString().indexOf("/checkouts/")&&i('
    ').insertAfter(".breadcrumb")},d=function(){u(),p()},u=function(){i('form[action~="/cart/add"] button[type=submit],form[action~="/cart/add"] input[type=submit],.product-form__cart-submit,.add-to-cart, .addToCart, .add_to_cart, #addToCart, #add-to-cart, #add_to_cart, .add-to-cart input.button,.btn-addtocart').each((function(){var t=i(this);if(t.data("Fera.listenersBound"))return!0;if(t.length<=0)e.logger.warn("Fera did not find the add to cart button so it will not be enabled for add to cart events.");else{var r=f(t.parents("form"));t.on("click touch",(function(){m(r)})),t.data("Fera.listenersBound",!0)}}))},p=function(){i('form[action~="/cart/add"]').each((function(){var t=i(this);if(t.data("Fera.listenersBound"))return!0;if(t.length<=0)e.logger.warn("Fera did not find the add to cart form.");else{var r=f(t);t.on("submit",(function(){m(r)})),t.data("Fera.listenersBound",!0)}}))},h=function(e){return e&&e.length>0&&!e.match(/\D/)?e:null},f=function(e){var t=h(e.data("productid"))||h(e.data("product-id"))||h(e.find("[data-productid]").data("productid"))||h(e.find("[data-product-id]").data("product-id"));if(!t){var i=e.attr("id");i&&(i=i.split("_").pop()),t=h(i)}var r=h(e.find('[name="id"]').val()),n={};return r&&(n.variant_id=r),t&&(n.product_id=t),n!={}&&Fera.logger.log("Located product/variant event data for click: ",n),n},m=function(t){for(var i=0;i=300||r&&-1!==r.url.indexOf("/cart.php")||r&&-1!==r.url.indexOf("/remote/v1/cart/")&&setTimeout((function(){e.app.cart.update()}),500)}))},a=function(){i(window).on("load",(function(){var t=document.querySelector("[data-cart-content]");if(t&&"undefined"!=typeof MutationObserver){var i={attributes:!0,childList:!0,characterData:!0};new MutationObserver((function(){e.app.cart.update(!0)})).observe(t,i)}}))},s=function(){-1!==window.location.toString().indexOf("/order-confirmation")&&e.app.cart.reset()};t.startCheckout=function(){var e=Fera.Util.updateURLParameter(window.location.toString(),"ensure_loaded_cart","0");e=Fera.Util.updateURLParameter(e,"go_to_checkout","0"),window.location=e.replace("/cart","/checkout")},t.removeProduct=function(e,r,n){return i.ajax({method:"GET",type:"GET",data:{},dataType:"json",url:"/api/storefront/cart",beforeSend:function(e){e.setRequestHeader("x-xsrf-token",d())},complete:function(i){Fera.logger.log("Removing product...",i);var a=JSON.parse(i.responseText)[0];if(a){var s=[],c="",l=0;r&&(l=r.quantity||0);for(var d=0;d0)return e.app.setSection("checkout"),!0;Fera.Util.isHome()?e.app.setSection("home"):-1!==t.indexOf("cart.php")?e.app.setSection("cart"):-1!==t.indexOf("finishorder")?e.app.setSection("order_complete"):i(".banana-view-container").length>0?e.app.setSection("product_view"):i(".banana-list-container").length>0?e.app.setSection("product_list"):-1!==t.indexOf("checkout")&&e.app.setSection("checkout")},o=function(){var t=i("script").toArray().find((function(e){return e.innerHTML&&-1!==e.innerHTML.indexOf('window.stencilBootstrap("')}));if(t){const i=t.innerHTML.match(/window\.stencilBootstrap\("([a-zA-Z_-]+)"/);if(i){const t={default:"home",cart:"cart",product:"product_view",category:"product_list"}[i[1]];if(t)return e.app.setSection(t),!0}}return!1},c=function(){e.params&&e.params.dynamically_integrate&&(-1!==e.params.dynamically_integrate.indexOf("product_view")&&f(),-1!==e.params.dynamically_integrate.indexOf("product_list")&&d(),-1!==e.params.dynamically_integrate.indexOf("cart_top")&&l())},l=function(){var e='
    ';if(!(i(".banana-cart-container").length>0))if(-1!==window.location.toString().indexOf("/cart.php")){var t=i(".cart-container");t.length>0?t.each((function(){i(e).prependTo(i(this))})):i(e).insertAfter(i("h1,.page-title,.page-heading").first())}else-1===window.location.toString().indexOf("checkout")&&i(e).prependTo(i(".optimizedCheckout-contentPrimary"))},d=function(){var t='
    ';if(h(t))return!0;i(".productGrid article, .product-grid-container article").each((function(){var r=i(this),n=r.find("[data-product-id]").first().data("product-id");if(n&&""!==n||r.find("a").each((function(){var e=i(this).attr("href");e&&-1!==e.indexOf("product_id=")&&(e.match(/.+(product_id|product-id|productId)=(.+).*/i)&&(n=e.match(/.+(product_id|product-id|productId)=(.+).*/i)[2]))})),n&&""!==n){var a=t;a=a.replace("#{product_id_code}",n);try{i(a).appendTo(r)}catch(t){e.logger.log("appendTo BC auto-integration problem: "+t)}}}))},u=function(){i(document).on("ajaxComplete",(function(e,t){try{if(!t)return;var i=JSON.parse(t.responseText);t&&i&&i.productListing&&d()}catch(e){}}))},p=function(){return i(".product-grid *").contents().filter((function(){return 8===this.nodeType&&-1!==this.nodeValue.indexOf("snippet location product_rating")}))},h=function(t){var r=p();if(r.length<1)return!1;var n=!1;return r.each((function(){var r=i(this),a=r.parents(".product-item").find("[data-product-id]").data("productId");if(a&&""!==a){var s=t.replace("#{product_id_code}",a);r.after(s);try{i(s).appendTo(r)}catch(t){e.logger.log("Error appending snippet: "+t)}n=!0}})),n},f=function(){var e='
    ';if(g(e))return!0;r.length>0?_(e):v(e)},m=function(){return i(Fera.Util.ie()?"body":"*").contents().filter((function(){return 8===this.nodeType&&-1!==this.nodeValue.indexOf("snippet location product_addtocart")}))},g=function(t){var r=m();if(r.length<1)return!1;var n=!1;return r.each((function(){var r=i(this),a=r.parents("form").find("[data-product-id]").val();if(a&&""!==a){var s=t.replace("#{product_id_code}",a);r.after(s);try{i(s).appendTo(r)}catch(t){e.logger.log("appendTo BC auto-integration problem: "+t)}n=!0}})),n},v=function(t){for(var r=0;r0)&&-1!==window.location.toString().indexOf("/checkout")){var t=r(".cart-container");t.length>0?t.each((function(){r(e).prependTo(r(this))})):r(e).insertAfter(r("h1,.page-title,.page-heading").first())}},o=function(){(i=t.find('input[type="submit"],.addToCart,.btn-addToCart,.addToCartBtn,.btn-cart,.btn-add,.addToCart-btn,.add-btn,button[class*="add"],a[onclick="productAddToCartForm.submit(this)"],a[onclick="productAddToCartForm.submit(this)"],#product-addtocart-button,button[title*="Add"]')).length<1?e.logger.logWarning("Fera did not find the add to cart button so it will not be enabled for add to cart events."):i.on("click touch",(function(){e.app.pushAddToCartEvent()}))};n()},Fera.CustomAdapter=function(e){Fera.Util.$();e=e||{},e.debugMode&&console.log("Custom adapter initialized.")},Fera.WixCartAdapter=function(){},Fera.WixAdapter=function(e){var t=this,i=Fera.Util.$();e=e||{};var r=window.location.href,n=0,a=r,s=function(){e.logger.log("Wix adapter initialized."),t._allProducts=[],d(),u(),S(),x(),p(),m(),setTimeout((()=>g()),2e3),o(),t.isReady=n<1},o=function(){e.app.on("widget.create:after",(function(t){if("custom_block"===t.type&&"home"==e.app.getSection()){var r=t.$el.siblings();r.length<1||"1 / 1 / 1 / 1"==r.css("grid-area")&&"stretch"==r.css("justify-self")&&r.height()==r.parent().height()&&i(window).width()<550&&r.css("height","auto")}}))},c=function(){S(),u(),"product_view"!=e.app.getSection()&&e.app.setProductId(null),m(),w()},l=Fera.Util.debounce((()=>{c()}),1e3),d=function(){if(!e.app.opts.designMode)try{var i=document.getElementById("wix-viewer-model");if(!i)return;var r,n=JSON.parse(i.textContent);(r=n&&n.siteFeaturesConfigs&&n.siteFeaturesConfigs.multilingual?n.siteFeaturesConfigs.multilingual.currentLanguage.languageCode:n.language.siteLanguage)?e.app.setLocale(r):Fera.logger.log("[Wix] Failed to determine site language",t)}catch(e){Fera.logger.log("[Wix] Failed to determine site language",t,e)}},u=function(){var t=window.location.href;Fera.Util.isHome()?e.app.setSection("home"):-1!==t.indexOf("/cart-page")?e.app.setSection("cart"):-1!==t.indexOf("/product-page/")||i("[data-hook=product-page]").length>0?e.app.setSection("product_view"):-1!==t.indexOf("/shop")||i("[data-hook=product-list]").length>0?e.app.setSection("product_list"):-1!==t.indexOf("/checkout")?e.app.setSection("checkout"):e.app.setSection("other")},p=function(e){-1===window.location.href.indexOf("/product-page/")&&0===i("[data-hook=product-page]").length||h(e)||f(e)},h=function(t){var i,r,n=document.getElementById("wix-warmup-data");if(!n)return!1;try{if(i=JSON.parse(n.textContent).appsWarmupData,Object.keys(i).length<1)return!1}catch(e){return!1}return Object.keys(i).forEach((function(e){Object.keys(i[e]).forEach((function(t){var n=i[e][t];n.catalog&&n.catalog.product&&(r=n.catalog.product)}))})),!(!r||!r.id)&&(e.app.setProductId(r.id),t&&t(),!0)},f=function(i){var r={product_handle:y(window.location.href)};n++,e.app.api.getProducts(r,(function(r){var a=r[0];a&&a.platform_product_id&&(t._allProducts.push(a),e.app.setProductId(a.platform_product_id),w()),n--,t.isReady=n<1,i&&i()}),(function(e,i,r){Fera.logger.error("[Wix] Failed to determine Product ID: ",i,r),n--,t.isReady=n<1}))},m=function(){i('button[data-hook="add-to-cart"]').each((function(){var t=i(this);if(t.data("Fera.listenersBound"))return!0;if(t.length<=0)Fera.logger.warn("[Wix] Fera did not find the add to cart button so it will not be enabled for add to cart events.");else{var r={product_id:e.app.getProductId()};t.on("click touch",(function(){e.app.pushAddToCartEvent(r)})),t.data("Fera.listenersBound",!0)}}))},g=function(){window.wixDevelopersAnalytics;var e=function(){window.wixDevelopersAnalytics||(r=window.location.href,c())};t._legacyPageChangeListener=setInterval((function(){r!==window.location.href&&e(),window.wixDevelopersAnalytics&&(clearInterval(t._legacyPageChangeListener),v())}),100),window.addEventListener("wixDevelopersAnalyticsReady",(()=>{t._legacyPageChangeListener&&clearInterval(t._legacyPageChangeListener),v()})),window.addEventListener("popstate",e),window.addEventListener("hashchange",e)},v=function(){window.wixDevelopersAnalytics.register("c9064755-5cc8-4faf-a5a6-41a0150a6640",((i,r)=>{Fera.logger.log("[Wix] Got event",i,r),"productPageLoaded"==i?(t._previousProductId=e.app.getProductId(),e.app.setProductId(r.productId),Fera.logger.log("[Wix] Set product to",r.productId),l()):"AddProductImpression"==i||"PageView"==i&&_()}))},_=function(){const e=window.location.href;a!=e&&(Fera.logger.log("[Wix] Page changed"),a=e,l())},w=Fera.Util.debounce((()=>{e.app.forceRefreshContent()}),1e3),y=function(e){var t=e.trim().split("/").pop();return t.indexOf("?")>-1&&(t=t.split("?")[0]),t},b=function(){var e=[];return i('a[data-hook="product-item-container"],a[data-hook="product-widget-layout"]').each((function(){var t=i(this).attr("href");if(t){var r=y(t);r&&e.push(r)}})),e},C=function(){const e={updated:0,no_product:0,existing:0,total:0};return i('[data-hook="product-item-root"],[data-hook="product-widget"]').each((function(){var r=i(this);if(r.data("fera-context"))return e.existing++;var n=r.find('a[data-hook="product-item-container"],a[data-hook="product-widget-layout"]').attr("href");if(n){e.total++;var a=y(n),s=t._allProducts.find((function(e){return y(e.url)==a}));s?(e.updated++,Fera.logger.info("compare products from server:",a,y(s.url)),r.attr("data-product-id",s.platform_product_id).attr("data-fera-context",!0)):e.no_product++}})),e},S=(Fera.Util.debounce((()=>C()),1e3),function(i){var r=b();if(r.length<1)return!1;var a={product_handles:r.join(",")};return n++,e.app.api.getProducts(a,(function(e){t._allProducts=t._allProducts.concat(e);const r=C();n--,t.isReady=n<1,i&&i(r)}),(function(){Fera.logger.error("[Wix] Failed to fetch Product IDs"),n--,t.isReady=n<1})),!0}),x=function(){if(t._productListCheckFunction)return;const i=Fera.Util.debounce((()=>{const t=C();t.no_product>0&&S((i=>{t.no_product!=i.no_product&&e.app.refreshContent()}))}),100);t._productListCheckFunction=e=>{e.some((e=>Array.from(e.addedNodes).some((e=>F$(e).find('[data-hook="product-item-root"],[data-hook="product-widget"]').length>0))))&&i()};new MutationObserver(t._productListCheckFunction).observe(document,{subtree:!0,childList:!0,attributes:!1})};s()};try{var loadFera=function(){window.fera&&window.fera.version||(window.fera=window.fera||[],window.__bsio&&(window.fera=window.fera.concat(window.__bsio)),window.fera=window.__bsio=new Fera.App({pushBuffer:window.fera,debugMode:window.feraDebugMode||window.__bsioDebugMode||!1,showErrors:window.feraShowErrors,supportedPlatforms:["shopify","bigcommerce","magento","magento2","custom","wix"],parentWindow:window.opener?window.opener:window.parent&&window.parent.length>0&&window!==window.top?window.parent:null}))};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",loadFera):loadFera()}catch(e){if(window.feraDebugMode||window.__bsioDebugMode||window.feraShowErrors)throw e;window.console&&window.console.error(e)}