").append(T.parseHTML(e)).find(i):e)})).always(n&&function(e,t){a.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},T.expr.pseudos.animated=function(e){return T.grep(T.timers,(function(t){return e===t.elem})).length},T.offset={setOffset:function(e,t,n){var i,r,o,a,s,l,u=T.css(e,"position"),c=T(e),d={};"static"===u&&(e.style.position="relative"),s=c.offset(),o=T.css(e,"top"),l=T.css(e,"left"),("absolute"===u||"fixed"===u)&&(o+l).indexOf("auto")>-1?(a=(i=c.position()).top,r=i.left):(a=parseFloat(o)||0,r=parseFloat(l)||0),g(t)&&(t=t.call(e,n,T.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+r),"using"in t?t.using.call(e,d):("number"==typeof d.top&&(d.top+="px"),"number"==typeof d.left&&(d.left+="px"),c.css(d))}},T.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){T.offset.setOffset(this,e,t)}));var t,n,i=this[0];return i?i.getClientRects().length?(t=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,i=this[0],r={top:0,left:0};if("fixed"===T.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===T.css(e,"position");)e=e.parentNode;e&&e!==i&&1===e.nodeType&&((r=T(e).offset()).top+=T.css(e,"borderTopWidth",!0),r.left+=T.css(e,"borderLeftWidth",!0))}return{top:t.top-r.top-T.css(i,"marginTop",!0),left:t.left-r.left-T.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===T.css(e,"position");)e=e.offsetParent;return e||oe}))}}),T.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;T.fn[e]=function(i){return F(this,(function(e,i,r){var o;if(y(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===r)return o?o[t]:e[i];o?o.scrollTo(n?o.pageXOffset:r,n?r:o.pageYOffset):e[i]=r}),e,i,arguments.length)}})),T.each(["top","left"],(function(e,t){T.cssHooks[t]=Ye(m.pixelPosition,(function(e,n){if(n)return n=Ue(e,t),ze.test(n)?T(e).position()[t]+"px":n}))})),T.each({Height:"height",Width:"width"},(function(e,t){T.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,i){T.fn[i]=function(r,o){var a=arguments.length&&(n||"boolean"!=typeof r),s=n||(!0===r||!0===o?"margin":"border");return F(this,(function(t,n,r){var o;return y(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===r?T.css(t,n,s):T.style(t,n,r,s)}),t,a?r:void 0,a)}}))})),T.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){T.fn[t]=function(e){return this.on(t,e)}})),T.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),T.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){T.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}));var Xt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;T.proxy=function(e,t){var n,i,r;if("string"==typeof t&&(n=e[t],t=e,e=n),g(e))return i=s.call(arguments,2),(r=function(){return e.apply(t||this,i.concat(s.call(arguments)))}).guid=e.guid=e.guid||T.guid++,r},T.holdReady=function(e){e?T.readyWait++:T.ready(!0)},T.isArray=Array.isArray,T.parseJSON=JSON.parse,T.nodeName=A,T.isFunction=g,T.isWindow=y,T.camelCase=G,T.type=_,T.now=Date.now,T.isNumeric=function(e){var t=T.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},T.trim=function(e){return null==e?"":(e+"").replace(Xt,"")},void 0===(i=function(){return T}.apply(t,[]))||(e.exports=i);var Kt=n.jQuery,Jt=n.$;return T.noConflict=function(e){return n.$===T&&(n.$=Jt),e&&n.jQuery===T&&(n.jQuery=Kt),T},void 0===r&&(n.jQuery=n.$=T),T}))},FQrY:function(e,t,n){"use strict";n.r(t),n.d(t,"renderSortType",(function(){return N})),n.d(t,"renderMasonryList",(function(){return q})),n.d(t,"doLazyLoad",(function(){return W})),n.d(t,"replacePositionFlagCountry",(function(){return P})),n.d(t,"handleHeightIframeArBox",(function(){return j}));var i,r=n("sKKK"),o=(n("PBvO"),n("i+eT"),n("fYoa")),a={items:4,margin:16,nav:!0,dots:!1,loop:!1,rewind:!1,autoplay:!0,autoplayTimeout:20,smartSpeed:700,fluidSpeed:700,lazyLoad:!0,autoWidth:!1,autoHeight:!0,autoplayHoverPause:!0,stageOuterClass:"alireview-owl-stage-outer",navContainerClass:"alireview-owl-nav",dotClass:"alireview-owl-dot",dotsClass:"alireview-owl-dots",refreshClass:"alireview-owl-refresh",loadingClass:"alireview-owl-loading",loadedClass:"alireview-owl-loaded",rtlClass:"alireview-owl-rtl",dragClass:"alireview-owl-drag",grabClass:"alireview-owl-grab",stageClass:"alireview-owl-stage",autoHeightClass:"alireview-owl-height",itemClass:"alireview-owl-item",navClass:["alireview-owl-prev","alireview-owl-next"],navText:['',''],responsiveClass:!0,responsive:{0:{items:1,margin:7,nav:!1,dots:!1},480:{items:2,nav:!1,dots:!1},768:{items:2,nav:!1,dots:!1},992:{items:3,nav:!1},1200:{items:1},1400:{items:2}}},s={items:1,responsive:{0:{nav:!1,dots:!1},992:{nav:!1,dots:!1},1200:{dots:!1}}},l=function(){$(".alireview-row:not(.over-text-done)").each((function(e){var t=$(this).find(".alireview-post-hidden").val(),n=$(this).find(".alireview-post"),i=$(this).find(".alireview-post p");if(i.text(t),t){for(var r=t.split(" ");i.outerHeight()>n.outerHeight();)r.pop(),i.html(r.join(" ")+'');$(this).addClass("over-text-done")}}))},u=n("ZrHn"),c=($("#shopify-ali-review .shop_info").attr("shop-id"),Object(u.a)(),""),d="",f=!1,p=20,h=Object.assign({items:1,responsive:{0:{nav:!1,dots:!1},576:{nav:!1,dots:!1},1200:{dots:!1}}},{onChanged:function(e){var t=e.item.index,n=$(e.target).find(".alireview-owl-item").eq(t);$(".js-alireview-product-image").attr("src",n.find('input[name="alireview-product-image"]').val()),$(".js-alireview-product-link").attr("url",n.find('input[name="alireview-product-url"]').val()),$(".js-alireview-product-link").text(n.find('input[name="alireview-product-title"]').val()),$(".js-alireview-product-price").text(n.find('input[name="alireview-product-price"]').val())}}),v=Object.assign({items:4,responsive:{0:{items:1,nav:!1,dots:!1,stagePadding:30},480:{items:1,nav:!1,dots:!1,stagePadding:120},768:{items:2,nav:!1,dots:!1,stagePadding:60},992:{items:3,nav:!1,dots:!1,stagePadding:40},1200:{items:4},1400:{items:4}}},{onInitialized:function(e){g()},onChanged:function(e){setTimeout((function(){g()}))}});function m(){this.configCarousel=null}function g(){$(".js-alireview-owl-carousel .alireview-owl-stage .alireview-owl-item.active + .alireview-owl-item:not(.active)").find(".owl-lazy").each((function(){var e=$(this).attr("data-src");e&&($(this).attr("src",e),$(this).removeAttr("data-src"))}))}function y(e){$(".alireview-row").removeClass("over-text-done"),l()}m.prototype.Init=function(){c=$('input[name="type-widget-carousel"]')?$('input[name="type-widget-carousel"]').val():"",d=$('input[name="style-widget-carousel"]')?$('input[name="style-widget-carousel"]').val():"",c&&d&&(this.getValueElement(),this.setConfigDefault(),this.mergeConfigCarousel(),function(){if(!$(".js-alireview-image-resize.fit"))return;$(".js-alireview-image-resize.fit").on("load",(function(){$(this).css({width:"auto"});var e=this.width,t=this.height,n=$(this).parent(),i=n.width(),r=n.height();e0&&($(".alr-rating").not(".done").rating(),$(".alr-rating").addClass("done")),N(e.data.sort_type),$("img.jslghtbx-thmb").on("click",(function(){})),window.filesToUpload=[],window.uploadPhoto=new o.a(".alireview_list_image","#alireview_file_upload",filesToUpload),uploadPhoto.Init(),$("html,body").animate({scrollTop:$("#shopify-ali-review .reviews").offset().top},"slow"),$('input[name="summary-star"]').val(e.data.star),P()})):$("#shopify-ali-review .reviews").html("");var t=document.querySelector("div").getAttribute("widget-id");if(t){var n={onScrollTopReviewBox:t};Object(w.b)(n)}W(),j(),setTimeout((function(){l()}),500)},error:function(){$("#shopify-ali-review .reviews").html("")}})}));else if("load_more"==e)$(document).on("click","#alireview_load_more",(function(e){var o=$("#alireview_navigation_current_page").val()||1;o++;var f=r.a.widget_url+"/v1/widget/review-widget";$.ajax({type:"GET",url:f,data:{product_id:t,shop_id:n,num_rand:0,widget_id:a,type_widget:s,type_page:u,product_in_cart:c,isAdminLogin:d,products_not_in:i,currentPage:parseInt(o),star:$('input[name="summary-star"]').val()||"all",sort_type:$('input[name="sort-type"]').val(),style:window.STYLE_LAYOUT_REVIEW},dataType:"json",beforeSend:function(){$("#shopify-ali-review .alireview-pagination").before(htmlAlireviewLoading),$("#alireview_load_more").css({display:"none"})},success:function(e){if(e.status){$("#alireview_navigation_current_page").val(e.data.current_page),$("#alireview_load_more").css({display:"inline-block"}),e.data.current_page==e.data.last_page&&$("#alireview_load_more").remove(),$(".alireview-loadding-wrap").remove();var t=$(e.data.view).find(".list-alireview .alireview-row");$("#shopify-ali-review .list-alireview").append(t).promise().done((function(){"grid"===window.STYLE_LAYOUT_REVIEW&&q(),$(".alr-rating").length>0&&($(".alr-rating").not(".done").rating(),$(".alr-rating").addClass("done")),$('input[name="summary-star"]').val(e.data.star),P()}))}W(),j(),setTimeout((function(){l()}),500)}})}));else if("scroll"==e){var f=!1,p=parseInt($("#alireview_navigation_current_page").val())||1,h=parseInt($("#alireview_navigation_last_page").val());if(null!=h&&h>0&&p>=h)return!1;if(1==f)return!1;f=!0,p++;r.a.shop_url;void 0!==r.a.widget_url&&""!==r.a.shop_url&&r.a.widget_url+"/v1/reviews/get-reviews";var v=r.a.widget_url+"/v1/widget/review-widget";return $.ajax({type:"GET",url:v,data:{product_id:t,shop_id:n,num_rand:0,widget_id:a,type_widget:s,type_page:u,product_in_cart:c,isAdminLogin:d,products_not_in:i,currentPage:parseInt(p),star:$('input[name="summary-star"]').val()||"all",sort_type:$('input[name="sort-type"]').val(),style:window.STYLE_LAYOUT_REVIEW},dataType:"json",beforeSend:function(){$("#shopify-ali-review .alireview-pagination").before(htmlAlireviewLoading)},success:function(e){if(e.status){$("#alireview_navigation_current_page").val(e.data.current_page),$("#alireview_navigation_last_page").val(e.data.last_page),e.data.current_page>=e.data.last_page&&$(".alireview-loadding-wrap").remove(),$(".alireview-loadding-wrap").remove();var t=$(e.data.view).find(".list-alireview .alireview-row");$("#shopify-ali-review .list-alireview").append(t).promise().done((function(){"grid"===window.STYLE_LAYOUT_REVIEW&&q(),$(".alr-rating").length>0&&($(".alr-rating").not(".done").rating(),$(".alr-rating").addClass("done")),$('input[name="summary-star"]').val(e.data.star),P()}))}W(),setTimeout((function(){l();var e=document.querySelector("div").getAttribute("widget-id");if(e){var t={loadedPaggingReviewBox:e};Object(w.b)(t)}}),500)}}).always((function(){f=!1})),!1}}var x=n("YV4L"),_=n("D0Uq"),T=n("j91h"),C=$("#alireview_navigation_type").val(),E=1,k=null,S=3,A=1==$('input[name="slide-loop"]').val(),L=parseInt($('input[name="slide-time"]').val()||20),I=$('input[name="is-admin"]').val();function j(){var e=0,t=$('input[name="type-widget"]').val(),n=$('input[name="type-page"]').val(),i=$('input[name="total_review"]').val();if("carousel_slide"==t)e=Math.max(document.documentElement.clientHeight||0,window.innerHeight||0,document.getElementsByTagName("html")[0].offsetHeight||0);else{var r=document.documentElement;e=Math.max(r.clientHeight||0,r.scrollHeight||0,r.offsetHeight||0)}var o=document.querySelector("input[name=id-widget]")&&document.querySelector("input[name=id-widget]").value;if(o){var a={frameArBoxHeight:e,widget_id:o};"review_box"===t&&"product"===n||0!=i&&null!=i&&null!=i||(a.frameArBoxHeight=0),Object(w.b)(a)}}function O(){var e=document.getElementsByTagName("html")[0].offsetWidth,t=document.querySelector("input[name=id-widget]")&&document.querySelector("input[name=id-widget]").value,n=document.querySelector("input[name=type-widget]")&&document.querySelector("input[name=type-widget]").value;if(t){var i={frameArBoxWidth:e,widget_id:t,isDetectWidth:"".concat(n,"_").concat(t)};Object(w.b)(i)}}function D(e,t){var n=$("#shopify-ali-review"),i=n.find(".shop_info").attr("shop-id"),a=n.attr("product-id"),s=$("input[name='id-widget']").val(),l=$("input[name='type-widget']").val(),u=$("input[name='type-page']").val(),c=$("input[name='product-in-cart']").val();!t&&(t=$('input[name="sort-type"]').val()),$(".alireview-result").html("").before(htmlAlireviewLoading);var d=H(),f=r.a.widget_url+"/v1/widget/review-widget";$.ajax({type:"GET",url:f,data:{product_id:a,shop_id:i,widget_id:s,type_widget:l,type_page:u,product_in_cart:c,num_rand:0,isAdminLogin:I,star:e,sort_type:t,visitor_id:d.visitor_id,time_limit_track:d.time_limit_track,style:window.STYLE_LAYOUT_REVIEW},dataType:"json",success:function(e){if(e.status){if(n.find(".reviews").html(e.data.view),e.data.current_page==e.data.last_page&&$("#alireview_load_more").remove(),"grid"===window.STYLE_LAYOUT_REVIEW){q();var t=setInterval((function(){parseInt($(".list-alireview").outerHeight())<=60?q():clearInterval(t)}),1e3)}else"carousel"===window.STYLE_LAYOUT_REVIEW&&R(e.countReviews);$(".alr-rating").length>0&&($(".alr-rating").not(".done").rating(),$(".alr-rating").addClass("done")),window.filesToUpload=[],window.uploadPhoto=new o.a(".alireview_list_image","#alireview_file_upload",filesToUpload),uploadPhoto.Init(),$('input[name="summary-star"]').val(e.data.star),function(){var e=$("#shopify-ali-review .alr-count-reviews"),t=$('input[name="summary-star"]').val();"all"!==t&&(e.addClass("active"),e.find('li[star="'.concat(t,'"]')).addClass("active"))}(),N(e.data.sort_type),P(),j()}else $(".alireview-loadding-wrap").remove();W()},error:function(){n.hide()}})}function N(e){var t="";$.each(e.list_sort,(function(n,i){"all"!==n&&(t+='