<commit_before>// http://nshipster.com/method-swizzling/
// HTMLElement Swizzle - To swizzle a method is to change a class’s dispatch table in order to resolve messages from an existing selector to a different implementation, while aliasing the original method implementation to a new selector.

// 3.2.3 HTML element constructors
// https://html.spec.whatwg.org/multipage/dom.html#html-element-constructors
// Satisfy Element interface document.createElement
//   - https://dom.spec.whatwg.org/#concept-element-interface


//// base class to extend, same trick as before
//class HTMLCustomElement extends HTMLElement {

//  constructor(_)
//    { return (_ = super(_)).init(), _; }

//  init()
//    { /* override as you like */ }
//}

  window.HTMLElement = function (constructor) {

    var E = function HTMLElement () {

      /*  console.dir (this.constructor) */
    }

    E.prototype = constructor.prototype
    E.prototype.constructor = constructor

    return E

  } (HTMLElement)

// The CustomElementRegistry Interface
// WHATWG - https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-api
//
// HTML Element Constructors
//   - https://html.spec.whatwg.org/multipage/dom.html#html-element-constructors
//
// The Custom Elements Spec
// W3C - https://w3c.github.io/webcomponents/spec/custom/
// WHATWG- https://html.spec.whatwg.org/multipage/custom-elements.htm
//
// Legacy webcomponentsjs
//   - https://github.com/webcomponents/custom-elements/blob/master/src/CustomElementRegistry.js
//
//   - CEReactions
//     - https://github.com/webcomponents/custom-elements/pull/62
//     - https://html.spec.whatwg.org/multipage/custom-elements.html#cereactions
//     - https://html.spec.whatwg.org/#cereactions


!!! window.customElements
  && (window.customElements = {/* microfill */})


new (function () {
    function CustomElementRegistry (ref ) {
  if ( ref === void 0 ) ref = customElements;
  var define = ref.define;
  var get = ref.get;
  var whenDefined = ref.whenDefined;


    window.customElements
      .define = this
        ._define (undefined) // (define)
        .bind (this)
  }

  CustomElementRegistry.prototype._define = function ( delegate ) {
    var this$1 = this;
    if ( delegate === void 0 ) delegate = function (_){};


    // this.running = undefined

    //  definition = this.swizzle ( definition );

    return function ( name, constructor, options ) { return (delegate).apply
        ( window.customElements, this$1.register ( name, constructor ) ); }
  };


  CustomElementRegistry.prototype.register = function (name, Class) {
    // perhaps this goes in swizzle
    (this [name] = Class)
      .localName = name;

    ('loading' === document.readyState)
      && document.addEventListener
        ('DOMContentLoaded', (ref = this).queue.apply ( ref, arguments ))

    return arguments
    var ref;
  };


  CustomElementRegistry.prototype.queue = function ( name, Class, constructor ) {
    var this$1 = this;

    return function (event) { return [].slice.call (document.getElementsByTagName (name))
        // .reverse () // should be able to do depth first
        .map
          (this$1.upgrade (Class)); }
  };


  // https://wiki.whatwg.org/wiki/Custom_Elements#Upgrading
  // "Dmitry's Brain Transplant"
  CustomElementRegistry.prototype.upgrade = function (constructor) {

    // Here's where we can swizzle

    return function (element) { return Object.setPrototypeOf
        (element, constructor.prototype)

      .connectedCallback
        && element.connectedCallback (); }
  };

  // http://nshipster.com/method-swizzling/
  CustomElementRegistry.prototype.swizzle = function ( name ) {
    var Class = [], len = arguments.length - 1;
    while ( len-- > 0 ) Class[ len ] = arguments[ len + 1 ];
 };

    return CustomElementRegistry;
  }())
var TokenList = function (node) {

  this
    .sift (node)
    .map(this.tokenize, this)
};

TokenList.prototype.tokenize = function (node) {
    var this$1 = this;


  var
    insert = function (node) { return function (symbol) { return (this$1 [symbol] = this$1 [symbol] || []).push (node); }; }

  void (node.text = node.textContent)
    .match (/[^{\}]+(?=})/g)
//  .match (/([^{]*?)(\w|#)(?=\})/g)
    .map (insert (node))
};

TokenList.prototype.sift = function (node) {

  var
    nodes = []
  , expression = /{(\w+|#)}/
<commit_msg>:muscle: bump TRANSPILED distribution dist/snuggsi.js<commit_after>// http://nshipster.com/method-swizzling/
// HTMLElement Swizzle - To swizzle a method is to change a class’s dispatch table in order to resolve messages from an existing selector to a different implementation, while aliasing the original method implementation to a new selector.

// 3.2.3 HTML element constructors
// https://html.spec.whatwg.org/multipage/dom.html#html-element-constructors
// Satisfy Element interface document.createElement
//   - https://dom.spec.whatwg.org/#concept-element-interface


//// base class to extend, same trick as before
//class HTMLCustomElement extends HTMLElement {

//  constructor(_)
//    { return (_ = super(_)).init(), _; }

//  init()
//    { /* override as you like */ }
//}

window.HTMLElement = (
  function (constructor) {
    var E = function () {}
    E.prototype = constructor.prototype
    return E
  }
    //E.prototype.constructor = constructor // this only checks for typeof HTMLElement
) (HTMLElement)

// The CustomElementRegistry Interface
// WHATWG - https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-api
//
// HTML Element Constructors
//   - https://html.spec.whatwg.org/multipage/dom.html#html-element-constructors
//
// The Custom Elements Spec
// W3C - https://w3c.github.io/webcomponents/spec/custom/
// WHATWG- https://html.spec.whatwg.org/multipage/custom-elements.htm
//
// Legacy webcomponentsjs
//   - https://github.com/webcomponents/custom-elements/blob/master/src/CustomElementRegistry.js
//
//   - CEReactions
//     - https://github.com/webcomponents/custom-elements/pull/62
//     - https://html.spec.whatwg.org/multipage/custom-elements.html#cereactions
//     - https://html.spec.whatwg.org/#cereactions


!!! window.customElements
  && (window.customElements = {/* microfill */})


new (function () {
  function CustomElementRegistry (ref ) {
  if ( ref === void 0 ) ref = customElements;
  var define = ref.define;
  var get = ref.get;
  var whenDefined = ref.whenDefined;


    window.customElements
      .define = this
        ._define (undefined) // (define)
        .bind (this)
  }

  CustomElementRegistry.prototype._define = function ( delegate ) {
    var this$1 = this;
    if ( delegate === void 0 ) delegate = function (_){};


    // this.running = undefined

    //  definition = this.swizzle ( definition );

    return function ( name, constructor, options ) { return (delegate).apply
        ( window.customElements, this$1.register ( name, constructor ) ); }
  };


  CustomElementRegistry.prototype.register = function (name, Class) {
    // perhaps this goes in swizzle
    (this [name] = Class)
      .localName = name;

    ('loading' === document.readyState)
      && document.addEventListener
        ('DOMContentLoaded', (ref = this).queue.apply ( ref, arguments ))

    return arguments
    var ref;
  };


  CustomElementRegistry.prototype.queue = function ( name, Class, constructor ) {
    var this$1 = this;

    return function (event) { return [].slice.call (document.getElementsByTagName (name))
        // .reverse () // should be able to do depth first
        .map
          (this$1.upgrade (Class)); }
  };


  // https://wiki.whatwg.org/wiki/Custom_Elements#Upgrading
  // "Dmitry's Brain Transplant"
  CustomElementRegistry.prototype.upgrade = function (constructor) {

    // Here's where we can swizzle

    return function (element) { return Object.setPrototypeOf
        (element, constructor.prototype)

      .connectedCallback
        && element.connectedCallback (); }
  };

  // http://nshipster.com/method-swizzling/
  CustomElementRegistry.prototype.swizzle = function ( name ) {
    var Class = [], len = arguments.length - 1;
    while ( len-- > 0 ) Class[ len ] = arguments[ len + 1 ];
 };

  return CustomElementRegistry;
}())
var TokenList = function (node) {

  this
    .sift (node)
    .map(this.tokenize, this)
};

TokenList.prototype.tokenize = function (node) {
    var this$1 = this;


  var
    insert = function (node) { return function (symbol) { return (this$1 [symbol] = this$1 [symbol] || []).push (node); }; }

  void (node.text = node.textContent)
    .match (/[^{\}]+(?=})/g)
//  .match (/([^{]*?)(\w|#)(?=\})/g)
    .map (insert (node))
};

TokenList.prototype.sift = function (node) {

  var
    nodes = []
  , expression = /{(\w+|#)}/

{'fraction_non_alphanumeric': 0.14813121499599954, 'fraction_numerical': 0.004343353526117271, 'mean_word_length': 2.91674127126231, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 22, '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': '1596310', 'n_tokens_mistral': 2726, 'n_tokens_neox': 2621, 'n_words': 617}