PageSourceSearch

https://www.raritan.com/js/vendor/what-input.min.js

js raritan.com collected 2026-09-24 15:20:03 UTC 2,944 bytes, 7 lines download raw bytes

1/**
2 * what-input - A global utility for tracking the current input method (mouse, keyboard or touch).
3 * @version v4.2.0
4 * @link https://github.com/ten1seven/what-input
5 * @license MIT
6 */
7!function e(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("whatInput",[],n):"object"==typeof exports?exports.whatInput=n():t.whatInput=n()}(this,function(){return function(n){function o(e){if(i[e])return i[e].exports;var t=i[e]={exports:{},id:e,loaded:!1};return n[e].call(t.exports,t,t.exports,o),t.loaded=!0,t.exports}var i={};return o.m=n,o.c=i,o.p="",o(0)}([function(e,t){"use strict";e.exports=function(){var d="initial",s=null,o=document.documentElement,a=["input","select","textarea"],i=[],c=[16,17,18,91,93],p=[9],f={keydown:"keyboard",mousedown:"mouse",mousemove:"mouse",MSPointerDown:"pointer",MSPointerMove:"pointer",pointerdown:"pointer",pointermove:"pointer",touchstart:"touch"},t=[],v=!1,r=!1,u={x:null,y:null},n={2:"touch",3:"touch",4:"mouse"},m=!1;try{var e=Object.defineProperty({},"passive",{get:function e(){m=!0}});window.addEventListener("test",null,e)}catch(e){}var w=function e(){f[M()]="mouse",l(),y()},l=function e(){window.PointerEvent?(o.addEventListener("pointerdown",h),o.addEventListener("pointermove",x)):window.MSPointerEvent?(o.addEventListener("MSPointerDown",h),o.addEventListener("MSPointerMove",x)):(o.addEventListener("mousedown",h),o.addEventListener("mousemove",x),"ontouchstart"in window&&(o.addEventListener("touchstart",E),o.addEventListener("touchend",E))),o.addEventListener(M(),x,!!m&&{passive:!0}),o.addEventListener("keydown",h)},h=function e(t){if(!v){var n=t.which,o=f[t.type];if("pointer"===o&&(o=b(t)),d!==o||s!==o){var i=document.activeElement,r=!1,u;(i&&i.nodeName&&-1===a.indexOf(i.nodeName.toLowerCase())||-1!==p.indexOf(n))&&(r=!0),("touch"===o||"mouse"===o||"keyboard"===o&&n&&r&&-1===c.indexOf(n))&&(d=s=o,y())}}},y=function e(){o.setAttribute("data-whatinput",d),o.setAttribute("data-whatintent",d),-1===t.indexOf(d)&&(t.push(d),o.className+=" whatinput-types-"+d),L("input")},x=function e(t){if(u.x!==t.screenX||u.y!==t.screenY?(r=!1,u.x=t.screenX,u.y=t.screenY):r=!0,!v&&!r){var n=f[t.type];"pointer"===n&&(n=b(t)),s!==n&&(s=n,o.setAttribute("data-whatintent",s),L("intent"))}},E=function e(t){"touchstart"===t.type?(v=!1,h(t)):v=!0},L=function e(t){for(var n=0,o=i.length;n<o;n++)i[n].type===t&&i[n].function.call(void 0,s)},b=function e(t){return"number"==typeof t.pointerType?n[t.pointerType]:"pen"===t.pointerType?"touch":t.pointerType},M=function e(){var t=void 0;return t="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll"};return"addEventListener"in window&&Array.prototype.indexOf&&w(),{ask:function e(t){return"loose"===t?s:d},types:function e(){return t},ignoreKeys:function e(t){c=t},onChange:function e(t,n){i.push({function:t,type:n})}}}()}])});

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.