<commit_before>namespace Mist {

  export namespace Recognizer {

    /**
    * @class Detail
    * @namespace Recognizer
    */
    export class Detail {

      /**
      * @access public
      */
      client: { x: number, y: number } = { x: 0, y: 0 };

      /**
      * @access public
      */
      move: { x: number, y: number } = { x: 0, y: 0 };

      /**
      * @access public
      */
      page: { x: number, y: number } = { x: 0, y: 0 };

      /**
      * @access public
      */
      passed: number;

      /**
      * @access public
      */
      screen: { x: number, y: number } = { x: 0, y: 0 };

      /**
      * @access public
      */
      mpms: number;

      /**
      * @access public
      */
      vector: number;

      /**
      * @constructor
      * @param {} src
      * @param {} prev?
      */
      constructor(
        src
        : MouseEvent,
        prev?
        : MouseEvent
        );

      /**
      * @constructor
      * @param {} src
      * @param {} prev?
      */
      constructor(
        src
        : TouchEvent,
        prev?
        : TouchEvent
        );

      /**
      * @constructor
      * @param {} src
      * @param {} prev?
      */
      constructor(
        src
        : Event,
        prev?
        : Event
        );

      /**
      * @constructor
      * @param {} src
      * @param {} prev?
      */
      constructor(

        private src
        : any,
        private prev?
        : any
        ) {

        // mapped.
        if (src instanceof MouseEvent) {
          // no response.
          this.mouse(src, prev);
        } else if (src instanceof TouchEvent) {
          // no response.
          this.touch(src, prev);
        }
      }

      /**
      * @param {} src
      * @param {} prev
      */
      private mouse(

        src
        : MouseEvent,
        prev?
        : MouseEvent
        ) {

        var f = prev;
        var t = src;

        // passed milliseconds.

        var s = prev ? src.timeStamp - prev.timeStamp : 0;

        var x = prev ? t.pageX - f.pageX : 0;
        var y = prev ? t.pageY - f.pageY : 0;

        var v = Math.sqrt(x * x + y * y);

        // initialize.

        this.set(t, s, x, y, v);
      }

      /**
      * @param {} t
      * @param {} s
      * @param {} x
      * @param {} y
      * @param {} v
      */
      private set(

        t: any,
        s: number,
        x: number,
        y: number,
        v: number
        ) {

        this.client.x = t.clientX;
        this.client.y = t.clientY;

        this.move.x = x;
        this.move.y = y;

        this.mpms = s ? v / s : 0;

        this.page.y = t.pageX;
        this.page.y = t.pageY;

        this.passed = s;

        this.screen.x = t.screenX;
        this.screen.y = t.screenY;

        this.vector = v;
      }

      /**
      * @param {} src
      * @param {} prev
      */
      private touch(

        src
        : TouchEvent,<commit_msg>Bug fix, typo page.y -> page.x.<commit_after>namespace Mist {

  export namespace Recognizer {

    /**
    * @class Detail
    * @namespace Recognizer
    */
    export class Detail {

      /**
      * @access public
      */
      client: { x: number, y: number } = { x: 0, y: 0 };

      /**
      * @access public
      */
      move: { x: number, y: number } = { x: 0, y: 0 };

      /**
      * @access public
      */
      page: { x: number, y: number } = { x: 0, y: 0 };

      /**
      * @access public
      */
      passed: number;

      /**
      * @access public
      */
      screen: { x: number, y: number } = { x: 0, y: 0 };

      /**
      * @access public
      */
      mpms: number;

      /**
      * @access public
      */
      vector: number;

      /**
      * @constructor
      * @param {} src
      * @param {} prev?
      */
      constructor(
        src
        : MouseEvent,
        prev?
        : MouseEvent
        );

      /**
      * @constructor
      * @param {} src
      * @param {} prev?
      */
      constructor(
        src
        : TouchEvent,
        prev?
        : TouchEvent
        );

      /**
      * @constructor
      * @param {} src
      * @param {} prev?
      */
      constructor(
        src
        : Event,
        prev?
        : Event
        );

      /**
      * @constructor
      * @param {} src
      * @param {} prev?
      */
      constructor(

        private src
        : any,
        private prev?
        : any
        ) {

        // mapped.
        if (src instanceof MouseEvent) {
          // no response.
          this.mouse(src, prev);
        } else if (src instanceof TouchEvent) {
          // no response.
          this.touch(src, prev);
        }
      }

      /**
      * @param {} src
      * @param {} prev
      */
      private mouse(

        src
        : MouseEvent,
        prev?
        : MouseEvent
        ) {

        var f = prev;
        var t = src;

        // passed milliseconds.

        var s = prev ? src.timeStamp - prev.timeStamp : 0;

        var x = prev ? t.pageX - f.pageX : 0;
        var y = prev ? t.pageY - f.pageY : 0;

        var v = Math.sqrt(x * x + y * y);

        // initialize.

        this.set(t, s, x, y, v);
      }

      /**
      * @param {} t
      * @param {} s
      * @param {} x
      * @param {} y
      * @param {} v
      */
      private set(

        t: any,
        s: number,
        x: number,
        y: number,
        v: number
        ) {

        this.client.x = t.clientX;
        this.client.y = t.clientY;

        this.move.x = x;
        this.move.y = y;

        this.mpms = s ? v / s : 0;

        this.page.x = t.pageX;
        this.page.y = t.pageY;

        this.passed = s;

        this.screen.x = t.screenX;
        this.screen.y = t.screenY;

        this.vector = v;
      }

      /**
      * @param {} src
      * @param {} prev
      */
      private touch(

        src
        : TouchEvent,
{'fraction_non_alphanumeric': 0.1404040404040404, 'fraction_numerical': 0.00404040404040404, 'mean_word_length': 1.0152645861601086, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '6254357', 'n_tokens_mistral': 1955, 'n_tokens_neox': 1855, 'n_words': 465}