UnknownSec Bypass
403
:
/
var
/
www
/
jpsagrisolution
/
assets
/
js
/
galleryjs
/ [
drwxr-xr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
lightbox.min.js.map
{"version":3,"sources":["webpack://lightbox/webpack/universalModuleDefinition","webpack://lightbox/webpack/bootstrap","webpack://lightbox/../src/js/index.js","webpack://lightbox/../src/js/lightbox.js","webpack://lightbox/../node_modules/lodash.debounce/index.js","webpack://lightbox/../node_modules/webpack/buildin/global.js"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","_lightbox","options","arguments","length","undefined","Lightbox","_lodash","_classCallCheck","this","body","document","mergeOptions","selector","extensions","info","thumbnails","concat","_toConsumableArray","querySelectorAll","activedElement","defaultSrc","maxDimensions","getMaxDimensions","escKeyCode","clickHandler","keyHandler","thumbnailClickHandler","resiezHandler","_lodash2","default","init","_extends","maxWidth","innerWidth","maxHeight","innerHeight","lightbox","createElement","classList","add","setAttribute","innerHTML","querySelector","lightboxContainer","lightboxImage","url","Promise","resolve","reject","image","Image","addEventListener","src","dimensions","style","_this","alt","remove","setMaxDimensions","fetchImage","then","focus","catch","error","Error","contains","e","target","IsVisible","preventDefault","hide","keyCode","createLightbox","appendChild","lightboxElements","getElements","currentTarget","href","test","stopPropagation","show","dataset","_this2","forEach","thumbnail","_this3","removeElement","parentNode","removeChild","removeEventListener","FUNC_ERROR_TEXT","NAN","symbolTag","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","freeGlobal","global","_typeof","freeSelf","self","Function","objectToString","toString","nativeMax","Math","max","nativeMin","min","now","Date","isObject","type","isSymbol","isObjectLike","toNumber","other","valueOf","replace","isBinary","slice","func","wait","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","TypeError","invokeFunc","time","args","thisArg","apply","shouldInvoke","timeSinceLastCall","timerExpired","trailingEdge","setTimeout","remainingWait","debounced","isInvoking","leadingEdge","cancel","clearTimeout","flush","g"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,eAAAC,IACAD,OAAA,cAAAH,GACA,iBAAAC,QACAA,QAAA,SAAAD,IAEAD,EAAA,SAAAC,IARA,CASCK,OAAA,WACD,mBCTA,IAAAC,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAP,QAGA,IAAAC,EAAAI,EAAAE,GAAA,CACAC,EAAAD,EACAE,GAAA,EACAT,QAAA,IAUA,OANAU,EAAAH,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAQ,GAAA,EAGAR,EAAAD,QA0DA,OArDAM,EAAAM,EAAAF,EAGAJ,EAAAO,EAAAR,EAGAC,EAAAQ,EAAA,SAAAd,EAAAe,EAAAC,GACAV,EAAAW,EAAAjB,EAAAe,IACAG,OAAAC,eAAAnB,EAAAe,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CV,EAAAgB,EAAA,SAAAtB,GACA,oBAAAuB,eAAAC,aACAN,OAAAC,eAAAnB,EAAAuB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAnB,EAAA,cAAiDyB,OAAA,KAQjDnB,EAAAoB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAAnB,EAAAmB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFAxB,EAAAgB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,EAAAE,GAAA,iBAAAF,EAAA,QAAAM,KAAAN,EAAA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eof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"lightbox\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"lightbox\"] = factory();\n\telse\n\t\troot[\"lightbox\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","import Lightbox from './lightbox';\r\n\r\nconst lightbox = (options = {}) => {\r\n return new Lightbox(options);\r\n};\r\n\r\nexport default lightbox;","import debounce from 'lodash.debounce';\r\n\r\nclass Lightbox {\r\n constructor(options) {\r\n this.body = document.body;\r\n\r\n this.options = this.mergeOptions(options);\r\n this.selector = this.options.selector;\r\n this.extensions = this.options.extensions;\r\n this.info = this.options.info;\r\n\r\n this.thumbnails = [...document.querySelectorAll(this.selector)];\r\n this.activedElement = null;\r\n this.defaultSrc = 'data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';\r\n\r\n this.maxDimensions = this.getMaxDimensions();\r\n\r\n this.escKeyCode = 27;\r\n\r\n this.clickHandler = this.clickHandler.bind(this);\r\n this.keyHandler = this.keyHandler.bind(this);\r\n this.thumbnailClickHandler = this.thumbnailClickHandler.bind(this);\r\n this.resiezHandler = debounce(this.resiezHandler.bind(this), 150);\r\n\r\n this.init();\r\n this.bind();\r\n }\r\n\r\n mergeOptions(options) {\r\n const defaultOptions = {\r\n selector: '[data-lightbox]',\r\n extensions: /\\.(gif|jpg|jpeg|tiff|png|bmp|svg)$/i,\r\n info: 'Otworzono powiększenie zdjęcia.'\r\n };\r\n\r\n return {\r\n ...defaultOptions,\r\n ...options\r\n };\r\n }\r\n\r\n getMaxDimensions() {\r\n const maxWidth = window.innerWidth - 50;\r\n const maxHeight = window.innerHeight - 150;\r\n \r\n return { \r\n maxWidth, \r\n maxHeight \r\n };\r\n }\r\n\r\n createLightbox() {\r\n const lightbox = document.createElement('div');\r\n \r\n lightbox.classList.add('lightbox');\r\n lightbox.classList.add('lightbox--hidden');\r\n lightbox.setAttribute('role', 'dialog');\r\n lightbox.setAttribute('tabindex', -1);\r\n lightbox.setAttribute('aria-describedby', 'lb-info');\r\n\r\n lightbox.innerHTML = `\r\n <div class=\"lightbox-container\">\r\n <img src=\"${this.defaultSrc}\" alt=\"\" class=\"lightbox-img\" id=\"lb-img\">\r\n <p class=\"lightbox-info visuallyhidden\" id=\"lb-info\">${this.info} Naciśnij <kbd>ESC</kbd>, aby zamknąć okno.</p>\r\n <button class=\"lightbox-close\">\r\n <span class=\"visuallyhidden\">Zamknij okno</span>\r\n </button>\r\n </div>`;\r\n \r\n return lightbox;\r\n }\r\n\r\n getElements() {\r\n const lightbox = document.querySelector('.lightbox');\r\n const lightboxContainer = lightbox.querySelector('.lightbox-container');\r\n const lightboxImage = lightbox.querySelector('.lightbox-img');\r\n \r\n return {\r\n lightbox, \r\n lightboxContainer, \r\n lightboxImage\r\n };\r\n }\r\n\r\n fetchImage(url) {\r\n return new Promise((resolve, reject) => {\r\n const image = new Image();\r\n\r\n image.addEventListener('load', resolve);\r\n image.addEventListener('error', reject);\r\n image.src = url;\r\n });\r\n }\r\n\r\n setMaxDimensions(dimensions) {\r\n const { maxWidth, maxHeight } = dimensions;\r\n\r\n this.lightboxImage.style.maxWidth = `${maxWidth}px`;\r\n this.lightboxImage.style.maxHeight = `${maxHeight}px`;\r\n }\r\n\r\n show(src, alt = '') {\r\n this.lightbox.classList.remove('lightbox--hidden');\r\n this.lightbox.classList.add('lightbox--loading');\r\n\r\n this.setMaxDimensions(this.maxDimensions);\r\n\r\n this.fetchImage(src).then(() => {\r\n this.lightbox.classList.remove('lightbox--loading');\r\n\r\n this.lightboxImage.src = src;\r\n this.lightboxImage.alt = alt;\r\n \r\n this.lightbox.focus();\r\n }).catch((error) => {\r\n this.lightbox.classList.add('lightbox--hidden');\r\n this.lightbox.classList.remove('lightbox--loading');\r\n throw new Error(error);\r\n });\r\n }\r\n\r\n hide() {\r\n this.lightbox.classList.add('lightbox--hidden');\r\n\r\n this.lightboxImage.src = this.defaultSrc;\r\n this.lightboxImage.alt = '';\r\n \r\n this.activedElement.focus();\r\n }\r\n\r\n IsVisible() {\r\n return !this.lightbox.classList.contains('lightbox--hidden');\r\n }\r\n\r\n clickHandler(e) {\r\n const { target } = e;\r\n\r\n if(target.classList.contains('lightbox-img') || !this.IsVisible()) {\r\n return false;\r\n }\r\n \r\n e.preventDefault();\r\n this.hide();\r\n }\r\n\r\n keyHandler(e) {\r\n const { keyCode } = e;\r\n\r\n if(keyCode !== this.escKeyCode || !this.IsVisible()) {\r\n return false;\r\n }\r\n\r\n e.preventDefault();\r\n this.hide();\r\n }\r\n\r\n resiezHandler(e) {\r\n this.maxDimensions = this.getMaxDimensions();\r\n\r\n this.setMaxDimensions(this.maxDimensions);\r\n }\r\n \r\n init() {\r\n const lightbox = this.createLightbox();\r\n \r\n document.body.appendChild(lightbox);\r\n\r\n this.lightboxElements = this.getElements();\r\n this.lightbox = this.lightboxElements.lightbox;\r\n this.lightboxContainer = this.lightboxElements.lightboxContainer;\r\n this.lightboxImage = this.lightboxElements.lightboxImage;\r\n }\r\n\r\n thumbnailClickHandler(e) { \r\n const { currentTarget } = e;\r\n const { href } = currentTarget;\r\n\r\n if(!href || !this.extensions.test(href)) {\r\n return false;\r\n }\r\n \r\n e.preventDefault();\r\n e.stopPropagation();\r\n \r\n this.activedElement = currentTarget;\r\n \r\n this.show(href, currentTarget.dataset.alt);\r\n }\r\n\r\n bind() {\r\n if(this.thumbnails.length > 0) {\r\n this.thumbnails.forEach((thumbnail) => {\r\n thumbnail.classList.add('lb-initialized');\r\n thumbnail.addEventListener('click', this.thumbnailClickHandler);\r\n });\r\n }\r\n\r\n document.addEventListener('click', this.clickHandler);\r\n document.addEventListener('keydown', this.keyHandler);\r\n window.addEventListener('resize', this.resiezHandler);\r\n }\r\n\r\n destroy(removeElement = false) {\r\n if(this.lightbox !== null && removeElement) {\r\n this.lightbox.parentNode.removeChild(this.lightbox);\r\n }\r\n\r\n if(this.thumbnails.length > 0) {\r\n this.thumbnails.forEach((thumbnail) => {\r\n thumbnail.classList.remove('lb-initialized');\r\n thumbnail.removeEventListener('click', this.thumbnailClickHandler);\r\n });\r\n }\r\n\r\n document.removeEventListener('click', this.clickHandler);\r\n document.removeEventListener('keydown', this.keyHandler);\r\n window.removeEventListener('resize', this.resiezHandler);\r\n }\r\n}\r\n\r\nexport default Lightbox;","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = debounce;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n"],"sourceRoot":""}
Copyright © 2025 - UnknownSec