PageSourceSearch

https://www.baccarat.com/on/demandware.static/Sites-INT-Site/-/en/v1789546422553/js/errorTrackerCBT.js

js baccarat.com collected 2026-09-24 18:10:54 UTC 2,721 bytes, 1 lines download raw bytes

1!function(){"use strict";var r={1466:function(r){r.exports=function(r){"function"==typeof r?r():"object"==typeof r&&Object.keys(r).forEach(function(t){"function"==typeof r[t]&&r[t]()})}},5223:function(){class r{static sentErrors=new Set;static dataLayerPush(r){window.dataLayer=window.dataLayer||[],window.dataLayer.push(r)}static pushError(r,t,e){if(!r)return;const s=`${t}:${r}:${e||"global"}`;this.sentErrors.has(s)||(this.sentErrors.add(s),this.dataLayerPush({event:"error_displayed",error_type:t||"validation_error",error_message:r}))}static getErrorType(r={}){return r.isPayment?"payment_error":r.isForm?"validation_error":(r.isAjax,"technical_error")}static initDOMWatcher(){new MutationObserver(r=>{r.forEach(r=>{let t=r.target;if(t instanceof HTMLElement){if(t.classList?.contains("adyen-checkout__error-text")){const r=t.innerText?.trim();if(r){const e=this.getErrorType({isPayment:!0}),s=t.closest(".adyen-checkout__field")?.className;this.pushError(r,e,s)}return}if(t.classList?.contains("invalid-feedback")){const r=t.innerText?.trim();if(r&&null!==t.offsetParent){const t=this.getErrorType({isForm:!0});this.pushError(r,t)}return}if(t.classList?.contains("is-invalid")){const r=t.closest(".form-group");if(!r)return;const e=r.querySelector(".invalid-feedback");if(e&&e.innerText.trim())return;const s=r.querySelector("label"),i=`${s?.innerText?.trim()||"Field"} is invalid`,n=this.getErrorType({isForm:!0});this.pushError(i,n)}}})}).observe(document.body,{subtree:!0,childList:!0,attributes:!0,characterData:!0,attributeFilter:["class","aria-invalid"]})}static initAjaxListener(){window.jQuery&&$(document).ajaxComplete((r,t)=>{try{const r=t.responseJSON;if(!r||!r.error)return;let e=[];r.fieldErrors&&(e=e.concat(Object.values(r.fieldErrors).flat())),r.formErrors&&(e=e.concat(r.formErrors)),r.serverErrors&&r.serverErrors.length&&(e=e.concat(r.serverErrors)),!e.length&&r.errorMessage&&e.push(r.errorMessage),!e.length&&r.message&&e.push(r.message);const s="CheckoutServices-SubmitPayment"===r.action||!!r.paymentMethod||Array.isArray(r.serverErrors)&&r.serverErrors.some(r=>"string"==typeof r&&/card|payment|credit/i.test(r))||"string"==typeof r.errorMessage&&/payment|card|credit/i.test(r.errorMessage)?this.getErrorType({isPayment:!0}):this.getErrorType({isAjax:!0});e.forEach(t=>{"string"==typeof t&&t.trim()&&this.pushError(t.trim(),s,r.action||"ajax")})}catch(r){}})}static init(){this.initDOMWatcher(),this.initAjaxListener()}}window.addEventListener("DOMContentLoaded",()=>{r.init()})}},t={};function e(s){var i=t[s];if(void 0!==i)return i.exports;var n=t[s]={exports:{}};return r[s](n,n.exports,e),n.exports}const s=e(1466);document.addEventListener("DOMContentLoaded",function(){s(e(5223))})}();

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.