(()=>{"use strict";var t={45:(t,e,i)=>{i.d(e,{P9:()=>_,Rh:()=>y,nn:()=>b,oD:()=>x,yS:()=>w});var s=i(571),n=i(957),o=i(986),r=i(657),a=i(357),l=i(651),d=i(297);let c=0;const p=588;let u=p,v=!1,g="",A="",w=null,h=5,m=0;function _(t){window.innerWidth${_.tip_3}`:2===y.discount_incentive_conditions&&(A=`
${_.tip_1}
`)}let k=344;const{logo_src:q,logo_alignment:E,logo_size:L}=e;""!==g&&(k+=20,s.A.isMobile&&(k+=20)),new Promise((t=>{if(q){const e=new Image;e.onload=()=>{t(parseInt(L/e.naturalWidth*e.naturalHeight+20))},e.onerror=()=>{t(0)},e.src=q}else t(0)})).then((t=>{k+=t})).finally((()=>{344!==k&&(s.A.globalStyle.textContent+=`#trustoo-slide, .write-review-slide {height: ${k}px !important;}`)}));let P="";if(1===t.show_privacy_policy){let e="";const i=r.privacy_policy,s=r.terms,n=r.consent_text.replace("{{privacy_policy}}",`${i}`).replace("{{terms}}",`${s}`);1===t.show_checkbox&&(e=''),P=`
\n\t\t\t${e}\n\t\t
`}let I=1===t.enabled_add_video?`\n
\n ${i.or}\n
\n
\n ${i.add_video} \n \n
\n `:"";s.A.attributeConfig&&(h+=s.A.attributeConfig.attributes.length),m=t.rating_icon_type;const M=`class="stars vstar-star" data-type="${t.rating_icon_type}"`,D=`\n
\n
\n
\n
\n
\n
${i.slide_1_title}
\n
\n
${T(5)}
${i.rating_options[0]}
\n
${T(4)}
${i.rating_options[1]}
\n
${T(3)}
${i.rating_options[2]}
\n
${T(2)}
${i.rating_options[3]}
\n
${T(1)}
${i.rating_options[4]}
\n
\n\t\t\t\t${g}\n
\n
\n
${i.slide_2_title}
\n
${i.slide_2_subtitle}
\n
\n ${A}\n
\n ${i.add_photo} \n \n
\n ${I}\n
\n \n \n
\n
\n
\n
${i.slide_3_title}
\n \n \n \n
\n\t\t\t${f(!0)}\n
\n
${i.slide_4_title}
\n \n \n ${P}\n \n \n
\n
\n\t\t\t\t\t
${i.slide_5_title}
\n\t\t\t\t\t
${i.slide_5_subtitle}
\n\t\t\t\t\t\n\t\t\t\t\t\n
\n
\n
\n
\n `;(0,o.$dqs)("#trustoo-mask").insertAdjacentHTML("beforeend",D);const B="undefined"!=typeof Review&&["ar","he"].includes(Review.lang)?"#trustoo-slide .slide-content,#trustoo-slide .slide-input {\n\t\tdirection: rtl;\n\t}":"";if(q&&document.querySelectorAll(".write-review-slide").forEach((t=>t.insertAdjacentHTML("afterbegin",``))),s.A.globalStyle.textContent+=`\n\t.trustoo-write-review,#tt-product-selector{\n\t\t--button-bg-color: ${t.review_button_background_color};\n\t\t--button-text-color: ${t.review_button_text_color};\n\t\t--button-radius: ${t.button_radius}px;\n\t\t--text-color: ${t.text_color};\n\t\t--light-text-color: ${(0,o.hexToRgba)(t.text_color,.4)};\n\t\t--discount-code-color:${t.discount_text_color};\n\t\t--discount-copy-color:${t.discount_copy_color};\n\t}\n\t.trustoo-write-review .slide-content{\n\t\tbackground:${(0,o.hexToRgba)(t.text_color,.05)}\n\t}\n\t.trustoo-write-review .vstar-star{\n\t\t--star-color: ${t.review_button_background_color};\n\t\t--nostar-color: ${t.review_button_text_color};\n\t}\n\t.trustoo-write-review,#tt-product-selector{\n\t\t--write-bg:${t.popup_bg_color};\n\t\tbackground: ${t.popup_bg_color};\n\t\tborder-radius: ${t.popup_radius}px;\n\t\tcolor:${t.text_color}\n\t}\n\t.trustoo-write-review .slide-upload {\n\t\tbackground: ${t.popup_bg_color};\n\t}\n\t.trustoo-widget .window-discount,.trustoo-widget .slide-discount{\n\t\tbackground:${t.discount_bg_color};\n\t\tborder-radius: ${t.discount_card_radius}px;\n\t}\n\t${B}\n\t`,function(t){const e=(0,o.$dqs)("#trustoo-slide");s.A.slide=e,(0,o.$dqs)(".window-close",e).onclick=function(){x()},(0,o.$dqsa)(".slide-option",e).forEach((t=>{t.onclick=function(){s.A.ratingVal=t.getAttribute("rating"),R()},t.onmouseover=function(){t.classList.add("active")},t.onmouseout=function(){t.classList.remove("active")}})),(0,o.$dqs)(".upload-input.tt-image-uploader",e).onchange=async function(){const e=this.files[0],i=this.getAttribute("accept").split(",").map((t=>t.slice(1))),r=e.name.split(".").pop();if(!i.includes(r.toLowerCase()))return(0,o.setToast)(s.A.lang.error_tip),!1;if(s.A.uploadType=1,(0,o.$dqs)(".upload-file-tip").style.display="block",(0,o.$dqs)(".upload-file-tip").innerHTML=a.A.loading(t)+"Uploading",R(),!Object.keys(s.A.uploadImgInfo).length){const t=await n.zG.getPolicyToken();s.A.uploadImgInfo=t[1]}const l=this;(0,o.compressImage)(e).then((e=>{n.zG.uploadImg(e).then((e=>{null===e[0]&&((0,o.$dqs)(".upload-file-tip").innerHTML=a.A.over(t),s.A.mediaUrl[0]={url:"https://img.trustoo.io/"+e[1].key,resource_type:1},l.value="")}))}))};const i=(0,o.$dqs)(".tt-video-uploader",e);i&&(i.onchange=async function(){const e=this.files[0],l=this.getAttribute("accept").split(",").map((t=>t.slice(1))),c=e.name.split(".").pop();if(!l.includes(c.toLowerCase()))return(0,o.setToast)(s.A.lang.error_tip),!1;const p=parseInt(e.size/1048576);if(p>=600)return(0,o.setToast)("The file cannot exceed 600MB"),i.value="",!1;(0,o.$dqs)(".upload-file-tip").style.display="block",(0,o.$dqs)(".upload-file-tip").innerHTML=a.A.loading(t)+"Uploading",R(),s.A.uploadType=2,v=!0;const u=(0,o.$dqs)(".slide-done");u.setAttribute("disabled",!0),p>=200?(0,d.i_)(e,0,((t,e)=>{r(u,"success",{domain:t,video_service_uid:e})}),(()=>{r(u,"fail")})):n.zG.getUploadVideoUrl().then((t=>{const{upload_url:i}=t[1];n.zG.uploadVideo(i,e).then((()=>{r(u,"success",t[1])})).catch((()=>{r(u,"fail")}))})).catch((()=>{r(u,"fail")}))});function r(e,n,r=null){if((0,o.$dqs)(".upload-file-tip").innerHTML="",v=!1,w(),3===c&&(e.textContent=s.A.lang.separate_review_form.done),"fail"===n&&(0,o.setToast)(s.A.lang.error_tip),r){const{video_service_uid:e,domain:i}=r,n=i+"/"+e;s.A.mediaUrl[0]={url:n+"/iframe",resource_type:2},(0,o.$dqs)(".upload-file-tip").innerHTML=a.A.over(t)}i.value=""}const p=(0,o.$dqs)(".slide-content",e),g=(0,o.$dqs)(".slide-next",e);p.oninput=function(){""!==this.value?g.removeAttribute("disabled"):g.setAttribute("disabled",!0)},p.onblur=function(){""===this.value&&g.setAttribute("disabled",!0)};const A=/^[a-zA-Z0-9_-]+(\.[A-Za-z0-9_-]+)*@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/,h=(0,o.$dqsa)("input.slide-input",e),m=(0,o.$dqs)(".slide-done",e);w=(0,o.debounce)((function(){if(""!==h[1].value){const t=(0,o.$dqs)(".input-tip",e);A.test(h[1].value)?t&&(0,o.$dqs)(".input-tip",e).remove():t||h[1].insertAdjacentHTML("afterend",`
\n ${s.A.lang.email_error}\n
`)}$()}),300),h.forEach((t=>{t.oninput=w,t.onblur=function(){$()}}));const _=(0,o.$dqs)("#tt-protection-checkbox",e);_&&(_.onchange=function(){$()});(0,o.$dqs)(".discount-copy",e).onclick=function(){(0,o.copyToClipboard)((0,o.$dqs)(".discount-code",e).textContent,(()=>{(0,o.setToast)(s.A.copyText||s.A.lang.copy_succ)}))},e.addEventListener("click",(t=>{const i=t.target,r=i.classList;if(r.contains("next-slide"))r.contains("slide-next")&&v&&(m.textContent=s.A.lang.separate_review_form.uploading_video_tip),r.contains("slide-finish")?(x(),c=0,(0,o.$dqsa)(".slide-discount",e).forEach((t=>t.style.display="none")),(0,o.$dqs)(".write-review-slide.active").classList.remove("active"),(0,o.$dqs)('.write-review-slide[index="0"]').classList.add("active"),(0,o.$dqs)(".write-review-container").style.left=0):r.contains("slide-done")?(i.innerHTML="",(0,o.setLoading)(i),function(){const t={},e=s.A.slide,i="shop"===e.dataset.reviewType;s.A.ip&&(t.ip=s.A.ip,t.author_country=s.A.loc);const r=(0,o.$dqs)(".slide-name",e),a=(0,o.$dqs)(".slide-email",e),d=(0,o.$dqs)(".slide-content",e);t.author=r.value,t.author_email=a.value,t.content=d.value,s.A.isLinkReqRev&&("undefined"==typeof isEmailWrite&&(t.source="store_link"),void 0!==s.A.writeLinkParams.dondy&&(t.source="store_link_dondy"));const c=(0,o.$dqs)("#tt-protection-checkbox",e);c&&c.checked&&(t.agree_privacy=1);const p=(0,l.uq)();p.length&&(t.attributes_info={attributes:p,attribute_collection_id:s.A.attributeConfig.attribute_collection_id});n.zG.uploadReview(t,s.A.uploadType,s.A.mediaUrl,i).then((t=>{if(t[0]){let e="";e=-2===t[0].code?t[0].error:s.A.lang.error_tip,(0,o.setToast)(e)}else!function(t,e,i,n,r){const a=s.A.slide,l=s.A.lang.separate_review_form,d=t[1]?t[1].discount_code:"",c=(0,o.$dqs)(".write-review-slide[data-last-slide] .slide-title",a);if(d){const t=l.discount_setting,e=(0,o.$dqs)(".write-review-slide[data-last-slide] .slide-desc",a);c.textContent=t.title,c.style.marginTop="69px",e.textContent=t.subtitle,(0,o.$dqs)(".slide-discount",a).style.display="flex",(0,o.$dqs)(".discount-code",a).textContent=d}else c.style.marginTop="108px";R(),(0,o.$dqsa)("[data-content-slide] .slide-next,.slide-done",a).forEach((t=>t.setAttribute("disabled",!0))),(0,o.$dqs)(".upload-file-tip",a).innerHTML="",e.value=i.value=n.value="",r&&(r.checked=!1);if(s.A.mediaUrl=[],s.A.isLinkReqRev){const t=new URLSearchParams(window.location.search);t.delete("req"),t.delete("dondy");const e=t.toString(),i=window.location.pathname+(e?"?"+e:"");window.history.replaceState({},"",i),s.A.isLinkReqRev=!1}}(t,r,a,d,c);(0,o.$dqs)(".slide-done",e).innerHTML=s.A.lang.separate_review_form.done}))}()):R();else if(r.contains("back-slide")){const t=(0,o.$dqs)(`.write-review-slide[index="${c}"]`);S(t,t.previousElementSibling),c--,(0,o.$dqs)(".write-review-container").style.left=(parseInt(t.getAttribute("index"))-1)*-u+"px"}}))}(t.text_color),C(),s.A.isLinkReqRev){document.body.classList.add("trustoo-open"),(0,o.$dqs)("#trustoo-mask").style.display="flex";const t=(0,o.$dqs)(".trustoo-write-review");t.style.display="block",t.parentNode.style.display="block"}}function f(t=!1){const e=s.A.lang.separate_review_form;let i="";if(s.A.attributeConfig){const n=s.A.attributeConfig.attributes,o=t?"data-normal-product":"data-select-product";n.forEach(((t,s)=>{let n="";"multiple_choice"===t.type&&(n=``),i+=`
\n\t\t\t${n}\n\t\t\t \n \n
`}))}return i}function y(){n.zG.getAttribute().then((t=>{t[1]&&(s.A.attributeConfig=t[1],(0,o.$dqs)("[data-reviewer-slide]",s.A.slide).insertAdjacentHTML("beforebegin",f()),C(),b())}))}function b(){let t=0;"normal"!==s.A.slide.dataset.reviewType&&(0,o.$dqsa)(".write-review-slide",s.A.slide).forEach((e=>{"normalProduct"in e.dataset?e.setAttribute("index",-1):(e.setAttribute("index",t),t++)}))}function C(){const t="product"===s.A.slide.dataset.reviewType?"data-select-product":"data-normal-product";(0,o.$dqsa)(`.write-review-slide[${t}][data-attribute]`,s.A.slide).forEach(((t,e)=>{(0,l.M6)(t,s.A.attributeConfig.attributes[e],((t,e)=>{e||R()}))}))}function $(){const t=s.A.slide,e=(0,o.$dqsa)("input.slide-input",t),i=(0,o.$dqs)(".slide-done",t),n=(0,o.$dqs)("#tt-protection-checkbox",t),r=(0,o.$dqs)(".input-tip",t);let a=!0;n&&(a=n.checked),""===e[0].value||""===e[1].value||!a||v||r?i.setAttribute("disabled",!0):i.removeAttribute("disabled")}function x(){(0,o.$dqs)("#trustoo-mask").style.display="none";const t=s.A.slide;t.style.display="none",t.parentNode.style.display="none",s.A.writeTo.productId="";const e=(0,o.$dqs)("#trustoo-mask>.trustoo-power");if(e&&(e.style.display="none"),document.body.classList.remove("trustoo-open"),window.removeEventListener("hashchange",r.FP),-1!==window.location.hash.indexOf("tt-write-reviews-open")&&window.history.replaceState({},document.title,window.location.href.replace("#tt-write-reviews-open","")),(0,l.ps)(),"normal"!==t.dataset.reviewType){let e=0;(0,o.$dqsa)(".write-review-slide",t).forEach((t=>{t.setAttribute("index",e),"selectProduct"in t.dataset?t.remove():e++}))}delete t.dataset.reviewType}function R(){const t=(0,o.$dqs)(`.write-review-slide[index="${c}"]`);S(t,(0,o.$dqs)(`.write-review-slide[index="${c+1}"]`)),c++,(0,o.$dqs)(".write-review-container").style.left=(parseInt(t.getAttribute("index"))+1)*-u+"px"}function S(t,e){t.classList.remove("active"),e.classList.add("active")}function T(t){return 6===m?`
${a.A.heartStroke}
`.repeat(t)+`
${a.A.heartStroke}
`.repeat(5-t):(0,o.getTotalStarString)(t,!1)}},72:t=>{var e=[];function i(t){for(var i=-1,s=0;s{i.d(e,{B:()=>A,m:()=>g});var s=i(957),n=i(357),o=i(986),r=i(571),a=i(405),l=i(607),d=i(500);let c=!1,p=!1,u=0,v=0;async function g(){let t=null;if("undefined"==typeof vstar_qa_settings||r.A.isSettingUpdate){const e=await s.nj.getSetting();null===e[0]&&(t=e[1])}else t=vstar_qa_settings;if(t){if(1!==t.is_active)return;(0,a.aQ)(3,1),u=t.page_size,p=t.is_show_helpful;let e=[];const i=t.color.split(",");["title-color","title-line-color","line-color","question-color","answer-color","reply-bg-color"].forEach(((t,s)=>{e.push(`--${t}:${i[s]};`)})),r.A.globalStyle.textContent+=`\n\t\t.tt-tabs-list{\n\t\t\t${e.slice(0,2).join("")}\n\t\t}\n\t\t.tt-qa-list{\n\t\t\t${e.slice(2).join("")}\n\t\t\t\t--author-font-size:${t.author_font_size}px;\n\t\t\t\t--content-font-size:${t.content_font_size}px;\n\t\t}\n\t\t`,v=t.review_date_format,r.A.pageInfo.QA={curPage:1},A()}}async function A(){c||(0,o.$dqs)("#vstar-reviews #reviews-body,#vstar-noreviews").insertAdjacentHTML("beforeend",'
');const t=(0,o.$dqs)(".tt-qa-list",r.A.reviewsDom),e=r.A.reviewsDom,i=r.A.userSetting.review_pagination_type,a=1===i;a&&(0,l.ne)(t,r.A.reviewsDom,!0);const g=await s.nj.getList({limit:u});if(g[1]){if(!c){c=!0,(0,o.$dqs)(".tt-qa-list",r.A.reviewsDom).addEventListener("click",(function(t){let e=t.target;"path"===e.tagName&&(e=e.closest("svg"));let i=e.classList;(i.contains("tt-helpful")||i.contains("tt-unhelpful"))&&(0,l.nG)(e,i)}));const t=g[1].page.total_page;r.A.pageInfo.QA.total=t,a&&(0,d.IV)(),e.setAttribute("qa-page-count",t)}(0,d.RR)(i,r.A.reviewsDom)}const A=g[1].list;let h="";a?(0,l.ne)(t,r.A.reviewsDom,!1):2===i&&(h=t.innerHTML),A.length?A.forEach((t=>{let e="";if(t.qa_reply_data){let i="";if(1===p){const e="tt_qa_"+r.A.shop_id;let s=(0,o.gsLocal)("get",e),a="",l="";if(s){s=JSON.parse(s);const e=s.find((e=>e.id==t.id));e&&(1===e.likeType?a="active":2===e.likeType&&(l="active"))}i=`
${r.A.lang.question_and_answer.helpful}\n\t\t\t\t\t${n.A.helpful(a)}${t.qa_reply_data.likes_qa}\n\t\t\t\t\t${n.A.unhelpful(l)}${t.qa_reply_data.dislike_qa}
`}e=`
\n\t\t\t\t
\n\t\t\t\t\t${r.A.lang.shop_name.replace("{{shop_name}}",r.A.userSetting.store_name)} \n\t\t\t\t\t${w(v,t.qa_reply_data.create_time)}\n\t\t\t\t
\n\t\t\t\t
${t.qa_reply_data.answer}
\n\t\t\t\t
\n\t\t\t\t\t${i}\n\t\t\t\t
\n\t\t\t
`}h+=`\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t${t.questioner}\n\t\t\t\t\t\t\t${w(v,t.create_time)}\n\t\t\t\t\t\t
\n\t\t\t\t\t
${t.question}
\n\t\t\t\t\t
\n\t\t\t\t\t${e}\n\t\t\t\t
\n\t\t\t\t`})):h=`
${n.A.qa(r.A.userSetting.font_color)}
${r.A.lang.no_questions}
`,t.innerHTML=h}function w(t,e){return 5===t?(0,l.PK)(e):(0,l.i$)(e,t)}},113:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},134:(t,e,i)=>{i.d(e,{A:()=>a});var s=i(957),n=i(986),o=i(571);const r=function(){const t={};switch(o.A.shop_id){case 55363502159:o.A.isHomePage&&(t.customCollTarSel=".h1.product__title,.card__heading.h5>.full-unstyled-link");break;case 64402030811:o.A.isHomePage&&(t.customCollTarSel='.glide-wrapper.glider-slide [data-product-type="title"]');break;case 59471560866:t.homeStarDelay=2e3,o.A.isHomePage&&(t.customCollTarSel=".prod-thumb-title-color>a")}return t},a={get_move_review_info:{},custom_carousel_info:{},custom_style_info:{},star_insert_adaptation_info:{},user_needs_solutions_info:{},fixedLayout:0,bigRatingDigits:2,isOpenRecStars:!0,isShowRevVerified:!0,isPopupProdReviews:!1,customRatingText:"",customHeadRatingText:"",showRelatedPros:!1,reviewConstructor:null,setLinkMedia:!1,isAssociatedProdFullName:!1,isPageReview:!1,setUserNeed(){const t=this,{shop_id:e}=Review;switch(e){case 55420682445:o.A.isProPage&&document.body.addEventListener("click",(function(t){t.target.classList.contains("reviews-text")&&"P"===t.target.tagName&&(0,n.$dqs)(".breadcrumb_pr_wrap").scrollIntoView({behavior:"smooth",block:"start"})}));break;case 26046955594:case 17400017:{location.href.includes("/pages/puffy-mattress-reviews")&&window.shopifyObj&&(t.isPageReview=!0,o.A.isProPage=!1,o.A.productId=void 0,window.shopifyObj.productId=null),t.isOpenRecStars=!1,o.A.copyText="Coupon copied successfully";const i=document.createElement("script");i.src="https://cdn.vstar.app/static/module/user_need/extension-script/expand-submission.js?"+o.A.constructTime,document.head.append(i);let s=localStorage.getItem("trustoo_uv");if(s||(s=o.A.shop_id+"_"+(new Date).getTime()),o.A.isProPage){let l=null,d=null;const c=document.createElement("script");c.src="https://embed.cloudflarestream.com/embed/sdk.latest.js",c.async=!0,c.onload=()=>{d&&(l=Stream(d))},document.head.appendChild(c),document.addEventListener("onTTDetailEmbed",(()=>{if(TTRevDetail.revDetail.addEventListener("click",(t=>{const e=t.target;(e.closest(".tt-video-player")||(e.tagName=e.nextElementSibling))&&a("CLICK_MEDIA",void 0,{review_id:TTRevDetail.reviewId,interaction_type:"expand"})})),d=document.querySelector("#trustoo-review-detail .tt-detail-frame"),"undefined"!=typeof Stream&&(l=Stream(d)),d){const t=TTRevDetail.closeTTDetail;TTRevDetail.closeTTDetail=e=>{"block"===d.style.display&&l&&(a("CLICK_MEDIA",void 0,{review_id:TTRevDetail.reviewId,view_duration:l.currentTime,interaction_type:"close_popup",tt_client_id:s}),l=Stream(d)),t(e)}}}))}function a(t,e,i,s){try{fetch("https://api.trustoo.io/api/v1/reviews/collect_event",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:s,shop_id:o.A.shop_id,event_type:t,event_source:"STOREFRONT",expand_content:e,media_interaction:i})})}catch(t){}}window.TrustooColl=a;break}}Object.assign(t,r())},setPageReview(t){let e=window.location.href,i=e.indexOf("pages/")+6,s=e.substring(i);const r=(0,n.$dqs)(".pagefly-review-widget-sealapp,.custom-vstar-review-widget,#vstar-all-reviews");if(r&&"vstar-all-reviews"===r.id&&(o.A.isRevPage=!0),o.A.allRev=r,[49048256661,62366974136,23928713].includes(t)||r||"reviews"===s){(["clienti-soddisfatti","shop-reviews","review-page","producto-mini","avis-menviking","customer-reviews"].includes(s)||"reviews"===s||r&&"vstar-all-reviews"===r.id||r&&("custom-vstar-review-widget"===r.className||"pagefly-review-widget-sealapp"===r.className)&&!o.A.isProPage)&&(this.isPageReview=!0)}},async getUserNeedData(){const{pageType:t,themeId:e}=o.A,i=this;if(o.A.isHomePage||o.A.isProPage||o.A.otherPageColl||o.A.isCollPage||i.isPageReview){let n,o;if("undefined"!=typeof vstar_custom_info?(n=vstar_custom_info,o=null):[o,n]=await s.zG.getUserNeed(),null===o)for(let s in n){const o=n[s].list,r=o.length;if("star_insert_adaptation_info"===s){const t=o.filter((t=>(!t.theme_id||t.theme_id===e)&&t.product_detail_star)),s=o.filter((t=>(!t.theme_id||t.theme_id===e)&&t.product_list_star));if(t.length){const e=t.at(-1);i.customProTarSel=e.product_detail_star,i.detailRatingPosition=e.detail_position}if(s.length){const t=s.at(-1);i.customCollTarSel=t.product_list_star,i.listRatingPosition=t.list_position}}else if(0!==r)for(let n=0;n{i.d(e,{Cf:()=>q,Do:()=>E,PT:()=>h,_x:()=>_,yE:()=>m});var s=i(571),n=i(957),o=i(986),r=i(657),a=i(357),l=i(743),d=i(651),c=i(297);let p=null,u=null,v=null,g="",A=0;const w=5,h=(0,o.debounce)(k,500);async function m(t){let e="",i="";const n=t,{lang:l,productImageUrl:d,productName:c,isNoUploadImg:A}=s.A,m=s.A.lang.all_in_one_from,_=l.question_and_answer;let y="";"undefined"!=typeof Review&&["ar","he"].includes(Review.lang)&&(y=" trustoo-rtl"),s.A.isMobile&&(s.A.globalStyle.textContent+="#trustoo-allinone>.tt-write-content {\n\t\t\tpadding-bottom: 100px !important;\n\t}"),s.A.globalStyle.textContent+=`\n\t#trustoo-allinone,#success-window,#tt-product-selector{\n\t\t--button-bg-color: ${t.review_button_background_color};\n\t\t--button-text-color: ${t.review_button_text_color};\n\t\t--button-radius: ${t.button_radius}px;\n\t\t--text-color: ${t.text_color};\n\t\t--light-text-color: ${(0,o.hexToRgba)(t.text_color,.4)};\n\t\t--text-color-alpha-70: ${(0,o.hexToRgba)(t.text_color,.7)};\n\t\t--discount-code-color:${t.discount_text_color};\n\t\t--discount-copy-color:${t.discount_copy_color};\n\t}\n #trustoo-allinone .form-submit[disabled]{background-color:${(0,o.hexToRgba)(t.review_button_background_color,.4)} !important}\n\t\t.trustoo-write-review,#success-window,#tt-product-selector{\n\t\t\t--write-bg:${t.popup_bg_color};\n\t\t\tbackground: ${t.popup_bg_color};\n\t\t\tborder-radius: ${t.popup_radius}px;\n\t\t\tcolor:${t.text_color}\n\t\t}\n\t\t#trustoo-allinone.trustoo-write-review .vstar-star{\n\t\t\t--star-color: ${t.star_color};\n\t\t}\n\t\t.trustoo-widget .window-discount,.trustoo-widget .slide-discount{\n\t\t\tbackground:${t.discount_bg_color};\n\t\t\tborder-radius: ${t.discount_card_radius}px;\n\t\t}\n `;const b=function(t,e){let i,s,n=`\n
\n\t\t
${e.name}
\n \n
\n
`;return i=1===t.require_email?"require":"",s=1===t.show_email?"":"hidden",n+=``,i=1===t.require_phone?"require":"",s=1===t.show_phone?"":"hidden",n+=`
\n\t
${e.phone}
\n \n
`,n}(t,l);e='
\n
';const R=t.discount_setting;if(1==R.discount_for_photo_reviews&&R.discount_value&&(1===R.discount_for_reviews_form||2===R.discount_for_reviews_form&&"undefined"!=typeof isEmailWrite&&isEmailWrite)){const t=s.A.lang.all_in_one_from.discount_setting,e=R.discount_type===2?R.currency:"";for(let i in t)t[i]=t[i].replace("{{Discount_amount}}",R.discount_value).replace("{{currency}}",e);let n="";1===R.discount_incentive_conditions?n=t.tip_3:2===R.discount_incentive_conditions&&(n=t.tip_1),i=`
${n}
`}g=n.logo_src;let q="";q=6===t.rating_icon_type?`
${a.A.heartStroke}
`.repeat(5):(0,o.getTotalStarString)(0);let L="";g&&(L=``);const P=`\n
\n
\n
\n ${l.all_in_one_from.write_reviews}\n
`;let I="";I=`
`;let M="",D="";1===t.write_review_form&&(D=1===t.enabled_add_video?` \n
${l.all_in_one_from.or}
\n
\n \n +\n ${l.all_in_one_from.add_video}\n 0/1\n
\n `:"",M=`
\n\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t+\n\t\t\t\t\t\t${l.add_photo}\n\t\t\t\t\t\t0/5\n\t\t\t\t
\n\t\t\t\t${D}\n\t\t\t
`);const B=1===t.show_title?`
\n\t
${l.all_in_one_from.title}
\n \n
`:"",O=1===t.require_feedback?"require":"",H=1===t.show_feedback?"":"hidden",N=``;let j="";if(1===t.show_privacy_policy){let e="";const i=m.privacy_policy,s=m.terms,n=m.consent_text.replace("{{privacy_policy}}",`${i}`).replace("{{terms}}",`${s}`);1===t.show_checkbox&&(e=''),j=`
\n\t\t\t${e}\n\t\t
`}let W=`
\n
${L+P+`
\n\t${`
${I}
`+`
\n\t
${s.A.lang.you_rating}
\n\t
\n\t${q} \n\t
`}\n\t\t${B}\n\t\t${N}\n\t\t${M}\n\t\t${b}\n\t\t${s.A.attributeConfig?'
':""}\n
`+(i+j+`
${_.publish_title}
`+``)}
`;if((0,o.$dqs)("#trustoo-mask").insertAdjacentHTML("beforeEnd",W),v=(0,o.$dqs)("#trustoo-allinone"),1===s.A.writeForm&&x(v),p=(0,o.$dqs)(".tt-image-uploader",v),1===t.show_feedback&&((0,o.$dqs)("textarea",v).style.fontFamily=window.getComputedStyle((0,o.$dqs)("input",v)).fontFamily),c){let t=(0,o.$dqs)(".product-right");c.length>100?t.innerHTML=c.substring(0,100)+"...":t.innerHTML=c}if(function(t){t.addEventListener("touchmove",(t=>{t.stopPropagation()}),!1),(0,o.$dqs)(".window-close",t).onclick=function(){S(),s.A.isMobile&&window.history.replaceState({},document.title,window.location.href.replace("#tt-write-reviews-open","")),E()};const e=(0,o.$dqs)("#tt-protection-checkbox",t);e&&(e.onchange=function(){k()});s.A.productImageUrl&&(0,o.imgLoad)(s.A.productImageUrl).then((e=>{const i=e.width,s=e.height,n=(0,o.$dqs)(".product-image",t);n.style.backgroundSize=i>=s?"auto 100%":"100% auto"}));let i=(0,o.$dqsa)(".star-item",t);T(s.A.ratingVal);for(let t=1;t<=i.length;t++)i[t-1].index=t,s.A.isMobile?i[t-1].onclick=function(){s.A.ratingVal=this.index,T(this.index),k()}:(i[t-1].onmouseover=function(){T(this.index)},i[t-1].onclick=function(){s.A.ratingVal=this.index,k()});s.A.isMobile||((0,o.$dqs)(".tt-write-rating .vstar-star",t).onmouseleave=function(){T(0)});let n=(0,o.$dqsa)(".user-input",t);const r=s.A.lang;if(s.A.isMobile){let e=(0,o.getMobileSystem)();"ios"===e&&(t.style.paddingBottom="70px");let i=window.getComputedStyle(t).getPropertyValue("height"),s=function(){"android"==e&&((0,o.$dqs)("#trustoo-allinone").style.overflow="hidden");let s=setInterval((()=>{window.getComputedStyle(t).getPropertyValue("height")!=i&&("android"==e&&((0,o.$dqs)("#trustoo-allinone").style.overflow="scroll",(0,o.$dqs)("#trustoo-allinone").scrollTop=230),clearInterval(s))}),200)};(0,o.$dqsa)("#trustoo-allinone .user-input").forEach((t=>t.addEventListener("click",s))),(0,o.$dqsa)("#trustoo-allinone .user-input").forEach((t=>t.addEventListener("focus",s)))}const a=(0,o.$dqs)(".upload-area",t);a&&(a.onclick=e=>{if(["tt-delete_image","hover-image","image-delete tt-mobile_delete_image"].includes(e.target.className)){const i=e.target.closest(".uploaded-item");let n=i.dataset.name,r=s.A.mediaUrl.findIndex((t=>t.name==n));s.A.mediaUrl.splice(r,1),i.remove(),"image"===i.dataset.type?(s.A.imgUploadedCount===w&&C(1),s.A.imgUploadedCount--):"video"===i.dataset.type&&C(3),(0,o.$dqs)(".images-num",t).innerHTML=`${s.A.imgUploadedCount}/5`}});n.forEach((t=>{t.onblur=function(){let t=this.parentNode.nextElementSibling;""==this.value&&this.classList.contains("require")&&(t.innerHTML=`
${r.required}\n
`,t.classList.add("display"),this.classList.add("error-border"))},t.addEventListener("input",(function(){const t=this.parentNode.nextElementSibling;if(t.innerHTML="",t.classList.remove("display"),this.classList.remove("error-border"),this.parentNode.classList.contains("email-area")){!/^[a-zA-Z0-9_-]+(\.[A-Za-z0-9_-]+)*@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(this.value)&&this.value?(t.innerHTML=`
${r.email_error}\n
`,t.classList.add("display"),this.classList.add("error-border")):this.value||(t.innerHTML="",t.classList.remove("display"),this.classList.remove("error-border"))}else this.classList.contains("big-input")&&function(){let t=(0,o.$dqs)(".big-input").value.length;(0,o.$dqs)("#trustoo-allinone .feedback-count>span").textContent=t+"/"+s.A.newRevCharLimit}();h()}))})),p&&((0,o.$dqs)("input",p).onchange=function(){f(this.files,"image").then((()=>this.value="")).catch((()=>{}))});u=(0,o.$dqs)(".tt-video-uploader .upload-input",t),u&&(u.onchange=function(){const t=this.files[0],e=this.getAttribute("accept").split(",").map((t=>t.slice(1))),i=t.name.split(".").pop();if(!e.includes(i.toLowerCase()))return(0,o.setToast)(s.A.lang.error_tip),!1;const n=parseInt(t.size/1048576);if(n>=600)return u.value="",(0,o.setToast)("The file cannot exceed 600MB"),!1;C(4),f(this.files,"video",n).then((()=>this.value=""))});(0,o.$dqs)(".form-submit",t).onclick=function(){this.setAttribute("disabled",!0),this.innerHTML=`${r.submitting}`;let t=12;s.A.isMobile&&(t=20),(0,o.setLoading)(this,t),this.setAttribute("disabled",!0),$()}}(v),s.A.isLinkReqRev){if("function"==typeof r.nZ){if((0,r.nZ)())return}document.body.classList.add("trustoo-open"),(0,o.$dqs)("#trustoo-mask").style.display="flex",(0,o.$dqs)(".trustoo-write-review").style.display="block"}}function _(t){const e=l.A.write,{allInOne:i,image:r,content:a,prodName:d,title:c,contentLabel:p,submit:u}=e,v=i.dataset.reviewType,g=s.A.lang;let A=g.all_in_one_from.write_reviews,w=s.A.productImageUrl,h=s.A.productName;"reviews"===t?(p.textContent=g.all_in_one_from.review,u.textContent=g.submit,"product"===v&&s.A.writeTo.productId?(w=s.A.writeTo.prodImageUrl,h=s.A.writeTo.productName,n.zG.getAttribute(s.A.writeTo.productId).then((t=>{t[1]&&t[1].attributes.length>0&&(s.A.attributeConfig=t[1],(0,o.$dqs)(".error-tip.phone-tip",i).insertAdjacentHTML("afterend",'
'),x(i))}))):"shop"===v&&(A=s.A.lang.store_review.write_btn_text)):"QA"===t&&(A=g.question_and_answer.ask_a_question,a.placeholder=g.question_and_answer.desc_placeholder,p.textContent=g.question_and_answer.question,u.textContent=g.question_and_answer.submit_question,i.setAttribute("write-qa",!0)),h&&h.length>100&&(h=h.substring(0,100)+"..."),d.textContent=h,r.style.backgroundImage=`url(${w})`,c.textContent=A,document.body.classList.add("trustoo-open"),i.style.display="flex",l.A.mask.style.display="flex"}async function f(t,e,i=0){const{mediaUrl:r}=s.A;let a=!1,l=(0,o.$dqsa)(".uploaded-item[data-type=image]").length,d=(0,o.$dqs)(".tt-uploader"),p=t.length,u="";if("image"===e&&!Object.keys(s.A.uploadImgInfo).length){const t=await n.zG.getPolicyToken();s.A.uploadImgInfo=t[1]}t.length+l>=5&&"image"===e&&(p=5-l,C(2));for(let l=0;l{n.zG.uploadImg(t).then((t=>{let e=t[1].name;null===t[0]?((0,o.$dqs)(`.uploaded-item[data-name="${e}"]>.loader`).remove(),0===(0,o.$dqsa)(".uploaded-item>.loader").length&&k(),r.push({name:e,url:"https://img.trustoo.io/"+t[1].key,resource_type:1})):(s.A.imgUploadedCount===w&&C(1),s.A.imgUploadedCount--,(0,o.$dqs)(`.uploaded-item[data-name="${e}"]`).remove(),(0,o.$dqs)(".images-num").innerHTML=`${s.A.imgUploadedCount}/5`,(0,o.setToast)("Failed to upload image"))}))})),A=1):"video"===e&&(A=2,i>=200?(0,c.i_)(v,0,((t,e)=>{y(t,e)}),(()=>{b()})):n.zG.getUploadVideoUrl().then((t=>{const{upload_url:e,domain:i}=t[1],s=t[1].video_service_uid;n.zG.uploadVideo(e,v).then((()=>{y(i,s)})).catch((()=>{b()}))})).catch((()=>{b()})));let g=document.createElement("div");if(g.className="uploaded-item",g.setAttribute("data-type",e),"image"===e?(u&&g.setAttribute("data-name",u),(0,o.$dqs)(".tt-image-uploader .images-num").innerHTML=`${s.A.imgUploadedCount}/5`,L(g,p)):"video"===e&&g.classList.add("uploading"),g.innerHTML='
\n
\n
\n ',d.before(g),(0,o.setLoading)(g,24),a||(a=!0,k()),s.A.isMobile){let t=document.createElement("div");t.className="image-delete tt-mobile_delete_image",g.appendChild(t)}}}function y(t,e){const i=t+"/"+e,n=i+"/thumbnails/thumbnail.jpg";s.A.mediaUrl.push({url:i+"/iframe",resource_type:2});const r=(0,o.$dqs)(".uploaded-item[data-type=video]",v),l=new Image;l.onload=()=>{r.insertAdjacentHTML("afterbegin",a.A.video);const t=r.nextElementSibling;t.classList.contains("tt-progress")&&(t.textContent="100%",setTimeout((()=>{t.remove()}),800))},l.src=n,r.style.backgroundImage=`url(${n})`,L(r,n,(()=>{r.classList.remove("uploading"),(0,o.$dqs)(".loader",r).remove(),k()}))}function b(){(0,o.$dqs)(".uploaded-item[data-type=video]",v).remove(),C(3),(0,o.setToast)(s.A.lang.error_tip),u.value=""}function C(t){switch(t){case 1:p.style.display="flex";break;case 2:p.style.display="none";break;case 3:(0,o.$dqsa)(".tt-video-uploader,.upload-or",v).forEach((t=>t.style.display="flex"));break;case 4:(0,o.$dqsa)(".tt-video-uploader,.upload-or",v).forEach((t=>t.style.display="none"))}}function $(){if(s.A.isSendLock)return void(0,o.setToast)("Please comment again after 15 seconds");let t=0,e="";const i="shop"===v.dataset.reviewType;t=v.getAttribute("write-qa")?2:1,1===t?e=".inline:not([hidden]) .user-input":2===t&&(e='.user-input:not([input-type="author_phone"],[input-type="title"])');let r=null;const a={};var l=Array.from((0,o.$dqsa)(e));if(1===t){r=n.zG.uploadReview;const t=(0,o.$dqs)("#tt-protection-checkbox",v);t&&t.checked&&(a.agree_privacy=1),l.forEach((t=>{const e=t.getAttribute("input-type");t.value&&(a[e]=t.value)})),s.A.isLinkReqRev&&("undefined"==typeof isEmailWrite&&(a.source="store_link"),void 0!==s.A.writeLinkParams.dondy&&(a.source="store_link_dondy")),s.A.ip&&(a.ip=s.A.ip,a.author_country=s.A.loc);const e=(0,d.uq)();e.length&&(a.attributes_info={attributes:e,attribute_collection_id:s.A.attributeConfig.attribute_collection_id})}else if(2===t){r=n.nj.addQA;const t=["question","questioner","questioner_email"];l.forEach(((e,i)=>{a[t[i]]=e.value})),a.questioner_country=s.A.loc,(0,o.$dqs)("#tt-qa-unpublish").checked&&(a.is_publish=3)}r(a,A,s.A.mediaUrl,i).then((e=>{if(null===e[0]){const i=e[1],n=s.A.lang;R(),S(),document.body.classList.add("trustoo-open"),(0,o.$dqs)("#trustoo-allinone").style.display="none";const r=(0,o.$dqs)("#success-window");r.style.display="block";const a=(0,o.$dqs)(".window-title",r),l=(0,o.$dqs)(".window-content",r);if(1===t?(a.textContent=n.success_message,l.textContent=n.submitted_successfully):2===t&&(a.textContent=n.question_and_answer.thanks,l.textContent=n.question_and_answer.submitted),i&&i.discount_code&&1===t){r.dataset.showDiscount="1";const t=s.A.lang.all_in_one_from.discount_setting;(0,o.$dqs)(".window-discount",r).style.display="flex",a.textContent=t.title,r.style.paddingBottom="40px",(0,o.$dqs)(".window-content",r).textContent=t.subtitle,(0,o.$dqs)(".discount-code",r).textContent=i.discount_code}else r.dataset.showDiscount="0",r.style.paddingBottom="55px";if(s.A.isLinkReqRev){const t=new URLSearchParams(window.location.search);t.delete("req"),t.delete("dondy");const e=t.toString(),i=window.location.pathname+(e?"?"+e:"");window.history.replaceState({},"",i),s.A.isLinkReqRev=!1}s.A.isSendLock=!0,setTimeout((()=>s.A.isSendLock=!1),1500)}else{R();let t="";t=-2===e[0].code?e[0].error:s.A.lang.error_tip,(0,o.setToast)(t,"1%")}})).catch((()=>{R(),(0,o.setToast)(`${s.A.lang.error_tip}`,"1%")}))}function x(t){if(s.A.attributeConfig){const e=s.A.attributeConfig.attributes,i=(0,o.$dqs)("#tt-attr-wrapper",t);"product"===t.dataset.reviewType?l.A.write.selectedProdAttr=i:l.A.write.normalProdAttr=i,e.forEach((t=>{(0,d.M6)(i,t)}))}}function R(){const{lang:t}=s.A;let e=(0,o.$dqs)(".form-submit");e.innerHTML=`${t.submit}`,e.removeAttribute("disabled")}function S(){Object.assign(s.A,{imgUploadedCount:0,uploadedIndex:0,mediaUrl:[]}),v.removeAttribute("write-review"),v.removeAttribute("write-qa"),(0,o.$dqsa)(".user-input",v).forEach((t=>t.value="")),(0,o.$dqsa)(".error-tip",v).forEach((t=>t.innerHTML=""));let t=(0,o.$dqsa)(".error-border",v);t.length&&t.forEach((t=>t.classList.remove("error-border"))),1===s.A.writeForm&&((0,o.$dqsa)(".uploaded-item",v).forEach((t=>t.remove())),(0,o.$dqs)(".tt-image-uploader .images-num",v).innerText="0/5",2===A&&((0,o.$dqs)(".tt-video-uploader .images-num",v).innerText="0/1"),(0,o.$dqsa)(".tt-uploader,.upload-or",v).forEach((t=>t.style.display="flex")));const e=(0,o.$dqs)(".feedback-count>span",v);e&&(e.textContent="0/"+s.A.newRevCharLimit);(0,o.$dqs)(".form-submit",v).setAttribute("disabled",!0),s.A.ratingVal=0,T(0);const i=(0,o.$dqs)("#tt-protection-checkbox",v);i&&(i.checked=!1)}function T(t){let e=(0,o.$dqsa)("#trustoo-allinone .star-item"),i=t||s.A.ratingVal;for(let t=0;t{t.value||"none"===t.parentNode.style.display||(d=!1)}));let c=0===(0,o.$dqsa)(".uploaded-item>.loader",t).length;d&&c&&(1===e&&l||2===e)&&0==(0,o.$dqsa)(".input-tip",t).length&&(1!==e||0!==s.A.ratingVal)?r.removeAttribute("disabled"):r.setAttribute("disabled",!0)}function q(){const{lang:t}=s.A,{logo_src:e,logo_alignment:i,logo_size:n}=s.A.writeReviewSettings,r=e?``:"",a=`\n
\n ${t.success_message}\n
`;(0,o.imgLoad)("https://cdn.vstar.app/static/images/Vector.png");let l="";const d=`
${t.submitted_successfully}
`,c=`
`;l=``;const p=`
${r+'
'+a+d+l+c}
`;(0,o.$dqs)("#trustoo-mask").insertAdjacentHTML("beforeend",p);const u=(0,o.$dqs)("#success-window");(0,o.$dqs)("#success-window .window-close").onclick=E,(0,o.$dqs)(".window-button button",u).onclick=E,(0,o.$dqs)(".discount-copy",u).onclick=function(){(0,o.copyToClipboard)((0,o.$dqs)(".discount-code",u).textContent,(()=>{(0,o.setToast)(s.A.copyText||s.A.lang.copy_succ)}))}}function E(){const t=(0,o.$dqs)("#success-window");(0,o.$dqsa)(".window-discount",t).forEach((t=>t.style.display="none")),(0,o.$dqs)(".window-title",t).style.cssText="",(0,o.$dqs)("#trustoo-mask").style.display="none";const e=(0,o.$dqs)("#trustoo-allinone");e.style.display="none",delete e.dataset.reviewType,t.style.display="none",document.body.classList.remove("trustoo-open"),(0,d.ps)(),s.A.writeTo.productId="",window.removeEventListener("hashchange",r.FP),l.A.write.selectedProdAttr&&l.A.write.selectedProdAttr.remove()}function L(t,e,i){(0,o.imgLoad)(e).then((s=>{i&&i(),s.width>=s.height?t.style.backgroundSize="100% auto":t.style.backgroundSize="auto 100%",t.style.backgroundImage=`url(${e})`})).catch((()=>{i&&(i(),t.style.backgroundImage="url(../../images/video_default.png)")}))}},163:(t,e,i)=>{i.d(e,{FS:()=>c,dn:()=>u,xc:()=>p});var s=i(743),n=i(986),o=i(571);let r,a=0,l=0;r=o.A.isMobile?18:16;let d=!1;function c(t,e){const{isWdoRevOpen:i}=o.A;let a=i?o.A.wdoRev:o.A.reviews;const l="shopReviews"===o.A.showType?a.shopReviewsHighs:a.columnHighs,d=s.A[o.A.reviewsKey].curBody,c=(0,n.$dqs)(`[no="${e}"]`,d);var p=parseInt(c.style.top),u=c.offsetHeight+p+r;const v=t+"column's hight updates,hight is "+u;Review.checkGridHighMsg.push(v),u>l[t-1]&&(l[t-1]=u);let g=(0,n.$dqsa)(`.column${t}`,d);g.forEach(((i,s)=>{parseInt(i.getAttribute("no"))>e&&(i.style.top=u+"px",u=u+i.offsetHeight+r),s===g.length-1&&(l[t-1]=u)}));let A=30;o.A.isMobile&&(A=0);var w=Math.max.apply(null,l);d.style.height=w+A+"px"}function p(t=[],e,i=!1){const{isWdoRevOpen:a}=o.A,p=o.A.isWdoRevOpen?o.A.wdoRev:o.A.reviews,w="shopReviews"===o.A.showType?p.shopReviewsHighs:p.columnHighs,h=a?o.A.wdoRevBody:o.A.reviewsBody,m=s.A[o.A.reviewsKey].curBody;if(!a&&"none"===h.offsetParent)return;if(l=e,i)for(let t=0;t{const e=(0,n.$dqs)(".resource-item",t);if(null!==e){const t=e.getAttribute("proportion");e.style.width=_+"px",(0,n.$dqs)("img",e).width=_,e.style.height=_/t+"px"}})),g(m,t),d=t.length<=w.length&&o.A.isFirstPageRender,function(t,e=!1){const i={highMsg:[]};let s=o.A.isWdoRevOpen?o.A.wdoRev:o.A.reviews;const a="shopReviews"===o.A.showType?s.preShopReviewsHighs:s.preColHighs,p=a.length;if(i.loadedStyleCheck=e,0===p){if(e)return;u()}else for(let e=0;e{t.getAttribute("no")>l&&o.push(t)})),0===o.length)continue;n=t+o[0].offsetHeight+r;for(let t=1;t=280&&t<501?s=2:t>=501&&t<920?s=3:t>=920&&t<1150?s=4:t>=1150&&t<1420?s=5:t>=1420&&(s=6);o.A.isMobile||(2===s||3===s?((0,n.$dqsa)(".reviews-date",e).forEach((t=>t.style.cssText="position: static;")),(0,n.$dqsa)(".grid-mobile",e).forEach((t=>t.style.cssText="margin-top: 10px;"))):s>0&&((0,n.$dqsa)(".reviews-date",e).forEach((t=>t.style.cssText="")),(0,n.$dqsa)(".grid-mobile",e).forEach((t=>t.style.cssText=""))));return i.cardWid=(t-(12*(s-1)+r))/s,s}(a,t),d="shopReviews"===o.A.showType?s.shopReviewsHighs:s.columnHighs;d.length=0;for(let t=0;tt));"shopReviews"===o.A.showType?s.preShopReviewsHighs=l:s.preColHighs=l;for(var d=0;dt===i)),n[c]=n[c]+t.offsetHeight+r,t.className=`grid-review column${c+1}`,t.dataset.column=c+1,t.style.left=c*(s.cardWid+12)+a+"px",t.style.top=i+"px",o.A.minHeight=i}var p=Math.max.apply(null,n);let u="";u=o.A.isMobile?`${p}px`:`${p+30}px`,t.style.height=u}function A(t,e){t.forEach((t=>{t.style.width=e+"px";const i=(0,n.$dqs)("img",t);i&&(i.width=e,i.style.display="block")}))}o.A.arrangeGrid=u},220:(t,e,i)=>{i.d(e,{my:()=>c,qM:()=>d});var s=i(357),n=i(986),o=i(571),r=i(638),a=i(657);let l=null;function d(){if(o.A.isActWdoRev){const t="",e=o.A.userSetting.sidetab_setting,i=`#vstar-tab{ background-color:${e.sidetab_background_color}; color:${e.sidetab_font_color} } `;o.A.globalStyle.insertAdjacentHTML("beforeend",i);let s=`
${o.A.tabText||e.sidetab_button_text}
`;!(0,n.$dqs)("#vstar-tab")&&document.body.insertAdjacentHTML("beforeend",s),(0,n.$dqs)("#vstar-tab").onclick=p}}function c(){(0,n.$dqs)(".window-close",o.A.wdoRev.node).onclick=function(){u()}}async function p(){if(l)o.A.showType=o.A.wdoRevDom.getAttribute("show-type");else{const t=``;document.body.insertAdjacentHTML("beforeend",t),l=(0,n.$dqs)(".window-review-mask"),l.onclick=function(t){(0,n.$dqs)("#vstar-window-review").contains(t.target)||u()},o.A.showType="reviews",(0,n.setWriteReview)()}o.A.isWdoRevOpen=!0,o.A.reviewsKey="popup",document.body.classList.add("trustoo-open"),l.style.display="block",o.A.isProPage&&(0,n.processRecordedData)("reviews_click"),o.A.isWdoRevExist||(o.A.wdoRev.node=(0,n.$dqs)("#vstar-window-review"),-1===o.A.allRatingData.total_reviews&&await(0,r.requestAllRating)(),o.A.allRatingData.total_reviews>0?(0,a.Gs)():(0,a.WC)(),(0,r.insertReviewDetail)())}function u(){o.A.isWdoRevOpen=!1,l=(0,n.$dqs)(".window-review-mask"),l.style.display="none",document.body.classList.remove("trustoo-open"),o.A.reviewsKey="normal",o.A.reviewsDom&&(o.A.showType=o.A.reviewsDom.getAttribute("show-type"))}document.addEventListener("onTTshowReviewsClick",p)},297:(t,e,i)=>{i.d(e,{i_:()=>n});var s=i(571);async function n(t,e=0,i,n){try{"undefined"==typeof tus&&await async function(){return new Promise(((t,e)=>{if("undefined"!=typeof tus)return void t();const i=document.createElement("script");i.src="https://cdn.jsdelivr.net/npm/tus-js-client@latest/dist/tus.min.js",i.onload=()=>t(),i.onerror=()=>e(new Error("Failed to load TUS library")),document.head.appendChild(i)}))}();const o=new URL("https://"+s.A.apiDomain+"/api/v1/product/tus_upload_video");o.searchParams.set("shop_id",s.A.shop_id);const r=o.toString(),a=new AbortController;try{const t=await fetch(r,{method:"OPTIONS",headers:{Origin:window.location.origin,"Access-Control-Request-Method":"POST","Access-Control-Request-Headers":"Content-Type, Tus-Resumable, Upload-Length"},signal:a.signal});if(!t.ok)throw new Error(`Endpoint connectivity test failed: ${t.status}`)}catch(t){if("AbortError"===t.name)return;throw new Error(`Endpoint connectivity test failed: ${t.message}`)}const l=new tus.Upload(t,{endpoint:r,retryDelays:[0,1e3,3e3,5e3],chunkSize:52428800,metadata:{filename:t.name,filetype:t.type||"video/mp4",fileIndex:e.toString()},request:t=>fetch(t.url,{...t,signal:a.signal}),onError:t=>{n&&n(t),"AbortError"!==t.name&&t.message.includes("aborted")},onProgress:(t,e)=>{const i=document.querySelector(".trustoo-write-review .uploaded-item[data-type=video]");if(l&&i){const s=Math.round(t/e*100);let n=i.parentNode.querySelector(".tt-progress");n||(i.insertAdjacentHTML("afterend",'
'),n=document.querySelector(".tt-progress")),n.textContent=s-1+"%"}},onSuccess:()=>{if(l){!async function(t,e="completed",i,n){try{const o=new AbortController,r=await fetch("https://"+s.A.apiDomain+"/api/v1/product/tus_upload_complete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({video_id:t,shop_id:s.A.shop_id,status:e}),signal:o.signal});if(!r.ok)throw n&&n(),new Error(`HTTP error: ${r.status}`);{const t=await r.json();if(0!==t.code||!t.data)throw new Error(`API返回错误: ${t.message||"未知错误"}`);{const{domain:e,video_service_uid:s}=t.data;i&&i(e,s)}}}catch(t){if("AbortError"===t.name)return}}(function(t){try{const e=t.split("/");let i=e[e.length-1];return i.includes("?")&&(i=i.split("?")[0]),i}catch(t){return"unknown"}}(l.url),"completed",i,n)}}});await l.start()}catch(t){if(n&&n(t),"AbortError"===t.name)return}}},314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i="",s=void 0!==e[5];return e[4]&&(i+="@supports (".concat(e[4],") {")),e[2]&&(i+="@media ".concat(e[2]," {")),s&&(i+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),i+=t(e),s&&(i+="}"),e[2]&&(i+="}"),e[4]&&(i+="}"),i})).join("")},e.i=function(t,i,s,n,o){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(s)for(var a=0;a0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),i&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=i):c[2]=i),n&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=n):c[4]="".concat(n)),e.push(c))}},e}},354:t=>{t.exports=function(t){var e=t[1],i=t[3];if(!i)return e;if("function"==typeof btoa){var s=btoa(unescape(encodeURIComponent(JSON.stringify(i)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),o="/*# ".concat(n," */");return[e].concat([o]).join("\n")}return[e].join("\n")}},357:(t,e,i)=>{i.d(e,{A:()=>s});const s={verified:'\n \n',close:t=>`\n \n \n `,heartStroke:'\n\t\n\t\n\t',star:'\n \n \n ',store:(t="#666666")=>`\n \n \n `,hook:()=>'\n \n ',prePage:t=>``,nextPage:t=>``,helpful:t=>`\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t`,unhelpful:t=>`\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t`,sort:(t="#202123")=>`\n\t\t\n\t`,multiPhoto:()=>'\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\n\t\t',qa:(t="#000")=>`\n\n`,loading:(t="#000")=>`\n\t\t\n\t`,over:(t="#000")=>`\n\n`,cw:'\n\t\n\t\n\t\n\t',video:'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n'}},381:(t,e,i)=>{i.d(e,{D:()=>_});var s=i(957),n=i(357),o=i(986),r=i(571),a=i(638),l=i(134);const d=1,c='
\n\n
\n';function p(t){const e=l.A.bsTextCarouselCount||6,i=[s.zG.getReviews({sortType:"commented-at-descending",ratingFilter:5,page:d,limit:e,isBuyersShow:r.A.buyersShowType,noEmpty:!0,productId:l.A.reviewsSnippetProdId,NotStoreReview:!0}),new Promise((t=>{const e=(0,o.$dqs)('script[src*="swiper@11/swiper-bundle.min.js"]');if(e)"undefined"!=typeof Swiper?t():e.addEventListener("load",(()=>{t()}));else{const e=document.createElement("link");e.rel="stylesheet",e.href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css",document.head.appendChild(e);const i=document.createElement("script");i.setAttribute("defer",!0),i.src="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.js",document.head.appendChild(i),i.onload=()=>t()}}))];Promise.all(i).then((e=>{const i=e[0];if(i[0])throw 11;t.insertAdjacentHTML("beforeend",'');const s=(0,o.$dqs)("#tt-bs-carousel",t),n=i[1].list;if(0===n.length)return;const r=n.length>1,a=r?c:"",d=n.reduce(((t,e)=>t+`\n
\n
\n
\n ${e.author}\n
\n
\n ${(0,o.getTotalStarString)(e.star)}\n
\n
\n
\n ${e.content}\n
\n
\n `),"");s.insertAdjacentHTML("afterbegin",`${a}
\n\t\t\t
\n ${d}
${a}`),function(t,e){const i={delay:l.A.bsCarouselSpeed||3e3,pauseOnMouseEnter:!0};new Swiper(t,{loop:!0,speed:300,spaceBetween:200,slidesPerView:1,autoplay:i});const s=t.swiper;e&&(t.previousElementSibling.onclick=()=>{s.slidePrev()},t.nextElementSibling.onclick=()=>{s.slideNext()})}((0,o.$dqs)(".tt-swiper-container",s),r)}))}let u=0,v=0,g=null;const A=1,w=1,h=2,m=3;async function _(t=null){let e=null,i=null,d="afterend";t||(0,o.$dqsa)("#trustoo-buyers-show-widget").forEach((t=>{t.offsetParent||t.remove()}));const c=(0,o.$dqs)("#trustoo-buyers-show-widget");if(!t)if("undefined"==typeof vstar_buyers_show_settings||r.A.isSettingUpdate){e=(await s.zG.getBuyerShowsSettings())[1]}else e=vstar_buyers_show_settings;if(!(e&&1===e.is_activated||c||t))return;if(i=e,!t)if(r.A.bsInsertSelector)g=(0,o.$dqs)(r.A.bsInsertSelector);else if(c)g=c,d="afterbegin";else if(null!==(0,o.$dqs)("product-form.product-form")||[1499,1567,1356,1363,1368,1434,887,1500,1431,1841,1891].includes(r.A.theme_store_id))g=(0,o.$dqs)("product-form.product-form").parentNode;else{let t="";switch(r.A.theme_store_id){case 829:t=".product__form-wrapper";break;case 775:case 796:case 578:t="form.product-form";break;case 730:t="form.product-single__form";break;case 679:t="form.addToCartForm";break;case 380:t="form.product-form--wide";break;default:t="warehouse"===Review.theme.name?"form.product-form":"Tema-plano-ouro-ldo"===Review.theme.name?".product-form__payment-container":".product-details .shopify-product-form,form[id^=AddToCartForm],form.product-form,product-form.product-form,form[id^=product_form]"}g=t&&(0,o.$dqs)(t)?(0,o.$dqs)(t):(0,o.$dqs)(".product-form")}if(!g&&!t)return void(Review.buyersShowTip="买家秀嵌入失败");const _=document.createElement("style");document.head.appendChild(_),r.A.is=_,t||(v=e.columns_count*e.rows_count,r.A.insHoverColor=e.hover_text_color,r.A.buyersShowType=2===e.reviews_type?1:2);const f=t?r.A.albumSortType:"image-descending";let y="trustoo_show_reviews";t&&(y=r.A.isWdoRevOpen?"trustoo_album_reviews":"trustoo_album_all_reviews");let b="";if((t||[h,w].includes(e.style))&&(b=await async function(t,e){let i=r.A.buyersShowType;"trustoo_album_reviews"===e||"trustoo_album_all_reviews"===e?(u=r.A.albumCount,i=2):"trustoo_show_reviews"===e&&(u=v);const a=await s.zG.getReviews({sortType:t,page:A,limit:u,isBuyersShow:i,hasResource:!0,productId:l.A.reviewsSnippetProdId,NotStoreReview:"trustoo_show_reviews"===e}),d=a[1];r.A.lastPageSize||(r.A.lastPageSize=d.count%u,r.A.total_page=d.total_page);const c=d.list,p=JSON.parse((0,o.gsSession)("get","tt_detail_reviews"));p[e]?p[e].push(c):p[e]=[c];(0,o.gsSession)("set","tt_detail_reviews",JSON.stringify(p)),1===A&&(r.A.insPageCount=d.total_page);let g="";return c.forEach(((t,e)=>{const i=t.resources[0];if(0===t.resources.length||!i.src&&!i.thumb_src)return;const s=2===i.resource_type?i.thumb_src:i.src,o=A-1+"-"+e,r=2===i.resource_type?`
${n.A.video}
`:"";g+=`
\n
\n\t\t\tbuyer show image\n\t\t\t${r}\n
\n
`})),g}(f,y),""===b)){if(t)return;if(e&&e.style===h)return}let C=null;if(t)C=t;else{const t=(0,o.$dqs)("#tt-bs-area");t&&t.remove();const i=``;g.insertAdjacentHTML(d,i),C=(0,o.$dqs)("#tt-bs-area"),[m,w].includes(e.style)&&p(C)}if(b?(C.insertAdjacentHTML("beforeend",`
${b}
`),r.A.isInsertBS=!0,(0,a.insertReviewDetail)(),(0,o.$dqs)("#tt-bs-list",C).onclick=e=>{const i=e.target.closest(".review-item");if(i){const[e,s]=i.getAttribute("index").split("-"),n=JSON.parse((0,o.gsSession)("get","tt_detail_reviews"))[y];(0,o.processRecordedData)("reviews_click"),TTRevDetail.showTTReviewDetail(r.A,"",n[e][s],t?"trustoo_album_reviews":"trustoo_buyers_show")}},(0,o.$dqsa)(".tt-wrapper>.review-item>img",C).forEach((t=>{t.onerror=()=>{t.closest(".tt-wrapper").remove()}})),t&&!r.A.isMobile&&(t.previousElementSibling.style.opacity="1")):r.A.isNoPost=!0,t)_.textContent+=`\n #vstar-reviews .tt-reviews-album .review-item>img{border-radius:${r.A.userSetting.album_radius}px;}\n `;else{const{card_bg:t,text_color:i,star_color:s,button_bg:n,arrow_color:r}=e,a=1/e.columns_count*100+"%";_.textContent+=`\n \t#tt-bs-area .tt-bs-title{color:${e.title_text_color};font-size:${e.title_font_size}px;text-align:${e.title_align}}\n #tt-bs-area .tt-wrapper{flex-basis:${a};padding:${e.item_padding}px;}\n #tt-bs-area .review-item>img{border-radius:${e.border_radius}px;}\n #tt-bs-area #tt-bs-carousel .tt-bs-card{border-radius:${e.card_radius}px;}\n #tt-bs-area .tt-bs-card{background:${t};color:${i};}#tt-bs-area .tt-bs-text,#tt-bs-area .tt-bs-author{color:${i};}\n #tt-bs-area .vstar-star{--star-color:${s};}#tt-bs-area .tt-bs-button{background:${n};}\n #tt-bs-area .tt-bs-button path{fill:${r};}\n `,(0,o.$dqs)("#tt-bs-area").style.display="block"}}},405:(t,e,i)=>{i.d(e,{aQ:()=>l,is:()=>a,nf:()=>d});var s=i(88),n=i(357),o=i(571),r=i(607);function a(t,e="beforeend",i=5,a,d,c=""){this.pageCount=a,this.callback=()=>{"QA"===o.A.showType?(0,s.B)():(0,r.bC)()};const p=this.callback;this.activeIndex=0,this.pagerCount=i,this.middleIndex=parseInt(i/2);const{userSetting:u,isWdoRevOpen:v}=o.A,g=v?o.A.wdoRevDom:o.A.reviewsDom,A=n.A.prePage(u.font_color),w=n.A.nextPage(u.font_color),h=t.parentNode.classList.contains("trustoo-rtl");for(var m=`
    \n `,_=1;_<=i;_++)m+=`
  • ${_}
  • `;if(m+=`
  • \n ${h?A:w}\n
  • \n
`,t.insertAdjacentHTML(e,m),this.el=g.querySelector(".page-control"),this.pageNumList=this.el.querySelectorAll(".page-control-item"),a<5&&1!==a)for(_=a;_<5;_++)this.pageNumList[_].style.display="none";setTimeout((()=>{1===a&&this.togglePageButton(2)}),0),this.el.onclick=t=>{if(t.target.classList.contains("page-control-item")){this.activeIndex=t.target.dataset.index;let e=parseInt(t.target.textContent);this.pageClick(p,e)}},this.pageClick=function(t,e){let i=this.el.querySelector(".page-control-item.active").textContent;const s=this.pageCount;l(3,e),t?t():this.activeIndex=0,1==i&&1!=e?this.togglePageButton(1,"block"):1!=i&&1==e&&this.togglePageButton(1,"none"),i!=s&&e==s?this.togglePageButton(2,"none"):i==s&&e!=s&&this.togglePageButton(2,"block"),this.setPageNum()};var f=this.el.querySelector(".pre-page"),y=this.el.querySelector(".next-page");this.prePageButton=f,this.nextPageButton=y,this.togglePageButton=function(t,e){1==t?f.style.display=e:2==t&&(y.style.display=e)},this.setPageNum=function(){let t=l();const e=this.pageCount,i=this.pagerCount;this.activeIndex>this.middleIndex&&this.pageNumList[i-1].innerHTML<=e||this.activeIndex1?(t+this.middleIndex>e||t-this.middleIndex<=0?this.el.querySelector(".page-control-item.active").classList.remove("active"):this.activeIndex!=this.middleIndex&&(this.el.querySelector(".page-control-item.active").classList.remove("active"),this.activeIndex=this.middleIndex,this.pageNumList[this.middleIndex].classList.add("active")),this.changePageNum()):(this.el.querySelector(".page-control-item.active").classList.remove("active"),this.pageNumList[this.activeIndex].classList.add("active"))},this.getNextPageReviews=function(){l(1);const t=this.pageCount;let e=l();this.activeIndex++,2==e&&this.togglePageButton(1,"block"),e==t&&this.togglePageButton(2,"none"),p&&p(),this.setPageNum(2)},this.getPrePageReviews=function(){const t=this.pageCount;this.activeIndex--,l(2);let e=l();1==e&&this.togglePageButton(1,"none"),e==t-1&&this.togglePageButton(2,"block"),p&&p(),this.setPageNum(1)},y.onclick=()=>this.getNextPageReviews(),f.onclick=()=>this.getPrePageReviews(),this.changePageNum=function(){const t=this.pageCount,e=this.pagerCount;let i=l();var s=!1,n=i-this.middleIndex,o=i+this.middleIndex;i+this.middleIndex>t?(s=!0,n=t-2*this.middleIndex,e%2==0&&n++,o=t):e%2==0&&o--,n<=0&&(s=!0,o=(n=1)+2*this.middleIndex);for(var r=0,a=n;a<=o;a++)a===i&&s&&(this.pageNumList[r].classList.add("active"),this.activeIndex=r),this.pageNumList[r].innerHTML=a,r++},this.clearPageItems=()=>{o.A.pager.el.querySelectorAll(".page-control-item").forEach((t=>t.remove()))}}function l(t,e){let i=o.A.isWdoRevOpen?o.A.wdoRevDom:o.A.reviewsDom;const s="reviews"===o.A.showType?"reviews-page-no":"qa-page-no",n=(o.A.isWdoRevOpen?o.A.popupPageInfo:o.A.pageInfo)[o.A.showType];let r=n.curPage;return 1===arguments.length?(1===t?r++:2===t&&r--,n.curPage=r,i.setAttribute(s,r)):3===t&&2===arguments.length&&(i.setAttribute(s,e),n.curPage=e),r}function d(){if(1!==o.A.userSetting.review_pagination_type||!o.A.pager)return;const t=o.A.pager.el,e=o.A.pageInfo[o.A.showType];if(!e)return;const{total:i,curPage:s}=e;if(o.A.pager.pageCount=i,i<=1)return void(t.style.display="none");t.style.display="flex",t.setAttribute("type",o.A.showType),function(t){t.querySelectorAll(".page-control-item").forEach((t=>t.remove()))}(t),e.pageNumbers&&e.pageNumbers.length>0?function(t,e){const i=t.querySelector(".next-page");e.forEach(((e,s)=>{const n=document.createElement("li");n.className="page-control-item",n.dataset.index=s,n.dataset.number=e,n.textContent=e,t.insertBefore(n,i)}))}(t,e.pageNumbers):function(t,e){const i=Math.min(e,5),s=t.querySelector(".next-page");for(let e=1;e<=i;e++){const i=document.createElement("li");i.className="page-control-item",i.dataset.index=e-1,i.dataset.number=e,i.textContent=e,t.insertBefore(i,s)}}(t,i);const n=e.activeIndex||0,r=t.querySelector(`.page-control-item[data-index="${n}"]`);r&&(r.classList.add("active"),e.activeIndex=n),o.A.pager.activeIndex=n,o.A.pager.pageNumList=t.querySelectorAll(".page-control-item"),o.A.pager.pagerCount=o.A.pager.pageNumList.length,o.A.pager.middleIndex=parseInt(o.A.pager.pagerCount/2),o.A.pager.prePageButton.style.display=1===s?"none":"flex",o.A.pager.nextPageButton.style.display=s===i?"none":"flex"}},429:(t,e,i)=>{i.d(e,{DF:()=>g,M0:()=>w,WF:()=>A,nq:()=>u});var s=i(957),n=i(571),o=i(134);const{$dqs:r,debounce:a,setObserve:l,$dqsa:d}=i(986),{setInsertTarget:c,starEmbeddedAdaptation:p}=i(638);function u(){const t=n.A.curCollArr;let e=[],i='a[href*="/products/"]';if(-1===t.findIndex((t=>"A"!==t.tagName)))return t;if(-1===t.findIndex((t=>null===r(i,t))))return t.map((t=>r(i,t)));let s=5;d(".product-card .group-block-content div[class*=product_title],.product-card .group-block-content div.text-block.h5").length&&(s=6);let o,a=t[0],l=[];for(let n=0;n{n.A.observer.disconnect(),g();let{collTarget:t}=Review;const e=Array.from(t).map((t=>t.textContent.replace(/\n/g,"").trim())).join();w(),t=Review.collTarget;const i=Array.from(t).map((t=>t.textContent.replace(/\n/g,"").trim())).join(),s=d(".collection-icon-list").length;(0!==s&&s===t.length||0===s&&2===n.A.userSetting.is_show_stars_without_review)&&e===i?g():(Review.observeCount++,c(2),Review.collectionTarget=t)}),400);function g(){const t=document.body;l(t,{childList:!0,subtree:!0},(function(){v()}),n.A)}function A(t){let e="";if(t.length){let i="A",s=[];for(let e=0;ep");break;case 730:t=d(".grid-product__title");break;case 775:t=d(".product-card__name");break;case 766:t=d(".product-item__title");break;case 887:case 1356:case 1363:case 1368:case 1567:t=d(".h5>.full-unstyled-link"),0===t.length&&(t=d(".card-information__text")),l=!1;break;case 829:t=d(".card__name,.spf-product-card__title");break;case 578:t=d(".product__title a");break;case 796:t=d(".product-card__title");break;case 380:var c=d(".grid-link__container .grid__item");t=[],c.forEach((e=>{t.push(e.querySelector(".grid-link__title"))}));break;case 885:if(a=!0,t=d(".product-card__title-wrapper"),i){let t=r(".shopify-section .product");t&&(wrapWid=t.offsetWidth)}break;default:if(Review.theme&&"warehouse"===Review.theme.name){const t=r(".product-item__price-list.price-list");t&&"-15px"===getComputedStyle(t).marginTop&&(n.A.globalStyle.textContent+="div.collection-icon-list.vstar-star {\n margin-bottom: 20px;\n }")}a=!0,t=h()}if(a||0===t.length&&l&&(t=h()),n.A.isCollPage&&0===t.length&&r('a[href*="/products"]')&&await s.zG.sendErrorMsg(2,`集合页评价嵌入失败,店铺地址为:${window.location.href}`).then((e=>{if(e[1]){const i=p(4,e[1].selector);i&&(t=d(i))}})),0!==t.length&&(t=Array.from(t),i)){const e=Review.proTarget;e&&(t=t.filter((t=>t!==e&&!e.contains(t))))}Review.collTarget=t}function h(){let t=[];const{isCollPage:e,isProPage:i,isHomePage:s,hasPyRating:r}=n.A;if(e||i||s||o.A.otherPageColl||r){let e;return o.A.customCollTarSel&&(e=o.A.customCollTarSel,t=d(o.A.customCollTarSel)),0===t.length&&(e=".product-card div[class*=product_title],.product-card div.text-block.h5",t=d(e),Review.collType="new shopify theme"),0===t.length&&(e=".product-details>span.title,.apb_product_list_product_item_title,.grid_title,.collection__grid-item__details,\n .popup_cart_title>a,h3.product-title,body[class*=kalles] h1.product_title>a,a.ga-product_title,h4.title-product,.grid-item .inner-top>.product-bottom>a.product-title,\n .product__grid__title,.pt-title.prod-thumb-title-color,.product-item-meta__title,.product-grid-item__title,.product-item-title",t=d(e),Review.collType="type1"),0===t.length&&(e=".product-bottom>.product-title,.product-details>.product-title,.product-item__details a,.info .title,.product-name>a,\n .collectionBlock__title>a,.product-grid-item>p,.innerer>.title,.grid__product-content>a,.ht-product-title>a,.h5>.full-unstyled-link,\n .product .card-title,.list_prod .title-product,.product.slick-slide .card-title,.product-title-price,.prd-title,.product-info>h3.title14,\n .list-view-item__title-column>a,.gt_product-name>h2,.tt-description>h2.tt-title,.desc>h5,.product-item__title",t=d(e),Review.collType="type2"),0===t.length&&(e=".ftr,.product-grid-desc>h3,.gt_product-name,p.list-product__title,.product--details-container,.product--item-title,.h4.grid-view-item__title,\n .product-grid-item__product-name,h3.card__name.h4,.grid-crop-title,.title-wrap,h3>span.overflowed,.product-grid--title>a,a.gf_product-title,.bls__product-details a,\n a>.indiv-product-title-text,h2.product_name,.sf__pcard-content .max-w-full,h2.product-card__title,.proName>a,a.item__name.pg__sync-url,.spf-product-card__title",t=d(e),Review.collType="type3"),0===t.length&&(e=".grid-product__title,.product-block__title,\n .grid-view-item__title,.product-card__name,.ProductItem__Title,.product-info>a>h2,\n .card-information__text,span.indiv-product-title-text,.card__title:not(.heading),h4.product_name,\n .productitem--title,.grid-link__title,.boost-pfs-filter-product-item-title,.product-collection__title,\n .col_product_text_color,.js-product-details-link,.t4s-product-title,.ws-card__title,.product-thumbnail__info>.product-thumbnail__header",t=d(e),Review.collType="type4"),0===t.length&&(e='.card__heading[id^="title-template"],.lh-product-title',t=d(e),Review.collType="type5"),Review.coll_dqsa="$dqsa(`"+e+"`)",t}}},472:(t,e,i)=>{i.d(e,{A:()=>a});var s=i(354),n=i.n(s),o=i(314),r=i.n(o)()(n());r.push([t.id,'@font-face {\n font-family: "iconfont";\n /* Project id 4017216 */\n src: url("//cdn.vstar.app/static/css/fonts/iconfont.woff2?t=169") format("woff2"), url("//cdn.vstar.app/static/css/fonts/iconfont.woff?t=1681525258204") format("woff"), url("//cdn.vstar.app/static/css/fonts/iconfont.ttf?t=1681525258204") format("truetype");\n}\n.vstar-star.tt-right {\n text-align: right;\n}\n.vstar-star.tt-center {\n text-align: center;\n}\n.vstar-star > * {\n display: inline-block;\n vertical-align: middle;\n}\n.vstar-star .star-item {\n height: auto;\n margin-right: 2px;\n font-size: 0;\n line-height: normal;\n}\n.vstar-star .star-item.nostar .trustoo-rating-icon path {\n fill: var(--nostar-color);\n}\n.vstar-star .star-item.half-star > .item-nostar .trustoo-rating-icon path {\n fill: var(--nostar-color);\n}\n.vstar-star .star-item .trustoo-rating-icon path {\n fill: var(--star-color);\n}\n.vstar-star .star-item.half-star {\n position: relative;\n}\n.vstar-star .item-star {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n overflow: hidden;\n width: 100%;\n height: 100%;\n font-size: 0;\n}\n.vstar-star .item-nostar {\n font-size: 0;\n}\n.vstar-star i.trustoo-icon-star,\n.vstar-star i.trustoo-icon-nostar {\n display: inline;\n}\n#vstar-reviews #reviews-body .trustoo-badge-icon {\n width: 14px;\n height: 14px;\n}\n#vstar-reviews .user-verified .trustoo-badge-icon {\n margin-right: 4px;\n}\n.product-icon-list.vstar-star .star-item,\n.product-icon-list.vstar-star .trustoo-rating-icon {\n width: 20px;\n height: 20px;\n}\n.collection-icon-list .star-item,\n.collection-icon-list .trustoo-rating-icon {\n width: 16px;\n height: 16px;\n}\n#vstar-reviews > #reviews-head .star-item,\n#vstar-reviews > #reviews-head .trustoo-rating-icon {\n width: 20px;\n height: 20px;\n}\n.trustoo-widget #reviews-body .star-item,\n.trustoo-widget #reviews-body .trustoo-rating-icon {\n width: 14px;\n height: 14px;\n}\n.noreviews-nostar .star-item,\n.noreviews-nostar .trustoo-rating-icon {\n width: 20px;\n height: 20px;\n}\n.collection-icon-list {\n margin: 5px 0;\n}\n.collection-icon-list .collection-reviews-num {\n margin: 1px 6px 0 3px;\n font-size: 16px;\n line-height: normal;\n}\n.collection-icon-list .tt-rating-text {\n font-size: 16px;\n line-height: normal;\n}\n#vstar-reviews #reviews-head {\n display: flex;\n}\n#vstar-reviews .head-sort {\n width: 40px;\n height: 40px;\n box-sizing: border-box;\n}\n#vstar-reviews .head-sort .sort-content {\n position: relative;\n width: 100%;\n height: 100%;\n}\n#vstar-reviews #reviews-body {\n position: relative;\n}\n#vstar-reviews .list-review .img-item,\n#vstar-reviews .list-review .resource-item {\n overflow: hidden;\n width: 100px;\n height: 100px;\n}\n#vstar-reviews .grid-review {\n position: absolute;\n display: inline-block;\n padding-bottom: 16px;\n border-radius: 8px;\n animation: recover 1s linear;\n box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.12);\n vertical-align: top;\n}\n#vstar-reviews #reviews-body .reviews-text {\n line-height: 140%;\n}\n#vstar-reviews #reviews-body svg {\n vertical-align: middle;\n}\n#vstar-reviews .grid-review .grid-review-head {\n position: relative;\n padding: 0 16px;\n margin-top: 16px;\n}\n#vstar-reviews .grid-review .user-message {\n margin: 12px 0 12px;\n}\n#vstar-reviews .grid-review .user-name {\n padding: 0;\n margin-right: 6px;\n font-size: 14px;\n font-weight: 700;\n vertical-align: middle;\n}\n#vstar-reviews .grid-review .country-name {\n font-size: 16px;\n vertical-align: middle;\n}\n#vstar-reviews .grid-review .reviews-date {\n font-size: 12px;\n line-height: 22px;\n}\n#vstar-reviews .grid-review .grid-review-body {\n padding: 0 16px;\n}\n#vstar-reviews .grid-review .reviews-text {\n font-size: 14px;\n word-wrap: break-word;\n}\n#vstar-reviews .grid-review .display-text {\n font-size: 14px;\n}\n#vstar-reviews .grid-review .img-item,\n#vstar-reviews .grid-review .resource-item {\n display: block;\n width: 100%;\n border-radius: 8px 8px 0 0;\n}\n#vstar-reviews .grid-review img {\n width: 100%;\n border-radius: 8px 8px 0 0;\n}\n.pagefly-star-rating-sealapp:empty,\n.ecom-star-rating-sealapp:empty,\n.custom-vstar-rating-widget:empty {\n display: block;\n}\n[class^="trustoo-icon-"] {\n /* use !important to prevent issues with browser extensions that change fonts */\n font-family: "iconfont" !important;\n font-size: 14px;\n /* Better Font Rendering =========== */\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n font-style: normal;\n font-variant: normal;\n font-weight: normal;\n line-height: 1;\n text-transform: none;\n}\n.trustoo-icon-helpful:before {\n color: var(--font-color);\n content: "\\e605";\n}\n.trustoo-icon-unhelpful:before {\n color: var(--font-color);\n content: "\\e606";\n}\n.trustoo-icon-star:before {\n color: var(--star-color);\n content: "\\e602";\n}\n.trustoo-icon-nostar:before {\n color: var(--nostar-color);\n content: "\\e602";\n}\n[class^="trustoo-icon-"].rated:before {\n color: var(--star-color);\n}\n[class^="trustoo-icon-"].no-rated:before {\n color: var(--nostar-color);\n}\n.trustoo-icon-skirt:before {\n content: "\\e60b";\n}\n.trustoo-icon-bag:before {\n content: "\\e60f";\n}\n.trustoo-icon-leaf:before {\n content: "\\e610";\n}\n.trustoo-icon-tie:before {\n content: "\\e611";\n}\n.trustoo-icon-cup:before {\n content: "\\e612";\n}\n.trustoo-icon-fire:before {\n content: "\\e60a";\n}\n.trustoo-icon-trophy:before {\n content: "\\e613";\n}\n.trustoo-icon-crown:before {\n content: "\\e614";\n}\n.trustoo-icon-heart:before {\n content: "\\e615";\n}\n.trustoo-icon-diamond:before {\n content: "\\e616";\n}\n.trustoo-icon-shirt:before {\n content: "\\e617";\n}\n.trustoo-icon-surrounded:before {\n content: "\\e609";\n}\n.trustoo-icon-spikes:before {\n content: "\\e618";\n}\n.trustoo-icon-rounded:before {\n content: "\\e608";\n}\n.trustoo-icon-chef:before {\n content: "\\e60d";\n}\n.trustoo-icon-footprint:before {\n content: "\\e60e";\n}\n.trustoo-icon-seedling:before {\n content: "\\e60c";\n}\n.trustoo-icon-helpful:before {\n content: "\\e605";\n}\n.trustoo-icon-unhelpful:before {\n content: "\\e606";\n}\n.trustoo-icon-star:before {\n content: "\\e602";\n}\n',"",{version:3,sources:["webpack://./static/css/trustoo-insert.less"],names:[],mappings:"AACA;EACC,uBAAA;EAAC,uBAAuB;EAExB,gQAAA;AAAD;AAMC;EACC,iBAAA;AAJF;AAOC;EACC,kBAAA;AALF;AAQC;EACC,qBAAA;EACA,sBAAA;AANF;AALA;EAeE,YAAA;EACA,iBAAA;EACA,YAAA;EACA,mBAAA;AAPF;AAUE;EAEE,yBAAA;AATJ;AAYE;EAEE,yBAAA;AAXJ;AAjBA;EAiCG,uBAAA;AAbH;AApBA;EAsCE,kBAAA;AAfF;AAvBA;EA0CE,kBAAA;EACA,MAAA;EACA,QAAA;EACA,SAAA;EACA,OAAA;EACA,gBAAA;EACA,WAAA;EACA,YAAA;EACA,YAAA;AAhBF;AAlCA;EAqDE,YAAA;AAhBF;AArCA;;EA0DE,eAAA;AAjBF;AAoBA;EACC,WAAA;EACA,YAAA;AAlBD;AAoBA;EACC,iBAAA;AAlBD;AAqBA;;EAGE,WAAA;EACA,YAAA;AApBF;AAwBA;;EAGE,WAAA;EACA,YAAA;AAvBF;AA0BA;;EAGE,WAAA;EACA,YAAA;AAzBF;AA6BA;;EAGE,WAAA;EACA,YAAA;AA5BF;AAgCA;;EAGE,WAAA;EACA,YAAA;AA/BF;AAmCA;EACC,aAAA;AAjCD;AAgCA;EAIE,qBAAA;EACA,eAAA;EACA,mBAAA;AAjCF;AA2BA;EASE,eAAA;EACA,mBAAA;AAjCF;AAqCA;EAEE,aAAA;AApCF;AAkCA;EAME,WAAA;EACA,YAAA;EACA,sBAAA;AArCF;AA6BA;EAWG,kBAAA;EACA,WAAA;EACA,YAAA;AArCH;AA2CA;EACC,kBAAA;AAzCD;AA4CA;;EAEC,gBAAA;EACA,YAAA;EACA,aAAA;AA1CD;AA6CA;EACC,kBAAA;EACA,qBAAA;EACA,oBAAA;EACA,kBAAA;EACA,4BAAA;EACA,gDAAA;EACA,mBAAA;AA3CD;AA6CA;EACC,iBAAA;AA3CD;AA6CA;EACC,sBAAA;AA3CD;AA6CA;EAEE,kBAAA;EACA,eAAA;EACA,gBAAA;AA5CF;AAwCA;EAQE,mBAAA;AA7CF;AAqCA;EAYE,UAAA;EACA,iBAAA;EACA,eAAA;EACA,gBAAA;EACA,sBAAA;AA9CF;AA8BA;EAoBE,eAAA;EACA,sBAAA;AA/CF;AA0BA;EAyBE,eAAA;EACA,iBAAA;AAhDF;AAsBA;EA8BE,eAAA;AAjDF;AAmBA;EAkCE,eAAA;EACA,qBAAA;AAlDF;AAeA;EAuCE,eAAA;AAnDF;AAuDA;;EAGE,cAAA;EACA,WAAA;EACA,0BAAA;AAtDF;AAiDA;EASE,WAAA;EACA,0BAAA;AAvDF;AA2DA;;;EAGC,cAAA;AAzDD;AA4DA;EA1DE,+EAA+E;EA4DhF,kCAAA;EACA,eAAA;EA1DC,sCAAsC;EA4DvC,mCAAA;EACA,kCAAA;EACA,kBAAA;EACA,oBAAA;EACA,mBAAA;EACA,cAAA;EACA,oBAAA;AA1DD;AA6DA;EACC,wBAAA;EACA,gBAAA;AA3DD;AA8DA;EACC,wBAAA;EACA,gBAAA;AA5DD;AA+DA;EACC,wBAAA;EACA,gBAAA;AA7DD;AAgEA;EACC,0BAAA;EACA,gBAAA;AA9DD;AAgEA;EACC,wBAAA;AA9DD;AAgEA;EACC,0BAAA;AA9DD;AAgEA;EACC,gBAAA;AA9DD;AAiEA;EACC,gBAAA;AA/DD;AAkEA;EACC,gBAAA;AAhED;AAmEA;EACC,gBAAA;AAjED;AAoEA;EACC,gBAAA;AAlED;AAqEA;EACC,gBAAA;AAnED;AAsEA;EACC,gBAAA;AApED;AAuEA;EACC,gBAAA;AArED;AAwEA;EACC,gBAAA;AAtED;AAyEA;EACC,gBAAA;AAvED;AA0EA;EACC,gBAAA;AAxED;AA2EA;EACC,gBAAA;AAzED;AA4EA;EACC,gBAAA;AA1ED;AA6EA;EACC,gBAAA;AA3ED;AA8EA;EACC,gBAAA;AA5ED;AA+EA;EACC,gBAAA;AA7ED;AAgFA;EACC,gBAAA;AA9ED;AAiFA;EACC,gBAAA;AA/ED;AAkFA;EACC,gBAAA;AAhFD;AAmFA;EACC,gBAAA;AAjFD",sourcesContent:['// out: false\n@font-face {\n\tfont-family: "iconfont";\n\t/* Project id 4017216 */\n\tsrc: url("//cdn.vstar.app/static/css/fonts/iconfont.woff2?t=169") format("woff2"),\n\t\turl("//cdn.vstar.app/static/css/fonts/iconfont.woff?t=1681525258204") format("woff"),\n\t\turl("//cdn.vstar.app/static/css/fonts/iconfont.ttf?t=1681525258204") format("truetype");\n}\n\n.vstar-star {\n\t&.tt-right {\n\t\ttext-align: right;\n\t}\n\n\t&.tt-center {\n\t\ttext-align: center;\n\t}\n\n\t& > * {\n\t\tdisplay: inline-block;\n\t\tvertical-align: middle;\n\t}\n\n\t.star-item {\n\t\theight: auto;\n\t\tmargin-right: 2px;\n\t\tfont-size: 0;\n\t\tline-height: normal;\n\t}\n\t.star-item {\n\t\t&.nostar {\n\t\t\t.trustoo-rating-icon path {\n\t\t\t\tfill: var(--nostar-color);\n\t\t\t}\n\t\t}\n\t\t&.half-star {\n\t\t\t> .item-nostar .trustoo-rating-icon path {\n\t\t\t\tfill: var(--nostar-color);\n\t\t\t}\n\t\t}\n\n\t\t.trustoo-rating-icon path {\n\t\t\tfill: var(--star-color);\n\t\t}\n\t}\n\n\t.star-item.half-star {\n\t\tposition: relative;\n\t}\n\n\t.item-star {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\toverflow: hidden;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tfont-size: 0;\n\t}\n\t.item-nostar {\n\t\tfont-size: 0;\n\t}\n\n\ti.trustoo-icon-star,\n\ti.trustoo-icon-nostar {\n\t\tdisplay: inline;\n\t}\n}\n#vstar-reviews #reviews-body .trustoo-badge-icon {\n\twidth: 14px;\n\theight: 14px;\n}\n#vstar-reviews .user-verified .trustoo-badge-icon {\n\tmargin-right: 4px;\n}\n\n.product-icon-list.vstar-star {\n\t.star-item,\n\t.trustoo-rating-icon {\n\t\twidth: 20px;\n\t\theight: 20px;\n\t}\n}\n\n.collection-icon-list {\n\t.star-item,\n\t.trustoo-rating-icon {\n\t\twidth: 16px;\n\t\theight: 16px;\n\t}\n}\n#vstar-reviews > #reviews-head {\n\t.star-item,\n\t.trustoo-rating-icon {\n\t\twidth: 20px;\n\t\theight: 20px;\n\t}\n}\n\n.trustoo-widget #reviews-body {\n\t.star-item,\n\t.trustoo-rating-icon {\n\t\twidth: 14px;\n\t\theight: 14px;\n\t}\n}\n\n.noreviews-nostar {\n\t.star-item,\n\t.trustoo-rating-icon {\n\t\twidth: 20px;\n\t\theight: 20px;\n\t}\n}\n\n.collection-icon-list {\n\tmargin: 5px 0;\n\n\t.collection-reviews-num {\n\t\tmargin: 1px 6px 0 3px;\n\t\tfont-size: 16px;\n\t\tline-height: normal;\n\t}\n\t.tt-rating-text {\n\t\tfont-size: 16px;\n\t\tline-height: normal;\n\t}\n}\n\n#vstar-reviews {\n\t#reviews-head {\n\t\tdisplay: flex;\n\t}\n\n\t.head-sort {\n\t\twidth: 40px;\n\t\theight: 40px;\n\t\tbox-sizing: border-box;\n\n\t\t.sort-content {\n\t\t\tposition: relative;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\t}\n}\n\n// Mark 瀑布流样式\n#vstar-reviews #reviews-body {\n\tposition: relative;\n}\n\n#vstar-reviews .list-review .img-item,\n#vstar-reviews .list-review .resource-item {\n\toverflow: hidden;\n\twidth: 100px;\n\theight: 100px;\n}\n\n#vstar-reviews .grid-review {\n\tposition: absolute;\n\tdisplay: inline-block;\n\tpadding-bottom: 16px;\n\tborder-radius: 8px;\n\tanimation: recover 1s linear;\n\tbox-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.12);\n\tvertical-align: top;\n}\n#vstar-reviews #reviews-body .reviews-text {\n\tline-height: 140%;\n}\n#vstar-reviews #reviews-body svg {\n\tvertical-align: middle;\n}\n#vstar-reviews .grid-review {\n\t.grid-review-head {\n\t\tposition: relative;\n\t\tpadding: 0 16px;\n\t\tmargin-top: 16px;\n\t}\n\n\t.user-message {\n\t\tmargin: 12px 0 12px;\n\t}\n\n\t.user-name {\n\t\tpadding: 0;\n\t\tmargin-right: 6px;\n\t\tfont-size: 14px;\n\t\tfont-weight: 700;\n\t\tvertical-align: middle;\n\t}\n\n\t.country-name {\n\t\tfont-size: 16px;\n\t\tvertical-align: middle;\n\t}\n\n\t.reviews-date {\n\t\tfont-size: 12px;\n\t\tline-height: 22px;\n\t}\n\n\t.grid-review-body {\n\t\tpadding: 0 16px;\n\t}\n\n\t.reviews-text {\n\t\tfont-size: 14px;\n\t\tword-wrap: break-word;\n\t}\n\n\t.display-text {\n\t\tfont-size: 14px;\n\t}\n}\n\n#vstar-reviews .grid-review {\n\t.img-item,\n\t.resource-item {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\tborder-radius: 8px 8px 0 0;\n\t}\n\n\timg {\n\t\twidth: 100%;\n\t\tborder-radius: 8px 8px 0 0;\n\t}\n}\n\n.pagefly-star-rating-sealapp:empty,\n.ecom-star-rating-sealapp:empty,\n.custom-vstar-rating-widget:empty {\n\tdisplay: block;\n}\n\n[class^="trustoo-icon-"] {\n\t/* use !important to prevent issues with browser extensions that change fonts */\n\tfont-family: "iconfont" !important;\n\tfont-size: 14px;\n\t/* Better Font Rendering =========== */\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n\tfont-style: normal;\n\tfont-variant: normal;\n\tfont-weight: normal;\n\tline-height: 1;\n\ttext-transform: none;\n}\n\n.trustoo-icon-helpful:before {\n\tcolor: var(--font-color);\n\tcontent: "\\e605";\n}\n\n.trustoo-icon-unhelpful:before {\n\tcolor: var(--font-color);\n\tcontent: "\\e606";\n}\n\n.trustoo-icon-star:before {\n\tcolor: var(--star-color);\n\tcontent: "\\e602";\n}\n\n.trustoo-icon-nostar:before {\n\tcolor: var(--nostar-color);\n\tcontent: "\\e602";\n}\n[class^="trustoo-icon-"].rated:before {\n\tcolor: var(--star-color);\n}\n[class^="trustoo-icon-"].no-rated:before {\n\tcolor: var(--nostar-color);\n}\n.trustoo-icon-skirt:before {\n\tcontent: "\\e60b";\n}\n\n.trustoo-icon-bag:before {\n\tcontent: "\\e60f";\n}\n\n.trustoo-icon-leaf:before {\n\tcontent: "\\e610";\n}\n\n.trustoo-icon-tie:before {\n\tcontent: "\\e611";\n}\n\n.trustoo-icon-cup:before {\n\tcontent: "\\e612";\n}\n\n.trustoo-icon-fire:before {\n\tcontent: "\\e60a";\n}\n\n.trustoo-icon-trophy:before {\n\tcontent: "\\e613";\n}\n\n.trustoo-icon-crown:before {\n\tcontent: "\\e614";\n}\n\n.trustoo-icon-heart:before {\n\tcontent: "\\e615";\n}\n\n.trustoo-icon-diamond:before {\n\tcontent: "\\e616";\n}\n\n.trustoo-icon-shirt:before {\n\tcontent: "\\e617";\n}\n\n.trustoo-icon-surrounded:before {\n\tcontent: "\\e609";\n}\n\n.trustoo-icon-spikes:before {\n\tcontent: "\\e618";\n}\n\n.trustoo-icon-rounded:before {\n\tcontent: "\\e608";\n}\n\n.trustoo-icon-chef:before {\n\tcontent: "\\e60d";\n}\n\n.trustoo-icon-footprint:before {\n\tcontent: "\\e60e";\n}\n\n.trustoo-icon-seedling:before {\n\tcontent: "\\e60c";\n}\n\n.trustoo-icon-helpful:before {\n\tcontent: "\\e605";\n}\n\n.trustoo-icon-unhelpful:before {\n\tcontent: "\\e606";\n}\n\n.trustoo-icon-star:before {\n\tcontent: "\\e602";\n}\n'],sourceRoot:""}]);const a=r},500:(t,e,i)=>{i.d(e,{IV:()=>c,RR:()=>l});var s=i(571),n=i(986),o=i(405),r=i(607),a=i(88);function l(t,e,i,r){const a=(0,n.$dqs)(".loader",e);a&&"block"===a.style.display&&(a.style.display="none"),s.A.allRevLoadLock=!1,s.A.isRevPage||s.A.isWdoRevOpen||(1===t?(s.A.isFirstPageRender||(s.A.isList?(0,n.scrollTo)(e):(0,n.scrollTo)(e,"auto")),r&&(0,o.nf)()):d())}function d(){const t=s.A.pageInfo[s.A.showType].total,e=s.A.pageInfo[s.A.showType].curPage,i=(0,n.$dqs)(".more-review-btn",s.A.reviewsDom);i&&(i.style.display=e');const e=(0,n.$dqs)("#reviews-footer",s.A.reviewsDom);if(1===l)s.A.pager=new o.is(e,"beforeend",5,c,r.bC,"reviews");else if(2===l){const i=`\n\t\t\t`;e.insertAdjacentHTML("beforeend",i),s.A.pager={el:(0,n.$dqs)(".more-review-btn",e)},s.A.pager.el.onclick=function(t){t.target.style.display="none",(0,n.$dqs)(".loader",t.target.parentNode).style.display="block",(0,o.aQ)(1),"QA"===s.A.showType?(0,a.B)():(0,r.bC)()}}}1===l?(0,o.nf)():2===l&&d()}},540:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},571:(t,e,i)=>{i.d(e,{A:()=>s});const s={source:"reviews",staticBaseUrl:"",wrapWid:0,isNullRev:!1,proTarget:null,collTarget:[],ratingIconSvg:"",badgeIconSvg:"",themeStyle:"",ip:"",isFirstExecute:!1,isCollPage:!1,isProPage:!1,isHomePage:!1,isCartPage:!1,productId:"",isSettingUpdate:!1,isProRatingUpdate:!1,isReviewsUpdate:!1,isWebPSupported:!0,revIdBase:"vstar-",isOverwriteOldScripts:!1,isRecordPV:!1,isRecordCart:!1,cartWatcher:null,RevIntersection:null,keySettings:{is_activate_product_rating:2,is_activate_collection_rating:2,is_activate_home_rating:2,is_activate_home_reviews:2,is_activate_reviews:2,is_active_store_review:2,sidetab_is_enabled:2,is_review_snippets_active:2,review_sort_by:"image-descending",rating_icon_type:1,verified_icon_type:1,language:"en",is_translate_review:2,auto_switch_language:2,reviews_per_page_number:15,is_show_empty_review:1,is_hide_ratings:2,show_attribute:2,is_ai_home_active:0,is_ai_product_active:0},isCollOpen:!1,isProOpen:!1,isRevOpen:!1,isFirstPageRender:!0,buyersShowType:2,isInsertBS:!1,isMixReview:!1,page:0,isWdoRevFirstPageRendered:!1,reviewsList:[],pageRecord:[],reviewsBody:null,reviewsDom:null,revReqParam:"",productHandle:"",userSetting:{},showType:"reviews",layoutClass:"",layoutReviewCount:0,reviewsWidth:0,reviewsEllipsis:"count",reviewsEllipsisRow:4,imgUploadedCount:0,uploadedIndex:0,gridCardWidth:0,wdoGridCardWidth:0,listDisIndex:0,listNodeCount:0,viewer:null,origImg:[],thumbImg:[],likeRevLock:!1,lang:{},column:0,minHeight:0,reviews:{columnHighs:[],shopReviewsHighs:[],preColHighs:[],preShopReviewsHighs:[],cardWid:0,cardCount:0,ratingFilter:0},bsInsertSelector:null,albumCount:8,albumSortType:"commented-at-descending",isInsertRev:!1,isCssLoaded:!1,globalStyle:null,reqErr:null,pageInfo:{reviews:{total:0,curPage:1,activeIndex:0,pageNumbers:[],previousDisplay:"",nextDisplay:""},shopReviews:{total:0,curPage:1,activeIndex:0,pageNumbers:[],previousDisplay:"",nextDisplay:""}},popupPageInfo:{reviews:{total:0,curPage:1,activeIndex:0,pageNumbers:[],previousDisplay:"",nextDisplay:""}},isProHasHalfStar:!1,pageCount:0,ratingData:{},allRatingData:{total_reviews:-1},attributeStatistics:null,reviewsData:null,searchACount:6,collTarInx:0,isOtherTheme:!1,isCollFinished:!1,observer:null,isSetObserver:!1,iObserver:null,curCollArr:[],isHomeRatingOpen:!1,allRevLoadLock:!1,writeReviewSettings:{},mediaUrl:[],isSendLock:!1,ratingVal:0,uploadImgInfo:{},uploadType:1,newRevCharLimit:2e3,isLoginWrite:!1,copyText:"",writePopupEmbedded:!1,writeTo:{type:"normal",productId:"",prodImageUrl:"",productName:""},attributeConfig:null,attributeInstances:[],wdoRev:{columnHighs:[],shopReviewsHighs:[],preColHighs:[],preShopReviewsHighs:[],cardWid:0,cardCount:0,ratingFilter:0},isActWdoRev:!1,isWdoRevOpen:!1,reviewsKey:"normal",isWdoRevExist:!1,wdoRevDom:!1,wdoRevBody:null,isLinkReqRev:!1,writeLinkParams:{},writeForm:0,writeRestriction:1,hasPyRating:!1,showRelatedPros:!1,canInsertPagination:!1,revDetailInfo:{page:0,no:0,imageIndex:0},isQAInserted:!1,qsPageNum:0}},607:(t,e,i)=>{i.d(e,{PK:()=>f,bC:()=>v,fn:()=>m,i$:()=>w,nG:()=>h,ne:()=>_});var s=i(571),n=i(957),o=i(986),r=i(163),a=i(405),l=i(134),d=i(357),c=i(500),p=i(743),u=i(651);async function v(t,e){s.A.couldPreLoading=!1,s.A.imgCount=0,s.A.loadedImgCount=0,s.A.thumbImg=[];let i,r,l=[];const{isMixReview:d,isWdoRevOpen:c,isList:u,userSetting:v,isRevPage:A}=s.A;let w=(0,a.aQ)();const h=v.review_pagination_type;r=c?s.A.wdoRevDom:s.A.reviewsDom;const m=c?s.A.wdoRevBody:s.A.reviewsBody,f=s.A.isWdoRevOpen?s.A.wdoRev:s.A.reviews,y="shopReviews"===s.A.showType||"popupShopReviews"===s.A.showType;let b="";const C=p.A[s.A.reviewsKey];b=y?s.A.isWdoRevOpen?"trustoo_popup_shop_reviews":"trustoo_shop_reviews":c?"trustoo_all_reviews":"trustoo_reviews";const $=t||e;$?(l=[],(0,o.gsSession)("set",b,[])):l=(0,o.gsSession)("get",b);let x=null;x=y?(0,o.$dqs)(".tt-shop-reviews",m):(0,o.$dqs)(".tt-review-list",m),(!A&&!c&&(1===h||$)||$&&(d||c))&&(x.style.height="auto",_(x,r,!0),f.cardCount=0,s.A.isMobile&&c&&(0,o.scrollTo)(r),s.A.isFirstPageRender||(s.A.isList?(0,o.scrollTo)(r):(0,o.scrollTo)(r,"auto")));const R=1===h;if((R||!R&&1===w)&&l[w-1])g(l[w-1]);else{const t=r.getAttribute("review_sort_by");if("undefined"==typeof vstar_product_reviews||s.A.isReviewsUpdate||1!==w||c||$||d||y||1===v.auto_switch_language){i=(await n.zG.getProRevList(t,f.ratingFilter))[1]}else i=vstar_product_reviews;const a=i.page.total_page,p=s.A.isWdoRevOpen?s.A.popupPageInfo:s.A.pageInfo,u=i.page.count;p[s.A.showType]={total:a,curPage:i.page.cur_page,count:u},y&&(C.shopTab&&(C.shopTab.textContent=u),s.A.userSetting.store_reviews_count=u),r.setAttribute("review-page-count",a),s.A.isWebPSupported||i.list.forEach((t=>{0!==t.resources.length&&t.resources.forEach((t=>{t.src=t.src.replace("trustoo_big","q_90"),t.thumb_src=t.thumb_src.replace("trustoo_small","w_220")}))}));const A=i.list;l[w-1]=A,(0,o.gsSession)("set",b,l),$&&1===h&&s.A.pager&&s.A.pager.pageClick(null,1),g(A,$,e)}r.dataset.isRender||(!function(){if(1===s.A.userSetting.is_show_empty_review||"reviews"!==s.A.showType)return;const t=s.A.isWdoRevOpen?s.A.wdoRevDom:s.A.reviewsDom,e=s.A.isWdoRevOpen?s.A.popupPageInfo:s.A.pageInfo,i=s.A.isWdoRevOpen||!s.A.productId?s.A.allRatingData:s.A.ratingData,n=s.A.lang.total_review,r=s.A.lang.review_with_content,a=s.A.lang.no_content_review;let l=`${n.replace("{{review_number}}",i.total_reviews)} | `;const d=`${a}`;0===e[s.A.showType].count?l+=d:l+=`${r.replace("{{content_review_number}}",e.reviews.count)}`;(0,o.$dqs)(".tt-reviews-sort,#reviews-body",t).insertAdjacentHTML("beforebegin",`
\n\t\t${l}\n\t
`)}(),r.dataset.isRender=1)}function g(t,e,i){const{userSetting:p,isRevPage:v,isWdoRevOpen:g,isGrid:h,isSplit:m,globalStyle:y}=s.A,{isShowRevRatingNum:b,isImgLoadLazy:C}=l.A,$=g?s.A.wdoRev:s.A.reviews,x=g?s.A.wdoRevBody:s.A.reviewsBody,R=x.parentNode,S="shopReviews"===s.A.showType||"popupShopReviews"===s.A.showType;let T=[];const k=p.review_pagination_type,q=(0,a.aQ)();let E=null;E=S?(0,o.$dqs)(".tt-shop-reviews",x):(0,o.$dqs)(".tt-review-list",x),b&&1===(0,a.aQ)()&&(y.innerHTML+="#vstar-reviews .star{display:flex;align-items:center}\n #vstar-reviews .rev-rating-num{font-size:15px;margin-left:8px}");let L="";C&&(L='loading="lazy"');let P="";h&&(P='style="visibility:hidden"');const I=$.cardCount;let M=$.cardCount,D="";m&&(D=" split");let B=!1;if(s.A.isGrid&&(B=t.some((t=>t.resources.some((t=>!t.width||!t.height)))),B&&function(t,e,i){t.dataset.hasMissingImgSize=1,1===i&&(t.style.opacity=0,e.insertAdjacentHTML("beforeend",'
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t
'))}(E,x,q)),t.forEach(((t,e)=>{let i="";i=`no="${++M}"`,Object.assign(t,{imgAttr:L,cardCount:M,noText:i,styleText:P});const n=document.createElement("div");if(n.className=s.A.layoutClass+"review"+D,n.innerHTML=function(t,e,i){const{isMobile:n,layoutClass:r,userSetting:a,origImg:c,thumbImg:p,isGrid:v,isList:g,isSplit:A,lang:h}=s.A,{isShowRevVerified:m,isAddRevVrfy:_,isShowRevRatingNum:y}=l.A,{noText:b,imgAttr:C}=t;let $="",x="",R="",S="",T="",k="",q="",E="",L="",P="",I="",M="",D="",B="";const O=1===s.A.userSetting.customer_avatar,H=`
${(0,o.getTotalStarString)(t.star)}${T}
`;let N="";1===e&&(N='loading="lazy"');if(t.resources.forEach(((t,n)=>{let o=2===t.resource_type?`
\n ${d.A.video}\n
`:"",r="";if(1===t.resource_type?r=t.src:2===t.resource_type&&(r=t.thumb_src),v){const a=(t.width/t.height).toFixed(2);if(0!=n)return;{let l="";""!==t.average_hue&&(l=`background-color:${t.average_hue}`),P+=`
\n ${n}\n ${o}\n
`,s.A.imgCount++,p.push(t.thumb_src)}c.push(t.src)}else if(g){I+=function(t,e,i,n,o){const{origImg:r,thumbImg:a}=s.A;let l="";return l+=`
${n}\n ${o}\n
`,s.A.imgCount++,a.push(t.thumb_src),r.push(t.src),l}(t,`${C} data-page=${e} data-review-index=${i}`,b,n,o)}})),0!==t.resources.length){let e="";t.resources.length>1&&(e=`
${d.A.multiPhoto()}
`),v?P=`${e}
${P}
`:g&&(I=`
${I}
`)}y&&(T=t.star);const j=s.A.badgeIconSvg,W=`${h.verified_purchase}`,z=a.is_show_verified_badge;let F="";_&&(t.verified_badge=1);if(m&&1===t.verified_badge)if(1===z){const t=O?"":j;k=`
\n ${t}${W}
\n `}else 2===z||3!==z||O||(F=j);let U="";const G=5;U=a.review_date_format_type===G?f(t.commented_at):w(t.commented_at,a.review_date_format_type);const V=U?`${U}`:"";v&&n&&(S=V);if(O){const e=[1,3].includes(a.is_show_verified_badge)&&1===t.verified_badge?j:"";B=`
${(t.author.trim()?t.author.split(" ").reduce(((t,e)=>t+e.charAt(0)),""):"A").slice(0,2)}${e}
`}var Z="";const Q=``,J=` ${t.author_country}`,K=a.is_show_country_flag;1==K?Z=Q+J:3==K?Z=Q:4==K&&(Z=J);n&&v?x=Z:R=Z;if(l.A.isNoEllipsisReviews)M=t.content;else{const e=t.content;let i=e.length;M=e,v?i=n?100:200:g&&(i=n?300:500),e.length>i&&"count"===s.A.reviewsEllipsis&&(M=function(t,e,i){const n=i-s.A.lang.show_full_review.length-2;let o=e?`data-card-no="${e}"`:"";return`${t.substr(0,n)}...${s.A.lang.show_full_review}`}(e,t.cardCount,i))}1===s.A.userSetting.item_type&&t.item_type&&(q=`
\n\t\t\t

\n\t\t\t\t${h.item_type}\n\t\t\t

\n\t\t\t

${t.item_type}

\n\t\t
`);const Y=s.A.userSetting.store_avatar_src;if(""!==t.reply_content){E=`
\n
\n\t\t\t\t\t\t${Y?`
`:""}\n\t\t\t\t\t\t
${s.A.lang.shop_name.replace("{{shop_name}}",s.A.userSetting.store_name)}
\n\t\t\t\t\t
\n
${t.reply_content}
\n
`}if(1===s.A.userSetting.is_show_helpful){const e="tt_review_"+s.A.shop_id;let i=(0,o.gsLocal)("get",e),n="",r="";if(i){i=JSON.parse(i);const e=i.find((e=>e.id===t.id));e&&(1===e.likeType?n="active":2===e.likeType&&(r="active"))}D=`
${h.helpful}\n\t\t${d.A.helpful(n)}${t.likes_count}\n\t\t${d.A.unhelpful(r)}${t.dislike_count}
`}if(t.corresponding_product){const e=t.corresponding_product;let i=e.product_name;i.length>50&&!l.A.isAssociatedProdFullName&&(i=i.substr(0,50)+"..."),L=`\n \n
\n
${i}
\n
\n `}let X="",tt="",et="",it="";A?(X=H,et=V):(tt=H,it=V);const st=t.title&&1==a.is_show_review_title?`
${t.title}
`:"";if(l.A.reviewConstructor)return l.A.reviewConstructor(t,{gridImg:P,listImg:I,avatar:B,starTag:H,cntHtml:M,dateHtml:V,user_country:Z,noText:b,reviewTitle:st});const[nt,ot]=function(t){if(s.A.isGrid||!t||0===t.length||1!==s.A.userSetting.show_attribute)return["",""];const e=1,i=2,n={[e]:"rounded",[i]:"square"};let o="",r="";const a=[],l=[];t.forEach((t=>{t.type.includes("range")?a.push(t):l.push(t)})),a.forEach((t=>{o+=(0,u.Tl)({type:"centered_range"===t.type?"centered":"range",title:t.title,labels:t.options,value:t.range_value,style:n[s.A.userSetting.attributes_style]})})),o&&(o=`
${o}
`);return l.forEach((t=>{r+=`
\n\t\t\t\t\t

\n\t\t\t\t\t\t${t.title}:\n\t\t\t\t\t

\n\t\t\t\t\t

${t.options.join(",")}

\n\t\t\t\t
`})),[o,r]}(t.review_attribute);let rt="";(q||ot)&&(rt=`
\n\t${q} ${ot}
`);const at=s.A.isSplit?rt:"";let lt="";s.A.isList&&!s.A.isSplit?lt=rt:s.A.isGrid&&(lt=q);return`\n ${P} \n
\n
\n ${tt}${it}\n
\n
${S+x}
\n
\n\t\t\t\t\t\t${B}\n\t\t\t\t\t\t
\n ${t.author} \n ${F}\n ${R} \n ${k} \n ${$}\n\t\t\t\t\t\t\t
\n
\n\t\t\t\t\t\t${et}\n\t\t\t\t\t\t${at}\n
\n
\n\t\t\t\t\t${X}\n\t\t\t\t\t${st}\n\t\t\t\t\t

\n\t\t\t\t\t\t\t${M}\n\t\t\t\t\t

\n ${I}\n\t\t\t\t\t${lt}\n ${nt}\n\t\t\t\t\t${E}\n\t\t\t\t\t${D}\n ${L}\n
\n `}(t,q,e),n.dataset.index=e,n.dataset.page=q,B&&(n.dataset.new=!0),E.appendChild(n),n.setAttribute("no",M),n.setAttribute("review-id",t.id),T.push(n),"row"===s.A.reviewsEllipsis&&!l.A.isNoEllipsisReviews){!async function(t,e,i){const n=1.4*parseFloat(s.A.userSetting.font_size);var o=Math.round(s.A.reviewsEllipsisRow*n);await new Promise((t=>{setTimeout((()=>t()),200)}));var r=e;t.innerHTML=r;var a=r.length;let l="";if(t.offsetHeight<=o);else{for(var d,c=0,p=a;t.offsetHeight>o;)d=(c+p)/2,t.innerHTML=r.substring(0,d),t.offsetHeight<=o?(t.innerHTML=r.substring(0,p),c=d):p=d-1;l=r.substring(0,p-s.A.lang.show_full_review.length-10),t.innerHTML=l}if(l){let n=`...${s.A.lang.show_full_review}`;t.insertAdjacentHTML("beforeend",n)}}((0,o.$dqs)(".reviews-text",n),t.content,M)}})),$.cardCount=M,T.forEach((t=>{let e=[];e=(0,o.$dqsa)(".resource-item>img",t),0!==e.length&&(s.A.isGrid&&s.A.gridShowImgCount++,e.forEach((t=>{B&&t.removeAttribute("loading"),t.onload=function(){t.getAttribute("loaded")||(t.setAttribute("loaded",!0),A("success",this))},t.onerror=function(){const e=t.closest("[review-id]"),i=e?e.getAttribute("review-id"):"";if(n.zG.sendImageError(i,t.src),!t.getAttribute("loaded")){t.setAttribute("loaded",!0);let e=null;const i=t.closest(".resource-list");if(s.A.isGrid){e=t.closest("[data-column]").dataset.column;const s=(0,o.$dqs)(".multi-photo-wrapper",i.parentNode);0==t.getAttribute("alt")&&(i.remove(),s&&s.remove())}else s.A.isList&&(t.parentNode.remove(),0===i.children.length&&i.remove());A("fail",this,e)}},t.src=t.getAttribute("data-original")})))})),1===q&&(g||v))h&&(0,r.xc)(T,I,e);else if(h){let t=!1;g||v||(t=1===k||e),(0,r.xc)(T,I,t)}(0,c.RR)(k,R,q,i),_(E,R,!1)}function A(t,e,i){const n=e.getAttribute("no"),a=e.getAttribute("index");if("fail"===t&&(s.A.isGrid?"0"===e.dataset.index&&(e.src="https://cdn.vstar.app/static/images/default.png",e.setAttribute("data-original","https://cdn.vstar.app/static/images/default.png"),e.parentNode.style.height=e.parentNode.style.width,(0,r.FS)(i,n),Review.loadedPhoto.push(n),e.style.display="block"):s.A.isList),s.A.isGrid&&"0"===a&&(s.A.gridLoadedShowImg++,s.A.gridLoadedShowImg===s.A.gridShowImgCount)){const t=p.A[s.A.reviewsKey].curBody;(0,o.$dqsa)("[new-grid-img]",t).forEach((t=>{t.removeAttribute("style"),t.removeAttribute("new-grid-img")})),(0,o.$dqsa)("[data-new]",t).forEach((t=>{t.removeAttribute("data-new")})),(0,r.dn)()}}function w(t,e){const i=t.split(" ")[0];let s=[];-1!==i.indexOf("/")?s=i.split("/"):-1!==i.indexOf("-")&&(s=i.split("-"));let n="";return 1===e?n=s[1]+"/"+s[2]+"/"+s[0]:2===e?n=s[2]+"/"+s[1]+"/"+s[0]:3===e&&(n=i),n}function h(t,e){if(s.A.likeRevLock)return;let i="",r=null;"QA"===s.A.showType?(i="qa",r=n.nj.likeOrDislikeQA):(i="review",r=n.zG.likeOrDislikeReview),s.A.likeRevLock=!0;let a=2,l=1;e.contains("tt-helpful")?l=1:e.contains("tt-unhelpful")&&(l=2);const d=t.closest(`[${i}-id]`).getAttribute(`${i}-id`),c=e.contains("active"),p=t.parentNode,u=(0,o.$dqs)(".tt-helpful-count",p),v=(0,o.$dqs)(".tt-unhelpful-count",p),g="tt_"+i+"_"+s.A.shop_id;let A=(0,o.gsLocal)("get",g);A=A?JSON.parse(A):[];const w=A.findIndex((t=>t.id===d)),h=t.nextElementSibling;a=c?2:1,c||-1!==w&&(a=3),r(l,a,d).then((e=>{if(e[0])return void(s.A.likeRevLock=!1);const i=(0,o.$dqs)(".active",p);i&&i.classList.remove("active"),c?(t.classList.remove("active"),-1!==w&&A.splice(w,1),h.textContent=parseInt(h.textContent)-1):(-1!==w&&A.splice(w,1),t.classList.add("active"),h.textContent=parseInt(h.textContent)+1),3===a&&(1===l?v.textContent=parseInt(v.textContent)-1:2===l&&(u.textContent=parseInt(u.textContent)-1)),(0,o.gsLocal)("set",g,JSON.stringify(A)),setTimeout((()=>{s.A.likeRevLock=!1}),300)}))}function m(t){if(t.parentNode.querySelector(".remain-text").removeAttribute("hidden"),t.style.display="none",s.A.isGrid){const e=t.closest("[data-column]").dataset.column,i=parseInt(t.dataset.cardNo);(0,r.FS)(e,i)}}function _(t,e,i){const s=(0,o.$dqs)("#tt-reviews-loading[data-common]",e);i?(e.dataset.loading="1",s?s.style.display="block":e.insertAdjacentHTML("beforeend",'
\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t
'),t.innerHTML=""):(delete e.dataset.loading,s&&(s.style.display="none"))}function f(t){const e=new Date(t+"Z").getTime(),i=(new Date).getTime(),n=Math.floor((i-e)/1e3),o=3600,r=86400,a=2592e3,l=31536e3,d=s.A.lang.time_ago;let c="",p="just";return n<60?p="just":n{i.r(e),i.d(e,{getHomeProTitle:()=>f,getTotalRating:()=>g,getTotalStarString:()=>_,insertCarousel:()=>m,insertReviewControl:()=>A,insertReviewDetail:()=>h,requestAllRating:()=>w,setInsertTarget:()=>u,setWriteReview:()=>o.setWriteReview,starEmbeddedAdaptation:()=>y});var s=i(957),n=i(657),o=i(986),r=i(429),a=i(778),l=i(571),d=i(134),c=i(877),p=i(743);async function u(t){let e,i;if(1==t){if(!(0,o.$dqs)("#seal-star-rating-widget")){if(await(0,a.rU)(),!Review.proTarget)return;let t="";t=l.A.userSetting.detail_rating_color?l.A.userSetting.detail_rating_color:window.getComputedStyle(Review.proTarget).color,l.A.globalStyle.textContent+=`\n\t\t\t.product-icon-list>.tt-rating-text{\n color: ${t} !important;\n }`,v()}}else if(2==t){if(0===Review.collTarget.length)return;l.A.curCollArr=Review.collTarget.filter((t=>{if(!t.getAttribute("is-vstar-inserted"))return!0})),l.A.curCollArr.length>50?(l.A.isCollFinished=!1,l.A.curCollArr=l.A.curCollArr.slice(0,50)):l.A.isCollFinished=!0;if(l.A.curCollArr.every((t=>t.getAttribute("product-id")||t.dataset.productId)))i=l.A.curCollArr.map((t=>t.getAttribute("product-id")||t.getAttribute("data-product-id"))).join(",");else{let t=(0,r.nq)();e=(0,r.WF)(t)}}if(1!==t&&(e||i)){let[t,n]=await s.zG.getCollRating(e,i);null===t&&async function(t){const e=l.A.curCollArr,{userSetting:i,isProPage:s,hasPyRating:n,hasEcomRt:a}=l.A,c=e.length;if(c){if(0===(0,o.$dqsa)(".collection-icon-list").length){let t="";t=l.A.userSetting.list_rating_color?l.A.userSetting.list_rating_color:window.getComputedStyle(e[0]).color,l.A.globalStyle.textContent+=`\n\t\t\t.collection-icon-list>.tt-rating-text{\n\t\t\t\tcolor:${t}\n\t\t\t}\n\t\t\t`}let v=0,g="afterEnd";n||a?g="afterbegin":d.A.listRatingPosition&&(g=d.A.listRatingPosition),55363502159===l.A.shop_id&&t.forEach((t=>t.total_reviews+=100));for(var p=0;p${o.slice(0,r)}`),e=`
${o.slice(r+8)}
`,i=_(s.rating,!0)):e=`
${o}
`}const o=`style="margin-top: ${l.A.userSetting.list_rating_top}px;margin-bottom: ${l.A.userSetting.list_rating_bottom}px;"`;r.style.margin=0;const a=`
\n\t\t\t\t${t}${i}${e}
`;r.insertAdjacentHTML(g,a)}}if(document.dispatchEvent(new CustomEvent("onTTListRatingEmbed",{detail:{v:l.A},bubbles:!0,cancelable:!0})),(n||a)&&s){const t=shopifyObj.productId,e=(0,o.$dqsa)(`.custom-vstar-rating-widget[product-id="${t}"],.custom-vstar-rating-widget[data-product-id="${t}"]`);0!==e.length&&l.A.reviewsDom&&e.forEach((t=>{t.style.cursor="pointer",t.onclick=()=>(0,o.scrollTo)(l.A.reviewsDom)}))}s&&!n||(l.A.isCollFinished?setTimeout((()=>{(0,r.DF)()}),1e3):u(2))}}(n)}}function v(){let{proTarget:t}=Review;const{ratingData:e,userSetting:i,lang:s}=l.A,n=(0,o.$dqs)(".product-icon-list.vstar-star",t.parentNode);if(n&&n.remove(),2===i.is_show_stars_without_review&&0==e.rating);else{let i="afterEnd",n="",r=window.getComputedStyle(t).textAlign;1==t.dataset.trustooRatingBlock?i="afterbegin":d.A.detailRatingPosition&&(i=d.A.detailRatingPosition);const c=window.getComputedStyle(t.parentNode);"flex"===c.display&&"column"!==c.flexDirection&&"wrap"!==c.flexWrap&&(t=t.parentNode),"center"===r?n="tt-center":"right"===r&&(n="tt-right"),d.A.customRatingText&&(s.product_pages_reviews=d.A.customRatingText);const p=e.total_reviews;let u=s.product_pages_reviews.replace(/{{review_number}}/g,p).replace(/{{review_rating}}/g,e.rating).trim();const v=u.indexOf("{{star}}");let g="",A="",w="";-1!==v?(0!==v&&(g=`
${u.slice(0,v)}
`),A=`
${u.slice(v+8)}
`,w=_(e.rating,!0)):A=`
${u}
`;const h=`
\n\t\t\t${g}${w}${A}
`;t.insertAdjacentHTML(i,h),"afterend"===i&&(t.style.marginBottom=0);let m=(0,o.$dqs)(".product-icon-list");m.onclick=function(t){const{reviewsDom:e}=l.A;(0,o.processRecordedData)("reviews_click"),t.target.classList.contains("product-icon-list")||((0,a.bl)(),e&&(0,o.scrollTo)(e))};const f=new CustomEvent("onTTDetailRatingEmbed",{detail:{v:l.A,node:m},bubbles:!0,cancelable:!0});document.dispatchEvent(f)}}async function g(){let t=l.A.ratingData;const{isProRatingOpen:e,isHomeRatingOpen:i,isHomePage:a,isProPage:p}=l.A,{proTarget:g}=Review,w=(0,o.$dqs)("#seal-star-rating-widget");if(l.A.productId&&0===Object.keys(l.A.ratingData).length){let e;"undefined"!=typeof vstar_product_rating&&vstar_product_rating.hasOwnProperty("rating")&&!l.A.isProRatingUpdate?l.A.ratingData=t=vstar_product_rating:([e,t]=await s.zG.getProductRating(),null===e&&t&&(l.A.ratingData=t))}l.A.ratingData&&l.A.ratingData.rating&&(l.A.ratingData.rating=parseFloat(l.A.ratingData.rating).toFixed(d.A.bigRatingDigits-1)),(e||i||l.A.hasPyRating||l.A.hasEcomRt)&&(p&&setTimeout((()=>{((0,o.$dqs)('a[href*="/products/"],.product-recommendations')&&l.A.isOpenRecStars||d.A.isProPageObserve)&&((0,r.M0)(),0!==Review.collTarget.length&&u(2),setTimeout((()=>{(0,r.DF)()}),1e3))}),1e3),w||(a?g&&v():u(1))),await A(t),l.A.isProPage&&((0,o.gsSession)("set","tt_pv_product_id",null),(0,o.gsSession)("set","tt_cart_product_id",null),async function(){l.A.cartWatcher=new c.N,l.A.cartWatcher.changeCount=0,window.addEventListener("cart_changed",(t=>{if(l.A.cartWatcher.changeCount++,l.A.isRecordPV&&l.A.cartWatcher.changeCount>1){const e=t.detail.token.split("?key=")[0];(0,o.processRecordedData)("add_to_cart",e,!0)}})),await l.A.cartWatcher.init(),l.A.reviewsDom&&!l.A.isNullRev&&(0,n.E7)()}())}async function A(t){const{isNoNullReview:e}=l.A,i=new CustomEvent("onTrustooReviewsEmbed",{detail:{reviews:l.A.reviewsDom},bubbles:!0,cancelable:!0});let s=!1;if(((0,o.$dqs)("#seal-review-widget")||p.A.customReviewsBlock)&&(s=!0),l.A.isRevOpen||s){let s=!1;l.A.isMixReview&&l.A.isHomePage&&await w();const r=l.A.isMixReview?l.A.allRatingData:t;if(r&&r.total_reviews>0)l.A.isInsertRev=!0,h(),s=!0,(0,n.Gs)();else{if(e||2===l.A.userSetting.review_empty_status_display)return Review.hasReviews=!1,void document.dispatchEvent(i);s=!0,(0,n.WC)(),"undefined"!=typeof trustooAfterExecute&&trustooAfterExecute(l.A,d.A)}window.TrustooReviews.reviews.hasReviews=s,(0,o.setWriteReview)()}else l.A.isFirstPageRender&&"undefined"!=typeof trustooAfterExecute&&trustooAfterExecute(l.A,d.A);const r=Boolean(l.A.reviewsDom);window.TrustooReviews.carousel.canWriteReview&&!r?(0,o.setWriteReview)():window.TrustooReviews.reviews.hasReviews=Boolean(l.A.reviewsDom),Review.hasReviews=r,document.dispatchEvent(i)}async function w(){const t=(await s.zG.getRating())[1];l.A.allRatingData=t}function h(){"undefined"!=typeof TTRevDetail&&(d.A.isPageReview||l.A.isInsertRev||l.A.isInsertBS||l.A.isWdoRevOpen)&&TTRevDetail.insertTTReviewDetail(l.A)}function m(t,e="beforebegin"){if(!t)return;if((0,o.$dqs)("#trustoo-card-carousel-widget"))return;const i=document.createElement("script");i.src=`https://${l.A.staticBaseUrl}/static/dist/js/swiper-reviews.min.js`;const s=document.createElement("link");s.rel="stylesheet",s.href=`https://${l.A.staticBaseUrl}/static/css/swiper-reviews.min.css`,document.head.appendChild(i),document.head.appendChild(s),t.insertAdjacentHTML(e,'')}function _(t,e=!1){const{isProPage:i}=l.A,s=l.A.ratingIconSvg;let n="";s||(n=" pending");const o=`
${s}
`,r=`
${s}
`;parseInt(t)||(t=0);for(var a="",d=Math.floor(t),c=0;c\n\t\t
${s}
\n
\n ${s}\n
\n `}for(c=0;c<5-d;c++)a+=r;return a}function f(t){return encodeURIComponent(t)}function y(t,e){for(let i=0;i{i.d(e,{M6:()=>a,Tl:()=>d,ps:()=>l,uq:()=>r});var s=i(571);class n{constructor(t){this.init(t)}init(t){const{title:e,type:i,isMiddle:s,id:n,labels:o,targetNode:r,onChange:a}=t;this.id=n,this.type=i,this.labels=o,this.title=e,this.onChange=a,this.isMiddle=s;let l=0;s&&(l=3),r.insertAdjacentHTML("beforeend",`
\n
${e}
\n
\n ${Array.from({length:5},((t,e)=>e+1)).reduce(((t,e,i)=>t+`
${e}
`),"")}\n ${s?'\n \n ':""}\n
\n
\n ${o.map((t=>`${t}`)).join("")}\n
\n
`),this.container=document.querySelector(`.tt-range[data-id="${n}"]:not([data-handled])`),this.container.dataset.handled="true",this.bindEvents()}bindEvents(){this.container.querySelectorAll(".tt-range-option").forEach((t=>{t.addEventListener("click",(t=>{this.selectOption(t.target)}))}))}selectOption(t){if(t.classList.contains("tt-selected"))return this.reset(),void(this.onChange&&this.onChange(this.selectedValue));this.container.querySelectorAll(".tt-range-option").forEach((t=>{t.classList.remove("tt-selected")})),t.classList.add("tt-selected"),this.selectedValue=t.dataset.value,"centered_range"===this.type&&this.moveSvgToSelected(t),this.onChange&&this.onChange(this.selectedValue)}moveSvgToSelected(t){const e=this.container.querySelector(".tt-range-check"),i=this.container.getBoundingClientRect(),s=t.getBoundingClientRect(),n=s.left-i.left+s.width/2-10;e.style.left=n+"px",e.classList.add("tt-visible")}getValue(){return this.selectedValue?[this.selectedValue]:[]}setValue(t){const e=this.container.querySelector(`[data-value="${t}"]`);e&&this.selectOption(e)}reset(){if(this.container.querySelectorAll(".tt-range-option").forEach((t=>{t.classList.remove("tt-selected")})),this.isMiddle){this.container.querySelector(".tt-range-check").classList.remove("tt-visible")}this.selectedValue=null}}class o{constructor(t){this.selectedValues=[],this.init(t)}init(t){const{title:e,id:i,labels:n,type:o,targetNode:r,options:a,multiple:l,onChange:d}=t;this.multiple=l,this.id=i,this.type=o,this.title=e,this.labels=n,this.onChange=d;const c=s.A.lang.separate_review_form,p=s.A.lang.all_in_one_from;let u="",v="";const g=l?"select_all":"choose_one",A=r.closest("#tt-media-uploader-container");A||(1===s.A.writeForm?v=` (${p[g]})`:2===s.A.writeForm&&(u=`
${c[g]}
`));let w=`
\n\t\t\t${a.reduce(((t,e)=>t+`
${e}
`),"")}\n\t\t\t
`;2===s.A.writeForm&&o.includes("choice")&&!A&&(w=`
${w}
`),r.insertAdjacentHTML("beforeend",`
\n\t\t\t
${e}${v}
\n\t\t\t${u}\n\t\t\t${w}\n
`),this.container=document.querySelector(`.tt-choice[data-id="${i}"]:not([data-handled])`),this.container.dataset.handled="true",this.bindEvents()}bindEvents(){this.container.querySelectorAll(".tt-choice-option").forEach((t=>{t.addEventListener("click",(t=>{this.toggleOption(t.target)}))}))}toggleOption(t){const e=t.dataset.value,i=t.classList.contains("tt-selected");this.multiple?i?(t.classList.remove("tt-selected"),this.selectedValues=this.selectedValues.filter((t=>t!==e))):(t.classList.add("tt-selected"),this.selectedValues.push(e)):i?(t.classList.remove("tt-selected"),this.selectedValues=[]):(this.container.querySelectorAll(".tt-choice-option").forEach((t=>{t.classList.remove("tt-selected")})),t.classList.add("tt-selected"),this.selectedValues=[e]),this.onChange&&this.onChange(this.selectedValues,this.multiple)}setMultiple(t){if(this.multiple=t,!t&&this.selectedValues.length>1){const t=this.selectedValues[0];this.reset(),this.setValue([t])}}getValue(){return[...this.selectedValues]}setValue(t){this.reset(),t.forEach((t=>{const e=this.container.querySelector(`[data-value="${t}"]`);e&&(e.classList.add("tt-selected"),this.selectedValues.includes(t)||this.selectedValues.push(t))}))}reset(){this.container.querySelectorAll(".tt-choice-option").forEach((t=>{t.classList.remove("tt-selected")})),this.selectedValues=[]}}function r(){const t=[];return s.A.attributeInstances.forEach((e=>{const{id:i,type:s,title:n}=e,o={id:i,type:s,title:n},r=e.getValue();let a=e.labels;s.includes("choice")?a=r:s.includes("range")&&(o.range_value=r[0]),r.length>0&&t.push({...o,options:a})})),t}function a(t,e,i){const{title:r,type:a,id:l,options:d}=e;if(a.includes("choice")){const e=new o({title:r,multiple:"multiple_choice"===a,id:l,targetNode:t,options:d,type:a,onChange:i});s.A.attributeInstances.push(e)}else if(a.includes("range")){const e=new n({labels:d,isMiddle:"centered_range"===a,title:r,id:l,targetNode:t,type:a,onChange:i});s.A.attributeInstances.push(e)}}function l(){s.A.attributeInstances.forEach((t=>{t.reset()}))}function d(t={}){const{type:e="range",value:i=3,segments:s=4,title:n="",labels:o=[],size:r="normal",style:a="rounded"}=t;let{min:l,max:d}=t;l||(l=1,e.includes("centered")&&(l=-2)),d||(d=5,e.includes("centered")&&(d=2));const c=(i-l)/(d-l);let p=100*c+"%";return"rounded"===a&&(0===c?p=`calc(${p} + 1px)`:1===c&&(p=`calc(${p} - 1px)`)),`\n\t\t\t\t\t
\n\t\t\t\t\t\t\t${n?`
${n}
`:""}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
e?`background: linear-gradient(to right, var(--attr-bg-color) 0%, var(--attr-bg-color) ${e}%, var(--attr-color) ${e}%, var(--attr-color) ${t}%, var(--attr-bg-color) ${t}%, var(--attr-bg-color) 100%)`:t\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t${Array.from({length:s},((t,e)=>`
`)).join("")}\n\t\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t${"centered"===e?'
':""}\n\t\t\t\t\t\t\t\t\t\t\t${"centered"===e&&"rounded"===a?'
':""}\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t${function(){const t=o.length>0?o:"centered"===e?[l.toString(),"Perfect",d.toString()]:[l.toString(),d.toString()];return`
${t.map((t=>`
${t}
`)).join("")}
`}()}\n\t\t\t\t\t
\n\t\t\t`}},657:(t,e,i)=>{i.d(e,{nZ:()=>M,WC:()=>q,Gs:()=>R,FP:()=>B,iB:()=>I,E7:()=>N,Al:()=>H});var s=i(571),n=i(986),o=i(163),r=i(405),a=i(134),l=i(220),d=i(778),c=i(607),p=i(381),u=i(743),v=i(651);function g(){const{lang:t,userSetting:e,revHeadType:i}=s.A,o=s.A.isWdoRevOpen?s.A.wdoRev:s.A.reviews,a=s.A.isMixReview||s.A.isWdoRevOpen?s.A.allRatingData:s.A.ratingData,l=s.A.isWdoRevOpen?s.A.wdoRevDom:s.A.reviewsDom,d=(0,n.$dqs)("#reviews-head",l);let g="",w="";if(!a||a.total_reviews<=0)return;var h="";1===s.A.userSetting.is_qa_active&&s.A.productId&&!s.A.isWdoRevOpen||1===s.A.userSetting.is_active_store_review||(h=`
\n\t\t
\n\t\t\t\t\n\t\t\t\n\t\t
\n\t\t${H().html}\n\t\t
`);var m=(0,n.getTotalStarString)(a.rating,!0);let _=a.total_reviews,f="",y="";if(2!==e.is_show_review_button||s.A.isMixReview){let e=t.write_reviews;(s.A.isMixReview||s.A.isWdoRevOpen)&&"shop"===s.A.writeTo.type&&(e=t.store_review.write_btn_text),f=``}1!==s.A.userSetting.is_qa_active||s.A.isWdoRevOpen||s.A.isMixReview||(y=``);let b="",C="",$="",x=`${`

\n ${a.rating}\n

`}\n\t
\n\t\t\t${m} \n\t
`;if(1===i?($=`

${t.customer_reviews}

`,b=`${A()}
\n
\n 5 ${t.star}\n
\n
\n 4 ${t.star}\n
\n
\n 3 ${t.star}\n
\n
\n 2 ${t.star}\n
\n
\n 1 ${t.star}\n
\n
`):2===i&&(g="review-head-type2",s.A.isMobile||(x=`
${x}
`)),C+=`\n
\n\t\t\t\t${x}\n

${1===e.is_show_review_number?_:""} ${t.reviews}

\n
\n `,C=`
\n ${C}\n
`,w=`\n\t${$}\n\t
\n\t\t
\n\t\t${C+b}\n\t\t${1===s.A.userSetting.is_show_album&&1===i?`${A(!0)}
`:""}\n\t\t
\n\t\t\n\t\t
\n\t\t\t\t${f+y+h}\n\t\t
\n\t
\n${function(){const t=1,e=2,i={[t]:"rounded",[e]:"square"};let n="",o="";s.A.attributeStatistics&&1!==s.A.userSetting.is_hide_ratings&&!s.A.isWdoRevOpen&&(s.A.attributeStatistics.forEach((t=>{o+=(0,v.Tl)({type:"centered_range"===t.type?"centered":"range",title:t.title,labels:t.options,value:t.value,style:i[s.A.userSetting.attributes_style]})})),o&&(n=`
${o}
`));return n}()}\n\t`,d&&(d.className+=g,d.innerHTML+=w,u.A[s.A.reviewsKey].writeBtn=(0,n.$dqs)(".tt-write-reviews",d),2!==i)){const t=(0,n.$dqsa)(".star-range",d),i=(0,n.$dqsa)(".star-num",d),l=1===e.is_show_review_number;t.forEach(((t,p)=>{const u=5-p,v=a["total_star"+u];let g="0";v&&(g=(v/a.total_reviews*100).toFixed(1)+"%"),i[p].textContent=l?v:g,t.setAttribute("index",u),t.style.cssText=`background:linear-gradient(to right, ${e.star_color} 0%, ${e.star_color} ${g},${e.nostar_color} ${g}, ${e.nostar_color})`,v>0&&1===s.A.userSetting.rating_filter&&(t.onclick=function(){if("reviews"!==s.A.showType)return;const e=t.getAttribute("index");e===o.ratingFilter?o.ratingFilter=0:o.ratingFilter=e,(0,r.aQ)(3,1),(0,c.bC)(!1,!0)},t.parentNode.onmouseover=function(){(0,n.$dqs)(".head-center",d).classList.add("tt-hover"),this.classList.add("active")},t.parentNode.onmouseout=function(){(0,n.$dqs)(".head-center",d).classList.remove("tt-hover"),this.classList.remove("active")})})),1===s.A.userSetting.is_show_album&&(0,p.D)((0,n.$dqs)(".tt-reviews-album",d))}}function A(t=!1){return s.A.isMobile?"":`
`}var w=i(88),h=i(357),m=i(154),_=i(45),f=i(500),y=i(957);let b=null;const C=[];class ${constructor(){this.wrapper=document.getElementById("tt-product-selector"),this.container=document.getElementById("tt-product-list"),this.loadingEl=document.getElementById("tt-loading"),this.searchInput=document.querySelector("#tt-product-search>.tt-search"),this.allProducts=[...C],this.displayedProducts=[...C],this.page=1,this.productCount=0,this.perPage=5,this.totalPage=0,this.isLoading=!1,this.hasMoreItems=!0,this.searchTerm="",this.observer=null}generateMoreProducts(){this.allProducts=[...this.allProducts]}init(){this.renderProducts(),this.setupScrollListener(),this.setupSearchListener(),this.setupCloseListener()}setupScrollListener(){this.observer=new IntersectionObserver((t=>{t.forEach((t=>{t.isIntersecting&&!this.isLoading&&this.hasMoreItems&&this.loadMoreProducts()}))}),{root:null,rootMargin:"100px",threshold:0}),this.observer.observe(this.loadingEl)}setupCloseListener(){(0,n.$dqs)(".tt-window-close",this.wrapper).onclick=()=>{this.closeSelector()}}closeSelector(){this.wrapper.style.display="none",this.wrapper.parentNode.style.display="none",document.body.classList.remove("trustoo-open")}setupSearchListener(){this.searchInput.addEventListener("input",(0,n.debounce)((async t=>{this.searchTerm=t.target.value.toLowerCase().trim(),this.resetList(),await this.renderProducts(!0),this.observer.observe(this.loadingEl)}),400))}resetList(){this.observer&&this.observer.disconnect(),this.container.innerHTML="",this.page=1,this.hasMoreItems=!0}filterProducts(){this.searchTerm?this.displayedProducts=this.allProducts.filter((t=>t.title.toLowerCase().includes(this.searchTerm))):this.displayedProducts=[...this.allProducts]}getCurrentPageProducts(){return y.zG.getProducts(this.page,this.searchTerm)}async renderProducts(){const t=await this.getCurrentPageProducts();if(this.isLoading=!1,t[0])return;const e=t[1];this.searchTerm||1!==this.page||(this.productCount=e.page.count);const{cur_page:i,total_page:s}=e.page,n=e.list;if(this.totalPage=s,0===n.length&&1===this.page)return 0!==this.productCount&&this.renderEmptyState(),void this.hideLoading();n.forEach(((t,e)=>{const i=this.createProductElement(t,e);this.container.appendChild(i)})),i>=s?(this.hasMoreItems=!1,this.hideLoading()):this.showLoading()}createProductElement(t){const e=document.createElement("div");e.className="tt-product-item",e.dataset.id=t.id,e.dataset.id=t.id;const i=document.createElement("img");i.className="tt-product-image",i.src=t.image_src,i.alt=t.title,i.loading="lazy";const n=document.createElement("div");n.className="tt-product-details";const o=document.createElement("div");return o.className="tt-product-title",o.textContent=t.title,n.appendChild(o),e.appendChild(i),e.appendChild(n),e.addEventListener("click",(()=>{this.handleProductClick(t);const e=u.A.write.container;1===s.A.writeForm?(0,m._x)("reviews"):2===s.A.writeForm&&((0,_.Rh)(),e.parentNode.style.display="block"),e.style.display="block",this.wrapper.style.display="none"})),e}renderEmptyState(){const t=document.createElement("div");t.className="tt-empty",t.textContent=s.A.lang.search_not_prod,this.container.appendChild(t)}loadMoreProducts(){!this.isLoading&&this.hasMoreItems&&(this.isLoading=!0,this.showLoading(),this.page++,this.renderProducts())}handleProductClick(t){s.A.writeTo.productId=t.id,s.A.writeTo.productName=t.title,s.A.writeTo.prodImageUrl=t.image_src}showLoading(){this.loadingEl.style.display="flex"}hideLoading(){this.loadingEl.style.display="none"}}const x=function(){if(b)b.wrapper.style.display="block";else{let t=s.A.lang.all_in_one_from;const e=2;s.A.writeForm===e&&(t=s.A.lang.separate_review_form);const i=(0,n.$dqs)("#trustoo-mask"),{logo_src:o,logo_alignment:r,logo_size:a}=s.A.writeReviewSettings,l=o?``:"";i.insertAdjacentHTML("beforeend",`
\n\t\t\t\t
\n\t\t\t\t\t\t\t${l}\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
${t.select_product_title}
\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t
`),b=new $,b.init()}};async function R(){const{revIdBase:t,isWdoRevOpen:e}=s.A;let i,o;const d=function(){var t="";const{revIdBase:e,isWdoRevOpen:i}=s.A,{nextRevDesc:n}=a.A;let o="",r="",l="";["ar","he"].includes(Review.lang)&&(l=" trustoo-rtl");l+=" pending",t=`
\n
`;let d="";n&&(d=`
${n}
`);var c=`
${"shopReviews"===s.A.showType?'
':'
'}\n
`;const p=i?"":"not-wdo-rev",u=s.A.isMixReview?"all-reviews":"",v=s.A.productId?`data-product-id="${s.A.productId}"`:"",g=`
\n
\n ${t+c+d}
\n
`;return g}();if(E(d),e){let e=(0,n.$dqs)(`#vstar-window-review #${t}reviews`),r=(0,n.$dqs)("#reviews-body",e);i=e,o=r,Object.assign(s.A,{wdoRevDom:e,wdoRevBody:r})}else i=(0,n.$dqs)(`#${t}reviews`),o=(0,n.$dqs)("#reviews-body"),Object.assign(s.A,{reviewsDom:i,reviewsBody:o});i.setAttribute("review_sort_by",s.A.userSetting.review_sort_by);const p=1===s.A.userSetting.layout?"list":"gird";i.setAttribute("layout",p),e||s.A.reviewsDom&&j();let u=parseInt(window.getComputedStyle(i).width);s.A.isGrid&&(s.A.reviewsWidth=u),(0,r.aQ)(3,1);const v=e?"trustoo_all_reviews":"trustoo_reviews";e&&(0,n.gsSession)("set",v,[]),k(i,o),P(i),await(0,c.bC)(),g(),s.A.pageInfo.current=e?"popupReviews":"reviews",(0,f.IV)();const A=(0,n.$dqs)(".head-sort:first-child",i);A&&A.parentNode.setAttribute("only-sort",!0),L(i),T(),e?(0,l.my)():O(),s.A.isFirstPageRender&&(!function(){const t=(0,n.$dqs)("#trustoo-block-style");t&&(t.media="all");s.A.firstPageShow=!0,s.A.isWdoRevOpen&&(s.A.isWdoRevFirstPageRendered=!0),"undefined"!=typeof trustooAfterExecute&&trustooAfterExecute(s.A,a.A)}(),s.A.isFirstPageRender=!1)}function S(){const{isMixReview:t,isWdoRevOpen:e}=s.A,i=e?s.A.wdoRevDom:s.A.reviewsDom,o=(0,n.$dqs)(".head-button.tt-write-reviews,.noreviews-button.tt-write-reviews",i);if(o&&o.addEventListener("click",(()=>{I(s.A.productId&&!s.A.isWdoRevOpen?"normal":s.A.writeTo.type)})),1===s.A.userSetting.is_qa_active&&!e&&!t){(0,n.$dqs)(".head-button.tt-write-qa,.noreviews-button.tt-write-qa",i).addEventListener("click",(function(){D(),(0,m._x)("QA")}))}(0,n.$dqsa)(".tt-tab",i).forEach((t=>{t.onclick=function(){const o=s.A.userSetting.review_pagination_type,r=u.A[s.A.reviewsKey];s.A.pager&&!e&&(s.A.pager.el.style.display="none"),1!==o||e||s.A.isRevPage||function(){const t=(s.A.isWdoRevOpen?s.A.popupPageInfo:s.A.pageInfo)[s.A.showType];if(t&&s.A.pager){const e=s.A.pager.el.querySelectorAll(".page-control-item");t.pageNumbers=Array.from(e).map((t=>t.textContent)),t.activeIndex=s.A.pager.activeIndex}}(),(0,n.$dqs)(".tt-tab.active",i).classList.remove("active"),t.classList.add("active");const a=t.getAttribute("index");let l="reviews";if(s.A.showType="reviews","0"===a)r.curBody=r.normalReviews,(0,f.IV)();else if("1"===a){const t=(0,n.$dqs)(".tt-qa-list",i);s.A.showType="QA",l="QA",t?(0,f.IV)():(s.A.pageInfo.QA={curPage:1,count:0},(0,w.m)())}else if("2"===a){const t=s.A.isWdoRevOpen?s.A.popupPageInfo:s.A.pageInfo;s.A.showType="shopReviews",l="shopReviews";const o=r.shopReviews;if(o)(0,f.IV)(),r.curBody=o;else{const o=e?s.A.wdoRevBody:s.A.reviewsBody;if(0===s.A.userSetting.store_reviews_count)t.shopReviews={total:0},(0,f.IV)(),o.insertAdjacentHTML("beforeend",`
\n\t\t\t\t\t\t\t\t
${(0,n.getTotalStarString)(0,20)}
\n\t\t\t\t\t\t\t\t
${s.A.lang.no_reviews}
`);else{o.insertAdjacentHTML("beforeend",'
');const e=s.A.isWdoRevOpen?"trustoo_popup_shop_reviews":"trustoo_shop_reviews";if((0,n.gsSession)("set",e,[]),0!==s.A.userSetting.store_reviews_count){const e=(s.A.popupPageInfo.shopReviews||s.A.pageInfo.shopReviews)?.total||0;t.shopReviews={curPage:1,total:e,count:0},(0,c.bC)().then((()=>{(0,f.IV)()}))}}i.dataset.shopReviewsCount=s.A.userSetting.store_reviews_count,r.shopReviews=(0,n.$dqs)(".tt-shop-reviews",i),r.curBody=r.shopReviews}}i.setAttribute("show-type",l)}})),i.addEventListener("click",(t=>{"tt-no-context-reviews"===t.target.id&&I(s.A.productId&&!s.A.isWdoRevOpen?"normal":s.A.writeTo.type)}))}function T(){const{isWdoRevOpen:t,hasPyRating:e}=s.A,i=t?s.A.wdoRevBody:s.A.reviewsBody;(0,n.$dqs)("#reviews-head .head-sort,.tt-reviews-sort")&&function(){const t=s.A.isWdoRevOpen?s.A.wdoRevDom:s.A.reviewsDom,e=(0,n.$dqs)(".head-sort,.tt-reviews-sort",t),i=(0,n.$dqs)(".sort-popup",t),o=(0,n.$dqs)(".sort-active",t);window.addEventListener("click",(function(t){e.contains(t.target)||(i.style.display="none")})),(0,n.$dqsa)(".sort-item",t).forEach((t=>t.onclick=function(){const t=s.A.isWdoRevOpen?s.A.wdoRevDom:s.A.reviewsDom;if(!this.classList.contains("active")){(0,n.$dqs)(".sort-item.active",t).classList.remove("active"),this.classList.add("active"),o.style.top=this.offsetTop+3+"px";const e=this.getAttribute("sort-value");t.setAttribute("review_sort_by",e),1!==s.A.userSetting.review_pagination_type||s.A.isWdoRevOpen||(s.A.reviewsList=[],s.A.pageRecord=[]),i.style.display="none";const a=(0,n.$dqs)(".tt-sort-content>span",t);a&&(a.textContent=this.textContent),(0,r.aQ)(3,1),t.setAttribute("reviews-page-no",1),(0,c.bC)(!0)}})),(0,n.$dqs)(".sort-icon,.tt-sort-content",t).onclick=function(){let t=i.style.display;i.style.display="block"===t?"none":"block"}}(),i.addEventListener("click",(function(t){let e=t.target;"path"===e.tagName&&(e=e.closest("svg"));let i=e.classList;i.contains("resource-item")&&(e=(0,n.$dqs)("img",e));const o=t.target.closest(".resource-item");if(o){const t=(0,n.$dqs)("img",o);let e=parseInt(t.getAttribute("no"));const i=parseInt(t.getAttribute("index"));let a;s.A.isGrid&&s.A.isMobile&&(s.A.globalStyle.textContent+="#trustoo-review-detail .review-row-one .reviews-date {display: none;}"),a=1!==s.A.userSetting.review_pagination_type||s.A.isWdoRevOpen||s.A.isMixReview&&!s.A.isHomePage&&!s.A.isCollPage?parseInt(t.dataset.page):(0,r.aQ)(),e=t.dataset.reviewIndex,s.A.revDetailInfo.page=a,s.A.revDetailInfo.no=e,s.A.revDetailInfo.imageIndex=i;let l="trustoo_reviews";s.A.isWdoRevOpen?l="shopReviews"===s.A.showType?"trustoo_popup_shop_reviews":"trustoo_all_reviews":"shopReviews"===s.A.showType&&(l="trustoo_shop_reviews");const d=(0,n.gsSession)("get",l)[a-1][e];TTRevDetail.showTTReviewDetail(s.A,"",d,l)}else i.contains("display-text")?(0,c.fn)(e):(i.contains("tt-helpful")||i.contains("tt-unhelpful"))&&(0,c.nG)(e,i)})),e&&(0,d.B4)(),s.A.iObserver||(s.A.iObserver=new IntersectionObserver((t=>{for(const e of t)if(e.isIntersecting){if(!s.A.allRevLoadLock&&(s.A.isRevPage||s.A.isWdoRevOpen)){const t=e.target.parentNode,i=(s.A.isWdoRevOpen?s.A.popupPageInfo:s.A.pageInfo)[s.A.showType].total;(0,r.aQ)()${s.A.lang.store_review.tab_name}(${s.A.userSetting.store_reviews_count})`;if(o||r){let t="";"shopReviews"===s.A.showType?t+=l:t+=`\n\t\t\t${s.A.lang.reviews.charAt(0).toUpperCase()+s.A.lang.reviews.slice(1)}\n\t\t\t\t(${a})\n\t\t\t${r?l:""}\n\t\t\t${o?`${s.A.lang.question_and_answer.title}(${s.A.ratingData.total_qa_count})`:""}\n\t\t`,i+=`
${t}
`;const e=H();n=`
\n\t\t\t\t\t
${e.text}${h.A.sort(s.A.userSetting.font_color)}
\n\t\t\t\t\t${e.html}\n\t\t\t\t
`}i&&(t.dataset.tabs="1",e.insertAdjacentHTML("beforebegin",i+n)),o&&t.classList.add("qa")}function q(){const{lang:t}=s.A;s.A.isNullRev=!0,s.A.firstPageShow=!0;let e="";["ar","he"].includes(Review.lang)&&(e=" trustoo-rtl");let i="",o="";if(2!==s.A.userSetting.is_show_review_button||s.A.isMixReview){let e=t.write_reviews;(s.A.isMixReview||s.A.isWdoRevOpen)&&"shop"===s.A.writeTo.type&&(e=t.store_review.write_btn_text),i=``}1!==s.A.userSetting.is_qa_active||s.A.isWdoRevOpen||s.A.isMixReview||(o=``);const r=(0,n.getTotalStarString)(0);E(`
\n\t\t\t
\n\t\t\t\t
${t.customer_reviews}
\n\t\t\t\t
${i}${o}
\n\t\t\t
\n
\n
\n
\n ${r}\n
\n
\n

${t.no_reviews}

\n
\n
\n
`);let a=null;const d=s.A.isWdoRevOpen?"wdoRevBody":"reviewsBody",c=s.A.isWdoRevOpen?"wdoRevDom":"reviewsDom";s.A.isWdoRevOpen?((0,l.my)(),a=(0,n.$dqs)("#vstar-window-review #vstar-noreviews")):a=(0,n.$dqs)("#vstar-noreviews");const p=(0,n.$dqs)("#reviews-body",a),v=(0,n.$dqs)(".noreviews-center",a);s.A[c]=a,s.A[d]=p,a.setAttribute("review_sort_by",s.A.userSetting.review_sort_by),k(a,v),P(a),u.A[s.A.reviewsKey].writeBtn=(0,n.$dqs)(".tt-write-reviews",a),(0,f.IV)(),L(a),T(),j()}function E(t){const e=s.A.isWdoRevOpen?"#vstar-window-review #reviews-wrapper,#vstar-window-review #noreviews-wrapper":"#reviews-wrapper,#noreviews-wrapper";if((0,n.$dqsa)(e).forEach((t=>t.remove())),s.A.isWdoRevOpen)s.A.isWdoRevExist||(s.A.isWdoRevExist=!0,(0,n.$dqs)("#vstar-window-review").insertAdjacentHTML("afterbegin",t));else{const e=s.A.revTar.dataset.trustooInsertPosition,i=(0,n.$dqs)("#trustoo-widget-wrapper");i?i.insertAdjacentHTML("afterbegin",t):s.A.revTar&&s.A.revTar.insertAdjacentHTML(e,`
${t}
`),s.A.revTar.dataset.trustooIsTabReview&&!s.A.isNullRev&&function(){const t=(0,n.$dqs)("#vstar-reviews");if(t&&ResizeObserver){const e=new ResizeObserver((t=>{for(let i of t){const{width:t,height:n}=i.contentRect;t&&n&&(O(),s.A.isGrid&&((0,o.dn)(),e.disconnect()))}}));e.observe(t)}}()}}function L(t){S(),s.A.isGrid&&s.A.layoutReviewCount>15?setTimeout((()=>{t.classList.remove("pending")}),100):t.classList.remove("pending"),s.A.isMobile||window.addEventListener("resize",(function(){s.A.isGrid&&W(),z()})),s.A.isWdoRevOpen||O(),(s.A.isWdoRevOpen||s.A.isRevPage)&&t.insertAdjacentHTML("beforeend",''),s.A.isWdoRevOpen&&document.dispatchEvent(new CustomEvent("TTPopupReviewsEmbedded",{detail:{v:s.A,node:t},bubbles:!0,cancelable:!0}))}function P(t){const e=u.A[s.A.reviewsKey];e.normalReviews=(0,n.$dqs)(".tt-review-list",t),"shopReviews"===s.A.showType?e.curBody=(0,n.$dqs)(".tt-shop-reviews",t):e.curBody=e.normalReviews,e.reviewsTab=(0,n.$dqs)(".tt-number[data-product-reviews]",t),e.shopTab=(0,n.$dqs)(".tt-number[data-shop-reviews]",t)}function I(t){const e=u.A.write.container;e.dataset.reviewType=t;M()||(document.body.classList.add("trustoo-open"),D(),u.A.mask.style.display="flex","product"===t?x():(1===s.A.writeForm?(0,m._x)("reviews"):2===s.A.writeForm&&((0,_.nn)(),e.parentNode.style.display="block"),e.style.display="block"),e.setAttribute("write-review",!0))}function M(){const t=u.A.write.container,e=window.TrustooReviews.customer;if(e){const i=(0,n.$dqs)('[input-type="author"],.slide-name',t),o=(0,n.$dqs)('[input-type="author_email"],.slide-email',t);if(3===s.A.writeRestriction&&e.orderCount<=0)return(0,n.setToast)(a.A.writeReviewTip||"Please purchase the product first"),!0;i&&o&&(i.value=e.name,o.value=e.email,1===s.A.writeForm?(0,m.PT)():2===s.A.writeForm&&(0,_.yS)())}else if(1!==s.A.writeRestriction)return location.href=location.origin+"/account/login",!0;return!1}function D(){if(s.A.isMobile){let t=window.location.hash;t.includes("tt-write-reviews-open")||(window.location.hash=t?t+"&tt-write-reviews-open":"tt-write-reviews-open"),window.addEventListener("hashchange",B)}}function B(){-1===window.location.hash.indexOf("tt-write-reviews-open")&&(1===s.A.writeForm?(0,m.Do)():2===s.A.writeForm&&(0,_.oD)(),window.removeEventListener("hashchange",B))}function O(){const t=s.A.reviewsDom;s.A.revTarWid=parseInt(getComputedStyle(s.A.revTar).width);let e="block";if(s.A.revTarWid<1e3&&!s.A.isMobile?s.A.reviewsDom.style.padding="0 20px":s.A.reviewsDom.style.padding="",s.A.revTarWid<=738&&!s.A.isMobile){if(s.A.isNullRev){(0,n.$dqs)("#tt-first-row",t).style.cssText="display: flex;flex-direction: column;align-items: center;gap: 20px;"}else if(1!==s.A.userSetting.is_hide_ratings){const i=(0,n.$dqs)(".tt-head-left",t),s=(0,n.$dqs)(".tt-head-right",t),o=(0,n.$dqs)(".tt-head-content",t),r=(0,n.$dqs)(".tt-head-title",t);i.style.cssText="flex-direction: column;gap: 32px;",o.style.cssText="justify-content: center;",r.style.cssText="margin: 0 auto;",s.style.cssText="padding-bottom: 10px;",e="none"}s.A.reviewsDom.style.padding="0 8px"}else{const e=[];if(s.A.isNullRev){const i=(0,n.$dqs)("#tt-first-row",t);e.push(i)}else{const i=(0,n.$dqs)(".tt-head-left",t),s=(0,n.$dqs)(".tt-head-right",t),o=(0,n.$dqs)(".tt-head-content",t),r=(0,n.$dqs)(".tt-head-title",t);e.push(i,s,o,r)}e.forEach((t=>{t&&(t.style.cssText="")}))}s.A.isNullRev||(0,n.$dqsa)(".tt-dividing",t).forEach((t=>{t.style.display=e}))}function H(){const t=s.A.lang;let e="",i="",n="";const o=["comprehensive-descending","image-descending","commented-at-descending","rating-descending","rating-ascending"],r=[4,0,1,2,3],a=o.indexOf(s.A.userSetting.review_sort_by);o.forEach(((s,o)=>{i="",o===a&&(i="active",n=t.sort_by_options[r[o]]),e+=`
  • ${t.sort_by_options[r[o]]}
  • `}));const l=35*a+54+"px";return{text:n,html:`
    \n\t
      \n\t\t
    • ${t.sort_by}
    • \n\t\t${e}\n\t
    \n\t
    ${h.A.hook()}\n\t
    \n
    `}}function N(){!s.A.RevIntersection&&s.A.isProPage&&(s.A.RevIntersection=new IntersectionObserver((t=>{for(const e of t)e.isIntersecting&&((0,n.processRecordedData)("reviews_view"),s.A.RevIntersection.disconnect())}),{})),s.A.RevIntersection.observe(s.A.reviewsDom)}function j(){let t="";switch(Review.theme.theme_store_id){case 887:case 1567:case 1356:case 1363:case 1368:case 1431:case 1434:case 1500:case 1499:case 796:case 775:case 829:t="page-width";break;case 730:case 679:case 380:t="wrapper";break;case 578:t="site-wrapper";break;default:if("warehouse"===Review.theme.name){s.A.reviewsDom.parentNode.classList.add("container");(0,n.$dqs)(".card--collapsed.card--sticky.card")&&(s.A.reviewsDom.classList.add("card"),s.A.globalStyle.textContent+="#vstar-reviews.card{border:none !important}")}}""!=t&&s.A.reviewsDom.classList.add(t)}const W=(0,n.debounce)((()=>{s.A.isRevOpen&&!s.A.isNullRev&&(0,o.dn)()}),200),z=(0,n.debounce)((async()=>{s.A.isWdoRevOpen||O()}),100)},659:t=>{var e={};t.exports=function(t,i){var s=function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}(t);if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(i)}},743:(t,e,i)=>{i.d(e,{A:()=>s});const s={normal:{curBody:null,normalReviews:null,shopReviews:null},popup:{curBody:null,normalReviews:null,shopReviews:null},write:{container:null,allInOne:null,image:null,prodName:null,title:null,contentLabel:null,submit:null,attributeWrapper:null,normalProdAttr:null,selectedProdAttr:null},customReviewsBlock:null,summaryBlock:null,mask:null}},778:(t,e,i)=>{i.d(e,{B4:()=>c,bl:()=>d,rU:()=>l});var s=i(571),n=i(957),o=i(986),r=i(134),a=i(638);async function l(){const{isProPage:t,isHomePage:e}=s.A,{customProTarSel:i}=r.A;let l;l=function(){let t={},e=Review.theme.theme_store_id;var i=".product-single__title",s=".product__title>h1",n='.grid-item>h1.h2[itemprop="name"]',o='.grid__item>h1.h2[itemprop="name"]';let r,a=[i,s,n,o,".product-details .text-block>h1"].join(",");switch(e){case 730:case 578:case 775:case 796:case 380:r=i;break;case 887:case 829:case 1356:case 1363:case 1368:r=s;break;case 679:r=n;break;case 766:r=o;break;default:t.isAll=!0,r=a}t.main=r,t.mainAll=a;var l=".product__title .product__title--template",d=".ProductMeta__Title",c=".product_title,h1.product__title",p=".tt-product-single-info .tt-title",u=".product-block-list__item .product-meta__title",v=".product-meta>.product-meta__title",g=".pr_title",A=".prd-block_title",w=".product-detail__title",h=".productInfo h1",m=".product_name",_=".product-name",f=".product-description-header",y=".layout-column-half-right>.title",b=".product-page-info__title>h1",C="h1.gt_heading",$="#popup_cart_title",x=".apb_product_detail_information_title",R=".product-area__details__title",S=".product-info>h3.title30",T=".gt_product-content>h2",k=".prod__title",q=".productInfo>h2",E=".product__section-title>h1",L=".page-header h1.title",P=".title-detail",I=".title>h1",M=".title-row>h1.title",D="h2.product-page--heading",B=".section-header__title.product-titre",O=".block.type-title",H="h2.product-details-product-title",N="h1.product-info__title",j=".product-detail-part>h2[itemprop='name']",W="h2.single_product__title",z="#product-description h1.h2",F="h1.product-item-caption-title.-product-page",U="h1.product-title",G="h2[data-attribute='productTitle']",V=".productView-title",Z="h1.product__section-title",Q="h1.product-single__title-text",J='h1[itemprop="name"]',K=".proBoxInfo>h1",Y="h1.title-primary",X="[data-product-description-container]>h2.h1",tt=".col-md-12>.title-sale",et=".shg-product-title-component",it=".t4s-product__title",st=".bls__product-title";let nt=[];nt.push(l,d,c,p,u,g,A,h,m,f,y,b,C,$,x,R,S,T,w,k,v,q,_,E);let ot=[L,P,I,M,D,B,O,H,N,j,W,z,F,U,G,V].join(","),rt=[Z,Q,J,K,Y,X,tt,et,it,st].join(","),at=nt.join(",");return t.other1=ot,t.other2=at,t.other3=rt,t}();let d,c=[],p=!1,u=[];s.A.isProPage&&(u=(0,o.$dqsa)(".custom-vstar-rating-widget,.pagefly-star-rating-sealapp,.ecom-star-rating-sealapp"),0!==u.length&&(c=u,p=!0)),i&&!p&&(d=(0,o.$dqs)(i),d&&(p=!0,Review.proType="custom",Review.proSel=i,Review.proTarget=d),e&&d)||(p||(c=(0,o.$dqsa)(l.main),0!==c.length||l.isAll||(c=(0,o.$dqsa)(l.mainAll)),0!==c.length&&(p=!0),Review.proType="main",Review.proSel=l.main),p||(c=(0,o.$dqsa)(l.other1),Review.proType="other1",Review.proSel="`"+l.other1+"`",0===c.length&&(c=(0,o.$dqsa)(l.other2),Review.proType="other2",Review.proSel="`"+l.other2+"`"),0===c.length&&(c=(0,o.$dqsa)(l.other3),Review.proType="other3",Review.proSel="`"+l.other3+"`")),d=Array.from(c).find((t=>null!==t.offsetParent)),d?(u.length&&(d.dataset.trustooRatingBlock=1),Review.proTarget=d,s.A.globalStyle.textContent+=`#vstar-reviews .tt-head-title,#vstar-noreviews .noreviews-title{font-family:${getComputedStyle(d).fontFamily}}`):t&&await n.zG.sendErrorMsg(3,`产品页评价嵌入失败,店铺地址为:${window.location.href}`).then((t=>{if(t[1]){const e=(0,a.starEmbeddedAdaptation)(5,t[1].selector);e&&(Review.proSel=e,d=(0,o.$dqs)(e))}})))}function d(){const t=s.A.shop_id;if(1===r.A.get_move_review_info.is_tab_review&&!s.A.isWdoRevOpen)if(61646700724===t&&129829568692===s.A.themeId){activeCls="t4s-active";let t=(0,o.$dqs)(`.panel.sp-tab.${activeCls},.t4s-tab-wrapper>.t4s-tab-content.${activeCls}`);t?t.classList.remove(activeCls):t=(0,o.$dqs)(".t4s-tab-wrapper:nth-child(2)>.t4s-tab-content");const e=(0,o.$dqs)("#tab_pr_reivew,.t4s-tab-wrapper:nth-child(4)>.t4s-tab-content");e.classList.add(activeCls),s.A.isMobile?((0,o.$dqs)(".sp-tab-content",t).style.display="none",(0,o.$dqs)("#tab_pr_reivew .sp-tab-content").style.cssText=""):((0,o.$dqs)(".tab_title_block.active,.t4s-d-inline-flex>a.t4s-active").classList.remove(activeCls),(0,o.$dqsa)(".tab_title_block,.t4s-tab-wrapper")[1].classList.add(activeCls),t.style.display="none",e.style.display="block")}else if(67745513752===t&&137959506200===s.A.themeId){const t=(0,o.$dqs)('[data-id="1670265256519"] .module'),e=(0,o.$dqs)("[data-control].opend",t);null!==e&&(e.classList.remove("opend"),e.nextElementSibling.style.display="none");const i=(0,o.$dqs)('[data-control][data-index="5"]',t);null!==i&&(i&&i.classList.add("opend"),i.nextElementSibling.style.display="block")}else if(69381783840===t&&144923328800===s.A.themeId){const t=(0,o.$dqsa)(".product-simple-tab .tab-pane"),e=(0,o.$dqsa)(".nav-item .nav-link");t[0].className="tab-pane",t[2].className="tab-pane active show",e[0].className="nav-link",e[1].className="nav-link active show"}}function c(){if(s.A.isProPage){const t=(0,o.$dqs)(`.pagefly-star-rating-sealapp[product-id="${s.A.productId}"]`);t&&(t.style.cursor="pointer",t.onclick=function(){s.A.reviewsDom&&(0,o.scrollTo)(s.A.reviewsDom)})}}},825:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(i){!function(t,e,i){var s="";i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var n=void 0!==i.layer;n&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,n&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}");var o=i.sourceMap;o&&"undefined"!=typeof btoa&&(s+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),e.styleTagTransform(s,t,e.options)}(e,t,i)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},868:t=>{t.exports=function(t,e){Object.keys(e).forEach((function(i){t.setAttribute(i,e[i])}))}},877:(t,e,i)=>{i.d(e,{N:()=>s});class s{init(){return this.emitCartChanges().then((()=>{this.observeCartChanges()}))}async fetchCart(){return(await fetch("/cart.js")).json()}storeCartToken(t){try{sessionStorage.setItem("ttCartToken",t)}catch(t){}}storedCartToken(){return sessionStorage.getItem("ttCartToken")||""}async emitCartChanges(){const t=await this.fetchCart(),e=new CustomEvent("cart_changed",{detail:{token:t.token}});window.dispatchEvent(e),this.storeCartToken(t.token)}observeCartChanges(){new PerformanceObserver((t=>{t.getEntries().forEach((t=>{const e=["xmlhttprequest","fetch"].includes(t.initiatorType),i=/\/cart\//.test(t.name);e&&i&&this.emitCartChanges()}))})).observe({entryTypes:["resource"]})}}},957:(t,e,i)=>{i.d(e,{nj:()=>c,zG:()=>d});var s=i(571),n=i(134),o=i(405),r=i(986);function a(t,e,i,n=!1,o=!1,r=!1){return l(t,e,i,n,o,r,s.A.apiDomain)}function l(t,e,i,n=!1,o=!1,r=!1,a=s.A.baseUrl){return new Promise(((l,d)=>{!function(t,e={},i="GET",n,o=!1,r,a,l,d){let c=new XMLHttpRequest;const p=`https://${d}/api/v1/`;let u="";u=o||a?t:r?s.A.uploadImgInfo.host:p+t;let v="";"object"!=typeof e||r||(v=Object.keys(e).reduce(((t,i)=>t+"&"+i+"="+e[i]),"")),"POST"==i?v=v&&!r?v.slice(1):e:"GET"==i&&v&&(v=v.replace("&","?"),u+=v),c.open(i,u,!0),v&&"POST"==i?c.send(v):c.send(),c.onreadystatechange=()=>{if(4==c.readyState){let t=c.responseText;200==c.status||203==c.status?n&&n(t):l&&l({responseText:t,statusText:c.statusText})}}}(t,e,i,l,n,o,r,d,a)})).then((t=>{if(o?t={name:e.get("name"),key:e.get("key")}:n||(t=JSON.parse(t)),!n&&!o){const e=t.code;if(-1===e)throw t;if(-2===e)throw t;t=t.data}return[null,t]})).catch((t=>{let i=[{error:t.message,params:e,code:t.code}];return o&&i.push({name:e.get("name")}),i}))}const d={getUserSetting:()=>l("users/get_reviews_settings",{shop_id:Review.shop_id}),getInstallStatus(){const t={shop_id:Review.shop_id};return s.A.productId&&(t.product_id=s.A.productId),"undefined"==typeof vstar_review_settings&&(t.no_metafield=1),l("reviews/get_shop_install_status",t)},getSvg:t=>l("https://cdn.vstar.app/static/images/svg/customer/"+t+".svg?55555",{},"GET",!0),getIcons:()=>l("https://cdn.vstar.app/static/customer/icons.json",{},"GET",!0),getUserNeed:()=>l("reviews/get_custom_info",{shop_id:Review.shop_id}),getLang:()=>l("reviews/get_customer_self_define_lang",{shop_id:Review.shop_id,lang:Review.lang}),getProductRating(t){let e={shop_id:Review.shop_id},i=s.A.productId;return i?e.product_id=i:t&&(e.product_handle=t),l("reviews/get_product_rating",e)},getRating(t){const e={shop_id:Review.shop_id},i=s.A.productId;return i&&!s.A.isWdoRevOpen?e.product_id=i:e.is_all_product=1,t&&(e.product_handle=t),l("reviews/get_rating",e)},getCollRating(t,e){let i={shop_id:Review.shop_id};return t?i.product_handle=t:i.product_id=e,l("reviews/get_products_rating",i)},getProRevList(t,e,i,r,a,d,c,p){i||0===i||(i=(0,o.aQ)()),r||(r=s.A.layoutReviewCount);let u=r;!s.A.isWdoRevOpen&&!s.A.isRevPage||a||(u=15);let v={shop_id:Review.shop_id,limit:u};i&&(v.page=i);const{is_translate_review:g,auto_switch_language:A,is_show_empty_review:w}=s.A.keySettings;void 0!==p?v.no_empty=p?1:2:1!==w&&(v.no_empty=1);const h="shopReviews"===s.A.showType||"popupShopReviews"===s.A.showType;return h?(v.is_store_review=1,v.no_empty=2):s.A.isWdoRevOpen?(v.scene=2,n.A.isPopupProdReviews&&s.A.productId?v.product_id=s.A.productId:v.is_show_all=1):s.A.isMixReview?(v.scene=1,v.is_show_all=1):v.product_id=s.A.productId,e&&!h&&(v.rating_filter=e),a?v.is_buyers_show=a:s.A.allRevLoadLock=!0,(d||n.A.isResourceReviews)&&(v.has_resource=1,v.no_empty=2),c&&(v.review_id=c),v.sort_by=t,1!==g&&1!==A||(v.lang=Review.lang),v.t=s.A.revReqParam,l("reviews/get_product_reviews",v)},getReviews({productId:t,sortType:e="comprehensive-descending",ratingFilter:i,page:r="1",limit:a=15,isBuyersShow:d,hasResource:c,reviewId:p,noEmpty:u,NotStoreReview:v}){r||0===r||(r=(0,o.aQ)()),a||(a=s.A.layoutReviewCount);let g=a;!s.A.isWdoRevOpen&&!s.A.isRevPage||d||(g=15);let A={shop_id:Review.shop_id,limit:g};r&&(A.page=r);const{is_translate_review:w,auto_switch_language:h,is_show_empty_review:m}=s.A.keySettings;void 0!==u?A.no_empty=u?1:2:1!==m&&(A.no_empty=1);const _=("shopReviews"===s.A.showType||"popupShopReviews"===s.A.showType)&&!v;return _?(A.is_store_review=1,A.no_empty=2):s.A.isWdoRevOpen?(A.scene=2,n.A.isPopupProdReviews&&s.A.productId?A.product_id=s.A.productId:A.is_show_all=1):s.A.isMixReview?(A.scene=1,A.is_show_all=1):A.product_id=t||s.A.productId,i&&!_&&(A.rating_filter=i),d?A.is_buyers_show=d:s.A.allRevLoadLock=!0,(c||n.A.isResourceReviews)&&(A.has_resource=1,A.no_empty=2),p&&(A.review_id=p),A.sort_by=e,1!==w&&1!==h||(A.lang=Review.lang),A.t=s.A.revReqParam,l("reviews/get_product_reviews",A)},getProductInfo(t){let e={shop_id:Review.shop_id};return t?e.product_title=t:e.product_id=s.A.productId,l("products/get_shopify_product_info",e)},getProducts(t,e=""){let i=!0,o=location.origin+"/apps/trustoo/api/v1/reviews/get_product_list";(location.origin.includes("http://localhost")||n.A.useOriginalRequest)&&(i=!1,o="reviews/get_product_list");const r={shop_id:s.A.shop_id,page:t};return e&&(r.title=e),l(o,r,"GET",!1,!1,i)},recordInfo:t=>l(location.origin+"/apps/trustoo/api/v1/reviews/collect",t,"GET",!0),getOnlyOneProduct:()=>l("products/get_product_only_one",{shop_id:Review.shop_id}),getWriteRevSetting:()=>l("reviews/get_write_review_setting",{shop_id:Review.shop_id}),getAttribute:()=>l("reviews/get_product_attribute_collections",{shop_id:Review.shop_id,product_id:s.A.writeTo.productId||s.A.productId}),getAttributeStatistics:()=>l("review/get_attribute_statistics",{shop_id:Review.shop_id,product_id:s.A.productId}),getPolicyToken:()=>l("review/get_policy_token",{shop_id:Review.shop_id}),uploadImg(t){const e=s.A.uploadImgInfo;let i=(0,r.get_suffix)(t.name),n=new FormData;return n.append("name",t.name),n.append("key",e.dir+i),n.append("policy",e.policy),n.append("OSSAccessKeyId",e.accessid),n.append("success_action_status","200"),n.append("callback",e.callback),n.append("signature",e.signature),n.append("file",t),72898347282===s.A.shop_id&&(n=n.fd),l("",n,"POST",!1,!0)},getUploadVideoUrl:()=>l("reviews/get_upload_url",{shop_id:Review.shop_id}),uploadVideo(t,e){let i=new FormData;return i.append("file",e),l(t,i,"POST",!0)},uploadReview(t,e,i,o){const{shop_id:r}=s.A,a=s.A.ratingVal;let d=!0,c=location.origin+"/apps/trustoo/api/v1/reviews/add_review_via_shopify";(location.origin.includes("http://localhost")||n.A.useOriginalRequest)&&(d=!1,c="reviews/add"),t.resources=i.map((({url:t,resource_type:e})=>({url:t,resource_type:e})));const p=o?void 0:s.A.writeTo.productId||s.A.productId||void 0;return Object.assign(t,{product_id:p,shop_id:r,rating:a}),l(c,JSON.stringify(t),"POST",!1,!1,d)},getInsList(){const{shop_id:t,insPageSize:e,insCurPage:i}=s.A;return l("reviews/get_instagram_fee_list",{shop_id:t,limit:e,cur_page:i})},getInsSetting(){const{shop_id:t}=s.A;return l("reviews/get_instagram_setting",{shop_id:t})},getAiSummarySettings:()=>a("product/get_customer_review_summary_setting",{shop_id:s.A.shop_id}),getAiSummaryContent(t,e){const i={shop_id:s.A.shop_id,lang:t},n=s.A.productId||e;return n&&(i.product_id=n),a("product/get_customer_review_ai_summary",i)},likeOrDislikeReview(t,e,i){let n="";1===t?n="reviews/like_review":2===t&&(n="reviews/dislike_review");const{shop_id:o}=s.A;return l(n,JSON.stringify({shop_id:o,review_id:i,type:e}),"POST")},getBuyerShowsSettings(){const{shop_id:t}=s.A;return l("reviews/get_buyers_show_settings",{shop_id:t})},sendErrorMsg(t,e){let i={shop_id:Review.shop_id,theme_id:s.A.themeId,type:t,content:e};return l("reviews/warning_feedback",JSON.stringify(i),"POST")},sendImageError(t,e){let i={shop_id:Review.shop_id,review_id:t,media_url:e,feedback_type:1};return a("product/customer_media_feedback",JSON.stringify(i),"POST")}},c={getSetting:()=>l("reviews/get_qa_settings",{shop_id:Review.shop_id}),getList:t=>(Object.assign(t,{shop_id:Review.shop_id,product_id:s.A.productId,page:(0,o.aQ)(),lang:Review.lang}),l("reviews/get_qa_list",t)),addQA:t=>(t.shop_id=Review.shop_id,t.product_id=s.A.productId,l("reviews/add_qa",JSON.stringify(t),"POST")),likeOrDislikeQA(t,e,i){let n="";1===t?n="reviews/like_qa":2===t&&(n="reviews/dislike_qa");const{shop_id:o}=s.A;return l(n,JSON.stringify({shop_id:o,qa_id:i,type:e}),"POST")}};s.A.getRevList=d.getProRevList},986:(t,e,i)=>{i.r(e),i.d(e,{$dqs:()=>R,$dqsa:()=>S,compressImage:()=>m,copyToClipboard:()=>T,dealImage:()=>h,debounce:()=>q,findTrustooTargetElement:()=>c,getMobileSystem:()=>x,getObjectURL:()=>b,getTimeStamp:()=>v,getTotalStarString:()=>p,getWindowWidth:()=>_,get_suffix:()=>D,gsLocal:()=>I,gsSession:()=>P,hexToRgba:()=>g,imgLoad:()=>y,imgLoadLimit:()=>f,isMobile:()=>k,isWebPSupported:()=>B,processRecordedData:()=>u,returnCitySN:()=>M,scrollTo:()=>$,setCopy:()=>E,setDelay:()=>L,setLoading:()=>w,setObserve:()=>C,setToast:()=>A,setWriteReview:()=>d});var s=i(154),n=i(45),o=i(134),r=i(957),a=i(743),l=i(571);async function d(){let t=1;const e=a.A.write;if(!l.A.writePopupEmbedded){l.A.writePopupEmbedded=!0;const i=[];"undefined"==typeof vstar_write_review_settings||l.A.isSettingUpdate?i.push(r.zG.getWriteRevSetting()):i.push([null,vstar_write_review_settings]),l.A.productId?i.push(r.zG.getAttribute()):i.push(Promise.resolve([null,l.A.lang]));let o=!1;0===Object.keys(l.A.lang).length?(o=!0,i.push(r.zG.getLang())):i.push(Promise.resolve([null,l.A.lang]));const[d,c,p]=await Promise.all(i);if(d[0])return;const u=d[1];l.A.writeReviewSettings=u,l.A.productId&&(l.A.attributeConfig=c[1]);let v=p[1];o&&(v=JSON.parse(p[1].lang_json)),l.A.lang=v;const g=u.write_review_form;t=g,l.A.writeRestriction=u.leave_review_method,l.A.writeForm=g,1===g?((0,s.yE)(u),(0,s.Cf)(u)):2===g&&(0,n.P9)(u),1===l.A.userSetting.is_qa_active&&1!==t&&((0,s.yE)(u),(0,s.Cf)(u));const A=R(".trustoo-write-review");if(e.container=A,1===g||1===l.A.userSetting.is_qa_active){const t=R("#trustoo-allinone");e.allInOne=t,e.image=R(".product-image",t),e.prodName=R(".product-right",t),e.title=R(".head-title",t),e.contentLabel=R(".feedback-area>.tt-input-title",t),e.content=R(".big-input",t),e.submit=R(".form-submit",t)}if(1===u.show_review_btn){l.A.writeTo.type=u.write_review_type;const t=a.A[l.A.reviewsKey].writeBtn;"shop"===u.write_review_type&&l.A.isMixReview&&t&&(t.textContent=l.A.lang.store_review.write_btn_text),l.A.globalStyle.textContent+=".trustoo-widget .tt-write-reviews {display: block !important;}"}return d}}function c(){let t=!1;const{isWdoRevOpen:e}=l.A;let i;const s=Array.from(S("#seal-review-widget")).find((t=>t.parentNode.offsetParent));let n="beforebegin";const r=R(".pagefly-review-widget-sealapp"),d=a.A.customReviewsBlock;if(r)i=r,n="beforeEnd";else if(d)i=d,null===d.parentNode.offsetParent&&(t=!0),n="beforeEnd";else if(s)s.parentNode.parentNode.style.padding=0,i=s,n="beforeEnd";else{let e=null,s=o.A.get_move_review_info;Object.keys(s).length&&(e=R(s.selector),n=s.position,t=1===s.is_tab_review);let r=R("#shopify-section-footer"),a=R("main"),l=R("footer"),d=R('.shopify-section[id$="__main"],#shopify-section-product-template');e?i=e:d?(n="afterend",i=d):a?a.contains(l)?i=l:(n="afterend",i=a):r?i=r:l&&(i=l)}i&&(i.dataset.trustooInsertPosition=n,i.dataset.trustooTargetElement=1,!e&&(l.A.revTar=i),l.A.revTarWid=parseInt(window.getComputedStyle(i).width),t&&(i.dataset.trustooIsTabReview=1))}function p(t,e=!1){const{isProPage:i}=l.A,s=l.A.ratingIconSvg;let n="";s||(n=" pending");const o=`
    ${s}
    `,r=`
    ${s}
    `;parseInt(t)||(t=0);for(var a="",d=Math.floor(t),c=0;c\n\t\t
    ${s}
    \n
    \n ${s}\n
    \n `}for(c=0;c<5-d;c++)a+=r;return a}function u(t,e="",i){if(l.A.isProPage&&l.A.ratingData&&0==l.A.ratingData.rating)return;let s="",n=0;if(localStorage.getItem("trustoo_uv")?s=localStorage.getItem("trustoo_uv"):(s=l.A.shop_id+"_"+(new Date).getTime(),localStorage.setItem("trustoo_uv",s),n=1),l.A.isProPage&&(P("set","tt_pv_product_id",l.A.productId),P("set","tt_cart_product_id",l.A.productId)),!l.A.isRecordPV||i&&!l.A.isRecordCart){l.A.isRecordPV=!0;const o={client_id:s,event_category:t};if(["reviews_click","reviews_view"].includes(t)&&(o.unique_visitor=n),l.A.productId&&(o.product_id=l.A.productId),e)o.cart_token=e,l.A.isRecordCart=!0;else if(l.A.cartWatcher){const t=l.A.cartWatcher.storedCartToken().split("?key=")[0];o.cart_token=t}r.zG.recordInfo(o).then((()=>{i&&P("set","tt_cart_product_id",null)}))}}function v(){return(new Date).getTime()}function g(t,e){return 2==e&&(e=1),"rgba("+parseInt("0x"+t.slice(1,3))+","+parseInt("0x"+t.slice(3,5))+","+parseInt("0x"+t.slice(5,7))+","+e+")"}function A(t,e="10%",i="50%"){var s=document.createElement("div");s.className="tt-toast",s.style.cssText=`left:${i};top:${e}`,s.innerHTML=t,document.body.appendChild(s),setTimeout((()=>{document.querySelector(".tt-toast").remove()}),1500)}function w(t,e=20){var i=document.createElement("div");i.className="loader",i.style.cssText=`display: inline-block;width:${e}px;height:${e}px`,t.appendChild(i)}function h(t,e,i){let s=new Image;s.src=t,s.onload=function(){let t=document.createElement("canvas"),n=t.getContext("2d"),o=s.width,r=s.height,a="";ol||r>d)&&(o/r>1?(c=l,p=Math.round(l*(r/o))):(p=d,c=Math.round(d*(o/r)))),t.width=c,t.height=p,n.drawImage(s,0,0,c,p),a=t.toDataURL("image/jpg",.8),e.style.backgroundImage=`url(${a})`,i(a)}}async function m(t){return new Promise(((e,i)=>{const s=new Image;s.onload=()=>{try{const n=document.createElement("canvas"),o=n.getContext("2d"),r=2e3;let{width:a,height:l}=s;if(a<2e3&&l<2e3)return void e(t);a>l?a>r&&(l=l*r/a,a=r):l>r&&(a=a*r/l,l=r),n.width=a,n.height=l,"image/jpeg"===t.type&&(o.fillStyle="white",o.fillRect(0,0,a,l)),o.drawImage(s,0,0,a,l),n.toBlob((s=>{if(!s)return void i(new Error("图片压缩失败"));const n=new File([s],t.name,{type:t.type,lastModified:Date.now()});e(n)}),t.type)}catch(t){i(t)}},s.onerror=i,s.src=URL.createObjectURL(t)}))}function _(){return window.innerWidth}function f(t,e){const i=[...t];if(i.length<=e){const t=i.map((t=>{var e=y(t);return e.id=t,e}));return Promise.all(t)}const s=i.splice(0,e).map((t=>{var e=y(t);return e.url=t,e}));i.reduce(((t,e)=>t.then((()=>Promise.race(s))).then((t=>{let i=s.findIndex((e=>e.url==t));s.splice(i,1);var n=y(e);n.url=e,s.push(n)}))),Promise.resolve()).then((()=>Promise.all(s)))}function y(t){return new Promise(((e,i)=>{var s=new Image;s.url=t,s.onerror=()=>{i()},s.onload=()=>{e(s)},s.src=t}))}function b(t){var e=null;return null!=window.createObjectURL?e=window.createObjectURL(t):null!=window.URL?e=window.URL.createObjectURL(t):null!=window.webkitURL&&(e=window.webkitURL.createObjectURL(t)),e}function C(t,e,i,s){s.observer=new MutationObserver(i),s.observer.observe(t,e)}function $(t,e="smooth"){t.scrollIntoView({behavior:e,block:"start"})}function x(){var t=navigator.userAgent,e=t.indexOf("Android")>-1||t.indexOf("Adr")>-1,i=!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return e?"android":i?"ios":void 0}function R(t,e){let i;return i=e?e.querySelector(t):document.querySelector(t),i}function S(t,e){let i;return i=e?e.querySelectorAll(t):document.querySelectorAll(t),i}function T(t,e){navigator.clipboard.writeText(t).then((()=>{e()}))}function k(){let t=navigator.userAgent,e=/(?:Android)/.test(t),i=/(?:Firefox)/.test(t),s=/(?:iPad|PlayBook)/.test(t)||e&&!/(?:Mobile)/.test(t)||i&&/(?:Tablet)/.test(t),n=/(?:iPhone)/.test(t)&&!s;return e||n}function q(t,e){var i=null;return function(...s){i&&clearTimeout(i),i=setTimeout((()=>{t(...s)}),e)}}function E(t){var e=document.createRange();window.getSelection().removeAllRanges(),e.selectNode(t),window.getSelection().addRange(e),document.execCommand("copy")&&A("Copy successfully"),window.getSelection().removeAllRanges()}function L(t){return new Promise((e=>{setTimeout((()=>{e()}),t)}))}function P(t,e,i){if("set"!==t)return JSON.parse(sessionStorage.getItem(e));try{sessionStorage.setItem(e,JSON.stringify(i))}catch(t){}}function I(t,e,i){if("set"!==t)return JSON.parse(localStorage.getItem(e));localStorage.setItem(e,JSON.stringify(i))}function M(t){fetch("https://www.cloudflare.com/cdn-cgi/trace").then((t=>t.text())).then((e=>{e=e.split("\n"),t.ip=e[2].split("=")[1],t.loc=e[9].split("=")[1]}))}function D(t){let e=t.lastIndexOf("."),i="";return-1!=e&&(i=t.substring(e)),function(t){t=t||32;for(var e="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",i=e.length,s="",n=0;n{const e=new Image;e.onload=function(){t(1===e.width)},e.onerror=function(){t(!1)},e.src="data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoBAAEAAwA0JaQAA3AA/vuUAAA="}))}}},e={};function i(s){var n=e[s];if(void 0!==n)return n.exports;var o=e[s]={id:s,exports:{}};return t[s](o,o.exports,i),o.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var s=i(986),n=i(571),o=i(957),r=i(429),a=i(638),l=i(657),d=i(134),c=i(778),p=i(220);const u=async function(t){let e="";t&&(e=t.dataset.productId);const i=1===n.A.keySettings.auto_switch_language?window.Shopify?.locale:n.A.keySettings.language,r="undefined"==typeof vstar_ai_summary_settings||n.A.isSettingUpdate?o.zG.getAiSummarySettings():Promise.resolve([null,vstar_ai_summary_settings]),[a,l]=await Promise.all([r,o.zG.getAiSummaryContent(i,e)]),d=a[1],c=l[1];if(!c.summary&&!c.positive_keywords.length)return;const p=n.A.isProPage||e;let u={},v="",g="",A="summary.home_summary_title",w="summary.home_summary_generated";u=p?d.product:d.home,p&&(A="summary.product_summary_title",w="summary.product_summary_generated"),Object.keys(n.A.lang).length>0&&(p?(v=n.A.lang.summary.product_summary_title,g=n.A.lang.summary.product_summary_generated):(v=n.A.lang.summary.home_summary_title,g=n.A.lang.summary.home_summary_generated)),function(t){const e=n.A.globalStyle.textContent;n.A.globalStyle.textContent=`\n\t\t.tt-ai-summary {\n\t\t--tt-title-color: ${t.title_color};\n\t\t--tt-summary-text-color: ${t.summary_text_color};\n\t\t--tt-summary-bg: ${t.summary_bg_color};\n\t\t--tt-keywords-badge-background: ${t.badge_bg_color};\n\t\t--tt-keywords-badge-text: ${t.badge_text_color};\n\t\t}${e}\n\t`}(u);const h="tt-reviews-"+Math.random().toString(36).substr(2,9),m={...{summary:c.summary,keywords:c.positive_keywords}},_='\n \n \n ',f='\n \n ',y='\n\n\n\n',b=sessionStorage.getItem("tt-ai-summary-expanded"),C=`\n
    \n
    \n
    ${_}
    \n ${v}\n
    \n
    ${m.summary}
    \n \n
    \n
    \n
    ${g}
    \n
    ${f}
    \n
    \n \n
    \n ${m.keywords.map((t=>`
    \n
    ${y}
    \n ${t.keyword} (${t.percentage})\n
    `)).join("")}\n
    \n \n
    \n
    \n ${m.keywords.map((t=>`
    \n
    \n
    \n
    ${y}
    \n ${t.keyword}\n (${t.percentage})\n
    \n ${t.percentage} ${function(t){const e={ar:"مذكور",bg:"споменато",cs:"zmíněno",da:"nævnt",de:"erwähnt",el:"αναφέρθηκε",es:"mencionado",et:"mainitud",fi:"mainittu",fr:"mentionné",he:"הוזכר",hr:"spomenuto",hu:"említve",hy:"նշված",id:"disebutkan",it:"menzionato",ja:"言及",ka:"ნახსენები",ko:"언급됨",lt:"paminėta",lv:"minēts",ms:"disebut",nl:"genoemd",no:"nevnt",pl:"wspomniane",pt:"mencionado",ro:"menționat",sk:"spomenuté",sl:"omenjeno",sr:"поменуто",sv:"nämnt",th:"กล่าวถึง",tr:"bahsedildi",uk:"згадано",vi:"được đề cập",zh:"提及"},i=Object.keys(e).find((e=>t.includes(e)));return i?e[i]:"Mentioned"}(i)}\n
    \n
    ${t.description}
    \n
    `)).join("")}\n
    \n
    \n
    \n
    \n `;if(t)t.insertAdjacentHTML("afterbegin",C);else{const t=(0,s.$dqs)("#trustoo-widget-wrapper");if(t)t.insertAdjacentHTML("afterbegin",C);else if(n.A.revTar){const t=n.A.revTar.dataset.trustooInsertPosition;n.A.revTar.insertAdjacentHTML(t,`
    ${C}
    `)}}const $=document.getElementById(h);return $.offsetWidth<600&&$.classList.add("tt-ai-summary-mobile"),(0,s.$dqs)(".tt-ai-header",$).addEventListener("click",(()=>{!function(t){const e=document.getElementById(t+"-expand"),i=document.getElementById(t+"-detail"),s=document.getElementById(t+"-summary");e.classList.toggle("tt-expanded"),i.classList.toggle("tt-expanded"),i.classList.contains("tt-expanded")?sessionStorage.setItem("tt-ai-summary-expanded","true"):sessionStorage.removeItem("tt-ai-summary-expanded");s.classList.toggle("tt-hidden")}(h)})),{id:h,element:document.getElementById(h),config:m}};var v=i(72),g=i.n(v),A=i(825),w=i.n(A),h=i(659),m=i.n(h),_=i(868),f=i.n(_),y=i(540),b=i.n(y),C=i(113),$=i.n(C),x=i(472),R={attributes:{id:"trustoo-insert-css"}};R.styleTagTransform=$(),R.setAttributes=f(),R.insert=m().bind(null,"head"),R.domAPI=w(),R.insertStyleElement=b();g()(x.A,R);x.A&&x.A.locals&&x.A.locals;var S=i(381),T=i(877),k=i(743),q=i(651);async function E(){let t,e;const{isActWdoRev:i,globalStyle:l,isHomePage:v,isProPage:g,isCartPage:A,isCollPage:w,hasPyRating:h,hasEcomRt:m}=n.A,{pageType:_,isMobile:f}=Review,{isCollReview:y,isCollStartDelay:b,isPageReview:C,reviewsPageCount:$,homeStarDelay:x}=d.A;let R=!1;const q=Array.from((0,s.$dqsa)(".trustoo-ai-summary-block")).find((t=>t.offsetParent));(1===n.A.keySettings.is_ai_home_active&&v||1===n.A.keySettings.is_ai_product_active&&g||q)&&(u(q),R=!0),await async function(t){const e=[],i=(new Date).getTime();0===Object.keys(n.A.userSetting).length?e.push(o.zG.getUserSetting()):e.push(Promise.resolve([null,null]));const{is_activate_home_reviews:r,is_activate_reviews:a,is_activate_collection_rating:l,language:c,auto_switch_language:p,reviews_per_page_number:u,review_sort_by:v,is_hide_ratings:g,show_attribute:A,is_active_store_review:w}=n.A.keySettings,h=(0,s.$dqs)("#seal-review-widget"),m=h||k.A.customReviewsBlock,_=m||n.A.isProPage&&1===a||n.A.isHomePage&&1===r||(n.A.isProPage||n.A.isHomePage)&&1===w||d.A.isPageReview||n.A.isActWdoRev||d.A.isCollReview;_||t||1===l&&(n.A.isCollPage||d.A.otherPageColl)?e.push(async function(t,e){let i=!0;if(1===t){const t=Shopify.locale;Review.lang=t,t!==e&&(i=!1)}else Review.lang=e;return"undefined"==typeof vstar_lang_json||!i||n.A.isSettingUpdate?o.zG.getLang():Promise.resolve([null,null])}(p,c)):e.push(Promise.resolve([null,null]));n.A.layoutReviewCount=u;let f=Promise.resolve([null,null]);n.A.productId||n.A.isHomePage||(n.A.isMixReview=!0);1===w&&!m&&(n.A.isProPage&&1!==a||n.A.isHomePage&&1!==r)&&(n.A.showType="shopReviews");n.A.isProPage?f=n.A.reviewsData?Promise.resolve([null,n.A.reviewsData]):(1===a||h)&&(n.A.ratingData.total_reviews>0||!n.A.ratingData.total_reviews)||"shopReviews"===n.A.showType?o.zG.getProRevList(v):Promise.resolve([null,null]):n.A.isHomePage?f=Promise.resolve([null,null]):_&&(f=o.zG.getProRevList(v));e.push(f),n.A.productId?0===Object.keys(n.A.ratingData).length?e.push(o.zG.getRating()):e.push(Promise.resolve([null,null])):d.A.isPageReview||d.A.isCollReview||m?e.push(o.zG.getRating()):e.push(Promise.resolve([null,null]));n.A.productId&&1===A&&1!==g?e.push(o.zG.getAttributeStatistics()):e.push(Promise.resolve([null,null]));const y=new Promise(((t,e)=>{const i=(0,s.$dqs)("link[href*='trustoo-reviews.min.css']");if(i)t(i);else{const i=window.TrustooReviews.reviews.trustooCSSLink||"https://cdn.vstar.app/static/dist/css/trustoo-reviews.min.css",s=document.createElement("link");s.rel="stylesheet",s.href=i,d.A.setLinkMedia&&(s.media="print"),document.head.appendChild(s),s.onload=()=>{t(s),s.media="all"},s.onerror=()=>{e(new Error("CSS link not found"))}}}));e.push(y),await Promise.all(e).then((t=>{const[e,o,r,a,l]=t;if(window.TrustooReviews.reviews.requestTime=(new Date).getTime()-i,e[1]&&(n.A.userSetting=e[1]),r[1]){const t=r[1];n.A.pageInfo[n.A.showType]={total:t.page.total_page,curPage:t.page.cur_page,count:t.page.count};const e="shopReviews"===n.A.showType?"trustoo_shop_reviews":"trustoo_reviews";(0,s.gsSession)("set",e,[t.list])}if(a&&a[1]&&(n.A.productId?n.A.ratingData=a[1]:n.A.allRatingData=a[1]),o&&o[1]){let t=null;t=o[1].lang_json?JSON.parse(o[1].lang_json):o[1],t.show_full_review&&(n.A.ellipsisText=t.show_full_review),Object.assign(n.A,{lang:t})}else"undefined"!=typeof vstar_lang_json&&(n.A.lang=vstar_lang_json);(0,s.$dqsa)("[data-tt-lang-path]").forEach((t=>{const e=t.dataset.ttLangPath.split(".").reduce(((t,e)=>t?.[e]),n.A.lang);e&&(t.textContent=e)})),l&&l[1]&&(n.A.attributeStatistics=l[1])}))}(R);const E=n.A.userSetting;Review.is_install=E.is_install,Review.is_product_open=E.is_activate_product_rating,Review.is_reviews_open=E.is_activate_reviews,Review.is_collection_open=E.is_activate_collection_rating,Review.is_activate_home_rating=E.is_activate_home_rating,Review.is_show_stars_without_review=E.is_show_stars_without_review,n.A.userSetting=E,n.A.revHeadType=1===E.is_hide_ratings?2:1;const P=(0,s.$dqs)("#trustoo-mask");P?k.A.mask=P:(document.body.insertAdjacentHTML("beforeend",''),k.A.mask=(0,s.$dqs)("#trustoo-mask"));const I=E,M="collection"!=_||y||i||C;if(M){let i=!1,o=!1,r=!1;const a=d.A.fixedLayout||E.layout;1==a||3==a?(t="list-",i=!0,3==a&&(r=!0)):2==a&&(t="grid-",o=!0,n.A.gridLoadedShowImg=0,n.A.gridShowImgCount=0),e=I.reviews_per_page_number,$&&(e=$),(0,s.returnCitySN)(n.A),Object.assign(n.A,{layoutClass:t,layoutReviewCount:e,globalStyle:l,isGrid:o,isList:i,isSplit:r})}window.TrustooReviews.reviews.hasReviews=!1,function(t,e){let i=`.vstar-star{--star-color:${n.A.userSetting.star_color};\n\t--nostar-color:${n.A.userSetting.nostar_color};}`;if(e){const e=t.font_color;let o=t.box_bg_color;const r=n.A.theme_store_id;1356!==r&&1567!==r||"#FFFFFF"===o&&(o="#FFFFFF00");let a=t.border_radius+"px";const l="Dark"===t.card_shadow?"1px 1px 6px rgba(0, 0, 0, 0.1)":"0px 0px 3px rgba(0, 0, 0, 0.2)";if(i+=`\n #reviews-wrapper,#noreviews-wrapper\n \t{\n background-color: ${o};\n --font-color: ${e};\n --font-color-o4: ${(0,s.hexToRgba)(e,.4)};\n --font-color-o7: ${(0,s.hexToRgba)(e,.7)};\n --font-color-o8: ${(0,s.hexToRgba)(e,.8)};\n\t\t\t\t\t--font-size:${t.font_size}px;\n --bg-color:${o};\n --badge-text-color:${t.badge_text_color};\n --badge-color:${t.verified_badge_color};\n --card-color:${t.card_bg_color};\n --box-bg-color:${o};\n --button-radius:${a};\n --button-color:${t.button_color};\n --button-bd-color:${t.button_bg_color};\n --button-border-color:${t.button_border_color};\n\t\t\t\t\t--line-color:${t.dividing_line_color};\n\t\t\t\t\t--reply-bg-color:${t.reply_bg_color};\n\t\t\t\t\t--avatar-text-color:${t.avatar_text_color};\n\t\t\t\t\t--avatar-bg-color:${t.avatar_bg_color};\n\t\t\t\t\t--attr-bg-color:${t.attributes_bg_color};\n\t\t\t\t\t--attr-color:${t.attributes_color};\n }\n\t\t\t\t.trustoo-widget{--sprites-image-url:url(https://${n.A.staticBaseUrl}/static/images/sprites/trustoo_sprites.png?${n.A.constructTime});}\n #vstar-window-review,#vstar-window-review #reviews-wrapper,\n #vstar-window-review #vstar-reviews{background-color: ${o.slice(0,7)};}\n #vstar-reviews.pending>* {\n opacity: 0 !important;\n }\n\t\t\t\t.trustoo-widget #reviews-body .grid-review{\n\t\t\t\t\tbox-shadow: ${l};\n\t\t\t\t}\n\t\t\t\t.trustoo-widget #reviews-body .reviews-text{\n\t\t\t\t\tfont-size:${t.font_size}px;\n\t\t\t\t}\n\t\t\t\t.product-icon-list i{\n\t\t\t\t\tfont-size:20px\n\t\t\t\t}\n #trustoo-allinone i,\n .write-review-container i{font-size:16px}\n #reviews-head i{font-size:20px}\n\t\t\t\t${t.font?`.trustoo-widget *,.vstar-star .tt-rating-text,#vstar-tab{font-family: ${t.font}}`:""}\n\t\t\t\t${n.A.userSetting.reviews_css_code}\n `,t.qa_colors){const e=t.qa_colors.split(",");i+=`.trustoo-widget{--tab-title-color:${e[0]};\n\t\t\t\t\t--tab-title-line-color:${e[1]};\n\t\t\t\t\t--question-color:${e[3]};\n\t\t\t\t\t--question-color-o8: ${(0,s.hexToRgba)(e[3],.8)};\n\t\t\t\t}`}n.A.isGrid?i+=`.grid-review{background-color: ${t.card_bg_color}}\n .trustoo-widget #reviews-body{margin-top:16px !important}`:i+=`.trustoo-widget .resource-item{border-radius: ${t.photo_radius}px}`}i+=n.A.userSetting.rating_css_code,void 0!==d.A.custom_style_info.css_style_code&&(i+=d.A.custom_style_info.css_style_code);d.A.vstarCustomSty&&(i+=d.A.vstarCustomSty);n.A.globalStyle.insertAdjacentHTML("beforeend",i)}(E,M);const D=h||m;if(g){n.A.isProRatingOpen=1===E.is_activate_product_rating||D,1==E.layout?((1==E.is_transparent||f)&&(E.is_transparent=0),I.card_bg_color=(0,s.hexToRgba)(E.card_bg_color,E.is_transparent)):I.card_bg_color=E.card_bg_color;const t=new URLSearchParams(window.location.search);if(t.get("req")){n.A.isLinkReqRev=!0,n.A.writeLinkParams={source:"store_link"};const e=t.get("dondy");console.log("dondy",e),console.log("typeof dondy",typeof e),"string"==typeof e&&(n.A.writeLinkParams.dondy=e)}1!==E.is_activate_reviews&&1!==E.is_active_store_review||(n.A.isRevOpen=!0),await(0,a.getTotalRating)()}else if(w||d.A.otherPageColl){2!==E.is_activate_collection_rating&&(b&&await(0,s.setDelay)(2e3),await(0,r.M0)(),0===Review.collTarget.length?n.A.isSetObserver&&(0,r.DF)():(0,a.setInsertTarget)(2)),(1===I.is_activate_reviews&&y||k.A.customReviewsBlock)&&L()}else if(v){let t,e,i="",l=[],{productId:p,productImageUrl:u,productName:v}=n.A,g=!1;if(n.A.isHomeRatingOpen=1===E.is_activate_home_rating||D,(1===E.is_activate_home_reviews||1===E.is_active_store_review||k.A.customReviewsBlock)&&(n.A.isRevOpen=!0,n.A.isHomeReview=g=!0,!n.A.productId)){let[e,s]=await o.zG.getOnlyOneProduct();t=s,null===e&&t&&(p=t.product_id,v=t.product_title,u=t.image_src,i=t.product_handle)}if(1===E.is_activate_home_rating||g){if(d.A.notExecuteHomeFeatureProd||(await(0,c.rU)(),e=Review.proTarget),1===E.is_activate_home_rating){x&&await(0,s.setDelay)(x),await(0,r.M0)(),l=Review.collTarget;let t=l.length;1===t?l[0]===e?l.pop():(0,a.setInsertTarget)(2):0!==t?((l.includes(e)||l[0].contains(e))&&(Review.proTarget=e=null),(0,a.setInsertTarget)(2)):n.A.isSetObserver&&(0,r.DF)()}if(!p&&e&&(v=Review.proTarget.textContent.replace(/\n/g,"").trim(),v)){let[t,e]=await o.zG.getProductInfo(encodeURIComponent(v));null===t&&e&&(p=e.product_id,u=e.image_src,i=e.product_handle)}g&&(t||p||(n.A.isMixReview=!0)),d.A.isHomeAllReviews&&(n.A.isMixReview=!0),Review.productId=p,Object.assign(n.A,{productId:p,productName:v,productImageUrl:u,productHandle:i}),(p||n.A.isMixReview)&&await(0,a.getTotalRating)()}}else if(A){if((0,s.gsSession)("get","tt_cart_product_id")){n.A.cartWatcher=new T.N,await n.A.cartWatcher.init();const t=n.A.cartWatcher.storedCartToken().split("?key=")[0];(0,s.processRecordedData)("add_to_cart",t,!0)}k.A.customReviewsBlock&&L()}else if(C){let t={};n.A.allRev&&(t.tarNode=n.A.allRev,t.position="afterbegin"),n.A.isInsertRev=!0,L()}!D||n.A.isProPage||n.A.isHomePage&&1===E.is_activate_home_rating||n.A.isCollPage&&1===E.is_activate_collection_rating||(0,a.setInsertTarget)(2),window.TrustooReviews.carousel.canWriteReview&&(0,s.setWriteReview)(),(0,p.qM)(),(n.A.isProPage||d.A.reviewsSnippetProdId)&&(0,S.D)()}function L(){n.A.isMixReview=!0;let t=n.A.allRatingData;n.A.productId&&(n.A.isMixReview=!1,t=n.A.ratingData),t.total_reviews>0?(0,l.Gs)({}):(0,l.WC)(),(0,s.setWriteReview)()}window.TrustooReviews||(window.TrustooReviews={reviews:{},carousel:{}}),window.TrustooReviews.reviews.handleWriteReview=l.iB,window.TrustooReviews.reviews.setWriteReview=s.setWriteReview,window.TrustooReviews.reviews.createRangeDisplayHTML=q.Tl;var P=i(357);window.TrustooReviews||(window.TrustooReviews={reviews:{},carousel:{}});!async function(){if(window.isTrustooReviewsExecuted)return;window.isTrustooReviewsExecuted=!0;let t,e="";if(window.Review={},Review.observeCount=0,n.A.productId=shopifyObj.productId,n.A.env="production",n.A.staticBaseUrl="cdn.vstar.app",n.A.apiDomain="rapi.trustoo.io",window.TrustooReviews.apiDomain="rapi.trustoo.io",n.A.isMobile=Review.isMobile=(0,s.isMobile)(),Review.constructTime="2025-09-02 10:18:43",n.A.constructTime=new Date("2025-09-02 10:18:43").getTime()/1e3,Review.theme={},"undefined"!=typeof Shopify&&(Review.shop=Shopify.shop,Object.assign(Review.theme,Shopify.theme)),(0,s.$dqs)("body.warehouse--v1")&&(Review.theme.name="warehouse"),n.A.baseUrl=Review.baseUrl="api.trustoo.io",n.A.isWebPSupported=await(0,s.isWebPSupported)(),Review.collTarget=[],Review.loadedPhoto=[],Review.checkGridHighMsg=[],Review.checkGridMsg=[],window.ShopifyAnalytics)t=window.ShopifyAnalytics&&ShopifyAnalytics.lib&&ShopifyAnalytics.lib.config&&ShopifyAnalytics.lib.config.Trekkie.defaultAttributes.shopId,t||(t=shopifyObj.shop_id),Review.shop_id=n.A.shop_id=t,"undefined"!=typeof Shopify&&Shopify.theme&&(n.A.theme_store_id=Shopify.theme.theme_store_id,n.A.themeId=Shopify.theme.id),e=window.ShopifyAnalytics&&window.ShopifyAnalytics.meta.page.pageType;else{if(!document.querySelector("#seal_shop_id"))return;window.TrustooReviews.pageType&&(e=window.TrustooReviews.pageType);const t=JSON.parse(document.querySelector("#seal_shop_id").textContent);if(Review.shop_id=n.A.shop_id=t,"product"===e){const t=JSON.parse(document.querySelector("#tt_product").textContent);Review.productId=n.A.productId=t.id,n.A.productName=t.title,n.A.productImageUrl=t.image_url}}Review.pageType=e,n.A.pageType=e,n.A.isHomePage="index"===e||"home"===e,n.A.isCollPage="collection"===e,n.A.isProPage="product"===e,n.A.isCartPage="cart"===e;const i=await o.zG.getInstallStatus(),r=i[1];if(null!==i[0]||-1===r.code)return;if(n.A.isProRatingUpdate=1===r.product_rating_updating,n.A.isSettingUpdate=1===r.shop_setting_updating,n.A.isReviewsUpdate=1===r.product_review_updating,n.A.isReviewsUpdate?n.A.revReqParam=(new Date).getTime():n.A.revReqParam=r.product_review_updating,(0,s.gsSession)("set","instagram_is_install",r.instagram_is_install),(0,s.gsSession)("set","trustoo_reviews",[]),(0,s.gsSession)("set","trustoo_shop_reviews",[]),1!==r.review_is_install)return;const l="undefined"!=typeof vstar_review_settings&&vstar_review_settings;l&&!n.A.isSettingUpdate?(n.A.userSetting=l,Object.keys(n.A.keySettings).forEach((t=>{n.A.keySettings[t]=l[t]})),n.A.isActWdoRev=1===l.sidetab_setting.sidetab_is_enabled,"undefined"!=typeof vstar_ai_summary_settings&&(n.A.keySettings.is_ai_home_active=vstar_ai_summary_settings.home.is_active,n.A.keySettings.is_ai_product_active=vstar_ai_summary_settings.product.is_active)):r.widgets_setting&&(n.A.isActWdoRev=1===r.widgets_setting.sidetab_is_enabled,n.A.keySettings=r.widgets_setting),n.A.isProPage&&("undefined"!=typeof vstar_product_rating&&vstar_product_rating.hasOwnProperty("rating")&&!n.A.isProRatingUpdate?n.A.ratingData=vstar_product_rating:r.rating&&(n.A.ratingData=r.rating),"undefined"==typeof vstar_product_reviews||n.A.isReviewsUpdate||0===Object.keys(n.A.userSetting).length||1===n.A.keySettings.is_active_store_review||1===n.A.userSetting.auto_switch_language||(n.A.reviewsData=vstar_product_reviews)),d.A.setPageReview(t);const c=(0,s.$dqsa)(".pagefly-star-rating-sealapp"),p=(0,s.$dqsa)(".ecom-star-rating-sealapp"),u=(0,s.$dqsa)(".custom-vstar-rating-widget");if(0!==c.length?(n.A.hasPyRating=!0,Review.collTarget=Array.from(c)):0!==p.length&&(n.A.hasEcomRt=!0,Review.collTarget=Array.from(p)),0!==u.length&&(n.A.hasPyRating=!0,Review.collTarget=Array.from(u)),"undefined"!=typeof trustooBeforeExecute&&trustooBeforeExecute(n.A,d.A),n.A.isProPage||n.A.isCollPage||n.A.isHomePage||n.A.isCartPage||Shopify.designMode||d.A.isPageReview||n.A.isActWdoRev||d.A.otherPageColl||n.A.hasPyRating||n.A.hasEcomRt){const t=(0,s.gsSession)("get","vstarTimestamp");if(t)n.A.timestamp=t;else{n.A.isFirstExecute=!0;const t=(new Date).getTime();(0,s.gsSession)("set","vstarTimestamp",t),n.A.timestamp=t}const e={trustoo_reviews:[],trustoo_show_reviews:[],trustoo_all_reviews:[],trustoo_shop_reviews:[],trustoo_popup_shop_reviews:[],trustoo_album_reviews:[]};(0,s.gsSession)("set","tt_detail_reviews",JSON.stringify(e)),function(){const t=n.A.keySettings.rating_icon_type||1,e=n.A.keySettings.verified_icon_type||1,i=(0,s.gsSession)("get","ttRatingIcons");let r={};i&&(r=JSON.parse(i),n.A.ratingIconSvg=r["star"+t],n.A.badgeIconSvg=r["badge"+e]);1===t&&(n.A.ratingIconSvg=P.A.star);1===e&&(n.A.badgeIconSvg=P.A.verified);n.A.ratingIconSvg&&n.A.badgeIconSvg||o.zG.getIcons().then((i=>{const o=["star","rounded","spikes","surrounded","fire","heart","diamond","crown","trophy","shirt","skirt","bag","tie","cup","leaf","seedling","footprint","chef"][t-1];if(i[0])n.A.ratingIconSvg=P.A.star,n.A.badgeIconSvg=P.A.verified;else{const t=JSON.parse(i[1]);n.A.ratingIconSvg=t[o],n.A.badgeIconSvg=t["badge"+e]}(0,s.$dqsa)(".vstar-star .pending").forEach((t=>{t.innerHTML=n.A.ratingIconSvg,t.classList.remove("pending")})),(0,s.$dqsa)("#vstar-reviews .user-verified.pending").forEach((t=>{t.insertAdjacentHTML("afterbegin",n.A.badgeIconSvg),t.classList.remove("pending")})),r["star"+t]=n.A.ratingIconSvg,r["badge"+e]=n.A.badgeIconSvg,(0,s.gsSession)("set","ttRatingIcons",JSON.stringify(r))}))}();let i=document.createElement("style");i.id="trustoo-css",document.head.appendChild(i),n.A.globalStyle=i,d.A.setUserNeed(),Object.assign(n.A,d.A);const r=async function(){const t=(0,s.$dqs)(".pagefly-review-widget-sealapp,.custom-vstar-review-widget");if(t){const e=t.dataset.productId;if(e){const i=t.dataset.productTitle,s=`//${location.host}/cdn/shop/`+t.dataset.productImage;Object.assign(n.A,{productId:e,productName:i,productImageUrl:s})}k.A.customReviewsBlock=t}if(n.A.isProPage){let t=shopifyObj.productId,e=shopifyObj.productImage[0],i=shopifyObj.productName;Review.productId=t,Object.assign(n.A,{productId:t,productImageUrl:e,productName:i});const s=location.href.indexOf("/products/");-1!==s&&(n.A.productHandle=location.href.substring(s+10))}await d.A.getUserNeedData(),(0,s.findTrustooTargetElement)(),(0,s.imgLoadLimit)(["//cdn.vstar.app/static/images/default.png","//cdn.vstar.app/static/images/video_default.png",`//${n.A.staticBaseUrl}/static/images/sprites/trustoo_sprites.png?${n.A.constructTime}`,"//cdn.vstar.app/static/images/player.png"],3),E(),function(){let t=Review.baseUrl;"production"===n.A.env&&(t="cdn.vstar.app");var e=document.createElement("link");e.rel="stylesheet",e.href=`https://${t}/static/css/index.css`;var i=document.createElement("link");i.rel="stylesheet",i.href=`https://${t}/static/css/trustoo-sprite.min.css`,document.head.appendChild(e),document.head.appendChild(i)}(),function(){let t=[];if(!(0,s.$dqs)(".tt-review-detail-js")){let e=`https://${n.A.staticBaseUrl}/static/js/tt-review-detail.js?`+n.A.constructTime;"local"===n.A.env&&(e=`../../js/tt-review-detail.js?${(new Date).getTime()}`),t.push(e)}t.forEach((t=>{let e=document.createElement("script");e.src=t,e.setAttribute("defer",!0),-1!==t.indexOf("tt-review-detail")&&(e.className="tt-review-detail-js",e.onload=function(){(0,a.insertReviewDetail)()}),document.head.appendChild(e)}))}()};d.A.executeDelay&&await(0,s.setDelay)(d.A.executeDelay),r()}}()})(); //# sourceMappingURL=seal-review.min.js.map