1/* AFL UTM Tracker v2.18.0 | 20241104 | Copyright 2020-2024 Appfromlab Pte Ltd | GPLv3 License | @preserve */ 2/* JavaScript Cookie v2.2.1 | Copyright 2006, 2015 Klaus Hartl & Fagner Brack | MIT license | @preserve */ 3!function(t){var e,n,o;"function"==typeof define&&define.amd&&(define(t),e=!0),"object"==typeof exports&&(module.exports=t(),e=!0),e||(n=window.CookiesAFL,(o=window.CookiesAFL=t()).noConflict=function(){return window.CookiesAFL=n,o})}(function(){function c(){for(var t=0,e={};t<arguments.length;t++){var n,o=arguments[t];for(n in o)e[n]=o[n]}return e}function _(t){return t.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}return function t(u){function a(){}function n(t,e,n){if("undefined"!=typeof document){"number"==typeof(n=c({path:"/"},a.defaults,n)).expires&&(n.expires=new Date(+new Date+864e5*n.expires)),n.expires=n.expires?n.expires.toUTCString():"";try{var o=JSON.stringify(e);/^[\{\[]/.test(o)&&(e=o)}catch(t){}e=u.write?u.write(e,t):encodeURIComponent(String(e)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var i,r="";for(i in n)n[i]&&(r+="; "+i,!0!==n[i]&&(r+="="+n[i].split(";")[0]));return document.cookie=t+"="+e+r}}function e(t,e){if("undefined"!=typeof document){for(var n={},o=document.cookie?document.cookie.split("; "):[],i=0;i<o.length;i++){var r=o[i].split("="),a=r.slice(1).join("=");e||'"'!==a.charAt(0)||(a=a.slice(1,-1));try{var c=_(r[0]),a=(u.read||u)(a,c)||_(a);if(e)try{a=JSON.parse(a)}catch(t){}if(n[c]=a,t===c)break}catch(t){}}return t?n[t]:n}}return a.set=n,a.get=function(t){return e(t,!1)},a.getJSON=function(t){return e(t,!0)},a.remove=function(t,e){n(t,"",c(e,{expires:-1}))},a.defaults={},a.withConverter=t,a}(function(){})}), 4function(){function p(t,e,n){return"object"==typeof t&&e in t?t[e]:n}function d(t,e){t=function(t,e){var n;try{"function"==typeof CustomEvent?n=new CustomEvent(t,{detail:e}):((n=document.createEvent("Event")).initEvent(t,!1,!0),n.detail=e)}catch(t){}return n}(t,e);document.dispatchEvent(t)}function m(t,e){!function(t,e){if(t in P.config_validator)return P.config_validator[t](e);return 1}(t=String(t),e)||(P.config[t]=e)}function h(t){var e=null;return e=P.config.hasOwnProperty(t)?P.config[t]:e}function t(t){return Number.isInteger(t)}function e(e){if("object"!=typeof e)return!1;var t;["ajax_url","action","nonce","cookie_prefix","cookie_consent_category","cookie_renewal","wp_consent_api_enabled","attr_first_non_utm","bots","js_autorun","consent_addon","active_attribution","js_merge_tag","gtm_push","cookie_force_reset_ts"].forEach(function(t){t in e&&m(t,e[t])}),"cookie_expiry"in e&&"days"in e.cookie_expiry&&(m("cookie_expiry",t=parseInt(e.cookie_expiry.days)),m("cookie_expiry_reset",t)),"last_touch_window"in e&&m("last_touch_window",parseInt(e.last_touch_window)),"domain_info"in e&&("domain"in e.domain_info&&m("cookie_domain",e.domain_info.domain),"path"in e.domain_info&&m("cookie_domain_path",e.domain_info.path))}function n(){m("cookie_expiry",h("cookie_expiry_reset"))}function o(t,e){P.callbacks[t]=e}function i(t){return t in P.callbacks?P.callbacks[t]:function(){}}function w(t,e){t=String(t),P.flags[t]=!!e}function g(t){var e=!1;return e=void 0!==P.flags[t]?P.flags[t]:e}function v(){if(g("init"))return!0;w("init",!0),m("timestamp",Math.floor((new Date).getTime()/1e3)),o("has_consent",X),I(),Z(),d("afl_wc_utm_event_init",{})}function r(){w("run",!0);var t=i("has_consent");("function"==typeof t&&t()?a:c)(),d("afl_wc_utm_event_run",{})}function a(){g("init")||v(),w("optin",!0);var t=parseInt(h("cookie_force_reset_ts")),o=(0<t&&(0<(n=q("sess_ts",0))&&n<=t&&(F(),w("cookie_force_reset",!0))),A()),e=(void 0!==o.updated_ts?(e=parseInt(o.updated_ts),Number.isInteger(e)&&(o.updated_ts=e)):(o={updated_ts:h("timestamp")},w("cookie_has_update",!0)),h("cookie_expiry")),n="cookie_expiry",t=0,i=!1,e=(void 0!==o.cookie_expiry?t=o.cookie_expiry:x(n)||(t=L(n)),t=parseInt(t),(isNaN(t)||t<=0)&&(t=e),e<t&&(t=e,i=!0),o.cookie_expiry=parseInt(t),m("cookie_expiry",o.cookie_expiry),I(),["sess","utm_1st","utm"].forEach(function(t,e){var n;x(t+"_visit")||(n=parseInt(L(t+"_visit")),Number.isInteger(n)&&(o[t+"_ts"]=n))}
4),"object"==typeof(n=h("clid"))&&n.forEach(function(t,e){var n;x(t+"_visit")||(n=parseInt(L(t+"_visit")),Number.isInteger(n)&&(o[t+"_ts"]=n))}),o.consent_type=h("consent_type"),o.reset=g("cookie_force_reset")?1:0,C(o),h("deprecated_cookies")),r=(e&&e.forEach(function(t){j(t)}),i&&H(),h("timestamp")),a=h("last_touch_window"),c=document.location.href,t=document.referrer,i="sess_landing",u="utm_1st_url",_="utm_url",s=A(),i=(x(i)&&(E(i,c),s.sess_ts=r,""===t||k(t)||E("sess_referer",t),w("cookie_has_update",!0)),b(c,"utm_source")&&(x(u)?(E(u,c),s.utm_1st_ts=r,E(_,c),s.utm_ts=r,w("cookie_has_update",!0)):(i=p(s,"utm_ts",0),((t=L(_))!==c||t===c&&a<r-i)&&(E(_,c),s.utm_ts=r,w("cookie_has_update",!0)))),h("clid").forEach(function(t,e){var n,o;""!==b(c,t)&&(n=p(s,t+"_ts",0),((o=L(t+"_url"))!==c||o===c&&a<r-n)&&(E(t+"_url",c),s[t+"_ts"]=r,w("cookie_has_update",!0)))}),"force"!==h("cookie_renewal")||g("cookie_has_update")||(u=new Date(1e3*P.config.timestamp),t=new Date(1e3*s.updated_ts),(86400<=Math.abs(P.config.timestamp-s.updated_ts)||0<Math.abs(u.getDate()-t.getDate()))&&w("cookie_has_update",!0)),C(s),L("sess_landing")),_=L("sess_referer"),f=A(),u=p(f,"sess_ts",0),t=(D(),U("status","0"),U("landing_page",{url:i,ts:u}),U("referer",{url:_}),L("utm_1st_url")),l={};t?(l=y(t)).ts=p(f,"utm_1st_ts",0):"1"===h("attr_first_non_utm")?((l=y(i)).ts=p(f,"sess_ts",0),""==_||k(_)?(""==l.utm_source&&(l.utm_source="direct"),""==l.utm_medium&&(l.utm_medium="none")):(t=(t=M(_))||"unknown",""==l.utm_source&&(l.utm_source=t),""==l.utm_medium&&(l.utm_medium=T(t)?"organic":"referral")),"string"==typeof(l=function(e){if("url"in e){var t=h("utm"),n=h("utm_prefix"),o=!1;try{var i=new URL(e.url);t.forEach(function(t){t=n+t;i.searchParams.has(t)||""===e[t]||(i.searchParams.set(t,e[t]),o=!0)}),o&&(e.url=i.href)}catch(t){}}return e}(l)).url&&""!=l.url&&(E("utm_1st_url",l.url),R("utm_1st_ts",u),w("cookie_has_update",!0))):(l=y("")).ts=0,U("utm_first_touch",l),(i=L("utm_url"))?((_=y(i)).ts=p(f,"utm_ts",0),U("utm_last_touch",_)):(U("utm_last_touch",l),"string"==typeof l.url&&""!=l.url&&(E("utm_url",l.url),R("utm_ts",u),w("cookie_has_update",!0))),h("clid").forEach(function(t,e){var n=L(t+"_url");U(t,{url:n,ts:void 0!==f[t+"_ts"]?f[t+"_ts"]:0,clid:b(n,t)})}),U("status","1"),w("attribution",!0),d("afl_wc_utm_event_attribution_set",{detail:{attribution:afl_wc_utm_public.attribution}}),Q(),O({event:"afl_wc_utm.optin",afl_wc_utm:S()}),g("cookie_has_update")&&N(),w("optout",!1),d("afl_wc_utm_event_optin",{})}function c(){g("init")||v(),w("optout",!0),D(),F(),n(),V(),O({event:"afl_wc_utm.optout",afl_wc_utm:void 0}),h("active_attribution")&&h("nonce")&&g("optin")&&N(),w("optin",!1),d("afl_wc_utm_event_optout",{})}function f(){return"1"===h("js_autorun")}function l(t){var e=h("bots");return"string"!=typeof t&&(t=""),0<e.length&&0<t.length&&-1!==t.search(new RegExp(e,"i"))}function k(t){var e=null;return""!==t&&(e=(t=t.replace(/(^\w+:|^)\/\//,"")).substr(0,location.hostname.length)),location.hostname===e}function T(t){var e,n=h("search_engines");for(e in n)if(t.match(n[e]))return!0;return!1}function M(t){var e="";return e=""!==t?(t=t.match(/^https?\:\/\/([^\/:?#]+)(?:[\/:?#]|$)/i))&&t[1]:e}function J(){var t="";return t="navigator"in window&&"userAgent"in window.navigator?window.navigator.userAgent:t}function b(t,e){var n="";if("string"==typeof t&&""!=t)if("URLSearchParams"in window)try{var o=new URL(t),i=new URLSearchParams(o.search).get(e),n=null===i?"":i}catch(t){n=""}else{e=e.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");o=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);n=null===o?"":o[1]}return n}function B(t,e){var n="";try{var o=new URL(t);switch(e){case"hash":case"host":case"hostname":case"href":case"origin":case"pathname":case"protocol":case"search":n=o[e];break;case"clean":n=o.protocol+"//"+o.hostname+o.pathname}}catch(t){n=""}return n}function y(n){var o={url:n},t=h("utm"),i=h("utm_prefix");if("object"!=typeof t||"string"!=typeof n||""===n)t.forEach(function(t){o[i+t]=""});else if("URLSearchParams"in window)try{var e=new URL(n),r=new URLSearchParams(e.search);t.forEach(function(t){var t=i+t,e=r.get(t);o[t]=null===e?"":e})}catch(t){}else t.forEach(function(t){var t=i+t,e=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(n);o[t]=null===e?"":e[1]});return o}function u(){return P.config.cookie_prefix}function x(t){t=CookiesAFL.get(u()+t);return void 0===t||""===t||null===t}function E(t,e){CookiesAFL.set(u()+t,e,$())}function L(t){t=CookiesAFL.get(u()+t);return void 0!==t?t:""}function j(t){CookiesAFL.remove(u()+t,$())}function C(t){"object"==typeof t&&E("main",JSON.stringify(t))}function A(){var t=L("main");return"string"==typeof t&&""!==t?JSON.parse(t):""}function R(t,e){var n=A();n[t]=e,C(n)}function q(t,e){return p(A(),t,e)}
4function I(){m("cookie_attributes",{expires:h("cookie_expiry"),secure:!0,domain:h("cookie_domain"),path:h("cookie_domain_path")})}function $(){return P.config.cookie_attributes}function U(t,e){"undefined"!=typeof afl_wc_utm_public&&(afl_wc_utm_public.attribution[t]=e)}function S(){return"undefined"!=typeof afl_wc_utm_public&&void 0!==afl_wc_utm_public.attribution?afl_wc_utm_public.attribution:null}function F(){var t=h("cookies");t&&t.forEach(function(t){j(t)})}function H(t){void 0!==t&&(m("cookie_expiry",t),I());var e=h("cookies");e&&(e.forEach(function(t){var e=L(t);void 0!==e&&""!==e&&null!==e&&E(t,e)}),x("main")||((e=A()).cookie_expiry=t,C(e)),w("cookie_has_update",!0))}function D(){"undefined"!=typeof afl_wc_utm_public&&(w("attribution",!1),afl_wc_utm_public.attribution={status:"0"})}function N(){var t,e;"0"!==h("cookie_renewal")&&(t="action="+encodeURIComponent(h("action"))+"&nonce="+encodeURIComponent(h("nonce")),(e=new XMLHttpRequest).open("POST",h("ajax_url"),!0),e.setRequestHeader("Content-type","application/x-www-form-urlencoded"),e.onload=function(){d("afl_wc_utm_event_send_ajax_onload",{detail:{response:e.response}})},e.send(t)),w("cookie_has_update",!1)}function _(){return"1"===h("wp_consent_api_enabled")&&"wp-consent-api"===h("consent_addon")}function X(){var t;return!_()||!("waitfor_consent_hook"in consent_api&&consent_api.waitfor_consent_hook&&void 0===window.wp_consent_type)&&(t=h("cookie_consent_category"),!("function"!=typeof wp_has_consent||!wp_has_consent(t)))}function Z(){var t,e;_()&&(t="wp_listen_for_consent_change",e=z,document.addEventListener?document.addEventListener(t,e):document.attachEvent&&document.attachEvent(t,e))}function z(t){var e=t.detail;if(h("cookie_consent_category"))for(var n in e)e.hasOwnProperty(n)&&n===afl_wc_utm_public.cookie_consent_category&&r()}function G(t,e){var n=t.split(":",2);if(2<=n.length)switch(n[0]){case"afl_utm_js":e=function(e){var n="",o=S();if(0===e.search("utm_"))var t=e.replace("_1st",""),t=0<e.search("_url")?"url":t,n=0<e.search("_1st")?t in o.utm_first_touch?o.utm_first_touch[t]:"":t in o.utm_last_touch?o.utm_last_touch[t]:"";else if(0===e.search("sess_"))switch(e){case"sess_landing":n=o.landing_page.url;break;case"sess_referer":n=o.referer.url}else{t=h("clid");Array.isArray(t)&&t.forEach(function(t){t in o&&"clid"in o[t]&&(0===e.search(t+"_url")?n=o[t].url:0===e.search(t+"_value")&&(n=o[t].clid))})}return n}(n[1]);break;case"param":e=b(e,n[1]);break;case"url":e=B(e,n[1])}return e}function K(t){var e="",n="string"==typeof(n=t)&&-1!==n.search("afl_utm_js:")&&n.split("|",2);return!1===n?t:(n.forEach(function(t){e=G(t,e)}),e)}function Q(){"0"!==h("js_merge_tag")&&(W().forEach(function(t){for(var e,n,o=0;o<t.length;o++)"value"in t[o]&&((n=K(e=null!==(e=t[o].getAttribute("data-afl_utm_js"))?e:t[o].value))!==e&&(t[o].setAttribute("data-afl_utm_js",e),t[o].value=n))}),d("afl_wc_utm_event_merge_tag_optin"))}function V(){"0"!==h("js_merge_tag")&&(W().forEach(function(t){for(var e=0;e<t.length;e++)"value"in t[e]&&(t[e].value="")}),d("afl_wc_utm_event_merge_tag_optout"))}function W(){return[document.querySelectorAll('input[value^="afl_utm_js:"], input[data-afl_utm_js]')]}function O(t){"1"===h("gtm_push")&&(window.dataLayer=window.dataLayer||[],dataLayer.push(t))}var P;function s(){window.AFLUTMTracker.autorun()}function Y(){return"interactive"===document.readyState||"complete"===document.readyState}void 0===window.AFLUTMTracker&&(window.AFLUTMTracker=(P={flags:{autorun:0,configured:0,init:0,run:0,optin:0,optout:0,cookie_has_update:0,attribution:0,cookie_force_reset:0}
4,config:{js_autorun:"1",timestamp:0,cookie_prefix:"afl_wc_utm_",cookie_expiry:90,cookie_expiry_reset:90,cookie_consent_category:"statistics",cookie_renewal:"force",cookie_domain:"",cookie_domain_path:"",cookie_attributes:"",last_touch_window:1800,utm_prefix:"utm_",utm:["source","medium","campaign","term","content","id","source_platform","creative_format","marketing_tactic"],clid:["gclid","fbclid","msclkid"],bots:"(googlebot|bingbot|yandexbot|slurp|spider|robot|bot.html|bot.htm|facebookbot|facebookexternalhit|twitterbot|storebot|microsoftpreview|ahrefsbot|semrushbot|siteauditbot|splitsignalbot)",cookies:["main","sess_landing","sess_referer","utm_1st_url","utm_url","gclid_url","fbclid_url","msclkid_url"],deprecated_cookies:["cookie_expiry","sess_visit","utm_1st_visit","utm_visit","gclid_visit","fbclid_visit","msclkid_visit"],search_engines:[/^(www\.)?google\.\w+/i,/^(www\.)?bing\.\w+/i,/(search.yahoo\.\w+)$/i,/^(www\.)?yahoo\.\w+/i,/^(www\.)?baidu\.\w+/i,/^(www\.)?yandex\.\w+/i,/^(www\.)?duckduckgo\.\w+/i,/(search.brave\.\w+)$/i],ajax_url:"",nonce:"",action:"",wp_consent_api_enabled:"0",consent_addon:"",consent_type:"optout",merge_tag:"0"},config_validator:{timestamp:t,cookie_expiry:t,last_touch_window:t},callbacks:{has_consent:function(){return!0}}},{autorun:function(){if(g("autorun"))return!0;if(w("autorun",!0),e("object"==typeof afl_wc_utm_public?afl_wc_utm_public:{}),w("configured",!0),d("afl_wc_utm_event_configured",{}),!f()||l(J()))return!1;v(),r()},init:v,run:r,optin:a,optout:c,helper:{is_autorun:f,set_config:m,get_config:h,map_config:e,reset_cookie_expiry_config:n,set_callback:o,get_callback:i,get_flag:g,set_flag:w,is_cookie_empty:x,set_cookie:E,get_cookie:L,delete_cookie:j,get_cookie_main:A,set_cookie_main:C,get_cookie_main_property:q,set_cookie_main_property:R,set_attribution:U,get_attribution:S,reset_attribution:D,delete_attribution_cookies:F,renew_attribution_cookies:H,is_bot:l,is_self_referrer:k,is_traffic_organic:T,get_hostname:M,get_user_agent:J,get_url_parameter:b,parse_url:B,send_ajax:N},wp_consent_api:{is_enabled:_,has_consent:X,register_event:Z},merge_tag:{optin:Q,optout:V,replace:K},gtm:{push:O}}),Y()?s():document.addEventListener?document.addEventListener("DOMContentLoaded",s):document.attachEvent("onreadystatechange",function(){Y()&&s()}))}();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.