;(()=>{"use strict";var t;(t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})})({}),(t=jQuery)(document).ready(function(){t(".eaw-quick-view").on("click",o=>{o.preventDefault(),o.stopPropagation(),e(o,t)})});const e=(t,e)=>{const{swalPosition:a,showClass:i,grow:s,hideClass:r,customClass:n,width:c}=o(),l=e(t.currentTarget).data("wc-product-id");Swal.fire({position:a,grow:s,customClass:n,showClass:i,hideClass:r,width:c,didOpen:async()=>{Swal.showLoading();const t=await wp.ajax.post("ccpeawGetProductQuickData",{productId:l,eaw_nonce:ccpeaw.nonce});Swal.update({html:t.data,showCloseButton:!0,showConfirmButton:!1}),e(".eaw-product-gallery-images").slick({dots:!1,arrows:!0,infinite:!0,speed:300,slidesToShow:1,prevArrow:'<button class="slick-arrow slick-prev eaw-icon-arrow"></button>',nextArrow:'<button class="slick-arrow slick-next eaw-icon-arrow"></button>',asNavFor:".eaw-product-gallery-thumbs"}),e(".eaw-product-gallery-thumbs").slick({slidesToShow:3,slidesToScroll:1,asNavFor:".eaw-product-gallery-images",dots:!1,centerMode:!0,focusOnSelect:!0,arrows:!1}),e(".eaw-product-content").each(function(){let t=e(this).siblings(".product_meta"),o=e(this).find("form.cart");t.length&&o.length&&(o.after(t.clone()),t.remove())})},willClose:()=>{e(".variations_form").off(),e(".eaw-product-gallery-images").slick("unslick"),e(".eaw-product-gallery-thumbs").slick("unslick"),Swal.close()}})},o=()=>{let t={};try{t=window.ccpeaw?.quickViewSettings}catch(t){console.error("Error parsing Quick View settings:",t)}const{quickViewLayoutType:e,quickViewDisplayEffect:o}=t,a={bottom:"bottom",right:"top-right",left:"top-left"}[e]||"center",i=o||{};return{swalPosition:a,grow:["bottom","center"].includes(a)?"row":"column",showClass:{popup:`\n      animate__animated\n      animate__${i?.in||"fadeIn"}\n      animate__faster\n    `.trim()},hideClass:{popup:`\n      animate__animated\n      animate__${i?.out||"fadeOut"}\n      animate__faster\n    `.trim()},customClass:{container:"eaw-product-quick-view-popup-container",popup:`eaw-product-quick-view-popup-wrapper ${a}`},width:["bottom","center"].includes(a)?1e3:500}}})();