PageSourceSearch

https://rundownlosangeles.com/extensions/d0c608f2-4b43-4b20-b5fa-817f254b164f/3.2.9/assets/2ab921a.js

js rundownlosangeles.com collected 2026-10-09 18:14:39 UTC 67,880 bytes, 1 lines download raw bytes

1!function(){var e;function t(e){e||(e={});const t=e.hide_oos_m_settings||{...window.hide_oos_m_settings},o=e.hide_oos_t_settings||{...window.hide_oos_t_settings};let a=Number(o.hide_oos_qty_threshold||t.hide_oos_qty_threshold||0);void 0!==window.hide_oos_qty_threshold&&(a=Number(window.hide_oos_qty_threshold));const i=e.hide_oos_query_selectors||{...window.hide_oos_query_selectors||{}};let s=e.hide_oos_extras||{...window.hide_oos_extras||{}};if(s={...s},s.always_hide=e.always_hide||s.always_hide||t.always_hide,s.always_show=e.always_show||s.always_show||t.always_show,s.always_hide&&"string"==typeof s.always_hide&&s.always_hide.indexOf("key_field:")>=0)try{s.always_hide=JSON.parse(s.always_hide)}catch(d){console.error(d)}if(s.always_show&&"string"==typeof s.always_show&&s.always_show.indexOf("key_field:")>=0)try{s.always_show=JSON.parse(s.always_show)}catch(d){console.error(d)}s.schedule_hide=e.schedule_hide||s.schedule_hide||t.schedule_hide||{},s.always_hide_countries=e.always_hide_countries||s.always_hide_countries||t.always_hide_countries||{},s.always_hide_show_field=e.always_hide_show_field||s.always_hide_show_field||t.always_hide_show_field||"variant_title",s.exclude_tags=s.exclude_tags||t.exclude_tags||"",s.include_tags=s.include_tags||t.include_tags||"",s.include_only_hide_show_field=s.include_only_hide_show_field||t.include_only_hide_show_field,s.option_disable=s.option_disable||t.option_disable,s.append_soldout_text=s.append_soldout_text||t.append_soldout_text,s.append_unavailable_text=s.append_unavailable_text||t.append_unavailable_text,s.hide_in_safari=s.hide_in_safari||t.hide_in_safari,s.hide_unavailable=s.hide_unavailable||t.hide_unavailable,s.version=s.version||t.version,s.integrates_with=s.integrates_with||t.integrates_with,s.variant_change_delay=Number(s.variant_change_delay||10),s.is_featured_product=e.is_featured_product||s.is_featured_product,s.version&&"string"==typeof s.version&&(s.version=Number(s.version.replace("v",""))),"boolean"==typeof s.include_only_hide_show_field&&(s.include_only_hide_show_field=!0===s.include_only_hide_show_field?"yes":""),s.hide_specific_variants=s.hide_specific_variants||t.hide_specific_variants;let n=window.BOOMR&&window.BOOMR.themeVersion?window.BOOMR.themeVersion:"";n||(n=window.Shopify&&window.Shopify.theme&&window.Shopify.theme.schema_version),n="string"==typeof n?Number(n.split(".")[0]||1):n||1;const r={product:e.product||o.product,hide_oos_variant_qty:e.hide_oos_variant_qty||(Array.isArray(window.hide_oos_variant_qty)?[...window.hide_oos_variant_qty]:void 0),mainContainer:e.mainContainer||window.mainHoosContainer||i.mainContainer||null,selected_or_first_available_variant_id:e.selected_or_first_available_variant_id||window.selected_or_first_available_variant_id||"",hide_variants_options_arr:e.hide_variants_options_arr||t.hide_variants_options_arr,params:e,query_selectors:i,selector_type:i.selector_type||o.selector_type||t.selector_type||"",original_selector_type:i.selector_type||o.selector_type||t.selector_type||"",field_selector:i.field_selector||window.hide_oos_field_selector||o.field_selector||t.field_selector||"",click_label_path:i.click_label_path||"",unavailable_label_path:i.unavailable_label_path||"",input_elem_path_from_label:i.input_elem_path_from_label||"",input_selector:i.input_selector||window.hide_oos_input_selector,swatch_input_selector:i.swatch_input_selector||window.swatch_input_selector,swatch_picker_for:i.swatch_picker_for||window.swatch_picker_for,hide_oos_product_json_selector:window.hide_oos_product_json_selector||"",theme_name:o.theme_name||t.theme_name||"",other_theme_name:o.other_theme_name||t.other_theme_name||"",theme_version:n,hide_oos_variants:o.hide_oos_variants||t.hide_oos_variants||!1,variant_action:e.variant_action||o.variant_action||t.variant_action||"",timeout_interval:window.hoos_timeout_interval||s.hoos_timeout_interval||0,hide_oos_check_qty:window.hide_oos_check_qty||o.hide_oos_check_qty||t.hide_oos_check_qty||!1,hide_oos_qty_threshold:a,reverse_options:o.reverse_options||t.reverse_options||!1,hide_if_no_image:t.hide_if_no_image||"",hide_if_price_zero:t.hide_if_price_zero||"",extras:s,selectors:[],selectors_metadata:[],availableVariants:[],markedUnavailableVariants:[],productOptions:{option1:{},option2:{},option3:{}},selectedProductOptions:{option1:null,option2:null,option3:null},previousProductOptions:{option1:null,option2:null,option3:null},unavailable_class:o.unavailable_class||t.unavailable_class||"hide-oos-disable",isSafari:e.isSafari||!1,defaultUnavailableClass:"hide-oos-disable",camouflageUnavailableClass:"camouflage-unavailable",camouflageMarkedUnavailableClass:"camouflage-marked-unavailable",makeSelectionNoHideClass:"camouflage-no-hide",unavailableClass:o.unavailable_class||t.unavailable_class||"hide-oos-disable",hiddenInputFieldForVariantID:void 0,mappedLabels:[[]],enableDisabledSelectorsArr:[],hide_variants_options:{},skip_execution:!1,ext_version:3,country:window.Shopify&&window.Shopify.country?window.Shopify.country:"",locale:window.Shopify&&window.Shopify.locale?window.Shopify.locale:"",started_at:new Date};if("string"==typeof r.hide_oos_variants&&(r.hide_oos_variants="true"===r.hide_oos_variants),"string"==typeof r.hide_oos_check_qty&&(r.hide_oos_check_qty="true"===r.hide_oos_check_qty),"string"==typeof r.reverse_options&&(r.reverse_options="true"===r.reverse_options),t.product_images_with_id&&r.product&&!r.product.product_images_with_id&&(r.product.product_images_with_id=t.product_images_with_id),!r.isSafari){let e=/^((?!chrome|android|crios|fxios).)*safari/i.test(navigator.userAgent);e||(e=/iphone/i.test(navigator.userAgent)||/ipad/i.test(navigator.userAgent)),r.isSafari=e,"boolean"==typeof r.extras.hide_oos_variants&&e&&(r.hide_oos_variants=r.extras.hide_oos_variants),e&&!r.extras.delay&&(r.extras.delay=100)}r.extras.hide_oos_product_json_selector&&(r.hide_oos_product_json_selector=r.extras.hide_oos_product_json_selector),"strike-through-disabled"===r.variant_action&&(r.extras.disabled=!0);const l=["AT","BE","BG","CY","CZ","DE","DK","EE","ES","FI","FR","GR","HR","HU","IE","IT","LT","LU","LV","MT","NL","PL","PT","RO","SE","SI","SK"],c=e=>Array.isArray(e)?e:"string"==typeof e?e.split(",").map(e=>e.trim()).filter(e=>e):[];if(Array.isArray(r.hide_variants_options_arr))for(const u of r.hide_variants_options_arr){const e=u.name.trim(),t=u.values.split(",").map(e=>e.trim()).filter(e=>e);u.values_arr=t,u.name=e,u.product_tags=c(u.product_tags),u.product_types=c(u.product_types),u.customer_tags=c(u.customer_tags),Array.isArray(u.countries)&&u.countries.includes("EU")&&u.countries.push(...l),Array.isArray(u.ex_countries)&&u.ex_countries.includes("EU")&&u.ex_countries.push(...l),Array.isArray(u.ex_countries)&&u.ex_countries.length&&u.ex_countries.includes(r.country)&&(Array.isArray(u.countries)&&u.countries&&u.countries.length||(u.countries=["NONE"]),u.countries=u.countries.filter(e=>e!==r.country)),r.hide_variants_options[e]=r.hide_variants_options[e]||[],r.hide_variants_options[e]=[...r.hide_variants_options[e],...t],"exclude_tags_specific_variants"===e&&(r.exclude_tags_specific_variants=t)}return!r.extras.hide_specific_variants&&["hide"].includes(r.variant_action)&&(r.extras.hide_specific_variants="hide"),r.extras.hide_specific_variants=r.extras.hide_specific_variants||r.variant_action||"hide",(!r.extras.version||r.extras.version<2)&&(e.no_hoos_obj||(window.hoosObj=r)),!0===e.no_camouflage_items||(window.CAMOUFLAGEE.items.push(r),window.hide_oos_extras=null,window.hide_oos_query_selectors=null),r}if(window.CAMOUFLAGEE=window.CAMOUFLAGEE||{items:[]},window.CAMOUFLAGEE.items||(window.CAMOUFLAGEE.items=[]),window.camouflage_global_config)if("camouflage"===new URLSearchParams(window.location.search).get("debug"))window.camouflage_global_config.logLevel="debug",window.localStorage&&window.localStorage.setItem("camouflage_log_level",window.camouflage_global_config.logLevel);else if(window.localStorage){const e=window.localStorage.getItem("camouflage_log_level");e&&(window.camouflage_global_config.logLevel=e)}window.CAMOUFLAGEE.getHoosObj=t,e={getHoosObj:t,logLevel:window.camouflage_global_config&&window.camouflage_global_config.logLevel?window.camouflage_global_config.logLevel:"fakeLog"};var o;const a=window.camouflage_global_config&&window.camouflage_global_config.logLevel?window.camouflage_global_config.logLevel:"fakeLog",i=["AT","BE","BG","CY","CZ","DE","DK","EE","ES","FI","FR","GR","HR","HU","IE","IT","LT","LU","LV","MT","NL","PL","PT","RO","SE","SI","SK"];function s(e){e.options=e.options.reverse();for(let t of e.variants){if(2===t.options.length){let e=t.option1;t.option1=t.option2,t.option2=e}else if(3===t.options.length){let e=t.option1;t.option1=t.option3,t.option3=e}t.options=t.options.reverse()}return e}function n({hoosObj:e}){console[a]("Camouflage","getAvailableVariants:start",e.product.id,e);let{product:t,exclude_tags_specific_variants:o}=e,n=!1,{exclude_tags:r,include_tags:l,always_show:c,always_hide:d,always_hide_countries:u,schedule_hide:p,always_hide_show_field:h,include_only_hide_show_field:_,hide_unavailable:f,hide_specific_variants:m,version:b,timezone:v}=e.extras,g=t.tags||[];if(Array.isArray(g)||(g=g.split(",").map(e=>e.trim())),console[a]("Camouflage","getAvailableVariants:variables",{exclude_tags:r,include_tags:l,always_show:c,always_hide:d,always_hide_countries:u,schedule_hide:p,always_hide_show_field:h,include_only_hide_show_field:_,hide_unavailable:f,hide_specific_variants:m,version:b,variant_action:e.variant_action}),r&&r.length){Array.isArray(r)||(r=r.split(",").map(e=>e.trim()));for(let t of r)if(g.includes(t))return console[a]("Camouflage",`Exclude tag ${t} is present, skipping Camouflage execution`),e.skip_execution=!0,!1}if(o&&o.length){o&&!Array.isArray(o)&&(o=o.split(",").map(e=>e.trim()));for(let e of o)if(g.includes(e)){n=!0;break}}if(l&&l.length){Array.isArray(l)||(l=l.split(",").map(e=>e.trim()));let t=!1;for(let e of l)if(g.includes(e)){t=!0;break}if(!t)return console[a]("Camouflage",`None of the ${l} is present, skipping Camouflage execution`),e.skip_execution=!0,!1}e.reverse_options&&(t=s(t));const y="codecrux hide oos"===window.hide_oos_enabled;try{const e=window.parent.location?window.parent.location.pathname:"";if(t.options.length>1&&!e.startsWith("/admin")&&!y)return!1}catch(A){console.error(A)}let w=!1;if(e.hide_oos_variant_qty&&e.hide_oos_variant_qty.length===t.variants.length){for(let o=0;o<t.variants.length;o++)t.variants[o].inventory_quantity=e.hide_oos_variant_qty[o];w=!0}else"number"==typeof t.variants[0].inventory_quantity&&(w=!0);const O=v||Intl.DateTimeFormat().resolvedOptions().timeZone,C=new Date((new Date).toLocaleStr
1ing("en-US",{timeZone:O}));let j=[];"debug"===a&&console.group(`${t.id} ${t.handle} ${t.title}`);let k=e.hide_variants_options_arr||[],x=[];if(Array.isArray(k)&&k.length){k=k.filter(e=>{let o=!0;return o&&Array.isArray(e.product_types)&&e.product_types.length&&(e.product_types.some(e=>e===t.type)||(x.push(e),o=!1)),o&&Array.isArray(e.product_tags)&&e.product_tags.length&&(e.product_tags.some(e=>g.includes(e))||(x.push(e),o=!1)),o&&Array.isArray(window.camouflageCustomerTags)&&window.camouflageCustomerTags.length&&Array.isArray(e.customer_tags)&&e.customer_tags.length&&(e.customer_tags.some(e=>window.camouflageCustomerTags.includes(e))||(x.push(e),o=!1)),o}),x.length&&console[a](`Camouflage: ${x.length} variants options removed`);try{for(const e of k)if(e.name.startsWith("variant.")){const o=e.name.replace("variant.","").trim();if(o){"object"!=typeof u&&(u={hide_show_field:"id",variants:{}}),u.variants||(u.variants={});const a=t.variants.filter(t=>e.values_arr.includes(t[o])).map(e=>e.id.toString()),s=e.countries||[];Array.isArray(s)&&s.includes("EU")&&s.push(...i);for(const e of a)u.variants[e]=u.variants[e]||[],u.variants[e].push(...s)}}console[a]("Camouflage","always_hide_countries",u,t.id)}catch(A){console.error(A)}}let S=t.variants.filter(o=>{if(c&&Array.isArray(c)&&c.length){let t;h=e.extras.always_hide_show_field;const i=c[0].split("key_field:");if(2===i.length&&(h=i[1].trim()),t="sku"===h?c.find(e=>o.sku==e):"id"===h?c.find(e=>o.id==e):!0===o.always_show?o.always_show:c.find(e=>o.title.includes(e)),t)return console[a]("Camouflage","Always show variant found",o.id,o.title),!0}else if(!0===o.always_show)return!1;if(d&&Array.isArray(d)&&d.length){let t;h=e.extras.always_hide_show_field;const i=d[0].split("key_field:");if(2===i.length&&(h=i[1].trim()),"sku"===h?t=d.find(e=>o.sku==e):"id"===h?(t=d.find(e=>o.id==e),t||!0!==o.always_hide||(t=!0)):t=!0===o.always_hide?o.always_hide:d.find(e=>o.title.includes(e)),t)return j.push(o.id),console[a]("Camouflage","Always hide variant found",o.id,o.title),!1}else if(!0===o.always_hide)return j.push(o.id),console[a]("Camouflage","Always hide variant found",o.id,o.title),!1;Array.isArray(o.always_hide_countries)&&o.always_hide_countries.length&&(u||(u={}),u.variants=u.variants||{},u.variants[o.id]=o.always_hide_countries);let s=!1;if(u&&"object"==typeof u&&u.variants){let t;if(h=u.hide_show_field||"id","id"===h){const s=u.variants[o.id.toString()]||[],n=Array.isArray(s)?s.filter(e=>!e.startsWith("-")):[];let r=Array.isArray(s)?s.filter(e=>e.startsWith("-")).map(e=>e.slice(1)):[];r.length&&!n.length&&s.push(e.country),Array.isArray(s)&&s.includes("EU")?s.push(...i):Array.isArray(s)&&s.includes("-EU")&&r.push(...i),t=Array.isArray(s)&&s.includes(e.country),t&&Array.isArray(r)&&r.length&&r.includes(e.country)&&(console[a]("Camouflage","Excluded country found!!",o.id,o.title,e.country),t=!1)}t&&(j.push(o.id),console[a]("Camouflage","Always hide for countries variant found",o.id,o.title),s=!0)}let r=p?p.variants:null;o.schedule_hide&&"object"==typeof o.schedule_hide&&o.schedule_hide.from&&o.schedule_hide.to&&(r&&"object"==typeof r&&!r[o.id]?r[o.id]=o.schedule_hide:r||(r={},r[o.id]=o.schedule_hide));let l=!1,m=!1;if(r&&"object"==typeof r&&o.id in r){m=!0;const e=new Date(new Date(r[o.id].from).toLocaleString("en-US",{timeZone:O})),t=new Date(new Date(r[o.id].to).toLocaleString("en-US",{timeZone:O}));C>=e&&C<=t?(j.push(o.id),console[a]("Camouflage","Schedule hide variant found",o.id,o.title),l=!0):s&&(s=!1)}if(l)return!1;if(!l&&m&&s&&(s=!1),s)return!1;if(Array.isArray(k)&&!n)for(let i=0;i<t.options.length;i++){let s=k.filter(e=>e.name===t.options[i]&&e.values_arr.includes(o.options[i])),n=k.filter(e=>{if(!e.name.includes("variant."))return!1;if(!Array.isArray(e.values_arr))return!1;let t=e.name.replace("variant.","");return e.values_arr.includes(o[t])});s=s.concat(n);const r=s.find(e=>Array.isArray(e.countries)&&e.countries.length>0),l=s.find(t=>Array.isArray(t.countries)&&t.countries.includes(e.country));if(s.length&&(s=s.filter(e=>!e.customer_tags||!e.customer_tags.length||!(Array.isArray(e.customer_tags)&&e.customer_tags.length&&Array.isArray(window.camouflageCustomerTags))||e.customer_tags.some(e=>window.camouflageCustomerTags.includes(e)))),s.length){if(!r||l)return j.push(o.id),console[a]("Camouflage","Global hide variant found",o.id,o.title,s),!1;console[a]("Camouflage","countries have been selected but the option shouldn't be hidden from the current country",o.id,o.title)}}if(e.hide_oos_check_qty&&e.hide_oos_qty_threshold&&w&&o.inventory_quantity<=e.hide_oos_qty_threshold)return console[a]("Camouflage","Variant quantity lower than the threshold quantity",o.id,o.title),!1;if(y&&"yes"===e.hide_if_no_image&&!(o.featured_image||o.featured_media||o.image))return j.push(o.id),console[a]("Camouflage","Variant hiding due to no image",o.id,o.title),!1;let b=o.price;return"object"==typeof b&&b.amount&&(b=b.amount),y&&"yes"===e.hide_if_price_zero&&!Number(b||0)?(j.push(o.id),console[a]("Camouflage","Variant hiding due 0 price",o.id,o.title),!1):"yes"===_||!0===_?(console[a]("Camouflage","Variant not hiding due to include_only_hide_show_field"),!0):"none"!==e.variant_action||"yes"!==f&&f?o.available:(console[a]("Camouflage","Variant not hiding due to variant_action=none and hide_unavailable=yes"),!0)});if(e.selected_or_first_available_variant_id){let t=S.find(t=>
1t.id==e.selected_or_first_available_variant_id);t&&(S=[t,...S.filter(e=>e.id!=t.id)])}if(j.length&&("hide"===m||b>=4)){e.markedUnavailableVariants=j;for(const t of e.product.variants)j.includes(t.id)&&(t.marked_unavailable=!0)}if("debug"===a&&(console[a]("Camouflage",`availableVariants (${S.length}) Table for: ${e.product.title}, ${e.product.handle}, ${e.product.id}`),console.table(S.slice(),["id","title","sku","available","marked_unavailable","inventory_quantity","price"])),window.getCamouflageAvailableVariants&&"function"==typeof window.getCamouflageAvailableVariants){const o=window.getCamouflageAvailableVariants(e.product,S);console[a]("Camouflage","window.getCamouflageAvailableVariants found",o),o.availableVariants&&o.product?(S=o.availableVariants,t=o.product,"debug"===a&&console.table(S,["id","title","sku","available","marked_unavailable","inventory_quantity","price"])):console[a]("Camouflage","window.getCamouflageAvailableVariants not returning the correct keys")}if("debug"===a){const o=S.map(e=>e.id);let i=t.variants.filter(e=>!o.includes(e.id));console[a]("Camouflage",`hiddenVariants (${i.length}) Table for: ${e.product.title}, ${e.product.handle}, ${e.product.id}`),console.table(i,["id","title","sku","available","marked_unavailable","inventory_quantity","price"])}
1for(let a of S){e.extras.lowercase_value&&(a.option1=a.option1?a.option1.toLowerCase():a.option1,a.option2=a.option2?a.option2.toLowerCase():a.option2,a.option3=a.option3?a.option3.toLowerCase():a.option3,a.options=a.options.map(e=>e.toLowerCase()));let t=1;a.available||(t=2),e.productOptions.option1[a.option1]=t,a.option2&&(e.productOptions.option2[a.option2]=t),a.option3&&(e.productOptions.option3[a.option3]=t)}return e.product=t,e.availableVariants=S,"debug"===a&&console.groupEnd(),S}window.CAMOUFLAGEE.getAvailableVariants=n,o={reArrangeProductOptions:s,getAvailableVariants:n};var r;const{logLevel:l}=e,{getAvailableVariants:c,reArrangeProductOptions:d}=o,u=e=>Array.isArray(e[0])?e[0][0]:e[0];function p(e,t){let o=t.value;if("variant_id"===e.extras.value_type&&1===e.selectors.length){const t=e.product.variants.find(e=>e.id==o);t&&(o=t.options[0])}else if("option_id"===e.extras.value_type||e.product.options_with_values_flat_keys&&o in e.product.options_with_values_flat_keys){const t=e.product.options_with_values_flat_keys[o];t&&t.name&&(o=t.name)}return o}function h(e){return["hide","disable","strike-through-disabled"].includes(e.extras.hide_specific_variants)}function _(e){return e.product.variants.some(e=>e.marked_unavailable)&&["hide"].includes(e.extras.hide_specific_variants)}function f(e,t,o="hide",a=!0,i=!1){if(!t)return;const{defaultUnavailableClass:s,unavailableClass:n,camouflageUnavailableClass:r,camouflageMarkedUnavailableClass:l}=e;if(!(!1!==a||"yes"!==e.extras.include_only_hide_show_field||"yes"===e.extras.hide_unavailable||i&&_(e)))return;const c=[n,s];let d=e.extras.target_parent_element,u=!0===e.extras.target_parent2_element||"yes"===e.extras.target_parent2_element;"swatch_and_dropdown_mixed"===e.original_selector_type&&e.selectors_metadata&&e.selectors_metadata.length?"prestige-popover"===e.theme_name&&"BUTTON"===t.nodeName&&(d=!1):t&&"OPTION"===t.nodeName&&(d=!1),"hide"===o?(a?i&&c.push(l):c.push(r),t.classList.add(...c),d&&t.parentElement.classList.add(...c),u&&t.parentElement.parentElement.classList.add(...c)):(c.push(r,l),t.classList.remove(...c),d&&t.parentElement.classList.remove(...c),u&&t.parentElement.parentElement.classList.remove(...c));const p=new CustomEvent("hoos:labelhideshow",{detail:o});document.dispatchEvent(p)}function m(e){return"number"==typeof e&&(e=e.toString()),e&&"function"!=typeof e&&(e.indexOf("'")>=0||e.indexOf('"')>=0)&&window.CSS&&window.CSS.escape&&"function"==typeof window.CSS.escape&&(e=CSS.escape(e)),e}const b=(e,t=!1)=>!!(e.isSafari&&e.hide_oos_variants&&"boolean"==typeof e.hide_oos_variants||!t||_(e))&&(1===e.product.options.length||"hide"===e.extras.hide_in_safari),v=({option:e,markedUnavailable:t,hoosObj:o})=>{if(["strike-through","strike-through-disabled"].includes(o.variant_action))return;if(console[l]("Camouflage","wrapSelectOption:start",e.nodeName,e.value),!o.isSafari||"OPTION"!==e.nodeName)return;if("SPAN"===e.parentElement.nodeName)return;if(!b(o,t))return void console[l]("Camouflage","wrapSelectOption:shouldHideInSafari not wrapping in span",{markedUnavailable:t,optionValue:e.value});const a=document.createElement("span");e.parentNode.insertBefore(a,e),a.appendChild(e)},g=({option:e,variantExists:t=!0,markedUnavailable:o=!1,hoosObj:a,isSelectedValue:i,allSoldout:s})=>{if(!(!1!==t||"yes"===a.extras.hide_unavailable||"yes"!==a.extras.include_only_hide_show_field||o&&h(a)))return;let n=a.extras.append_soldout_text;t||(n=a.extras.append_unavailable_text||n),n&&!e.innerText.includes(n)&&(e.dataset.camouflageoptiontext||(e.dataset.camouflageoptiontext=e.innerText.trim()),e.innerText+=n),"no-disable"===a.extras.option_disable&&(t||"yes"!==a.extras.hide_unavailable)||(e.disabled=!0,s&&i||(a.extras.variant_change_delay?setTimeout(()=>{v({option:e,markedUnavailable:o,hoosObj:a})},a.extras.variant_wrap_change_delay||10):v({option:e,markedUnavailable:o,hoosObj:a})))};document.addEventListener("hoos:executed",e=>{}),r={themeRequiresRebuilding:e=>"impact"===e.theme_name&&e.theme_version>=6,getVariantElement:u,ifVariantSelectorRemoved:e=>{let t=u(e.selectors);return!document.body.contains(t)||"none"===e.mainContainer.style.display},getOptionsToSelect:({hoosObj:e,i:t,tempVariants1:o,tempVariants2:a,checkedSelector:i,currentSelectedValue:s})=>{let n,r="",c="";if(console[l]("switchToOption-1",r,s),i&&s&&(n=o.find(e=>
1s==e.options[t]),n&&(c=n.id)),n&&n.options)r=n.options[t],c=n.id,console[l]("switchToOption-2",r,s);else if(o.length)r=o[0].options[t],c=o[0].id,console[l]("switchToOption-3",r,s),"mutation-observer"==e.params.restarted_by&&e.params.current_variant_id&&a.find(t=>t.id==e.params.current_variant_id)&&(r=a.find(t=>t.id==e.params.current_variant_id).options[t],c=a.find(t=>t.id==e.params.current_variant_id).id,console[l]("switchToOption-3-3",r,s));else{const e=a.find(e=>s==e.options[t]);e?(r=e.options[t],c=e.id,console[l]("switchToOption-4",r,s)):a.length?(r=a[0].options[t],c=a[0].id,console[l]("switchToOption-5",r,s)):console[l]("switchToOption-6 - no option found",r,s)}return{switchToOption:r,selectedVariantId:c,selectedOptionExistsInAvailableVariants:n}},getVariantToSelectAfterVariantChange:function(e,t=!1,o="yes"){let a=e.availableVariants.slice();const i=[];for(let s=0;s<e.selectors.length;s++){let t="select"===e.selector_type?e.selectors[s]:e.selectors[s].find(e=>e.checked);const o=t?p(e,t):null;o&&(i.push(o),s===e.selectors.length-1&&a.filter(e=>e.options[s]==o).length&&(a=a.filter(e=>e.options[s]==o)),a=a.filter(e=>e.options[s]==o))}if(0===a.length&&["strike-through","select-append-text"].includes(e.variant_action)){const s=e.product.variants.filter(e=>e.options.join()===i.join());if(s.length&&!s[0].marked_unavailable)a=s;else if(!s.length&&i.length>1){const s=e.product.variants.filter(e=>e.options.slice(0,-1).join()===i.slice(0,-1).join());s.length&&!s[0].marked_unavailable&&(a=s,t=!1,o="no")}}return{tempVariants:a,tempValArr:i,skip_initial_selection:t,skip_strikethrough_variant_change:o}},updateAppIntegration:function(e){const t=e.extras.integrates_with;!Object.keys(e.query_selectors).length&&t&&(console[l]("Camouflage","updateAppIntegration",t),"globo-swatch"===t?"radio"===e.selector_type&&(e.mainContainer=".globo-swatch-list",e.extras.target_parent_element=!0,e.field_selector=".globo-swatch-product-detail .globo-swatch-list ul",e.input_selector="input"):"pagefly"===t||("vopo"===t?"radio"===e.selector_type&&(e.mainContainer="#bcpo",e.field_selector="#bcpo .single-option-selector[data-option]",e.input_selector="input",e.extras.target_parent_element=!0):"ymq"===t?"radio"===e.selector_type&&(e.mainContainer="#ymq-box",e.field_selector="#ymq-box .ymq-shopify-option-box",e.input_selector="input"):"swatch-king"===t&&"select"!==e.selector_type&&(e.mainContainer=document.querySelector("variant-swatch-king")||"variant-swatch-king",e.field_selector="#swatch-option1, #swatch-option2, #swatch-option3",e.input_selector="li",e.selector_type="li",e.extras.attribute_name="orig-value",e.extras.target_parent_element=!1)))},getMainContainer:function(){const e=["variant-radios","variant-selects",".product-form product-variants","main[role=main] form","body"];for(let t of e){const e=document.querySelector(t);if(e){if(e.clientHeight<10||e.clientWidth<10)continue;return["variant-radios","variant-selects"].includes(t)?e.parentElement:e}}return null},getMainContainerFromString:async function(e,t=4e3){let o,a=0;return new Promise((i,s)=>{const n=setInterval(()=>{a+=100,o=document.querySelector(e),(o||a>=t)&&(i(o),clearInterval(n),console[l]("Camouflage",{mainContainer:o,lapsedTime:a}))},100)})},getPageBuilderSelector:function(){const e=[".pf-option-swatches select",".pf-option-swatches"];for(let t of e)if(document.querySelector(t))return t;return null},getDefaultSelector:function(e){console[l]("Camouflage","getDefaultSelector:start",e.selector_type);const t=[".shg-product-selector-wrapper .shg-product-selector-inline-wrapper select",".pf-option-swatches select","select.camouflage-container","variant-selects fieldset.product-form__input select","variant-selects select","product-variants .product-variant select","#product-description .product-form__input--dropdown select",".Product .Product__Block--variantPicker .ProductForm__Option select",".product-block-variant-picker fieldset.product-variant-picker-block label + select","fieldset.product-variant-picker-block  label + select",".product-block-variant-picker label + select",".product-information .variations fieldset select",".product-block--variant_picker .option-dropdown select",".product-options[data-product-options] .product-option select","div[data-aid='full-product-options'] > div select","variant-selection select.options-selection__input-select","form div.product-form__input--dropdown select",".product__info-container .product-parameters variant-selects fieldset select",".product-details__option-wrapper select","select.single-option-selector",".selector-wrapper select","select.product-form__single-selector","select.product-variant-container",".variant-wrapper select",".product-variant-picker-block select","div.product-options-style-select select[data-product-option]","label + select"],o=[".camouflage-container","#bcpo .single-option-selector[data-option]","#ymq-box .ymq-shopify-option-box",".globo-swatch-product-detail .globo-swatch-list ul",".f8pr-variant-selection ul.check","variant-radios fieldset","options-selection fieldset","variant-selects fieldset.product-form__input",".product-information variant-selects:not(.variant-selects--sticky) fieldset",".product-information variant-selects .variations fieldset","product-variants .product-form__option-selector","product-root .product-options--option","product-selector .main-product__form-group","product-selector fieldset.product-selector__wrapper","product-option-picker","#product-description .swatches__
1container",".Product .Product__Block--variantPicker .ProductForm__Option",".product-options[data-product-options] .product-option",".product[data-section-type='product'] .product__option","block-variant-picker fieldset",".product-block-variant-picker fieldset.product-variant-picker-block",".product-block--variant_picker fieldset","product-variants .product-variants .product-variant__container",".product-detail__options fieldset",".variant-wrapper fieldset",".form__selectors .selector-wrapper fieldset",".product_form .swatch_options .swatch",".product-swatches .form-field-swatch",".product-option-selector .product-loop-variants","fieldset.product-variant-picker-block","variant-picker fieldset.variant-picker__option","variant-picker .variant-picker__option-values","variant-picker fieldset[data-option-group]","variant-picker .m-product-option","form .product-form__controls-group--options .product-form__option","product-variant-selector product-option-picker","product-options-root radios-root",".option-selector .option-selector__btns","form fieldset .option-values","div[data-aid='full-product-options'] > div",".product-variant",".selector-wrapper fieldset",".swatches-wrapper fieldset",".swatch-options .swatch",".option-selectors fieldset.option-selector-fieldset",".swatches__container",".product-single__swatches .product-single__swatch",".product-form.mfp-link .swatch[data-option-index]","product-variant-selector [class*=product-variant-selector-item-body]",".product__variants-swatches .swatch.js-variant-selector","div[data-product-options-container] fieldset",".product-options .product-options__default-options, .product-options .product-options__swatch",".swatch.selectors","label + fieldset",".variant-wrapper",".variant-input",".swatch"],a=["#bcpo .single-option-selector[data-option]","product-variants .product-form__option-selector",".form__selectors .selector-wrapper fieldset",".globo-swatch-product-detail .globo-swatch-list ul",".product-single__swatches .product-single__swatch",".product-form.mfp-link .swatch[data-option-index]","product-options-root radios-root","product-variants .product-variants .product-variant__container","variant-picker .variant-picker__option-values","variant-picker fieldset[data-option-group]","product-variant-selector product-option-picker",".product__variants-swatches .swatch.js-variant-selector","div[data-product-options-container] fieldset",".product-options .product-options__default-options, .product-options .product-options__swatch","product-selector fieldset.product-selector__wrapper"];if("select"===e.selector_type){for(let i of t)if(console[l](i),[...e.mainContainer.querySelectorAll(i)].length===e.product.options.length)return i}else if("radio"===e.selector_type){for(let i of o)if(console[l](i),[...e.mainContainer.querySelectorAll(i)].length===e.product.options.length)return a.includes(i)&&"impact"!=e.theme_name&&(e.extras.target_parent_element=!0),i}else{const o=[".shg-product-selector-wrapper .shg-product-selector-inline-wrapper select",".pf-option-swatches select","#bcpo .single-option-selector[data-option]","#ymq-box .ymq-shopify-option-box","select.camouflage-container","variant-radios fieldset",".product-information variant-selects:not(.variant-selects--sticky) fieldset",".product-information variant-selects .variations fieldset",".f8pr-variant-selection ul.check","variant-selects fieldset.product-form__input select","variant-selects fieldset.product-form__input","variant-selects select","options-selection fieldset","product-variants .product-form__option-selector","product-variants .product-variant select","variant-selection select.options-selection__input-select","product-variants .product-variant","product-root .product-options--option","product-selector .main-product__form-group","product-option-picker","#product-description .swatches__container","product-options-root radios-root","#product-description .product-form__input--dropdown select",".Product .Product__Block--variantPicker .ProductForm__Option select",".Product .Product__Block--variantPicker .ProductForm__Option","block-variant-picker fieldset",".product-block-variant-picker fieldset.product-variant-picker-block label + select",".product-block-variant-picker fieldset.product-variant-picker-block","fieldset.product-variant-picker-block  label + select","fieldset.product-variant-picker-block",".product-block--variant_picker .option-dropdown select",".product-block--variant_picker fieldset",".product-information .variations fieldset select",".variant-wrapper fieldset",".form__selectors .selector-wrapper fieldset",".product-options[data-product-options] .product-option select",".product-options[data-product-options] .product-option",".product[data-section-type='product'] .product__option","product-variant-selector product-option-picker","div[data-aid='full-product-options'] > div select","div[data-aid='full-product-options'] > div",".product_swatches .swatch",".product-detail__options fieldset",".product_form .swatch_options .swatch",".product-swatches .form-field-swatch",".product-option-selector .product-loop-variants","form .product-form__controls-group--options .product-form__option",".option-selector .option-selector__btns",".product__info-container .product-parameters variant-selects fieldset select","form div.product-form__input--dropdown select",".product-details__option-wrapper select","form fieldset .option-values",".variant-wrapper select",".product-block-variant-picker label + select","variant-picker fieldset.variant-picker__option","variant-picker .variant-picker__option-values","variant-picker fieldset[data-option-group]","variant-picker .m-product-option",".product__variants-swatches .swatch.js-variant-selector",".swatch-options .swatch",".option-selectors fieldset.option-selector-fieldset",".swatches__
1container",".product-single__swatches .product-single__swatch",".product-form.mfp-link .swatch[data-option-index]","product-variant-selector [class*=product-variant-selector-item-body]","select.product-variant-container","select.single-option-selector",".selector-wrapper select",".product-variant-picker-block select","div.product-options-style-select select[data-product-option]","div[data-product-options-container] fieldset",".selector-wrapper fieldset",".product-options .product-options__default-options, .product-options .product-options__swatch","label + fieldset","label + select",".variant-wrapper",".variant-input",".swatches-wrapper fieldset"];for(let i of o)if(console[l](i),[...e.mainContainer.querySelectorAll(i)].length===e.product.options.length)return t.includes(i)?e.selector_type="select":e.selector_type="radio",a.includes(i)&&"impact"!=e.theme_name&&(e.extras.target_parent_element=!0),i}return null},getAvailableVariants:c,setSelectors:function(e){let{selectors:t,enableDisabledSelectorsArr:o}=e;t.length||(t=[...e.mainContainer.querySelectorAll(e.field_selector)],o=t.slice(),"radio"===e.selector_type?t=t.map(e=>[...e.querySelectorAll("input[type=radio]")]):"select"!==e.selector_type&&(t=t.map(t=>[...t.querySelectorAll(e.input_selector)]))),e.reverse_options&&(t=t.reverse(),o=o.reverse(),console[l]("Camouflage","Reversed variant options")),e.enableDisabledSelectorsArr=o,console[l]("Camouflage","setSelectors:end",t),e.selectors=t},handleForMarkUnavailable:function(e){if(_(e)){const e=document.createElement("style");e.innerHTML=".camouflage-marked-unavailable {display: none !important;}",document.head.appendChild(e)}},updateExtraObj:function(e){!0!==e.hide_oos_variants&&"hide"!==e.variant_action||"radio"!==e.selector_type||window.hide_oos_input_selector||(e.extras.disabled=!0);const{selectors:t}=e,o=e.extras.attribute_name;if(!["","value"].includes(o))for(let i of t)for(let t of i){const a=p(e,t);a&&t.setAttribute(o,a)}if("boolean"==typeof e.extras.radio_disabled&&(e.extras.disabled=e.extras.radio_disabled),"select"===e.selector_type||e.extras.target_parent_element)return;const a=p(e,t[0][0]);if(t&&t[0]&&t[0][0]&&a){if("INPUT"===t[0][0].nodeName)return;const o=t[0][0].parentElement.getAttribute("data-value");if(!o)return;a===o&&(e.extras.target_parent_element=!0)}},labelHideShow:f,getProduct:async function(e){if(window.getCamouflageProduct&&"function"==typeof window.getCamouflageProduct)return e.product=await window.getCamouflageProduct(e.product,e),console[l]("Camouflage","window.getCamouflageProduct found"),e.product;if(e.extras&&e.extras.hide_oos_product_json_selector){const t=document.getElementById(e.extras.hide_oos_product_json_selector);if(t)return e.product=JSON.parse(t.innerHTML),e.product}if(e.product.options_with_values){const t={};e.product.options_with_values.map(e=>e.values).flat().forEach(e=>{t[e.id]=e}),e.product.options_with_values_flat_keys=t}return e.product},fireCamouflageExecutedEvent:function(e){if(window.CustomEvent){e.currentTime=(new Date).getTime();const t=new CustomEvent("hoos:executed",{detail:e});document.dispatchEvent(t),console[l]("Camouflage","hoos:executed event fired")}},fireCamouflageHoosObjPreparedEvent:function(e){if(window.CustomEvent){const t=new CustomEvent("hoos:prepared",{detail:e});document.dispatchEvent(t),console[l]("Camouflage","hoos:prepared event fired")}},getCSSEscapedValue:m,checkIfShouldRun:function(e){return!(!e.extras.should_run&&!_(e)&&("yes"!==e.hide_if_no_image&&"yes"!==e.extras.hide_if_price_zero||e.availableVariants.length===e.product.variants.length)&&("yes"===e.extras.include_only_hide_show_field&&"yes"!==e.extras.hide_unavailable&&e.availableVariants.length===e.product.variants.length||"none"===e.variant_action&&"yes"!==e.extras.include_only_hide_show_field&&"yes"!==e.extras.hide_unavailable))},shouldHideMarkUnavailable:_,shouldDisableMarkUnavailable:h,sleep:e=>new Promise(t=>setTimeout(t,e)),wrapSelectOption:v,unwrapSelectOption:({option:e,hoosObj:t})=>{if(!t.isSafari||"OPTION"!==e.nodeName)return;const o=e.parentElement;if("SPAN"!==o.nodeName)return;const a=document.createDocumentFragment();for(;o.firstChild;){const e=o.removeChild(o.firstChild);a.appendChild(e)}o.parentNode.replaceChild(a,o)},checkAndHandleOptionDisable:g,shouldHideInSafari:b,triggerChangeEventOnSelect:(e,t,o,a)=>{let i=a.selector_type;e&&"SELECT"===e.nodeName&&(i="select");let s=!0;if(a&&a.extras&&!0===a.extras.is_featured_product&&!0!==a.extras.page_loaded&&(setTimeout(()=>{a.extras.page_loaded=!0},1500),s=!1),"select"===i){if("function"==typeof e)return;t=m(t);let o=e.querySelector(`[value='${t}']`);if(o){o.selected=!0;const t=new Event("change",{bubbles:!0});s&&e.dispatchEvent(t)}}else{let i=e.find(e=>e.value==t);if(i){i.checked=!0;const e=new Event("change",{bubbles:!0});s&&i.dispatchEvent(e)}if(a.extras.radio_mapped_select_selector&&!0===a.extras.map_select_with_radio){let e=document.querySelectorAll(a.extras.radio_mapped_select_selector);if(e&&e.length===a.selectors.length){t=m(t);let a=e[o].querySelector(`option[value=${t}]`);
1if(a){a.selected=!0;const t=new Event("change",{bubbles:!0});s&&e[o].dispatchEvent(t)}}}}"function"==typeof window.camouflageDispatchVariantChange&&window.camouflageDispatchVariantChange({selectElem:e,selectedValue:t,index:o,hoosObj:a})},hideFromVariantIdDropdown:({hoosObj:e})=>{let t,o;if("select"===e.selector_type){const a=e.availableVariants,i=[...e.selectors[0].querySelectorAll("option")];o=e.selectors[0].value;for(let t of i){let o=t.value;if((!e.extras.select_attribute_name||(o=t.getAttribute(e.extras.select_attribute_name),o))&&(o&&"not-selected"!==o))if(a.find(e=>e.id==o))t.disabled=!1;else{if(t.classList.contains(e.makeSelectionNoHideClass))continue;let a=!0,i=!1;i=1===e.product.options.length?e.product.variants.some(e=>e.id==o&&e.marked_unavailable):e.product.variants.filter(e=>e.id==o).every(e=>e.marked_unavailable),f(e,t,"hide",a,i),g({option:t,variantExists:a,markedUnavailable:i,hoosObj:e})}}let s=i.find(e=>!e.classList.contains("hide-oos-disable")&&e.value&&"not-selected"!==e.value);s&&(t=s.value)}return{firstAvailableVariantId:t,selectedVariantValue:o}},hideFromVariantIdUIElem:({hoosObj:e})=>{let t,o;console[l]("hideFromVariantIdUIElem");let a=[];a="select"===e.selector_type?[...e.selectors[0].querySelectorAll("option")]:[...e.selectors[0]];const i=e.availableVariants;o=e.selectors[0][0].getAttribute(e.extras.select_attribute_name||e.extras.attribute_name||"value");for(let n of a){let t=n.value;if((e.extras.select_attribute_name||e.extras.attribute_name)&&(t=n.getAttribute(e.extras.select_attribute_name||e.extras.attribute_name),!t))continue;if(!t||"not-selected"===t)continue;const o=i.find(e=>e.id==t);if(console[l]("hideFromVariantIdUIElem:mid",o),o)n.disabled=!1;else{if(n.classList.contains(e.makeSelectionNoHideClass))continue;let o=!0,a=!1;a=1===e.product.options.length?e.product.variants.some(e=>e.id==t&&e.marked_unavailable):e.product.variants.filter(e=>e.id==t).every(e=>e.marked_unavailable);let i=n;"INPUT"===n.nodeName&&(i=e.mainContainer.querySelector(`[for='${m(n.id)}]'`)||n.nextElementSibling),f(e,i,"hide",o,a),"select"===e.selector_type&&g({option:n,variantExists:o,markedUnavailable:a,hoosObj:e})}}const s=a.find(e=>!e.classList.contains("hide-oos-disable"));return s&&(t=s.value),{firstAvailableVariantId:t,selectedVariantValue:o}}};const{getHoosObj:y,logLevel:w}=e,{getDefaultSelector:O,getMainContainer:C,getPageBuilderSelector:j,getAvailableVariants:k,setSelectors:x,labelHideShow:S,getProduct:A,updateExtraObj:E,fireCamouflageExecutedEvent:V,getCSSEscapedValue:q,fireCamouflageHoosObjPreparedEvent:I,updateAppIntegration:P,getMainContainerFromString:T,checkIfShouldRun:L,shouldDisableMarkUnavailable:U,shouldHideMarkUnavailable:D,handleForMarkUnavailable:F,sleep:N,wrapSelectOption:R,unwrapSelectOption:$,checkAndHandleOptionDisable:B,shouldHideInSafari:M,triggerChangeEventOnSelect:H,hideFromVariantIdDropdown:G,hideFromVariantIdUIElem:z,themeRequiresRebuilding:Z,getVariantElement:W,ifVariantSelectorRemoved:K,getOptionsToSelect:J,getVariantToSelectAfterVariantChange:Y}=r;class Q{constructor(e,t,o){this.hoosObj=e,this.hiddenInputFieldForVariantID=t,this.isSafari=o}updateConfigurationForSelectedThemes(){let e=this.hoosObj;if(!Object.keys(e.query_selectors).length){let t=e.theme_name||window.themeName||"";t=t.toLowerCase(),console[w]("Camouflage","updateConfigurationForSelectedThemes",t),t.includes("symmetry")?(e.selector_type="radio",e.field_selector="fieldset .option-selector__btns",e.input_selector="input",e.mainContainer=document.body,e.unavailableClass="is-unavailable"):"venue"===t?(e.selector_type="radio",e.field_selector=".product-form__swatch"):"avenue"===t&&"radio"===e.selector_type?e.extras.target_parent_element=!0:"expression"===t?(e.selector_type="radio",e.field_selector="fieldset .option-selector__btns",e.unavailableClass="is-unavailable"):"prestige"===t?document.querySelectorAll("variant-picker fieldset.variant-picker__option").length?e.mainContainer=document.querySelector(".product-info variant-picker"):(e.selector_type="radio",e.field_selector=".ProductForm__Variants ul",e.extras.target_parent_element=!0,e.timeout_interval=500,e.unavailableClass="camouflage-special-swatch-A"):"warehouse"===e.theme_name&&"radio"===e.selector_type?(e.field_selector=".product-form__variants .product-form__option[data-selector-type]",e.theme_version>=6&&!document.querySelector('.product-form__variants .product-form__option[data-selector-type="swatch"]')&&(e.field_selector=".product-form__variants .product-form__option:not(.no-js)"),e.mainContainer=document.body,e.extras.target_parent_element=!0):"flex"===e.theme_name&&"radio"===e.selector_type?(e.field_selector="options-selection fieldset",e.mainContainer=document.body,e.extras.target_parent_element=!0):"flow"===e.theme_name&&"radio"===e.selector_type?(e.field_selector=".swatch-items-wrapper",e.mainContainer=document.body,e.extras.target_parent_element=!0):"broadcast 3.x"===e.theme_name&&"radio"===e.selector_type?(e.field_selector=".selector-wrapper fieldset",e.mainContainer=document.querySelector(".product__form__holder")||document.querySelector('form[action="/cart/add"]')||document.body,e.extras.target_parent_element=!0):"masonry"===e.theme_name&&"select"===e.selector_type?(e.field_selector=".productoptions .option-selectors select",e.mainContainer=document.querySelector(".productoptions .option-selectors")||document.body):"impulse"===e.theme_name&&"hide-oos-disable"===e.unavailableClass?(e.unavailableClass="disabled",e.extras.redisable_options_onchange=!0):"motion"===e.theme_name&&"hide-oos-disable"===e.unavailableClass?(e.unavailableClass="disabled",e.timeout_interval=1e3):"expanse"===e.theme_name&&"hide-oos-disable"===e.unavailableClass?e.unavailableClass="disabled":"expression"===e.theme_name&&"hide-oos-disable"===e.unavailableClass?e.unavailableClass="is-unavailable":"local"===e.theme_name?(e.mainContainer=document.querySelector("product-variants")||document.body,"radio"===e.selector_type&&(e.extras.target_parent_element=!0)):"pursuit"===e.theme_name&&"hide-oos-disable"===e.unavailableClass?(e.mainContainer=document.querySelector(".product-form")||document.body,e.unavailableClass="soldout","radio"===e.selector_type&&(e.extras.target_parent_element=!0)):"forge"===e.theme_name?(e.timeout_interval=500,"hide-oos-disable"===e.unavailableClass&&(e.unavailableClass="soldout")):["habitat","showtime"].includes(e.theme_name)&&"hide-oos-disable"===e.unavailableClass?(e.unavailableClass="camouflage-special-swatch-B","showtime"===e.theme_name&&(e.selector_type="radio")):"minion"===e.theme_name&&"radio"===e.selector_type?e.extras.target_parent_element=!0:"influence"===e.theme_name?(e.mainContainer=document.querySelector("product-form")||document.body,"hide-oos-disable"===e.unavailableClass&&(e.unavailableClass="camouflage-special-swatch-B")):"shapes"===e.theme_name?(e.mainContainer=document.querySelector(".product-block-variant-picker")||document.body,"radio"===e.selector_type&&(e.extras.target_parent_element=!0,"hide-oos-disable"===e.unavailableClass&&(e.unavailableClass="camouflage-special-swatch-B"))):"drop"===e.theme_name?(e.extras.target_parent_element=!0,"hide-oos-disable"===e.unavailableClass&&(e.unavailableClass="soldout")):"beyond"===e.theme_name&&"radio"===e.selector_type?e.extras.target_parent_element=!0:"foodie"===e.theme_name?e.mainContainer=document.querySelector("#product-description")||document.body:"baseline"===e.theme_name?(e.mainContainer=document.querySelector(".product-content-container")||document.body,"radio"===e.selector_type&&(e.extras.target_parent_element=!0)):"avatar"===e.theme_name&&"radio"===e.selector_type||"highlight"===e.theme_name&&"radio"===e.selector_type?e.extras.target_parent_element=!0:"chord"===e.theme_name?(e.mainContainer=document.querySelector(".Product__Block--variantPicker")||document.body,"radio"===e.selector_type&&(e.extras.target_parent_element=!0,"hide-oos-disable"===e.unavailableClass&&(e.unavailableClass="camouflage-special-swatch-A"))):"mojave"===e.theme_name?(e.mainContainer=document.querySelector("product-selector")||document.body,"radio"===e.selector_type&&(e.extras.target_parent_element=!0,"hide-oos-disable"===e.unavailableClass&&(e.unavailableClass="camouflage-special-swatch-A"))):"tailor"===e.theme_name&&"radio"===e.selector_type||"palo-alto"===e.theme_name&&"radio"===e.selector_type||"responsive"===e.theme_name&&"radio"===e.selector_type?e.extras.target_parent_element=!0:"fashionopolism"
1===e.theme_name?(e.mainContainer=document.querySelector(".product__section-details")||document.body,"select"!==e.selector_type&&(e.extras.target_parent_element=!0,"hide-oos-disable"===e.unavailableClass&&(e.unavailableClass="soldout"))):"capital"===e.theme_name&&"select"!==e.selector_type?(e.extras.target_parent_element=!0,"hide-oos-disable"===e.unavailableClass&&(e.unavailableClass="camouflage-special-swatch-B")):"kingdom"===e.theme_name?e.mainContainer=document.querySelector("product-variants")||document.body:"envy"===e.theme_name&&"select"!==e.selector_type?(e.extras.target_parent_element=!0,"hide-oos-disable"===e.unavailableClass&&(e.unavailableClass="soldout")):"galleria"===e.theme_name?"select"!==e.selector_type&&(e.mainContainer=document.querySelector("product-variant-selector")||document.body,e.extras.target_parent_element=!0,e.extras.variant_change_delay=500,e.extras.delay=500):["icon","mr-parker"].includes(e.theme_name)&&"radio"===e.selector_type?(e.mainContainer=document.querySelector(".product__variants-swatches")||document.body,e.selector_type="radio",e.field_selector=".swatches__container",e.extras.target_parent_element=!0):"yuva"===e.theme_name?(e.mainContainer=document.querySelector(".yv-main-product-detail")||document.body,e.extras.target_parent_element=!0,"hide-oos-disable"===e.unavailableClass&&(e.unavailableClass="camouflage-special-swatch-A")):"modular"===e.theme_name&&"radio"===e.selector_type&&(e.extras.target_parent_element=!0);const o=j();o&&(e.field_selector=o,e.mainContainer=document.body,o.includes("select")?e.selector_type="select":(e.selector_type="radio",e.extras.target_parent_element=!0))}}setFieldSelector(){"debug"===w&&console.groupCollapsed("selectors - getDefaultSelector"),this.hoosObj.field_selector=O(this.hoosObj),"debug"===w&&console.groupEnd()}getRadioValue(e){let t=e.value;if("variant_id"===this.hoosObj.extras.value_type&&1===this.hoosObj.selectors.length){const e=this.hoosObj.product.find(e=>e.id==t);e&&(t=e.options[0])}else if("option_id"===this.hoosObj.extras.value_type||this.hoosObj.product.options_with_values_flat_keys&&t in this.hoosObj.product.options_with_values_flat_keys){const e=this.hoosObj.product.options_with_values_flat_keys[t];e&&e.name&&(t=e.name)}return t}disableElement(e,t=!1,o=!0){if(!e)return;if("boolean"==typeof this.hoosObj.extras.radio_disabled&&!1===this.hoosObj.extras.radio_disabled)return void console.debug("Must not disable, returning");let a=!1===this.hoosObj.extras.disabled;a&&t&&U(this.hoosObj)&&(a=!1),o||"yes"!==this.hoosObj.extras.hide_unavailable||(a=!1),!1===o&&"yes"===this.hoosObj.extras.include_only_hide_show_field&&"yes"!==this.hoosObj.extras.hide_unavailable&&(t&&D(this.hoosObj)||(a=!0)),a||(e.disabled=!0,e.checked=!1)}hideShowParentElement(e,t,o=!0,a=!1){if(!e&&(!1!==o||"yes"!==this.hoosObj.extras.include_only_hide_show_field||"yes"===this.hoosObj.extras.hide_unavailable||a)&&e&&"radio"===e.type&&!0===this.hoosObj.extras.target_parent_element){let i=e.parentElement;const s=["hide_oos--parent-hidden",this.hoosObj.defaultUnavailableClass];"hide"===t?(o?a&&s.push(this.hoosObj.camouflageUnavailableClass):s.push(this.hoosObj.camouflageUnavailableClass),i.classList.add(...s)):(s.push(this.hoosObj.camouflageUnavailableClass),i.classList.remove(...s))}}hideAllUnavailableVariants(){if("select"===this.hoosObj.selector_type?this.hoosObj.selectors.forEach(e=>{e.options&&[...e.options].forEach(e=>{S(this.hoosObj,e,"hide"),B({option:e,hoosObj:this.hoosObj})})}):this.hoosObj.selectors.forEach(e=>{e.forEach(e=>{if(!e)return;this.disableElement(e);const t=this.hoosObj.mainContainer.querySelector(`[for='${q(e.id)}]'`)||e.nextElementSibling;S(this.hoosObj,t,"hide"),this.hideShowParentElement(e,"hide")})}),window.CustomEvent){const e=new CustomEvent("hoos:alldisabled",{detail:this.hoosObj});document.dispatchEvent(e)}}hideUnavailableOption1(){if("select"===this.hoosObj.selector_type){const e=[...this.hoosObj.selectors[0].querySelectorAll("option")];for(let t of e){let e=t.value;if((!this.hoosObj.extras.select_attribute_name||1!==this.hoosObj.product.options.length||(e=t.getAttribute(this.hoosObj.extras.select_attribute_name),e))&&(e&&"not-selected"!==e||!0!==this.hoosObj.extras.make_a_selection_required))if(e in this.hoosObj.productOptions.option1)t.disabled=!1;else{if(t.classList.contains(this.hoosObj.makeSelectionNoHideClass))continue;let e=!0,o=!1;o=1===this.hoosObj.product.options.length?this.hoosObj.product.variants.some(e=>e.options[0]===t.value&&e.marked_unavailable):this.hoosObj.product.variants.filter(e=>e.options[0]===t.value).every(e=>e.marked_unavailable),S(this.hoosObj,t,"hide",e,o),B({option:t,variantExists:e,markedUnavailable:o,hoosObj:this.hoosObj})}}}else{const e=this.hoosObj.selectors[0];for(let t of e)if(this.getRadioValue(t)in this.hoosObj.productOptions.option1)t.disabled=!1;else{let e=!0,o=!1;o=1===this.hoosObj.product.options.length?this.hoosObj.product.variants.some(e=>e.options[0]===this.getRadioValue(t)&&e.marked_unavailable):this.hoosObj.product.variants.filter(e=>e.options[0]===this.getRadioValue(t)).every(e=>e.marked_unavailable),this.disableElement(t,o);const a=this.hoosObj.mainContainer.querySelector(`[for='${q(t.id)}']`)||t.nextElementSibling;S(this.hoosObj,a,"hide",e,o),this.hideShowParentElement(t,"hide",o)}}}clickRadioLabel(e){try{if(this.hoosObj.extras&&!0===this.hoosObj.extras.is_featured_product&&!0!==this.hoosObj.extras.page_loaded)return void setTimeout(()=>{this.hoosObj.extras.page_loaded=!0},1500);const t=this.hoosObj.mainContainer.querySelector(`[for='${q(e.id)}']`)||e.nextElementSibling;"function"==typeof window.camouflageLabelClick&&window.camouflageLabelClick({labelToClick:t,hoosObj:this.hoosObj}),t&&t.click()}catch(t){console.error(t)}}
1reDisableSoldSelectOption(){this.hoosObj.selectors.forEach(e=>{e.querySelectorAll("option.hide-oos-disable").forEach(e=>{e.value&&e.value,e.disabled=!0,"hide"===this.hoosObj.variant_action&&R({option:e,hoosObj:this.hoosObj})})})}handleReDisableSoldSelectOption(){if(!this.hoosObj.extras.redisable_options_onchange)return;let e=document.querySelector("variant-selection")||this.hoosObj.mainContainer.querySelector("[name=id]")||document.querySelector("[name=id]"),t="change";"retina"!==this.hoosObj.theme_name&&"flex"!==this.hoosObj.theme_name||(t="variant-change"),e&&(e.addEventListener(t,()=>{setTimeout(()=>{this.reDisableSoldSelectOption()},50)}),setTimeout(()=>{this.reDisableSoldSelectOption()},50))}setInitialSelection(e){for(let t=0;t<e.options.length;t++)this.hoosObj.selectedProductOptions["option"+(t+1)]=e.options[t];if(!(this.hoosObj.extras.version&&this.hoosObj.extras.version>=2&&this.hiddenInputFieldForVariantID&&this.hiddenInputFieldForVariantID.value==e.id))if("select"===this.hoosObj.selector_type)for(let t in this.hoosObj.selectors)this.hoosObj.selectors[t].value=e.options[t],H(this.hoosObj.selectors[t],e.options[t],t,this.hoosObj);else for(let t=0;t<this.hoosObj.selectors.length;++t)for(let o of this.hoosObj.selectors[t]){let a=this.getRadioValue(o)===e.options[t];a&&this.clickRadioLabel(o),o.checked=a,o.checked&&H(this.hoosObj.selectors[t],e.options[t],t,this.hoosObj)}}hideSelectOptionBasedOnPrevChoice(e=1,t=null){console[w]("hideSelectOptionBasedOnPrevChoice:start "+e,t);const o=this.hoosObj.selectors.length;let a,i=[...this.hoosObj.availableVariants],s=[...this.hoosObj.product.variants];if("select"===this.hoosObj.selector_type)for(let n=1;n<o;n++){const t=this.hoosObj.selectors[n-1];if(!t)break;const o=this.getRadioValue(t);if(i=i.filter(e=>e.options[n-1]===o),s=s.filter(e=>e.options[n-1]===o),n>=e){const e=this.hoosObj.selectors[n],t=e?this.getRadioValue(e):null,o=J({i:n,hoosObj:this.hoosObj,tempVariants1:i,tempVariants2:s,checkedSelector:e,currentSelectedValue:t});a=o.selectedVariantId;const r=o.switchToOption,l=(o.selectedOptionExistsInAvailableVariants,[...e.querySelectorAll("option")]);for(let a of l){const t=a.value,o=this.getRadioValue(a),l=i.some(e=>e.options[n]===o),c=s.some(e=>e.options[n]===o),d=s.some(e=>e.options[n]===o&&e.marked_unavailable);if(r&&!a.classList.contains(this.hoosObj.makeSelectionNoHideClass)&&(!0!==this.hoosObj.extras.make_a_selection_required||t&&"not-selected"!==t)&&("yes"!==this.hoosObj.extras.skip_variant_change||"hide"===this.hoosObj.variant_action))if(r==o){if(a.value===e.value){if(!l&&["strike-through","select-append-text"].includes(this.hoosObj.variant_action)){S(this.hoosObj,a,"hide",c,d),B({option:a,variantExists:c,markedUnavailable:d,hoosObj:this.hoosObj});continue}continue}let o=this.hoosObj.extras.selection_delay_time||10;setTimeout(()=>{this.hoosObj.selectors[n].value=t,H(this.hoosObj.selectors[n],t,n,this.hoosObj),console[w]("switchToOption-6",r,a)},o*n)}else{if(l)continue;S(this.hoosObj,a,"hide",c,d),B({option:a,variantExists:c,markedUnavailable:d,hoosObj:this.hoosObj}),console[w](`\x1b[31mVariant ${o} has been hidden\x1b[0m`)}}}}else for(let n=1;n<o;n++){const t=this.hoosObj.selectors[n-1].filter(e=>e.checked)[0];if(!t)break;const o=this.getRadioValue(t);if(i=i.filter(e=>e.options[n-1]===o),s=s.filter(e=>e.options[n-1]===o),n>=e){const e=this.hoosObj.selectors[n].find(e=>!0===e.checked),t=e?this.getRadioValue(e):null,o=J({i:n,hoosObj:this.hoosObj,tempVariants1:i,tempVariants2:s,checkedSelector:e,currentSelectedValue:t});a=o.selectedVariantId;const r=o.switchToOption;o.selectedOptionExistsInAvailableVariants;for(let a of this.hoosObj.selectors[n]){const e=this.getRadioValue(a),t=s.some(t=>t.options[n]===e),o=s.some(t=>t.options[n]===e&&t.marked_unavailable),l=i.some(t=>t.options[n]===e);if(r)if(r==e){if(a.checked){if(!l&&["strike-through","select-append-text"].includes(this.hoosObj.variant_action)){const e=this.hoosObj.mainContainer.querySelector(`[for='${q(a.id)}']`)||a.nextElementSibling;e&&(S(this.hoosObj,e,"hide",t,o),this.hideShowParentElement(a,"hide",t,o))}continue}if("yes"===this.hoosObj.extras.skip_variant_change&&"hide"!==this.hoosObj.variant_action)continue;let i=this.hoosObj.extras.selection_delay_time||10;setTimeout(()=>{if(!l&&["strike-through","select-append-text"].includes(this.hoosObj.variant_action)){const e=this.hoosObj.mainContainer.querySelector(`[for='${q(a.id)}']`)||a.nextElementSibling;e&&(S(this.hoosObj,e,"hide",t,o),this.hideShowParentElement(a,"hide",t,o))}this.clickRadioLabel(a),a.checked=!0,a.disabled=!1,H(this.hoosObj.selectors[n],e,n,this.hoosObj),console[w]("switchToOption-6",r,a)},i*n)}else{if(l)continue;{if(!l&&["strike-through","select-append-text"].includes(this.hoosObj.variant_action)){const e=this.hoosObj.mainContainer.querySelector(`[for='${q(a.id)}']`)||a.nextElementSibling;e&&(S(this.hoosObj,e,"hide",t,o),this.hideShowParentElement(a,"hide",t,o))}this.disableElement(a,o,t);const i=this.hoosObj.mainContainer.querySelector(`[for='${q(a.id)}']`)||a.nextElementSibling;S(this.hoosObj,i,"hide",t,o),this.hideShowParentElement(a,"hide",t,o),console[w](`\x1b[31mVariant ${e} has been hidden\x1b[0m`)}}}}}if(a&&this.hiddenInputFieldForVariantID&&(this.hiddenInputFieldForVariantID.value=a,window.CustomEvent)){const e=new CustomEvent("hoos:variantchanged",{detail:{currentVariant:this.hoosObj.product.variants.find(e=>e.id==a),hoosObj:this.hoosObj}});document.dispatchEvent(e)}}enableDisabledSelectors(e=1){if("select"===this.hoosObj.selector_type){const t=this.hoosObj.selectors.slice(e);for(let e of t){const t=[...e.querySelectorAll("."+this.hoosObj.defaultUnavailableClass)];for(let e of t)e.dataset&&e.dataset.camouflageoptiontext&&(this.hoosObj.extras.append_soldout_text||this.hoosObj.extras.append_unavailable_text)&&(e.innerText=e.dataset.camouflageoptiontext),S(this.hoosObj,e,"show"),e.disabled=!1,$({option:e,hoosObj:this.hoosObj})}}else{let t=[...this.hoosObj.mainContainer.querySelectorAll(this.hoosObj.field_selector)];this.hoosObj.reverse_options&&(t=t.reverse()),t=t.slice(e);for(let e of t){const t=e.querySelectorAll("."+this.hoosObj.defaultUnavailableClass);for(let e of t){S(this.hoosObj,e,"show");const t=e.getAttribute("for");let o;o=t?document.getElementById(t)||e.previousElementSibling:e.querySelector("input"),o&&(o.disabled=!1,this.hideShowParentElement(o,"show"))}if(!t.length&&this.hoosObj.extras.enable_custom_labels){const t=e.querySelectorAll("input[id]"),o=this.hoosObj.mainContainer,a=this.hoosObj.defaultUnavailableClass;
1t.forEach(e=>{let t=o.querySelector(`.${a}[for='${q(e.id)}']`);t&&(e.disabled=!1,S(this.hoosObj,t,"show"))})}"function"==typeof window.camouflagePostEnableDisableSelectors&&window.camouflagePostEnableDisableSelectors({hoosObj:this.hoosObj,selector:e})}}}rebuildSelectors(e){const t=e&&e.hoosObj?e:this;t.hoosObj.selectors=[],x(t.hoosObj),"function"==typeof window.camouflagePostSelectorsSet&&window.camouflagePostSelectorsSet({hoosObj:t.hoosObj});for(let o=0;o<t.hoosObj.selectors.length;o++){const e=t.hoosObj.selectors[o].filter(e=>e.checked),a=t.getRadioValue(e[0]);1===e.length&&a&&(t.hoosObj.selectedProductOptions["option"+(o+1)]=a)}this.hideSoldOutVariants()}detectChangeAndUpdateElements(){const e=this.hoosObj.selectors.length-1,t=this.hoosObj.extras.variant_change_delay;if("select"===this.hoosObj.selector_type)for(let o=0;o<e;o++)!0!==this.hoosObj.selectors[o].camouflage_click_event_added&&(this.hoosObj.selectors[o].camouflage_click_event_added=!0,this.hoosObj.selectors[o].addEventListener("change",e=>{setTimeout(()=>{this.enableDisabledSelectors(o+1),(e.target.value&&"not-selected"!==e.target.value||!0!==this.hoosObj.extras.make_a_selection_required)&&this.hideSelectOptionBasedOnPrevChoice(o+1)},t)}));else for(let o=0;o<e+1;o++)for(let a of this.hoosObj.selectors[o])!0!==a.camouflage_click_event_added&&(a.c
1amouflage_click_event_added=!0,a.addEventListener("change",()=>{setTimeout(()=>{o===e||(this.enableDisabledSelectors(o+1),!this.getRadioValue(a)&&this.hoosObj.extras.make_a_selection_required,this.hideSelectOptionBasedOnPrevChoice(o+1))},t)}))}hideSoldOutVariants(){if(!1===k({hoosObj:this.hoosObj}))return;if(!1===this.hoosObj.availableVariants)return;if(F(this.hoosObj),!L(this.hoosObj))return void console[w]("Camouflage","checkIfShouldRun:false returning....");if("yes"===this.hoosObj.extras.hide_from_variantid_dropdown&&1===this.hoosObj.selectors.length){const{firstAvailableVariantId:e,selectedVariantValue:t}=G({hoosObj:this.hoosObj});return void(e&&!0!==this.hoosObj.extras.make_a_selection_required&&e!=t&&this.hoosObj.product.variants.find(t=>t.id==e)&&H(this.hoosObj.selectors[0],e,0,this.hoosObj))}if("yes"===this.hoosObj.extras.hide_from_variantid_ui&&1===this.hoosObj.selectors.length){const{firstAvailableVariantId:e,selectedVariantValue:t}=z({hoosObj:this.hoosObj});return void(e&&!0!==this.hoosObj.extras.make_a_selection_required&&e!=t&&this.hoosObj.product.variants.find(t=>t.id==e)&&H(this.hoosObj.selectors[0],e,0,this.hoosObj))}if(!this.hoosObj.availableVariants.length)return this.hideAllUnavailableVariants(),this.hoosObj.product.variants.some(e=>e.marked_unavailable)&&this.hideUnavailableOption1(),void console[w]("Camouflage","No available variant found, hid all variants and exiting...");if(this.hoosObj.selectors.length!==this.hoosObj.product.options.length)return void console[w]("Camouflage",`selectors ${this.hoosObj.selectors.length} !== option length ${this.hoosObj.product.options.length}, returning...`);let e=this.hoosObj.selected_or_first_available_variant_id==this.hoosObj.availableVariants[0].id?this.hoosObj.availableVariants[0]:null;this.hideUnavailableOption1(),!0!==this.hoosObj.extras.make_a_selection_required&&(this.hoosObj.params.skip_initial_selection||this.setInitialSelection(this.hoosObj.availableVariants[0]),this.hideSelectOptionBasedOnPrevChoice(1,e)),this.detectChangeAndUpdateElements()}}const X=e=>{const t=y(e),o=new Q(t,t.hiddenInputFieldForVariantID,t.isSafari);return o.hoosObj.unavailableClass=t.unavailable_class||"hide-oos-disable",o.hoosObj.enableDisabledSelectors=o.enableDisabledSelectors,o.hoosObj.hideSelectOptionBasedOnPrevChoice=o.hideSelectOptionBasedOnPrevChoice,o.hoosObj.getAvailableVariants=k,o.hoosObj.reDisableSoldSelectOption=o.reDisableSoldSelectOption,o.hoosObj.rebuildSelectors=o.rebuildSelectors,o.hoosObj.ref=o,o.updateConfigurationForSelectedThemes(),P(o.hoosObj),A(t).then(async()=>{if(!t.product)return void console.log("Product not found.");if(e.mainContainer&&"string"==typeof e.mainContainer&&(t.mainContainer=document.querySelector(e.mainContainer)||t.mainContainer,!t.mainContainer)){const o=await T(e.mainContainer,3e3);o&&(t.mainContainer=o)}if(t.mainContainer){if(t.mainContainer&&"string"==typeof t.mainContainer){const e=t.mainContainer;t.mainContainer=document.querySelector(e),t.mainContainer||(t.mainContainer=await T(e))}}else t.mainContainer=C();if(!t.mainContainer)return;const a=t.mainContainer.querySelector("[name=id]")||document.querySelector("[name=id]");o.hoosObj.hiddenInputFieldForVariantID=a,o.hiddenInputFieldForVariantID=a,I(t);let i=!1,s=0,n=0;function r(){if(t.field_selector&&t.field_selector||o.setFieldSelector(),t.field_selector){if(x(t),t.selectors.length||"function"!=typeof window.camouflagePreSelectorsSet||window.camouflagePreSelectorsSet({hoosObj:t}),t.selectors.length!==t.product.options.length&&(t.extras.hide_from_variantid_ui&&1===t.selectors.length||(console.error(`selectors length: ${t.selectors.length} !== product.options length: ${t.product.options.length}`),t.selectors=[])),!t.selectors.length)return;console[w]("Camouflage","selected field_selector: "+t.field_selector),E(t),"function"==typeof window.camouflagePostSelectorsSet&&window.camouflagePostSelectorsSet({hoosObj:t}),o.hideSoldOutVariants(),"select"===t.selector_type&&o.handleReDisableSoldSelectOption(),i=!0,V(t),((e,t)=>{console[w]("observeVariantInputField:start");const o=["variant-selects","variant-picker",'.product-info__block-item[data-block-id="variant_selector"]'];if(e.mainContainer&&!e.mainContainer.getAttribute("is-observing")){const a=e.mainContainer,i={childList:!0,subtree:!0};new MutationObserver((a,i)=>{let s=!1,n=!1;a.forEach(a=>{if("childList"===a.type){for(const e of a.addedNodes){for(const t of o)if("function"==typeof e.closest&&e.closest(t)){console[w]("closest",e.closest(t)),n=!0;break}if(n)break}s||!n||e.hiddenInputFieldForVariantID.value||(s=!0,setTimeout(()=>{let o=!1;K(e)&&(e.selectors=[],x(e),o=!0);let a=e.availableVariants.slice();const i=Y(e,t.skip_initial_selection,"yes");a=i.tempVariants,t.skip_initial_selection=i.skip_initial_selection,t.hide_oos_extras.skip_strikethrough_variant_change=i.skip_strikethrough_variant_change,console[w]({tempVariants11:a,tempValArr:i.tempValArr,selectedProductOptions:e.selectedProductOptions}),a.length&&(t.current_variant_id=a[0].id,console[w](`------------set current_variant_id: ${t.current_variant_id}, tempValArr: ${i.tempValArr.join(", ")}---------------`));let s=t.product?t.product.id:"",n=t.current_variant_id?t.current_variant_id:"";t.restarted_by="mutation-observer",oe({param:t,currentVariantId:n,productId:s,camouflageVariants:e,variantPickerReplaced:o})},10))}})}).observe(a,i),e.mainContainer.setAttribute("is-observing","true")}})(t,e)}else"FORM"===t.mainContainer.nodeName&&(t.mainContainer=document.body)}if(t.extras.delay&&(n=Number(t.extras.delay)),n&&(await N(n),console.debug(n+" seconds delay")),r(),!i){const e=setInterval(()=>{s+=100,r(),(i||s>=4e3)&&(clearInterval(e),console.debug({selectorsSetupComplete:i,lapsedTime:s}))},100)}}),o};window.initCamouflage=e=>{setTimeout(()=>{X(e)},10)};const ee=new CustomEvent("hoos:scriptloaded",{detail:{currentTime:(new Date).getTime()}});document.dispatchEvent(ee),document.addEventListener("hoos:alldisabled",e=>{console[w]("Camouflage","hoos:alldisabled event fired");const t=e.detail.mainContainer.querySelector('[name="add"]')||document.querySelector('[name="add"]');t&&(t.disabled=!0)});let te={};const oe=({param:e,currentVariantId:t,productId:o,camouflageVariants:a,variantPickerReplaced:i})=>{if(o&&t&&e.product&&!e.product.variants.find(e=>e.id==t))return void console[w]("%c reinitCamouflage:mid1","color:pink; font-size: 20px","current product is not "+e.product.title);console[w]("%c reinitCamouflage:mid2","color:green; font-size: 20px",o,t);let s=0,n=i;e.source&&["quick_view","featured_product"].includes(e.source)&&(n=!0);const r=setInterval(()=>{s+=10,K(a)&&(n=!0),(n||s>=1e3)&&clearInterval(r),n?(e.selected_or_first_available_variant_id=t,e.current_variant_id=t,console[w]("Restarting...",t),X({...e})):console[w]("Not starting...")},10)};document.addEventListener("hoos:executed",e=>{console[w]("Camouflage","hoos:executed event fired");const t=e.detail,o=t.params;let a=!0===t.extras.reinit_on_variant_change;"radio"===t.selector_type?t.selectors[0][0].closest("variant-selects")&&(a=!0):"select"===t.selector_type&&t.selectors[0].closest("variant-selects")&&(a=!0),a&&((e,t)=>{console[w]("%c reinitCamouflage:start","color:orange; font-size: 20px");let o=e.product?e.product.id:"";"function"!=typeof subscribe||"object"!=typeof PUB_SUB_EVENTS||te[o]?Z(t)&&!te[o]&&document.addEventListener("variant:change",e=>{}):subscribe(PUB_SUB_EVENTS.variantChange,a=>{const i=a.data&&a.data.variant&&a.data.variant.id?a.data.variant.id:null;console[w]("%c Dawn variant changed","color:orange; font-size: 20px",i),te[o]=!0,i&&(e.skip_initial_selection=!0,e.restarted_by="mutation-observer",oe({param:e,currentVariantId:i,productId:o,camouflageVariants:t}))})})(o,t)})}();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.