executeStaffReviewFlow();async function executeStaffReviewFlow(){try{const param=createStaffReviewApiParam(),response=await callStaffReviewApi(param);response.staff_reviews.length>0&&createStaffReviewView(response.staff_reviews)}catch(e){console.error(e);const staffReviewBlock=document.getElementById("staff_review");staffReviewBlock&&(staffReviewBlock.style.display="none")}}function createStaffReviewApiParam(){return new URLSearchParams([["limit",2]]).toString()}function createStaffReviewView(staffReviews){const mainContainer=document.getElementById("staff_review"),title=document.createElement("div");title.classList.add("ec-staff-review-title"),title.textContent="\u6700\u65B0\u30B9\u30BF\u30C3\u30D5\u30EC\u30D3\u30E5\u30FC",mainContainer.appendChild(title);const subTitle=document.createElement("div");subTitle.classList.add("ec-staff-review-sub-title"),subTitle.textContent="\u8F9B\u53E3\u30BD\u30E0\u30EA\u30A8\u306E\u5FD6\u5EA6\u306A\u3057\u672C\u6C17\u30EC\u30D3\u30E5\u30FC\uFF01",mainContainer.appendChild(subTitle);const container=document.createElement("div");container.classList.add("ec-staff-review-container"),mainContainer.appendChild(container);for(const review of staffReviews)container.appendChild(createStaffReviewCard(review))}function createStaffReviewCard(review){const staffReviewCard=document.createElement("a");staffReviewCard.href="/products/"+review.item.item_cd+"#ec-staff-reviews",staffReviewCard.classList.add("ec-staff-review-box");let vintage=review.item.vintage;return(vintage==null||vintage==-1)&&(vintage="N.V."),staffReviewCard.insertAdjacentHTML("afterbegin",`
${review.staff.position}
${review.staff.staff_name}
${review.item.retail_price.toLocaleString()}\u5186 (\u7A0E\u8FBC)