!function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=11)}([,,function(t,e){t.exports=window.lodash},,function(t,e){t.exports=window.wp.hooks},function(t,e,n){"use strict";n.d(e,"c",(function(){return v})),n.d(e,"b",(function(){return _})),n.d(e,"a",(function(){return g}));var i=n(4),r=n(2);const o=["gtin8","gtin12","gtin13","gtin14","isbn","mpn"];let a=!0,u=!0,s=[];function c(t){return""!==t.sku}function d(t){return!!(t.productIdentifiers.gtin8||t.productIdentifiers.gtin12||t.productIdentifiers.gtin13||t.productIdentifiers.gtin14||t.productIdentifiers.isbn||t.productIdentifiers.mpn)}function f(t){return t.length>=1}function l(t){return t.every(t=>t.sku)}function p(t){return{id:t,sku:wpseoWooSKU.variations[t],productIdentifiers:wpseoWooIdentifiers.variations[t]}}function y(t){const e=[];return t.forEach(t=>{null===t?e.push(""):e.push(t.value)}),{gtin8:e[0].trim(),gtin12:e[1].trim(),gtin13:e[2].trim(),gtin14:e[3].trim(),isbn:e[4].trim(),mpn:e[5].trim()}}function m(t){const e=t.querySelector("input.variable_post_id").value,n=t.querySelector("input[id^=variable_sku]");let i="";n?i=n.value:a=!1;const r=[`#yoast_variation_identifier\\[${e}\\]\\[gtin8\\]`,`#yoast_variation_identifier\\[${e}\\]\\[gtin12\\]`,`#yoast_variation_identifier\\[${e}\\]\\[gtin13\\]`,`#yoast_variation_identifier\\[${e}\\]\\[gtin14\\]`,`#yoast_variation_identifier\\[${e}\\]\\[gtin14\\]`,`#yoast_variation_identifier\\[${e}\\]\\[mpn\\]`].map(e=>t.querySelector(e));return r.some(t=>null===t)&&(u=!1),{id:e,sku:i.trim(),productIdentifiers:y(r)}}function v(){return function(t){const e=document.querySelector(".woocommerce_variations");if(0===t.length&&e){if(e.getAttribute("data-total")>0)return Object.keys(wpseoWooIdentifiers.variations).map(p);s=[]}else s=t<s?t:Object(r.uniqBy)([...t,...s,...Object.keys(wpseoWooIdentifiers.variations).map(p)],t=>t.id);return s}([...document.querySelectorAll(".woocommerce_variation")].map(m))}function _(){let t=!0,e=!0,n="";const i=document.querySelector("input#_sku");i?n=i.value:t=!1;const r=["yoast_identifier_gtin8","yoast_identifier_gtin12","yoast_identifier_gtin13","yoast_identifier_gtin14","yoast_identifier_isbn","yoast_identifier_mpn"].map(t=>document.getElementById(t));r.some(t=>null===t)&&(e=!1);const o=document.querySelector("select#product-type").value,a={canRetrieveGlobalSku:t,canRetrieveAllIdentifiers:e,sku:n.trim(),productType:o,productIdentifiers:y(r)};return Object.assign({},{sku:wpseoWooSKU.global_sku,productIdentifiers:wpseoWooIdentifiers.global_identifier_values},a)}function b(t){const e={...t};e.hasOwnProperty("customData")||(e.customData={});const n=_(),i=v(),r=d(n),o=function(t){return t.every(d)}(i),s=r||!r&&!0===n.canRetrieveAllIdentifiers,p=o||!o&&!0===u;return e.customData=Object.assign(e.customData,{canRetrieveGlobalIdentifier:s,canRetrieveVariantIdentifiers:p,canRetrieveGlobalSku:n.canRetrieveGlobalSku,canRetrieveVariantSkus:a,productType:n.productType,hasGlobalIdentifier:r,hasVariants:f(i),doAllVariantsHaveIdentifier:o,hasGlobalSKU:c(n),doAllVariantsHaveSKU:l(i)}),e}function g(){Object(i.addFilter)("yoast.analysis.data","wpseo-woocommerce-identifier-data",b),function(){o.forEach(t=>{const e=document.getElementById(`yoast_identifier_${t}`);e&&e.addEventListener("input",YoastSEO.app.refresh)});const t=document.getElementById("_sku");t&&t.addEventListener("input",YoastSEO.app.refresh);const e=document.querySelector("select#product-type");e&&e.addEventListener("change",YoastSEO.app.refresh);const n=new MutationObserver(YoastSEO.app.refresh),i=document.getElementById("variable_product_options");i&&n.observe(i,{childList:!0,subtree:!0,attributes:!0}),jQuery(document.body).on("input","#variable_product_options .woocommerce_variations :input[id^=yoast_variation_identifier]",YoastSEO.app.refresh),a&&jQuery(document.body).on("input","#variable_product_options .woocommerce_variations :input[id^=variable_sku]",YoastSEO.app.refresh)}()}},,,,,,function(t,e,n){"use strict";n.r(e);var i=n(5);"undefined"==typeof YoastSEO||void 0===YoastSEO.app?jQuery(window).on("YoastSEO:ready",(function(){Object(i.a)()})):Object(i.a)()}]);