PageSourceSearch

https://www.kxii.com/pf/resources/dist/__global/js/gdm-user-insights.js?d=595&mxId=00000000

js kxii.com collected 2026-09-24 18:20:12 UTC 7,174 bytes, 1 lines download raw bytes

1!function(){"use strict";const t={isDebug:!1};let{isDebug:e=t.isDebug}=t;class s{constructor(t){this.parent=t,this.init()}registerCallback(){let t=!0;const e={blockedCategoryIds:["C0004"],callback:e=>{const s="OneTrust - consentCallback()";this.parent._log(s,`isAllowed: ${e.isAllowed}`),this.parent.setUpdatePermissions(e.isAllowed),e.isAllowed?t||(this.parent._log(s,"Updates Allowed, requesting user data."),this.parent.getUserData()):this.parent.removeUserData(),t=!1}},s=window._gdmOneTrust;null!=s&&s.register?s.register(e):s._pending.push(e)}init(){var t;if(this.parent._log("OneTrust - init()","running.....",""),null!==(t=window._gdmOneTrust)&&void 0!==t&&t.register)this.registerCallback();else{var e;window._gdmOneTrust=window._gdmOneTrust||{_pending:[]},this.registerCallback();const t=null===(e=window.gdmVisitorInsights)||void 0===e||null===(e=e._settings)||void 0===e?void 0:e.oneTrustConnectorSrc;if(t){const e=document.createElement("script");e.src=t,e.type="text/javascript",document.head.appendChild(e)}}}}class a{static PROCESS_NAME="gdm-user-insights--insights";static STORAGE_KEY="gdm-insights-data";static GDM_FETCH_TIMEOUT=1e4;static defaults={allowDataUpdates:!0,env:"prod",forcedPurgeDate:null,isDebug:!1,mxId:"00000000",oneTrustEnabled:!0,outputType:"default",platform:"web",ttl:24};#t;#e;constructor(t={}){const{arcSite:e,env:s=a.defaults.env,mxId:i=a.defaults.mxId,isDebug:r=a.defaults.isDebug,forcedPurgeDate:o=a.defaults.forcedPurgeDate,oneTrustEnabled:n=a.defaults.oneTrustEnabled,outputType:l=a.defaults.outputType,ttlHours:d,...u}=t||{};this.otProcessor=null,this.#t={arcSite:e,allowDataUpdates:!0,userId:null,userData:null};const c="apps"===l?"apps":a.defaults.platform,g=d&&d>0?d:a.defaults.ttl;this.#e={...u,baseUrl:`https://beacon${"sandbox"===s?"-stage":""}.gtv-pub.com`,forcedPurgeDate:o,isDebug:r,oneTrustEnabled:n,pagebuilderEnv:{arcSite:e,env:s,mxId:i,outputType:l},platform:c,ttl:g},this.init()}_log(t,...e){this.#e.isDebug&&console.debug(`[${a.PROCESS_NAME}]${t?`[${t}]`:""}`,...e)}getUpdatePermissions(){return this.#t.allowDataUpdates}setUpdatePermissions(t){this.#t.allowDataUpdates=t}async getNewGdmIdData(){var t;const e="getNewGdmIdData()";this._log(e);const s=this.#e.baseUrl;this._log(e,"fetchUrl",s);const i=new AbortController,r=setTimeout(()=>i.abort(),a.GDM_FETCH_TIMEOUT);return null===(t=window)||void 0===t?void 0:t.fetch(s,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({...this.#t.userId?{"source-id":this.#t.userId}:null,"site-id":this.#t.arcSite,platform:this.#e.platform}),signal:i.signal}).then(t=>{if(clearTimeout(r),!t.ok)throw new Error("Network response was not ok",{cause:["An http error was thrown:","Details: ",`\tstatus: ${(null==t?void 0:t.status)||"NA"}`,`\tstatusText: ${(null==t?void 0:t.statusText)||"NA"}`].join("\n")});return t.json()}).then(t=>t).catch(t=>(clearTimeout(r),"AbortError"===t.name?console.error(`Fetch request timed out in ${a.GDM_FETCH_TIMEOUT/1e3} second(s).`):console.error("Fetch Error:",t),null))}async getNewIdData(){this._log("getNewIdData()");const s=await(async s=>(e=(null==s?void 0:s.isDebug)||t.isDebug,(()=>{const t=!("undefined"==typeof window);return t&&e&&console.log("---- fingerprintJs conditions met, loading cdn script ----"),t})()?(async(t="oXCSsizF6vQNYHkgIdts")=>(await(import(`https://fpjscdn.net/v3/${t}`))).load())():null))({isDebug:this.#e.isDebug});return null!=s&&s.get?s.get({extendedResult:!0}):null}loadCachedUser(){const t="loadCachedUser()",e=localStorage.getItem(a.STORAGE_KEY);if(e)try{const s=JSON.parse(e);this._log(t,"Loading user data from local storage: ",s),null!=s&&s._id?(this.#t.userId=s._id,this.#t.userData=s):this.#t.userId=(null==s?void 0:s["source-id"])||null,this.removeExpiredUserData(),this.removeLegacyUserData(),this.#t.userData&&this._log(t,"State updated with cached user data.",this.#t.userData)}catch{this._log(t,"Data was corrupt or invalid.")}}removeExpiredUserData(){var t;const e="removeExpiredUserData()";if(null!==(t=this.#t)&&void 0!==t&&t.userData){var s;const t=null===(s=this.#t)||void 0===s?void 0:s.userData;if(Date.now()>(null==t?void 0:t.expiry))this._log(e,"User data is expired. Removing user."),this.removeUserData();else{const s=this.#e.forcedPurgeDate;s&&((t,e)=>{try{return new Date(t).getTime()<=new Date(e).getTime()}catch(t){return!1}})(t.timestamp,s)&&(this._log(e,`Data timestamp (${t.timestamp}) is before or equal to the forced data purge date (${s}).`),this.removeUserData())}}}removeLegacyUserData(){const t="removeLegacyUserData()",e="gdm-insights-fingerprint";try{localStorage.getItem(e)&&(localStorage.removeItem(e),this._log(t,`Removing legacy data with ${e} key.`))}catch(e){this._log(`${t}`,"ERROR",e)}}removeUserData(){const t="removeUserData()";let e=!1;const s=localStorage.getItem(a.STORAGE_KEY);if(!s)return!0;this._log(t,"Removing data for visitor"),e=!s;try{localStorage.removeItem(a.STORAGE_KEY),this.#t.userId&&localStorage.setItem(a.STORAGE_KEY,JSON.stringify({"source-id":this.#t.userId})),e=!0}catch{e=!1}return this._log(t,"Result: "+(e?"Success":"Failure")),e&&(this.#t.userData=null),e}async saveUserData(t){return new Promise((e,s)=>{const{visitorId:i,"source-id":r}=t||{};if(!r&&!i)return s(new Error("Missing visitorId and/or source-id"));const o=r||i,n={_id:o,expiry:Date.now()+(l=this.#e.ttl,60*l*60*1e3),originalData:t,timestamp:(new Date).toISOString(),...i?{visitorId:i}:null,...r?{"source-id":r}:null};var l;try{localStorage.setItem(a.STORAGE_KEY,JSON.stringify(n)),this.#t.userData=n,this.#t.userId=o,e(n)}catch(t){s(t)}return null})}async getUserData(){var t;const e="getUserData()";if(this.loadCachedUser(),null!==(t=this.#t)&&void 0!==t&&null!==(t=t.userData)&&void 0!==t&&t._id)return this._log(e,"cachedData: ",this.#t.userData),this.#t.userData;if(!this.#t.allowDataUpdates)return this._log(e,"allowDataUpdates is set to false: ","returning null for userData"),null;const s=await this.getNewGdmIdData(),a=await this.saveUserData(s).then(t=>t).catch(t=>(console.error("Caught saveUserData() error:",t),{_id:null,visitorId:null,"
1source-id":null,error:t}));return this._log(e,"savedData",a),a}async init(){const t="init()";this._log(t,"Settings initialized",this.#e),this.loadCachedUser(),this.#e.oneTrustEnabled&&(this.otProcessor??=new s(this)),await this.getUserData(),this._log(t,"State initialized",this.#t)}}var i;(({isDebug:t=!1})=>{(t=>{var e;const s=null===(e=document)||void 0===e?void 0:e.readyState;"complete"===s||"interactive"===s?requestAnimationFrame(()=>requestAnimationFrame(t)):window.addEventListener("DOMContentLoaded",()=>{requestAnimationFrame(()=>requestAnimationFrame(t))})})(()=>{t&&console.debug("DOM painted, now executing script"),(async(t={})=>{var e;const s=t.isDebug||!1,i=(null===(e=window)||void 0===e||null===(e=e.gdmVisitorInsights)||void 0===e?void 0:e._settings)||{};s&&console.debug("--- gdm user insights script initiated ---");const r=new a({isDebug:s,...i});window.gdmVisitorInsights=r})({isDebug:t})})})({isDebug:"true"===new URLSearchParams(null===(i=window)||void 0===i||null===(i=i.location)||void 0===i?void 0:i.search).get("debug-gdm-insights")})}();

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.