PageSourceSearch

https://petersonbc.com/wp-content/themes/full/assets/scripts/build/cursor-indicator-bundled.js?ver=1788897320

js petersonbc.com collected 2026-10-09 21:43:46 UTC 4,778 bytes, 37 lines download raw bytes

1"use strict";
2/*
3 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
4 * This devtool is neither made for production nor for readable output files.
5 * It uses "eval()" calls to create a separate source file in the browser devtools.
6 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
7 * or disable the default devtool with "devtool: false".
8 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
9 */
10(self["webpackChunkscripts"] = self["webpackChunkscripts"] || []).push([["cursor-indicator"],{
11
vendor: 1,486 bytes, lines 12-21
12/***/ "./node_modules/is-mobile/index.js":
13/*!*****************************************!*\
14  !*** ./node_modules/is-mobile/index.js ***!
15  \*****************************************/
16/***/ (function(module) {
17
18eval("\n\nmodule.exports = isMobile;\nmodule.exports.isMobile = isMobile;\nmodule.exports[\"default\"] = isMobile;\nconst mobileRE = /(android|bb\\d+|meego).+mobile|armv7l|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i;\nconst notMobileRE = /CrOS/;\nconst tabletRE = /android|ipad|playbook|silk/i;\nfunction isMobile(opts) {\n  if (!opts) opts = {};\n  let ua = opts.ua;\n  if (!ua && typeof navigator !== 'undefined') ua = navigator.userAgent;\n  if (ua && ua.headers && typeof ua.headers['user-agent'] === 'string') {\n    ua = ua.headers['user-agent'];\n  }\n  if (typeof ua !== 'string') return false;\n  let result = mobileRE.test(ua) && !notMobileRE.test(ua) || !!opts.tablet && tabletRE.test(ua);\n  if (!result && opts.tablet && opts.featureDetect && navigator && navigator.maxTouchPoints > 1 && ua.indexOf('Macintosh') !== -1 && ua.indexOf('Safari') !== -1) {\n    result = true;\n  }\n  return result;\n}\n\n//# sourceURL=webpack://scripts/./node_modules/is-mobile/index.js?");
19
20/***/ }),
21
22/***/ "./src/cursor-indicator.js":
23/*!*********************************!*\
24  !*** ./src/cursor-indicator.js ***!
25  \*********************************/
26/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
27
28eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var is_mobile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! is-mobile */ \"./node_modules/is-mobile/index.js\");\n/* harmony import */ var is_mobile__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(is_mobile__WEBPACK_IMPORTED_MODULE_0__);\n\nif (!(0,is_mobile__WEBPACK_IMPORTED_MODULE_0__.isMobile)({\n  featureDetect: true,\n  tablet: true\n})) Init();\n\n/** @type {HTMLElement[]} */\nconst allCursors = Array.from(document.querySelectorAll('.custom-cursor'));\nlet mousePosition = {\n  x: 0,\n  y: 0\n};\nfunction Init() {\n  window.addEventListener('mousemove', TrackMouseMovement);\n}\nfunction TrackMouseMovement(evt) {\n  // update the mouse position\n  mousePosition.x = evt.x;\n  mousePosition.y = evt.y;\n  const target = evt.target;\n  const dataCursorToggle = target.closest('[data-cursor-toggle]');\n  const dataNoCursor = target.closest('[data-no-cursor]');\n\n  // console.log('dataNoCursor', dataNoCursor);\n\n  if (dataCursorToggle) {\n    // check if hover hover dataNoCursor\n    if (dataNoCursor) {\n      allCursors.map(cursor => cursor.classList.remove('active'));\n    } else {\n      allCursors.map(cursor => cursor.getAttribute('data-cursor') === dataCursorToggle.getAttribute('data-cursor-toggle') ? cursor.classList.add('active') : cursor.classList.remove('active'));\n    }\n  } else {\n    allCursors.forEach(cursor => cursor.classList.remove('active'));\n  }\n  MoveAll(dataCursorToggle);\n}\n\n/** @param {HTMLElement} dataCursorToggle */\nfunction MoveAll(dataCursorToggle) {\n  if (allCursors.length === 0) {\n    console.warn('No cursor elements found');\n    return;\n  }\n  allCursors.forEach(cursor => {\n    if (dataCursorToggle) cursor.style.transform = `translate(calc(-50% + ${mousePosition.x}px), calc(-50% + ${mousePosition.y}px)) scale(1)`;else cursor.style.transform = `translate(calc(-50% + ${mousePosition.x}px), calc(-50% + ${mousePosition.y}px)) scale(0)`;\n  });\n}\n\n//# sourceURL=webpack://scripts/./src/cursor-indicator.js?");
29
30/***/ })
30
31
32},
33/******/ function(__webpack_require__) { // webpackRuntimeModules
34/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
35/******/ var __webpack_exports__ = (__webpack_exec__("./src/cursor-indicator.js"));
36/******/ }
37]);

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.