var variantImageAutomator=function(){function convertLanguageCode(languageCode){let langCode=languageCode.toUpperCase();return"PT-BR"===langCode||"PT-PT"===langCode||"ZH-CN"===langCode||"ZH-TW"===langCode?langCode.replace("-","_"):langCode.match(/^[a-zA-Z]{2}-[a-zA-Z]{2}$/)?langCode.substring(0,2):langCode}async function handleMultipartResponse(response){const reader=response.body.getReader(),decoder=new TextDecoder;let buffer="";const parts={initial:null,deferred:null};for(;;){const{done:done,value:value}=await reader.read();if(done)break;if(buffer+=decoder.decode(value,{stream:!0}),buffer.includes("--graphql")){const chunks=buffer.split("--graphql");buffer=chunks.pop()||"";for(const chunk of chunks){if(!chunk.trim())continue;const jsonMatch=chunk.match(/{.*}/s);if(jsonMatch)try{const data=JSON.parse(jsonMatch[0]);parts.initial?parts.deferred=data:parts.initial=data}catch(e){console.error("Error parsing chunk:",e)}}}}return parts}async function fetchProductVariantsWithGraphQLDefer(handle){const startTime=performance.now();let allVariants=[],hasNextPage=!0,cursor=null,productData=null,retryCount=0;const MAX_RETRIES=3,API_VERSION="2025-01";let locale=convertLanguageCode(window.Shopify.locale),countryIsoCode=window.Shopify.country;try{let shopDomain=window.Shopify?.shop;const endpoint=shopDomain?`https://${shopDomain}/api/${API_VERSION}/graphql.json`:`/api/${API_VERSION}/graphql.json`;if(!handle){const pathMatch=window.location.pathname.match(/\/products\/([^\/]+)/);if(pathMatch&&pathMatch[1])handle=decodeURIComponent(pathMatch[1]);else{let metaUrl=document.querySelector('meta[property="og:url"]');metaUrl&&(handle=decodeURIComponent(metaUrl.split("/").pop()))}if(!handle)throw new Error("Couldn't determine product handle")}for(;hasNextPage&&retryCountcontroller.abort()),6500);fetchOptions.signal=controller.signal;const response=await fetch(endpoint,fetchOptions);if(clearTimeout(timeoutId),!response.ok)throw new Error(`HTTP error! Status: ${response.status}`);let pageResponse;if((response.headers.get("Content-Type")||"").includes("multipart/mixed"))pageResponse=await handleMultipartResponse(response);else{pageResponse={initial:await response.json(),deferred:null}}!productData&&pageResponse.initial?.data?.product&&(productData={...pageResponse.initial.data.product});const deferData=pageResponse.deferred?.incremental?.[pageResponse.deferred.incremental.length-1]?.data?.variants;if(deferData){const variants=deferData.nodes||[];allVariants=[...allVariants,...variants],hasNextPage=deferData.pageInfo?.hasNextPage||!1,cursor=deferData.pageInfo?.endCursor||null,retryCount=0}else hasNextPage=!1}catch(error){retryCount++,console.warn(`Attempt ${retryCount} failed: ${error.message}`),retryCount>=MAX_RETRIES?(console.error("Max retries reached"),hasNextPage=!1):await new Promise((resolve=>setTimeout(resolve,1e3*Math.pow(2,retryCount-1))))}productData&&(productData.variants={...allVariants});const endTime=performance.now();return console.log(`Execution time: ${(endTime-startTime).toFixed(2)} ms`),productJson=convertShopifyGraphQLToProductJSON(productData),console.log(productJson,"productData"),void(window.via_product_handle=`/products/${productJson.handle}`)}catch(error){throw console.error("Error while fetching variants:",error),error}}function fetchProductDataFromStoreFront(callback){let productHandle="";const pathMatch=window.location.pathname.match(/\/products\/([^\/]+)/);if(pathMatch&&pathMatch[1])productHandle=decodeURIComponent(pathMatch[1]);else if(product_url){const handle=product_url.match(/\/products\/([^\/]+)/);productHandle=decodeURIComponent(handle[1])}productHandle?window.requestIdleCallback?requestIdleCallback((()=>{fetchProductVariantsWithGraphQLDefer(productHandle).then((()=>{callback()})).catch((error=>{console.error("Failed to fetch product data:",error)}))}),{timeout:2e3}):setTimeout((()=>{fetchProductVariantsWithGraphQLDefer(productHandle).then((()=>{callback()})).catch((error=>{console.error("Failed to fetch product data:",error)}))}),1e3):console.error("Could not determine product handle from URL")}function convertShopifyGraphQLToProductJSON(graphqlData){const extractNumericId=globalId=>globalId?parseInt(globalId.split("/").pop()):null,extractOptionValues=options=>options.map(((option,index)=>({name:option.name,position:index+1,values:option.values||option.optionValues?.map((ov=>ov.name))||[]}))),createVariants=(variantsData,imagesData,mediaData)=>(Array.isArray(variantsData)?variantsData:Object.values(variantsData||{})).map((variant=>{const id=extractNumericId(variant.id),featuredImageId=variant.image?.id;delete variant.id,delete variant.image?.id;const variantImage=imagesData?.nodes?.find((img=>img.id===featuredImageId))||variant.image,variantMedia=mediaData?.nodes?.find((media=>media.previewImage.url===variantImage?.url))||null;return{id:id,featured_image:variantImage?{alt:variantImage.altText||variant.name,id:extractNumericId(variantImage.id),position:1,preview_image:{aspect_ratio:variantImage.width&&variantImage.height?variantImage.width/variantImage.height:.75,height:variantImage.height||252,width:variantImage.width||189,src:variantImage.url||""}}:null,featured_media:variantMedia?{alt:variantMedia.previewImage.altText||variant.name,id:extractNumericId(variantMedia.id),position:1,preview_image:{aspect_ratio:variantMedia.width&&variantMedia.height?variantMedia?.width/variantMedia?.height:.75,height:variantMedia?.height||252,width:variantMedia?.width||189,src:variantMedia.previewImage.url||""}}:null,...variant}})),extractImages=imagesData=>{if(!imagesData)return[];return(imagesData.nodes||imagesData).map(((img,index)=>({id:extractNumericId(img.id),product_id:extractNumericId(graphqlData.id),src:img.url,position:index}))).filter(Boolean)},extractMedia=mediaData=>{if(!mediaData)return[];return(mediaData.nodes||mediaData).map((media=>({alt:media.previewImage?.altText||media.altText||"Product Image",id:extractNumericId(media.id),position:media.position||1,preview_image:{aspect_ratio:media.previewImage?.width&&media.previewImage?.height?media.previewImage.width/media.previewImage.height:.75,height:media.previewImage?.height||252,width:media.previewImage?.width||189,src:media.previewImage?.url||media.url||""},aspect_ratio:media.previewImage?.width&&media.previewImage?.height?media.previewImage.width/media.previewImage.height:.75,height:media.previewImage?.height||252,media_type:media.mediaContentType?.toLowerCase()||"image",src:media.previewImage?.url||media.url||"",width:media.previewImage?.width||189})))};return{id:extractNumericId(graphqlData.id),title:graphqlData.title||"",handle:graphqlData.handle||"",description:graphqlData.description||"",published_at:graphqlData.publishedAt||(new Date).toISOString(),created_at:graphqlData.createdAt||(new Date).toISOString(),vendor:graphqlData.vendor||"",type:graphqlData.type||"",tags:graphqlData.tags||[],price:graphqlData.price??0,price_min:graphqlData.priceMin??0,price_max:graphqlData.priceMax??0,available:graphqlData.availableForSale??!0,price_varies:graphqlData.priceVaries??!1,compare_at_price:graphqlData.compareAtPrice??null,compare_at_price_min:graphqlData.compareAtPriceMin??0,compare_at_price_max:graphqlData.compareAtPriceMax??0,compare_at_price_varies:graphqlData.compareAtPriceVaries??!1,variants:createVariants(graphqlData.variants,graphqlData.images,graphqlData.media),images:extractImages(graphqlData.images),featured_image:graphqlData.featuredImage?.url||extractImages(graphqlData.images)[0]||"",options:extractOptionValues(graphqlData.options||[]),url:`/products/${graphqlData.handle}`,media:extractMedia(graphqlData.media),requires_selling_plan:graphqlData.requiresSellingPlan??!1,selling_plan_groups:graphqlData.sellingPlanGroups||[]}}function find_current_variant(section){var variant_id,element=section||document;default_variant=0==default_variant?Object.keys(product_variants)[0]:default_variant;var queries={};if(document.location.search.substr(1).split("&").forEach((function(q){var i=q.split("=");try{queries[i[0].toString()]=i[1].toString()}catch(err){}})),isNaN(queries.variant)){let selector=element.querySelector('form[action="/cart/add"] [name="id"]:checked')||element.querySelector('form[action="/cart/add"] [name="id"]')||element.querySelector('select[name="id"]')||element.querySelector('[name="id"]');variant_id=selector?selector.value:default_variant}else variant_id=queries.variant?queries.variant:element.querySelector("select option[value='"+default_variant+"']").parentNode.value;return variant_id||default_variant}function is_variant_in_url(){return document.location.href.indexOf("variant=")>=0}function find_current_variant_from_url(){let variantId=null;const urlSearchParams=new URLSearchParams(document.location.search);if(urlSearchParams.has("variant")&&!isNaN(urlSearchParams.get("variant")))return urlSearchParams.get("variant");const hashPart=document.location.hash.substring(1);if(hashPart.includes("variant=")){const hashParams=new URLSearchParams(hashPart.startsWith("?")?hashPart:`?${hashPart}`);if(hashParams.has("variant")&&!isNaN(hashParams.get("variant")))return hashParams.get("variant")}return variantId}function is_array_equal(a1,a2){return JSON.stringify(a1)===JSON.stringify(a2)}function find_variant_media(variant_id){var variant_media;if(variant_id||(variant_id=find_current_variant()),variants_media.hasOwnProperty(variant_id)?variant_media=variants_media[variant_id]:(variant_id=find_current_variant_from_url(),variant_media=variants_media.hasOwnProperty(variant_id)?variants_media[variant_id]:variants_media[default_variant]),!variant_media||0==variant_media.length||skip_showcase_image>=product_media.length)return product_media;if(!is_home&&"no_action"!=only_run_if_variant_in_url&&!is_variant_in_url()){function showcase_images(){return variants_media.g.length?variants_media.g:variant_assigned_media}function skipped_and_showcase_images(){let images=variants_media.skipped.concat(variants_media.g);return images.length?images:variant_assigned_media}if(selection_vid=0,"showcase_only"==only_run_if_variant_in_url)return showcase_images();if("showcase_and_variants"==only_run_if_variant_in_url)return variants_media.g.concat(variant_assigned_media);if("featured_only"==only_run_if_variant_in_url)return[product_media[0]];if("featured_and_showcase"==only_run_if_variant_in_url)return skip_showcase_image>0?[product_media[0]].concat(variants_media.g):showcase_images();if("skipped_and_showcase"==only_run_if_variant_in_url)return skipped_and_showcase_images();if("show_all"==only_run_if_variant_in_url)return product_media}return"at_start"==general_images_position?variant_media=variants_media.g.concat(variant_media):"at_end"==general_images_position&&(variant_media=variant_media.concat(variants_media.g)),variant_media&&0!=variant_media.length?priority_video?moveVideoToFront(variant_media):variant_media:product_media}function moveVideoToFront(arr){const videoIndex=arr.findIndex((obj=>"video"===obj.media_type||"external_video"===obj.media_type));if(videoIndex>-1){const videoObj=arr.splice(videoIndex,1)[0];arr.unshift(videoObj)}return arr}const graphqlQuery="\n query productDetails(\n $countryIsoCode: CountryCode,\n $locale: LanguageCode,\n $handle: String!,\n $variantsCursor: String\n ) @inContext(country: $countryIsoCode, language: $locale) {\n product(handle: $handle) {\n id\n handle\n title\n vendor\n availableForSale\n onlineStoreUrl\n tags\n publishedAt\n featuredImage{\n id\n url\n }\n options{\n id\n name\n values\n optionValues{\n id\n name\n }\n }\n images(first: 250){\n nodes{\n id\n url\n altText\n }\n }\n media(first: 250){\n nodes{\n id\n previewImage {\n url\n altText\n }\n mediaContentType\n }\n }\n\n ... on Product @defer {\n variants(first: 250, after: $variantsCursor) {\n nodes {\n id\n availableForSale\n quantityAvailable\n title\n sku\n image{\n id\n }\n selectedOptions {\n name\n value\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n }\n\n";var quick_view_enabled=!1,skip_showcase_image=0,selected_theme_name="MyCustomTheme",product_data_source="storefront",storefront_access_token="51e7fb391a1a74a4e05fef1000fd5ce6";const is_js_data_source="js"===product_data_source,is_storefront_data_source="storefront"===product_data_source;var priority_video=!1,can_execute_script=!1,only_run_if_variant_in_url="no_action",limit_on_product="none",product_url="",is_product_preview=window.location.href.toLowerCase().indexOf("/products_preview")>=0,is_product_page=/\/products\/|\/produkty\/|\/produkte\//.test(window.location.href.toLowerCase()),is_home="/"==window.location.pathname||/^\/[a-z]{2}\/?$/.test(window.location.pathname),is_pages=window.location.pathname.indexOf("/pages/")>=0,is_collection=1===window.location.pathname.search("collections"),variant_id=0,selection_vid=0,last_variant_images={};if((is_home||is_pages||is_collection||is_product_page||is_product_preview)&&(can_execute_script=!0),quick_view_enabled)var jTimer=setInterval((function(){window.$&&window.jQuery,clearInterval(jTimer)}),10);if(can_execute_script){if(is_home){if("Startup"==selected_theme_name)product_url=document.querySelector('[data-section-type="featured-product"] .product-title a')?document.querySelector('[data-section-type="featured-product"] .product-title a').href:"";else if("Flow"==selected_theme_name)product_url=document.querySelector("#product-box .product-details--form-wrapper a")?document.querySelector("#product-box .product-details--form-wrapper a").href:"";else if("Debut"==selected_theme_name);else if("Success theme"==selected_theme_name);else if("Supply V2"==selected_theme_name)product_url=document.querySelector('[data-section-type="product-template"] a.full-details')?document.querySelector('[data-section-type="product-template"] a.full-details').href:"";else if("Launch"==selected_theme_name)product_url=document.querySelector(".home-featured-product .product-title a")?document.querySelector(".home-featured-product .product-title a").href:"";else if("Responsive"==selected_theme_name)product_url=document.querySelector(".featured-product-section .product_name a")?document.querySelector(".featured-product-section .product_name a").href:"";else if("Streamline"==selected_theme_name);else if("Broadcast"==selected_theme_name)product_url=document.querySelector('[data-section-type="product"] .product__title a')?document.querySelector('[data-section-type="product"] .product__title a').href:"";else if("Palo Alto V2"==selected_theme_name)product_url=document.querySelector('[data-section-type="featured-product"]:first-child .featured-product-title a')?document.querySelector('[data-section-type="featured-product"]:first-child .featured-product-title a').href:"";else if("Startup V3"==selected_theme_name)product_url=document.querySelector(".product-title a")?document.querySelector(".product-title a").href:"";else if(["Turbo","Turbo Seoul","Turbo Florence","Turbo Portland","Turbo Chicago","Turbo Dubai","Turbo Tennessee"].indexOf(selected_theme_name)>=0)product_url=document.querySelector(".product_section .product_name a")?document.querySelector(".product_section .product_name a").href:"";else if("Palo Alto V3"==selected_theme_name)product_url=document.querySelector('[data-section-type="featured-product"] .featured-product-title a')?document.querySelector('[data-section-type="featured-product"] .featured-product-title a').href:"";else if("Warehouse"==selected_theme_name)product_url=document.querySelector('[data-section-type="product"]:last-child .product-meta__title a')?document.querySelector('[data-section-type="product"]:last-child .product-meta__title a').href:"";else if("Flex"==selected_theme_name)product_url=document.querySelector(".shopify-section.featured-product-section.jsProduct .product-thumbnail__title a")?document.querySelector(".shopify-section.featured-product-section.jsProduct .product-thumbnail__title a").href:"";else if(["Empire V5.1","Superstore V2"].indexOf(selected_theme_name)>=0){let product_links=document.querySelectorAll(".featured-product--container .product-link");product_url=product_links.length?product_links[product_links.length-1].href:""}product_url=product_url.replace(/\/$/,"").split("?")[0].split("#")[0]}else if(is_pages)"Broadcast"==selected_theme_name&&(product_url=document.querySelector('[data-section-type="product"] .product__title a')?document.querySelector('[data-section-type="product"] .product__title a').href:""),"Concept"==selected_theme_name&&(product_url=document.querySelector(".featured-product product-info a.product__more")?.href),product_url=product_url.replace(/\/$/,"").split("?")[0].split("#")[0];else if(is_collection&&!is_product_page){if("Habitat"==selected_theme_name&&(product_url=document.querySelector(".shopify-section.product-section [sa-product-url]")?.href,!product_url)){let intervalId=setInterval((function(){variantImageAutomator(),clearInterval(intervalId)}),200);return}}else product_url=window.location.pathname.replace(/\/$/,"").replace("//","/");if(product_url.length&&(void 0===window.via_product_handle||window.via_product_handle!=product_url)){var productJson;window.via_product_handle=product_url;var variants={},product_variants={};variants.g=[],variants.skipped=[];var product_images=[],default_variant=0,general_images_position="",hide_single_thumb=!1,variant_assigned_images=[],variants_media={},product_media=[];variants_media.g=[],variants_media.skipped=[];var variant_assigned_media=[],product_tags="",variant_assigned_images_ids=[],variant_assigned_media_ids=[],all_variant_media=[],all_variant_images=[];function assign_variants_media(productJson){product_media=productJson.media,productJson.variants.forEach((function(variant){variant.featured_image&&-1==variant_assigned_images_ids.indexOf(variant.featured_image.id)&&(variant_assigned_images_ids.push(variant.featured_image.id),variant_assigned_images.push(variant.featured_image)),variant.featured_media&&-1==variant_assigned_media_ids.indexOf(variant.featured_media.id)&&(variant_assigned_media_ids.push(variant.featured_media.id),variant_assigned_media.push(variant.featured_media)),!default_variant&&variant.available&&(default_variant=variant.id),variant.featured_media&&(all_variant_media[variant.featured_media.id]||(all_variant_media[variant.featured_media.id]=[]),all_variant_media[variant.featured_media.id].push(variant.id)),variants_media[variant.id]=[],variant.featured_image&&(all_variant_images[variant.featured_image.id]||(all_variant_images[variant.featured_image.id]=[]),all_variant_images[variant.featured_image.id].push(variant.id)),variants[variant.id]=[],product_variants[variant.id]=variant}));var general_media=!0,current_variant_ids=[];product_media.forEach((function(media,index){general_media&&-1==variant_assigned_media_ids.indexOf(media.id)?skip_showcase_image>0&&index0&&index{is_product_preview||productJson&&productJson.media||(is_js_data_source&&get_ready_with_data(execute_app_code),is_storefront_data_source&&fetchProductDataFromStoreFront(processJSONInformation))};function run(){if(is_product_preview)try{productJson=JSON.parse(document.querySelector("[sa-product-json]").innerText),processJSONInformation()}catch(e){setTimeout((function(){run()}),100)}handleProductDataFetch()}function execute_app_code(){if(!(is_restrictable()||1==product_media.length&&1==product_images.length||isNoVariantProduct())){is_correct_theme_selected();var nTimer=setInterval((function(){if(("interactive"==document.readyState||"complete"==document.readyState)&&"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&"string"==typeof jQuery.fn.jquery){if(void 0===$)var $=jQuery;clearInterval(nTimer);var section_id=$('[data-section-type="product"]').attr("data-section-id");section_id||(section_id="product-template"),$("body").append(""),$("body").append(""),$("#multi-variant-thumb").html($(".thumbs_nav").html()),$("#multi-variant-info").html($(".primgSlider").html()),$('[data-section-type="product"]').off("variantImageChange"),$('[data-section-type="product"]').off("variantImageChange.slideshow-"+section_id),document.querySelectorAll("#multi-variant-thumb .pr_thumbs_item .lazyloading").forEach((function(el){el.classList.remove("lazyloading"),el.classList.add("lazyload")}));var zTimer=setInterval((function(){"function"==typeof Flickity&&(clearInterval(zTimer),$("body").on("change click","select, .single-option-selector, label",(function(){setTimeout((function(){variant_id=find_current_variant(),selection_vid!=variant_id&&(plidShop_change_images(variant_id),selection_vid=variant_id)}),100)})),plidShop_change_images())}),10);function plidShop_change_images(variant_id){function _setActiveThumbnail(id){void 0===id&&(id="img"+variant_images[0].id);var $thumbnail=$(`.ptContainer .pr_thumbs .pr_thumbs_item #${id} `),activeClass="active-thumb";$(".ptContainer .pr_thumbs .pr_thumbs_item").removeClass("active-thumb"),$thumbnail.parent().addClass(activeClass)}function _enableZoom($el){$($el).hover((function(){var zoomUrl=$(this).data("zoom");$(this).zoom({url:zoomUrl})}),(function(){$(this).trigger("zoom.destroy")}))}function _initThumbnailSlider(){var $carouselNavH=$(".ptw"),$carouselNav=$(".pr_thumbs"),$carouselNavCells=$carouselNav.find(".pr_thumbs_item"),flkty=$(".primgSlider").data("flickity"),navCellHeight=($carouselNav.position().top,$carouselNav.position().left,$carouselNavCells.height()),navCellWidth=$carouselNavCells.width(),navHeight=$carouselNav.height(),navWidth=$carouselNav.width();$(".primgSlider").on("select.flickity",(function(){$carouselNav.find(".active-thumb").removeClass("active-thumb");var $selected=$carouselNavCells.eq(flkty.selectedIndex).addClass("active-thumb");if($(".thumbs_nav.bottom").length||$(window).width()<767){var scrollX=$selected.position().left+$carouselNavH.scrollLeft()-(navWidth+navCellWidth)/2.5;$carouselNavH.animate({scrollLeft:scrollX})}else{var scrollY=$selected.position().top+$carouselNav.scrollTop()-(navHeight+navCellHeight)/2.5;$carouselNav.animate({scrollTop:scrollY})}}));var $primgsl=$(".primgSlider");$(".thumbs_nav .previous").on("click",(function(){$primgsl.flickity("previous")})),$(".thumbs_nav .next").on("click",(function(){$primgsl.flickity("next")})),$(window).on("load",(function(){$primgsl.flickity("resize"),$('.pr_thumb[data-slide="0"] .prvideo').trigger("click");var video=$(".primgSlider .videoSlide.is-selected video").get(0);$(video).length&&video.play()})),$primgsl.on("change.flickity",(function(){$(this).find(".videoSlide video").length&&$(this).find(".videoSlide video").get(0).pause();var video=$(this).find(".videoSlide.is-selected video").get(0);$(video).length&&video.play();var flkty=$(this).data("flickity");$(this).find(".is-selected model-viewer").length?(flkty.options.draggable=!1,flkty.updateDraggable(),$(".is-selected .shopify-model-viewer-ui__button--poster").trigger("click")):(flkty.options.draggable=!0,flkty.updateDraggable())}))}if($("#multi-variant-thumb .pr_thumbs_item ").each((function(index,obj){$(obj).removeClass("active-thumb")})),variant_images=find_variant_media(variant_id),!is_array_equal(last_variant_images,variant_images)){last_variant_images=variant_images;var slide_images="",thumb_images="";$.each(variant_images,(function(index,image){let main=document.querySelector(`#multi-variant-info [id="${image.id}"]`)||document.querySelector(`#multi-variant-info [data-id*="${image.id}"]`),thumb=document.querySelector(`#multi-variant-thumb [id="${image.id}"]`);main.setAttribute("data-slide",index),slide_images+=main.outerHTML,thumb&&(thumb=thumb.closest(".pr_thumbs_item"),0==index&&thumb.classList.add("active-thumb"),thumb.setAttribute("data-slide",index),thumb_images+=thumb.outerHTML)}));$(window).width();$(".primgSlider").flickity("destroy"),document.querySelector(".thumbs_nav .pr_thumbs").innerHTML=thumb_images,document.querySelector(".primgSlider").innerHTML=slide_images,1==variant_images.length&&hide_single_thumb?$(".pr_thumbs").css("opacity",0):$(".pr_thumbs").css("opacity",1),$(".primgSlider").flickity(JSON.parse($(".primgSlider").attr("data-flickity"))),_setActiveThumbnail(),$(".ptContainer .pr_thumbs .pr_thumbs_item").off("click").on("click",(function(evt){evt.preventDefault();var activeClass="active-thumb";$(".ptContainer .pr_thumbs .pr_thumbs_item").removeClass("active-thumb");var $thumbnail=$(`.ptContainer .pr_thumbs .pr_thumbs_item [id*="${evt.target.parentElement.id}"] `)||$(`.ptContainer .pr_thumbs .pr_thumbs_item #${evt.target.id} `);$thumbnail.parent().addClass(activeClass);var slideno=$thumbnail.parent().data("slide");$(".primgSlider").flickity("select",slideno)})),setTimeout((()=>{variant_images.forEach((image=>{_enableZoom(`.primgSlider .pr_photo#${image.id} `)}))}),50),_initThumbnailSlider()}}}}),10)}}run()}}};variantImageAutomator();