window.fgData={"offers":[],"settings":{"auto_add_gift":true,"compare_gift_price_with_product":false,"cal_gift_discount":"current_price","select_one_gift_price":false,"not_show_gift_if_already_on_cart":false,"sync_quantity":false,"manual_input_inventory":false,"using_draft_order":false,"delete_gift_after_turn_off_offer":true,"gift_format":"same_as_original_products","admin_api_access_token":null,"notify_via_email":{"status":false},"barcode":"blank","type_seo":"number_integer","mode_override_checkout":"default"},"appearance":{"gift_slider":{"general":{"gift_popup_title":"Select your free gift!","add_to_cart_btn_title":"Add to cart","running_text":"","select_gift_btn":"Select variants","show_product_title":true,"show_variant_title":true,"show_pagination":true,"show_gift_for_customer":"by_variants","number_product_slider":4},"color":{"gift_slider_title_color":"#121212","product_title_color":"#000000","original_price_color":"#121212","discounted_price_color":"#ea5455","add_to_cart_color":"#FFFFFF","add_to_cart_btn_color":"#7367f0"},"others":{"hidden_brand_mark":false,"gift_img_size":"&width=480&height=480"},"disable_slider_checkbox":{"enable":false,"time":10,"text":"Don't show this offer again"}},"gift_icon":{"gift_icon_path":"https:\/\/d33a6lvgbd0fej.cloudfront.net\/c3VnYXJwYXBlci5teXNob3BpZnkuY29t\/custom-icon-freegift_1694017597.png","shopify_gift_icon_path":"https:\/\/d33a6lvgbd0fej.cloudfront.net\/c3VnYXJwYXBlci5teXNob3BpZnkuY29t\/custom-icon-freegift_1694017597.png","product_page":{"gift_icon":{"status":false,"size":"50"},"gift_thumbnail":{"status":false,"size":"100","title":"Free Gift"}},"collection_page":{"status":false,"size":"50"}},"promotion_message":{"show_on_cart_page":true,"text_color":"#ffffff","background_color":"#F72119"}}};/* END_FG_DATA */
const _0x375bfe=_0x5d4b;function _0x38f2(){let $=["original_price","fgData","gift_items","other_products","childElementCount","product_narrow","catch","substring","concat","set","position","monster_refresh","contains","sca-fg-form-icon-product-page","clone_product_handle","replaceAll","by_variants","add_to_cart_btn_title","others","isUpdateCart",'
{{ fg_gift_thumbnail_title }}
\n\n \n
\n
\n {{ sca_fg_gift_thumbnail_items_section }}\n
\n \n
\n
\n
\n
','\n {{ sca_fg_cart_message_items_section }}\n
',"[type='submit'][name='add'], [type='button'][name='add'], [data-add-to-cart], [data-action='add-to-cart']","#82868b","GIFT_UPDATED","product_id","arrGiftsData","sca_clone_checkout","sca_fetch_cart","format","readystatechange","cart:updated","createElement","NumberFormat","time","$$$$","fg_fetch_attributes","&sca_shop_name=","apply","removeItem","sca_fg_price","cal_gift_for_other_rules","SLIDECART_UPDATED",", .sca_handle_button_checkout, input[name='checkout'], button[name='checkout'], input[name='goto_pp'], button[name='goto_pp'], input[name='goto_gc'], button[name='goto_gc'], a[href$='checkout'], form[action='/checkout'] input[type='submit'], button.new_checkout_button, input[value='Checkout'], input[value='Checkout'], input[value='Check out'], input[value='Check Out'] a.checkout-link ","original_compare_at_price","and","reload","text","fit-content","decompressFromBase64",".sca-list-gift-thumbnail","enable_check_variants_has_gift","headers","sca-promotion-message-layout","SHOPIFY_CART","fg-cart:auto-updated","fetch","gift_products","customer_tags","reduce","Free Gift","#sca_fg_gift_icon_section","sca-fg-out-stock","100","GIFT_THUMBNAIL_ITEMS_SECTION",".dots-thumbnail","currency",".dropdown-menu","forEach","max","Can not fetch all body","renderPromotionMessage","monster-cart:updated","freegifts","sca_root_checkout","readyState","parseFromString","number_of_products","select_one_gift_price","#sca_fg_section_gift_item","order_created_from","data-img",'',"api","fg-checkout:start","GIFT_ICON_SECTION_ID","defineProperty","data-version","object",".btn-add-to-cart.sca-fg-out-stock","getItem","START_VALIDATE_CHECKOUT","sections_url","undefined",".fg-secomapp-collection-img, .product-card, #product-grid .grid__item, .product-grid .grid__item, .card-list .card-list__column, .cc-product-list .product-block, .collection-list.grid .grid__item, .collection-grid.grid .grid__item ","belongs_to_offer","sca_locale","SHOW_GIFT_SLIDER","gift_icon",".fg-secomapp-cart-icon ","Widgets",'a[href*="/collections/sca_fg"]',"product_vendors","fgSettings","sca_slidecart_tcc","176164LBGFYH","split","/cart/add","SLIDECART_OPENED","unshift","[sca_root_checkout]","60%","items","total_spent_on_last_order",".icart-inner .icartContain, .rebuy-cart__flyout-body, #slidecarthq .slidecarthq, #CartPopup .styles_CartPreview__card__KX-WB, #qikify-stickycart-v2-app .qsc2-drawer-wrapper > div:nth-child(2), .satcb-cs .satcb-cs-top-container, #monster-upsell-cart #monster-cart-wrapper div[class*=custom_scrollbar], div[class*=hs-cart-drawer] .hs-site-cart-popup-layout","data-variant","textContent","Add to cart","height","#7367f0","checkout","formatter","product_shopify_id","GIFT_ITEM_SECTION",'\n \n \n \n \n \n ',"this is others","XMLHttpRequest","querySelectorAll","sca_fg_innerHTML","Error listening XHR open","application/liquid","positions","tags","disable_async_process_fg","-sca_clone_freegift","some","#fg-gift-thumbnail-title","hide","location","fgAppearancePromotionMessage","end","fetchCheckoutEvents","END_PROCESS_CART","#fg-gift-thumbnail-title .glider-next","USD","Select your free gift!","HS_SLIDE_CART_CLOSE","SLIDECART_UPDATE","FG_OVERRIDE_XHR_OPEN","condition_result","getCart","stop_offer","GIFT_ITEM_SECTION_ID","#fg-gift-thumbnail-title .glider-prev","92aYHCeY","prepareDataForDisplayWidgetByRule","variant_id","fg-gifts:updated","CartSlider","checked","start_time","show_gift_for_customer","original_product_shopify_id","value",".sca-fg-notifications","fg-xhr:send","json","#sca-gift-thumbnail","auto_add_all_gifts","fg-gifts:render-cart","DONE","querySelector","gift_icon_path","orders","glider-animated","condition_relationship","offer_name","replace","gift_settings","hasAttribute","GIFT_THUMBNAIL_SECTION_ID",".product_name, .product-title, .product__title, .product-single__title, .tt-title, .ProductMeta__Title","email","auto_add_gift","final_price","scaHandleConfigValue","fg-cart:start-process","240","charAt","fg-gifts:added","general","innerHTML","preventDefault","removeEventListener","variant_title","active",".fg-secomapp-handle-add-to-cart ","CART_MSG_ITEM_SECTION","gift_should_the_same","pathname","?sca_process_gifts","show_product_title","data-original-price","mode_override_checkout","Loading...","sca_deplay_cart_msg","current_collection","#sca_fg_gift_thumbnail_items_section",'\n \n \n \n \n \n \n ',"now","parse","CART_AUTO_UPDATED","string","901702xkAbXE","#sca_fg_disable_slider_section","hasDoneProcessCheckout","root","offers","price","sca-gift-icon-collection-img","trigger_body","en-US","searchParams","size","entries","free-gift-icon","secomappGetCartRunning","map","cookie","upcartOnAddToCart","22FTsQmn","6px 0","promotion_message","/cart/add.js","style","type",".gift-original-url","/cart/update","values","quantity","classList","change","tabindex",".icartCheckoutBtn, .rebuy-cart__checkout-button, .qsc2-checkout-button, #mu-checkout-button, .satcb-cs-checkout-btn, .hs-checkout-purchase","Slide Cart - qikify","#MainContent, #mainContent, #main, .main-content",".original-price del","10rgFwWa","slice","GIFT_ADDED","max_amount","GIFT_SELECT_SECTION_ID","parentNode","arrGiftsAdd","is_only",".fg-secomapp-product-title ","GET","fg-checkout","setAttribute","GIFT_THUMBNAIL_ITEMS_SECTION_ID","toString","selling_plan_allocation","HS_SLIDE_CART_UPDATE","arrGiftsRemove","maxOfferPriority","isSameNode","?sca_add_gift","auto","failed to parse cart section ","#sca_fg_section_gifts_popup","stop_lower_priority","upcartOnCartUpdated","Monster Cart","disable_override_xhr","toggle","Error listening XHR send","action","boolean","variant","compare_gift_price_with_product","display","data-fg-checkout-btn","giftsAdded","GIFTS_CART_SECTION","Don't show this offer again","icartSideCartOpenEvent","sca_fg_main_promotion_message_query","data-template","#secomapp_freegifts_version","log","stringify","scaCustomLoadingCheckout","customerLocation","currentTarget","gift_slider","settings","application/json","sca_add_gift","fgAppearance","offer_conditions","sca_amount_fixed","Update cart.attributes ","#sca_fg_gift_thumbnail_section","Failed to get customer location","#sca_fg_cart_message_section","message","closeCart","subscription_products","event auto process gifts with cart","innerText","sca-is-visible-fg","thumbnail","specific_link_address","error","value_customer_locations","disable_slider_checkbox","100%","productsInPage","https://geoip.secomtech.com/?json","customLoadingCheckout","timeoutId",'\n \n ',"freegifts-main-popup-container","POST","#freegifts-main-popup-container [data-close]",'\n {{ fg_variant_title }}\n ',"39669PzqxLn","clone_checkout","fg-cart:added","qikify:cart-change","gift_thumbnail","product_type","insertBefore","invoice_url","info","663467GjHNDa","iCart","track",".selected-variant","80%","original_variant_shopify_id","compare_at_price","scrollItem","compressToBase64","can not check freegifts version","START_PROCESS_CART","Escape","STICKY_CART_UPDATE","selling_plan","checkIsBlockCheckout","routes","priority","URL","using_draft_order","sca-d-none","#sca_fg_cart_message_items_section","/cart.js?sca_fetch&","FGSECOMAPP","show_pagination","indexOf","floor","dataset","function","cart","width","sca-gift-icon-collection-page","not have orders and gifts","disableShopify_getCart","current_variant","get",".btn-add-to-cart","appearance","CUSTOM_EVENTS","total_price",'a[href*="/products/"]',"padding","sca_price","#sca_fg_cart_section_gifts_slider","FGSECOMAPP_HIDDEN_GIFT_POPUP","backgroundColor","sections","fgCallback","FG_CATCH_ADD_CART","title","#fg-gift-items .dropdown","Shopify.getCart","isArray","gift_popup_title","total_spend_on_order_history","prototype","product_collections","number_product_slider","fg-gifts:show-slider","prepend","show_on_cart_page","sca_text_notify_success","disabled","gift_img_size","sca_catch","variants","class","collection_page","freegiftProxy","sca_cart_xhr","Sticky Cart - Codeinero","maxWidth","/cart","initializeForXHR","body","/cart/change","visibility","(Discount)","toFixed","event add gift to cart from popup","#close-fg-toast",".sca-promotion-message-layout","gifts",' ',"sca_add_url","length","text/html","Add gift to cart successfully!","&data_checkout=","Default Title","END_VALIDATE_CHECKOUT","sub_conditions","addEventListener","sca_fg_btn_gift_thumbnail_query","sca-fg-icon-collection-page","find","variants_has_gift","handle","sca_update_url","application/json;","product","cart-items, .cart-header, .section-header","number_of_gift_can_receive","original_product_handle","product_has_icon","variant_shopify_id","sca_link_checkout",", \n .fg-secomapp-cart-item-promotion\n ","key","1440630TkeepW","[data-open]","cloneNode","511344exToFT","#sca-spinner-checkout","vendor","fgAppearanceGiftSlider","redirected","startsWith",".freegifts-main-container .glider-next","#shopify-section-header #cart-icon-bubble","shop","have_not_got_gift_from_this_offer","GIFTS_POPUP_SECTION_ID","Out of stock","select_gift_btn","filter","ajaxProduct:added","open","keyup","max_gifts_can_get","getTime","fg-checkout:end","isDelayShowAdded","giftsAvailable","&width=480&height=480","#fg-gift-items .btn-add-to-cart",".sca-promotion-glider","fgAppearanceGiftIcon","sca_offers_added","GIFT_ICON_SECTION","clearInterval","min_amount","upcartRegisterAddToCart","is_multiply","getElementById","color","data-price","active ","type_customer_locations","#sca-gift-icon","reRenderCartCustom","icartAddToCartEvent","8ThzihO","stopImmediatePropagation","number","arrOfferAdded","{{sca_min_total}}","manual_input_inventory",".dots","upcartOnCartOpened","dispatchEvent","getAttribute","fg-cart:end-process","include","FG_CATCH_UPDATE_CART","compressToEncodedURIComponent","push","parentElement","CART_MSG_ITEM_SECTION_ID","SATCB","click",".freegifts-main-container .glider-prev","?sca_attr_cart","fg-xhr:open","sca-fg-form-thumbnail-product-page","not type checkout btn","variants_quantity","add","SLIDECART_OPEN","show_variant_title","totarrCustomerOrderal_spend_on_order_history","isReachConditions","sca_fg_form_checkbox_button_query","GIFT_SELECT_SECTION",".gift-price","variantId","SLIDECART - HQ","sca-fg-toast sca-fg-success","sca_fg_cart_icon_query","UpCart - AfterSell","div","cartItems","sca_handle_checkout","collections","every","status",'\n
\n {{ fg_slider_title }}\n
\n
\n
\n
\n ❮ \n
\n
\n ❯ \n
\n
\n
\n \n {{ sca_fg_disable_slider_section }}\n
',"Error decoding cookie:","sca_checkout_form","d-block","includes","number_of_order","keys","trim","50%","do_not_add_freegift_attribute","87230CssCIT","product_types",'\n
\n \n \n \n \n \n
',"offer_id","current_product","sections_cart","then","sca-gift-icon","remove","#freegifts-main-popup-container.sca-modal-fg.sca-is-visible-fg","customer_order_history","products","openSlider","target","unit","add_to_cart_btn_color","icartUpdateCartEvent","className","fg-gift-items",'\n \n \n \n ',"item_count","join","customer","scaCountRenderEventCheckout","sync_quantity","#upCartStickyButton .upcart-sticky-cart-quantity-icon-text","sticky-cart:added","href","sca_fg_img_collection_gift_icon_query","hasOwnProperty","money","sca_process_gifts","STICKY_CART_OPEN","auto add gift: ","enable_process_offer_loading","hidden","rate",".freegifts-main-container .slide-container #sca-hidden-gift-popup .sca-disable-checkbox","setItem","rebuy:smartcart.show","appendChild"];return(_0x38f2=function(){return $})()}function _0x5d4b($,x){let e=_0x38f2();return(_0x5d4b=function($,x){return e[$-=425]})($,x)}!function($,x){let e=_0x5d4b,t=$();for(;;)try{let a=-parseInt(e(866))/1+-parseInt(e(974))/2+parseInt(e(506))/3*(parseInt(e(915))/4)+-parseInt(e(427))/5*(-parseInt(e(623))/6)+parseInt(e(515))/7+-parseInt(e(666))/8*(-parseInt(e(626))/9)+parseInt(e(720))/10*(-parseInt(e(991))/11);if(291475===a)break;t.push(t.shift())}catch(i){t.push(t.shift())}}(_0x38f2,291475);try{let $=document[_0x375bfe(658)]("secomapp_freegifts_version")?.[_0x375bfe(675)](_0x375bfe(848));if("3.0"===$){window[_0x375bfe(762)]?.appearance?.gift_icon?.gift_icon_path&&fgGiftIcon&&(window.fgData.appearance[_0x375bfe(859)][_0x375bfe(933)]=fgGiftIcon),window[_0x375bfe(537)]={},FGSECOMAPP[_0x375bfe(444)]=null,FGSECOMAPP[_0x375bfe(705)]=Object[_0x375bfe(999)](Shopify?.[_0x375bfe(705)]??{}),FGSECOMAPP.offers=[],FGSECOMAPP[_0x375bfe(864)]=window[_0x375bfe(762)]?.[_0x375bfe(475)]??{},FGSECOMAPP[_0x375bfe(478)]=window[_0x375bfe(762)]?.[_0x375bfe(551)]??{},FGSECOMAPP[_0x375bfe(629)]=FGSECOMAPP[_0x375bfe(478)]?.[_0x375bfe(474)]?.[_0x375bfe(951)],FGSECOMAPP.fgAppearanceGiftIcon=FGSECOMAPP.fgAppearance?.[_0x375bfe(859)],FGSECOMAPP[_0x375bfe(900)]=FGSECOMAPP[_0x375bfe(478)]?.[_0x375bfe(993)],FGSECOMAPP[_0x375bfe(561)]=[],FGSECOMAPP.secomappGetCartRunning=!1,FGSECOMAPP[_0x375bfe(669)]=[],FGSECOMAPP[_0x375bfe(743)]=0,FGSECOMAPP.checkIsBlockCheckout=!1,FGSECOMAPP[_0x375bfe(946)]={...Shopify?.[_0x375bfe(946)]},FGSECOMAPP[_0x375bfe(664)]=Shopify?.[_0x375bfe(664)]??void 0,FGSECOMAPP[_0x375bfe(471)]=Shopify?.[_0x375bfe(471)]??void 0,FGSECOMAPP[_0x375bfe(497)]={},FGSECOMAPP[_0x375bfe(976)]=!1,FGSECOMAPP[_0x375bfe(725)]={},FGSECOMAPP[_0x375bfe(780)]=!1,FGSECOMAPP[_0x375bfe(815)]={},FGSECOMAPP[_0x375bfe(556)]=Shopify?.[_0x375bfe(801)]??"discounted_price",FGSECOMAPP[_0x375bfe(552)]={SHOW_GIFT_SLIDER:_0x375bfe(572),GIFT_UPDATED:_0x375bfe(918),GIFT_ADDED:_0x375bfe(950),CART_AUTO_UPDATED:_0x375bfe(816),GIFT_TO_CART:_0x375bfe(930),START_PROCESS_CART:_0x375bfe(947),END_PROCESS_CART:_0x375bfe(676),START_VALIDATE_CHECKOUT:_0x375bfe(845),END_VALIDATE_CHECKOUT:_0x375bfe(645),FG_CATCH_ADD_CART:_0x375bfe(508),FG_CATCH_UPDATE_CART:"fg-cart:updated",FG_OVERRIDE_XHR_OPEN:_0x375bfe(687),FG_OVERRIDE_XHR_SEND:_0x375bfe(926)};let x={GIFTS_CART_SECTION_ID:_0x375bfe(557),GIFTS_CART_SECTION:_0x375bfe(710),GIFTS_POPUP_SECTION_ID:_0x375bfe(449),GIFTS_POPUP_SECTION:'\n
✕ \n
\n {{ fg_slider_title }}\n
\n
\n
\n
\n ❮ \n
\n
\n ❯ \n
\n
\n
\n \n {{ sca_fg_disable_slider_section }}\n
',GIFT_ITEM_SECTION_ID:_0x375bfe(840),GIFT_ITEM_SECTION:'\n
\n
\n
\n
\n \n {{ fg_original_price }}\n \n {{ fg_gift_price }} \n
\n \n
\n
\n \n {{ fg_variant_title }}\n \n \n
\n \n
\n \n
\n {{ fg_add_to_cart }}\n \n
\n
\n
',GIFT_SELECT_SECTION_ID:"#sca_fg_variant_select_section",GIFT_SELECT_SECTION:_0x375bfe(505),DISABLE_SLIDER_SECTION_ID:_0x375bfe(975),DISABLE_SLIDER_SECTION:_0x375bfe(843),CART_MSG_SECTION_ID:_0x375bfe(484),CART_MSG_SECTION:_0x375bfe(782),CART_MSG_ITEM_SECTION_ID:_0x375bfe(535),CART_MSG_ITEM_SECTION:'\n {{ fg_cart_message }}\n
',GIFT_THUMBNAIL_SECTION_ID:_0x375bfe(482),GIFT_THUMBNAIL_SECTION:_0x375bfe(781),GIFT_THUMBNAIL_ITEMS_SECTION_ID:_0x375bfe(968),GIFT_THUMBNAIL_ITEMS_SECTION:'',GIFT_ICON_SECTION_ID:_0x375bfe(822),GIFT_ICON_SECTION:_0x375bfe(597)},e=()=>{let $=_0x375bfe,x=FGSECOMAPP.fgAppearance?.[$(474)],e=x?.others?.hidden_brand_mark,t=!E(x)&&void 0!==e&&!e;return t?$(501):""},t=()=>{let $=_0x375bfe,e=FGSECOMAPP[$(478)]?.[$(474)],t=e?.[$(495)]??{};document.querySelector($(757))?.[$(920)]&&localStorage[$(758)]("FGSECOMAPP_HIDDEN_GIFT_POPUP",""+Date[$(970)]());let a=document.querySelector(x.DISABLE_SLIDER_SECTION_ID)?.innerHTML??x.DISABLE_SLIDER_SECTION;return t?.enable?a[$(776)](/{{\s*fg_text_disable_slider\s*}}/gm,_(t.text??$(464))):""},{fetch:a}=window,i=()=>{let $=_0x375bfe;document[$(932)]("#secomapp_freegifts_version")?.[$(675)]("data-template")!==$(437)&&(window[$(817)]=async(...x)=>{let e=$;try{if(x[0][e(714)]("/cart/add")){n(x[1]);let t=200,i=null,r=await a(...x).then($=>{let x=e;return(i=$,t=$.status,$[x(630)])?$:$[x(927)]()}).catch($=>{let x=e;console[x(493)]($)});if(document[e(674)](new CustomEvent(FGSECOMAPP.CUSTOM_EVENTS[e(562)],{detail:{args:x,FGSECOMAPP:FGSECOMAPP}})),x[1].headers?.[e(477)]&&200!==t){let c=JSON[e(971)](x[1][e(588)])?.id,o=document[e(932)]('.btn-add-to-cart[data-variant="'+c+'"]');return o[e(489)]=e(637),o.classList[e(773)]("sca-fg-out-stock")||o[e(1001)].add(e(823)),o[e(576)]=!0,o.style[e(555)]="",o.style.backgroundColor=e(784),document[e(888)](".btn-add-to-cart")[e(829)]($=>{let x=e;parseInt($[x(675)](x(876)))===c||$.classList.contains("sca-fg-out-stock")||($[x(576)]=!1,$[x(995)][x(559)]=FGSECOMAPP.fgAppearance?.[x(474)]?.[x(659)]?.[x(735)]??x(880))}),s(r,i)}return Shopify?.[e(894)]?$c([e(868),...x[e(428)](1)])[e(726)]():(await $c(["/cart/add",...x[e(428)](1)]),await f(x,r)),s(r,i)}if(!(x[0][e(714)](e(589))||x[0].includes(e(998))))return setTimeout(function(){$3()},1e3),await a(...x);{n(x[1]);let d=200,l=null,u=await a(...x)[e(726)]($=>{let x=e;return(l=$,d=$[x(709)],$[x(630)])?$:$[x(927)]()}).catch($=>{let x=e;console[x(493)]($)});if(document[e(674)](new CustomEvent(FGSECOMAPP.CUSTOM_EVENTS[e(678)],{detail:{args:x,FGSECOMAPP:FGSECOMAPP}})),x[1][e(813)]?.[e(751)]&&200!==d)return s(u,l);if(Shopify?.disable_async_process_fg)return $c([x[0][e(714)](e(589))?e(589):e(998),...x[e(428)](1)]).then(),s(u,l);{if(await $c([x[0][e(714)](e(589))?e(589):e(998),...x[e(428)](1)]),x[1]?.[e(813)]?.sca_process_gifts)return s(u,l);let b=FGSECOMAPP[e(815)]??u??{};return await f(x,u,b),s(b,l)}}}catch(g){return await a(...x)}})},r=window[_0x375bfe(887)][_0x375bfe(569)].open,c=window[_0x375bfe(887)][_0x375bfe(569)].send,o=()=>{let $=_0x375bfe;Shopify?.[$(453)]||(window[$(887)][$(569)][$(641)]=function(x,e){let t=$;try{document.dispatchEvent(new CustomEvent(FGSECOMAPP[t(552)][t(909)],{detail:{fgXHR:this}}))}catch(a){console[t(493)](t(890),a)}finally{r[t(799)](this,arguments)}},window[$(887)][$(569)].send=function(x){let e=$;try{document[e(674)](new CustomEvent(FGSECOMAPP[e(552)].FG_OVERRIDE_XHR_OPEN,{detail:{fgXHR:this}}));let{_url:t}=this;(t?.[e(714)](e(868))||t?.[e(714)]("/cart/change")||t?.[e(714)]("/cart/update"))&&this[e(606)](e(791),function(){let $=e;this[$(836)]===XMLHttpRequest[$(931)]&&200===this[$(709)]&&$c([t,{}])[$(726)]()})}catch(a){console[e(493)](e(455),a)}finally{c.call(this,x)}})};FGSECOMAPP[_0x375bfe(587)]=()=>{let $=_0x375bfe;try{if(Shopify?.[$(547)]||typeof Shopify?.[$(911)]!==$(542))return;Shopify[$(911)]=async function(x){let e=$;if(!FGSECOMAPP.secomappGetCartRunning){FGSECOMAPP.secomappGetCartRunning=!0,await $c([e(565),{}]);let t=await $a(e(583));typeof x===e(542)&&(0>FGSECOMAPP[e(561)][e(539)](x)&&FGSECOMAPP[e(561)][e(680)](x),x(t)),FGSECOMAPP[e(987)]=!1}FGSECOMAPP[e(902)]()},"undefined"!=typeof ShopifyAPI&&typeof ShopifyAPI[$(911)]!==$(854)&&(ShopifyAPI[$(911)]=Shopify?.[$(911)]),typeof Shopify?.[$(844)]!==$(854)&&typeof Shopify?.[$(844)][$(911)]!==$(854)&&(Shopify.api[$(911)]=Shopify?.getCart)}catch(x){console[$(493)](x)}};let n=$=>{let x=_0x375bfe;try{let e=$?.[x(588)];e instanceof FormData?FGSECOMAPP[x(725)]={sections:e[x(549)](x(560)),sections_url:e[x(549)](x(853))}:typeof e===x(973)&&(e=JSON[x(971)](e),FGSECOMAPP[x(725)]={sections:e?.[x(560)],sections_url:e?.[x(853)]})}catch(t){FGSECOMAPP.sections_cart={}}},s=($,x)=>{let e=_0x375bfe;try{let t=Shopify?.[e(797)]??["url",e(996),e(630),"ok"],a=new Response(JSON[e(470)]($),x);for(let i of t)Object[e(847)](a,i,{value:x[i]});return a}catch(r){return new Response(JSON.stringify($))}},d=async()=>{let $=_0x375bfe;if(Shopify[$(719)])return;let x={freegift_attributes:""};if(!E(FGSECOMAPP[$(669)])){let e=["SECOMAPP_FREEGIFT"];for(let t of FGSECOMAPP.arrOfferAdded){let i=FGSECOMAPP[$(978)][$(609)](x=>x.id===t[$(856)])?.[$(605)]?.[$(492)];E(i)||e.push(i)}x={freegift_attributes:e[$(440)]()}}try{await a((Shopify?.[$(612)]??$(998))+$(686),{method:"POST",headers:{"X-Requested-With":$(887),"Content-Type":$(613)},body:JSON.stringify({attributes:x})})}catch(r){console[$(493)]($(481)+r[$(485)])}},f=async($,x,e)=>{let t=_0x375bfe;try{if($[1]?.[t(813)]?.[t(751)])return;let i={},r=Object.keys(x[t(560)]??{})?.filter($=>E(FGSECOMAPP[t(725)][$]))??[];if(r&&r[t(599)]&&FGSECOMAPP[t(780)]&&(i=await a("/?sections="+r[t(741)](","))[t(726)]($=>$.json())),FGSECOMAPP[t(780)]=!1,i={...FGSECOMAPP[t(725)],...i},E(i))return;x[t(560)]={...x.sections,...i},E(e)||(e[t(560)]={...x[t(560)]})}catch(c){}},l=async($,x,e)=>{let t=_0x375bfe;e=e?.[t(440)]();let a=document.querySelectorAll(t(649));a[t(829)](x=>{let e=t;x.disabled=!0;let a=x[e(675)]("data-variant")-0;a===$&&(x[e(995)][e(555)]=e(992),x[e(952)]=e(885)),x[e(995)][e(559)]=e(784)});let i=FGSECOMAPP[t(669)][t(609)](x=>e===x[t(856)]?.toString()&&$===x[t(699)]);i?i[t(1e3)]+=x:FGSECOMAPP[t(669)][t(870)]({variantId:$,belongs_to_offer:e,quantity:x}),localStorage[t(758)](t(652),LZString.compressToBase64(JSON.stringify(FGSECOMAPP.arrOfferAdded))),g("start");let r=await fetch((Shopify?.[t(598)]??t(994))+t(446),{method:t(503),headers:{Accept:t(476),"Content-Type":t(476),sca_add_gift:!0},body:JSON.stringify({quantity:x,id:$})}),c=await r[t(927)]();r.ok&&(a.forEach(x=>{let e=t;x[e(576)]=!0;let a=x[e(675)]("data-variant")-0;a===$&&(x[e(995)][e(555)]=e(992),x[e(952)]=e(739)),x[e(995)].backgroundColor=""}),$o()),document.dispatchEvent(new CustomEvent(FGSECOMAPP[t(552)][t(429)],{detail:{gift:c,status:r.ok,FGSECOMAPP:FGSECOMAPP}}))},u=$=>{let x=_0x375bfe,e=x(895);return!E($)&&(typeof $===x(849)&&($[x(611)]?.[x(714)](e)||$[x(893)]?.includes("freegifts"))||typeof $===x(973)&&$.includes(e))},b=$=>{let x=_0x375bfe,{selling_plan_allocation:e}=$;return!E(e)&&!E(e?.[x(528)])},g=$=>{let x=_0x375bfe;try{if(!Shopify?.[x(754)])return;let e=x(1004),t=e+", .sca_handle_button_checkout, input[name='checkout'], button[name='checkout'], input[name='goto_pp'], button[name='goto_pp'], input[name='goto_gc'], button[name='goto_gc'], a[href$='checkout'], form[action='/checkout'] input[type='submit'], button.new_checkout_button, input[value='Checkout'], input[value='Checkout'], input[value='Check out'], input[value='Check Out'] a.checkout-link "+I("sca_fg_form_checkbox_button_query");document[x(888)](t).forEach(e=>{let t=x;FGSECOMAPP[t(499)]($,e)[t(726)]()})}catch(a){}},p=async($,x)=>{let e=_0x375bfe;try{if(E($)&&E(x))return;let t={};if(FGSECOMAPP[e(705)]?.filter($=>u($))?.forEach($=>{let x=e;t[$[x(917)]]=$[x(1e3)]}),($=$?.[e(639)]($=>!E($[e(917)])))?.forEach($=>{let x=e;t[$[x(917)]]=(t[$[x(917)]]??0)+($[x(1e3)]??1)}),Object[e(716)](t)?.[e(829)]($=>{t[$]=t[$]>=0?t[$]:0}),E(Object.keys(t)))return;$?.[e(829)]($=>{let x=e,t=FGSECOMAPP[x(669)][x(609)](e=>$[x(723)]?.[x(440)]()===e.belongs_to_offer?.[x(440)]()&&$[x(917)]===e.variantId);t?t[x(1e3)]+=$[x(1e3)]:FGSECOMAPP[x(669)][x(870)]({variantId:$[x(917)],belongs_to_offer:$.offer_id?.[x(440)](),quantity:$.quantity})}),localStorage[e(758)](e(652),LZString[e(523)](JSON[e(470)](FGSECOMAPP[e(669)]))),FGSECOMAPP[e(780)]=!0,g("start"),await fetch((Shopify?.sca_update_url??e(998))+e(961),{method:"POST",headers:{Accept:e(476),"Content-Type":e(476),sca_process_gifts:!0},body:JSON[e(470)]({updates:t,...FGSECOMAPP.sections_cart})})[e(726)](t=>{let a=e;return t.ok&&$.length&&!x[a(599)]&&$o(),t[a(927)]()})[e(726)]($=>{let x=e;FGSECOMAPP[x(725)]=$[x(560)]}),document[e(674)](new CustomEvent(FGSECOMAPP.CUSTOM_EVENTS[e(972)],{detail:{arrGiftsAdd:$,arrGiftsRemove:x,FGSECOMAPP:FGSECOMAPP}})),document[e(932)](e(468))?.[e(675)]("data-template")===e(437)&&location[e(807)]()}catch(a){g(e(901)),console[e(493)](a)}},_=($,x=!1)=>{let e=_0x375bfe;return(""+$)[e(776)](/\$/g,x?e(796):"$")},h=0,m=()=>{let $=_0x375bfe,a=document.getElementById("freegifts-main-page-container");if(a){let i=document[$(932)](x.GIFTS_CART_SECTION_ID)?.[$(952)]??x[$(463)];a[$(952)]=i[$(776)](/{{\s*fg_slider_title\s*}}/gm,_(FGSECOMAPP[$(629)][$(567)]??$(906)))[$(776)](/{{\s*sca_fg_disable_slider_section\s*}}/gm,_(e()))}else{let r=localStorage[$(851)]($(558))-0,c=FGSECOMAPP.fgAppearance?.gift_slider?.[$(495)]??{},o=(c?.[$(795)]??0)*6e4,n=!isNaN(r)&&r+o>Date[$(970)]();if(n||(localStorage[$(800)]($(558)),!(a=document[$(658)]($(502)))))return;let s=document[$(932)](x[$(636)])?.innerHTML??x.GIFTS_POPUP_SECTION;a.innerHTML=s.replaceAll(/{{\s*fg_slider_title\s*}}/gm,_(FGSECOMAPP[$(629)][$(567)]??$(906)))[$(776)](/{{\s*sca_fg_disable_slider_section\s*}}/gm,_(t()+" "+e())),a[$(1001)][$(691)]($(490)),h++}},y=($,e)=>{let t=_0x375bfe,a=document[t(932)](x[t(431)])?.[t(952)]??x[t(697)];return $.map($=>a[t(776)](/{{\s*fg_variant_img\s*}}/gm,_(z($[t(491)]??e),!0))[t(776)](/{{\s*fg_variant_id\s*}}/gm,_($[t(619)]))[t(776)](/{{\s*fg_original_variant_id\s*}}/gm,_($.original_variant_shopify_id))[t(776)](/{{\s*fg_variant_price\s*}}/gm,_(v($)))[t(776)](/{{\s*fg_original_variant_price\s*}}/gm,_(T($)))[t(776)](/{{\s*fg_variant_title\s*}}/gm,_($[t(955)])))[t(741)](" \n")},v=$=>{let x=_0x375bfe;return FGSECOMAPP.formatter[x(790)](A($?.price))},T=$=>{let x=_0x375bfe,e=FGSECOMAPP?.[x(864)]?.cal_gift_discount==="compare_at_price"?$?.original_compare_at_price??$?.[x(761)]:$?.[x(761)];return FGSECOMAPP[x(882)].format(A(e??0))},C=($,x)=>{let e=_0x375bfe;return E(Shopify?.products[$])?x??"#":Shopify?.[e(731)][$][e(611)]},S=($,x)=>{let e=_0x375bfe;return FGSECOMAPP[e(629)][e(962)]?E(Shopify?.products[$])?x[e(938)]("\xbb","")[e(938)](/\(\d*% off\)/,"")[e(938)](e(591),"")??"":Shopify?.[e(731)][$][e(563)]:""},E=$=>{let x=_0x375bfe;if(0===$)return!0;if(typeof $==x(668)||typeof $==x(457))return!1;if(null==$)return!0;if(typeof $[x(599)]!=x(854))return 0===$.length;let e=0;for(let t in $)$[x(749)](t)&&e++;return 0===e},I=$=>{let x=_0x375bfe;try{let e={...FGSECOMAPP[x(946)]},t=e[$];if(t=t?t[x(717)]():null,!E(t)&&t[x(599)]>0)try{return document[x(932)](t),", "+t}catch(a){}return""}catch(i){return""}},w=()=>{let $=_0x375bfe;try{FGSECOMAPP[$(882)]=new Intl[$(794)](Shopify?.[$(857)]??Shopify?.locale,{style:$(827),currency:Shopify?.currency?.[$(956)]??$(905)})}catch(x){FGSECOMAPP[$(882)]=new Intl[$(794)]($(982),{style:$(827),currency:Shopify?.currency?.[$(956)]??$(905)})}},A=$=>{let x=_0x375bfe;$=$??0;let e=Shopify?.currency?.[x(756)]??1;return 1===parseFloat(e)?$:($*e)[x(592)](Shopify?.fg_decimal??2)},k=$=>{let x=_0x375bfe;try{return $[FGSECOMAPP[x(556)]]??$?.[x(945)]??$?.[x(979)]}catch(e){return $?.final_price??$?.price}},O=$=>{let x=_0x375bfe;return $[x(639)]($=>void 0===$[x(802)]||!0===$[x(802)])[x(820)](($,x)=>$+x.quantity*k(x),0)/100},D=$=>{let x=_0x375bfe;return $.filter($=>void 0===$[x(802)]||$[x(802)]).reduce(($,e)=>$+e[x(1e3)],0)},P=($,x,e)=>{let t=_0x375bfe,a=x[t(766)];return e?.[t(434)]&&($=$[t(639)]($=>b($))),E(a)?$:$[t(639)]($=>{let x=t;return!a.map(x=>{let e=_0x5d4b;switch(x[e(996)]){case"variants_ids":return Object[e(999)](x.value).map($=>$[e(458)]).flat()[e(988)]($=>$.id)[e(714)]($[e(917)]);case e(721):return Object[e(716)](x[e(924)])[e(714)]($[e(511)]);case e(863):return Object[e(716)](x[e(924)])[e(714)]($.vendor);case e(570):let t=Object.keys(x[e(924)]),a=$[e(707)]?.[e(988)]($=>$.id+"")?.[e(639)]($=>t[e(714)]($));return!E(a);default:return!1}})[x(714)](!1)})},R=($,x)=>{let e=_0x375bfe;return $?.[e(988)]($=>{let t=e;if(typeof $[t(802)]!==t(854)){let a=FGSECOMAPP[t(669)]?.[t(639)](x=>x[t(699)]===$[t(917)]),i=a?.[t(820)](($,x)=>$+x[t(1e3)],0);if(i===$[t(1e3)]){let r=a?.filter(e=>{let a=t;if(e[a(856)]?.[a(440)]()===x[a(440)]())return!1;let i=FGSECOMAPP.offers?.[a(609)]($=>$.id?.[a(440)]()===e[a(856)]?.toString()),r=i[a(939)]??{},c=k($);return r[a(802)]&&c>0})?.reduce(($,x)=>$+x[t(1e3)],0);return{...$,cal_gift_for_other_rules:r>0,quantity:r??0}}return{...$,cal_gift_for_other_rules:!1,quantity:0}}return{...$}})??[]},G=($,x,e,t)=>{let a=_0x375bfe,i=0,r=P(x,$,t);r=R(r,$[a(723)]);let c;return $[a(734)]===a(750)?c=O(r):$[a(734)]===a(838)&&(c=D(r)),c>=$[a(655)]&&(null===$[a(430)]||c<=$[a(430)])&&(i=e[a(616)],$[a(657)]&&(i=Math[a(540)](c/$[a(655)])*i)),i},N=($,x,e,t)=>{let a=_0x375bfe,i={},r=[],c=0;return x[a(988)](x=>{let i=a,o=G(x,$,e,t);0!==o&&(c=o),r[i(680)](o>0)}),i[a(643)]=c,i[a(910)]=r,i},F=($,x)=>{let e=_0x375bfe,t=!1;return 1===$[e(599)]?t=$[0]:2===$[e(599)]&&(x===e(806)&&(t=$[0]&&$[1]),"or"===x&&(t=$[0]||$[1])),t},L=($,x)=>{let e=_0x375bfe,t=$?.[e(988)]($=>$[e(917)]);FGSECOMAPP[e(669)]=FGSECOMAPP.arrOfferAdded[e(639)]($=>t?.includes($[e(699)]));let a=x[e(763)][e(988)]($=>$[e(619)]),i=FGSECOMAPP[e(669)][e(639)]($=>$[e(856)]?.[e(440)]()===x.id?.[e(440)]())?.[e(988)]($=>{let x=e;return $[x(699)]}),r=$[e(639)]($=>{let x=e;return u($)&&($[x(802)]=!1),a[x(714)]($.variant_id)&&i[x(714)]($[x(917)])}),c=r.map($=>{let t=e,a=x[t(939)];$[t(802)]=a[t(802)],$[t(856)]=x.id?.[t(440)]();let i=FGSECOMAPP[t(669)]?.[t(639)](e=>e.belongs_to_offer?.[t(440)]()!==x.id?.[t(440)]()&&$[t(917)]===e[t(699)])?.[t(820)](($,x)=>$+x[t(1e3)],0);return{...$,quantity:$[t(1e3)]-i}});return c.filter($=>{let t=e;return $[t(856)]?.[t(440)]()===x.id?.toString()})},q=$=>{let x=_0x375bfe,e=$[x(462)][x(639)](e=>e.belongs_to_offer?.[x(440)]()!==$.id?.[x(440)]())[x(988)]($=>$[x(786)]);return Object.values($.gift_products)[x(639)]($=>!e[x(714)]($[x(883)]))},M=($,x)=>{let e=_0x375bfe,t=L($,x),a=N($,x.offer_conditions,x[e(939)],x[e(605)]?.[e(487)]),i=F(a[e(910)],x[e(936)]);if(i){let r=t.filter($=>$.belongs_to_offer?.[e(440)]()===x.id?.[e(440)]()).reduce(($,x)=>$+x[e(1e3)],0);a[e(643)]=a[e(643)]-r,x[e(462)]=t,x.giftsAvailable=a[e(643)]}else x.giftsAdded=t,x.giftsAvailable=0;return typeof FGSECOMAPP.maxOfferPriority===e(668)&&x[e(531)]>FGSECOMAPP.maxOfferPriority&&(i=!1),i||!x[e(450)]||FGSECOMAPP[e(444)]!==x[e(531)]||E(t)||(FGSECOMAPP[e(444)]=null),x[e(695)]=i,x[e(450)]&&i&&(null==FGSECOMAPP[e(444)]||x[e(531)]<=FGSECOMAPP.maxOfferPriority)&&FGSECOMAPP[e(444)]!==x[e(531)]&&(FGSECOMAPP.maxOfferPriority=x[e(531)]),x},H=$=>{let x=_0x375bfe,e=$+"=",t=document[x(989)].split(";");for(let a=0;a{let e=_0x375bfe,t=!0,a=!0,i=!0,r=!0;if(!E($[e(605)]?.[e(492)])){let c=H("sca_fg_codes");t=c&&JSON[e(971)](c)[e(714)]($[e(605)][e(492)])}if(!E($[e(605)]?.[e(819)])){let{customer_tags:o}=$[e(605)],n=o?.value_customer_tags?.[e(896)]($=>x.customer[e(893)]?.[e(714)]($));a=o?.type_customer_tags===e(677)?n:!n}if(!E($[e(605)]?.customer_locations)){let{customer_locations:s}=$[e(605)],d=s?.[e(494)]?.[e(714)](FGSECOMAPP[e(472)]);r=s?.[e(662)]===e(677)?d:!d}if(!E($[e(605)]?.customer_order_history)){let f=!0,l=$[e(605)][e(730)],u=x[e(742)][e(934)]??[];if(l[e(841)]){let b=Date.parse(l.order_created_from)/1e3;u=u.filter($=>$.created_at>=b)}if(!E(l?.[e(694)])&&(0!==l[e(568)][e(655)]||0!==l.total_spend_on_order_history.max_amount)){let g=l[e(568)][e(655)],p=l[e(568)][e(430)],_=u[e(820)](($,x)=>$+x[e(553)],0)/100;f&=(_>=g||!g)&&(_<=p||!p)}if(!E(l?.[e(874)])&&(0!==l[e(874)][e(655)]||0!==l[e(874)][e(430)])){let h=x[e(742)].last_total/100,m=l[e(874)].min_amount,y=l[e(874)][e(430)];f&=(h>=m||!m)&&(h<=y||!y)}if(!E(l?.[e(715)])){let v=!(0!==l[e(715)][e(655)]||0!==l[e(715)][e(430)]),T=u.length,C=l[e(715)][e(655)],S=l[e(715)][e(430)];f&=v?E(u):(T>=C||!C)&&(T<=S||!S)}if(l?.[e(635)]){let I=x[e(742)][e(834)]??[],w=$[e(763)]?.[e(896)]($=>I[e(714)]($.variant_shopify_id))||$[e(763)]?.[e(896)]($=>I[e(714)]($[e(520)]+"_"+($[e(761)]-$[e(979)])*100));f&=!w}i=f}return t&&a&&i&&r},B=($,x,e)=>{let t=_0x375bfe,a=[],i=[],r=[],c=[];for(let o of x){let n=M($,o);if(!n[t(695)]){n[t(462)].length>0&&n[t(462)][t(829)]($=>{let x=t;i[x(680)]({variant_id:$[x(917)],quantity:$[x(1e3)],offer_id:o.id})});continue}if(n[t(647)]<0){n.giftsAdded[t(829)]($=>{let x=t;i.push({variant_id:$[x(917)],quantity:$[x(1e3)],offer_id:o.id})});continue}0!==n.giftsAvailable&&(o.sub_conditions?U(o,SECOMAPP)&&a[t(680)](o):a[t(680)](o))}if($?.[t(829)]($=>{let x=t;E($[x(856)])&&u($)&&i[x(680)]({variant_id:$[x(917)],quantity:$[x(1e3)],offer_id:$[x(856)]?.[x(440)]()})}),e||E(i)){let s=a[t(988)]($=>{let x=t;return{id:$.id,offerName:$[x(937)],offerPriority:$[x(531)],stopLowerPriority:$[x(450)],gifts:q($),giftsAvailable:$.giftsAvailable,giftsAdded:$[x(462)],isReachConditions:$[x(695)]}});if(!E(s)){let d={};for(let f of s){let l=W(FGSECOMAPP.fgSettings,f);l?.[t(599)]>0?r=r.concat([...l]):f.gifts[t(988)]($=>{let x=t;d[$[x(883)]]={...$,belongs_to_offer:f.id?.toString()}})}c=Object[t(999)](d)??[]}}return{arrGiftsAdd:r,arrGiftsRemove:i,arrGiftsData:c}},j=($,x)=>{let e=_0x375bfe,t=new Set;return $?.[e(829)]($=>t.add($.offer_id)),t.forEach($=>{let x=e,t=FGSECOMAPP[x(978)]?.[x(609)](x=>x.id?.toString()===$?.toString());if(E(t)||!t.isReachConditions){FGSECOMAPP[x(669)]=FGSECOMAPP.arrOfferAdded?.[x(639)](e=>e[x(856)]?.toString()!==$?.[x(440)]());return}if(t[x(647)]>=0)return;let a=[],i=FGSECOMAPP[x(669)]?.[x(639)](e=>e[x(856)]?.[x(440)]()===$?.toString())??[];if(t?.[x(939)]?.[x(929)])a=a.concat([...i]),t[x(647)]=0;else for(let r of i){if(t[x(647)]>=0)break;t[x(647)]+=r[x(1e3)],t[x(647)]<=0?a[x(680)]({...r}):(r[x(1e3)]=t[x(647)],t[x(647)]=0)}a?.[x(829)]($=>{let e=x;FGSECOMAPP[e(669)]=FGSECOMAPP.arrOfferAdded?.[e(639)](x=>$[e(699)]!==x[e(699)]||$[e(856)]?.[e(440)]()!==x[e(856)]?.toString())})}),x?.filter($=>{let x=e;return u($)&&($[x(1e3)]=FGSECOMAPP.arrOfferAdded?.[x(639)](e=>$[x(917)]===e.variantId)?.[x(820)](($,e)=>$+e[x(1e3)],0)??0),$[x(1e3)]>0})??[]},V=async($,x)=>{let e=_0x375bfe,{arrGiftsAdd:t,arrGiftsRemove:a,arrGiftsData:i}=B($,x,!1),r=j(a,$);if(!E(a)){let c=B(r,x,!0);j(c?.arrGiftsRemove,$),t=c?.[e(433)],a=a?.concat(c?.[e(443)])??[],i=c?.[e(787)]}return await p(t,a),d()[e(726)](),i},W=($,x)=>{let e=_0x375bfe,t=[];if($[e(944)]){let a=x[e(596)],i=a[e(820)](($,x)=>$+x[e(579)].length,0),r=FGSECOMAPP[e(978)][e(639)]($=>$.id===x.id),c=r[0][e(939)][e(929)],o=r[0].gift_should_the_same;if(1===i||c||o[e(709)]){if($.not_show_gift_if_already_on_cart&&!Q(a)||$?.compare_gift_price_with_product&&!J(a))return!1;if(o[e(709)]){if("variant"===o[e(996)]){let n=FGSECOMAPP.cartItems;n=n[e(639)]($=>{let x=e;return $[x(786)]===a[0].original_product_shopify_id});let s=a[0][e(579)][e(639)]($=>{let x=e;return n[0].variant_id===$[x(520)]})[0];if(0===s[e(979)])return t[e(680)]({variant_id:s[e(619)],quantity:x[e(647)],offer_id:x.id}),t}else if(c){let d=a?.reduce(($,x)=>($+x?.[e(579)]?.[e(599)])??0,0);if(!d)return!1;let f=(x?.[e(647)]??0)/d;for(let l of a)for(let u of l[e(579)])t[e(680)]({variant_id:u.variant_shopify_id,quantity:f,offer_id:x.id});return t}}else{if(c){let b=a?.reduce(($,x)=>($+x?.[e(579)]?.[e(599)])??0,0);if(!b)return!1;let g=(x?.[e(647)]??0)/b;for(let p of a)for(let _ of p[e(579)])t.push({variant_id:_[e(619)],quantity:g,offer_id:x.id});return t}{let h=a[0][e(579)][0];if(0===h[e(979)])return console[e(469)](e(753)+a[0][e(579)][0].variant_shopify_id+" "+a[0][e(579)][0].variant_title),t[e(680)]({variant_id:h.variant_shopify_id,quantity:x[e(647)],offer_id:x.id}),t}}}}return!1},X=$=>{let x=_0x375bfe;return $===x(603)},z=$=>{let x=_0x375bfe;try{let e=Shopify.customGiftImgSize??FGSECOMAPP.fgAppearance?.gift_slider?.others?.[x(577)]??x(648),t=new URL($),a=new URLSearchParams(e);return a[x(829)](($,e)=>t[x(983)][x(770)](e,$)),t[x(440)]()}catch(i){return $}},Y=$=>{let e=_0x375bfe,t=$;if("by_variants"===FGSECOMAPP.fgAppearanceGiftSlider[e(922)])for(let a of(t=[],$)){let i=a.variants;i&&i[e(599)]&&i.forEach($=>t[e(680)]({...a,thumbnail:$[e(491)],variants:[$]}))}let r=document[e(658)](e(738));r&&(r[e(952)]=t[e(988)]($=>{let t=e,a=$?.[t(579)][0]??{},i=X(a[t(955)]),r=$[t(579)]?.[t(599)],c=_(S($[t(923)],$.title)),o=FGSECOMAPP[t(629)]?.[t(922)]===t(777),n=document[t(932)](x[t(913)])?.[t(952)]??x[t(884)];return n[t(776)](/{{\s*fg_product_handle\s*}}/gm,_(C($[t(923)],$.original_product_handle),!0))[t(776)](/{{\s*fg_product_img\s*}}/gm,_(z($[t(491)]),!0))[t(776)](/{{\s*fg_product_img_alt\s*}}/gm,c)[t(776)](/{{\s*fg_product_title\s*}}/gm,c).replaceAll(/{{\s*fg_gifts_check_show_by_variants\s*}}/gm,_(o&&FGSECOMAPP[t(629)][t(693)]?"":t(534)))[t(776)](/{{\s*fg_gifts_check_show_by_products\s*}}/gm,o?"sca-d-none":"")[t(776)](/{{\s*fg_check_selected_variant\s*}}/gm,1===r?t(661)+(i?t(534):""):"")[t(776)](/{{\s*fg_variant_title\s*}}/gm,_(1!==r?FGSECOMAPP.fgAppearanceGiftSlider[t(638)]??"Select variant":a.variant_title))[t(776)](/{{\s*fg_original_price\s*}}/gm,_(T(a)))[t(776)](/{{\s*fg_gift_price\s*}}/gm,_(v(a)))[t(776)](/{{\s*sca_fg_variant_select_section\s*}}/gm,_(y($[t(579)],$[t(491)]))).replaceAll(/{{\s*fg_product_belongs_to_offer\s*}}/gm,$.belongs_to_offer).replaceAll(/{{\s*fg_variant_id\s*}}/gm,_(1===r?a[t(619)]:""))[t(776)](/{{\s*fg_add_to_cart\s*}}/gm,_(FGSECOMAPP[t(629)]?.[t(778)]??t(878)))}).join(" \n"),new Glider(document[e(932)]("#fg-gift-items"),{slidesToShow:1,slidesToScroll:1,draggable:!1,dots:FGSECOMAPP[e(629)][e(538)]?e(672):null,arrows:{prev:e(685),next:e(632)},responsive:[{breakpoint:1024,settings:{slidesToShow:FGSECOMAPP[e(629)][e(571)]??4,slidesToScroll:1}},{breakpoint:768,settings:{slidesToShow:3,slidesToScroll:1}},{breakpoint:576,settings:{slidesToShow:2,slidesToScroll:1}}]}),document[e(674)](new CustomEvent(FGSECOMAPP[e(552)][e(858)],{detail:FGSECOMAPP})))},K=async()=>{let $=_0x375bfe;try{let x=window[$(762)]?.[$(978)]??[];for(let e in await $m(),Shopify?.products)E(Shopify?.products[e]?.id)&&delete Shopify?.[$(731)][e];let t=[];return x[$(829)](x=>{let e=$;try{let a=JSON[e(971)](JSON.stringify(x));if(x[e(959)][e(709)]){let i=x[e(479)][0][e(766)],r=i[0].value,c=[...a[e(763)]],o=[...a[e(818)]];if(x[e(959)].type===e(458))for(let n in r){let s=r[n]?.[e(458)]??[];for(let d of s){a[e(479)][0][e(766)]=[{type:i[0].type,value:{[n]:{...r[n],variant:[{...d}]}}}],a[e(763)]=c[e(639)]($=>$.original_product_shopify_id+""===n&&d.id===$[e(520)]),a[e(818)]=o[e(639)]($=>$[e(923)]+""===n),a[e(818)][0][e(579)]=[...a.gift_items];let f=a[e(939)].number_of_gift_can_receive,l=a[e(939)][e(929)];a[e(939)][e(929)]&&(f=a[e(763)][e(599)]),1===a.gift_items[e(599)]&&0===a[e(763)][0][e(979)]&&(l=!0),t[e(680)](JSON[e(971)](JSON.stringify({...a,gift_settings:{...a[e(939)],number_of_gift_can_receive:f,auto_add_all_gifts:l},id:a.id+"_"+r[n][e(611)]+"_"+d.id})))}}else if("product"===x[e(959)].type)for(let u in r){a[e(479)][0][e(766)]=[{type:i[0][e(996)],value:{[u]:r[u]}}],a[e(763)]=c[e(639)]($=>$[e(923)]+""===u),a[e(818)]=o.filter($=>$[e(923)]+""===u);let b=a.gift_settings[e(616)],g=a[e(939)][e(929)];a[e(939)].auto_add_all_gifts&&(b=a.gift_items[e(599)]),1===a[e(763)].length&&0===a[e(763)][0][e(979)]&&(g=!0),t[e(680)](JSON[e(971)](JSON[e(470)]({...a,gift_settings:{...a.gift_settings,number_of_gift_can_receive:b,auto_add_all_gifts:g},id:a.id+"_"+r[u].handle})))}}}catch(p){console.error(p)}}),(x=(x=(x=x?.[$(639)](x=>!x?.[$(959)]?.status)?.[$(769)](t))?.map(x=>{let e=$;return{...x,id:x.id[e(440)]()}}))?.[$(639)](x=>{let e=$;if(!$0(x[e(921)],x.end_time))return!1;let t=!E(x.sub_conditions?.[e(730)]||x[e(605)]?.[e(819)]);if(x[e(605)]&&(!U(x,SECOMAPP)||t&&E(SECOMAPP[e(742)][e(943)])))return!1;let a={...Shopify?.products},i=!1;if("stop_offer"===FGSECOMAPP[e(864)][e(744)]){x[e(763)]=x?.[e(763)][e(639)]($=>{let x=e,t=a[$[x(923)]]?.[x(690)]??{};return t[$[x(520)]]>0})??[];let r=x[e(763)]?.map($=>$[e(619)]);x[e(818)]=x?.[e(818)]?.[e(639)]($=>{let x=e;return $[x(579)]=$?.[x(579)]?.[x(639)]($=>{let e=x;return r?.[e(714)]($[e(619)])}),$?.variants?.[x(599)]>0}),i=!0}else if(FGSECOMAPP[e(864)].manual_input_inventory){x[e(763)]=x?.[e(763)].filter($=>{let x=e,t=a[$[x(883)]]?.[x(690)]??{};return t[$.variant_shopify_id]>0});let c=x[e(763)]?.[e(988)]($=>$[e(619)]);x[e(818)]=x?.[e(818)]?.filter($=>{let x=e;return $.variants=$?.[x(579)]?.[x(639)]($=>{let e=x;return c?.[e(714)]($[e(619)])}),$?.[x(579)]?.[x(599)]>0}),i=!0}return i&&x[e(939)]?.[e(929)]&&(x[e(939)][e(616)]=x.gift_items?.length),!i||x[e(763)]&&x[e(763)][e(599)]>0}))?.[$(988)](x=>{let e=$,t=x[e(763)].map($=>$[e(923)]);return x.gift_products=x.gift_products?.[e(639)]($=>{let x=e;return t[x(714)]($[x(923)])}),x[e(479)]?.[e(829)]($=>{let x=e;$.unit===x(750)&&($[x(655)]=A($[x(655)]),$.max_amount=E($.max_amount)?$.max_amount:A($.max_amount))}),x})}catch(a){return console[$(493)](a),[]}},Q=$=>{let x=_0x375bfe;for(let e of FGSECOMAPP.cartItems){let t=e[x(786)];if($[0][x(923)]===t)return!1}return!0},J=$=>{let x=_0x375bfe;for(let e of FGSECOMAPP.cartItems){let t=$[0][x(579)][0][x(761)];if(FGSECOMAPP.fgSettings[x(459)]===x(521)&&(t=$[0].variants[0][x(805)]),t>k(e)/100)return!1}return!0},Z=async()=>{let $=_0x375bfe;try{let x=[];window[$(762)]?.[$(978)]?.[$(829)](e=>{let t=$,a=[];e[t(818)].forEach($=>{let x=t;a[x(680)]($[x(775)],$[x(617)])}),x=[...x,...a]}),await $_(x=(x=[...new Set(x)])[$(639)](x=>E(FGSECOMAPP[$(497)][x]))),Object.values(FGSECOMAPP.productsInPage)?.[$(829)]($=>{let{info:x}=$;E(x)||E(x?.id)||(Shopify.products[x.id]={...x})})}catch(e){console[$(493)](e)}},$$=async $=>{let x=_0x375bfe;try{Shopify[x(731)]=Shopify?.products??{}}catch(e){}w(),FGSECOMAPP[x(902)](),(FGSECOMAPP?.[x(864)]?.[x(744)]===x(912)||FGSECOMAPP?.[x(864)]?.[x(671)])&&await Z(),FGSECOMAPP[x(978)]=await K(),FGSECOMAPP[x(587)](),i(),o();try{E($)?(FGSECOMAPP[x(669)]=[],localStorage[x(758)](x(652),LZString[x(523)](JSON[x(470)](FGSECOMAPP[x(669)])))):FGSECOMAPP[x(669)]=JSON[x(971)](LZString[x(810)](localStorage[x(851)](x(652))))}catch(t){FGSECOMAPP[x(669)]=[],localStorage.setItem("sca_offers_added",LZString[x(523)](JSON[x(470)](FGSECOMAPP[x(669)])))}let a={};FGSECOMAPP[x(978)]?.[x(829)]($=>{let e=x;a[$.id]=$?.[e(763)]?.[e(988)]($=>$[e(619)])});let r=Object[x(716)](a);FGSECOMAPP.arrOfferAdded=FGSECOMAPP[x(669)]?.[x(639)]($=>r?.[x(714)]($[x(856)]?.[x(440)]())&&a[$[x(856)]?.[x(440)]()][x(714)]($[x(699)]));let c={};FGSECOMAPP.arrOfferAdded?.forEach($=>{let e=x,t=c[$[e(856)]+"_"+$[e(699)]]??{};c[$[e(856)]+"_"+$[e(699)]]={...$,belongs_to_offer:$.belongs_to_offer?.[e(440)](),quantity:(t?.[e(1e3)]??0)+($?.[e(1e3)]??0)}}),FGSECOMAPP[x(669)]=Object[x(999)](c),localStorage[x(758)](x(652),LZString.compressToBase64(JSON[x(470)](FGSECOMAPP.arrOfferAdded)));let n=await V($,FGSECOMAPP.offers);await $e(n),$h(),$5(),$3()},$x=function(){let $=_0x375bfe,x=document.querySelectorAll($(624)),e=document.querySelectorAll($(504)),a=$(490),i=document[$(888)]($(649)),r=i[$(599)];for(let c=0;c{let e=$;x.target===document[e(932)]("#freegifts-main-popup-container.sca-modal-fg.sca-is-visible-fg")&&(document.querySelector("#freegifts-main-popup-container.sca-modal-fg.sca-is-visible-fg")[e(1001)][e(728)](a),t())}),document[$(606)]($(642),x=>{let e=$;x[e(622)]===e(526)&&document[e(932)](e(729))&&(document[e(932)](e(729))[e(1001)][e(728)](a),t())}),document[$(888)]($(564)).forEach(x=>x[$(606)]("click",function(){let x=$;this[x(438)](x(1003),1),this.focus(),this[x(1001)][x(454)]("active"),this[x(932)](x(828))[x(1001)][x(454)](x(713))})),document[$(888)]($(564))[$(829)](x=>document[$(606)]($(684),function(e){let t=$,a=x[t(773)](e.target);a||(x[t(1001)][t(728)](t(956)),x[t(932)](t(828))[t(1001)][t(728)](t(713))),document.querySelectorAll(t(850))[t(829)]($=>{let x=t;$[x(576)]=!0,$[x(995)][x(559)]=x(784)})})),document[$(888)]("#fg-gift-items .dropdown > .dropdown-menu > li").forEach(x=>{let e=$;x.addEventListener(e(684),function(){let $=e,x=this[$(675)]("id"),t=this[$(675)]($(842)),a=this[$(675)]($(660)),i=this[$(675)]($(963)),r=this.getAttribute("data-original-id"),c=this.parentElement[$(681)][$(681)][$(681)];c.querySelector(".product-item-thumbnail")[$(438)]("src",t);let o=new URL(c[$(932)]($(997))[$(747)]);o[$(983)].set($(458),r),c.querySelector($(997)).href=o[$(440)]();let n=this.parentElement.parentElement[$(681)];n[$(932)]($(426))[$(877)]=i,n.querySelector($(698))[$(877)]=a;let s=n?.querySelector($(550));s[$(438)]($(876),x),s[$(576)]=!1,s.style="";let d=this[$(681)][$(681)][$(932)]($(518));d.classList[$(691)]("active"),d[$(952)]=this[$(489)]})}),document[$(888)]($(649))[$(829)](x=>x[$(606)]($(684),async function(){let x=$,e=this[x(675)](x(876))-0,t=this[x(675)]("data-offer");try{await l(e,1,t);let i=document[x(932)](x(729));i&&(FGSECOMAPP[x(646)]=!0,await new Promise($=>setTimeout($,800)),i[x(1001)][x(728)](a)),window[x(899)][x(747)][x(714)](x(586))?location[x(807)]():typeof Shopify?.[x(911)]===x(542)&&await Shopify?.[x(911)](0===FGSECOMAPP[x(561)][x(599)]?function(){}:FGSECOMAPP.fgCallback[0])}catch(r){console[x(493)](r)}}))},$0=($,x)=>{let e=_0x375bfe;if($){let t=new Date,a=t.getTime(),i=new Date($)[e(644)]();if(!x)return a>=i;{let r=new Date(x)[e(644)]();return a>=i&&a<=r}}return!1},$e=async $=>{let x=_0x375bfe;if(FGSECOMAPP.fgSettings?.[x(839)])for(let e of FGSECOMAPP[x(705)])u(e)&&($=$[x(639)]($=>$[x(883)]!==e[x(786)]));if(FGSECOMAPP[x(864)]?.not_show_gift_if_already_on_cart)for(let t of FGSECOMAPP[x(705)])$=$[x(639)]($=>$.original_product_shopify_id!==t[x(786)]);if(FGSECOMAPP[x(864)]?.[x(459)])for(let a of FGSECOMAPP[x(705)])$=$[x(639)]($=>{let e=x;return $[e(579)]=$.variants[e(639)]($=>{let x=e,t=$[x(761)];return FGSECOMAPP[x(864)]?.[x(459)]===x(521)&&(t=$.original_compare_at_price),t<=k(a)/100}),!E($.variants)});$&&$[x(599)]>0&&(FGSECOMAPP[x(646)]?(await new Promise($=>setTimeout($,1500)),FGSECOMAPP.isDelayShowAdded=!1,m(),Y($)):(m(),Y($))),$x(),FGSECOMAPP.fetchCheckoutEvents(),FGSECOMAPP[x(832)](FGSECOMAPP.offers),$r=[]},$t=async $=>{let x=_0x375bfe;$r=[];let e=new URL(window[x(899)].href);e[x(983)].set(x(789),""),a(e[x(440)]())[x(726)]($=>$[x(808)]()).then($=>{let e=x,t=new DOMParser,a=t[e(837)]($,e(600)),i=".fg-secomapp-cart-drawer "+I("sca_fg_cart_drawer_query"),r=e(860)+I(e(702)),c=document[e(932)](i),o=!1;c&&(o=!0,c[e(952)]=a[e(932)](i)?.[e(952)]??c[e(952)]);let n=document.querySelector(r);n||(n=document[e(932)]("#shopify-section-header #cart-icon-bubble, .shopify-section.section-header #cart-icon-bubble")),n&&(o=!0,n[e(952)]=a[e(932)](r)?.[e(952)]??a[e(932)](e(633))?.[e(952)]??n[e(952)]),o||console[e(469)](e(831))}),typeof FGSECOMAPP?.reRenderCartCustom===x(542)&&await FGSECOMAPP.reRenderCartCustom(),document.dispatchEvent(new CustomEvent(FGSECOMAPP[x(552)][x(785)],{detail:FGSECOMAPP})),g("end"),setTimeout(function(){$e($)},800)},$a=async $=>{let x=_0x375bfe,e=await a(x(536)+($??""),{method:x(436),headers:{Accept:"application/json","Content-Type":"application/json"}})[x(726)]($=>$[x(927)]()),t=e[x(873)];return FGSECOMAPP.SHOPIFY_CART=e,FGSECOMAPP.cartItems=t?.[x(988)]($=>({...FGSECOMAPP.cartItems?.find(x=>x.id===$.id),...$}))??[],e},$i=async()=>{let $=_0x375bfe,x=FGSECOMAPP.SHOPIFY_CART;try{await a(SECOMAPP[$(582)],{method:$(436),headers:{"Content-Type":$(891)}})[$(726)](async e=>{let t=$,a=await e[t(927)]();FGSECOMAPP[t(705)]=a?.cart?.[t(988)]($=>{let x=t;return{...FGSECOMAPP[x(705)]?.[x(609)](x=>x.id===$.id),...$[x(614)],collections:$[x(707)],tags:$.tags}})??[],FGSECOMAPP[t(815)]=a?.shopify_cart??{},x=FGSECOMAPP[t(815)]})[$(767)](async e=>{let t=$;console.error(t(448)+e[t(485)]),x=await $a()})}catch(e){console[$(493)]($(578),e.message),x=await $a()}return x},$r=[],$c=async $=>{let x=_0x375bfe;try{$r[x(680)]($[0]),document[x(674)](new CustomEvent(FGSECOMAPP.CUSTOM_EVENTS[x(525)],{detail:{events:$r,FGSECOMAPP:FGSECOMAPP}})),await $i();let e=await V(FGSECOMAPP.cartItems,FGSECOMAPP[x(978)]);FGSECOMAPP[x(832)](FGSECOMAPP[x(978)]);let t=!1;return $[0][x(631)](x(868))&&JSON[x(470)]($[1].headers??[])[x(714)](x(477))?(console[x(469)](x(593),[...$r]),await $t(e),t=!0):$[0].startsWith(x(998))&&JSON.stringify($[1].headers??[])[x(714)](x(751))?(console[x(469)](x(488),[...$r]),await $t(e),t=!0):(console[x(469)](x(886),[...$r]),await $e(e)),t&&(window[x(899)][x(747)].includes(x(586))||"fg-checkout"===document[x(932)]("#secomapp_freegifts_version")?.getAttribute(x(467)))&&($r=[],location.reload()),document[x(674)](new CustomEvent(FGSECOMAPP[x(552)][x(903)],{detail:{events:$r,FGSECOMAPP:FGSECOMAPP}})),FGSECOMAPP[x(705)]}catch(a){console[x(493)](a)}},$o=()=>{let $=_0x375bfe;if(!Shopify?.enable_toast_added)return;let x=document[$(932)]($(925));if(!x)return;x[$(952)]="";let e=Shopify?.[$(575)]??$(601),t=document[$(793)]("li");t.className=$(701),t[$(952)]=$(722)+e+$(969),x[$(760)](t),t[$(500)]=setTimeout(()=>$n(t),3e3),document[$(932)]($(594))?.[$(606)]($(684),()=>$n(t))},$n=$=>{let x=_0x375bfe;$[x(1001)][x(691)](x(898)),$[x(500)]&&clearTimeout($[x(500)]),setTimeout(()=>$.remove(),500)},$s=$=>{let x=_0x375bfe;try{let e=FGSECOMAPP[x(864)]?.[x(964)],t=e===x(981)?$[x(733)]:$.currentTarget??$.target;t?.[x(940)]("sca_handle_checkout")||(t=document[x(932)](x(627))?.parentNode);let a=JSON[x(971)](t.getAttribute(x(461)));if(t[x(924)]=a?.[x(924)]??"",t[x(952)]=a?.innerHTML??"",t[x(576)]=!1,t[x(954)](x(684),$d),t.removeAttribute(x(706)),"clone_checkout"===e){t.parentNode.querySelector(x(871)).click();return}e===x(981)&&window[x(954)]("click",$f,!0),t[x(684)]()}catch(i){window[x(899)][x(938)]((Shopify?.[x(530)]?.[x(977)]??"/")+x(881)),console[x(493)](i[x(485)])}};FGSECOMAPP[_0x375bfe(499)]=async($,x)=>{let e=_0x375bfe;if("start"===$&&x)x[e(576)]=!0,x[e(438)](e(461),JSON[e(470)]({innerHTML:x[e(952)],value:x[e(924)]})),typeof FGSECOMAPP?.[e(471)]===e(542)?await FGSECOMAPP.scaCustomLoadingCheckout($):(x[e(924)]=Shopify?.sca_fg_value_checkout??e(965),x[e(952)]=Shopify?.[e(889)]??'\n Loading... \n
');else if($===e(901)&&x){if(typeof FGSECOMAPP?.[e(471)]===e(542))await FGSECOMAPP.scaCustomLoadingCheckout($);else{let t=JSON[e(971)](x[e(675)](e(461)));x[e(924)]=t?.[e(924)]??"",x[e(952)]=t?.[e(952)]??""}x.disabled=!1}else $===e(493)?(typeof FGSECOMAPP?.[e(471)]===e(542)&&await FGSECOMAPP[e(471)]($),window[e(899)][e(938)]((Shopify?.routes?.[e(977)]??"/")+e(881))):console.error("Cannot define custom loading with type: ",$)};let $d=async $=>{let x=_0x375bfe;try{$[x(953)](),$.stopPropagation(),$[x(667)]();let e=FGSECOMAPP[x(864)]?.[x(964)],t=e===x(981)?$[x(733)]:$[x(473)]??$[x(733)],{form:i}=t;if(await FGSECOMAPP[x(499)]("start",t),document[x(674)](new CustomEvent(FGSECOMAPP[x(552)][x(852)],{detail:FGSECOMAPP})),FGSECOMAPP[x(529)])return!1;FGSECOMAPP[x(529)]=!0;try{let r=new URL(i[x(456)]);r[x(983)].append(x(712),""),await a(r[x(440)](),{method:x(503),body:new FormData(i)})}catch(c){console.log(x(689))}if(E(FGSECOMAPP.offers)&&E(FGSECOMAPP[x(705)]?.find($=>u($))))return console[x(469)](x(546)),$s($),!1;await $i();let o=[...FGSECOMAPP[x(705)]],n=!1;for(let s of FGSECOMAPP[x(978)])if(s[x(462)]&&s[x(462)][x(599)]){let d=M(o,s),f=$0(s[x(921)],s.end_time);!f&&d.giftsAdded.length>0&&(n=!0),d[x(695)]||(n=!0),d[x(647)]<0&&(n=!0),s.sub_conditions&&!U(s,SECOMAPP)&&(n=!0)}if(await V(o,FGSECOMAPP[x(978)]),n)location[x(807)]();else try{FGSECOMAPP[x(864)][x(533)]&&!E(FGSECOMAPP[x(705)]?.[x(609)]($=>u($)))?await a(SECOMAPP[x(582)]+x(798)+Shopify?.[x(634)],{method:x(436),headers:{"Content-Type":x(891)}})[x(726)](async $=>{let e=x,t=await $[e(927)]();t.cart=(t[e(543)]??[])[e(988)]($=>{let x=e;return $[x(614)][x(707)]=$.collections?.[x(988)]($=>({id:$.id})),$[x(614)][x(893)]=$[x(893)],{id:$[x(614)].id,variant_id:$.product.variant_id,title:$.product.title,handle:$[x(614)][x(611)],price:k($[x(614)]),quantity:$[x(614)][x(1e3)],product_type:$[x(614)].product_type,vendor:$[x(614)][x(628)],tags:$.product.tags,collections:$[x(614)][x(707)],selling_plan_allocation:$[x(614)][x(441)]}}),t[e(779)]={arr_offer_added:FGSECOMAPP[e(669)],secomapp:{customer:SECOMAPP?.[e(742)]??{},fg_codes:SECOMAPP?.fg_codes??[],fgSettings:FGSECOMAPP[e(864)]},cookie_fg_code:H("sca_fg_codes"),shopify_currency:Shopify?.[e(827)]},await a(SECOMAPP[e(582)]+e(602)+LZString[e(679)](t=JSON[e(470)](t)),{method:"GET",headers:{"Content-Type":e(891)}})[e(726)](async $=>{let x=e,t=await $[x(927)]();try{FGSECOMAPP[x(529)]=!1,t[x(620)]&&(window[x(899)].href=t[x(620)][x(513)])}catch(a){console[x(493)](a)}})}):(console[x(469)]("not using draft order"),FGSECOMAPP[x(529)]=!1,$s($))}catch(l){FGSECOMAPP.checkIsBlockCheckout=!1,$s(l)}await FGSECOMAPP[x(499)](x(901),t=e===x(981)?$[x(733)]:$[x(473)]??$[x(733)]),document[x(674)](new CustomEvent(FGSECOMAPP[x(552)][x(604)],{detail:FGSECOMAPP}))}catch(b){await FGSECOMAPP[x(499)](x(493)),document[x(674)](new CustomEvent(FGSECOMAPP[x(552)][x(604)],{detail:FGSECOMAPP})),console[x(493)](b)}},$f=async $=>{let x=_0x375bfe;$[x(733)]?.[x(940)]("sca_handle_checkout")&&await $d($)},$l=()=>{let $=_0x375bfe,x=FGSECOMAPP[$(864)]?.[$(964)],e=$(1004),t=e+$(804)+I($(696));document.querySelectorAll(t)[$(829)](e=>{let t=$,a=e[t(940)](t(835)),i=e.hasAttribute(t(788)),r=e[t(940)]("sca_handle_checkout");if(x===t(507)){if(a)return;if(!i&&!r){let c=e.cloneNode(!0);c[t(606)]("click",$d),c[t(438)]("sca_handle_checkout",""),c[t(438)](t(788),""),e.style[t(460)]="none",e.style[t(590)]=t(755),e[t(995)].opacity="0",e.setAttribute(t(835),""),e[t(432)]?.[t(760)](c)}i&&!r&&(e[t(606)]("click",$d),e[t(438)](t(706),""))}else"trigger_body"===x?e.setAttribute("sca_handle_checkout",""):r||(e[t(606)](t(684),$d),e[t(438)](t(706),""));FGSECOMAPP.hasDoneProcessCheckout=!0}),"trigger_body"===x&&window.addEventListener("click",$f,!0)};FGSECOMAPP[_0x375bfe(902)]=()=>{FGSECOMAPP.scaCountRenderEventCheckout=0;let $=setInterval(()=>{let x=_0x5d4b;$l(),FGSECOMAPP[x(743)]++,(FGSECOMAPP.scaCountRenderEventCheckout>10||FGSECOMAPP[x(976)])&&(FGSECOMAPP.scaCountRenderEventCheckout=0,clearInterval($))},400)};let $1=$=>{let x=_0x375bfe;try{let e={},t={},a=FGSECOMAPP[x(978)];if(E($)){$=[],E(Shopify?.current_product)||$.push({...Shopify?.[x(724)]});let i={...Shopify?.[x(764)],...Shopify?.[x(967)]?.[x(731)]};Object[x(999)](FGSECOMAPP[x(497)])?.filter($=>!E($.info)&&(E($?.product_has_icon)||$?.[x(618)]&&!$?.[x(892)]?.[x(708)]($=>$?.[x(1001)]?.[x(773)](x(545)))))?.[x(829)]($=>{let e=x;i[$.info.id]={...$[e(514)]}}),$=$[x(769)]([...Object[x(999)](i)])}for(let r in $?.[x(829)]($=>{let e=x,t=FGSECOMAPP[e(497)][$[e(611)]];FGSECOMAPP.productsInPage[$[e(611)]]={...t,info:{...$},product_has_icon:!!E(a)&&void 0}}),a?.forEach(a=>{let i=x,r=a[i(479)];if(1===r[i(599)]&&"number_of_products"===r[0][i(734)]&&typeof r[0][i(657)]===i(457)){let c,o=r[0].product_narrow;o?.[i(829)](x=>{let e=i;switch(x[e(996)]){case"variants_ids":c=Object[e(999)](x[e(924)]);break;case e(721):let t=Object[e(716)](x[e(924)]);t.length>0&&(c=(void 0===c?$:c)?.[e(639)]($=>t.includes($[e(996)]))??[]);break;case e(863):let a=Object[e(716)](x.value);a.length>0&&(c=(void 0===c?$:c)?.filter($=>a[e(714)]($[e(628)]))??[]);break;case e(570):let r=Object.keys(x.value);r.length>0&&(c=(void 0===c?$:c)?.[e(639)]($=>{let x=e,t=$[x(707)]?.[x(988)]($=>$.id+""),a=t?.[x(639)]($=>r[x(714)]($));return!E(a)})??[])}}),c?.[i(829)]($=>{let x=i,r=$[x(611)];if(e[r]){let c=e[r]?.map($=>$[x(923)]),o=a[x(818)]?.[x(639)]($=>!c?.includes($[x(923)]));e[r]=e[r][x(769)](o)}else e[r]=a[x(818)];let n=$[x(458)]?.map($=>$.id)??[];t[r]=n[x(769)](t[r]??[]),t[r]=[...new Set(t[r])]})}}),e){let c=FGSECOMAPP.productsInPage[r];FGSECOMAPP.productsInPage[r]={...c,gifts_will_receive:[...e[r]],product_has_icon:!0,variants_has_gift:[...t[r]]}}return Object[x(985)](e)?.length?e:{}}catch(o){return console.error(o),null}},$8=$=>{let e=_0x375bfe,t=FGSECOMAPP[e(651)].product_page??{};if(!t[e(510)]?.[e(709)])return;let a=document.querySelector(x[e(439)])?.[e(952)]??x[e(825)],i=$?.[e(988)]($=>a[e(776)](/{{\s*fg_product_handle\s*}}/gm,_(C($[e(923)],$[e(617)]),!0))[e(776)](/{{\s*fg_product_img\s*}}/gm,_(z($.thumbnail),!0))[e(776)](/{{\s*fg_product_img_alt\s*}}/gm,_(S($[e(923)],$[e(563)]))))[e(741)](""),r=document.querySelector(x[e(941)])?.[e(952)]??x.GIFT_THUMBNAIL_SECTION,c=r[e(776)](/{{\s*fg_gift_thumbnail_title\s*}}/gm,_(t.gift_thumbnail?.[e(563)]??e(821))).replaceAll(/{{\s*sca_fg_gift_thumbnail_items_section\s*}}/gm,i)[e(776)](/{{\s*fg_check_show_narrow\s*}}/gm,$?.[e(599)]>=4?"":e(534)),o=e(957)+I(e(607)),n=document[e(932)](o)??document[e(932)](e(783));if(!n)return;n[e(432)].style.width=e(496),n[e(432)][e(995)][e(879)]=e(447),n[e(432)]?.[e(737)]?.[e(714)](e(688))||n[e(432)]?.[e(1001)]?.[e(691)](e(688));let s=n[e(432)][e(932)](e(928));if(s)s[e(952)]=c;else{(s=document[e(793)](e(704)))[e(438)]("id","sca-gift-thumbnail");let d=new DOMParser()[e(837)](c,"text/html");s[e(952)]=d[e(588)][e(952)],n[e(432)][e(512)](s,n)}n[e(432)][e(512)](s,n);let f=document[e(932)](e(897));if(f)switch(t[e(510)]?.[e(984)]){case"32":f.style[e(585)]=e(718);break;case"50":f[e(995)][e(585)]=e(872);break;case e(824):f[e(995)][e(585)]="70%";break;case"160":f[e(995)].maxWidth=e(519);break;case e(948):f[e(995)].maxWidth=e(496);break;default:f[e(995)][e(585)]=e(872)}if($?.[e(599)]>=4)new Glider(document[e(932)](e(811)),{slidesToShow:3,slidesToScroll:1,draggable:!0,dots:e(826),arrows:{prev:e(914),next:e(904)}});else{f&&(f.style[e(585)]=e(496));let l=document[e(932)](".sca-list-gift-thumbnail");l&&(l[e(995)][e(460)]="flex")}},$u=()=>{let $=_0x375bfe;if(!(FGSECOMAPP[$(651)].product_page??{})[$(859)]?.[$(709)])return;let e=document[$(932)](x[$(846)])?.[$(952)]??x.GIFT_ICON_SECTION,t=e[$(776)](/{{\s*fg_gift_icon\s*}}/gm,FGSECOMAPP[$(651)][$(933)])[$(776)](/{{\s*fg_gift_icon_alt\s*}}/gm,$(986))[$(776)](/{{\s*fg_class_product_or_collection_page\s*}}/gm,"sca-gift-icon-img"),a=$(435)+I("sca_fg_title_product_gift_icon_query"),i=document[$(932)](a)??document.querySelector($(942));if(!i)return;i[$(995)].position="relative",i[$(995)][$(544)]=$(809),i.className?.[$(714)]($(774))||i[$(1001)]?.add("sca-fg-form-icon-product-page");let r=i[$(932)]($(663));if(r)r[$(952)]=t;else{(r=document[$(793)]($(704))).setAttribute("id",$(727));let c=new DOMParser()[$(837)](t,$(600));r[$(952)]=c[$(588)].innerHTML,i[$(760)](r)}},$b=()=>{let $=_0x375bfe,x=[],e=$(855)+I($(748));return document[$(888)](e)[$(829)](e=>{let t=$,a=e[t(932)](t(554)),i=a?.getAttribute(t(747))?.split("/")??[],r=i?.[t(539)](t(731)),c=r>=0?i[r+1]??null:null;if(c=c?.[t(867)]("?")?.shift(),u(c)){e[t(728)]();return}let o=e.querySelector(t(862));if(o){e[t(728)]();return}if(E(c))return;let n=decodeURI(c);E(FGSECOMAPP[t(497)][n]?.[t(514)])&&x[t(680)](n);let s=(FGSECOMAPP.productsInPage[n]?.[t(892)]??[])[t(639)]($=>!e[t(445)]($));s[t(680)](e),FGSECOMAPP.productsInPage[n]={...FGSECOMAPP[t(497)][n],positions:[...s]}}),x},$g=$=>{let e=_0x375bfe;Object[e(716)]($)?.[e(829)]($=>{let t=e,a=FGSECOMAPP[t(497)][$]?.[t(892)]??[];if(E(a)||!Array[t(566)](a))return;if(!(FGSECOMAPP[t(651)][t(581)]??{})[t(709)])return;let i=document.querySelector(x.GIFT_ICON_SECTION_ID)?.[t(952)]??x[t(653)],r=i[t(776)](/{{\s*fg_gift_icon\s*}}/gm,FGSECOMAPP[t(651)][t(933)])[t(776)](/{{\s*fg_gift_icon_alt\s*}}/gm,t(986))[t(776)](/{{\s*fg_class_product_or_collection_page\s*}}/gm,t(980));a[t(829)]($=>{let x=t;$.style[x(771)]="relative",$[x(737)]?.[x(714)](x(608))||$[x(1001)]?.[x(691)](x(608));let e=$[x(932)](".sca-gift-icon-collection-page");if(e)e[x(952)]=r;else{(e=document[x(793)](x(704)))[x(438)](x(580),x(545));let a=new DOMParser()[x(837)](r,"text/html");e.innerHTML=a.body.innerHTML,$.appendChild(e)}})})},$p=async $=>{let x=_0x375bfe;await a(SECOMAPP[x(582)]+"&sca_products_handle="+LZString[x(679)](JSON[x(470)]($)),{method:x(436),headers:{"Content-Type":x(891)}})[x(726)](async $=>{let e=x,t=await $[e(927)](),a=[];t?.[e(731)]?.[e(829)]($=>{let x=e;E($?.[x(731)]?.id)||a[x(680)]({...$.products,collections:$[x(707)],variants_quantity:$[x(690)]})});let i=$1(a);$g(i)}).catch($=>{let e=x;console[e(493)]($)})},$_=async $=>{let x=_0x375bfe,e=[];for(let[t,a]of $.entries())E(FGSECOMAPP[x(497)][a]?.[x(514)])&&e[x(680)](a),20===e[x(599)]&&(await $p([...e]),e=[]),t===$[x(599)]-1&&e.length>0&&(await $p([...e]),e=[])},$3=()=>{let $=_0x375bfe,x=$b(),e=$1();$g(e),$_(x)[$(726)]()},$h=()=>{let $=_0x375bfe;Shopify?.enable_check_variants_has_gift&&document.addEventListener($(1002),function(){let x=$,e=new URL(document[x(532)]),t=parseInt(e[x(983)][x(549)]("variant"));$5(isNaN(t)?void 0:t)})},$5=$=>{let x=_0x375bfe;if(!location[x(747)].includes("/products/"))return;document[x(932)](x(663))?.[x(728)](),document.querySelector(x(928))?.[x(728)]();let e=$1();if(E(e))return;let t=location[x(960)].split("/"),a=t?.[x(539)](x(731)),i=decodeURI(a>=0?t[a+1]??null:null);if(!Object[x(716)](e)?.[x(714)](i))return;let r=e[i],c=FGSECOMAPP[x(497)][i]?.[x(610)]??[];!(Shopify?.[x(812)]&&(!E($)&&!c[x(714)]($)||E($)&&!E(Shopify?.current_product?.current_variant)&&!c[x(714)](Shopify?.[x(724)]?.[x(548)]?.id)))&&($8(r),$u(r))};FGSECOMAPP[_0x375bfe(832)]=$=>{let e=_0x375bfe;try{E($)&&($=[...FGSECOMAPP[e(978)]]);let t=location[e(747)][e(714)](e(586)),a=[];if($?.[e(829)]($=>{let x=e;if($[x(695)]||E($[x(993)])||!E(FGSECOMAPP.maxOfferPriority)&&!$[x(695)]&&$[x(450)]&&$.priority>FGSECOMAPP[x(444)])return;let t=$[x(993)];$[x(479)]?.[x(829)]($=>{let e=x,a=P(FGSECOMAPP.cartItems,$);a=R(a,$[e(723)]);let i=0,r=null,c=0;$.unit===e(750)?(i=O(a),r=e(670),c=Shopify?.[e(480)]??2):"number_of_products"===$[e(734)]&&(i=D(a),r="{{sca_min_quantity}}",c=0);let o=Math[e(830)]($[e(655)]-i,0).toFixed(c);t=t[e(776)](r,o)}),a[x(680)](t)}),E(a)){document[e(888)](e(595)).forEach($=>$[e(952)]="");return}let i="",r=document[e(932)](x[e(682)])?.[e(952)]??x[e(958)],c=a[e(988)]($=>r.replaceAll(/{{\s*fg_cart_message\s*}}/gm,_($))).join(""),o=document[e(932)](x.CART_MSG_SECTION_ID)?.[e(952)]??x.CART_MSG_SECTION,n=o[e(776)](/{{\s*sca_fg_cart_message_items_section\s*}}/gm,c);FGSECOMAPP.fgAppearancePromotionMessage[e(574)]&&(i=n);let s=e(425),d=document[e(932)](s),f=d?.[e(932)](e(615)),l=e(875),u=document.querySelectorAll(l+e(621)+I(e(466))),b=document[e(888)](e(595));E(b)||b[e(829)]($=>$[e(952)]=i),(b=document[e(793)]("div"))[e(438)]("id","sca-promotion-message-layout"),b[e(1001)][e(691)](e(814));let g=new DOMParser()[e(837)](i,e(600));b[e(952)]=g[e(588)][e(952)],E(u)?!d?.[e(932)](e(595))&&(g=new DOMParser().parseFromString(i,e(600)),b[e(952)]=g[e(588)][e(952)],d&&f&&t?f[e(573)](b):d&&t&&d[e(573)](b)):u?.[e(829)]($=>{let x=e;if($[x(932)](".sca-promotion-message-layout"))return;let t=b[x(625)](!0);$[x(573)](t)});try{document.querySelectorAll(e(650))[e(829)]($=>{let x=e,t=new Glider($);(($,x)=>{let e=_0x5d4b,t=$[e(517)][e(765)],a=null,i=1;function r(){a=setTimeout(()=>{let x=_0x5d4b;i>=t&&(i=0),$[x(522)](i++)},x)}$.ele[e(606)](e(935),function(){window[e(654)](a),r()}),r()})(t,Shopify?.[x(966)]??3e3)})}catch(p){console.error(p)}}catch(h){console[e(493)](h)}};let $m=async()=>{let $=_0x375bfe;try{let x=await a($(498)),e=await x[$(927)]();FGSECOMAPP[$(472)]=e?.country_code}catch(t){console[$(469)]($(483))}},$6=function(){let $=_0x375bfe;try{let x=()=>{let $=_0x5d4b;"function"!=typeof FGSECOMAPP[$(664)]&&"function"==typeof window[$(916)]&&(FGSECOMAPP[$(664)]=async()=>{let x=$;console[x(469)](x(516)),await window[x(916)]()})};x(),window.addEventListener($(465),function(x){let e=$;FGSECOMAPP[e(832)](),FGSECOMAPP[e(902)]()}),window[$(606)]($(665),function(e){let t=$;x(),$c([t(665),{}])[t(726)](()=>{window[t(916)]()})}),window[$(606)]("icartUpdateCartEvent",function(e){let t=$;x(),$c([t(736),{}])[t(726)](()=>{window[t(916)]()})}),document.addEventListener($(759),x=>{let e=$;FGSECOMAPP[e(832)](),FGSECOMAPP[e(902)]()});let e=()=>{let x=$;typeof FGSECOMAPP.reRenderCartCustom!==x(542)&&typeof window[x(908)]===x(542)&&(FGSECOMAPP[x(664)]=async()=>{let $=x;console[$(469)]($(700)),await $a($(865)).then(x=>{window[$(908)](x),window.SLIDECART_OPEN()})})};e(),window[$(803)]=function(x){let t=$;e();let a={...FGSECOMAPP[t(815)]};$c([t(803),{}])[t(726)](()=>{let $=t;$a($(865)).then(x=>{let e=$;window.SLIDECART_CLOSE(),window[e(908)](x),document.querySelector(e(729))||E(a)||window[e(692)]()})})},window[$(869)]=function(){let x=$;FGSECOMAPP[x(832)](),FGSECOMAPP[x(902)]()};let t=()=>{let x=$,e=document.querySelector(x(745));e&&(e[x(952)]=FGSECOMAPP?.[x(815)]?.[x(740)]??0),typeof FGSECOMAPP[x(664)]!==x(542)&&typeof window[x(656)]===x(542)&&(FGSECOMAPP[x(664)]=async()=>{let $=x;console.log($(703)),await window[$(656)]()})},a=()=>{let x=$;document[x(932)]("#UpcartPopup:has(#CartPopup[class*='styles_active'])")||typeof window[x(656)]!==x(542)||window.upcartRegisterAddToCart()};t(),window[$(990)]=(x,e)=>{let i=$;t(),a(),$c([i(990),{}])[i(726)]()},window.upcartOnCartUpdated=x=>{let e=$;t(),$c([e(451),{}])[e(726)]()},window[$(673)]=()=>{let x=$;FGSECOMAPP[x(832)](),FGSECOMAPP[x(902)]()};let i=()=>{let x=$;typeof FGSECOMAPP[x(664)]!==x(542)&&typeof window[x(527)]===x(542)&&(FGSECOMAPP[x(664)]=async()=>{let $=x;console[$(469)]($(1005)),await window[$(527)](),window[$(752)]()})};i(),document[$(606)]("cart:change",x=>{let e=$;i(),$c([e(509),{}])[e(726)]()});let r=()=>{let x=$;typeof FGSECOMAPP.reRenderCartCustom!==x(542)&&typeof window?.[x(683)]?.[x(861)]?.CartSlider?.[x(732)]===x(542)&&(FGSECOMAPP[x(664)]=async()=>{let $=x;console[$(469)]($(584)),await window.SATCB.Widgets[$(919)][$(732)]()})};r(),document[$(606)]($(640),x=>{let e=$;r(),$c([e(746),{}])[e(726)](()=>{let $=e;document.querySelector("#freegifts-main-popup-container.sca-modal-fg.sca-is-visible-fg")&&document[$(932)](".satcb-cs-close")?.[$(684)]()})});let c=()=>{let x=$;"function"!=typeof FGSECOMAPP.reRenderCartCustom&&typeof window[x(772)]===x(542)&&(FGSECOMAPP[x(664)]=async()=>{let $=x;console[$(469)]($(452)),await window[$(772)](),window.openCart()})};c(),document[$(606)]($(792),x=>{let e=$;c(),$c([e(833),{}])[e(726)]()}),(()=>{let x=$;typeof FGSECOMAPP.reRenderCartCustom!==x(542)&&typeof window[x(442)]===x(542)&&(FGSECOMAPP.reRenderCartCustom=async()=>{let $=x;console[$(469)]("Slide Cart - Heysenior"),await window[$(442)](),window.HS_SLIDE_CART_OPEN()})})(),document[$(606)](FGSECOMAPP[$(552)][$(858)],()=>{let x=$;try{typeof window[x(907)]===x(542)&&window.HS_SLIDE_CART_CLOSE(),"function"==typeof window[x(486)]&&window[x(486)]()}catch(e){console[x(493)](e)}})}catch(o){console[$(493)](o)}};$$(FGSECOMAPP[_0x375bfe(705)])[_0x375bfe(726)](()=>{$6()})}}catch($y){console[_0x375bfe(469)](_0x375bfe(524),$y)}