<commit_before>const base = document.querySelector('#fallback-js').dataset.base;

// check for jQuery presence
!!window.jQuery || document.write('<script src="' + (base || '') + '/assets/js/vendor/jquery.min.js"><\/script>');

// check for Promise support
!!window.Promise || document.write('<script src="' + (base || '') + '/assets/js/vendor/promise.min.js"><\/script>');

if (!window.location.origin) {
  window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');
}

window.requestIdleCallback =
  window.requestIdleCallback ||
  function(cb) {
    const start = Date.now();
    return setTimeout(() => {
      cb({
        didTimeout: false,
        timeRemaining: () => {
          return Math.max(0, 50 - (Date.now() - start));
        }
      });
    }, 1);
  }

window.cancelIdleCallback =
  window.cancelIdleCallback ||
  function(id) {
    clearTimeout(id);<commit_msg>update fallback.js<commit_after>// current script src dir
const src = [].slice.call(document.querySelectorAll('script'), 0).pop().src.replace(/\/[^\/]+$/, '');

// demonstrate javascript support
const html = document.documentElement;
html.classList.remove('no-js');
html.classList.add('js');

// check for jQuery presence
!!window.jQuery || document.write(`<script src="${src}/vendor/jquery.min.js"><\/script>`);

// check for Promise support
!!window.Promise || document.write(`<script src="${src}/vendor/promise.min.js"><\/script>`);

// check for object-fit support
!!('objectFit' in html.style) || (html.classList.add('no-objectfit'), document.write(`<script src="${src}/vendor/objectFitPolyfill.basic.min.js"><\/script>`));

// check for location origin support (mostly IE)
if (!window.location.origin) {
  window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');
}

// fallback for requestIdleCallback
window.requestIdleCallback =
  window.requestIdleCallback ||
  function(cb) {
    const start = Date.now();
    return setTimeout(() => {
      cb({
        didTimeout: false,
        timeRemaining: () => {
          return Math.max(0, 50 - (Date.now() - start));
        }
      });
    }, 1);
  }

// fallback for cancelIdleCallback
window.cancelIdleCallback =
  window.cancelIdleCallback ||
  function(id) {
    clearTimeout(id);
{'fraction_non_alphanumeric': 0.19095477386934673, 'fraction_numerical': 0.0037688442211055275, 'mean_word_length': 3.6388349514563108, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7030787', 'n_tokens_mistral': 736, 'n_tokens_neox': 728, 'n_words': 133}