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K,MAAM66B,KAAUC,IAEpB,GAAIC,EAAOF,GACV,IACC,GAAIx6B,EAAWU,EAAI85B,GAAS,OAAO,CACpC,CAAE,MAAO/nB,GACR3B,EAAI2O,aAAahN,GACjB3B,EAAIW,WAAW,OAAS/Q,EACzB,MAEA,GAAIA,IAAO85B,EAAQ,OAAO,EAI5B,OAAO,CAAK,EAGPE,EAASF,GACP3qB,EAAQ2qB,GAGVC,EAAeA,KAmiCpB,IAAIE,EAAsB,GAO1B,OAJIv6B,MAAMC,QAAQoQ,aAAagU,QAAQmW,gBAAgBC,mBACtDF,EAAsBlqB,aAAagU,QAAQmW,gBAAgBC,iBAriC1C,GAwiCDr2B,OAniCF,CACd,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,wBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,wBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,yBACA,sBACA,wBACA,wBACA,mBACA,mBACA,kBACA,iBACA,mBACA,oBACA,oBACA,mBACA,kBACA,oBACA,kBACA,mBACA,mBACA,mBACA,iBACA,mBACA,iBACA,iBACA,iBACA,kBACA,kBACA,oBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,kBACA,kBACA,iBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,kBACA,kBACA,kBACA,iBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,mBAGgB,CAChB,iBACA,kBACA,kBACA,iBACA,iBACA,iBACA,kBACA,kBACA,kBACA,kBACA,gBACA,kBACA,gBACA,gBACA,kBACA,kBACA,kBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,kBACA,iBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,gBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,gBACA,kBACA,kBACA,kBACA,kBACA,iBACA,iBACA,iBACA,iBACA,iBACA,iBACA,iBACA,iBACA,iBACA,iBACA,iBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,iBACA,kBACA,iBACA,mBACA,mBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,mBACA,kBACA,kBACA,kBACA,kBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,mBACA,kBACA,mBACA,kBACA,mBACA,mBACA,mBACA,iBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,mBACA,mBACA,kBACA,kBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,kBACA,mBACA,mBACA,mBACA,kBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,kBACA,kBACA,mBACA,mBACA,mBACA,kBACA,mBACA,kBACA,kBACA,kBACA,kBACA,kBACA,iBACA,iBACA,iBACA,iBACA,kBACA,iBACA,mBACA,iBACA,sBACA,sBACA,mBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,iBACA,iBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,mBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,iBACA,iBACA,mBACA,mBACA,mBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,sBACA,sBACA,sBACA,mBACA,mBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,mBACA,mBACA,sBACA,sBACA,sBACA,sBACA,oBACA,mBACA,oBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,oBACA,oBACA,oBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,oBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,oBACA,yBACA,kBAGe,CACf,kBACA,kBACA,mBAGY,CACZ,iBACA,iBACA,iBACA,iBACA,iBACA,kBACA,iBACA,kBACA,mBACA,kBACA,qBACA,kBACA,kBACA,mBACA,mBACA,kBACA,mBACA,iBACA,mBACA,iBACA,iBACA,iBACA,iBACA,iBACA,kBAGiB,CACjB,gBACA,gBACA,gBACA,gBACA,iBACA,iBACA,iBACA,mBAGc,CACd,eACA,iBACA,iBAGa,CACb,kBACA,kBAGc,CACd,iBACA,eAGa,CACb,iBACA,kBACA,mBACA,kBACA,kBACA,kBACA,gBACA,gBACA,gBACA,kBACA,mBACA,kBACA,kBACA,oBACA,oBACA,kBACA,mBACA,mBACA,mBACA,mBACA,iBACA,kBACA,mBACA,mBACA,mBAGkB,CAClB,gBACA,eACA,gBACA,cACA,eACA,gBACA,eACA,gBACA,gBACA,eACA,gBACA,iBAGa,CACb,iBACA,eACA,iBACA,iBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,iBACA,iBACA,iBACA,iBACA,iBACA,gBACA,cACA,eACA,eACA,eACA,eACA,eACA,gBACA,eACA,gBACA,kBACA,iBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,iBACA,iBACA,iBACA,mBACA,kBAGc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AI8kB,aACV9kB,IAAI4mB,uBAGJ5mB,IAAI4P,sBAAqB,EAI1Bkb,E","sources":["webpack://Pixel-Manager-for-WooCommerce/../../src/index.ts","webpack://Pixel-Manager-for-WooCommerce/../../src/ipRange.ts","webpack://Pixel-Manager-for-WooCommerce/../../src/ipv4.ts","webpack://Pixel-Manager-for-WooCommerce/../../src/ipv6.ts","webpack://Pixel-Manager-for-WooCommerce/../../src/util.ts","webpack://Pixel-Manager-for-WooCommerce/../node_modules/ipaddr.js/lib/ipaddr.js","webpack://Pixel-Manager-for-WooCommerce/../node_modules/ip6/ip6.js","webpack://Pixel-Manager-for-WooCommerce/../src/range-check.ts","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/facebook/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/facebook/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/facebook/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/ads/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/ads/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/ads/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/analytics/ga4/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/analytics/ga4/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/analytics/ga4/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/analytics/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/base/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/base/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/base/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/optimize/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/optimize/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/google/optimize/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/hotjar/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/hotjar/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/hotjar/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/version.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/cookie_consent.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/event_listeners_on_ready.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/functions_loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/functions_main.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/ip_check.js","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/wpm/wc_hooks.js","webpack://Pixel-Manager-for-WooCommerce/webpack/bootstrap","webpack://Pixel-Manager-for-WooCommerce/webpack/runtime/define property getters","webpack://Pixel-Manager-for-WooCommerce/webpack/runtime/global","webpack://Pixel-Manager-for-WooCommerce/webpack/runtime/hasOwnProperty shorthand","webpack://Pixel-Manager-for-WooCommerce/webpack/runtime/make namespace object","webpack://Pixel-Manager-for-WooCommerce/./src/js-src/public/main.js"],"sourcesContent":[null,null,null,null,null,"(function() {\n var expandIPv6, ipaddr, ipv4Part, ipv4Regexes, ipv6Part, ipv6Regexes, matchCIDR, root, zoneIndex;\n\n ipaddr = {};\n\n root = this;\n\n if ((typeof module !== \"undefined\" && module !== null) && module.exports) {\n module.exports = ipaddr;\n } else {\n root['ipaddr'] = ipaddr;\n }\n\n matchCIDR = function(first, second, partSize, cidrBits) {\n var part, shift;\n if (first.length !== second.length) {\n throw new Error(\"ipaddr: cannot match CIDR for objects with different lengths\");\n }\n part = 0;\n while (cidrBits > 0) {\n shift = partSize - cidrBits;\n if (shift < 0) {\n shift = 0;\n }\n if (first[part] >> shift !== second[part] >> shift) {\n return false;\n }\n cidrBits -= partSize;\n part += 1;\n }\n return true;\n };\n\n ipaddr.subnetMatch = function(address, rangeList, defaultName) {\n var k, len, rangeName, rangeSubnets, subnet;\n if (defaultName == null) {\n defaultName = 'unicast';\n }\n for (rangeName in rangeList) {\n rangeSubnets = rangeList[rangeName];\n if (rangeSubnets[0] && !(rangeSubnets[0] instanceof Array)) {\n rangeSubnets = [rangeSubnets];\n }\n for (k = 0, len = rangeSubnets.length; k < len; k++) {\n subnet = rangeSubnets[k];\n if (address.kind() === subnet[0].kind()) {\n if (address.match.apply(address, subnet)) {\n return rangeName;\n }\n }\n }\n }\n return defaultName;\n };\n\n ipaddr.IPv4 = (function() {\n function IPv4(octets) {\n var k, len, octet;\n if (octets.length !== 4) {\n throw new Error(\"ipaddr: ipv4 octet count should be 4\");\n }\n for (k = 0, len = octets.length; k < len; k++) {\n octet = octets[k];\n if (!((0 <= octet && octet <= 255))) {\n throw new Error(\"ipaddr: ipv4 octet should fit in 8 bits\");\n }\n }\n this.octets = octets;\n }\n\n IPv4.prototype.kind = function() {\n return 'ipv4';\n };\n\n IPv4.prototype.toString = function() {\n return this.octets.join(\".\");\n };\n\n IPv4.prototype.toNormalizedString = function() {\n return this.toString();\n };\n\n IPv4.prototype.toByteArray = function() {\n return this.octets.slice(0);\n };\n\n IPv4.prototype.match = function(other, cidrRange) {\n var ref;\n if (cidrRange === void 0) {\n ref = other, other = ref[0], cidrRange = ref[1];\n }\n if (other.kind() !== 'ipv4') {\n throw new Error(\"ipaddr: cannot match ipv4 address with non-ipv4 one\");\n }\n return matchCIDR(this.octets, other.octets, 8, cidrRange);\n };\n\n IPv4.prototype.SpecialRanges = {\n unspecified: [[new IPv4([0, 0, 0, 0]), 8]],\n broadcast: [[new IPv4([255, 255, 255, 255]), 32]],\n multicast: [[new IPv4([224, 0, 0, 0]), 4]],\n linkLocal: [[new IPv4([169, 254, 0, 0]), 16]],\n loopback: [[new IPv4([127, 0, 0, 0]), 8]],\n carrierGradeNat: [[new IPv4([100, 64, 0, 0]), 10]],\n \"private\": [[new IPv4([10, 0, 0, 0]), 8], [new IPv4([172, 16, 0, 0]), 12], [new IPv4([192, 168, 0, 0]), 16]],\n reserved: [[new IPv4([192, 0, 0, 0]), 24], [new IPv4([192, 0, 2, 0]), 24], [new IPv4([192, 88, 99, 0]), 24], [new IPv4([198, 51, 100, 0]), 24], [new IPv4([203, 0, 113, 0]), 24], [new IPv4([240, 0, 0, 0]), 4]]\n };\n\n IPv4.prototype.range = function() {\n return ipaddr.subnetMatch(this, this.SpecialRanges);\n };\n\n IPv4.prototype.toIPv4MappedAddress = function() {\n return ipaddr.IPv6.parse(\"::ffff:\" + (this.toString()));\n };\n\n IPv4.prototype.prefixLengthFromSubnetMask = function() {\n var cidr, i, k, octet, stop, zeros, zerotable;\n zerotable = {\n 0: 8,\n 128: 7,\n 192: 6,\n 224: 5,\n 240: 4,\n 248: 3,\n 252: 2,\n 254: 1,\n 255: 0\n };\n cidr = 0;\n stop = false;\n for (i = k = 3; k >= 0; i = k += -1) {\n octet = this.octets[i];\n if (octet in zerotable) {\n zeros = zerotable[octet];\n if (stop && zeros !== 0) {\n return null;\n }\n if (zeros !== 8) {\n stop = true;\n }\n cidr += zeros;\n } else {\n return null;\n }\n }\n return 32 - cidr;\n };\n\n return IPv4;\n\n })();\n\n ipv4Part = \"(0?\\\\d+|0x[a-f0-9]+)\";\n\n ipv4Regexes = {\n fourOctet: new RegExp(\"^\" + ipv4Part + \"\\\\.\" + ipv4Part + \"\\\\.\" + ipv4Part + \"\\\\.\" + ipv4Part + \"$\", 'i'),\n longValue: new RegExp(\"^\" + ipv4Part + \"$\", 'i')\n };\n\n ipaddr.IPv4.parser = function(string) {\n var match, parseIntAuto, part, shift, value;\n parseIntAuto = function(string) {\n if (string[0] === \"0\" && string[1] !== \"x\") {\n return parseInt(string, 8);\n } else {\n return parseInt(string);\n }\n };\n if (match = string.match(ipv4Regexes.fourOctet)) {\n return (function() {\n var k, len, ref, results;\n ref = match.slice(1, 6);\n results = [];\n for (k = 0, len = ref.length; k < len; k++) {\n part = ref[k];\n results.push(parseIntAuto(part));\n }\n return results;\n })();\n } else if (match = string.match(ipv4Regexes.longValue)) {\n value = parseIntAuto(match[1]);\n if (value > 0xffffffff || value < 0) {\n throw new Error(\"ipaddr: address outside defined range\");\n }\n return ((function() {\n var k, results;\n results = [];\n for (shift = k = 0; k <= 24; shift = k += 8) {\n results.push((value >> shift) & 0xff);\n }\n return results;\n })()).reverse();\n } else {\n return null;\n }\n };\n\n ipaddr.IPv6 = (function() {\n function IPv6(parts, zoneId) {\n var i, k, l, len, part, ref;\n if (parts.length === 16) {\n this.parts = [];\n for (i = k = 0; k <= 14; i = k += 2) {\n this.parts.push((parts[i] << 8) | parts[i + 1]);\n }\n } else if (parts.length === 8) {\n this.parts = parts;\n } else {\n throw new Error(\"ipaddr: ipv6 part count should be 8 or 16\");\n }\n ref = this.parts;\n for (l = 0, len = ref.length; l < len; l++) {\n part = ref[l];\n if (!((0 <= part && part <= 0xffff))) {\n throw new Error(\"ipaddr: ipv6 part should fit in 16 bits\");\n }\n }\n if (zoneId) {\n this.zoneId = zoneId;\n }\n }\n\n IPv6.prototype.kind = function() {\n return 'ipv6';\n };\n\n IPv6.prototype.toString = function() {\n return this.toNormalizedString().replace(/((^|:)(0(:|$))+)/, '::');\n };\n\n IPv6.prototype.toRFC5952String = function() {\n var bestMatchIndex, bestMatchLength, match, regex, string;\n regex = /((^|:)(0(:|$)){2,})/g;\n string = this.toNormalizedString();\n bestMatchIndex = 0;\n bestMatchLength = -1;\n while ((match = regex.exec(string))) {\n if (match[0].length > bestMatchLength) {\n bestMatchIndex = match.index;\n bestMatchLength = match[0].length;\n }\n }\n if (bestMatchLength < 0) {\n return string;\n }\n return string.substring(0, bestMatchIndex) + '::' + string.substring(bestMatchIndex + bestMatchLength);\n };\n\n IPv6.prototype.toByteArray = function() {\n var bytes, k, len, part, ref;\n bytes = [];\n ref = this.parts;\n for (k = 0, len = ref.length; k < len; k++) {\n part = ref[k];\n bytes.push(part >> 8);\n bytes.push(part & 0xff);\n }\n return bytes;\n };\n\n IPv6.prototype.toNormalizedString = function() {\n var addr, part, suffix;\n addr = ((function() {\n var k, len, ref, results;\n ref = this.parts;\n results = [];\n for (k = 0, len = ref.length; k < len; k++) {\n part = ref[k];\n results.push(part.toString(16));\n }\n return results;\n }).call(this)).join(\":\");\n suffix = '';\n if (this.zoneId) {\n suffix = '%' + this.zoneId;\n }\n return addr + suffix;\n };\n\n IPv6.prototype.toFixedLengthString = function() {\n var addr, part, suffix;\n addr = ((function() {\n var k, len, ref, results;\n ref = this.parts;\n results = [];\n for (k = 0, len = ref.length; k < len; k++) {\n part = ref[k];\n results.push(part.toString(16).padStart(4, '0'));\n }\n return results;\n }).call(this)).join(\":\");\n suffix = '';\n if (this.zoneId) {\n suffix = '%' + this.zoneId;\n }\n return addr + suffix;\n };\n\n IPv6.prototype.match = function(other, cidrRange) {\n var ref;\n if (cidrRange === void 0) {\n ref = other, other = ref[0], cidrRange = ref[1];\n }\n if (other.kind() !== 'ipv6') {\n throw new Error(\"ipaddr: cannot match ipv6 address with non-ipv6 one\");\n }\n return matchCIDR(this.parts, other.parts, 16, cidrRange);\n };\n\n IPv6.prototype.SpecialRanges = {\n unspecified: [new IPv6([0, 0, 0, 0, 0, 0, 0, 0]), 128],\n linkLocal: [new IPv6([0xfe80, 0, 0, 0, 0, 0, 0, 0]), 10],\n multicast: [new IPv6([0xff00, 0, 0, 0, 0, 0, 0, 0]), 8],\n loopback: [new IPv6([0, 0, 0, 0, 0, 0, 0, 1]), 128],\n uniqueLocal: [new IPv6([0xfc00, 0, 0, 0, 0, 0, 0, 0]), 7],\n ipv4Mapped: [new IPv6([0, 0, 0, 0, 0, 0xffff, 0, 0]), 96],\n rfc6145: [new IPv6([0, 0, 0, 0, 0xffff, 0, 0, 0]), 96],\n rfc6052: [new IPv6([0x64, 0xff9b, 0, 0, 0, 0, 0, 0]), 96],\n '6to4': [new IPv6([0x2002, 0, 0, 0, 0, 0, 0, 0]), 16],\n teredo: [new IPv6([0x2001, 0, 0, 0, 0, 0, 0, 0]), 32],\n reserved: [[new IPv6([0x2001, 0xdb8, 0, 0, 0, 0, 0, 0]), 32]]\n };\n\n IPv6.prototype.range = function() {\n return ipaddr.subnetMatch(this, this.SpecialRanges);\n };\n\n IPv6.prototype.isIPv4MappedAddress = function() {\n return this.range() === 'ipv4Mapped';\n };\n\n IPv6.prototype.toIPv4Address = function() {\n var high, low, ref;\n if (!this.isIPv4MappedAddress()) {\n throw new Error(\"ipaddr: trying to convert a generic ipv6 address to ipv4\");\n }\n ref = this.parts.slice(-2), high = ref[0], low = ref[1];\n return new ipaddr.IPv4([high >> 8, high & 0xff, low >> 8, low & 0xff]);\n };\n\n IPv6.prototype.prefixLengthFromSubnetMask = function() {\n var cidr, i, k, part, stop, zeros, zerotable;\n zerotable = {\n 0: 16,\n 32768: 15,\n 49152: 14,\n 57344: 13,\n 61440: 12,\n 63488: 11,\n 64512: 10,\n 65024: 9,\n 65280: 8,\n 65408: 7,\n 65472: 6,\n 65504: 5,\n 65520: 4,\n 65528: 3,\n 65532: 2,\n 65534: 1,\n 65535: 0\n };\n cidr = 0;\n stop = false;\n for (i = k = 7; k >= 0; i = k += -1) {\n part = this.parts[i];\n if (part in zerotable) {\n zeros = zerotable[part];\n if (stop && zeros !== 0) {\n return null;\n }\n if (zeros !== 16) {\n stop = true;\n }\n cidr += zeros;\n } else {\n return null;\n }\n }\n return 128 - cidr;\n };\n\n return IPv6;\n\n })();\n\n ipv6Part = \"(?:[0-9a-f]+::?)+\";\n\n zoneIndex = \"%[0-9a-z]{1,}\";\n\n ipv6Regexes = {\n zoneIndex: new RegExp(zoneIndex, 'i'),\n \"native\": new RegExp(\"^(::)?(\" + ipv6Part + \")?([0-9a-f]+)?(::)?(\" + zoneIndex + \")?$\", 'i'),\n transitional: new RegExp((\"^((?:\" + ipv6Part + \")|(?:::)(?:\" + ipv6Part + \")?)\") + (ipv4Part + \"\\\\.\" + ipv4Part + \"\\\\.\" + ipv4Part + \"\\\\.\" + ipv4Part) + (\"(\" + zoneIndex + \")?$\"), 'i')\n };\n\n expandIPv6 = function(string, parts) {\n var colonCount, lastColon, part, replacement, replacementCount, zoneId;\n if (string.indexOf('::') !== string.lastIndexOf('::')) {\n return null;\n }\n zoneId = (string.match(ipv6Regexes['zoneIndex']) || [])[0];\n if (zoneId) {\n zoneId = zoneId.substring(1);\n string = string.replace(/%.+$/, '');\n }\n colonCount = 0;\n lastColon = -1;\n while ((lastColon = string.indexOf(':', lastColon + 1)) >= 0) {\n colonCount++;\n }\n if (string.substr(0, 2) === '::') {\n colonCount--;\n }\n if (string.substr(-2, 2) === '::') {\n colonCount--;\n }\n if (colonCount > parts) {\n return null;\n }\n replacementCount = parts - colonCount;\n replacement = ':';\n while (replacementCount--) {\n replacement += '0:';\n }\n string = string.replace('::', replacement);\n if (string[0] === ':') {\n string = string.slice(1);\n }\n if (string[string.length - 1] === ':') {\n string = string.slice(0, -1);\n }\n parts = (function() {\n var k, len, ref, results;\n ref = string.split(\":\");\n results = [];\n for (k = 0, len = ref.length; k < len; k++) {\n part = ref[k];\n results.push(parseInt(part, 16));\n }\n return results;\n })();\n return {\n parts: parts,\n zoneId: zoneId\n };\n };\n\n ipaddr.IPv6.parser = function(string) {\n var addr, k, len, match, octet, octets, zoneId;\n if (ipv6Regexes['native'].test(string)) {\n return expandIPv6(string, 8);\n } else if (match = string.match(ipv6Regexes['transitional'])) {\n zoneId = match[6] || '';\n addr = expandIPv6(match[1].slice(0, -1) + zoneId, 6);\n if (addr.parts) {\n octets = [parseInt(match[2]), parseInt(match[3]), parseInt(match[4]), parseInt(match[5])];\n for (k = 0, len = octets.length; k < len; k++) {\n octet = octets[k];\n if (!((0 <= octet && octet <= 255))) {\n return null;\n }\n }\n addr.parts.push(octets[0] << 8 | octets[1]);\n addr.parts.push(octets[2] << 8 | octets[3]);\n return {\n parts: addr.parts,\n zoneId: addr.zoneId\n };\n }\n }\n return null;\n };\n\n ipaddr.IPv4.isIPv4 = ipaddr.IPv6.isIPv6 = function(string) {\n return this.parser(string) !== null;\n };\n\n ipaddr.IPv4.isValid = function(string) {\n var e;\n try {\n new this(this.parser(string));\n return true;\n } catch (error1) {\n e = error1;\n return false;\n }\n };\n\n ipaddr.IPv4.isValidFourPartDecimal = function(string) {\n if (ipaddr.IPv4.isValid(string) && string.match(/^(0|[1-9]\\d*)(\\.(0|[1-9]\\d*)){3}$/)) {\n return true;\n } else {\n return false;\n }\n };\n\n ipaddr.IPv6.isValid = function(string) {\n var addr, e;\n if (typeof string === \"string\" && string.indexOf(\":\") === -1) {\n return false;\n }\n try {\n addr = this.parser(string);\n new this(addr.parts, addr.zoneId);\n return true;\n } catch (error1) {\n e = error1;\n return false;\n }\n };\n\n ipaddr.IPv4.parse = function(string) {\n var parts;\n parts = this.parser(string);\n if (parts === null) {\n throw new Error(\"ipaddr: string is not formatted like ip address\");\n }\n return new this(parts);\n };\n\n ipaddr.IPv6.parse = function(string) {\n var addr;\n addr = this.parser(string);\n if (addr.parts === null) {\n throw new Error(\"ipaddr: string is not formatted like ip address\");\n }\n return new this(addr.parts, addr.zoneId);\n };\n\n ipaddr.IPv4.parseCIDR = function(string) {\n var maskLength, match, parsed;\n if (match = string.match(/^(.+)\\/(\\d+)$/)) {\n maskLength = parseInt(match[2]);\n if (maskLength >= 0 && maskLength <= 32) {\n parsed = [this.parse(match[1]), maskLength];\n Object.defineProperty(parsed, 'toString', {\n value: function() {\n return this.join('/');\n }\n });\n return parsed;\n }\n }\n throw new Error(\"ipaddr: string is not formatted like an IPv4 CIDR range\");\n };\n\n ipaddr.IPv4.subnetMaskFromPrefixLength = function(prefix) {\n var filledOctetCount, j, octets;\n prefix = parseInt(prefix);\n if (prefix < 0 || prefix > 32) {\n throw new Error('ipaddr: invalid IPv4 prefix length');\n }\n octets = [0, 0, 0, 0];\n j = 0;\n filledOctetCount = Math.floor(prefix / 8);\n while (j < filledOctetCount) {\n octets[j] = 255;\n j++;\n }\n if (filledOctetCount < 4) {\n octets[filledOctetCount] = Math.pow(2, prefix % 8) - 1 << 8 - (prefix % 8);\n }\n return new this(octets);\n };\n\n ipaddr.IPv4.broadcastAddressFromCIDR = function(string) {\n var cidr, error, i, ipInterfaceOctets, octets, subnetMaskOctets;\n try {\n cidr = this.parseCIDR(string);\n ipInterfaceOctets = cidr[0].toByteArray();\n subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray();\n octets = [];\n i = 0;\n while (i < 4) {\n octets.push(parseInt(ipInterfaceOctets[i], 10) | parseInt(subnetMaskOctets[i], 10) ^ 255);\n i++;\n }\n return new this(octets);\n } catch (error1) {\n error = error1;\n throw new Error('ipaddr: the address does not have IPv4 CIDR format');\n }\n };\n\n ipaddr.IPv4.networkAddressFromCIDR = function(string) {\n var cidr, error, i, ipInterfaceOctets, octets, subnetMaskOctets;\n try {\n cidr = this.parseCIDR(string);\n ipInterfaceOctets = cidr[0].toByteArray();\n subnetMaskOctets = this.subnetMaskFromPrefixLength(cidr[1]).toByteArray();\n octets = [];\n i = 0;\n while (i < 4) {\n octets.push(parseInt(ipInterfaceOctets[i], 10) & parseInt(subnetMaskOctets[i], 10));\n i++;\n }\n return new this(octets);\n } catch (error1) {\n error = error1;\n throw new Error('ipaddr: the address does not have IPv4 CIDR format');\n }\n };\n\n ipaddr.IPv6.parseCIDR = function(string) {\n var maskLength, match, parsed;\n if (match = string.match(/^(.+)\\/(\\d+)$/)) {\n maskLength = parseInt(match[2]);\n if (maskLength >= 0 && maskLength <= 128) {\n parsed = [this.parse(match[1]), maskLength];\n Object.defineProperty(parsed, 'toString', {\n value: function() {\n return this.join('/');\n }\n });\n return parsed;\n }\n }\n throw new Error(\"ipaddr: string is not formatted like an IPv6 CIDR range\");\n };\n\n ipaddr.isValid = function(string) {\n return ipaddr.IPv6.isValid(string) || ipaddr.IPv4.isValid(string);\n };\n\n ipaddr.parse = function(string) {\n if (ipaddr.IPv6.isValid(string)) {\n return ipaddr.IPv6.parse(string);\n } else if (ipaddr.IPv4.isValid(string)) {\n return ipaddr.IPv4.parse(string);\n } else {\n throw new Error(\"ipaddr: the address has neither IPv6 nor IPv4 format\");\n }\n };\n\n ipaddr.parseCIDR = function(string) {\n var e;\n try {\n return ipaddr.IPv6.parseCIDR(string);\n } catch (error1) {\n e = error1;\n try {\n return ipaddr.IPv4.parseCIDR(string);\n } catch (error1) {\n e = error1;\n throw new Error(\"ipaddr: the address has neither IPv6 nor IPv4 CIDR format\");\n }\n }\n };\n\n ipaddr.fromByteArray = function(bytes) {\n var length;\n length = bytes.length;\n if (length === 4) {\n return new ipaddr.IPv4(bytes);\n } else if (length === 16) {\n return new ipaddr.IPv6(bytes);\n } else {\n throw new Error(\"ipaddr: the binary input is neither an IPv6 nor IPv4 address\");\n }\n };\n\n ipaddr.process = function(string) {\n var addr;\n addr = this.parse(string);\n if (addr.kind() === 'ipv6' && addr.isIPv4MappedAddress()) {\n return addr.toIPv4Address();\n } else {\n return addr;\n }\n };\n\n}).call(this);\n","/**\n * Created by elgs on 3/5/16.\n */\nconst normalize = function (a) {\n if (!_validate(a)) {\n throw new Error('Invalid address: ' + a);\n }\n a = a.toLowerCase()\n\n const nh = a.split(/\\:\\:/g);\n if (nh.length > 2) {\n throw new Error('Invalid address: ' + a);\n }\n\n let sections = [];\n if (nh.length == 1) {\n // full mode\n sections = a.split(/\\:/g);\n if (sections.length !== 8) {\n throw new Error('Invalid address: ' + a);\n }\n } else if (nh.length == 2) {\n // compact mode\n const n = nh[0];\n const h = nh[1];\n const ns = n.split(/\\:/g);\n const hs = h.split(/\\:/g);\n for (let i in ns) {\n sections[i] = ns[i];\n }\n for (let i = hs.length; i > 0; --i) {\n sections[7 - (hs.length - i)] = hs[i - 1];\n }\n }\n for (let i = 0; i < 8; ++i) {\n if (sections[i] === undefined) {\n sections[i] = '0000';\n }\n sections[i] = _leftPad(sections[i], '0', 4);\n }\n return sections.join(':');\n};\n\nconst abbreviate = function (a) {\n if (!_validate(a)) {\n throw new Error('Invalid address: ' + a);\n }\n a = normalize(a);\n a = a.replace(/0000/g, 'g');\n a = a.replace(/\\:000/g, ':');\n a = a.replace(/\\:00/g, ':');\n a = a.replace(/\\:0/g, ':');\n a = a.replace(/g/g, '0');\n const sections = a.split(/\\:/g);\n let zPreviousFlag = false;\n let zeroStartIndex = -1;\n let zeroLength = 0;\n let zStartIndex = -1;\n let zLength = 0;\n for (let i = 0; i < 8; ++i) {\n const section = sections[i];\n let zFlag = (section === '0');\n if (zFlag && !zPreviousFlag) {\n zStartIndex = i;\n }\n if (!zFlag && zPreviousFlag) {\n zLength = i - zStartIndex;\n }\n if (zLength > 1 && zLength > zeroLength) {\n zeroStartIndex = zStartIndex;\n zeroLength = zLength;\n }\n zPreviousFlag = (section === '0');\n }\n if (zPreviousFlag) {\n zLength = 8 - zStartIndex;\n }\n if (zLength > 1 && zLength > zeroLength) {\n zeroStartIndex = zStartIndex;\n zeroLength = zLength;\n }\n //console.log(zeroStartIndex, zeroLength);\n //console.log(sections);\n if (zeroStartIndex >= 0 && zeroLength > 1) {\n sections.splice(zeroStartIndex, zeroLength, 'g');\n }\n //console.log(sections);\n a = sections.join(':');\n //console.log(a);\n a = a.replace(/\\:g\\:/g, '::');\n a = a.replace(/\\:g/g, '::');\n a = a.replace(/g\\:/g, '::');\n a = a.replace(/g/g, '::');\n //console.log(a);\n return a;\n};\n\n// Basic validation\nconst _validate = function (a) {\n return /^[a-f0-9\\\\:]+$/ig.test(a);\n};\n\nconst _leftPad = function (d, p, n) {\n const padding = p.repeat(n);\n if (d.length < padding.length) {\n d = padding.substring(0, padding.length - d.length) + d;\n }\n return d;\n};\n\nconst _hex2bin = function (hex) {\n return parseInt(hex, 16).toString(2)\n};\nconst _bin2hex = function (bin) {\n return parseInt(bin, 2).toString(16)\n};\n\nconst _addr2bin = function (addr) {\n const nAddr = normalize(addr);\n const sections = nAddr.split(\":\");\n let binAddr = '';\n for (const section of sections) {\n binAddr += _leftPad(_hex2bin(section), '0', 16);\n }\n return binAddr;\n};\n\nconst _bin2addr = function (bin) {\n const addr = [];\n for (let i = 0; i < 8; ++i) {\n const binPart = bin.substr(i * 16, 16);\n const hexSection = _leftPad(_bin2hex(binPart), '0', 4);\n addr.push(hexSection);\n }\n return addr.join(':');\n};\n\nconst divideSubnet = function (addr, mask0, mask1, limit, abbr) {\n if (!_validate(addr)) {\n throw new Error('Invalid address: ' + addr);\n }\n mask0 *= 1;\n mask1 *= 1;\n limit *= 1;\n mask1 = mask1 || 128;\n if (mask0 < 1 || mask1 < 1 || mask0 > 128 || mask1 > 128 || mask0 > mask1) {\n throw new Error('Invalid masks.');\n }\n const ret = [];\n const binAddr = _addr2bin(addr);\n const binNetPart = binAddr.substr(0, mask0);\n const binHostPart = '0'.repeat(128 - mask1);\n const numSubnets = Math.pow(2, mask1 - mask0);\n for (let i = 0; i < numSubnets; ++i) {\n if (!!limit && i >= limit) {\n break;\n }\n const binSubnet = _leftPad(i.toString(2), '0', mask1 - mask0);\n const binSubAddr = binNetPart + binSubnet + binHostPart;\n const hexAddr = _bin2addr(binSubAddr);\n if (!!abbr) {\n ret.push(abbreviate(hexAddr));\n } else {\n ret.push(hexAddr);\n }\n\n }\n // console.log(numSubnets);\n // console.log(binNetPart, binSubnetPart, binHostPart);\n // console.log(binNetPart.length, binSubnetPart.length, binHostPart.length);\n // console.log(ret.length);\n return ret;\n};\n\nconst range = function (addr, mask0, mask1, abbr) {\n if (!_validate(addr)) {\n throw new Error('Invalid address: ' + addr);\n }\n mask0 *= 1;\n mask1 *= 1;\n mask1 = mask1 || 128;\n if (mask0 < 1 || mask1 < 1 || mask0 > 128 || mask1 > 128 || mask0 > mask1) {\n throw new Error('Invalid masks.');\n }\n const binAddr = _addr2bin(addr);\n const binNetPart = binAddr.substr(0, mask0);\n const binHostPart = '0'.repeat(128 - mask1);\n const binStartAddr = binNetPart + '0'.repeat(mask1 - mask0) + binHostPart;\n const binEndAddr = binNetPart + '1'.repeat(mask1 - mask0) + binHostPart;\n if (!!abbr) {\n return {\n start: abbreviate(_bin2addr(binStartAddr)),\n end: abbreviate(_bin2addr(binEndAddr)),\n size: Math.pow(2, mask1 - mask0)\n };\n } else {\n return {\n start: _bin2addr(binStartAddr),\n end: _bin2addr(binEndAddr),\n size: Math.pow(2, mask1 - mask0)\n };\n }\n};\n\nconst randomSubnet = function (addr, mask0, mask1, limit, abbr) {\n if (!_validate(addr)) {\n throw new Error('Invalid address: ' + addr);\n }\n mask0 *= 1;\n mask1 *= 1;\n limit *= 1;\n mask1 = mask1 || 128;\n limit = limit || 1;\n if (mask0 < 1 || mask1 < 1 || mask0 > 128 || mask1 > 128 || mask0 > mask1) {\n throw new Error('Invalid masks.');\n }\n const ret = [];\n const binAddr = _addr2bin(addr);\n const binNetPart = binAddr.substr(0, mask0);\n const binHostPart = '0'.repeat(128 - mask1);\n const numSubnets = Math.pow(2, mask1 - mask0);\n for (let i = 0; i < numSubnets && i < limit; ++i) {\n // generate an binary string with length of mask1 - mask0\n let binSubnet = '';\n for (let j = 0; j < mask1 - mask0; ++j) {\n binSubnet += Math.floor(Math.random() * 2);\n }\n const binSubAddr = binNetPart + binSubnet + binHostPart;\n const hexAddr = _bin2addr(binSubAddr);\n if (!!abbr) {\n ret.push(abbreviate(hexAddr));\n } else {\n ret.push(hexAddr);\n }\n }\n // console.log(numSubnets);\n // console.log(binNetPart, binSubnetPart, binHostPart);\n // console.log(binNetPart.length, binSubnetPart.length, binHostPart.length);\n // console.log(ret.length);\n return ret;\n};\n\nconst ptr = function (addr, mask) {\n if (!_validate(addr)) {\n throw new Error('Invalid address: ' + addr);\n }\n mask *= 1;\n if (mask < 1 || mask > 128 || Math.floor(mask / 4) != mask / 4) {\n throw new Error('Invalid masks.');\n }\n const fullAddr = normalize(addr);\n const reverse = fullAddr.replace(/:/g, '').split('').reverse();\n return reverse.slice(0, (128 - mask) / 4).join('.');\n};\n\nif (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {\n exports.normalize = normalize;\n exports.abbreviate = abbreviate;\n exports.divideSubnet = divideSubnet;\n exports.range = range;\n exports.randomSubnet = randomSubnet;\n exports.ptr = ptr;\n} else {\n window.normalize = normalize;\n window.abbreviate = abbreviate;\n window.divideSubnet = divideSubnet;\n window.range = range;\n window.randomSubnet = randomSubnet;\n window.ptr = ptr;\n}\n","import ipaddr from 'ipaddr.js';\n// @ts-ignore: Can't find a @types/ip6 package\nimport ip6 from 'ip6';\n\nexport function isIP(addr: string) {\n return ipaddr.isValid(addr);\n}\n\nexport function version(addr: string): number {\n try {\n const parse_addr = ipaddr.parse(addr);\n const kind = parse_addr.kind();\n\n if (kind === 'ipv4') {\n return 4; //IPv4\n } else if (kind === 'ipv6') {\n return 6; //IPv6\n } else {\n /* istanbul ignore next */\n return 0; //not 4 or 6\n }\n } catch (err) {\n return 0; //not 4 or 6\n }\n}\n\nexport function isV4(addr: string) {\n return version(addr) === 4;\n}\n\nexport function isV6(addr: string) {\n return version(addr) === 6;\n}\n\nexport function isRange(range: string) {\n try {\n const cidr = ipaddr.parseCIDR(range);\n return true;\n } catch (err) {\n return false;\n }\n}\n\nexport function inRange(addr: string, range: string | string[]) {\n if (typeof range === 'string') {\n if (range.indexOf('/') !== -1) {\n try {\n const range_data = range.split('/');\n\n const parse_addr = ipaddr.parse(addr);\n const parse_range = ipaddr.parse(range_data[0]);\n\n //@ts-ignore: It works.\n return parse_addr.match(parse_range, range_data[1]);\n } catch (err) {\n return false;\n }\n } else {\n addr = isV6(addr) ? ip6.normalize(addr) : addr; //v6 normalize addr\n range = isV6(range) ? ip6.normalize(range) : range; //v6 normalize range\n\n return isIP(range as string) && addr === range;\n }\n } else if (range && typeof range === 'object') {\n //list\n for (const check_range in range) {\n if (inRange(addr, range[check_range]) === true) {\n return true;\n }\n }\n return false;\n } else {\n return false;\n }\n}\n\nexport function storeIP(addr: string) {\n try {\n var parse_addr = ipaddr.parse(addr);\n var kind = parse_addr.kind();\n\n if (kind === 'ipv4') {\n //is a plain v4 address\n return addr;\n } else if (kind === 'ipv6') {\n //@ts-ignore: it exists!\n if (parse_addr.isIPv4MappedAddress()) {\n //convert v4 mapped to v6 addresses to a v4 in it's original format\n //@ts-ignore: it exists!\n return parse_addr.toIPv4Address().toString();\n } //is a v6, abbreviate it\n else {\n return ip6.abbreviate(addr);\n }\n } else {\n return null; //invalid IP address\n }\n } catch (err) {\n return null; //invalid IP address\n }\n}\n\n// searchIP is a aliases of storeIP\nexport { storeIP as searchIP };\n\nexport function displayIP(addr: string) {\n try {\n var parse_addr = ipaddr.parse(addr);\n var kind = parse_addr.kind();\n\n if (kind === 'ipv4') {\n //is a plain v4 address\n return addr;\n } else if (kind === 'ipv6') {\n //@ts-ignore: it exists!\n if (parse_addr.isIPv4MappedAddress()) {\n //convert v4 mapped to v6 addresses to a v4 in it's original format\n //@ts-ignore: it exists!\n return parse_addr.toIPv4Address().toString();\n } //is a v6, normalize it\n else {\n return ip6.normalize(addr);\n }\n } else {\n return ''; //invalid IP address\n }\n } catch (err) {\n return ''; //invalid IP address\n }\n}\n","/**\n * All event listeners\n *\n * https://developers.facebook.com/docs/meta-pixel/reference\n * */\n\n// Load pixel event\njQuery(document).on(\"wpmLoadPixels\", () => {\n\n\tif (\n\t\twpmDataLayer?.pixels?.facebook?.pixel_id\n\t\t&& !wpmDataLayer?.pixels?.facebook?.loaded\n\t\t&& !wpm.doesUrlContainPatterns(wpmDataLayer?.pixels?.facebook?.exclusion_patterns)\n\t) {\n\t\tif (wpm.canIFire(\"ads\", \"facebook-ads\")) wpm.loadFacebookPixel()\n\t}\n})\n\n// AddToCart event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideAddToCart\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"AddToCart\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t\twpm.consoleLog(\"Facebook Pixel: AddToCart event sent\", payload.facebook)\n\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// InitiateCheckout event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideBeginCheckout\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"InitiateCheckout\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t\twpm.consoleLog(\"Facebook Pixel: InitiateCheckout event sent\", payload.facebook)\n\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// AddToWishlist event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideAddToWishlist\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"AddToWishlist\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t\twpm.consoleLog(\"Facebook Pixel: AddToWishlist event sent\", payload.facebook)\n\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// ViewContent event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideViewItem\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"ViewContent\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t\twpm.consoleLog(\"Facebook Pixel: ViewContent event sent\", payload.facebook)\n\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n\n// view search event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideSearch\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Search\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t\twpm.consoleLog(\"Facebook Pixel: Search event sent\", payload.facebook)\n\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// load always event\njQuery(document).on(\"wpmLoadAlways\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\twpm.setFbUserData()\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// view order received page event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideOrderReceivedPage\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Purchase\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t\twpm.consoleLog(\"Facebook Pixel: Purchase event sent\", payload.facebook)\n\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n","/**\n * Add functions for Facebook\n * */\n\n(function (wpm, $, undefined) {\n\n\tlet fbUserData\n\n\twpm.fbeventsJsUrl = () => {\n\n\t\tlet searchParams = new URLSearchParams(window.location.search)\n\n\t\tif (searchParams.has(\"fbevents-version\")) {\n\t\t\treturn `https://connect.facebook.net/en_US/fbevents.js?v=${searchParams.get(\"fbevents-version\")}`\n\t\t}\n\n\t\treturn wpmDataLayer?.pixels?.facebook?.fbevents_js_url\n\t}\n\n\twpm.loadFacebookPixel = () => {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.facebook.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\t!function(f,b,e,v,n,t,s)\n\t\t\t{if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n\t\t\t\tn.callMethod.apply(n,arguments):n.queue.push(arguments)};\n\t\t\t\tif(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n\t\t\t\tn.queue=[];t=b.createElement(e);t.async=!0;\n\t\t\t\tt.src=v;s=b.getElementsByTagName(e)[0];\n\t\t\t\ts.parentNode.insertBefore(t,s)}(window, document,'script',\n\t\t\t\twpm.fbeventsJsUrl());\n\t\t\t// @formatter:on\n\n\t\t\tlet data = {}\n\n\t\t\t// Add user identifiers to data,\n\t\t\t// and only if fbp was set\n\t\t\tif (wpm.isFbpSet() && wpm.isFbAdvancedMatchingEnabled()) {\n\t\t\t\tdata = {...wpm.getUserIdentifiersForFb()}\n\t\t\t}\n\n\t\t\t// https://developers.facebook.com/docs/meta-pixel/advanced/#automatic-configuration\n\t\t\t// fbq(\"set\", \"autoConfig\", false, wpmDataLayer.pixels.facebook.pixel_id)\n\n\t\t\t// Initialize the Facebook Pixel and send the first PageView event\n\t\t\tfbq(\"init\", wpmDataLayer.pixels.facebook.pixel_id, data)\n\n\t\t\tif (wpmDataLayer?.pixels?.facebook?.mobile_bridge_app_id) {\n\t\t\t\tfbq(\"set\", \"mobileBridge\", wpmDataLayer.pixels.facebook.pixel_id, wpmDataLayer?.pixels?.facebook?.mobile_bridge_app_id)\n\t\t\t}\n\n\t\t\tfbq(\"track\", \"PageView\")\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// https://developers.facebook.com/docs/meta-pixel/advanced/advanced-matching\n\twpm.getUserIdentifiersForFb = () => {\n\n\t\tlet data = {}\n\n\t\t// external ID\n\t\tif (wpmDataLayer?.user?.id?.raw) data.external_id = wpmDataLayer.user.id.raw\n\t\tif (wpmDataLayer?.order?.user_id) data.external_id = wpmDataLayer.order.user_id\n\n\t\t// email\n\t\tif (wpmDataLayer?.user?.email?.facebook) data.em = wpmDataLayer.user.email.facebook\n\t\tif (wpmDataLayer?.order?.billing_email_hashed) data.em = wpmDataLayer.order.billing_email_hashed\n\n\t\t// first name\n\t\tif (wpmDataLayer?.user?.first_name?.facebook) data.fn = wpmDataLayer.user.first_name.facebook\n\t\tif (wpmDataLayer?.order?.billing_first_name) data.fn = wpmDataLayer.order.billing_first_name.toLowerCase()\n\n\t\t// last name\n\t\tif (wpmDataLayer?.user?.last_name?.facebook) data.ln = wpmDataLayer.user.last_name.facebook\n\t\tif (wpmDataLayer?.order?.billing_last_name) data.ln = wpmDataLayer.order.billing_last_name.toLowerCase()\n\n\t\t// phone\n\t\tif (wpmDataLayer?.user?.phone?.facebook) data.ph = wpmDataLayer.user.phone.facebook\n\t\tif (wpmDataLayer?.order?.billing_phone) data.ph = wpmDataLayer.order.billing_phone.replace(\"+\", \"\")\n\n\t\t// city\n\t\tif (wpmDataLayer?.user?.city?.facebook) data.ct = wpmDataLayer.user.city.facebook\n\t\tif (wpmDataLayer?.order?.billing_city) data.ct = wpmDataLayer.order.billing_city.toLowerCase().replace(/ /g, \"\")\n\n\t\t// state\n\t\tif (wpmDataLayer?.user?.state?.facebook) data.st = wpmDataLayer.user.state.facebook\n\t\tif (wpmDataLayer?.order?.billing_state) data.st = wpmDataLayer.order.billing_state.toLowerCase().replace(/[a-zA-Z]{2}-/, \"\")\n\n\t\t// postcode\n\t\tif (wpmDataLayer?.user?.postcode?.facebook) data.zp = wpmDataLayer.user.postcode.facebook\n\t\tif (wpmDataLayer?.order?.billing_postcode) data.zp = wpmDataLayer.order.billing_postcode\n\n\t\t// country\n\t\tif (wpmDataLayer?.user?.country?.facebook) data.country = wpmDataLayer.user.country.facebook\n\t\tif (wpmDataLayer?.order?.billing_country) data.country = wpmDataLayer.order.billing_country.toLowerCase()\n\n\t\treturn data\n\t}\n\n\twpm.getFbRandomEventId = () => (Math.random() + 1).toString(36).substring(2)\n\n\twpm.getFbUserData = () => {\n\n\t\t/**\n\t\t * We need to cache the FB user data for InitiateCheckout\n\t\t * where getting the user data from the browser is too slow\n\t\t * using wpm.getCookie().\n\t\t *\n\t\t * And we need the object merge because the ViewContent hit happens too fast\n\t\t * after adding a variation to the cart because the function to cache\n\t\t * the user data is too slow.\n\t\t *\n\t\t * But we can get the user_data using wpm.getCookie()\n\t\t * because we don't move away from the page and can wait for the browser\n\t\t * to get it.\n\t\t *\n\t\t * Also, the merge ensures that new data will be added to fbUserData if new\n\t\t * data is being added later, like user ID, or fbc.\n\t\t */\n\n\t\tfbUserData = {...fbUserData, ...wpm.getFbUserDataFromBrowser()}\n\n\t\treturn fbUserData\n\t}\n\n\twpm.isFbAdvancedMatchingEnabled = () => {\n\t\tif (wpmDataLayer?.pixels?.facebook?.advanced_matching) {\n\t\t\treturn true\n\t\t}\n\n\t\treturn false\n\t}\n\n\twpm.setFbUserData = () => {\n\t\tfbUserData = wpm.getFbUserDataFromBrowser()\n\t}\n\n\twpm.getFbUserDataFromBrowser = () => {\n\n\t\tlet\n\t\t\tdata = {}\n\n\t\tif (wpm.getCookie(\"_fbp\") && wpm.isValidFbp(wpm.getCookie(\"_fbp\"))) {\n\t\t\tdata.fbp = wpm.getCookie(\"_fbp\")\n\t\t}\n\n\t\tif (wpm.getCookie(\"_fbc\") && wpm.isValidFbc(wpm.getCookie(\"_fbc\"))) {\n\t\t\tdata.fbc = wpm.getCookie(\"_fbc\")\n\t\t}\n\n\t\tif (wpm.isFbAdvancedMatchingEnabled()) {\n\t\t\tif (wpmDataLayer?.user?.id?.raw) data.external_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\tif (navigator.userAgent) data.client_user_agent = navigator.userAgent\n\n\t\t// If a IPv6 address is available in the data store, add it to the user data\n\t\tif (wpm.retrieveData(\"ipv6\")) data.client_ip_address = wpm.retrieveData(\"ipv6\")\n\n\t\treturn data\n\t}\n\n\twpm.isFbpSet = () => {\n\t\treturn !!wpm.getCookie(\"_fbp\")\n\t}\n\n\t// https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc/\n\twpm.isValidFbp = fbp => {\n\n\t\tlet re = new RegExp(/^fb\\.[0-2]\\.\\d{13}\\.\\d{8,20}$/)\n\n\t\treturn re.test(fbp)\n\t}\n\n\t// https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc/\n\twpm.isValidFbc = fbc => {\n\n\t\tlet re = new RegExp(/^fb\\.[0-2]\\.\\d{13}\\.[\\da-zA-Z_-]{8,}/)\n\n\t\treturn re.test(fbc)\n\t}\n\n\t// wpm.fbViewContent = (product = null) => {\n\t//\n\t// \ttry {\n\t// \t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\t//\n\t// \t\tlet eventId = wpm.getFbRandomEventId()\n\t//\n\t// \t\tlet data = {}\n\t//\n\t// \t\tif (product) {\n\t// \t\t\tdata.content_type = \"product\"\n\t// \t\t\tdata.content_name = product.name\n\t// \t\t\t// data.content_category = product.category\n\t// \t\t\tdata.content_ids = product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]\n\t// \t\t\tdata.currency = wpmDataLayer.shop.currency\n\t// \t\t\tdata.value = product.price\n\t// \t\t}\n\t//\n\t// \t\tfbq(\"track\", \"ViewContent\", data, {\n\t// \t\t\teventID: eventId,\n\t// \t\t})\n\t//\n\t// \t\tlet capiData = {\n\t// \t\t\tevent_name : \"ViewContent\",\n\t// \t\t\tevent_id : eventId,\n\t// \t\t\tuser_data : wpm.getFbUserData(),\n\t// \t\t\tevent_source_url: window.location.href,\n\t// \t\t}\n\t//\n\t// \t\tif (product) {\n\t// \t\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\t// \t\t\tcapiData.custom_data = wpm.fbGetProductDataForCapiEvent(product)\n\t// \t\t}\n\t//\n\t// \t\tjQuery(document).trigger(\"wpmFbCapiEvent\", capiData)\n\t// \t} catch (e) {\n\t// \t\tconsole.error(e)\n\t// \t}\n\t// }\n\n\twpm.fbGetProductDataForCapiEvent = product => {\n\t\treturn {\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tcontent_ids : [\n\t\t\t\tproduct.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\t],\n\t\t\tvalue : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.currency,\n\t\t}\n\t}\n\n\twpm.facebookContentIds = () => {\n\t\tlet prodIds = []\n\n\t\tObject.values(wpmDataLayer.order.items).forEach(item => {\n\t\t\tif (wpmDataLayer?.shop?.variations_output && 0 !== item.variation_id) {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t} else {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t}\n\t\t})\n\n\t\treturn prodIds\n\t}\n\n\twpm.trackCustomFacebookEvent = (eventName, customData = {}) => {\n\t\ttry {\n\t\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\t\tlet eventId = wpm.getFbRandomEventId()\n\n\t\t\tfbq(\"trackCustom\", eventName, customData, {\n\t\t\t\teventID: eventId,\n\t\t\t})\n\n\t\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\t\tevent_name : eventName,\n\t\t\t\tevent_id : eventId,\n\t\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\t\tevent_source_url: window.location.href,\n\t\t\t\tcustom_data : customData,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fbGetContentIdsFromCart = () => {\n\n\t\tlet content_ids = []\n\n\t\tfor (const key in wpmDataLayer.cart) {\n\t\t\tcontent_ids.push(wpmDataLayer.products[key].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])\n\t\t}\n\n\t\treturn content_ids\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Facebook loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// if (wpm.canLoadPremiumFeatures()) {\n// \trequire(\"./functions_premium\")\n// \trequire(\"./event_listeners_premium\")\n// }\n// #endif\n\n","/**\n * Load Google Ads event listeners\n * */\n\n// view_item_list event\njQuery(document).on(\"wpmViewItemList\", (event, product) => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\tif (\n\t\t\twpmDataLayer?.shop?.variations_output &&\n\t\t\tproduct.is_variable &&\n\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t) return\n\n\t\t// try to prevent that WC sends cached hits to Google\n\t\tif (!product) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\titems : [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}],\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"view_item_list\", data)\n\t\t\twpm.consoleLog(\"Google Ads: view_item_list event sent\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// add_to_cart event\njQuery(document).on(\"wpmAddToCart\", (event, product) => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\tvalue : product.quantity * product.price,\n\t\t\titems : [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tquantity : product.quantity,\n\t\t\t\tprice : product.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}],\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"add_to_cart\", data)\n\t\t\twpm.consoleLog(\"Google Ads: add_to_cart event sent\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view_item event\njQuery(document).on(\"wpmViewItem\", (event, product = null) => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t}\n\n\t\tif (product) {\n\t\t\tdata.value = (product.quantity ? product.quantity : 1) * product.price\n\t\t\tdata.items = [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tquantity : (product.quantity ? product.quantity : 1),\n\t\t\t\tprice : product.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}]\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"view_item\", data)\n\t\t\twpm.consoleLog(\"Google Ads: view_item event sent\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view search event\njQuery(document).on(\"pmwEvent:Search\", () => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\tlet products = []\n\n\t\tObject.values(wpmDataLayer.products).forEach(product => {\n\n\t\t\tif (\n\t\t\t\twpmDataLayer?.shop?.variations_output &&\n\t\t\t\tproduct.is_variable &&\n\t\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t\t) return\n\n\t\t\tproducts.push({\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t})\n\t\t})\n\n\t\t// console.log(products);\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t// value : 1 * product.price,\n\t\t\titems: products,\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"view_search_results\", data)\n\t\t\twpm.consoleLog(\"Google Ads: view_search_results event sent\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// user log in event\njQuery(document).on(\"wpmLogin\", () => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"login\", data)\n\t\t\twpm.consoleLog(\"Google Ads: login event sent\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n/**\n * Google Ads remarketing purchase\n *\n * https://support.google.com/google-ads/answer/7305793\n */\njQuery(document).on(\"wpmOrderReceivedPage\", () => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpm.getGoogleAdsConversionIdentifiersWithLabel())) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\tvalue : wpmDataLayer.order.value.marketing,\n\t\t\t// currency: wpmDataLayer.order.currency,\n\t\t\titems: wpm.getGoogleAdsRegularOrderItems(),\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"purchase\", data)\n\t\t\twpm.consoleLog(\"Google Ads: purchase event sent (for remarketing lists)\", data)\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n/**\n * Google Ads conversion event\n *\n * new_customer parameter: https://support.google.com/google-ads/answer/9917012\n * cart data: https://support.google.com/google-ads/answer/9028614\n * customer_lifetime_value is undocumented, but available in gtag.js\n */\njQuery(document).on(\"wpmOrderReceivedPage\", () => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpm.getGoogleAdsConversionIdentifiersWithLabel())) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to : wpm.getGoogleAdsConversionIdentifiersWithLabel(),\n\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\tvalue : wpmDataLayer.order.value.marketing,\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\tnew_customer : wpmDataLayer.order.new_customer,\n\t\t}\n\n\t\tif (wpmDataLayer?.order?.value?.ltv?.marketing) {\n\t\t\tdata.customer_lifetime_value = wpmDataLayer.order.value.ltv.marketing\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id?.raw) {\n\t\t\tdata.user_id = wpmDataLayer.user.id.raw\n\t\t}\n\n\t\t// https://support.google.com/google-ads/answer/9028614\n\t\tif (wpmDataLayer?.order?.aw_merchant_id) {\n\t\t\tdata.discount = wpmDataLayer.order.discount\n\t\t\tdata.aw_merchant_id = wpmDataLayer.order.aw_merchant_id\n\t\t\tdata.aw_feed_country = wpmDataLayer.order.aw_feed_country\n\t\t\tdata.aw_feed_language = wpmDataLayer.order.aw_feed_language\n\t\t\tdata.items = wpm.getGoogleAdsRegularOrderItems()\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\t// Event needs to be \"purchase\" (not \"conversion\") in order to be able to track cart data:\n\t\t\t// https://support.google.com/google-ads/answer/9028614\n\t\t\tgtag(\"event\", \"purchase\", data)\n\t\t\twpm.consoleLog(\"Google Ads: conversion event sent\", data)\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load Google Ads functions\n * */\n\n(function (wpm, $, undefined) {\n\n\n\twpm.getGoogleAdsConversionIdentifiersWithLabel = () => {\n\n\t\tlet conversionIdentifiers = []\n\n\t\tif (wpmDataLayer?.pixels?.google?.ads?.conversionIds) {\n\t\t\tObject.entries(wpmDataLayer.pixels.google.ads.conversionIds).forEach(([key, item]) => {\n\t\t\t\tif (item) {\n\t\t\t\t\tconversionIdentifiers.push(key + \"/\" + item)\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsConversionIdentifiers = () => {\n\n\t\tlet conversionIdentifiers = []\n\n\t\tObject.keys(wpmDataLayer.pixels.google.ads.conversionIds).forEach((key) => {\n\t\t\tconversionIdentifiers.push(key)\n\t\t})\n\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsRegularOrderItems = () => {\n\n\t\tlet orderItems = []\n\n\t\tObject.values(wpmDataLayer.order.items).forEach((item) => {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.shop?.variations_output && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t})\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load Google Ads\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load GA4 event listeners\n * */\n\n// view_item_list event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#view_item_list\njQuery(document).on(\"wpmViewItemList\", (event, product) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\tconst data = {\n\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\titems : [wpm.ga4GetFullProductItemData(product)],\n\t\t\titem_list_name: wpmDataLayer.shop.list_name, // doesn't make sense on mini_cart\n\t\t\titem_list_id : wpmDataLayer.shop.list_id, // doesn't make sense on mini_cart\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"view_item_list\", data)\n\t\t\twpm.consoleLog(\"Google Analytics: view_item_list event sent\".data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// select_item event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#select_item\njQuery(document).on(\"wpmSelectItem\", (event, product) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\tconst data = {\n\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\titems : [wpm.ga4GetFullProductItemData(product)],\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"select_item\", data)\n\t\t\twpm.consoleLog(\"Google Analytics: select_item event sent\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// add_to_cart event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#add_to_cart\njQuery(document).on(\"wpmAddToCart\", (event, product) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\tconst data = {\n\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\tvalue : product.price * product.quantity,\n\t\t\titems : [wpm.ga4GetFullProductItemData(product)],\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"add_to_cart\", data)\n\t\t\twpm.consoleLog(\"Google Analytics: add_to_cart event sent\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view_item event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#view_item\njQuery(document).on(\"wpmViewItem\", (event, product = null) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t}\n\n\t\tif (product) {\n\t\t\tdata.currency = wpmDataLayer.shop.currency\n\t\t\t// data.value = 0\n\t\t\tdata.items = [wpm.ga4GetFullProductItemData(product)]\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"view_item\", data)\n\t\t\twpm.consoleLog(\"Google Analytics: view_item event sent\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// add_to_wishlist event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#add_to_wishlist\njQuery(document).on(\"wpmAddToWishlist\", (event, product) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\tconst data = {\n\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\tvalue : product.price * product.quantity,\n\t\t\titems : [wpm.ga4GetFullProductItemData(product)],\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"add_to_wishlist\", data)\n\t\t\twpm.consoleLog(\"Google Analytics: add_to_wishlist event sent\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// remove_from_cart event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#remove_from_cart\njQuery(document).on(\"wpmRemoveFromCart\", (event, product) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\tconst data = {\n\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\tvalue : product.price * product.quantity,\n\t\t\titems : [wpm.ga4GetFullProductItemData(product)],\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"remove_from_cart\", data)\n\t\t\twpm.consoleLog(\"Google Analytics: remove_from_cart event sent\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// begin_checkout event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#begin_checkout\njQuery(document).on(\"wpmBeginCheckout\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\tconst data = {\n\t\t\tsend_to: wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\t// coupon: \"\",\n\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\tvalue : wpm.getCartValue(),\n\t\t\titems : wpm.getCartItemsGa4(),\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"begin_checkout\", data)\n\t\t\twpm.consoleLog(\"Google Analytics: begin_checkout event sent\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view_cart event\n// https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#view_cart\njQuery(document).on(\"wpmViewCart\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\tif (jQuery.isEmptyObject(wpmDataLayer.cart)) return\n\n\t\tlet products = []\n\t\tlet cartValue = null\n\n\t\tObject.values(wpmDataLayer.cart).forEach(product => {\n\t\t\tproducts.push(wpm.ga4GetFullProductItemData(product))\n\t\t\tcartValue = cartValue + product.quantity * product.price\n\t\t})\n\t\t\n\t\tconst data = {\n\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\tcurrency: wpmDataLayer.shop.currency,\n\t\t\tvalue : cartValue.toFixed(2),\n\t\t\titems : products,\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"view_cart\", data)\n\t\t\twpm.consoleLog(\"Google Analytics: view_cart event sent\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view search event\njQuery(document).on(\"pmwEvent:Search\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.eec) return\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\tlet products = []\n\n\t\tObject.values(wpmDataLayer.products).forEach(product => {\n\t\t\tproducts.push(wpm.ga4GetFullProductItemData(product))\n\t\t})\n\n\t\tconst data = {\n\t\t\tsend_to : wpmDataLayer.pixels.google.analytics.ga4.measurement_id,\n\t\t\tsearch_term: wpm.getSearchTermFromUrl(),\n\t\t\titems : products,\n\t\t}\n\n\t\twpm.gtagLoaded().then(() => {\n\t\t\tgtag(\"event\", \"view_search_results\", data)\n\t\t\twpm.consoleLog(\"Google Analytics: view_search_results event sent\", data)\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\n\t\t// ga4_server_and_browser_tracking experiment\n\t\t// https://app.asana.com/0/1110999795232049/1204453591507565\n\t\t// ga4e: if (wpmDataLayer?.pixels?.google?.analytics?.ga4?.mp_active) {\n\t\t// \tif (wpmDataLayer?.experiments?.ga4_server_and_browser_tracking) {\n\t\t// \t\tbreak ga4e\n\t\t// \t}\n\t\t// \treturn\n\t\t// }\n\n\t\t// Deactivated for the ga4_server_and_browser_tracking experiment\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.mp_active) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\tconst data = {\n\t\t\tsend_to : [wpmDataLayer.pixels.google.analytics.ga4.measurement_id],\n\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\taffiliation : wpmDataLayer.order.affiliation,\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\tvalue : wpmDataLayer.order.value.total,\n\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\ttax : wpmDataLayer.order.tax,\n\t\t\tshipping : wpmDataLayer.order.shipping,\n\t\t\tcoupon : wpmDataLayer.order.coupon,\n\t\t\titems : wpm.getGA4OrderItems(),\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", data)\n\t\t\twpm.consoleLog(\"Google Analytics: purchase event sent\", data)\n\t\t})\n\n\t\t// wpm.gtagLoaded().then(function () {\n\t\t// \tgtag(\"get\", wpmDataLayer.pixels.google.analytics.ga4.measurement_id, \"client_id\", (client_id) => {\n\t\t// \t\tconsole.log(\"transaction_id: \" + wpmDataLayer.order.number + \" client_id: \" + client_id)\n\t\t// \t})\n\t\t// })\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load GA4 functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getGA4OrderItems = function () {\n\n\t\t// \"item_id\" : \"34\",\n\t\t// \"item_name\" : \"Hoodie\",\n\t\t// \"quantity\" : 1,\n\t\t// \"item_brand\" : \"\",\n\t\t// \"item_variant\" : \"Color: blue | Logo: yes\",\n\t\t// \"price\" : 45,\n\t\t// \"currency\" : \"CHF\",\n\t\t// \"item_category\": \"Hoodies\"\n\n\n\t\tlet orderItems = []\n\n\t\tObject.values(wpmDataLayer.order.items).forEach((item) => {\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\titem_name : item.name,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\titem_category: wpmDataLayer.products[item.id].category.join(\"/\"),\n\t\t\t}\n\n\t\t\tif (0 !== item.variation_id) {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.item_variant = wpmDataLayer.products[item.variation_id].variant_name\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.variation_id].brand\n\t\t\t} else {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.id].brand\n\t\t\t}\n\n\t\t\torderItems.push(orderItem)\n\t\t})\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * GA4 loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// if (wpm.canLoadPremiumFeatures()) {\n// \trequire(\"./functions_premium\")\n// \trequire(\"./event_listeners_premium\")\n// }\n// #endif\n","/**\n * Google Analytics loader\n */\n\nrequire(\"./ga4/loader\")\n","/**\n * Load Google base event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") {\n\t\tif (wpm.canGoogleLoad()) {\n\t\t\twpm.loadGoogle()\n\t\t} else {\n\t\t\twpm.logPreventedPixelLoading(\"google\", \"analytics / ads\")\n\t\t}\n\t}\n})\n","/**\n * Load Google base functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.googleConfigConditionsMet = (type) => {\n\n\t\t// always returns true if Google Consent Mode is active\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.is_active) {\n\t\t\treturn true\n\t\t} else if (wpm.getConsentValues().mode === \"category\") {\n\t\t\treturn wpm.getConsentValues().categories[type] === true\n\t\t} else if (wpm.getConsentValues().mode === \"pixel\") {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-\" + type)\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings = (google_consent_settings) => {\n\n\t\tif (wpm.getConsentValues().mode === \"category\") {\n\n\t\t\tif (wpm.getConsentValues().categories.analytics) google_consent_settings.analytics_storage = \"granted\"\n\t\t\tif (wpm.getConsentValues().categories.ads) {\n\t\t\t\tgoogle_consent_settings.ad_storage = \"granted\"\n\t\t\t\tgoogle_consent_settings.ad_user_data = \"granted\"\n\t\t\t\tgoogle_consent_settings.ad_personalization = \"granted\"\n\t\t\t}\n\t\t} else if ((wpm.getConsentValues().mode === \"pixel\")) {\n\n\t\t\tgoogle_consent_settings.analytics_storage = wpm.getConsentValues().pixels.includes(\"google-analytics\") ? \"granted\" : \"denied\"\n\t\t\tgoogle_consent_settings.ad_storage = wpm.getConsentValues().pixels.includes(\"google-ads\") ? \"granted\" : \"denied\"\n\t\t\tgoogle_consent_settings.ad_user_data = wpm.getConsentValues().pixels.includes(\"google-ads\") ? \"granted\" : \"denied\"\n\t\t\tgoogle_consent_settings.ad_personalization = wpm.getConsentValues().pixels.includes(\"google-ads\") ? \"granted\" : \"denied\"\n\t\t}\n\n\t\treturn google_consent_settings\n\t}\n\n\twpm.fireGtagGoogleAds = () => {\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.ads.state = \"loading\"\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.ads?.enhanced_conversions?.active) {\n\t\t\t\tObject.keys(wpmDataLayer.pixels.google.ads.conversionIds).forEach((key) => {\n\t\t\t\t\tgtag(\"config\", key, {\"allow_enhanced_conversions\": true})\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tObject.keys(wpmDataLayer.pixels.google.ads.conversionIds).forEach((key) => {\n\t\t\t\t\tgtag(\"config\", key)\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.ads?.conversionIds && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_label && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_number) {\n\t\t\t\tgtag(\"config\", Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0] + \"/\" + wpmDataLayer.pixels.google.ads.phone_conversion_label, {\n\t\t\t\t\tphone_conversion_number: wpmDataLayer.pixels.google.ads.phone_conversion_number,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// https://support.google.com/google-ads/answer/9888145#zippy=%2Cvalidate-your-implementation-using-chrome-developer-tools\n\t\t\tif (\n\t\t\t\twpmDataLayer?.shop?.page_type\n\t\t\t\t&& \"order_received_page\" === wpmDataLayer.shop.page_type\n\t\t\t\t&& wpmDataLayer?.order?.google?.ads?.enhanced_conversion_data\n\t\t\t) {\n\t\t\t\tgtag(\"set\", \"user_data\", wpmDataLayer.order.google.ads.enhanced_conversion_data)\n\t\t\t}\n\n\t\t\twpmDataLayer.pixels.google.ads.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// https://developers.google.com/tag-platform/gtagjs/reference\n\twpm.fireGtagGoogleAnalyticsGA4 = () => {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"loading\"\n\n\t\t\tlet parameters = wpmDataLayer.pixels.google.analytics.ga4.parameters\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.debug_mode) {\n\t\t\t\tparameters.debug_mode = true\n\t\t\t}\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.ga4.measurement_id, parameters)\n\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.isGoogleActive = () => {\n\n\t\tif (\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.universal?.property_id ||\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id ||\n\t\t\t!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)\n\t\t) {\n\t\t\treturn true\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getGoogleGtagId = () => {\n\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.ga4.measurement_id\n\t\t}\n\n\t\tif (\n\t\t\twpmDataLayer?.pixels?.google?.ads?.conversionIds\n\t\t\t&& Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]\n\t\t) {\n\t\t\treturn Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]\n\t\t}\n\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) {\n\t\t\tconsole.log(\"UA analytics ID\")\n\t\t\treturn wpmDataLayer.pixels.google.analytics.universal.property_id\n\t\t}\n\n\t\treturn \"\"\n\t}\n\n\n\twpm.loadGoogle = () => {\n\n\t\tif (!wpm.isGoogleActive()) {\n\t\t\treturn\n\t\t}\n\n\t\twpmDataLayer.pixels.google.state = \"loading\"\n\n\t\twpm.loadScriptAndCacheIt(\"https://www.googletagmanager.com/gtag/js?id=\" + wpm.getGoogleGtagId())\n\t\t\t.then((script, textStatus) => {\n\n\t\t\t\ttry {\n\n\t\t\t\t\t// If Google TCF is active, output the TCF script\n\t\t\t\t\t// https://developers.google.com/tag-platform/security/guides/implement-TCF-strings\n\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.tcf_support) {\n\t\t\t\t\t\twindow[\"gtag_enable_tcf_support\"] = true\n\t\t\t\t\t}\n\n\t\t\t\t\t// Initiate Google dataLayer and gtag\n\t\t\t\t\twindow.dataLayer = window.dataLayer || []\n\t\t\t\t\twindow.gtag = function gtag() {\n\t\t\t\t\t\tdataLayer.push(arguments)\n\t\t\t\t\t}\n\n\t\t\t\t\t// Google Consent Mode\n\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.is_active) {\n\n\t\t\t\t\t\tlet google_consent_settings = {\n\t\t\t\t\t\t\t\"ad_storage\" : wpmDataLayer.pixels.google.consent_mode.ad_storage,\n\t\t\t\t\t\t\t\"analytics_storage\" : wpmDataLayer.pixels.google.consent_mode.analytics_storage,\n\t\t\t\t\t\t\t\"ad_user_data\" : wpmDataLayer.pixels.google.consent_mode.ad_user_data,\n\t\t\t\t\t\t\t\"ad_personalization\": wpmDataLayer.pixels.google.consent_mode.ad_personalization,\n\t\t\t\t\t\t\t\"wait_for_update\" : wpmDataLayer.pixels.google.consent_mode.wait_for_update,\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.region) {\n\t\t\t\t\t\t\tgoogle_consent_settings.region = wpmDataLayer.pixels.google.consent_mode.region\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgoogle_consent_settings = wpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings(google_consent_settings)\n\n\t\t\t\t\t\tgtag(\"consent\", \"default\", google_consent_settings)\n\t\t\t\t\t\tgtag(\"set\", \"ads_data_redaction\", wpmDataLayer.pixels.google.consent_mode.ads_data_redaction)\n\t\t\t\t\t\tgtag(\"set\", \"url_passthrough\", wpmDataLayer.pixels.google.consent_mode.url_passthrough)\n\t\t\t\t\t}\n\n\t\t\t\t\t// Google Linker\n\t\t\t\t\t// https://developers.google.com/gtagjs/devguide/linker\n\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.linker?.settings) {\n\t\t\t\t\t\tgtag(\"set\", \"linker\", wpmDataLayer.pixels.google.linker.settings)\n\t\t\t\t\t}\n\n\t\t\t\t\tgtag(\"js\", new Date())\n\t\t\t\t\tgtag(\"set\", \"developer_id.dNDI5Yz\", true)\n\n\t\t\t\t\t// Google Ads loader\n\t\t\t\t\tif (!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) { // Only run if the pixel has set up\n\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"ads\")) { \t\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\twpm.fireGtagGoogleAds()\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"google-ads\", \"ads\")\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// GA4 loader\n\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) { \t\t\t// Only run if the pixel has set up\n\n\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"analytics\")) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsGA4()\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"ga4\", \"analytics\")\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\twpmDataLayer.pixels.google.state = \"ready\"\n\n\t\t\t\t\twpm.triggerQueuedEvents(\"gtag\")\n\n\t\t\t\t} catch (e) {\n\t\t\t\t\tconsole.error(e)\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\twpm.canGoogleLoad = () => {\n\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.is_active) {\n\t\t\treturn true\n\t\t} else if (\"category\" === wpm.getConsentValues().mode) {\n\t\t\treturn !!(wpm.getConsentValues().categories[\"ads\"] || wpm.getConsentValues().categories[\"analytics\"])\n\t\t} else if (\"pixel\" === wpm.getConsentValues().mode) {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-ads\") || wpm.getConsentValues().pixels.includes(\"google-analytics\")\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid load condition for Google mode in wpmConsentValues\")\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.gtagLoaded = () => {\n\t\treturn new Promise((resolve, reject) => {\n\n\t\t\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") reject()\n\n\t\t\tlet startTime = 0\n\t\t\tlet timeout = 5000\n\t\t\tlet frequency = 200;\n\n\t\t\t(function wait() {\n\t\t\t\tif (wpmDataLayer?.pixels?.google?.state === \"ready\") return resolve()\n\t\t\t\tif (startTime >= timeout) {\n\t\t\t\t\twpm.consoleError(\"Google gtag failed to load. Probably a third party script is blocking it.\")\n\t\t\t\t\treturn reject()\n\t\t\t\t}\n\t\t\t\tstartTime += frequency\n\t\t\t\tsetTimeout(wait, frequency)\n\t\t\t})()\n\t\t})\n\t}\n\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load Google base\n */\n\n// Load base\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// if (wpm.canLoadPremiumFeatures()) {\n// \trequire(\"./functions_premium\")\n// \trequire(\"./event_listeners_premium\")\n// }\n// #endif\n","/**\n * Load Google\n */\n\n// Load base\nrequire(\"./base/loader\")\n\n//Load additional Google libraries\nrequire(\"./ads/loader\")\nrequire(\"./analytics/loader\")\nrequire(\"./optimize/loader\")\n\n\n","/**\n * Load Google Optimize event listeners\n */\n\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.google?.optimize?.container_id && !wpmDataLayer?.pixels?.google?.optimize?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"google-optimize\")) wpm.load_google_optimize_pixel()\n\t}\n})\n","/**\n * Load Google Optimize functions\n */\n\n\n(function (wpm, $, undefined) {\n\n\twpm.load_google_optimize_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.optimize.loaded = true\n\n\t\t\twpm.loadScriptAndCacheIt(\"https://www.googleoptimize.com/optimize.js?id=\" + wpmDataLayer.pixels.google.optimize.container_id)\n\t\t\t// .then(function (script, textStatus) {\n\t\t\t// \t\tconsole.log('Google Optimize loaded')\n\t\t\t// });\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load Google Optimize\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Hotjar event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.hotjar?.site_id && !wpmDataLayer?.pixels?.hotjar?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"hotjar\") && !wpmDataLayer?.pixels?.hotjar?.loaded) wpm.load_hotjar_pixel()\n\t}\n})\n","/**\n * Load Hotjar functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.load_hotjar_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.hotjar.loaded = true;\n\n\t\t\t// @formatter:off\n\t\t\t(function(h,o,t,j,a,r){\n\t\t\t\th.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};\n\t\t\t\th._hjSettings={hjid:wpmDataLayer.pixels.hotjar.site_id,hjsv:6};\n\t\t\t\ta=o.getElementsByTagName('head')[0];\n\t\t\t\tr=o.createElement('script');r.async=1;\n\t\t\t\tr.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;\n\t\t\t\ta.appendChild(r);\n\t\t\t})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');\n\t\t\t// @formatter:on\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Hotjar loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","(function (wpm, $, undefined) {\n\n\tconst PMW_LIBRARY_VERSION = \"1.40.1\"\n\n\twpm.getLibraryVersion = () => {\n\t\treturn PMW_LIBRARY_VERSION\n\t}\n\n\twpm.checkLibraryVersion = () => {\n\n\t\tif (wpm.getLibraryVersion() !== wpmDataLayer?.version?.number) {\n\t\t\tconsole.error(`Pixel Manager: ${wpm.getLibraryVersion()} and wpmDataLayer.version.number ${wpmDataLayer.version.number} do not match. Delete the server-side cache and try again.`)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n\n","/**\n * Consent Mode functions\n */\n\n(function (wpm, $, undefined) {\n\n\t/**\n\t * Handle Cookie Management Platforms\n\t */\n\n\tconst getComplianzCookies = () => {\n\n\t\tlet cmplz_statistics = wpm.getCookie(\"cmplz_statistics\")\n\t\tlet cmplz_marketing = wpm.getCookie(\"cmplz_marketing\")\n\t\tlet cmplz_consent_status = wpm.getCookie(\"cmplz_consent_status\") || wpm.getCookie(\"cmplz_banner-status\")\n\n\t\tif (cmplz_consent_status) {\n\t\t\treturn {\n\t\t\t\tanalytics : cmplz_statistics === \"allow\",\n\t\t\t\tads : cmplz_marketing === \"allow\",\n\t\t\t\tvisitorHasChosen: true,\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t}\n\n\tconst getCookieYesCookies = () => {\n\n\t\t/**\n\t\t * Process the new cookieyes-consent cookie that contains all the information\n\t\t */\n\n\t\tlet cookie = wpm.getCookie(\"cookieyes-consent\")\n\n\t\tif (cookie) {\n\n\t\t\t// This cookie has the following structure:\n\t\t\t// consentid:OERmMEJCSVQxRk1SRWVwZkJTUjFBZTJHSEhkdjhLbUI,consent:yes,action:yes,necessary:yes,functional:yes,analytics:yes,performance:yes,advertisement:yes\n\t\t\t// First split the comma-separated values into an array\n\t\t\t// Then split each array item into a key value pair. The key and the value are separated by a colon.\n\t\t\t// Then create an object from the key value pairs.\n\t\t\t// Then console.log the object to see what it looks like.\n\n\t\t\tcookie = cookie\n\t\t\t\t.split(\",\")\n\t\t\t\t.map(item => item.split(\":\"))\n\t\t\t\t.reduce((acc, [key, value]) => ({\n\t\t\t\t\t...acc,\n\t\t\t\t\t[key]: value,\n\t\t\t\t}), {})\n\n\t\t\t// console.log(\"new cookie\", cookie)\n\n\t\t\treturn {\n\t\t\t\tanalytics : cookie.analytics && cookie.analytics === \"yes\",\n\t\t\t\tads : cookie.advertisement && cookie.advertisement === \"yes\",\n\t\t\t\tvisitorHasChosen: cookie.advertisement && cookie.advertisement === \"yes\",\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Process the old cookieyes-* cookies\n\t\t *\n\t\t * @param cookieNames\n\t\t * @returns {string|string|boolean}\n\t\t */\n\n\t\tfunction checkCookie(cookieNames) {\n\t\t\tfor (let name of cookieNames) {\n\n\t\t\t\tconst cookieValue = wpm.getCookie(name)\n\n\t\t\t\tif (cookieValue) {\n\t\t\t\t\treturn cookieValue\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t}\n\n\t\tlet analyticsCookieNames = [\n\t\t\t\"cookielawinfo-checkbox-analytics\",\n\t\t\t\"cookielawinfo-checkbox-analytiques\",\n\t\t\t\"cookieyes-analytics\",\n\t\t]\n\n\t\tconst adsCookieNames = [\n\t\t\t\"cookielawinfo-checkbox-advertisement\",\n\t\t\t\"cookielawinfo-checkbox-performance\",\n\t\t\t\"cookielawinfo-checkbox-publicite\",\n\t\t\t\"cookieyes-advertisement\",\n\t\t]\n\n\t\tconst visitorHasChosenCookieNames = [\n\t\t\t\"CookieLawInfoConsent\",\n\t\t\t\"cky-action\",\n\t\t]\n\n\t\t// let analyticsCookie = wpm.getCookie(\"cookielawinfo-checkbox-analytics\") || wpm.getCookie(\"cookielawinfo-checkbox-analytiques\")\n\t\t// let adsCookie = wpm.getCookie(\"cookielawinfo-checkbox-advertisement\") || wpm.getCookie(\"cookielawinfo-checkbox-performance\") || wpm.getCookie(\"cookielawinfo-checkbox-publicite\")\n\t\t// let visitorHasChosen = wpm.getCookie(\"CookieLawInfoConsent\")\n\n\t\tconst analyticsCookie = checkCookie(analyticsCookieNames)\n\t\tconst adsCookie = checkCookie(adsCookieNames)\n\t\tconst visitorHasChosen = checkCookie(visitorHasChosenCookieNames)\n\n\t\tif (analyticsCookie || adsCookie) {\n\n\t\t\treturn {\n\t\t\t\tanalytics : analyticsCookie === \"yes\",\n\t\t\t\tads : adsCookie === \"yes\",\n\t\t\t\tvisitorHasChosen: !!visitorHasChosen,\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t}\n\n\t/**\n\t * Get the Iubenda cookie.\n\t * Then parse it and return the analytics and marketing values.\n\t *\n\t * 1 = Necessary\n\t * 2 = Functionality\n\t * 3 = n/a\n\t * 4 = Measurement\n\t * 5 = Marketing\n\t */\n\tconst getIubendaCookieInfo = () => {\n\n\t\t// Regex that matches _iub_cs-59340121 but not _iub_cs-59340121-granular\n\n\t\tlet regex = new RegExp(\"_iub_cs-\\\\d{8,}\")\n\n\t\t// let cookie = wpm.getCookieThatContainsRegex(\"_iub_cs-\")\n\t\tlet cookie = wpm.getCookieThatContainsRegex(regex)\n\n\t\t// Parse the cookie into an object\n\t\t// The structure looks like this:\n\t\t// %7B%22timestamp%22%3A%222023-07-11T06%3A43%3A40.886Z%22%2C%22version%22%3A%221.48.0%22%2C%22purposes%22%3A%7B%221%22%3Atrue%2C%222%22%3Atrue%2C%224%22%3Atrue%2C%225%22%3Atrue%7D%2C%22id%22%3A63374232%7D\n\n\t\tif (cookie) {\n\n\t\t\tcookie = decodeURIComponent(cookie)\n\n\t\t\t// Now the structure looks like this:\n\t\t\t// _iub_cs-63374232={\"timestamp\":\"2023-07-11T06:43:40.886Z\",\"version\":\"1.48.0\",\"purposes\":{\"1\":true,\"2\":true,\"4\":true,\"5\":true},\"id\":63374232}\n\t\t\t// Remove the _iub_cs- prefix until and with the equal sign. The rest is the object we want to keep and parse.\n\t\t\tcookie = cookie.replace(/_iub_cs-.*=/, \"\")\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\treturn {\n\t\t\t\tanalytics : cookie.purposes[\"4\"],\n\t\t\t\tads : cookie.purposes[\"5\"],\n\t\t\t\tvisitorHasChosen: true,\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t}\n\n\tconst getTermlyCookies = () => {\n\n\t\t// Get Termly cookies from localStorage from termly_gtm_template_default_consents for ad_storage and for analytics_storage\n\t\tlet termlyConsent = localStorage.getItem(\"termly_gtm_template_default_consents\")\n\n\t\tif (termlyConsent) {\n\t\t\ttermlyConsent = JSON.parse(termlyConsent)\n\n\t\t\treturn {\n\t\t\t\tanalytics : termlyConsent.analytics_storage === \"granted\",\n\t\t\t\tads : termlyConsent.ad_storage === \"granted\",\n\t\t\t\tvisitorHasChosen: true,\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t}\n\n\n\t/**\n\t * Initialize and set default values\n\t */\n\n\tlet\n\t\twpmConsentValues = {}\n\twpmConsentValues.categories = {}\n\twpmConsentValues.pixels = []\n\twpmConsentValues.mode = \"category\"\n\twpmConsentValues.visitorHasChosen = false\n\n\t// Return current consent values\n\twpm.getConsentValues = () => wpmConsentValues\n\n\twpm.setConsentValueCategories = (analytics = false, ads = false) => {\n\t\twpmConsentValues.categories.analytics = analytics\n\t\twpmConsentValues.categories.ads = ads\n\t}\n\n\t// Update the PMW consent values with values coming from a CMP\n\twpm.updateConsentCookieValues = (analytics = null, ads = null, explicitConsent = false) => {\n\n\t\t// ad_storage\n\t\t// analytics_storage\n\t\t// functionality_storage\n\t\t// personalization_storage\n\t\t// security_storage\n\n\t\tlet cookie\n\n\t\t/**\n\t\t * Setup defaults\n\t\t */\n\n\t\t// consentValues.categories.analytics = true\n\t\t// consentValues.categories.ads = true\n\n\t\twpmConsentValues.categories.analytics = !explicitConsent\n\t\twpmConsentValues.categories.ads = !explicitConsent\n\n\n\t\tif (analytics || ads) {\n\n\t\t\tif (analytics) {\n\t\t\t\twpmConsentValues.categories.analytics = !!analytics\n\t\t\t}\n\n\t\t\tif (ads) {\n\t\t\t\twpmConsentValues.categories.ads = !!ads\n\t\t\t}\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * PMW Cookie Consent\n\t\t *\n\t\t * Must be processed before every other CMP for the case that one of the included CMPs\n\t\t * decides to implement the PMW cookie consent API. In that case\n\t\t * the PMW consent cookie must take precedence.\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"pmw_cookie_consent\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookiebot\n\t\t * https://wordpress.org/plugins/cookiebot/\n\t\t * https://support.cookiebot.com/hc/en-us/articles/360016047000-Cookiebot-and-Google-Consent-Mode\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"CookieConsent\")) {\n\n\t\t\tcookie = decodeURI(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.indexOf(\"statistics:true\") >= 0\n\t\t\twpmConsentValues.categories.ads = cookie.indexOf(\"marketing:true\") >= 0\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * WP Consent API\n\t\t * https://github.com/rlankhorst/wp-consent-level-api\n\t\t * https://wordpress.org/plugins/wp-consent-api/\n\t\t */\n\n\t\t// if a at least one cookie exists that starts with wp_consent_ then the visitor has chosen\n\t\tif (wpm.getCookieThatContainsRegex(/^wp_consent_/)) {\n\t\t\t// console.log(\"WP Consent API settings detected\")\n\n\t\t\t// if the cookie wp_consent_statistics exists and is set to allow, then analytics is true\n\t\t\t// If it is set to deny, then analytics is false\n\t\t\twpmConsentValues.categories.analytics = wpm.getCookie(\"wp_consent_statistics\") === \"allow\"\n\t\t\twpmConsentValues.categories.ads = wpm.getCookie(\"wp_consent_marketing\") === \"allow\"\n\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\t// console log the consent values\n\t\t\t// console.log(\"WP Consent API settings detected: \", wpmConsentValues)\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Script\n\t\t * https://wordpress.org/plugins/cookie-script-com/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"CookieScriptConsent\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\t// if cookie.categories is not an array, but a string, parse it\n\t\t\tif (typeof cookie.categories === \"string\") cookie.categories = JSON.parse(cookie.categories)\n\n\t\t\tif (\n\t\t\t\tcookie.action\n\t\t\t\t&& cookie.action === \"reject\"\n\t\t\t) {\n\t\t\t\twpmConsentValues.categories.analytics = false\n\t\t\t\twpmConsentValues.categories.ads = false\n\t\t\t} else if (\n\t\t\t\tcookie.categories\n\t\t\t\t&& cookie.categories.length > 0\n\t\t\t) {\n\t\t\t\twpmConsentValues.categories.analytics = cookie.categories.indexOf(\"performance\") >= 0\n\t\t\t\twpmConsentValues.categories.ads = cookie.categories.indexOf(\"targeting\") >= 0\n\t\t\t} else {\n\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t}\n\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Borlabs Cookie\n\t\t * https://borlabs.io/borlabs-cookie/\n\t\t */\n\t\tif (cookie = wpm.getCookie(\"borlabs-cookie\")) {\n\n\t\t\tcookie = decodeURI(cookie)\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie?.consents?.statistics\n\t\t\twpmConsentValues.categories.ads = !!cookie?.consents?.marketing\n\t\t\twpmConsentValues.visitorHasChosen = true\n\t\t\twpmConsentValues.pixels = [...cookie?.consents?.statistics || [], ...cookie?.consents?.marketing || []]\n\t\t\twpmConsentValues.mode = \"pixel\"\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Complianz Cookie\n\t\t * https://wordpress.org/plugins/complianz-gdpr/\n\t\t */\n\n\t\tif (cookie = getComplianzCookies()) {\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Compliance (free version)\n\t\t * https://wordpress.org/plugins/cookie-notice/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"cookie_notice_accepted\")) {\n\n\t\t\twpmConsentValues.categories.analytics = true\n\t\t\twpmConsentValues.categories.ads = true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Compliance (pro version)\n\t\t * https://wordpress.org/plugins/cookie-notice/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"hu-consent\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie.categories[\"3\"]\n\t\t\twpmConsentValues.categories.ads = !!cookie.categories[\"4\"]\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * CookieYes, GDPR Cookie Consent (Cookie Law Info)\n\t\t * https://wordpress.org/plugins/cookie-law-info/\n\t\t */\n\n\t\tif (cookie = getCookieYesCookies()) {\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen === true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * GDPR Cookie Compliance Plugin by Moove Agency\n\t\t * https://wordpress.org/plugins/gdpr-cookie-compliance/\n\t\t *\n\t\t * TODO write documentation on how to set up the plugin in order for this to work properly\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"moove_gdpr_popup\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.thirdparty === \"1\"\n\t\t\twpmConsentValues.categories.ads = cookie.advanced === \"1\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Iubenda\n\t\t * https://www.iubenda.com\n\t\t */\n\n\t\tif (cookie = getIubendaCookieInfo()) {\n\n\t\t\tcookie = cookie\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\t// console.log(\"Iubenda settings detected: \", wpmConsentValues)\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * WP AutoTerms\n\t\t * https://wordpress.org/plugins/auto-terms-of-service-and-privacy-policy/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"wpautoterms-cookies-notice\")) {\n\n\t\t\tif (cookie !== \"1\") return\n\n\t\t\twpmConsentValues.categories.analytics = true\n\t\t\twpmConsentValues.categories.ads = true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Usercentrics\n\t\t *\n\t\t * https://usercentrics.com/\n\t\t * https://docs.usercentrics.com/#/cmp-v2-ui-api\n\t\t * https://docs.usercentrics.com/#/cmp-v2-ui-api?id=getservicesbaseinfo\n\t\t */\n\n\t\tif (window.localStorage && window.localStorage.getItem(\"uc_settings\")) {\n\n\t\t\twpm.consoleLog(\"Usercentrics settings detected\")\n\n\t\t\tif (typeof UC_UI === \"undefined\") {\n\n\t\t\t\t// register event to block unblock after UC_UI library is loaded\n\t\t\t\twindow.addEventListener(\"UC_UI_INITIALIZED\", (event) => {\n\t\t\t\t\twpm.ucUiProcessConsent()\n\t\t\t\t})\n\n\t\t\t\t// Don't continue because in here the UC_UI library is not loaded yet\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (UC_UI.areAllConsentsAccepted()) {\n\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\twpm.ucUiProcessConsent()\n\t\t}\n\n\t\t/**\n\t\t * OneTrust\n\t\t *\n\t\t * https://www.onetrust.com/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"OptanonConsent\")) {\n\n\t\t\t// console.log(\"OneTrust settings detected\")\n\n\t\t\tlet params = new URLSearchParams(cookie)\n\t\t\tlet groups = params.get(\"groups\").split(\",\")\n\n\t\t\t// Groups is an array like this ['1:1', '2:0', '3:1', '4:1']. Make it an object with key value pairs\n\t\t\tlet groupsObject = {}\n\t\t\tgroups.forEach((group) => {\n\n\t\t\t\tlet groupArray = group.split(\":\")\n\t\t\t\tgroupsObject[groupArray[0]] = groupArray[1]\n\t\t\t})\n\n\t\t\t// group mapping\n\t\t\t// 1 = necessary\n\t\t\t// 2 = analytics\n\t\t\t// 3 = functional\n\t\t\t// 4 = ads\n\n\t\t\twpmConsentValues.categories.analytics = groupsObject[\"2\"] === \"1\"\n\t\t\twpmConsentValues.categories.ads = groupsObject[\"4\"] === \"1\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Termly\n\t\t *\n\t\t * https://www.termly.io/\n\t\t */\n\n\t\tif (cookie = getTermlyCookies()) {\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen === true\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Real Cookie Banner\n\t\t *\n\t\t * https://devowl.io/wordpress-real-cookie-banner/\n\t\t */\n\t\tif (wpm.doesACookieForTheRealCookieBannerExist()) {\n\n\t\t\t// console.log(\"Real Cookie Banner settings detected\")\n\n\t\t\twpmConsentValues.mode = \"pixel\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\twpm.waitForLibrary(\"consentApi\")\n\n\t\t\t// console.log(\"Real Cookie Banner consentApi loaded\")\n\n\t\t\tif (!window.consentApi) {\n\t\t\t\twpm.consoleError(\"window.consentApi is not available\")\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst settings = [\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"adroll-ads\",\n\t\t\t\t\t\"type\" : \"marketing\",\n\t\t\t\t\t\"cookies\": [\"__adroll_fpc\", \"_ar_v4\", \"_adroll\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"bing-ads\",\n\t\t\t\t\t\"type\" : \"marketing\",\n\t\t\t\t\t\"cookies\": [\"_uetsid\", \"_uetvid\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"facebook-ads\",\n\t\t\t\t\t\"type\" : \"marketing\",\n\t\t\t\t\t\"cookies\": [\"_fbp\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"google-analytics\",\n\t\t\t\t\t\"type\" : \"statistics\",\n\t\t\t\t\t\"cookies\": [\"_ga\", \"_gid\", \"_gat\", \"_gat_gtag_UA_*\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"google-optimize\",\n\t\t\t\t\t\"type\" : \"statistics\",\n\t\t\t\t\t\"cookies\": [\"_ga\", \"_gid\", \"_gat\", \"_gat_gtag_UA_*\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"google-ads\",\n\t\t\t\t\t\"type\" : \"marketing\",\n\t\t\t\t\t\"cookies\": [\"_gcl_au\", \"_gcl_aw\", \"_gcl_dc\", \"_gac_*\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"hotjar\",\n\t\t\t\t\t\"type\" : \"statistics\",\n\t\t\t\t\t\"cookies\": [\"_hj*\", \"_hjid\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"linkedin-ads\",\n\t\t\t\t\t\"type\" : \"marketing\",\n\t\t\t\t\t\"cookies\": [\"_li_ss\", \"_li_id\", \"_li_mk_*\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"microsoft-ads\",\n\t\t\t\t\t\"type\" : \"marketing\",\n\t\t\t\t\t\"cookies\": [\"_uetsid\", \"_uetvid\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"outbrain-ads\",\n\t\t\t\t\t\"type\" : \"marketing\",\n\t\t\t\t\t\"cookies\": [],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"pinterest-ads\",\n\t\t\t\t\t\"type\" : \"marketing\",\n\t\t\t\t\t\"cookies\": [\"_pinterest_ct_ua\", \"_pinterest_ct_rt\", \"_pin_unauth\", \"_derived_epik\", \"_pinterest_sess\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"reddit-ads\",\n\t\t\t\t\t\"type\" : \"marketing\",\n\t\t\t\t\t\"cookies\": [\"_rdt_uuid\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"snapchat-ads\",\n\t\t\t\t\t\"type\" : \"marketing\",\n\t\t\t\t\t\"cookies\": [\"sc_at\", \"sc_anonymous_id\", \"sc_id\", \"_scid\", \"_scid_r\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"taboola-ads\",\n\t\t\t\t\t\"type\" : \"marketing\",\n\t\t\t\t\t\"cookies\": [],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"tiktok-ads\",\n\t\t\t\t\t\"type\" : \"marketing\",\n\t\t\t\t\t\"cookies\": [\"_ttp\", \"_ttclid\", \"ttwid\"],\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"service\": \"twitter-ads\",\n\t\t\t\t\t\"type\" : \"marketing\",\n\t\t\t\t\t\"cookies\": [\"twitter_ads_id\", \"twid\", \"_twclid\", \"muc_ads\"],\n\t\t\t\t},\n\t\t\t]\n\n\n\t\t\t// For each service in settings\n\t\t\t// and each cookie in service.cookies\n\t\t\t// check if consentApi.consentSync(\"http\", cookie, \"*\") returns an object that contains a not empty object called \"cookie\"\n\t\t\t// If one of the cookies returns true, then push service.service to wpmConsentValues.pixels\n\t\t\tsettings.forEach((service) => {\n\n\t\t\t\tservice.cookies.forEach((cookie) => {\n\n\t\t\t\t\tlet consent = window.consentApi.consentSync(\"http\", cookie, \"*\")\n\n\t\t\t\t\tif (consent?.cookie && consent?.cookieOptIn) {\n\n\t\t\t\t\t\twpmConsentValues.pixels.push(service.service)\n\n\t\t\t\t\t\tif (service.type === \"statistics\") {\n\t\t\t\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (service.type === \"marketing\") {\n\t\t\t\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// continue with the next service\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\n\t\t\treturn\n\t\t}\n\t}\n\n\twpm.doesACookieForTheRealCookieBannerExist = () => {\n\n\t\t// Find a cookie that has a prefix of real_cookie_banner\n\t\t// If one is found, then return true\n\t\t// If none is found, then return false\n\n\t\tlet cookies = document.cookie.split(\";\")\n\n\t\tfor (let i = 0; i < cookies.length; i++) {\n\t\t\tlet cookie = cookies[i].trim()\n\n\t\t\tif (cookie.startsWith(\"real_cookie_banner\")) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t}\n\n\t// Only run after having made sure that the UC_UI library is loaded\n\twpm.ucUiProcessConsent = () => {\n\n\t\tif (typeof UC_UI === \"undefined\") return\n\n\t\tif (UC_UI.areAllConsentsAccepted()) {\n\t\t\tpmw.consentAcceptAll()\n\t\t}\n\n\t\tconst ucStatisticsSlug = UC_UI.getSettingsLabels().categories.filter(data => data.label === \"Statistics\")[0].slug\n\n\t\tpmw.consentAdjustSelectively(\n\t\t\t{\n\t\t\t\tanalytics: !UC_UI.getServicesBaseInfo().filter(data => data.categorySlug === ucStatisticsSlug && data.consent.status === false).length > 0,\n\t\t\t\tads : !UC_UI.getServicesBaseInfo().filter(data => data.categorySlug === \"marketing\" && data.consent.status === false).length > 0,\n\t\t\t},\n\t\t)\n\t}\n\n\twpm.updateConsentCookieValues()\n\n\twpm.setConsentDefaultValuesToExplicit = () => {\n\t\twpmConsentValues.categories = {\n\t\t\tanalytics: false,\n\t\t\tads : false,\n\t\t}\n\t}\n\n\twpm.canIFire = (category, pixelName) => {\n\n\t\tlet canIFireMode\n\n\t\tif (\"category\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = !!wpmConsentValues.categories[category]\n\t\t} else if (\"pixel\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(pixelName)\n\n\t\t\t// If a user sets \"bing-ads\" in Borlabs Cookie instead of\n\t\t\t// \"microsoft-ads\" in the Borlabs settings, we need to check\n\t\t\t// for that too.\n\t\t\tif (false === canIFireMode && \"microsoft-ads\" === pixelName) {\n\t\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(\"bing-ads\")\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid consent mode in wpmConsentValues\")\n\t\t\tcanIFireMode = false\n\t\t}\n\n\t\tif (canIFireMode) {\n\t\t\treturn true\n\t\t} else {\n\t\t\tif (true || wpm.urlHasParameter(\"debugConsentMode\")) {\n\t\t\t\twpm.logPreventedPixelLoading(pixelName, category)\n\t\t\t}\n\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.logPreventedPixelLoading = (pixelName, category) => {\n\n\t\tif (wpmDataLayer?.general?.cookie_consent_mgmt?.explicit_consent) {\n\t\t\twpm.consoleLog(\"The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have not given consent for it yet. (PMW is in explicit consent mode.)\")\n\t\t} else {\n\t\t\twpm.consoleLog(\"The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have removed consent for this pixel. (PMW is in implicit consent mode.)\")\n\t\t}\n\t}\n\n\t/**\n\t * Runs through each script in and blocks / unblocks it according to the plugin settings\n\t * and user consent.\n\t */\n\n\t// https://stackoverflow.com/q/65453565/4688612\n\twpm.scriptTagObserver = new MutationObserver((mutations) => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif ($(node).data(\"wpm-cookie-category\")) {\n\n\t\t\t\t\t\t// If the pixel category has been approved > unblock\n\t\t\t\t\t\t// If the pixel belongs to more than one category, then unblock if one of the categories has been approved\n\t\t\t\t\t\t// If no category has been approved, but the Google Consent Mode is active, then only unblock the Google scripts\n\n\t\t\t\t\t\tif (wpm.shouldScriptBeActive(node)) {\n\t\t\t\t\t\t\twpm.unblockScript(node)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twpm.blockScript(node)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\twpm.scriptTagObserver.observe(document.head, {childList: true, subtree: true})\n\t// jQuery(document).on(\"DOMContentLoaded\", () => wpm.scriptTagObserver.disconnect())\n\tdocument.addEventListener(\"DOMContentLoaded\", () => wpm.scriptTagObserver.disconnect())\n\n\twpm.shouldScriptBeActive = node => {\n\n\t\tif (\n\t\t\twpmDataLayer.general.cookie_consent_mgmt.explicit_consent ||\n\t\t\twpmConsentValues.visitorHasChosen\n\t\t) {\n\n\t\t\tif (wpmConsentValues.mode === \"category\" && $(node).data(\"wpm-cookie-category\").split(\",\").some(element => wpmConsentValues.categories[element])) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && wpmConsentValues.pixels.includes($(node).data(\"wpm-pixel-name\"))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && $(node).data(\"wpm-pixel-name\") === \"google\" && [\"google-analytics\", \"google-ads\"].some(element => wpmConsentValues.pixels.includes(element))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmDataLayer?.pixels?.google?.consent_mode?.is_active && $(node).data(\"wpm-pixel-name\") === \"google\") {\n\t\t\t\treturn true\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} else {\n\t\t\treturn true\n\t\t}\n\t}\n\n\n\twpm.unblockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tlet wpmSrc = $(scriptNode).data(\"wpm-src\")\n\t\tif (wpmSrc) $(scriptNode).attr(\"src\", wpmSrc)\n\n\t\tscriptNode.type = \"text/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\n\t\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t}\n\n\twpm.blockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tif ($(scriptNode).attr(\"src\")) $(scriptNode).removeAttr(\"src\")\n\t\tscriptNode.type = \"blocked/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\t}\n\n\twpm.unblockAllScripts = (analytics = true, ads = true) => {\n\t\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\twpm.setConsentValueCategories(analytics, ads)\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t}\n\n\twpm.unblockSelectedPixels = () => {\n\t\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t}\n\n\twpm.explicitConsentStateAlreadySet = () => {\n\n\t\tif (wpmConsentValues.explicitConsentStateAlreadySet) {\n\t\t\treturn true\n\t\t} else {\n\t\t\twpmConsentValues.explicitConsentStateAlreadySet = true\n\t\t}\n\t}\n\n\twpm.updatePixelConsentForPixelTypeCMPs = () => {\n\n\t\twpm.updateConsentCookieValues()\n\n\t\tif (wpmConsentValues.mode === \"pixel\") {\n\n\t\t\twpm.unblockSelectedPixels()\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.pixels.includes(\"google-analytics\"), wpmConsentValues.pixels.includes(\"google-ads\"))\n\t\t} else {\n\n\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t}\n\t}\n\n\n\t/**\n\t * Block or unblock scripts for each CMP immediately after cookie consent has been updated\n\t * by the visitor.\n\t */\n\n\t/**\n\t * Borlabs Cookie\n\t * If the visitor accepts cookies in Borlabs Cookie unblock the scripts.\n\t */\n\tdocument.addEventListener(\"borlabs-cookie-consent-saved\", () => {\n\t\twpm.updatePixelConsentForPixelTypeCMPs()\n\t})\n\n\t/**\n\t * Real Cookie Banner\n\t * If the visitor accepts cookies in Real Cookie Banner unblock the scripts.\n\t */\n\n\tdocument.addEventListener(\"RCB/OptIn/All\", () => {\n\t\twpm.consoleLog(\"consent given or changed, check again with consentSync...\")\n\n\t\twpm.updatePixelConsentForPixelTypeCMPs()\n\t})\n\n\n\t/**\n\t * Cookiebot\n\t * \tIf visitor accepts cookies in Cookiebot unblock the scripts\n\t * \thttps://www.cookiebot.com/en/developer/\n\t */\n\twindow.addEventListener(\"CookiebotOnAccept\", () => {\n\t\tif (Cookiebot.consent.statistics) wpmConsentValues.categories.analytics = true\n\t\tif (Cookiebot.consent.marketing) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\n\t}, false)\n\n\t/**\n\t * WP Consent API\n\t * https://github.com/rlankhorst/wp-consent-level-api\n\t * https://wordpress.org/plugins/wp-consent-api/\n\t */\n\n\tdocument.addEventListener(\"wp_listen_for_consent_change\", e => {\n\n\t\tconst changedConsentCategory = e.detail\n\n\t\tfor (const key in changedConsentCategory) {\n\n\t\t\t// console.log(\"consent given or changed, check again with consentSync...\", key, changedConsentCategory[key])\n\n\t\t\t// if the key is marketing\n\t\t\tif (key === \"marketing\") {\n\t\t\t\twpmConsentValues.categories.ads = changedConsentCategory[key] === \"allow\"\n\t\t\t}\n\n\t\t\t// if the key is statistics\n\t\t\tif (key === \"statistics\") {\n\t\t\t\twpmConsentValues.categories.analytics = changedConsentCategory[key] === \"allow\"\n\t\t\t}\n\n\t\t}\n\n\t\t// console log the consent values\n\t\t// console.log(\"WP Consent API settings detected: \", wpmConsentValues)\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\n\t/**\n\t * Cookie Script\n\t * If visitor accepts cookies in Cookie Script unblock the scripts\n\t * https://support.cookie-script.com/article/20-custom-events\n\t */\n\t// jQuery(document).on(\"CookieScriptAccept\", e => {\n\tdocument.addEventListener(\"CookieScriptAccept\", e => {\n\n\t\tif (e.detail.categories.includes(\"performance\")) wpmConsentValues.categories.analytics = true\n\t\tif (e.detail.categories.includes(\"targeting\")) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t/**\n\t * Cookie Script\n\t * If visitor accepts cookies in Cookie Script unblock the scripts\n\t * https://support.cookie-script.com/\n\t */\n\t// jQuery(document).on(\"CookieScriptAcceptAll\", () => {\n\tdocument.addEventListener(\"CookieScriptAcceptAll\", () => {\n\n\t\twpm.setConsentValueCategories(true, true)\n\t\twpm.unblockAllScripts(true, true)\n\t\twpm.updateGoogleConsentMode(true, true)\n\t})\n\n\t/**\n\t * Complianz Cookie\n\t *\n\t * If visitor accepts cookies in Complianz unblock the scripts\n\t */\n\n\twpm.cmplzStatusChange = (cmplzConsentData) => {\n\n\t\tif (cmplzConsentData.detail.categories.includes(\"statistics\")) wpm.updateConsentCookieValues(true, null)\n\t\tif (cmplzConsentData.detail.categories.includes(\"marketing\")) wpm.updateConsentCookieValues(null, true)\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t}\n\n\t// jQuery(document).on(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\tdocument.addEventListener(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\t// jQuery(document).on(\"cmplz_status_change\", wpm.cmplzStatusChange)\n\tdocument.addEventListener(\"cmplz_status_change\", wpm.cmplzStatusChange)\n\n\t// Cookie Compliance by hu-manity.co (free and pro)\n\t// If visitor accepts cookies in Cookie Notice by hu-manity.co unblock the scripts (free version)\n\t// https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\t// jQuery(document).on(\"setCookieNotice\", () => {\n\tdocument.addEventListener(\"setCookieNotice\", () => {\n\t\twpm.updateConsentCookieValues()\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t/**\n\t * Cookie Compliance by hu-manity.co (free and pro)\n\t * If visitor accepts cookies in Cookie Notice by hu-manity.co unblock the scripts (pro version)\n\t * https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\t * Because Cookie Notice has no documented API or event that is being triggered on consent save or update\n\t * we have to solve this by using a mutation observer.\n\t *\n\t * @type {MutationObserver}\n\t */\n\n\twpm.huObserver = new MutationObserver(mutations => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif (node.id === \"hu\") {\n\n\t\t\t\t\t\t// jQuery(\".hu-cookies-save\").on(\"click\", function () {\n\t\t\t\t\t\t// jQuery(\".hu-cookies-save\") in pure JavaScript\n\t\t\t\t\t\tdocument.querySelector(\".hu-cookies-save\").addEventListener(\"click\", () => {\n\t\t\t\t\t\t\twpm.updateConsentCookieValues()\n\t\t\t\t\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\tif (window.hu) {\n\t\twpm.huObserver.observe(document.documentElement || document.body, {childList: true, subtree: true})\n\t}\n\n\t/**\n\t * Iubenda CMP\n\t *\n\t * https://www.iubenda.com/en/help/1205-how-to-configure-your-cookie-solution-advanced-guide\n\t *\n\t * If visitor accepts cookies in Iubenda CMP unblock the scripts\n\t *\n\t * This might not work as of now (11.07.2023) the Iubenda CMP does not trigger any events.\n\t *\n\t * We might have to use a mutation observer to detect changes in the DOM.\n\t * This is also risky because we might read out the values faster than Iubenda can update them.\n\t */\n\n\t// Load after the document is fully loaded\n\t// Check if a button with one of the following classes was clicked\n\t// iubenda-cs-btn-primary\n\t// If it was clicked, recheck the cookies and unblock the scripts\n\t// jQuery(document).ready(() => {\n\t//\n\t// \tjQuery(document).on(\"click\", \".iubenda-cs-btn-primary\", () => {\n\t// \t\twpm.updateConsentCookieValues()\n\t// \t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t// \t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t// \t})\n\t//\n\t// \t// if the event save-button-clicked is triggered, recheck the cookies and unblock the scripts\n\t// \tjQuery(document).on(\"iubenda-cs-btn-primary\", () => {\n\t// \t\t// wpm.updateConsentCookieValues()\n\t// \t\t// wpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t// \t\t// wpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t// \t\tconsole.log(\"iubenda-cs-btn-primary clicked\")\n\t// \t})\n\t//\n\t// })\n\t//\n\t// wpm.iubObserver = new MutationObserver(mutations => {\n\t// \tmutations.forEach(({addedNodes}) => {\n\t// \t\t[...addedNodes]\n\t// \t\t\t.forEach(node => {\n\t//\n\t// \t\t\t\t// console.log(node)\n\t//\n\t// \t\t\t\tif (node.id === \"iubenda-cs-banner\") {\n\t//\n\t// \t\t\t\t\t// jQuery(\".hu-cookies-save\").on(\"click\", function () {\n\t// \t\t\t\t\t// jQuery(\".hu-cookies-save\") in pure JavaScript\n\t// \t\t\t\t\tdocument.querySelector(\".iubenda-cs-btn-primary\").addEventListener(\"click\", () => {\n\t// \t\t\t\t\t\t// wpm.updateConsentCookieValues()\n\t// \t\t\t\t\t\t// wpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t// \t\t\t\t\t\t// wpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t//\n\t// \t\t\t\t\t\tconsole.log(\"iubenda-cs-btn-primary clicked\")\n\t// \t\t\t\t\t})\n\t// \t\t\t\t}\n\t// \t\t\t})\n\t// \t})\n\t// })\n\t//\n\t// if (window._iub) {\n\t// \twpm.iubObserver.observe(document.documentElement || document.body, {childList: true, subtree: true})\n\t// }\n\n\t// doesn't work if the PMW is lazy loaded\n\t// checkIubendaLoaded = setInterval(function() {\n\t// \tif (window?._iub && window?._iub?.csConfiguration) {\n\t// \t\twindow._iub.csConfiguration.callback = {\n\t// \t\t\tonPreferenceExpressed: function (preference) {\n\t// \t\t\t\tconsole.log('onPreferenceExpressed after load', preference);\n\t// \t\t\t}\n\t// \t\t};\n\t// \t\tclearInterval(checkIubendaLoaded);\n\t// \t}\n\t// }, 100);\n\n\t// if (window?._iub && window?._iub?.csConfiguration) {\n\t// \twindow._iub.csConfiguration.callback = {\n\t// \t\tonPreferenceExpressed: function (preference) {\n\t// \t\t\tconsole.log('onPreferenceExpressed after load X', preference);\n\t// \t\t}\n\t// \t};\n\t// }\n\t//\n\t// console.log('iubenda loaded');\n\n\n\t/**\n\t * Usercentrics Event Listeners\n\t *\n\t * https://docs.usercentrics.com/#/v2-events?id=usage-as-window-event\n\t */\n\n\twindow.addEventListener(\"ucEvent\", e => {\n\t\tif (e.detail && e.detail.event == \"consent_status\") {\n\t\t\t// check for consent status of service \"Google Ads Remarketing\"\n\t\t\tif (e.detail[\"Google Ads Remarketing\"] === true) {\n\t\t\t\twpm.consoleLog(\"Google Ads Remarketing has consent\")\n\t\t\t} else {\n\t\t\t\twpm.consoleLog(\"Google Ads Remarketing has no consent\")\n\t\t\t}\n\t\t}\n\t})\n\n\t// https://docs.usercentrics.com/#/v2-events?id=uc_ui_cmp_event\n\twindow.addEventListener(\"UC_UI_CMP_EVENT\", event => {\n\n\t\tif (event.detail.type === \"ACCEPT_ALL\") {\n\t\t\t// console.log('accept all');\n\n\t\t\tpmw.consentAcceptAll()\n\t\t}\n\n\t\tif (event.detail.type === \"DENY_ALL\") {\n\t\t\tpmw.consentRevokeAll()\n\t\t}\n\n\t\tif (event.detail.type === \"SAVE\") {\n\t\t\twpm.consoleLog(\"event.detail\", event.detail)\n\t\t}\n\t})\n\n\n\t/**\n\t * OneTrust Event Listeners\n\t *\n\t * CookiePro by OneTrust doesn't emit any events when the user accepts or declines cookies.\n\t */\n\n\t// There are two accept all buttons. One in the first banner and one in the settings window. Both have different identifiers.\n\tjQuery(\"#accept-recommended-btn-handler, #onetrust-accept-btn-handler\").on(\"click\", () => {\n\n\t\t// If OneTrust is not loaded, return\n\t\tif (typeof window.OneTrust === \"undefined\") return\n\n\t\tpmw.consentAcceptAll()\n\t})\n\n\t// There are two revoke all buttons. One in the first banner and one in the settings window. Both have different identifiers.\n\tjQuery(\".ot-pc-refuse-all-handler, #onetrust-reject-all-handler\").on(\"click\", () => {\n\t\tpmw.consentRevokeAll()\n\t})\n\n\t// There is one save button that saves mixed consent. It is in the settings window. We reload the page after saving to reflect the changes.\n\tjQuery(\".save-preference-btn-handler.onetrust-close-btn-handler\").on(\"click\", () => {\n\t\tlocation.reload()\n\n\t\t// OneTrust.OnConsentChanged(function (e) {\n\t\t// \tpmw.consentAdjustSelectively({\n\t\t// \t\tanalytics: e.detail.includes(\"2\"),\n\t\t// \t\tads : e.detail.includes(\"4\"),\n\t\t// \t})\n\t\t// })\n\t})\n\n\t/**\n\t * Termly Event Listeners\n\t *\n\t * The event listener is within /sources/termly_web/resource-blocker/src/constants/lifeCycle.js\n\t */\n\n\tdocument.addEventListener(\"termlyConsent\", function (e) {\n\n\t\tconst consent = e.detail\n\n\t\tif (consent.advertising && consent.analytics) {\n\t\t\tpmw.consentAcceptAll()\n\t\t} else if (!consent.advertising && !consent.analytics) {\n\t\t\tpmw.consentRevokeAll()\n\t\t} else {\n\t\t\tpmw.consentAdjustSelectively({\n\t\t\t\tanalytics: consent.analytics,\n\t\t\t\tads : consent.advertising,\n\t\t\t})\n\t\t}\n\t})\n\n\twpm.updateGoogleConsentMode = (analytics = true, ads = true) => {\n\n\t\ttry {\n\t\t\tif (\n\t\t\t\t!window.gtag ||\n\t\t\t\t!wpmDataLayer.general.cookie_consent_mgmt.explicit_consent\n\t\t\t) return\n\n\t\t\tgtag(\"consent\", \"update\", {\n\t\t\t\tanalytics_storage : analytics ? \"granted\" : \"denied\",\n\t\t\t\tad_storage : ads ? \"granted\" : \"denied\",\n\t\t\t\tad_user_data : ads ? \"granted\" : \"denied\",\n\t\t\t\tad_personalization: ads ? \"granted\" : \"denied\",\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n\n\n(function (pmw, $, undefined) {\n\n\t/**\n\t * Pixel Manager Cookie Consent API\n\t */\n\n\t// Accept consent for all cookies\n\tpmw.consentAcceptAll = (settings = {}) => {\n\n\t\tsettings.duration = settings.duration || 365\n\n\t\tpmw.consentSetCookie(true, true, settings.duration)\n\t\twpm.unblockAllScripts(true, true)\n\t\twpm.updateGoogleConsentMode(true, true)\n\t}\n\n\t// Accept consent selectively\n\tpmw.consentAdjustSelectively = (settings) => {\n\n\t\t// if settings.marketing is set\n\t\t// write its value to settings.ads\n\t\t// and delete settings.marketing\n\t\tif (settings.marketing !== undefined) {\n\t\t\tsettings.ads = settings.marketing\n\t\t\tdelete settings.marketing\n\t\t}\n\n\t\t// If settings.analytics is set, keep it, otherwise set it to wpm.getConsentValues().categories.analytics\n\t\tsettings.analytics = settings.analytics !== undefined ? settings.analytics : wpm.getConsentValues().categories.analytics\n\t\tsettings.ads = settings.ads !== undefined ? settings.ads : wpm.getConsentValues().categories.ads\n\t\tsettings.duration = settings.duration || 365\n\n\t\t// console.log(\"settings\", settings)\n\n\t\tpmw.consentSetCookie(settings.analytics, settings.ads, settings.duration)\n\t\twpm.unblockAllScripts(settings.analytics, settings.ads)\n\t\twpm.updateGoogleConsentMode(settings.analytics, settings.ads)\n\t}\n\n\t// Remove consent for all cookies\n\tpmw.consentRevokeAll = (settings = {}) => {\n\n\t\tsettings.duration = settings.duration || 365\n\n\t\twpm.setConsentValueCategories(false, false)\n\t\tpmw.consentSetCookie(false, false, settings.duration)\n\t\twpm.updateGoogleConsentMode(false, false)\n\t}\n\n\t// Set a cookie called pmw_cookie_consent with the value of pmw_cookie_consent\n\t// and set the default expiration date to 1 year from now\n\tpmw.consentSetCookie = (analytics, ads, duration = 365) => {\n\t\twpm.setCookie(\"pmw_cookie_consent\", JSON.stringify({analytics, ads}), duration)\n\t}\n\n\tpmw.triggerPmwCookieConsentManagementLoaded = () => {\n\t\t// Trigger an event once the PMW consent management has been loaded\n\t\tdocument.dispatchEvent(new Event(\"pmw_cookie_consent_management_loaded\"))\n\t\tdocument.dispatchEvent(new Event(\"pmwCookieConsentManagementLoaded\"))\n\t}\n\n\tpmw.triggerPmwCookieConsentManagementLoaded()\n\n\t// Get that state for the statistics or marketing cookies\n\tpmw.getConsentValues = () => {\n\t\treturn wpm.getConsentValues()\n\t}\n\n}(window.pmw = window.pmw || {}, jQuery))\n","/**\n * remove_from_cart event\n *\n * Cannot be attached directly because the mini cart doesn't necessarily contain the remove button on page load.\n */\njQuery(document).on(\"click\", \".remove_from_cart_button, .remove\", (event) => {\n\n\t// console.log(\"remove_from_cart event\" + new Date().getTime())\n\n\ttry {\n\n\t\tlet url = new URL(jQuery(event.currentTarget).attr(\"href\"))\n\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\t\twpm.removeProductFromCart(productId)\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n/**\n * begin_checkout event\n *\n * Cannot be attached directly because the mini cart doesn't necessarily contain the remove button on page load.\n */\nlet checkoutButtonClasses = [\n\t// \".checkout\", // this is too generic. It triggers on the checkout page on some themes fore each interaction with the checkout form.\n\t\".checkout-button\",\n\t\".cart-checkout-button\",\n\t\".button.checkout\",\n\t\".xoo-wsc-ft-btn-checkout\", // https://xootix.com/side-cart-for-woocommerce/\n\t\".elementor-button--checkout\",\n\t\".xt_woofc-checkout\", // https://wordpress.org/plugins/woo-floating-cart-lite/\n\t\".fkcart-checkout--text\", // https://funnelkit.com/\n]\n\nconst checkoutButtonSelectors = wpm.prepareSelectors(checkoutButtonClasses, \"beginCheckout\")\n\n// https://wordpress.stackexchange.com/a/352171/68337\njQuery(document).on(\"click init_checkout\", checkoutButtonSelectors, () => {\n\n\tjQuery(document).trigger(\"wpmBeginCheckout\")\n})\n\njQuery(document).on(\"updated_cart_totals\", () => {\n\tjQuery(document).trigger(\"wpmViewCart\")\n})\n\n/**\n * Set up PWM events\n */\n\n// track checkout option event: purchase click\n// https://wordpress.stackexchange.com/a/352171/68337\njQuery(document).on(\"wpmLoad\", (event) => {\n\tjQuery(document).on(\"payment_method_selected\", () => {\n\n\t\tif (false === wpm.paymentMethodSelected) {\n\t\t\twpm.fireCheckoutProgress(3)\n\t\t}\n\n\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t\twpm.paymentMethodSelected = true\n\t})\n})\n\n// populate the wpmDataLayer with the cart items\njQuery(document).on(\"wpmLoad\", () => {\n\n\ttry {\n\t\twpm.initCart()\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// get all add-to-cart= products from backend\njQuery(document).on(\"wpmLoad\", () => {\n\n\twpmDataLayer.products = wpmDataLayer.products || {}\n\n\t// scan page for add-to-cart= links\n\tlet productIds = wpm.getAddToCartLinkProductIds()\n\n\twpm.getProductsFromBackend(productIds)\n})\n\n/**\n * Save the referrer into a cookie\n */\n\njQuery(document).on(\"wpmLoad\", () => {\n\n\t// If the referrer is already stored, then return\n\tif (wpm.retrieveData(\"referrer\")) {\n\t\treturn\n\t}\n\n\tif (document.referrer) {\n\t\tlet referrerUrl = new URL(document.referrer)\n\t\tlet referrerHostname = referrerUrl.hostname\n\n\t\tif (referrerHostname !== window.location.host) {\n\t\t\twpm.storeData(\"referrer\", referrerHostname)\n\t\t}\n\t}\n})\n\n\n/**\n * Create our own load event in order to better handle script flow execution when JS \"optimizers\" shuffle the code.\n */\njQuery(document).on(\"wpmLoad\", () => {\n\t// document.addEventListener(\"wpmLoad\", function () {\n\ttry {\n\t\tif (typeof wpmDataLayer != \"undefined\" && !wpmDataLayer?.pmw_loaded) {\n\n\t\t\tjQuery(document).trigger(\"wpmLoadAlways\")\n\n\t\t\tif (wpmDataLayer?.shop) {\n\t\t\t\tif (\n\t\t\t\t\t\"product\" === wpmDataLayer.shop.page_type &&\n\t\t\t\t\t\"variable\" !== wpmDataLayer.shop.product_type &&\n\t\t\t\t\twpm.getMainProductIdFromProductPage()\n\t\t\t\t) {\n\t\t\t\t\tlet product = wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage())\n\t\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t\t\t\t} else if (\"product_category\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmCategory\")\n\t\t\t\t} else if (\"search\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"pmwEvent:Search\")\n\t\t\t\t} else if (\"cart\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmViewCart\")\n\t\t\t\t} else if (\"order_received_page\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tif (wpmDataLayer?.order && !wpm.isOrderIdStored(wpmDataLayer.order.id)) {\n\t\t\t\t\t\tjQuery(document).trigger(\"wpmOrderReceivedPage\")\n\t\t\t\t\t\twpm.writeOrderIdToStorage(wpmDataLayer.order.id, wpmDataLayer.order.key)\n\t\t\t\t\t\tif (typeof wpm.acrRemoveCookie === \"function\") wpm.acrRemoveCookie()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tjQuery(document).trigger(\"wpmEverywhereElse\")\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tjQuery(document).trigger(\"wpmEverywhereElse\")\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.user?.id && !wpm.hasLoginEventFired()) {\n\t\t\t\tjQuery(document).trigger(\"wpmLogin\")\n\t\t\t\twpm.setLoginEventFired()\n\t\t\t}\n\n\t\t\twpmDataLayer.pmw_loaded = true\n\t\t}\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\njQuery(document).on(\"wpmLoad\", async () => {\n\tif (wpm.retrieveData(\"restEndpointAvailable\") === false) wpm.consoleError(\"REST endpoint is not available. Using admin-ajax.php instead.\")\n})\n\n\n/**\n * Load all pixels\n */\njQuery(document).on(\"wpmPreLoadPixels\", () => {\n\n\tif (wpmDataLayer?.general?.cookie_consent_mgmt?.explicit_consent && !wpm.explicitConsentStateAlreadySet()) {\n\t\twpm.updateConsentCookieValues(null, null, true)\n\t}\n\n\tjQuery(document).trigger(\"wpmLoadPixels\", {})\n})\n\n\n/**\n * All ecommerce events\n */\n\n/**\n * Add to cart event\n */\njQuery(document).on(\"wpmAddToCart\", (event, product) => {\n\n\twpm.consoleLog(\"wpmAddToCart event fired\", {event, product})\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"addToCart\",\n\t\tproduct: product,\n\t}\n\n\t// Facebook\n\t// If Facebook pixel is loaded, add Facebook server to server event data to the payload\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"AddToCart\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : wpm.fbGetProductDataForCapiEvent(product),\n\t\t}\n\t}\n\n\t// Pinterest\n\t// https://developers.pinterest.com/docs/conversions/best/\n\t// https://developers.pinterest.com/docs/api/v5/#operation/events/create\n\t// https://developers.pinterest.com/docs/conversions/event/\n\tif (wpmDataLayer?.pixels?.pinterest?.loaded) {\n\n\t\tpayload.pinterest = wpm.getPinterestS2SBaseData()\n\n\t\tpayload.pinterest.event_name = \"addtocart\"\n\t\tpayload.pinterest.custom_data = wpm.pinterestGetProductDataForCapiEvent(product)\n\t}\n\n\t// TikTok\n\t// https://ads.tiktok.com/gateway/docs/index?identify_key=c0138ffadd90a955c1f0670a56fe348d1d40680b3c89461e09f78ed26785164b&language=ENGLISH&doc_id=1739585702922241#item-link-Adding%20parameters%20to%20event%20code\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"AddToCart\",\n\t\t\tevent_id : wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t\tproperties: {\n\t\t\t\tvalue : product.price * product.quantity,\n\t\t\t\tcurrency: product.currency,\n\t\t\t\tcontents: [{\n\t\t\t\t\tcontent_id : product.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],\n\t\t\t\t\tcontent_type: \"product\",\n\t\t\t\t\tcontent_name: product.name,\n\t\t\t\t\tquantity : product.quantity,\n\t\t\t\t\tprice : product.price,\n\t\t\t\t}],\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideAddToCart\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\twpm.sendEventPayloadToServer(payload)\n})\n\n/**\n * Begin checkout event\n */\njQuery(document).on(\"wpmBeginCheckout\", (event) => {\n\n\twpm.consoleLog(\"wpmBeginCheckout event fired\", {event})\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"beginCheckout\",\n\t}\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"InitiateCheckout\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {},\n\t\t}\n\n\t\tif (wpmDataLayer?.cart && !jQuery.isEmptyObject(wpmDataLayer.cart)) {\n\t\t\tpayload.facebook.custom_data = {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tcontent_ids : wpm.fbGetContentIdsFromCart(),\n\t\t\t\tvalue : wpm.getCartValue(),\n\t\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\t}\n\t\t}\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"InitiateCheckout\",\n\t\t\tevent_id : wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t\tproperties: wpm.tiktokGetPropertiesFromCart(),\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideBeginCheckout\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\twpm.sendEventPayloadToServer(payload)\n})\n\n/**\n * Add to wishlist event\n */\njQuery(document).on(\"wpmAddToWishlist\", (event, product) => {\n\n\twpm.consoleLog(\"wpmAddToWishlist event fired\", {event, product})\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"addToWishlist\",\n\t\tproduct: product,\n\t}\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"AddToWishlist\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : wpm.fbGetProductDataForCapiEvent(product),\n\t\t}\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"AddToWishlist\",\n\t\t\tevent_id : wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t\tproperties: {\n\t\t\t\tvalue : product.price * product.quantity,\n\t\t\t\tcurrency: product.currency,\n\t\t\t\tcontents: [{\n\t\t\t\t\tcontent_id : product.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],\n\t\t\t\t\tcontent_type: \"product\",\n\t\t\t\t\tcontent_name: product.name,\n\t\t\t\t\tquantity : product.quantity,\n\t\t\t\t\tprice : product.price,\n\t\t\t\t}],\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideAddToWishlist\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\twpm.sendEventPayloadToServer(payload)\n})\n\n/**\n * View Item event\n */\njQuery(document).on(\"wpmViewItem\", (event, product = null) => {\n\n\twpm.consoleLog(\"wpmViewItem event fired\", {event, product})\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"viewItem\",\n\t\tproduct: product,\n\t}\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"ViewContent\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {},\n\t\t}\n\n\t\tif (product) {\n\t\t\tpayload.facebook.custom_data = wpm.fbGetProductDataForCapiEvent(product)\n\t\t}\n\t}\n\n\t// Pinterest\n\t// https://developers.pinterest.com/docs/conversions/best/\n\t// https://developers.pinterest.com/docs/api/v5/#operation/events/create\n\t// https://developers.pinterest.com/docs/conversions/event/\n\tif (wpmDataLayer?.pixels?.pinterest?.loaded) {\n\n\t\tpayload.pinterest = wpm.getPinterestS2SBaseData()\n\n\t\tpayload.pinterest.event_name = \"pagevisit\"\n\n\t\tif (product) {\n\t\t\tpayload.pinterest.custom_data = wpm.pinterestGetProductDataForCapiEvent(product)\n\t\t}\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"ViewContent\",\n\t\t\tevent_id: wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t}\n\n\t\tif (product) {\n\t\t\tpayload.tiktok.properties = {\n\t\t\t\tvalue : product.price * product.quantity,\n\t\t\t\tcurrency: product.currency,\n\t\t\t\tcontents: [{\n\t\t\t\t\tcontent_id : product.dyn_r_ids[wpmDataLayer.pixels.tiktok.dynamic_remarketing.id_type],\n\t\t\t\t\tcontent_type: \"product\",\n\t\t\t\t\tcontent_name: product.name,\n\t\t\t\t\tquantity : product.quantity,\n\t\t\t\t\tprice : product.price,\n\t\t\t\t}],\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideViewItem\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\twpm.sendEventPayloadToServer(payload)\n})\n\n/**\n * View category event\n */\njQuery(document).on(\"wpmCategory\", (event, product = null) => {\n\n\twpm.consoleLog(\"wpmCategory event fired\", {event, product})\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"viewCategory\",\n\t}\n\n\t// Pinterest\n\t// https://developers.pinterest.com/docs/conversions/best/\n\t// https://developers.pinterest.com/docs/api/v5/#operation/events/create\n\t// https://developers.pinterest.com/docs/conversions/event/\n\tif (wpmDataLayer?.pixels?.pinterest?.loaded) {\n\n\t\tpayload.pinterest = wpm.getPinterestS2SBaseData()\n\n\t\tpayload.pinterest.event_name = \"viewcategory\"\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideViewCategory\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\twpm.sendEventPayloadToServer(payload)\n})\n\n/**\n * Search event\n */\njQuery(document).on(\"pmwEvent:Search\", (event) => {\n\n\twpm.consoleLog(\"pmwEvent:Search event fired\", {event})\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"search\",\n\t}\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"Search\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {\n\t\t\t\tsearch_string: wpm.getSearchTermFromUrl(),\n\t\t\t},\n\t\t}\n\t}\n\n\t// Pinterest\n\t// https://developers.pinterest.com/docs/conversions/best/\n\t// https://developers.pinterest.com/docs/api/v5/#operation/events/create\n\t// https://developers.pinterest.com/docs/conversions/event/\n\tif (wpmDataLayer?.pixels?.pinterest?.loaded) {\n\n\t\tpayload.pinterest = wpm.getPinterestS2SBaseData()\n\n\t\tpayload.pinterest.event_name = \"search\"\n\t\tpayload.pinterest.custom_data = {\n\t\t\tsearch_string: wpm.getSearchTermFromUrl(),\n\t\t}\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"Search\",\n\t\t\tevent_id : wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t\tproperties: {\n\t\t\t\tquery: wpm.getSearchTermFromUrl(),\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideSearch\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\twpm.sendEventPayloadToServer(payload)\n})\n\n/**\n * Place order event\n */\njQuery(document).on(\"wpmPlaceOrder\", (event) => {\n\n\twpm.consoleLog(\"wpmPlaceOrder event fired\", {event})\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"placeOrder\",\n\t}\n\n\t// TikTok\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"PlaceAnOrder\",\n\t\t\tevent_id : wpm.getRandomEventId(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t\tproperties: wpm.tiktokGetPropertiesFromCart(),\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientPlaceOrder\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\twpm.sendEventPayloadToServer(payload)\n})\n\n/**\n * Order received event\n */\njQuery(document).on(\"wpmOrderReceivedPage\", (event) => {\n\n\twpm.consoleLog(\"wpmOrderReceivedPage event fired\", {event})\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"orderReceived\",\n\t}\n\n\t// Facebook\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"Purchase\",\n\t\t\tevent_id : wpmDataLayer.order.id.toString(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tvalue : wpmDataLayer.order.value.marketing,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tcontent_ids : wpm.facebookContentIds(),\n\t\t\t},\n\t\t}\n\t}\n\n\t// Pinterest\n\t// https://developers.pinterest.com/docs/conversions/best/\n\t// https://developers.pinterest.com/docs/api/v5/#operation/events/create\n\t// https://developers.pinterest.com/docs/conversions/event/\n\tif (wpmDataLayer?.pixels?.pinterest?.loaded) {\n\n\t\tpayload.pinterest = wpm.getPinterestS2SBaseData()\n\n\t\tpayload.pinterest.event_name = \"checkout\"\n\t}\n\n\t// TikTok\n\t// https://ads.tiktok.com/help/article/standard-events-parameters\n\tif (wpmDataLayer?.pixels?.tiktok?.loaded) {\n\t\tpayload.tiktok = {\n\t\t\tevent : \"CompletePayment\",\n\t\t\tevent_id : wpmDataLayer.order.id.toString(),\n\t\t\tcontext : wpm.getTikTokUserDataFromBrowser(),\n\t\t\tproperties: {\n\t\t\t\tvalue : wpmDataLayer.order.value.marketing,\n\t\t\t\tcurrency: wpmDataLayer.order.currency,\n\t\t\t\tcontents: wpm.getTikTokOrderItemIds(),\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideOrderReceivedPage\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// ! No server-to-server event is sent for this event because it is compiled and sent from the server directly\n})\n\njQuery(document).on(\"pmw:ready\", async () => {\n\n\t/**\n\t * Run as soon as wpm namespace is loaded\n\t */\n\n\t// Watch for products visible in viewport\n\twpm.startIntersectionObserverToWatch()\n\n\t// Watch for lazy loaded products\n\twpm.startProductsMutationObserverToWatch()\n})\n","/**\n * Register event listeners\n */\n\n\n/**\n * add_to_cart event\n *\n * WC is inconsistent with events that emit add-to-cart events.\n * adding_to_cart and added_to_are legacy events. Also, they only work\n * on Ajax buttons on shop pages.\n *\n * Never add document or body selectors.\n * The document selector doesn't work.\n * The body selector will cause the events to fire twice and other erratic behavior if used along with other selectors.\n */\nconst addToCartSelectorsArray = [\n\t// \"document\",\n\t// \"body\",\n\t\".add_to_cart_button:not(.product_type_variable)\",\n\t\".ajax_add_to_cart\",\n\t\".single_add_to_cart_button\",\n]\n\nconst addToCartSelectors = wpm.prepareSelectors(addToCartSelectorsArray, \"addToCart\")\n\njQuery(addToCartSelectors).on(\"click adding_to_cart\", (event, data) => {\n\n\t// console.log(\"add_to_cart event fired at: \" + new Date().getTime())\n\t// console.log('add to cart data', data)\n\t// console.log('add to cart event', event)\n\t// console.log('add to cart jQuery(event.target.dataset)', jQuery(event.target.dataset))\n\t// console.log(\"add to cart event.target.dataset\", event.target.dataset)\n\t// console.log(\"add to cart event.target.dataset.quantity\", event.target.dataset.quantity)\n\t// console.log(\"add to cart event.target.dataset.product_id\", event.target.dataset.product_id)\n\n\ttry {\n\n\t\t// console.log(\"add_to_cart event detected\")\n\n\t\tlet quantity = event?.target?.dataset?.quantity ? event.target.dataset.quantity : null\n\t\tlet productId = event?.target?.dataset?.product_id ? event.target.dataset.product_id : null\n\n\t\t// let quantity = event.target.dataset.quantity ? event.target.dataset.quantity : 1\n\t\t// let productId = event.target.dataset.product_id ? event.target.dataset.product_id : null\n\n\t\t// Only process on product pages\n\t\tif (wpmDataLayer.shop.page_type === \"product\") {\n\n\t\t\t// First process related and upsell products\n\t\t\tif (\n\t\t\t\ttypeof jQuery(event.currentTarget).attr(\"href\") !== \"undefined\"\n\t\t\t\t&& jQuery(event.currentTarget).attr(\"href\").includes(\"add-to-cart\")\n\t\t\t) {\n\n\t\t\t\tif (!productId) {\n\t\t\t\t\tproductId = jQuery(event.currentTarget).data(\"product_id\")\n\t\t\t\t}\n\n\t\t\t\twpm.addProductToCart(productId, 1)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// If is simple product\n\t\t\tif (wpmDataLayer.shop.product_type === \"simple\") {\n\n\t\t\t\tif (quantity === null) {\n\t\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val()) ? Number(jQuery(\".input-text.qty\").val()) : 1\n\t\t\t\t}\n\n\t\t\t\tif (!productId) {\n\t\t\t\t\tproductId = jQuery(event.currentTarget).val()\n\t\t\t\t}\n\n\t\t\t\t// Fallback if the body selector is used\n\t\t\t\tif (!productId) {\n\t\t\t\t\t// get the product ID from the element that has the class .product\n\t\t\t\t\t// that element will also have an ID that start with product- and ends with the product ID\n\t\t\t\t\t// example: product-123\n\t\t\t\t\t// save the product ID in the variable productId\n\t\t\t\t\tproductId = jQuery(\".product\").attr(\"id\").replace(\"product-\", \"\")\n\t\t\t\t}\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// If is variable product or variable-subscription\n\t\t\tif ([\"variable\", \"variable-subscription\"].indexOf(wpmDataLayer.shop.product_type) >= 0) {\n\n\t\t\t\tif (quantity === null) {\n\t\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val()) ? Number(jQuery(\".input-text.qty\").val()) : 1\n\t\t\t\t}\n\n\t\t\t\tif (!productId) {\n\t\t\t\t\tproductId = jQuery(\"[name='variation_id']\").val()\n\t\t\t\t}\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// If is grouped product\n\t\t\tif (wpmDataLayer.shop.product_type === \"grouped\") {\n\n\t\t\t\tjQuery(\".woocommerce-grouped-product-list-item\").each((index, element) => {\n\n\t\t\t\t\t// Can't rely on event.target.dataset as it always is sent with the parent product ID and the quantity 1\n\n\t\t\t\t\tquantity = Number(jQuery(element).find(\".input-text.qty\").val()) ? Number(jQuery(element).find(\".input-text.qty\").val()) : 1\n\n\t\t\t\t\tlet classes = jQuery(element).attr(\"class\")\n\t\t\t\t\tproductId = wpm.getPostIdFromString(classes)\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// If is bundle product\n\t\t\tif (wpmDataLayer.shop.product_type === \"bundle\") {\n\n\t\t\t\tif (quantity === null) {\n\t\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val()) ? Number(jQuery(\".input-text.qty\").val()) : 1\n\t\t\t\t}\n\n\t\t\t\tif (!productId) {\n\t\t\t\t\tproductId = jQuery(\"input[name=add-to-cart]\").val()\n\t\t\t\t}\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// everything else\n\t\t\tif (quantity === null) {\n\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val()) ? Number(jQuery(\".input-text.qty\").val()) : 1\n\t\t\t}\n\n\t\t\twpm.addProductToCart(productId, quantity)\n\n\t\t} else {\n\n\t\t\tif (quantity === null) {\n\t\t\t\tquantity = 1\n\t\t\t}\n\n\t\t\tif (!productId) {\n\t\t\t\t// console.log(\"add to cart event.currentTarget\", event.currentTarget)\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"product_id\") ? jQuery(event.currentTarget).data(\"product_id\") : null\n\t\t\t}\n\n\t\t\t// Another fallback to retrieve the product ID in case the ID is saved in the value attribute\n\t\t\tif (!productId) {\n\t\t\t\tproductId = jQuery(event.currentTarget).val() ? jQuery(event.currentTarget).val() : null\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tproductId\n\t\t\t\t&& quantity\n\t\t\t) {\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\t\t}\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n/**\n * If someone clicks anywhere on a custom /?add-to-cart=123 link\n * trigger the add to cart event\n */\n\n// jQuery(document).one(\"click\", \"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\", (event) => {\njQuery(\"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\").one(\"click\", (event) => {\n\n\ttry {\n\t\tif (jQuery(event.target).closest(\"a\").attr(\"href\")) {\n\n\t\t\tlet url = new URL(jQuery(event.currentTarget).attr(\"href\"), window.location.origin)\n\n\t\t\tif (url.searchParams.has(\"add-to-cart\")) {\n\n\t\t\t\tlet productId = url.searchParams.get(\"add-to-cart\")\n\t\t\t\twpm.addProductToCart(productId, 1)\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// select item event\n// jQuery(document).on(\"click\", \".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product\", (event) => {\njQuery(\".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product\").on(\"click\", (event) => {\n\n\ttry {\n\n\t\t/**\n\t\t * On some pages the event fires multiple times, and on product pages\n\t\t * even on page load. Using e.stopPropagation helps to prevent this,\n\t\t * but I don't know why. We don't even have to use this, since only a real\n\t\t * product click yields a valid productId. So we filter the invalid click\n\t\t * events out later down in the code. I'll keep it that way because this is\n\t\t * the most compatible way across shops.\n\t\t *\n\t\t * e.stopPropagation();\n\t\t * */\n\n\t\tlet productId = jQuery(event.currentTarget).nextAll(\".wpmProductId:first\").data(\"id\")\n\n\t\t/**\n\t\t * On product pages, for some reason, the click event is triggered on the main product on page load.\n\t\t * In that case no ID is found. But we can discard it, since we only want to trigger the event on\n\t\t * related products, which are found below.\n\t\t */\n\n\t\tif (productId) {\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\tjQuery(document).trigger(\"wpmSelectContentGaUa\", product)\n\t\t\t\tjQuery(document).trigger(\"wpmSelectItem\", product)\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// checkout_progress event\n// track checkout option event: entered valid billing email\n// jQuery(document).on(\"input\", \"#billing_email\", (event) => {\njQuery(\"#billing_email\").on(\"input\", (event) => {\n\n\tif (wpm.isEmail(jQuery(event.currentTarget).val())) {\n\t\t// wpm.fireCheckoutOption(2);\n\t\twpm.fireCheckoutProgress(2)\n\t\twpm.emailSelected = true\n\t}\n})\n\n\n/**\n * Place order button\n *\n * Track checkout option event: purchase click\n * https://stackoverflow.com/a/34112407/4688612\n * jQuery(document).one(\"click\", \"#place_order\", () => {\n *\n * Has to be hooked after document ready !\n */\njQuery(\"form.checkout\").on(\"checkout_place_order_success\", () => {\n\n\t// console log current time\n\t// console.log(\"checkout_place_order_success event fired at: \" + new Date().getTime())\n\n\tif (false === wpm.emailSelected) {\n\t\twpm.fireCheckoutProgress(2)\n\t}\n\n\tif (false === wpm.paymentMethodSelected) {\n\t\twpm.fireCheckoutProgress(3)\n\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t}\n\n\twpm.fireCheckoutProgress(4)\n\n\tjQuery(document).trigger(\"wpmPlaceOrder\", {})\n})\n\n/**\n * Update cart event\n *\n * Has to be hooked after document ready !\n */\njQuery(\"[name='update_cart']\").on(\"click\", () => {\n\n\t// console.log(\"update_cart event fired at: \" + new Date().getTime())\n\n\ttry {\n\t\tjQuery(\".cart_item\").each((index, element) => {\n\n\t\t\tconst productId = wpm.getProductIdByCartItemElement(element)\n\n\t\t\tif (!productId) {\n\t\t\t\tconsole.error(\"Pixel Manager: Wasn't able to retrieve a productId\")\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst quantity = wpm.getProductQuantityByCartItemElement(element)\n\n\t\t\tif (!quantity) {\n\t\t\t\tconsole.error(\"Pixel Manager: Wasn't able to retrieve a quantity\")\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t// console.log(\"productId\", productId)\n\t\t\t// console.log(\"quantity\", quantity)\n\n\t\t\tif (quantity === 0) {\n\t\t\t\twpm.removeProductFromCart(productId)\n\t\t\t} else if (quantity < wpmDataLayer.cart[productId].quantity) {\n\t\t\t\twpm.removeProductFromCart(productId, wpmDataLayer.cart[productId].quantity - quantity)\n\t\t\t} else if (quantity > wpmDataLayer.cart[productId].quantity) {\n\t\t\t\twpm.addProductToCart(productId, quantity - wpmDataLayer.cart[productId].quantity)\n\t\t\t}\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t\twpm.getCartItemsFromBackend()\n\t}\n})\n\n// add_to_wishlist\njQuery(\".add_to_wishlist,.wl-add-to\").on(\"click\", event => {\n\n\ttry {\n\n\t\tlet productId\n\n\t\tif (jQuery(event.currentTarget).data(\"productid\")) { // for the WooCommerce wishlist plugin\n\n\t\t\tproductId = jQuery(event.currentTarget).data(\"productid\")\n\t\t} else if (jQuery(event.currentTarget).data(\"product-id\")) { // for the YITH wishlist plugin\n\n\t\t\tproductId = jQuery(event.currentTarget).data(\"product-id\")\n\t\t}\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\n\t\tjQuery(document).trigger(\"wpmAddToWishlist\", product)\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n/**\n * Called when the user selects all the required dropdowns / attributes\n *\n * Has to be hooked after document ready !\n *\n * https://stackoverflow.com/a/27849208/4688612\n * https://stackoverflow.com/a/65065335/4688612\n */\n\njQuery(\".single_variation_wrap\").on(\"show_variation\", (event, variation) => {\n\n\ttry {\n\t\tlet productId = wpm.getIdBasedOndVariationsOutputSetting(variation.variation_id)\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\twpm.triggerViewItemEventPrep(productId)\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n/**\n * Called on variable products when no selection has been done yet\n * or when the visitor deselects his choice.\n *\n * Has to be hooked after document ready !\n */\n\n// jQuery(function () {\n//\n// \tjQuery(\".single_variation_wrap\").on(\"hide_variation\", function () {\n//\n// \t\ttry {\n// \t\t\tlet classes = jQuery(\"body\").attr(\"class\")\n// \t\t\tlet productId = classes.match(/(postid-)(\\d+)/)[2]\n//\n// \t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n//\n// \t\t\t/**\n// \t\t\t * If we have a variable product with no preset,\n// \t\t\t * and variations output is enabled,\n// \t\t\t * then we send a viewItem event with the first\n// \t\t\t * variation we find for the parent.\n// \t\t\t * If variations output is disabled,\n// \t\t\t * we just send the parent ID.\n// \t\t\t *\n// \t\t\t * And if Facebook microdata is active, use the\n// \t\t\t * microdata product ID.\n// \t\t\t */\n//\n// \t\t\tif (\n// \t\t\t\t\"variable\" === wpmDataLayer.shop.product_type &&\n// \t\t\t\twpmDataLayer?.shop?.variations_output\n// \t\t\t) {\n// \t\t\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n// \t\t\t\t\tif (\"parent_id\" in product) {\n//\n// \t\t\t\t\t\tproductId = product.id\n// \t\t\t\t\t\tbreak\n// \t\t\t\t\t}\n// \t\t\t\t}\n//\n// \t\t\t\tif (wpmDataLayer?.pixels?.facebook?.microdata_product_id) {\n// \t\t\t\t\tproductId = wpmDataLayer.pixels.facebook.microdata_product_id\n// \t\t\t\t}\n// \t\t\t}\n//\n// \t\t\t// console.log(\"hmm\")\n// \t\t\twpm.triggerViewItemEventPrep(productId)\n//\n// \t\t} catch (e) {\n// \t\t\tconsole.error(e)\n// \t\t}\n// \t})\n// })\n\n// jQuery(function () {\n//\n// \tjQuery(\".single_variation_wrap\").on(\"hide_variation\", function () {\n// \t\tjQuery(document).trigger(\"wpmviewitem\")\n// \t})\n// })\n","/**\n * Create a wpm namespace under which all functions are declared\n */\n\n// https://stackoverflow.com/a/5947280/4688612\n\n(function (wpm, $, undefined) {\n\n\tconst wpmDeduper = {\n\t\tkeyName : \"_wpm_order_ids\",\n\t\tcookieExpiresDays: 365,\n\t}\n\n\tconst wpmRestSettings = {\n\t\t// cookiesAvailable : '_wpm_cookies_are_available',\n\t\tcookiePmwRestEndpointAvailable: \"restEndpointAvailable\",\n\t\trestEndpointPost : \"pmw/v1/test/\",\n\t\trestFails : 0,\n\t\trestFailsThreshold : 10,\n\t}\n\n\twpm.emailSelected = false\n\twpm.paymentMethodSelected = false\n\n\twpm.isBelowRestErrorThreshold = () => wpm.retrieveData(wpmRestSettings.restFails) <= wpmRestSettings.restFailsThreshold\n\n\twpm.isRestEndpointAvailable = async () => {\n\n\t\t// If we already tested the endpoint and have a stored value, return it\n\t\tif (wpm.retrieveData(wpmRestSettings.cookiePmwRestEndpointAvailable)) {\n\t\t\treturn wpm.retrieveData(wpmRestSettings.cookiePmwRestEndpointAvailable)\n\t\t}\n\n\t\treturn await wpm.testEndpoint()\n\t}\n\n\t/**\n\t * Tests a given endpoint by sending a POST request. If the response status is 200, it stores `true` in the dataStorage with given cookie name; else it stores `false`.\n\t *\n\t * @param {string} url - The URL of the endpoint to test. Defaults to concatenation of `wpm.root` and `wpmRestSettings.restEndpointPost`.\n\t * @param {string} cookieName - The name of the cookie where the test result will be stored. Defaults to `wpmRestSettings.cookiePmwRestEndpointAvailable`.\n\t * @returns {Promise} - Returns a promise that resolves to `true` if the response status is 200, and `false` otherwise.\n\t * @async\n\t */\n\twpm.testEndpoint = async (\n\t\turl = wpm.root + wpmRestSettings.restEndpointPost,\n\t\tcookieName = wpmRestSettings.cookiePmwRestEndpointAvailable,\n\t) => {\n\n\t\tconst response = await fetch(url, {\n\t\t\tmethod : \"POST\",\n\t\t\tmode : \"cors\",\n\t\t\tcache : \"no-cache\",\n\t\t\tkeepalive: true,\n\t\t})\n\n\t\tif (response.status === 200) {\n\t\t\twpm.storeData(cookieName, true)\n\t\t\treturn true\n\t\t}\n\n\t\tif (response.status === 404) {\n\t\t\twpm.storeData(cookieName, false)\n\t\t\treturn false\n\t\t}\n\n\t\tif (response.status === 0) {\n\t\t\twpm.storeData(cookieName, false)\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.isWpmRestEndpointAvailable = (cookieName = wpmRestSettings.cookiePmwRestEndpointAvailable) => !!wpm.retrieveData(cookieName)\n\n\t/**\n\t * This function writes the provided orderId into storage. It will first retrieve the existing orderIds\n\t * from the storage if any, then add the new orderId into this existing array of orderIds and stores\n\t * the updated array back to the storage.\n\t * If the function wpm.storeOrderIdOnServer exists and order_duplication_prevention is set to true in wpmDataLayer.shop,\n\t * this function will also store the orderId, orderKey and source on the server side using wpm.storeOrderIdOnServer.\n\t *\n\t * @param {String} orderId - The ID of the order to be stored.\n\t * @param {String} orderKey - The Key of the order to be stored.\n\t * @param {String} source - The source from which the order originated (default: 'thankyou_page').\n\t */\n\twpm.writeOrderIdToStorage = (orderId, orderKey, source = \"thankyou_page\") => {\n\n\t\t// Get existing order ids\n\t\tlet orderIds = wpm.retrieveData(\"orderIds\", true) || []\n\n\t\t// Add the new order id\n\t\torderIds.push(orderId)\n\n\t\t// Store the order ids\n\t\twpm.storeData(\"orderIds\", orderIds, true)\n\n\t\tif (typeof wpm.storeOrderIdOnServer === \"function\") {\n\t\t\twpm.storeOrderIdOnServer({\n\t\t\t\torderId : orderId,\n\t\t\t\torderKey: orderKey,\n\t\t\t\tsource : source,\n\t\t\t})\n\t\t}\n\t}\n\n\twpm.isOrderIdStored = orderId => {\n\n\t\t// If order deduplication is disabled, return false\n\t\tif (!wpmDataLayer.shop.order_duplication_prevention) {\n\t\t\twpm.consoleLog(\"order duplication prevention is off\")\n\t\t\treturn false\n\t\t}\n\n\t\tconst orderIds = wpm.retrieveData(\"orderIds\", true) || []\n\t\treturn orderIds.includes(orderId)\n\t}\n\n\t/**\n\t * Check if the email address is valid\n\t *\n\t * https://stackoverflow.com/questions/201323/how-can-i-validate-an-email-address-using-a-regular-expression\n\t * https://www.w3.org/TR/html5/forms.html#valid-e-mail-address\n\t * https://fightingforalostcause.net/content/misc/2006/compare-email-regex.php\n\t *\n\t * @param email\n\t * @returns {boolean}\n\t */\n\twpm.isEmail = email => {\n\n\t\t/**\n\t\t * GitHub Copilot generated RFC 5322 compliant regex\n\t\t * - Don't allow emails without a top-level domain like \"john@localhost\"\n\t\t * - Don't allow emails with dots at the end of the name like \"john.doe.@example.com\"\n\t\t */\n\t\tconst regex = new RegExp(\n\t\t\t\"^(([^<>()\\\\[\\\\]\\\\\\\\.,;:\\\\s@\\\"]+(\\\\.[^<>()\\\\[\\\\]\\\\\\\\.,;:\\\\s@\\\"]+)*)|(\\\".+\\\"))\"\n\t\t\t+ \"@\"\n\t\t\t+ \"((\\\\[[0-9]{1,3}\\\\.[0-9]{1,3}\\\\.[0-9]{1,3}\\\\.[0-9]{1,3}\\\\])\"\n\t\t\t+ \"|(([a-zA-Z\\\\-0-9]+\\\\.)+[a-zA-Z]{2,}))$\",\n\t\t)\n\n\t\treturn regex.test(email)\n\t}\n\n\twpm.removeProductFromCart = async (productId, quantityToRemove = null) => {\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tlet quantity\n\n\t\t\tif (quantityToRemove == null) {\n\t\t\t\tquantity = wpmDataLayer.cart[productId].quantity\n\t\t\t} else {\n\t\t\t\tquantity = quantityToRemove\n\t\t\t}\n\n\t\t\tif (!wpmDataLayer.cart[productId]) {\n\t\t\t\tawait wpm.getProductsFromBackend([productId])\n\t\t\t}\n\n\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\n\t\t\tjQuery(document).trigger(\"wpmRemoveFromCart\", product)\n\n\t\t\tif (quantityToRemove == null || wpmDataLayer.cart[productId].quantity === quantityToRemove) {\n\t\t\t\tdelete wpmDataLayer.cart[productId]\n\t\t\t} else {\n\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity - quantity\n\t\t\t}\n\n\t\t\twpm.storeCartData(wpmDataLayer.cart)\n\n\t\t} catch (e) {\n\t\t\twpm.consoleError(e)\n\t\t}\n\t}\n\n\twpm.getIdBasedOndVariationsOutputSetting = productId => {\n\n\t\ttry {\n\t\t\tif (wpmDataLayer?.shop?.variations_output) return productId\n\n\t\t\tif (wpmDataLayer.products[productId].is_variation) return wpmDataLayer.products[productId].parent_id\n\n\t\t\treturn productId\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.prepareSelectors = (selectors, type) => {\n\n\t\tif (wpmDataLayer?.shop?.selectors?.[type]) {\n\n\t\t\t// merge the selectors from the addToCartSelectors array with the selectors from the wpmDataLayer.shop.selectors.addToCart array\n\t\t\tselectors = selectors.concat(wpmDataLayer.shop.selectors[type])\n\n\t\t\t// Remove duplicates\n\t\t\tselectors = [...new Set(selectors)]\n\n\t\t\t// If one of the selectors is document, remove it\n\t\t\tif (selectors.indexOf(\"document\") >= 0) {\n\t\t\t\tselectors.splice(selectors.indexOf(\"document\"), 1)\n\t\t\t}\n\n\t\t\t// If one of the selectors is body, remove all others\n\t\t\tif (selectors.indexOf(\"body\") >= 0) {\n\t\t\t\tselectors = [\"body\"]\n\t\t\t}\n\t\t}\n\n\t\treturn selectors.join(\", \")\n\t}\n\n\t// add_to_cart\n\twpm.addProductToCart = async (productId, quantity) => {\n\n\t\t// Cast quantity to number to make sure it's a number\n\t\tquantity = Number(quantity)\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (!wpmDataLayer?.products[productId]) {\n\t\t\t\tawait wpm.getProductsFromBackend([productId])\n\t\t\t}\n\n\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\n\t\t\tjQuery(document).trigger(\"wpmAddToCart\", product)\n\n\t\t\t// add product to cart wpmDataLayer['cart']\n\n\t\t\t// if the product already exists in the object, only add the additional quantity\n\t\t\t// otherwise create that product object in the wpmDataLayer['cart']\n\t\t\tif (wpmDataLayer?.cart[productId]) {\n\n\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity + quantity\n\t\t\t} else {\n\n\t\t\t\tif (!(\"cart\" in wpmDataLayer)) wpmDataLayer.cart = {}\n\n\t\t\t\twpmDataLayer.cart[productId] = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\t\t\t}\n\n\t\t\twpm.storeCartData(wpmDataLayer.cart)\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\n\t\t\t// fallback if wpmDataLayer.cart and wpmDataLayer.products got out of sync in case cart caching has an issue\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\n\t}\n\n\twpm.initCart = () => {\n\n\t\t// If the WC cart doesn't exist, eg. after a confirmed purchase,\n\t\t// and we still have a cart object in the storage, reset it.\n\t\tif (\n\t\t\t!wpm.doesWooCommerceCartExist()\n\t\t\t&& Object.keys(wpm.retrieveCartData()).length !== 0\n\t\t) {\n\t\t\twpm.storeCartData({})\n\t\t\treturn\n\t\t}\n\n\t\t// If the cart object is in the storage, use it\n\t\tif (wpm.retrieveCartData()) {\n\t\t\twpm.saveCartObjectToDataLayer(wpm.retrieveCartData())\n\t\t\treturn\n\t\t}\n\n\t\t// If the cart object is missing in the storage, create an empty one and get the cart items from the backend\n\t\twpm.storeCartData({})\n\t\twpm.getCartItemsFromBackend()\n\t}\n\n\t// get all cart items from the backend\n\twpm.getCartItemsFromBackend = () => {\n\t\ttry {\n\n\t\t\t/**\n\t\t\t * Can't use a REST API endpoint, as the cart session will not be loaded if the\n\t\t\t * endpoint is called.\n\t\t\t *\n\t\t\t * https://wordpress.org/support/topic/wc-cart-is-null-in-custom-rest-api/#post-11442843\n\t\t\t */\n\n\t\t\t/**\n\t\t\t * Get the cart items from the backend the data object using fetch API\n\t\t\t * and log success or error messages\n\t\t\t * and url encoded data\n\t\t\t */\n\t\t\tfetch(wpm.ajax_url, {\n\t\t\t\tmethod : \"POST\",\n\t\t\t\tcache : \"no-cache\",\n\t\t\t\tbody : new URLSearchParams({action: \"pmw_get_cart_items\"}),\n\t\t\t\tkeepalive: true,\n\t\t\t})\n\t\t\t\t.then(response => {\n\t\t\t\t\tif (response.ok) {\n\t\t\t\t\t\treturn response.json()\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow Error(\"Error getting cart items from backend\")\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.then(data => {\n\n\t\t\t\t\tif (data.success) {\n\n\t\t\t\t\t\tif (!data.data[\"cart\"]) data.data[\"cart\"] = {}\n\t\t\t\t\t\twpm.saveCartObjectToDataLayer(data.data[\"cart\"])\n\t\t\t\t\t\twpm.storeCartData(data.data[\"cart\"])\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow Error(\"Error getting cart items from backend\")\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// get productIds from the backend\n\twpm.getProductsFromBackend = async productIds => {\n\n\t\tif (wpmDataLayer?.products) {\n\t\t\t// If productIds already exists as key in wpmDataLayer.products, remove it from the array\n\t\t\tproductIds = productIds.filter(productId => !(productId in wpmDataLayer.products))\n\t\t}\n\n\t\t// if no products IDs are in the object, don't try to get anything from the server\n\t\tif (!productIds || productIds.length === 0) return\n\n\t\ttry {\n\n\t\t\tlet response\n\n\t\t\tif (await wpm.isRestEndpointAvailable()) {\n\t\t\t\tresponse = await fetch(wpm.root + \"pmw/v1/products/\", {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\t},\n\t\t\t\t\tbody : JSON.stringify({\n\t\t\t\t\t\tpage_id : wpmDataLayer.general.page_id,\n\t\t\t\t\t\tpageType : wpmDataLayer.shop.page_type,\n\t\t\t\t\t\tproductIds: productIds,\n\t\t\t\t\t}),\n\t\t\t\t})\n\t\t\t} else {\n\n\t\t\t\t// Get the product details from the backend the data object using fetch API\n\t\t\t\t// and log success or error messages\n\t\t\t\t// and url encoded data\n\t\t\t\tresponse = await fetch(wpm.ajax_url, {\n\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t\tbody : new URLSearchParams({\n\t\t\t\t\t\taction : \"pmw_get_product_ids\",\n\t\t\t\t\t\tpage_id : wpmDataLayer.general.page_id,\n\t\t\t\t\t\tpageType : wpmDataLayer.shop.page_type,\n\t\t\t\t\t\tproductIds: productIds,\n\t\t\t\t\t}),\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (response.ok) {\n\t\t\t\tlet responseData = await response.json()\n\t\t\t\tif (responseData.success) {\n\t\t\t\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, responseData.data)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconsole.error(\"Error getting products from backend\")\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\n\t\treturn true\n\t}\n\n\twpm.saveCartObjectToDataLayer = cartObject => {\n\n\t\twpmDataLayer.cart = cartObject\n\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, cartObject)\n\t}\n\n\twpm.triggerViewItemEventPrep = async productId => {\n\n\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\twpm.triggerViewItemEvent(productId)\n\t\t} else {\n\t\t\tawait wpm.getProductsFromBackend([productId])\n\t\t\twpm.triggerViewItemEvent(productId)\n\t\t}\n\t}\n\n\twpm.triggerViewItemEvent = productId => {\n\n\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t}\n\n\twpm.triggerViewItemEventNoProduct = () => {\n\t\tjQuery(document).trigger(\"wpmViewItem\")\n\t}\n\n\twpm.fireCheckoutOption = (step, checkout_option = null, value = null) => {\n\n\t\tlet data = {\n\t\t\tstep : step,\n\t\t\tcheckout_option: checkout_option,\n\t\t\tvalue : value,\n\t\t}\n\n\t\tjQuery(document).trigger(\"wpmFireCheckoutOption\", data)\n\t}\n\n\twpm.fireCheckoutProgress = step => {\n\n\t\tlet data = {\n\t\t\tstep: step,\n\t\t}\n\n\t\tjQuery(document).trigger(\"wpmFireCheckoutProgress\", data)\n\t}\n\n\twpm.getPostIdFromString = string => {\n\n\t\ttry {\n\t\t\treturn string.match(/(post-)(\\d+)/)[2]\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.triggerViewItemList = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tjQuery(document).trigger(\"wpmViewItemList\", wpm.getProductDataForViewItemEvent(productId))\n\t}\n\n\twpm.getProductDataForViewItemEvent = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\ttry {\n\t\t\tif (wpmDataLayer.products[productId]) {\n\n\t\t\t\treturn wpm.getProductDetailsFormattedForEvent(productId)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getMainProductIdFromProductPage = () => {\n\n\t\ttry {\n\t\t\tif ([\"simple\", \"variable\", \"grouped\", \"composite\", \"bundle\"].indexOf(wpmDataLayer.shop.product_type) >= 0) {\n\t\t\t\treturn jQuery(\".wpmProductId:first\").data(\"id\")\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.viewItemListTriggerTestMode = target => {\n\n\t\tjQuery(target).css({\"position\": \"relative\"})\n\t\tjQuery(target).append(\"
\")\n\t\tjQuery(target).find(\"#viewItemListTriggerOverlay\").css({\n\t\t\t\"z-index\" : \"10\",\n\t\t\t\"display\" : \"block\",\n\t\t\t\"position\" : \"absolute\",\n\t\t\t\"height\" : \"100%\",\n\t\t\t\"top\" : \"0\",\n\t\t\t\"left\" : \"0\",\n\t\t\t\"right\" : \"0\",\n\t\t\t\"opacity\" : wpmDataLayer.shop.view_item_list_trigger.opacity,\n\t\t\t\"background-color\": wpmDataLayer.shop.view_item_list_trigger.background_color,\n\t\t})\n\t}\n\n\twpm.getSearchTermFromUrl = () => {\n\n\t\ttry {\n\t\t\tlet urlParameters = new URLSearchParams(window.location.search)\n\t\t\treturn urlParameters.get(\"s\")\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// we need this to track timeouts for intersection observers\n\tlet ioTimeouts = {}\n\n\twpm.observerCallback = (entries, observer) => {\n\n\t\tentries.forEach((entry) => {\n\n\t\t\ttry {\n\t\t\t\tlet productId\n\n\t\t\t\tlet elementId = jQuery(entry.target).data(\"ioid\")\n\n\t\t\t\t// Get the productId from next element, if wpmProductId is a sibling, like in Gutenberg blocks\n\t\t\t\t// otherwise go search in children, like in regular WC loop items\n\t\t\t\tif (jQuery(entry.target).next(\".wpmProductId\").length) {\n\t\t\t\t\t// console.log('test 1');\n\t\t\t\t\tproductId = jQuery(entry.target).next(\".wpmProductId\").data(\"id\")\n\t\t\t\t} else {\n\t\t\t\t\tproductId = jQuery(entry.target).find(\".wpmProductId\").data(\"id\")\n\t\t\t\t}\n\n\n\t\t\t\tif (!productId) throw Error(\"wpmProductId element not found\")\n\n\t\t\t\tif (entry.isIntersecting) {\n\n\t\t\t\t\tioTimeouts[elementId] = setTimeout(() => {\n\n\t\t\t\t\t\twpm.triggerViewItemList(productId)\n\t\t\t\t\t\tif (wpmDataLayer.shop.view_item_list_trigger.test_mode) wpm.viewItemListTriggerTestMode(entry.target)\n\t\t\t\t\t\tif (wpmDataLayer.shop.view_item_list_trigger.repeat === false) observer.unobserve(entry.target)\n\t\t\t\t\t}, wpmDataLayer.shop.view_item_list_trigger.timeout)\n\n\t\t\t\t} else {\n\n\t\t\t\t\tclearTimeout(ioTimeouts[elementId])\n\t\t\t\t\tif (wpmDataLayer.shop.view_item_list_trigger.test_mode) jQuery(entry.target).find(\"#viewItemListTriggerOverlay\").remove()\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e)\n\t\t\t}\n\t\t})\n\t}\n\n\t// fire view_item_list only on products that have become visible\n\tlet io\n\tlet ioid = 0\n\n\tconst getCommonIdentifiersToWatch = () => {\n\n\t\tlet listOfClassNames = {\n\t\t\tnested: [],\n\t\t\tflat : [],\n\t\t}\n\n\t\ttry {\n\n\t\t\tconst haveSameNestingDepth = (element1, element2) => {\n\n\t\t\t\t// If both are the same, return the parent\n\t\t\t\treturn jQuery(element1).parents().length === jQuery(element2).parents().length\n\t\t\t}\n\n\t\t\tconst findCommonParentElement = (element1, element2) => {\n\t\t\t\t// If both are the same, return the parent\n\t\t\t\tif (jQuery(element1).parent().is(jQuery(element2).parent())) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tnode: jQuery(element1).parent(),\n\t\t\t\t\t\ttype: \"flat\",\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tnode: jQuery(element1).parents().has(jQuery(element2).parents()).first(),\n\t\t\t\t\ttype: \"nested\",\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst countOfChildren = (element) => {\n\t\t\t\t// Return the count of \"wpmProductId\" elements\n\t\t\t\treturn jQuery(element).find(\".wpmProductId\").length\n\t\t\t}\n\n\t\t\tconst getCommonClass = (classes1, classes2) => {\n\n\t\t\t\t// console.log(\"classes1\", classes1);\n\t\t\t\t// console.log(\"classes2\", classes2);\n\t\t\t\t// classes 1 and 2 are arrays of classes\n\t\t\t\t// They may contain the same classes, but not in the same order\n\t\t\t\t// Return the first common class that's present in both arrays\n\n\t\t\t\treturn classes1.filter(value => classes2.includes(value))[0] || null\n\t\t\t}\n\n\t\t\tconst wpmProductIds = document.querySelectorAll(\".wpmProductId\")\n\n\t\t\t// If zero or only one product template is found, then we can't run the algorithm\n\t\t\tif (wpmProductIds.length === 1) {\n\t\t\t\t// console.log(\"No product or too few templates found\")\n\t\t\t\treturn listOfClassNames\n\t\t\t}\n\n\t\t\t// console.log(\"wpmProductIds\", wpmProductIds);\n\t\t\t// console.log(\"looping\")\n\n\t\t\tfor (let i = 0; i < wpmProductIds.length - 1; i++) {\n\n\t\t\t\t// console.log(\"i\", i)\n\n\t\t\t\tif (!haveSameNestingDepth(wpmProductIds[i], wpmProductIds[i + 1])) {\n\t\t\t\t\t// console.log(\"The nesting depth is not the same\")\n\t\t\t\t\ti++\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\tlet productsNode = findCommonParentElement(wpmProductIds[i], wpmProductIds[i + 1])\n\t\t\t\t// console.log(\"productsNode.node\", productsNode.node)\n\t\t\t\t// console.log(\"productsNode.type\", productsNode.type)\n\n\t\t\t\t// If the productsNode is nested, get the first class of the first child. Then console log the class\n\t\t\t\tif (productsNode.type === \"nested\") {\n\n\t\t\t\t\tlet firstChildClasses = productsNode.node.children().first().attr(\"class\").split(\" \")\n\t\t\t\t\tlet secondChildClasses = productsNode.node.children().first().next().attr(\"class\").split(\" \")\n\n\t\t\t\t\tconst commonClass = getCommonClass(firstChildClasses, secondChildClasses)\n\n\t\t\t\t\tlistOfClassNames.nested.push(commonClass)\n\t\t\t\t} else if (productsNode.type === \"flat\") {\n\n\t\t\t\t\t// If class is not found, continue\n\t\t\t\t\tif (!productsNode.node.children().first().attr(\"class\")) continue\n\n\t\t\t\t\t// firstProductTemplateClasses is the classes of the first child element of the productsNode\n\t\t\t\t\tlet firstProductTemplateClasses = productsNode.node.children().first().attr(\"class\").split(\" \")[0]\n\n\t\t\t\t\tlistOfClassNames.flat.push(firstProductTemplateClasses)\n\t\t\t\t}\n\n\t\t\t\t// which wpmProductIds is the last one in the productsNode? console log the index of the last wpmProductId in the productsNode\n\t\t\t\t// console.log(\"productsNode.children().length\", countOfChildren(productsNode));\n\n\t\t\t\ti = i + countOfChildren(productsNode.node) - 1\n\t\t\t}\n\n\t\t\t// Make the list of class names unique\n\t\t\tlistOfClassNames.nested = [...new Set(listOfClassNames.nested)]\n\t\t\tlistOfClassNames.flat = [...new Set(listOfClassNames.flat)]\n\n\t\t\treturn listOfClassNames\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\treturn listOfClassNames\n\t\t}\n\t}\n\n\n\tlet detectedProductTemplateClasses = {\n\t\tnested: [],\n\t\tflat : [],\n\t}\n\n\tconst isNestedClass = (elem) => {\n\t\tlet nestedClassNames = [\n\t\t\t\"product\",\n\t\t\t\"type-product\",\n\t\t\t\"product-item-inner\",\n\t\t\t...detectedProductTemplateClasses.nested,\n\t\t]\n\n\t\treturn nestedClassNames.some(className => jQuery(elem).closest(\".\" + className).length)\n\t}\n\n\tconst isFlatClass = (elem) => {\n\n\t\tlet flatClassNames = [\n\t\t\t\"wc-block-grid__product\",\n\t\t\t\"product\",\n\t\t\t\"product-small\",\n\t\t\t\"woocommerce-LoopProduct-link\",\n\t\t\t...detectedProductTemplateClasses.flat,\n\t\t]\n\n\t\treturn flatClassNames.some(className => jQuery(elem).prev().hasClass(className))\n\t}\n\n\tconst getAllElementsToWatch = () => {\n\n\t\tdetectedProductTemplateClasses = getCommonIdentifiersToWatch()\n\n\t\treturn jQuery(\".wpmProductId\")\n\t\t\t.map(function (i, elem) {\n\n\t\t\t\tif (isNestedClass(elem)) {\n\t\t\t\t\treturn jQuery(elem).parent()\n\t\t\t\t} else if (isFlatClass(elem)) {\n\t\t\t\t\treturn jQuery(this).prev()\n\t\t\t\t} else if (jQuery(elem).closest(\".product\").length) {\n\t\t\t\t\treturn jQuery(elem).closest(\".product\")\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\twpm.startIntersectionObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// enable view_item_list test mode from browser\n\t\t\tif (wpm.urlHasParameter(\"vildemomode\")) wpmDataLayer.shop.view_item_list_trigger.test_mode = true\n\n\t\t\t// set up intersection observer\n\t\t\t// https://stackoverflow.com/questions/62084306/intersectionobserver-not-working-in-safari-or-ios\n\t\t\tio = new IntersectionObserver(wpm.observerCallback, {\n\t\t\t\troot: null,\n\t\t\t\t// root : document.body,\n\t\t\t\tthreshold: wpmDataLayer.shop.view_item_list_trigger.threshold,\n\t\t\t})\n\n\t\t\tgetAllElementsToWatch().each((i, elem) => {\n\n\t\t\t\tjQuery(elem[0]).data(\"ioid\", ioid++)\n\n\t\t\t\tio.observe(elem[0])\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// Watch DOM for new lazy loaded products and add them to the intersection observer\n\twpm.startProductsMutationObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// Pass in the target node, as well as the observer options\n\n\t\t\t// selects the most common parent node\n\t\t\t// https://stackoverflow.com/a/7648323/4688612\n\t\t\tlet productsNode = jQuery(\".wpmProductId:eq(0)\").parents().has(jQuery(\".wpmProductId:eq(1)\").parents()).first()\n\n\t\t\tif (productsNode.length) {\n\t\t\t\tproductsMutationObserver.observe(productsNode[0], {\n\t\t\t\t\tattributes : true,\n\t\t\t\t\tchildList : true,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t})\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// Create an observer instance\n\tconst productsMutationObserver = new MutationObserver(mutations => {\n\n\t\tmutations.forEach(mutation => {\n\t\t\tlet newNodes = mutation.addedNodes // DOM NodeList\n\t\t\tif (newNodes !== null) { // If there are new nodes added\n\t\t\t\tlet nodes = jQuery(newNodes) // jQuery set\n\t\t\t\tnodes.each((i, node) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\t// jQuery(this).hasClass(\"type-product\") ||\n\t\t\t\t\t\t// jQuery(this).hasClass(\"product-small\") ||\n\t\t\t\t\t\t// jQuery(this).hasClass(\"wc-block-grid__product\")\n\t\t\t\t\t\t// jQuery(this).hasClass(\"type-product\")\n\t\t\t\t\t\tisNestedClass(node) || isFlatClass(node)\n\t\t\t\t\t) {\n\t\t\t\t\t\t// check if the node has a child or sibling wpmProductId\n\t\t\t\t\t\t// if yes add it to the intersectionObserver\n\t\t\t\t\t\tif (hasWpmProductIdElement(node)) {\n\t\t\t\t\t\t\tjQuery(node).data(\"ioid\", ioid++)\n\t\t\t\t\t\t\tio.observe(node)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\t})\n\n\tlet hasWpmProductIdElement = elem =>\n\t\t!!(jQuery(elem).find(\".wpmProductId\").length ||\n\t\t\tjQuery(elem).siblings(\".wpmProductId\").length)\n\n\t/**\n\t * Sets a new cookie or updates an existing one with the provided name and value.\n\t *\n\t * @function setCookie\n\t * @global\n\t * @param {string} cookieName - The name of the cookie.\n\t * @param {string} [cookieValue=\"\"] - The value to set for the cookie. Default value is an empty string.\n\t * @param {number} [expiryDays=null] - The number of days until the cookie expires. If not provided, the cookie will last until the end of the session.\n\t * @returns {void}\n\t *\n\t * @example\n\t * // This will create a cookie \"username\" with the value \"JohnDoe\" that expires in 7 days\n\t * wpm.setCookie(\"username\", \"JohnDoe\", 7);\n\t */\n\twpm.setCookie = (cookieName, cookieValue = \"\", expiryDays = null) => {\n\n\t\tif (expiryDays) {\n\n\t\t\tlet d = new Date()\n\t\t\td.setTime(d.getTime() + (expiryDays * 24 * 60 * 60 * 1000))\n\t\t\tlet expires = \"expires=\" + d.toUTCString()\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";\" + expires + \";path=/\"\n\t\t} else {\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";path=/\"\n\t\t}\n\t}\n\n\t/**\n\t * Retrieves the value of a specific cookie from the document's cookie string.\n\t *\n\t * @param {String} cookieName - The name of the cookie to retrieve.\n\t * @returns {String} - The value of the cookie if found, an empty string otherwise.\n\t *\n\t * @example\n\t * // returns 'value' if 'cookieName=value' exists in document.cookie\n\t * wpm.getCookie('cookieName')\n\t */\n\twpm.getCookie = cookieName => {\n\n\t\tlet name = cookieName + \"=\"\n\t\tlet decodedCookie = decodeURIComponent(document.cookie)\n\t\tlet ca = decodedCookie.split(\";\")\n\n\t\tfor (let i = 0; i < ca.length; i++) {\n\n\t\t\tlet c = ca[i]\n\n\t\t\twhile (c.charAt(0) == \" \") {\n\t\t\t\tc = c.substring(1)\n\t\t\t}\n\n\t\t\tif (c.indexOf(name) == 0) {\n\t\t\t\treturn c.substring(name.length, c.length)\n\t\t\t}\n\t\t}\n\n\t\treturn \"\"\n\t}\n\n\t/**\n\t * Find and get the cookie with a name that contains the string.\n\t * If one is found, then return the cookie.\n\t * If none is found, then return false.\n\t *\n\t * @param string\n\t * @returns {boolean|string}\n\t *\n\t * @since 1.32.5\n\t */\n\twpm.getCookieThatContainsRegex = (regex) => {\n\n\t\tlet cookies = document.cookie.split(\";\")\n\n\t\tfor (let i = 0; i < cookies.length; i++) {\n\t\t\tlet cookie = cookies[i].trim()\n\n\t\t\tif (regex.test(cookie)) {\n\t\t\t\treturn cookie\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t}\n\n\twpm.deleteCookie = cookieName => {\n\t\twpm.setCookie(cookieName, \"\", -1)\n\t}\n\n\t/**\n\t * Store data in the browser\n\t *\n\t * Try to store the data in the local storage (session or persistent) if available.\n\t * If not available, store the data in the cookie.\n\t *\n\t * Max cookie expiry is 400 days as specified by Google Chrome: https://developer.chrome.com/blog/cookie-max-age-expires/\n\t *\n\t * @param key\n\t * @param value\n\t * @param persistent\n\t * @param extension\n\t */\n\twpm.storeData = (key, value, persistent = false, extension = false) => {\n\n\t\tconst suffix = extension ? key : \"\"\n\n\t\tlet dataGetter = persistent ? wpm.getPersistentData : wpm.getSessionData\n\t\tlet dataSetter = persistent ? wpm.setPersistentData : wpm.setSessionData\n\n\t\tlet data = dataGetter(suffix)\n\t\textension ? data = value : data[key] = value\n\n\t\tdataSetter(data, suffix)\n\t}\n\n\twpm.retrieveData = (key, persistent = false, extension = false) => {\n\n\t\tconst suffix = extension ? key : \"\"\n\n\t\tlet data = persistent ? wpm.getPersistentData(suffix) : wpm.getSessionData(suffix)\n\n\t\treturn extension ? data : data[key]\n\t}\n\n\twpm.storeCartData = data => {\n\t\twpm.storeData(\"cart\", data, false, true)\n\t}\n\n\twpm.retrieveCartData = () => {\n\t\treturn wpm.retrieveData(\"cart\", false, true)\n\t}\n\n\twpm.getSessionDataKey = (suffix = \"\") => {\n\t\tconst defaultStorageKey = \"_pmw_session_data\"\n\n\t\tif (suffix) {\n\t\t\treturn defaultStorageKey + \"_\" + suffix\n\t\t}\n\n\t\treturn defaultStorageKey\n\t}\n\n\twpm.getPersistentDataKey = (storageKeySuffix) => {\n\n\t\tconst defaultStorageKey = \"_pmw_persistent_data\"\n\n\t\tif (storageKeySuffix) {\n\t\t\treturn defaultStorageKey + \"_\" + storageKeySuffix\n\t\t}\n\n\t\treturn defaultStorageKey\n\t}\n\n\twpm.getSessionData = (suffix = \"\") => {\n\n\t\tif (window.sessionStorage) {\n\n\t\t\tlet data = window.sessionStorage.getItem(wpm.getSessionDataKey(suffix))\n\n\t\t\treturn data !== null ? JSON.parse(data) : {}\n\t\t} else {\n\t\t\t// fallback to cookie\n\t\t\tlet data = wpm.getCookie(wpm.getSessionDataKey(suffix))\n\n\t\t\treturn data !== \"\" ? JSON.parse(data) : {}\n\t\t}\n\t}\n\n\twpm.setSessionData = (data, storageKeySuffix = \"\") => {\n\t\tif (window.sessionStorage) {\n\t\t\twindow.sessionStorage.setItem(wpm.getSessionDataKey(storageKeySuffix), JSON.stringify(data))\n\t\t} else {\n\t\t\t// fallback to cookie\n\t\t\twpm.setCookie(wpm.getSessionDataKey(storageKeySuffix), JSON.stringify(data))\n\t\t}\n\t}\n\n\twpm.getPersistentData = (storageKeySuffix) => {\n\n\t\tif (window.localStorage) {\n\n\t\t\tlet data = window.localStorage.getItem(wpm.getPersistentDataKey(storageKeySuffix))\n\n\t\t\treturn data !== null ? JSON.parse(data) : {}\n\t\t} else {\n\t\t\t// fallback to cookie\n\t\t\tlet data = wpm.getCookie(wpm.getPersistentDataKey(storageKeySuffix))\n\n\t\t\treturn data !== \"\" ? JSON.parse(data) : {}\n\n\t\t}\n\t}\n\n\twpm.setPersistentData = (data, storageKeySuffix = \"\") => {\n\n\t\tif (window.localStorage) {\n\t\t\twindow.localStorage.setItem(wpm.getPersistentDataKey(storageKeySuffix), JSON.stringify(data))\n\t\t} else {\n\t\t\t// fallback to cookie\n\t\t\twpm.setCookie(wpm.getPersistentDataKey(storageKeySuffix), JSON.stringify(data), 400)\n\t\t}\n\t}\n\n\twpm.storeOrderIdOnServer = async (orderDetails) => {\n\n\t\ttry {\n\n\t\t\tlet response\n\n\t\t\tif (await wpm.isRestEndpointAvailable()) {\n\n\t\t\t\tresponse = await fetch(wpm.root + \"pmw/v1/pixels-fired/\", {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\theaders : {\n\t\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\t\t// \"X-WP-Nonce\" : wpm.nonce_wp_rest,\n\t\t\t\t\t},\n\t\t\t\t\tbody : JSON.stringify({\n\t\t\t\t\t\torder_id : orderDetails.orderId,\n\t\t\t\t\t\torder_key: orderDetails.orderKey,\n\t\t\t\t\t\tsource : orderDetails.source,\n\t\t\t\t\t\t// nonce : wpm.pmw_nonce,\n\t\t\t\t\t}),\n\t\t\t\t\tkeepalive: true,\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t})\n\n\t\t\t} else {\n\n\t\t\t\twpm.consoleLog(\"REST API not available, falling back to AJAX\")\n\n\t\t\t\t// save the state in the database\n\n\t\t\t\t// Send the data object with ajax request\n\t\t\t\t// and log success or error using fetch API and url encoded\n\t\t\t\tresponse = await fetch(wpm.ajax_url, {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\tbody : new URLSearchParams({\n\t\t\t\t\t\taction : \"pmw_purchase_pixels_fired\",\n\t\t\t\t\t\torder_id : orderDetails.orderId,\n\t\t\t\t\t\torder_key: orderDetails.orderKey,\n\t\t\t\t\t\tsource : orderDetails.source,\n\t\t\t\t\t\t// nonce_ajax: wpm.nonce_ajax,\n\t\t\t\t\t}),\n\t\t\t\t\tkeepalive: true,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tconst responseJson = await response.json()\n\n\t\t\tif (responseJson.success) {\n\t\t\t\twpm.consoleLog(\"\", responseJson.data)\n\t\t\t} else {\n\t\t\t\twpm.consoleError(\"\", responseJson.data)\n\t\t\t}\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getProductIdByCartItemElement = element => {\n\n\t\tconst href = jQuery(element).find(\".product-remove\").find(\"a\").attr(\"href\")\n\t\tif (href) return wpm.getProductIdByCartItemKeyUrl(new URL(href))\n\n\t\tconst productId = jQuery(element).find(\"[data-product_id]\").first().attr(\"data-product_id\")\n\t\treturn productId ? productId : null\n\t}\n\n\twpm.getProductQuantityByCartItemElement = element => {\n\n\t\treturn jQuery(element).find(\".qty\").val() || null\n\t}\n\n\twpm.getProductIdByCartItemKeyUrl = url => {\n\n\t\tlet searchParams = new URLSearchParams(url.search)\n\t\tlet cartItemKey = searchParams.get(\"remove_item\")\n\n\t\tlet productId\n\n\t\tif (wpmDataLayer.cart_item_keys[cartItemKey][\"variation_id\"] === 0) {\n\t\t\tproductId = wpmDataLayer.cart_item_keys[cartItemKey][\"product_id\"]\n\t\t} else {\n\t\t\tproductId = wpmDataLayer.cart_item_keys[cartItemKey][\"variation_id\"]\n\t\t}\n\n\t\treturn productId\n\t}\n\n\twpm.getAddToCartLinkProductIds = () =>\n\t\tjQuery(\"a\").map(function () {\n\t\t\tlet href = jQuery(this).attr(\"href\")\n\n\t\t\tif (href && href.includes(\"?add-to-cart=\")) {\n\t\t\t\tlet matches = href.match(/(add-to-cart=)(\\d+)/)\n\t\t\t\tif (matches) return matches[2]\n\t\t\t}\n\t\t}).get()\n\n\twpm.getProductDetailsFormattedForEvent = (productId, quantity = 1) => {\n\n\t\tlet product = {\n\t\t\tid : productId.toString(),\n\t\t\tdyn_r_ids : wpmDataLayer.products[productId].dyn_r_ids,\n\t\t\tname : wpmDataLayer.products[productId].name,\n\t\t\tlist_name : wpmDataLayer.shop.list_name,\n\t\t\tbrand : wpmDataLayer.products[productId].brand,\n\t\t\tcategory : wpmDataLayer.products[productId].category,\n\t\t\tvariant : wpmDataLayer.products[productId].variant,\n\t\t\tlist_position: wpmDataLayer.products[productId].position,\n\t\t\tquantity : quantity,\n\t\t\tprice : wpmDataLayer.products[productId].price,\n\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\tis_variable : wpmDataLayer.products[productId].is_variable,\n\t\t\tis_variation : wpmDataLayer.products[productId].is_variation,\n\t\t\tparent_id : wpmDataLayer.products[productId].parent_id,\n\t\t}\n\n\t\tif (product.is_variation) product[\"parent_id_dyn_r_ids\"] = wpmDataLayer.products[productId].parent_id_dyn_r_ids\n\n\t\treturn product\n\t}\n\n\twpm.getClidFromBrowser = (clidId = \"gclid\") => {\n\n\t\tlet clidCookieId\n\n\t\tclidCookieId = {\n\t\t\tgclid: \"_gcl_aw\",\n\t\t\tdclid: \"_gcl_dc\",\n\t\t}\n\n\t\tif (wpm.getCookie(clidCookieId[clidId])) {\n\n\t\t\tlet clidCookie = wpm.getCookie(clidCookieId[clidId])\n\t\t\tlet matches = clidCookie.match(/(GCL.[\\d]*.)(.*)/)\n\t\t\treturn matches[2]\n\t\t} else {\n\t\t\treturn \"\"\n\t\t}\n\t}\n\n\twpm.getUserAgent = () => navigator.userAgent\n\n\twpm.getViewPort = () => ({\n\t\twidth : Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0),\n\t\theight: Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0),\n\t})\n\n\n\twpm.consoleLogVersion = () => {\n\t\tconsole.log(wpmDataLayer.version)\n\t}\n\n\t/**\n\t * https://api.jquery.com/jquery.getscript/\n\t *\n\t * Switched back to jQuery.ajax as the fetch method on some sites returned a type error\n\t * Possible reasons are:\n\t * * CORS mismatch\n\t * * The user is using an ad blocker\n\t *\n\t * This code is .thenable\n\t */\n\n\twpm.loadScriptAndCacheIt = url => {\n\n\t\t// Get and load the script using fetch API, if possible from cache, and return it without using eval\n\t\t// return fetch(url, {\n\t\t// \tmethod : \"GET\",\n\t\t// \tcache : \"default\",\n\t\t// \tkeepalive: true,\n\t\t// })\n\t\t// \t.then(response => {\n\t\t// \t\tif (response.ok) {\n\t\t// \t\t\t// console.log(\"response\", response)\n\t\t// \t\t\treturn response.text()\n\t\t// \t\t\t// console.log(\"wpm.loadScriptAndCacheIt success: \" + url)\n\t\t// \t\t} else {\n\t\t// \t\t\tthrow new Error(\"Network response was not ok: \" + url)\n\t\t// \t\t}\n\t\t// \t})\n\t\t// \t.then(script => {\n\t\t// \t\t// Execute the script\n\t\t// \t\t// console.error(\"executing script: \" + script)\n\t\t// \t\teval(script)\n\t\t// \t\t// console.log(\"executed script: \" + script)\n\t\t// \t})\n\t\t// \t.catch(e => {\n\t\t// \t\tconsole.error(e)\n\t\t// \t})\n\n\t\tlet options = {\n\t\t\tdataType: \"script\",\n\t\t\tcache : true,\n\t\t\turl : url,\n\t\t}\n\n\t\treturn jQuery.ajax(options)\n\t}\n\n\twpm.getOrderItemPrice = orderItem => (orderItem.total + orderItem.total_tax) / orderItem.quantity\n\n\twpm.hasLoginEventFired = () => {\n\t\tlet data = wpm.getSessionData()\n\t\treturn data?.loginEventFired\n\t}\n\n\twpm.setLoginEventFired = () => {\n\t\tlet data = wpm.getSessionData()\n\t\tdata[\"loginEventFired\"] = true\n\t\twpm.setSessionData(data)\n\t}\n\n\twpm.pageLoaded = async () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\t\t\tif (\"complete\" === document.readyState) return resolve()\n\t\t\tsetTimeout(waitForVar, 50)\n\t\t})()\n\t})\n\n\twpm.pageReady = () => {\n\t\treturn new Promise(resolve => {\n\t\t\t(function waitForVar() {\n\t\t\t\tif (\"interactive\" === document.readyState || \"complete\" === document.readyState) return resolve()\n\t\t\t\tsetTimeout(waitForVar, 50)\n\t\t\t})()\n\t\t})\n\t}\n\n\twpm.isMiniCartActive = () => {\n\t\tif (window.sessionStorage) {\n\t\t\tObject.keys(window.sessionStorage).forEach(key => {\n\t\t\t\tif (key.includes(\"wc_fragments\")) {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\n\t\treturn false\n\t}\n\n\twpm.doesWooCommerceCartExist = () => document.cookie.includes(\"woocommerce_items_in_cart\")\n\n\twpm.urlHasParameter = parameter => {\n\t\tlet urlParams = new URLSearchParams(window.location.search)\n\t\treturn urlParams.has(parameter)\n\t}\n\n\twpm.getUrlParameter = parameter => {\n\t\tlet urlParams = new URLSearchParams(window.location.search)\n\t\treturn urlParams.get(parameter)\n\t}\n\n\t// https://stackoverflow.com/a/60606893/4688612\n\twpm.hashAsync = (algo, str) => {\n\t\treturn crypto.subtle.digest(algo, new TextEncoder(\"utf-8\").encode(str)).then(buf => {\n\t\t\treturn Array.prototype.map.call(new Uint8Array(buf), x => ((\"00\" + x.toString(16)).slice(-2))).join(\"\")\n\t\t})\n\t}\n\n\twpm.getCartValue = () => {\n\n\t\tlet value = 0\n\n\t\tif (wpmDataLayer?.cart) {\n\n\t\t\tfor (const key in wpmDataLayer.cart) {\n\t\t\t\t// content_ids.push(wpmDataLayer.products[key].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])\n\n\t\t\t\tlet product = wpmDataLayer.cart[key]\n\n\t\t\t\tvalue += product.quantity * product.price\n\t\t\t}\n\t\t}\n\n\t\treturn value\n\t}\n\n\t/**\n\t * Detect if the current URL contains at least one pattern\n\t *\n\t * @param patterns\n\t * @returns {boolean}\n\t */\n\twpm.doesUrlContainPatterns = patterns => {\n\n\t\tfor (const pattern of patterns) {\n\t\t\tif (new RegExp(pattern).test(window.location.href)) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t}\n\n\t/**\n\t * Detect if the current URL contains at least one pattern that is on the tracking exclusion list\n\t *\n\t * https://www.linkedin.com/pulse/how-remove-google-robot-problem-via-gtm-facebook-pixel-hjelpdahl/\n\t * https://www.youtube.com/watch?v=b4I1ePZt8Z0\n\t *\n\t * @returns {boolean}\n\t */\n\twpm.excludeDomainFromTracking = () => {\n\n\t\tlet exclude_domains = [\n\t\t\t\"appspot.com\",\n\t\t\t\"translate.google.com\",\n\t\t]\n\n\t\tif (wpmDataLayer?.general?.exclude_domains) {\n\t\t\texclude_domains = [...exclude_domains, ...wpmDataLayer.general.exclude_domains]\n\t\t}\n\n\t\t// Abort if URL contains excluded domains\n\t\tif (exclude_domains.some(domain => window.location.href.includes(domain))) {\n\t\t\tconsole.debug(\"Pixel Manager: Aborted due to excluded domain\")\n\t\t\treturn true\n\t\t}\n\n\t\treturn false\n\t}\n\n\twpm.getRandomEventId = () => (Math.random() + 1).toString(36).substring(2)\n\n\twpm.pmwConsoleMessage = () => {\n\t\tlet message = \"Pixel Manager for WooCommerce: \"\n\t\tmessage += wpmDataLayer.version.pro ? \"pro\" : \"free\"\n\t\tmessage += \" | distro: \" + wpmDataLayer.version.distro\n\t\tif (wpmDataLayer.version.distro === \"fms\" && wpmDataLayer.version.pro) {\n\t\t\tmessage += \" | active license: \" + (wpmDataLayer.version.eligible_for_updates ? \"yes\" : \"no\")\n\t\t}\n\t\tmessage += \" | version: \" + wpmDataLayer.version.number\n\n\t\tconsole.log(message)\n\t}\n\n\twpm.canLoadPremiumFeatures = () => {\n\t\treturn (wpmDataLayer.version.distro === \"fms\" && wpmDataLayer.version.pro && wpmDataLayer.version.eligible_for_updates) || wpmDataLayer.version.distro === \"wcm\"\n\t}\n\n\tlet jQueryReadyFired = false\n\n\twpm.triggerDomReadyEvent = () => {\n\t\tif (jQueryReadyFired === false) {\n\t\t\tdocument.dispatchEvent(new Event(\"pmw:ready\"))\n\t\t}\n\t\tjQueryReadyFired = true\n\t}\n\n\t/**\n\t * jQuery ready event\n\t */\n\tjQuery(() => {\n\t\twpm.triggerDomReadyEvent()\n\t})\n\n\tdocument.addEventListener(\"DOMContentLoaded\", () => {\n\t\twpm.triggerDomReadyEvent()\n\t})\n\n\twpm.getEmailFromTarget = target => {\n\n\t\t// Only try to add the clicked email if href is set\n\t\tif (target.href) {\n\n\t\t\t// Get the email from the link\n\t\t\t// But only if there is a valid email address in the link\n\t\t\t// Also, the href may contain other parameters, so we need to check for that and remove them\n\t\t\tlet email = target.href.replace(\"mailto:\", \"\")\n\n\n\t\t\tif (email.indexOf(\"?\") > -1) {\n\t\t\t\temail = email.split(\"?\")[0]\n\t\t\t}\n\n\t\t\t// Trim the email and remove all whitespaces\n\t\t\temail = email.replace(/\\s/g, \"\")\n\n\t\t\t// If the email is not empty and valid, add it to the data object\n\t\t\tif (email && wpm.isEmail(email)) {\n\t\t\t\treturn email\n\t\t\t}\n\t\t}\n\n\t\treturn \"\"\n\t}\n\n\twpm.sendEventPayloadToServer = payload => {\n\t\tif (typeof wpm.sendEventPayloadToServerPremium === \"function\") {\n\t\t\twpm.sendEventPayloadToServerPremium(payload)\n\t\t}\n\t}\n\n\tconst urlLoggerOn = () => {\n\n\t\tif (wpm.urlHasParameter(\"pmwloggeron\")) {\n\t\t\twpm.storeData(\"loggerEnabled\", true)\n\t\t}\n\n\t\treturn wpm.urlHasParameter(\"pmwloggeron\")\n\t}\n\n\tconst urlLoggerOff = () => {\n\n\t\tif (wpm.urlHasParameter(\"pmwloggeroff\")) {\n\t\t\twpm.storeData(\"loggerEnabled\", false)\n\t\t}\n\n\t\treturn wpm.urlHasParameter(\"pmwloggeroff\")\n\t}\n\n\tconst sessionLoggerEnabled = () => {\n\t\treturn wpm.retrieveData(\"loggerEnabled\")\n\t}\n\n\tconst isLoggerEnabled = () => {\n\n\t\tif (urlLoggerOff()) return false\n\n\t\tif (sessionLoggerEnabled()) return true\n\n\t\tif (urlLoggerOn()) return true\n\n\t\treturn !!wpmDataLayer?.general?.logger?.is_active\n\t}\n\n\t// create a wpm.log function that takes in a message and one or more objects and passes it to console.log\n\twpm.consoleLog = (message, ...objects) => {\n\n\t\tif (!isLoggerEnabled()) return\n\n\t\tif (objects.length) {\n\t\t\tconsole.log(\"Pixel Manager: \" + message, ...objects)\n\t\t} else {\n\t\t\tconsole.log(\"Pixel Manager: \" + message)\n\t\t}\n\t}\n\n\twpm.consoleError = (message, ...objects) => {\n\n\t\t// if (!isLoggerEnabled()) return\n\n\t\tif (objects.length) {\n\t\t\tconsole.error(\"Pixel Manager: \" + message, ...objects)\n\t\t} else {\n\t\t\tconsole.error(\"Pixel Manager: \" + message)\n\t\t}\n\t}\n\n\t/**\n\t * Triggers the queued events for a pixel.\n\t * This function is responsible for executing the events that have been\n\t * queued up for a specific pixel.\n\t *\n\t * @param {string} pixel - The pixel function name.\n\t * @returns {void}\n\t */\n\twpm.triggerQueuedEvents = (pixel) => {\n\t\tif (window.pmw_event_queue && window.pmw_event_queue[pixel]) {\n\t\t\twindow.pmw_event_queue[pixel].forEach(func => {\n\t\t\t\tfunc()\n\t\t\t})\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load all WPM functions\n *\n * Ignore event listeners. They need to be loaded after\n * we made sure that jQuery has been loaded.\n */\n\nrequire(\"./functions\")\nrequire(\"./cookie_consent\")\nrequire(\"./ip_check\")\n\n// #if process.env.TIER === 'premium'\n// if (wpm.canLoadPremiumFeatures()) {\n// \trequire(\"./functions_premium\")\n// }\n// #endif\n","(function (wpm, $, undefined) {\n\n\twpm.jQueryExists = async () => new Promise(resolve => {\n\n\t\t(function waitForjQuery() {\n\t\t\tif (typeof jQuery !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForjQuery, 100)\n\t\t})()\n\t})\n\n\twpm.waitForLibrary = (library, timeout = 5000, interval = 100) => {\n\n\t\tconst startTime = Date.now()\n\t\twhile (typeof window[library] === \"undefined\") {\n\t\t\t// Check if timeout in milliseconds has passed\n\t\t\tif (Date.now() - startTime > timeout) {\n\t\t\t\tbreak // Maximum wait time reached, exit the loop\n\t\t\t}\n\t\t\t// Wait for the interval in milliseconds before checking again\n\t\t\tsetTimeout(() => {\n\t\t\t}, interval)\n\t\t}\n\t}\n\n\twpm.wpmDataLayerFullyLoaded = async () => {\n\n\t\t// Promise that checks if the nested object wpmDataLayer.version is defined.\n\t\t// If so, resolve.\n\t\t// We must check for the nested object wpmDataLayer.version,\n\t\t// because the wpmDataLayer object can be defined early by adding products to the data layer through\n\t\t// template inline scripts. So we need to wait until the wpmDataLayer configuration objects\n\t\t// are defined.\n\t\tlet checkVar = new Promise((resolve) => {\n\t\t\t(function waitForVar() {\n\t\t\t\tif (\n\t\t\t\t\ttypeof wpmDataLayer !== \"undefined\"\n\t\t\t\t\t&& typeof wpmDataLayer.version !== \"undefined\"\n\t\t\t\t) {\n\t\t\t\t\treturn resolve()\n\t\t\t\t}\n\t\t\t\tsetTimeout(waitForVar, 100)\n\t\t\t})()\n\t\t})\n\n\t\t// Set a timeout to log a message after 6 seconds\n\t\tlet logTimeoutId = setTimeout(() => {\n\t\t\tconsole.error(\"Pixel Manager error: The wpmDataLayer is not defined. Please make sure that the wpmDataLayer script snippet is inserted and not modified by any third-party plugin, such as a consent management platform or a JavaScript optimizer.\")\n\n\t\t}, 6000)\n\n\t\tcheckVar.then(() => {\n\t\t\tclearTimeout(logTimeoutId)\n\t\t})\n\n\t\treturn checkVar\n\t}\n\n\twpm.wpHooksExists = async () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\n\t\t\t// Resolve if wp.hooks is defined\n\t\t\tif (typeof wp !== \"undefined\" && typeof wp.hooks !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForVar, 50)\n\t\t})()\n\t})\n\n\t/**\n\t * Load all WooCommerce hooks functions\n\t *\n\t * Includes safeguard in case the user changed the default load order for wp-hooks, or removed it completely.\n\t *\n\t * @returns {Promise}\n\t */\n\twpm.loadWcHooksFunctions = async () => {\n\t\t// Load all WooCommerce Blocks hooks\n\t\tawait wpm.wpHooksExists()\n\t\trequire(\"./wc_hooks\")\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * IP functions\n */\n\n(function (wpm, $, undefined) {\n\n\tconst {isRange, isIP, isV4, isV6, version: getIpVersion} = require(\"range_check\")\n\n\tconst ipServices = {\n\t\t\"cloudflare\": {\n\t\t\t\"any\": \"https://www.cloudflare.com/cdn-cgi/trace\",\n\t\t},\n\t\t// icanhazip seems to regularly be added to malware databases, despite being a legitimate service run by Cloudflare\n\t\t// https://blog.apnic.net/2021/06/17/how-a-small-free-ip-tool-survived/\n\t\t// https://major.io/p/a-new-future-for-icanhazip/\n\t\t// https://major.io/p/extra-icanhaz-services-going-offline/\n\t\t\"icanhazip\" : {\n\t\t\t\"4\" : \"https://ipv4.icanhazip.com\",\n\t\t\t\"6\" : \"https://ipv6.icanhazip.com\",\n\t\t\t\"any\": \"https://icanhazip.com\",\n\t\t},\n\t\t\"ipinfo\" : {\n\t\t\t\"any\": \"https://ipinfo.io/ip\",\n\t\t},\n\t\t\"myexternalip\": {\n\t\t\t\"any\": \"https://myexternalip.com/raw\",\n\t\t\t// \"6\": \"https://api-ipv6.myexternalip.com/raw\", // This can return an IPv4 address, so we can't use it\n\t\t},\n\t\t\"ipify\" : {\n\t\t\t\"4\" : \"https://api4.ipify.org\",\n\t\t\t\"6\" : \"https://api6.ipify.org\",\n\t\t\t\"any\": \"https://api64.ipify.org\", // If IPv6 is available, AND the client is configured to prefer IPv6, this will return an IPv6 address\n\t\t},\n\t\t// Can't use amazon because its CORS policy blocks requests from the browser\n\t\t// \"amazon\" : {\n\t\t// \t\"any\": \"https://checkip.amazonaws.com/\",\n\t\t// },\n\t\t// Can't use ip.sb because its CORS policy blocks requests from the browser\n\t\t// \"ip.sb\" : {\n\t\t// \t\"any\": \"https://api.ip.sb/ip\",\n\t\t// },\n\t\t// Can't use seeip because its CORS policy blocks requests from the browser\n\t\t// \"seeip\" : {\n\t\t// \t\"any\": \"https://api.seeip.org\",\n\t\t// \t\"4\": \"https://ipv4.seeip.org\",\n\t\t// \t\"6\": \"https://ipv6.seeip.org\",\n\t\t// },\n\t}\n\n\twpm.isIpAllowed = async () => {\n\n\t\t// Check the cache if the IP is allowed\n\t\tif (wpm.retrieveData(\"ipAllowed\")) {\n\t\t\treturn !!JSON.parse(wpm.retrieveData(\"ipAllowed\"))\n\t\t}\n\n\t\tconst ip = await wpm.getIp()\n\n\t\t// If the IP is blacklisted, return false and store the result in the cache\n\t\tif (isOnBlacklist(ip)) {\n\t\t\twpm.storeData(\"ipAllowed\", false)\n\t\t\treturn false\n\t\t}\n\n\t\t// If the IP is not blacklisted, return true and store the result in the cache\n\t\twpm.storeData(\"ipAllowed\", true)\n\t\treturn true\n\t}\n\n\twpm.getIp = async (ipVersion = \"any\", maxServicesToCheck = 3) => {\n\n\t\tconst validVersions = [\"any\", \"4\", \"6\"]\n\n\t\t// return null if the version is not valid and console log an error\n\t\tif (!validVersions.includes(ipVersion)) {\n\t\t\tconsole.error(\"The version argument must be one of the following: \" + validVersions.join(\", \"))\n\t\t\treturn null\n\t\t}\n\n\t\tif (ipVersion === \"any\" && wpm.retrieveData(\"ip\")) {\n\t\t\treturn wpm.retrieveData(\"ip\")\n\t\t}\n\n\t\t// Get the ipv data from the cache\n\t\tconst ipv = wpm.retrieveData(`ipv${ipVersion}`)\n\n\t\t// Return it if it is not undefined\n\t\t// The value can be an IP\n\t\t// or null if we ran the test but no IP could be retrieved\n\t\t// It is undefined if the ipVersion was not tested yet\n\t\tif (ipv !== undefined) return ipv\n\n\t\twpm.consoleLog(\"Testing the IP address of the browser because one ore more server-to-server APIs are enabled and require the browser IP. It may trigger connection request errors in the console while testing the IP address. This is normal and expected behavior.\")\n\n\t\ttry {// Check the cache if the IP is already stored\n\n\t\t\tconst ip = await wpm.getIpFromAnyService(ipVersion, maxServicesToCheck)\n\n\t\t\t// if (!isIP(ip)) throw new Error(\"The returned value is not an IP address\")\n\n\t\t\t// Store the IP in the cache\n\t\t\tif (ipVersion === \"any\") {\n\t\t\t\twpm.storeData(\"ip\", ip)\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\tgetIpVersion(ip) === 4\n\t\t\t\t|| (ipVersion === \"4\" && ip === null)\n\t\t\t) {\n\t\t\t\twpm.storeData(\"ipv4\", ip)\n\t\t\t}\n\n\t\t\tif (getIpVersion(ip) === 6\n\t\t\t\t|| (ipVersion === \"6\" && ip === null)\n\t\t\t) {\n\t\t\t\twpm.storeData(\"ipv6\", ip)\n\t\t\t}\n\n\t\t\treturn ip\n\t\t} catch (error) {\n\t\t\t// console.error(error)\n\t\t\treturn null\n\t\t}\n\t}\n\n\t/**\n\t * Get the IP from the visitor using different services.\n\t * Return the first valid IP address that can be retrieved the fastest.\n\t *\n\t * @returns {Promise}\n\t */\n\twpm.getIpFromAnyService = async (ipVersion = \"any\", maxServicesToCheck = 3) => {\n\n\t\t// start tracking time\n\t\tconst startTime = performance.now()\n\n\t\t// take the ipServices object and filter it to only contain objects with an ipVersion key that matches the ipVersion argument\n\t\t// keep the original order of the ipServices object\n\t\t// also keep only the first maxServicesToCheck objects\n\n\t\tconst ipServicesFiltered = Object.keys(ipServices)\n\t\t\t.filter(service => ipServices[service][ipVersion])\n\t\t\t.slice(0, maxServicesToCheck)\n\t\t\t.reduce((obj, key) => {\n\t\t\t\t\tobj[key] = ipServices[key]\n\t\t\t\t\treturn obj\n\t\t\t\t}\n\t\t\t\t, {})\n\n\t\tlet promises = []\n\n\t\tObject.keys(ipServicesFiltered).forEach(service => {\n\t\t\t// only push if the ipVersion is available for the service\n\t\t\tif (ipServicesFiltered[service][ipVersion]) {\n\t\t\t\t// console.log(`pushing ${service} to promises array with ipVersion ${ipVersion}`)\n\t\t\t\tpromises.push(wpm.getIpFromService(service, ipVersion))\n\t\t\t}\n\t\t})\n\n\t\t// If the promises array is not empty, return the first promise that resolves the fastest\n\t\t// Ignore the promises that reject\n\t\tif (promises.length > 0) {\n\n\t\t\ttry {\n\t\t\t\tconst data = await Promise.any(promises)\n\t\t\t\t// console.log(`The Pixel Manager retrieved the IP address ${data.ip} from ${data.service} using IP version ${data.ipVersion}`)\n\n\t\t\t\t// stop tracking time\n\t\t\t\tconst endTime = performance.now()\n\t\t\t\tconst timeTaken = (endTime - startTime).toFixed(2)\n\n\t\t\t\twpm.consoleLog(`Retrieved the IP address ${data.ip} from ${data.service} which took ${timeTaken} ms`)\n\t\t\t\treturn data.ip\n\t\t\t} catch (error) {\n\t\t\t\t// console.error(error)\n\t\t\t\twpm.consoleLog(`Could not retrieve an IP with version ${ipVersion} from any of the services.`)\n\t\t\t\treturn null\n\t\t\t}\n\n\t\t} else {\n\t\t\twpm.consoleLog(\"No promises to resolve\")\n\t\t\treturn null\n\t\t}\n\t}\n\n\t/**\n\t * Fetches the IP address from a specified service.\n\t *\n\t * @async\n\t * @param {string} service - The name of the service to fetch the IP from.\n\t * @param {string} [ipVersion=\"any\"] - The version of the IP (e.g., \"any\" for global).\n\t * @returns {Promise} A promise that resolves to an object containing the IP address, service name, and IP version.\n\t * @throws {Error} Will reject the promise with an error if the IP version is not available for the service, the response from the service is not OK, the returned value from the service is not an IP address, or any other error occurs.\n\t */\n\twpm.getIpFromService = async (service, ipVersion = \"any\") => {\n\t\ttry {\n\n\t\t\tlet data = {\n\t\t\t\tip : null,\n\t\t\t\tservice : service,\n\t\t\t\tipVersion: ipVersion,\n\t\t\t}\n\n\t\t\t// Return reject if the ipVersion is not available for the service\n\t\t\tif (!ipServices[service][ipVersion]) return Promise.reject(new Error(`The IP version ${ipVersion} is not available for the service ${service}`))\n\n\t\t\twpm.consoleLog(`Fetching IP from ${service} using IP version ${ipVersion}`)\n\n\t\t\tconst response = await fetch(ipServices[service][ipVersion])\n\n\t\t\tif (!response.ok) {\n\t\t\t\treturn Promise.reject(new Error(`The response from ${service} was not OK. Status: ${response.status}`))\n\t\t\t}\n\n\t\t\tlet serviceResponseData = await response.text()\n\n\t\t\tif (service === \"cloudflare\") {\n\t\t\t\t// Convert key-value pairs to JSON\n\t\t\t\tserviceResponseData = serviceResponseData\n\t\t\t\t\t.trim()\n\t\t\t\t\t.split(\"\\n\")\n\t\t\t\t\t.reduce((obj, pair) => {\n\t\t\t\t\t\tpair = pair.split(\"=\")\n\t\t\t\t\t\treturn (obj[pair[0]] = pair[1]), obj\n\t\t\t\t\t}, {})\n\n\t\t\t\tdata.ip = serviceResponseData.ip\n\t\t\t} else {\n\t\t\t\tdata.ip = serviceResponseData.trim()\n\t\t\t}\n\n\t\t\tif (!isIP(data.ip)) {\n\t\t\t\treturn Promise.reject(new Error(`The returned value from ${service} is not an IP address`))\n\t\t\t}\n\n\t\t\treturn data\n\t\t} catch (error) {\n\t\t\treturn Promise.reject(error)\n\t\t}\n\t}\n\n\t/**\n\t * Cloudflare\n\t *\n\t * Response time: approx. 70ms\n\t * IPv: Returns IPv4 or IPv6 depending on the client\n\t * Dual stack: Doesn't offer dual stack detection\n\t *\n\t * @returns {Promise<*>}\n\t */\n\tconst getIpFromCloudflare = async () => {\n\n\t\tconst response = await fetch(\"https://www.cloudflare.com/cdn-cgi/trace\")\n\t\tlet data = await response.text()\n\n\t\t// Convert key-value pairs to JSON\n\t\t// https://stackoverflow.com/a/39284735/452587\n\t\tdata = data\n\t\t\t.trim()\n\t\t\t.split(\"\\n\")\n\t\t\t.reduce((obj, pair) => {\n\t\t\t\tpair = pair.split(\"=\")\n\t\t\t\treturn obj[pair[0]] = pair[1], obj\n\t\t\t}, {})\n\n\t\t// return the data.ip not a promise\n\t\treturn data.ip\n\t}\n\n\twpm.isIpNotAllowed = async () => {\n\t\treturn await wpm.isIpAllowed() === false\n\t}\n\n\tconst isOnBlacklist = ip => {\n\n\t\tconst {isInSubnet} = require(\"is-in-subnet\")\n\n\t\tfor (const ipName of getBlacklist()) {\n\n\t\t\tif (isCidr(ipName)) {\n\t\t\t\ttry {\n\t\t\t\t\tif (isInSubnet(ip, ipName)) return true\n\t\t\t\t} catch (e) {\n\t\t\t\t\twpm.consoleError(e)\n\t\t\t\t\twpm.consoleLog(\"IP: \" + ip)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (ip === ipName) return true\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\t}\n\n\tconst isCidr = ipName => {\n\t\treturn isRange(ipName)\n\t}\n\n\tconst getBlacklist = () => {\n\n\t\tconst blacklist = [\n\t\t\t// \"91.190.12.52/32\", // for testing\n\t\t\t// \"91.190.12.52\", // for testing\n\t\t]\n\n\t\tconst google = [\n\t\t\t\"2001:4860:4801:10::/64\",\n\t\t\t\"2001:4860:4801:11::/64\",\n\t\t\t\"2001:4860:4801:12::/64\",\n\t\t\t\"2001:4860:4801:13::/64\",\n\t\t\t\"2001:4860:4801:14::/64\",\n\t\t\t\"2001:4860:4801:15::/64\",\n\t\t\t\"2001:4860:4801:16::/64\",\n\t\t\t\"2001:4860:4801:17::/64\",\n\t\t\t\"2001:4860:4801:18::/64\",\n\t\t\t\"2001:4860:4801:19::/64\",\n\t\t\t\"2001:4860:4801:1a::/64\",\n\t\t\t\"2001:4860:4801:1b::/64\",\n\t\t\t\"2001:4860:4801:20::/64\",\n\t\t\t\"2001:4860:4801:21::/64\",\n\t\t\t\"2001:4860:4801:22::/64\",\n\t\t\t\"2001:4860:4801:23::/64\",\n\t\t\t\"2001:4860:4801:24::/64\",\n\t\t\t\"2001:4860:4801:25::/64\",\n\t\t\t\"2001:4860:4801:26::/64\",\n\t\t\t\"2001:4860:4801:27::/64\",\n\t\t\t\"2001:4860:4801:28::/64\",\n\t\t\t\"2001:4860:4801:29::/64\",\n\t\t\t\"2001:4860:4801:2::/64\",\n\t\t\t\"2001:4860:4801:2a::/64\",\n\t\t\t\"2001:4860:4801:2b::/64\",\n\t\t\t\"2001:4860:4801:2c::/64\",\n\t\t\t\"2001:4860:4801:2d::/64\",\n\t\t\t\"2001:4860:4801:2e::/64\",\n\t\t\t\"2001:4860:4801:2f::/64\",\n\t\t\t\"2001:4860:4801:30::/64\",\n\t\t\t\"2001:4860:4801:31::/64\",\n\t\t\t\"2001:4860:4801:32::/64\",\n\t\t\t\"2001:4860:4801:33::/64\",\n\t\t\t\"2001:4860:4801:34::/64\",\n\t\t\t\"2001:4860:4801:35::/64\",\n\t\t\t\"2001:4860:4801:36::/64\",\n\t\t\t\"2001:4860:4801:37::/64\",\n\t\t\t\"2001:4860:4801:38::/64\",\n\t\t\t\"2001:4860:4801:39::/64\",\n\t\t\t\"2001:4860:4801:3::/64\",\n\t\t\t\"2001:4860:4801:3a::/64\",\n\t\t\t\"2001:4860:4801:3b::/64\",\n\t\t\t\"2001:4860:4801:3c::/64\",\n\t\t\t\"2001:4860:4801:3d::/64\",\n\t\t\t\"2001:4860:4801:3e::/64\",\n\t\t\t\"2001:4860:4801:40::/64\",\n\t\t\t\"2001:4860:4801:41::/64\",\n\t\t\t\"2001:4860:4801:42::/64\",\n\t\t\t\"2001:4860:4801:43::/64\",\n\t\t\t\"2001:4860:4801:44::/64\",\n\t\t\t\"2001:4860:4801:45::/64\",\n\t\t\t\"2001:4860:4801:46::/64\",\n\t\t\t\"2001:4860:4801:47::/64\",\n\t\t\t\"2001:4860:4801:48::/64\",\n\t\t\t\"2001:4860:4801:49::/64\",\n\t\t\t\"2001:4860:4801:4a::/64\",\n\t\t\t\"2001:4860:4801:50::/64\",\n\t\t\t\"2001:4860:4801:51::/64\",\n\t\t\t\"2001:4860:4801:53::/64\",\n\t\t\t\"2001:4860:4801:60::/64\",\n\t\t\t\"2001:4860:4801:61::/64\",\n\t\t\t\"2001:4860:4801:62::/64\",\n\t\t\t\"2001:4860:4801:63::/64\",\n\t\t\t\"2001:4860:4801:64::/64\",\n\t\t\t\"2001:4860:4801:65::/64\",\n\t\t\t\"2001:4860:4801:66::/64\",\n\t\t\t\"2001:4860:4801:67::/64\",\n\t\t\t\"2001:4860:4801:68::/64\",\n\t\t\t\"2001:4860:4801:69::/64\",\n\t\t\t\"2001:4860:4801:6a::/64\",\n\t\t\t\"2001:4860:4801:6b::/64\",\n\t\t\t\"2001:4860:4801:6c::/64\",\n\t\t\t\"2001:4860:4801:6d::/64\",\n\t\t\t\"2001:4860:4801:6e::/64\",\n\t\t\t\"2001:4860:4801:6f::/64\",\n\t\t\t\"2001:4860:4801:70::/64\",\n\t\t\t\"2001:4860:4801:71::/64\",\n\t\t\t\"2001:4860:4801:72::/64\",\n\t\t\t\"2001:4860:4801:73::/64\",\n\t\t\t\"2001:4860:4801:74::/64\",\n\t\t\t\"2001:4860:4801:75::/64\",\n\t\t\t\"2001:4860:4801:76::/64\",\n\t\t\t\"2001:4860:4801:77::/64\",\n\t\t\t\"2001:4860:4801:80::/64\",\n\t\t\t\"2001:4860:4801:81::/64\",\n\t\t\t\"2001:4860:4801:82::/64\",\n\t\t\t\"2001:4860:4801:83::/64\",\n\t\t\t\"2001:4860:4801:84::/64\",\n\t\t\t\"2001:4860:4801:85::/64\",\n\t\t\t\"2001:4860:4801:86::/64\",\n\t\t\t\"2001:4860:4801:90::/64\",\n\t\t\t\"2001:4860:4801:91::/64\",\n\t\t\t\"2001:4860:4801:92::/64\",\n\t\t\t\"2001:4860:4801::/64\",\n\t\t\t\"2001:4860:4801:c::/64\",\n\t\t\t\"2001:4860:4801:f::/64\",\n\t\t\t\"34.100.182.96/28\",\n\t\t\t\"34.101.50.144/28\",\n\t\t\t\"34.118.254.0/28\",\n\t\t\t\"34.118.66.0/28\",\n\t\t\t\"34.126.178.96/28\",\n\t\t\t\"34.146.150.144/28\",\n\t\t\t\"34.147.110.144/28\",\n\t\t\t\"34.151.74.144/28\",\n\t\t\t\"34.152.50.64/28\",\n\t\t\t\"34.154.114.144/28\",\n\t\t\t\"34.155.98.32/28\",\n\t\t\t\"34.165.18.176/28\",\n\t\t\t\"34.175.160.64/28\",\n\t\t\t\"34.176.130.16/28\",\n\t\t\t\"34.64.82.64/28\",\n\t\t\t\"34.65.242.112/28\",\n\t\t\t\"34.80.50.80/28\",\n\t\t\t\"34.88.194.0/28\",\n\t\t\t\"34.89.10.80/28\",\n\t\t\t\"34.89.198.80/28\",\n\t\t\t\"34.96.162.48/28\",\n\t\t\t\"35.247.243.240/28\",\n\t\t\t\"66.249.64.0/27\",\n\t\t\t\"66.249.64.128/27\",\n\t\t\t\"66.249.64.160/27\",\n\t\t\t\"66.249.64.192/27\",\n\t\t\t\"66.249.64.224/27\",\n\t\t\t\"66.249.64.32/27\",\n\t\t\t\"66.249.64.64/27\",\n\t\t\t\"66.249.64.96/27\",\n\t\t\t\"66.249.65.0/27\",\n\t\t\t\"66.249.65.128/27\",\n\t\t\t\"66.249.65.160/27\",\n\t\t\t\"66.249.65.192/27\",\n\t\t\t\"66.249.65.224/27\",\n\t\t\t\"66.249.65.32/27\",\n\t\t\t\"66.249.65.64/27\",\n\t\t\t\"66.249.65.96/27\",\n\t\t\t\"66.249.66.0/27\",\n\t\t\t\"66.249.66.128/27\",\n\t\t\t\"66.249.66.192/27\",\n\t\t\t\"66.249.66.32/27\",\n\t\t\t\"66.249.66.64/27\",\n\t\t\t\"66.249.68.0/27\",\n\t\t\t\"66.249.68.32/27\",\n\t\t\t\"66.249.68.64/27\",\n\t\t\t\"66.249.69.0/27\",\n\t\t\t\"66.249.69.128/27\",\n\t\t\t\"66.249.69.160/27\",\n\t\t\t\"66.249.69.192/27\",\n\t\t\t\"66.249.69.224/27\",\n\t\t\t\"66.249.69.32/27\",\n\t\t\t\"66.249.69.64/27\",\n\t\t\t\"66.249.69.96/27\",\n\t\t\t\"66.249.70.0/27\",\n\t\t\t\"66.249.70.128/27\",\n\t\t\t\"66.249.70.160/27\",\n\t\t\t\"66.249.70.192/27\",\n\t\t\t\"66.249.70.224/27\",\n\t\t\t\"66.249.70.32/27\",\n\t\t\t\"66.249.70.64/27\",\n\t\t\t\"66.249.70.96/27\",\n\t\t\t\"66.249.71.0/27\",\n\t\t\t\"66.249.71.128/27\",\n\t\t\t\"66.249.71.160/27\",\n\t\t\t\"66.249.71.192/27\",\n\t\t\t\"66.249.71.32/27\",\n\t\t\t\"66.249.71.64/27\",\n\t\t\t\"66.249.71.96/27\",\n\t\t\t\"66.249.72.0/27\",\n\t\t\t\"66.249.72.128/27\",\n\t\t\t\"66.249.72.160/27\",\n\t\t\t\"66.249.72.192/27\",\n\t\t\t\"66.249.72.224/27\",\n\t\t\t\"66.249.72.32/27\",\n\t\t\t\"66.249.72.64/27\",\n\t\t\t\"66.249.72.96/27\",\n\t\t\t\"66.249.73.0/27\",\n\t\t\t\"66.249.73.128/27\",\n\t\t\t\"66.249.73.160/27\",\n\t\t\t\"66.249.73.192/27\",\n\t\t\t\"66.249.73.224/27\",\n\t\t\t\"66.249.73.32/27\",\n\t\t\t\"66.249.73.64/27\",\n\t\t\t\"66.249.73.96/27\",\n\t\t\t\"66.249.74.0/27\",\n\t\t\t\"66.249.74.32/27\",\n\t\t\t\"66.249.74.64/27\",\n\t\t\t\"66.249.74.96/27\",\n\t\t\t\"66.249.75.0/27\",\n\t\t\t\"66.249.75.128/27\",\n\t\t\t\"66.249.75.160/27\",\n\t\t\t\"66.249.75.192/27\",\n\t\t\t\"66.249.75.224/27\",\n\t\t\t\"66.249.75.32/27\",\n\t\t\t\"66.249.75.64/27\",\n\t\t\t\"66.249.75.96/27\",\n\t\t\t\"66.249.76.0/27\",\n\t\t\t\"66.249.76.128/27\",\n\t\t\t\"66.249.76.160/27\",\n\t\t\t\"66.249.76.192/27\",\n\t\t\t\"66.249.76.224/27\",\n\t\t\t\"66.249.76.32/27\",\n\t\t\t\"66.249.76.64/27\",\n\t\t\t\"66.249.76.96/27\",\n\t\t\t\"66.249.77.0/27\",\n\t\t\t\"66.249.77.128/27\",\n\t\t\t\"66.249.77.32/27\",\n\t\t\t\"66.249.77.64/27\",\n\t\t\t\"66.249.77.96/27\",\n\t\t\t\"66.249.79.0/27\",\n\t\t\t\"66.249.79.128/27\",\n\t\t\t\"66.249.79.160/27\",\n\t\t\t\"66.249.79.192/27\",\n\t\t\t\"66.249.79.224/27\",\n\t\t\t\"66.249.79.32/27\",\n\t\t\t\"66.249.79.64/27\",\n\t\t\t\"66.249.79.96/27\",\n\t\t]\n\n\t\tconst facebook = [\n\t\t\t\"69.63.176.0/20\",\n\t\t\t\"66.220.144.0/20\",\n\t\t\t\"66.220.144.0/21\",\n\t\t\t\"69.63.184.0/21\",\n\t\t\t\"69.63.176.0/21\",\n\t\t\t\"74.119.76.0/22\",\n\t\t\t\"69.171.255.0/24\",\n\t\t\t\"173.252.64.0/18\",\n\t\t\t\"69.171.224.0/19\",\n\t\t\t\"69.171.224.0/20\",\n\t\t\t\"103.4.96.0/22\",\n\t\t\t\"173.252.64.0/19\",\n\t\t\t\"31.13.64.0/18\",\n\t\t\t\"31.13.24.0/21\",\n\t\t\t\"66.220.152.0/21\",\n\t\t\t\"69.171.239.0/24\",\n\t\t\t\"69.171.240.0/20\",\n\t\t\t\"31.13.64.0/19\",\n\t\t\t\"31.13.64.0/24\",\n\t\t\t\"31.13.65.0/24\",\n\t\t\t\"31.13.67.0/24\",\n\t\t\t\"31.13.68.0/24\",\n\t\t\t\"31.13.69.0/24\",\n\t\t\t\"31.13.70.0/24\",\n\t\t\t\"31.13.71.0/24\",\n\t\t\t\"31.13.72.0/24\",\n\t\t\t\"31.13.73.0/24\",\n\t\t\t\"31.13.74.0/24\",\n\t\t\t\"31.13.75.0/24\",\n\t\t\t\"31.13.76.0/24\",\n\t\t\t\"31.13.77.0/24\",\n\t\t\t\"31.13.96.0/19\",\n\t\t\t\"31.13.66.0/24\",\n\t\t\t\"173.252.96.0/19\",\n\t\t\t\"69.63.178.0/24\",\n\t\t\t\"31.13.78.0/24\",\n\t\t\t\"31.13.79.0/24\",\n\t\t\t\"31.13.80.0/24\",\n\t\t\t\"31.13.82.0/24\",\n\t\t\t\"31.13.83.0/24\",\n\t\t\t\"31.13.84.0/24\",\n\t\t\t\"31.13.85.0/24\",\n\t\t\t\"31.13.86.0/24\",\n\t\t\t\"31.13.87.0/24\",\n\t\t\t\"31.13.88.0/24\",\n\t\t\t\"31.13.89.0/24\",\n\t\t\t\"31.13.91.0/24\",\n\t\t\t\"31.13.92.0/24\",\n\t\t\t\"31.13.93.0/24\",\n\t\t\t\"31.13.94.0/24\",\n\t\t\t\"31.13.95.0/24\",\n\t\t\t\"31.13.81.0/24\",\n\t\t\t\"179.60.192.0/22\",\n\t\t\t\"179.60.192.0/24\",\n\t\t\t\"179.60.193.0/24\",\n\t\t\t\"179.60.194.0/24\",\n\t\t\t\"179.60.195.0/24\",\n\t\t\t\"185.60.216.0/22\",\n\t\t\t\"45.64.40.0/22\",\n\t\t\t\"185.60.216.0/24\",\n\t\t\t\"185.60.217.0/24\",\n\t\t\t\"185.60.218.0/24\",\n\t\t\t\"185.60.219.0/24\",\n\t\t\t\"129.134.0.0/16\",\n\t\t\t\"157.240.0.0/16\",\n\t\t\t\"157.240.8.0/24\",\n\t\t\t\"157.240.0.0/24\",\n\t\t\t\"157.240.1.0/24\",\n\t\t\t\"157.240.2.0/24\",\n\t\t\t\"157.240.3.0/24\",\n\t\t\t\"157.240.5.0/24\",\n\t\t\t\"157.240.6.0/24\",\n\t\t\t\"157.240.7.0/24\",\n\t\t\t\"157.240.9.0/24\",\n\t\t\t\"157.240.10.0/24\",\n\t\t\t\"157.240.16.0/24\",\n\t\t\t\"157.240.19.0/24\",\n\t\t\t\"157.240.11.0/24\",\n\t\t\t\"157.240.12.0/24\",\n\t\t\t\"157.240.13.0/24\",\n\t\t\t\"157.240.14.0/24\",\n\t\t\t\"157.240.15.0/24\",\n\t\t\t\"157.240.17.0/24\",\n\t\t\t\"157.240.18.0/24\",\n\t\t\t\"157.240.20.0/24\",\n\t\t\t\"157.240.21.0/24\",\n\t\t\t\"157.240.22.0/24\",\n\t\t\t\"157.240.23.0/24\",\n\t\t\t\"157.240.0.0/17\",\n\t\t\t\"69.171.250.0/24\",\n\t\t\t\"204.15.20.0/22\",\n\t\t\t\"157.240.192.0/24\",\n\t\t\t\"157.240.198.0/24\",\n\t\t\t\"102.132.96.0/20\",\n\t\t\t\"102.132.96.0/24\",\n\t\t\t\"102.132.97.0/24\",\n\t\t\t\"157.240.26.0/24\",\n\t\t\t\"157.240.27.0/24\",\n\t\t\t\"157.240.28.0/24\",\n\t\t\t\"157.240.29.0/24\",\n\t\t\t\"157.240.30.0/24\",\n\t\t\t\"129.134.28.0/24\",\n\t\t\t\"129.134.29.0/24\",\n\t\t\t\"157.240.208.0/24\",\n\t\t\t\"157.240.193.0/24\",\n\t\t\t\"157.240.194.0/24\",\n\t\t\t\"157.240.195.0/24\",\n\t\t\t\"157.240.197.0/24\",\n\t\t\t\"157.240.196.0/24\",\n\t\t\t\"157.240.200.0/24\",\n\t\t\t\"157.240.201.0/24\",\n\t\t\t\"157.240.203.0/24\",\n\t\t\t\"157.240.204.0/24\",\n\t\t\t\"157.240.205.0/24\",\n\t\t\t\"157.240.206.0/24\",\n\t\t\t\"157.240.207.0/24\",\n\t\t\t\"157.240.209.0/24\",\n\t\t\t\"157.240.210.0/24\",\n\t\t\t\"157.240.211.0/24\",\n\t\t\t\"157.240.212.0/24\",\n\t\t\t\"157.240.213.0/24\",\n\t\t\t\"157.240.214.0/24\",\n\t\t\t\"157.240.215.0/24\",\n\t\t\t\"157.240.216.0/24\",\n\t\t\t\"157.240.222.0/24\",\n\t\t\t\"129.134.30.0/24\",\n\t\t\t\"129.134.31.0/24\",\n\t\t\t\"129.134.30.0/23\",\n\t\t\t\"129.134.25.0/24\",\n\t\t\t\"129.134.26.0/24\",\n\t\t\t\"129.134.27.0/24\",\n\t\t\t\"102.132.99.0/24\",\n\t\t\t\"102.132.101.0/24\",\n\t\t\t\"129.134.64.0/24\",\n\t\t\t\"129.134.65.0/24\",\n\t\t\t\"129.134.66.0/24\",\n\t\t\t\"129.134.67.0/24\",\n\t\t\t\"157.240.219.0/24\",\n\t\t\t\"157.240.217.0/24\",\n\t\t\t\"157.240.218.0/24\",\n\t\t\t\"157.240.199.0/24\",\n\t\t\t\"129.134.127.0/24\",\n\t\t\t\"157.240.223.0/24\",\n\t\t\t\"157.240.192.0/18\",\n\t\t\t\"157.240.221.0/24\",\n\t\t\t\"157.240.220.0/24\",\n\t\t\t\"173.252.88.0/21\",\n\t\t\t\"129.134.68.0/24\",\n\t\t\t\"129.134.69.0/24\",\n\t\t\t\"129.134.70.0/24\",\n\t\t\t\"157.240.24.0/24\",\n\t\t\t\"157.240.25.0/24\",\n\t\t\t\"102.132.100.0/24\",\n\t\t\t\"157.240.31.0/24\",\n\t\t\t\"157.240.224.0/24\",\n\t\t\t\"129.134.71.0/24\",\n\t\t\t\"157.240.225.0/24\",\n\t\t\t\"157.240.226.0/24\",\n\t\t\t\"157.240.227.0/24\",\n\t\t\t\"129.134.0.0/17\",\n\t\t\t\"129.134.72.0/24\",\n\t\t\t\"129.134.73.0/24\",\n\t\t\t\"129.134.74.0/24\",\n\t\t\t\"185.89.218.0/24\",\n\t\t\t\"185.89.219.0/24\",\n\t\t\t\"185.89.218.0/23\",\n\t\t\t\"157.240.228.0/24\",\n\t\t\t\"157.240.229.0/24\",\n\t\t\t\"129.134.76.0/24\",\n\t\t\t\"129.134.75.0/24\",\n\t\t\t\"157.240.239.0/24\",\n\t\t\t\"157.240.240.0/24\",\n\t\t\t\"157.240.241.0/24\",\n\t\t\t\"157.240.231.0/24\",\n\t\t\t\"157.240.232.0/24\",\n\t\t\t\"157.240.233.0/24\",\n\t\t\t\"157.240.234.0/24\",\n\t\t\t\"157.240.235.0/24\",\n\t\t\t\"157.240.236.0/24\",\n\t\t\t\"129.134.77.0/24\",\n\t\t\t\"129.134.78.0/24\",\n\t\t\t\"129.134.79.0/24\",\n\t\t\t\"157.240.237.0/24\",\n\t\t\t\"157.240.238.0/24\",\n\t\t\t\"157.240.242.0/24\",\n\t\t\t\"157.240.243.0/24\",\n\t\t\t\"129.134.112.0/24\",\n\t\t\t\"157.240.100.0/24\",\n\t\t\t\"157.240.98.0/24\",\n\t\t\t\"157.240.96.0/24\",\n\t\t\t\"157.240.99.0/24\",\n\t\t\t\"157.240.101.0/24\",\n\t\t\t\"129.134.113.0/24\",\n\t\t\t\"129.134.114.0/24\",\n\t\t\t\"157.240.97.0/24\",\n\t\t\t\"129.134.115.0/24\",\n\t\t\t\"157.240.244.0/24\",\n\t\t\t\"157.240.245.0/24\",\n\t\t\t\"157.240.246.0/24\",\n\t\t\t\"157.240.247.0/24\",\n\t\t\t\"157.240.248.0/24\",\n\t\t\t\"157.240.249.0/24\",\n\t\t\t\"157.240.250.0/24\",\n\t\t\t\"163.70.128.0/17\",\n\t\t\t\"163.77.128.0/17\",\n\t\t\t\"157.240.251.0/24\",\n\t\t\t\"157.240.252.0/24\",\n\t\t\t\"157.240.253.0/24\",\n\t\t\t\"147.75.208.0/20\",\n\t\t\t\"157.240.254.0/24\",\n\t\t\t\"185.89.219.0/24\",\n\t\t\t\"185.89.218.0/24\",\n\t\t\t\"185.89.218.0/23\",\n\t\t\t\"185.89.216.0/22\",\n\t\t\t\"147.75.208.0/20\",\n\t\t\t\"204.15.20.0/22\",\n\t\t\t\"69.63.176.0/20\",\n\t\t\t\"69.63.176.0/21\",\n\t\t\t\"69.63.184.0/21\",\n\t\t\t\"66.220.144.0/20\",\n\t\t\t\"69.63.176.0/20\",\n\t\t\t\"2620:0:1c00::/40\",\n\t\t\t\"2a03:2880::/32\",\n\t\t\t\"2a03:2880:fffe::/48\",\n\t\t\t\"2a03:2880:ffff::/48\",\n\t\t\t\"2620:0:1cff::/48\",\n\t\t\t\"2a03:2880:f001::/48\",\n\t\t\t\"2a03:2880:f003::/48\",\n\t\t\t\"2a03:2880:f004::/48\",\n\t\t\t\"2a03:2880:f005::/48\",\n\t\t\t\"2a03:2880:f006::/48\",\n\t\t\t\"2a03:2880:f007::/48\",\n\t\t\t\"2a03:2880:f008::/48\",\n\t\t\t\"2a03:2880:f00a::/48\",\n\t\t\t\"2a03:2880:f00c::/48\",\n\t\t\t\"2a03:2880:f00d::/48\",\n\t\t\t\"2a03:2880:f00e::/48\",\n\t\t\t\"2a03:2880:f00f::/48\",\n\t\t\t\"2a03:2880:f010::/48\",\n\t\t\t\"2a03:2880:f011::/48\",\n\t\t\t\"2a03:2880:f012::/48\",\n\t\t\t\"2a03:2880:f013::/48\",\n\t\t\t\"2a03:2880:f016::/48\",\n\t\t\t\"2a03:2880:f017::/48\",\n\t\t\t\"2a03:2880:f019::/48\",\n\t\t\t\"2a03:2880:f01b::/48\",\n\t\t\t\"2a03:2880:f01c::/48\",\n\t\t\t\"2a03:2880:f01f::/48\",\n\t\t\t\"2a03:2880:1000::/36\",\n\t\t\t\"2a03:2880:2000::/36\",\n\t\t\t\"2a03:2880:3000::/36\",\n\t\t\t\"2a03:2880:4000::/36\",\n\t\t\t\"2a03:2880:5000::/36\",\n\t\t\t\"2a03:2880:6000::/36\",\n\t\t\t\"2a03:2880:7000::/36\",\n\t\t\t\"2a03:2880:f021::/48\",\n\t\t\t\"2a03:2880:f023::/48\",\n\t\t\t\"2a03:2880:f024::/48\",\n\t\t\t\"2a03:2880:f027::/48\",\n\t\t\t\"2a03:2880:f028::/48\",\n\t\t\t\"2a03:2880:f029::/48\",\n\t\t\t\"2a03:2880:f02b::/48\",\n\t\t\t\"2a03:2880:f02c::/48\",\n\t\t\t\"2a03:2880:f02d::/48\",\n\t\t\t\"2a03:2880:f02e::/48\",\n\t\t\t\"2a03:2880:f02f::/48\",\n\t\t\t\"2a03:2880:f030::/48\",\n\t\t\t\"2a03:2880:f031::/48\",\n\t\t\t\"2a03:2880:f032::/48\",\n\t\t\t\"2a03:2880:f033::/48\",\n\t\t\t\"2a03:2880:f034::/48\",\n\t\t\t\"2a03:2880:f035::/48\",\n\t\t\t\"2a03:2880:f036::/48\",\n\t\t\t\"2a03:2880:f037::/48\",\n\t\t\t\"2a03:2880:f038::/48\",\n\t\t\t\"2a03:2880:f03a::/48\",\n\t\t\t\"2a03:2880:f03b::/48\",\n\t\t\t\"2a03:2880:f03d::/48\",\n\t\t\t\"2a03:2880:f03e::/48\",\n\t\t\t\"2a03:2880:f03f::/48\",\n\t\t\t\"2401:db00::/32\",\n\t\t\t\"2a03:2880::/36\",\n\t\t\t\"2a03:2880:f101::/48\",\n\t\t\t\"2a03:2880:f201::/48\",\n\t\t\t\"2a03:2880:f103::/48\",\n\t\t\t\"2a03:2880:f203::/48\",\n\t\t\t\"2a03:2880:f104::/48\",\n\t\t\t\"2a03:2880:f204::/48\",\n\t\t\t\"2a03:2880:f107::/48\",\n\t\t\t\"2a03:2880:f207::/48\",\n\t\t\t\"2a03:2880:f108::/48\",\n\t\t\t\"2a03:2880:f208::/48\",\n\t\t\t\"2a03:2880:f10a::/48\",\n\t\t\t\"2a03:2880:f20a::/48\",\n\t\t\t\"2a03:2880:f10d::/48\",\n\t\t\t\"2a03:2880:f20d::/48\",\n\t\t\t\"2a03:2880:f10e::/48\",\n\t\t\t\"2a03:2880:f20e::/48\",\n\t\t\t\"2a03:2880:f10f::/48\",\n\t\t\t\"2a03:2880:f20f::/48\",\n\t\t\t\"2a03:2880:f110::/48\",\n\t\t\t\"2a03:2880:f210::/48\",\n\t\t\t\"2a03:2880:f111::/48\",\n\t\t\t\"2a03:2880:f211::/48\",\n\t\t\t\"2a03:2880:f112::/48\",\n\t\t\t\"2a03:2880:f212::/48\",\n\t\t\t\"2a03:2880:f116::/48\",\n\t\t\t\"2a03:2880:f216::/48\",\n\t\t\t\"2a03:2880:f117::/48\",\n\t\t\t\"2a03:2880:f217::/48\",\n\t\t\t\"2a03:2880:f119::/48\",\n\t\t\t\"2a03:2880:f219::/48\",\n\t\t\t\"2a03:2880:f11f::/48\",\n\t\t\t\"2a03:2880:f21f::/48\",\n\t\t\t\"2a03:2880:f121::/48\",\n\t\t\t\"2a03:2880:f221::/48\",\n\t\t\t\"2a03:2880:f123::/48\",\n\t\t\t\"2a03:2880:f223::/48\",\n\t\t\t\"2a03:2880:f10c::/48\",\n\t\t\t\"2a03:2880:f20c::/48\",\n\t\t\t\"2a03:2880:f105::/48\",\n\t\t\t\"2a03:2880:f205::/48\",\n\t\t\t\"2a03:2880:f106::/48\",\n\t\t\t\"2a03:2880:f206::/48\",\n\t\t\t\"2a03:2880:f11b::/48\",\n\t\t\t\"2a03:2880:f21b::/48\",\n\t\t\t\"2a03:2880:f113::/48\",\n\t\t\t\"2a03:2880:f213::/48\",\n\t\t\t\"2a03:2880:f11c::/48\",\n\t\t\t\"2a03:2880:f21c::/48\",\n\t\t\t\"2a03:2880:f128::/48\",\n\t\t\t\"2a03:2880:f228::/48\",\n\t\t\t\"2a03:2880:f02a::/48\",\n\t\t\t\"2a03:2880:f12a::/48\",\n\t\t\t\"2a03:2880:f22a::/48\",\n\t\t\t\"2a03:2880:f12f::/48\",\n\t\t\t\"2a03:2880:f22f::/48\",\n\t\t\t\"2a03:2880:f124::/48\",\n\t\t\t\"2a03:2880:f127::/48\",\n\t\t\t\"2a03:2880:f129::/48\",\n\t\t\t\"2a03:2880:f12b::/48\",\n\t\t\t\"2a03:2880:f12c::/48\",\n\t\t\t\"2a03:2880:f12d::/48\",\n\t\t\t\"2a03:2880:f12e::/48\",\n\t\t\t\"2a03:2880:f130::/48\",\n\t\t\t\"2a03:2880:f131::/48\",\n\t\t\t\"2a03:2880:f132::/48\",\n\t\t\t\"2a03:2880:f133::/48\",\n\t\t\t\"2a03:2880:f134::/48\",\n\t\t\t\"2a03:2880:f135::/48\",\n\t\t\t\"2a03:2880:f136::/48\",\n\t\t\t\"2a03:2880:f137::/48\",\n\t\t\t\"2a03:2880:f138::/48\",\n\t\t\t\"2a03:2880:f13a::/48\",\n\t\t\t\"2a03:2880:f13b::/48\",\n\t\t\t\"2a03:2880:f13d::/48\",\n\t\t\t\"2a03:2880:f13e::/48\",\n\t\t\t\"2a03:2880:f13f::/48\",\n\t\t\t\"2a03:2880:f224::/48\",\n\t\t\t\"2a03:2880:f227::/48\",\n\t\t\t\"2a03:2880:f229::/48\",\n\t\t\t\"2a03:2880:f22b::/48\",\n\t\t\t\"2a03:2880:f22c::/48\",\n\t\t\t\"2a03:2880:f22d::/48\",\n\t\t\t\"2a03:2880:f22e::/48\",\n\t\t\t\"2a03:2880:f230::/48\",\n\t\t\t\"2a03:2880:f231::/48\",\n\t\t\t\"2a03:2880:f232::/48\",\n\t\t\t\"2a03:2880:f233::/48\",\n\t\t\t\"2a03:2880:f234::/48\",\n\t\t\t\"2a03:2880:f235::/48\",\n\t\t\t\"2a03:2880:f236::/48\",\n\t\t\t\"2a03:2880:f237::/48\",\n\t\t\t\"2a03:2880:f238::/48\",\n\t\t\t\"2a03:2880:f23a::/48\",\n\t\t\t\"2a03:2880:f23b::/48\",\n\t\t\t\"2a03:2880:f23d::/48\",\n\t\t\t\"2a03:2880:f23e::/48\",\n\t\t\t\"2a03:2880:f23f::/48\",\n\t\t\t\"2a03:2880:f0ff::/48\",\n\t\t\t\"2a03:2880:f1ff::/48\",\n\t\t\t\"2a03:2880:f2ff::/48\",\n\t\t\t\"2a03:2880:f044::/48\",\n\t\t\t\"2a03:2880:f144::/48\",\n\t\t\t\"2a03:2880:f244::/48\",\n\t\t\t\"2a03:2880:f042::/48\",\n\t\t\t\"2a03:2880:f043::/48\",\n\t\t\t\"2a03:2880:f045::/48\",\n\t\t\t\"2a03:2880:f046::/48\",\n\t\t\t\"2a03:2880:f047::/48\",\n\t\t\t\"2a03:2880:f048::/48\",\n\t\t\t\"2a03:2880:f04a::/48\",\n\t\t\t\"2a03:2880:f04c::/48\",\n\t\t\t\"2a03:2880:f04b::/48\",\n\t\t\t\"2a03:2880:f04d::/48\",\n\t\t\t\"2a03:2880:f259::/48\",\n\t\t\t\"2a03:2880:f258::/48\",\n\t\t\t\"2a03:2880:f257::/48\",\n\t\t\t\"2a03:2880:f256::/48\",\n\t\t\t\"2a03:2880:f255::/48\",\n\t\t\t\"2a03:2880:f254::/48\",\n\t\t\t\"2a03:2880:f253::/48\",\n\t\t\t\"2a03:2880:f252::/48\",\n\t\t\t\"2a03:2880:f250::/48\",\n\t\t\t\"2a03:2880:f24f::/48\",\n\t\t\t\"2a03:2880:f24d::/48\",\n\t\t\t\"2a03:2880:f24e::/48\",\n\t\t\t\"2a03:2880:f24c::/48\",\n\t\t\t\"2a03:2880:f24b::/48\",\n\t\t\t\"2a03:2880:f24a::/48\",\n\t\t\t\"2a03:2880:f248::/48\",\n\t\t\t\"2a03:2880:f247::/48\",\n\t\t\t\"2a03:2880:f246::/48\",\n\t\t\t\"2a03:2880:f245::/48\",\n\t\t\t\"2a03:2880:f243::/48\",\n\t\t\t\"2a03:2880:f242::/48\",\n\t\t\t\"2a03:2880:f241::/48\",\n\t\t\t\"2a03:2880:f240::/48\",\n\t\t\t\"2a03:2880:f159::/48\",\n\t\t\t\"2a03:2880:f158::/48\",\n\t\t\t\"2a03:2880:f157::/48\",\n\t\t\t\"2a03:2880:f156::/48\",\n\t\t\t\"2a03:2880:f155::/48\",\n\t\t\t\"2a03:2880:f154::/48\",\n\t\t\t\"2a03:2880:f153::/48\",\n\t\t\t\"2a03:2880:f152::/48\",\n\t\t\t\"2a03:2880:f150::/48\",\n\t\t\t\"2a03:2880:f14f::/48\",\n\t\t\t\"2a03:2880:f14e::/48\",\n\t\t\t\"2a03:2880:f14d::/48\",\n\t\t\t\"2a03:2880:f14c::/48\",\n\t\t\t\"2a03:2880:f14b::/48\",\n\t\t\t\"2a03:2880:f14a::/48\",\n\t\t\t\"2a03:2880:f148::/48\",\n\t\t\t\"2a03:2880:f147::/48\",\n\t\t\t\"2a03:2880:f146::/48\",\n\t\t\t\"2a03:2880:f145::/48\",\n\t\t\t\"2a03:2880:f143::/48\",\n\t\t\t\"2a03:2880:f142::/48\",\n\t\t\t\"2a03:2880:f141::/48\",\n\t\t\t\"2a03:2880:f140::/48\",\n\t\t\t\"2a03:2880:f059::/48\",\n\t\t\t\"2a03:2880:f058::/48\",\n\t\t\t\"2a03:2880:f057::/48\",\n\t\t\t\"2a03:2880:f056::/48\",\n\t\t\t\"2a03:2880:f055::/48\",\n\t\t\t\"2a03:2880:f054::/48\",\n\t\t\t\"2a03:2880:f053::/48\",\n\t\t\t\"2a03:2880:f052::/48\",\n\t\t\t\"2a03:2880:f050::/48\",\n\t\t\t\"2a03:2880:f04f::/48\",\n\t\t\t\"2a03:2880:f04e::/48\",\n\t\t\t\"2a03:2880:ff0b::/48\",\n\t\t\t\"2a03:2880:ff0c::/48\",\n\t\t\t\"2a03:2880:f040::/48\",\n\t\t\t\"2a03:2880:f041::/48\",\n\t\t\t\"2a03:2880:f0fc::/48\",\n\t\t\t\"2a03:2880:f0fd::/48\",\n\t\t\t\"2a03:2880:f0fc::/47\",\n\t\t\t\"2a03:2880:f1fc::/48\",\n\t\t\t\"2a03:2880:f1fd::/48\",\n\t\t\t\"2a03:2880:f1fc::/47\",\n\t\t\t\"2a03:2880:ff08::/48\",\n\t\t\t\"2a03:2880:ff09::/48\",\n\t\t\t\"2a03:2880:ff0a::/48\",\n\t\t\t\"2a03:2880:f05e::/48\",\n\t\t\t\"2a03:2880:f15e::/48\",\n\t\t\t\"2a03:2880:f25e::/48\",\n\t\t\t\"2620:0:1cfa::/48\",\n\t\t\t\"2a03:2880:f05b::/48\",\n\t\t\t\"2a03:2880:f05a::/48\",\n\t\t\t\"2a03:2880:f25a::/48\",\n\t\t\t\"2a03:2880:f15c::/48\",\n\t\t\t\"2a03:2880:f000::/36\",\n\t\t\t\"2a03:2880:f05d::/48\",\n\t\t\t\"2a03:2880:f25c::/48\",\n\t\t\t\"2a03:2880:f05c::/48\",\n\t\t\t\"2a03:2880:f260::/48\",\n\t\t\t\"2a03:2880:f060::/48\",\n\t\t\t\"2a03:2880:f160::/48\",\n\t\t\t\"2a03:2880:f15d::/48\",\n\t\t\t\"2a03:2880:f25b::/48\",\n\t\t\t\"2a03:2880:f25d::/48\",\n\t\t\t\"2a03:2880:f15b::/48\",\n\t\t\t\"2a03:2880:f15a::/48\",\n\t\t\t\"2a03:2880:f161::/48\",\n\t\t\t\"2a03:2880:f061::/48\",\n\t\t\t\"2a03:2880:f261::/48\",\n\t\t\t\"2a03:2881::/32\",\n\t\t\t\"2a03:2881::/48\",\n\t\t\t\"2a03:2881:1::/48\",\n\t\t\t\"2a03:2881:2::/48\",\n\t\t\t\"2a03:2881:3::/48\",\n\t\t\t\"2a03:2880:f162::/48\",\n\t\t\t\"2a03:2880:f262::/48\",\n\t\t\t\"2a03:2881:4000::/48\",\n\t\t\t\"2a03:2881:4003::/48\",\n\t\t\t\"2a03:2881:4001::/48\",\n\t\t\t\"2a03:2881:4002::/48\",\n\t\t\t\"2a03:2880:f065::/48\",\n\t\t\t\"2a03:2880:f163::/48\",\n\t\t\t\"2a03:2880:f066::/48\",\n\t\t\t\"2a03:2880:f263::/48\",\n\t\t\t\"2a03:2880:f264::/48\",\n\t\t\t\"2a03:2880:f164::/48\",\n\t\t\t\"2a03:2880:f067::/48\",\n\t\t\t\"2a03:2880:f165::/48\",\n\t\t\t\"2a03:2880:f265::/48\",\n\t\t\t\"2a03:2880:f068::/48\",\n\t\t\t\"2a03:2881:4004::/48\",\n\t\t\t\"2a03:2880:f06a::/48\",\n\t\t\t\"2a03:2880:f266::/48\",\n\t\t\t\"2a03:2880:f166::/48\",\n\t\t\t\"2a03:2880:f267::/48\",\n\t\t\t\"2a03:2880:f06b::/48\",\n\t\t\t\"2a03:2880:f167::/48\",\n\t\t\t\"2a03:2881:4006::/48\",\n\t\t\t\"2a03:2881:7::/48\",\n\t\t\t\"2a03:2881:9::/48\",\n\t\t\t\"2a03:2881:8::/48\",\n\t\t\t\"2a03:2881:4::/48\",\n\t\t\t\"2a03:2881:6::/48\",\n\t\t\t\"2a03:2881:5::/48\",\n\t\t\t\"2a03:2881:a::/48\",\n\t\t\t\"2a03:2880:f268::/48\",\n\t\t\t\"2a03:2880:f06d::/48\",\n\t\t\t\"2a03:2880:f168::/48\",\n\t\t\t\"2a03:2881:b::/48\",\n\t\t\t\"2a03:2881:c::/48\",\n\t\t\t\"2a03:2881:4007::/48\",\n\t\t\t\"2a03:2880:f269::/48\",\n\t\t\t\"2a03:2880:f169::/48\",\n\t\t\t\"2a03:2880:f06f::/48\",\n\t\t\t\"2a03:2880:f26a::/48\",\n\t\t\t\"2a03:2880:f16a::/48\",\n\t\t\t\"2a03:2880:f070::/48\",\n\t\t\t\"2a03:2881:d::/48\",\n\t\t\t\"2a03:2881:e::/48\",\n\t\t\t\"2a03:2880:f071::/48\",\n\t\t\t\"2a03:2880:f16b::/48\",\n\t\t\t\"2a03:2880:f26b::/48\",\n\t\t\t\"2a03:2881:4008::/48\",\n\t\t\t\"2a03:2881:10::/48\",\n\t\t\t\"2a03:2881:f::/48\",\n\t\t\t\"2a03:2881:11::/48\",\n\t\t\t\"2a03:2880:f26c::/48\",\n\t\t\t\"2a03:2880:f16c::/48\",\n\t\t\t\"2a03:2880:f073::/48\",\n\t\t\t\"2a03:2880:f16d::/48\",\n\t\t\t\"2a03:2880:f074::/48\",\n\t\t\t\"2a03:2880:f26d::/48\",\n\t\t\t\"2a03:2881:4009::/48\",\n\t\t\t\"2a03:2880:f26e::/48\",\n\t\t\t\"2a03:2880:f16e::/48\",\n\t\t\t\"2a03:2880:f076::/48\",\n\t\t\t\"2a03:2880:f16f::/48\",\n\t\t\t\"2a03:2880:f26f::/48\",\n\t\t\t\"2a03:2880:f077::/48\",\n\t\t\t\"2a03:2881:12::/48\",\n\t\t\t\"2a03:2881:13::/48\",\n\t\t\t\"2a03:2881:17::/48\",\n\t\t\t\"2a03:2881:15::/48\",\n\t\t\t\"2a03:2881:18::/48\",\n\t\t\t\"2a03:2881:14::/48\",\n\t\t\t\"2a03:2881:16::/48\",\n\t\t\t\"2a03:2881:19::/48\",\n\t\t\t\"2a03:2881:4005::/48\",\n\t\t\t\"2a03:2880:f078::/48\",\n\t\t\t\"2a03:2880:f170::/48\",\n\t\t\t\"2a03:2880:f270::/48\",\n\t\t\t\"2a03:2881:400a::/48\",\n\t\t\t\"2a03:2881:400c::/48\",\n\t\t\t\"2a03:2881:400b::/48\",\n\t\t\t\"2a03:2881:400d::/48\",\n\t\t\t\"2a03:2881:1a::/48\",\n\t\t\t\"2a03:2881:1c::/48\",\n\t\t\t\"2a03:2881:1b::/48\",\n\t\t\t\"2a03:2880:f271::/48\",\n\t\t\t\"2a03:2880:f07d::/48\",\n\t\t\t\"2a03:2880:f171::/48\",\n\t\t\t\"2a03:2880:f07e::/48\",\n\t\t\t\"2a03:2880:f172::/48\",\n\t\t\t\"2a03:2880:f272::/48\",\n\t\t\t\"2a03:2880:f080::/48\",\n\t\t\t\"2a03:2880:f173::/48\",\n\t\t\t\"2a03:2880:f273::/48\",\n\t\t\t\"2a03:2880:f081::/48\",\n\t\t\t\"2a03:2880:f174::/48\",\n\t\t\t\"2a03:2880:f274::/48\",\n\t\t\t\"2a03:2880:f175::/48\",\n\t\t\t\"2a03:2880:f275::/48\",\n\t\t\t\"2a03:2880:f082::/48\",\n\t\t\t\"2a03:2880:f176::/48\",\n\t\t\t\"2a03:2880:f276::/48\",\n\t\t\t\"2a03:2880:f083::/48\",\n\t\t\t\"2a03:2880:f277::/48\",\n\t\t\t\"2a03:2880:f084::/48\",\n\t\t\t\"2a03:2880:f177::/48\",\n\t\t\t\"2a03:2881:1e::/48\",\n\t\t\t\"2a03:2880:f085::/48\",\n\t\t\t\"2a03:2880:f178::/48\",\n\t\t\t\"2a03:2880:f278::/48\",\n\t\t\t\"2a03:2880:f179::/48\",\n\t\t\t\"2a03:2880:f086::/48\",\n\t\t\t\"2a03:2880:f279::/48\",\n\t\t\t\"2a03:2880:f17a::/48\",\n\t\t\t\"2a03:2880:f08a::/48\",\n\t\t\t\"2a03:2880:f27a::/48\",\n\t\t\t\"2a03:2881:48::/45\",\n\t\t\t\"2a10:f781:10:cee0::/64\",\n\t\t\t\"2a03:83e0::/32\",\n\t\t]\n\n\t\tconst twitter = [\n\t\t\t\"199.16.156.0/22\",\n\t\t\t\"199.59.148.0/22\",\n\t\t\t\"192.133.76.0/22\",\n\t\t]\n\n\t\tconst bing = [\n\t\t\t\"157.55.39.0/24\",\n\t\t\t\"207.46.13.0/24\",\n\t\t\t\"40.77.167.0/24\",\n\t\t\t\"13.66.139.0/24\",\n\t\t\t\"13.66.144.0/24\",\n\t\t\t\"52.167.144.0/24\",\n\t\t\t\"13.67.10.16/28\",\n\t\t\t\"13.69.66.240/28\",\n\t\t\t\"13.71.172.224/28\",\n\t\t\t\"139.217.52.0/28\",\n\t\t\t\"191.233.204.224/28\",\n\t\t\t\"20.36.108.32/28\",\n\t\t\t\"20.43.120.16/28\",\n\t\t\t\"40.79.131.208/28\",\n\t\t\t\"40.79.186.176/28\",\n\t\t\t\"52.231.148.0/28\",\n\t\t\t\"20.79.107.240/28\",\n\t\t\t\"51.105.67.0/28\",\n\t\t\t\"20.125.163.80/28\",\n\t\t\t\"40.77.188.0/22\",\n\t\t\t\"65.55.210.0/24\",\n\t\t\t\"199.30.24.0/23\",\n\t\t\t\"40.77.202.0/24\",\n\t\t\t\"40.77.139.0/25\",\n\t\t\t\"20.74.197.0/28\",\n\t\t]\n\n\t\tconst pinterest = [\n\t\t\t\"54.236.1.1/32\",\n\t\t\t\"54.236.1.2/31\",\n\t\t\t\"54.236.1.4/30\",\n\t\t\t\"54.236.1.8/29\",\n\t\t\t\"54.236.1.16/28\",\n\t\t\t\"54.236.1.32/27\",\n\t\t\t\"54.236.1.64/26\",\n\t\t\t\"54.236.1.128/25\",\n\t\t]\n\n\t\tconst hotjar = [\n\t\t\t\"18.203.61.76\",\n\t\t\t\"18.203.176.135\",\n\t\t\t\"52.17.197.221\",\n\t\t]\n\n\t\tconst alexa = [\n\t\t\t\"204.236.235.245\",\n\t\t\t\"75.101.186.145\",\n\t\t]\n\n\t\tconst amazon = [\n\t\t\t\"18.207.141.103\",\n\t\t\t\"52.1.113.12\",\n\t\t]\n\n\t\tconst baidu = [\n\t\t\t\"180.76.15.0/24\",\n\t\t\t\"119.63.196.0/24\",\n\t\t\t\"115.239.212.0/24\",\n\t\t\t\"119.63.199.0/24\",\n\t\t\t\"122.81.208.0/22\",\n\t\t\t\"123.125.71.0/24\",\n\t\t\t\"180.76.4.0/24\",\n\t\t\t\"180.76.5.0/24\",\n\t\t\t\"180.76.6.0/24\",\n\t\t\t\"185.10.104.0/24\",\n\t\t\t\"220.181.108.0/24\",\n\t\t\t\"220.181.51.0/24\",\n\t\t\t\"111.13.102.0/24\",\n\t\t\t\"123.125.67.144/29\",\n\t\t\t\"123.125.67.152/31\",\n\t\t\t\"61.135.169.0/24\",\n\t\t\t\"123.125.68.68/30\",\n\t\t\t\"123.125.68.72/29\",\n\t\t\t\"123.125.68.80/28\",\n\t\t\t\"123.125.68.96/30\",\n\t\t\t\"202.46.48.0/20\",\n\t\t\t\"220.181.38.0/24\",\n\t\t\t\"123.125.68.80/30\",\n\t\t\t\"123.125.68.84/31\",\n\t\t\t\"123.125.68.0/24\",\n\t\t]\n\n\t\tconst duckduckgo = [\n\t\t\t\"20.191.45.212\",\n\t\t\t\"40.88.21.235\",\n\t\t\t\"40.76.173.151\",\n\t\t\t\"40.76.163.7\",\n\t\t\t\"20.185.79.47\",\n\t\t\t\"52.142.26.175\",\n\t\t\t\"20.185.79.15\",\n\t\t\t\"52.142.24.149\",\n\t\t\t\"40.76.162.208\",\n\t\t\t\"40.76.163.23\",\n\t\t\t\"40.76.162.191\",\n\t\t\t\"40.76.162.247\",\n\t\t]\n\n\t\tconst yahoo = [\n\t\t\t\"5.255.250.0/24\",\n\t\t\t\"37.9.87.0/24\",\n\t\t\t\"67.195.37.0/24\",\n\t\t\t\"67.195.50.0/24\",\n\t\t\t\"67.195.110.0/24\",\n\t\t\t\"67.195.111.0/24\",\n\t\t\t\"67.195.112.0/23\",\n\t\t\t\"67.195.114.0/24\",\n\t\t\t\"67.195.115.0/24\",\n\t\t\t\"68.180.224.0/21\",\n\t\t\t\"72.30.132.0/24\",\n\t\t\t\"72.30.142.0/24\",\n\t\t\t\"72.30.161.0/24\",\n\t\t\t\"72.30.196.0/24\",\n\t\t\t\"72.30.198.0/24\",\n\t\t\t\"74.6.254.0/24\",\n\t\t\t\"74.6.8.0/24\",\n\t\t\t\"74.6.13.0/24\",\n\t\t\t\"74.6.17.0/24\",\n\t\t\t\"74.6.18.0/24\",\n\t\t\t\"74.6.22.0/24\",\n\t\t\t\"74.6.27.0/24\",\n\t\t\t\"74.6.168.0/24\",\n\t\t\t\"77.88.5.0/24\",\n\t\t\t\"77.88.47.0/24\",\n\t\t\t\"93.158.161.0/24\",\n\t\t\t\"98.137.72.0/24\",\n\t\t\t\"98.137.206.0/24\",\n\t\t\t\"98.137.207.0/24\",\n\t\t\t\"98.139.168.0/24\",\n\t\t\t\"114.111.95.0/24\",\n\t\t\t\"124.83.159.0/24\",\n\t\t\t\"124.83.179.0/24\",\n\t\t\t\"124.83.223.0/24\",\n\t\t\t\"141.8.144.0/24\",\n\t\t\t\"183.79.63.0/24\",\n\t\t\t\"183.79.92.0/24\",\n\t\t\t\"203.216.255.0/24\",\n\t\t\t\"211.14.11.0/24\",\n\t\t]\n\n\t\tconst yandex = [\n\t\t\t\"100.43.90.0/24\",\n\t\t\t\"37.9.115.0/24\",\n\t\t\t\"37.140.165.0/24\",\n\t\t\t\"77.88.22.0/25\",\n\t\t\t\"77.88.29.0/24\",\n\t\t\t\"77.88.31.0/24\",\n\t\t\t\"77.88.59.0/24\",\n\t\t\t\"84.201.146.0/24\",\n\t\t\t\"84.201.148.0/24\",\n\t\t\t\"84.201.149.0/24\",\n\t\t\t\"87.250.243.0/24\",\n\t\t\t\"87.250.253.0/24\",\n\t\t\t\"93.158.147.0/24\",\n\t\t\t\"93.158.148.0/24\",\n\t\t\t\"93.158.151.0/24\",\n\t\t\t\"93.158.153.0/32\",\n\t\t\t\"95.108.128.0/24\",\n\t\t\t\"95.108.138.0/24\",\n\t\t\t\"95.108.150.0/23\",\n\t\t\t\"95.108.158.0/24\",\n\t\t\t\"95.108.156.0/24\",\n\t\t\t\"95.108.188.128/25\",\n\t\t\t\"95.108.234.0/24\",\n\t\t\t\"95.108.248.0/24\",\n\t\t\t\"100.43.80.0/24\",\n\t\t\t\"130.193.62.0/24\",\n\t\t\t\"141.8.153.0/24\",\n\t\t\t\"178.154.165.0/24\",\n\t\t\t\"178.154.166.128/25\",\n\t\t\t\"178.154.173.29\",\n\t\t\t\"178.154.200.158\",\n\t\t\t\"178.154.202.0/24\",\n\t\t\t\"178.154.205.0/24\",\n\t\t\t\"178.154.239.0/24\",\n\t\t\t\"178.154.243.0/24\",\n\t\t\t\"37.9.84.253\",\n\t\t\t\"199.21.99.99\",\n\t\t\t\"178.154.162.29\",\n\t\t\t\"178.154.203.251\",\n\t\t\t\"178.154.211.250\",\n\t\t\t\"178.154.171.0/24\",\n\t\t\t\"178.154.200.0/24\",\n\t\t\t\"178.154.244.0/24\",\n\t\t\t\"178.154.246.0/24\",\n\t\t\t\"95.108.181.0/24\",\n\t\t\t\"95.108.246.252\",\n\t\t\t\"5.45.254.0/24\",\n\t\t\t\"5.255.253.0/24\",\n\t\t\t\"37.140.141.0/24\",\n\t\t\t\"37.140.188.0/24\",\n\t\t\t\"100.43.81.0/24\",\n\t\t\t\"100.43.85.0/24\",\n\t\t\t\"100.43.91.0/24\",\n\t\t\t\"199.21.99.0/24\",\n\t\t\t\"2a02:6b8:b000::/32\",\n\t\t\t\"2a02:6b8:b010::/32\",\n\t\t\t\"2a02:6b8:b011::/32\",\n\t\t\t\"2a02:6b8:c0e::/32\",\n\t\t]\n\n\t\tconst sogou = [\n\t\t\t\"220.181.125.0/24\",\n\t\t\t\"123.126.51.64/27\",\n\t\t\t\"123.126.51.96/28\",\n\t\t\t\"123.126.68.25\",\n\t\t\t\"61.135.189.74\",\n\t\t\t\"61.135.189.75\",\n\t\t]\n\n\t\tconst youdao = [\n\t\t\t\"61.135.249.200/29\",\n\t\t\t\"61.135.249.208/28\",\n\t\t]\n\n\t\tlet customExclusionList = []\n\n\t\t// if wpmDataLayer.general.server_2_server.ip_exclude_list is array\n\t\tif (Array.isArray(wpmDataLayer.general.server_2_server.ip_exclude_list)) {\n\t\t\tcustomExclusionList = wpmDataLayer.general.server_2_server.ip_exclude_list\n\t\t}\n\n\t\treturn blacklist.concat(\n\t\t\tgoogle,\n\t\t\tfacebook,\n\t\t\ttwitter,\n\t\t\tbing,\n\t\t\tpinterest,\n\t\t\thotjar,\n\t\t\talexa,\n\t\t\tamazon,\n\t\t\tbaidu,\n\t\t\tduckduckgo,\n\t\t\tyahoo,\n\t\t\tyandex,\n\t\t\tsogou,\n\t\t\tyoudao,\n\t\t\tcustomExclusionList,\n\t\t)\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * https://github.com/woocommerce/woocommerce-blocks/blob/trunk/src/BlockTypes/AbstractProductGrid.php#L108\n * https://github.com/woocommerce/woocommerce-blocks/issues/3483\n * https://github.com/woocommerce/woocommerce-blocks/issues/1714\n *\n * https://github.com/woocommerce/woocommerce-blocks/blob/trunk/docs/third-party-developers/extensibility/hooks/actions.md#woocommerce_add_to_cart\n *\n * https://github.com/woocommerce/woocommerce-blocks/blob/trunk/docs/internal-developers/blocks/feature-flags-and-experimental-interfaces.md\n * https://github.com/woocommerce/woocommerce-blocks/blob/trunk/docs/internal-developers/blocks/feature-flags-and-experimental-interfaces.md#usages-of-experimental-prefix\n *\n * experimental__woocommerce_blocks-product-list-render\n *\n * https://github.com/woocommerce/woocommerce-blocks/blob/a1a6eb2b574b7d39d19d67bafb747d38017289da/docs/internal-developers/blocks/feature-flags-and-experimental-interfaces.md/#usages-of-experimental-prefix\n */\n\n// TODO experimental__woocommerce_blocks-checkout-set-email-address\n// TODO experimental__woocommerce_blocks-product-view-link > selectItem\n// TODO maybe experimental__woocommerce_blocks-product-list-render, when product list is rendered send some list event\n// TODO maybe experimental__woocommerce_blocks-product-search, if the current event trigger doesn't work\n// TODO experimental__woocommerce_blocks-product-render > viewItem\n// TODO various events during entering checkout details, such as email, address, etc.\n// TODO find a way to keep view_item_list events working with the mutation observer\n\n// import {createHooks, addAction, doAction} from \"@wordpress/hooks\"\n// console.log(wp.hooks)\n// console.log(wp.hooks.applyFilters(\"ndx_change_string\", \"\"))\n\n/**\n * Add-to-cart button\n */\nwp.hooks.addAction(\n\t\"experimental__woocommerce_blocks-cart-add-item\",\n\t\"pixel-manager-for-woocommerce\",\n\tdata => {\n\t\t// console.log(\"experimental__woocommerce_blocks-cart-add-item\", data)\n\n\t\t// Works on the all product page\n\t\t// TODO make it work with variable quantities on product page\n\t\twpm.addProductToCart(data.product.id, 1)\n\t},\n)\n\n/**\n * Change cart quantity\n */\nwp.hooks.addAction(\n\t\"experimental__woocommerce_blocks-cart-set-item-quantity\",\n\t\"pixel-manager-for-woocommerce\",\n\tdata => {\n\t\t// console.log(\"experimental__woocommerce_blocks-cart-set-item-quantity\", data)\n\n\t\tif (data.quantity > data.product.quantity) {\n\t\t\twpm.addProductToCart(data.product.id, data.quantity - data.product.quantity)\n\t\t}\n\n\t\tif (data.quantity < data.product.quantity) {\n\t\t\twpm.removeProductFromCart(data.product.id, data.product.quantity - data.quantity)\n\t\t}\n\t},\n)\n\n/**\n * Remove from cart\n */\nwp.hooks.addAction(\n\t\"experimental__woocommerce_blocks-cart-remove-item\",\n\t\"pixel-manager-for-woocommerce\",\n\tdata => {\n\t\t// console.log(\"experimental__woocommerce_blocks-cart-remove-item\", data)\n\t\twpm.removeProductFromCart(data.product.id, data.quantity)\n\t},\n)\n\n/**\n * Start checkout\n */\n\n// wp.hooks.addAction(\n// \t\"experimental__woocommerce_blocks-checkout-render-checkout-form\",\n// \t\"pixel-manager-for-woocommerce\",\n// \tdata => {\n// \t\tconsole.log(\"experimental__woocommerce_blocks-checkout-render-checkout-form\", data)\n// \t\tjQuery(document).trigger(\"wpmBeginCheckout\")\n// \t},\n// )\n\n/**\n * Checkout form submit\n */\nwp.hooks.addAction(\n\t\"experimental__woocommerce_blocks-checkout-submit\",\n\t\"pixel-manager-for-woocommerce\",\n\t() => {\n\t\t// console.log(\"experimental__woocommerce_blocks-checkout-submit\")\n\t\tjQuery(document).trigger(\"wpmPlaceOrder\", {})\n\t},\n)\n\n\n/**\n * Only outputs an object with products. No other data or actions.\n */\n// wp.hooks.addAction(\n// \t\"experimental__woocommerce_blocks-product-list-render\",\n// \t\"pixel-manager-for-woocommerce\",\n// \t(value) => {\n//\n// \t\tif (value.products.length > 0) {\n// \t\t\tconsole.log(\"hello world 1\")\n// \t\t\tconsole.log(value)\n//\n// \t\t\tjQuery(\".add_to_cart_button\").on(\"click\", function (event) {\n//\n// \t\t\t\tconsole.log(jQuery(event.target.parentElement.parentElement))\n//\n// \t\t\t\t// console.log(\"hello world 5\");\n// \t\t\t\t//\n// \t\t\t\t// console.log(jQuery(this.parentElement.parentElement));\n// \t\t\t\t//\n// \t\t\t\t// console.log(\"hello world 6\");\n// \t\t\t\t//\n// \t\t\t\t// // element is part of a React component.\n// \t\t\t\t// // Get the parent element.\n// \t\t\t\t// const pe = event.target.parentElement.parentElement\n// \t\t\t\t// console.log(jQuery(pe)._reactInternalFiber.key)\n// \t\t\t\t//\n// \t\t\t\t// // pe is a react component. Get the key of that component.\n// \t\t\t\t// const key = pe.getAttribute(\"data-key\")\n// \t\t\t\t// console.log(key)\n//\n//\n// \t\t\t\t// console.log(element.currentTarget.dataset.key)\n// \t\t\t})\n// \t\t}\n// \t\treturn value\n// \t},\n// )\n\n// jQuery(document).on(\"pmw:ready\", () => {\n// \tjQuery(\".add_to_cart_button\").on(\"click\", function (element) {\n//\n// \t\tconsole.log(\"hello world 3\")\n// \t\t// element is part of a React component.\n// \t\t// Get the key of that component.\n// \t\tconsole.log(element.currentTarget.dataset.key)\n// \t})\n// })\n\n// wp.hooks.addAction(\n// \t'woocommerce_add_to_cart',\n// \t'pixel-manager-for-woocommerce',\n// \t( cart_item_key, product_id, quantity, variation_id, variation, cart_item_data ) => {\n// \t\tconsole.log( cart_item_key, product_id, quantity, variation_id, variation, cart_item_data );\n// \t},\n// \t()=>{\n// \t\tconsole.log(\"hello world 2\")\n// \t}\n// )\n\n/**\n * Product Search\n *\n * TODO: Make sure that it doesn't duplicate the event\n */\n// wp.hooks.addAction(\n// \t\"experimental__woocommerce_blocks-product-search\",\n// \t\"pixel-manager-for-woocommerce\",\n// \tdata => {\n// \t\t// console.log(\"experimental__woocommerce_blocks-product-search\", data)\n// \t\tjQuery(document).trigger(\"pmwEvent:Search\", data.searchTerm)\n// \t},\n// )\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Run PMW main loader\n */\n\nconst main = async () => {\n\n\trequire(\"./wpm/functions_main\")\n\trequire(\"./version.js\")\n\n\t// Wait until jQuery is loaded\n\tawait wpm.jQueryExists()\n\n\t// Wait until wpmDataLayer is loaded\n\tawait wpm.wpmDataLayerFullyLoaded()\n\n\t// wait 1000ms\n\t// await new Promise(resolve => setTimeout(resolve, 1000))\n\n\t// Load all essential scripts first\n\trequire(\"./wpm/functions_loader\")\n\n\t// Load all event listeners that depend on document ready\n\tjQuery(document).on(\"pmw:ready\", () => {\n\t\trequire(\"./wpm/event_listeners_on_ready\")\n\t})\n\n\t// Load remaining event listeners\n\trequire(\"./wpm/event_listeners\")\n\n\twpm.loadWcHooksFunctions()\n\n\t// Output PMW console message\n\twpm.pmwConsoleMessage()\n\n\t// Check if domain is excluded from tracking\n\t// If so, return\n\tif (wpm.excludeDomainFromTracking()) return\n\n\t// Load free pixels\n\trequire(\"./google/loader\")\n\trequire(\"./facebook/loader\")\n\trequire(\"./hotjar/loader\")\n\n\t// #if process.env.TIER === 'premium'\n// \t/**\n// \t * Load all premium scripts\n// \t */\n// \tif (wpm.canLoadPremiumFeatures()) {\n// \t\trequire(\"./wpm/event_listeners_premium\")\n// \t\trequire(\"./adroll/loader\")\n// \t\trequire(\"./linkedin/loader\")\n// \t\trequire(\"./microsoft-ads/loader\")\n// \t\trequire(\"./outbrain/loader\")\n// \t\trequire(\"./pinterest/loader\")\n// \t\trequire(\"./snapchat/loader\")\n// \t\trequire(\"./taboola/loader\")\n// \t\trequire(\"./tiktok/loader\")\n// \t\trequire(\"./twitter/loader\")\n// \t\trequire(\"./reddit/loader\")\n// \t\trequire(\"./vwo/loader\")\n// \t}\n\t// #endif\n\n\t// Preload pixels\n\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\n\t// Trigger wpmLoad event\n\tdocument.dispatchEvent(new Event(\"wpmLoad\"))\n\n\t// Wait until page is loaded\n\tawait wpm.pageLoaded()\n\twpm.triggerDomReadyEvent()\n\n\t// Check if the library version matches the PMW version that's installed on the server\n\twpm.checkLibraryVersion()\n\n}\n\nmain()\n\n\n\n\n\n\n\n\n"],"names":["IPv4","require","exports","IPv6","util","util_1","isInSubnet","address","subnetOrSubnets","createChecker","Array","isArray","subnetsByVersion","reduce","acc","subnet","ip","split","isIP","push","length","Error","check4","check6","isIPv6","isIPv4MappedAddress","extractMappedIpv4","Object","enumerable","get","isIPv4","isPrivate","isLocalhost","isReserved","isSpecial","localhost","ipv4","ipv6","private","reserved","ipRange_1","ipv4ToLong","octets","parseInt","checks_1","map","createLongChecker","addressLong","some","check","_a","subnetAddress","prefixLengthString","prefixLength","Number","isInteger","subnetLong","specialNetsCache","default","__spreadArrays","dot","mappedIpv4","colon","doubleColon","getIpv6Segments","test","matches","match","prefix","parts","x","toString","mappedIpv4ToIpv6","beforeChunk","afterChunk","beforeParts","afterParts","missingSegments","concat","createSegmentChecker","segments","subnetSegments","addressSegments","i","bitCount","Math","min","Boolean","v4Seg","v4Str","IPv4Reg","RegExp","v6Seg","IPv6Reg","s","expandIPv6","ipaddr","ipv4Part","ipv4Regexes","ipv6Part","ipv6Regexes","matchCIDR","zoneIndex","module","this","first","second","partSize","cidrBits","part","shift","subnetMatch","rangeList","defaultName","k","len","rangeName","rangeSubnets","kind","apply","octet","prototype","join","toNormalizedString","toByteArray","slice","other","cidrRange","ref","SpecialRanges","unspecified","broadcast","multicast","linkLocal","loopback","carrierGradeNat","range","toIPv4MappedAddress","parse","prefixLengthFromSubnetMask","cidr","stop","zeros","zerotable","fourOctet","longValue","parser","string","parseIntAuto","value","results","reverse","zoneId","l","replace","toRFC5952String","bestMatchIndex","bestMatchLength","regex","exec","index","substring","bytes","addr","suffix","call","toFixedLengthString","padStart","uniqueLocal","ipv4Mapped","rfc6145","rfc6052","teredo","toIPv4Address","high","low","transitional","colonCount","lastColon","replacement","replacementCount","indexOf","lastIndexOf","substr","isValid","error1","isValidFourPartDecimal","parseCIDR","maskLength","parsed","defineProperty","subnetMaskFromPrefixLength","filledOctetCount","j","floor","pow","broadcastAddressFromCIDR","ipInterfaceOctets","subnetMaskOctets","networkAddressFromCIDR","fromByteArray","process","commonjsGlobal","normalize","a","_validate","nh","toLowerCase","sections","n","h","ns","hs","undefined","_leftPad","abbreviate","zPreviousFlag","zeroStartIndex","zeroLength","zStartIndex","zLength","section","zFlag","splice","d","p","padding","repeat","_bin2hex","bin","_addr2bin","binAddr","_bin2addr","binPart","hexSection","divideSubnet","mask0","mask1","limit","abbr","ret","binNetPart","binHostPart","numSubnets","binSubnet","hexAddr","binStartAddr","binEndAddr","start","end","size","randomSubnet","random","ptr","mask","version","err","isV4","isV6","isRange","inRange","check_range","ip6","range_data","parse_addr","parse_range","storeIP","displayIP","jQuery","document","on","wpmDataLayer","pixels","facebook","pixel_id","loaded","wpm","doesUrlContainPatterns","exclusion_patterns","canIFire","loadFacebookPixel","event","payload","fbq","custom_data","eventID","event_id","consoleLog","error","console","setFbUserData","$","fbUserData","fbeventsJsUrl","searchParams","URLSearchParams","window","location","search","has","fbevents_js_url","f","b","e","v","callMethod","arguments","queue","_fbq","t","createElement","async","src","getElementsByTagName","parentNode","insertBefore","data","isFbpSet","isFbAdvancedMatchingEnabled","getUserIdentifiersForFb","mobile_bridge_app_id","user","id","raw","external_id","order","user_id","email","em","billing_email_hashed","first_name","fn","billing_first_name","last_name","ln","billing_last_name","phone","ph","billing_phone","city","ct","billing_city","state","st","billing_state","postcode","zp","billing_postcode","country","billing_country","getFbRandomEventId","getFbUserData","getFbUserDataFromBrowser","advanced_matching","getCookie","isValidFbp","fbp","isValidFbc","fbc","navigator","userAgent","client_user_agent","retrieveData","client_ip_address","fbGetProductDataForCapiEvent","product","content_type","content_name","name","content_ids","dyn_r_ids","dynamic_remarketing","id_type","parseFloat","quantity","price","currency","facebookContentIds","prodIds","values","items","forEach","item","shop","variations_output","variation_id","String","products","trackCustomFacebookEvent","eventName","customData","eventId","trigger","event_name","user_data","event_source_url","href","fbGetContentIdsFromCart","key","cart","isEmptyObject","google","ads","conversionIds","status","googleConfigConditionsMet","is_variable","send_events_with_parent_ids","send_to","getGoogleAdsConversionIdentifiers","google_business_vertical","gtagLoaded","then","gtag","getGoogleAdsConversionIdentifiersWithLabel","marketing","getGoogleAdsRegularOrderItems","transaction_id","number","new_customer","ltv","customer_lifetime_value","aw_merchant_id","discount","aw_feed_country","aw_feed_language","conversionIdentifiers","entries","_ref","keys","orderItems","orderItem","analytics","eec","ga4","measurement_id","ga4GetFullProductItemData","item_list_name","list_name","item_list_id","list_id","getCartValue","getCartItemsGa4","cartValue","toFixed","search_term","getSearchTermFromUrl","mp_active","affiliation","total","tax","shipping","coupon","getGA4OrderItems","item_name","item_category","category","item_id","item_variant","variant_name","item_brand","brand","canGoogleLoad","loadGoogle","logPreventedPixelLoading","type","consent_mode","is_active","getConsentValues","mode","categories","includes","getVisitorConsentStatusAndUpdateGoogleConsentSettings","google_consent_settings","analytics_storage","ad_storage","ad_user_data","ad_personalization","fireGtagGoogleAds","enhanced_conversions","active","phone_conversion_label","phone_conversion_number","page_type","enhanced_conversion_data","fireGtagGoogleAnalyticsGA4","parameters","debug_mode","isGoogleActive","universal","property_id","getGoogleGtagId","log","loadScriptAndCacheIt","script","textStatus","tcf_support","dataLayer","wait_for_update","region","ads_data_redaction","url_passthrough","linker","settings","Date","triggerQueuedEvents","Promise","resolve","reject","startTime","wait","consoleError","setTimeout","optimize","container_id","load_google_optimize_pixel","hotjar","site_id","load_hotjar_pixel","o","hj","q","_hjSettings","hjid","hjsv","r","appendChild","getLibraryVersion","checkLibraryVersion","wpmConsentValues","setConsentValueCategories","updateConsentCookieValues","cookie","explicitConsent","JSON","visitorHasChosen","decodeURI","getCookieThatContainsRegex","action","consents","statistics","getComplianzCookies","cmplz_statistics","cmplz_marketing","getCookieYesCookies","advertisement","checkCookie","cookieNames","cookieValue","analyticsCookie","adsCookie","thirdparty","advanced","getIubendaCookieInfo","decodeURIComponent","purposes","localStorage","getItem","UC_UI","addEventListener","ucUiProcessConsent","areAllConsentsAccepted","groups","groupsObject","group","groupArray","getTermlyCookies","termlyConsent","doesACookieForTheRealCookieBannerExist","waitForLibrary","consentApi","service","cookies","consent","consentSync","cookieOptIn","trim","startsWith","pmw","consentAcceptAll","ucStatisticsSlug","getSettingsLabels","filter","label","slug","consentAdjustSelectively","getServicesBaseInfo","categorySlug","setConsentDefaultValuesToExplicit","pixelName","canIFireMode","general","cookie_consent_mgmt","explicit_consent","scriptTagObserver","MutationObserver","mutations","_ref2","addedNodes","node","shouldScriptBeActive","unblockScript","blockScript","observe","head","childList","subtree","disconnect","element","scriptNode","removeAttach","remove","wpmSrc","attr","appendTo","dispatchEvent","Event","removeAttr","unblockAllScripts","unblockSelectedPixels","explicitConsentStateAlreadySet","updatePixelConsentForPixelTypeCMPs","updateGoogleConsentMode","Cookiebot","changedConsentCategory","detail","cmplzStatusChange","cmplzConsentData","huObserver","_ref3","querySelector","hu","documentElement","body","consentRevokeAll","OneTrust","reload","advertising","duration","consentSetCookie","setCookie","stringify","triggerPmwCookieConsentManagementLoaded","url","URL","currentTarget","productId","getProductIdByCartItemKeyUrl","removeProductFromCart","checkoutButtonSelectors","prepareSelectors","paymentMethodSelected","fireCheckoutProgress","fireCheckoutOption","val","initCart","productIds","getAddToCartLinkProductIds","getProductsFromBackend","referrer","referrerHostname","hostname","host","storeData","pmw_loaded","product_type","getMainProductIdFromProductPage","getProductDataForViewItemEvent","isOrderIdStored","writeOrderIdToStorage","acrRemoveCookie","hasLoginEventFired","setLoginEventFired","pinterest","getPinterestS2SBaseData","pinterestGetProductDataForCapiEvent","tiktok","getRandomEventId","context","getTikTokUserDataFromBrowser","properties","contents","content_id","sendEventPayloadToServer","tiktokGetPropertiesFromCart","search_string","query","getTikTokOrderItemIds","startIntersectionObserverToWatch","startProductsMutationObserverToWatch","addToCartSelectors","target","dataset","product_id","addProductToCart","each","find","classes","getPostIdFromString","one","closest","origin","nextAll","getIdBasedOndVariationsOutputSetting","getProductDetailsFormattedForEvent","isEmail","emailSelected","getProductIdByCartItemElement","getProductQuantityByCartItemElement","getCartItemsFromBackend","variation","triggerViewItemEventPrep","wpmRestSettings","isBelowRestErrorThreshold","isRestEndpointAvailable","testEndpoint","root","cookieName","response","fetch","method","cache","keepalive","isWpmRestEndpointAvailable","orderId","orderKey","source","orderIds","storeOrderIdOnServer","order_duplication_prevention","quantityToRemove","storeCartData","is_variation","parent_id","selectors","Set","doesWooCommerceCartExist","retrieveCartData","saveCartObjectToDataLayer","ajax_url","ok","json","success","headers","page_id","pageType","responseData","assign","cartObject","triggerViewItemEvent","triggerViewItemEventNoProduct","step","checkout_option","triggerViewItemList","viewItemListTriggerTestMode","css","append","view_item_list_trigger","opacity","background_color","io","ioTimeouts","observerCallback","observer","entry","elementId","next","isIntersecting","test_mode","unobserve","timeout","clearTimeout","ioid","detectedProductTemplateClasses","nested","flat","isNestedClass","elem","className","isFlatClass","prev","hasClass","getAllElementsToWatch","getCommonIdentifiersToWatch","listOfClassNames","haveSameNestingDepth","element1","element2","parents","findCommonParentElement","parent","is","countOfChildren","getCommonClass","classes1","classes2","wpmProductIds","querySelectorAll","productsNode","commonClass","children","firstProductTemplateClasses","urlHasParameter","IntersectionObserver","threshold","productsMutationObserver","attributes","characterData","mutation","newNodes","hasWpmProductIdElement","siblings","expiryDays","setTime","getTime","expires","toUTCString","ca","c","charAt","deleteCookie","persistent","extension","dataGetter","getPersistentData","getSessionData","dataSetter","setPersistentData","setSessionData","getSessionDataKey","defaultStorageKey","getPersistentDataKey","storageKeySuffix","sessionStorage","setItem","order_id","orderDetails","order_key","responseJson","cartItemKey","cart_item_keys","variant","list_position","position","parent_id_dyn_r_ids","getClidFromBrowser","clidCookieId","clidId","gclid","dclid","getUserAgent","getViewPort","width","max","clientWidth","innerWidth","height","clientHeight","innerHeight","consoleLogVersion","options","dataType","ajax","getOrderItemPrice","total_tax","loginEventFired","pageLoaded","waitForVar","readyState","pageReady","isMiniCartActive","parameter","getUrlParameter","hashAsync","algo","str","crypto","subtle","digest","TextEncoder","encode","buf","Uint8Array","patterns","pattern","excludeDomainFromTracking","exclude_domains","domain","debug","pmwConsoleMessage","message","pro","distro","eligible_for_updates","canLoadPremiumFeatures","jQueryReadyFired","triggerDomReadyEvent","getEmailFromTarget","sendEventPayloadToServerPremium","isLoggerEnabled","logger","_len","objects","_key","_len2","_key2","pixel","pmw_event_queue","func","jQueryExists","waitForjQuery","library","interval","now","wpmDataLayerFullyLoaded","checkVar","logTimeoutId","wpHooksExists","wp","hooks","loadWcHooksFunctions","getIpVersion","ipServices","isIpAllowed","getIp","isOnBlacklist","ipVersion","maxServicesToCheck","validVersions","ipv","getIpFromAnyService","performance","ipServicesFiltered","obj","promises","getIpFromService","any","timeTaken","serviceResponseData","text","pair","isIpNotAllowed","ipName","getBlacklist","isCidr","customExclusionList","server_2_server","ip_exclude_list","addAction","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition","g","globalThis","Function","prop","hasOwnProperty","Symbol","toStringTag","main"],"sourceRoot":""}